@moderneinc/neo-styled-components 4.0.0-next.e5eac5 → 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/TourModal/TourModal.d.ts +26 -0
- package/dist/index.d.ts +105 -62
- package/dist/index.esm.js +88 -228
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +88 -227
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/Avatar/Avatar.d.ts +0 -51
package/dist/index.esm.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { semanticColors,
|
|
2
|
+
import { semanticColors, spacing, typography, borderRadius, colors, shadows } from '@moderneinc/neo-design';
|
|
3
3
|
import Box from '@mui/material/Box';
|
|
4
4
|
import { styled, alpha } from '@mui/material/styles';
|
|
5
|
-
import Avatar from '@mui/material/Avatar';
|
|
6
5
|
import Chip, { chipClasses } from '@mui/material/Chip';
|
|
6
|
+
import MuiAvatar from '@mui/material/Avatar';
|
|
7
7
|
import SvgIcon, { svgIconClasses } from '@mui/material/SvgIcon';
|
|
8
8
|
import Alert, { alertClasses } from '@mui/material/Alert';
|
|
9
9
|
import ButtonBase, { buttonBaseClasses } from '@mui/material/ButtonBase';
|
|
@@ -62,129 +62,6 @@ import { useTreeItemModel } from '@mui/x-tree-view/hooks';
|
|
|
62
62
|
import { TreeItem, treeItemClasses } from '@mui/x-tree-view/TreeItem';
|
|
63
63
|
import { RichTreeViewPro } from '@mui/x-tree-view-pro/RichTreeViewPro';
|
|
64
64
|
|
|
65
|
-
/**
|
|
66
|
-
* Outline-based focus ring styles derived from Neo border tokens.
|
|
67
|
-
* Uses CSS outline (not box-shadow) so focus rings are never clipped by overflow:hidden.
|
|
68
|
-
*
|
|
69
|
-
* Produces a double-ring effect: a white inner gap (via outline-offset) and a colored outer ring.
|
|
70
|
-
*/
|
|
71
|
-
const focusRingStyles = {
|
|
72
|
-
outline: `2px solid ${semanticColors.border.focus}`,
|
|
73
|
-
outlineOffset: '2px',
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
// biome-ignore lint/suspicious/noExplicitAny: Type cast required to override MUI Avatar variant type without global augmentation
|
|
77
|
-
const StyledAvatar$1 = styled(Avatar, {
|
|
78
|
-
shouldForwardProp: prop => prop !== 'size' && prop !== 'variant',
|
|
79
|
-
})(({ theme, size = 'medium', variant = 'circular' }) => ({
|
|
80
|
-
boxSizing: 'border-box',
|
|
81
|
-
borderRadius: borderRadius.full,
|
|
82
|
-
fontSize: theme.typography.pxToRem(typography.fontSize.xs),
|
|
83
|
-
fontWeight: typography.fontWeight.regular,
|
|
84
|
-
lineHeight: 1.5,
|
|
85
|
-
// Size variants — dimensions match Figma bounding boxes (border-box)
|
|
86
|
-
...(size === 'small' &&
|
|
87
|
-
variant === 'circular' && {
|
|
88
|
-
width: spacing.spacing_4,
|
|
89
|
-
height: spacing.spacing_4,
|
|
90
|
-
fontSize: theme.typography.pxToRem(typography.fontSize.xs),
|
|
91
|
-
}),
|
|
92
|
-
...(size === 'small' &&
|
|
93
|
-
variant === 'initials' && {
|
|
94
|
-
width: spacing.spacing_2_1_2,
|
|
95
|
-
height: spacing.spacing_2_1_2,
|
|
96
|
-
fontSize: theme.typography.pxToRem(typography.fontSize.xs),
|
|
97
|
-
}),
|
|
98
|
-
// Medium circular fills its AvatarContainer (container owns the 44px dimension)
|
|
99
|
-
...(size === 'medium' &&
|
|
100
|
-
variant === 'circular' && {
|
|
101
|
-
width: '100%',
|
|
102
|
-
height: '100%',
|
|
103
|
-
fontSize: theme.typography.pxToRem(typography.fontSize.sm),
|
|
104
|
-
}),
|
|
105
|
-
// Medium initials has no container, so it owns its 44px dimension
|
|
106
|
-
...(size === 'medium' &&
|
|
107
|
-
variant === 'initials' && {
|
|
108
|
-
width: spacing.spacing_5_1_2,
|
|
109
|
-
height: spacing.spacing_5_1_2,
|
|
110
|
-
fontSize: theme.typography.pxToRem(typography.fontSize.sm),
|
|
111
|
-
}),
|
|
112
|
-
// Initials variant styling
|
|
113
|
-
...(variant === 'initials' && {
|
|
114
|
-
backgroundColor: colors.violet[100],
|
|
115
|
-
color: semanticColors.icons.default,
|
|
116
|
-
border: `1px solid ${semanticColors.icons.default}`,
|
|
117
|
-
}),
|
|
118
|
-
// Circular variant (image) styling
|
|
119
|
-
...(variant === 'circular' && {
|
|
120
|
-
backgroundColor: 'transparent',
|
|
121
|
-
border: `2px solid ${semanticColors.surfaces.white}`,
|
|
122
|
-
}),
|
|
123
|
-
'&:focus-visible': {
|
|
124
|
-
...focusRingStyles,
|
|
125
|
-
},
|
|
126
|
-
}));
|
|
127
|
-
const AvatarContainer = styled(Box)(({ size = 'medium' }) => ({
|
|
128
|
-
boxSizing: 'border-box',
|
|
129
|
-
...(size === 'medium' && {
|
|
130
|
-
width: spacing.spacing_5_1_2,
|
|
131
|
-
height: spacing.spacing_5_1_2,
|
|
132
|
-
backgroundColor: semanticColors.surfaces.white,
|
|
133
|
-
borderRadius: borderRadius.full,
|
|
134
|
-
padding: spacing.spacing_1_4,
|
|
135
|
-
display: 'flex',
|
|
136
|
-
alignItems: 'center',
|
|
137
|
-
justifyContent: 'center',
|
|
138
|
-
overflow: 'hidden',
|
|
139
|
-
boxShadow: `${shadows.neutral.small.x}px ${shadows.neutral.small.y}px ${shadows.neutral.small.blur}px ${shadows.neutral.small.spread}px ${shadows.neutral.small.shadow}`,
|
|
140
|
-
}),
|
|
141
|
-
'&:focus-within': {
|
|
142
|
-
...focusRingStyles,
|
|
143
|
-
},
|
|
144
|
-
}));
|
|
145
|
-
/**
|
|
146
|
-
* NeoAvatar - User avatar component based on MUI Avatar
|
|
147
|
-
*
|
|
148
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=9600-185
|
|
149
|
-
*
|
|
150
|
-
* Figma Props Mapping:
|
|
151
|
-
* - Figma Type "Initials" → variant="initials", size="small" (20px)
|
|
152
|
-
* - Figma Type "Small" → variant="circular", size="small" (32px with image)
|
|
153
|
-
* - Figma Type "Medium" → variant="circular", size="medium" (44px white container with image)
|
|
154
|
-
* - State: Focus → CSS :focus-visible ring (2px white inner + 4px blue outer)
|
|
155
|
-
* - State: Hover (tooltip) → Wrap component with MUI Tooltip
|
|
156
|
-
*
|
|
157
|
-
* Usage:
|
|
158
|
-
* ```tsx
|
|
159
|
-
* // Medium image avatar (with white container)
|
|
160
|
-
* <NeoAvatar variant="circular" size="medium" src="/avatar.jpg" alt="User" />
|
|
161
|
-
*
|
|
162
|
-
* // Small image avatar (no container)
|
|
163
|
-
* <NeoAvatar variant="circular" size="small" src="/avatar.jpg" alt="User" />
|
|
164
|
-
*
|
|
165
|
-
* // Small initials avatar
|
|
166
|
-
* <NeoAvatar variant="initials" size="small">A</NeoAvatar>
|
|
167
|
-
*
|
|
168
|
-
* // Medium initials avatar
|
|
169
|
-
* <NeoAvatar variant="initials" size="medium">AB</NeoAvatar>
|
|
170
|
-
*
|
|
171
|
-
* // With tooltip (user wraps)
|
|
172
|
-
* <Tooltip title="This is a tooltip" arrow placement="top">
|
|
173
|
-
* <NeoAvatar variant="initials">A</NeoAvatar>
|
|
174
|
-
* </Tooltip>
|
|
175
|
-
* ```
|
|
176
|
-
*/
|
|
177
|
-
const NeoAvatar = ({ size = 'medium', variant = 'circular', ...props }) => {
|
|
178
|
-
// shouldForwardProp filters out size and variant from being passed to the DOM
|
|
179
|
-
const avatar = jsx(StyledAvatar$1, { size: size, variant: variant, ...props });
|
|
180
|
-
// Medium size with circular variant (image) gets wrapped in white container
|
|
181
|
-
if (size === 'medium' && variant === 'circular') {
|
|
182
|
-
return jsx(AvatarContainer, { size: size, children: avatar });
|
|
183
|
-
}
|
|
184
|
-
return avatar;
|
|
185
|
-
};
|
|
186
|
-
NeoAvatar.displayName = 'NeoAvatar';
|
|
187
|
-
|
|
188
65
|
const StyledChip$2 = styled(Chip)(({ theme }) => ({
|
|
189
66
|
height: 24,
|
|
190
67
|
paddingTop: spacing.spacing_1_4,
|
|
@@ -276,6 +153,67 @@ const NeoBadge = (props) => {
|
|
|
276
153
|
};
|
|
277
154
|
NeoBadge.displayName = 'NeoBadge';
|
|
278
155
|
|
|
156
|
+
/**
|
|
157
|
+
* Shared color palette for avatar components (GeneralAvatar, NavigationAvatar).
|
|
158
|
+
* Maps color index (1-7) to background color token pairs.
|
|
159
|
+
*/
|
|
160
|
+
const avatarColorPalette = {
|
|
161
|
+
1: { bg: colors.digitalBlue[100] },
|
|
162
|
+
2: { bg: colors.digitalGreen[100] },
|
|
163
|
+
3: { bg: colors.gold[100] },
|
|
164
|
+
4: { bg: colors.red[100] },
|
|
165
|
+
5: { bg: colors.violet[100] },
|
|
166
|
+
6: { bg: colors.tealGreen[100] },
|
|
167
|
+
7: { bg: colors.orange[100] },
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Outline-based focus ring styles derived from Neo border tokens.
|
|
172
|
+
* Uses CSS outline (not box-shadow) so focus rings are never clipped by overflow:hidden.
|
|
173
|
+
*
|
|
174
|
+
* Produces a double-ring effect: a white inner gap (via outline-offset) and a colored outer ring.
|
|
175
|
+
*/
|
|
176
|
+
const focusRingStyles = {
|
|
177
|
+
outline: `2px solid ${semanticColors.border.focus}`,
|
|
178
|
+
outlineOffset: '2px',
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
const sizeConfig$1 = {
|
|
182
|
+
small: { width: spacing.spacing_4, height: spacing.spacing_4, fontSize: typography.fontSize.xs },
|
|
183
|
+
medium: { width: spacing.spacing_5, height: spacing.spacing_5, fontSize: typography.fontSize.sm },
|
|
184
|
+
};
|
|
185
|
+
const StyledAvatar = styled(MuiAvatar, {
|
|
186
|
+
shouldForwardProp: prop => prop !== 'avatarSize' && prop !== 'colorIndex',
|
|
187
|
+
})(({ theme, avatarSize, colorIndex }) => {
|
|
188
|
+
const size = sizeConfig$1[avatarSize];
|
|
189
|
+
const palette = avatarColorPalette[colorIndex];
|
|
190
|
+
return {
|
|
191
|
+
boxSizing: 'border-box',
|
|
192
|
+
width: size.width,
|
|
193
|
+
height: size.height,
|
|
194
|
+
fontSize: theme.typography.pxToRem(size.fontSize),
|
|
195
|
+
fontFamily: typography.fontFamily.body,
|
|
196
|
+
fontWeight: typography.fontWeight.regular,
|
|
197
|
+
lineHeight: 1,
|
|
198
|
+
color: semanticColors.typography.body,
|
|
199
|
+
backgroundColor: palette ? palette.bg : undefined,
|
|
200
|
+
border: `1px solid ${semanticColors.border.primary}`,
|
|
201
|
+
'&:focus-visible': {
|
|
202
|
+
...focusRingStyles,
|
|
203
|
+
borderColor: semanticColors.border.focus,
|
|
204
|
+
},
|
|
205
|
+
};
|
|
206
|
+
});
|
|
207
|
+
/**
|
|
208
|
+
* NeoGeneralAvatar - Avatar with image or colored initials display
|
|
209
|
+
*
|
|
210
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=9600-185
|
|
211
|
+
*/
|
|
212
|
+
const NeoGeneralAvatar = ({ size = 'medium', colorIndex = 0, children, ...props }) => {
|
|
213
|
+
return (jsx(StyledAvatar, { avatarSize: size, colorIndex: colorIndex, ...props, children: children }));
|
|
214
|
+
};
|
|
215
|
+
NeoGeneralAvatar.displayName = 'NeoGeneralAvatar';
|
|
216
|
+
|
|
279
217
|
/**
|
|
280
218
|
* Base styled container for DataGrid cell content that needs flex layout
|
|
281
219
|
*/
|
|
@@ -311,7 +249,7 @@ const CellContentContainer = styled('div')({
|
|
|
311
249
|
* // Avatar with text
|
|
312
250
|
* renderCell: (params) => (
|
|
313
251
|
* <NeoDataGridCellContent>
|
|
314
|
-
* <
|
|
252
|
+
* <NeoGeneralAvatar src={params.row.avatarUrl} />
|
|
315
253
|
* <span>{params.row.name}</span>
|
|
316
254
|
* </NeoDataGridCellContent>
|
|
317
255
|
* )
|
|
@@ -362,7 +300,7 @@ const NeoStatusBadgeCell = ({ status, colorMap }) => {
|
|
|
362
300
|
};
|
|
363
301
|
NeoStatusBadgeCell.displayName = 'NeoStatusBadgeCell';
|
|
364
302
|
const NeoUserAvatarCell = ({ name, avatarUrl, size = 'small' }) => {
|
|
365
|
-
return (jsxs(NeoDataGridCellContent, { children: [jsx(
|
|
303
|
+
return (jsxs(NeoDataGridCellContent, { children: [jsx(NeoGeneralAvatar, { size: size, alt: name, src: avatarUrl }), jsx("span", { style: { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }, children: name })] }));
|
|
366
304
|
};
|
|
367
305
|
NeoUserAvatarCell.displayName = 'NeoUserAvatarCell';
|
|
368
306
|
/**
|
|
@@ -1350,48 +1288,6 @@ const StyledButtonBase$1 = styled(ButtonBase, {
|
|
|
1350
1288
|
},
|
|
1351
1289
|
}),
|
|
1352
1290
|
},
|
|
1353
|
-
link: {
|
|
1354
|
-
backgroundColor: 'transparent',
|
|
1355
|
-
color: semanticColors.buttons.tertiary.default,
|
|
1356
|
-
border: 'none',
|
|
1357
|
-
padding: `0 ${theme.spacing(1)}`,
|
|
1358
|
-
'&:hover': {
|
|
1359
|
-
backgroundColor: 'transparent',
|
|
1360
|
-
color: semanticColors.buttons.tertiary.hover,
|
|
1361
|
-
},
|
|
1362
|
-
'&:active': {
|
|
1363
|
-
color: semanticColors.buttons.tertiary.pressed,
|
|
1364
|
-
},
|
|
1365
|
-
...(loading
|
|
1366
|
-
? {}
|
|
1367
|
-
: {
|
|
1368
|
-
[`&.${buttonBaseClasses.disabled}`]: {
|
|
1369
|
-
backgroundColor: 'transparent',
|
|
1370
|
-
color: semanticColors.buttons.tertiary.disabled,
|
|
1371
|
-
},
|
|
1372
|
-
}),
|
|
1373
|
-
},
|
|
1374
|
-
linkColor: {
|
|
1375
|
-
backgroundColor: 'transparent',
|
|
1376
|
-
color: semanticColors.buttons.primary.default,
|
|
1377
|
-
border: 'none',
|
|
1378
|
-
padding: `0 ${theme.spacing(1)}`,
|
|
1379
|
-
'&:hover': {
|
|
1380
|
-
backgroundColor: 'transparent',
|
|
1381
|
-
color: semanticColors.buttons.primary.hover,
|
|
1382
|
-
},
|
|
1383
|
-
'&:active': {
|
|
1384
|
-
color: semanticColors.buttons.primary.pressed,
|
|
1385
|
-
},
|
|
1386
|
-
...(loading
|
|
1387
|
-
? {}
|
|
1388
|
-
: {
|
|
1389
|
-
[`&.${buttonBaseClasses.disabled}`]: {
|
|
1390
|
-
backgroundColor: 'transparent',
|
|
1391
|
-
color: semanticColors.buttons.tertiary.disabled,
|
|
1392
|
-
},
|
|
1393
|
-
}),
|
|
1394
|
-
},
|
|
1395
1291
|
tertiary: {
|
|
1396
1292
|
backgroundColor: 'transparent',
|
|
1397
1293
|
color: semanticColors.typography.input.default,
|
|
@@ -1426,8 +1322,6 @@ const LoadingSpinner = styled(CircularProgress)(({ theme, $variant }) => {
|
|
|
1426
1322
|
primary: theme.palette.common.white,
|
|
1427
1323
|
secondary: semanticColors.buttons.primary.default,
|
|
1428
1324
|
destructive: theme.palette.common.white,
|
|
1429
|
-
link: semanticColors.buttons.primary.default,
|
|
1430
|
-
linkColor: semanticColors.buttons.primary.default,
|
|
1431
1325
|
tertiary: semanticColors.buttons.tertiary.default,
|
|
1432
1326
|
};
|
|
1433
1327
|
return {
|
|
@@ -1440,7 +1334,7 @@ const LoadingSpinner = styled(CircularProgress)(({ theme, $variant }) => {
|
|
|
1440
1334
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4086-7590
|
|
1441
1335
|
*
|
|
1442
1336
|
* Figma Props Mapping:
|
|
1443
|
-
* - Hierarchy (Primary|Secondary|Destructive|
|
|
1337
|
+
* - Hierarchy (Primary|Secondary|Destructive|Tertiary) → variant prop
|
|
1444
1338
|
* - Size (Small|Medium) → size prop
|
|
1445
1339
|
* - State=Disabled → disabled prop
|
|
1446
1340
|
* - State=Loading → loading prop
|
|
@@ -1939,7 +1833,7 @@ const StyledCheckbox = styled(Checkbox, {
|
|
|
1939
1833
|
* Figma Props Mapping:
|
|
1940
1834
|
* - Checked (True|False) → checked prop
|
|
1941
1835
|
* - Indeterminate (True|False) → indeterminate prop
|
|
1942
|
-
* - Size (
|
|
1836
|
+
* - Size (Extra Small|Small|Medium) → size prop (xs|small|medium)
|
|
1943
1837
|
* - State=Default → default state
|
|
1944
1838
|
* - State=Hover → CSS :hover
|
|
1945
1839
|
* - State=Focused → CSS :focus-visible
|
|
@@ -1991,6 +1885,22 @@ const NeoCheckbox = ({ size = 'medium', label, helperText, disabled, icon, check
|
|
|
1991
1885
|
};
|
|
1992
1886
|
NeoCheckbox.displayName = 'NeoCheckbox';
|
|
1993
1887
|
|
|
1888
|
+
/**
|
|
1889
|
+
* NeoCheckboxWithText - Checkbox with label and supporting text
|
|
1890
|
+
*
|
|
1891
|
+
* Thin wrapper around NeoCheckbox that maps the Figma "Checkbox with text"
|
|
1892
|
+
* component to the existing NeoCheckbox with label + helperText.
|
|
1893
|
+
*
|
|
1894
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=12125-162
|
|
1895
|
+
*
|
|
1896
|
+
* Figma Props Mapping:
|
|
1897
|
+
* - Property 1 (Medium|Small) → size ('medium'|'small')
|
|
1898
|
+
*/
|
|
1899
|
+
const NeoCheckboxWithText = ({ size = 'small', ...props }) => {
|
|
1900
|
+
return jsx(NeoCheckbox, { size: size, ...props });
|
|
1901
|
+
};
|
|
1902
|
+
NeoCheckboxWithText.displayName = 'NeoCheckboxWithText';
|
|
1903
|
+
|
|
1994
1904
|
const StyledButtonBase = styled(ButtonBase, {
|
|
1995
1905
|
shouldForwardProp: prop => prop !== 'isMultiline' && prop !== 'variant' && prop !== 'size',
|
|
1996
1906
|
})(({ theme, variant = 'outlined', size = 'small', isMultiline = false }) => {
|
|
@@ -2982,7 +2892,7 @@ function NeoDataGridFiltersButton() {
|
|
|
2982
2892
|
const filterModel = useGridSelector(apiRef, gridFilterModelSelector);
|
|
2983
2893
|
const activeFilters = filterModel.items.filter(item => item.value != null && item.value !== '');
|
|
2984
2894
|
const filterCount = activeFilters.length;
|
|
2985
|
-
return (jsx(FilterPanelTrigger, { render: jsx(ToolbarButton, { render: jsxs(NeoButton, { variant: "secondary", size: "small", children: [jsx(ListFilter, { size: 16, color: semanticColors.buttons.primary.default }), "Filters", filterCount > 0 && (jsx(NeoTag, { size: "medium", variant: "filled",
|
|
2895
|
+
return (jsx(FilterPanelTrigger, { render: jsx(ToolbarButton, { render: jsxs(NeoButton, { variant: "secondary", size: "small", children: [jsx(ListFilter, { size: 16, color: semanticColors.buttons.primary.default }), "Filters", filterCount > 0 && (jsx(NeoTag, { size: "medium", variant: "filled", intent: "info", label: String(filterCount) }))] }) }) }));
|
|
2986
2896
|
}
|
|
2987
2897
|
NeoDataGridFiltersButton.displayName = 'NeoDataGridFiltersButton';
|
|
2988
2898
|
|
|
@@ -3894,7 +3804,7 @@ const StyledBadge = styled(Badge)(({ ownerState }) => {
|
|
|
3894
3804
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4163-3577
|
|
3895
3805
|
*
|
|
3896
3806
|
* Figma Props Mapping:
|
|
3897
|
-
* -
|
|
3807
|
+
* - Size (Small|Medium|Large) → size prop (small|medium|large)
|
|
3898
3808
|
* - outline (False|True) → variant prop (solid|outline)
|
|
3899
3809
|
* - Color is configurable via color prop (success|error|warning|info|neutral)
|
|
3900
3810
|
*/
|
|
@@ -4344,56 +4254,6 @@ const NeoFooter = ({ variant = 'pagination', showShadow = false, loading = false
|
|
|
4344
4254
|
};
|
|
4345
4255
|
NeoFooter.displayName = 'NeoFooter';
|
|
4346
4256
|
|
|
4347
|
-
/**
|
|
4348
|
-
* Shared color palette for avatar components (GeneralAvatar, NavigationAvatar).
|
|
4349
|
-
* Maps color index (1-7) to background color token pairs.
|
|
4350
|
-
*/
|
|
4351
|
-
const avatarColorPalette = {
|
|
4352
|
-
1: { bg: colors.digitalBlue[100] },
|
|
4353
|
-
2: { bg: colors.digitalGreen[100] },
|
|
4354
|
-
3: { bg: colors.gold[100] },
|
|
4355
|
-
4: { bg: colors.red[100] },
|
|
4356
|
-
5: { bg: colors.violet[100] },
|
|
4357
|
-
6: { bg: colors.tealGreen[100] },
|
|
4358
|
-
7: { bg: colors.orange[100] },
|
|
4359
|
-
};
|
|
4360
|
-
|
|
4361
|
-
const sizeConfig$1 = {
|
|
4362
|
-
small: { width: spacing.spacing_4, height: spacing.spacing_4, fontSize: typography.fontSize.xs },
|
|
4363
|
-
medium: { width: spacing.spacing_5, height: spacing.spacing_5, fontSize: typography.fontSize.sm },
|
|
4364
|
-
};
|
|
4365
|
-
const StyledAvatar = styled(Avatar, {
|
|
4366
|
-
shouldForwardProp: prop => prop !== 'avatarSize' && prop !== 'colorIndex',
|
|
4367
|
-
})(({ theme, avatarSize, colorIndex }) => {
|
|
4368
|
-
const size = sizeConfig$1[avatarSize];
|
|
4369
|
-
const palette = avatarColorPalette[colorIndex];
|
|
4370
|
-
return {
|
|
4371
|
-
boxSizing: 'border-box',
|
|
4372
|
-
width: size.width,
|
|
4373
|
-
height: size.height,
|
|
4374
|
-
fontSize: theme.typography.pxToRem(size.fontSize),
|
|
4375
|
-
fontFamily: typography.fontFamily.body,
|
|
4376
|
-
fontWeight: typography.fontWeight.regular,
|
|
4377
|
-
lineHeight: 1,
|
|
4378
|
-
color: semanticColors.typography.body,
|
|
4379
|
-
backgroundColor: palette ? palette.bg : undefined,
|
|
4380
|
-
border: `1px solid ${semanticColors.border.primary}`,
|
|
4381
|
-
'&:focus-visible': {
|
|
4382
|
-
...focusRingStyles,
|
|
4383
|
-
borderColor: semanticColors.border.focus,
|
|
4384
|
-
},
|
|
4385
|
-
};
|
|
4386
|
-
});
|
|
4387
|
-
/**
|
|
4388
|
-
* NeoGeneralAvatar - Avatar with image or colored initials display
|
|
4389
|
-
*
|
|
4390
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=9600-185
|
|
4391
|
-
*/
|
|
4392
|
-
const NeoGeneralAvatar = ({ size = 'medium', colorIndex = 0, children, ...props }) => {
|
|
4393
|
-
return (jsx(StyledAvatar, { avatarSize: size, colorIndex: colorIndex, ...props, children: children }));
|
|
4394
|
-
};
|
|
4395
|
-
NeoGeneralAvatar.displayName = 'NeoGeneralAvatar';
|
|
4396
|
-
|
|
4397
4257
|
const customProps$1 = ['iconSize'];
|
|
4398
4258
|
const StyledIconWrapper = styled('div', {
|
|
4399
4259
|
shouldForwardProp: prop => !customProps$1.includes(prop),
|
|
@@ -6164,7 +6024,7 @@ const TabLabelContainer = styled('span')(({ theme }) => ({
|
|
|
6164
6024
|
* - Text label → label prop
|
|
6165
6025
|
*/
|
|
6166
6026
|
const NeoTab = ({ label, count, ...props }) => {
|
|
6167
|
-
const tabLabel = count !== undefined ? (jsxs(TabLabelContainer, { children: [label, jsx(NeoTag, { label: String(count), size: "large", variant: "outlined",
|
|
6027
|
+
const tabLabel = count !== undefined ? (jsxs(TabLabelContainer, { children: [label, jsx(NeoTag, { label: String(count), size: "large", variant: "outlined", intent: "default" })] })) : (label);
|
|
6168
6028
|
return jsx(StyledTab, { label: tabLabel, ...props });
|
|
6169
6029
|
};
|
|
6170
6030
|
NeoTab.displayName = 'NeoTab';
|
|
@@ -6285,7 +6145,7 @@ const ToastButton = styled(Button, {
|
|
|
6285
6145
|
const NeoToast = ({ intent = 'neutral', type = 'outlined', title, message, showClose = false, actions, onClose, ...props }) => {
|
|
6286
6146
|
const palette = intentColors[intent];
|
|
6287
6147
|
const closeIconColor = type === 'filled' ? semanticColors.surfaces.white : palette.default;
|
|
6288
|
-
return (jsxs(StyledAlert, { ...props, intent: intent, toastType: type, action: showClose ? (jsx(IconButton, { size: "small", onClick: onClose, sx: { color: closeIconColor }, children: jsx(X, { size: 16 }) })) : undefined, children: [jsxs(Stack, { sx: { gap: `${spacing.spacing_1}px`, width: '100%' }, children: [title && jsx(ToastTitle, { intent: intent, toastType: type, children: title }), message && jsx(ToastMessage, { intent: intent, toastType: type, children: message })] }), actions && jsx(ToastActions, { direction: "row", children: actions })] }));
|
|
6148
|
+
return (jsxs(StyledAlert, { ...props, intent: intent, toastType: type, action: showClose ? (jsx(IconButton, { size: "small", onClick: onClose, sx: { color: closeIconColor }, children: jsx(X, { size: 16 }) })) : undefined, children: [jsxs(Stack, { sx: { gap: `${spacing.spacing_1}px`, width: '100%' }, children: [title && (jsx(ToastTitle, { intent: intent, toastType: type, children: title })), message && (jsx(ToastMessage, { intent: intent, toastType: type, children: message }))] }), actions && jsx(ToastActions, { direction: "row", children: actions })] }));
|
|
6289
6149
|
};
|
|
6290
6150
|
/**
|
|
6291
6151
|
* Helper component for creating toast action buttons with proper styling
|
|
@@ -6799,5 +6659,5 @@ NeoTypologyControl.displayName = 'NeoTypologyControl';
|
|
|
6799
6659
|
|
|
6800
6660
|
const version = '0.0.0-development';
|
|
6801
6661
|
|
|
6802
|
-
export { ActivityScene, CIRCLE_RADIUS, NeoActivityHeader, NeoActivityIndicatorCell, NeoAlert,
|
|
6662
|
+
export { ActivityScene, CIRCLE_RADIUS, NeoActivityHeader, NeoActivityIndicatorCell, NeoAlert, NeoBadge, NeoBanner, NeoBreadcrumbLink, NeoBreadcrumbs, NeoButton, NeoButtonTab, NeoButtonTabGroup, NeoCard, NeoCheckbox, NeoCheckboxWithText, NeoCodeSnippet, NeoDataGrid, NeoDataGridCellContent, NeoDataGridColumnsButton, NeoDataGridColumnsPanel, NeoDataGridFilterPanel, NeoDataGridFilterPanelAddIcon, NeoDataGridFilterPanelDeleteIcon, NeoDataGridFilterPanelRemoveAllIcon, NeoDataGridFiltersButton, NeoDataGridHeaderLabel, NeoSelect as NeoDataGridSelect, NeoDatePicker, NeoDivider, NeoDot, NeoDownloadToast, NeoSelect as NeoDropdown, NeoMenu as NeoDropdownMenu, NeoMenuItem as NeoDropdownMenuItem, NeoMenuItem as NeoDropdownOption, NeoFilterChip, NeoFooter, NeoGeneralAvatar, NeoIconButton, NeoIconWrapper, NeoInfiniteScrollGrid, NeoInputField, NeoListItem, NeoListItemButton, NeoLoadingSpinner, NeoMenu, NeoMenuItem, NeoModal, NeoModalContent, NeoModalFooter, NeoModalHeader, NeoMultiBadgesCell, NeoNavigationAvatar, NeoNavigationItem, NeoPageContent, NeoPaginatedGrid, NeoProgressbar, NeoQuickFilter, NeoRadio, NeoSearchChip, NeoSelect, NeoMenuItem as NeoSelectOption, NeoSkeleton, NeoStatusBadgeCell, NeoTab, NeoTabs, NeoTag, NeoToast, NeoToastButton, NeoToggle, NeoToolbar, NeoTooltip, NeoTreeItem, NeoTreeView, StyledToggleButton as NeoTypologyButton, NeoTypologyControl, NeoUserAvatarCell, SortedAscendingIcon, SortedDescendingIcon, UnsortedIcon, focusRingStyles, getDataGridHeaderStyles, neoRowHeights, version };
|
|
6803
6663
|
//# sourceMappingURL=index.esm.js.map
|