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