@moderneinc/design-system-components 7.1.0-next.b16a41 → 7.1.0
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/dist/index.esm.js +7 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1806,7 +1806,7 @@ const StyledMenuItem = styles.styled(MenuItem)(({ theme }) => ({
|
|
|
1806
1806
|
borderRadius: 0,
|
|
1807
1807
|
color: designSystemTokens.semanticColors.color.icon.default,
|
|
1808
1808
|
textDecoration: 'none',
|
|
1809
|
-
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.
|
|
1809
|
+
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.caption),
|
|
1810
1810
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
1811
1811
|
lineHeight: '20px',
|
|
1812
1812
|
transition: theme.transitions.create(['background-color'], {
|
|
@@ -1826,6 +1826,7 @@ const StyledMenuItem = styles.styled(MenuItem)(({ theme }) => ({
|
|
|
1826
1826
|
},
|
|
1827
1827
|
[`&.${MenuItem.menuItemClasses.focusVisible}`]: {
|
|
1828
1828
|
backgroundColor: designSystemTokens.semanticColors.color.surface.rowHover,
|
|
1829
|
+
outline: 'none',
|
|
1829
1830
|
},
|
|
1830
1831
|
}));
|
|
1831
1832
|
const MenuItemContent = styles.styled('div')({
|
|
@@ -1903,7 +1904,11 @@ function ModMenuItem({ icon, shortcut, secondaryText, children, component, href,
|
|
|
1903
1904
|
// root is `button` (as of @mui/material 9.2) — so an `href` on the default root lands as
|
|
1904
1905
|
// an attribute on the `<li>` and never navigates (#722). Root at an anchor instead,
|
|
1905
1906
|
// unless the caller named a component (e.g. a router link) themselves.
|
|
1906
|
-
const rootProps = {
|
|
1907
|
+
const rootProps = {
|
|
1908
|
+
...rest,
|
|
1909
|
+
href,
|
|
1910
|
+
component: component ?? (href ? 'a' : undefined),
|
|
1911
|
+
};
|
|
1907
1912
|
return (jsxRuntime.jsx(StyledMenuItem, { ...rootProps, children: jsxRuntime.jsxs(MenuItemContent, { children: [icon && jsxRuntime.jsx(IconWrapper$1, { children: icon }), jsxRuntime.jsxs(LabelContainer$3, { children: [jsxRuntime.jsx(Label$3, { children: children }), secondaryText && jsxRuntime.jsx(SecondaryLabel, { children: secondaryText })] }), shortcut && jsxRuntime.jsx(Shortcut, { children: shortcut })] }) }));
|
|
1908
1913
|
}
|
|
1909
1914
|
ModMenuItem.displayName = 'ModMenuItem';
|