@moderneinc/design-system-components 6.0.1-next.66db2f → 6.0.1-next.71460e

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.js CHANGED
@@ -1856,20 +1856,25 @@ const Shortcut = styles.styled('span')(({ theme }) => ({
1856
1856
  * // Disabled state
1857
1857
  * <ModMenuItem disabled>Disabled item</ModMenuItem>
1858
1858
  *
1859
- * // As an anchor — `component="a"` is required, see #722
1860
- * <ModMenuItem component="a" href="/api-explorer">API explorer</ModMenuItem>
1859
+ * // As an anchor — `href` alone is enough
1860
+ * <ModMenuItem href="/api-explorer">API explorer</ModMenuItem>
1861
1861
  *
1862
1862
  * // External link
1863
- * <ModMenuItem component="a" href="https://docs.example.com" target="_blank" rel="noopener noreferrer">
1863
+ * <ModMenuItem href="https://docs.example.com" target="_blank" rel="noopener noreferrer">
1864
1864
  * Documentation
1865
1865
  * </ModMenuItem>
1866
1866
  *
1867
- * // Client-side routing (Next.js)
1867
+ * // Client-side routing (Next.js) — an explicit `component` wins over the anchor default
1868
1868
  * <ModMenuItem component={NextLink} href="/api-explorer">API explorer</ModMenuItem>
1869
1869
  * ```
1870
1870
  */
1871
- function ModMenuItem({ icon, shortcut, secondaryText, children, ...rest }) {
1872
- return (jsxRuntime.jsx(StyledMenuItem, { ...rest, 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 })] }) }));
1871
+ function ModMenuItem({ icon, shortcut, secondaryText, children, component, href, ...rest }) {
1872
+ // MUI roots MenuItem at `li`, and ButtonBase only swaps in a link component when the
1873
+ // root is `button` (as of @mui/material 9.2) — so an `href` on the default root lands as
1874
+ // an attribute on the `<li>` and never navigates (#722). Root at an anchor instead,
1875
+ // unless the caller named a component (e.g. a router link) themselves.
1876
+ const rootProps = { ...rest, href, component: component ?? (href ? 'a' : undefined) };
1877
+ 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 })] }) }));
1873
1878
  }
1874
1879
  ModMenuItem.displayName = 'ModMenuItem';
1875
1880
 
@@ -2886,16 +2891,6 @@ const ModDatePicker = ({ type = 'single', open, label, value, rangeValue, onChan
2886
2891
  };
2887
2892
  ModDatePicker.displayName = 'ModDatePicker';
2888
2893
 
2889
- /**
2890
- * ModDatePickerListItem
2891
- */
2892
- const ModDatePickerListItem = styles.styled('div')({});
2893
-
2894
- /**
2895
- * ModDatePickerMenu
2896
- */
2897
- const ModDatePickerMenu = styles.styled('div')({});
2898
-
2899
2894
  const StyledDivider = styles.styled(Divider)(() => ({
2900
2895
  borderColor: designSystemTokens.semanticColors.border.secondary,
2901
2896
  marginTop: designSystemTokens.spacing.spacing_1,
@@ -5240,11 +5235,6 @@ const ModRadio = ({ size = 'medium', label, helperText, disabled, ...props }) =>
5240
5235
  };
5241
5236
  ModRadio.displayName = 'ModRadio';
5242
5237
 
5243
- /**
5244
- * ModRadioButtonWithText
5245
- */
5246
- const ModRadioButtonWithText = styles.styled('div')({});
5247
-
5248
5238
  // Box-breathing rhythm: appear (inhale) → hold → expand+fade (exhale) → rest.
5249
5239
  // Max scale is capped so the ring fits within a parent row's line-height.
5250
5240
  const ripple = material.keyframes `
@@ -6192,11 +6182,6 @@ const ModToggleButtonGroup = ({ size = 'medium', variant = 'default', children,
6192
6182
  };
6193
6183
  ModToggleButtonGroup.displayName = 'ModToggleButtonGroup';
6194
6184
 
6195
- /**
6196
- * ModToggleButtonWithText
6197
- */
6198
- const ModToggleButtonWithText = styles.styled('div')({});
6199
-
6200
6185
  const StyledToolbar = styles.styled(xDataGrid.Toolbar)(({ theme }) => ({
6201
6186
  backgroundColor: designSystemTokens.semanticColors.surfaces.white,
6202
6187
  minHeight: 'auto',
@@ -6254,16 +6239,6 @@ const ModToolbar = ({ children, ...props }) => {
6254
6239
  };
6255
6240
  ModToolbar.displayName = 'ModToolbar';
6256
6241
 
6257
- /**
6258
- * ModTopNav
6259
- */
6260
- const ModTopNav = styles.styled('div')({});
6261
-
6262
- /**
6263
- * ModTourModal
6264
- */
6265
- const ModTourModal = styles.styled('div')({});
6266
-
6267
6242
  /**
6268
6243
  * Custom label component that reads extra slot data from the item model.
6269
6244
  * Used as `slots.label` on the TreeItem.
@@ -6521,8 +6496,6 @@ exports.ModDataGridFiltersButton = ModDataGridFiltersButton;
6521
6496
  exports.ModDataGridHeaderLabel = ModDataGridHeaderLabel;
6522
6497
  exports.ModDataGridSelect = ModDataGridSelect;
6523
6498
  exports.ModDatePicker = ModDatePicker;
6524
- exports.ModDatePickerListItem = ModDatePickerListItem;
6525
- exports.ModDatePickerMenu = ModDatePickerMenu;
6526
6499
  exports.ModDivider = ModDivider;
6527
6500
  exports.ModDot = ModDot;
6528
6501
  exports.ModDownloadToast = ModDownloadToast;
@@ -6564,7 +6537,6 @@ exports.ModProgressCell = ModProgressCell;
6564
6537
  exports.ModProgressbar = ModProgressbar;
6565
6538
  exports.ModQuickFilter = ModQuickFilter;
6566
6539
  exports.ModRadio = ModRadio;
6567
- exports.ModRadioButtonWithText = ModRadioButtonWithText;
6568
6540
  exports.ModRipplingDot = ModRipplingDot;
6569
6541
  exports.ModSearchChip = ModSearchChip;
6570
6542
  exports.ModSelect = ModSelect;
@@ -6584,11 +6556,8 @@ exports.ModToastButton = ModToastButton;
6584
6556
  exports.ModToggle = ModToggle;
6585
6557
  exports.ModToggleButton = ModToggleButton;
6586
6558
  exports.ModToggleButtonGroup = ModToggleButtonGroup;
6587
- exports.ModToggleButtonWithText = ModToggleButtonWithText;
6588
6559
  exports.ModToolbar = ModToolbar;
6589
6560
  exports.ModTooltip = ModTooltip;
6590
- exports.ModTopNav = ModTopNav;
6591
- exports.ModTourModal = ModTourModal;
6592
6561
  exports.ModTreeItem = ModTreeItem;
6593
6562
  exports.ModTreeView = ModTreeView;
6594
6563
  exports.ModTypologyButton = StyledToggleButton;