{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport NativeSelectInput from './NativeSelectInput';\nimport withStyles from '../styles/withStyles';\nimport formControlState from '../FormControl/formControlState';\nimport useFormControl from '../FormControl/useFormControl';\nimport ArrowDropDownIcon from '../internal/svg-icons/ArrowDropDown';\nimport Input from '../Input';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the select component `root` class. */\n root: {},\n\n /* Styles applied to the select component `select` class. */\n select: {\n '-moz-appearance': 'none',\n // Reset\n '-webkit-appearance': 'none',\n // Reset\n // When interacting quickly, the text can end up selected.\n // Native select can't be selected either.\n userSelect: 'none',\n borderRadius: 0,\n // Reset\n minWidth: 16,\n // So it doesn't collapse.\n cursor: 'pointer',\n '&:focus': {\n // Show that it's not an text input\n backgroundColor: theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.05)' : 'rgba(255, 255, 255, 0.05)',\n borderRadius: 0 // Reset Chrome style\n\n },\n // Remove IE 11 arrow\n '&::-ms-expand': {\n display: 'none'\n },\n '&$disabled': {\n cursor: 'default'\n },\n '&[multiple]': {\n height: 'auto'\n },\n '&:not([multiple]) option, &:not([multiple]) optgroup': {\n backgroundColor: theme.palette.background.paper\n },\n '&&': {\n paddingRight: 24\n }\n },\n\n /* Styles applied to the select component if `variant=\"filled\"`. */\n filled: {\n '&&': {\n paddingRight: 32\n }\n },\n\n /* Styles applied to the select component if `variant=\"outlined\"`. */\n outlined: {\n borderRadius: theme.shape.borderRadius,\n '&&': {\n paddingRight: 32\n }\n },\n\n /* Styles applied to the select component `selectMenu` class. */\n selectMenu: {\n height: 'auto',\n // Resets for multpile select with chips\n minHeight: '1.1876em',\n // Required for select\\text-field height consistency\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden'\n },\n\n /* Pseudo-class applied to the select component `disabled` class. */\n disabled: {},\n\n /* Styles applied to the icon component. */\n icon: {\n // We use a position absolute over a flexbox in order to forward the pointer events\n // to the input and to support wrapping tags..\n position: 'absolute',\n right: 0,\n top: 'calc(50% - 12px)',\n // Center vertically\n pointerEvents: 'none',\n // Don't block pointer events on the select under the icon.\n color: theme.palette.action.active,\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the icon component if the popup is open. */\n iconOpen: {\n transform: 'rotate(180deg)'\n },\n\n /* Styles applied to the icon component if `variant=\"filled\"`. */\n iconFilled: {\n right: 7\n },\n\n /* Styles applied to the icon component if `variant=\"outlined\"`. */\n iconOutlined: {\n right: 7\n },\n\n /* Styles applied to the underlying native input component. */\n nativeInput: {\n bottom: 0,\n left: 0,\n position: 'absolute',\n opacity: 0,\n pointerEvents: 'none',\n width: '100%'\n }\n };\n};\nvar defaultInput = /*#__PURE__*/React.createElement(Input, null);\n/**\n * An alternative to `` with a much smaller bundle size footprint.\n */\n\nvar NativeSelect = /*#__PURE__*/React.forwardRef(function NativeSelect(props, ref) {\n var children = props.children,\n classes = props.classes,\n _props$IconComponent = props.IconComponent,\n IconComponent = _props$IconComponent === void 0 ? ArrowDropDownIcon : _props$IconComponent,\n _props$input = props.input,\n input = _props$input === void 0 ? defaultInput : _props$input,\n inputProps = props.inputProps,\n variant = props.variant,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"IconComponent\", \"input\", \"inputProps\", \"variant\"]);\n\n var muiFormControl = useFormControl();\n var fcs = formControlState({\n props: props,\n muiFormControl: muiFormControl,\n states: ['variant']\n });\n return /*#__PURE__*/React.cloneElement(input, _extends({\n // Most of the logic is implemented in `NativeSelectInput`.\n // The `Select` component is a simple API wrapper to expose something better to play with.\n inputComponent: NativeSelectInput,\n inputProps: _extends({\n children: children,\n classes: classes,\n IconComponent: IconComponent,\n variant: fcs.variant,\n type: undefined\n }, inputProps, input ? input.props.inputProps : {}),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? NativeSelect.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The option elements to populate the select with.\n * Can be some `