@moderneinc/neo-styled-components 5.0.0-next.bd2a49 → 5.0.0-next.d2d555
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/Alert/Alert.d.ts +9 -1
- package/dist/Badge/Badge.d.ts +16 -2
- package/dist/DataGrid/DataGrid.d.ts +1 -1
- package/dist/DataGrid/DataGrid.styles.d.ts +3 -0
- package/dist/DataGridCell/DataGridCell.d.ts +0 -16
- package/dist/DataGridHeaderCell/DataGridHeaderCell.d.ts +0 -37
- package/dist/DatePickerListItem/DatePickerListItem.d.ts +2 -22
- package/dist/DatePickerMenu/DatePickerMenu.d.ts +2 -22
- package/dist/InputField/InputField.d.ts +12 -1
- package/dist/ListItemButton/ListItemButton.d.ts +12 -1
- package/dist/MenuItem/MenuItem.d.ts +1 -1
- package/dist/NavigationAvatar/NavigationAvatar.d.ts +2 -2
- package/dist/NavigationItem/NavigationItem.d.ts +14 -2
- package/dist/NeoActionsCell/NeoActionsCell.d.ts +9 -0
- package/dist/NeoAvatarCell/NeoAvatarCell.d.ts +27 -0
- package/dist/NeoIconCell/NeoIconCell.d.ts +14 -0
- package/dist/NeoLogoCell/NeoLogoCell.d.ts +24 -0
- package/dist/NeoProgressCell/NeoProgressCell.d.ts +21 -0
- package/dist/NeoStatusCell/NeoStatusCell.d.ts +30 -0
- package/dist/PageContent/PageContent.d.ts +12 -1
- package/dist/RadioButtonWithText/RadioButtonWithText.d.ts +2 -22
- package/dist/SelectField/SelectField.d.ts +64 -0
- package/dist/SideNav/SideNav.d.ts +2 -22
- package/dist/TabPanel/TabPanel.d.ts +47 -0
- package/dist/Table/Table.d.ts +64 -0
- package/dist/Tag/Tag.d.ts +1 -2
- package/dist/ToggleButton/ToggleButton.d.ts +13 -18
- package/dist/ToggleButtonGroup/ToggleButtonGroup.d.ts +26 -0
- package/dist/ToggleButtonWithText/ToggleButtonWithText.d.ts +2 -22
- package/dist/TopNav/TopNav.d.ts +2 -22
- package/dist/TourModal/TourModal.d.ts +2 -22
- package/dist/index.d.ts +499 -94
- package/dist/index.esm.js +800 -335
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +816 -332
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -57,6 +57,12 @@ var Fab = require('@mui/material/Fab');
|
|
|
57
57
|
var Fade = require('@mui/material/Fade');
|
|
58
58
|
var Radio = require('@mui/material/Radio');
|
|
59
59
|
var Skeleton = require('@mui/material/Skeleton');
|
|
60
|
+
var MuiTable = require('@mui/material/Table');
|
|
61
|
+
var TableBody = require('@mui/material/TableBody');
|
|
62
|
+
var TableCell = require('@mui/material/TableCell');
|
|
63
|
+
var TableContainer = require('@mui/material/TableContainer');
|
|
64
|
+
var TableHead = require('@mui/material/TableHead');
|
|
65
|
+
var TableRow = require('@mui/material/TableRow');
|
|
60
66
|
var MuiTab = require('@mui/material/Tab');
|
|
61
67
|
var MuiTabs = require('@mui/material/Tabs');
|
|
62
68
|
var Switch = require('@mui/material/Switch');
|
|
@@ -64,8 +70,37 @@ var hooks = require('@mui/x-tree-view/hooks');
|
|
|
64
70
|
var TreeItem = require('@mui/x-tree-view/TreeItem');
|
|
65
71
|
var RichTreeViewPro = require('@mui/x-tree-view-pro/RichTreeViewPro');
|
|
66
72
|
|
|
67
|
-
const
|
|
68
|
-
|
|
73
|
+
const STATUS_COLOR_CLASSES = [
|
|
74
|
+
[Chip.chipClasses.colorDefault, neoDesign.semanticColors.status.neutral],
|
|
75
|
+
[Chip.chipClasses.colorError, neoDesign.semanticColors.status.error],
|
|
76
|
+
[Chip.chipClasses.colorWarning, neoDesign.semanticColors.status.warning],
|
|
77
|
+
[Chip.chipClasses.colorSuccess, neoDesign.semanticColors.status.success],
|
|
78
|
+
[Chip.chipClasses.colorInfo, neoDesign.semanticColors.status.info],
|
|
79
|
+
];
|
|
80
|
+
const outlinedColorOverrides = {
|
|
81
|
+
backgroundColor: 'transparent',
|
|
82
|
+
color: neoDesign.semanticColors.typography.bodySecondary,
|
|
83
|
+
border: `1px solid ${neoDesign.semanticColors.border.secondary}`,
|
|
84
|
+
[`& .${Chip.chipClasses.icon}, & .${Chip.chipClasses.deleteIcon}`]: {
|
|
85
|
+
color: neoDesign.semanticColors.typography.bodySecondary,
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
const filledColorRules = Object.fromEntries(STATUS_COLOR_CLASSES.map(([className, palette]) => [
|
|
89
|
+
`&.${className}`,
|
|
90
|
+
{
|
|
91
|
+
backgroundColor: palette.light,
|
|
92
|
+
color: palette.dark,
|
|
93
|
+
border: `1px solid ${palette.transparent}`,
|
|
94
|
+
[`& .${Chip.chipClasses.icon}, & .${Chip.chipClasses.deleteIcon}`]: {
|
|
95
|
+
color: palette.dark,
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
]));
|
|
99
|
+
const outlinedColorRules = Object.fromEntries(STATUS_COLOR_CLASSES.map(([className]) => [`&.${className}`, outlinedColorOverrides]));
|
|
100
|
+
const StyledChip$3 = styles.styled(Chip, {
|
|
101
|
+
shouldForwardProp: prop => prop !== 'badgeSize' && prop !== 'badgeVariant',
|
|
102
|
+
})(({ theme, badgeSize, badgeVariant }) => ({
|
|
103
|
+
height: badgeSize === 'small' ? 20 : 24,
|
|
69
104
|
paddingTop: neoDesign.spacing.spacing_1_4,
|
|
70
105
|
paddingBottom: neoDesign.spacing.spacing_1_4,
|
|
71
106
|
paddingLeft: neoDesign.spacing.spacing_1,
|
|
@@ -93,51 +128,7 @@ const StyledChip$2 = styles.styled(Chip)(({ theme }) => ({
|
|
|
93
128
|
width: 12,
|
|
94
129
|
height: 12,
|
|
95
130
|
},
|
|
96
|
-
|
|
97
|
-
[`&.${Chip.chipClasses.colorDefault}`]: {
|
|
98
|
-
backgroundColor: neoDesign.semanticColors.status.neutral.light,
|
|
99
|
-
color: neoDesign.semanticColors.status.neutral.dark,
|
|
100
|
-
border: `1px solid ${neoDesign.semanticColors.status.neutral.default}80`,
|
|
101
|
-
[`& .${Chip.chipClasses.icon}, & .${Chip.chipClasses.deleteIcon}`]: {
|
|
102
|
-
color: neoDesign.semanticColors.status.neutral.dark,
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
// Error state
|
|
106
|
-
[`&.${Chip.chipClasses.colorError}`]: {
|
|
107
|
-
backgroundColor: neoDesign.semanticColors.status.error.light,
|
|
108
|
-
color: neoDesign.semanticColors.status.error.dark,
|
|
109
|
-
border: `1px solid ${neoDesign.semanticColors.status.error.default}80`,
|
|
110
|
-
[`& .${Chip.chipClasses.icon}, & .${Chip.chipClasses.deleteIcon}`]: {
|
|
111
|
-
color: neoDesign.semanticColors.status.error.dark,
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
// Warning state
|
|
115
|
-
[`&.${Chip.chipClasses.colorWarning}`]: {
|
|
116
|
-
backgroundColor: neoDesign.semanticColors.status.warning.light,
|
|
117
|
-
color: neoDesign.semanticColors.status.warning.dark,
|
|
118
|
-
border: `1px solid ${neoDesign.semanticColors.status.warning.default}80`,
|
|
119
|
-
[`& .${Chip.chipClasses.icon}, & .${Chip.chipClasses.deleteIcon}`]: {
|
|
120
|
-
color: neoDesign.semanticColors.status.warning.dark,
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
// Success state
|
|
124
|
-
[`&.${Chip.chipClasses.colorSuccess}`]: {
|
|
125
|
-
backgroundColor: neoDesign.semanticColors.status.success.light,
|
|
126
|
-
color: neoDesign.semanticColors.status.success.dark,
|
|
127
|
-
border: `1px solid ${neoDesign.semanticColors.status.success.default}80`,
|
|
128
|
-
[`& .${Chip.chipClasses.icon}, & .${Chip.chipClasses.deleteIcon}`]: {
|
|
129
|
-
color: neoDesign.semanticColors.status.success.dark,
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
// Info state
|
|
133
|
-
[`&.${Chip.chipClasses.colorInfo}`]: {
|
|
134
|
-
backgroundColor: neoDesign.semanticColors.status.info.light,
|
|
135
|
-
color: neoDesign.semanticColors.status.info.dark,
|
|
136
|
-
border: `1px solid ${neoDesign.semanticColors.status.info.default}80`,
|
|
137
|
-
[`& .${Chip.chipClasses.icon}, & .${Chip.chipClasses.deleteIcon}`]: {
|
|
138
|
-
color: neoDesign.semanticColors.status.info.dark,
|
|
139
|
-
},
|
|
140
|
-
},
|
|
131
|
+
...(badgeVariant === 'outlined' ? outlinedColorRules : filledColorRules),
|
|
141
132
|
}));
|
|
142
133
|
/**
|
|
143
134
|
* NeoBadge - Status badge component based on MUI Chip
|
|
@@ -150,8 +141,8 @@ const StyledChip$2 = styles.styled(Chip)(({ theme }) => ({
|
|
|
150
141
|
* - TrailingIcon → deleteIcon prop (pass React element)
|
|
151
142
|
* - Label → label prop
|
|
152
143
|
*/
|
|
153
|
-
const NeoBadge = (props) => {
|
|
154
|
-
return jsxRuntime.jsx(StyledChip$
|
|
144
|
+
const NeoBadge = ({ size = 'medium', variant = 'filled', ...props }) => {
|
|
145
|
+
return jsxRuntime.jsx(StyledChip$3, { ...props, badgeSize: size, badgeVariant: variant });
|
|
155
146
|
};
|
|
156
147
|
NeoBadge.displayName = 'NeoBadge';
|
|
157
148
|
|
|
@@ -269,22 +260,6 @@ const NeoDataGridCellContent = ({ children, ...props }) => {
|
|
|
269
260
|
return jsxRuntime.jsx(CellContentContainer, { ...props, children: children });
|
|
270
261
|
};
|
|
271
262
|
NeoDataGridCellContent.displayName = 'NeoDataGridCellContent';
|
|
272
|
-
/**
|
|
273
|
-
* Utility function to get DataGrid sx styles for consistent cell appearance
|
|
274
|
-
*
|
|
275
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4212-41631
|
|
276
|
-
*
|
|
277
|
-
* Apply this to DataGrid's `sx` prop to ensure cells are properly aligned and styled.
|
|
278
|
-
*
|
|
279
|
-
* @param size - Row size variant (affects row height)
|
|
280
|
-
* @returns SxProps for DataGrid
|
|
281
|
-
*
|
|
282
|
-
* @example
|
|
283
|
-
* <DataGrid
|
|
284
|
-
* rows={rows}
|
|
285
|
-
* columns={columns}
|
|
286
|
-
* />
|
|
287
|
-
*/
|
|
288
263
|
/**
|
|
289
264
|
* Row height configuration for DataGrid size variants (from Figma specs)
|
|
290
265
|
* - compact: 42px
|
|
@@ -939,14 +914,17 @@ const intentColors$2 = {
|
|
|
939
914
|
};
|
|
940
915
|
// biome-ignore lint/suspicious/noExplicitAny: Type cast required to override MUI Alert variant type without global augmentation
|
|
941
916
|
const StyledAlert$2 = styles.styled(Alert, {
|
|
942
|
-
shouldForwardProp: prop => prop !== 'intent' && prop !== 'alertType',
|
|
943
|
-
})(({ theme, intent = 'success', alertType = 'outlined' }) => {
|
|
917
|
+
shouldForwardProp: prop => prop !== 'intent' && prop !== 'alertType' && prop !== 'alertSize',
|
|
918
|
+
})(({ theme, intent = 'success', alertType = 'outlined', alertSize = 'default' }) => {
|
|
944
919
|
const palette = intentColors$2[intent];
|
|
945
920
|
const isFilled = alertType === 'filled';
|
|
921
|
+
const isCompact = alertSize === 'compact';
|
|
946
922
|
const iconColor = isFilled ? neoDesign.semanticColors.typography.tooltip : palette.default;
|
|
947
|
-
const messageColor = isFilled
|
|
923
|
+
const messageColor = isFilled
|
|
924
|
+
? neoDesign.semanticColors.typography.tooltip
|
|
925
|
+
: neoDesign.semanticColors.typography.body;
|
|
948
926
|
return {
|
|
949
|
-
height: neoDesign.spacing.spacing_8,
|
|
927
|
+
...(isCompact ? { minHeight: neoDesign.spacing.spacing_5 } : { height: neoDesign.spacing.spacing_8 }),
|
|
950
928
|
width: '100%',
|
|
951
929
|
borderRadius: neoDesign.borderRadius.xS,
|
|
952
930
|
alignItems: 'center',
|
|
@@ -1009,9 +987,9 @@ const iconMap = {
|
|
|
1009
987
|
* - Show supporting text → description prop presence
|
|
1010
988
|
* - Show Button → action prop presence
|
|
1011
989
|
*/
|
|
1012
|
-
const NeoAlert = ({ intent = 'success', type = 'outlined', title, description, icon, action, ...props }) => {
|
|
990
|
+
const NeoAlert = ({ intent = 'success', type = 'outlined', size = 'default', title, description, icon, action, ...props }) => {
|
|
1013
991
|
const defaultIcon = iconMap[intent];
|
|
1014
|
-
return (jsxRuntime.jsxs(StyledAlert$2, { ...props, intent: intent, alertType: type, icon: icon ?? defaultIcon, action: action, children: [jsxRuntime.jsx("span", { children: title }), description && jsxRuntime.jsx("span", { children: description })] }));
|
|
992
|
+
return (jsxRuntime.jsxs(StyledAlert$2, { ...props, intent: intent, alertType: type, alertSize: size, icon: icon ?? defaultIcon, action: action, children: [jsxRuntime.jsx("span", { children: title }), description && jsxRuntime.jsx("span", { children: description })] }));
|
|
1015
993
|
};
|
|
1016
994
|
NeoAlert.displayName = 'NeoAlert';
|
|
1017
995
|
|
|
@@ -2185,7 +2163,7 @@ const StyledMenuItem = styles.styled(MenuItem)(({ theme }) => ({
|
|
|
2185
2163
|
gap: theme.spacing(2),
|
|
2186
2164
|
borderRadius: 0,
|
|
2187
2165
|
color: neoDesign.semanticColors.icons.default,
|
|
2188
|
-
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.
|
|
2166
|
+
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.default),
|
|
2189
2167
|
fontWeight: neoDesign.typography.fontWeight.regular,
|
|
2190
2168
|
lineHeight: `${neoDesign.typography.lineHeight.s}px`,
|
|
2191
2169
|
transition: theme.transitions.create(['background-color'], {
|
|
@@ -2251,7 +2229,7 @@ const Shortcut = styles.styled('span')(({ theme }) => ({
|
|
|
2251
2229
|
/**
|
|
2252
2230
|
* NeoMenuItem - Menu item component based on MUI MenuItem
|
|
2253
2231
|
*
|
|
2254
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4159-
|
|
2232
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025-26?node-id=4159-8714
|
|
2255
2233
|
*
|
|
2256
2234
|
* @example
|
|
2257
2235
|
* ```tsx
|
|
@@ -2546,56 +2524,24 @@ function SortedAscendingIcon() {
|
|
|
2546
2524
|
function UnsortedIcon() {
|
|
2547
2525
|
return jsxRuntime.jsx(ChevronsUpDown, { size: 16, color: neoDesign.semanticColors.icons.utility });
|
|
2548
2526
|
}
|
|
2549
|
-
|
|
2550
|
-
* Utility function to get DataGrid sx styles for header cells
|
|
2551
|
-
*
|
|
2552
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4212-41618
|
|
2553
|
-
*
|
|
2554
|
-
* Figma prop mappings:
|
|
2555
|
-
* - `size` → `size`: Figma "condensed" → MUI 'compact', Figma "default" → MUI 'standard', Figma "relaxed" → MUI 'comfortable'
|
|
2556
|
-
*
|
|
2557
|
-
* Design tokens used:
|
|
2558
|
-
* - Background: colors.grey[50] (#f9fafb)
|
|
2559
|
-
* - Border: semanticColors.border.primary
|
|
2560
|
-
* - Padding: 12px vertical, 24px horizontal
|
|
2561
|
-
* - Gap: 12px
|
|
2562
|
-
*
|
|
2563
|
-
*
|
|
2564
|
-
* @param size - Header row size variant (affects header cell height)
|
|
2565
|
-
* @returns SxProps for DataGrid header cells
|
|
2566
|
-
*
|
|
2567
|
-
* @example
|
|
2568
|
-
* import { getDataGridHeaderStyles, SortedDescendingIcon, SortedAscendingIcon, UnsortedIcon } from './DataGridHeaderCell'
|
|
2569
|
-
*
|
|
2570
|
-
* <DataGrid
|
|
2571
|
-
* columnHeaderHeight={38} // for compact (Figma: condensed)
|
|
2572
|
-
* sx={{
|
|
2573
|
-
* ...getDataGridHeaderStyles(),
|
|
2574
|
-
* }}
|
|
2575
|
-
* slots={{
|
|
2576
|
-
* columnSortedDescendingIcon: SortedDescendingIcon,
|
|
2577
|
-
* columnSortedAscendingIcon: SortedAscendingIcon,
|
|
2578
|
-
* columnUnsortedIcon: UnsortedIcon,
|
|
2579
|
-
* }}
|
|
2580
|
-
* rows={rows}
|
|
2581
|
-
* columns={columns}
|
|
2582
|
-
* />
|
|
2583
|
-
*/
|
|
2527
|
+
|
|
2584
2528
|
const getDataGridHeaderStyles = () => {
|
|
2585
2529
|
return {
|
|
2586
2530
|
// Header cell container styles - from Figma: bg, border, padding
|
|
2587
2531
|
// Height is set via density-specific selectors in DataGrid.tsx
|
|
2588
2532
|
[`& .${xDataGrid.gridClasses.columnHeader}`]: {
|
|
2589
|
-
backgroundColor: neoDesign.
|
|
2533
|
+
backgroundColor: neoDesign.semanticColors.surfaces.dataGrid.header,
|
|
2590
2534
|
borderBottom: `1px solid ${neoDesign.semanticColors.border.primary}`,
|
|
2591
|
-
|
|
2592
|
-
|
|
2535
|
+
paddingTop: `${neoDesign.spacing.spacing_1_1_2}px`,
|
|
2536
|
+
paddingBottom: `${neoDesign.spacing.spacing_1_1_2}px`,
|
|
2537
|
+
paddingLeft: `${neoDesign.spacing.spacing_2}px`,
|
|
2538
|
+
paddingRight: `${neoDesign.spacing.spacing_2}px`,
|
|
2593
2539
|
boxSizing: 'border-box',
|
|
2594
2540
|
},
|
|
2595
2541
|
// Style the filler element to match header
|
|
2596
2542
|
// Height is set via density-specific selectors in DataGrid.tsx
|
|
2597
2543
|
[`& .${xDataGrid.gridClasses.filler}`]: {
|
|
2598
|
-
backgroundColor: neoDesign.
|
|
2544
|
+
backgroundColor: neoDesign.semanticColors.surfaces.dataGrid.header,
|
|
2599
2545
|
borderBottom: `1px solid ${neoDesign.semanticColors.border.primary}`,
|
|
2600
2546
|
boxSizing: 'border-box',
|
|
2601
2547
|
},
|
|
@@ -2645,6 +2591,20 @@ const getDataGridHeaderStyles = () => {
|
|
|
2645
2591
|
},
|
|
2646
2592
|
};
|
|
2647
2593
|
};
|
|
2594
|
+
const getDataGridRowStyles = () => ({
|
|
2595
|
+
[`& .${xDataGrid.gridClasses.row}`]: {
|
|
2596
|
+
backgroundColor: neoDesign.semanticColors.surfaces.dataGrid.default,
|
|
2597
|
+
},
|
|
2598
|
+
[`& .${xDataGrid.gridClasses.row}:hover`]: {
|
|
2599
|
+
backgroundColor: neoDesign.semanticColors.surfaces.dataGrid.hover,
|
|
2600
|
+
},
|
|
2601
|
+
[`& .${xDataGrid.gridClasses.row}.Mui-selected`]: {
|
|
2602
|
+
backgroundColor: neoDesign.semanticColors.surfaces.dataGrid.selected,
|
|
2603
|
+
},
|
|
2604
|
+
[`& .${xDataGrid.gridClasses.row}.Mui-selected:hover`]: {
|
|
2605
|
+
backgroundColor: neoDesign.semanticColors.surfaces.dataGrid.selectedHover,
|
|
2606
|
+
},
|
|
2607
|
+
});
|
|
2648
2608
|
|
|
2649
2609
|
/**
|
|
2650
2610
|
* Adapter to use NeoCheckbox in DataGrid's baseCheckbox slot
|
|
@@ -2679,7 +2639,7 @@ const DataGridCheckbox = ({ slotProps, ...props }) => (jsxRuntime.jsx(NeoCheckbo
|
|
|
2679
2639
|
* - `size` → Row heights (compact: 42px, standard: 48px, comfortable: 56px) and header heights (compact: 38px, standard: 44px, comfortable: 52px)
|
|
2680
2640
|
*
|
|
2681
2641
|
* Design tokens used:
|
|
2682
|
-
* - Colors: semanticColors.border.primary, semanticColors.
|
|
2642
|
+
* - Colors: semanticColors.border.primary, semanticColors.surfaces.dataGrid.*
|
|
2683
2643
|
* - Typography: typography.fontFamily.body, typography.fontSize.sm
|
|
2684
2644
|
* - Spacing: spacing.spacing_*
|
|
2685
2645
|
*
|
|
@@ -2723,13 +2683,14 @@ function NeoDataGrid({ autoHeight = false, toolbar, slots, sx, density = 'standa
|
|
|
2723
2683
|
// See: https://github.com/mui/mui-x/issues/20107
|
|
2724
2684
|
// This must be set to prevent scroll shadow artifacts
|
|
2725
2685
|
[`& .${xDataGrid.gridClasses.main}`]: {
|
|
2726
|
-
backgroundColor: neoDesign.semanticColors.surfaces.
|
|
2686
|
+
backgroundColor: neoDesign.semanticColors.surfaces.dataGrid.background,
|
|
2727
2687
|
},
|
|
2728
2688
|
// White background for empty/loading overlays
|
|
2729
2689
|
[`& .${xDataGrid.gridClasses.overlay}`]: {
|
|
2730
|
-
backgroundColor: neoDesign.semanticColors.surfaces.
|
|
2690
|
+
backgroundColor: neoDesign.semanticColors.surfaces.dataGrid.background,
|
|
2731
2691
|
},
|
|
2732
2692
|
...getDataGridHeaderStyles(),
|
|
2693
|
+
...getDataGridRowStyles(),
|
|
2733
2694
|
border: `1px solid ${neoDesign.semanticColors.border.secondary}`,
|
|
2734
2695
|
// Style row selection checkboxes to match header (16px, proper spacing)
|
|
2735
2696
|
[`& .${xDataGrid.gridClasses.cellCheckbox}`]: {
|
|
@@ -2784,7 +2745,7 @@ function NeoDataGridColumnsButton() {
|
|
|
2784
2745
|
}
|
|
2785
2746
|
NeoDataGridColumnsButton.displayName = 'NeoDataGridColumnsButton';
|
|
2786
2747
|
|
|
2787
|
-
const sizeStyles = {
|
|
2748
|
+
const sizeStyles$1 = {
|
|
2788
2749
|
small: {
|
|
2789
2750
|
height: 16,
|
|
2790
2751
|
minWidth: 16,
|
|
@@ -2850,14 +2811,14 @@ const filledColorStyles = {
|
|
|
2850
2811
|
violet: neoDesign.colors.violet[500],
|
|
2851
2812
|
beta: neoDesign.colors.digitalBlue[300],
|
|
2852
2813
|
};
|
|
2853
|
-
const StyledChip$
|
|
2814
|
+
const StyledChip$2 = styles.styled(Chip)(({ theme, size, variant, color }) => ({
|
|
2854
2815
|
padding: 0,
|
|
2855
2816
|
boxSizing: 'border-box',
|
|
2856
2817
|
borderRadius: neoDesign.borderRadius.full,
|
|
2857
2818
|
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.xs),
|
|
2858
2819
|
lineHeight: 1,
|
|
2859
2820
|
fontWeight: neoDesign.typography.fontWeight.medium,
|
|
2860
|
-
...(size && sizeStyles[size]),
|
|
2821
|
+
...(size && sizeStyles$1[size]),
|
|
2861
2822
|
[`& .${Chip.chipClasses.label}`]: {
|
|
2862
2823
|
padding: 0,
|
|
2863
2824
|
},
|
|
@@ -2884,7 +2845,7 @@ const StyledChip$1 = styles.styled(Chip)(({ theme, size, variant, color }) => ({
|
|
|
2884
2845
|
* - TEXT Label → label prop
|
|
2885
2846
|
*/
|
|
2886
2847
|
function NeoTag({ size = 'small', variant = 'outlined', intent = 'default', ...props }) {
|
|
2887
|
-
return jsxRuntime.jsx(StyledChip$
|
|
2848
|
+
return jsxRuntime.jsx(StyledChip$2, { size: size, variant: variant, color: intent, ...props });
|
|
2888
2849
|
}
|
|
2889
2850
|
NeoTag.displayName = 'NeoTag';
|
|
2890
2851
|
|
|
@@ -2943,7 +2904,7 @@ const LabelContainer$2 = styles.styled('div')({
|
|
|
2943
2904
|
alignItems: 'center',
|
|
2944
2905
|
gap: `${neoDesign.spacing.spacing_1_2}px`,
|
|
2945
2906
|
});
|
|
2946
|
-
const LabelText = styles.styled('p')({
|
|
2907
|
+
const LabelText$1 = styles.styled('p')({
|
|
2947
2908
|
fontFamily: `${neoDesign.typography.fontFamily.body}, sans-serif`,
|
|
2948
2909
|
fontSize: neoDesign.typography.fontSize.sm,
|
|
2949
2910
|
fontWeight: neoDesign.typography.fontWeight.semiBold, // Always semiBold (600)
|
|
@@ -2972,7 +2933,7 @@ const IconWrapper = styles.styled('div')({
|
|
|
2972
2933
|
},
|
|
2973
2934
|
});
|
|
2974
2935
|
function NeoDataGridHeaderLabel({ children, helpTooltip, className, }) {
|
|
2975
|
-
return (jsxRuntime.jsxs(LabelContainer$2, { className: className, "data-neo-header-label": true, children: [children && jsxRuntime.jsx(LabelText, { children: children }), helpTooltip && (jsxRuntime.jsx(Tooltip, { title: helpTooltip, placement: "top", children: jsxRuntime.jsx(IconWrapper, { children: jsxRuntime.jsx(CircleQuestionMark, {}) }) }))] }));
|
|
2936
|
+
return (jsxRuntime.jsxs(LabelContainer$2, { className: className, "data-neo-header-label": true, children: [children && jsxRuntime.jsx(LabelText$1, { children: children }), helpTooltip && (jsxRuntime.jsx(Tooltip, { title: helpTooltip, placement: "top", children: jsxRuntime.jsx(IconWrapper, { children: jsxRuntime.jsx(CircleQuestionMark, {}) }) }))] }));
|
|
2976
2937
|
}
|
|
2977
2938
|
|
|
2978
2939
|
/**
|
|
@@ -3510,7 +3471,8 @@ const StyledNavButton = styles.styled(IconButton, {
|
|
|
3510
3471
|
*/
|
|
3511
3472
|
const NeoIconButton = ({ size = 'medium', variant = 'tertiary', active = false, loading, children, ...props }) => {
|
|
3512
3473
|
if (variant === 'nav') {
|
|
3513
|
-
|
|
3474
|
+
const { color, ...navProps } = props;
|
|
3475
|
+
return (jsxRuntime.jsx(StyledNavButton, { size: size, active: active, disableRipple: true, ...navProps, children: children }));
|
|
3514
3476
|
}
|
|
3515
3477
|
return (jsxRuntime.jsx(StyledIconOnlyButton, { variant: variant, size: size, loading: loading, ...props, children: children }));
|
|
3516
3478
|
};
|
|
@@ -3763,6 +3725,20 @@ const NeoDatePicker = ({ type = 'single', open, label, value, rangeValue, onChan
|
|
|
3763
3725
|
};
|
|
3764
3726
|
NeoDatePicker.displayName = 'NeoDatePicker';
|
|
3765
3727
|
|
|
3728
|
+
/**
|
|
3729
|
+
* NeoDatePickerListItem
|
|
3730
|
+
*
|
|
3731
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=4176-8521
|
|
3732
|
+
*/
|
|
3733
|
+
const NeoDatePickerListItem = styles.styled('div')({});
|
|
3734
|
+
|
|
3735
|
+
/**
|
|
3736
|
+
* NeoDatePickerMenu
|
|
3737
|
+
*
|
|
3738
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=4176-8593
|
|
3739
|
+
*/
|
|
3740
|
+
const NeoDatePickerMenu = styles.styled('div')({});
|
|
3741
|
+
|
|
3766
3742
|
const StyledDivider = styles.styled(Divider)(({ theme }) => ({
|
|
3767
3743
|
borderColor: neoDesign.semanticColors.border.secondary,
|
|
3768
3744
|
marginTop: theme.spacing(1),
|
|
@@ -3933,7 +3909,7 @@ const NeoDownloadToast = ({ title, fileName, progress, showClose = true, showPau
|
|
|
3933
3909
|
NeoDownloadToast.displayName = 'NeoDownloadToast';
|
|
3934
3910
|
|
|
3935
3911
|
const filterChipOnlyProps = ['selected', 'expanded', 'selectedLabel', 'count', 'onClear'];
|
|
3936
|
-
const StyledChip = styles.styled(Chip, {
|
|
3912
|
+
const StyledChip$1 = styles.styled(Chip, {
|
|
3937
3913
|
shouldForwardProp: prop => !filterChipOnlyProps.includes(prop),
|
|
3938
3914
|
})(({ theme, selected }) => ({
|
|
3939
3915
|
borderRadius: neoDesign.borderRadius.full,
|
|
@@ -4023,7 +3999,7 @@ const CountBadge = styles.styled('span')(({ theme }) => ({
|
|
|
4023
3999
|
*/
|
|
4024
4000
|
const NeoFilterChip = ({ label, selected = false, expanded, selectedLabel, count = 0, onClear, onClick, ...props }) => {
|
|
4025
4001
|
const chipLabel = selected ? (jsxRuntime.jsxs(LabelContent, { children: [jsxRuntime.jsxs(TextStack, { children: [jsxRuntime.jsx(HeaderLabel, { children: label }), jsxRuntime.jsx(SelectedLabel, { children: selectedLabel ?? label })] }), count > 0 && jsxRuntime.jsx(CountBadge, { children: count })] })) : (label);
|
|
4026
|
-
return (jsxRuntime.jsx(StyledChip, { label: chipLabel, selected: selected, clickable: true, onClick: onClick, onDelete: selected && onClear ? onClear : undefined, deleteIcon: jsxRuntime.jsx(X, { size: 24 }), "aria-expanded": expanded, ...props }));
|
|
4002
|
+
return (jsxRuntime.jsx(StyledChip$1, { label: chipLabel, selected: selected, clickable: true, onClick: onClick, onDelete: selected && onClear ? onClear : undefined, deleteIcon: jsxRuntime.jsx(X, { size: 24 }), "aria-expanded": expanded, ...props }));
|
|
4027
4003
|
};
|
|
4028
4004
|
NeoFilterChip.displayName = 'NeoFilterChip';
|
|
4029
4005
|
|
|
@@ -4821,87 +4797,127 @@ const NeoListItem = ({ size = 'medium', primaryText, secondaryText, badge, icon,
|
|
|
4821
4797
|
};
|
|
4822
4798
|
NeoListItem.displayName = 'NeoListItem';
|
|
4823
4799
|
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
color: neoDesign.semanticColors.icons.default,
|
|
4850
|
-
},
|
|
4851
|
-
// Text colors in selected state
|
|
4852
|
-
[`& .${ListItemText.listItemTextClasses.primary}`]: {
|
|
4853
|
-
color: neoDesign.colors.grey[800],
|
|
4854
|
-
},
|
|
4855
|
-
[`& .${ListItemText.listItemTextClasses.secondary}`]: {
|
|
4856
|
-
color: neoDesign.semanticColors.typography.bodySecondary,
|
|
4857
|
-
},
|
|
4858
|
-
},
|
|
4859
|
-
// Deselected (default) state
|
|
4860
|
-
[`&:not(.${ListItemButton.listItemButtonClasses.selected}):not(.${ListItemButton.listItemButtonClasses.disabled})`]: {
|
|
4861
|
-
'&:hover': {
|
|
4862
|
-
backgroundColor: neoDesign.colors.grey[50],
|
|
4800
|
+
const StyledListItemButton = styles.styled(ListItemButton, {
|
|
4801
|
+
shouldForwardProp: prop => prop !== 'listVariant',
|
|
4802
|
+
})(({ theme, listVariant = 'card' }) => listVariant === 'nav' ? navVariantStyles(theme) : cardVariantStyles(theme));
|
|
4803
|
+
// Nav variant — sidebar list item: no border, compact, subtle highlights.
|
|
4804
|
+
// Renders children inline; no ListItemIcon/ListItemText wrappers required.
|
|
4805
|
+
function navVariantStyles(theme) {
|
|
4806
|
+
return {
|
|
4807
|
+
display: 'flex',
|
|
4808
|
+
alignItems: 'center',
|
|
4809
|
+
gap: neoDesign.spacing.spacing_2,
|
|
4810
|
+
borderRadius: neoDesign.borderRadius.s,
|
|
4811
|
+
paddingTop: neoDesign.spacing.spacing_1,
|
|
4812
|
+
paddingBottom: neoDesign.spacing.spacing_1,
|
|
4813
|
+
paddingLeft: neoDesign.spacing.spacing_2,
|
|
4814
|
+
paddingRight: neoDesign.spacing.spacing_2,
|
|
4815
|
+
border: 'none',
|
|
4816
|
+
color: neoDesign.semanticColors.typography.bodySecondary,
|
|
4817
|
+
backgroundColor: 'transparent',
|
|
4818
|
+
transition: theme.transitions.create(['background-color', 'color']),
|
|
4819
|
+
[`&.${ListItemButton.listItemButtonClasses.selected}`]: {
|
|
4820
|
+
backgroundColor: neoDesign.semanticColors.surfaces.activeHighlight,
|
|
4821
|
+
color: neoDesign.semanticColors.typography.body,
|
|
4822
|
+
'&:hover': {
|
|
4823
|
+
backgroundColor: neoDesign.semanticColors.surfaces.activeHighlight,
|
|
4824
|
+
},
|
|
4863
4825
|
},
|
|
4864
|
-
[
|
|
4865
|
-
|
|
4826
|
+
[`&:not(.${ListItemButton.listItemButtonClasses.selected}):not(.${ListItemButton.listItemButtonClasses.disabled})`]: {
|
|
4827
|
+
'&:hover': {
|
|
4828
|
+
backgroundColor: neoDesign.semanticColors.surfaces.listHover,
|
|
4829
|
+
color: neoDesign.semanticColors.typography.body,
|
|
4830
|
+
},
|
|
4866
4831
|
},
|
|
4867
|
-
[
|
|
4868
|
-
|
|
4832
|
+
[`&.${ListItemButton.listItemButtonClasses.focusVisible}`]: {
|
|
4833
|
+
outline: `2px solid ${neoDesign.semanticColors.border.focus}`,
|
|
4834
|
+
outlineOffset: -2,
|
|
4869
4835
|
},
|
|
4870
|
-
[
|
|
4836
|
+
[`&.${ListItemButton.listItemButtonClasses.disabled}`]: {
|
|
4871
4837
|
color: neoDesign.semanticColors.typography.button.disabled,
|
|
4838
|
+
opacity: 1,
|
|
4872
4839
|
},
|
|
4873
|
-
}
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4840
|
+
};
|
|
4841
|
+
}
|
|
4842
|
+
function cardVariantStyles(theme) {
|
|
4843
|
+
return {
|
|
4844
|
+
display: 'flex',
|
|
4845
|
+
alignItems: 'center',
|
|
4846
|
+
gap: neoDesign.spacing.spacing_2,
|
|
4847
|
+
borderRadius: neoDesign.borderRadius.m,
|
|
4848
|
+
paddingTop: neoDesign.spacing.spacing_1,
|
|
4849
|
+
paddingBottom: neoDesign.spacing.spacing_1,
|
|
4850
|
+
paddingLeft: neoDesign.spacing.spacing_3_4,
|
|
4851
|
+
paddingRight: neoDesign.spacing.spacing_3_4,
|
|
4852
|
+
border: `1px solid ${neoDesign.semanticColors.border.primary}`,
|
|
4879
4853
|
backgroundColor: theme.palette.common.white,
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
}
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4854
|
+
transition: theme.transitions.create(['border', 'background-color']),
|
|
4855
|
+
// Active (selected) state
|
|
4856
|
+
[`&.${ListItemButton.listItemButtonClasses.selected}`]: {
|
|
4857
|
+
border: `2px solid ${neoDesign.semanticColors.buttons.primary.default}`,
|
|
4858
|
+
backgroundColor: theme.palette.common.white,
|
|
4859
|
+
'&:hover': {
|
|
4860
|
+
backgroundColor: theme.palette.common.white,
|
|
4861
|
+
},
|
|
4862
|
+
// Icon color in selected state
|
|
4863
|
+
[`& .${ListItemIcon.listItemIconClasses.root}`]: {
|
|
4864
|
+
color: neoDesign.semanticColors.icons.default,
|
|
4865
|
+
},
|
|
4866
|
+
// Text colors in selected state
|
|
4867
|
+
[`& .${ListItemText.listItemTextClasses.primary}`]: {
|
|
4868
|
+
color: neoDesign.colors.grey[800],
|
|
4869
|
+
},
|
|
4870
|
+
[`& .${ListItemText.listItemTextClasses.secondary}`]: {
|
|
4871
|
+
color: neoDesign.semanticColors.typography.bodySecondary,
|
|
4872
|
+
},
|
|
4888
4873
|
},
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4874
|
+
// Deselected (default) state
|
|
4875
|
+
[`&:not(.${ListItemButton.listItemButtonClasses.selected}):not(.${ListItemButton.listItemButtonClasses.disabled})`]: {
|
|
4876
|
+
'&:hover': {
|
|
4877
|
+
backgroundColor: neoDesign.colors.grey[50],
|
|
4878
|
+
},
|
|
4879
|
+
[`& .${ListItemIcon.listItemIconClasses.root}`]: {
|
|
4880
|
+
color: neoDesign.semanticColors.icons.disabled,
|
|
4881
|
+
},
|
|
4882
|
+
[`& .${ListItemText.listItemTextClasses.primary}`]: {
|
|
4883
|
+
color: neoDesign.semanticColors.buttons.tertiary.disabled,
|
|
4884
|
+
},
|
|
4885
|
+
[`& .${ListItemText.listItemTextClasses.secondary}`]: {
|
|
4886
|
+
color: neoDesign.semanticColors.typography.button.disabled,
|
|
4887
|
+
},
|
|
4896
4888
|
},
|
|
4897
|
-
|
|
4898
|
-
|
|
4889
|
+
// Focus state
|
|
4890
|
+
[`&.${ListItemButton.listItemButtonClasses.focusVisible}`]: {
|
|
4891
|
+
outline: `2px solid ${neoDesign.semanticColors.buttons.primary.default}`,
|
|
4892
|
+
outlineOffset: 2,
|
|
4893
|
+
border: `2px solid ${neoDesign.semanticColors.buttons.primary.default}`,
|
|
4894
|
+
backgroundColor: theme.palette.common.white,
|
|
4895
|
+
[`& .${ListItemIcon.listItemIconClasses.root}`]: {
|
|
4896
|
+
color: neoDesign.semanticColors.icons.default,
|
|
4897
|
+
},
|
|
4898
|
+
[`& .${ListItemText.listItemTextClasses.primary}`]: {
|
|
4899
|
+
color: neoDesign.colors.grey[800],
|
|
4900
|
+
},
|
|
4901
|
+
[`& .${ListItemText.listItemTextClasses.secondary}`]: {
|
|
4902
|
+
color: neoDesign.semanticColors.typography.bodySecondary,
|
|
4903
|
+
},
|
|
4899
4904
|
},
|
|
4900
|
-
|
|
4901
|
-
|
|
4905
|
+
// Disabled state
|
|
4906
|
+
[`&.${ListItemButton.listItemButtonClasses.disabled}`]: {
|
|
4907
|
+
backgroundColor: neoDesign.colors.grey[50],
|
|
4908
|
+
opacity: 1, // Override MUI default opacity
|
|
4909
|
+
[`& .${ListItemIcon.listItemIconClasses.root}`]: {
|
|
4910
|
+
color: neoDesign.semanticColors.icons.disabled,
|
|
4911
|
+
},
|
|
4912
|
+
[`& .${ListItemText.listItemTextClasses.primary}`]: {
|
|
4913
|
+
color: neoDesign.colors.grey[300],
|
|
4914
|
+
},
|
|
4915
|
+
[`& .${ListItemText.listItemTextClasses.secondary}`]: {
|
|
4916
|
+
color: neoDesign.colors.grey[300],
|
|
4917
|
+
},
|
|
4902
4918
|
},
|
|
4903
|
-
}
|
|
4904
|
-
}
|
|
4919
|
+
};
|
|
4920
|
+
}
|
|
4905
4921
|
/**
|
|
4906
4922
|
* NeoListItemButton - Selectable list item with icon and text
|
|
4907
4923
|
*
|
|
@@ -4945,8 +4961,8 @@ const StyledListItemButton = styles.styled(ListItemButton)(({ theme }) => ({
|
|
|
4945
4961
|
* - colors.grey[300] (#d1d5db) - Disabled text
|
|
4946
4962
|
* - colors.grey[50] (#f9fafb) - Disabled background
|
|
4947
4963
|
*/
|
|
4948
|
-
const NeoListItemButton = ({ children, selected = false, disabled = false, ...props }) => {
|
|
4949
|
-
return (jsxRuntime.jsx(StyledListItemButton, { selected: selected, disabled: disabled, ...props, children: children }));
|
|
4964
|
+
const NeoListItemButton = ({ children, selected = false, disabled = false, variant = 'card', ...props }) => {
|
|
4965
|
+
return (jsxRuntime.jsx(StyledListItemButton, { selected: selected, disabled: disabled, listVariant: variant, ...props, children: children }));
|
|
4950
4966
|
};
|
|
4951
4967
|
NeoListItemButton.displayName = 'NeoListItemButton';
|
|
4952
4968
|
|
|
@@ -5183,9 +5199,9 @@ NeoModalFooter.displayName = 'NeoModalFooter';
|
|
|
5183
5199
|
const NavigationAvatarContainer = styles.styled('div')({
|
|
5184
5200
|
display: 'flex',
|
|
5185
5201
|
boxSizing: 'border-box',
|
|
5186
|
-
width: neoDesign.spacing.
|
|
5187
|
-
height: neoDesign.spacing.
|
|
5188
|
-
padding: neoDesign.spacing.
|
|
5202
|
+
width: neoDesign.spacing.spacing_5,
|
|
5203
|
+
height: neoDesign.spacing.spacing_5,
|
|
5204
|
+
padding: neoDesign.spacing.spacing_1_2,
|
|
5189
5205
|
justifyContent: 'center',
|
|
5190
5206
|
alignItems: 'center',
|
|
5191
5207
|
borderRadius: '50%',
|
|
@@ -5198,8 +5214,8 @@ const NavigationAvatarContainer = styles.styled('div')({
|
|
|
5198
5214
|
/**
|
|
5199
5215
|
* NeoNavigationAvatar - Compact avatar for navigation contexts
|
|
5200
5216
|
*
|
|
5201
|
-
* Wraps NeoGeneralAvatar (size="small") in a
|
|
5202
|
-
* providing
|
|
5217
|
+
* Wraps NeoGeneralAvatar (size="small") in a 40px container,
|
|
5218
|
+
* providing an interactive area for navigation UI.
|
|
5203
5219
|
*
|
|
5204
5220
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=11325-102
|
|
5205
5221
|
*/
|
|
@@ -5231,15 +5247,14 @@ const StyledRoot = styles.styled(ButtonBase, {
|
|
|
5231
5247
|
'&:hover .neo-nav-label': {
|
|
5232
5248
|
color: neoDesign.semanticColors.buttons.primary.hover,
|
|
5233
5249
|
},
|
|
5250
|
+
[`& .${Chip.chipClasses.root}`]: {
|
|
5251
|
+
flexShrink: 0,
|
|
5252
|
+
},
|
|
5234
5253
|
'&:focus-visible': {
|
|
5235
|
-
|
|
5254
|
+
outline: 'none',
|
|
5236
5255
|
},
|
|
5237
5256
|
'&:focus-visible .neo-nav-icon-padding': {
|
|
5238
|
-
|
|
5239
|
-
borderColor: neoDesign.colors.digitalBlue[100],
|
|
5240
|
-
},
|
|
5241
|
-
'&:focus-visible .neo-nav-label': {
|
|
5242
|
-
color: neoDesign.semanticColors.buttons.primary.hover,
|
|
5257
|
+
...focusRingStyles,
|
|
5243
5258
|
},
|
|
5244
5259
|
...(selected && {
|
|
5245
5260
|
'& .neo-nav-icon-padding': {
|
|
@@ -5255,12 +5270,6 @@ const StyledRoot = styles.styled(ButtonBase, {
|
|
|
5255
5270
|
'&:hover .neo-nav-label': {
|
|
5256
5271
|
color: neoDesign.semanticColors.buttons.primary.pressed,
|
|
5257
5272
|
},
|
|
5258
|
-
'&:focus-visible .neo-nav-icon-padding': {
|
|
5259
|
-
backgroundColor: neoDesign.colors.digitalBlue[100],
|
|
5260
|
-
},
|
|
5261
|
-
'&:focus-visible .neo-nav-label': {
|
|
5262
|
-
color: neoDesign.semanticColors.buttons.primary.pressed,
|
|
5263
|
-
},
|
|
5264
5273
|
}),
|
|
5265
5274
|
}));
|
|
5266
5275
|
const IconPadding = styles.styled('span')({
|
|
@@ -5281,56 +5290,331 @@ const Label$2 = styles.styled('span')(({ theme }) => ({
|
|
|
5281
5290
|
width: '100%',
|
|
5282
5291
|
transition: 'color 150ms',
|
|
5283
5292
|
}));
|
|
5284
|
-
const TagPill = styles.styled('span')(({ theme }) => ({
|
|
5285
|
-
display: 'inline-flex',
|
|
5286
|
-
alignItems: 'center',
|
|
5287
|
-
justifyContent: 'center',
|
|
5288
|
-
height: 18,
|
|
5289
|
-
paddingLeft: neoDesign.spacing.spacing_3_4, // 6px
|
|
5290
|
-
paddingRight: neoDesign.spacing.spacing_3_4, // 6px
|
|
5291
|
-
borderRadius: neoDesign.borderRadius.full,
|
|
5292
|
-
backgroundColor: neoDesign.colors.digitalBlue[300], // #8D99FF
|
|
5293
|
-
color: neoDesign.semanticColors.typography.tooltip, // white
|
|
5294
|
-
fontFamily: neoDesign.typography.fontFamily.body,
|
|
5295
|
-
fontWeight: neoDesign.typography.fontWeight.medium,
|
|
5296
|
-
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.xs), // 12px
|
|
5297
|
-
lineHeight: 1,
|
|
5298
|
-
}));
|
|
5299
5293
|
/**
|
|
5300
5294
|
* NeoNavigationItem - Vertical navigation item with icon, label, and optional tag
|
|
5301
5295
|
*
|
|
5302
5296
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=8455-6120
|
|
5303
5297
|
*/
|
|
5304
|
-
function NeoNavigationItem({ icon, label, selected = false, tag, children, ...props }) {
|
|
5305
|
-
return (jsxRuntime.jsxs(StyledRoot, { selected: selected, disableRipple: true, ...props, children: [jsxRuntime.jsx(IconPadding, { className: "neo-nav-icon-padding", children: icon }), label && jsxRuntime.jsx(Label$2, { className: "neo-nav-label", children: label }), tag && jsxRuntime.jsx(
|
|
5298
|
+
function NeoNavigationItem({ icon, label, selected = false, tag, slotProps, children, ...props }) {
|
|
5299
|
+
return (jsxRuntime.jsxs(StyledRoot, { selected: selected, disableRipple: true, ...props, children: [jsxRuntime.jsx(IconPadding, { className: "neo-nav-icon-padding", children: icon }), label && jsxRuntime.jsx(Label$2, { className: "neo-nav-label", children: label }), tag && (jsxRuntime.jsx(NeoTag, { size: "medium", variant: "filled", intent: "beta", label: tag, ...slotProps?.badge })), children] }));
|
|
5306
5300
|
}
|
|
5307
5301
|
NeoNavigationItem.displayName = 'NeoNavigationItem';
|
|
5308
5302
|
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5303
|
+
const StyledActionsCell = styles.styled(xDataGrid.GridActionsCell)({
|
|
5304
|
+
gap: neoDesign.spacing.spacing_1,
|
|
5305
|
+
paddingLeft: neoDesign.spacing.spacing_1_1_2,
|
|
5306
|
+
paddingRight: neoDesign.spacing.spacing_1_1_2,
|
|
5307
|
+
});
|
|
5308
|
+
function NeoActionsCell(props) {
|
|
5309
|
+
return jsxRuntime.jsx(StyledActionsCell, { ...props });
|
|
5310
|
+
}
|
|
5311
|
+
|
|
5312
|
+
const StyledCell$1 = styles.styled('div', {
|
|
5313
|
+
shouldForwardProp: prop => prop !== 'disabled',
|
|
5314
|
+
})(({ disabled }) => ({
|
|
5315
|
+
display: 'flex',
|
|
5316
|
+
alignItems: 'center',
|
|
5317
|
+
gap: neoDesign.spacing.spacing_1, // 8px between avatar and label
|
|
5318
|
+
width: '100%',
|
|
5319
|
+
height: '100%',
|
|
5320
|
+
paddingLeft: neoDesign.spacing.spacing_1_1_2, // 12px — input-horizontal
|
|
5321
|
+
paddingRight: neoDesign.spacing.spacing_1_1_2,
|
|
5322
|
+
paddingTop: neoDesign.spacing.spacing_1_2, // 4px — input-vertical
|
|
5323
|
+
paddingBottom: neoDesign.spacing.spacing_1_2,
|
|
5324
|
+
backgroundColor: disabled
|
|
5325
|
+
? neoDesign.semanticColors.surfaces.dataGrid.disabled
|
|
5326
|
+
: neoDesign.semanticColors.surfaces.dataGrid.default,
|
|
5327
|
+
boxSizing: 'border-box',
|
|
5318
5328
|
}));
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5329
|
+
const LabelText = styles.styled('span', {
|
|
5330
|
+
shouldForwardProp: prop => prop !== 'disabled',
|
|
5331
|
+
})(({ disabled }) => ({
|
|
5332
|
+
overflow: 'hidden',
|
|
5333
|
+
textOverflow: 'ellipsis',
|
|
5334
|
+
whiteSpace: 'nowrap',
|
|
5335
|
+
fontFamily: neoDesign.typography.fontFamily.body,
|
|
5336
|
+
fontSize: neoDesign.typography.fontSize.xs,
|
|
5337
|
+
fontWeight: neoDesign.typography.fontWeight.regular,
|
|
5338
|
+
lineHeight: 1.5,
|
|
5339
|
+
color: disabled ? neoDesign.semanticColors.typography.bodySecondary : neoDesign.semanticColors.typography.body,
|
|
5327
5340
|
}));
|
|
5328
5341
|
/**
|
|
5329
|
-
*
|
|
5342
|
+
* NeoAvatarCell — DataGrid cell displaying a user avatar with optional label.
|
|
5343
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=13425-1725
|
|
5330
5344
|
*/
|
|
5331
|
-
const
|
|
5332
|
-
|
|
5333
|
-
|
|
5345
|
+
const NeoAvatarCell = ({ name, src, colorIndex = 0, label, disabled = false, empty = false, }) => {
|
|
5346
|
+
if (empty) {
|
|
5347
|
+
return jsxRuntime.jsx(StyledCell$1, { disabled: disabled });
|
|
5348
|
+
}
|
|
5349
|
+
return (jsxRuntime.jsxs(StyledCell$1, { disabled: disabled, children: [jsxRuntime.jsx(NeoGeneralAvatar, { size: "small", src: src, alt: name, colorIndex: colorIndex, children: !src && name ? name.charAt(0).toUpperCase() : undefined }), label && jsxRuntime.jsx(LabelText, { disabled: disabled, children: label })] }));
|
|
5350
|
+
};
|
|
5351
|
+
NeoAvatarCell.displayName = 'NeoAvatarCell';
|
|
5352
|
+
|
|
5353
|
+
const CellRoot = styles.styled('div', {
|
|
5354
|
+
shouldForwardProp: prop => prop !== 'disabled',
|
|
5355
|
+
})(({ disabled }) => ({
|
|
5356
|
+
display: 'flex',
|
|
5357
|
+
alignItems: 'center',
|
|
5358
|
+
justifyContent: 'center',
|
|
5359
|
+
width: '100%',
|
|
5360
|
+
height: '100%',
|
|
5361
|
+
color: disabled ? neoDesign.semanticColors.icons.disabled : neoDesign.semanticColors.icons.default,
|
|
5362
|
+
}));
|
|
5363
|
+
/**
|
|
5364
|
+
* NeoIconCell — Icon cell for DataGrid. Renders an icon centered in the cell.
|
|
5365
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=13272-9345
|
|
5366
|
+
*/
|
|
5367
|
+
const NeoIconCell = ({ icon, ariaLabel, disabled = false }) => {
|
|
5368
|
+
if (!icon)
|
|
5369
|
+
return null;
|
|
5370
|
+
return (jsxRuntime.jsx(CellRoot, { disabled: disabled, "aria-label": ariaLabel, children: jsxRuntime.jsx(NeoIconWrapper, { size: 16, children: icon }) }));
|
|
5371
|
+
};
|
|
5372
|
+
NeoIconCell.displayName = 'NeoIconCell';
|
|
5373
|
+
|
|
5374
|
+
const CellWrapper = styles.styled('div', {
|
|
5375
|
+
shouldForwardProp: prop => prop !== 'disabled',
|
|
5376
|
+
})(({ disabled }) => ({
|
|
5377
|
+
display: 'flex',
|
|
5378
|
+
alignItems: 'center',
|
|
5379
|
+
justifyContent: 'flex-start',
|
|
5380
|
+
width: '100%',
|
|
5381
|
+
height: '100%',
|
|
5382
|
+
paddingLeft: neoDesign.spacing.spacing_1,
|
|
5383
|
+
paddingRight: neoDesign.spacing.spacing_1,
|
|
5384
|
+
backgroundColor: disabled
|
|
5385
|
+
? neoDesign.semanticColors.surfaces.dataGrid.disabled
|
|
5386
|
+
: neoDesign.semanticColors.surfaces.dataGrid.default,
|
|
5387
|
+
'& img': {
|
|
5388
|
+
display: 'block',
|
|
5389
|
+
maxHeight: 32,
|
|
5390
|
+
width: 'auto',
|
|
5391
|
+
maxWidth: '100%',
|
|
5392
|
+
objectFit: 'contain',
|
|
5393
|
+
opacity: disabled ? 0.4 : 1,
|
|
5394
|
+
},
|
|
5395
|
+
}));
|
|
5396
|
+
/**
|
|
5397
|
+
* NeoLogoCell — DataGrid cell displaying a raster or SVG logo image.
|
|
5398
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=13278-9558
|
|
5399
|
+
*
|
|
5400
|
+
* Kept separate from NeoIconCell to match Neo's Icon/Logo component split:
|
|
5401
|
+
* - NeoIconCell: MUI SvgIcon components
|
|
5402
|
+
* - NeoLogoCell: raster or SVG image URLs (img tag)
|
|
5403
|
+
*/
|
|
5404
|
+
const NeoLogoCell = ({ src, alt = '', disabled = false }) => {
|
|
5405
|
+
if (!src) {
|
|
5406
|
+
return jsxRuntime.jsx(CellWrapper, { disabled: disabled });
|
|
5407
|
+
}
|
|
5408
|
+
return (jsxRuntime.jsx(CellWrapper, { disabled: disabled, children: jsxRuntime.jsx(NeoIconWrapper, { size: 32, children: jsxRuntime.jsx("img", { src: src, alt: alt }) }) }));
|
|
5409
|
+
};
|
|
5410
|
+
NeoLogoCell.displayName = 'NeoLogoCell';
|
|
5411
|
+
|
|
5412
|
+
const StyledLinearProgress = styles.styled(LinearProgress, {
|
|
5413
|
+
shouldForwardProp: prop => prop !== 'labelPosition',
|
|
5414
|
+
})(() => ({
|
|
5415
|
+
height: 8,
|
|
5416
|
+
borderRadius: neoDesign.borderRadius.xS,
|
|
5417
|
+
backgroundColor: neoDesign.colors.grey[200],
|
|
5418
|
+
[`& .${LinearProgress.linearProgressClasses.bar}`]: {
|
|
5419
|
+
borderRadius: neoDesign.borderRadius.xS,
|
|
5420
|
+
backgroundColor: neoDesign.colors.digitalBlue[500],
|
|
5421
|
+
},
|
|
5422
|
+
[`&.${LinearProgress.linearProgressClasses.colorPrimary}`]: {
|
|
5423
|
+
backgroundColor: neoDesign.colors.grey[200],
|
|
5424
|
+
[`& .${LinearProgress.linearProgressClasses.bar}`]: {
|
|
5425
|
+
backgroundColor: neoDesign.colors.digitalBlue[500],
|
|
5426
|
+
},
|
|
5427
|
+
},
|
|
5428
|
+
// Cancelled variant uses warning color
|
|
5429
|
+
'&[data-variant="cancelled"]': {
|
|
5430
|
+
[`& .${LinearProgress.linearProgressClasses.bar}`]: {
|
|
5431
|
+
backgroundColor: neoDesign.semanticColors.status.warning.default,
|
|
5432
|
+
},
|
|
5433
|
+
},
|
|
5434
|
+
}));
|
|
5435
|
+
const ProgressWrapper = styles.styled('div')(({ labelPosition }) => ({
|
|
5436
|
+
display: 'flex',
|
|
5437
|
+
width: '100%',
|
|
5438
|
+
...(labelPosition === 'right' && {
|
|
5439
|
+
flexDirection: 'row',
|
|
5440
|
+
alignItems: 'center',
|
|
5441
|
+
gap: neoDesign.spacing.spacing_3,
|
|
5442
|
+
}),
|
|
5443
|
+
...(labelPosition === 'top' && {
|
|
5444
|
+
flexDirection: 'column-reverse',
|
|
5445
|
+
alignItems: 'flex-end',
|
|
5446
|
+
gap: neoDesign.spacing.spacing_2,
|
|
5447
|
+
}),
|
|
5448
|
+
...(labelPosition === 'bottom' && {
|
|
5449
|
+
flexDirection: 'column',
|
|
5450
|
+
alignItems: 'flex-end',
|
|
5451
|
+
gap: neoDesign.spacing.spacing_2,
|
|
5452
|
+
}),
|
|
5453
|
+
...(labelPosition === 'none' && {
|
|
5454
|
+
flexDirection: 'row',
|
|
5455
|
+
}),
|
|
5456
|
+
}));
|
|
5457
|
+
const ProgressLabel = styles.styled(Typography)(({ theme }) => ({
|
|
5458
|
+
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.sm),
|
|
5459
|
+
fontWeight: neoDesign.typography.fontWeight.medium,
|
|
5460
|
+
color: neoDesign.colors.grey[800],
|
|
5461
|
+
lineHeight: 1.4,
|
|
5462
|
+
whiteSpace: 'nowrap',
|
|
5463
|
+
flexShrink: 0,
|
|
5464
|
+
}));
|
|
5465
|
+
const ProgressBarContainer = styles.styled('div')(({ labelPosition }) => ({
|
|
5466
|
+
flexGrow: labelPosition === 'right' ? 1 : 0,
|
|
5467
|
+
width: labelPosition === 'right' ? 'auto' : '100%',
|
|
5468
|
+
}));
|
|
5469
|
+
/**
|
|
5470
|
+
* NeoProgressbar - Linear progress indicator based on MUI LinearProgress
|
|
5471
|
+
*
|
|
5472
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4120-36679
|
|
5473
|
+
*
|
|
5474
|
+
* Figma Props Mapping:
|
|
5475
|
+
* - progress (0%-100% | Cancelled) → value (0-100) + variant (default|cancelled)
|
|
5476
|
+
* - label (False|Right|Top|Bottom) → labelPosition (none|right|top|bottom)
|
|
5477
|
+
*
|
|
5478
|
+
* Design Decisions (from Issue #75):
|
|
5479
|
+
* - MUI Base Component: LinearProgress (provides accessibility, animations, progress tracking)
|
|
5480
|
+
* - Label Positioning: Single labelPosition prop with values 'none', 'right', 'top', 'bottom'
|
|
5481
|
+
* - Cancelled State: Separate variant prop (variant='cancelled') alongside value prop
|
|
5482
|
+
*/
|
|
5483
|
+
const NeoProgressbar = ({ value = 0, labelPosition = 'none', variant = 'default', labelText, ...props }) => {
|
|
5484
|
+
const showLabel = labelPosition !== 'none';
|
|
5485
|
+
const displayLabel = labelText || (variant === 'cancelled' ? 'Canceled' : `${Math.round(value)}%`);
|
|
5486
|
+
return (jsxRuntime.jsxs(ProgressWrapper, { labelPosition: labelPosition, children: [jsxRuntime.jsx(ProgressBarContainer, { labelPosition: labelPosition, children: jsxRuntime.jsx(StyledLinearProgress, { variant: "determinate", value: variant === 'cancelled' ? 100 : value, "data-variant": variant, labelPosition: labelPosition, ...props }) }), showLabel && jsxRuntime.jsx(ProgressLabel, { children: displayLabel })] }));
|
|
5487
|
+
};
|
|
5488
|
+
NeoProgressbar.displayName = 'NeoProgressbar';
|
|
5489
|
+
|
|
5490
|
+
const StyledCell = styles.styled('div', {
|
|
5491
|
+
shouldForwardProp: prop => prop !== 'disabled',
|
|
5492
|
+
})(({ disabled }) => ({
|
|
5493
|
+
display: 'flex',
|
|
5494
|
+
alignItems: 'center',
|
|
5495
|
+
width: '100%',
|
|
5496
|
+
height: '100%',
|
|
5497
|
+
paddingLeft: neoDesign.spacing.spacing_1_1_2, // 12px input-horizontal
|
|
5498
|
+
paddingRight: neoDesign.spacing.spacing_1_1_2,
|
|
5499
|
+
backgroundColor: disabled
|
|
5500
|
+
? neoDesign.semanticColors.surfaces.dataGrid.disabled
|
|
5501
|
+
: neoDesign.semanticColors.surfaces.dataGrid.default,
|
|
5502
|
+
boxSizing: 'border-box',
|
|
5503
|
+
}));
|
|
5504
|
+
/**
|
|
5505
|
+
* NeoProgressCell — DataGrid cell displaying a linear progress indicator.
|
|
5506
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=13425-5378
|
|
5507
|
+
*/
|
|
5508
|
+
const NeoProgressCell = ({ value = 0, disabled = false, empty = false, }) => {
|
|
5509
|
+
const clampedValue = Math.min(100, Math.max(0, value));
|
|
5510
|
+
return (jsxRuntime.jsx(StyledCell, { disabled: disabled, children: !empty && jsxRuntime.jsx(NeoProgressbar, { value: clampedValue, labelPosition: "none" }) }));
|
|
5511
|
+
};
|
|
5512
|
+
NeoProgressCell.displayName = 'NeoProgressCell';
|
|
5513
|
+
|
|
5514
|
+
const variantColors = (variant) => ({
|
|
5515
|
+
bg: neoDesign.semanticColors.status[variant].light,
|
|
5516
|
+
fg: neoDesign.semanticColors.status[variant].dark,
|
|
5517
|
+
border: neoDesign.semanticColors.status[variant].transparent,
|
|
5518
|
+
});
|
|
5519
|
+
const StyledChip = styles.styled('div', {
|
|
5520
|
+
shouldForwardProp: prop => prop !== 'disabled' && prop !== 'variant',
|
|
5521
|
+
})(({ disabled, variant }) => {
|
|
5522
|
+
const colors = variantColors(variant);
|
|
5523
|
+
return {
|
|
5524
|
+
display: 'inline-flex',
|
|
5525
|
+
alignItems: 'center',
|
|
5526
|
+
gap: neoDesign.spacing.spacing_3_4,
|
|
5527
|
+
paddingTop: neoDesign.spacing.spacing_1_2,
|
|
5528
|
+
paddingBottom: neoDesign.spacing.spacing_1_2,
|
|
5529
|
+
paddingLeft: neoDesign.spacing.spacing_1_1_2,
|
|
5530
|
+
paddingRight: neoDesign.spacing.spacing_1_1_2,
|
|
5531
|
+
borderRadius: neoDesign.borderRadius.full,
|
|
5532
|
+
border: `1px solid ${disabled ? neoDesign.semanticColors.border.secondary : colors.border}`,
|
|
5533
|
+
backgroundColor: disabled ? neoDesign.semanticColors.surfaces.dataGrid.disabled : colors.bg,
|
|
5534
|
+
color: disabled ? neoDesign.semanticColors.icons.disabled : colors.fg,
|
|
5535
|
+
fontFamily: neoDesign.typography.fontFamily.body,
|
|
5536
|
+
fontSize: neoDesign.typography.fontSize.xs,
|
|
5537
|
+
fontWeight: neoDesign.typography.fontWeight.medium,
|
|
5538
|
+
lineHeight: 1,
|
|
5539
|
+
whiteSpace: 'nowrap',
|
|
5540
|
+
overflow: 'hidden',
|
|
5541
|
+
maxWidth: '100%',
|
|
5542
|
+
'& svg': {
|
|
5543
|
+
flexShrink: 0,
|
|
5544
|
+
width: '1em',
|
|
5545
|
+
height: '1em',
|
|
5546
|
+
fontSize: neoDesign.typography.fontSize.xs,
|
|
5547
|
+
},
|
|
5548
|
+
};
|
|
5549
|
+
});
|
|
5550
|
+
const TooltipErrorPre = styles.styled('pre')({
|
|
5551
|
+
margin: 0,
|
|
5552
|
+
padding: 0,
|
|
5553
|
+
fontFamily: neoDesign.typography.fontFamily.code,
|
|
5554
|
+
fontSize: neoDesign.typography.fontSize.sm,
|
|
5555
|
+
fontWeight: neoDesign.typography.fontWeight.regular,
|
|
5556
|
+
lineHeight: 1.5,
|
|
5557
|
+
color: neoDesign.semanticColors.typography.tooltip,
|
|
5558
|
+
whiteSpace: 'pre-wrap',
|
|
5559
|
+
wordBreak: 'break-all',
|
|
5560
|
+
maxHeight: 200,
|
|
5561
|
+
overflowY: 'auto',
|
|
5562
|
+
});
|
|
5563
|
+
const StyledTooltip$1 = styles.styled(Tooltip)({
|
|
5564
|
+
[`& .${Tooltip.tooltipClasses.tooltip}`]: {
|
|
5565
|
+
backgroundColor: neoDesign.semanticColors.surfaces.tooltip,
|
|
5566
|
+
maxWidth: 400,
|
|
5567
|
+
padding: `${neoDesign.spacing.spacing_1}px ${neoDesign.spacing.spacing_1_1_2}px`,
|
|
5568
|
+
},
|
|
5569
|
+
[`& .${Tooltip.tooltipClasses.arrow}`]: {
|
|
5570
|
+
color: neoDesign.semanticColors.surfaces.tooltip,
|
|
5571
|
+
},
|
|
5572
|
+
});
|
|
5573
|
+
/**
|
|
5574
|
+
* NeoStatusCell — DataGrid cell displaying an icon + label chip with optional error tooltip.
|
|
5575
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=13272-8705
|
|
5576
|
+
*/
|
|
5577
|
+
const NeoStatusCell = ({ icon, label, details, disabled = false, variant = 'success', empty = false, }) => {
|
|
5578
|
+
if (empty) {
|
|
5579
|
+
return (jsxRuntime.jsx(Box, { component: "span", sx: {
|
|
5580
|
+
color: neoDesign.semanticColors.typography.body,
|
|
5581
|
+
fontSize: neoDesign.typography.fontSize.sm,
|
|
5582
|
+
lineHeight: 1,
|
|
5583
|
+
}, children: '—' }));
|
|
5584
|
+
}
|
|
5585
|
+
const chip = (jsxRuntime.jsxs(StyledChip, { disabled: disabled, variant: variant, children: [icon, label] }));
|
|
5586
|
+
if (details) {
|
|
5587
|
+
return (jsxRuntime.jsx(StyledTooltip$1, { title: jsxRuntime.jsx(TooltipErrorPre, { children: details }), arrow: true, placement: "bottom-start", children: jsxRuntime.jsx(Box, { component: "span", sx: { display: 'inline-flex' }, children: chip }) }));
|
|
5588
|
+
}
|
|
5589
|
+
return chip;
|
|
5590
|
+
};
|
|
5591
|
+
NeoStatusCell.displayName = 'NeoStatusCell';
|
|
5592
|
+
|
|
5593
|
+
/**
|
|
5594
|
+
* Sticky header wrapper - sticks to top when scrolling
|
|
5595
|
+
*/
|
|
5596
|
+
const StickyHeader = styles.styled(Box)(({ theme }) => ({
|
|
5597
|
+
position: 'sticky',
|
|
5598
|
+
top: 0,
|
|
5599
|
+
zIndex: theme.zIndex.appBar,
|
|
5600
|
+
backgroundColor: neoDesign.semanticColors.surfaces.white,
|
|
5601
|
+
flexShrink: 0,
|
|
5602
|
+
}));
|
|
5603
|
+
/**
|
|
5604
|
+
* Page title typography
|
|
5605
|
+
*/
|
|
5606
|
+
const PageTitle = styles.styled(Typography)(() => ({
|
|
5607
|
+
fontSize: neoDesign.typography.fontSize.h3,
|
|
5608
|
+
fontWeight: neoDesign.typography.fontWeight.medium,
|
|
5609
|
+
lineHeight: 1.4,
|
|
5610
|
+
color: neoDesign.colors.grey['900'], // #111827 - matches Figma typography/page-header
|
|
5611
|
+
}));
|
|
5612
|
+
/**
|
|
5613
|
+
* Subtitle typography
|
|
5614
|
+
*/
|
|
5615
|
+
const Subtitle = styles.styled(Typography)(() => ({
|
|
5616
|
+
fontSize: neoDesign.typography.fontSize.sm,
|
|
5617
|
+
color: neoDesign.semanticColors.typography.bodySecondary,
|
|
5334
5618
|
}));
|
|
5335
5619
|
/**
|
|
5336
5620
|
* NeoPageContent - Page content surface from the Moderne Design System
|
|
@@ -5387,7 +5671,12 @@ const Subtitle = styles.styled(Typography)(() => ({
|
|
|
5387
5671
|
* </NeoPageContent>
|
|
5388
5672
|
* ```
|
|
5389
5673
|
*/
|
|
5390
|
-
function NeoPageContent({ pageTitle, subtitle, breadcrumbs, action, sticky = false, contentMaxWidth = false, centerContent = true, disableGutters = false, isLoading = false, showBackToTop = true, children, sx, ...boxProps }) {
|
|
5674
|
+
function NeoPageContent({ pageTitle, subtitle, breadcrumbs, action, sticky = false, contentMaxWidth: contentMaxWidthProp = false, centerContent = true, disableGutters: disableGuttersProp = false, isLoading = false, showBackToTop = true, layout = 'default', children, sx, ...boxProps }) {
|
|
5675
|
+
// fullBleed forces no max-width, no gutters, and zero bottom padding
|
|
5676
|
+
// so children can fill the viewport edge-to-edge.
|
|
5677
|
+
const isFullBleed = layout === 'fullBleed';
|
|
5678
|
+
const contentMaxWidth = isFullBleed ? false : contentMaxWidthProp;
|
|
5679
|
+
const disableGutters = isFullBleed || disableGuttersProp;
|
|
5391
5680
|
const [showBackToTopButton, setShowBackToTopButton] = React.useState(false);
|
|
5392
5681
|
const headerRef = React.useRef(null);
|
|
5393
5682
|
const containerRef = React.useRef(null);
|
|
@@ -5439,7 +5728,7 @@ function NeoPageContent({ pageTitle, subtitle, breadcrumbs, action, sticky = fal
|
|
|
5439
5728
|
flexDirection: 'column',
|
|
5440
5729
|
px: disableGutters ? 0 : `${neoDesign.spacing.spacing_2_1_2}px`,
|
|
5441
5730
|
pt: sticky ? 0 : `${neoDesign.spacing.spacing_2}px`,
|
|
5442
|
-
pb: `${neoDesign.spacing.spacing_2_1_2}px`,
|
|
5731
|
+
pb: isFullBleed ? 0 : `${neoDesign.spacing.spacing_2_1_2}px`,
|
|
5443
5732
|
height: '100%',
|
|
5444
5733
|
overflow: 'auto',
|
|
5445
5734
|
}, children: [sticky ? (jsxRuntime.jsx(StickyHeader, { ref: headerRef, sx: {
|
|
@@ -5527,84 +5816,6 @@ function NeoPaginatedGrid({ slots, pageSizeOptions, slotProps: userSlotProps, ..
|
|
|
5527
5816
|
}
|
|
5528
5817
|
NeoPaginatedGrid.displayName = 'NeoPaginatedGrid';
|
|
5529
5818
|
|
|
5530
|
-
const StyledLinearProgress = styles.styled(LinearProgress, {
|
|
5531
|
-
shouldForwardProp: prop => prop !== 'labelPosition',
|
|
5532
|
-
})(() => ({
|
|
5533
|
-
height: 8,
|
|
5534
|
-
borderRadius: neoDesign.borderRadius.xS,
|
|
5535
|
-
backgroundColor: neoDesign.colors.grey[200],
|
|
5536
|
-
[`& .${LinearProgress.linearProgressClasses.bar}`]: {
|
|
5537
|
-
borderRadius: neoDesign.borderRadius.xS,
|
|
5538
|
-
backgroundColor: neoDesign.colors.digitalBlue[500],
|
|
5539
|
-
},
|
|
5540
|
-
[`&.${LinearProgress.linearProgressClasses.colorPrimary}`]: {
|
|
5541
|
-
backgroundColor: neoDesign.colors.grey[200],
|
|
5542
|
-
[`& .${LinearProgress.linearProgressClasses.bar}`]: {
|
|
5543
|
-
backgroundColor: neoDesign.colors.digitalBlue[500],
|
|
5544
|
-
},
|
|
5545
|
-
},
|
|
5546
|
-
// Cancelled variant uses warning color
|
|
5547
|
-
'&[data-variant="cancelled"]': {
|
|
5548
|
-
[`& .${LinearProgress.linearProgressClasses.bar}`]: {
|
|
5549
|
-
backgroundColor: neoDesign.semanticColors.status.warning.default,
|
|
5550
|
-
},
|
|
5551
|
-
},
|
|
5552
|
-
}));
|
|
5553
|
-
const ProgressWrapper = styles.styled('div')(({ labelPosition }) => ({
|
|
5554
|
-
display: 'flex',
|
|
5555
|
-
width: '100%',
|
|
5556
|
-
...(labelPosition === 'right' && {
|
|
5557
|
-
flexDirection: 'row',
|
|
5558
|
-
alignItems: 'center',
|
|
5559
|
-
gap: neoDesign.spacing.spacing_3,
|
|
5560
|
-
}),
|
|
5561
|
-
...(labelPosition === 'top' && {
|
|
5562
|
-
flexDirection: 'column-reverse',
|
|
5563
|
-
alignItems: 'flex-end',
|
|
5564
|
-
gap: neoDesign.spacing.spacing_2,
|
|
5565
|
-
}),
|
|
5566
|
-
...(labelPosition === 'bottom' && {
|
|
5567
|
-
flexDirection: 'column',
|
|
5568
|
-
alignItems: 'flex-end',
|
|
5569
|
-
gap: neoDesign.spacing.spacing_2,
|
|
5570
|
-
}),
|
|
5571
|
-
...(labelPosition === 'none' && {
|
|
5572
|
-
flexDirection: 'row',
|
|
5573
|
-
}),
|
|
5574
|
-
}));
|
|
5575
|
-
const ProgressLabel = styles.styled(Typography)(({ theme }) => ({
|
|
5576
|
-
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.sm),
|
|
5577
|
-
fontWeight: neoDesign.typography.fontWeight.medium,
|
|
5578
|
-
color: neoDesign.colors.grey[800],
|
|
5579
|
-
lineHeight: 1.4,
|
|
5580
|
-
whiteSpace: 'nowrap',
|
|
5581
|
-
flexShrink: 0,
|
|
5582
|
-
}));
|
|
5583
|
-
const ProgressBarContainer = styles.styled('div')(({ labelPosition }) => ({
|
|
5584
|
-
flexGrow: labelPosition === 'right' ? 1 : 0,
|
|
5585
|
-
width: labelPosition === 'right' ? 'auto' : '100%',
|
|
5586
|
-
}));
|
|
5587
|
-
/**
|
|
5588
|
-
* NeoProgressbar - Linear progress indicator based on MUI LinearProgress
|
|
5589
|
-
*
|
|
5590
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4120-36679
|
|
5591
|
-
*
|
|
5592
|
-
* Figma Props Mapping:
|
|
5593
|
-
* - progress (0%-100% | Cancelled) → value (0-100) + variant (default|cancelled)
|
|
5594
|
-
* - label (False|Right|Top|Bottom) → labelPosition (none|right|top|bottom)
|
|
5595
|
-
*
|
|
5596
|
-
* Design Decisions (from Issue #75):
|
|
5597
|
-
* - MUI Base Component: LinearProgress (provides accessibility, animations, progress tracking)
|
|
5598
|
-
* - Label Positioning: Single labelPosition prop with values 'none', 'right', 'top', 'bottom'
|
|
5599
|
-
* - Cancelled State: Separate variant prop (variant='cancelled') alongside value prop
|
|
5600
|
-
*/
|
|
5601
|
-
const NeoProgressbar = ({ value = 0, labelPosition = 'none', variant = 'default', labelText, ...props }) => {
|
|
5602
|
-
const showLabel = labelPosition !== 'none';
|
|
5603
|
-
const displayLabel = labelText || (variant === 'cancelled' ? 'Canceled' : `${Math.round(value)}%`);
|
|
5604
|
-
return (jsxRuntime.jsxs(ProgressWrapper, { labelPosition: labelPosition, children: [jsxRuntime.jsx(ProgressBarContainer, { labelPosition: labelPosition, children: jsxRuntime.jsx(StyledLinearProgress, { variant: "determinate", value: variant === 'cancelled' ? 100 : value, "data-variant": variant, labelPosition: labelPosition, ...props }) }), showLabel && jsxRuntime.jsx(ProgressLabel, { children: displayLabel })] }));
|
|
5605
|
-
};
|
|
5606
|
-
NeoProgressbar.displayName = 'NeoProgressbar';
|
|
5607
|
-
|
|
5608
5819
|
const StyledTextField = styles.styled(TextField)(({ theme }) => ({
|
|
5609
5820
|
[`& .${InputBase.inputBaseClasses.root}`]: {
|
|
5610
5821
|
height: neoDesign.spacing.spacing_5,
|
|
@@ -5847,6 +6058,13 @@ const NeoRadio = ({ size = 'medium', label, helperText, disabled, ...props }) =>
|
|
|
5847
6058
|
};
|
|
5848
6059
|
NeoRadio.displayName = 'NeoRadio';
|
|
5849
6060
|
|
|
6061
|
+
/**
|
|
6062
|
+
* NeoRadioButtonWithText
|
|
6063
|
+
*
|
|
6064
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=11565-7682
|
|
6065
|
+
*/
|
|
6066
|
+
const NeoRadioButtonWithText = styles.styled('div')({});
|
|
6067
|
+
|
|
5850
6068
|
const StyledSearchChip = styles.styled(InputBase)(({ theme }) => ({
|
|
5851
6069
|
borderRadius: neoDesign.borderRadius.full,
|
|
5852
6070
|
border: `1px solid ${neoDesign.semanticColors.buttons.secondary.defaultBorder}`,
|
|
@@ -5912,6 +6130,38 @@ const NeoSearchChip = ({ onClear, value, ...props }) => {
|
|
|
5912
6130
|
};
|
|
5913
6131
|
NeoSearchChip.displayName = 'NeoSearchChip';
|
|
5914
6132
|
|
|
6133
|
+
/**
|
|
6134
|
+
* NeoSelectField — composite of NeoInputField's form chrome (label,
|
|
6135
|
+
* helper text, error state) wrapped around NeoSelect. Mirrors the
|
|
6136
|
+
* MUI `<TextField select>` ergonomics with Neo design tokens, so
|
|
6137
|
+
* consumers don't have to compose the two manually.
|
|
6138
|
+
*
|
|
6139
|
+
* @example
|
|
6140
|
+
* <NeoSelectField
|
|
6141
|
+
* label="Response format"
|
|
6142
|
+
* value={format}
|
|
6143
|
+
* onChange={e => setFormat(e.target.value)}
|
|
6144
|
+
* options={[
|
|
6145
|
+
* { value: 'json', label: 'JSON' },
|
|
6146
|
+
* { value: 'plain', label: 'Plain text' },
|
|
6147
|
+
* ]}
|
|
6148
|
+
* />
|
|
6149
|
+
*/
|
|
6150
|
+
const NeoSelectField = ({ size = 'medium', destructive = false, label, required = false, infoIcon, helperText, errorMessage, options, children, disabled, id, ...selectProps }) => {
|
|
6151
|
+
const inputId = id || `neo-select-${Math.random().toString(36).substring(7)}`;
|
|
6152
|
+
const helperTextId = helperText || errorMessage ? `${inputId}-helper-text` : undefined;
|
|
6153
|
+
return (jsxRuntime.jsxs(StyledFormControl, { size: size, error: destructive, disabled: disabled, children: [label && (jsxRuntime.jsxs(StyledInputLabel, { htmlFor: inputId, size: size, infoIcon: !!infoIcon, disabled: disabled, error: destructive, shrink: true, children: [label, required && jsxRuntime.jsx("span", { "aria-hidden": "true", children: "*" }), infoIcon && jsxRuntime.jsx(InfoIconWrapper, { children: infoIcon })] })), jsxRuntime.jsx(NeoSelect, { id: inputId, disabled: disabled, error: destructive, "aria-describedby": helperTextId, ...selectProps, children: children ??
|
|
6154
|
+
options?.map(opt => (jsxRuntime.jsx(NeoMenuItem, { value: opt.value, disabled: opt.disabled, children: opt.label }, String(opt.value)))) }), (helperText || errorMessage) && (jsxRuntime.jsx(StyledFormHelperText, { id: helperTextId, error: destructive, disabled: disabled, sx: { marginTop: `${neoDesign.spacing.spacing_3_4}px` }, children: destructive ? errorMessage : helperText }))] }));
|
|
6155
|
+
};
|
|
6156
|
+
NeoSelectField.displayName = 'NeoSelectField';
|
|
6157
|
+
|
|
6158
|
+
/**
|
|
6159
|
+
* NeoSideNav
|
|
6160
|
+
*
|
|
6161
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=4065-3425
|
|
6162
|
+
*/
|
|
6163
|
+
const NeoSideNav = styles.styled('div')({});
|
|
6164
|
+
|
|
5915
6165
|
const StyledSkeleton = styles.styled(Skeleton, {
|
|
5916
6166
|
shouldForwardProp: prop => prop !== 'colorTheme' && prop !== 'position',
|
|
5917
6167
|
})(({ theme, colorTheme = 'light', position = 'start' }) => ({
|
|
@@ -5959,6 +6209,111 @@ const NeoSkeleton = ({ colorTheme = 'light', position = 'start', ...props }) =>
|
|
|
5959
6209
|
};
|
|
5960
6210
|
NeoSkeleton.displayName = 'NeoSkeleton';
|
|
5961
6211
|
|
|
6212
|
+
const sizePadding = {
|
|
6213
|
+
small: `${neoDesign.spacing.spacing_3_4}px ${neoDesign.spacing.spacing_1_1_2}px`,
|
|
6214
|
+
medium: `${neoDesign.spacing.spacing_1_1_2}px ${neoDesign.spacing.spacing_2}px`,
|
|
6215
|
+
};
|
|
6216
|
+
const sizeFontSize = {
|
|
6217
|
+
small: neoDesign.typography.fontSize.xs,
|
|
6218
|
+
medium: neoDesign.typography.fontSize.sm,
|
|
6219
|
+
};
|
|
6220
|
+
const StyledTable = styles.styled(MuiTable, {
|
|
6221
|
+
shouldForwardProp: prop => prop !== 'tableSize',
|
|
6222
|
+
})(({ theme, tableSize = 'small' }) => ({
|
|
6223
|
+
borderCollapse: 'separate',
|
|
6224
|
+
borderSpacing: 0,
|
|
6225
|
+
[`& .${TableCell.tableCellClasses.head}`]: {
|
|
6226
|
+
backgroundColor: neoDesign.colors.grey[50],
|
|
6227
|
+
color: neoDesign.semanticColors.typography.body,
|
|
6228
|
+
fontFamily: neoDesign.typography.fontFamily.body,
|
|
6229
|
+
fontSize: theme.typography.pxToRem(sizeFontSize[tableSize]),
|
|
6230
|
+
fontWeight: neoDesign.typography.fontWeight.semiBold,
|
|
6231
|
+
lineHeight: 1.4,
|
|
6232
|
+
padding: sizePadding[tableSize],
|
|
6233
|
+
borderBottom: `1px solid ${neoDesign.semanticColors.border.secondary}`,
|
|
6234
|
+
},
|
|
6235
|
+
[`& .${TableCell.tableCellClasses.body}`]: {
|
|
6236
|
+
color: neoDesign.semanticColors.typography.body,
|
|
6237
|
+
fontFamily: neoDesign.typography.fontFamily.body,
|
|
6238
|
+
fontSize: theme.typography.pxToRem(sizeFontSize[tableSize]),
|
|
6239
|
+
fontWeight: neoDesign.typography.fontWeight.regular,
|
|
6240
|
+
lineHeight: 1.4,
|
|
6241
|
+
padding: sizePadding[tableSize],
|
|
6242
|
+
borderBottom: `1px solid ${neoDesign.semanticColors.border.secondary}`,
|
|
6243
|
+
},
|
|
6244
|
+
// Drop the trailing row's bottom border so the container border (if
|
|
6245
|
+
// any) is the visual edge.
|
|
6246
|
+
[`& tbody tr:last-of-type .${TableCell.tableCellClasses.body}`]: {
|
|
6247
|
+
borderBottom: 'none',
|
|
6248
|
+
},
|
|
6249
|
+
}));
|
|
6250
|
+
const StyledContainer = styles.styled('div', {
|
|
6251
|
+
shouldForwardProp: prop => prop !== 'tableVariant',
|
|
6252
|
+
})(({ tableVariant = 'bordered' }) => tableVariant === 'bordered'
|
|
6253
|
+
? {
|
|
6254
|
+
border: `1px solid ${neoDesign.semanticColors.border.secondary}`,
|
|
6255
|
+
borderRadius: neoDesign.borderRadius.card,
|
|
6256
|
+
overflow: 'hidden',
|
|
6257
|
+
backgroundColor: neoDesign.semanticColors.surfaces.white,
|
|
6258
|
+
}
|
|
6259
|
+
: { backgroundColor: 'transparent' });
|
|
6260
|
+
/**
|
|
6261
|
+
* NeoTable — lightweight read-only table for static data (schema rows,
|
|
6262
|
+
* key/value summaries, response metadata). For interactive grids with
|
|
6263
|
+
* sorting / filtering / pagination, use NeoDataGrid instead.
|
|
6264
|
+
*
|
|
6265
|
+
* @example
|
|
6266
|
+
* <NeoTable
|
|
6267
|
+
* columns={[
|
|
6268
|
+
* { key: 'name', header: 'Property' },
|
|
6269
|
+
* { key: 'type', header: 'Type', align: 'center', width: '120px' },
|
|
6270
|
+
* { key: 'description', header: 'Description' },
|
|
6271
|
+
* ]}
|
|
6272
|
+
* rows={[
|
|
6273
|
+
* { name: 'id', type: 'string', description: 'Resource identifier' },
|
|
6274
|
+
* { name: 'count', type: 'number', description: 'Item count' },
|
|
6275
|
+
* ]}
|
|
6276
|
+
* size="small"
|
|
6277
|
+
* />
|
|
6278
|
+
*/
|
|
6279
|
+
const NeoTable = ({ columns, rows, size = 'small', variant = 'bordered', ariaLabel, ...tableProps }) => (jsxRuntime.jsx(StyledContainer, { tableVariant: variant, children: jsxRuntime.jsx(TableContainer, { children: jsxRuntime.jsxs(StyledTable, { tableSize: size, "aria-label": ariaLabel, ...tableProps, children: [jsxRuntime.jsx(TableHead, { children: jsxRuntime.jsx(TableRow, { children: columns.map(col => (jsxRuntime.jsx(TableCell, { align: col.align ?? 'left', style: col.width ? { width: col.width } : undefined, children: col.header }, col.key))) }) }), jsxRuntime.jsx(TableBody, { children: rows.map((row, i) => (jsxRuntime.jsx(TableRow, { children: columns.map(col => (jsxRuntime.jsx(TableCell, { align: col.align ?? 'left', children: row[col.key] ?? '' }, col.key))) }, i))) })] }) }) }));
|
|
6280
|
+
NeoTable.displayName = 'NeoTable';
|
|
6281
|
+
|
|
6282
|
+
const StyledTabPanel = styles.styled(Box, {
|
|
6283
|
+
shouldForwardProp: prop => prop !== 'tabPanelVariant',
|
|
6284
|
+
})(({ tabPanelVariant = 'default' }) => ({
|
|
6285
|
+
backgroundColor: neoDesign.semanticColors.surfaces.white,
|
|
6286
|
+
// default: 16px top padding for content-driven pages.
|
|
6287
|
+
// flush: zero padding so content sits directly against the tab bar's
|
|
6288
|
+
// bottom border (sidebars, panels, builders, canvases).
|
|
6289
|
+
padding: 0,
|
|
6290
|
+
...(tabPanelVariant === 'flush' ? {} : { paddingTop: neoDesign.spacing.spacing_2 }),
|
|
6291
|
+
}));
|
|
6292
|
+
/**
|
|
6293
|
+
* NeoTabPanel — completes the NeoTabs + NeoTab + NeoTabPanel set.
|
|
6294
|
+
*
|
|
6295
|
+
* Lightweight ARIA-compliant tab panel that renders children when its
|
|
6296
|
+
* `value` matches `currentValue`. No MUI Lab / TabContext dependency.
|
|
6297
|
+
*
|
|
6298
|
+
* @example
|
|
6299
|
+
* const [tab, setTab] = useState('overview')
|
|
6300
|
+
* return (
|
|
6301
|
+
* <>
|
|
6302
|
+
* <NeoTabs value={tab} onChange={(_, v) => setTab(v)}>
|
|
6303
|
+
* <NeoTab value="overview" label="Overview" />
|
|
6304
|
+
* <NeoTab value="details" label="Details" />
|
|
6305
|
+
* </NeoTabs>
|
|
6306
|
+
* <NeoTabPanel value="overview" currentValue={tab}>...</NeoTabPanel>
|
|
6307
|
+
* <NeoTabPanel value="details" currentValue={tab} variant="flush">...</NeoTabPanel>
|
|
6308
|
+
* </>
|
|
6309
|
+
* )
|
|
6310
|
+
*/
|
|
6311
|
+
const NeoTabPanel = ({ value, currentValue, variant = 'default', children, ...boxProps }) => {
|
|
6312
|
+
const selected = value === currentValue;
|
|
6313
|
+
return (jsxRuntime.jsx(StyledTabPanel, { role: "tabpanel", hidden: !selected, tabPanelVariant: variant, id: `tabpanel-${value}`, "aria-labelledby": `tab-${value}`, ...boxProps, children: selected ? children : null }));
|
|
6314
|
+
};
|
|
6315
|
+
NeoTabPanel.displayName = 'NeoTabPanel';
|
|
6316
|
+
|
|
5962
6317
|
/**
|
|
5963
6318
|
* NeoTabs - Tabs container component based on MUI Tabs
|
|
5964
6319
|
*
|
|
@@ -6338,6 +6693,102 @@ const NeoToggle = ({ size = 'medium', label, helperText, disabled, ...props }) =
|
|
|
6338
6693
|
};
|
|
6339
6694
|
NeoToggle.displayName = 'NeoToggle';
|
|
6340
6695
|
|
|
6696
|
+
const sizeStyles = {
|
|
6697
|
+
small: {
|
|
6698
|
+
height: 24,
|
|
6699
|
+
fontSize: neoDesign.typography.fontSize.xs,
|
|
6700
|
+
},
|
|
6701
|
+
medium: {
|
|
6702
|
+
height: 32,
|
|
6703
|
+
fontSize: neoDesign.typography.fontSize.sm,
|
|
6704
|
+
},
|
|
6705
|
+
};
|
|
6706
|
+
const StyledToggleButton$1 = styles.styled(MuiToggleButton, {
|
|
6707
|
+
shouldForwardProp: prop => prop !== 'toggleSize',
|
|
6708
|
+
})(({ theme, toggleSize = 'medium' }) => ({
|
|
6709
|
+
height: sizeStyles[toggleSize].height,
|
|
6710
|
+
padding: `0 ${neoDesign.spacing.spacing_1_1_2}px`,
|
|
6711
|
+
fontFamily: neoDesign.typography.fontFamily.body,
|
|
6712
|
+
fontSize: theme.typography.pxToRem(sizeStyles[toggleSize].fontSize),
|
|
6713
|
+
fontWeight: neoDesign.typography.fontWeight.regular,
|
|
6714
|
+
lineHeight: 1,
|
|
6715
|
+
color: neoDesign.semanticColors.typography.bodySecondary,
|
|
6716
|
+
backgroundColor: 'transparent',
|
|
6717
|
+
border: 'none',
|
|
6718
|
+
textTransform: 'none',
|
|
6719
|
+
transition: theme.transitions.create(['background-color', 'color'], {
|
|
6720
|
+
duration: theme.transitions.duration.short,
|
|
6721
|
+
}),
|
|
6722
|
+
'&:hover': {
|
|
6723
|
+
backgroundColor: neoDesign.colors.grey[100],
|
|
6724
|
+
color: neoDesign.semanticColors.typography.body,
|
|
6725
|
+
},
|
|
6726
|
+
'&.Mui-selected, &.Mui-selected:hover': {
|
|
6727
|
+
backgroundColor: neoDesign.colors.grey[100],
|
|
6728
|
+
color: neoDesign.semanticColors.typography.body,
|
|
6729
|
+
fontWeight: neoDesign.typography.fontWeight.semiBold,
|
|
6730
|
+
},
|
|
6731
|
+
'&.Mui-focusVisible': {
|
|
6732
|
+
outline: `2px solid ${neoDesign.semanticColors.border.focus}`,
|
|
6733
|
+
outlineOffset: -2,
|
|
6734
|
+
},
|
|
6735
|
+
'&.Mui-disabled': {
|
|
6736
|
+
color: neoDesign.semanticColors.typography.button.disabled,
|
|
6737
|
+
cursor: 'default',
|
|
6738
|
+
pointerEvents: 'none',
|
|
6739
|
+
},
|
|
6740
|
+
}));
|
|
6741
|
+
/**
|
|
6742
|
+
* NeoToggleButton — a single button in a segmented control. Use inside
|
|
6743
|
+
* NeoToggleButtonGroup; the group manages selection state and forwards
|
|
6744
|
+
* size to its children. Suitable for inline toolbar mode switches
|
|
6745
|
+
* ("Table" / "Raw"). For page-level tabs, prefer NeoButtonTab.
|
|
6746
|
+
*/
|
|
6747
|
+
const NeoToggleButton = ({ children, size = 'medium', ...props }) => (jsxRuntime.jsx(StyledToggleButton$1, { toggleSize: size, ...props, children: children }));
|
|
6748
|
+
NeoToggleButton.displayName = 'NeoToggleButton';
|
|
6749
|
+
|
|
6750
|
+
const StyledToggleButtonGroup$1 = styles.styled(MuiToggleButtonGroup)({
|
|
6751
|
+
borderRadius: neoDesign.borderRadius.button,
|
|
6752
|
+
border: `1px solid ${neoDesign.semanticColors.border.secondary}`,
|
|
6753
|
+
overflow: 'hidden',
|
|
6754
|
+
display: 'inline-flex',
|
|
6755
|
+
// Children fill the pill — first/last get the rounded corners, middles
|
|
6756
|
+
// are square. MUI applies positional classes via ToggleButtonGroup
|
|
6757
|
+
// context; we rely on borderRadius inheritance from the container.
|
|
6758
|
+
[`& .${MuiToggleButton.toggleButtonClasses.root}`]: {
|
|
6759
|
+
borderRadius: 0,
|
|
6760
|
+
},
|
|
6761
|
+
});
|
|
6762
|
+
/**
|
|
6763
|
+
* NeoToggleButtonGroup — pill-shaped segmented control wrapping
|
|
6764
|
+
* MUI ToggleButtonGroup with Neo tokens. Use for inline toolbar mode
|
|
6765
|
+
* switches (e.g. "Table" / "Raw" in a panel header). For page-level
|
|
6766
|
+
* tab navigation, prefer NeoButtonTabGroup.
|
|
6767
|
+
*
|
|
6768
|
+
* @example
|
|
6769
|
+
* <NeoToggleButtonGroup value={mode} exclusive onChange={(_, v) => v && setMode(v)} size="small">
|
|
6770
|
+
* <NeoToggleButton value="table">Table</NeoToggleButton>
|
|
6771
|
+
* <NeoToggleButton value="raw">Raw</NeoToggleButton>
|
|
6772
|
+
* </NeoToggleButtonGroup>
|
|
6773
|
+
*/
|
|
6774
|
+
const NeoToggleButtonGroup = ({ size = 'medium', children, ...props }) => {
|
|
6775
|
+
// Forward size to each NeoToggleButton child so consumers don't have to
|
|
6776
|
+
// set it on every button. MUI's group already does this via context for
|
|
6777
|
+
// its own size prop, but our `size` shape doesn't pass through unchanged.
|
|
6778
|
+
const sized = React.Children.map(children, child => React.isValidElement(child) && child.type === NeoToggleButton
|
|
6779
|
+
? React.cloneElement(child, { size })
|
|
6780
|
+
: child);
|
|
6781
|
+
return jsxRuntime.jsx(StyledToggleButtonGroup$1, { ...props, children: sized });
|
|
6782
|
+
};
|
|
6783
|
+
NeoToggleButtonGroup.displayName = 'NeoToggleButtonGroup';
|
|
6784
|
+
|
|
6785
|
+
/**
|
|
6786
|
+
* NeoToggleButtonWithText
|
|
6787
|
+
*
|
|
6788
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=11565-10485
|
|
6789
|
+
*/
|
|
6790
|
+
const NeoToggleButtonWithText = styles.styled('div')({});
|
|
6791
|
+
|
|
6341
6792
|
const StyledToolbar = styles.styled(xDataGrid.Toolbar)(({ theme }) => ({
|
|
6342
6793
|
backgroundColor: neoDesign.semanticColors.surfaces.white,
|
|
6343
6794
|
minHeight: 'auto',
|
|
@@ -6479,6 +6930,20 @@ const NeoTooltip = ({ variant = 'light', title, description, children, arrow = f
|
|
|
6479
6930
|
};
|
|
6480
6931
|
NeoTooltip.displayName = 'NeoTooltip';
|
|
6481
6932
|
|
|
6933
|
+
/**
|
|
6934
|
+
* NeoTopNav
|
|
6935
|
+
*
|
|
6936
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=4618-185228
|
|
6937
|
+
*/
|
|
6938
|
+
const NeoTopNav = styles.styled('div')({});
|
|
6939
|
+
|
|
6940
|
+
/**
|
|
6941
|
+
* NeoTourModal
|
|
6942
|
+
*
|
|
6943
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=12408-1800
|
|
6944
|
+
*/
|
|
6945
|
+
const NeoTourModal = styles.styled('div')({});
|
|
6946
|
+
|
|
6482
6947
|
/**
|
|
6483
6948
|
* Custom label component that reads extra slot data from the item model.
|
|
6484
6949
|
* Used as `slots.label` on the TreeItem.
|
|
@@ -6684,9 +7149,11 @@ NeoTypologyControl.displayName = 'NeoTypologyControl';
|
|
|
6684
7149
|
const version = '0.0.0-development';
|
|
6685
7150
|
|
|
6686
7151
|
exports.CIRCLE_RADIUS = CIRCLE_RADIUS;
|
|
7152
|
+
exports.NeoActionsCell = NeoActionsCell;
|
|
6687
7153
|
exports.NeoActivityHeader = NeoActivityHeader;
|
|
6688
7154
|
exports.NeoActivityIndicatorCell = NeoActivityIndicatorCell;
|
|
6689
7155
|
exports.NeoAlert = NeoAlert;
|
|
7156
|
+
exports.NeoAvatarCell = NeoAvatarCell;
|
|
6690
7157
|
exports.NeoBadge = NeoBadge;
|
|
6691
7158
|
exports.NeoBanner = NeoBanner;
|
|
6692
7159
|
exports.NeoBreadcrumbLink = NeoBreadcrumbLink;
|
|
@@ -6710,6 +7177,8 @@ exports.NeoDataGridFiltersButton = NeoDataGridFiltersButton;
|
|
|
6710
7177
|
exports.NeoDataGridHeaderLabel = NeoDataGridHeaderLabel;
|
|
6711
7178
|
exports.NeoDataGridSelect = NeoSelect;
|
|
6712
7179
|
exports.NeoDatePicker = NeoDatePicker;
|
|
7180
|
+
exports.NeoDatePickerListItem = NeoDatePickerListItem;
|
|
7181
|
+
exports.NeoDatePickerMenu = NeoDatePickerMenu;
|
|
6713
7182
|
exports.NeoDivider = NeoDivider;
|
|
6714
7183
|
exports.NeoDot = NeoDot;
|
|
6715
7184
|
exports.NeoDownloadToast = NeoDownloadToast;
|
|
@@ -6721,12 +7190,14 @@ exports.NeoFilterChip = NeoFilterChip;
|
|
|
6721
7190
|
exports.NeoFooter = NeoFooter;
|
|
6722
7191
|
exports.NeoGeneralAvatar = NeoGeneralAvatar;
|
|
6723
7192
|
exports.NeoIconButton = NeoIconButton;
|
|
7193
|
+
exports.NeoIconCell = NeoIconCell;
|
|
6724
7194
|
exports.NeoIconWrapper = NeoIconWrapper;
|
|
6725
7195
|
exports.NeoInfiniteScrollGrid = NeoInfiniteScrollGrid;
|
|
6726
7196
|
exports.NeoInputField = NeoInputField;
|
|
6727
7197
|
exports.NeoListItem = NeoListItem;
|
|
6728
7198
|
exports.NeoListItemButton = NeoListItemButton;
|
|
6729
7199
|
exports.NeoLoadingSpinner = NeoLoadingSpinner;
|
|
7200
|
+
exports.NeoLogoCell = NeoLogoCell;
|
|
6730
7201
|
exports.NeoMenu = NeoMenu;
|
|
6731
7202
|
exports.NeoMenuItem = NeoMenuItem;
|
|
6732
7203
|
exports.NeoModal = NeoModal;
|
|
@@ -6738,22 +7209,34 @@ exports.NeoNavigationAvatar = NeoNavigationAvatar;
|
|
|
6738
7209
|
exports.NeoNavigationItem = NeoNavigationItem;
|
|
6739
7210
|
exports.NeoPageContent = NeoPageContent;
|
|
6740
7211
|
exports.NeoPaginatedGrid = NeoPaginatedGrid;
|
|
7212
|
+
exports.NeoProgressCell = NeoProgressCell;
|
|
6741
7213
|
exports.NeoProgressbar = NeoProgressbar;
|
|
6742
7214
|
exports.NeoQuickFilter = NeoQuickFilter;
|
|
6743
7215
|
exports.NeoRadio = NeoRadio;
|
|
7216
|
+
exports.NeoRadioButtonWithText = NeoRadioButtonWithText;
|
|
6744
7217
|
exports.NeoSearchChip = NeoSearchChip;
|
|
6745
7218
|
exports.NeoSelect = NeoSelect;
|
|
7219
|
+
exports.NeoSelectField = NeoSelectField;
|
|
6746
7220
|
exports.NeoSelectOption = NeoMenuItem;
|
|
7221
|
+
exports.NeoSideNav = NeoSideNav;
|
|
6747
7222
|
exports.NeoSkeleton = NeoSkeleton;
|
|
6748
7223
|
exports.NeoStatusBadgeCell = NeoStatusBadgeCell;
|
|
7224
|
+
exports.NeoStatusCell = NeoStatusCell;
|
|
6749
7225
|
exports.NeoTab = NeoTab;
|
|
7226
|
+
exports.NeoTabPanel = NeoTabPanel;
|
|
7227
|
+
exports.NeoTable = NeoTable;
|
|
6750
7228
|
exports.NeoTabs = NeoTabs;
|
|
6751
7229
|
exports.NeoTag = NeoTag;
|
|
6752
7230
|
exports.NeoToast = NeoToast;
|
|
6753
7231
|
exports.NeoToastButton = NeoToastButton;
|
|
6754
7232
|
exports.NeoToggle = NeoToggle;
|
|
7233
|
+
exports.NeoToggleButton = NeoToggleButton;
|
|
7234
|
+
exports.NeoToggleButtonGroup = NeoToggleButtonGroup;
|
|
7235
|
+
exports.NeoToggleButtonWithText = NeoToggleButtonWithText;
|
|
6755
7236
|
exports.NeoToolbar = NeoToolbar;
|
|
6756
7237
|
exports.NeoTooltip = NeoTooltip;
|
|
7238
|
+
exports.NeoTopNav = NeoTopNav;
|
|
7239
|
+
exports.NeoTourModal = NeoTourModal;
|
|
6757
7240
|
exports.NeoTreeItem = NeoTreeItem;
|
|
6758
7241
|
exports.NeoTreeView = NeoTreeView;
|
|
6759
7242
|
exports.NeoTypologyButton = StyledToggleButton;
|
|
@@ -6764,6 +7247,7 @@ exports.SortedDescendingIcon = SortedDescendingIcon;
|
|
|
6764
7247
|
exports.UnsortedIcon = UnsortedIcon;
|
|
6765
7248
|
exports.focusRingStyles = focusRingStyles;
|
|
6766
7249
|
exports.getDataGridHeaderStyles = getDataGridHeaderStyles;
|
|
7250
|
+
exports.getDataGridRowStyles = getDataGridRowStyles;
|
|
6767
7251
|
exports.neoRowHeights = neoRowHeights;
|
|
6768
7252
|
exports.version = version;
|
|
6769
7253
|
//# sourceMappingURL=index.js.map
|