@moderneinc/neo-styled-components 2.6.0 → 2.7.0-next.4bcf59
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/Avatar/Avatar.d.ts +1 -1
- package/dist/ButtonTab/ButtonTab.d.ts +19 -0
- package/dist/ButtonTabGroup/ButtonTabGroup.d.ts +39 -0
- package/dist/DataGridFilterPanel/DataGridFilterPanel.d.ts +2 -2
- package/dist/Divider/Divider.d.ts +5 -5
- package/dist/Dropdown/Dropdown.d.ts +24 -0
- package/dist/DropdownMenu/DropdownMenu.d.ts +32 -0
- package/dist/DropdownMenuItem/DropdownMenuItem.d.ts +50 -0
- package/dist/GeneralAvatar/GeneralAvatar.d.ts +26 -0
- package/dist/ListItemButton/ListItemButton.d.ts +1 -1
- package/dist/MarketplaceCard/MarketplaceCard.d.ts +2 -2
- package/dist/MarketplaceLargeCard/MarketplaceLargeCard.d.ts +2 -2
- package/dist/NavigationAvatar/NavigationAvatar.d.ts +15 -0
- package/dist/StatusBanner/StatusBanner.d.ts +4 -4
- package/dist/index.d.ts +123 -90
- package/dist/index.esm.js +333 -222
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +345 -227
- package/dist/index.js.map +1 -1
- package/dist/utils/avatarColors.d.ts +7 -0
- package/dist/utils/focusRing.d.ts +3 -3
- package/package.json +3 -3
- package/dist/ButtonGroup/ButtonGroup.d.ts +0 -41
- package/dist/Menu/Menu.d.ts +0 -45
- package/dist/MenuItem/MenuItem.d.ts +0 -61
- package/dist/Select/Select.d.ts +0 -24
package/dist/index.js
CHANGED
|
@@ -14,7 +14,8 @@ var Breadcrumbs = require('@mui/material/Breadcrumbs');
|
|
|
14
14
|
var Link = require('@mui/material/Link');
|
|
15
15
|
var ButtonBase = require('@mui/material/ButtonBase');
|
|
16
16
|
var CircularProgress = require('@mui/material/CircularProgress');
|
|
17
|
-
var
|
|
17
|
+
var MuiToggleButton = require('@mui/material/ToggleButton');
|
|
18
|
+
var MuiToggleButtonGroup = require('@mui/material/ToggleButtonGroup');
|
|
18
19
|
var Checkbox = require('@mui/material/Checkbox');
|
|
19
20
|
var xDataGridPro = require('@mui/x-data-grid-pro');
|
|
20
21
|
var Button = require('@mui/material/Button');
|
|
@@ -37,6 +38,9 @@ var PickersShortcuts = require('@mui/x-date-pickers/PickersShortcuts');
|
|
|
37
38
|
var DateRangePicker = require('@mui/x-date-pickers-pro/DateRangePicker');
|
|
38
39
|
var DateRangePickerDay = require('@mui/x-date-pickers-pro/DateRangePickerDay');
|
|
39
40
|
var Badge = require('@mui/material/Badge');
|
|
41
|
+
var List = require('@mui/material/List');
|
|
42
|
+
var Menu = require('@mui/material/Menu');
|
|
43
|
+
var Paper = require('@mui/material/Paper');
|
|
40
44
|
var FormControl = require('@mui/material/FormControl');
|
|
41
45
|
var FormHelperText = require('@mui/material/FormHelperText');
|
|
42
46
|
var ListItemButton = require('@mui/material/ListItemButton');
|
|
@@ -44,9 +48,6 @@ var ListItemIcon = require('@mui/material/ListItemIcon');
|
|
|
44
48
|
var ListItemText = require('@mui/material/ListItemText');
|
|
45
49
|
var Typography = require('@mui/material/Typography');
|
|
46
50
|
var MuiCard = require('@mui/material/Card');
|
|
47
|
-
var List = require('@mui/material/List');
|
|
48
|
-
var Menu = require('@mui/material/Menu');
|
|
49
|
-
var Paper = require('@mui/material/Paper');
|
|
50
51
|
var Dialog = require('@mui/material/Dialog');
|
|
51
52
|
var DialogActions = require('@mui/material/DialogActions');
|
|
52
53
|
var DialogContent = require('@mui/material/DialogContent');
|
|
@@ -62,22 +63,20 @@ var Switch = require('@mui/material/Switch');
|
|
|
62
63
|
var hooks = require('@mui/x-tree-view/hooks');
|
|
63
64
|
var TreeItem = require('@mui/x-tree-view/TreeItem');
|
|
64
65
|
var RichTreeViewPro = require('@mui/x-tree-view-pro/RichTreeViewPro');
|
|
65
|
-
var ToggleButton = require('@mui/material/ToggleButton');
|
|
66
|
-
var ToggleButtonGroup = require('@mui/material/ToggleButtonGroup');
|
|
67
66
|
|
|
68
67
|
/**
|
|
69
|
-
* Outline-based focus ring styles derived from Neo
|
|
68
|
+
* Outline-based focus ring styles derived from Neo border tokens.
|
|
70
69
|
* Uses CSS outline (not box-shadow) so focus rings are never clipped by overflow:hidden.
|
|
71
70
|
*
|
|
72
|
-
* Produces a double-ring effect: a white inner gap (via outline-offset) and a
|
|
71
|
+
* Produces a double-ring effect: a white inner gap (via outline-offset) and a colored outer ring.
|
|
73
72
|
*/
|
|
74
73
|
const focusRingStyles = {
|
|
75
|
-
outline:
|
|
76
|
-
outlineOffset:
|
|
74
|
+
outline: `2px solid ${neoDesign.semanticColors.border.focus}`,
|
|
75
|
+
outlineOffset: '2px',
|
|
77
76
|
};
|
|
78
77
|
|
|
79
78
|
// biome-ignore lint/suspicious/noExplicitAny: Type cast required to override MUI Avatar variant type without global augmentation
|
|
80
|
-
const StyledAvatar = styles.styled(Avatar, {
|
|
79
|
+
const StyledAvatar$1 = styles.styled(Avatar, {
|
|
81
80
|
shouldForwardProp: prop => prop !== 'size' && prop !== 'variant',
|
|
82
81
|
})(({ theme, size = 'medium', variant = 'circular' }) => ({
|
|
83
82
|
boxSizing: 'border-box',
|
|
@@ -148,7 +147,7 @@ const AvatarContainer = styles.styled(Box)(({ size = 'medium' }) => ({
|
|
|
148
147
|
/**
|
|
149
148
|
* NeoAvatar - User avatar component based on MUI Avatar
|
|
150
149
|
*
|
|
151
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=
|
|
150
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=9600-185
|
|
152
151
|
*
|
|
153
152
|
* Figma Props Mapping:
|
|
154
153
|
* - Figma Type "Initials" → variant="initials", size="small" (20px)
|
|
@@ -179,7 +178,7 @@ const AvatarContainer = styles.styled(Box)(({ size = 'medium' }) => ({
|
|
|
179
178
|
*/
|
|
180
179
|
const NeoAvatar = ({ size = 'medium', variant = 'circular', ...props }) => {
|
|
181
180
|
// shouldForwardProp filters out size and variant from being passed to the DOM
|
|
182
|
-
const avatar = jsxRuntime.jsx(StyledAvatar, { size: size, variant: variant, ...props });
|
|
181
|
+
const avatar = jsxRuntime.jsx(StyledAvatar$1, { size: size, variant: variant, ...props });
|
|
183
182
|
// Medium size with circular variant (image) gets wrapped in white container
|
|
184
183
|
if (size === 'medium' && variant === 'circular') {
|
|
185
184
|
return jsxRuntime.jsx(AvatarContainer, { size: size, children: avatar });
|
|
@@ -221,7 +220,7 @@ const StyledChip$2 = styles.styled(Chip)(({ theme }) => ({
|
|
|
221
220
|
[`&.${Chip.chipClasses.colorDefault}`]: {
|
|
222
221
|
backgroundColor: neoDesign.semanticColors.status.neutral.light,
|
|
223
222
|
color: neoDesign.semanticColors.status.neutral.dark,
|
|
224
|
-
border: `1px solid ${neoDesign.semanticColors.status.neutral.
|
|
223
|
+
border: `1px solid ${neoDesign.semanticColors.status.neutral.default}80`,
|
|
225
224
|
[`& .${Chip.chipClasses.icon}, & .${Chip.chipClasses.deleteIcon}`]: {
|
|
226
225
|
color: neoDesign.semanticColors.status.neutral.dark,
|
|
227
226
|
},
|
|
@@ -230,7 +229,7 @@ const StyledChip$2 = styles.styled(Chip)(({ theme }) => ({
|
|
|
230
229
|
[`&.${Chip.chipClasses.colorError}`]: {
|
|
231
230
|
backgroundColor: neoDesign.semanticColors.status.error.light,
|
|
232
231
|
color: neoDesign.semanticColors.status.error.dark,
|
|
233
|
-
border: `1px solid ${neoDesign.semanticColors.status.error.
|
|
232
|
+
border: `1px solid ${neoDesign.semanticColors.status.error.default}80`,
|
|
234
233
|
[`& .${Chip.chipClasses.icon}, & .${Chip.chipClasses.deleteIcon}`]: {
|
|
235
234
|
color: neoDesign.semanticColors.status.error.dark,
|
|
236
235
|
},
|
|
@@ -239,7 +238,7 @@ const StyledChip$2 = styles.styled(Chip)(({ theme }) => ({
|
|
|
239
238
|
[`&.${Chip.chipClasses.colorWarning}`]: {
|
|
240
239
|
backgroundColor: neoDesign.semanticColors.status.warning.light,
|
|
241
240
|
color: neoDesign.semanticColors.status.warning.dark,
|
|
242
|
-
border: `1px solid ${neoDesign.semanticColors.status.warning.
|
|
241
|
+
border: `1px solid ${neoDesign.semanticColors.status.warning.default}80`,
|
|
243
242
|
[`& .${Chip.chipClasses.icon}, & .${Chip.chipClasses.deleteIcon}`]: {
|
|
244
243
|
color: neoDesign.semanticColors.status.warning.dark,
|
|
245
244
|
},
|
|
@@ -248,7 +247,7 @@ const StyledChip$2 = styles.styled(Chip)(({ theme }) => ({
|
|
|
248
247
|
[`&.${Chip.chipClasses.colorSuccess}`]: {
|
|
249
248
|
backgroundColor: neoDesign.semanticColors.status.success.light,
|
|
250
249
|
color: neoDesign.semanticColors.status.success.dark,
|
|
251
|
-
border: `1px solid ${neoDesign.semanticColors.status.success.
|
|
250
|
+
border: `1px solid ${neoDesign.semanticColors.status.success.default}80`,
|
|
252
251
|
[`& .${Chip.chipClasses.icon}, & .${Chip.chipClasses.deleteIcon}`]: {
|
|
253
252
|
color: neoDesign.semanticColors.status.success.dark,
|
|
254
253
|
},
|
|
@@ -257,7 +256,7 @@ const StyledChip$2 = styles.styled(Chip)(({ theme }) => ({
|
|
|
257
256
|
[`&.${Chip.chipClasses.colorInfo}`]: {
|
|
258
257
|
backgroundColor: neoDesign.semanticColors.status.info.light,
|
|
259
258
|
color: neoDesign.semanticColors.status.info.dark,
|
|
260
|
-
border: `1px solid ${neoDesign.semanticColors.status.info.
|
|
259
|
+
border: `1px solid ${neoDesign.semanticColors.status.info.default}80`,
|
|
261
260
|
[`& .${Chip.chipClasses.icon}, & .${Chip.chipClasses.deleteIcon}`]: {
|
|
262
261
|
color: neoDesign.semanticColors.status.info.dark,
|
|
263
262
|
},
|
|
@@ -1068,13 +1067,13 @@ const NeoBanner = ({ variant = 'light', message, messagePosition = 'left', linkT
|
|
|
1068
1067
|
return neoDesign.semanticColors.surfaces.white;
|
|
1069
1068
|
}
|
|
1070
1069
|
if (variant === 'success') {
|
|
1071
|
-
return neoDesign.semanticColors.status.success.
|
|
1070
|
+
return neoDesign.semanticColors.status.success.default;
|
|
1072
1071
|
}
|
|
1073
1072
|
if (variant === 'error') {
|
|
1074
|
-
return neoDesign.semanticColors.status.error.
|
|
1073
|
+
return neoDesign.semanticColors.status.error.default;
|
|
1075
1074
|
}
|
|
1076
1075
|
if (variant === 'warning') {
|
|
1077
|
-
return neoDesign.semanticColors.status.warning.
|
|
1076
|
+
return neoDesign.semanticColors.status.warning.default;
|
|
1078
1077
|
}
|
|
1079
1078
|
return neoDesign.colors.grey['800'];
|
|
1080
1079
|
};
|
|
@@ -1106,7 +1105,7 @@ const StyledBreadcrumbLink = styles.styled(Link, {
|
|
|
1106
1105
|
color: current ? neoDesign.semanticColors.buttons.tertiary.hover : neoDesign.semanticColors.icons.hover,
|
|
1107
1106
|
},
|
|
1108
1107
|
'&:focus-visible': {
|
|
1109
|
-
outline: `2px solid ${neoDesign.semanticColors.
|
|
1108
|
+
outline: `2px solid ${neoDesign.semanticColors.border.focus}`,
|
|
1110
1109
|
outlineOffset: 2,
|
|
1111
1110
|
},
|
|
1112
1111
|
}));
|
|
@@ -1196,7 +1195,7 @@ const StyledButtonBase$1 = styles.styled(ButtonBase, {
|
|
|
1196
1195
|
},
|
|
1197
1196
|
// Focus visible for keyboard navigation
|
|
1198
1197
|
[`&.${ButtonBase.buttonBaseClasses.focusVisible}`]: {
|
|
1199
|
-
outline: `2px solid ${neoDesign.semanticColors.
|
|
1198
|
+
outline: `2px solid ${neoDesign.semanticColors.border.focus}`,
|
|
1200
1199
|
outlineOffset: 2,
|
|
1201
1200
|
},
|
|
1202
1201
|
};
|
|
@@ -1236,7 +1235,7 @@ const StyledButtonBase$1 = styles.styled(ButtonBase, {
|
|
|
1236
1235
|
: {
|
|
1237
1236
|
[`&.${ButtonBase.buttonBaseClasses.disabled}`]: {
|
|
1238
1237
|
backgroundColor: neoDesign.semanticColors.buttons.secondary.disabledBackground,
|
|
1239
|
-
borderColor: neoDesign.semanticColors.
|
|
1238
|
+
borderColor: neoDesign.semanticColors.border.secondary,
|
|
1240
1239
|
color: neoDesign.semanticColors.typography.button.disabled,
|
|
1241
1240
|
},
|
|
1242
1241
|
}),
|
|
@@ -1364,40 +1363,102 @@ function NeoButton({ variant = 'primary', size = 'medium', loading = false, chil
|
|
|
1364
1363
|
}
|
|
1365
1364
|
NeoButton.displayName = 'NeoButton';
|
|
1366
1365
|
|
|
1366
|
+
const StyledButtonTab = styles.styled(MuiToggleButton)(({ theme }) => ({
|
|
1367
|
+
fontFamily: neoDesign.typography.fontFamily.body,
|
|
1368
|
+
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.sm),
|
|
1369
|
+
lineHeight: 1,
|
|
1370
|
+
color: neoDesign.semanticColors.typography.tab.inactive,
|
|
1371
|
+
backgroundColor: 'transparent',
|
|
1372
|
+
border: 'none',
|
|
1373
|
+
padding: theme.spacing(1, 1.5),
|
|
1374
|
+
cursor: 'pointer',
|
|
1375
|
+
textTransform: 'none',
|
|
1376
|
+
transition: theme.transitions.create(['color'], {
|
|
1377
|
+
duration: theme.transitions.duration.short,
|
|
1378
|
+
}),
|
|
1379
|
+
'&:hover': {
|
|
1380
|
+
color: neoDesign.semanticColors.typography.tab.active,
|
|
1381
|
+
},
|
|
1382
|
+
'&.Mui-focusVisible': {
|
|
1383
|
+
outline: `2px solid ${neoDesign.semanticColors.border.focus}`,
|
|
1384
|
+
outlineOffset: -2,
|
|
1385
|
+
borderRadius: neoDesign.borderRadius.xXS,
|
|
1386
|
+
},
|
|
1387
|
+
'&.Mui-disabled': {
|
|
1388
|
+
color: neoDesign.semanticColors.typography.button.disabled,
|
|
1389
|
+
cursor: 'default',
|
|
1390
|
+
pointerEvents: 'none',
|
|
1391
|
+
},
|
|
1392
|
+
}));
|
|
1393
|
+
/**
|
|
1394
|
+
* Syncs aria-selected with MUI's Mui-selected class via MutationObserver.
|
|
1395
|
+
* MUI ToggleButton computes selection internally from context and applies
|
|
1396
|
+
* the Mui-selected class — we mirror that to aria-selected for tab semantics.
|
|
1397
|
+
*/
|
|
1398
|
+
function useTabAriaSync() {
|
|
1399
|
+
const observerRef = React.useRef(null);
|
|
1400
|
+
return React.useCallback((node) => {
|
|
1401
|
+
if (observerRef.current) {
|
|
1402
|
+
observerRef.current.disconnect();
|
|
1403
|
+
observerRef.current = null;
|
|
1404
|
+
}
|
|
1405
|
+
if (!node)
|
|
1406
|
+
return;
|
|
1407
|
+
const sync = () => {
|
|
1408
|
+
node.setAttribute('role', 'tab');
|
|
1409
|
+
node.setAttribute('aria-selected', String(node.classList.contains('Mui-selected')));
|
|
1410
|
+
};
|
|
1411
|
+
sync();
|
|
1412
|
+
observerRef.current = new MutationObserver(sync);
|
|
1413
|
+
observerRef.current.observe(node, { attributes: true, attributeFilter: ['class'] });
|
|
1414
|
+
}, []);
|
|
1415
|
+
}
|
|
1367
1416
|
/**
|
|
1368
|
-
*
|
|
1417
|
+
* NeoButtonTab - A tab-style toggle button for use within NeoButtonGroup
|
|
1369
1418
|
*
|
|
1370
|
-
*
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1419
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=4106-11048
|
|
1420
|
+
*/
|
|
1421
|
+
const NeoButtonTab = ({ children, ...props }) => {
|
|
1422
|
+
const tabRef = useTabAriaSync();
|
|
1423
|
+
return (jsxRuntime.jsx(StyledButtonTab, { ref: tabRef, ...props, children: children }));
|
|
1424
|
+
};
|
|
1425
|
+
NeoButtonTab.displayName = 'NeoButtonTab';
|
|
1426
|
+
|
|
1427
|
+
/**
|
|
1428
|
+
* Styled toggle button group that implements the Figma "Button tab group" design.
|
|
1429
|
+
*
|
|
1430
|
+
* Built on MUI ToggleButtonGroup which provides:
|
|
1431
|
+
* - Selection state management (value/onChange/exclusive)
|
|
1432
|
+
* - Size and disabled propagation via context
|
|
1433
|
+
* - Positional classes (firstButton/middleButton/lastButton)
|
|
1374
1434
|
*
|
|
1375
|
-
* Custom styling
|
|
1376
|
-
* -
|
|
1435
|
+
* Custom styling:
|
|
1436
|
+
* - Pill-shaped border (borderRadius.full)
|
|
1377
1437
|
* - Size variants (small=32px, medium=40px)
|
|
1378
1438
|
* - Border colors using semantic tokens
|
|
1379
|
-
* -
|
|
1439
|
+
* - Selected state colors from Neo design tokens
|
|
1380
1440
|
*/
|
|
1381
|
-
const
|
|
1441
|
+
const StyledButtonTabGroup = styles.styled(MuiToggleButtonGroup)(({ theme, size = 'medium' }) => {
|
|
1382
1442
|
const sizeStyles = {
|
|
1383
1443
|
small: {
|
|
1384
|
-
height:
|
|
1444
|
+
height: neoDesign.spacing.spacing_4,
|
|
1385
1445
|
},
|
|
1386
1446
|
medium: {
|
|
1387
1447
|
height: neoDesign.spacing.spacing_5,
|
|
1388
1448
|
},
|
|
1389
1449
|
};
|
|
1390
1450
|
return {
|
|
1391
|
-
// Apply pill-shaped border radius
|
|
1392
1451
|
borderRadius: neoDesign.borderRadius.full,
|
|
1393
1452
|
border: `1px solid ${neoDesign.semanticColors.border.primary}`,
|
|
1394
|
-
|
|
1395
|
-
|
|
1453
|
+
overflow: 'hidden',
|
|
1454
|
+
// Style all grouped children
|
|
1455
|
+
[`& .${MuiToggleButtonGroup.toggleButtonGroupClasses.grouped}`]: {
|
|
1456
|
+
flex: 1,
|
|
1396
1457
|
minWidth: 'auto',
|
|
1397
1458
|
height: sizeStyles[size].height,
|
|
1398
1459
|
padding: `${theme.spacing(1)} ${theme.spacing(2)}`,
|
|
1399
1460
|
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.sm),
|
|
1400
|
-
fontWeight: neoDesign.typography.fontWeight.
|
|
1461
|
+
fontWeight: neoDesign.typography.fontWeight.regular,
|
|
1401
1462
|
lineHeight: 1,
|
|
1402
1463
|
textTransform: 'none',
|
|
1403
1464
|
border: 'none',
|
|
@@ -1408,40 +1469,35 @@ const StyledButtonGroup = styles.styled(MuiButtonGroup)(({ theme, size = 'medium
|
|
|
1408
1469
|
transition: theme.transitions.create(['background-color', 'color', 'border-color'], {
|
|
1409
1470
|
duration: theme.transitions.duration.short,
|
|
1410
1471
|
}),
|
|
1411
|
-
//
|
|
1412
|
-
|
|
1472
|
+
// Selected state — double selector for specificity over MUI ToggleButton defaults
|
|
1473
|
+
[`&.${MuiToggleButton.toggleButtonClasses.selected}.${MuiToggleButton.toggleButtonClasses.selected}`]: {
|
|
1413
1474
|
backgroundColor: neoDesign.semanticColors.surfaces.white,
|
|
1414
1475
|
color: neoDesign.semanticColors.buttons.tertiary.default,
|
|
1415
1476
|
fontWeight: neoDesign.typography.fontWeight.semiBold,
|
|
1416
1477
|
},
|
|
1417
1478
|
// Hover state
|
|
1418
|
-
|
|
1479
|
+
[`&:hover, &.${MuiToggleButton.toggleButtonClasses.selected}:hover`]: {
|
|
1419
1480
|
backgroundColor: neoDesign.semanticColors.buttons.secondary.hoverBackground,
|
|
1420
|
-
borderRight: `1px solid ${neoDesign.semanticColors.border.primary}`,
|
|
1421
1481
|
},
|
|
1422
1482
|
// Focus visible for keyboard navigation
|
|
1423
|
-
|
|
1424
|
-
outline: `2px solid ${neoDesign.semanticColors.
|
|
1483
|
+
'&.Mui-focusVisible': {
|
|
1484
|
+
outline: `2px solid ${neoDesign.semanticColors.border.focus}`,
|
|
1425
1485
|
outlineOffset: -2,
|
|
1426
1486
|
zIndex: 1,
|
|
1427
1487
|
},
|
|
1428
1488
|
// First button: rounded left edge
|
|
1429
|
-
[`&.${
|
|
1489
|
+
[`&.${MuiToggleButtonGroup.toggleButtonGroupClasses.firstButton}`]: {
|
|
1430
1490
|
borderTopLeftRadius: neoDesign.borderRadius.full,
|
|
1431
1491
|
borderBottomLeftRadius: neoDesign.borderRadius.full,
|
|
1432
1492
|
},
|
|
1433
1493
|
// Last button: rounded right edge, no right border
|
|
1434
|
-
[`&.${
|
|
1494
|
+
[`&.${MuiToggleButtonGroup.toggleButtonGroupClasses.lastButton}`]: {
|
|
1435
1495
|
borderTopRightRadius: neoDesign.borderRadius.full,
|
|
1436
1496
|
borderBottomRightRadius: neoDesign.borderRadius.full,
|
|
1437
1497
|
borderRight: 'none',
|
|
1438
1498
|
},
|
|
1439
|
-
// Middle buttons: no border radius
|
|
1440
|
-
[`&.${MuiButtonGroup.buttonGroupClasses.middleButton}`]: {
|
|
1441
|
-
borderRadius: 0,
|
|
1442
|
-
},
|
|
1443
1499
|
// Disabled state
|
|
1444
|
-
[`&.${
|
|
1500
|
+
[`&.${MuiToggleButton.toggleButtonClasses.disabled}`]: {
|
|
1445
1501
|
backgroundColor: neoDesign.semanticColors.buttons.secondary.disabledBackground,
|
|
1446
1502
|
color: neoDesign.semanticColors.typography.button.disabled,
|
|
1447
1503
|
cursor: 'not-allowed',
|
|
@@ -1451,29 +1507,27 @@ const StyledButtonGroup = styles.styled(MuiButtonGroup)(({ theme, size = 'medium
|
|
|
1451
1507
|
};
|
|
1452
1508
|
});
|
|
1453
1509
|
/**
|
|
1454
|
-
*
|
|
1510
|
+
* NeoButtonTabGroup - Button tab group container
|
|
1455
1511
|
*
|
|
1456
1512
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4106-11129
|
|
1457
1513
|
*
|
|
1458
1514
|
* Figma Props Mapping:
|
|
1459
1515
|
* - Size (Sm|Md) → size prop (small|medium)
|
|
1460
|
-
* - Active button state → Controlled
|
|
1516
|
+
* - Active button state → Controlled via value/onChange props
|
|
1461
1517
|
*
|
|
1462
1518
|
* Usage:
|
|
1463
1519
|
* ```tsx
|
|
1464
|
-
* <
|
|
1465
|
-
* <
|
|
1466
|
-
* <
|
|
1467
|
-
* <
|
|
1468
|
-
* </
|
|
1520
|
+
* <NeoButtonTabGroup value={selected} onChange={(_, val) => setSelected(val)} size="medium">
|
|
1521
|
+
* <NeoButtonTab value="tab1">Tab 1</NeoButtonTab>
|
|
1522
|
+
* <NeoButtonTab value="tab2">Tab 2</NeoButtonTab>
|
|
1523
|
+
* <NeoButtonTab value="tab3">Tab 3</NeoButtonTab>
|
|
1524
|
+
* </NeoButtonTabGroup>
|
|
1469
1525
|
* ```
|
|
1470
|
-
*
|
|
1471
|
-
* Note: To show active state, add 'active' class to the selected button
|
|
1472
1526
|
*/
|
|
1473
|
-
const
|
|
1474
|
-
return jsxRuntime.jsx(
|
|
1527
|
+
const NeoButtonTabGroup = ({ size = 'medium', exclusive = true, ...props }) => {
|
|
1528
|
+
return jsxRuntime.jsx(StyledButtonTabGroup, { role: "tablist", size: size, exclusive: exclusive, ...props });
|
|
1475
1529
|
};
|
|
1476
|
-
|
|
1530
|
+
NeoButtonTabGroup.displayName = 'NeoButtonTabGroup';
|
|
1477
1531
|
|
|
1478
1532
|
// Border radius per size (from Figma)
|
|
1479
1533
|
const borderRadiusConfig = {
|
|
@@ -1547,7 +1601,7 @@ const StyledCheckbox = styles.styled(Checkbox, {
|
|
|
1547
1601
|
height: config.size,
|
|
1548
1602
|
padding: 0,
|
|
1549
1603
|
marginTop: size === 'xs' ? 3 : 2,
|
|
1550
|
-
color: neoDesign.semanticColors.border.
|
|
1604
|
+
color: neoDesign.semanticColors.border.primary,
|
|
1551
1605
|
flexShrink: 0,
|
|
1552
1606
|
// Root element
|
|
1553
1607
|
[`&.${Checkbox.checkboxClasses.root}`]: {
|
|
@@ -1570,20 +1624,20 @@ const StyledCheckbox = styles.styled(Checkbox, {
|
|
|
1570
1624
|
},
|
|
1571
1625
|
// Disabled state
|
|
1572
1626
|
[`&.${Checkbox.checkboxClasses.disabled}`]: {
|
|
1573
|
-
color: neoDesign.semanticColors.border.
|
|
1627
|
+
color: neoDesign.semanticColors.border.primary,
|
|
1574
1628
|
cursor: 'not-allowed',
|
|
1575
1629
|
// When checked and disabled
|
|
1576
1630
|
[`&.${Checkbox.checkboxClasses.checked}`]: {
|
|
1577
|
-
color: neoDesign.semanticColors.border.
|
|
1631
|
+
color: neoDesign.semanticColors.border.primary,
|
|
1578
1632
|
},
|
|
1579
1633
|
// When indeterminate and disabled
|
|
1580
1634
|
[`&.${Checkbox.checkboxClasses.indeterminate}`]: {
|
|
1581
|
-
color: neoDesign.semanticColors.border.
|
|
1635
|
+
color: neoDesign.semanticColors.border.primary,
|
|
1582
1636
|
},
|
|
1583
1637
|
},
|
|
1584
1638
|
// Focus visible for keyboard navigation
|
|
1585
1639
|
'&.Mui-focusVisible': {
|
|
1586
|
-
outline: `2px solid ${neoDesign.semanticColors.
|
|
1640
|
+
outline: `2px solid ${neoDesign.semanticColors.border.focus}`,
|
|
1587
1641
|
outlineOffset: 2,
|
|
1588
1642
|
borderRadius: config.borderRadius,
|
|
1589
1643
|
},
|
|
@@ -1713,7 +1767,7 @@ const StyledButtonBase = styles.styled(ButtonBase, {
|
|
|
1713
1767
|
cursor: 'text',
|
|
1714
1768
|
// Focus visible for keyboard navigation
|
|
1715
1769
|
[`&.${ButtonBase.buttonBaseClasses.focusVisible}`]: {
|
|
1716
|
-
outline: `2px solid ${neoDesign.semanticColors.
|
|
1770
|
+
outline: `2px solid ${neoDesign.semanticColors.border.focus}`,
|
|
1717
1771
|
outlineOffset: 2,
|
|
1718
1772
|
},
|
|
1719
1773
|
};
|
|
@@ -1784,7 +1838,7 @@ const StyledSearchField = styles.styled(TextField)(({ theme }) => ({
|
|
|
1784
1838
|
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.default),
|
|
1785
1839
|
borderRadius: neoDesign.borderRadius.input,
|
|
1786
1840
|
backgroundColor: neoDesign.semanticColors.input.background,
|
|
1787
|
-
border: `1px solid ${neoDesign.semanticColors.border.
|
|
1841
|
+
border: `1px solid ${neoDesign.semanticColors.border.primary}`,
|
|
1788
1842
|
paddingTop: neoDesign.spacing.spacing_1,
|
|
1789
1843
|
paddingBottom: neoDesign.spacing.spacing_1,
|
|
1790
1844
|
paddingLeft: neoDesign.spacing.spacing_1_1_2,
|
|
@@ -1995,43 +2049,32 @@ const Shortcut = styles.styled('span')(({ theme }) => ({
|
|
|
1995
2049
|
backgroundColor: neoDesign.semanticColors.surfaces.white,
|
|
1996
2050
|
}));
|
|
1997
2051
|
/**
|
|
1998
|
-
*
|
|
1999
|
-
*
|
|
2000
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4159-8649
|
|
2052
|
+
* NeoDropdownMenuItem - Dropdown menu item component based on MUI MenuItem
|
|
2001
2053
|
*
|
|
2002
|
-
*
|
|
2003
|
-
* - Figma "Dropdown - Menu" component uses Type (Avatar|Button|Icon) and Open (True|False)
|
|
2004
|
-
* to control the menu trigger. NeoMenuItem is the individual item inside the menu.
|
|
2005
|
-
* - Text label → children prop (mapped via figma.children)
|
|
2006
|
-
* - selected → selected prop (React-controlled)
|
|
2007
|
-
* - disabled → disabled prop (React-controlled)
|
|
2008
|
-
* - Hover state → CSS :hover (not mapped)
|
|
2009
|
-
* - Icon slot → icon prop (not mappable - ReactNode)
|
|
2010
|
-
* - Secondary text → secondaryText prop (not mappable - ReactNode/string)
|
|
2011
|
-
* - Keyboard shortcut → shortcut prop (not mappable - ReactNode/string)
|
|
2054
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4159-8584
|
|
2012
2055
|
*
|
|
2013
2056
|
* @example
|
|
2014
2057
|
* ```tsx
|
|
2015
2058
|
* // With icon and shortcut
|
|
2016
|
-
* <
|
|
2059
|
+
* <NeoDropdownMenuItem icon={<UserIcon />} shortcut="⌘+P">
|
|
2017
2060
|
* View profile
|
|
2018
|
-
* </
|
|
2061
|
+
* </NeoDropdownMenuItem>
|
|
2019
2062
|
*
|
|
2020
2063
|
* // With secondary text (user list pattern from Figma node 4305:41844)
|
|
2021
|
-
* <
|
|
2022
|
-
* <
|
|
2064
|
+
* <NeoDropdownMenuItem secondaryText="@phoenix">Phoenix Baker</NeoDropdownMenuItem>
|
|
2065
|
+
* <NeoDropdownMenuItem secondaryText="@olivia">Olivia Rhye</NeoDropdownMenuItem>
|
|
2023
2066
|
*
|
|
2024
2067
|
* // Disabled state
|
|
2025
|
-
* <
|
|
2068
|
+
* <NeoDropdownMenuItem disabled>Disabled item</NeoDropdownMenuItem>
|
|
2026
2069
|
* ```
|
|
2027
2070
|
*/
|
|
2028
|
-
const
|
|
2071
|
+
const NeoDropdownMenuItem = ({ icon, shortcut, secondaryText, children, ...props }) => {
|
|
2029
2072
|
return (jsxRuntime.jsx(StyledMenuItem, { ...props, children: jsxRuntime.jsxs(MenuItemContent, { children: [icon && jsxRuntime.jsx(IconWrapper$1, { children: icon }), jsxRuntime.jsxs(LabelContainer$3, { children: [jsxRuntime.jsx(Label$3, { children: children }), secondaryText && jsxRuntime.jsx(SecondaryLabel, { children: secondaryText })] }), shortcut && jsxRuntime.jsx(Shortcut, { children: shortcut })] }) }));
|
|
2030
2073
|
};
|
|
2031
|
-
|
|
2074
|
+
NeoDropdownMenuItem.displayName = 'NeoDropdownMenuItem';
|
|
2032
2075
|
|
|
2033
2076
|
/**
|
|
2034
|
-
* Custom chevron icon for
|
|
2077
|
+
* Custom chevron icon for dropdown
|
|
2035
2078
|
* Must accept props from MUI Select to work correctly
|
|
2036
2079
|
*/
|
|
2037
2080
|
const ChevronDownIcon = (props) => (jsxRuntime.jsx(ChevronDown, { ...props, size: neoDesign.spacing.spacing_2_1_2, color: neoDesign.semanticColors.typography.input.default, style: { ...props.style } }));
|
|
@@ -2041,11 +2084,11 @@ const ChevronDownIcon = (props) => (jsxRuntime.jsx(ChevronDown, { ...props, size
|
|
|
2041
2084
|
const StyledSelect = styles.styled(MuiSelect)({
|
|
2042
2085
|
minHeight: neoDesign.spacing.spacing_5,
|
|
2043
2086
|
backgroundColor: neoDesign.semanticColors.input.background,
|
|
2044
|
-
border: `1px solid ${neoDesign.semanticColors.border.
|
|
2087
|
+
border: `1px solid ${neoDesign.semanticColors.border.primary}`,
|
|
2045
2088
|
borderRadius: `${neoDesign.borderRadius.input}px`,
|
|
2046
2089
|
'&:hover': {
|
|
2047
2090
|
backgroundColor: neoDesign.semanticColors.input.hoverBackground,
|
|
2048
|
-
borderColor: neoDesign.semanticColors.border.
|
|
2091
|
+
borderColor: neoDesign.semanticColors.border.primary,
|
|
2049
2092
|
},
|
|
2050
2093
|
'&.Mui-focused': {
|
|
2051
2094
|
backgroundColor: neoDesign.semanticColors.input.background,
|
|
@@ -2071,25 +2114,24 @@ const StyledSelect = styles.styled(MuiSelect)({
|
|
|
2071
2114
|
},
|
|
2072
2115
|
});
|
|
2073
2116
|
/**
|
|
2074
|
-
*
|
|
2117
|
+
* NeoDropdown - Dropdown select component with Neo design system styling
|
|
2075
2118
|
*
|
|
2076
2119
|
* A styled version of MUI's Select that uses Neo design tokens, Lucide ChevronDown icon,
|
|
2077
|
-
* and
|
|
2120
|
+
* and NeoDropdownMenu/NeoDropdownMenuItem for the dropdown list.
|
|
2078
2121
|
*
|
|
2079
2122
|
* @example
|
|
2080
2123
|
* ```tsx
|
|
2081
|
-
* import {
|
|
2124
|
+
* import { NeoDropdown, NeoDropdownOption } from '@moderneinc/neo-styled-components'
|
|
2082
2125
|
*
|
|
2083
|
-
* <
|
|
2084
|
-
* <
|
|
2085
|
-
* <
|
|
2086
|
-
* </
|
|
2126
|
+
* <NeoDropdown value={value} onChange={handleChange}>
|
|
2127
|
+
* <NeoDropdownOption value="option1">Option 1</NeoDropdownOption>
|
|
2128
|
+
* <NeoDropdownOption value="option2">Option 2</NeoDropdownOption>
|
|
2129
|
+
* </NeoDropdown>
|
|
2087
2130
|
* ```
|
|
2088
2131
|
*/
|
|
2089
|
-
const
|
|
2132
|
+
const NeoDropdown = (props) => {
|
|
2090
2133
|
return (jsxRuntime.jsx(StyledSelect, { ...props, IconComponent: ChevronDownIcon, variant: "standard", MenuProps: {
|
|
2091
2134
|
...props.MenuProps,
|
|
2092
|
-
// Apply NeoMenu styling to the dropdown
|
|
2093
2135
|
PaperProps: {
|
|
2094
2136
|
sx: {
|
|
2095
2137
|
backgroundColor: neoDesign.semanticColors.surfaces.white,
|
|
@@ -2102,7 +2144,7 @@ const NeoSelect = (props) => {
|
|
|
2102
2144
|
},
|
|
2103
2145
|
} }));
|
|
2104
2146
|
};
|
|
2105
|
-
|
|
2147
|
+
NeoDropdown.displayName = 'NeoDropdown';
|
|
2106
2148
|
|
|
2107
2149
|
/**
|
|
2108
2150
|
* Icon components for DataGrid filter panel slots
|
|
@@ -2161,7 +2203,7 @@ const StyledGridFilterPanel = styles.styled(xDataGrid.GridFilterPanel)({
|
|
|
2161
2203
|
position: 'relative',
|
|
2162
2204
|
minHeight: neoDesign.spacing.spacing_5,
|
|
2163
2205
|
backgroundColor: neoDesign.semanticColors.input.background,
|
|
2164
|
-
border: `1px solid ${neoDesign.semanticColors.border.
|
|
2206
|
+
border: `1px solid ${neoDesign.semanticColors.border.primary}`,
|
|
2165
2207
|
borderRadius: `${neoDesign.borderRadius.input}px`,
|
|
2166
2208
|
fontSize: neoDesign.typography.fontSize.default,
|
|
2167
2209
|
fontWeight: neoDesign.typography.fontWeight.regular,
|
|
@@ -2169,11 +2211,11 @@ const StyledGridFilterPanel = styles.styled(xDataGrid.GridFilterPanel)({
|
|
|
2169
2211
|
},
|
|
2170
2212
|
[`& .${xDataGrid.gridClasses.filterForm} .${InputBase.inputBaseClasses.root}:hover`]: {
|
|
2171
2213
|
backgroundColor: neoDesign.semanticColors.input.hoverBackground,
|
|
2172
|
-
borderColor: neoDesign.semanticColors.border.
|
|
2214
|
+
borderColor: neoDesign.semanticColors.border.primary,
|
|
2173
2215
|
},
|
|
2174
2216
|
[`& .${xDataGrid.gridClasses.filterForm} .${InputBase.inputBaseClasses.root}.${InputBase.inputBaseClasses.focused}`]: {
|
|
2175
2217
|
backgroundColor: neoDesign.semanticColors.input.background,
|
|
2176
|
-
borderColor: neoDesign.semanticColors.border.
|
|
2218
|
+
borderColor: neoDesign.semanticColors.border.primary,
|
|
2177
2219
|
},
|
|
2178
2220
|
[`& .${xDataGrid.gridClasses.filterForm} .${InputBase.inputBaseClasses.root}::before`]: {
|
|
2179
2221
|
display: 'none',
|
|
@@ -2597,11 +2639,11 @@ const outlinedColorStyles = {
|
|
|
2597
2639
|
},
|
|
2598
2640
|
};
|
|
2599
2641
|
const filledColorStyles = {
|
|
2600
|
-
default: neoDesign.semanticColors.status.neutral.
|
|
2601
|
-
error: neoDesign.semanticColors.status.error.
|
|
2602
|
-
warning: neoDesign.semanticColors.status.warning.
|
|
2603
|
-
success: neoDesign.semanticColors.status.success.
|
|
2604
|
-
info: neoDesign.semanticColors.status.info.
|
|
2642
|
+
default: neoDesign.semanticColors.status.neutral.default,
|
|
2643
|
+
error: neoDesign.semanticColors.status.error.default,
|
|
2644
|
+
warning: neoDesign.semanticColors.status.warning.default,
|
|
2645
|
+
success: neoDesign.semanticColors.status.success.default,
|
|
2646
|
+
info: neoDesign.semanticColors.status.info.default,
|
|
2605
2647
|
violet: neoDesign.colors.violet[500],
|
|
2606
2648
|
beta: neoDesign.colors.digitalBlue[300],
|
|
2607
2649
|
};
|
|
@@ -3209,7 +3251,7 @@ const StyledIconButton = styles.styled(IconButton, {
|
|
|
3209
3251
|
},
|
|
3210
3252
|
// Focus visible for keyboard navigation
|
|
3211
3253
|
'&:focus-visible': {
|
|
3212
|
-
outline: `2px solid ${neoDesign.semanticColors.
|
|
3254
|
+
outline: `2px solid ${neoDesign.semanticColors.border.focus}`,
|
|
3213
3255
|
outlineOffset: 2,
|
|
3214
3256
|
},
|
|
3215
3257
|
};
|
|
@@ -3518,16 +3560,16 @@ const StyledDivider = styles.styled(Divider)(({ theme }) => ({
|
|
|
3518
3560
|
* Generic divider component that can be used in menus, lists, cards, or any layout
|
|
3519
3561
|
* that needs visual separation between content sections.
|
|
3520
3562
|
*
|
|
3521
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=
|
|
3563
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4633-39807
|
|
3522
3564
|
*
|
|
3523
3565
|
* @example
|
|
3524
3566
|
* ```tsx
|
|
3525
3567
|
* // In a menu
|
|
3526
|
-
* <
|
|
3527
|
-
* <
|
|
3568
|
+
* <NeoDropdownMenu>
|
|
3569
|
+
* <NeoDropdownMenuItem>Settings</NeoDropdownMenuItem>
|
|
3528
3570
|
* <NeoDivider />
|
|
3529
|
-
* <
|
|
3530
|
-
* </
|
|
3571
|
+
* <NeoDropdownMenuItem>Sign out</NeoDropdownMenuItem>
|
|
3572
|
+
* </NeoDropdownMenu>
|
|
3531
3573
|
*
|
|
3532
3574
|
* // In a card
|
|
3533
3575
|
* <Card>
|
|
@@ -3549,7 +3591,7 @@ const sizeMap = {
|
|
|
3549
3591
|
};
|
|
3550
3592
|
const StyledBadge = styles.styled(Badge)(({ ownerState }) => {
|
|
3551
3593
|
const size = sizeMap[ownerState.size];
|
|
3552
|
-
const color = neoDesign.semanticColors.status[ownerState.color].
|
|
3594
|
+
const color = neoDesign.semanticColors.status[ownerState.color].default;
|
|
3553
3595
|
return {
|
|
3554
3596
|
[`& .${Badge.badgeClasses.badge}`]: {
|
|
3555
3597
|
width: size,
|
|
@@ -3577,7 +3619,7 @@ const StyledBadge = styles.styled(Badge)(({ ownerState }) => {
|
|
|
3577
3619
|
*/
|
|
3578
3620
|
const NeoDot = ({ size = 'medium', variant = 'solid', color = 'neutral', ...props }) => {
|
|
3579
3621
|
const dotSize = sizeMap[size];
|
|
3580
|
-
const mediumColor = neoDesign.semanticColors.status[color].
|
|
3622
|
+
const mediumColor = neoDesign.semanticColors.status[color].default;
|
|
3581
3623
|
const lightColor = neoDesign.semanticColors.status[color].light;
|
|
3582
3624
|
// For outline variant, use SVG for precise control
|
|
3583
3625
|
const renderDot = () => {
|
|
@@ -3598,6 +3640,47 @@ const NeoDot = ({ size = 'medium', variant = 'solid', color = 'neutral', ...prop
|
|
|
3598
3640
|
};
|
|
3599
3641
|
NeoDot.displayName = 'NeoDot';
|
|
3600
3642
|
|
|
3643
|
+
const StyledMenu = styles.styled(Menu)(({ theme }) => ({
|
|
3644
|
+
[`& .${Paper.paperClasses.root}`]: {
|
|
3645
|
+
backgroundColor: neoDesign.semanticColors.surfaces.white,
|
|
3646
|
+
borderRadius: neoDesign.borderRadius.s,
|
|
3647
|
+
border: `1px solid ${neoDesign.semanticColors.border.primary}`,
|
|
3648
|
+
boxShadow: `${neoDesign.shadows.dropdown.x}px ${neoDesign.shadows.dropdown.y}px ${neoDesign.shadows.dropdown.blur}px ${neoDesign.shadows.dropdown.spread}px ${neoDesign.shadows.dropdown.shadow}`,
|
|
3649
|
+
minWidth: 200,
|
|
3650
|
+
marginTop: theme.spacing(1),
|
|
3651
|
+
paddingTop: theme.spacing(1),
|
|
3652
|
+
paddingBottom: theme.spacing(1),
|
|
3653
|
+
},
|
|
3654
|
+
[`& .${List.listClasses.root}`]: {
|
|
3655
|
+
padding: 0,
|
|
3656
|
+
},
|
|
3657
|
+
}));
|
|
3658
|
+
/**
|
|
3659
|
+
* NeoDropdownMenu - Dropdown menu component based on MUI Menu
|
|
3660
|
+
*
|
|
3661
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=11141-4980
|
|
3662
|
+
*
|
|
3663
|
+
* @example
|
|
3664
|
+
* ```tsx
|
|
3665
|
+
* const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
|
|
3666
|
+
* const open = Boolean(anchorEl);
|
|
3667
|
+
*
|
|
3668
|
+
* <Button onClick={(e) => setAnchorEl(e.currentTarget)}>Open Menu</Button>
|
|
3669
|
+
* <NeoDropdownMenu
|
|
3670
|
+
* open={open}
|
|
3671
|
+
* anchorEl={anchorEl}
|
|
3672
|
+
* onClose={() => setAnchorEl(null)}
|
|
3673
|
+
* >
|
|
3674
|
+
* <NeoDropdownMenuItem icon={<Icon />} shortcut="⌘+P">View profile</NeoDropdownMenuItem>
|
|
3675
|
+
* <NeoDropdownMenuItem>Settings</NeoDropdownMenuItem>
|
|
3676
|
+
* </NeoDropdownMenu>
|
|
3677
|
+
* ```
|
|
3678
|
+
*/
|
|
3679
|
+
const NeoDropdownMenu = ({ children, ...props }) => {
|
|
3680
|
+
return jsxRuntime.jsx(StyledMenu, { ...props, children: children });
|
|
3681
|
+
};
|
|
3682
|
+
NeoDropdownMenu.displayName = 'NeoDropdownMenu';
|
|
3683
|
+
|
|
3601
3684
|
const filterChipOnlyProps = ['selected', 'expanded', 'selectedLabel', 'count', 'onClear'];
|
|
3602
3685
|
const StyledChip = styles.styled(Chip, {
|
|
3603
3686
|
shouldForwardProp: prop => !filterChipOnlyProps.includes(prop),
|
|
@@ -3943,6 +4026,56 @@ const NeoFooter = ({ variant = 'pagination', showShadow = false, loading = false
|
|
|
3943
4026
|
};
|
|
3944
4027
|
NeoFooter.displayName = 'NeoFooter';
|
|
3945
4028
|
|
|
4029
|
+
/**
|
|
4030
|
+
* Shared color palette for avatar components (GeneralAvatar, NavigationAvatar).
|
|
4031
|
+
* Maps color index (1-7) to background color token pairs.
|
|
4032
|
+
*/
|
|
4033
|
+
const avatarColorPalette = {
|
|
4034
|
+
1: { bg: neoDesign.colors.digitalBlue[100] },
|
|
4035
|
+
2: { bg: neoDesign.colors.digitalGreen[100] },
|
|
4036
|
+
3: { bg: neoDesign.colors.gold[100] },
|
|
4037
|
+
4: { bg: neoDesign.colors.red[100] },
|
|
4038
|
+
5: { bg: neoDesign.colors.violet[100] },
|
|
4039
|
+
6: { bg: neoDesign.colors.tealGreen[100] },
|
|
4040
|
+
7: { bg: neoDesign.colors.orange[100] },
|
|
4041
|
+
};
|
|
4042
|
+
|
|
4043
|
+
const sizeConfig$1 = {
|
|
4044
|
+
small: { width: neoDesign.spacing.spacing_4, height: neoDesign.spacing.spacing_4, fontSize: neoDesign.typography.fontSize.xs },
|
|
4045
|
+
medium: { width: neoDesign.spacing.spacing_5, height: neoDesign.spacing.spacing_5, fontSize: neoDesign.typography.fontSize.sm },
|
|
4046
|
+
};
|
|
4047
|
+
const StyledAvatar = styles.styled(Avatar, {
|
|
4048
|
+
shouldForwardProp: prop => prop !== 'avatarSize' && prop !== 'colorIndex',
|
|
4049
|
+
})(({ theme, avatarSize, colorIndex }) => {
|
|
4050
|
+
const size = sizeConfig$1[avatarSize];
|
|
4051
|
+
const palette = avatarColorPalette[colorIndex];
|
|
4052
|
+
return {
|
|
4053
|
+
boxSizing: 'border-box',
|
|
4054
|
+
width: size.width,
|
|
4055
|
+
height: size.height,
|
|
4056
|
+
fontSize: theme.typography.pxToRem(size.fontSize),
|
|
4057
|
+
fontFamily: neoDesign.typography.fontFamily.body,
|
|
4058
|
+
fontWeight: neoDesign.typography.fontWeight.regular,
|
|
4059
|
+
lineHeight: 1,
|
|
4060
|
+
color: neoDesign.semanticColors.typography.body,
|
|
4061
|
+
backgroundColor: palette ? palette.bg : undefined,
|
|
4062
|
+
border: `1px solid ${neoDesign.semanticColors.border.primary}`,
|
|
4063
|
+
'&:focus-visible': {
|
|
4064
|
+
...focusRingStyles,
|
|
4065
|
+
borderColor: neoDesign.semanticColors.border.focus,
|
|
4066
|
+
},
|
|
4067
|
+
};
|
|
4068
|
+
});
|
|
4069
|
+
/**
|
|
4070
|
+
* NeoGeneralAvatar - Avatar with image or colored initials display
|
|
4071
|
+
*
|
|
4072
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=9600-185
|
|
4073
|
+
*/
|
|
4074
|
+
const NeoGeneralAvatar = ({ size = 'medium', colorIndex = 0, children, ...props }) => {
|
|
4075
|
+
return (jsxRuntime.jsx(StyledAvatar, { avatarSize: size, colorIndex: colorIndex, ...props, children: children }));
|
|
4076
|
+
};
|
|
4077
|
+
NeoGeneralAvatar.displayName = 'NeoGeneralAvatar';
|
|
4078
|
+
|
|
3946
4079
|
const customProps$1 = ['iconSize'];
|
|
3947
4080
|
const StyledIconWrapper = styles.styled('div', {
|
|
3948
4081
|
shouldForwardProp: prop => !customProps$1.includes(prop),
|
|
@@ -4124,9 +4257,9 @@ const StyledInputBase = styles.styled(InputBase, {
|
|
|
4124
4257
|
},
|
|
4125
4258
|
medium: {
|
|
4126
4259
|
height: neoDesign.spacing.spacing_5_1_2,
|
|
4127
|
-
padding: `${neoDesign.spacing.
|
|
4260
|
+
padding: `${neoDesign.spacing.spacing_1_1_4}px ${neoDesign.spacing.spacing_2}px ${neoDesign.spacing.spacing_1_1_4}px ${startAdornment ? 0 : neoDesign.spacing.spacing_2}px`,
|
|
4128
4261
|
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.default),
|
|
4129
|
-
borderRadius: neoDesign.
|
|
4262
|
+
borderRadius: neoDesign.spacing.spacing_8,
|
|
4130
4263
|
},
|
|
4131
4264
|
};
|
|
4132
4265
|
const sizeStyles = sizeConfig[size];
|
|
@@ -4135,7 +4268,7 @@ const StyledInputBase = styles.styled(InputBase, {
|
|
|
4135
4268
|
fontSize: sizeStyles.fontSize,
|
|
4136
4269
|
borderRadius: sizeStyles.borderRadius,
|
|
4137
4270
|
backgroundColor: neoDesign.semanticColors.input.background,
|
|
4138
|
-
border: `1px solid ${destructive ? neoDesign.semanticColors.status.error.
|
|
4271
|
+
border: `1px solid ${destructive ? neoDesign.semanticColors.status.error.default : neoDesign.semanticColors.border.primary}`,
|
|
4139
4272
|
transition: theme.transitions.create(['border-color', 'background-color'], {
|
|
4140
4273
|
duration: theme.transitions.duration.short,
|
|
4141
4274
|
}),
|
|
@@ -4149,19 +4282,21 @@ const StyledInputBase = styles.styled(InputBase, {
|
|
|
4149
4282
|
// Hover state
|
|
4150
4283
|
'&:hover': {
|
|
4151
4284
|
backgroundColor: neoDesign.semanticColors.input.hoverBackground,
|
|
4152
|
-
borderColor: destructive
|
|
4285
|
+
borderColor: destructive
|
|
4286
|
+
? neoDesign.semanticColors.status.error.default
|
|
4287
|
+
: neoDesign.semanticColors.border.primary,
|
|
4153
4288
|
},
|
|
4154
4289
|
// Focused state
|
|
4155
4290
|
[`&.${InputBase.inputBaseClasses.focused}`]: {
|
|
4156
4291
|
backgroundColor: neoDesign.semanticColors.input.background,
|
|
4157
4292
|
borderColor: destructive
|
|
4158
|
-
? neoDesign.semanticColors.status.error.
|
|
4293
|
+
? neoDesign.semanticColors.status.error.default
|
|
4159
4294
|
: neoDesign.semanticColors.buttons.primary.default,
|
|
4160
4295
|
},
|
|
4161
4296
|
// Disabled state
|
|
4162
4297
|
[`&.${InputBase.inputBaseClasses.disabled}`]: {
|
|
4163
4298
|
backgroundColor: neoDesign.semanticColors.input.disabledBackground,
|
|
4164
|
-
borderColor: neoDesign.semanticColors.border.
|
|
4299
|
+
borderColor: neoDesign.semanticColors.border.primary,
|
|
4165
4300
|
color: neoDesign.semanticColors.icons.disabled,
|
|
4166
4301
|
[`& .${InputBase.inputBaseClasses.input}`]: {
|
|
4167
4302
|
WebkitTextFillColor: neoDesign.semanticColors.icons.disabled,
|
|
@@ -4169,11 +4304,11 @@ const StyledInputBase = styles.styled(InputBase, {
|
|
|
4169
4304
|
},
|
|
4170
4305
|
// Error state
|
|
4171
4306
|
[`&.${InputBase.inputBaseClasses.error}`]: {
|
|
4172
|
-
borderColor: neoDesign.semanticColors.status.error.
|
|
4307
|
+
borderColor: neoDesign.semanticColors.status.error.default,
|
|
4173
4308
|
},
|
|
4174
4309
|
// Adornment styling
|
|
4175
4310
|
[`& .${InputAdornment.inputAdornmentClasses.root}`]: {
|
|
4176
|
-
color: destructive ? neoDesign.semanticColors.status.error.
|
|
4311
|
+
color: destructive ? neoDesign.semanticColors.status.error.default : neoDesign.semanticColors.icons.placeholder,
|
|
4177
4312
|
},
|
|
4178
4313
|
};
|
|
4179
4314
|
});
|
|
@@ -4187,7 +4322,7 @@ const StyledFormHelperText = styles.styled(FormHelperText, {
|
|
|
4187
4322
|
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.sm),
|
|
4188
4323
|
color: neoDesign.semanticColors.typography.input.helper,
|
|
4189
4324
|
[`&.${FormHelperText.formHelperTextClasses.error}`]: {
|
|
4190
|
-
color: neoDesign.semanticColors.status.error.
|
|
4325
|
+
color: neoDesign.semanticColors.status.error.default,
|
|
4191
4326
|
},
|
|
4192
4327
|
[`&.${FormHelperText.formHelperTextClasses.disabled}`]: {
|
|
4193
4328
|
color: neoDesign.semanticColors.icons.disabled,
|
|
@@ -4487,7 +4622,7 @@ const StyledListItemButton = styles.styled(ListItemButton)(({ theme }) => ({
|
|
|
4487
4622
|
transition: theme.transitions.create(['border', 'background-color']),
|
|
4488
4623
|
// Active (selected) state
|
|
4489
4624
|
[`&.${ListItemButton.listItemButtonClasses.selected}`]: {
|
|
4490
|
-
border: `2px solid ${neoDesign.semanticColors.
|
|
4625
|
+
border: `2px solid ${neoDesign.semanticColors.buttons.primary.default}`,
|
|
4491
4626
|
backgroundColor: theme.palette.common.white,
|
|
4492
4627
|
'&:hover': {
|
|
4493
4628
|
backgroundColor: theme.palette.common.white,
|
|
@@ -4521,9 +4656,9 @@ const StyledListItemButton = styles.styled(ListItemButton)(({ theme }) => ({
|
|
|
4521
4656
|
},
|
|
4522
4657
|
// Focus state
|
|
4523
4658
|
[`&.${ListItemButton.listItemButtonClasses.focusVisible}`]: {
|
|
4524
|
-
outline: `2px solid ${neoDesign.semanticColors.
|
|
4659
|
+
outline: `2px solid ${neoDesign.semanticColors.buttons.primary.default}`,
|
|
4525
4660
|
outlineOffset: 2,
|
|
4526
|
-
border: `2px solid ${neoDesign.semanticColors.
|
|
4661
|
+
border: `2px solid ${neoDesign.semanticColors.buttons.primary.default}`,
|
|
4527
4662
|
backgroundColor: theme.palette.common.white,
|
|
4528
4663
|
[`& .${ListItemIcon.listItemIconClasses.root}`]: {
|
|
4529
4664
|
color: neoDesign.semanticColors.icons.default,
|
|
@@ -4582,7 +4717,7 @@ const StyledListItemButton = styles.styled(ListItemButton)(({ theme }) => ({
|
|
|
4582
4717
|
* - showIcon → Conditional rendering of ListItemIcon child
|
|
4583
4718
|
*
|
|
4584
4719
|
* Design Tokens Used:
|
|
4585
|
-
* - semanticColors.
|
|
4720
|
+
* - semanticColors.buttons.primary.default (#2f42ff) - Active border
|
|
4586
4721
|
* - semanticColors.border.primary (#d1d5db) - Default/disabled border
|
|
4587
4722
|
* - semanticColors.icons.default (#1f2937) - Active icon color
|
|
4588
4723
|
* - semanticColors.icons.disabled (#d1d5db) - Deselected/disabled icon color
|
|
@@ -4615,17 +4750,17 @@ const StyledCard = styles.styled(MuiCard, {
|
|
|
4615
4750
|
flexDirection: 'column',
|
|
4616
4751
|
gap: theme.spacing(2), // 16px
|
|
4617
4752
|
backgroundColor: neoDesign.semanticColors.surfaces.card,
|
|
4618
|
-
border: `1px solid ${selected ? neoDesign.semanticColors.
|
|
4753
|
+
border: `1px solid ${selected ? neoDesign.semanticColors.buttons.primary.default : neoDesign.semanticColors.border.primary}`,
|
|
4619
4754
|
borderRadius: neoDesign.borderRadius.xS,
|
|
4620
4755
|
boxShadow: selected ? activeShadow$1 : 'none',
|
|
4621
4756
|
transition: theme.transitions.create(['border-color', 'background-color', 'box-shadow']),
|
|
4622
4757
|
cursor: 'pointer',
|
|
4623
4758
|
'&:hover': {
|
|
4624
|
-
borderColor: neoDesign.semanticColors.
|
|
4759
|
+
borderColor: neoDesign.semanticColors.buttons.primary.default,
|
|
4625
4760
|
boxShadow: activeShadow$1,
|
|
4626
4761
|
},
|
|
4627
4762
|
'&:focus-visible': {
|
|
4628
|
-
borderColor: neoDesign.semanticColors.
|
|
4763
|
+
borderColor: neoDesign.semanticColors.buttons.primary.default,
|
|
4629
4764
|
...focusRingStyles,
|
|
4630
4765
|
},
|
|
4631
4766
|
...(disabled && {
|
|
@@ -4729,8 +4864,8 @@ const Description$1 = styles.styled('p')(({ theme }) => ({
|
|
|
4729
4864
|
* Design Tokens Used:
|
|
4730
4865
|
* - semanticColors.surfaces.card (#FFFFFF) - Default card background
|
|
4731
4866
|
* - semanticColors.status.info.light (#f2f3ff) - Active/focused card background
|
|
4732
|
-
* - semanticColors.border.
|
|
4733
|
-
* - semanticColors.
|
|
4867
|
+
* - semanticColors.border.primary (#d1d5db) - Default border
|
|
4868
|
+
* - semanticColors.buttons.primary.default (#2f42ff) - Active/focused border
|
|
4734
4869
|
* - shadows.focusWhite1 - Inner white focus ring (2px spread)
|
|
4735
4870
|
* - shadows.focusBlue2 - Outer blue focus ring (4px spread)
|
|
4736
4871
|
* - colors.grey[800] (#1F2937) - Text color
|
|
@@ -4753,10 +4888,12 @@ const StyledLargeCard = styles.styled(MuiCard, {
|
|
|
4753
4888
|
const isActive = cardState === 'active';
|
|
4754
4889
|
const isDisabled = cardState === 'disabled';
|
|
4755
4890
|
const isFocused = cardState === 'focused';
|
|
4756
|
-
const activeBorderColor = isLight
|
|
4891
|
+
const activeBorderColor = isLight
|
|
4892
|
+
? neoDesign.semanticColors.buttons.primary.default
|
|
4893
|
+
: neoDesign.colors.digitalGreen[300];
|
|
4757
4894
|
const defaultBorderColor = isLight
|
|
4758
|
-
? neoDesign.semanticColors.border.
|
|
4759
|
-
: `${neoDesign.semanticColors.border.
|
|
4895
|
+
? neoDesign.semanticColors.border.primary
|
|
4896
|
+
: `${neoDesign.semanticColors.border.primary}80`;
|
|
4760
4897
|
return {
|
|
4761
4898
|
width: 340,
|
|
4762
4899
|
height: 162,
|
|
@@ -4772,7 +4909,7 @@ const StyledLargeCard = styles.styled(MuiCard, {
|
|
|
4772
4909
|
overflow: 'hidden',
|
|
4773
4910
|
...(isFocused && focusRingStyles),
|
|
4774
4911
|
'&:focus-visible': {
|
|
4775
|
-
borderColor: isLight ? neoDesign.semanticColors.
|
|
4912
|
+
borderColor: isLight ? neoDesign.semanticColors.buttons.primary.default : neoDesign.colors.digitalGreen[300],
|
|
4776
4913
|
...focusRingStyles,
|
|
4777
4914
|
},
|
|
4778
4915
|
...(isDisabled && {
|
|
@@ -4852,8 +4989,8 @@ const ButtonsRow = styles.styled('div')({
|
|
|
4852
4989
|
* Design Tokens Used:
|
|
4853
4990
|
* - semanticColors.surfaces.card (#ffffff) - Light theme background
|
|
4854
4991
|
* - colors.grey[800] (#1f2937) - Dark theme background
|
|
4855
|
-
* - semanticColors.border.
|
|
4856
|
-
* - semanticColors.
|
|
4992
|
+
* - semanticColors.border.primary (#d1d5db) - Default border (50% opacity on dark)
|
|
4993
|
+
* - semanticColors.buttons.primary.default (#2f42ff) - Active/focused border (light theme)
|
|
4857
4994
|
* - colors.digitalGreen[300] (#88fe9b) - Active/focused border (dark theme)
|
|
4858
4995
|
* - borderRadius.xS (4px) - Corner radius
|
|
4859
4996
|
* - shadows.focusWhite1 + shadows.focusBlue2 - Focus ring
|
|
@@ -4865,67 +5002,13 @@ const NeoMarketplaceLargeCard = ({ state = 'default', cardTheme = 'light', showI
|
|
|
4865
5002
|
};
|
|
4866
5003
|
NeoMarketplaceLargeCard.displayName = 'NeoMarketplaceLargeCard';
|
|
4867
5004
|
|
|
4868
|
-
const StyledMenu = styles.styled(Menu)(({ theme }) => ({
|
|
4869
|
-
[`& .${Paper.paperClasses.root}`]: {
|
|
4870
|
-
backgroundColor: neoDesign.semanticColors.surfaces.white,
|
|
4871
|
-
borderRadius: neoDesign.borderRadius.s,
|
|
4872
|
-
border: `1px solid ${neoDesign.semanticColors.border.primary}`,
|
|
4873
|
-
boxShadow: `${neoDesign.shadows.dropdown.x}px ${neoDesign.shadows.dropdown.y}px ${neoDesign.shadows.dropdown.blur}px ${neoDesign.shadows.dropdown.spread}px ${neoDesign.shadows.dropdown.shadow}`,
|
|
4874
|
-
minWidth: 200,
|
|
4875
|
-
marginTop: theme.spacing(1),
|
|
4876
|
-
paddingTop: theme.spacing(1),
|
|
4877
|
-
paddingBottom: theme.spacing(1),
|
|
4878
|
-
},
|
|
4879
|
-
[`& .${List.listClasses.root}`]: {
|
|
4880
|
-
padding: 0,
|
|
4881
|
-
},
|
|
4882
|
-
}));
|
|
4883
|
-
/**
|
|
4884
|
-
* NeoMenu - Dropdown menu component based on MUI Menu
|
|
4885
|
-
*
|
|
4886
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4159-8649
|
|
4887
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4305-41844 (Dropdown list pattern)
|
|
4888
|
-
*
|
|
4889
|
-
* Figma Props Mapping:
|
|
4890
|
-
* - Container shown in Figma is the Menu Paper component
|
|
4891
|
-
* - Menu items are styled separately via NeoMenuItem
|
|
4892
|
-
* - Any trigger component (Button, IconButton, etc.) can open the menu
|
|
4893
|
-
*
|
|
4894
|
-
* @example
|
|
4895
|
-
* ```tsx
|
|
4896
|
-
* const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
|
|
4897
|
-
* const open = Boolean(anchorEl);
|
|
4898
|
-
*
|
|
4899
|
-
* // Standard menu with icons and shortcuts
|
|
4900
|
-
* <Button onClick={(e) => setAnchorEl(e.currentTarget)}>Open Menu</Button>
|
|
4901
|
-
* <NeoMenu
|
|
4902
|
-
* open={open}
|
|
4903
|
-
* anchorEl={anchorEl}
|
|
4904
|
-
* onClose={() => setAnchorEl(null)}
|
|
4905
|
-
* >
|
|
4906
|
-
* <NeoMenuItem icon={<Icon />} shortcut="⌘+P">View profile</NeoMenuItem>
|
|
4907
|
-
* <NeoMenuItem>Settings</NeoMenuItem>
|
|
4908
|
-
* </NeoMenu>
|
|
4909
|
-
*
|
|
4910
|
-
* // Dropdown list with secondary text (user list pattern)
|
|
4911
|
-
* <NeoMenu open={open} anchorEl={anchorEl} onClose={() => setAnchorEl(null)}>
|
|
4912
|
-
* <NeoMenuItem secondaryText="@phoenix">Phoenix Baker</NeoMenuItem>
|
|
4913
|
-
* <NeoMenuItem secondaryText="@olivia" selected>Olivia Rhye</NeoMenuItem>
|
|
4914
|
-
* </NeoMenu>
|
|
4915
|
-
* ```
|
|
4916
|
-
*/
|
|
4917
|
-
const NeoMenu = ({ children, ...props }) => {
|
|
4918
|
-
return jsxRuntime.jsx(StyledMenu, { ...props, children: children });
|
|
4919
|
-
};
|
|
4920
|
-
NeoMenu.displayName = 'NeoMenu';
|
|
4921
|
-
|
|
4922
5005
|
// ============================================================================
|
|
4923
5006
|
// NeoModal - Main Dialog Container
|
|
4924
5007
|
// ============================================================================
|
|
4925
5008
|
const StyledDialog = styles.styled(Dialog)({
|
|
4926
5009
|
[`& .${Dialog.dialogClasses.paper}`]: {
|
|
4927
5010
|
borderRadius: neoDesign.borderRadius.card,
|
|
4928
|
-
border: `1px solid ${neoDesign.semanticColors.border.
|
|
5011
|
+
border: `1px solid ${neoDesign.semanticColors.border.primary}`,
|
|
4929
5012
|
boxShadow: 'none',
|
|
4930
5013
|
},
|
|
4931
5014
|
[`& .${Dialog.dialogClasses.container}`]: {
|
|
@@ -5108,6 +5191,34 @@ const NeoModalFooter = ({ leadingContent, children }) => {
|
|
|
5108
5191
|
};
|
|
5109
5192
|
NeoModalFooter.displayName = 'NeoModalFooter';
|
|
5110
5193
|
|
|
5194
|
+
const NavigationAvatarContainer = styles.styled('div')({
|
|
5195
|
+
display: 'flex',
|
|
5196
|
+
boxSizing: 'border-box',
|
|
5197
|
+
width: neoDesign.spacing.spacing_5_1_2,
|
|
5198
|
+
height: neoDesign.spacing.spacing_5_1_2,
|
|
5199
|
+
padding: neoDesign.spacing.spacing_3_4,
|
|
5200
|
+
justifyContent: 'center',
|
|
5201
|
+
alignItems: 'center',
|
|
5202
|
+
borderRadius: '50%',
|
|
5203
|
+
border: `1px solid ${neoDesign.semanticColors.border.primary}`,
|
|
5204
|
+
backgroundColor: neoDesign.semanticColors.buttons.secondary.defaultBackground,
|
|
5205
|
+
'&:focus-within': {
|
|
5206
|
+
borderColor: neoDesign.semanticColors.border.focus,
|
|
5207
|
+
},
|
|
5208
|
+
});
|
|
5209
|
+
/**
|
|
5210
|
+
* NeoNavigationAvatar - Compact avatar for navigation contexts
|
|
5211
|
+
*
|
|
5212
|
+
* Wraps NeoGeneralAvatar (size="small") in a 44px container with 6px padding,
|
|
5213
|
+
* providing a larger interactive area for navigation UI.
|
|
5214
|
+
*
|
|
5215
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=11325-102
|
|
5216
|
+
*/
|
|
5217
|
+
const NeoNavigationAvatar = ({ colorIndex = 0, children, ...props }) => {
|
|
5218
|
+
return (jsxRuntime.jsx(NavigationAvatarContainer, { children: jsxRuntime.jsx(NeoGeneralAvatar, { size: "small", colorIndex: colorIndex, ...props, children: children }) }));
|
|
5219
|
+
};
|
|
5220
|
+
NeoNavigationAvatar.displayName = 'NeoNavigationAvatar';
|
|
5221
|
+
|
|
5111
5222
|
const customProps = ['selected'];
|
|
5112
5223
|
const StyledRoot = styles.styled(ButtonBase, {
|
|
5113
5224
|
shouldForwardProp: prop => !customProps.includes(prop),
|
|
@@ -5447,7 +5558,7 @@ const StyledLinearProgress$1 = styles.styled(LinearProgress, {
|
|
|
5447
5558
|
// Cancelled variant uses warning color
|
|
5448
5559
|
'&[data-variant="cancelled"]': {
|
|
5449
5560
|
[`& .${LinearProgress.linearProgressClasses.bar}`]: {
|
|
5450
|
-
backgroundColor: neoDesign.semanticColors.status.warning.
|
|
5561
|
+
backgroundColor: neoDesign.semanticColors.status.warning.default,
|
|
5451
5562
|
},
|
|
5452
5563
|
},
|
|
5453
5564
|
}));
|
|
@@ -5512,7 +5623,7 @@ const StyledTextField = styles.styled(TextField)(({ theme }) => ({
|
|
|
5512
5623
|
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.default),
|
|
5513
5624
|
borderRadius: neoDesign.borderRadius.input,
|
|
5514
5625
|
backgroundColor: neoDesign.semanticColors.input.background,
|
|
5515
|
-
border: `1px solid ${neoDesign.semanticColors.border.
|
|
5626
|
+
border: `1px solid ${neoDesign.semanticColors.border.primary}`,
|
|
5516
5627
|
paddingTop: neoDesign.spacing.spacing_1,
|
|
5517
5628
|
paddingBottom: neoDesign.spacing.spacing_1,
|
|
5518
5629
|
paddingLeft: neoDesign.spacing.spacing_1_1_2,
|
|
@@ -5607,7 +5718,7 @@ NeoQuickFilter.displayName = 'NeoQuickFilter';
|
|
|
5607
5718
|
const UncheckedIcon = ({ size }) => {
|
|
5608
5719
|
const dimensions = size === 'small' ? 16 : 20;
|
|
5609
5720
|
const radius = size === 'small' ? 8 : 10;
|
|
5610
|
-
return (jsxRuntime.jsxs("svg", { width: dimensions, height: dimensions, viewBox: `0 0 ${dimensions} ${dimensions}`, fill: "none", "aria-hidden": "true", children: [jsxRuntime.jsx("title", { children: "Unchecked radio button" }), jsxRuntime.jsx("circle", { cx: dimensions / 2, cy: dimensions / 2, r: radius - 0.5, stroke: neoDesign.semanticColors.border.
|
|
5721
|
+
return (jsxRuntime.jsxs("svg", { width: dimensions, height: dimensions, viewBox: `0 0 ${dimensions} ${dimensions}`, fill: "none", "aria-hidden": "true", children: [jsxRuntime.jsx("title", { children: "Unchecked radio button" }), jsxRuntime.jsx("circle", { cx: dimensions / 2, cy: dimensions / 2, r: radius - 0.5, stroke: neoDesign.semanticColors.border.primary, strokeWidth: "1", fill: "transparent" })] }));
|
|
5611
5722
|
};
|
|
5612
5723
|
const CheckedIcon = ({ size }) => {
|
|
5613
5724
|
const dimensions = size === 'small' ? 16 : 20;
|
|
@@ -5863,19 +5974,19 @@ const StyledAlert$1 = styles.styled(Alert, {
|
|
|
5863
5974
|
const colorMap = {
|
|
5864
5975
|
success: {
|
|
5865
5976
|
light: neoDesign.semanticColors.status.success.light,
|
|
5866
|
-
medium: neoDesign.semanticColors.status.success.
|
|
5977
|
+
medium: neoDesign.semanticColors.status.success.default,
|
|
5867
5978
|
},
|
|
5868
5979
|
error: {
|
|
5869
5980
|
light: neoDesign.semanticColors.status.error.light,
|
|
5870
|
-
medium: neoDesign.semanticColors.status.error.
|
|
5981
|
+
medium: neoDesign.semanticColors.status.error.default,
|
|
5871
5982
|
},
|
|
5872
5983
|
neutral: {
|
|
5873
5984
|
light: neoDesign.semanticColors.status.neutral.light,
|
|
5874
|
-
medium: neoDesign.semanticColors.status.neutral.
|
|
5985
|
+
medium: neoDesign.semanticColors.status.neutral.default,
|
|
5875
5986
|
},
|
|
5876
5987
|
info: {
|
|
5877
5988
|
light: neoDesign.semanticColors.status.info.light,
|
|
5878
|
-
medium: neoDesign.semanticColors.status.info.
|
|
5989
|
+
medium: neoDesign.semanticColors.status.info.default,
|
|
5879
5990
|
},
|
|
5880
5991
|
};
|
|
5881
5992
|
const severityColors = colorMap[severity];
|
|
@@ -5946,10 +6057,10 @@ const StyledAlert$1 = styles.styled(Alert, {
|
|
|
5946
6057
|
* - Mode (Light|Dark) → variant ('outlined'|'filled')
|
|
5947
6058
|
*
|
|
5948
6059
|
* Design Tokens Used:
|
|
5949
|
-
* - status.success.light, status.success.
|
|
5950
|
-
* - status.error.light, status.error.
|
|
5951
|
-
* - status.neutral.light, status.neutral.
|
|
5952
|
-
* - status.info.light, status.info.
|
|
6060
|
+
* - status.success.light, status.success.default
|
|
6061
|
+
* - status.error.light, status.error.default
|
|
6062
|
+
* - status.neutral.light, status.neutral.default
|
|
6063
|
+
* - status.info.light, status.info.default
|
|
5953
6064
|
* - typography.tooltip, typography.bodySecondary
|
|
5954
6065
|
* - grey[800]
|
|
5955
6066
|
* - fontSize.default, fontSize.sm
|
|
@@ -5986,7 +6097,7 @@ NeoStatusBanner.displayName = 'NeoStatusBanner';
|
|
|
5986
6097
|
const NeoTabs = styles.styled(MuiTabs)(() => ({
|
|
5987
6098
|
minHeight: neoDesign.spacing.spacing_5,
|
|
5988
6099
|
[`& .${MuiTabs.tabsClasses.indicator}`]: {
|
|
5989
|
-
backgroundColor: neoDesign.semanticColors.
|
|
6100
|
+
backgroundColor: neoDesign.semanticColors.buttons.primary.default,
|
|
5990
6101
|
height: 2,
|
|
5991
6102
|
},
|
|
5992
6103
|
[`& .${MuiTabs.tabsClasses.flexContainer}`]: {
|
|
@@ -6008,7 +6119,7 @@ const StyledTab = styles.styled(MuiTab)(({ theme }) => ({
|
|
|
6008
6119
|
fontWeight: neoDesign.typography.fontWeight.semiBold,
|
|
6009
6120
|
},
|
|
6010
6121
|
[`&.${ButtonBase.buttonBaseClasses.focusVisible}`]: {
|
|
6011
|
-
outline: `2px solid ${neoDesign.semanticColors.
|
|
6122
|
+
outline: `2px solid ${neoDesign.semanticColors.border.focus}`,
|
|
6012
6123
|
outlineOffset: -2,
|
|
6013
6124
|
},
|
|
6014
6125
|
[`&.${MuiTab.tabClasses.disabled}`]: {
|
|
@@ -6088,17 +6199,17 @@ const StyledAlert = styles.styled(Alert, {
|
|
|
6088
6199
|
error: {
|
|
6089
6200
|
backgroundColor: neoDesign.semanticColors.status.error.light,
|
|
6090
6201
|
color: neoDesign.semanticColors.status.error.dark,
|
|
6091
|
-
border: `1px solid ${neoDesign.semanticColors.status.error.
|
|
6202
|
+
border: `1px solid ${neoDesign.semanticColors.status.error.default}`,
|
|
6092
6203
|
},
|
|
6093
6204
|
success: {
|
|
6094
6205
|
backgroundColor: neoDesign.semanticColors.status.success.light,
|
|
6095
6206
|
color: neoDesign.semanticColors.status.success.dark,
|
|
6096
|
-
border: `1px solid ${neoDesign.semanticColors.status.success.
|
|
6207
|
+
border: `1px solid ${neoDesign.semanticColors.status.success.default}`,
|
|
6097
6208
|
},
|
|
6098
6209
|
info: {
|
|
6099
6210
|
backgroundColor: neoDesign.semanticColors.status.info.light,
|
|
6100
6211
|
color: neoDesign.semanticColors.status.info.dark,
|
|
6101
|
-
border: `1px solid ${neoDesign.semanticColors.status.info.
|
|
6212
|
+
border: `1px solid ${neoDesign.semanticColors.status.info.default}`,
|
|
6102
6213
|
},
|
|
6103
6214
|
download: {
|
|
6104
6215
|
backgroundColor: neoDesign.semanticColors.surfaces.snackbarDarkMode,
|
|
@@ -6326,7 +6437,7 @@ const StyledSwitch = styles.styled(Switch, {
|
|
|
6326
6437
|
// Focus visible for keyboard navigation
|
|
6327
6438
|
'&.Mui-focusVisible': {
|
|
6328
6439
|
[`& + .${Switch.switchClasses.track}`]: {
|
|
6329
|
-
outline: `2px solid ${neoDesign.semanticColors.
|
|
6440
|
+
outline: `2px solid ${neoDesign.semanticColors.border.focus}`,
|
|
6330
6441
|
outlineOffset: 2,
|
|
6331
6442
|
},
|
|
6332
6443
|
},
|
|
@@ -6667,7 +6778,7 @@ const StyledTreeView = styles.styled(RichTreeViewPro.RichTreeViewPro)({
|
|
|
6667
6778
|
backgroundColor: neoDesign.semanticColors.surfaces.listHover,
|
|
6668
6779
|
},
|
|
6669
6780
|
[`& .${TreeItem.treeItemClasses.content}.Mui-focused`]: {
|
|
6670
|
-
boxShadow: `inset 0 0 0 2px ${neoDesign.semanticColors.
|
|
6781
|
+
boxShadow: `inset 0 0 0 2px ${neoDesign.semanticColors.border.focus}`,
|
|
6671
6782
|
backgroundColor: 'transparent',
|
|
6672
6783
|
},
|
|
6673
6784
|
[`& .${TreeItem.treeItemClasses.content}.Mui-selected`]: {
|
|
@@ -6678,7 +6789,7 @@ const StyledTreeView = styles.styled(RichTreeViewPro.RichTreeViewPro)({
|
|
|
6678
6789
|
},
|
|
6679
6790
|
[`& .${TreeItem.treeItemClasses.content}.Mui-selected.Mui-focused`]: {
|
|
6680
6791
|
backgroundColor: neoDesign.semanticColors.surfaces.listHover,
|
|
6681
|
-
boxShadow: `inset 0 0 0 2px ${neoDesign.semanticColors.
|
|
6792
|
+
boxShadow: `inset 0 0 0 2px ${neoDesign.semanticColors.border.focus}`,
|
|
6682
6793
|
},
|
|
6683
6794
|
[`& .${TreeItem.treeItemClasses.label}`]: {
|
|
6684
6795
|
fontSize: neoDesign.typography.fontSize.xs,
|
|
@@ -6703,12 +6814,12 @@ const StyledTreeView = styles.styled(RichTreeViewPro.RichTreeViewPro)({
|
|
|
6703
6814
|
|
|
6704
6815
|
// Figma-exact border radius for toggle buttons — no matching design token
|
|
6705
6816
|
const TOGGLE_BUTTON_BORDER_RADIUS = 14;
|
|
6706
|
-
const StyledToggleButtonGroup = styles.styled(
|
|
6817
|
+
const StyledToggleButtonGroup = styles.styled(MuiToggleButtonGroup)(({ theme }) => ({
|
|
6707
6818
|
backgroundColor: neoDesign.colors.grey[50],
|
|
6708
6819
|
padding: theme.spacing(0.625, 0.875),
|
|
6709
6820
|
borderRadius: neoDesign.borderRadius.full,
|
|
6710
6821
|
gap: 0,
|
|
6711
|
-
[`& .${
|
|
6822
|
+
[`& .${MuiToggleButtonGroup.toggleButtonGroupClasses.grouped}`]: {
|
|
6712
6823
|
border: 'none',
|
|
6713
6824
|
borderRadius: TOGGLE_BUTTON_BORDER_RADIUS,
|
|
6714
6825
|
margin: 0,
|
|
@@ -6721,7 +6832,7 @@ const StyledToggleButtonGroup = styles.styled(ToggleButtonGroup)(({ theme }) =>
|
|
|
6721
6832
|
},
|
|
6722
6833
|
},
|
|
6723
6834
|
}));
|
|
6724
|
-
const StyledToggleButton = styles.styled(
|
|
6835
|
+
const StyledToggleButton = styles.styled(MuiToggleButton)(({ theme }) => ({
|
|
6725
6836
|
padding: theme.spacing(0.625),
|
|
6726
6837
|
minWidth: 'auto',
|
|
6727
6838
|
color: neoDesign.semanticColors.icons.default,
|
|
@@ -6733,7 +6844,7 @@ const StyledToggleButton = styles.styled(ToggleButton)(({ theme }) => ({
|
|
|
6733
6844
|
'&:hover': {
|
|
6734
6845
|
backgroundColor: 'transparent',
|
|
6735
6846
|
},
|
|
6736
|
-
[`&.${
|
|
6847
|
+
[`&.${MuiToggleButton.toggleButtonClasses.selected}`]: {
|
|
6737
6848
|
backgroundColor: neoDesign.semanticColors.buttons.navigation.pressedBackground,
|
|
6738
6849
|
color: neoDesign.semanticColors.icons.active,
|
|
6739
6850
|
'&:hover': {
|
|
@@ -6779,7 +6890,8 @@ exports.NeoBanner = NeoBanner;
|
|
|
6779
6890
|
exports.NeoBreadcrumbLink = NeoBreadcrumbLink;
|
|
6780
6891
|
exports.NeoBreadcrumbs = NeoBreadcrumbs;
|
|
6781
6892
|
exports.NeoButton = NeoButton;
|
|
6782
|
-
exports.
|
|
6893
|
+
exports.NeoButtonTab = NeoButtonTab;
|
|
6894
|
+
exports.NeoButtonTabGroup = NeoButtonTabGroup;
|
|
6783
6895
|
exports.NeoCheckbox = NeoCheckbox;
|
|
6784
6896
|
exports.NeoCodeSnippet = NeoCodeSnippet;
|
|
6785
6897
|
exports.NeoDataGrid = NeoDataGrid;
|
|
@@ -6792,12 +6904,17 @@ exports.NeoDataGridFilterPanelDeleteIcon = NeoDataGridFilterPanelDeleteIcon;
|
|
|
6792
6904
|
exports.NeoDataGridFilterPanelRemoveAllIcon = NeoDataGridFilterPanelRemoveAllIcon;
|
|
6793
6905
|
exports.NeoDataGridFiltersButton = NeoDataGridFiltersButton;
|
|
6794
6906
|
exports.NeoDataGridHeaderLabel = NeoDataGridHeaderLabel;
|
|
6795
|
-
exports.NeoDataGridSelect =
|
|
6907
|
+
exports.NeoDataGridSelect = NeoDropdown;
|
|
6796
6908
|
exports.NeoDatePicker = NeoDatePicker;
|
|
6797
6909
|
exports.NeoDivider = NeoDivider;
|
|
6798
6910
|
exports.NeoDot = NeoDot;
|
|
6911
|
+
exports.NeoDropdown = NeoDropdown;
|
|
6912
|
+
exports.NeoDropdownMenu = NeoDropdownMenu;
|
|
6913
|
+
exports.NeoDropdownMenuItem = NeoDropdownMenuItem;
|
|
6914
|
+
exports.NeoDropdownOption = NeoDropdownMenuItem;
|
|
6799
6915
|
exports.NeoFilterChip = NeoFilterChip;
|
|
6800
6916
|
exports.NeoFooter = NeoFooter;
|
|
6917
|
+
exports.NeoGeneralAvatar = NeoGeneralAvatar;
|
|
6801
6918
|
exports.NeoIconButton = NeoIconButton;
|
|
6802
6919
|
exports.NeoIconWrapper = NeoIconWrapper;
|
|
6803
6920
|
exports.NeoInfiniteScrollGrid = NeoInfiniteScrollGrid;
|
|
@@ -6807,13 +6924,14 @@ exports.NeoListItemButton = NeoListItemButton;
|
|
|
6807
6924
|
exports.NeoLoadingSpinner = NeoLoadingSpinner;
|
|
6808
6925
|
exports.NeoMarketplaceCard = NeoMarketplaceCard;
|
|
6809
6926
|
exports.NeoMarketplaceLargeCard = NeoMarketplaceLargeCard;
|
|
6810
|
-
exports.NeoMenu =
|
|
6811
|
-
exports.NeoMenuItem =
|
|
6927
|
+
exports.NeoMenu = NeoDropdownMenu;
|
|
6928
|
+
exports.NeoMenuItem = NeoDropdownMenuItem;
|
|
6812
6929
|
exports.NeoModal = NeoModal;
|
|
6813
6930
|
exports.NeoModalContent = NeoModalContent;
|
|
6814
6931
|
exports.NeoModalFooter = NeoModalFooter;
|
|
6815
6932
|
exports.NeoModalHeader = NeoModalHeader;
|
|
6816
6933
|
exports.NeoMultiBadgesCell = NeoMultiBadgesCell;
|
|
6934
|
+
exports.NeoNavigationAvatar = NeoNavigationAvatar;
|
|
6817
6935
|
exports.NeoNavigationItem = NeoNavigationItem;
|
|
6818
6936
|
exports.NeoPageContent = NeoPageContent;
|
|
6819
6937
|
exports.NeoPaginatedGrid = NeoPaginatedGrid;
|
|
@@ -6821,8 +6939,8 @@ exports.NeoProgressbar = NeoProgressbar;
|
|
|
6821
6939
|
exports.NeoQuickFilter = NeoQuickFilter;
|
|
6822
6940
|
exports.NeoRadio = NeoRadio;
|
|
6823
6941
|
exports.NeoSearchChip = NeoSearchChip;
|
|
6824
|
-
exports.NeoSelect =
|
|
6825
|
-
exports.NeoSelectOption =
|
|
6942
|
+
exports.NeoSelect = NeoDropdown;
|
|
6943
|
+
exports.NeoSelectOption = NeoDropdownMenuItem;
|
|
6826
6944
|
exports.NeoSkeleton = NeoSkeleton;
|
|
6827
6945
|
exports.NeoStatusBadgeCell = NeoStatusBadgeCell;
|
|
6828
6946
|
exports.NeoStatusBanner = NeoStatusBanner;
|