@moderneinc/design-system-components 7.4.1-next.b09733 → 7.5.0-next.230cdc
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/Badge/Badge.d.ts +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +0 -2
- package/dist/CheckboxWithText/CheckboxWithText.d.ts +1 -1
- package/dist/DataGrid/DataGrid.styles.d.ts +9 -1
- package/dist/DataGridCell/DataGridCell.d.ts +1 -1
- package/dist/DataGridColumnsPanel/DataGridColumnsPanel.d.ts +1 -1
- package/dist/FilledStatusIcons/FilledStatusIcons.d.ts +1 -1
- package/dist/ListItemButton/ListItemButton.d.ts +1 -1
- package/dist/LoadingSpinner/LoadingSpinner.d.ts +1 -1
- package/dist/MenuItem/MenuItem.d.ts +4 -4
- package/dist/QuickFilter/QuickFilter.d.ts +1 -1
- package/dist/Tag/Tag.d.ts +1 -1
- package/dist/Toast/Toast.d.ts +3 -3
- package/dist/index.d.ts +25 -19
- package/dist/index.esm.js +40 -32
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +40 -32
- package/dist/index.js.map +1 -1
- package/dist/utils/colorHelpers.d.ts +1 -1
- package/package.json +2 -2
package/dist/Badge/Badge.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export interface ModBadgeProps extends Omit<ChipProps, 'variant' | 'size'> {
|
|
|
21
21
|
variant?: BadgeVariant;
|
|
22
22
|
/**
|
|
23
23
|
* Corner treatment. `square` = borderRadius.xS, `rounded` = borderRadius.full.
|
|
24
|
-
* Deliberately defaults to `square` even though
|
|
24
|
+
* Deliberately defaults to `square` even though the design's Shape default differs —
|
|
25
25
|
* this keeps existing consumers rendering unchanged. Don't "fix" it.
|
|
26
26
|
* @default "square"
|
|
27
27
|
*/
|
|
@@ -2,8 +2,6 @@ import { type LinkProps } from '@mui/material/Link';
|
|
|
2
2
|
import type { ElementType, ReactNode } from 'react';
|
|
3
3
|
/**
|
|
4
4
|
* ModBreadcrumbs - Navigation breadcrumb component
|
|
5
|
-
*
|
|
6
|
-
* @see https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4563-122872
|
|
7
5
|
*/
|
|
8
6
|
export interface ModBreadcrumbsProps {
|
|
9
7
|
/** Breadcrumb items as Link elements */
|
|
@@ -22,7 +22,7 @@ export interface ModCheckboxWithTextProps extends Omit<ModCheckboxProps, 'size'>
|
|
|
22
22
|
/**
|
|
23
23
|
* ModCheckboxWithText - Checkbox with label and supporting text
|
|
24
24
|
*
|
|
25
|
-
* Thin wrapper around ModCheckbox that maps the
|
|
25
|
+
* Thin wrapper around ModCheckbox that maps the "Checkbox with text"
|
|
26
26
|
* component to the existing ModCheckbox with label + helperText.
|
|
27
27
|
*/
|
|
28
28
|
export declare const ModCheckboxWithText: {
|
|
@@ -10,5 +10,13 @@ import type { SxProps, Theme } from '@mui/material/styles';
|
|
|
10
10
|
export declare const panelSurfaceStyles: {
|
|
11
11
|
readonly backgroundColor: "var(--mod-color-surface-raised)";
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* `resizable` picks header-title overflow. User-draggable widths truncate,
|
|
15
|
+
* since wrapped labels grow the header row mid-drag; the ellipsis also
|
|
16
|
+
* restores MUI's full-label tooltip, which needs `overflow: hidden`. Fixed
|
|
17
|
+
* widths wrap. Grid-level only: MUI has no per-column resizability class.
|
|
18
|
+
*/
|
|
19
|
+
export declare const getDataGridHeaderStyles: ({ resizable, }?: {
|
|
20
|
+
resizable?: boolean;
|
|
21
|
+
}) => SxProps<Theme>;
|
|
14
22
|
export declare const getDataGridRowStyles: () => SxProps<Theme>;
|
|
@@ -44,7 +44,7 @@ export declare const ModDataGridCellContent: {
|
|
|
44
44
|
displayName: string;
|
|
45
45
|
};
|
|
46
46
|
/**
|
|
47
|
-
* Row height configuration for DataGrid size variants
|
|
47
|
+
* Row height configuration for DataGrid size variants
|
|
48
48
|
* - compact: 42px
|
|
49
49
|
* - standard: 48px
|
|
50
50
|
* - comfortable: 56px
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GridColumnsPanelProps } from '@mui/x-data-grid-pro';
|
|
2
2
|
/**
|
|
3
|
-
* ModDataGridColumnsPanel - Custom columns panel for ModDataGrid
|
|
3
|
+
* ModDataGridColumnsPanel - Custom columns panel for ModDataGrid
|
|
4
4
|
*
|
|
5
5
|
* A styled columns panel that integrates with MUI DataGrid's column visibility system.
|
|
6
6
|
* Features:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type SvgIconProps } from '@mui/material/SvgIcon';
|
|
2
2
|
/**
|
|
3
|
-
* Filled status icons — sourced from the published
|
|
3
|
+
* Filled status icons — sourced from the published design library components
|
|
4
4
|
* Filled_Success / Filled_Queued / Filled_Info / Filled_Warning / Filled_Error /
|
|
5
5
|
* Filled_Neutral / Filled_Canceled.
|
|
6
6
|
*
|
|
@@ -46,7 +46,7 @@ export interface ModListItemButtonProps extends ListItemButtonProps {
|
|
|
46
46
|
* </ModListItemButton>
|
|
47
47
|
* ```
|
|
48
48
|
*
|
|
49
|
-
* Design Tokens Used (hex values omitted — they are generated
|
|
49
|
+
* Design Tokens Used (hex values omitted — they are generated and drift):
|
|
50
50
|
* - semanticColors.buttons.primary.default - Active border
|
|
51
51
|
* - semanticColors.border.primary - Default/disabled border
|
|
52
52
|
* - semanticColors.icons.default - Active icon color
|
|
@@ -14,7 +14,7 @@ export interface ModLoadingSpinnerProps {
|
|
|
14
14
|
* ModLoadingSpinner - Animated loading spinner component
|
|
15
15
|
*
|
|
16
16
|
* A circular loading spinner with a partial arc that rotates continuously.
|
|
17
|
-
* Based on the
|
|
17
|
+
* Based on the design system button loading icon.
|
|
18
18
|
*
|
|
19
19
|
* @example
|
|
20
20
|
* <ModLoadingSpinner />
|
|
@@ -3,19 +3,19 @@ import type { ComponentPropsWithoutRef, ElementType, ReactNode } from 'react';
|
|
|
3
3
|
type ModMenuItemOwnProps = {
|
|
4
4
|
/**
|
|
5
5
|
* Optional icon to display on the left side
|
|
6
|
-
* Note:
|
|
6
|
+
* Note: Not expressible as a design-tool property (ReactNode)
|
|
7
7
|
*/
|
|
8
8
|
icon?: ReactNode;
|
|
9
9
|
/**
|
|
10
10
|
* Optional keyboard shortcut to display on the right side
|
|
11
11
|
* @example "⌘+P" or "Ctrl+K"
|
|
12
|
-
* Note:
|
|
12
|
+
* Note: Not expressible as a design-tool property (ReactNode/string)
|
|
13
13
|
*/
|
|
14
14
|
shortcut?: string;
|
|
15
15
|
/**
|
|
16
16
|
* Optional secondary text to display next to the primary label
|
|
17
17
|
* @example "@username" or supporting text
|
|
18
|
-
* Note:
|
|
18
|
+
* Note: Not expressible as a design-tool property (ReactNode/string)
|
|
19
19
|
*/
|
|
20
20
|
secondaryText?: string;
|
|
21
21
|
/**
|
|
@@ -66,7 +66,7 @@ export type ModMenuItemProps<C extends ElementType = typeof MenuItem> = ModMenuI
|
|
|
66
66
|
* View profile
|
|
67
67
|
* </ModMenuItem>
|
|
68
68
|
*
|
|
69
|
-
* // With secondary text (user list pattern
|
|
69
|
+
* // With secondary text (user list pattern)
|
|
70
70
|
* <ModMenuItem secondaryText="@phoenix">Phoenix Baker</ModMenuItem>
|
|
71
71
|
* <ModMenuItem secondaryText="@olivia">Olivia Rhye</ModMenuItem>
|
|
72
72
|
*
|
|
@@ -18,7 +18,7 @@ export interface ModQuickFilterProps {
|
|
|
18
18
|
* ModQuickFilter - Quick search/filter input component for data grids
|
|
19
19
|
*
|
|
20
20
|
* Uses MUI X DataGrid's QuickFilterControl with Moderne design system styling.
|
|
21
|
-
*
|
|
21
|
+
* Search icon, clear button, and spacing from the design tokens.
|
|
22
22
|
*
|
|
23
23
|
* **Note:** This component must be used within a DataGrid context (inside a DataGrid component's toolbar).
|
|
24
24
|
*
|
package/dist/Tag/Tag.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export type ModTagOwnProps = {
|
|
|
32
32
|
intent?: 'default' | 'error' | 'warning' | 'success' | 'info' | 'violet' | 'beta';
|
|
33
33
|
/**
|
|
34
34
|
* Corner treatment. `square` = borderRadius.xS, `rounded` = borderRadius.full.
|
|
35
|
-
* Deliberately defaults to `square` even though
|
|
35
|
+
* Deliberately defaults to `square` even though the design's Shape default differs —
|
|
36
36
|
* this keeps existing consumers rendering unchanged. Don't "fix" it.
|
|
37
37
|
* @default "square"
|
|
38
38
|
*/
|
package/dist/Toast/Toast.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import Button from '@mui/material/Button';
|
|
|
3
3
|
import type { ReactNode } from 'react';
|
|
4
4
|
type Intent = 'neutral' | 'info' | 'success' | 'error' | 'warning';
|
|
5
5
|
/**
|
|
6
|
-
* @deprecated The
|
|
6
|
+
* @deprecated The design no longer has Filled/Outlined styles. Retained for API
|
|
7
7
|
* compatibility only; all toasts render the single tinted style.
|
|
8
8
|
*/
|
|
9
9
|
type ToastType = 'outlined' | 'filled';
|
|
@@ -14,7 +14,7 @@ export interface ModToastProps extends Omit<AlertProps, 'variant' | 'severity' |
|
|
|
14
14
|
*/
|
|
15
15
|
intent?: Intent;
|
|
16
16
|
/**
|
|
17
|
-
* @deprecated The
|
|
17
|
+
* @deprecated The design no longer has Filled/Outlined styles. Ignored; all
|
|
18
18
|
* toasts render the single tinted style.
|
|
19
19
|
*/
|
|
20
20
|
type?: ToastType;
|
|
@@ -56,7 +56,7 @@ export declare const ModToastButton: {
|
|
|
56
56
|
primary?: boolean;
|
|
57
57
|
intent?: Intent;
|
|
58
58
|
/**
|
|
59
|
-
* @deprecated The
|
|
59
|
+
* @deprecated The design no longer has Filled/Outlined styles. Ignored.
|
|
60
60
|
*/
|
|
61
61
|
type?: ToastType;
|
|
62
62
|
children: ReactNode;
|
package/dist/index.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ import { TreeItemProps } from '@mui/x-tree-view/TreeItem';
|
|
|
43
43
|
import { RichTreeViewProProps } from '@mui/x-tree-view-pro/RichTreeViewPro';
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
|
-
* ModDataGridColumnsPanel - Custom columns panel for ModDataGrid
|
|
46
|
+
* ModDataGridColumnsPanel - Custom columns panel for ModDataGrid
|
|
47
47
|
*
|
|
48
48
|
* A styled columns panel that integrates with MUI DataGrid's column visibility system.
|
|
49
49
|
* Features:
|
|
@@ -382,7 +382,7 @@ interface ModBadgeProps extends Omit<ChipProps, 'variant' | 'size'> {
|
|
|
382
382
|
variant?: BadgeVariant;
|
|
383
383
|
/**
|
|
384
384
|
* Corner treatment. `square` = borderRadius.xS, `rounded` = borderRadius.full.
|
|
385
|
-
* Deliberately defaults to `square` even though
|
|
385
|
+
* Deliberately defaults to `square` even though the design's Shape default differs —
|
|
386
386
|
* this keeps existing consumers rendering unchanged. Don't "fix" it.
|
|
387
387
|
* @default "square"
|
|
388
388
|
*/
|
|
@@ -451,8 +451,6 @@ declare const ModBanner: {
|
|
|
451
451
|
|
|
452
452
|
/**
|
|
453
453
|
* ModBreadcrumbs - Navigation breadcrumb component
|
|
454
|
-
*
|
|
455
|
-
* @see https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4563-122872
|
|
456
454
|
*/
|
|
457
455
|
interface ModBreadcrumbsProps {
|
|
458
456
|
/** Breadcrumb items as Link elements */
|
|
@@ -794,7 +792,7 @@ interface ModCheckboxWithTextProps extends Omit<ModCheckboxProps, 'size'> {
|
|
|
794
792
|
/**
|
|
795
793
|
* ModCheckboxWithText - Checkbox with label and supporting text
|
|
796
794
|
*
|
|
797
|
-
* Thin wrapper around ModCheckbox that maps the
|
|
795
|
+
* Thin wrapper around ModCheckbox that maps the "Checkbox with text"
|
|
798
796
|
* component to the existing ModCheckbox with label + helperText.
|
|
799
797
|
*/
|
|
800
798
|
declare const ModCheckboxWithText: {
|
|
@@ -895,7 +893,15 @@ declare namespace ModDataGrid {
|
|
|
895
893
|
var displayName: string;
|
|
896
894
|
}
|
|
897
895
|
|
|
898
|
-
|
|
896
|
+
/**
|
|
897
|
+
* `resizable` picks header-title overflow. User-draggable widths truncate,
|
|
898
|
+
* since wrapped labels grow the header row mid-drag; the ellipsis also
|
|
899
|
+
* restores MUI's full-label tooltip, which needs `overflow: hidden`. Fixed
|
|
900
|
+
* widths wrap. Grid-level only: MUI has no per-column resizability class.
|
|
901
|
+
*/
|
|
902
|
+
declare const getDataGridHeaderStyles: ({ resizable, }?: {
|
|
903
|
+
resizable?: boolean;
|
|
904
|
+
}) => SxProps<Theme>;
|
|
899
905
|
declare const getDataGridRowStyles: () => SxProps<Theme>;
|
|
900
906
|
|
|
901
907
|
interface ModDataGridCellContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
@@ -942,7 +948,7 @@ declare const ModDataGridCellContent: {
|
|
|
942
948
|
displayName: string;
|
|
943
949
|
};
|
|
944
950
|
/**
|
|
945
|
-
* Row height configuration for DataGrid size variants
|
|
951
|
+
* Row height configuration for DataGrid size variants
|
|
946
952
|
* - compact: 42px
|
|
947
953
|
* - standard: 48px
|
|
948
954
|
* - comfortable: 56px
|
|
@@ -1343,7 +1349,7 @@ declare const ModDownloadToast: {
|
|
|
1343
1349
|
};
|
|
1344
1350
|
|
|
1345
1351
|
/**
|
|
1346
|
-
* Filled status icons — sourced from the published
|
|
1352
|
+
* Filled status icons — sourced from the published design library components
|
|
1347
1353
|
* Filled_Success / Filled_Queued / Filled_Info / Filled_Warning / Filled_Error /
|
|
1348
1354
|
* Filled_Neutral / Filled_Canceled.
|
|
1349
1355
|
*
|
|
@@ -1727,7 +1733,7 @@ interface ModListItemButtonProps extends ListItemButtonProps {
|
|
|
1727
1733
|
* </ModListItemButton>
|
|
1728
1734
|
* ```
|
|
1729
1735
|
*
|
|
1730
|
-
* Design Tokens Used (hex values omitted — they are generated
|
|
1736
|
+
* Design Tokens Used (hex values omitted — they are generated and drift):
|
|
1731
1737
|
* - semanticColors.buttons.primary.default - Active border
|
|
1732
1738
|
* - semanticColors.border.primary - Default/disabled border
|
|
1733
1739
|
* - semanticColors.icons.default - Active icon color
|
|
@@ -1759,7 +1765,7 @@ interface ModLoadingSpinnerProps {
|
|
|
1759
1765
|
* ModLoadingSpinner - Animated loading spinner component
|
|
1760
1766
|
*
|
|
1761
1767
|
* A circular loading spinner with a partial arc that rotates continuously.
|
|
1762
|
-
* Based on the
|
|
1768
|
+
* Based on the design system button loading icon.
|
|
1763
1769
|
*
|
|
1764
1770
|
* @example
|
|
1765
1771
|
* <ModLoadingSpinner />
|
|
@@ -1805,19 +1811,19 @@ declare const ModMenu: {
|
|
|
1805
1811
|
type ModMenuItemOwnProps = {
|
|
1806
1812
|
/**
|
|
1807
1813
|
* Optional icon to display on the left side
|
|
1808
|
-
* Note:
|
|
1814
|
+
* Note: Not expressible as a design-tool property (ReactNode)
|
|
1809
1815
|
*/
|
|
1810
1816
|
icon?: ReactNode;
|
|
1811
1817
|
/**
|
|
1812
1818
|
* Optional keyboard shortcut to display on the right side
|
|
1813
1819
|
* @example "⌘+P" or "Ctrl+K"
|
|
1814
|
-
* Note:
|
|
1820
|
+
* Note: Not expressible as a design-tool property (ReactNode/string)
|
|
1815
1821
|
*/
|
|
1816
1822
|
shortcut?: string;
|
|
1817
1823
|
/**
|
|
1818
1824
|
* Optional secondary text to display next to the primary label
|
|
1819
1825
|
* @example "@username" or supporting text
|
|
1820
|
-
* Note:
|
|
1826
|
+
* Note: Not expressible as a design-tool property (ReactNode/string)
|
|
1821
1827
|
*/
|
|
1822
1828
|
secondaryText?: string;
|
|
1823
1829
|
/**
|
|
@@ -1868,7 +1874,7 @@ type ModMenuItemProps<C extends ElementType = typeof MenuItem> = ModMenuItemOwnP
|
|
|
1868
1874
|
* View profile
|
|
1869
1875
|
* </ModMenuItem>
|
|
1870
1876
|
*
|
|
1871
|
-
* // With secondary text (user list pattern
|
|
1877
|
+
* // With secondary text (user list pattern)
|
|
1872
1878
|
* <ModMenuItem secondaryText="@phoenix">Phoenix Baker</ModMenuItem>
|
|
1873
1879
|
* <ModMenuItem secondaryText="@olivia">Olivia Rhye</ModMenuItem>
|
|
1874
1880
|
*
|
|
@@ -2157,7 +2163,7 @@ type ModTagOwnProps = {
|
|
|
2157
2163
|
intent?: 'default' | 'error' | 'warning' | 'success' | 'info' | 'violet' | 'beta';
|
|
2158
2164
|
/**
|
|
2159
2165
|
* Corner treatment. `square` = borderRadius.xS, `rounded` = borderRadius.full.
|
|
2160
|
-
* Deliberately defaults to `square` even though
|
|
2166
|
+
* Deliberately defaults to `square` even though the design's Shape default differs —
|
|
2161
2167
|
* this keeps existing consumers rendering unchanged. Don't "fix" it.
|
|
2162
2168
|
* @default "square"
|
|
2163
2169
|
*/
|
|
@@ -2460,7 +2466,7 @@ interface ModQuickFilterProps {
|
|
|
2460
2466
|
* ModQuickFilter - Quick search/filter input component for data grids
|
|
2461
2467
|
*
|
|
2462
2468
|
* Uses MUI X DataGrid's QuickFilterControl with Moderne design system styling.
|
|
2463
|
-
*
|
|
2469
|
+
* Search icon, clear button, and spacing from the design tokens.
|
|
2464
2470
|
*
|
|
2465
2471
|
* **Note:** This component must be used within a DataGrid context (inside a DataGrid component's toolbar).
|
|
2466
2472
|
*
|
|
@@ -2859,7 +2865,7 @@ declare const ModTab: {
|
|
|
2859
2865
|
|
|
2860
2866
|
type Intent = 'neutral' | 'info' | 'success' | 'error' | 'warning';
|
|
2861
2867
|
/**
|
|
2862
|
-
* @deprecated The
|
|
2868
|
+
* @deprecated The design no longer has Filled/Outlined styles. Retained for API
|
|
2863
2869
|
* compatibility only; all toasts render the single tinted style.
|
|
2864
2870
|
*/
|
|
2865
2871
|
type ToastType = 'outlined' | 'filled';
|
|
@@ -2870,7 +2876,7 @@ interface ModToastProps extends Omit<AlertProps, 'variant' | 'severity' | 'color
|
|
|
2870
2876
|
*/
|
|
2871
2877
|
intent?: Intent;
|
|
2872
2878
|
/**
|
|
2873
|
-
* @deprecated The
|
|
2879
|
+
* @deprecated The design no longer has Filled/Outlined styles. Ignored; all
|
|
2874
2880
|
* toasts render the single tinted style.
|
|
2875
2881
|
*/
|
|
2876
2882
|
type?: ToastType;
|
|
@@ -2912,7 +2918,7 @@ declare const ModToastButton: {
|
|
|
2912
2918
|
primary?: boolean;
|
|
2913
2919
|
intent?: Intent;
|
|
2914
2920
|
/**
|
|
2915
|
-
* @deprecated The
|
|
2921
|
+
* @deprecated The design no longer has Filled/Outlined styles. Ignored.
|
|
2916
2922
|
*/
|
|
2917
2923
|
type?: ToastType;
|
|
2918
2924
|
children: ReactNode;
|
package/dist/index.esm.js
CHANGED
|
@@ -126,7 +126,7 @@ const StyledChip$3 = styled(Chip, {
|
|
|
126
126
|
borderRadius: badgeShape === 'rounded' ? borderRadius.full : borderRadius.xS,
|
|
127
127
|
fontSize: theme.typography.pxToRem(typography.fontSize.xs),
|
|
128
128
|
lineHeight: 1,
|
|
129
|
-
//
|
|
129
|
+
// Labels track at 0. Digit legibility comes from tabular figures
|
|
130
130
|
// instead, which leaves word labels alone (moderne-ui#8686).
|
|
131
131
|
fontVariantNumeric: 'tabular-nums',
|
|
132
132
|
fontWeight: typography.fontWeight.medium,
|
|
@@ -172,7 +172,7 @@ const djb2Hash = (str) => {
|
|
|
172
172
|
/**
|
|
173
173
|
* Deterministically derives an avatar color index (1-7) from a string seed,
|
|
174
174
|
* selecting one of the avatar.initials semantic token triplets
|
|
175
|
-
* (text/background/border)
|
|
175
|
+
* (text/background/border).
|
|
176
176
|
*/
|
|
177
177
|
const avatarIndexFromSeed = (seed) => seed ? ((djb2Hash(seed) % 7) + 1) : undefined;
|
|
178
178
|
|
|
@@ -284,7 +284,7 @@ const ModDataGridCellContent = ({ children, ...props }) => {
|
|
|
284
284
|
};
|
|
285
285
|
ModDataGridCellContent.displayName = 'ModDataGridCellContent';
|
|
286
286
|
/**
|
|
287
|
-
* Row height configuration for DataGrid size variants
|
|
287
|
+
* Row height configuration for DataGrid size variants
|
|
288
288
|
* - compact: 42px
|
|
289
289
|
* - standard: 48px
|
|
290
290
|
* - comfortable: 56px
|
|
@@ -330,7 +330,7 @@ const ACTIVITY_COLORS$1 = {
|
|
|
330
330
|
*/
|
|
331
331
|
const HeaderContainer = styled(Box)(({ size }) => {
|
|
332
332
|
// Use shared row heights from DataGridCell to ensure consistency
|
|
333
|
-
//
|
|
333
|
+
// Sizes: compact (42px), standard (48px), comfortable (56px)
|
|
334
334
|
return {
|
|
335
335
|
width: '34px',
|
|
336
336
|
height: `${modRowHeights[size]}px`,
|
|
@@ -962,7 +962,7 @@ const ModButtonTab = ({ children, ...props }) => {
|
|
|
962
962
|
ModButtonTab.displayName = 'ModButtonTab';
|
|
963
963
|
|
|
964
964
|
/**
|
|
965
|
-
* Styled toggle button group that implements the
|
|
965
|
+
* Styled toggle button group that implements the "Button tab group" design.
|
|
966
966
|
*
|
|
967
967
|
* Built on MUI ToggleButtonGroup which provides:
|
|
968
968
|
* - Selection state management (value/onChange/exclusive)
|
|
@@ -1306,7 +1306,7 @@ const HelperText$2 = styled('span')(({ theme, size = 'medium' }) => ({
|
|
|
1306
1306
|
color: semanticColors.color.text.secondary,
|
|
1307
1307
|
}));
|
|
1308
1308
|
// xs focus-ring radius — no matching design token (box corner comes from the icon)
|
|
1309
|
-
const
|
|
1309
|
+
const XS_FOCUS_RING_RADIUS = 1;
|
|
1310
1310
|
const StyledCheckbox = styled(Checkbox, {
|
|
1311
1311
|
shouldForwardProp: prop => prop !== 'size',
|
|
1312
1312
|
})(({ size = 'medium' }) => {
|
|
@@ -1314,7 +1314,7 @@ const StyledCheckbox = styled(Checkbox, {
|
|
|
1314
1314
|
const sizeConfig = {
|
|
1315
1315
|
xs: {
|
|
1316
1316
|
size: 12,
|
|
1317
|
-
borderRadius:
|
|
1317
|
+
borderRadius: XS_FOCUS_RING_RADIUS,
|
|
1318
1318
|
},
|
|
1319
1319
|
small: {
|
|
1320
1320
|
size: 16,
|
|
@@ -1422,7 +1422,7 @@ ModCheckbox.displayName = 'ModCheckbox';
|
|
|
1422
1422
|
/**
|
|
1423
1423
|
* ModCheckboxWithText - Checkbox with label and supporting text
|
|
1424
1424
|
*
|
|
1425
|
-
* Thin wrapper around ModCheckbox that maps the
|
|
1425
|
+
* Thin wrapper around ModCheckbox that maps the "Checkbox with text"
|
|
1426
1426
|
* component to the existing ModCheckbox with label + helperText.
|
|
1427
1427
|
*/
|
|
1428
1428
|
const ModCheckboxWithText = ({ size = 'small', ...props }) => {
|
|
@@ -1545,9 +1545,15 @@ ModCodeSnippet.displayName = 'ModCodeSnippet';
|
|
|
1545
1545
|
const panelSurfaceStyles = {
|
|
1546
1546
|
backgroundColor: semanticColors.color.surface.raised,
|
|
1547
1547
|
};
|
|
1548
|
-
|
|
1548
|
+
/**
|
|
1549
|
+
* `resizable` picks header-title overflow. User-draggable widths truncate,
|
|
1550
|
+
* since wrapped labels grow the header row mid-drag; the ellipsis also
|
|
1551
|
+
* restores MUI's full-label tooltip, which needs `overflow: hidden`. Fixed
|
|
1552
|
+
* widths wrap. Grid-level only: MUI has no per-column resizability class.
|
|
1553
|
+
*/
|
|
1554
|
+
const getDataGridHeaderStyles = ({ resizable = false, } = {}) => {
|
|
1549
1555
|
return {
|
|
1550
|
-
// Header cell container styles
|
|
1556
|
+
// Header cell container styles: bg, border, padding
|
|
1551
1557
|
[`& .${gridClasses.columnHeader}`]: {
|
|
1552
1558
|
backgroundColor: semanticColors.color.surface.dataGrid.header,
|
|
1553
1559
|
borderBottom: `1px solid ${semanticColors.color.border.primary}`,
|
|
@@ -1571,14 +1577,15 @@ const getDataGridHeaderStyles = () => {
|
|
|
1571
1577
|
...semanticTypography.table.header,
|
|
1572
1578
|
color: semanticColors.color.text.tertiary,
|
|
1573
1579
|
transition: 'color 0.2s',
|
|
1574
|
-
|
|
1575
|
-
|
|
1580
|
+
...(resizable
|
|
1581
|
+
? { textOverflow: 'ellipsis', whiteSpace: 'nowrap', overflow: 'hidden' }
|
|
1582
|
+
: { textOverflow: 'clip', whiteSpace: 'break-spaces' }),
|
|
1576
1583
|
},
|
|
1577
1584
|
// Change text color on hover
|
|
1578
1585
|
[`& .${gridClasses.columnHeader}:hover .${gridClasses.columnHeaderTitle}`]: {
|
|
1579
1586
|
color: semanticColors.color.text.primary,
|
|
1580
1587
|
},
|
|
1581
|
-
// Style the checkbox in header to match design system (16x16
|
|
1588
|
+
// Style the checkbox in header to match design system (16x16)
|
|
1582
1589
|
[`& .${gridClasses.columnHeaderCheckbox}`]: {
|
|
1583
1590
|
padding: 0,
|
|
1584
1591
|
[`& .${checkboxClasses.root}`]: {
|
|
@@ -1593,6 +1600,7 @@ const getDataGridHeaderStyles = () => {
|
|
|
1593
1600
|
},
|
|
1594
1601
|
// MUI clips this container when padding leaves < 16px of content area, which
|
|
1595
1602
|
// crops the sort icon. Guards callers that shrink height.table.header.
|
|
1603
|
+
// NOTE: MUI's own minWidth: 0 here keeps title truncation working despite `visible`.
|
|
1596
1604
|
[`& .${gridClasses.columnHeaderTitleContainer}`]: {
|
|
1597
1605
|
overflow: 'visible',
|
|
1598
1606
|
lineHeight: 1,
|
|
@@ -1695,7 +1703,7 @@ const ColumnItemContainer = styled(Box)(({ theme }) => ({
|
|
|
1695
1703
|
paddingLeft: spacing.spacing_3_4,
|
|
1696
1704
|
paddingRight: spacing.spacing_3_4,
|
|
1697
1705
|
}));
|
|
1698
|
-
//
|
|
1706
|
+
// Border radius for menu items — no matching design token
|
|
1699
1707
|
const MENU_ITEM_BORDER_RADIUS = 6;
|
|
1700
1708
|
const MenuItemContent$1 = styled('div')(() => ({
|
|
1701
1709
|
display: 'flex',
|
|
@@ -1881,7 +1889,7 @@ const Shortcut = styled('span')(({ theme }) => ({
|
|
|
1881
1889
|
* View profile
|
|
1882
1890
|
* </ModMenuItem>
|
|
1883
1891
|
*
|
|
1884
|
-
* // With secondary text (user list pattern
|
|
1892
|
+
* // With secondary text (user list pattern)
|
|
1885
1893
|
* <ModMenuItem secondaryText="@phoenix">Phoenix Baker</ModMenuItem>
|
|
1886
1894
|
* <ModMenuItem secondaryText="@olivia">Olivia Rhye</ModMenuItem>
|
|
1887
1895
|
*
|
|
@@ -2121,7 +2129,7 @@ const StyledGridFilterPanel = styled(GridFilterPanel)({
|
|
|
2121
2129
|
'& legend': {
|
|
2122
2130
|
display: 'none',
|
|
2123
2131
|
},
|
|
2124
|
-
// Buttons - design system styling
|
|
2132
|
+
// Buttons - design system styling
|
|
2125
2133
|
// Add filter button (first button)
|
|
2126
2134
|
[`& .${gridClasses.panelFooter} .${buttonClasses.root}:first-child`]: {
|
|
2127
2135
|
textTransform: 'none',
|
|
@@ -2358,7 +2366,7 @@ function ModDataGrid({ autoHeight = false, toolbar, slots, sx, density = 'standa
|
|
|
2358
2366
|
[`&& .${gridClasses.filler}, && .${gridClasses.scrollbarFiller}`]: {
|
|
2359
2367
|
backgroundColor: semanticColors.color.surface.dataGrid.default,
|
|
2360
2368
|
},
|
|
2361
|
-
...getDataGridHeaderStyles(),
|
|
2369
|
+
...getDataGridHeaderStyles({ resizable: !props.disableColumnResize }),
|
|
2362
2370
|
...getDataGridRowStyles(),
|
|
2363
2371
|
border: `1px solid ${semanticColors.color.border.primary}`,
|
|
2364
2372
|
// Target `& svg` (not `.MuiSvgIcon-root`) to match the lucide icons
|
|
@@ -2625,7 +2633,7 @@ const StyledIconOnlyButton = styled(ModButtonBase)(({ size = 'medium' }) => {
|
|
|
2625
2633
|
},
|
|
2626
2634
|
};
|
|
2627
2635
|
});
|
|
2628
|
-
// Nav variant - standalone styled MUI IconButton (
|
|
2636
|
+
// Nav variant - standalone styled MUI IconButton (no design-system counterpart)
|
|
2629
2637
|
const navOnlyProps = ['size', 'variant', 'active'];
|
|
2630
2638
|
const StyledNavButton = styled(IconButton, {
|
|
2631
2639
|
shouldForwardProp: prop => !navOnlyProps.includes(prop),
|
|
@@ -2826,7 +2834,7 @@ const StyledDateRangePicker = styled(DateRangePicker)(({ theme }) => ({
|
|
|
2826
2834
|
const ClearIcon = () => jsx(X, { size: 20, color: semanticColors.color.icon.placeholder });
|
|
2827
2835
|
// Custom calendar icon component
|
|
2828
2836
|
const CalendarIcon = () => jsx(CalendarDays, { size: 20, color: semanticColors.color.icon.placeholder });
|
|
2829
|
-
// Shortcut styles
|
|
2837
|
+
// Shortcut styles matching the list item design (no borders, plain text)
|
|
2830
2838
|
const shortcutChipStyles = {
|
|
2831
2839
|
// Container (MuiList) styles
|
|
2832
2840
|
paddingY: `${spacing.spacing_1_1_2}px`,
|
|
@@ -3258,7 +3266,7 @@ const SpinnerWrapper = styled('div')({
|
|
|
3258
3266
|
* ModLoadingSpinner - Animated loading spinner component
|
|
3259
3267
|
*
|
|
3260
3268
|
* A circular loading spinner with a partial arc that rotates continuously.
|
|
3261
|
-
* Based on the
|
|
3269
|
+
* Based on the design system button loading icon.
|
|
3262
3270
|
*
|
|
3263
3271
|
* @example
|
|
3264
3272
|
* <ModLoadingSpinner />
|
|
@@ -3723,7 +3731,7 @@ const StyledFormHelperText = styled(FormHelperText, {
|
|
|
3723
3731
|
return {
|
|
3724
3732
|
marginLeft: 0,
|
|
3725
3733
|
marginRight: 0,
|
|
3726
|
-
//
|
|
3734
|
+
// Helper text is 14px
|
|
3727
3735
|
fontSize: theme.typography.pxToRem(typography.fontSize.sm),
|
|
3728
3736
|
color: semanticColors.color.text.inputHelper,
|
|
3729
3737
|
[`&.${formHelperTextClasses.error}`]: {
|
|
@@ -3840,7 +3848,7 @@ const StyledListItemButton$1 = styled(ListItemButton, {
|
|
|
3840
3848
|
borderRadius: spacing.spacing_3_4, // 6px
|
|
3841
3849
|
backgroundColor: semanticColors.input.bg,
|
|
3842
3850
|
gap: config.gap,
|
|
3843
|
-
// Icon is always centered vertically
|
|
3851
|
+
// Icon is always centered vertically
|
|
3844
3852
|
alignItems: 'center',
|
|
3845
3853
|
transition: theme.transitions.create(['background-color'], {
|
|
3846
3854
|
duration: theme.transitions.duration.short,
|
|
@@ -3856,7 +3864,7 @@ const StyledListItemButton$1 = styled(ListItemButton, {
|
|
|
3856
3864
|
}),
|
|
3857
3865
|
},
|
|
3858
3866
|
// Primary text styling
|
|
3859
|
-
// Font weight varies by size
|
|
3867
|
+
// Font weight varies by size:
|
|
3860
3868
|
// - Default: small/medium use 400, large/xlarge/xxlarge use 500
|
|
3861
3869
|
// - Link: xxlarge uses 600, others use their default weight
|
|
3862
3870
|
'& .list-item-primary': {
|
|
@@ -3914,7 +3922,7 @@ const StyledListItemButton$1 = styled(ListItemButton, {
|
|
|
3914
3922
|
backgroundColor: semanticColors.input.bg,
|
|
3915
3923
|
},
|
|
3916
3924
|
// Selected/Active state
|
|
3917
|
-
// Font weights
|
|
3925
|
+
// Font weights by size:
|
|
3918
3926
|
// - Primary: small/medium/xxlarge use 500, large/xlarge use 600
|
|
3919
3927
|
// - Secondary: large/xlarge use 500, xxlarge uses 400
|
|
3920
3928
|
[`&.${listItemButtonClasses.selected}`]: {
|
|
@@ -4136,7 +4144,7 @@ function cardVariantStyles(theme) {
|
|
|
4136
4144
|
* </ModListItemButton>
|
|
4137
4145
|
* ```
|
|
4138
4146
|
*
|
|
4139
|
-
* Design Tokens Used (hex values omitted — they are generated
|
|
4147
|
+
* Design Tokens Used (hex values omitted — they are generated and drift):
|
|
4140
4148
|
* - semanticColors.buttons.primary.default - Active border
|
|
4141
4149
|
* - semanticColors.border.primary - Default/disabled border
|
|
4142
4150
|
* - semanticColors.icons.default - Active icon color
|
|
@@ -4700,7 +4708,7 @@ const variantConfig = {
|
|
|
4700
4708
|
color: semanticColors.color.text.primary,
|
|
4701
4709
|
},
|
|
4702
4710
|
brand: {
|
|
4703
|
-
// snackbarBrand is one of the few tokens
|
|
4711
|
+
// snackbarBrand is one of the few tokens fixed across both modes, so
|
|
4704
4712
|
// its foreground must be fixed too. typography.tooltip.default flips
|
|
4705
4713
|
// (#ffffff -> #232342), which would put dark navy on dark blue in dark mode.
|
|
4706
4714
|
backgroundColor: semanticColors.color.surface.snackbarBrand,
|
|
@@ -4719,7 +4727,7 @@ const StyledTooltip = styled(({ className, ...props }) => jsx(Tooltip, { ...prop
|
|
|
4719
4727
|
const variantStyles = variantConfig[variant];
|
|
4720
4728
|
return {
|
|
4721
4729
|
// Style the tooltip content. Padding/line-height/radius are uniform
|
|
4722
|
-
// regardless of whether a description is present —
|
|
4730
|
+
// regardless of whether a description is present — the design defines a
|
|
4723
4731
|
// single tooltip treatment (title + optional content), not two.
|
|
4724
4732
|
[`& .${tooltipClasses.tooltip}`]: {
|
|
4725
4733
|
backgroundColor: variantStyles.backgroundColor,
|
|
@@ -5119,7 +5127,7 @@ const StyledTextField = styled(TextField)(({ theme }) => ({
|
|
|
5119
5127
|
* ModQuickFilter - Quick search/filter input component for data grids
|
|
5120
5128
|
*
|
|
5121
5129
|
* Uses MUI X DataGrid's QuickFilterControl with Moderne design system styling.
|
|
5122
|
-
*
|
|
5130
|
+
* Search icon, clear button, and spacing from the design tokens.
|
|
5123
5131
|
*
|
|
5124
5132
|
* **Note:** This component must be used within a DataGrid context (inside a DataGrid component's toolbar).
|
|
5125
5133
|
*
|
|
@@ -5150,7 +5158,7 @@ const ModQuickFilter = ({ placeholder = 'Search...', onKeyDown, autoFocus = fals
|
|
|
5150
5158
|
};
|
|
5151
5159
|
ModQuickFilter.displayName = 'ModQuickFilter';
|
|
5152
5160
|
|
|
5153
|
-
// Custom radio icons
|
|
5161
|
+
// Custom radio icons
|
|
5154
5162
|
const UncheckedIcon = ({ size, disabled }) => {
|
|
5155
5163
|
const dimensions = size === 'small' ? 16 : 20;
|
|
5156
5164
|
const radius = size === 'small' ? 8 : 10;
|
|
@@ -5352,7 +5360,7 @@ const StyledSearchChip = styled(InputBase, {
|
|
|
5352
5360
|
duration: theme.transitions.duration.short,
|
|
5353
5361
|
}),
|
|
5354
5362
|
[`& .${inputBaseClasses.input}`]: {
|
|
5355
|
-
padding:
|
|
5363
|
+
padding: `0 ${spacing.spacing_1_4}px`,
|
|
5356
5364
|
height: 'auto',
|
|
5357
5365
|
lineHeight: 1,
|
|
5358
5366
|
'&::placeholder': {
|
|
@@ -6260,7 +6268,7 @@ const StyledToolbar = styled(Toolbar)(({ theme }) => ({
|
|
|
6260
6268
|
backgroundColor: semanticColors.color.surface.raised,
|
|
6261
6269
|
minHeight: 'auto',
|
|
6262
6270
|
justifyContent: 'space-between',
|
|
6263
|
-
// Apply padding directly
|
|
6271
|
+
// Apply padding directly (16px horizontal, 12px vertical)
|
|
6264
6272
|
paddingTop: spacing.spacing_1_1_2, // 12px
|
|
6265
6273
|
paddingBottom: spacing.spacing_1_1_2, // 12px
|
|
6266
6274
|
paddingLeft: spacing.spacing_2, // 16px
|
|
@@ -6444,7 +6452,7 @@ const StyledTreeView = styled(RichTreeViewPro)({
|
|
|
6444
6452
|
},
|
|
6445
6453
|
});
|
|
6446
6454
|
|
|
6447
|
-
//
|
|
6455
|
+
// Border radius for toggle buttons — no matching design token
|
|
6448
6456
|
const TOGGLE_BUTTON_BORDER_RADIUS = 14;
|
|
6449
6457
|
const StyledToggleButtonGroup = styled(MuiToggleButtonGroup)(({ theme }) => ({
|
|
6450
6458
|
backgroundColor: semanticColors.color.surface.raised,
|