{"bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"a9bc5d09f75d2cbd2f2cb450561946430b2f8c77","tarball":"https://registry.npmjs.org/@material/checkbox/-/checkbox-0.35.0.tgz","fileCount":15,"integrity":"sha512-pR2F05qd+QH3sWk/HK435oLtbLl7VyQ1hXVtpC7RE++WuvCI0P1TN2OyDl8/KLAJU7i8nsVOGrtijeUsS8on5w==","signatures":[{"sig":"MEUCIQC8oHbBUpJsAJEfCrnLIz7nihjs6UErrD3kdoBH4h/EuwIgMmunt26ph67gKdYzbbdDHQRy45jJ2igLwhu9mp+SXFo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229808,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa3mDICRA9TVsSAnZWagAA7G8P/2R5ys8hrfKGcmx22xLN\nvvvVeSXPqH/jDABMkTwr4KObvBn50ke5E0eawi89sUei53o+3C3FJY5J7zBV\nQrGpwuXPi2kyZZbrdI69QU6TA33PRCujXzz6ybShBO8vqvH6NppaMHHJwGT8\n3g5FCWIrU+5S5ENhJe+P/W6wbC2akqYtq9MwVEr77zKi4T4Z0BFNs2O+Wngx\n5zdvPrxJXnWtGtlOFPVsA0HqioKZW8xBrQDX3A6cMnqSoy+3V9AiadMWMBAr\n54xRUJqLQ6LU7ghnR0kaopPEXxf/YnDqAfT0KA8iI6IPDLHCLJRS/Y1JooBb\nw4C6kloxomm8hkNZtkVpj7a3uXmG29GlEiOj85vkEkEnn8j7B5sxfgTLqOfR\nKwgpQme62ENNAeqTL05GHQyqhzEhR2vzRV3jmmqSRprISzrPr5tQcpHoFqbf\nvU6ZkQIzqw6PtlaVWp7jfPgBvEmWvRp8KW7ODg/Qn2Mxxzed2IisxiBwm8KJ\nkhxP/zvFRT8/it4FxNprxRPCq6zxxEgfT8RXg0KEIjwDfiCymgmBnhCrUOwF\nsyECl4IJ8AQlVjIJQHQzHgBfZfa9R7l5R3hCPlMOf2tt6ubq8+lOiSaHyaVU\nzb92DiOteHKCz+eIyFmXrtGHxvbwKXsr4TGeAaNYtoaIjMNy7rS4dRPNra/k\nVPn5\r\n=N2Jo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","name":"@material/checkbox","readme":"<!--docs:\ntitle: \"Checkboxes\"\nlayout: detail\nsection: components\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-web.appspot.com/checkbox.html\">\n    <img src=\"{{ site.rootpath }}/images/mdc_web_screenshots/checkboxes.png\" width=\"99\" alt=\"Checkboxes screenshot\">\n  </a>\n</div>-->\n\nThe MDC Checkbox component is a spec-aligned checkbox component adhering to the\n[Material Design checkbox requirements](https://material.io/guidelines/components/selection-controls.html#selection-controls-checkbox).\nIt works without JavaScript with basic functionality for all states. If you use the JavaScript object for a checkbox, it will add more intricate animation effects when switching between states.\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/guidelines/components/selection-controls.html#selection-controls-checkbox\">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-web.appspot.com/checkbox.html\">Demo</a>\n  </li>\n</ul>\n\n## Installation\n\n```\nnpm install @material/checkbox\n```\n\n## Usage\n\n### Standalone Checkbox\n\n```html\n<div class=\"mdc-checkbox\">\n  <input type=\"checkbox\"\n         class=\"mdc-checkbox__native-control\"/>\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            stroke=\"white\"\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>\n```\n\nThe checkbox component is driven by an underlying native checkbox element. This element is sized and\npositioned the same way as the checkbox component itself, allowing for proper behavior of assistive\ndevices.\n\nAdditionally, the checkbox can be used in conjunction with [mdc-form-field](../mdc-form-field) to\neasily position checkboxes and their labels.\n\n```html\n<div class=\"mdc-form-field\">\n  <div class=\"mdc-checkbox\">\n    <input type=\"checkbox\"\n           id=\"my-checkbox\"\n           class=\"mdc-checkbox__native-control\"/>\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              stroke=\"white\"\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>\n\n  <label for=\"my-checkbox\">My Checkbox Label</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#### Disabled Checkboxes\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            stroke=\"white\"\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>\n<label for=\"basic-disabled-checkbox\" id=\"basic-disabled-checkbox-label\">This is my disabled checkbox</label>\n```\n\n### Using the JS Component\n\nMDC Checkbox ships with a Component / Foundation combo which progressively enhances the checkbox\nstate transitions to achieve full parity with the Material Design motion for switching checkbox\nstates.\n\n#### Including in code\n\n##### ES2015\n\n```javascript\nimport {MDCCheckbox, MDCCheckboxFoundation} from '@material/checkbox';\n```\n\n##### CommonJS\n\n```javascript\nconst mdcCheckbox = require('mdc-checkbox');\nconst MDCCheckbox = mdcCheckbox.MDCCheckbox;\nconst MDCCheckboxFoundation = mdcCheckbox.MDCCheckboxFoundation;\n```\n\n##### AMD\n\n```javascript\nrequire(['path/to/mdc-checkbox'], mdcCheckbox => {\n  const MDCCheckbox = mdcCheckbox.MDCCheckbox;\n  const MDCCheckboxFoundation = mdcCheckbox.MDCCheckboxFoundation;\n});\n```\n\n##### Global\n\n```javascript\nconst MDCCheckbox = mdc.checkbox.MDCCheckbox;\nconst MDCCheckboxFoundation = mdc.checkbox.MDCCheckboxFoundation;\n```\n\n#### Automatic Instantiation\n\nIf you do not care about retaining the component instance for the checkbox, simply call `attachTo()`\nand pass it a DOM element.\n\n```javascript\nmdc.checkbox.MDCCheckbox.attachTo(document.querySelector('.mdc-checkbox'));\n```\n\n#### Manual Instantiation\n\nCheckboxes can easily be initialized using their default constructors as well, similar to `attachTo`.\n\n```javascript\nimport {MDCCheckbox} from '@material/checkbox';\n\nconst checkbox = new MDCCheckbox(document.querySelector('.mdc-checkbox'));\n```\n\n#### MDCCheckbox API\n\nThe MDCCheckbox API provides accessor properties similar to those found on a native checkbox element.\n\n##### MDCCheckbox.checked\n\nBoolean. Returns whether or not the checkbox is checked. Setting this property will update the\nunderlying checkbox element.\n\n##### MDCCheckbox.indeterminate\n\nBoolean. Returns whether or not the checkbox is indeterminate. Setting this property will update the\nunderlying checkbox element.\n\n##### MDCCheckbox.disabled\n\nBoolean. Returns whether or not the checkbox is disabled. Setting this property will update the\nunderlying checkbox element.\n\n##### MDCCheckbox.value\n\nString. Returns the checkbox's value. Setting this property will update the underlying checkbox\nelement.\n\n### Using the Foundation Class\n\nMDC Checkbox ships with an `MDCCheckboxFoundation` class that external frameworks and libraries can\nuse to integrate the component. As with all foundation classes, an adapter object must be provided.\nThe adapter for checkboxes must provide the following functions, with correct signatures:\n\n| Method 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| `registerAnimationEndHandler(handler: EventListener) => void` | Registers an event handler to be called when an `animationend` event is triggered on the root element. Note that you must account for vendor prefixes in order for this to work correctly. |\n| `deregisterAnimationEndHandler(handler: EventListener) => void` | Deregisters an event handler from an `animationend` event listener. This will only be called with handlers that have previously been passed to `registerAnimationEndHandler` calls. |\n| `registerChangeHandler(handler: EventListener) => void` | Registers an event handler to be called when a `change` event is triggered on the native control (_not_ the root element). |\n| `deregisterChangeHandler(handler: EventListener) => void` | Deregisters an event handler that was previously passed to `registerChangeHandler`. |\n| `getNativeControl() => HTMLInputElement?` | Returns the native checkbox control, if available. Note that if this control is not available, the methods that rely on it will exit gracefully.|\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\n\n#### MDCCheckboxFoundation API\n\n##### MDCCheckboxFoundation.isChecked() => boolean\n\nReturns whether or not the underlying input is checked. Returns false when no input is available.\n\n##### MDCCheckboxFoundation.setChecked(checked: boolean)\n\nUpdates the `checked` property on the underlying input. Does nothing when the underlying input is\nnot present.\n\n##### MDCCheckboxFoundation.isIndeterminate() => boolean\n\nReturns whether or not the underlying input is indeterminate. Returns false when no input is\navailable.\n\n##### MDCCheckboxFoundation.setIndeterminate(indeterminate: boolean)\n\nUpdates the `indeterminate` property on the underlying input. Does nothing when the underlying input\nis not present.\n\n##### MDCCheckboxFoundation.isDisabled() => boolean\n\nReturns whether or not the underlying input is disabled. Returns false when no input is available.\n\n##### MDCCheckboxFoundation.setDisabled(disabled: boolean)\n\nUpdates the `disabled` property on the underlying input. Does nothing when the underlying input is\nnot present.\n\n##### MDCCheckboxFoundation.getValue() => string\n\nReturns the value of `adapter.getNativeControl().value`. Returns `null` if `getNativeControl()`\ndoes not return an object.\n\n##### MDCCheckboxFoundation.setValue(value: string) => void\n\nSets the value of `adapter.getNativeControl().value`. Does nothing if `getNativeControl()` does\nnot return an object.\n\n## Theming\n\nMDC Checkboxes use the theme's secondary color by default for \"marked\" states (i.e., checked or indeterminate).\n\n### Sass Mixins\n\nThe following mixins apply only to _enabled_ checkboxes. It is not currently possible to customize the color of a _disabled_ checkbox.\n\nMixin | Description\n--- | ---\n`mdc-checkbox-container-colors($unmarked-stroke-color, $unmarked-fill-color, $marked-fill-color, $generate-keyframes)` | Generates CSS classes to set and animate the stroke color and/or container fill color of a checkbox\n`mdc-checkbox-ink-color($color)` | Sets the ink color of the checked and indeterminate icons\n`mdc-checkbox-focus-indicator-color($color)` | Sets the color of the focus indicator\n\nThe ripple effect for the Checkbox component is styled using [MDC Ripple](../mdc-ripple) mixins.\n\n#### `mdc-checkbox-container-colors($unmarked-stroke-color, $unmarked-fill-color, $marked-fill-color, $generate-keyframes)`\n\nGenerates CSS classes to set the container stroke color and/or fill color of a checkbox in its marked and unmarked states.\nIn the unmarked state, stroke and fill color may be customized independently; in the marked state, only the fill color\nmay be customized, and the stroke will automatically match the fill color.\n\nAll parameters are optional, and if left unspecified will use their default values.\n\nIf you plan to use CSS-only checkboxes, set `$generate-keyframes` to `false` to prevent the mixin from generating `@keyframes` and CSS classes used by the JavaScript component.\n\n### Caveat: Edge and CSS Variables\n\nIn browsers that fully support CSS variables, MDC Checkbox references CSS variables wherever theme properties are used.\nHowever, due to Edge's buggy CSS variable support, the `background-color` for `.mdc-checkbox__background::before` will not honor CSS variables in Edge.\nThis means you will need to override this style manually for Edge if you alter the CSS variable for the primary color.\n","license":"Apache-2.0","_npmUser":{"name":"bonniez","email":"bonniez@google.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"},"_npmVersion":"5.6.0","description":"The Material Components for the web checkbox component","directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"material-admin","email":"lynnjepsen+npm@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_nodeVersion":"8.7.0","dependencies":{"@material/rtl":"^0.35.0","@material/base":"^0.35.0","@material/theme":"^0.35.0","@material/ripple":"^0.35.0","@material/animation":"^0.34.0","@material/selection-control":"^0.35.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/checkbox_0.35.0_1524523206637_0.9592819289349868","host":"s3://npm-registry-packages"},"_id":"@material/checkbox@0.35.0","version":"0.35.0"}