@okta/odyssey-react-mui 1.12.7 → 1.12.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.12.8](https://github.com/okta/odyssey/compare/v1.12.7...v1.12.8) (2024-02-02)
7
+
8
+ **Note:** Version bump only for package @okta/odyssey-react-mui
9
+
6
10
  ## [1.12.7](https://github.com/okta/odyssey/compare/v1.12.6...v1.12.7) (2024-02-02)
7
11
 
8
12
  **Note:** Version bump only for package @okta/odyssey-react-mui
@@ -10,9 +10,10 @@ import _Menu from "@mui/material/Menu";
10
10
  *
11
11
  * See the License for the specific language governing permissions and limitations under the License.
12
12
  */
13
+
14
+ import { memo, useCallback, useMemo, useState } from "react";
13
15
  import { Button, useUniqueId } from "./index.js";
14
16
  import { ChevronDownIcon, MoreIcon } from "./icons.generated/index.js";
15
- import { memo, useCallback, useMemo, useState } from "react";
16
17
  import { MenuContext } from "./MenuContext.js";
17
18
  import { jsx as _jsx } from "react/jsx-runtime";
18
19
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -28,6 +29,7 @@ const MenuButton = _ref => {
28
29
  shouldCloseOnSelect = true,
29
30
  endIcon: endIconProp,
30
31
  id: idOverride,
32
+ isDisabled,
31
33
  isOverflow,
32
34
  menuAlignment = "left",
33
35
  size,
@@ -72,6 +74,7 @@ const MenuButton = _ref => {
72
74
  "data-se": testId,
73
75
  endIcon: endIcon,
74
76
  id: `${uniqueId}-button`,
77
+ isDisabled: isDisabled,
75
78
  label: buttonLabel,
76
79
  onClick: openMenu,
77
80
  size: size,
@@ -1 +1 @@
1
- {"version":3,"file":"MenuButton.js","names":["Button","useUniqueId","ChevronDownIcon","MoreIcon","memo","useCallback","useMemo","useState","MenuContext","jsx","_jsx","jsxs","_jsxs","menuAlignmentValues","MenuButton","_ref","ariaLabel","ariaLabelledBy","ariaDescribedBy","buttonLabel","buttonVariant","children","shouldCloseOnSelect","endIcon","endIconProp","id","idOverride","isOverflow","menuAlignment","size","testId","tooltipText","translate","anchorEl","setAnchorEl","isOpen","Boolean","closeMenu","openMenu","event","currentTarget","uniqueId","menuListProps","providerValue","anchorOrigin","horizontal","vertical","transformOrigin","undefined","label","onClick","variant","_Menu","MenuListProps","onClose","open","Provider","value","MemoizedMenuButton","displayName"],"sources":["../src/MenuButton.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-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 {\n Button,\n buttonSizeValues,\n buttonVariantValues,\n MenuItem,\n useUniqueId,\n} from \"./\";\nimport {\n Divider,\n ListSubheader,\n Menu as MuiMenu,\n PopoverOrigin,\n} from \"@mui/material\";\nimport { ChevronDownIcon, MoreIcon } from \"./icons.generated\";\nimport { memo, type ReactElement, useCallback, useMemo, useState } from \"react\";\n\nimport { MenuContext, MenuContextType } from \"./MenuContext\";\nimport { NullElement } from \"./NullElement\";\nimport type { AllowedProps } from \"./AllowedProps\";\n\nexport const menuAlignmentValues = [\"left\", \"right\"] as const;\n\nexport type MenuButtonProps = {\n /**\n * The ARIA label for the Button\n */\n ariaLabel?: string;\n /**\n * The ID of the element that labels the Button\n */\n ariaLabelledBy?: string;\n /**\n * The ID of the element that describes the Button\n */\n ariaDescribedBy?: string;\n /**\n * The label on the triggering Button\n */\n buttonLabel?: string;\n /**\n * The variant of the triggering Button\n */\n buttonVariant?: (typeof buttonVariantValues)[number];\n /**\n * The <MenuItem> components within the Menu.\n */\n children:\n | ReactElement<typeof MenuItem | typeof Divider | typeof ListSubheader>\n | Array<\n | ReactElement<typeof MenuItem | typeof Divider | typeof ListSubheader>\n | NullElement\n >\n | NullElement;\n /**\n * The end Icon on the trigggering Button\n */\n endIcon?: ReactElement;\n /**\n * The id of the Button\n */\n id?: string;\n /**\n * If the MenuButton is an overflow menu or standard menu.\n */\n isOverflow?: boolean;\n /**\n * The horizontal alignment of the menu.\n */\n menuAlignment?: (typeof menuAlignmentValues)[number];\n /**\n * If true (the default), the menu will close when a child MenuItem is clicked.\n * Otherwise, it will remain open.\n */\n shouldCloseOnSelect?: boolean;\n /**\n * The size of the button\n */\n size?: (typeof buttonSizeValues)[number];\n /**\n * The tooltip text for the Button if it's icon-only\n */\n tooltipText?: string;\n} & (\n | {\n ariaLabel?: string;\n ariaLabelledBy?: string;\n buttonLabel: string;\n }\n | {\n ariaLabel: string;\n ariaLabelledBy?: string;\n buttonLabel?: undefined | \"\";\n }\n | {\n ariaLabel?: string;\n ariaLabelledBy: string;\n buttonLabel?: undefined | \"\";\n }\n) &\n AllowedProps;\n\nconst MenuButton = ({\n ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy,\n buttonLabel = \"\",\n buttonVariant = \"secondary\",\n children,\n shouldCloseOnSelect = true,\n endIcon: endIconProp,\n id: idOverride,\n isOverflow,\n menuAlignment = \"left\",\n size,\n testId,\n tooltipText,\n translate,\n}: MenuButtonProps) => {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n\n const isOpen = Boolean(anchorEl);\n\n const closeMenu = useCallback(() => {\n setAnchorEl(null);\n }, []);\n\n const openMenu = useCallback<MenuContextType[\"openMenu\"]>((event) => {\n setAnchorEl(event.currentTarget);\n }, []);\n\n const uniqueId = useUniqueId(idOverride);\n\n const menuListProps = useMemo(\n () => ({ \"aria-labelledby\": `${uniqueId}-button` }),\n [uniqueId]\n );\n\n const providerValue = useMemo<MenuContextType>(\n () => ({\n closeMenu,\n openMenu,\n shouldCloseOnSelect,\n }),\n [closeMenu, openMenu, shouldCloseOnSelect]\n );\n\n const endIcon = endIconProp ? (\n endIconProp\n ) : isOverflow ? (\n <MoreIcon />\n ) : (\n <ChevronDownIcon />\n );\n\n const anchorOrigin = useMemo(\n () =>\n ({\n horizontal: menuAlignment,\n vertical: \"bottom\",\n } as PopoverOrigin),\n [menuAlignment]\n );\n\n const transformOrigin = useMemo(\n () =>\n ({\n horizontal: menuAlignment,\n vertical: \"top\",\n } as PopoverOrigin),\n [menuAlignment]\n );\n\n return (\n <div>\n <Button\n aria-controls={isOpen ? `${uniqueId}-menu` : undefined}\n aria-expanded={isOpen ? \"true\" : undefined}\n aria-haspopup=\"true\"\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n data-se={testId}\n endIcon={endIcon}\n id={`${uniqueId}-button`}\n label={buttonLabel}\n onClick={openMenu}\n size={size}\n tooltipText={tooltipText}\n translate={translate}\n variant={buttonVariant}\n />\n\n <MuiMenu\n anchorOrigin={anchorOrigin}\n transformOrigin={transformOrigin}\n anchorEl={anchorEl}\n id={`${uniqueId}-menu`}\n MenuListProps={menuListProps}\n onClose={closeMenu}\n open={isOpen}\n >\n <MenuContext.Provider value={providerValue}>\n {children}\n </MenuContext.Provider>\n </MuiMenu>\n </div>\n );\n};\n\nconst MemoizedMenuButton = memo(MenuButton);\nMemoizedMenuButton.displayName = \"MenuButton\";\n\nexport { MemoizedMenuButton as MenuButton };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,SAaEA,MAAM,EAINC,WAAW;AAAA,SAQJC,eAAe,EAAEC,QAAQ;AAClC,SAASC,IAAI,EAAqBC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAAC,SAEvEC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAA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CAAC;AAED,MAAMqC,kBAAkB,GAAGtD,IAAI,CAACU,UAAU,CAAC;AAC3C4C,kBAAkB,CAACC,WAAW,GAAG,YAAY;AAE7C,SAASD,kBAAkB,IAAI5C,UAAU"}
1
+ {"version":3,"file":"MenuButton.js","names":["memo","useCallback","useMemo","useState","Button","useUniqueId","ChevronDownIcon","MoreIcon","MenuContext","jsx","_jsx","jsxs","_jsxs","menuAlignmentValues","MenuButton","_ref","ariaLabel","ariaLabelledBy","ariaDescribedBy","buttonLabel","buttonVariant","children","shouldCloseOnSelect","endIcon","endIconProp","id","idOverride","isDisabled","isOverflow","menuAlignment","size","testId","tooltipText","translate","anchorEl","setAnchorEl","isOpen","Boolean","closeMenu","openMenu","event","currentTarget","uniqueId","menuListProps","providerValue","anchorOrigin","horizontal","vertical","transformOrigin","undefined","label","onClick","variant","_Menu","MenuListProps","onClose","open","Provider","value","MemoizedMenuButton","displayName"],"sources":["../src/MenuButton.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-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 { memo, type ReactElement, useCallback, useMemo, useState } from \"react\";\nimport {\n Divider,\n ListSubheader,\n Menu as MuiMenu,\n PopoverOrigin,\n} from \"@mui/material\";\n\nimport {\n Button,\n buttonSizeValues,\n buttonVariantValues,\n MenuItem,\n useUniqueId,\n} from \"./\";\nimport { ChevronDownIcon, MoreIcon } from \"./icons.generated\";\nimport { FieldComponentProps } from \"./FieldComponentProps\";\nimport { MenuContext, MenuContextType } from \"./MenuContext\";\nimport { NullElement } from \"./NullElement\";\nimport type { AllowedProps } from \"./AllowedProps\";\n\nexport const menuAlignmentValues = [\"left\", \"right\"] as const;\n\nexport type MenuButtonProps = {\n /**\n * The ARIA label for the Button\n */\n ariaLabel?: string;\n /**\n * The ID of the element that labels the Button\n */\n ariaLabelledBy?: string;\n /**\n * The ID of the element that describes the Button\n */\n ariaDescribedBy?: string;\n /**\n * The label on the triggering Button\n */\n buttonLabel?: string;\n /**\n * The variant of the triggering Button\n */\n buttonVariant?: (typeof buttonVariantValues)[number];\n /**\n * The <MenuItem> components within the Menu.\n */\n children:\n | ReactElement<typeof MenuItem | typeof Divider | typeof ListSubheader>\n | Array<\n | ReactElement<typeof MenuItem | typeof Divider | typeof ListSubheader>\n | NullElement\n >\n | NullElement;\n /**\n * The end Icon on the trigggering Button\n */\n endIcon?: ReactElement;\n /**\n * The id of the Button\n */\n id?: string;\n /**\n * If the MenuButton is an overflow menu or standard menu.\n */\n isOverflow?: boolean;\n /**\n * The horizontal alignment of the menu.\n */\n menuAlignment?: (typeof menuAlignmentValues)[number];\n /**\n * If true (the default), the menu will close when a child MenuItem is clicked.\n * Otherwise, it will remain open.\n */\n shouldCloseOnSelect?: boolean;\n /**\n * The size of the button\n */\n size?: (typeof buttonSizeValues)[number];\n /**\n * The tooltip text for the Button if it's icon-only\n */\n tooltipText?: string;\n} & (\n | {\n ariaLabel?: string;\n ariaLabelledBy?: string;\n buttonLabel: string;\n }\n | {\n ariaLabel: string;\n ariaLabelledBy?: string;\n buttonLabel?: undefined | \"\";\n }\n | {\n ariaLabel?: string;\n ariaLabelledBy: string;\n buttonLabel?: undefined | \"\";\n }\n) &\n Pick<FieldComponentProps, \"isDisabled\"> &\n AllowedProps;\n\nconst MenuButton = ({\n ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy,\n buttonLabel = \"\",\n buttonVariant = \"secondary\",\n children,\n shouldCloseOnSelect = true,\n endIcon: endIconProp,\n id: idOverride,\n isDisabled,\n isOverflow,\n menuAlignment = \"left\",\n size,\n testId,\n tooltipText,\n translate,\n}: MenuButtonProps) => {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n\n const isOpen = Boolean(anchorEl);\n\n const closeMenu = useCallback(() => {\n setAnchorEl(null);\n }, []);\n\n const openMenu = useCallback<MenuContextType[\"openMenu\"]>((event) => {\n setAnchorEl(event.currentTarget);\n }, []);\n\n const uniqueId = useUniqueId(idOverride);\n\n const menuListProps = useMemo(\n () => ({ \"aria-labelledby\": `${uniqueId}-button` }),\n [uniqueId]\n );\n\n const providerValue = useMemo<MenuContextType>(\n () => ({\n closeMenu,\n openMenu,\n shouldCloseOnSelect,\n }),\n [closeMenu, openMenu, shouldCloseOnSelect]\n );\n\n const endIcon = endIconProp ? (\n endIconProp\n ) : isOverflow ? (\n <MoreIcon />\n ) : (\n <ChevronDownIcon />\n );\n\n const anchorOrigin = useMemo(\n () =>\n ({\n horizontal: menuAlignment,\n vertical: \"bottom\",\n } as PopoverOrigin),\n [menuAlignment]\n );\n\n const transformOrigin = useMemo(\n () =>\n ({\n horizontal: menuAlignment,\n vertical: \"top\",\n } as PopoverOrigin),\n [menuAlignment]\n );\n\n return (\n <div>\n <Button\n aria-controls={isOpen ? `${uniqueId}-menu` : undefined}\n aria-expanded={isOpen ? \"true\" : undefined}\n aria-haspopup=\"true\"\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n data-se={testId}\n endIcon={endIcon}\n id={`${uniqueId}-button`}\n isDisabled={isDisabled}\n label={buttonLabel}\n onClick={openMenu}\n size={size}\n tooltipText={tooltipText}\n translate={translate}\n variant={buttonVariant}\n />\n\n <MuiMenu\n anchorOrigin={anchorOrigin}\n transformOrigin={transformOrigin}\n anchorEl={anchorEl}\n id={`${uniqueId}-menu`}\n MenuListProps={menuListProps}\n onClose={closeMenu}\n open={isOpen}\n >\n <MenuContext.Provider value={providerValue}>\n {children}\n </MenuContext.Provider>\n </MuiMenu>\n </div>\n );\n};\n\nconst MemoizedMenuButton =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ACxB,CAAC,EAEFV,IAAA,CAAA2C,KAAA;MACER,YAAY,EAAEA,YAAa;MAC3BG,eAAe,EAAEA,eAAgB;MACjCd,QAAQ,EAAEA,QAAS;MACnBT,EAAE,EAAG,GAAEiB,QAAS,OAAO;MACvBY,aAAa,EAAEX,aAAc;MAC7BY,OAAO,EAAEjB,SAAU;MACnBkB,IAAI,EAAEpB,MAAO;MAAAf,QAAA,EAEbX,IAAA,CAACF,WAAW,CAACiD,QAAQ;QAACC,KAAK,EAAEd,aAAc;QAAAvB,QAAA,EACxCA;MAAQ,CACW;IAAC,CAChB,CAAC;EAAA,CACP,CAAC;AAEV,CAAC;AAED,MAAMsC,kBAAkB,GAAG3D,IAAI,CAACc,UAAU,CAAC;AAC3C6C,kBAAkB,CAACC,WAAW,GAAG,YAAY;AAE7C,SAASD,kBAAkB,IAAI7C,UAAU"}
@@ -9,9 +9,10 @@
9
9
  *
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
- import { buttonSizeValues, buttonVariantValues, MenuItem } from "./";
13
- import { Divider, ListSubheader } from "@mui/material";
14
12
  import { type ReactElement } from "react";
13
+ import { Divider, ListSubheader } from "@mui/material";
14
+ import { buttonSizeValues, buttonVariantValues, MenuItem } from "./";
15
+ import { FieldComponentProps } from "./FieldComponentProps";
15
16
  import { NullElement } from "./NullElement";
16
17
  import type { AllowedProps } from "./AllowedProps";
17
18
  export declare const menuAlignmentValues: readonly ["left", "right"];
@@ -81,7 +82,7 @@ export type MenuButtonProps = {
81
82
  ariaLabel?: string;
82
83
  ariaLabelledBy: string;
83
84
  buttonLabel?: undefined | "";
84
- }) & AllowedProps;
85
- declare const MemoizedMenuButton: import("react").MemoExoticComponent<({ ariaLabel, ariaLabelledBy, ariaDescribedBy, buttonLabel, buttonVariant, children, shouldCloseOnSelect, endIcon: endIconProp, id: idOverride, isOverflow, menuAlignment, size, testId, tooltipText, translate, }: MenuButtonProps) => JSX.Element>;
85
+ }) & Pick<FieldComponentProps, "isDisabled"> & AllowedProps;
86
+ declare const MemoizedMenuButton: import("react").MemoExoticComponent<({ ariaLabel, ariaLabelledBy, ariaDescribedBy, buttonLabel, buttonVariant, children, shouldCloseOnSelect, endIcon: endIconProp, id: idOverride, isDisabled, isOverflow, menuAlignment, size, testId, tooltipText, translate, }: MenuButtonProps) => JSX.Element>;
86
87
  export { MemoizedMenuButton as MenuButton };
87
88
  //# sourceMappingURL=MenuButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MenuButton.d.ts","sourceRoot":"","sources":["../../src/MenuButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAEL,gBAAgB,EAChB,mBAAmB,EACnB,QAAQ,EAET,MAAM,IAAI,CAAC;AACZ,OAAO,EACL,OAAO,EACP,aAAa,EAGd,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAQ,KAAK,YAAY,EAAkC,MAAM,OAAO,CAAC;AAGhF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,eAAO,MAAM,mBAAmB,4BAA6B,CAAC;AAE9D,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;IACrD;;OAEG;IACH,QAAQ,EACJ,YAAY,CAAC,OAAO,QAAQ,GAAG,OAAO,OAAO,GAAG,OAAO,aAAa,CAAC,GACrE,KAAK,CACD,YAAY,CAAC,OAAO,QAAQ,GAAG,OAAO,OAAO,GAAG,OAAO,aAAa,CAAC,GACrE,WA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AC,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;CACrB,GACD;IACE,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,SAAS,GAAG,EAAE,CAAC;CAC9B,GACD;IACE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,SAAS,GAAG,EAAE,CAAC;CAC9B,CACJ,GACC,IAAI,CAAC,mBAAmB,EAAE,YAAY,CAAC,GACvC,YAAY,CAAC;AAgHf,QAAA,MAAM,kBAAkB,sQA7FrB,eAAe,iBA6FyB,CAAC;AAG5C,OAAO,EAAE,kBAAkB,IAAI,UAAU,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/theme/components.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAqC7C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,eAAO,MAAM,UAAU;mBAIN,YAAY;;MAEzB,YAAY,CAAC,YAAY,CAmoF5B,CAAC"}
1
+ {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/theme/components.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAqC7C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,eAAO,MAAM,UAAU;mBAIN,YAAY;;MAEzB,YAAY,CAAC,YAAY,CA2oF5B,CAAC"}
@@ -1811,7 +1811,10 @@ export const components = _ref => {
1811
1811
  backgroundColor: odysseyTokens.HueNeutral100
1812
1812
  },
1813
1813
  [`&.${menuItemClasses.root}-destructive`]: {
1814
- color: odysseyTokens.TypographyColorDanger
1814
+ color: odysseyTokens.TypographyColorDanger,
1815
+ [`.${typographyClasses.root}`]: {
1816
+ color: "inherit"
1817
+ }
1815
1818
  },
1816
1819
  [`&.${menuItemClasses.selected}`]: {
1817
1820
  backgroundColor: "transparent",
@@ -1831,7 +1834,10 @@ export const components = _ref => {
1831
1834
  }),
1832
1835
  [`&.${menuItemClasses.disabled}`]: {
1833
1836
  opacity: 1,
1834
- color: odysseyTokens.TypographyColorDisabled
1837
+ color: odysseyTokens.TypographyColorDisabled,
1838
+ [`.${typographyClasses.root}`]: {
1839
+ color: "inherit"
1840
+ }
1835
1841
  },
1836
1842
  [`& + .${dividerClasses.root}`]: {
1837
1843
  marginBlock: odysseyTokens.Spacing1