@moderneinc/design-system-components 7.1.0-next.d21647 → 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.js CHANGED
@@ -967,17 +967,21 @@ ModButtonTab.displayName = 'ModButtonTab';
967
967
  *
968
968
  * Custom styling:
969
969
  * - Rounded-rectangle border (borderRadius.button)
970
- * - Size variants (small=32px, medium=40px)
970
+ * - Size variants (small=24px, medium=40px)
971
971
  * - Border colors using semantic tokens
972
972
  * - Selected state colors from design system tokens
973
973
  */
974
974
  const StyledButtonTabGroup = styles.styled(MuiToggleButtonGroup)(({ theme, size = 'medium' }) => {
975
975
  const sizeStyles = {
976
976
  small: {
977
- height: designSystemTokens.spacing.spacing_4,
977
+ height: designSystemTokens.spacing.spacing_3,
978
+ padding: `0 ${designSystemTokens.spacing.spacing_1_1_2}px`,
979
+ fontSize: designSystemTokens.typography.fontSize.caption,
978
980
  },
979
981
  medium: {
980
982
  height: designSystemTokens.spacing.spacing_5,
983
+ padding: `${designSystemTokens.spacing.spacing_1}px ${designSystemTokens.spacing.spacing_2}px`,
984
+ fontSize: designSystemTokens.typography.fontSize.sm,
981
985
  },
982
986
  };
983
987
  return {
@@ -989,8 +993,8 @@ const StyledButtonTabGroup = styles.styled(MuiToggleButtonGroup)(({ theme, size
989
993
  flex: 1,
990
994
  minWidth: 'auto',
991
995
  height: sizeStyles[size].height,
992
- padding: `${designSystemTokens.spacing.spacing_1}px ${designSystemTokens.spacing.spacing_2}px`,
993
- fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.sm),
996
+ padding: sizeStyles[size].padding,
997
+ fontSize: theme.typography.pxToRem(sizeStyles[size].fontSize),
994
998
  fontWeight: designSystemTokens.typography.fontWeight.regular,
995
999
  lineHeight: 1,
996
1000
  textTransform: 'none',
@@ -1802,7 +1806,7 @@ const StyledMenuItem = styles.styled(MenuItem)(({ theme }) => ({
1802
1806
  borderRadius: 0,
1803
1807
  color: designSystemTokens.semanticColors.color.icon.default,
1804
1808
  textDecoration: 'none',
1805
- fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.default),
1809
+ fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.caption),
1806
1810
  fontWeight: designSystemTokens.typography.fontWeight.regular,
1807
1811
  lineHeight: '20px',
1808
1812
  transition: theme.transitions.create(['background-color'], {
@@ -1822,6 +1826,7 @@ const StyledMenuItem = styles.styled(MenuItem)(({ theme }) => ({
1822
1826
  },
1823
1827
  [`&.${MenuItem.menuItemClasses.focusVisible}`]: {
1824
1828
  backgroundColor: designSystemTokens.semanticColors.color.surface.rowHover,
1829
+ outline: 'none',
1825
1830
  },
1826
1831
  }));
1827
1832
  const MenuItemContent = styles.styled('div')({
@@ -1899,7 +1904,11 @@ function ModMenuItem({ icon, shortcut, secondaryText, children, component, href,
1899
1904
  // root is `button` (as of @mui/material 9.2) — so an `href` on the default root lands as
1900
1905
  // an attribute on the `<li>` and never navigates (#722). Root at an anchor instead,
1901
1906
  // unless the caller named a component (e.g. a router link) themselves.
1902
- const rootProps = { ...rest, href, component: component ?? (href ? 'a' : undefined) };
1907
+ const rootProps = {
1908
+ ...rest,
1909
+ href,
1910
+ component: component ?? (href ? 'a' : undefined),
1911
+ };
1903
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 })] }) }));
1904
1913
  }
1905
1914
  ModMenuItem.displayName = 'ModMenuItem';
@@ -2409,7 +2418,7 @@ function ModDataGridColumnsButton() {
2409
2418
  }
2410
2419
  ModDataGridColumnsButton.displayName = 'ModDataGridColumnsButton';
2411
2420
 
2412
- const sizeStyles$1 = {
2421
+ const sizeStyles$2 = {
2413
2422
  small: {
2414
2423
  height: 16,
2415
2424
  minWidth: 16,
@@ -2506,7 +2515,7 @@ const StyledChip$2 = styles.styled(Chip, {
2506
2515
  lineHeight: designSystemTokens.semanticTypography.chip.lineHeight,
2507
2516
  fontWeight: designSystemTokens.semanticTypography.chip.fontWeight,
2508
2517
  overflow: 'visible',
2509
- ...(size && sizeStyles$1[size]),
2518
+ ...(size && sizeStyles$2[size]),
2510
2519
  [`& .${Chip.chipClasses.label}`]: {
2511
2520
  padding: 0,
2512
2521
  overflow: 'visible',
@@ -5320,12 +5329,24 @@ const ModRipplingDot = props => (jsxRuntime.jsx(material.Box, { "aria-hidden": "
5320
5329
  } }));
5321
5330
  ModRipplingDot.displayName = 'ModRipplingDot';
5322
5331
 
5323
- const StyledSearchChip = styles.styled(InputBase)(({ theme }) => ({
5332
+ const sizeStyles$1 = {
5333
+ small: {
5334
+ height: designSystemTokens.height.input.dense,
5335
+ padding: `0 ${designSystemTokens.spacing.spacing_1_1_4}px`,
5336
+ },
5337
+ medium: {
5338
+ height: designSystemTokens.height.input.default,
5339
+ padding: `0 ${designSystemTokens.spacing.spacing_1_1_2}px`,
5340
+ },
5341
+ };
5342
+ const StyledSearchChip = styles.styled(InputBase, {
5343
+ shouldForwardProp: prop => prop !== 'size' && !isMuiInternalProp(prop),
5344
+ })(({ theme, size = 'medium' }) => ({
5324
5345
  borderRadius: designSystemTokens.borderRadius.button,
5325
5346
  border: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
5326
5347
  backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
5327
- height: 40,
5328
- padding: `0 ${designSystemTokens.spacing.spacing_1_1_2}px`,
5348
+ height: sizeStyles$1[size].height,
5349
+ padding: sizeStyles$1[size].padding,
5329
5350
  gap: designSystemTokens.spacing.spacing_1_2,
5330
5351
  fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.sm),
5331
5352
  fontWeight: designSystemTokens.typography.fontWeight.medium,
@@ -5390,6 +5411,10 @@ const ClearButton = styles.styled(ButtonBase)({
5390
5411
  *
5391
5412
  * @example
5392
5413
  * <ModSearchChip placeholder="Search titles" value={query} onChange={handleChange} onClear={handleClear} />
5414
+ *
5415
+ * @example
5416
+ * // Small size
5417
+ * <ModSearchChip size="small" placeholder="Search titles" value={query} onChange={handleChange} />
5393
5418
  */
5394
5419
  const ModSearchChip = ({ onClear, value, ...props }) => {
5395
5420
  const hasValue = Boolean(value && String(value).length > 0);