{"bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"db7465bb862b9ca09b5cb84f4436518bd63c1a49","tarball":"https://registry.npmjs.org/@material/select/-/select-8.0.0-canary.e2ea4a99e.0.tgz","fileCount":83,"integrity":"sha512-M3mK4vPlbfYMZZO3o4S0dhp4ynrseACwdOLYL2y3H/VOVdv5KhEwGBJ85LjO/adsh5fLgBS+GsKveE00ueXK3A==","signatures":[{"sig":"MEYCIQD1sGo9+mMLMH+5ayfOX76m812ZGd6cU1lZOkgqohnxXAIhANq7B7YxY438wiPwqTxZatkhpo/SjYtNWKFUKpWc2jPS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1624219,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/OPcCRA9TVsSAnZWagAAAPEP/317MO/sOzjtpoj9OOB0\nBr5TBnwzAp0f7GAwW0ImeF8KWvPCECVoHwA2lJXQDeY3lJQpzojWZzUSQ3pY\n8X+iobkm+gi/hcptiA7rScOIm+IC0jJDA54neJ1zIQ6+kwPx1TZs65l0exPt\n/CQlMGcDRnAQKLGgaA7d3KEr/N9Sgevm+vFgUICffFVY3F4Fg8y/oaNucpuk\nrzHxnLvVu5kEgc9Ucj7eBVIV9KBYAyQOo5Nk01ta7ZyZb5Xx14ChrFhZDf1V\nf2YZRTTYfSDAXt8tYZe7UGiieKDcCgomCHtxoyWGltGMKwCc2M8T/oHXlYQO\nVcaGFJcEjaZhrb1FI/z9yHTQ1JmMKdMfBHN/pel7t2ZHvBErZHf8Y7LnGlhz\n+4smpTRcD9mDPMGnyshLsrEQf9ZCF9/tNM6dgtxJNiMkmX5oNJg7RDZFEg/C\nvgeM2wpGYyGThcykuhVFzqSgRCtR/OErDZhuxgFDSbEXlpl4PyQ3N6SnzIOi\nfnAPOj4v99TzVTlxlI9pVDQdc78EWm/b+GbS5dk+gniq2h84gy1ERd+A5kBA\nvxRYxLn/rmgLG4KtGMM2RMiIKTmRWERZysDTfSMkMGZsByWw1QOGMYCxjvA3\nEVmP/RlYpcoeGGH8/mohNHE33FGLIvd9UDcOzCoN4BYyCh0ZKsoBIcn9wWe8\nqsqL\r\n=o7YU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.select.js","name":"@material/select","types":"dist/mdc.select.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Select Menus\"\nlayout: detail\nsection: components\niconId: menu\npath: /catalog/input-controls/select-menus/\n-->\n\n# Select Menus\n\n<!--<div class=\"article__asset\">\n  <a class=\"article__asset-link\"\n     href=\"https://material-components.github.io/material-components-web-catalog/#/component/select\">\n    <img src=\"{{ site.rootpath }}/images/mdc_web_screenshots/selects.png\" width=\"376\" alt=\"Select screenshot\">\n  </a>\n</div>-->\n\nMDC Select provides Material Design single-option select menus, using the MDC menu.\nThe Select component is fully accessible, and supports RTL rendering.\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-text-fields\">Material Design guidelines: Text Fields</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/select\">Demo</a>\n  </li>\n</ul>\n\n## Installation\n\n```\nnpm install @material/select\n```\n\n## Basic Usage\n\nThe select uses an [`MDCMenu`](../mdc-menu) component instance to contain the list of options, but uses the\n`data-value` attribute instead of `value` to represent the options' values.\n\n> _NOTE_: The `data-value` attribute _must_ be present on each option.\n\nThe select requires that you set the `width` of the `mdc-select` element. This is best done through the use of another class (e.g. `demo-width-class` in the example HTML and CSS below).\n\n### HTML\n\n```html\n<div class=\"mdc-select mdc-select--filled demo-width-class\">\n  <div class=\"mdc-select__anchor\">\n    <span class=\"mdc-select__ripple\"></span>\n    <span class=\"mdc-select__selected-text\"></span>\n    <span class=\"mdc-select__dropdown-icon\">\n      <svg\n          class=\"mdc-select__dropdown-icon-graphic\"\n          viewBox=\"7 10 10 5\">\n        <polygon\n            class=\"mdc-select__dropdown-icon-inactive\"\n            stroke=\"none\"\n            fill-rule=\"evenodd\"\n            points=\"7 10 12 15 17 10\">\n        </polygon>\n        <polygon\n            class=\"mdc-select__dropdown-icon-active\"\n            stroke=\"none\"\n            fill-rule=\"evenodd\"\n            points=\"7 15 12 10 17 15\">\n        </polygon>\n      </svg>\n    </span>\n    <span class=\"mdc-floating-label\">Pick a Food Group</span>\n    <span class=\"mdc-line-ripple\"></span>\n  </div>\n\n  <div class=\"mdc-select__menu mdc-menu mdc-menu-surface mdc-menu-surface--fullwidth\">\n    <ul class=\"mdc-list\">\n      <li class=\"mdc-list-item mdc-list-item--selected\" data-value=\"\" aria-selected=\"true\">\n        <span class=\"mdc-list-item__ripple\"></span>\n      </li>\n      <li class=\"mdc-list-item\" data-value=\"grains\">\n        <span class=\"mdc-list-item__ripple\"></span>\n        <span class=\"mdc-list-item__text\">Bread, Cereal, Rice, and Pasta</span>\n      </li>\n      <li class=\"mdc-list-item\" data-value=\"vegetables\">\n        <span class=\"mdc-list-item__ripple\"></span>\n        <span class=\"mdc-list-item__text\">Vegetables</span>\n      </li>\n      <li class=\"mdc-list-item\" data-value=\"fruit\">\n        <span class=\"mdc-list-item__ripple\"></span>\n        <span class=\"mdc-list-item__text\">Fruit</span>\n      </li>\n    </ul>\n  </div>\n</div>\n```\n\n> _NOTE_: The menu width matches the width of the select by default. To set\nmenu to its natural width, remove `mdc-menu-surface--fullwidth` from the menu\nsurface.\n\n### Styles\n\nWhen using the select, you will also need to load the Menu and List components' styles.\n\n```scss\n@use \"@material/list/mdc-list\";\n@use \"@material/menu-surface/mdc-menu-surface\";\n@use \"@material/menu/mdc-menu\";\n@use \"@material/select/mdc-select\";\n\n.demo-width-class {\n  width: 400px;\n}\n```\n\n### JavaScript Instantiation\n\n```js\nimport {MDCSelect} from '@material/select';\n\nconst select = new MDCSelect(document.querySelector('.mdc-select'));\n\nselect.listen('MDCSelect:change', () => {\n  alert(`Selected option at index ${select.selectedIndex} with value \"${select.value}\"`);\n});\n```\n\nSee [Importing the JS component](../../docs/importing-js.md) for more information on how to import JavaScript.\n\n#### Accessibility (a11y)\n\nIn order to have an accessible component for users, it's recommended that you follow the WAI-ARIA example for\n[Collapsible Dropdown Listbox](https://www.w3.org/TR/wai-aria-practices/examples/listbox/listbox-collapsible.html).\nThe following is an example of the select component with all of the necessary aria attributes.\n\n```html\n<div class=\"mdc-select\">\n  <div class=\"mdc-select__anchor\"\n       role=\"button\"\n       aria-haspopup=\"listbox\"\n       aria-labelledby=\"demo-label demo-selected-text\">\n    <span class=\"mdc-select__ripple\"></span>\n    <span id=\"demo-selected-text\" class=\"mdc-select__selected-text\">Vegetables</span>\n    <span class=\"mdc-select__dropdown-icon\">\n      <svg\n          class=\"mdc-select__dropdown-icon-graphic\"\n          viewBox=\"7 10 10 5\">\n        <polygon\n            class=\"mdc-select__dropdown-icon-inactive\"\n            stroke=\"none\"\n            fill-rule=\"evenodd\"\n            points=\"7 10 12 15 17 10\">\n        </polygon>\n        <polygon\n            class=\"mdc-select__dropdown-icon-active\"\n            stroke=\"none\"\n            fill-rule=\"evenodd\"\n            points=\"7 15 12 10 17 15\">\n        </polygon>\n      </svg>\n    </span>\n    <span id=\"demo-label\" class=\"mdc-floating-label mdc-floating-label--float-above\">Pick a Food Group</span>\n    <span class=\"mdc-line-ripple\"></span>\n  </div>\n\n  <div class=\"mdc-select__menu mdc-menu mdc-menu-surface\" role=\"listbox\">\n    <ul class=\"mdc-list\">\n      <li class=\"mdc-list-item mdc-list-item--selected\" aria-selected=\"true\" data-value=\"\" role=\"option\"></li>\n      <li class=\"mdc-list-item\" data-value=\"grains\" role=\"option\">\n        <span class=\"mdc-list-item__text\">Bread, Cereal, Rice, and Pasta</span>\n      </li>\n      <li class=\"mdc-list-item mdc-list-item--disabled\" data-value=\"vegetables\" aria-disabled=\"true\" role=\"option\">\n        <span class=\"mdc-list-item__text\">Vegetables</span>\n      </li>\n      <li class=\"mdc-list-item\" data-value=\"fruit\" role=\"option\">\n        <span class=\"mdc-list-item__text\">Fruit</span>\n      </li>\n    </ul>\n  </div>\n</div>\n```\n\n## Variants\n\n### Outlined Select\n\nThe Select Outlined variant uses the `mdc-notched-outline` in place of the `mdc-line-ripple` element and adds the\n`mdc-select--outlined` modifier class on the root element. All other elements for each type of select remain the\nsame.\n\n```html\n<div class=\"mdc-select mdc-select--outlined\">\n  <div class=\"mdc-select__anchor\" aria-labelledby=\"outlined-select-label\">\n    <span id=\"demo-selected-text\" class=\"mdc-select__selected-text\"></span>\n    <span class=\"mdc-select__dropdown-icon\">\n      <svg\n          class=\"mdc-select__dropdown-icon-graphic\"\n          viewBox=\"7 10 10 5\">\n        <polygon\n            class=\"mdc-select__dropdown-icon-inactive\"\n            stroke=\"none\"\n            fill-rule=\"evenodd\"\n            points=\"7 10 12 15 17 10\">\n        </polygon>\n        <polygon\n            class=\"mdc-select__dropdown-icon-active\"\n            stroke=\"none\"\n            fill-rule=\"evenodd\"\n            points=\"7 15 12 10 17 15\">\n        </polygon>\n      </svg>\n    </span>\n    <span class=\"mdc-notched-outline\">\n      <span class=\"mdc-notched-outline__leading\"></span>\n      <span class=\"mdc-notched-outline__notch\">\n        <span id=\"outlined-select-label\" class=\"mdc-floating-label\">Pick a Food Group</span>\n      </span>\n      <span class=\"mdc-notched-outline__trailing\"></span>\n    </span>\n  </div>\n\n  <!-- Other elements from the select remain. -->\n  <div class=\"mdc-select__menu mdc-menu mdc-menu-surface\" role=\"listbox\">...</div>\n</div>\n```\n\n### Additional Information\n\n#### Select with pre-selected option\n\nTo indicate a select component that has a pre-selected value, use the `mdc-list-item--selected` class\nto set the selected item. The select also needs the text from the selected element copied to the\n`mdc-select__selected-text` element.\n\n```html\n<div class=\"mdc-select mdc-select--filled demo-width-class\">\n  <div class=\"mdc-select__anchor\">\n    <span class=\"mdc-select__ripple\"></span>\n    <span class=\"mdc-select__selected-text\">Vegetables</span>\n    <span class=\"mdc-select__dropdown-icon\">\n      <svg\n          class=\"mdc-select__dropdown-icon-graphic\"\n          viewBox=\"7 10 10 5\">\n        <polygon\n            class=\"mdc-select__dropdown-icon-inactive\"\n            stroke=\"none\"\n            fill-rule=\"evenodd\"\n            points=\"7 10 12 15 17 10\">\n        </polygon>\n        <polygon\n            class=\"mdc-select__dropdown-icon-active\"\n            stroke=\"none\"\n            fill-rule=\"evenodd\"\n            points=\"7 15 12 10 17 15\">\n        </polygon>\n      </svg>\n    </span>\n    <span class=\"mdc-floating-label mdc-floating-label--float-above\">Pick a Food Group</span>\n    <span class=\"mdc-line-ripple\"></span>\n  </div>\n\n  <div class=\"mdc-select__menu demo-width-class mdc-menu mdc-menu-surface\">\n    <ul class=\"mdc-list\">\n      <li class=\"mdc-list-item\" data-value=\"\">\n        <span class=\"mdc-list-item__ripple\"></span>\n      </li>\n      <li class=\"mdc-list-item\" data-value=\"grains\">\n        <span class=\"mdc-list-item__ripple\"></span>\n        <span class=\"mdc-list-item__text\">Bread, Cereal, Rice, and Pasta</span>\n      </li>\n      <li class=\"mdc-list-item mdc-list-item--selected\" data-value=\"vegetables\" aria-selected=\"true\">\n        <span class=\"mdc-list-item__ripple\"></span>\n        <span class=\"mdc-list-item__text\">Vegetables</span>\n      </li>\n      <li class=\"mdc-list-item\" data-value=\"fruit\">\n        <span class=\"mdc-list-item__ripple\"></span>\n        <span class=\"mdc-list-item__text\">Fruit</span>\n      </li>\n    </ul>\n  </div>\n</div>\n```\n\n#### Using the floating label as the placeholder\n\nLeave the `mdc-select__selected-text` element empty and don't specify an element as selected.\nIf leaving the field empty should be a valid option, include an `mdc-list-item` element at the beginning of\nthe list with an empty `data-value` attribute.\n\n```html\n<li class=\"mdc-list-item mdc-list-item--selected\" aria-selected=\"true\" role=\"option\" data-value=\"\"></li>\n```\n\n#### Required select\n\nTo style a select menu as required and enable validation, add the `mdc-select--required` class to the `mdc-select` element\nand set the `aria-required` attribute on the `mdc-select__anchor` element to be `\"true\"`.\n\n```html\n<div class=\"mdc-select mdc-select--filled mdc-select--required\">\n  <span class=\"mdc-select__ripple\"></span>\n  <div class=\"mdc-select__anchor\" aria-required=\"true\">\n    <span class=\"mdc-select__selected-text\"></span>\n    <span class=\"mdc-select__dropdown-icon\">\n      <svg\n          class=\"mdc-select__dropdown-icon-graphic\"\n          viewBox=\"7 10 10 5\">\n        <polygon\n            class=\"mdc-select__dropdown-icon-inactive\"\n            stroke=\"none\"\n            fill-rule=\"evenodd\"\n            points=\"7 10 12 15 17 10\">\n        </polygon>\n        <polygon\n            class=\"mdc-select__dropdown-icon-active\"\n            stroke=\"none\"\n            fill-rule=\"evenodd\"\n            points=\"7 15 12 10 17 15\">\n        </polygon>\n      </svg>\n    </span>\n    <span class=\"mdc-floating-label\">Pick a Food Group</span>\n    <span class=\"mdc-line-ripple\"></span>\n  </div>\n\n  <div class=\"mdc-select__menu mdc-menu mdc-menu-surface\">\n    ...\n  </div>\n</div>\n```\n\n> _NOTE_: To programmatically set a select as required, use the `required` property in the `MDCSelect` API.\n\n#### Disabled select\n\nAdd the `mdc-select--disabled` class to the `mdc-select` element and and set the\n`aria-disabled` attribute on the `mdc-select__selected-text` element to be `\"true\"`.\n\n```html\n<div class=\"mdc-select mdc-select--filled mdc-select--disabled\">\n  <div class=\"mdc-select__anchor\" aria-disabled=\"true\">\n    <span class=\"mdc-select__ripple\"></span>\n    <span class=\"mdc-select__selected-text\"></span>\n    <span class=\"mdc-select__dropdown-icon\">\n      <svg\n          class=\"mdc-select__dropdown-icon-graphic\"\n          viewBox=\"7 10 10 5\">\n        <polygon\n            class=\"mdc-select__dropdown-icon-inactive\"\n            stroke=\"none\"\n            fill-rule=\"evenodd\"\n            points=\"7 10 12 15 17 10\">\n        </polygon>\n        <polygon\n            class=\"mdc-select__dropdown-icon-active\"\n            stroke=\"none\"\n            fill-rule=\"evenodd\"\n            points=\"7 15 12 10 17 15\">\n        </polygon>\n      </svg>\n    </span>\n    <span class=\"mdc-floating-label\">Pick a Food Group</span>\n    <span class=\"mdc-line-ripple\"></span>\n  </div>\n\n  <div class=\"mdc-select__menu mdc-menu mdc-menu-surface\">\n    ...\n  </div>\n</div>\n```\n\n> _NOTE_: To programmatically set a select as disabled, use the `disabled` property in the `MDCSelect` API.\n\n#### Disabled options\n\nAdd the `mdc-list-item--disabled` class to list items that are disabled.\nDisabled list items are removed from the list items index and are ignored entirely. You cannot\nprogrammatically select a disabled list item.\n\n```html\n<div class=\"mdc-select mdc-select--filled\">\n  <div class=\"mdc-select__anchor\">\n    ...\n  </div>\n\n  <div class=\"mdc-select__menu mdc-menu mdc-menu-surface\">\n    <ul class=\"mdc-list\">\n      <li class=\"mdc-list-item\" data-value=\"\">\n        <span class=\"mdc-list-item__ripple\"></span>\n      </li>\n      <li class=\"mdc-list-item\" data-value=\"grains\">\n        <span class=\"mdc-list-item__ripple\"></span>\n        <span class=\"mdc-list-item__text\">Bread, Cereal, Rice, and Pasta</span>\n      </li>\n      <li class=\"mdc-list-item mdc-list-item--selected mdc-list-item--disabled\" data-value=\"vegetables\">\n        <span class=\"mdc-list-item__ripple\"></span>\n        <span class=\"mdc-list-item__text\">Vegetables</span>\n      </li>\n      <li class=\"mdc-list-item\" data-value=\"fruit\">\n        <span class=\"mdc-list-item__ripple\"></span>\n        <span class=\"mdc-list-item__text\">Fruit</span>\n      </li>\n    </ul>\n  </div>\n</div>\n```\n\n### Select with Helper Text\n\nThe helper text provides supplemental information and/or validation messages to users. It appears when the select\nelement is focused and disappears on blur by default, or it can be persistent.\nSee [here](helper-text/) for more information on using helper text.\n\n### Select with Leading  Icons\n\nLeading icons can be added within the default or outlined variant of MDC Select as visual indicators as\nwell as interaction targets. See [here](icon/) for more information on using icons.\n\n### Select with No Label\n\nA label is not required if a separate, adjacent label is provided elsewhere. To correctly style\nMDC Select without a label, add the class `mdc-select--no-label` and remove the label from the\nstructure.\n\n#### Filled\n\n```html\n<div class=\"mdc-select mdc-select--filled mdc-select--no-label demo-width-class\">\n  <div class=\"mdc-select__anchor\">\n    <span class=\"mdc-select__ripple\"></span>\n    <span class=\"mdc-select__selected-text\"></span>\n    <span class=\"mdc-select__dropdown-icon\">\n      <svg\n          class=\"mdc-select__dropdown-icon-graphic\"\n          viewBox=\"7 10 10 5\">\n        <polygon\n            class=\"mdc-select__dropdown-icon-inactive\"\n            stroke=\"none\"\n            fill-rule=\"evenodd\"\n            points=\"7 10 12 15 17 10\">\n        </polygon>\n        <polygon\n            class=\"mdc-select__dropdown-icon-active\"\n            stroke=\"none\"\n            fill-rule=\"evenodd\"\n            points=\"7 15 12 10 17 15\">\n        </polygon>\n      </svg>\n    </span>\n    <span class=\"mdc-line-ripple\"></span>\n  </div>\n\n  <div class=\"mdc-select__menu mdc-menu mdc-menu-surface mdc-menu-surface--fullwidth\">\n    <ul class=\"mdc-list\">\n      <li class=\"mdc-list-item mdc-list-item--selected\" data-value=\"\" aria-selected=\"true\">\n        <span class=\"mdc-list-item__ripple\"></span>\n      </li>\n      <li class=\"mdc-list-item\" data-value=\"grains\">\n        <span class=\"mdc-list-item__ripple\"></span>\n        <span class=\"mdc-list-item__text\">Bread, Cereal, Rice, and Pasta</span>\n      </li>\n      <li class=\"mdc-list-item\" data-value=\"vegetables\">\n        <span class=\"mdc-list-item__ripple\"></span>\n        <span class=\"mdc-list-item__text\">Vegetables</span>\n      </li>\n      <li class=\"mdc-list-item\" data-value=\"fruit\">\n        <span class=\"mdc-list-item__ripple\"></span>\n        <span class=\"mdc-list-item__text\">Fruit</span>\n      </li>\n    </ul>\n  </div>\n</div>\n```\n\n#### Outlined\n\n```html\n<div class=\"mdc-select mdc-select--outlined mdc-select--no-label demo-width-class\">\n  <div class=\"mdc-select__anchor\">\n    <span class=\"mdc-select__selected-text\"></span>\n    <span class=\"mdc-select__dropdown-icon\">\n      <svg\n          class=\"mdc-select__dropdown-icon-graphic\"\n          viewBox=\"7 10 10 5\">\n        <polygon\n            class=\"mdc-select__dropdown-icon-inactive\"\n            stroke=\"none\"\n            fill-rule=\"evenodd\"\n            points=\"7 10 12 15 17 10\">\n        </polygon>\n        <polygon\n            class=\"mdc-select__dropdown-icon-active\"\n            stroke=\"none\"\n            fill-rule=\"evenodd\"\n            points=\"7 15 12 10 17 15\">\n        </polygon>\n      </svg>\n    </span>\n    <span class=\"mdc-notched-outline\">\n      <span class=\"mdc-notched-outline__leading\"></span>\n      <span class=\"mdc-notched-outline__trailing\"></span>\n    </span>\n  </div>\n\n  <!-- Other elements from the select remain. -->\n  <div class=\"mdc-select__menu mdc-menu mdc-menu-surface mdc-menu-surface--fullwidth\">...</div>\n</div>\n```\n\n## Style Customization\n\n#### CSS Classes\n\n| Class | Description |\n| --- | --- |\n| `mdc-select` | Mandatory. |\n| `mdc-select__anchor` | Mandatory. This element should be placed within the `mdc-select` element. |\n| `mdc-select__menu` | Mandatory. This class should be placed on the `mdc-menu` element within the `mdc-select` element. |\n| `mdc-select__dropdown-icon` | Mandatory. Should be placed on an `i` element within the `mdc-select__anchor` element. Used for the dropdown arrow svg and animation.\n| `mdc-select__selected-text` | Mandatory. This class should be placed on a `div` within the `mdc-select__anchor` element. |\n| `mdc-select__icon` | Optional. Should be placed on an `i` or `svg` element within the `mdc-select__anchor` element. Used for the leading icon.\n| `mdc-select--activated` | Optional. Styles the activated state of select. This class will be added automatically when menu is opened.\n| `mdc-select--disabled` | Optional. Styles the select as disabled. This class should be applied to the root element when the `disabled` attribute is applied to the `<select>` element. |\n| `mdc-select--outlined` | Optional. Styles the select as outlined select. |\n| `mdc-select--fullwidth` | Optional. Styles the select as fullwidth select. |\n| `mdc-select--with-leading-icon` | Styles the select as a select with a leading icon. |\n| `mdc-select--no-label` | Styles the select as a select without a label. |\n> _NOTE_: To further customize the [MDCMenu](./../mdc-menu) or the [MDCList](./../mdc-list) component contained within the select, please refer to their respective documentation.\n\n### Sass Mixins\n\nMixins should be included in the context of a custom class applied to the component's root element, e.g. `.my-select`.\n\nMixin | Description\n--- | ---\n`ink-color($color)` | Customizes the color of the selected item displayed in the select.\n`container-fill-color($color)` | Customizes the background color of the select.\n`disabled-container-fill-color($color)` | Customizes the background color of the select when disabled.\n`dropdown-icon-color($color)` | Customizes the dropdown icon color of the select.\n`hover-dropdown-icon-color($color)` | Customizes the dropdown icon color of the select when hovered.\n`focused-dropdown-icon-color($color)` | Customizes the dropdown icon color of the select when focused.\n`disabled-dropdown-icon-color($color)` | Customizes the dropdown icon color of the select when disabled.\n`label-color($color)` | Customizes the label color of the select in the unfocused state.\n`hover-label-color($color)` | Customizes the label color of the select when hovered.\n`focused-label-color($color)` | Customizes the label color of the select when focused.\n`label-floating-color($color)` | Customizes the label color of the select when the label is floated, but the select is not necessarily focused.\n`hover-label-floating-color($color)` | Customizes the label color of the select when hovered and label is floated.\n`disabled-label-color($color)` | Customizes the label color of the select when disabled.\n`bottom-line-color($color)` | Customizes the color of the default bottom line of the select.\n`hover-bottom-line-color($color)` | Customizes the color of the bottom line when the select is hovered.\n`focused-bottom-line-color($color)` | Customizes the color of the bottom line of the select when focused.\n`disabled-bottom-line-color($color)` | Customizes the color of the bottom line when the select is disabled.\n`filled-shape-radius($radius, $density-scale, $rtl-reflexive)` | Sets rounded shape to filled select variant with given radius size. Set `$rtl-reflexive` to true to flip radius values in RTL context, defaults to false.\n`outline-color($color)` | Customizes the color of the notched outline.\n`focused-outline-color($color)` | Customizes the color of the outline of the select when focused.\n`hover-outline-color($color)` | Customizes the color of the outline when the select is hovered.\n`disabled-outline-color($color)` | Customizes the color of the notched outline when the select is disabled.\n`outline-shape-radius($radius, $density-scale, $rtl-reflexive)` | Sets the border radius of the outlined select variant. Set `$rtl-reflexive` to true to flip radius values in RTL context, defaults to false.\n`filled-density($density-scale)` | Sets density scale for the filled select variant (Excluding filled select with leading icon).\n`filled-with-leading-icon-density($density-scale)` | Sets density scale for filled select with leading icon.\n`outlined-density($density-scale)` | Sets density scale for outlined select (Excluding outlined select with leading icon).\n`outlined-with-leading-icon-density($density-scale)` | Sets density scale for outlined select with leading icon.\n`filled-height($height)` | Sets height of the filled select variant (Excluding filled select with leading icon).\n`filled-with-leading-icon-height($height)` | Sets height of filled select with leading icon variant.\n`outlined-height($height)` | Sets height of outlined select variant (Excluding outlined select with leading icon).\n`outlined-with-leading-icon-height($height)` | Sets height of outlined select with leading icon variant.\n`min-width($min-width)` | Sets the min-width of the select.\n\n> _NOTE_: To further customize the floating label, please see the [floating label documentation](./../mdc-floating-label/README.md).\n\n## `MDCSelect` API\n\nThe `MDCSelect` component API is modeled after a subset of the `HTMLSelectElement` functionality.\n\nProperty | Type | Description\n--- | --- | ---\n`value` | `string` | The `value`/`data-value` of the currently selected option.\n`selectedIndex` | `number` | The index of the currently selected option. Set to -1 if no option is currently selected. Changing this property will update the select element.\n`disabled` | `boolean` | Whether or not the component is disabled. Setting this sets the disabled state on the component.\n`useDefaultValidation` | `boolean` | Whether or not to use the default validation scheme where a required select must be non-empty. Set to false for custom validation.\n`valid` | `boolean` | Whether or not the component is in a valid state. Setting this updates styles on the component, but does not affect the native validity state.\n`required` | `boolean` | Whether or not the component is required. Setting this updates the `required` or `aria-required` attribute on the component and enables validation.\n`leadingIconAriaLabel` | `string` (write-only) | Proxies to the foundation's `setLeadingIconAriaLabel` method.\n`leadingIconContent` | `string` (write-only) | Proxies to the foundation's `setLeadingIconContent` method.\n`helperTextContent` | `string` (write-only)| Proxies to the foundation's `setHelperTextContent` method when set.\n`ripple` | `MDCRipple` | Ripple instance attached to outlined select variant, or `null` for all other variants.\n\nMethod Signature | Description\n--- | ---\n`layout() => void` | Re-calculates if the notched outline should be notched and if the label should float. Proxies to the foundation's `layout()` method.\n`layoutOptions() => void` | Synchronizes the list of options with the state of the foundation. Proxies to the foundation's `layoutOptions()` method. Call this whenever menu options are dynamically updated.\n\n### Events\n\nEvent Name | Data | Description\n--- | --- | ---\n`MDCSelect:change` | `{value: string, index: number}` | Used to indicate when an element has been selected. This event also includes the value of the item and the index.\n\n## Usage within Web Frameworks\n\nIf you are using a JavaScript framework, such as React or Angular, you can create a Select 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### `MDCSelectAdapter`\n\n| Method Signature | Description |\n| --- | --- |\n| `addClass(className: string) => void` | Adds a class to the select element. |\n| `removeClass(className: string) => void` | Removes a class from the select element. |\n| `hasClass(className: string) => boolean` | Returns true if the select element has the className in its classList. |\n| `activateBottomLine() => void` | Activates the bottom line component. |\n| `deactivateBottomLine() => void` | Deactivates the bottom line component. |\n| `getSelectedMenuItem() => Element` | Returns the selected menu item element. |\n| `hasLabel() => boolean` | Returns true if the select contains a label. |\n| `floatLabel(value: boolean) => void` | Floats or defloats label. |\n| `getLabelWidth() => number` | Returns the offsetWidth of the label element. |\n| `hasOutline() => boolean` | Returns true if the `select` has the notched outline element. |\n| `notchOutline(labelWidth: number) => void` | Switches the notched outline element to its \"notched state.\" |\n| `closeOutline() => void` | Switches the notched outline element to its closed state. |\n| `setDisabled(isDisabled: boolean) => void` | Enables or disables the select. |\n| `openMenu() => void` | Opens the menu and applies activated styling. |\n| `setRippleCenter(normalizedX: number) => void` | Sets the line ripple center to the provided normalizedX value. |\n| `notifyChange(value: string) => void` | Emits the `MDCSelect:change` event when an element is selected. |\n| `setSelectedText(text: string) => void` | Sets the text content of the selectedText element to the given string. |\n| `isSelectAnchorFocused() => boolean` | Returns whether the select anchor element is focused. |\n| `getSelectAnchorAttr(attr: string) => string` | Gets the given attribute on the select anchor element. |\n| `setSelectAnchorAttr(attr: string, value: string) => void` | Sets the given attribute on the select anchor element. |\n| `removeSelectAnchorAttr(attr: string) => void` | Removes the given attribute on the select anchor element. |\n| `openMenu() => void` | Causes the menu element in the select to open. |\n| `closeMenu() => void` | Causes the menu element in the select to close. |\n| `getAnchorElement() => Element` | Returns the select anchor element. |\n| `setMenuAnchorElement(anchorEl: Element) => void` | Sets the menu anchor element. |\n| `setMenuAnchorCorner(anchorCorner: Corner) => void` | Sets the menu anchor corner. |\n| `setMenuWrapFocus(wrapFocus: boolean) => void` | Sets whether the menu should wrap focus. |\n| `setAttributeAtIndex(index: number, attributeName: string, attributeValue: string) => void` | Sets the attribute on the menu item at the given index. |\n| `focusMenuItemAtIndex(index: number) => void` | Focuses the menu item at the given index. |\n| `getMenuItemValues() => string[]` | Returns an array representing the VALUE_ATTR attributes of each menu item. |\n| `getMenuItemCount() => number` | Returns the number of menu items. |\n| `getMenuItemAttr(menuItem: Element, attr: string) => string` | Returns the given attribute on the the menu item element. |\n| `getMenuItemTextAtIndex(index: number) => string` | Gets the text content of the menu item element at the given index. |\n| `addClassAtIndex(menuItem: Element, className: string) => void` | Adds the class name on the menu item at the given index. |\n| `removeClassAtIndex(menuItem: Element, className: string) => void` | Removes the class name on the menu item at the given index. |\n| `isTypeaheadInProgress() => boolean` | Returns whether typeahead is in progress in the menu. |\n| `typeaheadMatchItem: (nextChar: string, startingIndex: number) => number` | Adds a character to the list typeahead buffer and returns index of the next item in the list matching the buffer. |\n### `MDCSelectFoundation`\n\n| Method Signature | Description |\n| --- | --- |\n| `notchOutline(openNotch: boolean) => void` | Opens/closes the notched outline. |\n| `getDisabled() => boolean` | Gets the disabled state. |\n| `setDisabled(isDisabled: boolean) => void` | Updates the disabled state. |\n| `handleFocus() => void` | Handles a focus event on the `select` element. |\n| `handleBlur() => void` | Handles a blur event on the `select` element. |\n| `handleClick(normalizedX: number) => void` | Sets the line ripple center to the normalizedX for the line ripple. |\n| `handleMenuOpened() => void` | Handles menu or menu surface opened event.\n| `handleMenuClosed() => void` | Handles menu or menu surface closed event.\n| `handleMenuItemAction() => void` | Handles menu selected event.\n| `handleChange() => void` | Handles a change to the `select` element's value. This must be called both for `change` events and programmatic changes requested via the component API. |\n| `handleKeydown(event: KeyboardEvent) => void` | Handles opening the menu when the `mdc-select__selected-text` element is focused and the user presses the `Enter` or `Space` key. |\n| `getSelectedIndex() => number` | Returns the index of the currently selected menu item. |\n| `setSelectedIndex(index: number) => void` | Handles setting the `mdc-select__selected-text` element and closing the menu. Also causes the label to float and outline to notch if needed. |\n| `getValue() => string` | Handles getting the value through the adapter. |\n| `setValue() => string` | Sets the selected index to the index of the menu item with the given value. |\n| `setUseDefaultValidation(useDefaultValidation: boolean) => void` | Enables or disables the default validation scheme where a required select must be non-empty. Set to false for custom validation.|\n| `setValid(isValid: boolean) => void` | Sets the valid state through the adapter. Note that default validation scheme where a required select is invalid if empty will still be honored subsequently unless `setUseDefaultValidation(false)` is also called.|\n| `isValid() => boolean` | Gets the valid state through the adapter's `checkValidity` API. |\n| `setRequired(isRequired: boolean) => void` | Sets the required state through the adapter. |\n| `getRequired() => boolean` | Gets the required state through the adapter. |\n| `init() => void` | Initializes the foundation. |\n| `layout() => void` | Re-calculates if the notched outline should be notched and if the label should float. |\n| `layoutOptions() => void` | Synchronizes the list of options with the state of the foundation. Call this whenever menu options are dynamically updated. |\n| `setLeadingIconAriaLabel(label: string) => void` | Sets the aria label of the leading icon. |\n| `setLeadingIconContent(content: string) => void` | Sets the text content of the leading icon. |\n| `setHelperTextContent(content: string) => void` | Sets the content of the helper text. |\n\n`MDCSelectFoundation` supports multiple optional sub-elements: helper text and icon. The foundations of these sub-elements must be passed in as constructor arguments to `MDCSelectFoundation`.\n","gitHead":"42e9f40d91c643a9770e5a563a204c7f36196a3b","license":"MIT","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"homepage":"https://github.com/material-components/material-components-web#readme","keywords":["material components","material design","select","multi select"],"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-select"},"_npmVersion":"lerna/3.20.2/node@v10.21.0+x64 (linux)","description":"The Material Components web select (text field drop-down) 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":"ssuarez","email":"sayrisuarez@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.9.3","@material/dom":"8.0.0-canary.e2ea4a99e.0","@material/rtl":"8.0.0-canary.e2ea4a99e.0","@material/base":"8.0.0-canary.e2ea4a99e.0","@material/list":"8.0.0-canary.e2ea4a99e.0","@material/menu":"8.0.0-canary.e2ea4a99e.0","@material/shape":"8.0.0-canary.e2ea4a99e.0","@material/theme":"8.0.0-canary.e2ea4a99e.0","@material/ripple":"8.0.0-canary.e2ea4a99e.0","@material/density":"8.0.0-canary.e2ea4a99e.0","@material/animation":"8.0.0-canary.e2ea4a99e.0","@material/typography":"8.0.0-canary.e2ea4a99e.0","@material/line-ripple":"8.0.0-canary.e2ea4a99e.0","@material/menu-surface":"8.0.0-canary.e2ea4a99e.0","@material/floating-label":"8.0.0-canary.e2ea4a99e.0","@material/notched-outline":"8.0.0-canary.e2ea4a99e.0","@material/feature-targeting":"8.0.0-canary.e2ea4a99e.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/select_8.0.0-canary.e2ea4a99e.0_1593631708093_0.2987330752506183","host":"s3://npm-registry-packages"},"_id":"@material/select@8.0.0-canary.e2ea4a99e.0","version":"8.0.0-canary.e2ea4a99e.0"}