import { Badge } from 'terra-form-checkbox/package.json?dev-site-package';

import DefaultCheckbox from './example/checkbox/DefaultCheckboxExample?dev-site-example';
import DisabledCheckbox from './example/checkbox/DisabledCheckboxExample?dev-site-example';
import HiddenLabelCheckbox from './example/checkbox/HiddenLabelCheckboxExample?dev-site-example';
import LongTextCheckbox from './example/checkbox/LongTextCheckboxExample?dev-site-example';
import InlineCheckboxes from './example/checkbox/InlineCheckboxesExample?dev-site-example';
import MultipleCheckboxes from './example/checkbox/MultipleCheckboxesExample?dev-site-example';
import MobileCheckbox from './example/checkbox/MobileCheckboxExample?dev-site-example';

import CheckboxPropsTable from 'terra-form-checkbox/lib/Checkbox?dev-site-props-table';

<Badge />

# Terra Form Checkbox

The Terra Form Checkbox is a responsive input component rendered as a box next to label text. When activated, a check mark shall appear. Focus can be activated through tabbing and the checked state can be toggled with the space bar.

## Getting Started

- Install with [npmjs](https://www.npmjs.com):

  ```bash
  npm install terra-form-checkbox
  ```
<!-- AUTO-GENERATED-CONTENT:START Peer Dependencies -->
## Peer Dependencies

This component requires the following peer dependencies be installed in your app for the component to properly function.

| Peer Dependency | Version |
|-|-|
| react | ^16.8.5 |
| react-dom | ^16.8.5 |
| react-intl | ^2.8.0 |

<!-- AUTO-GENERATED-CONTENT:END -->

## Implementation Notes:
The Form-Checkbox component must be composed inside the [Base][1] component with a locale in order for it to load the correct translation strings.

[1]: https://engineering.cerner.com/terra-core/components/terra-base/base/base

## Usage

```jsx
import Checkbox from 'terra-form-checkbox';
```

## Jest Tests:
* This component requires `window.matchMedia` to be mocked in Jest tests. To do so add the following to the top of your test file(s) that use this component:
    ```
    window.matchMedia = () => ({ matches: true });
    ```

## Component Features
 * [Cross-Browser Support](https://engineering.cerner.com/terra-ui/about/terra-ui/component-standards#cross-browser-support)
 * [Responsive Support](https://engineering.cerner.com/terra-ui/about/terra-ui/component-standards#responsive-support)
 * [Mobile Support](https://engineering.cerner.com/terra-ui/about/terra-ui/component-standards#mobile-support)
 * [LTR/RTL Support](https://engineering.cerner.com/terra-ui/about/terra-ui/component-standards#ltr--rtl)

## Examples
<DefaultCheckbox title="Default Checkbox" />
<DisabledCheckbox title="Disabled Checkbox" />
<HiddenLabelCheckbox title="Hidden Label Checkbox" />
<LongTextCheckbox title="Long Text Checkbox" />
<InlineCheckboxes title="Multiple Inline Checkboxes" />
<MultipleCheckboxes title="Multiple Checkboxes - first defaults to checked" />
<MobileCheckbox title="[Theme Specific] Resize checkboxes on non-desktop touch device" />

## Checkbox Props
<CheckboxPropsTable />