{"bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"2fbb9905aadd5a3a1651e25df1edac0a1ad5766f","tarball":"https://registry.npmjs.org/@material/checkbox/-/checkbox-6.0.0-canary.e33c49e.0.tgz","fileCount":38,"integrity":"sha512-yw40KYOm9QmeIkEpxlS7trZh3JMaWOeXt0vhOddUoj6I6fAHI/Q5nP+pxwc+qjQ9NVvjoqeJKINF3CvZknehRA==","signatures":[{"sig":"MEQCIC2GjJVO7wR+TFcsvrS75Yalew5xpKODgJSf3IJsCfLYAiBYCqtB24xKsT13MidNb/qJ4vZrJHx9TFOOqquc3/9Pnw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":542972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehS02CRA9TVsSAnZWagAAVhwP/2Zf8sUU4rGGxgKIXQVZ\nzRfEFPaLD+9ghODUWJzYtqPw4L+ndKgUuC8JJrMO3HLuiDElFSL7ZZvWZ9PK\nFRhFWUCro8Lussaj9lMoLVul2SM0UE6Fgpj2Qg17s0A20UlkWVm+boVcfQCV\n7sSJexYtMaeiwU+yk+hv9khJfQolC6zngGM+wpHmeVA0P5f75AWZn/X3h76K\nWfisWA0NtqDjiiKyJFiWIb59d7Y8ht9Wei2B/PJsu7pTcBOSlIeY1u/irGsk\nkBrXaSVoTL4UxI5ph6CwCglus4DhdIkyhPpuJzyFuv4+b06mdbVocmyrvRcQ\n4S8QHjDPguyBGSK2GsGg65TN4CC8QkCMSSPg0jiP/ooVJZUYOPMJu/kRyYqE\n403VSzK5aI5SU6D7vMuOniwOY58n2oS/SukOUWyO28YdJA6ZkBbwsnwrje8Q\ntn2hsEDfTCMXnOJZiHzeELWuTmhL/iqs/X/R5Fztl8DsIzhL5Is5EvJZ2SWM\nv26HdtP0KqpeTj2qxTa2fJJ9ILL5tG3aKMYrl9MiQbO0Leqf8oKslUkE8VhC\nfXXbHLtYokzfNQDOJUITWtjfr+FHYamyigDE3JidSSbyL7iVvnBVnk/0UL0v\nU97eRuFx+leUi0mzo3KN9lypALmyUOZ23YhkEdEH5d1uqk9G6D0IfQ6OCgmc\nJUHL\r\n=9SV9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.checkbox.js","name":"@material/checkbox","types":"dist/mdc.checkbox.d.ts","module":"./index.js","readme":"<!--docs:\ntitle: \"Checkboxes\"\nlayout: detail\nsection: components\nexcerpt: \"Checkboxes allow the user to select multiple options from a set.\"\niconId: selection_control\npath: /catalog/input-controls/checkboxes/\n-->\n\n# Checkboxes\n\n<!--<div class=\"article__asset\">\n  <a class=\"article__asset-link\"\n     href=\"https://material-components.github.io/material-components-web-catalog/#/component/checkbox\">\n    <img src=\"{{ site.rootpath }}/images/mdc_web_screenshots/checkboxes.png\"\n    width=\"99\" alt=\"Checkbox screenshot\">\n  </a>\n</div>-->\n\nCheckboxes allow the user to select one or more items from a set.\n\n## Design & API Documentation\n\n<ul class=\"icon-list\">\n  <li class=\"icon-list-item icon-list-item--spec\">\n    <a href=\"https://material.io/go/design-checkboxes\">Material Design guidelines: Selection Controls – Checkbox</a>\n  </li>\n  <li class=\"icon-list-item icon-list-item--link\">\n    <a href=\"https://material-components.github.io/material-components-web-catalog/#/component/checkbox\">Demo</a>\n  </li>\n</ul>\n\n## Installation\n\n```\nnpm install @material/checkbox\n```\n\n## Basic Usage\n\nWe recommend using MDC Checkbox with [MDC Form Field](../mdc-form-field) for enhancements such as label alignment, label activation of the ripple interaction effect, and RTL-awareness.\n\n```html\n<div class=\"mdc-form-field\">\n  <div class=\"mdc-checkbox\">\n    <input type=\"checkbox\"\n           class=\"mdc-checkbox__native-control\"\n           id=\"checkbox-1\"/>\n    <div class=\"mdc-checkbox__background\">\n      <svg class=\"mdc-checkbox__checkmark\"\n           viewBox=\"0 0 24 24\">\n        <path class=\"mdc-checkbox__checkmark-path\"\n              fill=\"none\"\n              d=\"M1.73,12.91 8.1,19.28 22.79,4.59\"/>\n      </svg>\n      <div class=\"mdc-checkbox__mixedmark\"></div>\n    </div>\n    <div class=\"mdc-checkbox__ripple\"></div>\n  </div>\n  <label for=\"checkbox-1\">Checkbox 1</label>\n</div>\n```\n\n> **Note**: If you are using IE, you need to include a closing `</path>` tag if you wish to avoid console warnings.\n\n### Styles\n\n```scss\n@use \"@material/form-field/mdc-form-field\";\n@use \"@material/checkbox/mdc-checkbox\";\n```\n\n### JavaScript Instantiation\n\nThe checkbox will work without JavaScript, but you can enhance it with a ripple interaction effect by instantiating `MDCCheckbox` on the `mdc-checkbox` element. To activate the ripple effect upon interacting with the label, you must also instantiate `MDCFormField` on the `mdc-form-field` element and set the `MDCCheckbox` instance as its `input`.\n\n```js\nimport {MDCFormField} from '@material/form-field';\nimport {MDCCheckbox} from '@material/checkbox';\n\nconst checkbox = new MDCCheckbox(document.querySelector('.mdc-checkbox'));\nconst formField = new MDCFormField(document.querySelector('.mdc-form-field'));\nformField.input = checkbox;\n```\n\n> See [Importing the JS component](../../docs/importing-js.md) for more information on how to import JavaScript.\n\n## Variants\n\n### Disabled\n\nNote that `mdc-checkbox--disabled` is necessary on the root element of CSS-only checkboxes to prevent hover states from activating. Checkboxes that use the JavaScript component do not need this class; a `disabled` attribute on the `<input>` element is sufficient.\n\n```html\n<div class=\"mdc-checkbox mdc-checkbox--disabled\">\n  <input type=\"checkbox\"\n         id=\"basic-disabled-checkbox\"\n         class=\"mdc-checkbox__native-control\"\n         disabled />\n  <div class=\"mdc-checkbox__background\">\n    <svg class=\"mdc-checkbox__checkmark\"\n         viewBox=\"0 0 24 24\">\n      <path class=\"mdc-checkbox__checkmark-path\"\n            fill=\"none\"\n            d=\"M1.73,12.91 8.1,19.28 22.79,4.59\"/>\n    </svg>\n    <div class=\"mdc-checkbox__mixedmark\"></div>\n  </div>\n  <div class=\"mdc-checkbox__ripple\"></div>\n</div>\n<label for=\"basic-disabled-checkbox\" id=\"basic-disabled-checkbox-label\">This is my disabled checkbox</label>\n```\n\n## Additional Information\n\n### Accessibility\n\nMaterial Design spec advises that touch targets should be at least 48 x 48 px.\nTo meet this requirement, add the `mdc-checkbox--touch` class to your checkbox as follows:\n\n```html\n<div class=\"mdc-touch-target-wrapper\">\n  <div class=\"mdc-checkbox mdc-checkbox--touch\">\n    <input type=\"checkbox\"\n           class=\"mdc-checkbox__native-control\"\n           id=\"checkbox-1\"/>\n    <div class=\"mdc-checkbox__background\">\n      <svg class=\"mdc-checkbox__checkmark\"\n           viewBox=\"0 0 24 24\">\n        <path class=\"mdc-checkbox__checkmark-path\"\n              fill=\"none\"\n              d=\"M1.73,12.91 8.1,19.28 22.79,4.59\"/>\n      </svg>\n      <div class=\"mdc-checkbox__mixedmark\"></div>\n    </div>\n    <div class=\"mdc-checkbox__ripple\"></div>\n  </div>\n</div>\n```\n\nNote that the outer `mdc-touch-target-wrapper` element is only necessary if you want to avoid potentially overlapping touch targets on adjacent elements (due to collapsing margins).\n\n## Style Customization\n\nMDC Checkbox uses [MDC Theme](../mdc-theme)'s `secondary` color by default for \"marked\" states (i.e., checked or indeterminate).\n\n### Sass Mixins\n\nMixin | Description\n--- | ---\n`container-colors($unmarked-stroke-color, $unmarked-fill-color, $marked-stroke-color, $marked-fill-color, $generate-keyframes)` | Sets stroke & fill colors for both marked and unmarked state of enabled checkbox. Set $generate-keyframes to false to prevent the mixin from generating @keyframes.\n`disabled-container-colors($unmarked-stroke-color, $unmarked-fill-color, $marked-stroke-color, $marked-fill-color)` | Sets stroke & fill colors for both marked and unmarked state of disabled checkbox.\n`ink-color($color)` | Sets the ink color of the checked and indeterminate icons for an enabled checkbox\n`disabled-ink-color($color)` | Sets the ink color of the checked and indeterminate icons for a disabled checkbox\n`focus-indicator-color($color)` | Sets the color of the focus indicator (ripple) when checkbox is selected or is in indeterminate state.\n`ripple-size($ripple-size)` | Sets the ripple size of the checkbox.\n`density($density-scale)` | Sets density scale for checkbox, Supported density scales are `-3`, `-2`, `-1`, and `0` (default).\n\nThe ripple effect for the Checkbox component is styled using [MDC Ripple](../mdc-ripple) mixins.\n\n## `MDCCheckbox` Properties and Methods\n\nProperty Name | Type | Description\n--- | --- | ---\n`checked` | `boolean` | Setter/getter for the checkbox's checked state\n`indeterminate` | `boolean` | Setter/getter for the checkbox's indeterminate state\n`disabled` | `boolean` | Setter/getter for the checkbox's disabled state\n`value` | `string` | Setter/getter for the checkbox's\n\n## Usage within Web Frameworks\n\nIf you are using a JavaScript framework, such as React or Angular, you can create a Checkbox for your framework. Depending on your needs, you can use the _Simple Approach: Wrapping MDC Web Vanilla Components_, or the _Advanced Approach: Using Foundations and Adapters_. Please follow the instructions [here](../../docs/integrating-into-frameworks.md).\n\n### `MDCCheckboxAdapter`\n\nMethod Signature | Description\n--- | ---\n`addClass(className: string) => void` | Adds a class to the root element.\n`removeClass(className: string) => void` | Removes a class from the root element.\n`forceLayout() => void` | Force-trigger a layout on the root element. This is needed to restart animations correctly. If you find that you do not need to do this, you can simply make it a no-op.\n`isAttachedToDOM() => boolean` | Returns true if the component is currently attached to the DOM, false otherwise.\n`isIndeterminate() => boolean` | Returns true if the component is in the indeterminate state.\n`isChecked() => boolean` | Returns true if the component is checked.\n`hasNativeControl() => boolean` | Returns true if the input is present in the component.\n`setNativeControlDisabled(disabled: boolean) => void` | Sets the input to disabled.\n`setNativeControlAttr(attr: string, value: string) => void` | Sets an HTML attribute to the given value on the native input element.\n`removeNativeControlAttr(attr: string) => void` | Removes an attribute from the native input element.\n\n### `MDCCheckboxFoundation`\n\nMethod Signature | Description\n--- | ---\n`setDisabled(disabled: boolean) => void` | Updates the `disabled` property on the underlying input. Does nothing when the underlying input is not present.\n`handleAnimationEnd() => void` | `animationend` event handler that should be applied to the root element.\n`handleChange() => void` | `change` event handler that should be applied to the checkbox element.\n","gitHead":"e369357845cadf1687509d31fac95d3131a90718","license":"MIT","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"homepage":"https://github.com/material-components/material-components-web#readme","keywords":["material components","material design","checkbox"],"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-checkbox"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"The Material Components for the web checkbox component","directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"sideEffects":false,"_nodeVersion":"10.19.0","dependencies":{"tslib":"^1.9.3","@material/dom":"6.0.0-canary.e33c49e.0","@material/base":"6.0.0-canary.e33c49e.0","@material/theme":"6.0.0-canary.e33c49e.0","@material/ripple":"6.0.0-canary.e33c49e.0","@material/density":"6.0.0-canary.e33c49e.0","@material/animation":"6.0.0-canary.e33c49e.0","@material/touch-target":"6.0.0-canary.e33c49e.0","@material/feature-targeting":"6.0.0-canary.e33c49e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/checkbox_6.0.0-canary.e33c49e.0_1585786165836_0.4464847561755769","host":"s3://npm-registry-packages"},"_id":"@material/checkbox@6.0.0-canary.e33c49e.0","version":"6.0.0-canary.e33c49e.0"}