@moderneinc/neo-styled-components 4.0.0-next.e0896f → 4.0.0
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/Button/Button.d.ts +2 -4
- package/dist/Checkbox/Checkbox.d.ts +1 -1
- package/dist/CheckboxWithText/CheckboxWithText.d.ts +40 -0
- package/dist/DataGridCell/DataGridCell.d.ts +1 -1
- package/dist/DatePickerListItem/DatePickerListItem.d.ts +26 -0
- package/dist/DatePickerMenu/DatePickerMenu.d.ts +26 -0
- package/dist/Dot/Dot.d.ts +1 -1
- package/dist/RadioButtonWithText/RadioButtonWithText.d.ts +26 -0
- package/dist/Toast/Toast.d.ts +1 -1
- package/dist/ToggleButton/ToggleButton.d.ts +26 -0
- package/dist/ToggleButtonWithText/ToggleButtonWithText.d.ts +26 -0
- package/dist/{NavItem/NavItem.d.ts → TourModal/TourModal.d.ts} +6 -6
- package/dist/index.d.ts +105 -62
- package/dist/index.esm.js +89 -229
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +89 -228
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/Avatar/Avatar.d.ts +0 -51
package/dist/index.js
CHANGED
|
@@ -4,8 +4,8 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
4
4
|
var neoDesign = require('@moderneinc/neo-design');
|
|
5
5
|
var Box = require('@mui/material/Box');
|
|
6
6
|
var styles = require('@mui/material/styles');
|
|
7
|
-
var Avatar = require('@mui/material/Avatar');
|
|
8
7
|
var Chip = require('@mui/material/Chip');
|
|
8
|
+
var MuiAvatar = require('@mui/material/Avatar');
|
|
9
9
|
var SvgIcon = require('@mui/material/SvgIcon');
|
|
10
10
|
var Alert = require('@mui/material/Alert');
|
|
11
11
|
var ButtonBase = require('@mui/material/ButtonBase');
|
|
@@ -64,129 +64,6 @@ var hooks = require('@mui/x-tree-view/hooks');
|
|
|
64
64
|
var TreeItem = require('@mui/x-tree-view/TreeItem');
|
|
65
65
|
var RichTreeViewPro = require('@mui/x-tree-view-pro/RichTreeViewPro');
|
|
66
66
|
|
|
67
|
-
/**
|
|
68
|
-
* Outline-based focus ring styles derived from Neo border tokens.
|
|
69
|
-
* Uses CSS outline (not box-shadow) so focus rings are never clipped by overflow:hidden.
|
|
70
|
-
*
|
|
71
|
-
* Produces a double-ring effect: a white inner gap (via outline-offset) and a colored outer ring.
|
|
72
|
-
*/
|
|
73
|
-
const focusRingStyles = {
|
|
74
|
-
outline: `2px solid ${neoDesign.semanticColors.border.focus}`,
|
|
75
|
-
outlineOffset: '2px',
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
// biome-ignore lint/suspicious/noExplicitAny: Type cast required to override MUI Avatar variant type without global augmentation
|
|
79
|
-
const StyledAvatar$1 = styles.styled(Avatar, {
|
|
80
|
-
shouldForwardProp: prop => prop !== 'size' && prop !== 'variant',
|
|
81
|
-
})(({ theme, size = 'medium', variant = 'circular' }) => ({
|
|
82
|
-
boxSizing: 'border-box',
|
|
83
|
-
borderRadius: neoDesign.borderRadius.full,
|
|
84
|
-
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.xs),
|
|
85
|
-
fontWeight: neoDesign.typography.fontWeight.regular,
|
|
86
|
-
lineHeight: 1.5,
|
|
87
|
-
// Size variants — dimensions match Figma bounding boxes (border-box)
|
|
88
|
-
...(size === 'small' &&
|
|
89
|
-
variant === 'circular' && {
|
|
90
|
-
width: neoDesign.spacing.spacing_4,
|
|
91
|
-
height: neoDesign.spacing.spacing_4,
|
|
92
|
-
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.xs),
|
|
93
|
-
}),
|
|
94
|
-
...(size === 'small' &&
|
|
95
|
-
variant === 'initials' && {
|
|
96
|
-
width: neoDesign.spacing.spacing_2_1_2,
|
|
97
|
-
height: neoDesign.spacing.spacing_2_1_2,
|
|
98
|
-
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.xs),
|
|
99
|
-
}),
|
|
100
|
-
// Medium circular fills its AvatarContainer (container owns the 44px dimension)
|
|
101
|
-
...(size === 'medium' &&
|
|
102
|
-
variant === 'circular' && {
|
|
103
|
-
width: '100%',
|
|
104
|
-
height: '100%',
|
|
105
|
-
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.sm),
|
|
106
|
-
}),
|
|
107
|
-
// Medium initials has no container, so it owns its 44px dimension
|
|
108
|
-
...(size === 'medium' &&
|
|
109
|
-
variant === 'initials' && {
|
|
110
|
-
width: neoDesign.spacing.spacing_5_1_2,
|
|
111
|
-
height: neoDesign.spacing.spacing_5_1_2,
|
|
112
|
-
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.sm),
|
|
113
|
-
}),
|
|
114
|
-
// Initials variant styling
|
|
115
|
-
...(variant === 'initials' && {
|
|
116
|
-
backgroundColor: neoDesign.colors.violet[100],
|
|
117
|
-
color: neoDesign.semanticColors.icons.default,
|
|
118
|
-
border: `1px solid ${neoDesign.semanticColors.icons.default}`,
|
|
119
|
-
}),
|
|
120
|
-
// Circular variant (image) styling
|
|
121
|
-
...(variant === 'circular' && {
|
|
122
|
-
backgroundColor: 'transparent',
|
|
123
|
-
border: `2px solid ${neoDesign.semanticColors.surfaces.white}`,
|
|
124
|
-
}),
|
|
125
|
-
'&:focus-visible': {
|
|
126
|
-
...focusRingStyles,
|
|
127
|
-
},
|
|
128
|
-
}));
|
|
129
|
-
const AvatarContainer = styles.styled(Box)(({ size = 'medium' }) => ({
|
|
130
|
-
boxSizing: 'border-box',
|
|
131
|
-
...(size === 'medium' && {
|
|
132
|
-
width: neoDesign.spacing.spacing_5_1_2,
|
|
133
|
-
height: neoDesign.spacing.spacing_5_1_2,
|
|
134
|
-
backgroundColor: neoDesign.semanticColors.surfaces.white,
|
|
135
|
-
borderRadius: neoDesign.borderRadius.full,
|
|
136
|
-
padding: neoDesign.spacing.spacing_1_4,
|
|
137
|
-
display: 'flex',
|
|
138
|
-
alignItems: 'center',
|
|
139
|
-
justifyContent: 'center',
|
|
140
|
-
overflow: 'hidden',
|
|
141
|
-
boxShadow: `${neoDesign.shadows.neutral.small.x}px ${neoDesign.shadows.neutral.small.y}px ${neoDesign.shadows.neutral.small.blur}px ${neoDesign.shadows.neutral.small.spread}px ${neoDesign.shadows.neutral.small.shadow}`,
|
|
142
|
-
}),
|
|
143
|
-
'&:focus-within': {
|
|
144
|
-
...focusRingStyles,
|
|
145
|
-
},
|
|
146
|
-
}));
|
|
147
|
-
/**
|
|
148
|
-
* NeoAvatar - User avatar component based on MUI Avatar
|
|
149
|
-
*
|
|
150
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=9600-185
|
|
151
|
-
*
|
|
152
|
-
* Figma Props Mapping:
|
|
153
|
-
* - Figma Type "Initials" → variant="initials", size="small" (20px)
|
|
154
|
-
* - Figma Type "Small" → variant="circular", size="small" (32px with image)
|
|
155
|
-
* - Figma Type "Medium" → variant="circular", size="medium" (44px white container with image)
|
|
156
|
-
* - State: Focus → CSS :focus-visible ring (2px white inner + 4px blue outer)
|
|
157
|
-
* - State: Hover (tooltip) → Wrap component with MUI Tooltip
|
|
158
|
-
*
|
|
159
|
-
* Usage:
|
|
160
|
-
* ```tsx
|
|
161
|
-
* // Medium image avatar (with white container)
|
|
162
|
-
* <NeoAvatar variant="circular" size="medium" src="/avatar.jpg" alt="User" />
|
|
163
|
-
*
|
|
164
|
-
* // Small image avatar (no container)
|
|
165
|
-
* <NeoAvatar variant="circular" size="small" src="/avatar.jpg" alt="User" />
|
|
166
|
-
*
|
|
167
|
-
* // Small initials avatar
|
|
168
|
-
* <NeoAvatar variant="initials" size="small">A</NeoAvatar>
|
|
169
|
-
*
|
|
170
|
-
* // Medium initials avatar
|
|
171
|
-
* <NeoAvatar variant="initials" size="medium">AB</NeoAvatar>
|
|
172
|
-
*
|
|
173
|
-
* // With tooltip (user wraps)
|
|
174
|
-
* <Tooltip title="This is a tooltip" arrow placement="top">
|
|
175
|
-
* <NeoAvatar variant="initials">A</NeoAvatar>
|
|
176
|
-
* </Tooltip>
|
|
177
|
-
* ```
|
|
178
|
-
*/
|
|
179
|
-
const NeoAvatar = ({ size = 'medium', variant = 'circular', ...props }) => {
|
|
180
|
-
// shouldForwardProp filters out size and variant from being passed to the DOM
|
|
181
|
-
const avatar = jsxRuntime.jsx(StyledAvatar$1, { size: size, variant: variant, ...props });
|
|
182
|
-
// Medium size with circular variant (image) gets wrapped in white container
|
|
183
|
-
if (size === 'medium' && variant === 'circular') {
|
|
184
|
-
return jsxRuntime.jsx(AvatarContainer, { size: size, children: avatar });
|
|
185
|
-
}
|
|
186
|
-
return avatar;
|
|
187
|
-
};
|
|
188
|
-
NeoAvatar.displayName = 'NeoAvatar';
|
|
189
|
-
|
|
190
67
|
const StyledChip$2 = styles.styled(Chip)(({ theme }) => ({
|
|
191
68
|
height: 24,
|
|
192
69
|
paddingTop: neoDesign.spacing.spacing_1_4,
|
|
@@ -278,6 +155,67 @@ const NeoBadge = (props) => {
|
|
|
278
155
|
};
|
|
279
156
|
NeoBadge.displayName = 'NeoBadge';
|
|
280
157
|
|
|
158
|
+
/**
|
|
159
|
+
* Shared color palette for avatar components (GeneralAvatar, NavigationAvatar).
|
|
160
|
+
* Maps color index (1-7) to background color token pairs.
|
|
161
|
+
*/
|
|
162
|
+
const avatarColorPalette = {
|
|
163
|
+
1: { bg: neoDesign.colors.digitalBlue[100] },
|
|
164
|
+
2: { bg: neoDesign.colors.digitalGreen[100] },
|
|
165
|
+
3: { bg: neoDesign.colors.gold[100] },
|
|
166
|
+
4: { bg: neoDesign.colors.red[100] },
|
|
167
|
+
5: { bg: neoDesign.colors.violet[100] },
|
|
168
|
+
6: { bg: neoDesign.colors.tealGreen[100] },
|
|
169
|
+
7: { bg: neoDesign.colors.orange[100] },
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Outline-based focus ring styles derived from Neo border tokens.
|
|
174
|
+
* Uses CSS outline (not box-shadow) so focus rings are never clipped by overflow:hidden.
|
|
175
|
+
*
|
|
176
|
+
* Produces a double-ring effect: a white inner gap (via outline-offset) and a colored outer ring.
|
|
177
|
+
*/
|
|
178
|
+
const focusRingStyles = {
|
|
179
|
+
outline: `2px solid ${neoDesign.semanticColors.border.focus}`,
|
|
180
|
+
outlineOffset: '2px',
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
const sizeConfig$1 = {
|
|
184
|
+
small: { width: neoDesign.spacing.spacing_4, height: neoDesign.spacing.spacing_4, fontSize: neoDesign.typography.fontSize.xs },
|
|
185
|
+
medium: { width: neoDesign.spacing.spacing_5, height: neoDesign.spacing.spacing_5, fontSize: neoDesign.typography.fontSize.sm },
|
|
186
|
+
};
|
|
187
|
+
const StyledAvatar = styles.styled(MuiAvatar, {
|
|
188
|
+
shouldForwardProp: prop => prop !== 'avatarSize' && prop !== 'colorIndex',
|
|
189
|
+
})(({ theme, avatarSize, colorIndex }) => {
|
|
190
|
+
const size = sizeConfig$1[avatarSize];
|
|
191
|
+
const palette = avatarColorPalette[colorIndex];
|
|
192
|
+
return {
|
|
193
|
+
boxSizing: 'border-box',
|
|
194
|
+
width: size.width,
|
|
195
|
+
height: size.height,
|
|
196
|
+
fontSize: theme.typography.pxToRem(size.fontSize),
|
|
197
|
+
fontFamily: neoDesign.typography.fontFamily.body,
|
|
198
|
+
fontWeight: neoDesign.typography.fontWeight.regular,
|
|
199
|
+
lineHeight: 1,
|
|
200
|
+
color: neoDesign.semanticColors.typography.body,
|
|
201
|
+
backgroundColor: palette ? palette.bg : undefined,
|
|
202
|
+
border: `1px solid ${neoDesign.semanticColors.border.primary}`,
|
|
203
|
+
'&:focus-visible': {
|
|
204
|
+
...focusRingStyles,
|
|
205
|
+
borderColor: neoDesign.semanticColors.border.focus,
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
});
|
|
209
|
+
/**
|
|
210
|
+
* NeoGeneralAvatar - Avatar with image or colored initials display
|
|
211
|
+
*
|
|
212
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=9600-185
|
|
213
|
+
*/
|
|
214
|
+
const NeoGeneralAvatar = ({ size = 'medium', colorIndex = 0, children, ...props }) => {
|
|
215
|
+
return (jsxRuntime.jsx(StyledAvatar, { avatarSize: size, colorIndex: colorIndex, ...props, children: children }));
|
|
216
|
+
};
|
|
217
|
+
NeoGeneralAvatar.displayName = 'NeoGeneralAvatar';
|
|
218
|
+
|
|
281
219
|
/**
|
|
282
220
|
* Base styled container for DataGrid cell content that needs flex layout
|
|
283
221
|
*/
|
|
@@ -313,7 +251,7 @@ const CellContentContainer = styles.styled('div')({
|
|
|
313
251
|
* // Avatar with text
|
|
314
252
|
* renderCell: (params) => (
|
|
315
253
|
* <NeoDataGridCellContent>
|
|
316
|
-
* <
|
|
254
|
+
* <NeoGeneralAvatar src={params.row.avatarUrl} />
|
|
317
255
|
* <span>{params.row.name}</span>
|
|
318
256
|
* </NeoDataGridCellContent>
|
|
319
257
|
* )
|
|
@@ -364,7 +302,7 @@ const NeoStatusBadgeCell = ({ status, colorMap }) => {
|
|
|
364
302
|
};
|
|
365
303
|
NeoStatusBadgeCell.displayName = 'NeoStatusBadgeCell';
|
|
366
304
|
const NeoUserAvatarCell = ({ name, avatarUrl, size = 'small' }) => {
|
|
367
|
-
return (jsxRuntime.jsxs(NeoDataGridCellContent, { children: [jsxRuntime.jsx(
|
|
305
|
+
return (jsxRuntime.jsxs(NeoDataGridCellContent, { children: [jsxRuntime.jsx(NeoGeneralAvatar, { size: size, alt: name, src: avatarUrl }), jsxRuntime.jsx("span", { style: { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }, children: name })] }));
|
|
368
306
|
};
|
|
369
307
|
NeoUserAvatarCell.displayName = 'NeoUserAvatarCell';
|
|
370
308
|
/**
|
|
@@ -1352,48 +1290,6 @@ const StyledButtonBase$1 = styles.styled(ButtonBase, {
|
|
|
1352
1290
|
},
|
|
1353
1291
|
}),
|
|
1354
1292
|
},
|
|
1355
|
-
link: {
|
|
1356
|
-
backgroundColor: 'transparent',
|
|
1357
|
-
color: neoDesign.semanticColors.buttons.tertiary.default,
|
|
1358
|
-
border: 'none',
|
|
1359
|
-
padding: `0 ${theme.spacing(1)}`,
|
|
1360
|
-
'&:hover': {
|
|
1361
|
-
backgroundColor: 'transparent',
|
|
1362
|
-
color: neoDesign.semanticColors.buttons.tertiary.hover,
|
|
1363
|
-
},
|
|
1364
|
-
'&:active': {
|
|
1365
|
-
color: neoDesign.semanticColors.buttons.tertiary.pressed,
|
|
1366
|
-
},
|
|
1367
|
-
...(loading
|
|
1368
|
-
? {}
|
|
1369
|
-
: {
|
|
1370
|
-
[`&.${ButtonBase.buttonBaseClasses.disabled}`]: {
|
|
1371
|
-
backgroundColor: 'transparent',
|
|
1372
|
-
color: neoDesign.semanticColors.buttons.tertiary.disabled,
|
|
1373
|
-
},
|
|
1374
|
-
}),
|
|
1375
|
-
},
|
|
1376
|
-
linkColor: {
|
|
1377
|
-
backgroundColor: 'transparent',
|
|
1378
|
-
color: neoDesign.semanticColors.buttons.primary.default,
|
|
1379
|
-
border: 'none',
|
|
1380
|
-
padding: `0 ${theme.spacing(1)}`,
|
|
1381
|
-
'&:hover': {
|
|
1382
|
-
backgroundColor: 'transparent',
|
|
1383
|
-
color: neoDesign.semanticColors.buttons.primary.hover,
|
|
1384
|
-
},
|
|
1385
|
-
'&:active': {
|
|
1386
|
-
color: neoDesign.semanticColors.buttons.primary.pressed,
|
|
1387
|
-
},
|
|
1388
|
-
...(loading
|
|
1389
|
-
? {}
|
|
1390
|
-
: {
|
|
1391
|
-
[`&.${ButtonBase.buttonBaseClasses.disabled}`]: {
|
|
1392
|
-
backgroundColor: 'transparent',
|
|
1393
|
-
color: neoDesign.semanticColors.buttons.tertiary.disabled,
|
|
1394
|
-
},
|
|
1395
|
-
}),
|
|
1396
|
-
},
|
|
1397
1293
|
tertiary: {
|
|
1398
1294
|
backgroundColor: 'transparent',
|
|
1399
1295
|
color: neoDesign.semanticColors.typography.input.default,
|
|
@@ -1428,8 +1324,6 @@ const LoadingSpinner = styles.styled(CircularProgress)(({ theme, $variant }) =>
|
|
|
1428
1324
|
primary: theme.palette.common.white,
|
|
1429
1325
|
secondary: neoDesign.semanticColors.buttons.primary.default,
|
|
1430
1326
|
destructive: theme.palette.common.white,
|
|
1431
|
-
link: neoDesign.semanticColors.buttons.primary.default,
|
|
1432
|
-
linkColor: neoDesign.semanticColors.buttons.primary.default,
|
|
1433
1327
|
tertiary: neoDesign.semanticColors.buttons.tertiary.default,
|
|
1434
1328
|
};
|
|
1435
1329
|
return {
|
|
@@ -1442,7 +1336,7 @@ const LoadingSpinner = styles.styled(CircularProgress)(({ theme, $variant }) =>
|
|
|
1442
1336
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4086-7590
|
|
1443
1337
|
*
|
|
1444
1338
|
* Figma Props Mapping:
|
|
1445
|
-
* - Hierarchy (Primary|Secondary|Destructive|
|
|
1339
|
+
* - Hierarchy (Primary|Secondary|Destructive|Tertiary) → variant prop
|
|
1446
1340
|
* - Size (Small|Medium) → size prop
|
|
1447
1341
|
* - State=Disabled → disabled prop
|
|
1448
1342
|
* - State=Loading → loading prop
|
|
@@ -1941,7 +1835,7 @@ const StyledCheckbox = styles.styled(Checkbox, {
|
|
|
1941
1835
|
* Figma Props Mapping:
|
|
1942
1836
|
* - Checked (True|False) → checked prop
|
|
1943
1837
|
* - Indeterminate (True|False) → indeterminate prop
|
|
1944
|
-
* - Size (
|
|
1838
|
+
* - Size (Extra Small|Small|Medium) → size prop (xs|small|medium)
|
|
1945
1839
|
* - State=Default → default state
|
|
1946
1840
|
* - State=Hover → CSS :hover
|
|
1947
1841
|
* - State=Focused → CSS :focus-visible
|
|
@@ -1993,6 +1887,22 @@ const NeoCheckbox = ({ size = 'medium', label, helperText, disabled, icon, check
|
|
|
1993
1887
|
};
|
|
1994
1888
|
NeoCheckbox.displayName = 'NeoCheckbox';
|
|
1995
1889
|
|
|
1890
|
+
/**
|
|
1891
|
+
* NeoCheckboxWithText - Checkbox with label and supporting text
|
|
1892
|
+
*
|
|
1893
|
+
* Thin wrapper around NeoCheckbox that maps the Figma "Checkbox with text"
|
|
1894
|
+
* component to the existing NeoCheckbox with label + helperText.
|
|
1895
|
+
*
|
|
1896
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=12125-162
|
|
1897
|
+
*
|
|
1898
|
+
* Figma Props Mapping:
|
|
1899
|
+
* - Property 1 (Medium|Small) → size ('medium'|'small')
|
|
1900
|
+
*/
|
|
1901
|
+
const NeoCheckboxWithText = ({ size = 'small', ...props }) => {
|
|
1902
|
+
return jsxRuntime.jsx(NeoCheckbox, { size: size, ...props });
|
|
1903
|
+
};
|
|
1904
|
+
NeoCheckboxWithText.displayName = 'NeoCheckboxWithText';
|
|
1905
|
+
|
|
1996
1906
|
const StyledButtonBase = styles.styled(ButtonBase, {
|
|
1997
1907
|
shouldForwardProp: prop => prop !== 'isMultiline' && prop !== 'variant' && prop !== 'size',
|
|
1998
1908
|
})(({ theme, variant = 'outlined', size = 'small', isMultiline = false }) => {
|
|
@@ -2962,7 +2872,7 @@ const StyledChip$1 = styles.styled(Chip)(({ theme, size, variant, color }) => ({
|
|
|
2962
2872
|
* - Intent (Neutral|Error|Warning|Success|Info|Violet|Beta) → intent (default|error|warning|success|info|violet|beta)
|
|
2963
2873
|
* - TEXT Label → label prop
|
|
2964
2874
|
*/
|
|
2965
|
-
function NeoTag({ size = 'small', variant = 'outlined', intent, ...props }) {
|
|
2875
|
+
function NeoTag({ size = 'small', variant = 'outlined', intent = 'default', ...props }) {
|
|
2966
2876
|
return jsxRuntime.jsx(StyledChip$1, { size: size, variant: variant, color: intent, ...props });
|
|
2967
2877
|
}
|
|
2968
2878
|
NeoTag.displayName = 'NeoTag';
|
|
@@ -2984,7 +2894,7 @@ function NeoDataGridFiltersButton() {
|
|
|
2984
2894
|
const filterModel = xDataGridPro.useGridSelector(apiRef, xDataGridPro.gridFilterModelSelector);
|
|
2985
2895
|
const activeFilters = filterModel.items.filter(item => item.value != null && item.value !== '');
|
|
2986
2896
|
const filterCount = activeFilters.length;
|
|
2987
|
-
return (jsxRuntime.jsx(xDataGridPro.FilterPanelTrigger, { render: jsxRuntime.jsx(xDataGridPro.ToolbarButton, { render: jsxRuntime.jsxs(NeoButton, { variant: "secondary", size: "small", children: [jsxRuntime.jsx(ListFilter, { size: 16, color: neoDesign.semanticColors.buttons.primary.default }), "Filters", filterCount > 0 && (jsxRuntime.jsx(NeoTag, { size: "medium", variant: "filled",
|
|
2897
|
+
return (jsxRuntime.jsx(xDataGridPro.FilterPanelTrigger, { render: jsxRuntime.jsx(xDataGridPro.ToolbarButton, { render: jsxRuntime.jsxs(NeoButton, { variant: "secondary", size: "small", children: [jsxRuntime.jsx(ListFilter, { size: 16, color: neoDesign.semanticColors.buttons.primary.default }), "Filters", filterCount > 0 && (jsxRuntime.jsx(NeoTag, { size: "medium", variant: "filled", intent: "info", label: String(filterCount) }))] }) }) }));
|
|
2988
2898
|
}
|
|
2989
2899
|
NeoDataGridFiltersButton.displayName = 'NeoDataGridFiltersButton';
|
|
2990
2900
|
|
|
@@ -3896,7 +3806,7 @@ const StyledBadge = styles.styled(Badge)(({ ownerState }) => {
|
|
|
3896
3806
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4163-3577
|
|
3897
3807
|
*
|
|
3898
3808
|
* Figma Props Mapping:
|
|
3899
|
-
* -
|
|
3809
|
+
* - Size (Small|Medium|Large) → size prop (small|medium|large)
|
|
3900
3810
|
* - outline (False|True) → variant prop (solid|outline)
|
|
3901
3811
|
* - Color is configurable via color prop (success|error|warning|info|neutral)
|
|
3902
3812
|
*/
|
|
@@ -4346,56 +4256,6 @@ const NeoFooter = ({ variant = 'pagination', showShadow = false, loading = false
|
|
|
4346
4256
|
};
|
|
4347
4257
|
NeoFooter.displayName = 'NeoFooter';
|
|
4348
4258
|
|
|
4349
|
-
/**
|
|
4350
|
-
* Shared color palette for avatar components (GeneralAvatar, NavigationAvatar).
|
|
4351
|
-
* Maps color index (1-7) to background color token pairs.
|
|
4352
|
-
*/
|
|
4353
|
-
const avatarColorPalette = {
|
|
4354
|
-
1: { bg: neoDesign.colors.digitalBlue[100] },
|
|
4355
|
-
2: { bg: neoDesign.colors.digitalGreen[100] },
|
|
4356
|
-
3: { bg: neoDesign.colors.gold[100] },
|
|
4357
|
-
4: { bg: neoDesign.colors.red[100] },
|
|
4358
|
-
5: { bg: neoDesign.colors.violet[100] },
|
|
4359
|
-
6: { bg: neoDesign.colors.tealGreen[100] },
|
|
4360
|
-
7: { bg: neoDesign.colors.orange[100] },
|
|
4361
|
-
};
|
|
4362
|
-
|
|
4363
|
-
const sizeConfig$1 = {
|
|
4364
|
-
small: { width: neoDesign.spacing.spacing_4, height: neoDesign.spacing.spacing_4, fontSize: neoDesign.typography.fontSize.xs },
|
|
4365
|
-
medium: { width: neoDesign.spacing.spacing_5, height: neoDesign.spacing.spacing_5, fontSize: neoDesign.typography.fontSize.sm },
|
|
4366
|
-
};
|
|
4367
|
-
const StyledAvatar = styles.styled(Avatar, {
|
|
4368
|
-
shouldForwardProp: prop => prop !== 'avatarSize' && prop !== 'colorIndex',
|
|
4369
|
-
})(({ theme, avatarSize, colorIndex }) => {
|
|
4370
|
-
const size = sizeConfig$1[avatarSize];
|
|
4371
|
-
const palette = avatarColorPalette[colorIndex];
|
|
4372
|
-
return {
|
|
4373
|
-
boxSizing: 'border-box',
|
|
4374
|
-
width: size.width,
|
|
4375
|
-
height: size.height,
|
|
4376
|
-
fontSize: theme.typography.pxToRem(size.fontSize),
|
|
4377
|
-
fontFamily: neoDesign.typography.fontFamily.body,
|
|
4378
|
-
fontWeight: neoDesign.typography.fontWeight.regular,
|
|
4379
|
-
lineHeight: 1,
|
|
4380
|
-
color: neoDesign.semanticColors.typography.body,
|
|
4381
|
-
backgroundColor: palette ? palette.bg : undefined,
|
|
4382
|
-
border: `1px solid ${neoDesign.semanticColors.border.primary}`,
|
|
4383
|
-
'&:focus-visible': {
|
|
4384
|
-
...focusRingStyles,
|
|
4385
|
-
borderColor: neoDesign.semanticColors.border.focus,
|
|
4386
|
-
},
|
|
4387
|
-
};
|
|
4388
|
-
});
|
|
4389
|
-
/**
|
|
4390
|
-
* NeoGeneralAvatar - Avatar with image or colored initials display
|
|
4391
|
-
*
|
|
4392
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=9600-185
|
|
4393
|
-
*/
|
|
4394
|
-
const NeoGeneralAvatar = ({ size = 'medium', colorIndex = 0, children, ...props }) => {
|
|
4395
|
-
return (jsxRuntime.jsx(StyledAvatar, { avatarSize: size, colorIndex: colorIndex, ...props, children: children }));
|
|
4396
|
-
};
|
|
4397
|
-
NeoGeneralAvatar.displayName = 'NeoGeneralAvatar';
|
|
4398
|
-
|
|
4399
4259
|
const customProps$1 = ['iconSize'];
|
|
4400
4260
|
const StyledIconWrapper = styles.styled('div', {
|
|
4401
4261
|
shouldForwardProp: prop => !customProps$1.includes(prop),
|
|
@@ -6166,7 +6026,7 @@ const TabLabelContainer = styles.styled('span')(({ theme }) => ({
|
|
|
6166
6026
|
* - Text label → label prop
|
|
6167
6027
|
*/
|
|
6168
6028
|
const NeoTab = ({ label, count, ...props }) => {
|
|
6169
|
-
const tabLabel = count !== undefined ? (jsxRuntime.jsxs(TabLabelContainer, { children: [label, jsxRuntime.jsx(NeoTag, { label: String(count), size: "large", variant: "outlined",
|
|
6029
|
+
const tabLabel = count !== undefined ? (jsxRuntime.jsxs(TabLabelContainer, { children: [label, jsxRuntime.jsx(NeoTag, { label: String(count), size: "large", variant: "outlined", intent: "default" })] })) : (label);
|
|
6170
6030
|
return jsxRuntime.jsx(StyledTab, { label: tabLabel, ...props });
|
|
6171
6031
|
};
|
|
6172
6032
|
NeoTab.displayName = 'NeoTab';
|
|
@@ -6287,7 +6147,7 @@ const ToastButton = styles.styled(Button, {
|
|
|
6287
6147
|
const NeoToast = ({ intent = 'neutral', type = 'outlined', title, message, showClose = false, actions, onClose, ...props }) => {
|
|
6288
6148
|
const palette = intentColors[intent];
|
|
6289
6149
|
const closeIconColor = type === 'filled' ? neoDesign.semanticColors.surfaces.white : palette.default;
|
|
6290
|
-
return (jsxRuntime.jsxs(StyledAlert, { ...props, intent: intent, toastType: type, action: showClose ? (jsxRuntime.jsx(IconButton, { size: "small", onClick: onClose, sx: { color: closeIconColor }, children: jsxRuntime.jsx(X, { size: 16 }) })) : undefined, children: [jsxRuntime.jsxs(Stack, { sx: { gap: `${neoDesign.spacing.spacing_1}px`, width: '100%' }, children: [title && jsxRuntime.jsx(ToastTitle, { intent: intent, toastType: type, children: title }), message && jsxRuntime.jsx(ToastMessage, { intent: intent, toastType: type, children: message })] }), actions && jsxRuntime.jsx(ToastActions, { direction: "row", children: actions })] }));
|
|
6150
|
+
return (jsxRuntime.jsxs(StyledAlert, { ...props, intent: intent, toastType: type, action: showClose ? (jsxRuntime.jsx(IconButton, { size: "small", onClick: onClose, sx: { color: closeIconColor }, children: jsxRuntime.jsx(X, { size: 16 }) })) : undefined, children: [jsxRuntime.jsxs(Stack, { sx: { gap: `${neoDesign.spacing.spacing_1}px`, width: '100%' }, children: [title && (jsxRuntime.jsx(ToastTitle, { intent: intent, toastType: type, children: title })), message && (jsxRuntime.jsx(ToastMessage, { intent: intent, toastType: type, children: message }))] }), actions && jsxRuntime.jsx(ToastActions, { direction: "row", children: actions })] }));
|
|
6291
6151
|
};
|
|
6292
6152
|
/**
|
|
6293
6153
|
* Helper component for creating toast action buttons with proper styling
|
|
@@ -6805,7 +6665,6 @@ exports.CIRCLE_RADIUS = CIRCLE_RADIUS;
|
|
|
6805
6665
|
exports.NeoActivityHeader = NeoActivityHeader;
|
|
6806
6666
|
exports.NeoActivityIndicatorCell = NeoActivityIndicatorCell;
|
|
6807
6667
|
exports.NeoAlert = NeoAlert;
|
|
6808
|
-
exports.NeoAvatar = NeoAvatar;
|
|
6809
6668
|
exports.NeoBadge = NeoBadge;
|
|
6810
6669
|
exports.NeoBanner = NeoBanner;
|
|
6811
6670
|
exports.NeoBreadcrumbLink = NeoBreadcrumbLink;
|
|
@@ -6815,6 +6674,7 @@ exports.NeoButtonTab = NeoButtonTab;
|
|
|
6815
6674
|
exports.NeoButtonTabGroup = NeoButtonTabGroup;
|
|
6816
6675
|
exports.NeoCard = NeoCard;
|
|
6817
6676
|
exports.NeoCheckbox = NeoCheckbox;
|
|
6677
|
+
exports.NeoCheckboxWithText = NeoCheckboxWithText;
|
|
6818
6678
|
exports.NeoCodeSnippet = NeoCodeSnippet;
|
|
6819
6679
|
exports.NeoDataGrid = NeoDataGrid;
|
|
6820
6680
|
exports.NeoDataGridCellContent = NeoDataGridCellContent;
|
|
@@ -6880,6 +6740,7 @@ exports.NeoUserAvatarCell = NeoUserAvatarCell;
|
|
|
6880
6740
|
exports.SortedAscendingIcon = SortedAscendingIcon;
|
|
6881
6741
|
exports.SortedDescendingIcon = SortedDescendingIcon;
|
|
6882
6742
|
exports.UnsortedIcon = UnsortedIcon;
|
|
6743
|
+
exports.focusRingStyles = focusRingStyles;
|
|
6883
6744
|
exports.getDataGridHeaderStyles = getDataGridHeaderStyles;
|
|
6884
6745
|
exports.neoRowHeights = neoRowHeights;
|
|
6885
6746
|
exports.version = version;
|