{"version":3,"file":"Select.cjs","names":["_index","require","selectComponents","odysseyTokens","MuiSelect","defaultProps","variant","IconComponent","ChevronDownIcon","MenuProps","PaperProps","elevation","styleOverrides","root","ownerState","inputProps","readOnly","backgroundColor","HueNeutral50","borderColor","HueNeutral200","PalettePrimaryMain","right","insetInlineEnd","Spacing3","color","TypographyColorSubordinate","select","height","paddingBlock","BorderWidthMain","paddingInline","minHeight","TypographyLineHeightUi","display","flexWrap","gap","Spacing1","marginBlock","Spacing2","marginInlineStart","HueNeutral700","cursor","exports"],"sources":["../../../../src/theme/components/Select.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport type { ThemeOptions } from \"@mui/material\";\n\nimport type { GetComponentsProps } from \"./types.js\";\n\nimport { ChevronDownIcon } from \"../../icons.generated/index.js\";\n\nexport const selectComponents = ({\n  odysseyTokens,\n}: GetComponentsProps): Pick<\n  NonNullable<ThemeOptions[\"components\"]>,\n  \"MuiSelect\"\n> => ({\n  MuiSelect: {\n    defaultProps: {\n      variant: \"standard\",\n      IconComponent: ChevronDownIcon,\n      MenuProps: {\n        PaperProps: {\n          elevation: 1,\n        },\n      },\n    },\n    styleOverrides: {\n      root: ({ ownerState }) => ({\n        ...(ownerState?.inputProps?.readOnly\n          ? {\n              \"&.MuiInputBase-root\": {\n                backgroundColor: odysseyTokens.HueNeutral50,\n                borderColor: odysseyTokens.HueNeutral200,\n                \"&:hover\": {\n                  backgroundColor: odysseyTokens.HueNeutral50,\n                },\n                \"&.Mui-focused\": {\n                  borderColor: odysseyTokens.PalettePrimaryMain,\n                },\n              },\n            }\n          : {}),\n        \"& .MuiSelect-icon\": {\n          right: \"unset\",\n          insetInlineEnd: odysseyTokens.Spacing3,\n          color: odysseyTokens.TypographyColorSubordinate,\n        },\n      }),\n      select: ({ ownerState }) => ({\n        height: \"auto\",\n        // We're subtracting a pixel so the total height, including borders, is 40px\n        paddingBlock: `calc(${odysseyTokens.Spacing3} - ${odysseyTokens.BorderWidthMain})`,\n        paddingInline: odysseyTokens.Spacing3,\n        // Setting min-height to the line-height here to avoid the select shrinking in size when the value is an empty string\n        minHeight: `${odysseyTokens.TypographyLineHeightUi}em`,\n\n        \"&:focus\": {\n          backgroundColor: \"transparent\",\n        },\n\n        \"& .MuiBox-root\": {\n          display: \"flex\",\n          flexWrap: \"wrap\",\n          gap: odysseyTokens.Spacing1,\n          marginBlock: `-${odysseyTokens.Spacing2}`,\n          marginInlineStart: `-${odysseyTokens.Spacing2}`,\n        },\n\n        [\"& .MuiListItemSecondaryAction-root\"]: {\n          display: \"none\",\n        },\n\n        ...(ownerState?.inputProps?.readOnly\n          ? {\n              color: odysseyTokens.HueNeutral700,\n              cursor: \"default\",\n              \"&:focus\": {\n                backgroundColor: \"transparent\",\n                borderColor: odysseyTokens.PalettePrimaryMain,\n              },\n            }\n          : {}),\n      }),\n    },\n  },\n});\n"],"mappings":";;;;;;AAgBA,IAAAA,MAAA,GAAAC,OAAA;AAhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQO,MAAMC,gBAAgB,GAAGA,CAAC;EAC/BC;AACkB,CAAC,MAGf;EACJC,SAAS,EAAE;IACTC,YAAY,EAAE;MACZC,OAAO,EAAE,UAAU;MACnBC,aAAa,EAAEC,sBAAe;MAC9BC,SAAS,EAAE;QACTC,UAAU,EAAE;UACVC,SAAS,EAAE;QACb;MACF;IACF,CAAC;IACDC,cAAc,EAAE;MACdC,IAAI,EAAEA,CAAC;QAAEC;MAAW,CAAC,MAAM;QACzB,IAAIA,U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