{"bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"58077f448bd21516e66b592d0b1b78aa299b86dc","tarball":"https://registry.npmjs.org/@material/select/-/select-7.0.0-canary.2f052d824.0.tgz","fileCount":83,"integrity":"sha512-QA+ioqRamkPdmvSKUMzekUM7Kfu1Jk7UnRYue1aBgomhajg2FZ11G9F/2PvqTXqdOV2Tych4/wpSfesSFugv3g==","signatures":[{"sig":"MEUCIF0oBSP5rOR6Kb91P/0OfRhQ9Kk92zOuNu14IL458uvrAiEAyAvusHiJ2wuwaQSVuiEqY59n+cSPtfDbSic53svs9m8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1356847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetcpVCRA9TVsSAnZWagAAruIP/AwV1ocDWkip+jRRr+CP\nxl1ovsmWwF5m1TCdbm7I8P/OotfG26hg1vP60+m80ExUlTPU9xEOMqozcO0H\n+OEhPbKa6En3kjNVfQZtfOKCc5Dk4i3vV0X67Dg5reO1OcKDovr4RRGJknSR\ng16dTZ/m3QOyP/nmg299b1cWCZXQWeYW7lcYk/JXk8F7cNo8CltjyHB3RQ0l\nQEXLGO0HgTeJXMfnWh1/vMGOBakBIxBrCTvqMxVwJO16nPsfiq0+giTNWGYE\n4n0rRKkhxjjmGpKUyAo4GBq6/A2j7CMRhslfR9P40UA+ka+z5RdXwC+3miKO\nDqGxX7yat5F91+3FwbYYDkHS0wLT4kfXbZ/blaUyBemJLs0587uTpdSC0WNh\n/vAI4JXjAJtnh+8HEb0Jdo4j8QmDV4vAG30/Vv5sa5nd03psb6MlFFjL5IMu\nRgMwgMOK0dHqw+10R1uwaO/9CiRUZ6OIGLKQEmOq7O+G/m+QzuqHD5Bd8n5/\nbRV7VaN+n1JdzXtiXRhK39qZRDsiZkOceynwnr6Zp1P9sFJIiAycOLqDtq5p\nR04q8dXQmNeATjraXSOb964KVce1W4Ko1MKMUqarukzkkjtnSsN4GI3wTZ2v\nlCGRlAMyC0ZiPVT7k/R5VRpWDyF62bIPQ2L4VbxsJ3WL3sB7oocojzqOYFyf\nsxRT\r\n=hB6M\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 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          width=\"10px\"\n          height=\"5px\"\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\"></li>\n      <li class=\"mdc-list-item\" data-value=\"grains\">\n        <span class=\"mdc-list-item__text\">\n          Bread, Cereal, Rice, and Pasta\n        </span>\n      </li>\n      <li class=\"mdc-list-item\" data-value=\"vegetables\">\n        <span class=\"mdc-list-item__text\">\n          Vegetables\n        </span>\n      </li>\n      <li class=\"mdc-list-item\" data-value=\"fruit\">\n        <span class=\"mdc-list-item__text\">\n          Fruit\n        </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          width=\"10px\"\n          height=\"5px\"\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\">\n          Bread, Cereal, Rice, and Pasta\n        </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\">\n          Vegetables\n        </span>\n      </li>\n      <li class=\"mdc-list-item\" data-value=\"fruit\" role=\"option\">\n        <span class=\"mdc-list-item__text\">\n          Fruit\n        </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 class=\"mdc-select__ripple\"></span>\n    <span id=\"demo-selected-text\" class=\"mdc-select__selected-text\"></span>\n    <span class=\"mdc-select__dropdown-icon\">\n      <svg\n          width=\"10px\"\n          height=\"5px\"\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### Fullwidth Select\n\nThe Select Fullwidth variant takes up the entirety of the width of its parent container. To use this variant, place the\n`mdc-select--fullwidth` modifier class on the root element.\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 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          width=\"10px\"\n          height=\"5px\"\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=\"\"></li>\n      <li class=\"mdc-list-item\" data-value=\"grains\">\n        <span class=\"mdc-list-item__text\">\n          Bread, Cereal, Rice, and Pasta\n        </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__text\">\n          Vegetables\n        </span>\n      </li>\n      <li class=\"mdc-list-item\" data-value=\"fruit\">\n        <span class=\"mdc-list-item__text\">\n          Fruit\n        </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--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          width=\"10px\"\n          height=\"5px\"\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--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          width=\"10px\"\n          height=\"5px\"\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\">\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=\"\"></li>\n      <li class=\"mdc-list-item\" data-value=\"grains\">\n        <span class=\"mdc-list-item__text\">\n          Bread, Cereal, Rice, and Pasta\n        </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__text\">\n          Vegetables\n        </span>\n      </li>\n      <li class=\"mdc-list-item\" data-value=\"fruit\">\n        <span class=\"mdc-list-item__text\">\n          Fruit\n        </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--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          width=\"10px\"\n          height=\"5px\"\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\"></li>\n      <li class=\"mdc-list-item\" data-value=\"grains\">\n        <span class=\"mdc-list-item__text\">\n          Bread, Cereal, Rice, and Pasta\n        </span>\n      </li>\n      <li class=\"mdc-list-item\" data-value=\"vegetables\">\n        <span class=\"mdc-list-item__text\">\n          Vegetables\n        </span>\n      </li>\n      <li class=\"mdc-list-item\" data-value=\"fruit\">\n        <span class=\"mdc-list-item__text\">\n          Fruit\n        </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__ripple\"></span>\n    <span class=\"mdc-select__selected-text\"></span>\n    <span class=\"mdc-select__dropdown-icon\">\n      <svg\n          width=\"10px\"\n          height=\"5px\"\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`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`focused-label-color($color)` | Customizes the label color of the select when focused.\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`shape-radius($radius, $rtl-reflexive)` | Sets rounded shape to boxed 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, $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`height($height)` | Sets height of the filled select variant.\n`min-width($min-width)` | Sets the min-width of the select and its menu.\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`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| `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| `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| `removeAttributeAtIndex(index: number, attributeName: string) => void` | Removes 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\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| `setValid(isValid: boolean) => void` | Sets the valid state through the adapter. |\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":"e3bfb78e98db35607ba75f333490d9693f14e844","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.20.1+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":"williamernest","email":"williamernest@google.com"}],"sideEffects":false,"_nodeVersion":"10.20.1","dependencies":{"tslib":"^1.9.3","@material/dom":"7.0.0-canary.2f052d824.0","@material/rtl":"7.0.0-canary.2f052d824.0","@material/base":"7.0.0-canary.2f052d824.0","@material/menu":"7.0.0-canary.2f052d824.0","@material/shape":"7.0.0-canary.2f052d824.0","@material/theme":"7.0.0-canary.2f052d824.0","@material/ripple":"7.0.0-canary.2f052d824.0","@material/animation":"7.0.0-canary.2f052d824.0","@material/typography":"7.0.0-canary.2f052d824.0","@material/line-ripple":"7.0.0-canary.2f052d824.0","@material/menu-surface":"7.0.0-canary.2f052d824.0","@material/floating-label":"7.0.0-canary.2f052d824.0","@material/notched-outline":"7.0.0-canary.2f052d824.0","@material/feature-targeting":"7.0.0-canary.2f052d824.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/select_7.0.0-canary.2f052d824.0_1588972117412_0.13808276233856986","host":"s3://npm-registry-packages"},"_id":"@material/select@7.0.0-canary.2f052d824.0","version":"7.0.0-canary.2f052d824.0"}