{"version":3,"file":"Menu.cjs","names":["_Divider","require","_FormControlLabel","_ListItemIcon","_ListItemText","_MenuItem","_Typography","menuComponents","odysseyTokens","MuiMenu","defaultProps","elevation","styleOverrides","list","paddingBlock","Spacing2","paddingInline","borderRadius","BorderRadiusMain","root","borderStyle","borderWidth","BorderWidthMain","borderColor","BorderColorDisplay","MuiMenuItem","ownerState","theme","gap","minHeight","Spacing3","Spacing4","whiteSpace","formControlLabelClasses","textDecoration","backgroundColor","HueNeutral100","menuItemClasses","color","TypographyColorDanger","typographyClasses","PalettePrimaryLighter","HueBlue600","selected","TypographyColorAction","fontWeight","TypographyWeightBodyBold","focusVisible","boxShadow","mixins","insetFocusRing","content","visibility","disableGutters","divider","borderBlockEnd","disabled","opacity","TypographyColorDisabled","dividerClasses","marginBlock","Spacing1","listItemTextClasses","listItemIconClasses","minWidth","exports"],"sources":["../../../../src/theme/components/Menu.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 { dividerClasses } from \"@mui/material/Divider\";\nimport { formControlLabelClasses } from \"@mui/material/FormControlLabel\";\nimport { listItemIconClasses } from \"@mui/material/ListItemIcon\";\nimport { listItemTextClasses } from \"@mui/material/ListItemText\";\nimport { menuItemClasses } from \"@mui/material/MenuItem\";\nimport { typographyClasses } from \"@mui/material/Typography\";\n\nimport type { GetComponentsProps } from \"./types.js\";\n\nexport const menuComponents = ({\n  odysseyTokens,\n}: GetComponentsProps): Pick<\n  NonNullable<ThemeOptions[\"components\"]>,\n  \"MuiMenu\" | \"MuiMenuItem\"\n> => ({\n  MuiMenu: {\n    defaultProps: {\n      elevation: 2,\n    },\n    styleOverrides: {\n      list: {\n        paddingBlock: odysseyTokens.Spacing2,\n        paddingInline: `${odysseyTokens.Spacing2} !important`,\n        borderRadius: odysseyTokens.BorderRadiusMain,\n      },\n      root: {\n        \"& hr\": {\n          borderStyle: \"solid none none\",\n          borderWidth: odysseyTokens.BorderWidthMain,\n          borderColor: odysseyTokens.BorderColorDisplay,\n        },\n      },\n    },\n  },\n  MuiMenuItem: {\n    styleOverrides: {\n      root: ({ ownerState, theme }) => ({\n        gap: odysseyTokens.Spacing2,\n        minHeight: \"unset\",\n        paddingBlock: odysseyTokens.Spacing3,\n        paddingInline: odysseyTokens.Spacing4,\n        borderRadius: odysseyTokens.BorderRadiusMain,\n        whiteSpace: \"normal\",\n\n        [`& .${formControlLabelClasses.root}`]: {\n          gap: \"unset\",\n        },\n\n        \"&:hover\": {\n          textDecoration: \"none\",\n          backgroundColor: odysseyTokens.HueNeutral100,\n\n          // Reset on touch devices, it doesn't add specificity\n          \"@media (hover: none)\": {\n            backgroundColor: \"transparent\",\n          },\n        },\n\n        [`:focus-visible`]: {\n          backgroundColor: odysseyTokens.HueNeutral100,\n        },\n\n        [`&.${menuItemClasses.root}-destructive`]: {\n          color: odysseyTokens.TypographyColorDanger,\n\n          [`.${typographyClasses.root}`]: {\n            color: \"inherit\",\n          },\n        },\n\n        \"&.isVisiblySelected\": {\n          backgroundColor: `${odysseyTokens.PalettePrimaryLighter} !important`,\n\n          [`& .${typographyClasses.root}`]: {\n            color: odysseyTokens.HueBlue600,\n          },\n        },\n\n        [`&.${menuItemClasses.selected}`]: {\n          backgroundColor: \"transparent\",\n          color: odysseyTokens.TypographyColorAction,\n          fontWeight: odysseyTokens.TypographyWeightBodyBold,\n\n          \"&:hover\": {\n            backgroundColor: odysseyTokens.PalettePrimaryLighter,\n\n            \"@media (hover: none)\": {\n              backgroundColor: odysseyTokens.PalettePrimaryLighter,\n            },\n          },\n\n          [`&.${menuItemClasses.focusVisible}`]: {\n            backgroundColor: odysseyTokens.PalettePrimaryLighter,\n            color: odysseyTokens.TypographyColorAction,\n\n            \"&:hover\": {\n              backgroundColor: odysseyTokens.PalettePrimaryLighter,\n\n              \"@media (hover: none)\": {\n                backgroundColor: odysseyTokens.PalettePrimaryLighter,\n              },\n            },\n          },\n        },\n\n        [`&.${menuItemClasses.focusVisible}`]: {\n          backgroundColor: \"transparent\",\n          boxShadow: theme.mixins.insetFocusRing,\n\n          \"&:hover\": {\n            backgroundColor: odysseyTokens.HueNeutral100,\n\n            // Reset on touch devices, it doesn't add specificity\n            \"@media (hover: none)\": {\n              backgroundColor: \"transparent\",\n            },\n          },\n        },\n\n        \"&[data-empty='true']\": {\n          \"&:after\": {\n            content: \"'&nbsp;'\",\n            visibility: \"hidden\",\n          },\n        },\n\n        ...(!ownerState.disableGutters && {\n          paddingInline: odysseyTokens.Spacing4,\n        }),\n\n        ...(ownerState.divider && {\n          borderBlockEnd: `1px solid ${odysseyTokens.BorderColorDisplay}`,\n        }),\n\n        [`&.${menuItemClasses.disabled}`]: {\n          opacity: 1,\n          color: odysseyTokens.TypographyColorDisabled,\n\n          [`.${typographyClasses.root}`]: {\n            color: \"inherit\",\n          },\n        },\n\n        [`& + .${dividerClasses.root}`]: {\n          marginBlock: odysseyTokens.Spacing1,\n        },\n\n        [`& .${listItemTextClasses.root}`]: {\n          marginBlock: 0,\n        },\n\n        [`& .${listItemIconClasses.root}`]: {\n          minWidth: \"unset\",\n        },\n      }),\n    },\n  },\n});\n"],"mappings":";;;;;;AAcA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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