@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.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { semanticColors, colors, spacing, typography, borderRadius, shadows } from '@moderneinc/neo-design';
|
|
3
3
|
import Box from '@mui/material/Box';
|
|
4
4
|
import { styled, alpha } from '@mui/material/styles';
|
|
5
5
|
import Avatar from '@mui/material/Avatar';
|
|
@@ -7,12 +7,13 @@ import Chip, { chipClasses } from '@mui/material/Chip';
|
|
|
7
7
|
import SvgIcon, { svgIconClasses } from '@mui/material/SvgIcon';
|
|
8
8
|
import Alert, { alertClasses } from '@mui/material/Alert';
|
|
9
9
|
import IconButton, { iconButtonClasses } from '@mui/material/IconButton';
|
|
10
|
-
import React, { forwardRef, createElement, useState, useMemo,
|
|
10
|
+
import React, { forwardRef, createElement, useRef, useCallback, useState, useMemo, useEffect } from 'react';
|
|
11
11
|
import Breadcrumbs, { breadcrumbsClasses } from '@mui/material/Breadcrumbs';
|
|
12
12
|
import Link from '@mui/material/Link';
|
|
13
13
|
import ButtonBase, { buttonBaseClasses } from '@mui/material/ButtonBase';
|
|
14
14
|
import CircularProgress from '@mui/material/CircularProgress';
|
|
15
|
-
import
|
|
15
|
+
import MuiToggleButton, { toggleButtonClasses } from '@mui/material/ToggleButton';
|
|
16
|
+
import MuiToggleButtonGroup, { toggleButtonGroupClasses } from '@mui/material/ToggleButtonGroup';
|
|
16
17
|
import Checkbox, { checkboxClasses } from '@mui/material/Checkbox';
|
|
17
18
|
import { useGridApiContext, useGridSelector, gridColumnDefinitionsSelector, gridColumnVisibilityModelSelector, GridPanelWrapper, useGridApiRef, gridClasses as gridClasses$1, DataGridPro, ColumnsPanelTrigger, ToolbarButton, gridFilterModelSelector, FilterPanelTrigger, Toolbar } from '@mui/x-data-grid-pro';
|
|
18
19
|
import Button, { buttonClasses } from '@mui/material/Button';
|
|
@@ -35,6 +36,9 @@ import { PickersShortcuts } from '@mui/x-date-pickers/PickersShortcuts';
|
|
|
35
36
|
import { DateRangePicker } from '@mui/x-date-pickers-pro/DateRangePicker';
|
|
36
37
|
import { dateRangePickerDayClasses } from '@mui/x-date-pickers-pro/DateRangePickerDay';
|
|
37
38
|
import Badge, { badgeClasses } from '@mui/material/Badge';
|
|
39
|
+
import { listClasses } from '@mui/material/List';
|
|
40
|
+
import Menu from '@mui/material/Menu';
|
|
41
|
+
import { paperClasses } from '@mui/material/Paper';
|
|
38
42
|
import FormControl from '@mui/material/FormControl';
|
|
39
43
|
import FormHelperText, { formHelperTextClasses } from '@mui/material/FormHelperText';
|
|
40
44
|
import ListItemButton, { listItemButtonClasses } from '@mui/material/ListItemButton';
|
|
@@ -42,9 +46,6 @@ import ListItemIcon, { listItemIconClasses } from '@mui/material/ListItemIcon';
|
|
|
42
46
|
import ListItemText, { listItemTextClasses } from '@mui/material/ListItemText';
|
|
43
47
|
import Typography from '@mui/material/Typography';
|
|
44
48
|
import MuiCard from '@mui/material/Card';
|
|
45
|
-
import { listClasses } from '@mui/material/List';
|
|
46
|
-
import Menu from '@mui/material/Menu';
|
|
47
|
-
import { paperClasses } from '@mui/material/Paper';
|
|
48
49
|
import Dialog, { dialogClasses } from '@mui/material/Dialog';
|
|
49
50
|
import DialogActions, { dialogActionsClasses } from '@mui/material/DialogActions';
|
|
50
51
|
import DialogContent, { dialogContentClasses } from '@mui/material/DialogContent';
|
|
@@ -60,22 +61,20 @@ import Switch, { switchClasses } from '@mui/material/Switch';
|
|
|
60
61
|
import { useTreeItemModel } from '@mui/x-tree-view/hooks';
|
|
61
62
|
import { TreeItem, treeItemClasses } from '@mui/x-tree-view/TreeItem';
|
|
62
63
|
import { RichTreeViewPro } from '@mui/x-tree-view-pro/RichTreeViewPro';
|
|
63
|
-
import ToggleButton, { toggleButtonClasses } from '@mui/material/ToggleButton';
|
|
64
|
-
import ToggleButtonGroup, { toggleButtonGroupClasses } from '@mui/material/ToggleButtonGroup';
|
|
65
64
|
|
|
66
65
|
/**
|
|
67
|
-
* Outline-based focus ring styles derived from Neo
|
|
66
|
+
* Outline-based focus ring styles derived from Neo border tokens.
|
|
68
67
|
* Uses CSS outline (not box-shadow) so focus rings are never clipped by overflow:hidden.
|
|
69
68
|
*
|
|
70
|
-
* Produces a double-ring effect: a white inner gap (via outline-offset) and a
|
|
69
|
+
* Produces a double-ring effect: a white inner gap (via outline-offset) and a colored outer ring.
|
|
71
70
|
*/
|
|
72
71
|
const focusRingStyles = {
|
|
73
|
-
outline:
|
|
74
|
-
outlineOffset:
|
|
72
|
+
outline: `2px solid ${semanticColors.border.focus}`,
|
|
73
|
+
outlineOffset: '2px',
|
|
75
74
|
};
|
|
76
75
|
|
|
77
76
|
// biome-ignore lint/suspicious/noExplicitAny: Type cast required to override MUI Avatar variant type without global augmentation
|
|
78
|
-
const StyledAvatar = styled(Avatar, {
|
|
77
|
+
const StyledAvatar$1 = styled(Avatar, {
|
|
79
78
|
shouldForwardProp: prop => prop !== 'size' && prop !== 'variant',
|
|
80
79
|
})(({ theme, size = 'medium', variant = 'circular' }) => ({
|
|
81
80
|
boxSizing: 'border-box',
|
|
@@ -146,7 +145,7 @@ const AvatarContainer = styled(Box)(({ size = 'medium' }) => ({
|
|
|
146
145
|
/**
|
|
147
146
|
* NeoAvatar - User avatar component based on MUI Avatar
|
|
148
147
|
*
|
|
149
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=
|
|
148
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=9600-185
|
|
150
149
|
*
|
|
151
150
|
* Figma Props Mapping:
|
|
152
151
|
* - Figma Type "Initials" → variant="initials", size="small" (20px)
|
|
@@ -177,7 +176,7 @@ const AvatarContainer = styled(Box)(({ size = 'medium' }) => ({
|
|
|
177
176
|
*/
|
|
178
177
|
const NeoAvatar = ({ size = 'medium', variant = 'circular', ...props }) => {
|
|
179
178
|
// shouldForwardProp filters out size and variant from being passed to the DOM
|
|
180
|
-
const avatar = jsx(StyledAvatar, { size: size, variant: variant, ...props });
|
|
179
|
+
const avatar = jsx(StyledAvatar$1, { size: size, variant: variant, ...props });
|
|
181
180
|
// Medium size with circular variant (image) gets wrapped in white container
|
|
182
181
|
if (size === 'medium' && variant === 'circular') {
|
|
183
182
|
return jsx(AvatarContainer, { size: size, children: avatar });
|
|
@@ -219,7 +218,7 @@ const StyledChip$2 = styled(Chip)(({ theme }) => ({
|
|
|
219
218
|
[`&.${chipClasses.colorDefault}`]: {
|
|
220
219
|
backgroundColor: semanticColors.status.neutral.light,
|
|
221
220
|
color: semanticColors.status.neutral.dark,
|
|
222
|
-
border: `1px solid ${semanticColors.status.neutral.
|
|
221
|
+
border: `1px solid ${semanticColors.status.neutral.default}80`,
|
|
223
222
|
[`& .${chipClasses.icon}, & .${chipClasses.deleteIcon}`]: {
|
|
224
223
|
color: semanticColors.status.neutral.dark,
|
|
225
224
|
},
|
|
@@ -228,7 +227,7 @@ const StyledChip$2 = styled(Chip)(({ theme }) => ({
|
|
|
228
227
|
[`&.${chipClasses.colorError}`]: {
|
|
229
228
|
backgroundColor: semanticColors.status.error.light,
|
|
230
229
|
color: semanticColors.status.error.dark,
|
|
231
|
-
border: `1px solid ${semanticColors.status.error.
|
|
230
|
+
border: `1px solid ${semanticColors.status.error.default}80`,
|
|
232
231
|
[`& .${chipClasses.icon}, & .${chipClasses.deleteIcon}`]: {
|
|
233
232
|
color: semanticColors.status.error.dark,
|
|
234
233
|
},
|
|
@@ -237,7 +236,7 @@ const StyledChip$2 = styled(Chip)(({ theme }) => ({
|
|
|
237
236
|
[`&.${chipClasses.colorWarning}`]: {
|
|
238
237
|
backgroundColor: semanticColors.status.warning.light,
|
|
239
238
|
color: semanticColors.status.warning.dark,
|
|
240
|
-
border: `1px solid ${semanticColors.status.warning.
|
|
239
|
+
border: `1px solid ${semanticColors.status.warning.default}80`,
|
|
241
240
|
[`& .${chipClasses.icon}, & .${chipClasses.deleteIcon}`]: {
|
|
242
241
|
color: semanticColors.status.warning.dark,
|
|
243
242
|
},
|
|
@@ -246,7 +245,7 @@ const StyledChip$2 = styled(Chip)(({ theme }) => ({
|
|
|
246
245
|
[`&.${chipClasses.colorSuccess}`]: {
|
|
247
246
|
backgroundColor: semanticColors.status.success.light,
|
|
248
247
|
color: semanticColors.status.success.dark,
|
|
249
|
-
border: `1px solid ${semanticColors.status.success.
|
|
248
|
+
border: `1px solid ${semanticColors.status.success.default}80`,
|
|
250
249
|
[`& .${chipClasses.icon}, & .${chipClasses.deleteIcon}`]: {
|
|
251
250
|
color: semanticColors.status.success.dark,
|
|
252
251
|
},
|
|
@@ -255,7 +254,7 @@ const StyledChip$2 = styled(Chip)(({ theme }) => ({
|
|
|
255
254
|
[`&.${chipClasses.colorInfo}`]: {
|
|
256
255
|
backgroundColor: semanticColors.status.info.light,
|
|
257
256
|
color: semanticColors.status.info.dark,
|
|
258
|
-
border: `1px solid ${semanticColors.status.info.
|
|
257
|
+
border: `1px solid ${semanticColors.status.info.default}80`,
|
|
259
258
|
[`& .${chipClasses.icon}, & .${chipClasses.deleteIcon}`]: {
|
|
260
259
|
color: semanticColors.status.info.dark,
|
|
261
260
|
},
|
|
@@ -1066,13 +1065,13 @@ const NeoBanner = ({ variant = 'light', message, messagePosition = 'left', linkT
|
|
|
1066
1065
|
return semanticColors.surfaces.white;
|
|
1067
1066
|
}
|
|
1068
1067
|
if (variant === 'success') {
|
|
1069
|
-
return semanticColors.status.success.
|
|
1068
|
+
return semanticColors.status.success.default;
|
|
1070
1069
|
}
|
|
1071
1070
|
if (variant === 'error') {
|
|
1072
|
-
return semanticColors.status.error.
|
|
1071
|
+
return semanticColors.status.error.default;
|
|
1073
1072
|
}
|
|
1074
1073
|
if (variant === 'warning') {
|
|
1075
|
-
return semanticColors.status.warning.
|
|
1074
|
+
return semanticColors.status.warning.default;
|
|
1076
1075
|
}
|
|
1077
1076
|
return colors.grey['800'];
|
|
1078
1077
|
};
|
|
@@ -1104,7 +1103,7 @@ const StyledBreadcrumbLink = styled(Link, {
|
|
|
1104
1103
|
color: current ? semanticColors.buttons.tertiary.hover : semanticColors.icons.hover,
|
|
1105
1104
|
},
|
|
1106
1105
|
'&:focus-visible': {
|
|
1107
|
-
outline: `2px solid ${semanticColors.
|
|
1106
|
+
outline: `2px solid ${semanticColors.border.focus}`,
|
|
1108
1107
|
outlineOffset: 2,
|
|
1109
1108
|
},
|
|
1110
1109
|
}));
|
|
@@ -1194,7 +1193,7 @@ const StyledButtonBase$1 = styled(ButtonBase, {
|
|
|
1194
1193
|
},
|
|
1195
1194
|
// Focus visible for keyboard navigation
|
|
1196
1195
|
[`&.${buttonBaseClasses.focusVisible}`]: {
|
|
1197
|
-
outline: `2px solid ${semanticColors.
|
|
1196
|
+
outline: `2px solid ${semanticColors.border.focus}`,
|
|
1198
1197
|
outlineOffset: 2,
|
|
1199
1198
|
},
|
|
1200
1199
|
};
|
|
@@ -1234,7 +1233,7 @@ const StyledButtonBase$1 = styled(ButtonBase, {
|
|
|
1234
1233
|
: {
|
|
1235
1234
|
[`&.${buttonBaseClasses.disabled}`]: {
|
|
1236
1235
|
backgroundColor: semanticColors.buttons.secondary.disabledBackground,
|
|
1237
|
-
borderColor: semanticColors.
|
|
1236
|
+
borderColor: semanticColors.border.secondary,
|
|
1238
1237
|
color: semanticColors.typography.button.disabled,
|
|
1239
1238
|
},
|
|
1240
1239
|
}),
|
|
@@ -1362,40 +1361,102 @@ function NeoButton({ variant = 'primary', size = 'medium', loading = false, chil
|
|
|
1362
1361
|
}
|
|
1363
1362
|
NeoButton.displayName = 'NeoButton';
|
|
1364
1363
|
|
|
1364
|
+
const StyledButtonTab = styled(MuiToggleButton)(({ theme }) => ({
|
|
1365
|
+
fontFamily: typography.fontFamily.body,
|
|
1366
|
+
fontSize: theme.typography.pxToRem(typography.fontSize.sm),
|
|
1367
|
+
lineHeight: 1,
|
|
1368
|
+
color: semanticColors.typography.tab.inactive,
|
|
1369
|
+
backgroundColor: 'transparent',
|
|
1370
|
+
border: 'none',
|
|
1371
|
+
padding: theme.spacing(1, 1.5),
|
|
1372
|
+
cursor: 'pointer',
|
|
1373
|
+
textTransform: 'none',
|
|
1374
|
+
transition: theme.transitions.create(['color'], {
|
|
1375
|
+
duration: theme.transitions.duration.short,
|
|
1376
|
+
}),
|
|
1377
|
+
'&:hover': {
|
|
1378
|
+
color: semanticColors.typography.tab.active,
|
|
1379
|
+
},
|
|
1380
|
+
'&.Mui-focusVisible': {
|
|
1381
|
+
outline: `2px solid ${semanticColors.border.focus}`,
|
|
1382
|
+
outlineOffset: -2,
|
|
1383
|
+
borderRadius: borderRadius.xXS,
|
|
1384
|
+
},
|
|
1385
|
+
'&.Mui-disabled': {
|
|
1386
|
+
color: semanticColors.typography.button.disabled,
|
|
1387
|
+
cursor: 'default',
|
|
1388
|
+
pointerEvents: 'none',
|
|
1389
|
+
},
|
|
1390
|
+
}));
|
|
1391
|
+
/**
|
|
1392
|
+
* Syncs aria-selected with MUI's Mui-selected class via MutationObserver.
|
|
1393
|
+
* MUI ToggleButton computes selection internally from context and applies
|
|
1394
|
+
* the Mui-selected class — we mirror that to aria-selected for tab semantics.
|
|
1395
|
+
*/
|
|
1396
|
+
function useTabAriaSync() {
|
|
1397
|
+
const observerRef = useRef(null);
|
|
1398
|
+
return useCallback((node) => {
|
|
1399
|
+
if (observerRef.current) {
|
|
1400
|
+
observerRef.current.disconnect();
|
|
1401
|
+
observerRef.current = null;
|
|
1402
|
+
}
|
|
1403
|
+
if (!node)
|
|
1404
|
+
return;
|
|
1405
|
+
const sync = () => {
|
|
1406
|
+
node.setAttribute('role', 'tab');
|
|
1407
|
+
node.setAttribute('aria-selected', String(node.classList.contains('Mui-selected')));
|
|
1408
|
+
};
|
|
1409
|
+
sync();
|
|
1410
|
+
observerRef.current = new MutationObserver(sync);
|
|
1411
|
+
observerRef.current.observe(node, { attributes: true, attributeFilter: ['class'] });
|
|
1412
|
+
}, []);
|
|
1413
|
+
}
|
|
1365
1414
|
/**
|
|
1366
|
-
*
|
|
1415
|
+
* NeoButtonTab - A tab-style toggle button for use within NeoButtonGroup
|
|
1367
1416
|
*
|
|
1368
|
-
*
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1417
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=4106-11048
|
|
1418
|
+
*/
|
|
1419
|
+
const NeoButtonTab = ({ children, ...props }) => {
|
|
1420
|
+
const tabRef = useTabAriaSync();
|
|
1421
|
+
return (jsx(StyledButtonTab, { ref: tabRef, ...props, children: children }));
|
|
1422
|
+
};
|
|
1423
|
+
NeoButtonTab.displayName = 'NeoButtonTab';
|
|
1424
|
+
|
|
1425
|
+
/**
|
|
1426
|
+
* Styled toggle button group that implements the Figma "Button tab group" design.
|
|
1427
|
+
*
|
|
1428
|
+
* Built on MUI ToggleButtonGroup which provides:
|
|
1429
|
+
* - Selection state management (value/onChange/exclusive)
|
|
1430
|
+
* - Size and disabled propagation via context
|
|
1431
|
+
* - Positional classes (firstButton/middleButton/lastButton)
|
|
1372
1432
|
*
|
|
1373
|
-
* Custom styling
|
|
1374
|
-
* -
|
|
1433
|
+
* Custom styling:
|
|
1434
|
+
* - Pill-shaped border (borderRadius.full)
|
|
1375
1435
|
* - Size variants (small=32px, medium=40px)
|
|
1376
1436
|
* - Border colors using semantic tokens
|
|
1377
|
-
* -
|
|
1437
|
+
* - Selected state colors from Neo design tokens
|
|
1378
1438
|
*/
|
|
1379
|
-
const
|
|
1439
|
+
const StyledButtonTabGroup = styled(MuiToggleButtonGroup)(({ theme, size = 'medium' }) => {
|
|
1380
1440
|
const sizeStyles = {
|
|
1381
1441
|
small: {
|
|
1382
|
-
height:
|
|
1442
|
+
height: spacing.spacing_4,
|
|
1383
1443
|
},
|
|
1384
1444
|
medium: {
|
|
1385
1445
|
height: spacing.spacing_5,
|
|
1386
1446
|
},
|
|
1387
1447
|
};
|
|
1388
1448
|
return {
|
|
1389
|
-
// Apply pill-shaped border radius
|
|
1390
1449
|
borderRadius: borderRadius.full,
|
|
1391
1450
|
border: `1px solid ${semanticColors.border.primary}`,
|
|
1392
|
-
|
|
1393
|
-
|
|
1451
|
+
overflow: 'hidden',
|
|
1452
|
+
// Style all grouped children
|
|
1453
|
+
[`& .${toggleButtonGroupClasses.grouped}`]: {
|
|
1454
|
+
flex: 1,
|
|
1394
1455
|
minWidth: 'auto',
|
|
1395
1456
|
height: sizeStyles[size].height,
|
|
1396
1457
|
padding: `${theme.spacing(1)} ${theme.spacing(2)}`,
|
|
1397
1458
|
fontSize: theme.typography.pxToRem(typography.fontSize.sm),
|
|
1398
|
-
fontWeight: typography.fontWeight.
|
|
1459
|
+
fontWeight: typography.fontWeight.regular,
|
|
1399
1460
|
lineHeight: 1,
|
|
1400
1461
|
textTransform: 'none',
|
|
1401
1462
|
border: 'none',
|
|
@@ -1406,40 +1467,35 @@ const StyledButtonGroup = styled(MuiButtonGroup)(({ theme, size = 'medium' }) =>
|
|
|
1406
1467
|
transition: theme.transitions.create(['background-color', 'color', 'border-color'], {
|
|
1407
1468
|
duration: theme.transitions.duration.short,
|
|
1408
1469
|
}),
|
|
1409
|
-
//
|
|
1410
|
-
|
|
1470
|
+
// Selected state — double selector for specificity over MUI ToggleButton defaults
|
|
1471
|
+
[`&.${toggleButtonClasses.selected}.${toggleButtonClasses.selected}`]: {
|
|
1411
1472
|
backgroundColor: semanticColors.surfaces.white,
|
|
1412
1473
|
color: semanticColors.buttons.tertiary.default,
|
|
1413
1474
|
fontWeight: typography.fontWeight.semiBold,
|
|
1414
1475
|
},
|
|
1415
1476
|
// Hover state
|
|
1416
|
-
|
|
1477
|
+
[`&:hover, &.${toggleButtonClasses.selected}:hover`]: {
|
|
1417
1478
|
backgroundColor: semanticColors.buttons.secondary.hoverBackground,
|
|
1418
|
-
borderRight: `1px solid ${semanticColors.border.primary}`,
|
|
1419
1479
|
},
|
|
1420
1480
|
// Focus visible for keyboard navigation
|
|
1421
|
-
|
|
1422
|
-
outline: `2px solid ${semanticColors.
|
|
1481
|
+
'&.Mui-focusVisible': {
|
|
1482
|
+
outline: `2px solid ${semanticColors.border.focus}`,
|
|
1423
1483
|
outlineOffset: -2,
|
|
1424
1484
|
zIndex: 1,
|
|
1425
1485
|
},
|
|
1426
1486
|
// First button: rounded left edge
|
|
1427
|
-
[`&.${
|
|
1487
|
+
[`&.${toggleButtonGroupClasses.firstButton}`]: {
|
|
1428
1488
|
borderTopLeftRadius: borderRadius.full,
|
|
1429
1489
|
borderBottomLeftRadius: borderRadius.full,
|
|
1430
1490
|
},
|
|
1431
1491
|
// Last button: rounded right edge, no right border
|
|
1432
|
-
[`&.${
|
|
1492
|
+
[`&.${toggleButtonGroupClasses.lastButton}`]: {
|
|
1433
1493
|
borderTopRightRadius: borderRadius.full,
|
|
1434
1494
|
borderBottomRightRadius: borderRadius.full,
|
|
1435
1495
|
borderRight: 'none',
|
|
1436
1496
|
},
|
|
1437
|
-
// Middle buttons: no border radius
|
|
1438
|
-
[`&.${buttonGroupClasses.middleButton}`]: {
|
|
1439
|
-
borderRadius: 0,
|
|
1440
|
-
},
|
|
1441
1497
|
// Disabled state
|
|
1442
|
-
[`&.${
|
|
1498
|
+
[`&.${toggleButtonClasses.disabled}`]: {
|
|
1443
1499
|
backgroundColor: semanticColors.buttons.secondary.disabledBackground,
|
|
1444
1500
|
color: semanticColors.typography.button.disabled,
|
|
1445
1501
|
cursor: 'not-allowed',
|
|
@@ -1449,29 +1505,27 @@ const StyledButtonGroup = styled(MuiButtonGroup)(({ theme, size = 'medium' }) =>
|
|
|
1449
1505
|
};
|
|
1450
1506
|
});
|
|
1451
1507
|
/**
|
|
1452
|
-
*
|
|
1508
|
+
* NeoButtonTabGroup - Button tab group container
|
|
1453
1509
|
*
|
|
1454
1510
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4106-11129
|
|
1455
1511
|
*
|
|
1456
1512
|
* Figma Props Mapping:
|
|
1457
1513
|
* - Size (Sm|Md) → size prop (small|medium)
|
|
1458
|
-
* - Active button state → Controlled
|
|
1514
|
+
* - Active button state → Controlled via value/onChange props
|
|
1459
1515
|
*
|
|
1460
1516
|
* Usage:
|
|
1461
1517
|
* ```tsx
|
|
1462
|
-
* <
|
|
1463
|
-
* <
|
|
1464
|
-
* <
|
|
1465
|
-
* <
|
|
1466
|
-
* </
|
|
1518
|
+
* <NeoButtonTabGroup value={selected} onChange={(_, val) => setSelected(val)} size="medium">
|
|
1519
|
+
* <NeoButtonTab value="tab1">Tab 1</NeoButtonTab>
|
|
1520
|
+
* <NeoButtonTab value="tab2">Tab 2</NeoButtonTab>
|
|
1521
|
+
* <NeoButtonTab value="tab3">Tab 3</NeoButtonTab>
|
|
1522
|
+
* </NeoButtonTabGroup>
|
|
1467
1523
|
* ```
|
|
1468
|
-
*
|
|
1469
|
-
* Note: To show active state, add 'active' class to the selected button
|
|
1470
1524
|
*/
|
|
1471
|
-
const
|
|
1472
|
-
return jsx(
|
|
1525
|
+
const NeoButtonTabGroup = ({ size = 'medium', exclusive = true, ...props }) => {
|
|
1526
|
+
return jsx(StyledButtonTabGroup, { role: "tablist", size: size, exclusive: exclusive, ...props });
|
|
1473
1527
|
};
|
|
1474
|
-
|
|
1528
|
+
NeoButtonTabGroup.displayName = 'NeoButtonTabGroup';
|
|
1475
1529
|
|
|
1476
1530
|
// Border radius per size (from Figma)
|
|
1477
1531
|
const borderRadiusConfig = {
|
|
@@ -1545,7 +1599,7 @@ const StyledCheckbox = styled(Checkbox, {
|
|
|
1545
1599
|
height: config.size,
|
|
1546
1600
|
padding: 0,
|
|
1547
1601
|
marginTop: size === 'xs' ? 3 : 2,
|
|
1548
|
-
color: semanticColors.border.
|
|
1602
|
+
color: semanticColors.border.primary,
|
|
1549
1603
|
flexShrink: 0,
|
|
1550
1604
|
// Root element
|
|
1551
1605
|
[`&.${checkboxClasses.root}`]: {
|
|
@@ -1568,20 +1622,20 @@ const StyledCheckbox = styled(Checkbox, {
|
|
|
1568
1622
|
},
|
|
1569
1623
|
// Disabled state
|
|
1570
1624
|
[`&.${checkboxClasses.disabled}`]: {
|
|
1571
|
-
color: semanticColors.border.
|
|
1625
|
+
color: semanticColors.border.primary,
|
|
1572
1626
|
cursor: 'not-allowed',
|
|
1573
1627
|
// When checked and disabled
|
|
1574
1628
|
[`&.${checkboxClasses.checked}`]: {
|
|
1575
|
-
color: semanticColors.border.
|
|
1629
|
+
color: semanticColors.border.primary,
|
|
1576
1630
|
},
|
|
1577
1631
|
// When indeterminate and disabled
|
|
1578
1632
|
[`&.${checkboxClasses.indeterminate}`]: {
|
|
1579
|
-
color: semanticColors.border.
|
|
1633
|
+
color: semanticColors.border.primary,
|
|
1580
1634
|
},
|
|
1581
1635
|
},
|
|
1582
1636
|
// Focus visible for keyboard navigation
|
|
1583
1637
|
'&.Mui-focusVisible': {
|
|
1584
|
-
outline: `2px solid ${semanticColors.
|
|
1638
|
+
outline: `2px solid ${semanticColors.border.focus}`,
|
|
1585
1639
|
outlineOffset: 2,
|
|
1586
1640
|
borderRadius: config.borderRadius,
|
|
1587
1641
|
},
|
|
@@ -1711,7 +1765,7 @@ const StyledButtonBase = styled(ButtonBase, {
|
|
|
1711
1765
|
cursor: 'text',
|
|
1712
1766
|
// Focus visible for keyboard navigation
|
|
1713
1767
|
[`&.${buttonBaseClasses.focusVisible}`]: {
|
|
1714
|
-
outline: `2px solid ${semanticColors.
|
|
1768
|
+
outline: `2px solid ${semanticColors.border.focus}`,
|
|
1715
1769
|
outlineOffset: 2,
|
|
1716
1770
|
},
|
|
1717
1771
|
};
|
|
@@ -1782,7 +1836,7 @@ const StyledSearchField = styled(TextField)(({ theme }) => ({
|
|
|
1782
1836
|
fontSize: theme.typography.pxToRem(typography.fontSize.default),
|
|
1783
1837
|
borderRadius: borderRadius.input,
|
|
1784
1838
|
backgroundColor: semanticColors.input.background,
|
|
1785
|
-
border: `1px solid ${semanticColors.border.
|
|
1839
|
+
border: `1px solid ${semanticColors.border.primary}`,
|
|
1786
1840
|
paddingTop: spacing.spacing_1,
|
|
1787
1841
|
paddingBottom: spacing.spacing_1,
|
|
1788
1842
|
paddingLeft: spacing.spacing_1_1_2,
|
|
@@ -1993,43 +2047,32 @@ const Shortcut = styled('span')(({ theme }) => ({
|
|
|
1993
2047
|
backgroundColor: semanticColors.surfaces.white,
|
|
1994
2048
|
}));
|
|
1995
2049
|
/**
|
|
1996
|
-
*
|
|
1997
|
-
*
|
|
1998
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4159-8649
|
|
2050
|
+
* NeoDropdownMenuItem - Dropdown menu item component based on MUI MenuItem
|
|
1999
2051
|
*
|
|
2000
|
-
*
|
|
2001
|
-
* - Figma "Dropdown - Menu" component uses Type (Avatar|Button|Icon) and Open (True|False)
|
|
2002
|
-
* to control the menu trigger. NeoMenuItem is the individual item inside the menu.
|
|
2003
|
-
* - Text label → children prop (mapped via figma.children)
|
|
2004
|
-
* - selected → selected prop (React-controlled)
|
|
2005
|
-
* - disabled → disabled prop (React-controlled)
|
|
2006
|
-
* - Hover state → CSS :hover (not mapped)
|
|
2007
|
-
* - Icon slot → icon prop (not mappable - ReactNode)
|
|
2008
|
-
* - Secondary text → secondaryText prop (not mappable - ReactNode/string)
|
|
2009
|
-
* - Keyboard shortcut → shortcut prop (not mappable - ReactNode/string)
|
|
2052
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4159-8584
|
|
2010
2053
|
*
|
|
2011
2054
|
* @example
|
|
2012
2055
|
* ```tsx
|
|
2013
2056
|
* // With icon and shortcut
|
|
2014
|
-
* <
|
|
2057
|
+
* <NeoDropdownMenuItem icon={<UserIcon />} shortcut="⌘+P">
|
|
2015
2058
|
* View profile
|
|
2016
|
-
* </
|
|
2059
|
+
* </NeoDropdownMenuItem>
|
|
2017
2060
|
*
|
|
2018
2061
|
* // With secondary text (user list pattern from Figma node 4305:41844)
|
|
2019
|
-
* <
|
|
2020
|
-
* <
|
|
2062
|
+
* <NeoDropdownMenuItem secondaryText="@phoenix">Phoenix Baker</NeoDropdownMenuItem>
|
|
2063
|
+
* <NeoDropdownMenuItem secondaryText="@olivia">Olivia Rhye</NeoDropdownMenuItem>
|
|
2021
2064
|
*
|
|
2022
2065
|
* // Disabled state
|
|
2023
|
-
* <
|
|
2066
|
+
* <NeoDropdownMenuItem disabled>Disabled item</NeoDropdownMenuItem>
|
|
2024
2067
|
* ```
|
|
2025
2068
|
*/
|
|
2026
|
-
const
|
|
2069
|
+
const NeoDropdownMenuItem = ({ icon, shortcut, secondaryText, children, ...props }) => {
|
|
2027
2070
|
return (jsx(StyledMenuItem, { ...props, 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 })] }) }));
|
|
2028
2071
|
};
|
|
2029
|
-
|
|
2072
|
+
NeoDropdownMenuItem.displayName = 'NeoDropdownMenuItem';
|
|
2030
2073
|
|
|
2031
2074
|
/**
|
|
2032
|
-
* Custom chevron icon for
|
|
2075
|
+
* Custom chevron icon for dropdown
|
|
2033
2076
|
* Must accept props from MUI Select to work correctly
|
|
2034
2077
|
*/
|
|
2035
2078
|
const ChevronDownIcon = (props) => (jsx(ChevronDown, { ...props, size: spacing.spacing_2_1_2, color: semanticColors.typography.input.default, style: { ...props.style } }));
|
|
@@ -2039,11 +2082,11 @@ const ChevronDownIcon = (props) => (jsx(ChevronDown, { ...props, size: spacing.s
|
|
|
2039
2082
|
const StyledSelect = styled(MuiSelect)({
|
|
2040
2083
|
minHeight: spacing.spacing_5,
|
|
2041
2084
|
backgroundColor: semanticColors.input.background,
|
|
2042
|
-
border: `1px solid ${semanticColors.border.
|
|
2085
|
+
border: `1px solid ${semanticColors.border.primary}`,
|
|
2043
2086
|
borderRadius: `${borderRadius.input}px`,
|
|
2044
2087
|
'&:hover': {
|
|
2045
2088
|
backgroundColor: semanticColors.input.hoverBackground,
|
|
2046
|
-
borderColor: semanticColors.border.
|
|
2089
|
+
borderColor: semanticColors.border.primary,
|
|
2047
2090
|
},
|
|
2048
2091
|
'&.Mui-focused': {
|
|
2049
2092
|
backgroundColor: semanticColors.input.background,
|
|
@@ -2069,25 +2112,24 @@ const StyledSelect = styled(MuiSelect)({
|
|
|
2069
2112
|
},
|
|
2070
2113
|
});
|
|
2071
2114
|
/**
|
|
2072
|
-
*
|
|
2115
|
+
* NeoDropdown - Dropdown select component with Neo design system styling
|
|
2073
2116
|
*
|
|
2074
2117
|
* A styled version of MUI's Select that uses Neo design tokens, Lucide ChevronDown icon,
|
|
2075
|
-
* and
|
|
2118
|
+
* and NeoDropdownMenu/NeoDropdownMenuItem for the dropdown list.
|
|
2076
2119
|
*
|
|
2077
2120
|
* @example
|
|
2078
2121
|
* ```tsx
|
|
2079
|
-
* import {
|
|
2122
|
+
* import { NeoDropdown, NeoDropdownOption } from '@moderneinc/neo-styled-components'
|
|
2080
2123
|
*
|
|
2081
|
-
* <
|
|
2082
|
-
* <
|
|
2083
|
-
* <
|
|
2084
|
-
* </
|
|
2124
|
+
* <NeoDropdown value={value} onChange={handleChange}>
|
|
2125
|
+
* <NeoDropdownOption value="option1">Option 1</NeoDropdownOption>
|
|
2126
|
+
* <NeoDropdownOption value="option2">Option 2</NeoDropdownOption>
|
|
2127
|
+
* </NeoDropdown>
|
|
2085
2128
|
* ```
|
|
2086
2129
|
*/
|
|
2087
|
-
const
|
|
2130
|
+
const NeoDropdown = (props) => {
|
|
2088
2131
|
return (jsx(StyledSelect, { ...props, IconComponent: ChevronDownIcon, variant: "standard", MenuProps: {
|
|
2089
2132
|
...props.MenuProps,
|
|
2090
|
-
// Apply NeoMenu styling to the dropdown
|
|
2091
2133
|
PaperProps: {
|
|
2092
2134
|
sx: {
|
|
2093
2135
|
backgroundColor: semanticColors.surfaces.white,
|
|
@@ -2100,7 +2142,7 @@ const NeoSelect = (props) => {
|
|
|
2100
2142
|
},
|
|
2101
2143
|
} }));
|
|
2102
2144
|
};
|
|
2103
|
-
|
|
2145
|
+
NeoDropdown.displayName = 'NeoDropdown';
|
|
2104
2146
|
|
|
2105
2147
|
/**
|
|
2106
2148
|
* Icon components for DataGrid filter panel slots
|
|
@@ -2159,7 +2201,7 @@ const StyledGridFilterPanel = styled(GridFilterPanel)({
|
|
|
2159
2201
|
position: 'relative',
|
|
2160
2202
|
minHeight: spacing.spacing_5,
|
|
2161
2203
|
backgroundColor: semanticColors.input.background,
|
|
2162
|
-
border: `1px solid ${semanticColors.border.
|
|
2204
|
+
border: `1px solid ${semanticColors.border.primary}`,
|
|
2163
2205
|
borderRadius: `${borderRadius.input}px`,
|
|
2164
2206
|
fontSize: typography.fontSize.default,
|
|
2165
2207
|
fontWeight: typography.fontWeight.regular,
|
|
@@ -2167,11 +2209,11 @@ const StyledGridFilterPanel = styled(GridFilterPanel)({
|
|
|
2167
2209
|
},
|
|
2168
2210
|
[`& .${gridClasses.filterForm} .${inputBaseClasses.root}:hover`]: {
|
|
2169
2211
|
backgroundColor: semanticColors.input.hoverBackground,
|
|
2170
|
-
borderColor: semanticColors.border.
|
|
2212
|
+
borderColor: semanticColors.border.primary,
|
|
2171
2213
|
},
|
|
2172
2214
|
[`& .${gridClasses.filterForm} .${inputBaseClasses.root}.${inputBaseClasses.focused}`]: {
|
|
2173
2215
|
backgroundColor: semanticColors.input.background,
|
|
2174
|
-
borderColor: semanticColors.border.
|
|
2216
|
+
borderColor: semanticColors.border.primary,
|
|
2175
2217
|
},
|
|
2176
2218
|
[`& .${gridClasses.filterForm} .${inputBaseClasses.root}::before`]: {
|
|
2177
2219
|
display: 'none',
|
|
@@ -2595,11 +2637,11 @@ const outlinedColorStyles = {
|
|
|
2595
2637
|
},
|
|
2596
2638
|
};
|
|
2597
2639
|
const filledColorStyles = {
|
|
2598
|
-
default: semanticColors.status.neutral.
|
|
2599
|
-
error: semanticColors.status.error.
|
|
2600
|
-
warning: semanticColors.status.warning.
|
|
2601
|
-
success: semanticColors.status.success.
|
|
2602
|
-
info: semanticColors.status.info.
|
|
2640
|
+
default: semanticColors.status.neutral.default,
|
|
2641
|
+
error: semanticColors.status.error.default,
|
|
2642
|
+
warning: semanticColors.status.warning.default,
|
|
2643
|
+
success: semanticColors.status.success.default,
|
|
2644
|
+
info: semanticColors.status.info.default,
|
|
2603
2645
|
violet: colors.violet[500],
|
|
2604
2646
|
beta: colors.digitalBlue[300],
|
|
2605
2647
|
};
|
|
@@ -3207,7 +3249,7 @@ const StyledIconButton = styled(IconButton, {
|
|
|
3207
3249
|
},
|
|
3208
3250
|
// Focus visible for keyboard navigation
|
|
3209
3251
|
'&:focus-visible': {
|
|
3210
|
-
outline: `2px solid ${semanticColors.
|
|
3252
|
+
outline: `2px solid ${semanticColors.border.focus}`,
|
|
3211
3253
|
outlineOffset: 2,
|
|
3212
3254
|
},
|
|
3213
3255
|
};
|
|
@@ -3516,16 +3558,16 @@ const StyledDivider = styled(Divider)(({ theme }) => ({
|
|
|
3516
3558
|
* Generic divider component that can be used in menus, lists, cards, or any layout
|
|
3517
3559
|
* that needs visual separation between content sections.
|
|
3518
3560
|
*
|
|
3519
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=
|
|
3561
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4633-39807
|
|
3520
3562
|
*
|
|
3521
3563
|
* @example
|
|
3522
3564
|
* ```tsx
|
|
3523
3565
|
* // In a menu
|
|
3524
|
-
* <
|
|
3525
|
-
* <
|
|
3566
|
+
* <NeoDropdownMenu>
|
|
3567
|
+
* <NeoDropdownMenuItem>Settings</NeoDropdownMenuItem>
|
|
3526
3568
|
* <NeoDivider />
|
|
3527
|
-
* <
|
|
3528
|
-
* </
|
|
3569
|
+
* <NeoDropdownMenuItem>Sign out</NeoDropdownMenuItem>
|
|
3570
|
+
* </NeoDropdownMenu>
|
|
3529
3571
|
*
|
|
3530
3572
|
* // In a card
|
|
3531
3573
|
* <Card>
|
|
@@ -3547,7 +3589,7 @@ const sizeMap = {
|
|
|
3547
3589
|
};
|
|
3548
3590
|
const StyledBadge = styled(Badge)(({ ownerState }) => {
|
|
3549
3591
|
const size = sizeMap[ownerState.size];
|
|
3550
|
-
const color = semanticColors.status[ownerState.color].
|
|
3592
|
+
const color = semanticColors.status[ownerState.color].default;
|
|
3551
3593
|
return {
|
|
3552
3594
|
[`& .${badgeClasses.badge}`]: {
|
|
3553
3595
|
width: size,
|
|
@@ -3575,7 +3617,7 @@ const StyledBadge = styled(Badge)(({ ownerState }) => {
|
|
|
3575
3617
|
*/
|
|
3576
3618
|
const NeoDot = ({ size = 'medium', variant = 'solid', color = 'neutral', ...props }) => {
|
|
3577
3619
|
const dotSize = sizeMap[size];
|
|
3578
|
-
const mediumColor = semanticColors.status[color].
|
|
3620
|
+
const mediumColor = semanticColors.status[color].default;
|
|
3579
3621
|
const lightColor = semanticColors.status[color].light;
|
|
3580
3622
|
// For outline variant, use SVG for precise control
|
|
3581
3623
|
const renderDot = () => {
|
|
@@ -3596,6 +3638,47 @@ const NeoDot = ({ size = 'medium', variant = 'solid', color = 'neutral', ...prop
|
|
|
3596
3638
|
};
|
|
3597
3639
|
NeoDot.displayName = 'NeoDot';
|
|
3598
3640
|
|
|
3641
|
+
const StyledMenu = styled(Menu)(({ theme }) => ({
|
|
3642
|
+
[`& .${paperClasses.root}`]: {
|
|
3643
|
+
backgroundColor: semanticColors.surfaces.white,
|
|
3644
|
+
borderRadius: borderRadius.s,
|
|
3645
|
+
border: `1px solid ${semanticColors.border.primary}`,
|
|
3646
|
+
boxShadow: `${shadows.dropdown.x}px ${shadows.dropdown.y}px ${shadows.dropdown.blur}px ${shadows.dropdown.spread}px ${shadows.dropdown.shadow}`,
|
|
3647
|
+
minWidth: 200,
|
|
3648
|
+
marginTop: theme.spacing(1),
|
|
3649
|
+
paddingTop: theme.spacing(1),
|
|
3650
|
+
paddingBottom: theme.spacing(1),
|
|
3651
|
+
},
|
|
3652
|
+
[`& .${listClasses.root}`]: {
|
|
3653
|
+
padding: 0,
|
|
3654
|
+
},
|
|
3655
|
+
}));
|
|
3656
|
+
/**
|
|
3657
|
+
* NeoDropdownMenu - Dropdown menu component based on MUI Menu
|
|
3658
|
+
*
|
|
3659
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=11141-4980
|
|
3660
|
+
*
|
|
3661
|
+
* @example
|
|
3662
|
+
* ```tsx
|
|
3663
|
+
* const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
|
|
3664
|
+
* const open = Boolean(anchorEl);
|
|
3665
|
+
*
|
|
3666
|
+
* <Button onClick={(e) => setAnchorEl(e.currentTarget)}>Open Menu</Button>
|
|
3667
|
+
* <NeoDropdownMenu
|
|
3668
|
+
* open={open}
|
|
3669
|
+
* anchorEl={anchorEl}
|
|
3670
|
+
* onClose={() => setAnchorEl(null)}
|
|
3671
|
+
* >
|
|
3672
|
+
* <NeoDropdownMenuItem icon={<Icon />} shortcut="⌘+P">View profile</NeoDropdownMenuItem>
|
|
3673
|
+
* <NeoDropdownMenuItem>Settings</NeoDropdownMenuItem>
|
|
3674
|
+
* </NeoDropdownMenu>
|
|
3675
|
+
* ```
|
|
3676
|
+
*/
|
|
3677
|
+
const NeoDropdownMenu = ({ children, ...props }) => {
|
|
3678
|
+
return jsx(StyledMenu, { ...props, children: children });
|
|
3679
|
+
};
|
|
3680
|
+
NeoDropdownMenu.displayName = 'NeoDropdownMenu';
|
|
3681
|
+
|
|
3599
3682
|
const filterChipOnlyProps = ['selected', 'expanded', 'selectedLabel', 'count', 'onClear'];
|
|
3600
3683
|
const StyledChip = styled(Chip, {
|
|
3601
3684
|
shouldForwardProp: prop => !filterChipOnlyProps.includes(prop),
|
|
@@ -3941,6 +4024,56 @@ const NeoFooter = ({ variant = 'pagination', showShadow = false, loading = false
|
|
|
3941
4024
|
};
|
|
3942
4025
|
NeoFooter.displayName = 'NeoFooter';
|
|
3943
4026
|
|
|
4027
|
+
/**
|
|
4028
|
+
* Shared color palette for avatar components (GeneralAvatar, NavigationAvatar).
|
|
4029
|
+
* Maps color index (1-7) to background color token pairs.
|
|
4030
|
+
*/
|
|
4031
|
+
const avatarColorPalette = {
|
|
4032
|
+
1: { bg: colors.digitalBlue[100] },
|
|
4033
|
+
2: { bg: colors.digitalGreen[100] },
|
|
4034
|
+
3: { bg: colors.gold[100] },
|
|
4035
|
+
4: { bg: colors.red[100] },
|
|
4036
|
+
5: { bg: colors.violet[100] },
|
|
4037
|
+
6: { bg: colors.tealGreen[100] },
|
|
4038
|
+
7: { bg: colors.orange[100] },
|
|
4039
|
+
};
|
|
4040
|
+
|
|
4041
|
+
const sizeConfig$1 = {
|
|
4042
|
+
small: { width: spacing.spacing_4, height: spacing.spacing_4, fontSize: typography.fontSize.xs },
|
|
4043
|
+
medium: { width: spacing.spacing_5, height: spacing.spacing_5, fontSize: typography.fontSize.sm },
|
|
4044
|
+
};
|
|
4045
|
+
const StyledAvatar = styled(Avatar, {
|
|
4046
|
+
shouldForwardProp: prop => prop !== 'avatarSize' && prop !== 'colorIndex',
|
|
4047
|
+
})(({ theme, avatarSize, colorIndex }) => {
|
|
4048
|
+
const size = sizeConfig$1[avatarSize];
|
|
4049
|
+
const palette = avatarColorPalette[colorIndex];
|
|
4050
|
+
return {
|
|
4051
|
+
boxSizing: 'border-box',
|
|
4052
|
+
width: size.width,
|
|
4053
|
+
height: size.height,
|
|
4054
|
+
fontSize: theme.typography.pxToRem(size.fontSize),
|
|
4055
|
+
fontFamily: typography.fontFamily.body,
|
|
4056
|
+
fontWeight: typography.fontWeight.regular,
|
|
4057
|
+
lineHeight: 1,
|
|
4058
|
+
color: semanticColors.typography.body,
|
|
4059
|
+
backgroundColor: palette ? palette.bg : undefined,
|
|
4060
|
+
border: `1px solid ${semanticColors.border.primary}`,
|
|
4061
|
+
'&:focus-visible': {
|
|
4062
|
+
...focusRingStyles,
|
|
4063
|
+
borderColor: semanticColors.border.focus,
|
|
4064
|
+
},
|
|
4065
|
+
};
|
|
4066
|
+
});
|
|
4067
|
+
/**
|
|
4068
|
+
* NeoGeneralAvatar - Avatar with image or colored initials display
|
|
4069
|
+
*
|
|
4070
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=9600-185
|
|
4071
|
+
*/
|
|
4072
|
+
const NeoGeneralAvatar = ({ size = 'medium', colorIndex = 0, children, ...props }) => {
|
|
4073
|
+
return (jsx(StyledAvatar, { avatarSize: size, colorIndex: colorIndex, ...props, children: children }));
|
|
4074
|
+
};
|
|
4075
|
+
NeoGeneralAvatar.displayName = 'NeoGeneralAvatar';
|
|
4076
|
+
|
|
3944
4077
|
const customProps$1 = ['iconSize'];
|
|
3945
4078
|
const StyledIconWrapper = styled('div', {
|
|
3946
4079
|
shouldForwardProp: prop => !customProps$1.includes(prop),
|
|
@@ -4122,9 +4255,9 @@ const StyledInputBase = styled(InputBase, {
|
|
|
4122
4255
|
},
|
|
4123
4256
|
medium: {
|
|
4124
4257
|
height: spacing.spacing_5_1_2,
|
|
4125
|
-
padding: `${spacing.
|
|
4258
|
+
padding: `${spacing.spacing_1_1_4}px ${spacing.spacing_2}px ${spacing.spacing_1_1_4}px ${startAdornment ? 0 : spacing.spacing_2}px`,
|
|
4126
4259
|
fontSize: theme.typography.pxToRem(typography.fontSize.default),
|
|
4127
|
-
borderRadius:
|
|
4260
|
+
borderRadius: spacing.spacing_8,
|
|
4128
4261
|
},
|
|
4129
4262
|
};
|
|
4130
4263
|
const sizeStyles = sizeConfig[size];
|
|
@@ -4133,7 +4266,7 @@ const StyledInputBase = styled(InputBase, {
|
|
|
4133
4266
|
fontSize: sizeStyles.fontSize,
|
|
4134
4267
|
borderRadius: sizeStyles.borderRadius,
|
|
4135
4268
|
backgroundColor: semanticColors.input.background,
|
|
4136
|
-
border: `1px solid ${destructive ? semanticColors.status.error.
|
|
4269
|
+
border: `1px solid ${destructive ? semanticColors.status.error.default : semanticColors.border.primary}`,
|
|
4137
4270
|
transition: theme.transitions.create(['border-color', 'background-color'], {
|
|
4138
4271
|
duration: theme.transitions.duration.short,
|
|
4139
4272
|
}),
|
|
@@ -4147,19 +4280,21 @@ const StyledInputBase = styled(InputBase, {
|
|
|
4147
4280
|
// Hover state
|
|
4148
4281
|
'&:hover': {
|
|
4149
4282
|
backgroundColor: semanticColors.input.hoverBackground,
|
|
4150
|
-
borderColor: destructive
|
|
4283
|
+
borderColor: destructive
|
|
4284
|
+
? semanticColors.status.error.default
|
|
4285
|
+
: semanticColors.border.primary,
|
|
4151
4286
|
},
|
|
4152
4287
|
// Focused state
|
|
4153
4288
|
[`&.${inputBaseClasses.focused}`]: {
|
|
4154
4289
|
backgroundColor: semanticColors.input.background,
|
|
4155
4290
|
borderColor: destructive
|
|
4156
|
-
? semanticColors.status.error.
|
|
4291
|
+
? semanticColors.status.error.default
|
|
4157
4292
|
: semanticColors.buttons.primary.default,
|
|
4158
4293
|
},
|
|
4159
4294
|
// Disabled state
|
|
4160
4295
|
[`&.${inputBaseClasses.disabled}`]: {
|
|
4161
4296
|
backgroundColor: semanticColors.input.disabledBackground,
|
|
4162
|
-
borderColor: semanticColors.border.
|
|
4297
|
+
borderColor: semanticColors.border.primary,
|
|
4163
4298
|
color: semanticColors.icons.disabled,
|
|
4164
4299
|
[`& .${inputBaseClasses.input}`]: {
|
|
4165
4300
|
WebkitTextFillColor: semanticColors.icons.disabled,
|
|
@@ -4167,11 +4302,11 @@ const StyledInputBase = styled(InputBase, {
|
|
|
4167
4302
|
},
|
|
4168
4303
|
// Error state
|
|
4169
4304
|
[`&.${inputBaseClasses.error}`]: {
|
|
4170
|
-
borderColor: semanticColors.status.error.
|
|
4305
|
+
borderColor: semanticColors.status.error.default,
|
|
4171
4306
|
},
|
|
4172
4307
|
// Adornment styling
|
|
4173
4308
|
[`& .${inputAdornmentClasses.root}`]: {
|
|
4174
|
-
color: destructive ? semanticColors.status.error.
|
|
4309
|
+
color: destructive ? semanticColors.status.error.default : semanticColors.icons.placeholder,
|
|
4175
4310
|
},
|
|
4176
4311
|
};
|
|
4177
4312
|
});
|
|
@@ -4185,7 +4320,7 @@ const StyledFormHelperText = styled(FormHelperText, {
|
|
|
4185
4320
|
fontSize: theme.typography.pxToRem(typography.fontSize.sm),
|
|
4186
4321
|
color: semanticColors.typography.input.helper,
|
|
4187
4322
|
[`&.${formHelperTextClasses.error}`]: {
|
|
4188
|
-
color: semanticColors.status.error.
|
|
4323
|
+
color: semanticColors.status.error.default,
|
|
4189
4324
|
},
|
|
4190
4325
|
[`&.${formHelperTextClasses.disabled}`]: {
|
|
4191
4326
|
color: semanticColors.icons.disabled,
|
|
@@ -4485,7 +4620,7 @@ const StyledListItemButton = styled(ListItemButton)(({ theme }) => ({
|
|
|
4485
4620
|
transition: theme.transitions.create(['border', 'background-color']),
|
|
4486
4621
|
// Active (selected) state
|
|
4487
4622
|
[`&.${listItemButtonClasses.selected}`]: {
|
|
4488
|
-
border: `2px solid ${semanticColors.
|
|
4623
|
+
border: `2px solid ${semanticColors.buttons.primary.default}`,
|
|
4489
4624
|
backgroundColor: theme.palette.common.white,
|
|
4490
4625
|
'&:hover': {
|
|
4491
4626
|
backgroundColor: theme.palette.common.white,
|
|
@@ -4519,9 +4654,9 @@ const StyledListItemButton = styled(ListItemButton)(({ theme }) => ({
|
|
|
4519
4654
|
},
|
|
4520
4655
|
// Focus state
|
|
4521
4656
|
[`&.${listItemButtonClasses.focusVisible}`]: {
|
|
4522
|
-
outline: `2px solid ${semanticColors.
|
|
4657
|
+
outline: `2px solid ${semanticColors.buttons.primary.default}`,
|
|
4523
4658
|
outlineOffset: 2,
|
|
4524
|
-
border: `2px solid ${semanticColors.
|
|
4659
|
+
border: `2px solid ${semanticColors.buttons.primary.default}`,
|
|
4525
4660
|
backgroundColor: theme.palette.common.white,
|
|
4526
4661
|
[`& .${listItemIconClasses.root}`]: {
|
|
4527
4662
|
color: semanticColors.icons.default,
|
|
@@ -4580,7 +4715,7 @@ const StyledListItemButton = styled(ListItemButton)(({ theme }) => ({
|
|
|
4580
4715
|
* - showIcon → Conditional rendering of ListItemIcon child
|
|
4581
4716
|
*
|
|
4582
4717
|
* Design Tokens Used:
|
|
4583
|
-
* - semanticColors.
|
|
4718
|
+
* - semanticColors.buttons.primary.default (#2f42ff) - Active border
|
|
4584
4719
|
* - semanticColors.border.primary (#d1d5db) - Default/disabled border
|
|
4585
4720
|
* - semanticColors.icons.default (#1f2937) - Active icon color
|
|
4586
4721
|
* - semanticColors.icons.disabled (#d1d5db) - Deselected/disabled icon color
|
|
@@ -4613,17 +4748,17 @@ const StyledCard = styled(MuiCard, {
|
|
|
4613
4748
|
flexDirection: 'column',
|
|
4614
4749
|
gap: theme.spacing(2), // 16px
|
|
4615
4750
|
backgroundColor: semanticColors.surfaces.card,
|
|
4616
|
-
border: `1px solid ${selected ? semanticColors.
|
|
4751
|
+
border: `1px solid ${selected ? semanticColors.buttons.primary.default : semanticColors.border.primary}`,
|
|
4617
4752
|
borderRadius: borderRadius.xS,
|
|
4618
4753
|
boxShadow: selected ? activeShadow$1 : 'none',
|
|
4619
4754
|
transition: theme.transitions.create(['border-color', 'background-color', 'box-shadow']),
|
|
4620
4755
|
cursor: 'pointer',
|
|
4621
4756
|
'&:hover': {
|
|
4622
|
-
borderColor: semanticColors.
|
|
4757
|
+
borderColor: semanticColors.buttons.primary.default,
|
|
4623
4758
|
boxShadow: activeShadow$1,
|
|
4624
4759
|
},
|
|
4625
4760
|
'&:focus-visible': {
|
|
4626
|
-
borderColor: semanticColors.
|
|
4761
|
+
borderColor: semanticColors.buttons.primary.default,
|
|
4627
4762
|
...focusRingStyles,
|
|
4628
4763
|
},
|
|
4629
4764
|
...(disabled && {
|
|
@@ -4727,8 +4862,8 @@ const Description$1 = styled('p')(({ theme }) => ({
|
|
|
4727
4862
|
* Design Tokens Used:
|
|
4728
4863
|
* - semanticColors.surfaces.card (#FFFFFF) - Default card background
|
|
4729
4864
|
* - semanticColors.status.info.light (#f2f3ff) - Active/focused card background
|
|
4730
|
-
* - semanticColors.border.
|
|
4731
|
-
* - semanticColors.
|
|
4865
|
+
* - semanticColors.border.primary (#d1d5db) - Default border
|
|
4866
|
+
* - semanticColors.buttons.primary.default (#2f42ff) - Active/focused border
|
|
4732
4867
|
* - shadows.focusWhite1 - Inner white focus ring (2px spread)
|
|
4733
4868
|
* - shadows.focusBlue2 - Outer blue focus ring (4px spread)
|
|
4734
4869
|
* - colors.grey[800] (#1F2937) - Text color
|
|
@@ -4751,10 +4886,12 @@ const StyledLargeCard = styled(MuiCard, {
|
|
|
4751
4886
|
const isActive = cardState === 'active';
|
|
4752
4887
|
const isDisabled = cardState === 'disabled';
|
|
4753
4888
|
const isFocused = cardState === 'focused';
|
|
4754
|
-
const activeBorderColor = isLight
|
|
4889
|
+
const activeBorderColor = isLight
|
|
4890
|
+
? semanticColors.buttons.primary.default
|
|
4891
|
+
: colors.digitalGreen[300];
|
|
4755
4892
|
const defaultBorderColor = isLight
|
|
4756
|
-
? semanticColors.border.
|
|
4757
|
-
: `${semanticColors.border.
|
|
4893
|
+
? semanticColors.border.primary
|
|
4894
|
+
: `${semanticColors.border.primary}80`;
|
|
4758
4895
|
return {
|
|
4759
4896
|
width: 340,
|
|
4760
4897
|
height: 162,
|
|
@@ -4770,7 +4907,7 @@ const StyledLargeCard = styled(MuiCard, {
|
|
|
4770
4907
|
overflow: 'hidden',
|
|
4771
4908
|
...(isFocused && focusRingStyles),
|
|
4772
4909
|
'&:focus-visible': {
|
|
4773
|
-
borderColor: isLight ? semanticColors.
|
|
4910
|
+
borderColor: isLight ? semanticColors.buttons.primary.default : colors.digitalGreen[300],
|
|
4774
4911
|
...focusRingStyles,
|
|
4775
4912
|
},
|
|
4776
4913
|
...(isDisabled && {
|
|
@@ -4850,8 +4987,8 @@ const ButtonsRow = styled('div')({
|
|
|
4850
4987
|
* Design Tokens Used:
|
|
4851
4988
|
* - semanticColors.surfaces.card (#ffffff) - Light theme background
|
|
4852
4989
|
* - colors.grey[800] (#1f2937) - Dark theme background
|
|
4853
|
-
* - semanticColors.border.
|
|
4854
|
-
* - semanticColors.
|
|
4990
|
+
* - semanticColors.border.primary (#d1d5db) - Default border (50% opacity on dark)
|
|
4991
|
+
* - semanticColors.buttons.primary.default (#2f42ff) - Active/focused border (light theme)
|
|
4855
4992
|
* - colors.digitalGreen[300] (#88fe9b) - Active/focused border (dark theme)
|
|
4856
4993
|
* - borderRadius.xS (4px) - Corner radius
|
|
4857
4994
|
* - shadows.focusWhite1 + shadows.focusBlue2 - Focus ring
|
|
@@ -4863,67 +5000,13 @@ const NeoMarketplaceLargeCard = ({ state = 'default', cardTheme = 'light', showI
|
|
|
4863
5000
|
};
|
|
4864
5001
|
NeoMarketplaceLargeCard.displayName = 'NeoMarketplaceLargeCard';
|
|
4865
5002
|
|
|
4866
|
-
const StyledMenu = styled(Menu)(({ theme }) => ({
|
|
4867
|
-
[`& .${paperClasses.root}`]: {
|
|
4868
|
-
backgroundColor: semanticColors.surfaces.white,
|
|
4869
|
-
borderRadius: borderRadius.s,
|
|
4870
|
-
border: `1px solid ${semanticColors.border.primary}`,
|
|
4871
|
-
boxShadow: `${shadows.dropdown.x}px ${shadows.dropdown.y}px ${shadows.dropdown.blur}px ${shadows.dropdown.spread}px ${shadows.dropdown.shadow}`,
|
|
4872
|
-
minWidth: 200,
|
|
4873
|
-
marginTop: theme.spacing(1),
|
|
4874
|
-
paddingTop: theme.spacing(1),
|
|
4875
|
-
paddingBottom: theme.spacing(1),
|
|
4876
|
-
},
|
|
4877
|
-
[`& .${listClasses.root}`]: {
|
|
4878
|
-
padding: 0,
|
|
4879
|
-
},
|
|
4880
|
-
}));
|
|
4881
|
-
/**
|
|
4882
|
-
* NeoMenu - Dropdown menu component based on MUI Menu
|
|
4883
|
-
*
|
|
4884
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4159-8649
|
|
4885
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4305-41844 (Dropdown list pattern)
|
|
4886
|
-
*
|
|
4887
|
-
* Figma Props Mapping:
|
|
4888
|
-
* - Container shown in Figma is the Menu Paper component
|
|
4889
|
-
* - Menu items are styled separately via NeoMenuItem
|
|
4890
|
-
* - Any trigger component (Button, IconButton, etc.) can open the menu
|
|
4891
|
-
*
|
|
4892
|
-
* @example
|
|
4893
|
-
* ```tsx
|
|
4894
|
-
* const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
|
|
4895
|
-
* const open = Boolean(anchorEl);
|
|
4896
|
-
*
|
|
4897
|
-
* // Standard menu with icons and shortcuts
|
|
4898
|
-
* <Button onClick={(e) => setAnchorEl(e.currentTarget)}>Open Menu</Button>
|
|
4899
|
-
* <NeoMenu
|
|
4900
|
-
* open={open}
|
|
4901
|
-
* anchorEl={anchorEl}
|
|
4902
|
-
* onClose={() => setAnchorEl(null)}
|
|
4903
|
-
* >
|
|
4904
|
-
* <NeoMenuItem icon={<Icon />} shortcut="⌘+P">View profile</NeoMenuItem>
|
|
4905
|
-
* <NeoMenuItem>Settings</NeoMenuItem>
|
|
4906
|
-
* </NeoMenu>
|
|
4907
|
-
*
|
|
4908
|
-
* // Dropdown list with secondary text (user list pattern)
|
|
4909
|
-
* <NeoMenu open={open} anchorEl={anchorEl} onClose={() => setAnchorEl(null)}>
|
|
4910
|
-
* <NeoMenuItem secondaryText="@phoenix">Phoenix Baker</NeoMenuItem>
|
|
4911
|
-
* <NeoMenuItem secondaryText="@olivia" selected>Olivia Rhye</NeoMenuItem>
|
|
4912
|
-
* </NeoMenu>
|
|
4913
|
-
* ```
|
|
4914
|
-
*/
|
|
4915
|
-
const NeoMenu = ({ children, ...props }) => {
|
|
4916
|
-
return jsx(StyledMenu, { ...props, children: children });
|
|
4917
|
-
};
|
|
4918
|
-
NeoMenu.displayName = 'NeoMenu';
|
|
4919
|
-
|
|
4920
5003
|
// ============================================================================
|
|
4921
5004
|
// NeoModal - Main Dialog Container
|
|
4922
5005
|
// ============================================================================
|
|
4923
5006
|
const StyledDialog = styled(Dialog)({
|
|
4924
5007
|
[`& .${dialogClasses.paper}`]: {
|
|
4925
5008
|
borderRadius: borderRadius.card,
|
|
4926
|
-
border: `1px solid ${semanticColors.border.
|
|
5009
|
+
border: `1px solid ${semanticColors.border.primary}`,
|
|
4927
5010
|
boxShadow: 'none',
|
|
4928
5011
|
},
|
|
4929
5012
|
[`& .${dialogClasses.container}`]: {
|
|
@@ -5106,6 +5189,34 @@ const NeoModalFooter = ({ leadingContent, children }) => {
|
|
|
5106
5189
|
};
|
|
5107
5190
|
NeoModalFooter.displayName = 'NeoModalFooter';
|
|
5108
5191
|
|
|
5192
|
+
const NavigationAvatarContainer = styled('div')({
|
|
5193
|
+
display: 'flex',
|
|
5194
|
+
boxSizing: 'border-box',
|
|
5195
|
+
width: spacing.spacing_5_1_2,
|
|
5196
|
+
height: spacing.spacing_5_1_2,
|
|
5197
|
+
padding: spacing.spacing_3_4,
|
|
5198
|
+
justifyContent: 'center',
|
|
5199
|
+
alignItems: 'center',
|
|
5200
|
+
borderRadius: '50%',
|
|
5201
|
+
border: `1px solid ${semanticColors.border.primary}`,
|
|
5202
|
+
backgroundColor: semanticColors.buttons.secondary.defaultBackground,
|
|
5203
|
+
'&:focus-within': {
|
|
5204
|
+
borderColor: semanticColors.border.focus,
|
|
5205
|
+
},
|
|
5206
|
+
});
|
|
5207
|
+
/**
|
|
5208
|
+
* NeoNavigationAvatar - Compact avatar for navigation contexts
|
|
5209
|
+
*
|
|
5210
|
+
* Wraps NeoGeneralAvatar (size="small") in a 44px container with 6px padding,
|
|
5211
|
+
* providing a larger interactive area for navigation UI.
|
|
5212
|
+
*
|
|
5213
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=11325-102
|
|
5214
|
+
*/
|
|
5215
|
+
const NeoNavigationAvatar = ({ colorIndex = 0, children, ...props }) => {
|
|
5216
|
+
return (jsx(NavigationAvatarContainer, { children: jsx(NeoGeneralAvatar, { size: "small", colorIndex: colorIndex, ...props, children: children }) }));
|
|
5217
|
+
};
|
|
5218
|
+
NeoNavigationAvatar.displayName = 'NeoNavigationAvatar';
|
|
5219
|
+
|
|
5109
5220
|
const customProps = ['selected'];
|
|
5110
5221
|
const StyledRoot = styled(ButtonBase, {
|
|
5111
5222
|
shouldForwardProp: prop => !customProps.includes(prop),
|
|
@@ -5445,7 +5556,7 @@ const StyledLinearProgress$1 = styled(LinearProgress, {
|
|
|
5445
5556
|
// Cancelled variant uses warning color
|
|
5446
5557
|
'&[data-variant="cancelled"]': {
|
|
5447
5558
|
[`& .${linearProgressClasses.bar}`]: {
|
|
5448
|
-
backgroundColor: semanticColors.status.warning.
|
|
5559
|
+
backgroundColor: semanticColors.status.warning.default,
|
|
5449
5560
|
},
|
|
5450
5561
|
},
|
|
5451
5562
|
}));
|
|
@@ -5510,7 +5621,7 @@ const StyledTextField = styled(TextField)(({ theme }) => ({
|
|
|
5510
5621
|
fontSize: theme.typography.pxToRem(typography.fontSize.default),
|
|
5511
5622
|
borderRadius: borderRadius.input,
|
|
5512
5623
|
backgroundColor: semanticColors.input.background,
|
|
5513
|
-
border: `1px solid ${semanticColors.border.
|
|
5624
|
+
border: `1px solid ${semanticColors.border.primary}`,
|
|
5514
5625
|
paddingTop: spacing.spacing_1,
|
|
5515
5626
|
paddingBottom: spacing.spacing_1,
|
|
5516
5627
|
paddingLeft: spacing.spacing_1_1_2,
|
|
@@ -5605,7 +5716,7 @@ NeoQuickFilter.displayName = 'NeoQuickFilter';
|
|
|
5605
5716
|
const UncheckedIcon = ({ size }) => {
|
|
5606
5717
|
const dimensions = size === 'small' ? 16 : 20;
|
|
5607
5718
|
const radius = size === 'small' ? 8 : 10;
|
|
5608
|
-
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.
|
|
5719
|
+
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.primary, strokeWidth: "1", fill: "transparent" })] }));
|
|
5609
5720
|
};
|
|
5610
5721
|
const CheckedIcon = ({ size }) => {
|
|
5611
5722
|
const dimensions = size === 'small' ? 16 : 20;
|
|
@@ -5861,19 +5972,19 @@ const StyledAlert$1 = styled(Alert, {
|
|
|
5861
5972
|
const colorMap = {
|
|
5862
5973
|
success: {
|
|
5863
5974
|
light: semanticColors.status.success.light,
|
|
5864
|
-
medium: semanticColors.status.success.
|
|
5975
|
+
medium: semanticColors.status.success.default,
|
|
5865
5976
|
},
|
|
5866
5977
|
error: {
|
|
5867
5978
|
light: semanticColors.status.error.light,
|
|
5868
|
-
medium: semanticColors.status.error.
|
|
5979
|
+
medium: semanticColors.status.error.default,
|
|
5869
5980
|
},
|
|
5870
5981
|
neutral: {
|
|
5871
5982
|
light: semanticColors.status.neutral.light,
|
|
5872
|
-
medium: semanticColors.status.neutral.
|
|
5983
|
+
medium: semanticColors.status.neutral.default,
|
|
5873
5984
|
},
|
|
5874
5985
|
info: {
|
|
5875
5986
|
light: semanticColors.status.info.light,
|
|
5876
|
-
medium: semanticColors.status.info.
|
|
5987
|
+
medium: semanticColors.status.info.default,
|
|
5877
5988
|
},
|
|
5878
5989
|
};
|
|
5879
5990
|
const severityColors = colorMap[severity];
|
|
@@ -5944,10 +6055,10 @@ const StyledAlert$1 = styled(Alert, {
|
|
|
5944
6055
|
* - Mode (Light|Dark) → variant ('outlined'|'filled')
|
|
5945
6056
|
*
|
|
5946
6057
|
* Design Tokens Used:
|
|
5947
|
-
* - status.success.light, status.success.
|
|
5948
|
-
* - status.error.light, status.error.
|
|
5949
|
-
* - status.neutral.light, status.neutral.
|
|
5950
|
-
* - status.info.light, status.info.
|
|
6058
|
+
* - status.success.light, status.success.default
|
|
6059
|
+
* - status.error.light, status.error.default
|
|
6060
|
+
* - status.neutral.light, status.neutral.default
|
|
6061
|
+
* - status.info.light, status.info.default
|
|
5951
6062
|
* - typography.tooltip, typography.bodySecondary
|
|
5952
6063
|
* - grey[800]
|
|
5953
6064
|
* - fontSize.default, fontSize.sm
|
|
@@ -5984,7 +6095,7 @@ NeoStatusBanner.displayName = 'NeoStatusBanner';
|
|
|
5984
6095
|
const NeoTabs = styled(MuiTabs)(() => ({
|
|
5985
6096
|
minHeight: spacing.spacing_5,
|
|
5986
6097
|
[`& .${tabsClasses.indicator}`]: {
|
|
5987
|
-
backgroundColor: semanticColors.
|
|
6098
|
+
backgroundColor: semanticColors.buttons.primary.default,
|
|
5988
6099
|
height: 2,
|
|
5989
6100
|
},
|
|
5990
6101
|
[`& .${tabsClasses.flexContainer}`]: {
|
|
@@ -6006,7 +6117,7 @@ const StyledTab = styled(MuiTab)(({ theme }) => ({
|
|
|
6006
6117
|
fontWeight: typography.fontWeight.semiBold,
|
|
6007
6118
|
},
|
|
6008
6119
|
[`&.${buttonBaseClasses.focusVisible}`]: {
|
|
6009
|
-
outline: `2px solid ${semanticColors.
|
|
6120
|
+
outline: `2px solid ${semanticColors.border.focus}`,
|
|
6010
6121
|
outlineOffset: -2,
|
|
6011
6122
|
},
|
|
6012
6123
|
[`&.${tabClasses.disabled}`]: {
|
|
@@ -6086,17 +6197,17 @@ const StyledAlert = styled(Alert, {
|
|
|
6086
6197
|
error: {
|
|
6087
6198
|
backgroundColor: semanticColors.status.error.light,
|
|
6088
6199
|
color: semanticColors.status.error.dark,
|
|
6089
|
-
border: `1px solid ${semanticColors.status.error.
|
|
6200
|
+
border: `1px solid ${semanticColors.status.error.default}`,
|
|
6090
6201
|
},
|
|
6091
6202
|
success: {
|
|
6092
6203
|
backgroundColor: semanticColors.status.success.light,
|
|
6093
6204
|
color: semanticColors.status.success.dark,
|
|
6094
|
-
border: `1px solid ${semanticColors.status.success.
|
|
6205
|
+
border: `1px solid ${semanticColors.status.success.default}`,
|
|
6095
6206
|
},
|
|
6096
6207
|
info: {
|
|
6097
6208
|
backgroundColor: semanticColors.status.info.light,
|
|
6098
6209
|
color: semanticColors.status.info.dark,
|
|
6099
|
-
border: `1px solid ${semanticColors.status.info.
|
|
6210
|
+
border: `1px solid ${semanticColors.status.info.default}`,
|
|
6100
6211
|
},
|
|
6101
6212
|
download: {
|
|
6102
6213
|
backgroundColor: semanticColors.surfaces.snackbarDarkMode,
|
|
@@ -6324,7 +6435,7 @@ const StyledSwitch = styled(Switch, {
|
|
|
6324
6435
|
// Focus visible for keyboard navigation
|
|
6325
6436
|
'&.Mui-focusVisible': {
|
|
6326
6437
|
[`& + .${switchClasses.track}`]: {
|
|
6327
|
-
outline: `2px solid ${semanticColors.
|
|
6438
|
+
outline: `2px solid ${semanticColors.border.focus}`,
|
|
6328
6439
|
outlineOffset: 2,
|
|
6329
6440
|
},
|
|
6330
6441
|
},
|
|
@@ -6665,7 +6776,7 @@ const StyledTreeView = styled(RichTreeViewPro)({
|
|
|
6665
6776
|
backgroundColor: semanticColors.surfaces.listHover,
|
|
6666
6777
|
},
|
|
6667
6778
|
[`& .${treeItemClasses.content}.Mui-focused`]: {
|
|
6668
|
-
boxShadow: `inset 0 0 0 2px ${semanticColors.
|
|
6779
|
+
boxShadow: `inset 0 0 0 2px ${semanticColors.border.focus}`,
|
|
6669
6780
|
backgroundColor: 'transparent',
|
|
6670
6781
|
},
|
|
6671
6782
|
[`& .${treeItemClasses.content}.Mui-selected`]: {
|
|
@@ -6676,7 +6787,7 @@ const StyledTreeView = styled(RichTreeViewPro)({
|
|
|
6676
6787
|
},
|
|
6677
6788
|
[`& .${treeItemClasses.content}.Mui-selected.Mui-focused`]: {
|
|
6678
6789
|
backgroundColor: semanticColors.surfaces.listHover,
|
|
6679
|
-
boxShadow: `inset 0 0 0 2px ${semanticColors.
|
|
6790
|
+
boxShadow: `inset 0 0 0 2px ${semanticColors.border.focus}`,
|
|
6680
6791
|
},
|
|
6681
6792
|
[`& .${treeItemClasses.label}`]: {
|
|
6682
6793
|
fontSize: typography.fontSize.xs,
|
|
@@ -6701,7 +6812,7 @@ const StyledTreeView = styled(RichTreeViewPro)({
|
|
|
6701
6812
|
|
|
6702
6813
|
// Figma-exact border radius for toggle buttons — no matching design token
|
|
6703
6814
|
const TOGGLE_BUTTON_BORDER_RADIUS = 14;
|
|
6704
|
-
const StyledToggleButtonGroup = styled(
|
|
6815
|
+
const StyledToggleButtonGroup = styled(MuiToggleButtonGroup)(({ theme }) => ({
|
|
6705
6816
|
backgroundColor: colors.grey[50],
|
|
6706
6817
|
padding: theme.spacing(0.625, 0.875),
|
|
6707
6818
|
borderRadius: borderRadius.full,
|
|
@@ -6719,7 +6830,7 @@ const StyledToggleButtonGroup = styled(ToggleButtonGroup)(({ theme }) => ({
|
|
|
6719
6830
|
},
|
|
6720
6831
|
},
|
|
6721
6832
|
}));
|
|
6722
|
-
const StyledToggleButton = styled(
|
|
6833
|
+
const StyledToggleButton = styled(MuiToggleButton)(({ theme }) => ({
|
|
6723
6834
|
padding: theme.spacing(0.625),
|
|
6724
6835
|
minWidth: 'auto',
|
|
6725
6836
|
color: semanticColors.icons.default,
|
|
@@ -6768,5 +6879,5 @@ NeoTypologyControl.displayName = 'NeoTypologyControl';
|
|
|
6768
6879
|
|
|
6769
6880
|
const version = '0.0.0-development';
|
|
6770
6881
|
|
|
6771
|
-
export { ActivityScene, CIRCLE_RADIUS, NeoActivityHeader, NeoActivityIndicatorCell, NeoAvatar, NeoBadge, NeoBanner, NeoBreadcrumbLink, NeoBreadcrumbs, NeoButton,
|
|
6882
|
+
export { ActivityScene, CIRCLE_RADIUS, NeoActivityHeader, NeoActivityIndicatorCell, NeoAvatar, NeoBadge, NeoBanner, NeoBreadcrumbLink, NeoBreadcrumbs, NeoButton, NeoButtonTab, NeoButtonTabGroup, NeoCheckbox, NeoCodeSnippet, NeoDataGrid, NeoDataGridCellContent, NeoDataGridColumnsButton, NeoDataGridColumnsPanel, NeoDataGridFilterPanel, NeoDataGridFilterPanelAddIcon, NeoDataGridFilterPanelDeleteIcon, NeoDataGridFilterPanelRemoveAllIcon, NeoDataGridFiltersButton, NeoDataGridHeaderLabel, NeoDropdown as NeoDataGridSelect, NeoDatePicker, NeoDivider, NeoDot, NeoDropdown, NeoDropdownMenu, NeoDropdownMenuItem, NeoDropdownMenuItem as NeoDropdownOption, NeoFilterChip, NeoFooter, NeoGeneralAvatar, NeoIconButton, NeoIconWrapper, NeoInfiniteScrollGrid, NeoInputField, NeoListItem, NeoListItemButton, NeoLoadingSpinner, NeoMarketplaceCard, NeoMarketplaceLargeCard, NeoDropdownMenu as NeoMenu, NeoDropdownMenuItem as NeoMenuItem, NeoModal, NeoModalContent, NeoModalFooter, NeoModalHeader, NeoMultiBadgesCell, NeoNavigationAvatar, NeoNavigationItem, NeoPageContent, NeoPaginatedGrid, NeoProgressbar, NeoQuickFilter, NeoRadio, NeoSearchChip, NeoDropdown as NeoSelect, NeoDropdownMenuItem as NeoSelectOption, NeoSkeleton, NeoStatusBadgeCell, NeoStatusBanner, NeoTab, NeoTabs, NeoTag, NeoToast, NeoToastButton, NeoToggle, NeoToolbar, NeoTooltip, NeoTreeItem, NeoTreeView, StyledToggleButton as NeoTypologyButton, NeoTypologyControl, NeoUserAvatarCell, SortedAscendingIcon, SortedDescendingIcon, UnsortedIcon, getDataGridHeaderStyles, neoRowHeights, version };
|
|
6772
6883
|
//# sourceMappingURL=index.esm.js.map
|