@moderneinc/design-system-components 6.1.0-alpha.f3c8fa → 7.0.0-next.4ff15f
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/ActivityHeader/ActivityHeader.d.ts +1 -1
- package/dist/DataGrid/DataGrid.styles.d.ts +1 -1
- package/dist/DataGridFilterPanel/DataGridFilterPanel.d.ts +14 -4
- package/dist/InputField/InputField.d.ts +3 -3
- package/dist/ListItem/ListItem.d.ts +8 -0
- package/dist/MenuItem/MenuItem.d.ts +30 -7
- package/dist/Tabs/Tabs.d.ts +1 -1
- package/dist/Tooltip/Tooltip.d.ts +3 -4
- package/dist/TypologyControl/TypologyControl.d.ts +1 -1
- package/dist/index.d.ts +237 -164
- package/dist/index.esm.js +734 -1627
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +765 -1664
- package/dist/index.js.map +1 -1
- package/dist/utils/focusRing.d.ts +1 -1
- package/package.json +7 -26
- package/dist/DatePickerListItem/DatePickerListItem.d.ts +0 -4
- package/dist/DatePickerMenu/DatePickerMenu.d.ts +0 -4
- package/dist/RadioButtonWithText/RadioButtonWithText.d.ts +0 -4
- package/dist/ToggleButtonWithText/ToggleButtonWithText.d.ts +0 -4
- package/dist/TopNav/TopNav.d.ts +0 -4
- package/dist/TourModal/TourModal.d.ts +0 -4
package/dist/index.js
CHANGED
|
@@ -9,8 +9,9 @@ var MuiAvatar = require('@mui/material/Avatar');
|
|
|
9
9
|
var SvgIcon = require('@mui/material/SvgIcon');
|
|
10
10
|
var Alert = require('@mui/material/Alert');
|
|
11
11
|
var ButtonBase = require('@mui/material/ButtonBase');
|
|
12
|
-
var
|
|
12
|
+
var lucideReact = require('lucide-react');
|
|
13
13
|
var IconButton = require('@mui/material/IconButton');
|
|
14
|
+
var React = require('react');
|
|
14
15
|
var Breadcrumbs = require('@mui/material/Breadcrumbs');
|
|
15
16
|
var Link = require('@mui/material/Link');
|
|
16
17
|
var CircularProgress = require('@mui/material/CircularProgress');
|
|
@@ -25,9 +26,11 @@ var Divider = require('@mui/material/Divider');
|
|
|
25
26
|
var InputAdornment = require('@mui/material/InputAdornment');
|
|
26
27
|
var InputBase = require('@mui/material/InputBase');
|
|
27
28
|
var TextField = require('@mui/material/TextField');
|
|
29
|
+
var FormControl = require('@mui/material/FormControl');
|
|
28
30
|
var FormLabel = require('@mui/material/FormLabel');
|
|
29
|
-
var
|
|
31
|
+
var MuiInputLabel = require('@mui/material/InputLabel');
|
|
30
32
|
var MuiSelect = require('@mui/material/Select');
|
|
33
|
+
var utils = require('@mui/material/utils');
|
|
31
34
|
var MenuItem = require('@mui/material/MenuItem');
|
|
32
35
|
var Tooltip = require('@mui/material/Tooltip');
|
|
33
36
|
var DateCalendar = require('@mui/x-date-pickers/DateCalendar');
|
|
@@ -38,10 +41,10 @@ var PickersCalendarHeader = require('@mui/x-date-pickers/PickersCalendarHeader')
|
|
|
38
41
|
var PickersShortcuts = require('@mui/x-date-pickers/PickersShortcuts');
|
|
39
42
|
var DateRangePicker = require('@mui/x-date-pickers-pro/DateRangePicker');
|
|
40
43
|
var DateRangePickerDay = require('@mui/x-date-pickers-pro/DateRangePickerDay');
|
|
44
|
+
var dateFns = require('date-fns');
|
|
41
45
|
var LinearProgress = require('@mui/material/LinearProgress');
|
|
42
46
|
var Paper = require('@mui/material/Paper');
|
|
43
47
|
var Stack = require('@mui/material/Stack');
|
|
44
|
-
var FormControl = require('@mui/material/FormControl');
|
|
45
48
|
var FormHelperText = require('@mui/material/FormHelperText');
|
|
46
49
|
var ListItemButton = require('@mui/material/ListItemButton');
|
|
47
50
|
var ListItemIcon = require('@mui/material/ListItemIcon');
|
|
@@ -80,29 +83,35 @@ var RichTreeViewPro = require('@mui/x-tree-view-pro/RichTreeViewPro');
|
|
|
80
83
|
const MUI_INTERNAL_PROPS = ['ownerState', 'theme', 'sx', 'as'];
|
|
81
84
|
const isMuiInternalProp = (prop) => MUI_INTERNAL_PROPS.includes(prop);
|
|
82
85
|
|
|
86
|
+
// semanticColors.status.<name> feeds `palette` below, read with
|
|
87
|
+
// .light/.dark/.transparent, so the phase-2 token restructure's codemod
|
|
88
|
+
// (driven from literal TOKEN_MAP paths) cannot reach either — fixed by hand,
|
|
89
|
+
// mirroring ModStatusCell/Dot. See
|
|
90
|
+
// docs/superpowers/plans/2026-08-05-semantic-restructure.md
|
|
91
|
+
// "Dynamic access — the codemod cannot see these".
|
|
83
92
|
const STATUS_COLOR_CLASSES = [
|
|
84
|
-
[Chip.chipClasses.colorDefault, designSystemTokens.semanticColors.status.neutral],
|
|
85
|
-
[Chip.chipClasses.colorError, designSystemTokens.semanticColors.status.error],
|
|
86
|
-
[Chip.chipClasses.colorWarning, designSystemTokens.semanticColors.status.warning],
|
|
87
|
-
[Chip.chipClasses.colorSuccess, designSystemTokens.semanticColors.status.success],
|
|
88
|
-
[Chip.chipClasses.colorInfo, designSystemTokens.semanticColors.status.info],
|
|
93
|
+
[Chip.chipClasses.colorDefault, designSystemTokens.semanticColors.color.status.neutral],
|
|
94
|
+
[Chip.chipClasses.colorError, designSystemTokens.semanticColors.color.status.error],
|
|
95
|
+
[Chip.chipClasses.colorWarning, designSystemTokens.semanticColors.color.status.warning],
|
|
96
|
+
[Chip.chipClasses.colorSuccess, designSystemTokens.semanticColors.color.status.success],
|
|
97
|
+
[Chip.chipClasses.colorInfo, designSystemTokens.semanticColors.color.status.info],
|
|
89
98
|
];
|
|
90
99
|
const outlinedColorOverrides = {
|
|
91
100
|
backgroundColor: 'transparent',
|
|
92
|
-
color: designSystemTokens.semanticColors.
|
|
93
|
-
border: `1px solid ${designSystemTokens.semanticColors.border.
|
|
101
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
102
|
+
border: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
94
103
|
[`& .${Chip.chipClasses.icon}, & .${Chip.chipClasses.deleteIcon}`]: {
|
|
95
|
-
color: designSystemTokens.semanticColors.
|
|
104
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
96
105
|
},
|
|
97
106
|
};
|
|
98
107
|
const filledColorRules = Object.fromEntries(STATUS_COLOR_CLASSES.map(([className, palette]) => [
|
|
99
108
|
`&.${className}`,
|
|
100
109
|
{
|
|
101
|
-
backgroundColor: palette.
|
|
102
|
-
color: palette.
|
|
103
|
-
border: `1px solid ${palette.
|
|
110
|
+
backgroundColor: palette.bg,
|
|
111
|
+
color: palette.fg,
|
|
112
|
+
border: `1px solid ${palette.tint}`,
|
|
104
113
|
[`& .${Chip.chipClasses.icon}, & .${Chip.chipClasses.deleteIcon}`]: {
|
|
105
|
-
color: palette.
|
|
114
|
+
color: palette.fg,
|
|
106
115
|
},
|
|
107
116
|
},
|
|
108
117
|
]));
|
|
@@ -176,7 +185,7 @@ const avatarIndexFromSeed = (seed) => seed ? ((djb2Hash(seed) % 7) + 1) : undefi
|
|
|
176
185
|
* Produces a double-ring effect: a white inner gap (via outline-offset) and a colored outer ring.
|
|
177
186
|
*/
|
|
178
187
|
const focusRingStyles = {
|
|
179
|
-
outline: `2px solid ${designSystemTokens.semanticColors.border.focus}`,
|
|
188
|
+
outline: `2px solid ${designSystemTokens.semanticColors.color.border.focus}`,
|
|
180
189
|
outlineOffset: '2px',
|
|
181
190
|
};
|
|
182
191
|
|
|
@@ -184,9 +193,14 @@ const sizeConfig$1 = {
|
|
|
184
193
|
small: { size: designSystemTokens.spacing.spacing_2_1_2, fontSize: designSystemTokens.typography.fontSize.xs },
|
|
185
194
|
medium: { size: designSystemTokens.spacing.spacing_4, fontSize: designSystemTokens.typography.fontSize.xs },
|
|
186
195
|
};
|
|
196
|
+
// semanticColors.avatar.initials[...] is a computed member access, so the
|
|
197
|
+
// phase-2 token restructure's codemod (driven from literal TOKEN_MAP paths)
|
|
198
|
+
// cannot reach it — fixed by hand, mirroring ModStatusCell/Dot. See
|
|
199
|
+
// docs/superpowers/plans/2026-08-05-semantic-restructure.md
|
|
200
|
+
// "Dynamic access — the codemod cannot see these".
|
|
187
201
|
const indexedColors = (colorIndex) => ({
|
|
188
|
-
color: designSystemTokens.semanticColors.avatar.initials[`
|
|
189
|
-
backgroundColor: designSystemTokens.semanticColors.avatar.initials[`
|
|
202
|
+
color: designSystemTokens.semanticColors.avatar.initials[`fg${colorIndex}`],
|
|
203
|
+
backgroundColor: designSystemTokens.semanticColors.avatar.initials[`bg${colorIndex}`],
|
|
190
204
|
borderColor: designSystemTokens.semanticColors.avatar.initials[`border${colorIndex}`],
|
|
191
205
|
});
|
|
192
206
|
const StyledAvatar = styles.styled(MuiAvatar, {
|
|
@@ -201,13 +215,13 @@ const StyledAvatar = styles.styled(MuiAvatar, {
|
|
|
201
215
|
fontFamily: designSystemTokens.typography.fontFamily.body,
|
|
202
216
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
203
217
|
lineHeight: 1,
|
|
204
|
-
color: designSystemTokens.semanticColors.avatar.
|
|
205
|
-
backgroundColor: designSystemTokens.semanticColors.avatar.
|
|
206
|
-
border: `1px solid ${designSystemTokens.semanticColors.border.primary}`,
|
|
218
|
+
color: designSystemTokens.semanticColors.avatar.user.fg,
|
|
219
|
+
backgroundColor: designSystemTokens.semanticColors.avatar.user.bg,
|
|
220
|
+
border: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
207
221
|
...(avatarColorIndex && indexedColors(avatarColorIndex)),
|
|
208
222
|
'&:focus-visible': {
|
|
209
223
|
...focusRingStyles,
|
|
210
|
-
borderColor: designSystemTokens.semanticColors.border.focus,
|
|
224
|
+
borderColor: designSystemTokens.semanticColors.color.border.focus,
|
|
211
225
|
},
|
|
212
226
|
};
|
|
213
227
|
});
|
|
@@ -322,7 +336,7 @@ const HeaderContainer = styles.styled(Box)(({ size }) => {
|
|
|
322
336
|
return {
|
|
323
337
|
width: '34px',
|
|
324
338
|
height: `${modRowHeights[size]}px`,
|
|
325
|
-
borderBottom: `1px solid ${designSystemTokens.semanticColors.border.
|
|
339
|
+
borderBottom: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
326
340
|
boxSizing: 'border-box',
|
|
327
341
|
display: 'flex',
|
|
328
342
|
alignItems: 'center',
|
|
@@ -359,7 +373,7 @@ const ActivityDot = styles.styled('div')(({ color }) => ({
|
|
|
359
373
|
* field: 'activity',
|
|
360
374
|
* headerName: '',
|
|
361
375
|
* width: 34,
|
|
362
|
-
* renderHeader: () => <ModActivityHeader size="
|
|
376
|
+
* renderHeader: () => <ModActivityHeader size="compact" color="commitJob" />,
|
|
363
377
|
* renderCell: (params) => (
|
|
364
378
|
* <ModActivityIndicatorCell
|
|
365
379
|
* event={params.row.eventType}
|
|
@@ -430,7 +444,7 @@ const ModActivityIndicatorCell = ({ event = 'commit-job', secondaryEvent, scene
|
|
|
430
444
|
if (scene === exports.ActivityScene.BLANK) {
|
|
431
445
|
return null;
|
|
432
446
|
}
|
|
433
|
-
const color = event !== 'none' ? ACTIVITY_COLORS[event] : designSystemTokens.semanticColors.border.
|
|
447
|
+
const color = event !== 'none' ? ACTIVITY_COLORS[event] : designSystemTokens.semanticColors.color.border.primary;
|
|
434
448
|
// Use secondary color for paths if specified, otherwise use primary color
|
|
435
449
|
const pathColor = secondaryEvent && secondaryEvent !== 'none' ? ACTIVITY_COLORS[secondaryEvent] : color;
|
|
436
450
|
switch (scene) {
|
|
@@ -457,506 +471,19 @@ const ModActivityIndicatorCell = ({ event = 'commit-job', secondaryEvent, scene
|
|
|
457
471
|
};
|
|
458
472
|
ModActivityIndicatorCell.displayName = 'ModActivityIndicatorCell';
|
|
459
473
|
|
|
460
|
-
/**
|
|
461
|
-
* @license lucide-react v1.28.0 - ISC
|
|
462
|
-
*
|
|
463
|
-
* This source code is licensed under the ISC license.
|
|
464
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
465
|
-
*/
|
|
466
|
-
|
|
467
|
-
const mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
468
|
-
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
|
|
469
|
-
}).join(" ").trim();
|
|
470
|
-
|
|
471
|
-
/**
|
|
472
|
-
* @license lucide-react v1.28.0 - ISC
|
|
473
|
-
*
|
|
474
|
-
* This source code is licensed under the ISC license.
|
|
475
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
476
|
-
*/
|
|
477
|
-
|
|
478
|
-
const toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
479
|
-
|
|
480
|
-
/**
|
|
481
|
-
* @license lucide-react v1.28.0 - ISC
|
|
482
|
-
*
|
|
483
|
-
* This source code is licensed under the ISC license.
|
|
484
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
485
|
-
*/
|
|
486
|
-
|
|
487
|
-
const toCamelCase = (string) => string.replace(
|
|
488
|
-
/^([A-Z])|[\s-_]+(\w)/g,
|
|
489
|
-
(match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
|
|
490
|
-
);
|
|
491
|
-
|
|
492
|
-
/**
|
|
493
|
-
* @license lucide-react v1.28.0 - ISC
|
|
494
|
-
*
|
|
495
|
-
* This source code is licensed under the ISC license.
|
|
496
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
497
|
-
*/
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
const toPascalCase = (string) => {
|
|
501
|
-
const camelCase = toCamelCase(string);
|
|
502
|
-
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
503
|
-
};
|
|
504
|
-
|
|
505
|
-
/**
|
|
506
|
-
* @license lucide-react v1.28.0 - ISC
|
|
507
|
-
*
|
|
508
|
-
* This source code is licensed under the ISC license.
|
|
509
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
510
|
-
*/
|
|
511
|
-
|
|
512
|
-
var defaultAttributes = {
|
|
513
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
514
|
-
width: 24,
|
|
515
|
-
height: 24,
|
|
516
|
-
viewBox: "0 0 24 24",
|
|
517
|
-
fill: "none",
|
|
518
|
-
stroke: "currentColor",
|
|
519
|
-
strokeWidth: 2,
|
|
520
|
-
strokeLinecap: "round",
|
|
521
|
-
strokeLinejoin: "round"
|
|
522
|
-
};
|
|
523
|
-
|
|
524
|
-
/**
|
|
525
|
-
* @license lucide-react v1.28.0 - ISC
|
|
526
|
-
*
|
|
527
|
-
* This source code is licensed under the ISC license.
|
|
528
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
529
|
-
*/
|
|
530
|
-
|
|
531
|
-
const hasA11yProp = (props) => {
|
|
532
|
-
for (const prop in props) {
|
|
533
|
-
if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
|
|
534
|
-
return true;
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
return false;
|
|
538
|
-
};
|
|
539
|
-
|
|
540
|
-
const LucideContext = React.createContext({});
|
|
541
|
-
const useLucideContext = () => React.useContext(LucideContext);
|
|
542
|
-
|
|
543
|
-
const Icon = React.forwardRef(
|
|
544
|
-
({ color, size, strokeWidth, absoluteStrokeWidth, className = "", children, iconNode, ...rest }, ref) => {
|
|
545
|
-
const {
|
|
546
|
-
size: contextSize = 24,
|
|
547
|
-
strokeWidth: contextStrokeWidth = 2,
|
|
548
|
-
absoluteStrokeWidth: contextAbsoluteStrokeWidth = false,
|
|
549
|
-
color: contextColor = "currentColor",
|
|
550
|
-
className: contextClass = ""
|
|
551
|
-
} = useLucideContext() ?? {};
|
|
552
|
-
const calculatedStrokeWidth = absoluteStrokeWidth ?? contextAbsoluteStrokeWidth ? Number(strokeWidth ?? contextStrokeWidth) * 24 / Number(size ?? contextSize) : strokeWidth ?? contextStrokeWidth;
|
|
553
|
-
return React.createElement(
|
|
554
|
-
"svg",
|
|
555
|
-
{
|
|
556
|
-
ref,
|
|
557
|
-
...defaultAttributes,
|
|
558
|
-
width: size ?? contextSize ?? defaultAttributes.width,
|
|
559
|
-
height: size ?? contextSize ?? defaultAttributes.height,
|
|
560
|
-
stroke: color ?? contextColor,
|
|
561
|
-
strokeWidth: calculatedStrokeWidth,
|
|
562
|
-
className: mergeClasses("lucide", contextClass, className),
|
|
563
|
-
...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
|
|
564
|
-
...rest
|
|
565
|
-
},
|
|
566
|
-
[
|
|
567
|
-
...iconNode.map(([tag, attrs]) => React.createElement(tag, attrs)),
|
|
568
|
-
...Array.isArray(children) ? children : [children]
|
|
569
|
-
]
|
|
570
|
-
);
|
|
571
|
-
}
|
|
572
|
-
);
|
|
573
|
-
|
|
574
|
-
/**
|
|
575
|
-
* @license lucide-react v1.28.0 - ISC
|
|
576
|
-
*
|
|
577
|
-
* This source code is licensed under the ISC license.
|
|
578
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
579
|
-
*/
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
const createLucideIcon = (iconName, iconNode) => {
|
|
583
|
-
const Component = React.forwardRef(
|
|
584
|
-
({ className, ...props }, ref) => React.createElement(Icon, {
|
|
585
|
-
ref,
|
|
586
|
-
iconNode,
|
|
587
|
-
className: mergeClasses(
|
|
588
|
-
`lucide-${toKebabCase(toPascalCase(iconName))}`,
|
|
589
|
-
`lucide-${iconName}`,
|
|
590
|
-
className
|
|
591
|
-
),
|
|
592
|
-
...props
|
|
593
|
-
})
|
|
594
|
-
);
|
|
595
|
-
Component.displayName = toPascalCase(iconName);
|
|
596
|
-
return Component;
|
|
597
|
-
};
|
|
598
|
-
|
|
599
|
-
/**
|
|
600
|
-
* @license lucide-react v1.28.0 - ISC
|
|
601
|
-
*
|
|
602
|
-
* This source code is licensed under the ISC license.
|
|
603
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
604
|
-
*/
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
const __iconNode$n = [
|
|
608
|
-
["path", { d: "M12 5v14", key: "s699le" }],
|
|
609
|
-
["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
|
|
610
|
-
];
|
|
611
|
-
const ArrowDown = createLucideIcon("arrow-down", __iconNode$n);
|
|
612
|
-
|
|
613
|
-
/**
|
|
614
|
-
* @license lucide-react v1.28.0 - ISC
|
|
615
|
-
*
|
|
616
|
-
* This source code is licensed under the ISC license.
|
|
617
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
618
|
-
*/
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
const __iconNode$m = [
|
|
622
|
-
["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
|
|
623
|
-
["path", { d: "M12 19V5", key: "x0mq9r" }]
|
|
624
|
-
];
|
|
625
|
-
const ArrowUp = createLucideIcon("arrow-up", __iconNode$m);
|
|
626
|
-
|
|
627
|
-
/**
|
|
628
|
-
* @license lucide-react v1.28.0 - ISC
|
|
629
|
-
*
|
|
630
|
-
* This source code is licensed under the ISC license.
|
|
631
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
632
|
-
*/
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
const __iconNode$l = [
|
|
636
|
-
[
|
|
637
|
-
"path",
|
|
638
|
-
{
|
|
639
|
-
d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",
|
|
640
|
-
key: "3c2336"
|
|
641
|
-
}
|
|
642
|
-
],
|
|
643
|
-
["line", { x1: "12", x2: "12", y1: "16", y2: "12", key: "1y1yb1" }],
|
|
644
|
-
["line", { x1: "12", x2: "12.01", y1: "8", y2: "8", key: "110wyk" }]
|
|
645
|
-
];
|
|
646
|
-
const BadgeInfo = createLucideIcon("badge-info", __iconNode$l);
|
|
647
|
-
|
|
648
|
-
/**
|
|
649
|
-
* @license lucide-react v1.28.0 - ISC
|
|
650
|
-
*
|
|
651
|
-
* This source code is licensed under the ISC license.
|
|
652
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
653
|
-
*/
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
const __iconNode$k = [
|
|
657
|
-
["path", { d: "M8 2v3", key: "1ioesn" }],
|
|
658
|
-
["path", { d: "M16 2v3", key: "otl347" }],
|
|
659
|
-
["rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", key: "h1oib" }],
|
|
660
|
-
["path", { d: "M3 9h18", key: "1pudct" }],
|
|
661
|
-
["path", { d: "M8 13h.01", key: "1sbv64" }],
|
|
662
|
-
["path", { d: "M12 13h.01", key: "y0uutt" }],
|
|
663
|
-
["path", { d: "M16 13h.01", key: "wip0gl" }],
|
|
664
|
-
["path", { d: "M8 17h.01", key: "p3bg7i" }],
|
|
665
|
-
["path", { d: "M12 17h.01", key: "p32p05" }],
|
|
666
|
-
["path", { d: "M16 17h.01", key: "ql8jdd" }]
|
|
667
|
-
];
|
|
668
|
-
const CalendarDays = createLucideIcon("calendar-days", __iconNode$k);
|
|
669
|
-
|
|
670
|
-
/**
|
|
671
|
-
* @license lucide-react v1.28.0 - ISC
|
|
672
|
-
*
|
|
673
|
-
* This source code is licensed under the ISC license.
|
|
674
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
675
|
-
*/
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
const __iconNode$j = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
679
|
-
const ChevronDown = createLucideIcon("chevron-down", __iconNode$j);
|
|
680
|
-
|
|
681
|
-
/**
|
|
682
|
-
* @license lucide-react v1.28.0 - ISC
|
|
683
|
-
*
|
|
684
|
-
* This source code is licensed under the ISC license.
|
|
685
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
686
|
-
*/
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
const __iconNode$i = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
|
|
690
|
-
const ChevronLeft = createLucideIcon("chevron-left", __iconNode$i);
|
|
691
|
-
|
|
692
|
-
/**
|
|
693
|
-
* @license lucide-react v1.28.0 - ISC
|
|
694
|
-
*
|
|
695
|
-
* This source code is licensed under the ISC license.
|
|
696
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
697
|
-
*/
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
const __iconNode$h = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
701
|
-
const ChevronRight = createLucideIcon("chevron-right", __iconNode$h);
|
|
702
|
-
|
|
703
|
-
/**
|
|
704
|
-
* @license lucide-react v1.28.0 - ISC
|
|
705
|
-
*
|
|
706
|
-
* This source code is licensed under the ISC license.
|
|
707
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
708
|
-
*/
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
const __iconNode$g = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
712
|
-
const ChevronUp = createLucideIcon("chevron-up", __iconNode$g);
|
|
713
|
-
|
|
714
|
-
/**
|
|
715
|
-
* @license lucide-react v1.28.0 - ISC
|
|
716
|
-
*
|
|
717
|
-
* This source code is licensed under the ISC license.
|
|
718
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
719
|
-
*/
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
const __iconNode$f = [
|
|
723
|
-
["path", { d: "m7 15 5 5 5-5", key: "1hf1tw" }],
|
|
724
|
-
["path", { d: "m7 9 5-5 5 5", key: "sgt6xg" }]
|
|
725
|
-
];
|
|
726
|
-
const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$f);
|
|
727
|
-
|
|
728
|
-
/**
|
|
729
|
-
* @license lucide-react v1.28.0 - ISC
|
|
730
|
-
*
|
|
731
|
-
* This source code is licensed under the ISC license.
|
|
732
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
733
|
-
*/
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
const __iconNode$e = [
|
|
737
|
-
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
738
|
-
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
739
|
-
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
740
|
-
];
|
|
741
|
-
const CircleAlert = createLucideIcon("circle-alert", __iconNode$e);
|
|
742
|
-
|
|
743
|
-
/**
|
|
744
|
-
* @license lucide-react v1.28.0 - ISC
|
|
745
|
-
*
|
|
746
|
-
* This source code is licensed under the ISC license.
|
|
747
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
748
|
-
*/
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
const __iconNode$d = [
|
|
752
|
-
["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
|
|
753
|
-
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
754
|
-
];
|
|
755
|
-
const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$d);
|
|
756
|
-
|
|
757
|
-
/**
|
|
758
|
-
* @license lucide-react v1.28.0 - ISC
|
|
759
|
-
*
|
|
760
|
-
* This source code is licensed under the ISC license.
|
|
761
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
762
|
-
*/
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
const __iconNode$c = [
|
|
766
|
-
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
767
|
-
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
768
|
-
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
769
|
-
];
|
|
770
|
-
const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$c);
|
|
771
|
-
|
|
772
|
-
/**
|
|
773
|
-
* @license lucide-react v1.28.0 - ISC
|
|
774
|
-
*
|
|
775
|
-
* This source code is licensed under the ISC license.
|
|
776
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
777
|
-
*/
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
const __iconNode$b = [
|
|
781
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
782
|
-
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
783
|
-
["path", { d: "M15 3v18", key: "14nvp0" }]
|
|
784
|
-
];
|
|
785
|
-
const Columns3 = createLucideIcon("columns-3", __iconNode$b);
|
|
786
|
-
|
|
787
|
-
/**
|
|
788
|
-
* @license lucide-react v1.28.0 - ISC
|
|
789
|
-
*
|
|
790
|
-
* This source code is licensed under the ISC license.
|
|
791
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
792
|
-
*/
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
const __iconNode$a = [
|
|
796
|
-
["path", { d: "M2 5h20", key: "1fs1ex" }],
|
|
797
|
-
["path", { d: "M6 12h12", key: "8npq4p" }],
|
|
798
|
-
["path", { d: "M9 19h6", key: "456am0" }]
|
|
799
|
-
];
|
|
800
|
-
const ListFilter = createLucideIcon("list-filter", __iconNode$a);
|
|
801
|
-
|
|
802
|
-
/**
|
|
803
|
-
* @license lucide-react v1.28.0 - ISC
|
|
804
|
-
*
|
|
805
|
-
* This source code is licensed under the ISC license.
|
|
806
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
807
|
-
*/
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
const __iconNode$9 = [["path", { d: "M5 12h14", key: "1ays0h" }]];
|
|
811
|
-
const Minus = createLucideIcon("minus", __iconNode$9);
|
|
812
|
-
|
|
813
|
-
/**
|
|
814
|
-
* @license lucide-react v1.28.0 - ISC
|
|
815
|
-
*
|
|
816
|
-
* This source code is licensed under the ISC license.
|
|
817
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
818
|
-
*/
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
const __iconNode$8 = [
|
|
822
|
-
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
823
|
-
["path", { d: "M12 5v14", key: "s699le" }]
|
|
824
|
-
];
|
|
825
|
-
const Plus = createLucideIcon("plus", __iconNode$8);
|
|
826
|
-
|
|
827
|
-
/**
|
|
828
|
-
* @license lucide-react v1.28.0 - ISC
|
|
829
|
-
*
|
|
830
|
-
* This source code is licensed under the ISC license.
|
|
831
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
832
|
-
*/
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
const __iconNode$7 = [
|
|
836
|
-
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
837
|
-
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
838
|
-
];
|
|
839
|
-
const Search = createLucideIcon("search", __iconNode$7);
|
|
840
|
-
|
|
841
|
-
/**
|
|
842
|
-
* @license lucide-react v1.28.0 - ISC
|
|
843
|
-
*
|
|
844
|
-
* This source code is licensed under the ISC license.
|
|
845
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
846
|
-
*/
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
const __iconNode$6 = [
|
|
850
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
851
|
-
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
852
|
-
];
|
|
853
|
-
const SquareCheck = createLucideIcon("square-check", __iconNode$6);
|
|
854
|
-
|
|
855
|
-
/**
|
|
856
|
-
* @license lucide-react v1.28.0 - ISC
|
|
857
|
-
*
|
|
858
|
-
* This source code is licensed under the ISC license.
|
|
859
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
860
|
-
*/
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
const __iconNode$5 = [
|
|
864
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
865
|
-
["path", { d: "M8 12h8", key: "1wcyev" }]
|
|
866
|
-
];
|
|
867
|
-
const SquareMinus = createLucideIcon("square-minus", __iconNode$5);
|
|
868
|
-
|
|
869
|
-
/**
|
|
870
|
-
* @license lucide-react v1.28.0 - ISC
|
|
871
|
-
*
|
|
872
|
-
* This source code is licensed under the ISC license.
|
|
873
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
874
|
-
*/
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
const __iconNode$4 = [
|
|
878
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
|
|
879
|
-
];
|
|
880
|
-
const Square = createLucideIcon("square", __iconNode$4);
|
|
881
|
-
|
|
882
|
-
/**
|
|
883
|
-
* @license lucide-react v1.28.0 - ISC
|
|
884
|
-
*
|
|
885
|
-
* This source code is licensed under the ISC license.
|
|
886
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
887
|
-
*/
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
const __iconNode$3 = [
|
|
891
|
-
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
892
|
-
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
893
|
-
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
894
|
-
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
895
|
-
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
896
|
-
];
|
|
897
|
-
const Trash2 = createLucideIcon("trash-2", __iconNode$3);
|
|
898
|
-
|
|
899
|
-
/**
|
|
900
|
-
* @license lucide-react v1.28.0 - ISC
|
|
901
|
-
*
|
|
902
|
-
* This source code is licensed under the ISC license.
|
|
903
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
904
|
-
*/
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
const __iconNode$2 = [
|
|
908
|
-
[
|
|
909
|
-
"path",
|
|
910
|
-
{
|
|
911
|
-
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
912
|
-
key: "wmoenq"
|
|
913
|
-
}
|
|
914
|
-
],
|
|
915
|
-
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
916
|
-
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
917
|
-
];
|
|
918
|
-
const TriangleAlert = createLucideIcon("triangle-alert", __iconNode$2);
|
|
919
|
-
|
|
920
|
-
/**
|
|
921
|
-
* @license lucide-react v1.28.0 - ISC
|
|
922
|
-
*
|
|
923
|
-
* This source code is licensed under the ISC license.
|
|
924
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
925
|
-
*/
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
const __iconNode$1 = [
|
|
929
|
-
["path", { d: "M12 20h.01", key: "zekei9" }],
|
|
930
|
-
["path", { d: "M8.5 16.429a5 5 0 0 1 7 0", key: "1bycff" }],
|
|
931
|
-
["path", { d: "M5 12.859a10 10 0 0 1 5.17-2.69", key: "1dl1wf" }],
|
|
932
|
-
["path", { d: "M19 12.859a10 10 0 0 0-2.007-1.523", key: "4k23kn" }],
|
|
933
|
-
["path", { d: "M2 8.82a15 15 0 0 1 4.177-2.643", key: "1grhjp" }],
|
|
934
|
-
["path", { d: "M22 8.82a15 15 0 0 0-11.288-3.764", key: "z3jwby" }],
|
|
935
|
-
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
936
|
-
];
|
|
937
|
-
const WifiOff = createLucideIcon("wifi-off", __iconNode$1);
|
|
938
|
-
|
|
939
|
-
/**
|
|
940
|
-
* @license lucide-react v1.28.0 - ISC
|
|
941
|
-
*
|
|
942
|
-
* This source code is licensed under the ISC license.
|
|
943
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
944
|
-
*/
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
const __iconNode = [
|
|
948
|
-
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
949
|
-
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
950
|
-
];
|
|
951
|
-
const X = createLucideIcon("x", __iconNode);
|
|
952
|
-
|
|
953
474
|
const neutralSmallShadow = `${designSystemTokens.shadows.neutral.small.x}px ${designSystemTokens.shadows.neutral.small.y}px ${designSystemTokens.shadows.neutral.small.blur}px ${designSystemTokens.shadows.neutral.small.spread}px ${designSystemTokens.shadows.neutral.small.shadow}`;
|
|
475
|
+
// semanticColors.status[intent] is read dynamically below, so the phase-2
|
|
476
|
+
// token restructure's codemod (driven from literal TOKEN_MAP paths) cannot
|
|
477
|
+
// reach these group references or the .default/.dark/.light/.transparent
|
|
478
|
+
// reads on `palette` — fixed by hand, mirroring ModStatusCell/Dot. See
|
|
479
|
+
// docs/superpowers/plans/2026-08-05-semantic-restructure.md
|
|
480
|
+
// "Dynamic access — the codemod cannot see these".
|
|
954
481
|
const intentColors$1 = {
|
|
955
|
-
success: designSystemTokens.semanticColors.status.success,
|
|
956
|
-
error: designSystemTokens.semanticColors.status.error,
|
|
957
|
-
warning: designSystemTokens.semanticColors.status.warning,
|
|
958
|
-
offline: designSystemTokens.semanticColors.status.neutral,
|
|
959
|
-
info: designSystemTokens.semanticColors.status.info,
|
|
482
|
+
success: designSystemTokens.semanticColors.color.status.success,
|
|
483
|
+
error: designSystemTokens.semanticColors.color.status.error,
|
|
484
|
+
warning: designSystemTokens.semanticColors.color.status.warning,
|
|
485
|
+
offline: designSystemTokens.semanticColors.color.status.neutral,
|
|
486
|
+
info: designSystemTokens.semanticColors.color.status.info,
|
|
960
487
|
};
|
|
961
488
|
// biome-ignore lint/suspicious/noExplicitAny: Type cast required to override MUI Alert variant type without global augmentation
|
|
962
489
|
const StyledAlert$2 = styles.styled(Alert, {
|
|
@@ -965,10 +492,10 @@ const StyledAlert$2 = styles.styled(Alert, {
|
|
|
965
492
|
const palette = intentColors$1[intent];
|
|
966
493
|
const isFilled = alertType === 'filled';
|
|
967
494
|
const isCompact = alertSize === 'compact';
|
|
968
|
-
const iconColor = isFilled ? designSystemTokens.semanticColors.
|
|
495
|
+
const iconColor = isFilled ? designSystemTokens.semanticColors.color.text.tooltip : palette.solid;
|
|
969
496
|
const messageColor = isFilled
|
|
970
|
-
? designSystemTokens.semanticColors.
|
|
971
|
-
: designSystemTokens.semanticColors.
|
|
497
|
+
? designSystemTokens.semanticColors.color.text.tooltip
|
|
498
|
+
: designSystemTokens.semanticColors.color.text.primary;
|
|
972
499
|
return {
|
|
973
500
|
...(isCompact
|
|
974
501
|
? { minHeight: designSystemTokens.spacing.spacing_5 }
|
|
@@ -985,9 +512,9 @@ const StyledAlert$2 = styles.styled(Alert, {
|
|
|
985
512
|
padding: hasChildren
|
|
986
513
|
? `${designSystemTokens.spacing.spacing_1_1_2}px ${designSystemTokens.spacing.spacing_2}px`
|
|
987
514
|
: `0 ${designSystemTokens.spacing.spacing_2}px`,
|
|
988
|
-
backgroundColor: isFilled ? palette.
|
|
989
|
-
border: isFilled ? 'none' : `1px solid ${palette.
|
|
990
|
-
color: isFilled ? designSystemTokens.semanticColors.
|
|
515
|
+
backgroundColor: isFilled ? palette.fg : palette.bg,
|
|
516
|
+
border: isFilled ? 'none' : `1px solid ${palette.tint}`,
|
|
517
|
+
color: isFilled ? designSystemTokens.semanticColors.color.text.tooltip : designSystemTokens.semanticColors.color.text.primary,
|
|
991
518
|
boxShadow: isFilled ? neutralSmallShadow : undefined,
|
|
992
519
|
[`& .${Alert.alertClasses.icon}`]: {
|
|
993
520
|
color: iconColor,
|
|
@@ -1005,9 +532,7 @@ const StyledAlert$2 = styles.styled(Alert, {
|
|
|
1005
532
|
'& span:last-child': {
|
|
1006
533
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.sm),
|
|
1007
534
|
fontWeight: designSystemTokens.typography.fontWeight.medium,
|
|
1008
|
-
color: isFilled
|
|
1009
|
-
? designSystemTokens.semanticColors.typography.tooltip.default
|
|
1010
|
-
: designSystemTokens.semanticColors.typography.bodySecondary,
|
|
535
|
+
color: isFilled ? designSystemTokens.semanticColors.color.text.tooltip : designSystemTokens.semanticColors.color.text.secondary,
|
|
1011
536
|
lineHeight: 1.4,
|
|
1012
537
|
},
|
|
1013
538
|
},
|
|
@@ -1015,18 +540,18 @@ const StyledAlert$2 = styles.styled(Alert, {
|
|
|
1015
540
|
padding: 0,
|
|
1016
541
|
marginRight: 0,
|
|
1017
542
|
...(isFilled && {
|
|
1018
|
-
color: designSystemTokens.semanticColors.
|
|
543
|
+
color: designSystemTokens.semanticColors.color.text.tooltip,
|
|
1019
544
|
[`& .${ButtonBase.buttonBaseClasses.root}`]: { color: 'inherit' },
|
|
1020
545
|
}),
|
|
1021
546
|
},
|
|
1022
547
|
};
|
|
1023
548
|
});
|
|
1024
549
|
const iconMap = {
|
|
1025
|
-
success: jsxRuntime.jsx(CircleCheckBig, { size: 24 }),
|
|
1026
|
-
error: jsxRuntime.jsx(CircleAlert, { size: 24 }),
|
|
1027
|
-
warning: jsxRuntime.jsx(TriangleAlert, { size: 24 }),
|
|
1028
|
-
offline: jsxRuntime.jsx(WifiOff, { size: 24 }),
|
|
1029
|
-
info: jsxRuntime.jsx(BadgeInfo, { size: 24 }),
|
|
550
|
+
success: jsxRuntime.jsx(lucideReact.CircleCheckBig, { size: 24 }),
|
|
551
|
+
error: jsxRuntime.jsx(lucideReact.CircleAlert, { size: 24 }),
|
|
552
|
+
warning: jsxRuntime.jsx(lucideReact.TriangleAlert, { size: 24 }),
|
|
553
|
+
offline: jsxRuntime.jsx(lucideReact.WifiOff, { size: 24 }),
|
|
554
|
+
info: jsxRuntime.jsx(lucideReact.BadgeInfo, { size: 24 }),
|
|
1030
555
|
};
|
|
1031
556
|
/**
|
|
1032
557
|
* ModAlert - Alert component for displaying contextual status messages
|
|
@@ -1037,12 +562,18 @@ const ModAlert = ({ intent = 'success', type = 'outlined', size = 'default', tit
|
|
|
1037
562
|
};
|
|
1038
563
|
ModAlert.displayName = 'ModAlert';
|
|
1039
564
|
|
|
565
|
+
// semanticColors.status[intent] is read dynamically below, so the phase-2
|
|
566
|
+
// token restructure's codemod (driven from literal TOKEN_MAP paths) cannot
|
|
567
|
+
// reach these group references or the .default/.dark/.light reads on
|
|
568
|
+
// `palette` — fixed by hand, mirroring ModStatusCell/Dot. See
|
|
569
|
+
// docs/superpowers/plans/2026-08-05-semantic-restructure.md
|
|
570
|
+
// "Dynamic access — the codemod cannot see these".
|
|
1040
571
|
const intentColors = {
|
|
1041
|
-
info: designSystemTokens.semanticColors.status.info,
|
|
1042
|
-
success: designSystemTokens.semanticColors.status.success,
|
|
1043
|
-
error: designSystemTokens.semanticColors.status.error,
|
|
1044
|
-
warning: designSystemTokens.semanticColors.status.warning,
|
|
1045
|
-
neutral: designSystemTokens.semanticColors.status.neutral,
|
|
572
|
+
info: designSystemTokens.semanticColors.color.status.info,
|
|
573
|
+
success: designSystemTokens.semanticColors.color.status.success,
|
|
574
|
+
error: designSystemTokens.semanticColors.color.status.error,
|
|
575
|
+
warning: designSystemTokens.semanticColors.color.status.warning,
|
|
576
|
+
neutral: designSystemTokens.semanticColors.color.status.neutral,
|
|
1046
577
|
};
|
|
1047
578
|
// biome-ignore lint/suspicious/noExplicitAny: Type cast required to override MUI Alert variant type without global augmentation
|
|
1048
579
|
const StyledAlert$1 = styles.styled(Alert, {
|
|
@@ -1051,12 +582,12 @@ const StyledAlert$1 = styles.styled(Alert, {
|
|
|
1051
582
|
const palette = intentColors[intent];
|
|
1052
583
|
const typeStyles = bannerType === 'filled'
|
|
1053
584
|
? {
|
|
1054
|
-
backgroundColor: palette.
|
|
1055
|
-
color: designSystemTokens.semanticColors.
|
|
585
|
+
backgroundColor: palette.fg,
|
|
586
|
+
color: designSystemTokens.semanticColors.color.surface.raised,
|
|
1056
587
|
}
|
|
1057
588
|
: {
|
|
1058
|
-
backgroundColor: palette.
|
|
1059
|
-
color: designSystemTokens.semanticColors.
|
|
589
|
+
backgroundColor: palette.bg,
|
|
590
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
1060
591
|
};
|
|
1061
592
|
return {
|
|
1062
593
|
width: '100%',
|
|
@@ -1105,8 +636,8 @@ const LinkText = styles.styled('span')(({ bannerType = 'outlined' }) => ({
|
|
|
1105
636
|
marginLeft: 'auto',
|
|
1106
637
|
fontWeight: designSystemTokens.typography.fontWeight.semiBold,
|
|
1107
638
|
color: bannerType === 'filled'
|
|
1108
|
-
? designSystemTokens.semanticColors.
|
|
1109
|
-
: designSystemTokens.semanticColors.
|
|
639
|
+
? designSystemTokens.semanticColors.color.text.linkOnBrand
|
|
640
|
+
: designSystemTokens.semanticColors.color.text.link,
|
|
1110
641
|
cursor: 'pointer',
|
|
1111
642
|
whiteSpace: 'nowrap',
|
|
1112
643
|
'&:hover': {
|
|
@@ -1133,15 +664,15 @@ const ModBanner = ({ intent = 'info', type = 'outlined', message, messagePositio
|
|
|
1133
664
|
if (dismissed) {
|
|
1134
665
|
return null;
|
|
1135
666
|
}
|
|
1136
|
-
const closeIconColor = type === 'filled' ? designSystemTokens.semanticColors.
|
|
1137
|
-
return (jsxRuntime.jsx(StyledAlert$1, { ...props, intent: intent, bannerType: type, messagePosition: messagePosition, icon: messagePosition === 'left' ? icon || false : false, action: showClose ? (jsxRuntime.jsx(StyledIconButton, { size: "small", onClick: handleClose, closeIconColor: closeIconColor, children: jsxRuntime.jsx(X, { size: 16 }) })) : undefined, children: messagePosition === 'center' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [icon, jsxRuntime.jsx("span", { children: message }), linkText && (jsxRuntime.jsx(LinkText, { bannerType: type, onClick: onLinkClick, children: linkText }))] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { children: message }), linkText && (jsxRuntime.jsx(LinkText, { bannerType: type, onClick: onLinkClick, children: linkText }))] })) }));
|
|
667
|
+
const closeIconColor = type === 'filled' ? designSystemTokens.semanticColors.color.surface.raised : intentColors[intent].solid;
|
|
668
|
+
return (jsxRuntime.jsx(StyledAlert$1, { ...props, intent: intent, bannerType: type, messagePosition: messagePosition, icon: messagePosition === 'left' ? icon || false : false, action: showClose ? (jsxRuntime.jsx(StyledIconButton, { size: "small", onClick: handleClose, closeIconColor: closeIconColor, children: jsxRuntime.jsx(lucideReact.X, { size: 16 }) })) : undefined, children: messagePosition === 'center' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [icon, jsxRuntime.jsx("span", { children: message }), linkText && (jsxRuntime.jsx(LinkText, { bannerType: type, onClick: onLinkClick, children: linkText }))] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { children: message }), linkText && (jsxRuntime.jsx(LinkText, { bannerType: type, onClick: onLinkClick, children: linkText }))] })) }));
|
|
1138
669
|
};
|
|
1139
670
|
ModBanner.displayName = 'ModBanner';
|
|
1140
671
|
|
|
1141
672
|
const StyledBreadcrumbs = styles.styled(Breadcrumbs)(() => ({
|
|
1142
673
|
[`& .${Breadcrumbs.breadcrumbsClasses.separator}`]: {
|
|
1143
674
|
margin: 0,
|
|
1144
|
-
color: designSystemTokens.semanticColors.
|
|
675
|
+
color: designSystemTokens.semanticColors.color.icon.utility,
|
|
1145
676
|
},
|
|
1146
677
|
[`& .${Breadcrumbs.breadcrumbsClasses.ol}`]: {
|
|
1147
678
|
gap: designSystemTokens.spacing.spacing_1,
|
|
@@ -1154,15 +685,15 @@ const StyledBreadcrumbLink = styles.styled(Link, {
|
|
|
1154
685
|
fontWeight: designSystemTokens.typography.fontWeight.medium,
|
|
1155
686
|
lineHeight: 1,
|
|
1156
687
|
textDecoration: 'none',
|
|
1157
|
-
color: current ? designSystemTokens.semanticColors.
|
|
688
|
+
color: current ? designSystemTokens.semanticColors.color.text.secondary : designSystemTokens.semanticColors.color.text.link,
|
|
1158
689
|
cursor: current ? 'default' : 'pointer',
|
|
1159
690
|
borderRadius: designSystemTokens.borderRadius.xS,
|
|
1160
691
|
transition: 'color 0.2s ease-in-out',
|
|
1161
692
|
'&:hover': {
|
|
1162
|
-
color: current ? designSystemTokens.semanticColors.
|
|
693
|
+
color: current ? designSystemTokens.semanticColors.color.icon.hover : designSystemTokens.semanticColors.button.tertiary.fgHover,
|
|
1163
694
|
},
|
|
1164
695
|
'&:focus-visible': {
|
|
1165
|
-
outline: `2px solid ${designSystemTokens.semanticColors.border.focus}`,
|
|
696
|
+
outline: `2px solid ${designSystemTokens.semanticColors.color.border.focus}`,
|
|
1166
697
|
outlineOffset: 2,
|
|
1167
698
|
},
|
|
1168
699
|
}));
|
|
@@ -1200,7 +731,7 @@ function ModBreadcrumbLink({ current = false, children, component, ...props }) {
|
|
|
1200
731
|
* ```
|
|
1201
732
|
*/
|
|
1202
733
|
function ModBreadcrumbs({ children, className }) {
|
|
1203
|
-
return (jsxRuntime.jsx(StyledBreadcrumbs, { separator: jsxRuntime.jsx(ChevronRight, { size: 10.67, color: designSystemTokens.semanticColors.
|
|
734
|
+
return (jsxRuntime.jsx(StyledBreadcrumbs, { separator: jsxRuntime.jsx(lucideReact.ChevronRight, { size: 10.67, color: designSystemTokens.semanticColors.color.icon.utility }), className: className, "aria-label": "breadcrumb", children: children }));
|
|
1204
735
|
}
|
|
1205
736
|
|
|
1206
737
|
// Props that should not be forwarded to ButtonBase (Button-specific props that ButtonBase doesn't support)
|
|
@@ -1252,90 +783,90 @@ const StyledButtonBase$1 = styles.styled(ButtonBase, {
|
|
|
1252
783
|
},
|
|
1253
784
|
// Focus visible for keyboard navigation
|
|
1254
785
|
[`&.${ButtonBase.buttonBaseClasses.focusVisible}`]: {
|
|
1255
|
-
outline: `2px solid ${designSystemTokens.semanticColors.border.focus}`,
|
|
786
|
+
outline: `2px solid ${designSystemTokens.semanticColors.color.border.focus}`,
|
|
1256
787
|
outlineOffset: 2,
|
|
1257
788
|
},
|
|
1258
789
|
};
|
|
1259
790
|
// Variant-specific styles
|
|
1260
791
|
const variantStyles = {
|
|
1261
792
|
primary: {
|
|
1262
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
1263
|
-
color: designSystemTokens.semanticColors.
|
|
793
|
+
backgroundColor: designSystemTokens.semanticColors.button.primary.bg,
|
|
794
|
+
color: designSystemTokens.semanticColors.color.surface.raised,
|
|
1264
795
|
border: 'none',
|
|
1265
796
|
'&:hover': {
|
|
1266
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
797
|
+
backgroundColor: designSystemTokens.semanticColors.button.primary.bgHover,
|
|
1267
798
|
},
|
|
1268
799
|
'&:active': {
|
|
1269
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
800
|
+
backgroundColor: designSystemTokens.semanticColors.button.primary.bgPressed,
|
|
1270
801
|
},
|
|
1271
802
|
...(loading
|
|
1272
803
|
? {}
|
|
1273
804
|
: {
|
|
1274
805
|
[`&.${ButtonBase.buttonBaseClasses.disabled}`]: {
|
|
1275
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
1276
|
-
color: designSystemTokens.semanticColors.
|
|
806
|
+
backgroundColor: designSystemTokens.semanticColors.button.primary.bgDisabled,
|
|
807
|
+
color: designSystemTokens.semanticColors.button.fgDisabled,
|
|
1277
808
|
},
|
|
1278
809
|
}),
|
|
1279
810
|
},
|
|
1280
811
|
secondary: {
|
|
1281
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
1282
|
-
color: designSystemTokens.semanticColors.
|
|
1283
|
-
border: `1px solid ${designSystemTokens.semanticColors.
|
|
812
|
+
backgroundColor: designSystemTokens.semanticColors.button.secondary.bg,
|
|
813
|
+
color: designSystemTokens.semanticColors.button.secondary.fg,
|
|
814
|
+
border: `1px solid ${designSystemTokens.semanticColors.button.secondary.border}`,
|
|
1284
815
|
'&:hover': {
|
|
1285
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
816
|
+
backgroundColor: designSystemTokens.semanticColors.button.secondary.bgHover,
|
|
1286
817
|
},
|
|
1287
818
|
'&:active': {
|
|
1288
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
819
|
+
backgroundColor: designSystemTokens.semanticColors.button.secondary.bgPressed,
|
|
1289
820
|
},
|
|
1290
821
|
...(loading
|
|
1291
822
|
? {}
|
|
1292
823
|
: {
|
|
1293
824
|
[`&.${ButtonBase.buttonBaseClasses.disabled}`]: {
|
|
1294
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
1295
|
-
borderColor: designSystemTokens.semanticColors.border.
|
|
1296
|
-
color: designSystemTokens.semanticColors.
|
|
825
|
+
backgroundColor: designSystemTokens.semanticColors.button.secondary.bgDisabled,
|
|
826
|
+
borderColor: designSystemTokens.semanticColors.color.border.primary,
|
|
827
|
+
color: designSystemTokens.semanticColors.button.fgDisabled,
|
|
1297
828
|
},
|
|
1298
829
|
}),
|
|
1299
830
|
},
|
|
1300
831
|
destructive: {
|
|
1301
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
1302
|
-
color: designSystemTokens.semanticColors.
|
|
832
|
+
backgroundColor: designSystemTokens.semanticColors.button.destructive.bg,
|
|
833
|
+
color: designSystemTokens.semanticColors.color.surface.raised,
|
|
1303
834
|
border: 'none',
|
|
1304
835
|
'&:hover': {
|
|
1305
|
-
backgroundColor: designSystemTokens.semanticColors.status.error.
|
|
836
|
+
backgroundColor: designSystemTokens.semanticColors.color.status.error.fg,
|
|
1306
837
|
},
|
|
1307
838
|
'&:active': {
|
|
1308
|
-
backgroundColor: designSystemTokens.semanticColors.status.error.
|
|
839
|
+
backgroundColor: designSystemTokens.semanticColors.color.status.error.fg,
|
|
1309
840
|
filter: 'brightness(0.9)',
|
|
1310
841
|
},
|
|
1311
842
|
...(loading
|
|
1312
843
|
? {}
|
|
1313
844
|
: {
|
|
1314
845
|
[`&.${ButtonBase.buttonBaseClasses.disabled}`]: {
|
|
1315
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
1316
|
-
color: designSystemTokens.semanticColors.
|
|
846
|
+
backgroundColor: designSystemTokens.semanticColors.button.primary.bgDisabled,
|
|
847
|
+
color: designSystemTokens.semanticColors.button.fgDisabled,
|
|
1317
848
|
},
|
|
1318
849
|
}),
|
|
1319
850
|
},
|
|
1320
851
|
tertiary: {
|
|
1321
852
|
backgroundColor: 'transparent',
|
|
1322
|
-
color: designSystemTokens.semanticColors.
|
|
853
|
+
color: designSystemTokens.semanticColors.color.text.input,
|
|
1323
854
|
border: 'none',
|
|
1324
855
|
padding: 0,
|
|
1325
856
|
lineHeight: 1,
|
|
1326
857
|
'&:hover': {
|
|
1327
858
|
backgroundColor: 'transparent',
|
|
1328
|
-
color: designSystemTokens.semanticColors.
|
|
859
|
+
color: designSystemTokens.semanticColors.button.tertiary.fgHover,
|
|
1329
860
|
},
|
|
1330
861
|
'&:active': {
|
|
1331
|
-
color: designSystemTokens.semanticColors.
|
|
862
|
+
color: designSystemTokens.semanticColors.button.tertiary.fgPressed,
|
|
1332
863
|
},
|
|
1333
864
|
...(loading
|
|
1334
865
|
? {}
|
|
1335
866
|
: {
|
|
1336
867
|
[`&.${ButtonBase.buttonBaseClasses.disabled}`]: {
|
|
1337
868
|
backgroundColor: 'transparent',
|
|
1338
|
-
color: designSystemTokens.semanticColors.
|
|
869
|
+
color: designSystemTokens.semanticColors.button.tertiary.fgDisabled,
|
|
1339
870
|
},
|
|
1340
871
|
}),
|
|
1341
872
|
},
|
|
@@ -1350,10 +881,10 @@ const LoadingSpinner = styles.styled(CircularProgress, {
|
|
|
1350
881
|
})(({ $variant }) => {
|
|
1351
882
|
// Use appropriate spinner color for each variant to ensure visibility
|
|
1352
883
|
const spinnerColors = {
|
|
1353
|
-
primary: designSystemTokens.semanticColors.
|
|
1354
|
-
secondary: designSystemTokens.semanticColors.
|
|
1355
|
-
destructive: designSystemTokens.semanticColors.
|
|
1356
|
-
tertiary: designSystemTokens.semanticColors.
|
|
884
|
+
primary: designSystemTokens.semanticColors.color.surface.raised,
|
|
885
|
+
secondary: designSystemTokens.semanticColors.button.primary.bg,
|
|
886
|
+
destructive: designSystemTokens.semanticColors.color.surface.raised,
|
|
887
|
+
tertiary: designSystemTokens.semanticColors.button.tertiary.fg,
|
|
1357
888
|
};
|
|
1358
889
|
return {
|
|
1359
890
|
color: spinnerColors[$variant],
|
|
@@ -1371,7 +902,7 @@ const StyledButtonTab = styles.styled(MuiToggleButton)(({ theme }) => ({
|
|
|
1371
902
|
fontFamily: designSystemTokens.typography.fontFamily.body,
|
|
1372
903
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.sm),
|
|
1373
904
|
lineHeight: 1,
|
|
1374
|
-
color: designSystemTokens.semanticColors.
|
|
905
|
+
color: designSystemTokens.semanticColors.color.text.tabInactive,
|
|
1375
906
|
backgroundColor: 'transparent',
|
|
1376
907
|
border: 'none',
|
|
1377
908
|
padding: `${designSystemTokens.spacing.spacing_1}px ${designSystemTokens.spacing.spacing_1_1_2}px`,
|
|
@@ -1381,15 +912,15 @@ const StyledButtonTab = styles.styled(MuiToggleButton)(({ theme }) => ({
|
|
|
1381
912
|
duration: theme.transitions.duration.short,
|
|
1382
913
|
}),
|
|
1383
914
|
'&:hover': {
|
|
1384
|
-
color: designSystemTokens.semanticColors.
|
|
915
|
+
color: designSystemTokens.semanticColors.color.text.tabActive,
|
|
1385
916
|
},
|
|
1386
917
|
'&.Mui-focusVisible': {
|
|
1387
|
-
outline: `2px solid ${designSystemTokens.semanticColors.border.focus}`,
|
|
918
|
+
outline: `2px solid ${designSystemTokens.semanticColors.color.border.focus}`,
|
|
1388
919
|
outlineOffset: -2,
|
|
1389
920
|
borderRadius: designSystemTokens.borderRadius.xXS,
|
|
1390
921
|
},
|
|
1391
922
|
'&.Mui-disabled': {
|
|
1392
|
-
color: designSystemTokens.semanticColors.
|
|
923
|
+
color: designSystemTokens.semanticColors.button.fgDisabled,
|
|
1393
924
|
cursor: 'default',
|
|
1394
925
|
pointerEvents: 'none',
|
|
1395
926
|
},
|
|
@@ -1451,7 +982,7 @@ const StyledButtonTabGroup = styles.styled(MuiToggleButtonGroup)(({ theme, size
|
|
|
1451
982
|
};
|
|
1452
983
|
return {
|
|
1453
984
|
borderRadius: designSystemTokens.borderRadius.button,
|
|
1454
|
-
border: `1px solid ${designSystemTokens.semanticColors.border.primary}`,
|
|
985
|
+
border: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
1455
986
|
overflow: 'hidden',
|
|
1456
987
|
// Style all grouped children
|
|
1457
988
|
[`& .${MuiToggleButtonGroup.toggleButtonGroupClasses.grouped}`]: {
|
|
@@ -1464,26 +995,26 @@ const StyledButtonTabGroup = styles.styled(MuiToggleButtonGroup)(({ theme, size
|
|
|
1464
995
|
lineHeight: 1,
|
|
1465
996
|
textTransform: 'none',
|
|
1466
997
|
border: 'none',
|
|
1467
|
-
borderRight: `1px solid ${designSystemTokens.semanticColors.border.primary}`,
|
|
998
|
+
borderRight: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
1468
999
|
borderRadius: 0,
|
|
1469
|
-
color: designSystemTokens.semanticColors.
|
|
1470
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
1000
|
+
color: designSystemTokens.semanticColors.color.text.tabInactive,
|
|
1001
|
+
backgroundColor: designSystemTokens.semanticColors.button.secondary.bgDisabled,
|
|
1471
1002
|
transition: theme.transitions.create(['background-color', 'color', 'border-color'], {
|
|
1472
1003
|
duration: theme.transitions.duration.short,
|
|
1473
1004
|
}),
|
|
1474
1005
|
// Selected state — double selector for specificity over MUI ToggleButton defaults
|
|
1475
1006
|
[`&.${MuiToggleButton.toggleButtonClasses.selected}.${MuiToggleButton.toggleButtonClasses.selected}`]: {
|
|
1476
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
1477
|
-
color: designSystemTokens.semanticColors.
|
|
1007
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
1008
|
+
color: designSystemTokens.semanticColors.button.tertiary.fg,
|
|
1478
1009
|
fontWeight: designSystemTokens.typography.fontWeight.semiBold,
|
|
1479
1010
|
},
|
|
1480
1011
|
// Hover state
|
|
1481
1012
|
[`&:hover, &.${MuiToggleButton.toggleButtonClasses.selected}:hover`]: {
|
|
1482
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
1013
|
+
backgroundColor: designSystemTokens.semanticColors.button.secondary.bgHover,
|
|
1483
1014
|
},
|
|
1484
1015
|
// Focus visible for keyboard navigation
|
|
1485
1016
|
'&.Mui-focusVisible': {
|
|
1486
|
-
outline: `2px solid ${designSystemTokens.semanticColors.border.focus}`,
|
|
1017
|
+
outline: `2px solid ${designSystemTokens.semanticColors.color.border.focus}`,
|
|
1487
1018
|
outlineOffset: -2,
|
|
1488
1019
|
zIndex: 1,
|
|
1489
1020
|
},
|
|
@@ -1500,8 +1031,8 @@ const StyledButtonTabGroup = styles.styled(MuiToggleButtonGroup)(({ theme, size
|
|
|
1500
1031
|
},
|
|
1501
1032
|
// Disabled state
|
|
1502
1033
|
[`&.${MuiToggleButton.toggleButtonClasses.disabled}`]: {
|
|
1503
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
1504
|
-
color: designSystemTokens.semanticColors.
|
|
1034
|
+
backgroundColor: designSystemTokens.semanticColors.button.secondary.bgDisabled,
|
|
1035
|
+
color: designSystemTokens.semanticColors.button.fgDisabled,
|
|
1505
1036
|
cursor: 'not-allowed',
|
|
1506
1037
|
pointerEvents: 'auto',
|
|
1507
1038
|
},
|
|
@@ -1546,18 +1077,18 @@ const SmallStyledCard = styles.styled(MuiCard, {
|
|
|
1546
1077
|
display: 'flex',
|
|
1547
1078
|
flexDirection: 'column',
|
|
1548
1079
|
gap: designSystemTokens.spacing.spacing_2, // 16px
|
|
1549
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
1550
|
-
border: `1px solid ${selected ? designSystemTokens.semanticColors.
|
|
1080
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
1081
|
+
border: `1px solid ${selected ? designSystemTokens.semanticColors.button.primary.bg : designSystemTokens.semanticColors.color.border.primary}`,
|
|
1551
1082
|
borderRadius: designSystemTokens.borderRadius.card,
|
|
1552
1083
|
boxShadow: selected ? activeShadow : 'none',
|
|
1553
1084
|
transition: theme.transitions.create(['border-color', 'background-color', 'box-shadow']),
|
|
1554
1085
|
cursor: 'pointer',
|
|
1555
1086
|
'&:hover': {
|
|
1556
|
-
borderColor: designSystemTokens.semanticColors.
|
|
1087
|
+
borderColor: designSystemTokens.semanticColors.button.primary.bg,
|
|
1557
1088
|
boxShadow: activeShadow,
|
|
1558
1089
|
},
|
|
1559
1090
|
'&:focus-visible': {
|
|
1560
|
-
borderColor: designSystemTokens.semanticColors.
|
|
1091
|
+
borderColor: designSystemTokens.semanticColors.button.primary.bg,
|
|
1561
1092
|
...focusRingStyles,
|
|
1562
1093
|
},
|
|
1563
1094
|
...(disabled && {
|
|
@@ -1582,7 +1113,7 @@ const SmallRecipeCount = styles.styled('p')(({ theme }) => ({
|
|
|
1582
1113
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.xxs), // 10px
|
|
1583
1114
|
fontWeight: designSystemTokens.typography.fontWeight.semiBold, // 600
|
|
1584
1115
|
lineHeight: 1.2,
|
|
1585
|
-
color: designSystemTokens.semanticColors.
|
|
1116
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
1586
1117
|
whiteSpace: 'nowrap',
|
|
1587
1118
|
}));
|
|
1588
1119
|
const SmallCardContent = styles.styled('div')(() => ({
|
|
@@ -1596,7 +1127,7 @@ const SmallTitle = styles.styled('p')(({ theme }) => ({
|
|
|
1596
1127
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.h6), // 16px
|
|
1597
1128
|
fontWeight: designSystemTokens.typography.fontWeight.semiBold, // 600
|
|
1598
1129
|
lineHeight: 1.4,
|
|
1599
|
-
color: designSystemTokens.semanticColors.
|
|
1130
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
1600
1131
|
width: '100%',
|
|
1601
1132
|
}));
|
|
1602
1133
|
const SmallDescription = styles.styled('p')(({ theme }) => ({
|
|
@@ -1604,7 +1135,7 @@ const SmallDescription = styles.styled('p')(({ theme }) => ({
|
|
|
1604
1135
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.xs), // 12px
|
|
1605
1136
|
fontWeight: designSystemTokens.typography.fontWeight.regular, // 400
|
|
1606
1137
|
lineHeight: 1.5,
|
|
1607
|
-
color: designSystemTokens.semanticColors.
|
|
1138
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
1608
1139
|
width: '100%',
|
|
1609
1140
|
display: '-webkit-box',
|
|
1610
1141
|
WebkitLineClamp: 2,
|
|
@@ -1621,12 +1152,10 @@ const LargeStyledCard = styles.styled(MuiCard, {
|
|
|
1621
1152
|
// sourcing one side from `semanticColors` (which flips) and the other from a
|
|
1622
1153
|
// primitive (which doesn't) puts light-mode text on a dark surface in dark
|
|
1623
1154
|
// mode. `semanticColorsDark` is the literal-hex escape hatch for exactly this.
|
|
1624
|
-
const activeBorderColor = isLight
|
|
1625
|
-
? designSystemTokens.semanticColors.buttons.primary.default
|
|
1626
|
-
: designSystemTokens.colors.digitalGreen[300];
|
|
1155
|
+
const activeBorderColor = isLight ? designSystemTokens.semanticColors.button.primary.bg : designSystemTokens.colors.digitalGreen[300];
|
|
1627
1156
|
const defaultBorderColor = isLight
|
|
1628
|
-
? designSystemTokens.semanticColors.border.primary
|
|
1629
|
-
: designSystemTokens.semanticColorsDark.border.primary;
|
|
1157
|
+
? designSystemTokens.semanticColors.color.border.primary
|
|
1158
|
+
: designSystemTokens.semanticColorsDark.color.border.primary;
|
|
1630
1159
|
return {
|
|
1631
1160
|
width: 340,
|
|
1632
1161
|
height: 162,
|
|
@@ -1636,7 +1165,9 @@ const LargeStyledCard = styles.styled(MuiCard, {
|
|
|
1636
1165
|
alignItems: 'flex-start',
|
|
1637
1166
|
padding: designSystemTokens.spacing.spacing_2,
|
|
1638
1167
|
borderRadius: designSystemTokens.borderRadius.card,
|
|
1639
|
-
backgroundColor: isLight
|
|
1168
|
+
backgroundColor: isLight
|
|
1169
|
+
? designSystemTokens.semanticColors.color.surface.raised
|
|
1170
|
+
: designSystemTokens.semanticColorsDark.color.surface.raised,
|
|
1640
1171
|
border: `1px solid ${defaultBorderColor}`,
|
|
1641
1172
|
boxShadow: 'none',
|
|
1642
1173
|
overflow: 'hidden',
|
|
@@ -1691,7 +1222,9 @@ const LargeHeaderTitle = styles.styled('span', {
|
|
|
1691
1222
|
fontWeight: designSystemTokens.typography.fontWeight.semiBold,
|
|
1692
1223
|
fontSize: designSystemTokens.typography.fontSize.h6,
|
|
1693
1224
|
lineHeight: 1.4,
|
|
1694
|
-
color: cardTheme === 'light'
|
|
1225
|
+
color: cardTheme === 'light'
|
|
1226
|
+
? designSystemTokens.semanticColors.color.text.primary
|
|
1227
|
+
: designSystemTokens.semanticColorsDark.color.text.primary,
|
|
1695
1228
|
flexShrink: 0,
|
|
1696
1229
|
}));
|
|
1697
1230
|
const LargeDescription = styles.styled('p', {
|
|
@@ -1701,7 +1234,9 @@ const LargeDescription = styles.styled('p', {
|
|
|
1701
1234
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
1702
1235
|
fontSize: designSystemTokens.typography.fontSize.xs,
|
|
1703
1236
|
lineHeight: 1.5,
|
|
1704
|
-
color: cardTheme === 'light'
|
|
1237
|
+
color: cardTheme === 'light'
|
|
1238
|
+
? designSystemTokens.semanticColors.color.text.primary
|
|
1239
|
+
: designSystemTokens.semanticColorsDark.color.text.primary,
|
|
1705
1240
|
margin: 0,
|
|
1706
1241
|
minWidth: '100%',
|
|
1707
1242
|
wordWrap: 'break-word',
|
|
@@ -1750,7 +1285,7 @@ const Label$4 = styles.styled('span')(({ theme, size = 'medium' }) => ({
|
|
|
1750
1285
|
: designSystemTokens.typography.fontSize.default),
|
|
1751
1286
|
fontWeight: designSystemTokens.typography.fontWeight.medium,
|
|
1752
1287
|
lineHeight: size === 'xs' ? 1.5 : size === 'small' ? 1.4 : 1.5,
|
|
1753
|
-
color: designSystemTokens.semanticColors.
|
|
1288
|
+
color: designSystemTokens.semanticColors.color.text.input,
|
|
1754
1289
|
}));
|
|
1755
1290
|
const HelperText$2 = styles.styled('span')(({ theme, size = 'medium' }) => ({
|
|
1756
1291
|
fontSize: theme.typography.pxToRem(size === 'xs'
|
|
@@ -1760,7 +1295,7 @@ const HelperText$2 = styles.styled('span')(({ theme, size = 'medium' }) => ({
|
|
|
1760
1295
|
: designSystemTokens.typography.fontSize.default),
|
|
1761
1296
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
1762
1297
|
lineHeight: size === 'xs' ? 1.5 : size === 'small' ? 1.4 : 1.5,
|
|
1763
|
-
color: designSystemTokens.semanticColors.
|
|
1298
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
1764
1299
|
}));
|
|
1765
1300
|
// xs focus-ring radius — no matching design token (box corner comes from the icon)
|
|
1766
1301
|
const FIGMA_XS_BORDER_RADIUS = 1;
|
|
@@ -1788,7 +1323,7 @@ const StyledCheckbox = styles.styled(Checkbox, {
|
|
|
1788
1323
|
height: config.size,
|
|
1789
1324
|
padding: 0,
|
|
1790
1325
|
marginTop: size === 'xs' ? 3 : 2,
|
|
1791
|
-
color: designSystemTokens.semanticColors.border.strong,
|
|
1326
|
+
color: designSystemTokens.semanticColors.color.border.strong,
|
|
1792
1327
|
borderRadius: config.borderRadius,
|
|
1793
1328
|
flexShrink: 0,
|
|
1794
1329
|
// Suppress MUI's grey hover background
|
|
@@ -1814,11 +1349,11 @@ const StyledCheckbox = styles.styled(Checkbox, {
|
|
|
1814
1349
|
cursor: 'not-allowed',
|
|
1815
1350
|
},
|
|
1816
1351
|
[`&.${Checkbox.checkboxClasses.disabled}:not(.${Checkbox.checkboxClasses.checked}):not(.${Checkbox.checkboxClasses.indeterminate})`]: {
|
|
1817
|
-
color: designSystemTokens.semanticColors.border.primary,
|
|
1352
|
+
color: designSystemTokens.semanticColors.color.border.primary,
|
|
1818
1353
|
},
|
|
1819
1354
|
// Focus visible for keyboard navigation
|
|
1820
1355
|
'&.Mui-focusVisible': {
|
|
1821
|
-
outline: `2px solid ${designSystemTokens.semanticColors.border.focus}`,
|
|
1356
|
+
outline: `2px solid ${designSystemTokens.semanticColors.color.border.focus}`,
|
|
1822
1357
|
outlineOffset: 2,
|
|
1823
1358
|
borderRadius: config.borderRadius,
|
|
1824
1359
|
},
|
|
@@ -1862,18 +1397,11 @@ const StyledCheckbox = styles.styled(Checkbox, {
|
|
|
1862
1397
|
*/
|
|
1863
1398
|
const ModCheckbox = ({ size = 'medium', label, helperText, disabled, icon, checkedIcon, indeterminateIcon, className, ...props }) => {
|
|
1864
1399
|
// Identifies ModCheckbox instances to consumer stylesheets.
|
|
1865
|
-
|
|
1866
|
-
// `neo-checkbox` ships alongside for one major. Consumers select on these
|
|
1867
|
-
// names from their own CSS, where nothing type-checks the string — moderne-ui
|
|
1868
|
-
// has `'&:not(.neo-checkbox)'`, which on a bare rename would stop excluding
|
|
1869
|
-
// anything and silently start overriding every checkbox. Remove the legacy
|
|
1870
|
-
// name once consumers have migrated.
|
|
1871
|
-
const ownClassNames = 'mod-checkbox neo-checkbox';
|
|
1872
|
-
const combinedClassName = className ? `${ownClassNames} ${className}` : ownClassNames;
|
|
1400
|
+
const combinedClassName = className ? `mod-checkbox ${className}` : 'mod-checkbox';
|
|
1873
1401
|
// Default icons (sized via CSS on the SVG); overridable per instance
|
|
1874
|
-
const defaultIcon = icon || jsxRuntime.jsx(Square, {});
|
|
1875
|
-
const defaultCheckedIcon = checkedIcon || jsxRuntime.jsx(SquareCheck, {});
|
|
1876
|
-
const defaultIndeterminateIcon = indeterminateIcon || jsxRuntime.jsx(SquareMinus, {});
|
|
1402
|
+
const defaultIcon = icon || jsxRuntime.jsx(lucideReact.Square, {});
|
|
1403
|
+
const defaultCheckedIcon = checkedIcon || jsxRuntime.jsx(lucideReact.SquareCheck, {});
|
|
1404
|
+
const defaultIndeterminateIcon = indeterminateIcon || jsxRuntime.jsx(lucideReact.SquareMinus, {});
|
|
1877
1405
|
// If no label, return just the checkbox
|
|
1878
1406
|
if (!label && !helperText) {
|
|
1879
1407
|
return (jsxRuntime.jsx(StyledCheckbox, { size: size, disabled: disabled, icon: defaultIcon, checkedIcon: defaultCheckedIcon, indeterminateIcon: defaultIndeterminateIcon, className: combinedClassName, ...props }));
|
|
@@ -1952,20 +1480,20 @@ const StyledButtonBase = styles.styled(ButtonBase, {
|
|
|
1952
1480
|
cursor: 'text',
|
|
1953
1481
|
// Focus visible for keyboard navigation
|
|
1954
1482
|
[`&.${ButtonBase.buttonBaseClasses.focusVisible}`]: {
|
|
1955
|
-
outline: `2px solid ${designSystemTokens.semanticColors.border.focus}`,
|
|
1483
|
+
outline: `2px solid ${designSystemTokens.semanticColors.color.border.focus}`,
|
|
1956
1484
|
outlineOffset: 2,
|
|
1957
1485
|
},
|
|
1958
1486
|
};
|
|
1959
1487
|
// Variant-specific styles
|
|
1960
1488
|
const variantStyles = {
|
|
1961
1489
|
outlined: {
|
|
1962
|
-
backgroundColor: designSystemTokens.semanticColors.code.
|
|
1963
|
-
color: designSystemTokens.semanticColors.
|
|
1490
|
+
backgroundColor: designSystemTokens.semanticColors.code.bg,
|
|
1491
|
+
color: designSystemTokens.semanticColors.color.text.code,
|
|
1964
1492
|
border: 'none',
|
|
1965
1493
|
},
|
|
1966
1494
|
filled: {
|
|
1967
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
1968
|
-
color: designSystemTokens.semanticColors.
|
|
1495
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.tooltip,
|
|
1496
|
+
color: designSystemTokens.semanticColors.color.text.tooltip,
|
|
1969
1497
|
border: 'none',
|
|
1970
1498
|
},
|
|
1971
1499
|
};
|
|
@@ -2007,15 +1535,15 @@ ModCodeSnippet.displayName = 'ModCodeSnippet';
|
|
|
2007
1535
|
* they carry this surface themselves.
|
|
2008
1536
|
*/
|
|
2009
1537
|
const panelSurfaceStyles = {
|
|
2010
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
1538
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
2011
1539
|
};
|
|
2012
1540
|
const getDataGridHeaderStyles = () => {
|
|
2013
1541
|
return {
|
|
2014
1542
|
// Header cell container styles - from Figma: bg, border, padding
|
|
2015
1543
|
// Height is set via density-specific selectors in DataGrid.tsx
|
|
2016
1544
|
[`& .${xDataGrid.gridClasses.columnHeader}`]: {
|
|
2017
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
2018
|
-
borderBottom: `1px solid ${designSystemTokens.semanticColors.border.primary}`,
|
|
1545
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.dataGrid.header,
|
|
1546
|
+
borderBottom: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
2019
1547
|
paddingTop: `${designSystemTokens.spacing.spacing_1_1_2}px`,
|
|
2020
1548
|
paddingBottom: `${designSystemTokens.spacing.spacing_1_1_2}px`,
|
|
2021
1549
|
paddingLeft: `${designSystemTokens.spacing.spacing_2}px`,
|
|
@@ -2025,8 +1553,8 @@ const getDataGridHeaderStyles = () => {
|
|
|
2025
1553
|
// Style the filler element to match header
|
|
2026
1554
|
// Height is set via density-specific selectors in DataGrid.tsx
|
|
2027
1555
|
[`& .${xDataGrid.gridClasses.filler}`]: {
|
|
2028
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
2029
|
-
borderBottom: `1px solid ${designSystemTokens.semanticColors.border.primary}`,
|
|
1556
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.dataGrid.header,
|
|
1557
|
+
borderBottom: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
2030
1558
|
boxSizing: 'border-box',
|
|
2031
1559
|
},
|
|
2032
1560
|
// Style the default MUI column header title text to match Figma
|
|
@@ -2035,14 +1563,14 @@ const getDataGridHeaderStyles = () => {
|
|
|
2035
1563
|
fontSize: designSystemTokens.typography.fontSize.sm,
|
|
2036
1564
|
fontWeight: designSystemTokens.typography.fontWeight.semiBold, // Always semiBold (600)
|
|
2037
1565
|
lineHeight: 'normal',
|
|
2038
|
-
color: designSystemTokens.semanticColors.
|
|
1566
|
+
color: designSystemTokens.semanticColors.color.text.secondary, // #6b7280 by default
|
|
2039
1567
|
transition: 'color 0.2s',
|
|
2040
1568
|
textOverflow: 'clip',
|
|
2041
1569
|
whiteSpace: 'break-spaces',
|
|
2042
1570
|
},
|
|
2043
1571
|
// Change text color on hover
|
|
2044
1572
|
[`& .${xDataGrid.gridClasses.columnHeader}:hover .${xDataGrid.gridClasses.columnHeaderTitle}`]: {
|
|
2045
|
-
color: designSystemTokens.semanticColors.
|
|
1573
|
+
color: designSystemTokens.semanticColors.color.icon.default, // #1f2937 on hover
|
|
2046
1574
|
},
|
|
2047
1575
|
// Style the checkbox in header to match design system (16x16 from Figma)
|
|
2048
1576
|
[`& .${xDataGrid.gridClasses.columnHeaderCheckbox}`]: {
|
|
@@ -2076,7 +1604,7 @@ const getDataGridHeaderStyles = () => {
|
|
|
2076
1604
|
'& svg': {
|
|
2077
1605
|
width: 16,
|
|
2078
1606
|
height: 16,
|
|
2079
|
-
color: designSystemTokens.semanticColors.
|
|
1607
|
+
color: designSystemTokens.semanticColors.color.icon.utility,
|
|
2080
1608
|
},
|
|
2081
1609
|
},
|
|
2082
1610
|
},
|
|
@@ -2084,16 +1612,16 @@ const getDataGridHeaderStyles = () => {
|
|
|
2084
1612
|
};
|
|
2085
1613
|
const getDataGridRowStyles = () => ({
|
|
2086
1614
|
[`& .${xDataGrid.gridClasses.row}`]: {
|
|
2087
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
1615
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.dataGrid.default,
|
|
2088
1616
|
},
|
|
2089
1617
|
[`& .${xDataGrid.gridClasses.row}:hover`]: {
|
|
2090
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
1618
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.dataGrid.hover,
|
|
2091
1619
|
},
|
|
2092
1620
|
[`& .${xDataGrid.gridClasses.row}.Mui-selected`]: {
|
|
2093
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
1621
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.dataGrid.selected,
|
|
2094
1622
|
},
|
|
2095
1623
|
[`& .${xDataGrid.gridClasses.row}.Mui-selected:hover`]: {
|
|
2096
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
1624
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.dataGrid.selectedHover,
|
|
2097
1625
|
},
|
|
2098
1626
|
});
|
|
2099
1627
|
|
|
@@ -2122,8 +1650,8 @@ const StyledSearchField = styles.styled(TextField)(({ theme }) => ({
|
|
|
2122
1650
|
height: designSystemTokens.spacing.spacing_5,
|
|
2123
1651
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.default),
|
|
2124
1652
|
borderRadius: designSystemTokens.borderRadius.input,
|
|
2125
|
-
backgroundColor: designSystemTokens.semanticColors.input.
|
|
2126
|
-
border: `1px solid ${designSystemTokens.semanticColors.border.primary}`,
|
|
1653
|
+
backgroundColor: designSystemTokens.semanticColors.input.bg,
|
|
1654
|
+
border: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
2127
1655
|
paddingTop: designSystemTokens.spacing.spacing_1,
|
|
2128
1656
|
paddingBottom: designSystemTokens.spacing.spacing_1,
|
|
2129
1657
|
paddingLeft: designSystemTokens.spacing.spacing_1_1_2,
|
|
@@ -2134,22 +1662,22 @@ const StyledSearchField = styles.styled(TextField)(({ theme }) => ({
|
|
|
2134
1662
|
},
|
|
2135
1663
|
[`& .${InputBase.inputBaseClasses.input}`]: {
|
|
2136
1664
|
padding: 0,
|
|
2137
|
-
color: designSystemTokens.semanticColors.
|
|
1665
|
+
color: designSystemTokens.semanticColors.color.text.input,
|
|
2138
1666
|
'&::placeholder': {
|
|
2139
|
-
color: designSystemTokens.semanticColors.
|
|
1667
|
+
color: designSystemTokens.semanticColors.color.text.inputPlaceholder,
|
|
2140
1668
|
opacity: 1,
|
|
2141
1669
|
},
|
|
2142
1670
|
},
|
|
2143
1671
|
'&:hover': {
|
|
2144
|
-
backgroundColor: designSystemTokens.semanticColors.input.
|
|
1672
|
+
backgroundColor: designSystemTokens.semanticColors.input.bgHover,
|
|
2145
1673
|
},
|
|
2146
1674
|
[`&.${InputBase.inputBaseClasses.focused}`]: {
|
|
2147
|
-
backgroundColor: designSystemTokens.semanticColors.input.
|
|
2148
|
-
borderColor: designSystemTokens.semanticColors.
|
|
1675
|
+
backgroundColor: designSystemTokens.semanticColors.input.bg,
|
|
1676
|
+
borderColor: designSystemTokens.semanticColors.button.primary.bg,
|
|
2149
1677
|
},
|
|
2150
1678
|
},
|
|
2151
1679
|
[`& .${InputAdornment.inputAdornmentClasses.root}`]: {
|
|
2152
|
-
color: designSystemTokens.semanticColors.
|
|
1680
|
+
color: designSystemTokens.semanticColors.color.icon.placeholder,
|
|
2153
1681
|
'& svg': {
|
|
2154
1682
|
width: 20,
|
|
2155
1683
|
height: 20,
|
|
@@ -2172,14 +1700,14 @@ const MenuItemContent$1 = styles.styled('div')(() => ({
|
|
|
2172
1700
|
borderRadius: MENU_ITEM_BORDER_RADIUS,
|
|
2173
1701
|
width: '100%',
|
|
2174
1702
|
'&:hover': {
|
|
2175
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
1703
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.rowHover,
|
|
2176
1704
|
},
|
|
2177
1705
|
}));
|
|
2178
1706
|
const MenuItemLabel = styles.styled('span')(({ theme, fontWeight = 500 }) => ({
|
|
2179
1707
|
fontSize: theme.typography.pxToRem(16),
|
|
2180
1708
|
fontWeight,
|
|
2181
1709
|
lineHeight: 1.5,
|
|
2182
|
-
color: designSystemTokens.semanticColors.
|
|
1710
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
2183
1711
|
whiteSpace: 'nowrap',
|
|
2184
1712
|
}));
|
|
2185
1713
|
const DividerContainer = styles.styled('div')(() => ({
|
|
@@ -2187,7 +1715,7 @@ const DividerContainer = styles.styled('div')(() => ({
|
|
|
2187
1715
|
paddingBottom: designSystemTokens.spacing.spacing_1_2,
|
|
2188
1716
|
}));
|
|
2189
1717
|
const StyledDivider$1 = styles.styled(Divider)(() => ({
|
|
2190
|
-
borderColor: designSystemTokens.semanticColors.border.primary,
|
|
1718
|
+
borderColor: designSystemTokens.semanticColors.color.border.primary,
|
|
2191
1719
|
}));
|
|
2192
1720
|
const FooterRow = styles.styled(Box)(() => ({
|
|
2193
1721
|
display: 'flex',
|
|
@@ -2199,16 +1727,16 @@ const FooterRow = styles.styled(Box)(() => ({
|
|
|
2199
1727
|
const ResetButton = styles.styled(Button)(({ theme }) => ({
|
|
2200
1728
|
fontSize: theme.typography.pxToRem(16),
|
|
2201
1729
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
2202
|
-
color: designSystemTokens.semanticColors.
|
|
1730
|
+
color: designSystemTokens.semanticColors.button.primary.bg,
|
|
2203
1731
|
textTransform: 'none',
|
|
2204
1732
|
padding: designSystemTokens.spacing.spacing_1,
|
|
2205
1733
|
minWidth: 'auto',
|
|
2206
1734
|
'&:hover': {
|
|
2207
1735
|
backgroundColor: 'transparent',
|
|
2208
|
-
color: designSystemTokens.semanticColors.
|
|
1736
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
2209
1737
|
},
|
|
2210
1738
|
'&:disabled': {
|
|
2211
|
-
color: designSystemTokens.semanticColors.
|
|
1739
|
+
color: designSystemTokens.semanticColors.button.fgDisabled,
|
|
2212
1740
|
},
|
|
2213
1741
|
}));
|
|
2214
1742
|
const ModDataGridColumnsPanel = ({ showSearch = false,
|
|
@@ -2251,7 +1779,7 @@ sx: _sx, theme: _theme, ...props }) => {
|
|
|
2251
1779
|
const hasChanges = Object.keys(columnVisibilityModel).length > 0;
|
|
2252
1780
|
return (jsxRuntime.jsx(PanelWrapper, { ...props, children: jsxRuntime.jsxs(PanelContent, { sx: { width: 320 }, children: [showSearch && (jsxRuntime.jsx(StyledSearchField, { placeholder: "Search", variant: "standard", value: searchText, onChange: e => setSearchText(e.target.value), slotProps: {
|
|
2253
1781
|
input: {
|
|
2254
|
-
startAdornment: (jsxRuntime.jsx(InputAdornment, { position: "start", children: jsxRuntime.jsx(Search, {}) })),
|
|
1782
|
+
startAdornment: (jsxRuntime.jsx(InputAdornment, { position: "start", children: jsxRuntime.jsx(lucideReact.Search, {}) })),
|
|
2255
1783
|
disableUnderline: true,
|
|
2256
1784
|
},
|
|
2257
1785
|
} })), filteredColumns.map(column => {
|
|
@@ -2272,7 +1800,7 @@ const StyledMenuItem = styles.styled(MenuItem)(({ theme }) => ({
|
|
|
2272
1800
|
minHeight: designSystemTokens.spacing.spacing_5,
|
|
2273
1801
|
gap: designSystemTokens.spacing.spacing_2,
|
|
2274
1802
|
borderRadius: 0,
|
|
2275
|
-
color: designSystemTokens.semanticColors.
|
|
1803
|
+
color: designSystemTokens.semanticColors.color.icon.default,
|
|
2276
1804
|
textDecoration: 'none',
|
|
2277
1805
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.default),
|
|
2278
1806
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
@@ -2281,19 +1809,19 @@ const StyledMenuItem = styles.styled(MenuItem)(({ theme }) => ({
|
|
|
2281
1809
|
duration: theme.transitions.duration.shortest,
|
|
2282
1810
|
}),
|
|
2283
1811
|
'&:hover': {
|
|
2284
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
1812
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.rowHover,
|
|
2285
1813
|
},
|
|
2286
1814
|
[`&.${MenuItem.menuItemClasses.selected}`]: {
|
|
2287
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
1815
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.rowHover,
|
|
2288
1816
|
'&:hover': {
|
|
2289
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
1817
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.rowHover,
|
|
2290
1818
|
},
|
|
2291
1819
|
},
|
|
2292
1820
|
[`&.${MenuItem.menuItemClasses.disabled}`]: {
|
|
2293
1821
|
opacity: 0.5,
|
|
2294
1822
|
},
|
|
2295
1823
|
[`&.${MenuItem.menuItemClasses.focusVisible}`]: {
|
|
2296
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
1824
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.rowHover,
|
|
2297
1825
|
},
|
|
2298
1826
|
}));
|
|
2299
1827
|
const MenuItemContent = styles.styled('div')({
|
|
@@ -2308,7 +1836,7 @@ const IconWrapper$1 = styles.styled('span')(({ theme }) => ({
|
|
|
2308
1836
|
justifyContent: 'center',
|
|
2309
1837
|
flexShrink: 0,
|
|
2310
1838
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.h4),
|
|
2311
|
-
color: designSystemTokens.semanticColors.
|
|
1839
|
+
color: designSystemTokens.semanticColors.color.icon.default,
|
|
2312
1840
|
}));
|
|
2313
1841
|
const LabelContainer$3 = styles.styled('div')({
|
|
2314
1842
|
flex: 1,
|
|
@@ -2318,24 +1846,24 @@ const LabelContainer$3 = styles.styled('div')({
|
|
|
2318
1846
|
minWidth: 0,
|
|
2319
1847
|
});
|
|
2320
1848
|
const Label$3 = styles.styled('span')({
|
|
2321
|
-
color: designSystemTokens.semanticColors.
|
|
1849
|
+
color: designSystemTokens.semanticColors.color.icon.default,
|
|
2322
1850
|
flexShrink: 0,
|
|
2323
1851
|
});
|
|
2324
1852
|
const SecondaryLabel = styles.styled('span')({
|
|
2325
|
-
color: designSystemTokens.semanticColors.
|
|
1853
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
2326
1854
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
2327
1855
|
flexShrink: 0,
|
|
2328
1856
|
});
|
|
2329
1857
|
const Shortcut = styles.styled('span')(({ theme }) => ({
|
|
2330
1858
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.xs),
|
|
2331
1859
|
fontWeight: designSystemTokens.typography.fontWeight.medium,
|
|
2332
|
-
color: designSystemTokens.semanticColors.
|
|
1860
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
2333
1861
|
marginLeft: 'auto',
|
|
2334
1862
|
flexShrink: 0,
|
|
2335
|
-
border: `1px solid ${designSystemTokens.semanticColors.border.
|
|
1863
|
+
border: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
2336
1864
|
borderRadius: designSystemTokens.borderRadius.xS,
|
|
2337
1865
|
padding: `${designSystemTokens.spacing.spacing_1_4}px ${designSystemTokens.spacing.spacing_3_4}px`,
|
|
2338
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
1866
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
2339
1867
|
}));
|
|
2340
1868
|
/**
|
|
2341
1869
|
* ModMenuItem - Menu item component based on MUI MenuItem
|
|
@@ -2354,7 +1882,7 @@ const Shortcut = styles.styled('span')(({ theme }) => ({
|
|
|
2354
1882
|
* // Disabled state
|
|
2355
1883
|
* <ModMenuItem disabled>Disabled item</ModMenuItem>
|
|
2356
1884
|
*
|
|
2357
|
-
* // As an anchor —
|
|
1885
|
+
* // As an anchor — `href` alone is enough
|
|
2358
1886
|
* <ModMenuItem href="/api-explorer">API explorer</ModMenuItem>
|
|
2359
1887
|
*
|
|
2360
1888
|
* // External link
|
|
@@ -2362,12 +1890,17 @@ const Shortcut = styles.styled('span')(({ theme }) => ({
|
|
|
2362
1890
|
* Documentation
|
|
2363
1891
|
* </ModMenuItem>
|
|
2364
1892
|
*
|
|
2365
|
-
* // Client-side routing (Next.js)
|
|
1893
|
+
* // Client-side routing (Next.js) — an explicit `component` wins over the anchor default
|
|
2366
1894
|
* <ModMenuItem component={NextLink} href="/api-explorer">API explorer</ModMenuItem>
|
|
2367
1895
|
* ```
|
|
2368
1896
|
*/
|
|
2369
|
-
function ModMenuItem({ icon, shortcut, secondaryText, children, ...rest }) {
|
|
2370
|
-
|
|
1897
|
+
function ModMenuItem({ icon, shortcut, secondaryText, children, component, href, ...rest }) {
|
|
1898
|
+
// MUI roots MenuItem at `li`, and ButtonBase only swaps in a link component when the
|
|
1899
|
+
// root is `button` (as of @mui/material 9.2) — so an `href` on the default root lands as
|
|
1900
|
+
// an attribute on the `<li>` and never navigates (#722). Root at an anchor instead,
|
|
1901
|
+
// unless the caller named a component (e.g. a router link) themselves.
|
|
1902
|
+
const rootProps = { ...rest, href, component: component ?? (href ? 'a' : undefined) };
|
|
1903
|
+
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 })] }) }));
|
|
2371
1904
|
}
|
|
2372
1905
|
ModMenuItem.displayName = 'ModMenuItem';
|
|
2373
1906
|
|
|
@@ -2375,22 +1908,22 @@ ModMenuItem.displayName = 'ModMenuItem';
|
|
|
2375
1908
|
* Custom chevron icon for select
|
|
2376
1909
|
* Must accept props from MUI Select to work correctly
|
|
2377
1910
|
*/
|
|
2378
|
-
const ChevronDownIcon = (props) => (jsxRuntime.jsx(ChevronDown, { ...props, size: designSystemTokens.spacing.spacing_2_1_2, color: designSystemTokens.semanticColors.
|
|
1911
|
+
const ChevronDownIcon = (props) => (jsxRuntime.jsx(lucideReact.ChevronDown, { ...props, size: designSystemTokens.spacing.spacing_2_1_2, color: designSystemTokens.semanticColors.color.text.input, style: { ...props.style } }));
|
|
2379
1912
|
/**
|
|
2380
1913
|
* Styled Select component with design system styling
|
|
2381
1914
|
*/
|
|
2382
1915
|
const StyledSelect = styles.styled(MuiSelect)({
|
|
2383
1916
|
minHeight: designSystemTokens.spacing.spacing_5,
|
|
2384
|
-
backgroundColor: designSystemTokens.semanticColors.input.
|
|
2385
|
-
border: `1px solid ${designSystemTokens.semanticColors.border.primary}`,
|
|
1917
|
+
backgroundColor: designSystemTokens.semanticColors.input.bg,
|
|
1918
|
+
border: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
2386
1919
|
borderRadius: `${designSystemTokens.borderRadius.input}px`,
|
|
2387
1920
|
'&:hover': {
|
|
2388
|
-
backgroundColor: designSystemTokens.semanticColors.input.
|
|
2389
|
-
borderColor: designSystemTokens.semanticColors.border.primary,
|
|
1921
|
+
backgroundColor: designSystemTokens.semanticColors.input.bgHover,
|
|
1922
|
+
borderColor: designSystemTokens.semanticColors.color.border.primary,
|
|
2390
1923
|
},
|
|
2391
1924
|
'&.Mui-focused': {
|
|
2392
|
-
backgroundColor: designSystemTokens.semanticColors.input.
|
|
2393
|
-
borderColor: designSystemTokens.semanticColors.
|
|
1925
|
+
backgroundColor: designSystemTokens.semanticColors.input.bg,
|
|
1926
|
+
borderColor: designSystemTokens.semanticColors.button.primary.bg,
|
|
2394
1927
|
},
|
|
2395
1928
|
'&::before': {
|
|
2396
1929
|
display: 'none',
|
|
@@ -2405,7 +1938,7 @@ const StyledSelect = styles.styled(MuiSelect)({
|
|
|
2405
1938
|
paddingRight: designSystemTokens.spacing.spacing_5,
|
|
2406
1939
|
fontSize: designSystemTokens.typography.fontSize.sm,
|
|
2407
1940
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
2408
|
-
color: designSystemTokens.semanticColors.
|
|
1941
|
+
color: designSystemTokens.semanticColors.color.text.input,
|
|
2409
1942
|
},
|
|
2410
1943
|
[`& .${MuiSelect.selectClasses.icon}`]: {
|
|
2411
1944
|
right: designSystemTokens.spacing.spacing_1_1_2,
|
|
@@ -2427,37 +1960,34 @@ const StyledSelect = styles.styled(MuiSelect)({
|
|
|
2427
1960
|
* </ModSelect>
|
|
2428
1961
|
* ```
|
|
2429
1962
|
*/
|
|
2430
|
-
const ModSelect = (props) => {
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
slotProps
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
marginTop: 1,
|
|
2444
|
-
...incomingPaperSx,
|
|
2445
|
-
},
|
|
1963
|
+
const ModSelect = (props) => (jsxRuntime.jsx(StyledSelect, { ...props, IconComponent: ChevronDownIcon, variant: "standard", MenuProps: {
|
|
1964
|
+
...props.MenuProps,
|
|
1965
|
+
slotProps: {
|
|
1966
|
+
...props.MenuProps?.slotProps,
|
|
1967
|
+
// Caller wins, caller `sx` last — and unlike a spread, handles `sx` arrays and the
|
|
1968
|
+
// callback form of `slotProps.paper`.
|
|
1969
|
+
paper: utils.mergeSlotProps(props.MenuProps?.slotProps?.paper, {
|
|
1970
|
+
sx: {
|
|
1971
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
1972
|
+
borderRadius: `${designSystemTokens.borderRadius.s}px`,
|
|
1973
|
+
border: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
1974
|
+
boxShadow: `${designSystemTokens.shadows.dropdown.x}px ${designSystemTokens.shadows.dropdown.y}px ${designSystemTokens.shadows.dropdown.blur}px ${designSystemTokens.shadows.dropdown.spread}px ${designSystemTokens.shadows.dropdown.shadow}`,
|
|
1975
|
+
marginTop: 1,
|
|
2446
1976
|
},
|
|
2447
|
-
},
|
|
2448
|
-
}
|
|
2449
|
-
};
|
|
1977
|
+
}),
|
|
1978
|
+
},
|
|
1979
|
+
} }));
|
|
2450
1980
|
ModSelect.displayName = 'ModSelect';
|
|
2451
1981
|
|
|
2452
1982
|
/**
|
|
2453
1983
|
* Icon components for DataGrid filter panel slots
|
|
2454
1984
|
* These must be passed to the DataGrid's slots prop
|
|
2455
1985
|
*/
|
|
2456
|
-
const ModDataGridFilterPanelAddIcon = () => (jsxRuntime.jsx(Plus, { size: designSystemTokens.spacing.spacing_2, color: designSystemTokens.semanticColors.
|
|
1986
|
+
const ModDataGridFilterPanelAddIcon = () => (jsxRuntime.jsx(lucideReact.Plus, { size: designSystemTokens.spacing.spacing_2, color: designSystemTokens.semanticColors.button.tertiary.fg }));
|
|
2457
1987
|
ModDataGridFilterPanelAddIcon.displayName = 'ModDataGridFilterPanelAddIcon';
|
|
2458
|
-
const ModDataGridFilterPanelDeleteIcon = () => (jsxRuntime.jsx(X, { size: designSystemTokens.spacing.spacing_2_1_2, color: designSystemTokens.semanticColors.
|
|
1988
|
+
const ModDataGridFilterPanelDeleteIcon = () => (jsxRuntime.jsx(lucideReact.X, { size: designSystemTokens.spacing.spacing_2_1_2, color: designSystemTokens.semanticColors.color.icon.default }));
|
|
2459
1989
|
ModDataGridFilterPanelDeleteIcon.displayName = 'ModDataGridFilterPanelDeleteIcon';
|
|
2460
|
-
const ModDataGridFilterPanelRemoveAllIcon = () => (jsxRuntime.jsx(Trash2, { size: designSystemTokens.spacing.spacing_2, color: designSystemTokens.semanticColors.
|
|
1990
|
+
const ModDataGridFilterPanelRemoveAllIcon = () => (jsxRuntime.jsx(lucideReact.Trash2, { size: designSystemTokens.spacing.spacing_2, color: designSystemTokens.semanticColors.button.tertiary.fg }));
|
|
2461
1991
|
ModDataGridFilterPanelRemoveAllIcon.displayName = 'ModDataGridFilterPanelRemoveAllIcon';
|
|
2462
1992
|
/**
|
|
2463
1993
|
* Base styled GridFilterPanel with design system styling
|
|
@@ -2506,20 +2036,20 @@ const StyledGridFilterPanel = styles.styled(xDataGrid.GridFilterPanel)({
|
|
|
2506
2036
|
[`& .${xDataGrid.gridClasses.filterForm} .${InputBase.inputBaseClasses.root}`]: {
|
|
2507
2037
|
position: 'relative',
|
|
2508
2038
|
minHeight: designSystemTokens.spacing.spacing_5,
|
|
2509
|
-
backgroundColor: designSystemTokens.semanticColors.input.
|
|
2510
|
-
border: `1px solid ${designSystemTokens.semanticColors.border.primary}`,
|
|
2039
|
+
backgroundColor: designSystemTokens.semanticColors.input.bg,
|
|
2040
|
+
border: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
2511
2041
|
borderRadius: `${designSystemTokens.borderRadius.input}px`,
|
|
2512
2042
|
fontSize: designSystemTokens.typography.fontSize.default,
|
|
2513
2043
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
2514
|
-
color: designSystemTokens.semanticColors.
|
|
2044
|
+
color: designSystemTokens.semanticColors.color.text.input,
|
|
2515
2045
|
},
|
|
2516
2046
|
[`& .${xDataGrid.gridClasses.filterForm} .${InputBase.inputBaseClasses.root}:hover`]: {
|
|
2517
|
-
backgroundColor: designSystemTokens.semanticColors.input.
|
|
2518
|
-
borderColor: designSystemTokens.semanticColors.border.primary,
|
|
2047
|
+
backgroundColor: designSystemTokens.semanticColors.input.bgHover,
|
|
2048
|
+
borderColor: designSystemTokens.semanticColors.color.border.primary,
|
|
2519
2049
|
},
|
|
2520
2050
|
[`& .${xDataGrid.gridClasses.filterForm} .${InputBase.inputBaseClasses.root}.${InputBase.inputBaseClasses.focused}`]: {
|
|
2521
|
-
backgroundColor: designSystemTokens.semanticColors.input.
|
|
2522
|
-
borderColor: designSystemTokens.semanticColors.border.primary,
|
|
2051
|
+
backgroundColor: designSystemTokens.semanticColors.input.bg,
|
|
2052
|
+
borderColor: designSystemTokens.semanticColors.color.border.primary,
|
|
2523
2053
|
},
|
|
2524
2054
|
[`& .${xDataGrid.gridClasses.filterForm} .${InputBase.inputBaseClasses.root}::before`]: {
|
|
2525
2055
|
display: 'none',
|
|
@@ -2534,9 +2064,9 @@ const StyledGridFilterPanel = styles.styled(xDataGrid.GridFilterPanel)({
|
|
|
2534
2064
|
paddingRight: designSystemTokens.spacing.spacing_1_1_2,
|
|
2535
2065
|
fontSize: designSystemTokens.typography.fontSize.default,
|
|
2536
2066
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
2537
|
-
color: designSystemTokens.semanticColors.
|
|
2067
|
+
color: designSystemTokens.semanticColors.color.text.input,
|
|
2538
2068
|
'&::placeholder': {
|
|
2539
|
-
color: designSystemTokens.semanticColors.
|
|
2069
|
+
color: designSystemTokens.semanticColors.color.text.inputPlaceholder,
|
|
2540
2070
|
opacity: 1,
|
|
2541
2071
|
},
|
|
2542
2072
|
},
|
|
@@ -2551,24 +2081,28 @@ const StyledGridFilterPanel = styles.styled(xDataGrid.GridFilterPanel)({
|
|
|
2551
2081
|
[`& .${xDataGrid.gridClasses.filterForm} .${FormLabel.formLabelClasses.root}`]: {
|
|
2552
2082
|
fontSize: designSystemTokens.typography.fontSize.sm,
|
|
2553
2083
|
fontWeight: designSystemTokens.typography.fontWeight.medium,
|
|
2554
|
-
color: designSystemTokens.semanticColors.
|
|
2084
|
+
color: designSystemTokens.semanticColors.color.text.inputLabel,
|
|
2555
2085
|
marginBottom: designSystemTokens.spacing.spacing_1_2,
|
|
2556
2086
|
position: 'static',
|
|
2557
2087
|
transform: 'none',
|
|
2558
2088
|
},
|
|
2559
|
-
[`& .${xDataGrid.gridClasses.filterForm} .${
|
|
2089
|
+
[`& .${xDataGrid.gridClasses.filterForm} .${MuiInputLabel.inputLabelClasses.root}`]: {
|
|
2560
2090
|
fontSize: designSystemTokens.typography.fontSize.sm,
|
|
2561
2091
|
fontWeight: designSystemTokens.typography.fontWeight.medium,
|
|
2562
|
-
color: designSystemTokens.semanticColors.
|
|
2092
|
+
color: designSystemTokens.semanticColors.color.text.inputLabel,
|
|
2563
2093
|
marginBottom: designSystemTokens.spacing.spacing_1_2,
|
|
2564
2094
|
position: 'static',
|
|
2565
2095
|
transform: 'none',
|
|
2566
2096
|
},
|
|
2567
2097
|
[`& .${xDataGrid.gridClasses.filterForm} .${FormLabel.formLabelClasses.root}.${FormLabel.formLabelClasses.focused}`]: {
|
|
2568
|
-
color: designSystemTokens.semanticColors.
|
|
2098
|
+
color: designSystemTokens.semanticColors.color.text.inputLabel,
|
|
2569
2099
|
},
|
|
2570
|
-
[`& .${xDataGrid.gridClasses.filterForm} .${
|
|
2571
|
-
color: designSystemTokens.semanticColors.
|
|
2100
|
+
[`& .${xDataGrid.gridClasses.filterForm} .${MuiInputLabel.inputLabelClasses.root}.${MuiInputLabel.inputLabelClasses.focused}`]: {
|
|
2101
|
+
color: designSystemTokens.semanticColors.color.text.inputLabel,
|
|
2102
|
+
},
|
|
2103
|
+
// Reclaim the 16px MUI's standard Input reserves for a floating label; these sit statically.
|
|
2104
|
+
[`& .${xDataGrid.gridClasses.filterForm} label + .${InputBase.inputBaseClasses.root}`]: {
|
|
2105
|
+
marginTop: 0,
|
|
2572
2106
|
},
|
|
2573
2107
|
// Remove fieldset/legend
|
|
2574
2108
|
'& fieldset': {
|
|
@@ -2592,13 +2126,13 @@ const StyledGridFilterPanel = styles.styled(xDataGrid.GridFilterPanel)({
|
|
|
2592
2126
|
minHeight: 'auto',
|
|
2593
2127
|
height: 'auto',
|
|
2594
2128
|
gap: designSystemTokens.spacing.spacing_1_2,
|
|
2595
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
2596
|
-
color: designSystemTokens.semanticColors.
|
|
2597
|
-
border: `1px solid ${designSystemTokens.semanticColors.
|
|
2129
|
+
backgroundColor: designSystemTokens.semanticColors.button.secondary.bg,
|
|
2130
|
+
color: designSystemTokens.semanticColors.color.text.input,
|
|
2131
|
+
border: `1px solid ${designSystemTokens.semanticColors.button.secondary.border}`,
|
|
2598
2132
|
},
|
|
2599
2133
|
[`& .${xDataGrid.gridClasses.panelFooter} .${Button.buttonClasses.root}:first-child:hover`]: {
|
|
2600
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
2601
|
-
borderColor: designSystemTokens.semanticColors.
|
|
2134
|
+
backgroundColor: designSystemTokens.semanticColors.button.secondary.bgHover,
|
|
2135
|
+
borderColor: designSystemTokens.semanticColors.button.secondary.border,
|
|
2602
2136
|
},
|
|
2603
2137
|
// Clear all button (second button) - styled to match ModButton link variant
|
|
2604
2138
|
[`& .${xDataGrid.gridClasses.panelFooter} .${Button.buttonClasses.root}:nth-child(2)`]: {
|
|
@@ -2610,27 +2144,88 @@ const StyledGridFilterPanel = styles.styled(xDataGrid.GridFilterPanel)({
|
|
|
2610
2144
|
textTransform: 'none',
|
|
2611
2145
|
minHeight: 'auto',
|
|
2612
2146
|
backgroundColor: 'transparent',
|
|
2613
|
-
color: designSystemTokens.semanticColors.
|
|
2147
|
+
color: designSystemTokens.semanticColors.button.tertiary.fg,
|
|
2614
2148
|
border: 'none',
|
|
2615
2149
|
[`& .${Button.buttonClasses.startIcon}`]: {
|
|
2616
2150
|
display: 'none', // Hide the trash icon
|
|
2617
2151
|
},
|
|
2618
2152
|
'&:hover': {
|
|
2619
2153
|
backgroundColor: 'transparent',
|
|
2620
|
-
color: designSystemTokens.semanticColors.
|
|
2154
|
+
color: designSystemTokens.semanticColors.button.tertiary.fgHover,
|
|
2621
2155
|
},
|
|
2622
2156
|
},
|
|
2623
2157
|
// Icon buttons (delete/trash icon)
|
|
2624
2158
|
[`& .${xDataGrid.gridClasses.filterForm} .${IconButton.iconButtonClasses.root}`]: {
|
|
2625
2159
|
width: designSystemTokens.spacing.spacing_5_1_2,
|
|
2626
2160
|
height: designSystemTokens.spacing.spacing_5_1_2,
|
|
2627
|
-
color: designSystemTokens.semanticColors.
|
|
2161
|
+
color: designSystemTokens.semanticColors.color.icon.default,
|
|
2628
2162
|
},
|
|
2629
2163
|
[`& .${xDataGrid.gridClasses.filterForm} .${IconButton.iconButtonClasses.root}:hover`]: {
|
|
2630
|
-
backgroundColor: designSystemTokens.semanticColors.input.
|
|
2164
|
+
backgroundColor: designSystemTokens.semanticColors.input.bgHover,
|
|
2631
2165
|
},
|
|
2632
2166
|
});
|
|
2633
2167
|
StyledGridFilterPanel.displayName = 'StyledGridFilterPanel';
|
|
2168
|
+
/**
|
|
2169
|
+
* ModDataGridSelect - ModSelect adapted to the DataGrid `baseSelect` slot contract.
|
|
2170
|
+
*
|
|
2171
|
+
* Kept structurally parallel to MUI's own `BaseSelect` (`@mui/x-data-grid/material`) so the two
|
|
2172
|
+
* can be diffed on upgrade.
|
|
2173
|
+
*
|
|
2174
|
+
* @example
|
|
2175
|
+
* ```tsx
|
|
2176
|
+
* <ModDataGrid rows={rows} columns={columns} slots={{ baseSelect: ModDataGridSelect }} />
|
|
2177
|
+
* ```
|
|
2178
|
+
*/
|
|
2179
|
+
const ModDataGridSelect = React.forwardRef(function ModDataGridSelect({ id, label, labelId, disabled, fullWidth, size, style, slotProps, material, onChange, onClose, onKeyDown, ...rest }, ref) {
|
|
2180
|
+
const theme = styles.useTheme();
|
|
2181
|
+
const hasLabel = label !== undefined;
|
|
2182
|
+
// The grid omits `size` in edit cells, where MUI's adapter falls back to the theme's TextField
|
|
2183
|
+
// default — without this the select renders medium beside small fields.
|
|
2184
|
+
const computedSize = size ?? theme.components?.MuiTextField?.defaultProps?.size;
|
|
2185
|
+
return (jsxRuntime.jsxs(FormControl
|
|
2186
|
+
// Bridges Ref<HTMLElement> to FormControl's Ref<HTMLDivElement>; neither direct form typechecks.
|
|
2187
|
+
, {
|
|
2188
|
+
// Bridges Ref<HTMLElement> to FormControl's Ref<HTMLDivElement>; neither direct form typechecks.
|
|
2189
|
+
ref: utils.useForkRef(ref), disabled: disabled, fullWidth: fullWidth, size: computedSize, style: style, children: [hasLabel && (jsxRuntime.jsx(MuiInputLabel, { id: labelId, htmlFor: id, variant: "standard", shrink: true, children: label })), jsxRuntime.jsx(ModSelect, { ...rest, id: id, label: label, labelId: hasLabel ? labelId : undefined, size: computedSize, displayEmpty: true, inputProps: slotProps?.htmlInput,
|
|
2190
|
+
// The grid types this as a ChangeEventHandler; MUI emits a SelectChangeEvent. MUI's own
|
|
2191
|
+
// adapter forwards it unchanged, so the divergence is only in the type.
|
|
2192
|
+
onChange: onChange, MenuProps: {
|
|
2193
|
+
// Must stay absent when absent: MUI spreads MenuProps over its own `onClose: handleClose`,
|
|
2194
|
+
// so an explicit `undefined` stops Escape and backdrop click closing the menu.
|
|
2195
|
+
...(onClose && { onClose }),
|
|
2196
|
+
slotProps: { paper: { onKeyDown } },
|
|
2197
|
+
}, ...material })] }));
|
|
2198
|
+
});
|
|
2199
|
+
/**
|
|
2200
|
+
* ModDataGridFilterPanel - MUI GridFilterPanel with design system styling and Lucide icons
|
|
2201
|
+
*
|
|
2202
|
+
* A styled version of MUI's GridFilterPanel that applies design system tokens.
|
|
2203
|
+
* The per-row delete icon uses Lucide Trash2 internally.
|
|
2204
|
+
*
|
|
2205
|
+
* For footer button icons ("Add filter" and "Remove all"), you must also pass the icon components
|
|
2206
|
+
* to the DataGrid's slots prop.
|
|
2207
|
+
*
|
|
2208
|
+
* @example
|
|
2209
|
+
* ```tsx
|
|
2210
|
+
* import {
|
|
2211
|
+
* ModDataGridFilterPanel,
|
|
2212
|
+
* FilterPanelAddIcon,
|
|
2213
|
+
* FilterPanelDeleteIcon,
|
|
2214
|
+
* FilterPanelRemoveAllIcon
|
|
2215
|
+
* } from '@moderneinc/design-system-components'
|
|
2216
|
+
*
|
|
2217
|
+
* <DataGridPro
|
|
2218
|
+
* rows={rows}
|
|
2219
|
+
* columns={columns}
|
|
2220
|
+
* slots={{
|
|
2221
|
+
* filterPanel: ModDataGridFilterPanel,
|
|
2222
|
+
* filterPanelAddIcon: FilterPanelAddIcon,
|
|
2223
|
+
* filterPanelDeleteIcon: FilterPanelDeleteIcon,
|
|
2224
|
+
* filterPanelRemoveAllIcon: FilterPanelRemoveAllIcon,
|
|
2225
|
+
* }}
|
|
2226
|
+
* />
|
|
2227
|
+
* ```
|
|
2228
|
+
*/
|
|
2634
2229
|
const ModDataGridFilterPanel = (props) => {
|
|
2635
2230
|
return jsxRuntime.jsx(StyledGridFilterPanel, { ...props });
|
|
2636
2231
|
};
|
|
@@ -2642,13 +2237,13 @@ ModDataGridFilterPanel.displayName = 'ModDataGridFilterPanel';
|
|
|
2642
2237
|
* Use these with DataGrid's slots API to replace default sort indicators.
|
|
2643
2238
|
*/
|
|
2644
2239
|
function SortedDescendingIcon() {
|
|
2645
|
-
return jsxRuntime.jsx(ArrowDown, { size: 16, color: designSystemTokens.semanticColors.
|
|
2240
|
+
return jsxRuntime.jsx(lucideReact.ArrowDown, { size: 16, color: designSystemTokens.semanticColors.color.icon.utility });
|
|
2646
2241
|
}
|
|
2647
2242
|
function SortedAscendingIcon() {
|
|
2648
|
-
return jsxRuntime.jsx(ArrowUp, { size: 16, color: designSystemTokens.semanticColors.
|
|
2243
|
+
return jsxRuntime.jsx(lucideReact.ArrowUp, { size: 16, color: designSystemTokens.semanticColors.color.icon.utility });
|
|
2649
2244
|
}
|
|
2650
2245
|
function UnsortedIcon() {
|
|
2651
|
-
return jsxRuntime.jsx(ChevronsUpDown, { size: 16, color: designSystemTokens.semanticColors.
|
|
2246
|
+
return jsxRuntime.jsx(lucideReact.ChevronsUpDown, { size: 16, color: designSystemTokens.semanticColors.color.icon.utility });
|
|
2652
2247
|
}
|
|
2653
2248
|
|
|
2654
2249
|
/**
|
|
@@ -2659,7 +2254,7 @@ function UnsortedIcon() {
|
|
|
2659
2254
|
*/
|
|
2660
2255
|
const ModGridPanel = styles.styled(xDataGrid.GridPanel)({
|
|
2661
2256
|
[`& .${xDataGrid.gridPanelClasses.paper}`]: {
|
|
2662
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
2257
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
2663
2258
|
},
|
|
2664
2259
|
});
|
|
2665
2260
|
/**
|
|
@@ -2735,27 +2330,27 @@ function ModDataGrid({ autoHeight = false, toolbar, slots, sx, density = 'standa
|
|
|
2735
2330
|
// See: https://github.com/mui/mui-x/issues/20107
|
|
2736
2331
|
// This must be set to prevent scroll shadow artifacts
|
|
2737
2332
|
[`& .${xDataGrid.gridClasses.main}`]: {
|
|
2738
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
2333
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.dataGrid.default,
|
|
2739
2334
|
},
|
|
2740
2335
|
// White background for empty/loading overlays
|
|
2741
2336
|
[`& .${xDataGrid.gridClasses.overlay}`]: {
|
|
2742
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
2337
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.dataGrid.default,
|
|
2743
2338
|
},
|
|
2744
2339
|
// The root keeps MUI's background.paper (#fff), which the note above
|
|
2745
2340
|
// requires us to leave alone. Everything outside `main` therefore showed
|
|
2746
2341
|
// white under [data-theme="dark"] — the footer, and the filler strips
|
|
2747
2342
|
// beyond the last column and next to the scrollbar.
|
|
2748
2343
|
[`& .${xDataGrid.gridClasses.footerContainer}`]: {
|
|
2749
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
2344
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.dataGrid.default,
|
|
2750
2345
|
},
|
|
2751
2346
|
// `&&` doubles specificity: MUI paints the filler strips itself, so a
|
|
2752
2347
|
// single-class rule loses to its own.
|
|
2753
2348
|
[`&& .${xDataGrid.gridClasses.filler}, && .${xDataGrid.gridClasses.scrollbarFiller}`]: {
|
|
2754
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
2349
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.dataGrid.default,
|
|
2755
2350
|
},
|
|
2756
2351
|
...getDataGridHeaderStyles(),
|
|
2757
2352
|
...getDataGridRowStyles(),
|
|
2758
|
-
border: `1px solid ${designSystemTokens.semanticColors.border.
|
|
2353
|
+
border: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
2759
2354
|
// Target `& svg` (not `.MuiSvgIcon-root`) to match the lucide icons
|
|
2760
2355
|
// ModCheckbox renders, mirroring the header rule below.
|
|
2761
2356
|
// flexShrink: 0 stops the icon collapsing to 0 width when the checkbox
|
|
@@ -2810,7 +2405,7 @@ ModDataGrid.displayName = 'ModDataGrid';
|
|
|
2810
2405
|
* ```
|
|
2811
2406
|
*/
|
|
2812
2407
|
function ModDataGridColumnsButton() {
|
|
2813
|
-
return (jsxRuntime.jsx(xDataGrid.ColumnsPanelTrigger, { render: jsxRuntime.jsx(xDataGrid.ToolbarButton, { render: jsxRuntime.jsxs(ModButton, { variant: "secondary", size: "small", children: [jsxRuntime.jsx(Columns3, { size: 16, color: designSystemTokens.semanticColors.
|
|
2408
|
+
return (jsxRuntime.jsx(xDataGrid.ColumnsPanelTrigger, { render: jsxRuntime.jsx(xDataGrid.ToolbarButton, { render: jsxRuntime.jsxs(ModButton, { variant: "secondary", size: "small", children: [jsxRuntime.jsx(lucideReact.Columns3, { size: 16, color: designSystemTokens.semanticColors.button.primary.bg }), "Columns"] }) }) }));
|
|
2814
2409
|
}
|
|
2815
2410
|
ModDataGridColumnsButton.displayName = 'ModDataGridColumnsButton';
|
|
2816
2411
|
|
|
@@ -2836,69 +2431,69 @@ const sizeStyles$1 = {
|
|
|
2836
2431
|
};
|
|
2837
2432
|
const outlinedColorStyles = {
|
|
2838
2433
|
default: {
|
|
2839
|
-
backgroundColor: designSystemTokens.semanticColors.status.neutral.
|
|
2840
|
-
color: designSystemTokens.semanticColors.status.neutral.
|
|
2841
|
-
borderColor: designSystemTokens.semanticColors.status.neutral.
|
|
2434
|
+
backgroundColor: designSystemTokens.semanticColors.color.status.neutral.bg,
|
|
2435
|
+
color: designSystemTokens.semanticColors.color.status.neutral.fg,
|
|
2436
|
+
borderColor: designSystemTokens.semanticColors.color.status.neutral.tint,
|
|
2842
2437
|
},
|
|
2843
2438
|
error: {
|
|
2844
|
-
backgroundColor: designSystemTokens.semanticColors.status.error.
|
|
2845
|
-
color: designSystemTokens.semanticColors.status.error.
|
|
2846
|
-
borderColor: designSystemTokens.semanticColors.status.error.
|
|
2439
|
+
backgroundColor: designSystemTokens.semanticColors.color.status.error.bg,
|
|
2440
|
+
color: designSystemTokens.semanticColors.color.status.error.fg,
|
|
2441
|
+
borderColor: designSystemTokens.semanticColors.color.status.error.tint,
|
|
2847
2442
|
},
|
|
2848
2443
|
warning: {
|
|
2849
|
-
backgroundColor: designSystemTokens.semanticColors.status.warning.
|
|
2850
|
-
color: designSystemTokens.semanticColors.status.warning.
|
|
2851
|
-
borderColor: designSystemTokens.semanticColors.status.warning.
|
|
2444
|
+
backgroundColor: designSystemTokens.semanticColors.color.status.warning.bg,
|
|
2445
|
+
color: designSystemTokens.semanticColors.color.status.warning.fg,
|
|
2446
|
+
borderColor: designSystemTokens.semanticColors.color.status.warning.tint,
|
|
2852
2447
|
},
|
|
2853
2448
|
success: {
|
|
2854
|
-
backgroundColor: designSystemTokens.semanticColors.status.success.
|
|
2855
|
-
color: designSystemTokens.semanticColors.status.success.
|
|
2856
|
-
borderColor: designSystemTokens.semanticColors.status.success.
|
|
2449
|
+
backgroundColor: designSystemTokens.semanticColors.color.status.success.bg,
|
|
2450
|
+
color: designSystemTokens.semanticColors.color.status.success.fg,
|
|
2451
|
+
borderColor: designSystemTokens.semanticColors.color.status.success.tint,
|
|
2857
2452
|
},
|
|
2858
2453
|
info: {
|
|
2859
|
-
backgroundColor: designSystemTokens.semanticColors.status.info.
|
|
2860
|
-
color: designSystemTokens.semanticColors.status.info.
|
|
2861
|
-
borderColor: designSystemTokens.semanticColors.status.info.
|
|
2454
|
+
backgroundColor: designSystemTokens.semanticColors.color.status.info.bg,
|
|
2455
|
+
color: designSystemTokens.semanticColors.color.status.info.fg,
|
|
2456
|
+
borderColor: designSystemTokens.semanticColors.color.status.info.tint,
|
|
2862
2457
|
},
|
|
2863
2458
|
violet: {
|
|
2864
|
-
backgroundColor: designSystemTokens.semanticColors.status.active.
|
|
2865
|
-
color: designSystemTokens.semanticColors.status.active.
|
|
2866
|
-
borderColor: designSystemTokens.semanticColors.status.active.
|
|
2459
|
+
backgroundColor: designSystemTokens.semanticColors.color.status.active.bg,
|
|
2460
|
+
color: designSystemTokens.semanticColors.color.status.active.fg,
|
|
2461
|
+
borderColor: designSystemTokens.semanticColors.color.status.active.tint,
|
|
2867
2462
|
},
|
|
2868
2463
|
beta: {
|
|
2869
2464
|
backgroundColor: 'transparent',
|
|
2870
|
-
color: designSystemTokens.semanticColors.
|
|
2465
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
2871
2466
|
borderColor: 'transparent',
|
|
2872
2467
|
},
|
|
2873
2468
|
};
|
|
2874
2469
|
const filledColorStyles = {
|
|
2875
2470
|
default: {
|
|
2876
|
-
backgroundColor: designSystemTokens.semanticColors.status.neutral.
|
|
2877
|
-
color: designSystemTokens.semanticColors.status.neutral.
|
|
2471
|
+
backgroundColor: designSystemTokens.semanticColors.color.status.neutral.fg,
|
|
2472
|
+
color: designSystemTokens.semanticColors.color.status.neutral.bg,
|
|
2878
2473
|
},
|
|
2879
2474
|
error: {
|
|
2880
|
-
backgroundColor: designSystemTokens.semanticColors.status.error.
|
|
2881
|
-
color: designSystemTokens.semanticColors.status.error.
|
|
2475
|
+
backgroundColor: designSystemTokens.semanticColors.color.status.error.fg,
|
|
2476
|
+
color: designSystemTokens.semanticColors.color.status.error.bg,
|
|
2882
2477
|
},
|
|
2883
2478
|
warning: {
|
|
2884
|
-
backgroundColor: designSystemTokens.semanticColors.status.warning.
|
|
2885
|
-
color: designSystemTokens.semanticColors.status.warning.
|
|
2479
|
+
backgroundColor: designSystemTokens.semanticColors.color.status.warning.fg,
|
|
2480
|
+
color: designSystemTokens.semanticColors.color.status.warning.bg,
|
|
2886
2481
|
},
|
|
2887
2482
|
success: {
|
|
2888
|
-
backgroundColor: designSystemTokens.semanticColors.status.success.
|
|
2889
|
-
color: designSystemTokens.semanticColors.status.success.
|
|
2483
|
+
backgroundColor: designSystemTokens.semanticColors.color.status.success.fg,
|
|
2484
|
+
color: designSystemTokens.semanticColors.color.status.success.bg,
|
|
2890
2485
|
},
|
|
2891
2486
|
info: {
|
|
2892
|
-
backgroundColor: designSystemTokens.semanticColors.status.info.
|
|
2893
|
-
color: designSystemTokens.semanticColors.status.info.
|
|
2487
|
+
backgroundColor: designSystemTokens.semanticColors.color.status.info.fg,
|
|
2488
|
+
color: designSystemTokens.semanticColors.color.status.info.bg,
|
|
2894
2489
|
},
|
|
2895
2490
|
violet: {
|
|
2896
|
-
backgroundColor: designSystemTokens.semanticColors.status.active.
|
|
2897
|
-
color: designSystemTokens.semanticColors.status.active.
|
|
2491
|
+
backgroundColor: designSystemTokens.semanticColors.color.status.active.fg,
|
|
2492
|
+
color: designSystemTokens.semanticColors.color.status.active.bg,
|
|
2898
2493
|
},
|
|
2899
2494
|
beta: {
|
|
2900
2495
|
backgroundColor: 'transparent',
|
|
2901
|
-
color: designSystemTokens.semanticColors.
|
|
2496
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
2902
2497
|
},
|
|
2903
2498
|
};
|
|
2904
2499
|
const StyledChip$2 = styles.styled(Chip, {
|
|
@@ -2952,7 +2547,7 @@ function ModDataGridFiltersButton() {
|
|
|
2952
2547
|
const filterModel = xDataGrid.useGridSelector(apiRef, xDataGrid.gridFilterModelSelector);
|
|
2953
2548
|
const activeFilters = filterModel.items.filter(item => item.value != null && item.value !== '');
|
|
2954
2549
|
const filterCount = activeFilters.length;
|
|
2955
|
-
return (jsxRuntime.jsx(xDataGrid.FilterPanelTrigger, { render: jsxRuntime.jsx(xDataGrid.ToolbarButton, { render: jsxRuntime.jsxs(ModButton, { variant: "secondary", size: "small", children: [jsxRuntime.jsx(ListFilter, { size: 16, color: designSystemTokens.semanticColors.
|
|
2550
|
+
return (jsxRuntime.jsx(xDataGrid.FilterPanelTrigger, { render: jsxRuntime.jsx(xDataGrid.ToolbarButton, { render: jsxRuntime.jsxs(ModButton, { variant: "secondary", size: "small", children: [jsxRuntime.jsx(lucideReact.ListFilter, { size: 16, color: designSystemTokens.semanticColors.button.primary.bg }), "Filters", filterCount > 0 && (jsxRuntime.jsx(ModTag, { size: "medium", variant: "filled", intent: "info", label: String(filterCount) }))] }) }) }));
|
|
2956
2551
|
}
|
|
2957
2552
|
ModDataGridFiltersButton.displayName = 'ModDataGridFiltersButton';
|
|
2958
2553
|
|
|
@@ -2987,14 +2582,14 @@ const LabelText$1 = styles.styled('p')({
|
|
|
2987
2582
|
fontSize: designSystemTokens.typography.fontSize.sm,
|
|
2988
2583
|
fontWeight: designSystemTokens.typography.fontWeight.semiBold, // Always semiBold (600)
|
|
2989
2584
|
lineHeight: 'normal',
|
|
2990
|
-
color: designSystemTokens.semanticColors.
|
|
2585
|
+
color: designSystemTokens.semanticColors.color.text.secondary, // #6b7280 by default
|
|
2991
2586
|
whiteSpace: 'nowrap',
|
|
2992
2587
|
margin: 0,
|
|
2993
2588
|
padding: 0,
|
|
2994
2589
|
transition: 'color 0.2s',
|
|
2995
2590
|
// Hover state - changes to primary text color
|
|
2996
2591
|
'&:hover': {
|
|
2997
|
-
color: designSystemTokens.semanticColors.
|
|
2592
|
+
color: designSystemTokens.semanticColors.color.icon.default, // #1f2937 on hover
|
|
2998
2593
|
},
|
|
2999
2594
|
});
|
|
3000
2595
|
const IconWrapper = styles.styled('div')({
|
|
@@ -3007,476 +2602,11 @@ const IconWrapper = styles.styled('div')({
|
|
|
3007
2602
|
'& svg': {
|
|
3008
2603
|
width: 16,
|
|
3009
2604
|
height: 16,
|
|
3010
|
-
color: designSystemTokens.semanticColors.
|
|
2605
|
+
color: designSystemTokens.semanticColors.color.icon.utility,
|
|
3011
2606
|
},
|
|
3012
2607
|
});
|
|
3013
2608
|
function ModDataGridHeaderLabel({ children, helpTooltip, className, }) {
|
|
3014
|
-
return (jsxRuntime.jsxs(LabelContainer$2, { className: className, "data-mod-header-label": true, children: [children && jsxRuntime.jsx(LabelText$1, { children: children }), helpTooltip && (jsxRuntime.jsx(Tooltip, { title: helpTooltip, placement: "top", children: jsxRuntime.jsx(IconWrapper, { children: jsxRuntime.jsx(
|
|
3015
|
-
}
|
|
3016
|
-
|
|
3017
|
-
/**
|
|
3018
|
-
* @module constants
|
|
3019
|
-
* @summary Useful constants
|
|
3020
|
-
* @description
|
|
3021
|
-
* Collection of useful date constants.
|
|
3022
|
-
*
|
|
3023
|
-
* The constants could be imported from `date-fns/constants`:
|
|
3024
|
-
*
|
|
3025
|
-
* ```ts
|
|
3026
|
-
* import { maxTime, minTime } from "./constants/date-fns/constants";
|
|
3027
|
-
*
|
|
3028
|
-
* function isAllowedTime(time) {
|
|
3029
|
-
* return time <= maxTime && time >= minTime;
|
|
3030
|
-
* }
|
|
3031
|
-
* ```
|
|
3032
|
-
*/
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
/**
|
|
3036
|
-
* @constant
|
|
3037
|
-
* @name constructFromSymbol
|
|
3038
|
-
* @summary Symbol enabling Date extensions to inherit properties from the reference date.
|
|
3039
|
-
*
|
|
3040
|
-
* The symbol is used to enable the `constructFrom` function to construct a date
|
|
3041
|
-
* using a reference date and a value. It allows to transfer extra properties
|
|
3042
|
-
* from the reference date to the new date. It's useful for extensions like
|
|
3043
|
-
* [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as
|
|
3044
|
-
* a constructor argument.
|
|
3045
|
-
*/
|
|
3046
|
-
const constructFromSymbol = Symbol.for("constructDateFrom");
|
|
3047
|
-
|
|
3048
|
-
/**
|
|
3049
|
-
* @name constructFrom
|
|
3050
|
-
* @category Generic Helpers
|
|
3051
|
-
* @summary Constructs a date using the reference date and the value
|
|
3052
|
-
*
|
|
3053
|
-
* @description
|
|
3054
|
-
* The function constructs a new date using the constructor from the reference
|
|
3055
|
-
* date and the given value. It helps to build generic functions that accept
|
|
3056
|
-
* date extensions.
|
|
3057
|
-
*
|
|
3058
|
-
* It defaults to `Date` if the passed reference date is a number or a string.
|
|
3059
|
-
*
|
|
3060
|
-
* Starting from v3.7.0, it allows to construct a date using `[Symbol.for("constructDateFrom")]`
|
|
3061
|
-
* enabling to transfer extra properties from the reference date to the new date.
|
|
3062
|
-
* It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
|
|
3063
|
-
* that accept a time zone as a constructor argument.
|
|
3064
|
-
*
|
|
3065
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
3066
|
-
*
|
|
3067
|
-
* @param date - The reference date to take constructor from
|
|
3068
|
-
* @param value - The value to create the date
|
|
3069
|
-
*
|
|
3070
|
-
* @returns Date initialized using the given date and value
|
|
3071
|
-
*
|
|
3072
|
-
* @example
|
|
3073
|
-
* import { constructFrom } from "./constructFrom/date-fns";
|
|
3074
|
-
*
|
|
3075
|
-
* // A function that clones a date preserving the original type
|
|
3076
|
-
* function cloneDate<DateType extends Date>(date: DateType): DateType {
|
|
3077
|
-
* return constructFrom(
|
|
3078
|
-
* date, // Use constructor from the given date
|
|
3079
|
-
* date.getTime() // Use the date value to create a new date
|
|
3080
|
-
* );
|
|
3081
|
-
* }
|
|
3082
|
-
*/
|
|
3083
|
-
function constructFrom(date, value) {
|
|
3084
|
-
if (typeof date === "function") return date(value);
|
|
3085
|
-
|
|
3086
|
-
if (date && typeof date === "object" && constructFromSymbol in date)
|
|
3087
|
-
return date[constructFromSymbol](value);
|
|
3088
|
-
|
|
3089
|
-
if (date instanceof Date) return new date.constructor(value);
|
|
3090
|
-
|
|
3091
|
-
return new Date(value);
|
|
3092
|
-
}
|
|
3093
|
-
|
|
3094
|
-
/**
|
|
3095
|
-
* @name toDate
|
|
3096
|
-
* @category Common Helpers
|
|
3097
|
-
* @summary Convert the given argument to an instance of Date.
|
|
3098
|
-
*
|
|
3099
|
-
* @description
|
|
3100
|
-
* Convert the given argument to an instance of Date.
|
|
3101
|
-
*
|
|
3102
|
-
* If the argument is an instance of Date, the function returns its clone.
|
|
3103
|
-
*
|
|
3104
|
-
* If the argument is a number, it is treated as a timestamp.
|
|
3105
|
-
*
|
|
3106
|
-
* If the argument is none of the above, the function returns Invalid Date.
|
|
3107
|
-
*
|
|
3108
|
-
* Starting from v3.7.0, it clones a date using `[Symbol.for("constructDateFrom")]`
|
|
3109
|
-
* enabling to transfer extra properties from the reference date to the new date.
|
|
3110
|
-
* It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
|
|
3111
|
-
* that accept a time zone as a constructor argument.
|
|
3112
|
-
*
|
|
3113
|
-
* **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
|
|
3114
|
-
*
|
|
3115
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
3116
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
3117
|
-
*
|
|
3118
|
-
* @param argument - The value to convert
|
|
3119
|
-
*
|
|
3120
|
-
* @returns The parsed date in the local time zone
|
|
3121
|
-
*
|
|
3122
|
-
* @example
|
|
3123
|
-
* // Clone the date:
|
|
3124
|
-
* const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
|
|
3125
|
-
* //=> Tue Feb 11 2014 11:30:30
|
|
3126
|
-
*
|
|
3127
|
-
* @example
|
|
3128
|
-
* // Convert the timestamp to date:
|
|
3129
|
-
* const result = toDate(1392098430000)
|
|
3130
|
-
* //=> Tue Feb 11 2014 11:30:30
|
|
3131
|
-
*/
|
|
3132
|
-
function toDate(argument, context) {
|
|
3133
|
-
// [TODO] Get rid of `toDate` or `constructFrom`?
|
|
3134
|
-
return constructFrom(argument, argument);
|
|
3135
|
-
}
|
|
3136
|
-
|
|
3137
|
-
/**
|
|
3138
|
-
* The {@link addDays} function options.
|
|
3139
|
-
*/
|
|
3140
|
-
|
|
3141
|
-
/**
|
|
3142
|
-
* @name addDays
|
|
3143
|
-
* @category Day Helpers
|
|
3144
|
-
* @summary Add the specified number of days to the given date.
|
|
3145
|
-
*
|
|
3146
|
-
* @description
|
|
3147
|
-
* Add the specified number of days to the given date.
|
|
3148
|
-
*
|
|
3149
|
-
* **You don't need date-fns\***:
|
|
3150
|
-
*
|
|
3151
|
-
* Temporal has a built-in `add` method on all its classes:
|
|
3152
|
-
*
|
|
3153
|
-
* - [`Temporal.Instant.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/add)
|
|
3154
|
-
* - [`Temporal.PlainDate.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/add)
|
|
3155
|
-
* - [`Temporal.PlainDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/add)
|
|
3156
|
-
* - [`Temporal.PlainTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/add)
|
|
3157
|
-
* - [`Temporal.PlainYearMonth.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/add)
|
|
3158
|
-
* - [`Temporal.ZonedDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/add)
|
|
3159
|
-
*
|
|
3160
|
-
* \* **Not really**, see: https://date-fns.org/you-dont-need-date-fns
|
|
3161
|
-
*
|
|
3162
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
3163
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
3164
|
-
*
|
|
3165
|
-
* @param date - The date to be changed
|
|
3166
|
-
* @param amount - The amount of days to be added.
|
|
3167
|
-
* @param options - An object with options
|
|
3168
|
-
*
|
|
3169
|
-
* @returns The new date with the days added
|
|
3170
|
-
*
|
|
3171
|
-
* @example
|
|
3172
|
-
* // Add 10 days to 1 September 2014:
|
|
3173
|
-
* const result = addDays(new Date(2014, 8, 1), 10)
|
|
3174
|
-
* //=> Thu Sep 11 2014 00:00:00
|
|
3175
|
-
*
|
|
3176
|
-
* @example
|
|
3177
|
-
* // Using Temporal:
|
|
3178
|
-
* // Add 10 days to 1 September 2014:
|
|
3179
|
-
* Temporal.PlainDate.from("2014-09-01").add({ days: 10 }).toString();
|
|
3180
|
-
* //=> "2014-09-11"
|
|
3181
|
-
*/
|
|
3182
|
-
function addDays(date, amount, options) {
|
|
3183
|
-
const _date = toDate(date);
|
|
3184
|
-
if (isNaN(amount)) return constructFrom(date, NaN);
|
|
3185
|
-
|
|
3186
|
-
// If 0 days, no-op to avoid changing times in the hour before end of DST
|
|
3187
|
-
if (!amount) return _date;
|
|
3188
|
-
|
|
3189
|
-
_date.setDate(_date.getDate() + amount);
|
|
3190
|
-
return _date;
|
|
3191
|
-
}
|
|
3192
|
-
|
|
3193
|
-
/**
|
|
3194
|
-
* The {@link addMonths} function options.
|
|
3195
|
-
*/
|
|
3196
|
-
|
|
3197
|
-
/**
|
|
3198
|
-
* @name addMonths
|
|
3199
|
-
* @category Month Helpers
|
|
3200
|
-
* @summary Add the specified number of months to the given date.
|
|
3201
|
-
*
|
|
3202
|
-
* @description
|
|
3203
|
-
* Add the specified number of months to the given date.
|
|
3204
|
-
*
|
|
3205
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
3206
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
3207
|
-
*
|
|
3208
|
-
* @param date - The date to be changed
|
|
3209
|
-
* @param amount - The amount of months to be added.
|
|
3210
|
-
* @param options - The options object
|
|
3211
|
-
*
|
|
3212
|
-
* @returns The new date with the months added
|
|
3213
|
-
*
|
|
3214
|
-
* @example
|
|
3215
|
-
* // Add 5 months to 1 September 2014:
|
|
3216
|
-
* const result = addMonths(new Date(2014, 8, 1), 5)
|
|
3217
|
-
* //=> Sun Feb 01 2015 00:00:00
|
|
3218
|
-
*
|
|
3219
|
-
* // Add one month to 30 January 2023:
|
|
3220
|
-
* const result = addMonths(new Date(2023, 0, 30), 1)
|
|
3221
|
-
* //=> Tue Feb 28 2023 00:00:00
|
|
3222
|
-
*/
|
|
3223
|
-
function addMonths(date, amount, options) {
|
|
3224
|
-
const _date = toDate(date);
|
|
3225
|
-
if (isNaN(amount)) return constructFrom(date, NaN);
|
|
3226
|
-
const dayOfMonth = _date.getDate();
|
|
3227
|
-
|
|
3228
|
-
// The JS Date object supports date math by accepting out-of-bounds values for
|
|
3229
|
-
// month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and
|
|
3230
|
-
// new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we
|
|
3231
|
-
// want except that dates will wrap around the end of a month, meaning that
|
|
3232
|
-
// new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So
|
|
3233
|
-
// we'll default to the end of the desired month by adding 1 to the desired
|
|
3234
|
-
// month and using a date of 0 to back up one day to the end of the desired
|
|
3235
|
-
// month.
|
|
3236
|
-
const endOfDesiredMonth = constructFrom(date, _date.getTime());
|
|
3237
|
-
endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);
|
|
3238
|
-
const daysInMonth = endOfDesiredMonth.getDate();
|
|
3239
|
-
if (dayOfMonth >= daysInMonth) {
|
|
3240
|
-
// If we're already at the end of the month, then this is the correct date
|
|
3241
|
-
// and we're done.
|
|
3242
|
-
return endOfDesiredMonth;
|
|
3243
|
-
} else {
|
|
3244
|
-
// Otherwise, we now know that setting the original day-of-month value won't
|
|
3245
|
-
// cause an overflow, so set the desired day-of-month. Note that we can't
|
|
3246
|
-
// just set the date of `endOfDesiredMonth` because that object may have had
|
|
3247
|
-
// its time changed in the unusual case where where a DST transition was on
|
|
3248
|
-
// the last day of the month and its local time was in the hour skipped or
|
|
3249
|
-
// repeated next to a DST transition. So we use `date` instead which is
|
|
3250
|
-
// guaranteed to still have the original time.
|
|
3251
|
-
_date.setFullYear(
|
|
3252
|
-
endOfDesiredMonth.getFullYear(),
|
|
3253
|
-
endOfDesiredMonth.getMonth(),
|
|
3254
|
-
dayOfMonth,
|
|
3255
|
-
);
|
|
3256
|
-
return _date;
|
|
3257
|
-
}
|
|
3258
|
-
}
|
|
3259
|
-
|
|
3260
|
-
/**
|
|
3261
|
-
* The {@link startOfDay} function options.
|
|
3262
|
-
*/
|
|
3263
|
-
|
|
3264
|
-
/**
|
|
3265
|
-
* @name startOfDay
|
|
3266
|
-
* @category Day Helpers
|
|
3267
|
-
* @summary Return the start of a day for the given date.
|
|
3268
|
-
*
|
|
3269
|
-
* @description
|
|
3270
|
-
* Return the start of a day for the given date.
|
|
3271
|
-
* The result will be in the local timezone.
|
|
3272
|
-
*
|
|
3273
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
3274
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
3275
|
-
*
|
|
3276
|
-
* @param date - The original date
|
|
3277
|
-
* @param options - The options
|
|
3278
|
-
*
|
|
3279
|
-
* @returns The start of a day
|
|
3280
|
-
*
|
|
3281
|
-
* @example
|
|
3282
|
-
* // The start of a day for 2 September 2014 11:55:00:
|
|
3283
|
-
* const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
|
|
3284
|
-
* //=> Tue Sep 02 2014 00:00:00
|
|
3285
|
-
*/
|
|
3286
|
-
function startOfDay(date, options) {
|
|
3287
|
-
const _date = toDate(date);
|
|
3288
|
-
_date.setHours(0, 0, 0, 0);
|
|
3289
|
-
return _date;
|
|
3290
|
-
}
|
|
3291
|
-
|
|
3292
|
-
/**
|
|
3293
|
-
* The {@link endOfDay} function options.
|
|
3294
|
-
*/
|
|
3295
|
-
|
|
3296
|
-
/**
|
|
3297
|
-
* @name endOfDay
|
|
3298
|
-
* @category Day Helpers
|
|
3299
|
-
* @summary Return the end of a day for the given date.
|
|
3300
|
-
*
|
|
3301
|
-
* @description
|
|
3302
|
-
* Return the end of a day for the given date.
|
|
3303
|
-
* The result will be in the local timezone.
|
|
3304
|
-
*
|
|
3305
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
3306
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
3307
|
-
*
|
|
3308
|
-
* @param date - The original date
|
|
3309
|
-
* @param options - An object with options
|
|
3310
|
-
*
|
|
3311
|
-
* @returns The end of a day
|
|
3312
|
-
*
|
|
3313
|
-
* @example
|
|
3314
|
-
* // The end of a day for 2 September 2014 11:55:00:
|
|
3315
|
-
* const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))
|
|
3316
|
-
* //=> Tue Sep 02 2014 23:59:59.999
|
|
3317
|
-
*/
|
|
3318
|
-
function endOfDay(date, options) {
|
|
3319
|
-
const _date = toDate(date);
|
|
3320
|
-
_date.setHours(23, 59, 59, 999);
|
|
3321
|
-
return _date;
|
|
3322
|
-
}
|
|
3323
|
-
|
|
3324
|
-
/**
|
|
3325
|
-
* The {@link endOfMonth} function options.
|
|
3326
|
-
*/
|
|
3327
|
-
|
|
3328
|
-
/**
|
|
3329
|
-
* @name endOfMonth
|
|
3330
|
-
* @category Month Helpers
|
|
3331
|
-
* @summary Return the end of a month for the given date.
|
|
3332
|
-
*
|
|
3333
|
-
* @description
|
|
3334
|
-
* Return the end of a month for the given date.
|
|
3335
|
-
* The result will be in the local timezone.
|
|
3336
|
-
*
|
|
3337
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
3338
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
3339
|
-
*
|
|
3340
|
-
* @param date - The original date
|
|
3341
|
-
* @param options - An object with options
|
|
3342
|
-
*
|
|
3343
|
-
* @returns The end of a month
|
|
3344
|
-
*
|
|
3345
|
-
* @example
|
|
3346
|
-
* // The end of a month for 2 September 2014 11:55:00:
|
|
3347
|
-
* const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))
|
|
3348
|
-
* //=> Tue Sep 30 2014 23:59:59.999
|
|
3349
|
-
*/
|
|
3350
|
-
function endOfMonth(date, options) {
|
|
3351
|
-
const _date = toDate(date);
|
|
3352
|
-
const month = _date.getMonth();
|
|
3353
|
-
_date.setFullYear(_date.getFullYear(), month + 1, 0);
|
|
3354
|
-
_date.setHours(23, 59, 59, 999);
|
|
3355
|
-
return _date;
|
|
3356
|
-
}
|
|
3357
|
-
|
|
3358
|
-
/**
|
|
3359
|
-
* The {@link startOfMonth} function options.
|
|
3360
|
-
*/
|
|
3361
|
-
|
|
3362
|
-
/**
|
|
3363
|
-
* @name startOfMonth
|
|
3364
|
-
* @category Month Helpers
|
|
3365
|
-
* @summary Return the start of a month for the given date.
|
|
3366
|
-
*
|
|
3367
|
-
* @description
|
|
3368
|
-
* Return the start of a month for the given date. The result will be in the local timezone.
|
|
3369
|
-
*
|
|
3370
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments.
|
|
3371
|
-
* Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
3372
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed,
|
|
3373
|
-
* or inferred from the arguments.
|
|
3374
|
-
*
|
|
3375
|
-
* @param date - The original date
|
|
3376
|
-
* @param options - An object with options
|
|
3377
|
-
*
|
|
3378
|
-
* @returns The start of a month
|
|
3379
|
-
*
|
|
3380
|
-
* @example
|
|
3381
|
-
* // The start of a month for 2 September 2014 11:55:00:
|
|
3382
|
-
* const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))
|
|
3383
|
-
* //=> Mon Sep 01 2014 00:00:00
|
|
3384
|
-
*/
|
|
3385
|
-
function startOfMonth(date, options) {
|
|
3386
|
-
const _date = toDate(date);
|
|
3387
|
-
_date.setDate(1);
|
|
3388
|
-
_date.setHours(0, 0, 0, 0);
|
|
3389
|
-
return _date;
|
|
3390
|
-
}
|
|
3391
|
-
|
|
3392
|
-
/**
|
|
3393
|
-
* The {@link startOfYear} function options.
|
|
3394
|
-
*/
|
|
3395
|
-
|
|
3396
|
-
/**
|
|
3397
|
-
* @name startOfYear
|
|
3398
|
-
* @category Year Helpers
|
|
3399
|
-
* @summary Return the start of a year for the given date.
|
|
3400
|
-
*
|
|
3401
|
-
* @description
|
|
3402
|
-
* Return the start of a year for the given date.
|
|
3403
|
-
* The result will be in the local timezone.
|
|
3404
|
-
*
|
|
3405
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
3406
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
3407
|
-
*
|
|
3408
|
-
* @param date - The original date
|
|
3409
|
-
* @param options - The options
|
|
3410
|
-
*
|
|
3411
|
-
* @returns The start of a year
|
|
3412
|
-
*
|
|
3413
|
-
* @example
|
|
3414
|
-
* // The start of a year for 2 September 2014 11:55:00:
|
|
3415
|
-
* const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))
|
|
3416
|
-
* //=> Wed Jan 01 2014 00:00:00
|
|
3417
|
-
*/
|
|
3418
|
-
function startOfYear(date, options) {
|
|
3419
|
-
const date_ = toDate(date);
|
|
3420
|
-
date_.setFullYear(date_.getFullYear(), 0, 1);
|
|
3421
|
-
date_.setHours(0, 0, 0, 0);
|
|
3422
|
-
return date_;
|
|
3423
|
-
}
|
|
3424
|
-
|
|
3425
|
-
/**
|
|
3426
|
-
* The {@link subDays} function options.
|
|
3427
|
-
*/
|
|
3428
|
-
|
|
3429
|
-
/**
|
|
3430
|
-
* @name subDays
|
|
3431
|
-
* @category Day Helpers
|
|
3432
|
-
* @summary Subtract the specified number of days from the given date.
|
|
3433
|
-
*
|
|
3434
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
3435
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
3436
|
-
*
|
|
3437
|
-
* @param date - The date to be changed
|
|
3438
|
-
* @param amount - The amount of days to be subtracted.
|
|
3439
|
-
* @param options - An object with options
|
|
3440
|
-
*
|
|
3441
|
-
* @returns The new date with the days subtracted
|
|
3442
|
-
*
|
|
3443
|
-
* @example
|
|
3444
|
-
* // Subtract 10 days from 1 September 2014:
|
|
3445
|
-
* const result = subDays(new Date(2014, 8, 1), 10)
|
|
3446
|
-
* //=> Fri Aug 22 2014 00:00:00
|
|
3447
|
-
*/
|
|
3448
|
-
function subDays(date, amount, options) {
|
|
3449
|
-
return addDays(date, -amount);
|
|
3450
|
-
}
|
|
3451
|
-
|
|
3452
|
-
/**
|
|
3453
|
-
* The subMonths function options.
|
|
3454
|
-
*/
|
|
3455
|
-
|
|
3456
|
-
/**
|
|
3457
|
-
* @name subMonths
|
|
3458
|
-
* @category Month Helpers
|
|
3459
|
-
* @summary Subtract the specified number of months from the given date.
|
|
3460
|
-
*
|
|
3461
|
-
* @description
|
|
3462
|
-
* Subtract the specified number of months from the given date.
|
|
3463
|
-
*
|
|
3464
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
3465
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
3466
|
-
*
|
|
3467
|
-
* @param date - The date to be changed
|
|
3468
|
-
* @param amount - The amount of months to be subtracted.
|
|
3469
|
-
* @param options - An object with options
|
|
3470
|
-
*
|
|
3471
|
-
* @returns The new date with the months subtracted
|
|
3472
|
-
*
|
|
3473
|
-
* @example
|
|
3474
|
-
* // Subtract 5 months from 1 February 2015:
|
|
3475
|
-
* const result = subMonths(new Date(2015, 1, 1), 5)
|
|
3476
|
-
* //=> Mon Sep 01 2014 00:00:00
|
|
3477
|
-
*/
|
|
3478
|
-
function subMonths(date, amount, options) {
|
|
3479
|
-
return addMonths(date, -1);
|
|
2609
|
+
return (jsxRuntime.jsxs(LabelContainer$2, { className: className, "data-mod-header-label": true, children: [children && jsxRuntime.jsx(LabelText$1, { children: children }), helpTooltip && (jsxRuntime.jsx(Tooltip, { title: helpTooltip, placement: "top", children: jsxRuntime.jsx(IconWrapper, { children: jsxRuntime.jsx(lucideReact.HelpCircle, {}) }) }))] }));
|
|
3480
2610
|
}
|
|
3481
2611
|
|
|
3482
2612
|
// Cast ModButton to a simpler type for styled() compatibility (avoids generic inference issues)
|
|
@@ -3511,9 +2641,9 @@ const StyledNavButton = styles.styled(IconButton, {
|
|
|
3511
2641
|
};
|
|
3512
2642
|
const sizeStyles = sizeConfig[size];
|
|
3513
2643
|
const activeNavStyles = {
|
|
3514
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
2644
|
+
backgroundColor: designSystemTokens.semanticColors.color.icon.bgPressed,
|
|
3515
2645
|
borderColor: 'transparent',
|
|
3516
|
-
color: designSystemTokens.semanticColors.
|
|
2646
|
+
color: designSystemTokens.semanticColors.button.primary.bgPressed,
|
|
3517
2647
|
};
|
|
3518
2648
|
return {
|
|
3519
2649
|
width: sizeStyles.width,
|
|
@@ -3524,25 +2654,25 @@ const StyledNavButton = styles.styled(IconButton, {
|
|
|
3524
2654
|
duration: theme.transitions.duration.short,
|
|
3525
2655
|
}),
|
|
3526
2656
|
'&:focus-visible': {
|
|
3527
|
-
outline: `2px solid ${designSystemTokens.semanticColors.border.focus}`,
|
|
2657
|
+
outline: `2px solid ${designSystemTokens.semanticColors.color.border.focus}`,
|
|
3528
2658
|
outlineOffset: 2,
|
|
3529
2659
|
},
|
|
3530
2660
|
// Nav styles
|
|
3531
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
3532
|
-
color: designSystemTokens.semanticColors.
|
|
3533
|
-
border: `1px solid ${designSystemTokens.semanticColors.border.
|
|
2661
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
2662
|
+
color: designSystemTokens.semanticColors.color.icon.default,
|
|
2663
|
+
border: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
3534
2664
|
'&:hover': {
|
|
3535
|
-
backgroundColor: designSystemTokens.semanticColors.input.
|
|
3536
|
-
borderColor: designSystemTokens.semanticColors.border.primary,
|
|
3537
|
-
color: designSystemTokens.semanticColors.
|
|
2665
|
+
backgroundColor: designSystemTokens.semanticColors.input.bgHover,
|
|
2666
|
+
borderColor: designSystemTokens.semanticColors.color.border.primary,
|
|
2667
|
+
color: designSystemTokens.semanticColors.color.icon.default,
|
|
3538
2668
|
},
|
|
3539
2669
|
'&:active': activeNavStyles,
|
|
3540
2670
|
[`&.${IconButton.iconButtonClasses.disabled}`]: {
|
|
3541
2671
|
cursor: 'not-allowed',
|
|
3542
2672
|
pointerEvents: 'auto',
|
|
3543
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
3544
|
-
borderColor: designSystemTokens.semanticColors.border.
|
|
3545
|
-
color: designSystemTokens.semanticColors.
|
|
2673
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
2674
|
+
borderColor: designSystemTokens.semanticColors.color.border.primary,
|
|
2675
|
+
color: designSystemTokens.semanticColors.color.icon.disabled,
|
|
3546
2676
|
opacity: 0.5,
|
|
3547
2677
|
},
|
|
3548
2678
|
...(active ? activeNavStyles : {}),
|
|
@@ -3569,130 +2699,130 @@ const defaultRangeShortcuts = [
|
|
|
3569
2699
|
label: 'Today',
|
|
3570
2700
|
getValue: () => {
|
|
3571
2701
|
const today = new Date();
|
|
3572
|
-
return [startOfDay(today), endOfDay(today)];
|
|
2702
|
+
return [dateFns.startOfDay(today), dateFns.endOfDay(today)];
|
|
3573
2703
|
},
|
|
3574
2704
|
},
|
|
3575
2705
|
{
|
|
3576
2706
|
label: 'Last 7 days',
|
|
3577
2707
|
getValue: () => {
|
|
3578
2708
|
const today = new Date();
|
|
3579
|
-
return [startOfDay(subDays(today, 6)), endOfDay(today)];
|
|
2709
|
+
return [dateFns.startOfDay(dateFns.subDays(today, 6)), dateFns.endOfDay(today)];
|
|
3580
2710
|
},
|
|
3581
2711
|
},
|
|
3582
2712
|
{
|
|
3583
2713
|
label: 'Last 30 days',
|
|
3584
2714
|
getValue: () => {
|
|
3585
2715
|
const today = new Date();
|
|
3586
|
-
return [startOfDay(subDays(today, 29)), endOfDay(today)];
|
|
2716
|
+
return [dateFns.startOfDay(dateFns.subDays(today, 29)), dateFns.endOfDay(today)];
|
|
3587
2717
|
},
|
|
3588
2718
|
},
|
|
3589
2719
|
{
|
|
3590
2720
|
label: 'Last 60 days',
|
|
3591
2721
|
getValue: () => {
|
|
3592
2722
|
const today = new Date();
|
|
3593
|
-
return [startOfDay(subDays(today, 59)), endOfDay(today)];
|
|
2723
|
+
return [dateFns.startOfDay(dateFns.subDays(today, 59)), dateFns.endOfDay(today)];
|
|
3594
2724
|
},
|
|
3595
2725
|
},
|
|
3596
2726
|
{
|
|
3597
2727
|
label: 'Month to date',
|
|
3598
2728
|
getValue: () => {
|
|
3599
2729
|
const today = new Date();
|
|
3600
|
-
return [startOfMonth(today), endOfDay(today)];
|
|
2730
|
+
return [dateFns.startOfMonth(today), dateFns.endOfDay(today)];
|
|
3601
2731
|
},
|
|
3602
2732
|
},
|
|
3603
2733
|
{
|
|
3604
2734
|
label: 'Last month',
|
|
3605
2735
|
getValue: () => {
|
|
3606
2736
|
const today = new Date();
|
|
3607
|
-
const lastMonth = subMonths(today);
|
|
3608
|
-
return [startOfMonth(lastMonth), endOfMonth(lastMonth)];
|
|
2737
|
+
const lastMonth = dateFns.subMonths(today, 1);
|
|
2738
|
+
return [dateFns.startOfMonth(lastMonth), dateFns.endOfMonth(lastMonth)];
|
|
3609
2739
|
},
|
|
3610
2740
|
},
|
|
3611
2741
|
{
|
|
3612
2742
|
label: 'Year to date',
|
|
3613
2743
|
getValue: () => {
|
|
3614
2744
|
const today = new Date();
|
|
3615
|
-
return [startOfYear(today), endOfDay(today)];
|
|
2745
|
+
return [dateFns.startOfYear(today), dateFns.endOfDay(today)];
|
|
3616
2746
|
},
|
|
3617
2747
|
},
|
|
3618
2748
|
];
|
|
3619
2749
|
// Styled DatePicker with design system tokens
|
|
3620
2750
|
const StyledDatePicker = styles.styled(DatePicker.DatePicker)(({ theme }) => ({
|
|
3621
2751
|
[`& .${internals.pickerPopperClasses.paper}`]: {
|
|
3622
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
2752
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
3623
2753
|
boxShadow: `${designSystemTokens.shadows.dropdown.x}px ${designSystemTokens.shadows.dropdown.y}px ${designSystemTokens.shadows.dropdown.blur}px ${designSystemTokens.shadows.dropdown.spread}px ${designSystemTokens.shadows.dropdown.shadow}`,
|
|
3624
2754
|
borderRadius: `${designSystemTokens.borderRadius.s}px`,
|
|
3625
2755
|
},
|
|
3626
2756
|
[`& .${DateCalendar.dayCalendarClasses.weekDayLabel}`]: {
|
|
3627
2757
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.sm),
|
|
3628
2758
|
fontWeight: designSystemTokens.typography.fontWeight.medium,
|
|
3629
|
-
color: designSystemTokens.semanticColors.
|
|
2759
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
3630
2760
|
},
|
|
3631
2761
|
[`& .${PickerDay.pickerDayClasses.root}`]: {
|
|
3632
2762
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.sm),
|
|
3633
|
-
color: designSystemTokens.semanticColors.
|
|
2763
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
3634
2764
|
borderRadius: designSystemTokens.borderRadius.l,
|
|
3635
2765
|
'&:hover': {
|
|
3636
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
2766
|
+
backgroundColor: designSystemTokens.semanticColors.color.icon.bgHover,
|
|
3637
2767
|
},
|
|
3638
2768
|
'&.Mui-selected': {
|
|
3639
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
3640
|
-
color: designSystemTokens.semanticColors.
|
|
2769
|
+
backgroundColor: designSystemTokens.semanticColors.color.icon.active,
|
|
2770
|
+
color: designSystemTokens.semanticColors.color.surface.raised,
|
|
3641
2771
|
'&:hover': {
|
|
3642
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
2772
|
+
backgroundColor: designSystemTokens.semanticColors.color.icon.active,
|
|
3643
2773
|
},
|
|
3644
2774
|
},
|
|
3645
2775
|
[`&.${PickerDay.pickerDayClasses.today}`]: {
|
|
3646
|
-
border: `2px solid ${designSystemTokens.semanticColors.border.strong}`,
|
|
2776
|
+
border: `2px solid ${designSystemTokens.semanticColors.color.border.strong}`,
|
|
3647
2777
|
backgroundColor: 'transparent',
|
|
3648
2778
|
},
|
|
3649
2779
|
},
|
|
3650
2780
|
[`& .${PickersCalendarHeader.pickersCalendarHeaderClasses.label}`]: {
|
|
3651
2781
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.sm),
|
|
3652
2782
|
fontWeight: designSystemTokens.typography.fontWeight.semiBold,
|
|
3653
|
-
color: designSystemTokens.semanticColors.
|
|
2783
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
3654
2784
|
},
|
|
3655
2785
|
}));
|
|
3656
2786
|
// Styled DateRangePicker with design system tokens
|
|
3657
2787
|
const StyledDateRangePicker = styles.styled(DateRangePicker.DateRangePicker)(({ theme }) => ({
|
|
3658
2788
|
[`& .${internals.pickerPopperClasses.paper}`]: {
|
|
3659
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
2789
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
3660
2790
|
boxShadow: `${designSystemTokens.shadows.dropdown.x}px ${designSystemTokens.shadows.dropdown.y}px ${designSystemTokens.shadows.dropdown.blur}px ${designSystemTokens.shadows.dropdown.spread}px ${designSystemTokens.shadows.dropdown.shadow}`,
|
|
3661
2791
|
borderRadius: `${designSystemTokens.borderRadius.s}px`,
|
|
3662
2792
|
},
|
|
3663
2793
|
[`& .${DateCalendar.dayCalendarClasses.weekDayLabel}`]: {
|
|
3664
2794
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.sm),
|
|
3665
2795
|
fontWeight: designSystemTokens.typography.fontWeight.medium,
|
|
3666
|
-
color: designSystemTokens.semanticColors.
|
|
2796
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
3667
2797
|
},
|
|
3668
2798
|
[`& .${DateRangePickerDay.dateRangePickerDayClasses.root}`]: {
|
|
3669
2799
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.sm),
|
|
3670
|
-
color: designSystemTokens.semanticColors.
|
|
2800
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
3671
2801
|
borderRadius: designSystemTokens.borderRadius.l,
|
|
3672
2802
|
'&:hover': {
|
|
3673
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
2803
|
+
backgroundColor: designSystemTokens.semanticColors.color.icon.bgHover,
|
|
3674
2804
|
},
|
|
3675
2805
|
'&.Mui-selected': {
|
|
3676
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
3677
|
-
color: designSystemTokens.semanticColors.
|
|
2806
|
+
backgroundColor: designSystemTokens.semanticColors.color.icon.active,
|
|
2807
|
+
color: designSystemTokens.semanticColors.color.surface.raised,
|
|
3678
2808
|
},
|
|
3679
2809
|
},
|
|
3680
2810
|
[`& .${DateRangePickerDay.dateRangePickerDayClasses.insideSelection}`]: {
|
|
3681
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
3682
|
-
color: designSystemTokens.semanticColors.
|
|
2811
|
+
backgroundColor: designSystemTokens.semanticColors.color.icon.bgHover,
|
|
2812
|
+
color: designSystemTokens.semanticColors.color.text.input,
|
|
3683
2813
|
},
|
|
3684
2814
|
[`& .${DateRangePickerDay.dateRangePickerDayClasses.selectionStart}, & .${DateRangePickerDay.dateRangePickerDayClasses.selectionEnd}`]: {
|
|
3685
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
2815
|
+
backgroundColor: designSystemTokens.semanticColors.color.icon.active,
|
|
3686
2816
|
},
|
|
3687
2817
|
[`& .${PickersCalendarHeader.pickersCalendarHeaderClasses.label}`]: {
|
|
3688
2818
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.sm),
|
|
3689
2819
|
fontWeight: designSystemTokens.typography.fontWeight.semiBold,
|
|
3690
|
-
color: designSystemTokens.semanticColors.
|
|
2820
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
3691
2821
|
},
|
|
3692
2822
|
}));
|
|
3693
|
-
const ClearIcon = () => jsxRuntime.jsx(X, { size: 20, color: designSystemTokens.semanticColors.
|
|
2823
|
+
const ClearIcon = () => jsxRuntime.jsx(lucideReact.X, { size: 20, color: designSystemTokens.semanticColors.color.icon.placeholder });
|
|
3694
2824
|
// Custom calendar icon component
|
|
3695
|
-
const CalendarIcon = () => jsxRuntime.jsx(CalendarDays, { size: 20, color: designSystemTokens.semanticColors.
|
|
2825
|
+
const CalendarIcon = () => jsxRuntime.jsx(lucideReact.CalendarDays, { size: 20, color: designSystemTokens.semanticColors.color.icon.placeholder });
|
|
3696
2826
|
// Shortcut styles to match Figma list item design (no borders, plain text)
|
|
3697
2827
|
const shortcutChipStyles = {
|
|
3698
2828
|
// Container (MuiList) styles
|
|
@@ -3701,7 +2831,7 @@ const shortcutChipStyles = {
|
|
|
3701
2831
|
[`& .${Chip.chipClasses.root}`]: {
|
|
3702
2832
|
fontSize: designSystemTokens.typography.fontSize.sm,
|
|
3703
2833
|
fontWeight: designSystemTokens.typography.fontWeight.medium,
|
|
3704
|
-
color: designSystemTokens.semanticColors.
|
|
2834
|
+
color: designSystemTokens.semanticColors.color.text.input,
|
|
3705
2835
|
backgroundColor: 'transparent',
|
|
3706
2836
|
borderRadius: `${designSystemTokens.spacing.spacing_3_4}px`,
|
|
3707
2837
|
border: 'none',
|
|
@@ -3714,7 +2844,7 @@ const shortcutChipStyles = {
|
|
|
3714
2844
|
padding: 0,
|
|
3715
2845
|
},
|
|
3716
2846
|
'&:hover': {
|
|
3717
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
2847
|
+
backgroundColor: designSystemTokens.semanticColors.button.secondary.bgHover,
|
|
3718
2848
|
},
|
|
3719
2849
|
},
|
|
3720
2850
|
};
|
|
@@ -3807,18 +2937,8 @@ const ModDatePicker = ({ type = 'single', open, label, value, rangeValue, onChan
|
|
|
3807
2937
|
};
|
|
3808
2938
|
ModDatePicker.displayName = 'ModDatePicker';
|
|
3809
2939
|
|
|
3810
|
-
/**
|
|
3811
|
-
* ModDatePickerListItem
|
|
3812
|
-
*/
|
|
3813
|
-
const ModDatePickerListItem = styles.styled('div')({});
|
|
3814
|
-
|
|
3815
|
-
/**
|
|
3816
|
-
* ModDatePickerMenu
|
|
3817
|
-
*/
|
|
3818
|
-
const ModDatePickerMenu = styles.styled('div')({});
|
|
3819
|
-
|
|
3820
2940
|
const StyledDivider = styles.styled(Divider)(() => ({
|
|
3821
|
-
borderColor: designSystemTokens.semanticColors.border.
|
|
2941
|
+
borderColor: designSystemTokens.semanticColors.color.border.primary,
|
|
3822
2942
|
marginTop: designSystemTokens.spacing.spacing_1,
|
|
3823
2943
|
marginBottom: designSystemTokens.spacing.spacing_1,
|
|
3824
2944
|
}));
|
|
@@ -3859,7 +2979,11 @@ const StyledDot = styles.styled('span', {
|
|
|
3859
2979
|
shouldForwardProp: prop => prop !== 'ownerState',
|
|
3860
2980
|
})(({ ownerState }) => {
|
|
3861
2981
|
const size = sizeMap[ownerState.size];
|
|
3862
|
-
|
|
2982
|
+
// Computed member access — the phase-2 restructure's codemod (driven from
|
|
2983
|
+
// literal TOKEN_MAP paths) cannot reach this. Fixed by hand. See
|
|
2984
|
+
// docs/superpowers/plans/2026-08-05-semantic-restructure.md
|
|
2985
|
+
// "Dynamic access — the codemod cannot see these".
|
|
2986
|
+
const palette = designSystemTokens.semanticColors.color.status[ownerState.color];
|
|
3863
2987
|
return {
|
|
3864
2988
|
display: 'inline-flex',
|
|
3865
2989
|
alignItems: 'center',
|
|
@@ -3870,10 +2994,10 @@ const StyledDot = styles.styled('span', {
|
|
|
3870
2994
|
borderRadius: '50%',
|
|
3871
2995
|
flexShrink: 0,
|
|
3872
2996
|
boxSizing: 'border-box',
|
|
3873
|
-
backgroundColor: palette.
|
|
3874
|
-
color: designSystemTokens.semanticColors.
|
|
2997
|
+
backgroundColor: palette.solid,
|
|
2998
|
+
color: designSystemTokens.semanticColors.color.text.tooltip,
|
|
3875
2999
|
...(ownerState.variant === 'outline' && {
|
|
3876
|
-
border: `3px solid ${palette.
|
|
3000
|
+
border: `3px solid ${palette.bg}`,
|
|
3877
3001
|
}),
|
|
3878
3002
|
'& > svg': {
|
|
3879
3003
|
width: '70%',
|
|
@@ -3892,9 +3016,9 @@ ModDot.displayName = 'ModDot';
|
|
|
3892
3016
|
const StyledRoot$1 = styles.styled(Paper)({
|
|
3893
3017
|
padding: designSystemTokens.spacing.spacing_2,
|
|
3894
3018
|
borderRadius: designSystemTokens.borderRadius.s,
|
|
3895
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
3896
|
-
color: designSystemTokens.semanticColors.
|
|
3897
|
-
border: `1px solid ${designSystemTokens.semanticColors.border.primary}`,
|
|
3019
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
3020
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
3021
|
+
border: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
3898
3022
|
boxShadow: `${designSystemTokens.shadows.neutral.regular.x}px ${designSystemTokens.shadows.neutral.regular.y}px ${designSystemTokens.shadows.neutral.regular.blur}px ${designSystemTokens.shadows.neutral.regular.spread}px ${designSystemTokens.shadows.neutral.regular.shadow}`,
|
|
3899
3023
|
display: 'flex',
|
|
3900
3024
|
flexDirection: 'column',
|
|
@@ -3905,14 +3029,14 @@ const Title = styles.styled('p')(({ theme }) => ({
|
|
|
3905
3029
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.sm),
|
|
3906
3030
|
fontWeight: designSystemTokens.typography.fontWeight.semiBold,
|
|
3907
3031
|
lineHeight: 1.4,
|
|
3908
|
-
color: designSystemTokens.semanticColors.
|
|
3032
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
3909
3033
|
}));
|
|
3910
3034
|
const FileName = styles.styled('p')(({ theme }) => ({
|
|
3911
3035
|
margin: 0,
|
|
3912
3036
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.xs),
|
|
3913
3037
|
fontWeight: designSystemTokens.typography.fontWeight.medium,
|
|
3914
3038
|
lineHeight: 1.5,
|
|
3915
|
-
color: designSystemTokens.semanticColors.
|
|
3039
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
3916
3040
|
overflow: 'hidden',
|
|
3917
3041
|
textOverflow: 'ellipsis',
|
|
3918
3042
|
whiteSpace: 'nowrap',
|
|
@@ -3923,16 +3047,16 @@ const ProgressLabel$1 = styles.styled('p')(({ theme }) => ({
|
|
|
3923
3047
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.xs),
|
|
3924
3048
|
fontWeight: designSystemTokens.typography.fontWeight.medium,
|
|
3925
3049
|
lineHeight: 1.5,
|
|
3926
|
-
color: designSystemTokens.semanticColors.
|
|
3050
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
3927
3051
|
flexShrink: 0,
|
|
3928
3052
|
}));
|
|
3929
3053
|
const StyledLinearProgress$1 = styles.styled(LinearProgress)({
|
|
3930
3054
|
width: '100%',
|
|
3931
3055
|
height: designSystemTokens.spacing.spacing_1,
|
|
3932
3056
|
borderRadius: designSystemTokens.borderRadius.s,
|
|
3933
|
-
backgroundColor: designSystemTokens.semanticColors.border.
|
|
3057
|
+
backgroundColor: designSystemTokens.semanticColors.color.border.primary,
|
|
3934
3058
|
[`& .${LinearProgress.linearProgressClasses.bar}`]: {
|
|
3935
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
3059
|
+
backgroundColor: designSystemTokens.semanticColors.button.primary.bg,
|
|
3936
3060
|
borderRadius: `${designSystemTokens.borderRadius.xS}px 0 0 ${designSystemTokens.borderRadius.xS}px`,
|
|
3937
3061
|
},
|
|
3938
3062
|
});
|
|
@@ -3940,7 +3064,7 @@ const ActionButton = styles.styled(IconButton)({
|
|
|
3940
3064
|
padding: 0,
|
|
3941
3065
|
width: designSystemTokens.spacing.spacing_2,
|
|
3942
3066
|
height: designSystemTokens.spacing.spacing_2,
|
|
3943
|
-
color: designSystemTokens.semanticColors.
|
|
3067
|
+
color: designSystemTokens.semanticColors.color.icon.utility,
|
|
3944
3068
|
'&:hover': {
|
|
3945
3069
|
backgroundColor: 'transparent',
|
|
3946
3070
|
},
|
|
@@ -3955,7 +3079,7 @@ const ModDownloadToast = ({ title, fileName, progress, showClose = true, showPau
|
|
|
3955
3079
|
const hasActions = showPause || showClose;
|
|
3956
3080
|
if (!hasActions)
|
|
3957
3081
|
return null;
|
|
3958
|
-
return (jsxRuntime.jsxs(Stack, { direction: "row", sx: { alignItems: 'center', gap: `${designSystemTokens.spacing.spacing_2}px` }, children: [showPause && (jsxRuntime.jsx(ActionButton, { size: "small", onClick: onPause, "aria-label": "Pause download", children: jsxRuntime.jsx(Minus, { size: designSystemTokens.spacing.spacing_2 }) })), showClose && (jsxRuntime.jsx(ActionButton, { size: "small", onClick: onClose, "aria-label": "Close", children: jsxRuntime.jsx(X, { size: designSystemTokens.spacing.spacing_2 }) }))] }));
|
|
3082
|
+
return (jsxRuntime.jsxs(Stack, { direction: "row", sx: { alignItems: 'center', gap: `${designSystemTokens.spacing.spacing_2}px` }, children: [showPause && (jsxRuntime.jsx(ActionButton, { size: "small", onClick: onPause, "aria-label": "Pause download", children: jsxRuntime.jsx(lucideReact.Minus, { size: designSystemTokens.spacing.spacing_2 }) })), showClose && (jsxRuntime.jsx(ActionButton, { size: "small", onClick: onClose, "aria-label": "Close", children: jsxRuntime.jsx(lucideReact.X, { size: designSystemTokens.spacing.spacing_2 }) }))] }));
|
|
3959
3083
|
};
|
|
3960
3084
|
return (jsxRuntime.jsxs(StyledRoot$1, { elevation: 0, role: "status", ...props, children: [jsxRuntime.jsxs(Stack, { direction: "row", sx: {
|
|
3961
3085
|
alignItems: 'flex-start',
|
|
@@ -3972,50 +3096,50 @@ const ModDownloadToast = ({ title, fileName, progress, showClose = true, showPau
|
|
|
3972
3096
|
ModDownloadToast.displayName = 'ModDownloadToast';
|
|
3973
3097
|
|
|
3974
3098
|
const buildFilledIcon = ({ displayName, fillColor, body, knockout }) => {
|
|
3975
|
-
const Component = (props) => (jsxRuntime.jsxs(SvgIcon, { viewBox: "0 0 16 16", ...props, children: [jsxRuntime.jsx("g", { fill: fillColor, children: body }), jsxRuntime.jsx("g", { stroke: designSystemTokens.semanticColors.
|
|
3099
|
+
const Component = (props) => (jsxRuntime.jsxs(SvgIcon, { viewBox: "0 0 16 16", ...props, children: [jsxRuntime.jsx("g", { fill: fillColor, children: body }), jsxRuntime.jsx("g", { stroke: designSystemTokens.semanticColors.color.surface.raised, strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", fill: "none", children: knockout })] }));
|
|
3976
3100
|
Component.displayName = displayName;
|
|
3977
3101
|
return Component;
|
|
3978
3102
|
};
|
|
3979
3103
|
const CIRCLE_BODY = (jsxRuntime.jsx("path", { d: "M8.00001 14.6666C11.6819 14.6666 14.6667 11.6818 14.6667 7.99992C14.6667 4.31802 11.6819 1.33325 8.00001 1.33325C4.31811 1.33325 1.33334 4.31802 1.33334 7.99992C1.33334 11.6818 4.31811 14.6666 8.00001 14.6666Z" }));
|
|
3980
3104
|
const ModFilledSuccess = buildFilledIcon({
|
|
3981
3105
|
displayName: 'ModFilledSuccess',
|
|
3982
|
-
fillColor: designSystemTokens.semanticColors.status.success.
|
|
3106
|
+
fillColor: designSystemTokens.semanticColors.color.status.success.solid,
|
|
3983
3107
|
body: CIRCLE_BODY,
|
|
3984
3108
|
knockout: jsxRuntime.jsx("path", { d: "M6 8.00008L7.33333 9.33341L10 6.66675" }),
|
|
3985
3109
|
});
|
|
3986
3110
|
const ModFilledQueued = buildFilledIcon({
|
|
3987
3111
|
displayName: 'ModFilledQueued',
|
|
3988
|
-
fillColor: designSystemTokens.semanticColors.status.active.
|
|
3112
|
+
fillColor: designSystemTokens.semanticColors.color.status.active.solid,
|
|
3989
3113
|
body: CIRCLE_BODY,
|
|
3990
3114
|
knockout: jsxRuntime.jsx("path", { d: "M8 4V8L10.6667 9.33333" }),
|
|
3991
3115
|
});
|
|
3992
3116
|
const ModFilledInfo = buildFilledIcon({
|
|
3993
3117
|
displayName: 'ModFilledInfo',
|
|
3994
|
-
fillColor: designSystemTokens.semanticColors.status.info.
|
|
3118
|
+
fillColor: designSystemTokens.semanticColors.color.status.info.solid,
|
|
3995
3119
|
body: CIRCLE_BODY,
|
|
3996
3120
|
knockout: (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("path", { d: "M8 10.6667V8" }), jsxRuntime.jsx("path", { d: "M8 5.33325H8.00667" })] })),
|
|
3997
3121
|
});
|
|
3998
3122
|
const ModFilledWarning = buildFilledIcon({
|
|
3999
3123
|
displayName: 'ModFilledWarning',
|
|
4000
|
-
fillColor: designSystemTokens.semanticColors.status.warning.
|
|
3124
|
+
fillColor: designSystemTokens.semanticColors.color.status.warning.solid,
|
|
4001
3125
|
body: (jsxRuntime.jsx("path", { d: "M14.4867 12L9.15335 2.66665C9.03706 2.46146 8.86842 2.29078 8.66463 2.17203C8.46084 2.05329 8.22921 1.99072 7.99335 1.99072C7.75749 1.99072 7.52585 2.05329 7.32206 2.17203C7.11828 2.29078 6.94964 2.46146 6.83335 2.66665L1.50001 12C1.38247 12.2036 1.32083 12.4346 1.32135 12.6697C1.32187 12.9047 1.38453 13.1355 1.50298 13.3385C1.62142 13.5416 1.79145 13.7097 1.99581 13.8259C2.20018 13.942 2.43162 14.0021 2.66668 14H13.3333C13.5673 13.9997 13.797 13.938 13.9995 13.8208C14.202 13.7037 14.3702 13.5354 14.487 13.3327C14.6039 13.1301 14.6654 12.9002 14.6653 12.6663C14.6653 12.4324 14.6036 12.2026 14.4867 12Z" })),
|
|
4002
3126
|
knockout: (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("path", { d: "M8 6V8.66667" }), jsxRuntime.jsx("path", { d: "M8 11.3333H8.00667" })] })),
|
|
4003
3127
|
});
|
|
4004
3128
|
const ModFilledError = buildFilledIcon({
|
|
4005
3129
|
displayName: 'ModFilledError',
|
|
4006
|
-
fillColor: designSystemTokens.semanticColors.status.error.
|
|
3130
|
+
fillColor: designSystemTokens.semanticColors.color.status.error.solid,
|
|
4007
3131
|
body: (jsxRuntime.jsx("path", { d: "M10.208 1.33325C10.5616 1.33333 10.9007 1.47385 11.1507 1.72392L14.276 4.84925C14.5261 5.09924 14.6666 5.43832 14.6667 5.79192V10.2079C14.6666 10.5615 14.5261 10.9006 14.276 11.1506L11.1507 14.2759C10.9007 14.526 10.5616 14.6665 10.208 14.6666H5.79201C5.43842 14.6665 5.09933 14.526 4.84934 14.2759L1.72401 11.1506C1.47394 10.9006 1.33342 10.5615 1.33334 10.2079V5.79192C1.33342 5.43832 1.47394 5.09924 1.72401 4.84925L4.84934 1.72392C5.09933 1.47385 5.43842 1.33333 5.79201 1.33325H10.208Z" })),
|
|
4008
3132
|
knockout: (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("path", { d: "M8 5.33325V7.99992" }), jsxRuntime.jsx("path", { d: "M8 10.6667H8.00667" })] })),
|
|
4009
3133
|
});
|
|
4010
3134
|
const ModFilledNeutral = buildFilledIcon({
|
|
4011
3135
|
displayName: 'ModFilledNeutral',
|
|
4012
|
-
fillColor: designSystemTokens.semanticColors.status.neutral.
|
|
3136
|
+
fillColor: designSystemTokens.semanticColors.color.status.neutral.solid,
|
|
4013
3137
|
body: CIRCLE_BODY,
|
|
4014
3138
|
knockout: jsxRuntime.jsx("path", { d: "M5.33334 8H10.6667" }),
|
|
4015
3139
|
});
|
|
4016
3140
|
const ModFilledCanceled = buildFilledIcon({
|
|
4017
3141
|
displayName: 'ModFilledCanceled',
|
|
4018
|
-
fillColor: designSystemTokens.semanticColors.status.canceled.
|
|
3142
|
+
fillColor: designSystemTokens.semanticColors.color.status.canceled.solid,
|
|
4019
3143
|
body: CIRCLE_BODY,
|
|
4020
3144
|
knockout: (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("path", { d: "M10 6L6 10" }), jsxRuntime.jsx("path", { d: "M6 6L10 10" })] })),
|
|
4021
3145
|
});
|
|
@@ -4025,17 +3149,17 @@ const StyledChip$1 = styles.styled(Chip, {
|
|
|
4025
3149
|
shouldForwardProp: prop => !filterChipOnlyProps.includes(prop),
|
|
4026
3150
|
})(({ theme, selected }) => ({
|
|
4027
3151
|
borderRadius: designSystemTokens.borderRadius.full,
|
|
4028
|
-
border: `1px solid ${designSystemTokens.semanticColors.
|
|
3152
|
+
border: `1px solid ${designSystemTokens.semanticColors.button.secondary.border}`,
|
|
4029
3153
|
backgroundColor: selected
|
|
4030
|
-
? designSystemTokens.semanticColors.
|
|
4031
|
-
: designSystemTokens.semanticColors.
|
|
3154
|
+
? designSystemTokens.semanticColors.button.secondary.bgPressed
|
|
3155
|
+
: designSystemTokens.semanticColors.color.surface.raised,
|
|
4032
3156
|
minHeight: 40,
|
|
4033
3157
|
padding: `${designSystemTokens.spacing.spacing_3_4}px ${designSystemTokens.spacing.spacing_1_1_2}px`,
|
|
4034
3158
|
gap: designSystemTokens.spacing.spacing_1,
|
|
4035
3159
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.sm),
|
|
4036
3160
|
fontWeight: designSystemTokens.typography.fontWeight.medium,
|
|
4037
3161
|
lineHeight: 1,
|
|
4038
|
-
color: designSystemTokens.semanticColors.
|
|
3162
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
4039
3163
|
[`& .${Chip.chipClasses.label}`]: {
|
|
4040
3164
|
padding: 0,
|
|
4041
3165
|
overflow: 'visible',
|
|
@@ -4043,23 +3167,23 @@ const StyledChip$1 = styles.styled(Chip, {
|
|
|
4043
3167
|
alignItems: 'center',
|
|
4044
3168
|
},
|
|
4045
3169
|
[`& .${Chip.chipClasses.deleteIcon}`]: {
|
|
4046
|
-
color: designSystemTokens.semanticColors.
|
|
3170
|
+
color: designSystemTokens.semanticColors.color.icon.default,
|
|
4047
3171
|
width: 24,
|
|
4048
3172
|
height: 24,
|
|
4049
3173
|
margin: 0,
|
|
4050
3174
|
flexShrink: 0,
|
|
4051
3175
|
'&:hover': {
|
|
4052
|
-
color: designSystemTokens.semanticColors.
|
|
3176
|
+
color: designSystemTokens.semanticColors.color.icon.default,
|
|
4053
3177
|
},
|
|
4054
3178
|
},
|
|
4055
3179
|
'&:hover': {
|
|
4056
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
3180
|
+
backgroundColor: designSystemTokens.semanticColors.button.secondary.bgHover,
|
|
4057
3181
|
},
|
|
4058
3182
|
[`&.${Chip.chipClasses.focusVisible}`]: {
|
|
4059
3183
|
...focusRingStyles,
|
|
4060
3184
|
backgroundColor: selected
|
|
4061
|
-
? designSystemTokens.semanticColors.
|
|
4062
|
-
: designSystemTokens.semanticColors.
|
|
3185
|
+
? designSystemTokens.semanticColors.button.secondary.bgPressed
|
|
3186
|
+
: designSystemTokens.semanticColors.color.surface.raised,
|
|
4063
3187
|
},
|
|
4064
3188
|
}));
|
|
4065
3189
|
const LabelContent = styles.styled('span')({
|
|
@@ -4078,13 +3202,13 @@ const HeaderLabel = styles.styled('span')(({ theme }) => ({
|
|
|
4078
3202
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.xxs),
|
|
4079
3203
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
4080
3204
|
lineHeight: '120%',
|
|
4081
|
-
color: designSystemTokens.semanticColors.
|
|
3205
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
4082
3206
|
}));
|
|
4083
3207
|
const SelectedLabel = styles.styled('span')(({ theme }) => ({
|
|
4084
3208
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.sm),
|
|
4085
3209
|
fontWeight: designSystemTokens.typography.fontWeight.medium,
|
|
4086
3210
|
lineHeight: 1,
|
|
4087
|
-
color: designSystemTokens.semanticColors.
|
|
3211
|
+
color: designSystemTokens.semanticColors.button.secondary.fg,
|
|
4088
3212
|
}));
|
|
4089
3213
|
const CountBadge = styles.styled('span')(({ theme }) => ({
|
|
4090
3214
|
display: 'inline-flex',
|
|
@@ -4094,8 +3218,8 @@ const CountBadge = styles.styled('span')(({ theme }) => ({
|
|
|
4094
3218
|
height: 16,
|
|
4095
3219
|
padding: `0 ${designSystemTokens.spacing.spacing_1_2}px`,
|
|
4096
3220
|
borderRadius: designSystemTokens.borderRadius.full,
|
|
4097
|
-
backgroundColor: designSystemTokens.semanticColors.brand,
|
|
4098
|
-
color: designSystemTokens.semanticColors.
|
|
3221
|
+
backgroundColor: designSystemTokens.semanticColors.color.action.brand,
|
|
3222
|
+
color: designSystemTokens.semanticColors.color.surface.raised,
|
|
4099
3223
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.xs),
|
|
4100
3224
|
fontWeight: designSystemTokens.typography.fontWeight.medium,
|
|
4101
3225
|
lineHeight: 1,
|
|
@@ -4109,7 +3233,7 @@ const CountBadge = styles.styled('span')(({ theme }) => ({
|
|
|
4109
3233
|
*/
|
|
4110
3234
|
const ModFilterChip = ({ label, selected = false, expanded, selectedLabel, count = 0, onClear, onClick, ...props }) => {
|
|
4111
3235
|
const chipLabel = selected ? (jsxRuntime.jsxs(LabelContent, { children: [jsxRuntime.jsxs(TextStack, { children: [jsxRuntime.jsx(HeaderLabel, { children: label }), jsxRuntime.jsx(SelectedLabel, { children: selectedLabel ?? label })] }), count > 0 && jsxRuntime.jsx(CountBadge, { children: count })] })) : (label);
|
|
4112
|
-
return (jsxRuntime.jsx(StyledChip$1, { label: chipLabel, selected: selected, clickable: true, onClick: onClick, onDelete: selected && onClear ? onClear : undefined, deleteIcon: jsxRuntime.jsx(X, { size: 24 }), "aria-expanded": expanded, ...props }));
|
|
3236
|
+
return (jsxRuntime.jsx(StyledChip$1, { label: chipLabel, selected: selected, clickable: true, onClick: onClick, onDelete: selected && onClear ? onClear : undefined, deleteIcon: jsxRuntime.jsx(lucideReact.X, { size: 24 }), "aria-expanded": expanded, ...props }));
|
|
4113
3237
|
};
|
|
4114
3238
|
ModFilterChip.displayName = 'ModFilterChip';
|
|
4115
3239
|
|
|
@@ -4139,7 +3263,7 @@ const SpinnerWrapper = styles.styled('div')({
|
|
|
4139
3263
|
* @example
|
|
4140
3264
|
* <ModLoadingSpinner size={32} color="#ff0000" />
|
|
4141
3265
|
*/
|
|
4142
|
-
const ModLoadingSpinner = ({ size = 24, color = designSystemTokens.semanticColors.
|
|
3266
|
+
const ModLoadingSpinner = ({ size = 24, color = designSystemTokens.semanticColors.button.primary.bg, }) => {
|
|
4143
3267
|
return (jsxRuntime.jsx(SpinnerWrapper, { style: { width: size, height: size }, children: jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsxRuntime.jsx("title", { children: "Loading Spinner" }), jsxRuntime.jsx("g", { opacity: "0.2", children: jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10", stroke: color, strokeWidth: "2.1" }) }), jsxRuntime.jsx("path", { d: "M12 2C6.477 2 2 6.477 2 12", stroke: color, strokeWidth: "2.1", strokeLinecap: "round" })] }) }));
|
|
4144
3268
|
};
|
|
4145
3269
|
ModLoadingSpinner.displayName = 'ModLoadingSpinner';
|
|
@@ -4147,8 +3271,8 @@ ModLoadingSpinner.displayName = 'ModLoadingSpinner';
|
|
|
4147
3271
|
const StyledFooter = styles.styled(Box, {
|
|
4148
3272
|
shouldForwardProp: prop => prop !== 'showShadow',
|
|
4149
3273
|
})(({ theme, showShadow = false }) => ({
|
|
4150
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
4151
|
-
borderTop: `1px solid ${designSystemTokens.semanticColors.border.primary}`,
|
|
3274
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
3275
|
+
borderTop: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
4152
3276
|
display: 'flex',
|
|
4153
3277
|
alignItems: 'center',
|
|
4154
3278
|
justifyContent: 'center',
|
|
@@ -4176,7 +3300,7 @@ const ResultText = styles.styled('p')(({ theme }) => ({
|
|
|
4176
3300
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.default),
|
|
4177
3301
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
4178
3302
|
lineHeight: 1.5,
|
|
4179
|
-
color: designSystemTokens.semanticColors.
|
|
3303
|
+
color: designSystemTokens.semanticColors.color.text.primary, // typography/body: #232342
|
|
4180
3304
|
margin: 0,
|
|
4181
3305
|
whiteSpace: 'pre',
|
|
4182
3306
|
}));
|
|
@@ -4185,7 +3309,7 @@ const LoadMoreButton = styles.styled('button')(({ theme }) => ({
|
|
|
4185
3309
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.default),
|
|
4186
3310
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
4187
3311
|
lineHeight: 'normal',
|
|
4188
|
-
color: designSystemTokens.semanticColors.
|
|
3312
|
+
color: designSystemTokens.semanticColors.color.text.link,
|
|
4189
3313
|
background: 'none',
|
|
4190
3314
|
border: 'none',
|
|
4191
3315
|
padding: 0,
|
|
@@ -4195,7 +3319,7 @@ const LoadMoreButton = styles.styled('button')(({ theme }) => ({
|
|
|
4195
3319
|
textDecoration: 'underline',
|
|
4196
3320
|
},
|
|
4197
3321
|
'&:disabled': {
|
|
4198
|
-
color: designSystemTokens.semanticColors.
|
|
3322
|
+
color: designSystemTokens.semanticColors.button.fgDisabled,
|
|
4199
3323
|
cursor: 'not-allowed',
|
|
4200
3324
|
},
|
|
4201
3325
|
}));
|
|
@@ -4204,7 +3328,7 @@ const SelectedText = styles.styled('p')(({ theme }) => ({
|
|
|
4204
3328
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.default),
|
|
4205
3329
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
4206
3330
|
lineHeight: 1.5,
|
|
4207
|
-
color: designSystemTokens.semanticColors.
|
|
3331
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
4208
3332
|
margin: 0,
|
|
4209
3333
|
whiteSpace: 'pre',
|
|
4210
3334
|
}));
|
|
@@ -4218,15 +3342,15 @@ const PaginationButton = styles.styled(IconButton)(({ disabled }) => ({
|
|
|
4218
3342
|
width: designSystemTokens.spacing.spacing_5_1_2,
|
|
4219
3343
|
height: designSystemTokens.spacing.spacing_5_1_2,
|
|
4220
3344
|
padding: designSystemTokens.spacing.spacing_1,
|
|
4221
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
3345
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
4222
3346
|
borderRadius: designSystemTokens.borderRadius.full,
|
|
4223
3347
|
'&:hover': {
|
|
4224
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
3348
|
+
backgroundColor: designSystemTokens.semanticColors.button.secondary.bgHover,
|
|
4225
3349
|
},
|
|
4226
3350
|
'& svg': {
|
|
4227
3351
|
width: 24,
|
|
4228
3352
|
height: 24,
|
|
4229
|
-
color: disabled ? designSystemTokens.semanticColors.
|
|
3353
|
+
color: disabled ? designSystemTokens.semanticColors.color.icon.disabled : designSystemTokens.semanticColors.color.icon.default,
|
|
4230
3354
|
},
|
|
4231
3355
|
}));
|
|
4232
3356
|
const PaginationText = styles.styled('p')(({ theme }) => ({
|
|
@@ -4234,7 +3358,7 @@ const PaginationText = styles.styled('p')(({ theme }) => ({
|
|
|
4234
3358
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.default),
|
|
4235
3359
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
4236
3360
|
lineHeight: 1.5,
|
|
4237
|
-
color: designSystemTokens.semanticColors.
|
|
3361
|
+
color: designSystemTokens.semanticColors.color.text.primary, // typography/body: #232342
|
|
4238
3362
|
margin: 0,
|
|
4239
3363
|
whiteSpace: 'pre',
|
|
4240
3364
|
}));
|
|
@@ -4356,7 +3480,7 @@ const ModFooter = ({ variant = 'pagination', showShadow = false, loading = false
|
|
|
4356
3480
|
}, children: jsxRuntime.jsx(ModLoadingSpinner, {}) }), jsxRuntime.jsxs(ResultText, { children: [rowCount, " results "] })] }), jsxRuntime.jsx(LoadMoreButton, { onClick: onLoadMore, disabled: !hasMore, children: "Load more" })] }));
|
|
4357
3481
|
}
|
|
4358
3482
|
// Pagination variant
|
|
4359
|
-
return (jsxRuntime.jsxs(StyledFooter, { showShadow: showShadow, sx: { justifyContent: 'space-between' }, children: [showSelected ? jsxRuntime.jsxs(SelectedText, { children: [selectedCount, " selected"] }) : jsxRuntime.jsx(Box, {}), jsxRuntime.jsxs(PaginationContainer, { children: [jsxRuntime.jsx(PaginationText, { children: derivePaginationInfo() }), jsxRuntime.jsxs(Box, { sx: { display: 'flex', gap: `${designSystemTokens.spacing.spacing_1_4}px` }, children: [jsxRuntime.jsx(PaginationButton, { onClick: handlePreviousPage, disabled: !deriveHasPreviousPage(), "aria-label": "Previous page", children: jsxRuntime.jsx(ChevronLeft, {}) }), jsxRuntime.jsx(PaginationButton, { onClick: handleNextPage, disabled: !deriveHasNextPage(), "aria-label": "Next page", children: jsxRuntime.jsx(ChevronRight, {}) })] })] })] }));
|
|
3483
|
+
return (jsxRuntime.jsxs(StyledFooter, { showShadow: showShadow, sx: { justifyContent: 'space-between' }, children: [showSelected ? jsxRuntime.jsxs(SelectedText, { children: [selectedCount, " selected"] }) : jsxRuntime.jsx(Box, {}), jsxRuntime.jsxs(PaginationContainer, { children: [jsxRuntime.jsx(PaginationText, { children: derivePaginationInfo() }), jsxRuntime.jsxs(Box, { sx: { display: 'flex', gap: `${designSystemTokens.spacing.spacing_1_4}px` }, children: [jsxRuntime.jsx(PaginationButton, { onClick: handlePreviousPage, disabled: !deriveHasPreviousPage(), "aria-label": "Previous page", children: jsxRuntime.jsx(lucideReact.ChevronLeft, {}) }), jsxRuntime.jsx(PaginationButton, { onClick: handleNextPage, disabled: !deriveHasNextPage(), "aria-label": "Next page", children: jsxRuntime.jsx(lucideReact.ChevronRight, {}) })] })] })] }));
|
|
4360
3484
|
};
|
|
4361
3485
|
ModFooter.displayName = 'ModFooter';
|
|
4362
3486
|
|
|
@@ -4493,31 +3617,31 @@ const StyledFormControl = styles.styled(FormControl, {
|
|
|
4493
3617
|
width: '100%',
|
|
4494
3618
|
};
|
|
4495
3619
|
});
|
|
4496
|
-
const StyledInputLabel = styles.styled(
|
|
3620
|
+
const StyledInputLabel = styles.styled(MuiInputLabel, {
|
|
4497
3621
|
shouldForwardProp: prop => prop !== 'size' && prop !== 'infoIcon',
|
|
4498
3622
|
})(({ theme }) => ({
|
|
4499
3623
|
position: 'static',
|
|
4500
3624
|
transform: 'none',
|
|
4501
3625
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.sm),
|
|
4502
3626
|
fontWeight: designSystemTokens.typography.fontWeight.medium,
|
|
4503
|
-
color: designSystemTokens.semanticColors.
|
|
3627
|
+
color: designSystemTokens.semanticColors.color.text.inputLabel,
|
|
4504
3628
|
display: 'flex',
|
|
4505
3629
|
alignItems: 'center',
|
|
4506
3630
|
gap: designSystemTokens.spacing.spacing_1_4,
|
|
4507
|
-
[`&.${
|
|
4508
|
-
color: designSystemTokens.semanticColors.
|
|
3631
|
+
[`&.${MuiInputLabel.inputLabelClasses.focused}`]: {
|
|
3632
|
+
color: designSystemTokens.semanticColors.color.text.inputLabel,
|
|
4509
3633
|
},
|
|
4510
|
-
[`&.${
|
|
4511
|
-
color: designSystemTokens.semanticColors.
|
|
3634
|
+
[`&.${MuiInputLabel.inputLabelClasses.disabled}`]: {
|
|
3635
|
+
color: designSystemTokens.semanticColors.button.fgDisabled,
|
|
4512
3636
|
},
|
|
4513
|
-
[`&.${
|
|
4514
|
-
color: designSystemTokens.semanticColors.
|
|
3637
|
+
[`&.${MuiInputLabel.inputLabelClasses.error}`]: {
|
|
3638
|
+
color: designSystemTokens.semanticColors.color.text.inputLabel,
|
|
4515
3639
|
},
|
|
4516
3640
|
}));
|
|
4517
3641
|
const InfoIconWrapper = styles.styled('span')({
|
|
4518
3642
|
display: 'inline-flex',
|
|
4519
3643
|
alignItems: 'center',
|
|
4520
|
-
color: designSystemTokens.semanticColors.
|
|
3644
|
+
color: designSystemTokens.semanticColors.color.icon.placeholder,
|
|
4521
3645
|
});
|
|
4522
3646
|
const StyledInputBase = styles.styled(InputBase, {
|
|
4523
3647
|
shouldForwardProp: prop => prop !== 'size' && prop !== 'destructive',
|
|
@@ -4541,50 +3665,52 @@ const StyledInputBase = styles.styled(InputBase, {
|
|
|
4541
3665
|
height: multiline ? 'auto' : sizeStyles.height,
|
|
4542
3666
|
fontSize: sizeStyles.fontSize,
|
|
4543
3667
|
borderRadius: sizeStyles.borderRadius,
|
|
4544
|
-
backgroundColor: designSystemTokens.semanticColors.input.
|
|
4545
|
-
border: `1px solid ${destructive ? designSystemTokens.semanticColors.status.error.
|
|
3668
|
+
backgroundColor: designSystemTokens.semanticColors.input.bg,
|
|
3669
|
+
border: `1px solid ${destructive ? designSystemTokens.semanticColors.color.status.error.solid : designSystemTokens.semanticColors.color.border.primary}`,
|
|
4546
3670
|
transition: theme.transitions.create(['border-color', 'background-color'], {
|
|
4547
3671
|
duration: theme.transitions.duration.short,
|
|
4548
3672
|
}),
|
|
4549
3673
|
[`& .${InputBase.inputBaseClasses.input}`]: {
|
|
4550
3674
|
padding: sizeStyles.padding,
|
|
4551
|
-
color: designSystemTokens.semanticColors.
|
|
3675
|
+
color: designSystemTokens.semanticColors.color.text.input,
|
|
4552
3676
|
// Tabular figures, no tracking — see Badge.tsx.
|
|
4553
3677
|
fontVariantNumeric: 'tabular-nums',
|
|
4554
3678
|
'&::placeholder': {
|
|
4555
|
-
color: designSystemTokens.semanticColors.
|
|
3679
|
+
color: designSystemTokens.semanticColors.color.text.inputPlaceholder,
|
|
4556
3680
|
},
|
|
4557
3681
|
},
|
|
4558
3682
|
// Hover state
|
|
4559
3683
|
'&:hover': {
|
|
4560
|
-
backgroundColor: designSystemTokens.semanticColors.input.
|
|
3684
|
+
backgroundColor: designSystemTokens.semanticColors.input.bgHover,
|
|
4561
3685
|
borderColor: destructive
|
|
4562
|
-
? designSystemTokens.semanticColors.status.error.
|
|
4563
|
-
: designSystemTokens.semanticColors.border.primary,
|
|
3686
|
+
? designSystemTokens.semanticColors.color.status.error.solid
|
|
3687
|
+
: designSystemTokens.semanticColors.color.border.primary,
|
|
4564
3688
|
},
|
|
4565
3689
|
// Focused state
|
|
4566
3690
|
[`&.${InputBase.inputBaseClasses.focused}`]: {
|
|
4567
|
-
backgroundColor: designSystemTokens.semanticColors.input.
|
|
3691
|
+
backgroundColor: designSystemTokens.semanticColors.input.bg,
|
|
4568
3692
|
borderColor: destructive
|
|
4569
|
-
? designSystemTokens.semanticColors.status.error.
|
|
4570
|
-
: designSystemTokens.semanticColors.
|
|
3693
|
+
? designSystemTokens.semanticColors.color.status.error.solid
|
|
3694
|
+
: designSystemTokens.semanticColors.button.primary.bg,
|
|
4571
3695
|
},
|
|
4572
3696
|
// Disabled state
|
|
4573
3697
|
[`&.${InputBase.inputBaseClasses.disabled}`]: {
|
|
4574
|
-
backgroundColor: designSystemTokens.semanticColors.input.
|
|
4575
|
-
borderColor: designSystemTokens.semanticColors.border.primary,
|
|
4576
|
-
color: designSystemTokens.semanticColors.
|
|
3698
|
+
backgroundColor: designSystemTokens.semanticColors.input.bgDisabled,
|
|
3699
|
+
borderColor: designSystemTokens.semanticColors.color.border.primary,
|
|
3700
|
+
color: designSystemTokens.semanticColors.button.fgDisabled,
|
|
4577
3701
|
[`& .${InputBase.inputBaseClasses.input}`]: {
|
|
4578
|
-
WebkitTextFillColor: designSystemTokens.semanticColors.
|
|
3702
|
+
WebkitTextFillColor: designSystemTokens.semanticColors.button.fgDisabled,
|
|
4579
3703
|
},
|
|
4580
3704
|
},
|
|
4581
3705
|
// Error state
|
|
4582
3706
|
[`&.${InputBase.inputBaseClasses.error}`]: {
|
|
4583
|
-
borderColor: designSystemTokens.semanticColors.status.error.
|
|
3707
|
+
borderColor: designSystemTokens.semanticColors.color.status.error.solid,
|
|
4584
3708
|
},
|
|
4585
3709
|
// Adornment styling
|
|
4586
3710
|
[`& .${InputAdornment.inputAdornmentClasses.root}`]: {
|
|
4587
|
-
color: destructive
|
|
3711
|
+
color: destructive
|
|
3712
|
+
? designSystemTokens.semanticColors.color.status.error.solid
|
|
3713
|
+
: designSystemTokens.semanticColors.color.icon.placeholder,
|
|
4588
3714
|
},
|
|
4589
3715
|
};
|
|
4590
3716
|
});
|
|
@@ -4596,12 +3722,12 @@ const StyledFormHelperText = styles.styled(FormHelperText, {
|
|
|
4596
3722
|
marginRight: 0,
|
|
4597
3723
|
// Figma specifies 14px for helper text
|
|
4598
3724
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.sm),
|
|
4599
|
-
color: designSystemTokens.semanticColors.
|
|
3725
|
+
color: designSystemTokens.semanticColors.color.text.inputHelper,
|
|
4600
3726
|
[`&.${FormHelperText.formHelperTextClasses.error}`]: {
|
|
4601
|
-
color: designSystemTokens.semanticColors.status.error.
|
|
3727
|
+
color: designSystemTokens.semanticColors.color.status.error.solid,
|
|
4602
3728
|
},
|
|
4603
3729
|
[`&.${FormHelperText.formHelperTextClasses.disabled}`]: {
|
|
4604
|
-
color: designSystemTokens.semanticColors.
|
|
3730
|
+
color: designSystemTokens.semanticColors.button.fgDisabled,
|
|
4605
3731
|
},
|
|
4606
3732
|
};
|
|
4607
3733
|
});
|
|
@@ -4611,7 +3737,7 @@ const StyledFormHelperText = styles.styled(FormHelperText, {
|
|
|
4611
3737
|
const ModInputField = ({ size = 'medium', destructive = false, label, required = false, infoIcon, helperText, errorMessage, startIcon, endIcon, disabled, id, ...props }) => {
|
|
4612
3738
|
const inputId = id || `mod-input-${Math.random().toString(36).substring(7)}`;
|
|
4613
3739
|
const helperTextId = helperText || errorMessage ? `${inputId}-helper-text` : undefined;
|
|
4614
|
-
return (jsxRuntime.jsxs(StyledFormControl, { size: size, error: destructive, disabled: disabled, children: [label && (jsxRuntime.jsxs(StyledInputLabel, { htmlFor: inputId, size: size, infoIcon: !!infoIcon, disabled: disabled, error: destructive, shrink: true, children: [label, required && jsxRuntime.jsx("span", { "aria-hidden": "true", children: "*" }), infoIcon && jsxRuntime.jsx(InfoIconWrapper, { children: infoIcon })] })), jsxRuntime.jsx(StyledInputBase, { id: inputId, size: size, destructive: destructive, disabled: disabled, error: destructive, "aria-describedby": helperTextId, startAdornment: startIcon ? (jsxRuntime.jsx(InputAdornment, { position: "start", style: { paddingLeft: size === 'small' ? designSystemTokens.spacing.spacing_1_1_2 : designSystemTokens.spacing.spacing_2 }, children: startIcon })) : undefined, endAdornment: destructive ? (jsxRuntime.jsx(InputAdornment, { position: "end", style: { paddingRight: designSystemTokens.spacing.spacing_1_1_2 }, children: jsxRuntime.jsx(
|
|
3740
|
+
return (jsxRuntime.jsxs(StyledFormControl, { size: size, error: destructive, disabled: disabled, children: [label && (jsxRuntime.jsxs(StyledInputLabel, { htmlFor: inputId, size: size, infoIcon: !!infoIcon, disabled: disabled, error: destructive, shrink: true, children: [label, required && jsxRuntime.jsx("span", { "aria-hidden": "true", children: "*" }), infoIcon && jsxRuntime.jsx(InfoIconWrapper, { children: infoIcon })] })), jsxRuntime.jsx(StyledInputBase, { id: inputId, size: size, destructive: destructive, disabled: disabled, error: destructive, "aria-describedby": helperTextId, startAdornment: startIcon ? (jsxRuntime.jsx(InputAdornment, { position: "start", style: { paddingLeft: size === 'small' ? designSystemTokens.spacing.spacing_1_1_2 : designSystemTokens.spacing.spacing_2 }, children: startIcon })) : undefined, endAdornment: destructive ? (jsxRuntime.jsx(InputAdornment, { position: "end", style: { paddingRight: designSystemTokens.spacing.spacing_1_1_2 }, children: jsxRuntime.jsx(lucideReact.AlertCircle, { size: 20 }) })) : endIcon ? (jsxRuntime.jsx(InputAdornment, { position: "end", style: { paddingRight: designSystemTokens.spacing.spacing_1_1_2 }, children: endIcon })) : undefined, ...props }), (helperText || errorMessage) && (jsxRuntime.jsx(StyledFormHelperText, { id: helperTextId, error: destructive, disabled: disabled, children: destructive ? errorMessage : helperText }))] }));
|
|
4615
3741
|
};
|
|
4616
3742
|
ModInputField.displayName = 'ModInputField';
|
|
4617
3743
|
|
|
@@ -4709,7 +3835,7 @@ const StyledListItemButton$1 = styles.styled(ListItemButton, {
|
|
|
4709
3835
|
paddingBottom: config.paddingBottom,
|
|
4710
3836
|
paddingLeft: config.paddingLeft,
|
|
4711
3837
|
borderRadius: designSystemTokens.spacing.spacing_3_4, // 6px
|
|
4712
|
-
backgroundColor: designSystemTokens.semanticColors.input.
|
|
3838
|
+
backgroundColor: designSystemTokens.semanticColors.input.bg,
|
|
4713
3839
|
gap: config.gap,
|
|
4714
3840
|
// Icon is always centered vertically per Figma design
|
|
4715
3841
|
alignItems: 'center',
|
|
@@ -4721,7 +3847,7 @@ const StyledListItemButton$1 = styles.styled(ListItemButton, {
|
|
|
4721
3847
|
minWidth: config.iconSize, // Override MUI's default 56px
|
|
4722
3848
|
width: config.iconSize,
|
|
4723
3849
|
height: config.iconSize,
|
|
4724
|
-
color: designSystemTokens.semanticColors.
|
|
3850
|
+
color: designSystemTokens.semanticColors.color.icon.placeholder,
|
|
4725
3851
|
transition: theme.transitions.create(['color'], {
|
|
4726
3852
|
duration: theme.transitions.duration.short,
|
|
4727
3853
|
}),
|
|
@@ -4738,9 +3864,7 @@ const StyledListItemButton$1 = styles.styled(ListItemButton, {
|
|
|
4738
3864
|
: size === 'small' || size === 'medium'
|
|
4739
3865
|
? designSystemTokens.typography.fontWeight.regular
|
|
4740
3866
|
: designSystemTokens.typography.fontWeight.medium,
|
|
4741
|
-
color: isLink
|
|
4742
|
-
? designSystemTokens.semanticColors.typography.link.primary
|
|
4743
|
-
: designSystemTokens.semanticColors.typography.navigation.default,
|
|
3867
|
+
color: isLink ? designSystemTokens.semanticColors.color.text.link : designSystemTokens.semanticColors.color.text.nav,
|
|
4744
3868
|
overflow: 'hidden',
|
|
4745
3869
|
textOverflow: 'ellipsis',
|
|
4746
3870
|
whiteSpace: 'nowrap',
|
|
@@ -4760,14 +3884,14 @@ const StyledListItemButton$1 = styles.styled(ListItemButton, {
|
|
|
4760
3884
|
: 12),
|
|
4761
3885
|
lineHeight: 1.5,
|
|
4762
3886
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
4763
|
-
color: designSystemTokens.semanticColors.
|
|
3887
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
4764
3888
|
},
|
|
4765
3889
|
// Secondary text styling - wraps with word break
|
|
4766
3890
|
'& .list-item-secondary': {
|
|
4767
3891
|
fontSize: theme.typography.pxToRem('secondaryFontSize' in config ? config.secondaryFontSize : config.fontSize),
|
|
4768
3892
|
lineHeight: size === 'large' ? 1.5 : 1.4,
|
|
4769
3893
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
4770
|
-
color: designSystemTokens.semanticColors.
|
|
3894
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
4771
3895
|
wordBreak: 'break-word',
|
|
4772
3896
|
whiteSpace: 'normal',
|
|
4773
3897
|
...(size === 'large' && {
|
|
@@ -4780,29 +3904,29 @@ const StyledListItemButton$1 = styles.styled(ListItemButton, {
|
|
|
4780
3904
|
alignItems: 'center',
|
|
4781
3905
|
flexShrink: 0,
|
|
4782
3906
|
marginLeft: designSystemTokens.spacing.spacing_1,
|
|
4783
|
-
color: designSystemTokens.semanticColors.
|
|
3907
|
+
color: designSystemTokens.semanticColors.color.icon.default,
|
|
4784
3908
|
},
|
|
4785
3909
|
// Hover state
|
|
4786
3910
|
'&:hover': {
|
|
4787
|
-
backgroundColor: designSystemTokens.semanticColors.input.
|
|
3911
|
+
backgroundColor: designSystemTokens.semanticColors.input.bg,
|
|
4788
3912
|
},
|
|
4789
3913
|
// Selected/Active state
|
|
4790
3914
|
// Font weights per Figma:
|
|
4791
3915
|
// - Primary: small/medium/xxlarge use 500, large/xlarge use 600
|
|
4792
3916
|
// - Secondary: large/xlarge use 500, xxlarge uses 400
|
|
4793
3917
|
[`&.${ListItemButton.listItemButtonClasses.selected}`]: {
|
|
4794
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
3918
|
+
backgroundColor: designSystemTokens.semanticColors.button.secondary.bgHover,
|
|
4795
3919
|
'&:hover': {
|
|
4796
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
3920
|
+
backgroundColor: designSystemTokens.semanticColors.button.secondary.bgHover,
|
|
4797
3921
|
},
|
|
4798
3922
|
[`& .${ListItemIcon.listItemIconClasses.root}`]: {
|
|
4799
|
-
color: designSystemTokens.semanticColors.
|
|
3923
|
+
color: designSystemTokens.semanticColors.color.icon.pressed,
|
|
4800
3924
|
},
|
|
4801
3925
|
'& .list-item-primary': {
|
|
4802
3926
|
fontWeight: size === 'large' || size === 'xlarge'
|
|
4803
3927
|
? designSystemTokens.typography.fontWeight.semiBold
|
|
4804
3928
|
: designSystemTokens.typography.fontWeight.medium,
|
|
4805
|
-
color: designSystemTokens.semanticColors.
|
|
3929
|
+
color: designSystemTokens.semanticColors.color.text.nav,
|
|
4806
3930
|
},
|
|
4807
3931
|
'& .list-item-secondary': {
|
|
4808
3932
|
fontWeight: size === 'large' || size === 'xlarge'
|
|
@@ -4812,22 +3936,22 @@ const StyledListItemButton$1 = styles.styled(ListItemButton, {
|
|
|
4812
3936
|
},
|
|
4813
3937
|
// Disabled state
|
|
4814
3938
|
[`&.${ListItemButton.listItemButtonClasses.disabled}`]: {
|
|
4815
|
-
backgroundColor: designSystemTokens.semanticColors.input.
|
|
3939
|
+
backgroundColor: designSystemTokens.semanticColors.input.bgDisabled,
|
|
4816
3940
|
opacity: 1,
|
|
4817
3941
|
[`& .${ListItemIcon.listItemIconClasses.root}`]: {
|
|
4818
|
-
color: designSystemTokens.semanticColors.
|
|
3942
|
+
color: designSystemTokens.semanticColors.color.icon.disabled,
|
|
4819
3943
|
},
|
|
4820
3944
|
'& .list-item-primary': {
|
|
4821
|
-
color: designSystemTokens.semanticColors.
|
|
3945
|
+
color: designSystemTokens.semanticColors.button.tertiary.fgDisabled,
|
|
4822
3946
|
},
|
|
4823
3947
|
'& .list-item-secondary': {
|
|
4824
|
-
color: designSystemTokens.semanticColors.
|
|
3948
|
+
color: designSystemTokens.semanticColors.button.tertiary.fgDisabled,
|
|
4825
3949
|
},
|
|
4826
3950
|
'& .list-item-badge': {
|
|
4827
|
-
color: designSystemTokens.semanticColors.
|
|
3951
|
+
color: designSystemTokens.semanticColors.button.tertiary.fgDisabled,
|
|
4828
3952
|
},
|
|
4829
3953
|
'& .list-item-trailing': {
|
|
4830
|
-
color: designSystemTokens.semanticColors.
|
|
3954
|
+
color: designSystemTokens.semanticColors.color.icon.disabled,
|
|
4831
3955
|
},
|
|
4832
3956
|
},
|
|
4833
3957
|
};
|
|
@@ -4882,28 +4006,28 @@ function navVariantStyles(theme) {
|
|
|
4882
4006
|
paddingLeft: designSystemTokens.spacing.spacing_2,
|
|
4883
4007
|
paddingRight: designSystemTokens.spacing.spacing_2,
|
|
4884
4008
|
border: 'none',
|
|
4885
|
-
color: designSystemTokens.semanticColors.
|
|
4009
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
4886
4010
|
backgroundColor: 'transparent',
|
|
4887
4011
|
transition: theme.transitions.create(['background-color', 'color']),
|
|
4888
4012
|
[`&.${ListItemButton.listItemButtonClasses.selected}`]: {
|
|
4889
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
4890
|
-
color: designSystemTokens.semanticColors.
|
|
4013
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.highlightActive,
|
|
4014
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
4891
4015
|
'&:hover': {
|
|
4892
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
4016
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.highlightActive,
|
|
4893
4017
|
},
|
|
4894
4018
|
},
|
|
4895
4019
|
[`&:not(.${ListItemButton.listItemButtonClasses.selected}):not(.${ListItemButton.listItemButtonClasses.disabled})`]: {
|
|
4896
4020
|
'&:hover': {
|
|
4897
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
4898
|
-
color: designSystemTokens.semanticColors.
|
|
4021
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.rowHover,
|
|
4022
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
4899
4023
|
},
|
|
4900
4024
|
},
|
|
4901
4025
|
[`&.${ListItemButton.listItemButtonClasses.focusVisible}`]: {
|
|
4902
|
-
outline: `2px solid ${designSystemTokens.semanticColors.border.focus}`,
|
|
4026
|
+
outline: `2px solid ${designSystemTokens.semanticColors.color.border.focus}`,
|
|
4903
4027
|
outlineOffset: -2,
|
|
4904
4028
|
},
|
|
4905
4029
|
[`&.${ListItemButton.listItemButtonClasses.disabled}`]: {
|
|
4906
|
-
color: designSystemTokens.semanticColors.
|
|
4030
|
+
color: designSystemTokens.semanticColors.button.fgDisabled,
|
|
4907
4031
|
opacity: 1,
|
|
4908
4032
|
},
|
|
4909
4033
|
};
|
|
@@ -4918,71 +4042,71 @@ function cardVariantStyles(theme) {
|
|
|
4918
4042
|
paddingBottom: designSystemTokens.spacing.spacing_1,
|
|
4919
4043
|
paddingLeft: designSystemTokens.spacing.spacing_3_4,
|
|
4920
4044
|
paddingRight: designSystemTokens.spacing.spacing_3_4,
|
|
4921
|
-
border: `1px solid ${designSystemTokens.semanticColors.border.primary}`,
|
|
4922
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
4045
|
+
border: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
4046
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
4923
4047
|
transition: theme.transitions.create(['border', 'background-color']),
|
|
4924
4048
|
// Active (selected) state
|
|
4925
4049
|
[`&.${ListItemButton.listItemButtonClasses.selected}`]: {
|
|
4926
|
-
border: `2px solid ${designSystemTokens.semanticColors.
|
|
4927
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
4050
|
+
border: `2px solid ${designSystemTokens.semanticColors.button.primary.bg}`,
|
|
4051
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
4928
4052
|
'&:hover': {
|
|
4929
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
4053
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
4930
4054
|
},
|
|
4931
4055
|
// Icon color in selected state
|
|
4932
4056
|
[`& .${ListItemIcon.listItemIconClasses.root}`]: {
|
|
4933
|
-
color: designSystemTokens.semanticColors.
|
|
4057
|
+
color: designSystemTokens.semanticColors.color.icon.default,
|
|
4934
4058
|
},
|
|
4935
4059
|
// Text colors in selected state
|
|
4936
4060
|
[`& .${ListItemText.listItemTextClasses.primary}`]: {
|
|
4937
|
-
color: designSystemTokens.semanticColors.
|
|
4061
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
4938
4062
|
},
|
|
4939
4063
|
[`& .${ListItemText.listItemTextClasses.secondary}`]: {
|
|
4940
|
-
color: designSystemTokens.semanticColors.
|
|
4064
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
4941
4065
|
},
|
|
4942
4066
|
},
|
|
4943
4067
|
// Deselected (default) state
|
|
4944
4068
|
[`&:not(.${ListItemButton.listItemButtonClasses.selected}):not(.${ListItemButton.listItemButtonClasses.disabled})`]: {
|
|
4945
4069
|
'&:hover': {
|
|
4946
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
4070
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.rowHover,
|
|
4947
4071
|
},
|
|
4948
4072
|
[`& .${ListItemIcon.listItemIconClasses.root}`]: {
|
|
4949
|
-
color: designSystemTokens.semanticColors.
|
|
4073
|
+
color: designSystemTokens.semanticColors.color.icon.disabled,
|
|
4950
4074
|
},
|
|
4951
4075
|
[`& .${ListItemText.listItemTextClasses.primary}`]: {
|
|
4952
|
-
color: designSystemTokens.semanticColors.
|
|
4076
|
+
color: designSystemTokens.semanticColors.button.tertiary.fgDisabled,
|
|
4953
4077
|
},
|
|
4954
4078
|
[`& .${ListItemText.listItemTextClasses.secondary}`]: {
|
|
4955
|
-
color: designSystemTokens.semanticColors.
|
|
4079
|
+
color: designSystemTokens.semanticColors.button.fgDisabled,
|
|
4956
4080
|
},
|
|
4957
4081
|
},
|
|
4958
4082
|
// Focus state
|
|
4959
4083
|
[`&.${ListItemButton.listItemButtonClasses.focusVisible}`]: {
|
|
4960
|
-
outline: `2px solid ${designSystemTokens.semanticColors.
|
|
4084
|
+
outline: `2px solid ${designSystemTokens.semanticColors.button.primary.bg}`,
|
|
4961
4085
|
outlineOffset: 2,
|
|
4962
|
-
border: `2px solid ${designSystemTokens.semanticColors.
|
|
4963
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
4086
|
+
border: `2px solid ${designSystemTokens.semanticColors.button.primary.bg}`,
|
|
4087
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
4964
4088
|
[`& .${ListItemIcon.listItemIconClasses.root}`]: {
|
|
4965
|
-
color: designSystemTokens.semanticColors.
|
|
4089
|
+
color: designSystemTokens.semanticColors.color.icon.default,
|
|
4966
4090
|
},
|
|
4967
4091
|
[`& .${ListItemText.listItemTextClasses.primary}`]: {
|
|
4968
|
-
color: designSystemTokens.semanticColors.
|
|
4092
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
4969
4093
|
},
|
|
4970
4094
|
[`& .${ListItemText.listItemTextClasses.secondary}`]: {
|
|
4971
|
-
color: designSystemTokens.semanticColors.
|
|
4095
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
4972
4096
|
},
|
|
4973
4097
|
},
|
|
4974
4098
|
// Disabled state
|
|
4975
4099
|
[`&.${ListItemButton.listItemButtonClasses.disabled}`]: {
|
|
4976
|
-
backgroundColor: designSystemTokens.semanticColors.surface.sunken,
|
|
4100
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.sunken,
|
|
4977
4101
|
opacity: 1, // Override MUI default opacity
|
|
4978
4102
|
[`& .${ListItemIcon.listItemIconClasses.root}`]: {
|
|
4979
|
-
color: designSystemTokens.semanticColors.
|
|
4103
|
+
color: designSystemTokens.semanticColors.color.icon.disabled,
|
|
4980
4104
|
},
|
|
4981
4105
|
[`& .${ListItemText.listItemTextClasses.primary}`]: {
|
|
4982
|
-
color: designSystemTokens.semanticColors.
|
|
4106
|
+
color: designSystemTokens.semanticColors.button.fgDisabled,
|
|
4983
4107
|
},
|
|
4984
4108
|
[`& .${ListItemText.listItemTextClasses.secondary}`]: {
|
|
4985
|
-
color: designSystemTokens.semanticColors.
|
|
4109
|
+
color: designSystemTokens.semanticColors.button.fgDisabled,
|
|
4986
4110
|
},
|
|
4987
4111
|
},
|
|
4988
4112
|
};
|
|
@@ -5027,9 +4151,9 @@ ModListItemButton.displayName = 'ModListItemButton';
|
|
|
5027
4151
|
|
|
5028
4152
|
const StyledMenu = styles.styled(Menu)(() => ({
|
|
5029
4153
|
[`& .${Paper.paperClasses.root}`]: {
|
|
5030
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
4154
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
5031
4155
|
borderRadius: designSystemTokens.borderRadius.s,
|
|
5032
|
-
border: `1px solid ${designSystemTokens.semanticColors.border.primary}`,
|
|
4156
|
+
border: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
5033
4157
|
boxShadow: `${designSystemTokens.shadows.dropdown.x}px ${designSystemTokens.shadows.dropdown.y}px ${designSystemTokens.shadows.dropdown.blur}px ${designSystemTokens.shadows.dropdown.spread}px ${designSystemTokens.shadows.dropdown.shadow}`,
|
|
5034
4158
|
marginTop: designSystemTokens.spacing.spacing_1,
|
|
5035
4159
|
paddingTop: designSystemTokens.spacing.spacing_1,
|
|
@@ -5085,8 +4209,8 @@ const StyledCell$1 = styles.styled('div', {
|
|
|
5085
4209
|
paddingTop: designSystemTokens.spacing.spacing_1_2, // 4px — input-vertical
|
|
5086
4210
|
paddingBottom: designSystemTokens.spacing.spacing_1_2,
|
|
5087
4211
|
backgroundColor: disabled
|
|
5088
|
-
? designSystemTokens.semanticColors.
|
|
5089
|
-
: designSystemTokens.semanticColors.
|
|
4212
|
+
? designSystemTokens.semanticColors.color.surface.dataGrid.disabled
|
|
4213
|
+
: designSystemTokens.semanticColors.color.surface.dataGrid.default,
|
|
5090
4214
|
boxSizing: 'border-box',
|
|
5091
4215
|
}));
|
|
5092
4216
|
const LabelText = styles.styled('span', {
|
|
@@ -5099,7 +4223,7 @@ const LabelText = styles.styled('span', {
|
|
|
5099
4223
|
fontSize: designSystemTokens.typography.fontSize.xs,
|
|
5100
4224
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
5101
4225
|
lineHeight: 1.5,
|
|
5102
|
-
color: disabled ? designSystemTokens.semanticColors.
|
|
4226
|
+
color: disabled ? designSystemTokens.semanticColors.color.text.secondary : designSystemTokens.semanticColors.color.text.primary,
|
|
5103
4227
|
}));
|
|
5104
4228
|
/**
|
|
5105
4229
|
* ModAvatarCell — DataGrid cell displaying a user avatar with optional label.
|
|
@@ -5117,9 +4241,9 @@ ModAvatarCell.displayName = 'ModAvatarCell';
|
|
|
5117
4241
|
// ============================================================================
|
|
5118
4242
|
const StyledDialog = styles.styled(Dialog)({
|
|
5119
4243
|
[`& .${Dialog.dialogClasses.paper}`]: {
|
|
5120
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
4244
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
5121
4245
|
borderRadius: designSystemTokens.borderRadius.card,
|
|
5122
|
-
border: `1px solid ${designSystemTokens.semanticColors.border.primary}`,
|
|
4246
|
+
border: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
5123
4247
|
boxShadow: 'none',
|
|
5124
4248
|
},
|
|
5125
4249
|
[`& .${Dialog.dialogClasses.container}`]: {
|
|
@@ -5179,7 +4303,7 @@ const ModalHeaderTitle = styles.styled('h2')(({ theme }) => ({
|
|
|
5179
4303
|
fontWeight: designSystemTokens.typography.fontWeight.medium,
|
|
5180
4304
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.h3),
|
|
5181
4305
|
lineHeight: 1.4,
|
|
5182
|
-
color: designSystemTokens.semanticColors.
|
|
4306
|
+
color: designSystemTokens.semanticColors.color.text.nav,
|
|
5183
4307
|
}));
|
|
5184
4308
|
const modalHeaderTitleLinkStyles = {
|
|
5185
4309
|
margin: 0,
|
|
@@ -5187,10 +4311,10 @@ const modalHeaderTitleLinkStyles = {
|
|
|
5187
4311
|
fontWeight: designSystemTokens.typography.fontWeight.medium,
|
|
5188
4312
|
fontSize: designSystemTokens.typography.fontSize.h3,
|
|
5189
4313
|
lineHeight: 1.4,
|
|
5190
|
-
color: designSystemTokens.semanticColors.
|
|
4314
|
+
color: designSystemTokens.semanticColors.color.text.link,
|
|
5191
4315
|
textDecoration: 'none',
|
|
5192
4316
|
'&:hover': {
|
|
5193
|
-
color: designSystemTokens.semanticColors.
|
|
4317
|
+
color: designSystemTokens.semanticColors.button.tertiary.fgHover,
|
|
5194
4318
|
textDecoration: 'underline',
|
|
5195
4319
|
},
|
|
5196
4320
|
};
|
|
@@ -5200,10 +4324,10 @@ const ModalHeaderSubtitle = styles.styled('p')(({ theme }) => ({
|
|
|
5200
4324
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
5201
4325
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.sm),
|
|
5202
4326
|
lineHeight: 1.4,
|
|
5203
|
-
color: designSystemTokens.semanticColors.
|
|
4327
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
5204
4328
|
}));
|
|
5205
4329
|
const StyledCloseButton = styles.styled(IconButton)({
|
|
5206
|
-
color: designSystemTokens.semanticColors.
|
|
4330
|
+
color: designSystemTokens.semanticColors.color.icon.utility,
|
|
5207
4331
|
paddingTop: 0,
|
|
5208
4332
|
paddingRight: 0,
|
|
5209
4333
|
paddingBottom: 0,
|
|
@@ -5213,7 +4337,7 @@ const StyledCloseButton = styles.styled(IconButton)({
|
|
|
5213
4337
|
flexShrink: 0,
|
|
5214
4338
|
'&:hover': {
|
|
5215
4339
|
backgroundColor: 'transparent',
|
|
5216
|
-
color: designSystemTokens.semanticColors.
|
|
4340
|
+
color: designSystemTokens.semanticColors.color.icon.utility,
|
|
5217
4341
|
},
|
|
5218
4342
|
});
|
|
5219
4343
|
/**
|
|
@@ -5232,7 +4356,7 @@ const ModModalHeader = ({ title, subtitle, href, LinkComponent, onClose, hideClo
|
|
|
5232
4356
|
}
|
|
5233
4357
|
return jsxRuntime.jsx(ModalHeaderTitle, { children: title });
|
|
5234
4358
|
};
|
|
5235
|
-
return (jsxRuntime.jsxs(ModalHeaderRoot, { children: [jsxRuntime.jsxs(ModalHeaderTitleRow, { children: [jsxRuntime.jsxs(ModalHeaderTextContainer, { children: [renderTitle(), subtitle && jsxRuntime.jsx(ModalHeaderSubtitle, { children: subtitle })] }), !hideCloseButton && onClose && (jsxRuntime.jsx(StyledCloseButton, { onClick: onClose, "aria-label": "Close", children: jsxRuntime.jsx(X, { size: 24 }) }))] }), children] }));
|
|
4359
|
+
return (jsxRuntime.jsxs(ModalHeaderRoot, { children: [jsxRuntime.jsxs(ModalHeaderTitleRow, { children: [jsxRuntime.jsxs(ModalHeaderTextContainer, { children: [renderTitle(), subtitle && jsxRuntime.jsx(ModalHeaderSubtitle, { children: subtitle })] }), !hideCloseButton && onClose && (jsxRuntime.jsx(StyledCloseButton, { onClick: onClose, "aria-label": "Close", children: jsxRuntime.jsx(lucideReact.X, { size: 24 }) }))] }), children] }));
|
|
5236
4360
|
};
|
|
5237
4361
|
ModModalHeader.displayName = 'ModModalHeader';
|
|
5238
4362
|
// ============================================================================
|
|
@@ -5247,7 +4371,7 @@ const StyledDialogContent = styles.styled(DialogContent)(({ theme }) => ({
|
|
|
5247
4371
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
5248
4372
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.default),
|
|
5249
4373
|
lineHeight: 1.5,
|
|
5250
|
-
color: designSystemTokens.semanticColors.
|
|
4374
|
+
color: designSystemTokens.semanticColors.color.text.nav,
|
|
5251
4375
|
[`&.${DialogContent.dialogContentClasses.root}`]: {
|
|
5252
4376
|
paddingTop: 0,
|
|
5253
4377
|
paddingRight: designSystemTokens.spacing.spacing_4,
|
|
@@ -5302,7 +4426,7 @@ const CellRoot = styles.styled('div', {
|
|
|
5302
4426
|
justifyContent: 'center',
|
|
5303
4427
|
width: '100%',
|
|
5304
4428
|
height: '100%',
|
|
5305
|
-
color: disabled ? designSystemTokens.semanticColors.
|
|
4429
|
+
color: disabled ? designSystemTokens.semanticColors.color.icon.disabled : designSystemTokens.semanticColors.color.icon.default,
|
|
5306
4430
|
}));
|
|
5307
4431
|
/**
|
|
5308
4432
|
* ModIconCell — Icon cell for DataGrid. Renders an icon centered in the cell.
|
|
@@ -5325,8 +4449,8 @@ const CellWrapper = styles.styled('div', {
|
|
|
5325
4449
|
paddingLeft: designSystemTokens.spacing.spacing_1,
|
|
5326
4450
|
paddingRight: designSystemTokens.spacing.spacing_1,
|
|
5327
4451
|
backgroundColor: disabled
|
|
5328
|
-
? designSystemTokens.semanticColors.
|
|
5329
|
-
: designSystemTokens.semanticColors.
|
|
4452
|
+
? designSystemTokens.semanticColors.color.surface.dataGrid.disabled
|
|
4453
|
+
: designSystemTokens.semanticColors.color.surface.dataGrid.default,
|
|
5330
4454
|
'& img': {
|
|
5331
4455
|
display: 'block',
|
|
5332
4456
|
maxHeight: 32,
|
|
@@ -5364,13 +4488,13 @@ const StyledLinearProgress = styles.styled(LinearProgress, {
|
|
|
5364
4488
|
[`&.${LinearProgress.linearProgressClasses.colorPrimary}`]: {
|
|
5365
4489
|
backgroundColor: designSystemTokens.semanticColors.progress.track,
|
|
5366
4490
|
[`& .${LinearProgress.linearProgressClasses.bar}`]: {
|
|
5367
|
-
backgroundColor: designSystemTokens.semanticColors.status.active.
|
|
4491
|
+
backgroundColor: designSystemTokens.semanticColors.color.status.active.solid,
|
|
5368
4492
|
},
|
|
5369
4493
|
},
|
|
5370
4494
|
// Cancelled variant uses warning color
|
|
5371
4495
|
'&[data-variant="cancelled"]': {
|
|
5372
4496
|
[`& .${LinearProgress.linearProgressClasses.bar}`]: {
|
|
5373
|
-
backgroundColor: designSystemTokens.semanticColors.status.warning.
|
|
4497
|
+
backgroundColor: designSystemTokens.semanticColors.color.status.warning.solid,
|
|
5374
4498
|
},
|
|
5375
4499
|
},
|
|
5376
4500
|
}));
|
|
@@ -5399,7 +4523,7 @@ const ProgressWrapper = styles.styled('div')(({ labelPosition }) => ({
|
|
|
5399
4523
|
const ProgressLabel = styles.styled(Typography)(({ theme }) => ({
|
|
5400
4524
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.sm),
|
|
5401
4525
|
fontWeight: designSystemTokens.typography.fontWeight.medium,
|
|
5402
|
-
color: designSystemTokens.semanticColors.
|
|
4526
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
5403
4527
|
lineHeight: 1.4,
|
|
5404
4528
|
whiteSpace: 'nowrap',
|
|
5405
4529
|
flexShrink: 0,
|
|
@@ -5433,8 +4557,8 @@ const StyledCell = styles.styled('div', {
|
|
|
5433
4557
|
paddingLeft: designSystemTokens.spacing.spacing_1_1_2, // 12px input-horizontal
|
|
5434
4558
|
paddingRight: designSystemTokens.spacing.spacing_1_1_2,
|
|
5435
4559
|
backgroundColor: disabled
|
|
5436
|
-
? designSystemTokens.semanticColors.
|
|
5437
|
-
: designSystemTokens.semanticColors.
|
|
4560
|
+
? designSystemTokens.semanticColors.color.surface.dataGrid.disabled
|
|
4561
|
+
: designSystemTokens.semanticColors.color.surface.dataGrid.default,
|
|
5438
4562
|
boxSizing: 'border-box',
|
|
5439
4563
|
}));
|
|
5440
4564
|
/**
|
|
@@ -5446,10 +4570,14 @@ const ModProgressCell = ({ value = 0, disabled = false, empty = false, }) => {
|
|
|
5446
4570
|
};
|
|
5447
4571
|
ModProgressCell.displayName = 'ModProgressCell';
|
|
5448
4572
|
|
|
4573
|
+
// semanticColors.status[variant] is a computed member access, so the phase-2
|
|
4574
|
+
// token restructure's codemod (driven from literal TOKEN_MAP paths) cannot
|
|
4575
|
+
// reach it — fixed by hand. See docs/superpowers/plans/2026-08-05-semantic-restructure.md
|
|
4576
|
+
// "Dynamic access — the codemod cannot see these".
|
|
5449
4577
|
const variantColors = (variant) => ({
|
|
5450
|
-
bg: designSystemTokens.semanticColors.status[variant].
|
|
5451
|
-
fg: designSystemTokens.semanticColors.status[variant].
|
|
5452
|
-
border: designSystemTokens.semanticColors.status[variant].
|
|
4578
|
+
bg: designSystemTokens.semanticColors.color.status[variant].bg,
|
|
4579
|
+
fg: designSystemTokens.semanticColors.color.status[variant].fg,
|
|
4580
|
+
border: designSystemTokens.semanticColors.color.status[variant].tint,
|
|
5453
4581
|
});
|
|
5454
4582
|
const StyledChip = styles.styled('div', {
|
|
5455
4583
|
shouldForwardProp: prop => prop !== 'disabled' && prop !== 'variant',
|
|
@@ -5464,9 +4592,9 @@ const StyledChip = styles.styled('div', {
|
|
|
5464
4592
|
paddingLeft: designSystemTokens.spacing.spacing_1_1_2,
|
|
5465
4593
|
paddingRight: designSystemTokens.spacing.spacing_1_1_2,
|
|
5466
4594
|
borderRadius: designSystemTokens.borderRadius.full,
|
|
5467
|
-
border: `1px solid ${disabled ? designSystemTokens.semanticColors.border.
|
|
5468
|
-
backgroundColor: disabled ? designSystemTokens.semanticColors.
|
|
5469
|
-
color: disabled ? designSystemTokens.semanticColors.
|
|
4595
|
+
border: `1px solid ${disabled ? designSystemTokens.semanticColors.color.border.primary : colors.border}`,
|
|
4596
|
+
backgroundColor: disabled ? designSystemTokens.semanticColors.color.surface.dataGrid.disabled : colors.bg,
|
|
4597
|
+
color: disabled ? designSystemTokens.semanticColors.color.icon.disabled : colors.fg,
|
|
5470
4598
|
fontFamily: designSystemTokens.typography.fontFamily.body,
|
|
5471
4599
|
fontSize: designSystemTokens.typography.fontSize.xs,
|
|
5472
4600
|
fontWeight: designSystemTokens.typography.fontWeight.medium,
|
|
@@ -5491,7 +4619,7 @@ const TooltipErrorPre = styles.styled('pre')({
|
|
|
5491
4619
|
fontSize: designSystemTokens.typography.fontSize.sm,
|
|
5492
4620
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
5493
4621
|
lineHeight: 1.5,
|
|
5494
|
-
color: designSystemTokens.semanticColors.
|
|
4622
|
+
color: designSystemTokens.semanticColors.color.text.tooltip,
|
|
5495
4623
|
whiteSpace: 'pre-wrap',
|
|
5496
4624
|
wordBreak: 'break-all',
|
|
5497
4625
|
maxHeight: 200,
|
|
@@ -5499,12 +4627,12 @@ const TooltipErrorPre = styles.styled('pre')({
|
|
|
5499
4627
|
});
|
|
5500
4628
|
const StyledTooltip$1 = styles.styled(Tooltip)({
|
|
5501
4629
|
[`& .${Tooltip.tooltipClasses.tooltip}`]: {
|
|
5502
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
4630
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.tooltip,
|
|
5503
4631
|
maxWidth: 400,
|
|
5504
4632
|
padding: `${designSystemTokens.spacing.spacing_1}px ${designSystemTokens.spacing.spacing_1_1_2}px`,
|
|
5505
4633
|
},
|
|
5506
4634
|
[`& .${Tooltip.tooltipClasses.arrow}`]: {
|
|
5507
|
-
color: designSystemTokens.semanticColors.
|
|
4635
|
+
color: designSystemTokens.semanticColors.color.surface.tooltip,
|
|
5508
4636
|
},
|
|
5509
4637
|
});
|
|
5510
4638
|
/**
|
|
@@ -5513,7 +4641,7 @@ const StyledTooltip$1 = styles.styled(Tooltip)({
|
|
|
5513
4641
|
const ModStatusCell = ({ icon, label, details, disabled = false, variant = 'success', empty = false, }) => {
|
|
5514
4642
|
if (empty) {
|
|
5515
4643
|
return (jsxRuntime.jsx(Box, { component: "span", sx: {
|
|
5516
|
-
color: designSystemTokens.semanticColors.
|
|
4644
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
5517
4645
|
fontSize: designSystemTokens.typography.fontSize.sm,
|
|
5518
4646
|
lineHeight: 1,
|
|
5519
4647
|
}, children: '—' }));
|
|
@@ -5534,10 +4662,10 @@ const NavigationAvatarContainer = styles.styled('div')({
|
|
|
5534
4662
|
justifyContent: 'center',
|
|
5535
4663
|
alignItems: 'center',
|
|
5536
4664
|
borderRadius: '50%',
|
|
5537
|
-
border: `1px solid ${designSystemTokens.semanticColors.border.
|
|
5538
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
4665
|
+
border: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
4666
|
+
backgroundColor: designSystemTokens.semanticColors.button.secondary.bg,
|
|
5539
4667
|
'&:focus-within': {
|
|
5540
|
-
borderColor: designSystemTokens.semanticColors.border.focus,
|
|
4668
|
+
borderColor: designSystemTokens.semanticColors.color.border.focus,
|
|
5541
4669
|
},
|
|
5542
4670
|
});
|
|
5543
4671
|
/**
|
|
@@ -5561,19 +4689,19 @@ const useModSideNav = () => React.useContext(ModSideNavContext);
|
|
|
5561
4689
|
*/
|
|
5562
4690
|
const variantConfig = {
|
|
5563
4691
|
light: {
|
|
5564
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
5565
|
-
color: designSystemTokens.semanticColors.
|
|
4692
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.tooltip, // #4b5563 - medium gray
|
|
4693
|
+
color: designSystemTokens.semanticColors.color.text.tooltip, // #ffffff - white
|
|
5566
4694
|
},
|
|
5567
4695
|
dark: {
|
|
5568
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
5569
|
-
color: designSystemTokens.semanticColors.
|
|
4696
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
4697
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
5570
4698
|
},
|
|
5571
4699
|
brand: {
|
|
5572
4700
|
// snackbarBrand is one of the few tokens Figma fixes across both modes, so
|
|
5573
4701
|
// its foreground must be fixed too. typography.tooltip.default flips
|
|
5574
4702
|
// (#ffffff -> #232342), which would put dark navy on dark blue in dark mode.
|
|
5575
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
5576
|
-
color: designSystemTokens.semanticColors.
|
|
4703
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.snackbarBrand,
|
|
4704
|
+
color: designSystemTokens.semanticColors.color.text.linkOnDark,
|
|
5577
4705
|
},
|
|
5578
4706
|
};
|
|
5579
4707
|
/**
|
|
@@ -5583,29 +4711,19 @@ const variantConfig = {
|
|
|
5583
4711
|
// `.MuiTooltip-tooltip` selectors below actually reach the portaled tooltip
|
|
5584
4712
|
// (styled(Tooltip) alone applies to the anchor, not the popped content).
|
|
5585
4713
|
const StyledTooltip = styles.styled(({ className, ...props }) => jsxRuntime.jsx(Tooltip, { ...props, classes: { popper: className } }), {
|
|
5586
|
-
shouldForwardProp: prop => prop !== 'variant'
|
|
5587
|
-
})(({ variant = 'light'
|
|
5588
|
-
const hasDescription = Boolean(description);
|
|
4714
|
+
shouldForwardProp: prop => prop !== 'variant',
|
|
4715
|
+
})(({ variant = 'light' }) => {
|
|
5589
4716
|
const variantStyles = variantConfig[variant];
|
|
5590
4717
|
return {
|
|
5591
|
-
// Style the tooltip content
|
|
4718
|
+
// Style the tooltip content. Padding/line-height/radius are uniform
|
|
4719
|
+
// regardless of whether a description is present — Figma defines a
|
|
4720
|
+
// single tooltip treatment (title + optional content), not two.
|
|
5592
4721
|
[`& .${Tooltip.tooltipClasses.tooltip}`]: {
|
|
5593
4722
|
backgroundColor: variantStyles.backgroundColor,
|
|
5594
4723
|
color: variantStyles.color,
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
borderRadius: hasDescription ? designSystemTokens.borderRadius.s : designSystemTokens.borderRadius.xS,
|
|
5599
|
-
padding: hasDescription ? designSystemTokens.spacing.spacing_1_1_2 : `0 ${designSystemTokens.spacing.spacing_1}px`,
|
|
5600
|
-
...(hasDescription && {
|
|
5601
|
-
maxWidth: 296,
|
|
5602
|
-
}),
|
|
5603
|
-
...(!hasDescription && {
|
|
5604
|
-
height: designSystemTokens.spacing.spacing_3_1_4,
|
|
5605
|
-
display: 'flex',
|
|
5606
|
-
alignItems: 'center',
|
|
5607
|
-
justifyContent: 'center',
|
|
5608
|
-
}),
|
|
4724
|
+
...designSystemTokens.semanticTypography.tooltip,
|
|
4725
|
+
borderRadius: designSystemTokens.borderRadius.s,
|
|
4726
|
+
padding: `${designSystemTokens.spacing.spacing_1}px ${designSystemTokens.spacing.spacing_1_1_2}px`,
|
|
5609
4727
|
boxShadow: `${designSystemTokens.shadows.neutral.medium.x}px ${designSystemTokens.shadows.neutral.medium.y}px ${designSystemTokens.shadows.neutral.medium.blur}px ${designSystemTokens.shadows.neutral.medium.spread}px ${designSystemTokens.shadows.neutral.medium.shadow}`,
|
|
5610
4728
|
},
|
|
5611
4729
|
// Style the arrow
|
|
@@ -5625,18 +4743,17 @@ const StyledTooltip = styles.styled(({ className, ...props }) => jsxRuntime.jsx(
|
|
|
5625
4743
|
* - Dark: surfaces.white, typography.body
|
|
5626
4744
|
* - Brand: surfaces.snackbarBrand, typography.linkWhite (both fixed across modes)
|
|
5627
4745
|
* - Shadow: neutralMedium (0px 8px 15px 0px rgba(31,41,55,0.1))
|
|
5628
|
-
* - Typography:
|
|
4746
|
+
* - Typography: semanticTypography.tooltip (12px/1.5 line-height), fontWeight.semiBold (600) for the title
|
|
5629
4747
|
*/
|
|
5630
4748
|
const ModTooltip = ({ variant = 'light', title, description, children, arrow = false, placement, ...props }) => {
|
|
5631
|
-
//
|
|
5632
|
-
//
|
|
5633
|
-
//
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
return (jsxRuntime.jsx(StyledTooltip, { variant: variant, description: description, title: titleContent, arrow: arrow, placement: placement, ...props, children: children }));
|
|
4749
|
+
// variant="inherit" stops Typography from applying MUI's own body1 font
|
|
4750
|
+
// styles (which would otherwise win over the container's tooltip typography
|
|
4751
|
+
// — a directly-set style beats an inherited one regardless of specificity),
|
|
4752
|
+
// letting it inherit fontSize/lineHeight/fontFamily from `.MuiTooltip-tooltip`.
|
|
4753
|
+
// Title is always semibold; description (when present) inherits the
|
|
4754
|
+
// container's regular weight, distinguishing it from the title above it.
|
|
4755
|
+
const titleContent = description ? (jsxRuntime.jsxs(Stack, { sx: { gap: `${designSystemTokens.spacing.spacing_1_4}px` }, children: [jsxRuntime.jsx(Typography, { variant: "inherit", sx: { fontWeight: designSystemTokens.typography.fontWeight.semiBold }, children: title }), jsxRuntime.jsx(Typography, { variant: "inherit", children: description })] })) : (jsxRuntime.jsx(Typography, { variant: "inherit", sx: { fontWeight: designSystemTokens.typography.fontWeight.semiBold }, children: title }));
|
|
4756
|
+
return (jsxRuntime.jsx(StyledTooltip, { variant: variant, title: titleContent, arrow: arrow, placement: placement, ...props, children: children }));
|
|
5640
4757
|
};
|
|
5641
4758
|
ModTooltip.displayName = 'ModTooltip';
|
|
5642
4759
|
|
|
@@ -5657,11 +4774,11 @@ const StyledRoot = styles.styled(ButtonBase, {
|
|
|
5657
4774
|
cursor: 'pointer',
|
|
5658
4775
|
textDecoration: 'none',
|
|
5659
4776
|
'&:hover .mod-nav-icon-padding': {
|
|
5660
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
5661
|
-
borderColor: designSystemTokens.semanticColors.
|
|
4777
|
+
backgroundColor: designSystemTokens.semanticColors.color.action.tint,
|
|
4778
|
+
borderColor: designSystemTokens.semanticColors.color.action.border,
|
|
5662
4779
|
},
|
|
5663
4780
|
'&:hover .mod-nav-label': {
|
|
5664
|
-
color: designSystemTokens.semanticColors.text.primary,
|
|
4781
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
5665
4782
|
fontWeight: designSystemTokens.typography.fontWeight.semiBold,
|
|
5666
4783
|
},
|
|
5667
4784
|
[`& .${Chip.chipClasses.root}`]: {
|
|
@@ -5672,16 +4789,16 @@ const StyledRoot = styles.styled(ButtonBase, {
|
|
|
5672
4789
|
},
|
|
5673
4790
|
...(selected && {
|
|
5674
4791
|
'& .mod-nav-icon-padding': {
|
|
5675
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
5676
|
-
borderColor: designSystemTokens.semanticColors.
|
|
5677
|
-
color: designSystemTokens.semanticColors.
|
|
4792
|
+
backgroundColor: designSystemTokens.semanticColors.color.action.tint,
|
|
4793
|
+
borderColor: designSystemTokens.semanticColors.color.action.border,
|
|
4794
|
+
color: designSystemTokens.semanticColors.color.action.navy,
|
|
5678
4795
|
},
|
|
5679
4796
|
'& .mod-nav-label': {
|
|
5680
|
-
color: designSystemTokens.semanticColors.
|
|
4797
|
+
color: designSystemTokens.semanticColors.color.action.navy,
|
|
5681
4798
|
fontWeight: designSystemTokens.typography.fontWeight.semiBold,
|
|
5682
4799
|
},
|
|
5683
4800
|
'&:hover .mod-nav-label': {
|
|
5684
|
-
color: designSystemTokens.semanticColors.
|
|
4801
|
+
color: designSystemTokens.semanticColors.color.action.navy,
|
|
5685
4802
|
},
|
|
5686
4803
|
}),
|
|
5687
4804
|
}));
|
|
@@ -5691,7 +4808,7 @@ const IconPadding = styles.styled('span')({
|
|
|
5691
4808
|
padding: designSystemTokens.spacing.spacing_1, // 8px
|
|
5692
4809
|
borderRadius: designSystemTokens.borderRadius.xS, // 4px
|
|
5693
4810
|
border: '1px solid transparent',
|
|
5694
|
-
color: designSystemTokens.semanticColors.
|
|
4811
|
+
color: designSystemTokens.semanticColors.color.icon.default,
|
|
5695
4812
|
transition: 'background-color 150ms, border-color 150ms, color 150ms',
|
|
5696
4813
|
});
|
|
5697
4814
|
const navLabel = designSystemTokens.semanticTypography.navigationLabel.default;
|
|
@@ -5701,7 +4818,7 @@ const Label$2 = styles.styled('span')(({ theme }) => ({
|
|
|
5701
4818
|
fontSize: theme.typography.pxToRem(navLabel.fontSize),
|
|
5702
4819
|
lineHeight: navLabel.lineHeight,
|
|
5703
4820
|
textAlign: 'center',
|
|
5704
|
-
color: designSystemTokens.semanticColors.text.primary,
|
|
4821
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
5705
4822
|
width: '100%',
|
|
5706
4823
|
transition: 'color 150ms',
|
|
5707
4824
|
}));
|
|
@@ -5713,7 +4830,7 @@ function ModNavigationItem({ icon, label, selected = false, tag, tooltip, slotPr
|
|
|
5713
4830
|
// When collapsed the label is hidden, so fall back to it for the tooltip and
|
|
5714
4831
|
// accessible name — otherwise an icon-only button has no name (WCAG 4.1.2).
|
|
5715
4832
|
const collapsedTooltip = tooltip ?? label;
|
|
5716
|
-
const item = (jsxRuntime.jsxs(StyledRoot, { selected: selected, "aria-label": collapsed && typeof label === 'string' ? label : undefined, disableRipple: true, ...props, children: [jsxRuntime.jsx(IconPadding, { className: "mod-nav-icon-padding
|
|
4833
|
+
const item = (jsxRuntime.jsxs(StyledRoot, { selected: selected, "aria-label": collapsed && typeof label === 'string' ? label : undefined, disableRipple: true, ...props, children: [jsxRuntime.jsx(IconPadding, { className: "mod-nav-icon-padding", children: icon }), !collapsed && label && jsxRuntime.jsx(Label$2, { className: "mod-nav-label", children: label }), !collapsed && tag && (jsxRuntime.jsx(ModTag, { size: "medium", variant: "filled", intent: "beta", shape: "rounded", label: tag, ...slotProps?.badge })), children] }));
|
|
5717
4834
|
if (collapsed && collapsedTooltip) {
|
|
5718
4835
|
return (jsxRuntime.jsx(ModTooltip, { title: collapsedTooltip, placement: "right", arrow: true, children: item }));
|
|
5719
4836
|
}
|
|
@@ -5728,7 +4845,7 @@ const StickyHeader = styles.styled(Box)(({ theme }) => ({
|
|
|
5728
4845
|
position: 'sticky',
|
|
5729
4846
|
top: 0,
|
|
5730
4847
|
zIndex: theme.zIndex.appBar,
|
|
5731
|
-
backgroundColor: designSystemTokens.semanticColors.surface.
|
|
4848
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.canvas,
|
|
5732
4849
|
flexShrink: 0,
|
|
5733
4850
|
}));
|
|
5734
4851
|
/**
|
|
@@ -5737,14 +4854,14 @@ const StickyHeader = styles.styled(Box)(({ theme }) => ({
|
|
|
5737
4854
|
const PageTitle = styles.styled(Typography)(() => ({
|
|
5738
4855
|
...designSystemTokens.semanticTypography.titles.pageHeader,
|
|
5739
4856
|
lineHeight: 1.4,
|
|
5740
|
-
color: designSystemTokens.semanticColors.
|
|
4857
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
5741
4858
|
}));
|
|
5742
4859
|
/**
|
|
5743
4860
|
* Subtitle typography
|
|
5744
4861
|
*/
|
|
5745
4862
|
const Subtitle = styles.styled(Typography)(() => ({
|
|
5746
4863
|
fontSize: designSystemTokens.typography.fontSize.sm,
|
|
5747
|
-
color: designSystemTokens.semanticColors.
|
|
4864
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
5748
4865
|
}));
|
|
5749
4866
|
/**
|
|
5750
4867
|
* ModPageContent - Page content surface from the Moderne Design System
|
|
@@ -5839,8 +4956,8 @@ function ModPageContent({ pageTitle, subtitle, breadcrumbs, action, sticky = fal
|
|
|
5839
4956
|
minHeight: '50vh',
|
|
5840
4957
|
}, children: jsxRuntime.jsx(ModLoadingSpinner, {}) })) : (children);
|
|
5841
4958
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Box, { sx: {
|
|
5842
|
-
backgroundColor: designSystemTokens.semanticColors.surface.
|
|
5843
|
-
border: `1px solid ${designSystemTokens.semanticColors.border.primary}`,
|
|
4959
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.canvas,
|
|
4960
|
+
border: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
5844
4961
|
borderRadius: `${designSystemTokens.borderRadius.input}px`,
|
|
5845
4962
|
height: '100%',
|
|
5846
4963
|
display: 'flex',
|
|
@@ -5883,12 +5000,12 @@ function ModPageContent({ pageTitle, subtitle, breadcrumbs, action, sticky = fal
|
|
|
5883
5000
|
right: designSystemTokens.spacing.spacing_4,
|
|
5884
5001
|
zIndex: 1000,
|
|
5885
5002
|
}, children: jsxRuntime.jsx(Fab, { sx: {
|
|
5886
|
-
backgroundColor: `color-mix(in srgb, ${designSystemTokens.semanticColors.
|
|
5887
|
-
color: designSystemTokens.semanticColors.
|
|
5003
|
+
backgroundColor: `color-mix(in srgb, ${designSystemTokens.semanticColors.button.primary.bg} 12.5%, transparent)`,
|
|
5004
|
+
color: designSystemTokens.semanticColors.button.primary.bg,
|
|
5888
5005
|
'&:hover': {
|
|
5889
|
-
backgroundColor: `color-mix(in srgb, ${designSystemTokens.semanticColors.
|
|
5006
|
+
backgroundColor: `color-mix(in srgb, ${designSystemTokens.semanticColors.button.primary.bg} 18.8%, transparent)`,
|
|
5890
5007
|
},
|
|
5891
|
-
}, title: "Back to top", size: "small", onClick: handleScrollToTop, children: jsxRuntime.jsx(ChevronUp, { size: 20 }) }) }) }))] }));
|
|
5008
|
+
}, title: "Back to top", size: "small", onClick: handleScrollToTop, children: jsxRuntime.jsx(lucideReact.ChevronUp, { size: 20 }) }) }) }))] }));
|
|
5892
5009
|
}
|
|
5893
5010
|
ModPageContent.displayName = 'ModPageContent';
|
|
5894
5011
|
|
|
@@ -5943,8 +5060,8 @@ const StyledTextField = styles.styled(TextField)(({ theme }) => ({
|
|
|
5943
5060
|
height: designSystemTokens.spacing.spacing_5,
|
|
5944
5061
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.default),
|
|
5945
5062
|
borderRadius: designSystemTokens.borderRadius.input,
|
|
5946
|
-
backgroundColor: designSystemTokens.semanticColors.input.
|
|
5947
|
-
border: `1px solid ${designSystemTokens.semanticColors.border.primary}`,
|
|
5063
|
+
backgroundColor: designSystemTokens.semanticColors.input.bg,
|
|
5064
|
+
border: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
5948
5065
|
paddingTop: designSystemTokens.spacing.spacing_1,
|
|
5949
5066
|
paddingBottom: designSystemTokens.spacing.spacing_1,
|
|
5950
5067
|
paddingLeft: designSystemTokens.spacing.spacing_1_1_2,
|
|
@@ -5955,26 +5072,26 @@ const StyledTextField = styles.styled(TextField)(({ theme }) => ({
|
|
|
5955
5072
|
},
|
|
5956
5073
|
[`& .${InputBase.inputBaseClasses.input}`]: {
|
|
5957
5074
|
padding: 0,
|
|
5958
|
-
color: designSystemTokens.semanticColors.
|
|
5075
|
+
color: designSystemTokens.semanticColors.color.text.input,
|
|
5959
5076
|
'&::placeholder': {
|
|
5960
|
-
color: designSystemTokens.semanticColors.
|
|
5077
|
+
color: designSystemTokens.semanticColors.color.text.inputPlaceholder,
|
|
5961
5078
|
opacity: 1,
|
|
5962
5079
|
},
|
|
5963
5080
|
},
|
|
5964
5081
|
'&:hover': {
|
|
5965
|
-
backgroundColor: designSystemTokens.semanticColors.input.
|
|
5082
|
+
backgroundColor: designSystemTokens.semanticColors.input.bgHover,
|
|
5966
5083
|
},
|
|
5967
5084
|
[`&.${InputBase.inputBaseClasses.focused}`]: {
|
|
5968
|
-
backgroundColor: designSystemTokens.semanticColors.input.
|
|
5969
|
-
borderColor: designSystemTokens.semanticColors.
|
|
5085
|
+
backgroundColor: designSystemTokens.semanticColors.input.bg,
|
|
5086
|
+
borderColor: designSystemTokens.semanticColors.button.primary.bg,
|
|
5970
5087
|
},
|
|
5971
5088
|
[`&.${InputBase.inputBaseClasses.disabled}`]: {
|
|
5972
|
-
backgroundColor: designSystemTokens.semanticColors.input.
|
|
5973
|
-
color: designSystemTokens.semanticColors.
|
|
5089
|
+
backgroundColor: designSystemTokens.semanticColors.input.bgDisabled,
|
|
5090
|
+
color: designSystemTokens.semanticColors.button.fgDisabled,
|
|
5974
5091
|
},
|
|
5975
5092
|
},
|
|
5976
5093
|
[`& .${InputAdornment.inputAdornmentClasses.root}`]: {
|
|
5977
|
-
color: designSystemTokens.semanticColors.
|
|
5094
|
+
color: designSystemTokens.semanticColors.color.icon.placeholder,
|
|
5978
5095
|
'& svg': {
|
|
5979
5096
|
width: 14,
|
|
5980
5097
|
height: 14,
|
|
@@ -5984,10 +5101,10 @@ const StyledTextField = styles.styled(TextField)(({ theme }) => ({
|
|
|
5984
5101
|
marginRight: 0,
|
|
5985
5102
|
},
|
|
5986
5103
|
[`& .${IconButton.iconButtonClasses.root}`]: {
|
|
5987
|
-
color: designSystemTokens.semanticColors.
|
|
5104
|
+
color: designSystemTokens.semanticColors.color.icon.placeholder,
|
|
5988
5105
|
'&:hover': {
|
|
5989
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
5990
|
-
color: designSystemTokens.semanticColors.
|
|
5106
|
+
backgroundColor: designSystemTokens.semanticColors.color.icon.bgHover,
|
|
5107
|
+
color: designSystemTokens.semanticColors.color.icon.utility,
|
|
5991
5108
|
},
|
|
5992
5109
|
'& svg': {
|
|
5993
5110
|
width: 16,
|
|
@@ -6022,8 +5139,8 @@ const ModQuickFilter = ({ placeholder = 'Search...', onKeyDown, autoFocus = fals
|
|
|
6022
5139
|
...controlSlotProps,
|
|
6023
5140
|
input: {
|
|
6024
5141
|
...controlSlotProps?.input,
|
|
6025
|
-
startAdornment: (jsxRuntime.jsx(InputAdornment, { position: "start", children: jsxRuntime.jsx(Search, {}) })),
|
|
6026
|
-
endAdornment: (jsxRuntime.jsx(InputAdornment, { position: "end", sx: { visibility: props.value ? 'visible' : 'hidden' }, children: jsxRuntime.jsx(xDataGrid.QuickFilterClear, { size: "small", edge: "end", "aria-label": "Clear search", children: jsxRuntime.jsx(X, { size: 16 }) }) })),
|
|
5142
|
+
startAdornment: (jsxRuntime.jsx(InputAdornment, { position: "start", children: jsxRuntime.jsx(lucideReact.Search, {}) })),
|
|
5143
|
+
endAdornment: (jsxRuntime.jsx(InputAdornment, { position: "end", sx: { visibility: props.value ? 'visible' : 'hidden' }, children: jsxRuntime.jsx(xDataGrid.QuickFilterClear, { size: "small", edge: "end", "aria-label": "Clear search", children: jsxRuntime.jsx(lucideReact.X, { size: 16 }) }) })),
|
|
6027
5144
|
disableUnderline: true,
|
|
6028
5145
|
},
|
|
6029
5146
|
} })) }) }));
|
|
@@ -6034,14 +5151,14 @@ ModQuickFilter.displayName = 'ModQuickFilter';
|
|
|
6034
5151
|
const UncheckedIcon = ({ size, disabled }) => {
|
|
6035
5152
|
const dimensions = size === 'small' ? 16 : 20;
|
|
6036
5153
|
const radius = size === 'small' ? 8 : 10;
|
|
6037
|
-
return (jsxRuntime.jsxs("svg", { width: dimensions, height: dimensions, viewBox: `0 0 ${dimensions} ${dimensions}`, fill: "none", "aria-hidden": "true", children: [jsxRuntime.jsx("title", { children: "Unchecked radio button" }), jsxRuntime.jsx("circle", { cx: dimensions / 2, cy: dimensions / 2, r: radius - 0.5, stroke: designSystemTokens.semanticColors.border.strong, strokeWidth: "1", fill: disabled ? designSystemTokens.semanticColors.
|
|
5154
|
+
return (jsxRuntime.jsxs("svg", { width: dimensions, height: dimensions, viewBox: `0 0 ${dimensions} ${dimensions}`, fill: "none", "aria-hidden": "true", children: [jsxRuntime.jsx("title", { children: "Unchecked radio button" }), jsxRuntime.jsx("circle", { cx: dimensions / 2, cy: dimensions / 2, r: radius - 0.5, stroke: designSystemTokens.semanticColors.color.border.strong, strokeWidth: "1", fill: disabled ? designSystemTokens.semanticColors.button.primary.bgDisabled : 'transparent' })] }));
|
|
6038
5155
|
};
|
|
6039
5156
|
const CheckedIcon = ({ size, disabled }) => {
|
|
6040
5157
|
const dimensions = size === 'small' ? 16 : 20;
|
|
6041
5158
|
const radius = size === 'small' ? 8 : 10;
|
|
6042
5159
|
const inset = size === 'small' ? 0.3125 : 0.3; // 31.25% or 30%
|
|
6043
5160
|
const innerRadius = radius * (1 - 2 * inset);
|
|
6044
|
-
return (jsxRuntime.jsxs("svg", { width: dimensions, height: dimensions, viewBox: `0 0 ${dimensions} ${dimensions}`, fill: "none", "aria-hidden": "true", children: [jsxRuntime.jsx("title", { children: "Checked radio button" }), jsxRuntime.jsx("circle", { cx: dimensions / 2, cy: dimensions / 2, r: radius - 0.5, fill: disabled ? designSystemTokens.semanticColors.
|
|
5161
|
+
return (jsxRuntime.jsxs("svg", { width: dimensions, height: dimensions, viewBox: `0 0 ${dimensions} ${dimensions}`, fill: "none", "aria-hidden": "true", children: [jsxRuntime.jsx("title", { children: "Checked radio button" }), jsxRuntime.jsx("circle", { cx: dimensions / 2, cy: dimensions / 2, r: radius - 0.5, fill: disabled ? designSystemTokens.semanticColors.button.primary.bgDisabled : designSystemTokens.semanticColors.color.icon.active, stroke: disabled ? designSystemTokens.semanticColors.color.border.primary : designSystemTokens.semanticColors.color.icon.active, strokeWidth: "1" }), jsxRuntime.jsx("circle", { cx: dimensions / 2, cy: dimensions / 2, r: innerRadius, fill: disabled ? designSystemTokens.semanticColors.color.icon.disabled : designSystemTokens.semanticColors.color.surface.raised })] }));
|
|
6045
5162
|
};
|
|
6046
5163
|
const RadioContainer = styles.styled('label')(({ disabled }) => ({
|
|
6047
5164
|
display: 'inline-flex',
|
|
@@ -6067,13 +5184,13 @@ const Label$1 = styles.styled('span')(({ theme, size = 'medium' }) => ({
|
|
|
6067
5184
|
fontSize: theme.typography.pxToRem(size === 'small' ? designSystemTokens.typography.fontSize.sm : designSystemTokens.typography.fontSize.default),
|
|
6068
5185
|
fontWeight: designSystemTokens.typography.fontWeight.medium,
|
|
6069
5186
|
lineHeight: size === 'small' ? 1.4 : 1.5,
|
|
6070
|
-
color: designSystemTokens.semanticColors.
|
|
5187
|
+
color: designSystemTokens.semanticColors.color.text.input,
|
|
6071
5188
|
}));
|
|
6072
5189
|
const HelperText$1 = styles.styled('span')(({ theme, size = 'medium' }) => ({
|
|
6073
5190
|
fontSize: theme.typography.pxToRem(size === 'small' ? designSystemTokens.typography.fontSize.sm : designSystemTokens.typography.fontSize.default),
|
|
6074
5191
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
6075
5192
|
lineHeight: size === 'small' ? 1.4 : 1.5,
|
|
6076
|
-
color: designSystemTokens.semanticColors.
|
|
5193
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
6077
5194
|
}));
|
|
6078
5195
|
const StyledRadio = styles.styled(Radio, {
|
|
6079
5196
|
shouldForwardProp: prop => prop !== 'size',
|
|
@@ -6086,9 +5203,9 @@ const StyledRadio = styles.styled(Radio, {
|
|
|
6086
5203
|
height: dimensions,
|
|
6087
5204
|
flexShrink: 0,
|
|
6088
5205
|
borderRadius: radius,
|
|
6089
|
-
color: designSystemTokens.semanticColors.border.strong,
|
|
5206
|
+
color: designSystemTokens.semanticColors.color.border.strong,
|
|
6090
5207
|
[`&.${Radio.radioClasses.checked}`]: {
|
|
6091
|
-
color: designSystemTokens.semanticColors.
|
|
5208
|
+
color: designSystemTokens.semanticColors.color.icon.active,
|
|
6092
5209
|
},
|
|
6093
5210
|
'&:hover': {
|
|
6094
5211
|
backgroundColor: 'transparent',
|
|
@@ -6101,7 +5218,7 @@ const StyledRadio = styles.styled(Radio, {
|
|
|
6101
5218
|
// Focus state for keyboard navigation
|
|
6102
5219
|
[`&.${ButtonBase.buttonBaseClasses.focusVisible}`]: {
|
|
6103
5220
|
// Unchecked focus state: white background
|
|
6104
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
5221
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
6105
5222
|
// Checked focus state: keep the blue circle visible
|
|
6106
5223
|
[`&.${Radio.radioClasses.checked}`]: {
|
|
6107
5224
|
backgroundColor: 'transparent',
|
|
@@ -6109,9 +5226,9 @@ const StyledRadio = styles.styled(Radio, {
|
|
|
6109
5226
|
},
|
|
6110
5227
|
// Disabled state — icons handle their own disabled colors
|
|
6111
5228
|
[`&.${Radio.radioClasses.disabled}`]: {
|
|
6112
|
-
color: designSystemTokens.semanticColors.border.primary,
|
|
5229
|
+
color: designSystemTokens.semanticColors.color.border.primary,
|
|
6113
5230
|
[`&.${Radio.radioClasses.checked}`]: {
|
|
6114
|
-
color: designSystemTokens.semanticColors.border.primary,
|
|
5231
|
+
color: designSystemTokens.semanticColors.color.border.primary,
|
|
6115
5232
|
},
|
|
6116
5233
|
},
|
|
6117
5234
|
};
|
|
@@ -6161,11 +5278,6 @@ const ModRadio = ({ size = 'medium', label, helperText, disabled, ...props }) =>
|
|
|
6161
5278
|
};
|
|
6162
5279
|
ModRadio.displayName = 'ModRadio';
|
|
6163
5280
|
|
|
6164
|
-
/**
|
|
6165
|
-
* ModRadioButtonWithText
|
|
6166
|
-
*/
|
|
6167
|
-
const ModRadioButtonWithText = styles.styled('div')({});
|
|
6168
|
-
|
|
6169
5281
|
// Box-breathing rhythm: appear (inhale) → hold → expand+fade (exhale) → rest.
|
|
6170
5282
|
// Max scale is capped so the ring fits within a parent row's line-height.
|
|
6171
5283
|
const ripple = material.keyframes `
|
|
@@ -6210,15 +5322,15 @@ ModRipplingDot.displayName = 'ModRipplingDot';
|
|
|
6210
5322
|
|
|
6211
5323
|
const StyledSearchChip = styles.styled(InputBase)(({ theme }) => ({
|
|
6212
5324
|
borderRadius: designSystemTokens.borderRadius.button,
|
|
6213
|
-
border: `1px solid ${designSystemTokens.semanticColors.border.primary}`,
|
|
6214
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
5325
|
+
border: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
5326
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
6215
5327
|
height: 40,
|
|
6216
5328
|
padding: `0 ${designSystemTokens.spacing.spacing_1_1_2}px`,
|
|
6217
5329
|
gap: designSystemTokens.spacing.spacing_1_2,
|
|
6218
5330
|
fontSize: theme.typography.pxToRem(designSystemTokens.typography.fontSize.sm),
|
|
6219
5331
|
fontWeight: designSystemTokens.typography.fontWeight.medium,
|
|
6220
5332
|
lineHeight: 1,
|
|
6221
|
-
color: designSystemTokens.semanticColors.
|
|
5333
|
+
color: designSystemTokens.semanticColors.color.text.input,
|
|
6222
5334
|
cursor: 'text',
|
|
6223
5335
|
boxSizing: 'border-box',
|
|
6224
5336
|
transition: theme.transitions.create(['border-color', 'background-color'], {
|
|
@@ -6229,7 +5341,7 @@ const StyledSearchChip = styles.styled(InputBase)(({ theme }) => ({
|
|
|
6229
5341
|
height: 'auto',
|
|
6230
5342
|
lineHeight: 1,
|
|
6231
5343
|
'&::placeholder': {
|
|
6232
|
-
color: designSystemTokens.semanticColors.
|
|
5344
|
+
color: designSystemTokens.semanticColors.color.text.inputPlaceholder,
|
|
6233
5345
|
opacity: 1,
|
|
6234
5346
|
},
|
|
6235
5347
|
// Hide native browser clear button for type="search" (we provide our own)
|
|
@@ -6238,22 +5350,22 @@ const StyledSearchChip = styles.styled(InputBase)(({ theme }) => ({
|
|
|
6238
5350
|
},
|
|
6239
5351
|
},
|
|
6240
5352
|
'&:hover': {
|
|
6241
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
6242
|
-
borderColor: designSystemTokens.semanticColors.
|
|
5353
|
+
backgroundColor: designSystemTokens.semanticColors.button.secondary.bgHover,
|
|
5354
|
+
borderColor: designSystemTokens.semanticColors.color.action.border,
|
|
6243
5355
|
},
|
|
6244
5356
|
// After `&:hover` so a disabled chip takes no hover feedback -- MUI leaves pointer-events
|
|
6245
5357
|
// live on the disabled root, so `&:hover` matches it too.
|
|
6246
5358
|
[`&.${InputBase.inputBaseClasses.disabled}`]: {
|
|
6247
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
6248
|
-
borderColor: designSystemTokens.semanticColors.border.primary,
|
|
5359
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
5360
|
+
borderColor: designSystemTokens.semanticColors.color.border.primary,
|
|
6249
5361
|
},
|
|
6250
5362
|
// A tint hugging the border, not focusRingStyles' detached ring: even :focus-visible matches a
|
|
6251
5363
|
// clicked text input, so this has to stay calm. Keep below `&:hover` -- equal specificity, so
|
|
6252
5364
|
// source order is what keeps a hovered+focused chip white.
|
|
6253
5365
|
[`&.${InputBase.inputBaseClasses.focused}`]: {
|
|
6254
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
6255
|
-
borderColor: designSystemTokens.semanticColors.border.focus,
|
|
6256
|
-
outline: `3px solid ${designSystemTokens.semanticColors.
|
|
5366
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
5367
|
+
borderColor: designSystemTokens.semanticColors.color.border.focus,
|
|
5368
|
+
outline: `3px solid ${designSystemTokens.semanticColors.color.action.tint}`,
|
|
6257
5369
|
},
|
|
6258
5370
|
}));
|
|
6259
5371
|
const ClearButton = styles.styled(ButtonBase)({
|
|
@@ -6266,11 +5378,11 @@ const ClearButton = styles.styled(ButtonBase)({
|
|
|
6266
5378
|
border: 'none',
|
|
6267
5379
|
backgroundColor: 'transparent',
|
|
6268
5380
|
cursor: 'pointer',
|
|
6269
|
-
color: designSystemTokens.semanticColors.
|
|
5381
|
+
color: designSystemTokens.semanticColors.color.icon.default,
|
|
6270
5382
|
flexShrink: 0,
|
|
6271
5383
|
borderRadius: designSystemTokens.borderRadius.button,
|
|
6272
5384
|
'&:hover': {
|
|
6273
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
5385
|
+
backgroundColor: designSystemTokens.semanticColors.button.secondary.bgHover,
|
|
6274
5386
|
},
|
|
6275
5387
|
});
|
|
6276
5388
|
/**
|
|
@@ -6281,7 +5393,7 @@ const ClearButton = styles.styled(ButtonBase)({
|
|
|
6281
5393
|
*/
|
|
6282
5394
|
const ModSearchChip = ({ onClear, value, ...props }) => {
|
|
6283
5395
|
const hasValue = Boolean(value && String(value).length > 0);
|
|
6284
|
-
return (jsxRuntime.jsx(StyledSearchChip, { type: "search", value: value, startAdornment: jsxRuntime.jsx(Search, { size: 16, color: designSystemTokens.semanticColors.
|
|
5396
|
+
return (jsxRuntime.jsx(StyledSearchChip, { type: "search", value: value, startAdornment: jsxRuntime.jsx(lucideReact.Search, { size: 16, color: designSystemTokens.semanticColors.color.icon.placeholder, style: { flexShrink: 0 } }), endAdornment: hasValue && onClear ? (jsxRuntime.jsx(ClearButton, { type: "button", onClick: onClear, "aria-label": "Clear search", children: jsxRuntime.jsx(lucideReact.X, { size: 16 }) })) : undefined, ...props }));
|
|
6285
5397
|
};
|
|
6286
5398
|
ModSearchChip.displayName = 'ModSearchChip';
|
|
6287
5399
|
|
|
@@ -6315,7 +5427,7 @@ const useIsomorphicLayoutEffect = typeof window === 'undefined' ? React.useEffec
|
|
|
6315
5427
|
const EXPANDED_WIDTH = 98;
|
|
6316
5428
|
const COLLAPSED_WIDTH = 68;
|
|
6317
5429
|
// The fade overlay must end on the same color as the rail to blend cleanly.
|
|
6318
|
-
const RAIL_BACKGROUND = designSystemTokens.semanticColors.
|
|
5430
|
+
const RAIL_BACKGROUND = designSystemTokens.semanticColors.color.surface.page;
|
|
6319
5431
|
// Unclipped positioning context so the edge handle can straddle the rail's
|
|
6320
5432
|
// trailing edge (Root itself clips its overflow during the width transition).
|
|
6321
5433
|
const Frame = styles.styled('div', {
|
|
@@ -6426,12 +5538,12 @@ const Handle = styles.styled(ButtonBase)(({ theme }) => ({
|
|
|
6426
5538
|
height: designSystemTokens.spacing.spacing_5,
|
|
6427
5539
|
borderRadius: designSystemTokens.borderRadius.s,
|
|
6428
5540
|
backgroundColor: RAIL_BACKGROUND,
|
|
6429
|
-
border: `1px solid ${designSystemTokens.semanticColors.border.
|
|
6430
|
-
color: designSystemTokens.semanticColors.
|
|
5541
|
+
border: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
5542
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
6431
5543
|
transition: theme.transitions.create(['color', 'border-color']),
|
|
6432
5544
|
'&:hover': {
|
|
6433
|
-
color: designSystemTokens.semanticColors.
|
|
6434
|
-
borderColor: designSystemTokens.semanticColors.border.primary,
|
|
5545
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
5546
|
+
borderColor: designSystemTokens.semanticColors.color.border.primary,
|
|
6435
5547
|
},
|
|
6436
5548
|
}));
|
|
6437
5549
|
/**
|
|
@@ -6500,7 +5612,7 @@ function useScrollEdges() {
|
|
|
6500
5612
|
function ModSideNav({ collapsed, onCollapsedChange, header, footer, children, className, id, 'aria-label': ariaLabel, }) {
|
|
6501
5613
|
const contextValue = React.useMemo(() => ({ collapsed }), [collapsed]);
|
|
6502
5614
|
const { ref: scrollRef, contentRef, onScroll, canScrollUp, canScrollDown } = useScrollEdges();
|
|
6503
|
-
const HandleIcon = collapsed ? ChevronRight : ChevronLeft;
|
|
5615
|
+
const HandleIcon = collapsed ? lucideReact.ChevronRight : lucideReact.ChevronLeft;
|
|
6504
5616
|
return (jsxRuntime.jsx(ModSideNavContext.Provider, { value: contextValue, children: jsxRuntime.jsxs(Frame, { collapsed: collapsed, children: [jsxRuntime.jsxs(Root, { collapsed: collapsed, "aria-label": ariaLabel, className: className, id: id, children: [jsxRuntime.jsxs(HeaderRegion, { children: [header, jsxRuntime.jsx(Fade, { edge: "header", visible: canScrollUp })] }), jsxRuntime.jsx(Scroll, { ref: scrollRef, onScroll: onScroll, "data-testid": "mod-side-nav-scroll", children: jsxRuntime.jsx(Stack, { ref: contentRef, sx: {
|
|
6505
5617
|
alignItems: 'center',
|
|
6506
5618
|
gap: `${designSystemTokens.spacing.spacing_1_2}px`,
|
|
@@ -6518,7 +5630,7 @@ const StyledSkeleton = styles.styled(Skeleton, {
|
|
|
6518
5630
|
transform: 'none',
|
|
6519
5631
|
// Light theme colors
|
|
6520
5632
|
...(colorTheme === 'light' && {
|
|
6521
|
-
backgroundColor: designSystemTokens.semanticColors.skeleton.
|
|
5633
|
+
backgroundColor: designSystemTokens.semanticColors.skeleton.bg,
|
|
6522
5634
|
'&::after': {
|
|
6523
5635
|
background: `linear-gradient(90deg, transparent, ${designSystemTokens.semanticColors.skeleton.wave}, transparent)`,
|
|
6524
5636
|
},
|
|
@@ -6565,23 +5677,23 @@ const StyledTable = styles.styled(MuiTable, {
|
|
|
6565
5677
|
borderCollapse: 'separate',
|
|
6566
5678
|
borderSpacing: 0,
|
|
6567
5679
|
[`& .${TableCell.tableCellClasses.head}`]: {
|
|
6568
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
6569
|
-
color: designSystemTokens.semanticColors.
|
|
5680
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.dataGrid.header,
|
|
5681
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
6570
5682
|
fontFamily: designSystemTokens.typography.fontFamily.body,
|
|
6571
5683
|
fontSize: theme.typography.pxToRem(sizeFontSize[tableSize]),
|
|
6572
5684
|
fontWeight: designSystemTokens.typography.fontWeight.semiBold,
|
|
6573
5685
|
lineHeight: 1.4,
|
|
6574
5686
|
padding: sizePadding[tableSize],
|
|
6575
|
-
borderBottom: `1px solid ${designSystemTokens.semanticColors.border.
|
|
5687
|
+
borderBottom: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
6576
5688
|
},
|
|
6577
5689
|
[`& .${TableCell.tableCellClasses.body}`]: {
|
|
6578
|
-
color: designSystemTokens.semanticColors.
|
|
5690
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
6579
5691
|
fontFamily: designSystemTokens.typography.fontFamily.body,
|
|
6580
5692
|
fontSize: theme.typography.pxToRem(sizeFontSize[tableSize]),
|
|
6581
5693
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
6582
5694
|
lineHeight: 1.4,
|
|
6583
5695
|
padding: sizePadding[tableSize],
|
|
6584
|
-
borderBottom: `1px solid ${designSystemTokens.semanticColors.border.
|
|
5696
|
+
borderBottom: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
6585
5697
|
},
|
|
6586
5698
|
// Drop the trailing row's bottom border so the container border (if
|
|
6587
5699
|
// any) is the visual edge.
|
|
@@ -6593,10 +5705,10 @@ const StyledContainer = styles.styled('div', {
|
|
|
6593
5705
|
shouldForwardProp: prop => prop !== 'tableVariant',
|
|
6594
5706
|
})(({ tableVariant = 'bordered' }) => tableVariant === 'bordered'
|
|
6595
5707
|
? {
|
|
6596
|
-
border: `1px solid ${designSystemTokens.semanticColors.border.
|
|
5708
|
+
border: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
6597
5709
|
borderRadius: designSystemTokens.borderRadius.card,
|
|
6598
5710
|
overflow: 'hidden',
|
|
6599
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
5711
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
6600
5712
|
}
|
|
6601
5713
|
: { backgroundColor: 'transparent' });
|
|
6602
5714
|
/**
|
|
@@ -6624,7 +5736,7 @@ ModTable.displayName = 'ModTable';
|
|
|
6624
5736
|
const StyledTabPanel = styles.styled(Box, {
|
|
6625
5737
|
shouldForwardProp: prop => prop !== 'tabPanelVariant',
|
|
6626
5738
|
})(({ tabPanelVariant = 'default' }) => ({
|
|
6627
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
5739
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
6628
5740
|
// default: 16px top padding for content-driven pages.
|
|
6629
5741
|
// flush: zero padding so content sits directly against the tab bar's
|
|
6630
5742
|
// bottom border (sidebars, panels, builders, canvases).
|
|
@@ -6662,7 +5774,7 @@ ModTabPanel.displayName = 'ModTabPanel';
|
|
|
6662
5774
|
const ModTabs = styles.styled(MuiTabs)(() => ({
|
|
6663
5775
|
minHeight: designSystemTokens.spacing.spacing_5,
|
|
6664
5776
|
[`& .${MuiTabs.tabsClasses.indicator}`]: {
|
|
6665
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
5777
|
+
backgroundColor: designSystemTokens.semanticColors.button.nav.borderActive,
|
|
6666
5778
|
height: 2,
|
|
6667
5779
|
},
|
|
6668
5780
|
[`& .${MuiTabs.tabsClasses.list}`]: {
|
|
@@ -6677,14 +5789,21 @@ const StyledTab = styles.styled(MuiTab)(({ theme }) => ({
|
|
|
6677
5789
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
6678
5790
|
fontSize: theme.typography.pxToRem(14),
|
|
6679
5791
|
lineHeight: '1.5rem',
|
|
6680
|
-
color: designSystemTokens.semanticColors.
|
|
5792
|
+
color: designSystemTokens.semanticColors.color.text.tabInactive,
|
|
6681
5793
|
transition: 'none', // Remove animation
|
|
5794
|
+
// The count stays a step quieter than the label, but on secondary text ink
|
|
5795
|
+
// rather than ModTag's neutral status ink. That one is tuned for standalone
|
|
5796
|
+
// badges and is a warm grey: in dark mode it lands #aca598 beside an #f1f0ea
|
|
5797
|
+
// label and reads as disabled rather than as secondary.
|
|
5798
|
+
[`& .${Chip.chipClasses.root}`]: {
|
|
5799
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
5800
|
+
},
|
|
6682
5801
|
[`&.${MuiTab.tabClasses.selected}`]: {
|
|
6683
|
-
color: designSystemTokens.semanticColors.
|
|
5802
|
+
color: designSystemTokens.semanticColors.color.text.tabActive,
|
|
6684
5803
|
fontWeight: designSystemTokens.typography.fontWeight.semiBold,
|
|
6685
5804
|
},
|
|
6686
5805
|
'&:hover': {
|
|
6687
|
-
color: designSystemTokens.semanticColors.
|
|
5806
|
+
color: designSystemTokens.semanticColors.color.text.tabActive,
|
|
6688
5807
|
[`&.${MuiTab.tabClasses.selected}::after`]: {
|
|
6689
5808
|
content: '""',
|
|
6690
5809
|
position: 'absolute',
|
|
@@ -6692,23 +5811,26 @@ const StyledTab = styles.styled(MuiTab)(({ theme }) => ({
|
|
|
6692
5811
|
left: 0,
|
|
6693
5812
|
right: 0,
|
|
6694
5813
|
height: 2,
|
|
6695
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
5814
|
+
backgroundColor: designSystemTokens.semanticColors.button.nav.borderActive,
|
|
6696
5815
|
},
|
|
6697
5816
|
},
|
|
6698
5817
|
[`&.${ButtonBase.buttonBaseClasses.focusVisible}`]: {
|
|
6699
|
-
color: designSystemTokens.semanticColors.
|
|
6700
|
-
outline: `2px solid ${designSystemTokens.semanticColors.border.focus}`,
|
|
5818
|
+
color: designSystemTokens.semanticColors.color.text.tabActive,
|
|
5819
|
+
outline: `2px solid ${designSystemTokens.semanticColors.color.border.focus}`,
|
|
6701
5820
|
outlineOffset: -2,
|
|
6702
5821
|
},
|
|
6703
5822
|
[`&.${MuiTab.tabClasses.disabled}`]: {
|
|
6704
|
-
color: designSystemTokens.semanticColors.
|
|
5823
|
+
color: designSystemTokens.semanticColors.button.fgDisabled,
|
|
6705
5824
|
cursor: 'not-allowed',
|
|
6706
5825
|
pointerEvents: 'auto',
|
|
5826
|
+
[`& .${Chip.chipClasses.root}`]: {
|
|
5827
|
+
color: designSystemTokens.semanticColors.color.text.tabDisabled,
|
|
5828
|
+
},
|
|
6707
5829
|
'&:hover': {
|
|
6708
5830
|
backgroundColor: 'transparent',
|
|
6709
5831
|
},
|
|
6710
5832
|
[`&.${MuiTab.tabClasses.selected}`]: {
|
|
6711
|
-
color: designSystemTokens.semanticColors.
|
|
5833
|
+
color: designSystemTokens.semanticColors.button.fgDisabled,
|
|
6712
5834
|
'&::after': {
|
|
6713
5835
|
content: '""',
|
|
6714
5836
|
position: 'absolute',
|
|
@@ -6716,7 +5838,7 @@ const StyledTab = styles.styled(MuiTab)(({ theme }) => ({
|
|
|
6716
5838
|
left: 0,
|
|
6717
5839
|
right: 0,
|
|
6718
5840
|
height: 2,
|
|
6719
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
5841
|
+
backgroundColor: designSystemTokens.semanticColors.button.tertiary.fgDisabled,
|
|
6720
5842
|
},
|
|
6721
5843
|
},
|
|
6722
5844
|
},
|
|
@@ -6737,34 +5859,34 @@ ModTab.displayName = 'ModTab';
|
|
|
6737
5859
|
|
|
6738
5860
|
const intentStyles = {
|
|
6739
5861
|
neutral: {
|
|
6740
|
-
background: designSystemTokens.semanticColors.status.neutral.
|
|
6741
|
-
border: designSystemTokens.semanticColors.border.primary,
|
|
6742
|
-
text: designSystemTokens.semanticColors.status.neutral.
|
|
6743
|
-
action: designSystemTokens.semanticColors.
|
|
5862
|
+
background: designSystemTokens.semanticColors.color.status.neutral.bg,
|
|
5863
|
+
border: designSystemTokens.semanticColors.color.border.primary,
|
|
5864
|
+
text: designSystemTokens.semanticColors.color.status.neutral.fg,
|
|
5865
|
+
action: designSystemTokens.semanticColors.color.text.link,
|
|
6744
5866
|
},
|
|
6745
5867
|
info: {
|
|
6746
|
-
background: designSystemTokens.semanticColors.toast.
|
|
6747
|
-
border: designSystemTokens.semanticColors.toast.
|
|
6748
|
-
text: designSystemTokens.semanticColors.toast.
|
|
6749
|
-
action: designSystemTokens.semanticColors.toast.
|
|
5868
|
+
background: designSystemTokens.semanticColors.toast.info.bg,
|
|
5869
|
+
border: designSystemTokens.semanticColors.toast.info.border,
|
|
5870
|
+
text: designSystemTokens.semanticColors.toast.info.fg,
|
|
5871
|
+
action: designSystemTokens.semanticColors.toast.info.fg,
|
|
6750
5872
|
},
|
|
6751
5873
|
success: {
|
|
6752
|
-
background: designSystemTokens.semanticColors.toast.
|
|
6753
|
-
border: designSystemTokens.semanticColors.toast.
|
|
6754
|
-
text: designSystemTokens.semanticColors.toast.
|
|
6755
|
-
action: designSystemTokens.semanticColors.toast.
|
|
5874
|
+
background: designSystemTokens.semanticColors.toast.success.bg,
|
|
5875
|
+
border: designSystemTokens.semanticColors.toast.success.border,
|
|
5876
|
+
text: designSystemTokens.semanticColors.toast.success.fg,
|
|
5877
|
+
action: designSystemTokens.semanticColors.toast.success.fg,
|
|
6756
5878
|
},
|
|
6757
5879
|
error: {
|
|
6758
|
-
background: designSystemTokens.semanticColors.toast.
|
|
6759
|
-
border: designSystemTokens.semanticColors.toast.
|
|
6760
|
-
text: designSystemTokens.semanticColors.toast.
|
|
6761
|
-
action: designSystemTokens.semanticColors.toast.
|
|
5880
|
+
background: designSystemTokens.semanticColors.toast.error.bg,
|
|
5881
|
+
border: designSystemTokens.semanticColors.toast.error.border,
|
|
5882
|
+
text: designSystemTokens.semanticColors.toast.error.fg,
|
|
5883
|
+
action: designSystemTokens.semanticColors.toast.error.fg,
|
|
6762
5884
|
},
|
|
6763
5885
|
warning: {
|
|
6764
|
-
background: designSystemTokens.semanticColors.toast.
|
|
6765
|
-
border: designSystemTokens.semanticColors.toast.
|
|
6766
|
-
text: designSystemTokens.semanticColors.toast.
|
|
6767
|
-
action: designSystemTokens.semanticColors.toast.
|
|
5886
|
+
background: designSystemTokens.semanticColors.toast.warning.bg,
|
|
5887
|
+
border: designSystemTokens.semanticColors.toast.warning.border,
|
|
5888
|
+
text: designSystemTokens.semanticColors.toast.warning.fg,
|
|
5889
|
+
action: designSystemTokens.semanticColors.toast.warning.fg,
|
|
6768
5890
|
},
|
|
6769
5891
|
};
|
|
6770
5892
|
const shadowRegular = designSystemTokens.shadows.neutral.regular;
|
|
@@ -6839,7 +5961,7 @@ const ToastButton = styles.styled(Button, {
|
|
|
6839
5961
|
* ModToast - Notification/Toast component based on MUI Alert
|
|
6840
5962
|
*/
|
|
6841
5963
|
const ModToast = ({ intent = 'neutral', type: _type, title, message, showClose = false, actions, onClose, ...props }) => {
|
|
6842
|
-
return (jsxRuntime.jsxs(StyledAlert, { ...props, intent: intent, action: showClose ? (jsxRuntime.jsx(IconButton, { size: "small", onClick: onClose, sx: { color: designSystemTokens.semanticColors.
|
|
5964
|
+
return (jsxRuntime.jsxs(StyledAlert, { ...props, intent: intent, action: showClose ? (jsxRuntime.jsx(IconButton, { size: "small", onClick: onClose, sx: { color: designSystemTokens.semanticColors.color.icon.utility }, children: jsxRuntime.jsx(lucideReact.X, { size: 16 }) })) : undefined, children: [jsxRuntime.jsxs(Stack, { sx: { gap: `${designSystemTokens.spacing.spacing_1}px`, width: '100%' }, children: [title && jsxRuntime.jsx(ToastTitle, { intent: intent, children: title }), message && jsxRuntime.jsx(ToastMessage, { intent: intent, children: message })] }), actions && jsxRuntime.jsx(ToastActions, { direction: "row", children: actions })] }));
|
|
6843
5965
|
};
|
|
6844
5966
|
/**
|
|
6845
5967
|
* Helper component for creating toast action buttons with proper styling
|
|
@@ -6866,13 +5988,13 @@ const Label = styles.styled('span')(({ theme, size = 'medium' }) => ({
|
|
|
6866
5988
|
fontSize: theme.typography.pxToRem(size === 'small' ? designSystemTokens.typography.fontSize.sm : designSystemTokens.typography.fontSize.default),
|
|
6867
5989
|
fontWeight: designSystemTokens.typography.fontWeight.medium,
|
|
6868
5990
|
lineHeight: size === 'small' ? 1.4 : 1.5,
|
|
6869
|
-
color: designSystemTokens.semanticColors.
|
|
5991
|
+
color: designSystemTokens.semanticColors.color.text.input,
|
|
6870
5992
|
}));
|
|
6871
5993
|
const HelperText = styles.styled('span')(({ theme, size = 'medium' }) => ({
|
|
6872
5994
|
fontSize: theme.typography.pxToRem(size === 'small' ? designSystemTokens.typography.fontSize.sm : designSystemTokens.typography.fontSize.default),
|
|
6873
5995
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
6874
5996
|
lineHeight: size === 'small' ? 1.4 : 1.5,
|
|
6875
|
-
color: designSystemTokens.semanticColors.
|
|
5997
|
+
color: designSystemTokens.semanticColors.color.text.secondary,
|
|
6876
5998
|
}));
|
|
6877
5999
|
const StyledSwitch = styles.styled(Switch, {
|
|
6878
6000
|
shouldForwardProp: prop => prop !== 'size',
|
|
@@ -6905,23 +6027,23 @@ const StyledSwitch = styles.styled(Switch, {
|
|
|
6905
6027
|
// Root element
|
|
6906
6028
|
[`& .${Switch.switchClasses.switchBase}`]: {
|
|
6907
6029
|
padding: config.trackPadding,
|
|
6908
|
-
color: designSystemTokens.semanticColors.
|
|
6030
|
+
color: designSystemTokens.semanticColors.control.knob,
|
|
6909
6031
|
transition: theme.transitions.create(['transform'], {
|
|
6910
6032
|
duration: theme.transitions.duration.shortest,
|
|
6911
6033
|
}),
|
|
6912
6034
|
// Focus visible for keyboard navigation
|
|
6913
6035
|
'&.Mui-focusVisible': {
|
|
6914
6036
|
[`& + .${Switch.switchClasses.track}`]: {
|
|
6915
|
-
outline: `2px solid ${designSystemTokens.semanticColors.border.focus}`,
|
|
6037
|
+
outline: `2px solid ${designSystemTokens.semanticColors.color.border.focus}`,
|
|
6916
6038
|
outlineOffset: 2,
|
|
6917
6039
|
},
|
|
6918
6040
|
},
|
|
6919
6041
|
// Checked state
|
|
6920
6042
|
[`&.${Switch.switchClasses.checked}`]: {
|
|
6921
6043
|
transform: `translateX(${thumbTranslate}px)`,
|
|
6922
|
-
color: designSystemTokens.semanticColors.
|
|
6044
|
+
color: designSystemTokens.semanticColors.control.knob,
|
|
6923
6045
|
[`& + .${Switch.switchClasses.track}`]: {
|
|
6924
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
6046
|
+
backgroundColor: designSystemTokens.semanticColors.button.primary.bg,
|
|
6925
6047
|
opacity: 1,
|
|
6926
6048
|
border: 'none',
|
|
6927
6049
|
},
|
|
@@ -6929,18 +6051,18 @@ const StyledSwitch = styles.styled(Switch, {
|
|
|
6929
6051
|
// Disabled state
|
|
6930
6052
|
[`&.${Switch.switchClasses.disabled}`]: {
|
|
6931
6053
|
// Thumb changes to disabled background color for both checked and unchecked
|
|
6932
|
-
color: designSystemTokens.semanticColors.input.
|
|
6054
|
+
color: designSystemTokens.semanticColors.input.bgDisabled,
|
|
6933
6055
|
cursor: 'not-allowed',
|
|
6934
6056
|
// Both checked and unchecked use the same grey track when disabled
|
|
6935
6057
|
[`& + .${Switch.switchClasses.track}`]: {
|
|
6936
|
-
backgroundColor: designSystemTokens.semanticColors.border.
|
|
6058
|
+
backgroundColor: designSystemTokens.semanticColors.color.border.primary,
|
|
6937
6059
|
opacity: 1,
|
|
6938
6060
|
border: 'none',
|
|
6939
6061
|
},
|
|
6940
6062
|
},
|
|
6941
6063
|
// More specific selector for disabled+checked to override checked color
|
|
6942
6064
|
[`&.${Switch.switchClasses.disabled}.${Switch.switchClasses.checked}`]: {
|
|
6943
|
-
color: designSystemTokens.semanticColors.input.
|
|
6065
|
+
color: designSystemTokens.semanticColors.input.bgDisabled,
|
|
6944
6066
|
},
|
|
6945
6067
|
},
|
|
6946
6068
|
// Thumb
|
|
@@ -6957,12 +6079,12 @@ const StyledSwitch = styles.styled(Switch, {
|
|
|
6957
6079
|
width: config.width,
|
|
6958
6080
|
height: config.height,
|
|
6959
6081
|
borderRadius: config.height / 2,
|
|
6960
|
-
backgroundColor: designSystemTokens.semanticColors.surface.
|
|
6082
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.sunkenDeep,
|
|
6961
6083
|
opacity: 1,
|
|
6962
6084
|
// Off track carries a border; box-sizing keeps the 1px inside the
|
|
6963
6085
|
// configured width/height. Checked/disabled states reset it below.
|
|
6964
6086
|
boxSizing: 'border-box',
|
|
6965
|
-
border: `1px solid ${designSystemTokens.semanticColors.border.strong}`,
|
|
6087
|
+
border: `1px solid ${designSystemTokens.semanticColors.color.border.strong}`,
|
|
6966
6088
|
transition: theme.transitions.create(['background-color'], {
|
|
6967
6089
|
duration: theme.transitions.duration.short,
|
|
6968
6090
|
}),
|
|
@@ -7023,7 +6145,7 @@ const StyledToggleButton$1 = styles.styled(MuiToggleButton, {
|
|
|
7023
6145
|
fontSize: theme.typography.pxToRem(sizeStyles[toggleSize].fontSize),
|
|
7024
6146
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
7025
6147
|
lineHeight: 1,
|
|
7026
|
-
color: segmented ? designSystemTokens.semanticColors.
|
|
6148
|
+
color: segmented ? designSystemTokens.semanticColors.color.text.primary : designSystemTokens.semanticColors.color.text.secondary,
|
|
7027
6149
|
backgroundColor: 'transparent',
|
|
7028
6150
|
border: 'none',
|
|
7029
6151
|
// Segmented buttons are independent rounded pills on the group's track.
|
|
@@ -7033,22 +6155,22 @@ const StyledToggleButton$1 = styles.styled(MuiToggleButton, {
|
|
|
7033
6155
|
duration: theme.transitions.duration.short,
|
|
7034
6156
|
}),
|
|
7035
6157
|
'&:hover': {
|
|
7036
|
-
backgroundColor: segmented ? 'transparent' : designSystemTokens.semanticColors.
|
|
7037
|
-
color: designSystemTokens.semanticColors.
|
|
6158
|
+
backgroundColor: segmented ? 'transparent' : designSystemTokens.semanticColors.color.surface.tabActive,
|
|
6159
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
7038
6160
|
},
|
|
7039
6161
|
'&.Mui-selected, &.Mui-selected:hover': {
|
|
7040
6162
|
backgroundColor: segmented
|
|
7041
|
-
? designSystemTokens.semanticColors.
|
|
7042
|
-
: designSystemTokens.semanticColors.
|
|
7043
|
-
color: segmented ? designSystemTokens.semanticColors.
|
|
6163
|
+
? designSystemTokens.semanticColors.color.surface.raised
|
|
6164
|
+
: designSystemTokens.semanticColors.color.surface.tabActive,
|
|
6165
|
+
color: segmented ? designSystemTokens.semanticColors.color.action.default : designSystemTokens.semanticColors.color.text.primary,
|
|
7044
6166
|
fontWeight: designSystemTokens.typography.fontWeight.semiBold,
|
|
7045
6167
|
},
|
|
7046
6168
|
'&.Mui-focusVisible': {
|
|
7047
|
-
outline: `2px solid ${designSystemTokens.semanticColors.border.focus}`,
|
|
6169
|
+
outline: `2px solid ${designSystemTokens.semanticColors.color.border.focus}`,
|
|
7048
6170
|
outlineOffset: -2,
|
|
7049
6171
|
},
|
|
7050
6172
|
'&.Mui-disabled': {
|
|
7051
|
-
color: designSystemTokens.semanticColors.
|
|
6173
|
+
color: designSystemTokens.semanticColors.button.fgDisabled,
|
|
7052
6174
|
cursor: 'default',
|
|
7053
6175
|
pointerEvents: 'none',
|
|
7054
6176
|
},
|
|
@@ -7072,7 +6194,7 @@ const StyledToggleButtonGroup$1 = styles.styled(MuiToggleButtonGroup, {
|
|
|
7072
6194
|
...(segmented
|
|
7073
6195
|
? {
|
|
7074
6196
|
// Sunken track holding raised pills (the Morpheus `.seg` control).
|
|
7075
|
-
backgroundColor: designSystemTokens.semanticColors.surface.
|
|
6197
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.sunkenDeep,
|
|
7076
6198
|
borderRadius: designSystemTokens.borderRadius.input,
|
|
7077
6199
|
border: 'none',
|
|
7078
6200
|
padding: designSystemTokens.spacing.spacing_1_2,
|
|
@@ -7080,7 +6202,7 @@ const StyledToggleButtonGroup$1 = styles.styled(MuiToggleButtonGroup, {
|
|
|
7080
6202
|
}
|
|
7081
6203
|
: {
|
|
7082
6204
|
borderRadius: designSystemTokens.borderRadius.button,
|
|
7083
|
-
border: `1px solid ${designSystemTokens.semanticColors.border.
|
|
6205
|
+
border: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
7084
6206
|
overflow: 'hidden',
|
|
7085
6207
|
}),
|
|
7086
6208
|
// Default fuses the children (square inner corners, no gap); segmented
|
|
@@ -7113,13 +6235,8 @@ const ModToggleButtonGroup = ({ size = 'medium', variant = 'default', children,
|
|
|
7113
6235
|
};
|
|
7114
6236
|
ModToggleButtonGroup.displayName = 'ModToggleButtonGroup';
|
|
7115
6237
|
|
|
7116
|
-
/**
|
|
7117
|
-
* ModToggleButtonWithText
|
|
7118
|
-
*/
|
|
7119
|
-
const ModToggleButtonWithText = styles.styled('div')({});
|
|
7120
|
-
|
|
7121
6238
|
const StyledToolbar = styles.styled(xDataGrid.Toolbar)(({ theme }) => ({
|
|
7122
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
6239
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
7123
6240
|
minHeight: 'auto',
|
|
7124
6241
|
justifyContent: 'space-between',
|
|
7125
6242
|
// Apply padding directly to match Figma design (16px horizontal, 12px vertical)
|
|
@@ -7175,16 +6292,6 @@ const ModToolbar = ({ children, ...props }) => {
|
|
|
7175
6292
|
};
|
|
7176
6293
|
ModToolbar.displayName = 'ModToolbar';
|
|
7177
6294
|
|
|
7178
|
-
/**
|
|
7179
|
-
* ModTopNav
|
|
7180
|
-
*/
|
|
7181
|
-
const ModTopNav = styles.styled('div')({});
|
|
7182
|
-
|
|
7183
|
-
/**
|
|
7184
|
-
* ModTourModal
|
|
7185
|
-
*/
|
|
7186
|
-
const ModTourModal = styles.styled('div')({});
|
|
7187
|
-
|
|
7188
6295
|
/**
|
|
7189
6296
|
* Custom label component that reads extra slot data from the item model.
|
|
7190
6297
|
* Used as `slots.label` on the TreeItem.
|
|
@@ -7222,7 +6329,7 @@ const ItemIcon = styles.styled('span')({
|
|
|
7222
6329
|
width: 16,
|
|
7223
6330
|
height: 16,
|
|
7224
6331
|
flexShrink: 0,
|
|
7225
|
-
color: designSystemTokens.semanticColors.
|
|
6332
|
+
color: designSystemTokens.semanticColors.color.icon.default,
|
|
7226
6333
|
'& svg': {
|
|
7227
6334
|
width: 16,
|
|
7228
6335
|
height: 16,
|
|
@@ -7240,13 +6347,13 @@ const ItemSecondaryLabel = styles.styled('span')({
|
|
|
7240
6347
|
fontSize: designSystemTokens.typography.fontSize.xs,
|
|
7241
6348
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
7242
6349
|
fontFamily: designSystemTokens.typography.fontFamily.body,
|
|
7243
|
-
color: designSystemTokens.semanticColors.
|
|
6350
|
+
color: designSystemTokens.semanticColors.color.text.link,
|
|
7244
6351
|
});
|
|
7245
6352
|
const ItemEndAction = styles.styled('span')({
|
|
7246
6353
|
display: 'inline-flex',
|
|
7247
6354
|
alignItems: 'center',
|
|
7248
6355
|
flexShrink: 0,
|
|
7249
|
-
color: designSystemTokens.semanticColors.
|
|
6356
|
+
color: designSystemTokens.semanticColors.color.icon.utility,
|
|
7250
6357
|
'& svg': {
|
|
7251
6358
|
width: 16,
|
|
7252
6359
|
height: 16,
|
|
@@ -7271,8 +6378,8 @@ const ModTreeView = ({ slots, ...props }) => {
|
|
|
7271
6378
|
}, itemChildrenIndentation: designSystemTokens.spacing.spacing_2_1_2, ...props }));
|
|
7272
6379
|
};
|
|
7273
6380
|
ModTreeView.displayName = 'ModTreeView';
|
|
7274
|
-
const CollapseIcon = () => jsxRuntime.jsx(ChevronDown, { size: 16 });
|
|
7275
|
-
const ExpandIcon = () => jsxRuntime.jsx(ChevronRight, { size: 16 });
|
|
6381
|
+
const CollapseIcon = () => jsxRuntime.jsx(lucideReact.ChevronDown, { size: 16 });
|
|
6382
|
+
const ExpandIcon = () => jsxRuntime.jsx(lucideReact.ChevronRight, { size: 16 });
|
|
7276
6383
|
const StyledTreeView = styles.styled(RichTreeViewPro.RichTreeViewPro)({
|
|
7277
6384
|
[`& .${TreeItem.treeItemClasses.content}`]: {
|
|
7278
6385
|
height: 28,
|
|
@@ -7282,36 +6389,36 @@ const StyledTreeView = styles.styled(RichTreeViewPro.RichTreeViewPro)({
|
|
|
7282
6389
|
borderRadius: 0,
|
|
7283
6390
|
},
|
|
7284
6391
|
[`& .${TreeItem.treeItemClasses.content}:hover`]: {
|
|
7285
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
6392
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.rowHover,
|
|
7286
6393
|
},
|
|
7287
6394
|
[`& .${TreeItem.treeItemClasses.content}[data-focused]`]: {
|
|
7288
|
-
boxShadow: `inset 0 0 0 2px ${designSystemTokens.semanticColors.border.focus}`,
|
|
6395
|
+
boxShadow: `inset 0 0 0 2px ${designSystemTokens.semanticColors.color.border.focus}`,
|
|
7289
6396
|
backgroundColor: 'transparent',
|
|
7290
6397
|
},
|
|
7291
6398
|
[`& .${TreeItem.treeItemClasses.content}[data-selected]`]: {
|
|
7292
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
6399
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.rowHover,
|
|
7293
6400
|
},
|
|
7294
6401
|
[`& .${TreeItem.treeItemClasses.content}[data-selected][data-focused]`]: {
|
|
7295
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
7296
|
-
boxShadow: `inset 0 0 0 2px ${designSystemTokens.semanticColors.border.focus}`,
|
|
6402
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.rowHover,
|
|
6403
|
+
boxShadow: `inset 0 0 0 2px ${designSystemTokens.semanticColors.color.border.focus}`,
|
|
7297
6404
|
},
|
|
7298
6405
|
[`& .${TreeItem.treeItemClasses.label}`]: {
|
|
7299
6406
|
fontSize: designSystemTokens.typography.fontSize.xs,
|
|
7300
6407
|
fontWeight: designSystemTokens.typography.fontWeight.regular,
|
|
7301
6408
|
fontFamily: designSystemTokens.typography.fontFamily.body,
|
|
7302
|
-
color: designSystemTokens.semanticColors.
|
|
6409
|
+
color: designSystemTokens.semanticColors.color.text.primary,
|
|
7303
6410
|
padding: 0,
|
|
7304
6411
|
},
|
|
7305
6412
|
[`& .${TreeItem.treeItemClasses.iconContainer}`]: {
|
|
7306
6413
|
width: 16,
|
|
7307
|
-
color: designSystemTokens.semanticColors.
|
|
6414
|
+
color: designSystemTokens.semanticColors.color.icon.default,
|
|
7308
6415
|
'& svg': {
|
|
7309
6416
|
width: 16,
|
|
7310
6417
|
height: 16,
|
|
7311
6418
|
},
|
|
7312
6419
|
},
|
|
7313
6420
|
[`& .${TreeItem.treeItemClasses.groupTransition}`]: {
|
|
7314
|
-
borderLeft: `1px solid ${designSystemTokens.semanticColors.border.primary}`,
|
|
6421
|
+
borderLeft: `1px solid ${designSystemTokens.semanticColors.color.border.primary}`,
|
|
7315
6422
|
marginLeft: designSystemTokens.spacing.spacing_1_1_4,
|
|
7316
6423
|
},
|
|
7317
6424
|
});
|
|
@@ -7319,7 +6426,7 @@ const StyledTreeView = styles.styled(RichTreeViewPro.RichTreeViewPro)({
|
|
|
7319
6426
|
// Figma-exact border radius for toggle buttons — no matching design token
|
|
7320
6427
|
const TOGGLE_BUTTON_BORDER_RADIUS = 14;
|
|
7321
6428
|
const StyledToggleButtonGroup = styles.styled(MuiToggleButtonGroup)(({ theme }) => ({
|
|
7322
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
6429
|
+
backgroundColor: designSystemTokens.semanticColors.color.surface.raised,
|
|
7323
6430
|
padding: theme.spacing(0.625, 0.875),
|
|
7324
6431
|
borderRadius: designSystemTokens.borderRadius.m,
|
|
7325
6432
|
gap: 0,
|
|
@@ -7339,7 +6446,7 @@ const StyledToggleButtonGroup = styles.styled(MuiToggleButtonGroup)(({ theme })
|
|
|
7339
6446
|
const StyledToggleButton = styles.styled(MuiToggleButton)(({ theme }) => ({
|
|
7340
6447
|
padding: theme.spacing(0.625),
|
|
7341
6448
|
minWidth: 'auto',
|
|
7342
|
-
color: designSystemTokens.semanticColors.
|
|
6449
|
+
color: designSystemTokens.semanticColors.color.icon.default,
|
|
7343
6450
|
border: 'none',
|
|
7344
6451
|
'& svg': {
|
|
7345
6452
|
width: 20,
|
|
@@ -7349,10 +6456,10 @@ const StyledToggleButton = styles.styled(MuiToggleButton)(({ theme }) => ({
|
|
|
7349
6456
|
backgroundColor: 'transparent',
|
|
7350
6457
|
},
|
|
7351
6458
|
[`&.${MuiToggleButton.toggleButtonClasses.selected}`]: {
|
|
7352
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
7353
|
-
color: designSystemTokens.semanticColors.
|
|
6459
|
+
backgroundColor: designSystemTokens.semanticColors.button.nav.bgPressed,
|
|
6460
|
+
color: designSystemTokens.semanticColors.color.icon.active,
|
|
7354
6461
|
'&:hover': {
|
|
7355
|
-
backgroundColor: designSystemTokens.semanticColors.
|
|
6462
|
+
backgroundColor: designSystemTokens.semanticColors.button.nav.bgPressed,
|
|
7356
6463
|
},
|
|
7357
6464
|
},
|
|
7358
6465
|
}));
|
|
@@ -7440,10 +6547,8 @@ exports.ModDataGridFilterPanelDeleteIcon = ModDataGridFilterPanelDeleteIcon;
|
|
|
7440
6547
|
exports.ModDataGridFilterPanelRemoveAllIcon = ModDataGridFilterPanelRemoveAllIcon;
|
|
7441
6548
|
exports.ModDataGridFiltersButton = ModDataGridFiltersButton;
|
|
7442
6549
|
exports.ModDataGridHeaderLabel = ModDataGridHeaderLabel;
|
|
7443
|
-
exports.ModDataGridSelect =
|
|
6550
|
+
exports.ModDataGridSelect = ModDataGridSelect;
|
|
7444
6551
|
exports.ModDatePicker = ModDatePicker;
|
|
7445
|
-
exports.ModDatePickerListItem = ModDatePickerListItem;
|
|
7446
|
-
exports.ModDatePickerMenu = ModDatePickerMenu;
|
|
7447
6552
|
exports.ModDivider = ModDivider;
|
|
7448
6553
|
exports.ModDot = ModDot;
|
|
7449
6554
|
exports.ModDownloadToast = ModDownloadToast;
|
|
@@ -7485,7 +6590,6 @@ exports.ModProgressCell = ModProgressCell;
|
|
|
7485
6590
|
exports.ModProgressbar = ModProgressbar;
|
|
7486
6591
|
exports.ModQuickFilter = ModQuickFilter;
|
|
7487
6592
|
exports.ModRadio = ModRadio;
|
|
7488
|
-
exports.ModRadioButtonWithText = ModRadioButtonWithText;
|
|
7489
6593
|
exports.ModRipplingDot = ModRipplingDot;
|
|
7490
6594
|
exports.ModSearchChip = ModSearchChip;
|
|
7491
6595
|
exports.ModSelect = ModSelect;
|
|
@@ -7505,11 +6609,8 @@ exports.ModToastButton = ModToastButton;
|
|
|
7505
6609
|
exports.ModToggle = ModToggle;
|
|
7506
6610
|
exports.ModToggleButton = ModToggleButton;
|
|
7507
6611
|
exports.ModToggleButtonGroup = ModToggleButtonGroup;
|
|
7508
|
-
exports.ModToggleButtonWithText = ModToggleButtonWithText;
|
|
7509
6612
|
exports.ModToolbar = ModToolbar;
|
|
7510
6613
|
exports.ModTooltip = ModTooltip;
|
|
7511
|
-
exports.ModTopNav = ModTopNav;
|
|
7512
|
-
exports.ModTourModal = ModTourModal;
|
|
7513
6614
|
exports.ModTreeItem = ModTreeItem;
|
|
7514
6615
|
exports.ModTreeView = ModTreeView;
|
|
7515
6616
|
exports.ModTypologyButton = StyledToggleButton;
|