@moderneinc/neo-styled-components 4.1.2-next.d146c6 → 5.0.0-next.0fa9b3
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/DatePicker/DatePicker.d.ts +2 -2
- package/dist/IconButton/IconButton.d.ts +23 -13
- package/dist/index.d.ts +23 -15
- package/dist/index.esm.js +66 -87
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +66 -87
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
|
@@ -71,11 +71,11 @@ export interface NeoDatePickerProps {
|
|
|
71
71
|
/**
|
|
72
72
|
* Additional props passed to single DatePicker
|
|
73
73
|
*/
|
|
74
|
-
datePickerProps?: Omit<Partial<DatePickerProps
|
|
74
|
+
datePickerProps?: Omit<Partial<DatePickerProps>, 'value' | 'onChange' | 'open' | 'onOpen' | 'onClose' | 'label'>;
|
|
75
75
|
/**
|
|
76
76
|
* Additional props passed to DateRangePicker
|
|
77
77
|
*/
|
|
78
|
-
dateRangePickerProps?: Omit<Partial<DateRangePickerProps
|
|
78
|
+
dateRangePickerProps?: Omit<Partial<DateRangePickerProps>, 'value' | 'onChange' | 'open' | 'onOpen' | 'onClose' | 'label'>;
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
81
81
|
* NeoDatePicker - Moderne design system date picker component
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ButtonBaseProps } from '@mui/material/ButtonBase';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
2
3
|
type IconButtonSize = 'small' | 'medium';
|
|
3
|
-
type IconButtonVariant = '
|
|
4
|
-
export interface NeoIconButtonProps extends Omit<
|
|
4
|
+
type IconButtonVariant = 'primary' | 'secondary' | 'destructive' | 'tertiary' | 'nav';
|
|
5
|
+
export interface NeoIconButtonProps extends Omit<ButtonBaseProps, 'children' | 'size'> {
|
|
5
6
|
/**
|
|
6
7
|
* The size of the icon button
|
|
7
8
|
* @default "medium"
|
|
@@ -10,10 +11,10 @@ export interface NeoIconButtonProps extends Omit<IconButtonProps, 'color' | 'siz
|
|
|
10
11
|
*/
|
|
11
12
|
size?: IconButtonSize;
|
|
12
13
|
/**
|
|
13
|
-
* The visual variant of the icon button
|
|
14
|
-
* - `
|
|
14
|
+
* The visual variant of the icon button.
|
|
15
|
+
* - `primary`, `secondary`, `destructive`, `tertiary`: Uses NeoButton's hierarchy styling
|
|
15
16
|
* - `nav`: White background with border, used in global navigation
|
|
16
|
-
* @default "
|
|
17
|
+
* @default "tertiary"
|
|
17
18
|
*/
|
|
18
19
|
variant?: IconButtonVariant;
|
|
19
20
|
/**
|
|
@@ -22,25 +23,34 @@ export interface NeoIconButtonProps extends Omit<IconButtonProps, 'color' | 'siz
|
|
|
22
23
|
* @default false
|
|
23
24
|
*/
|
|
24
25
|
active?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Show loading spinner instead of icon.
|
|
28
|
+
* Only applies to hierarchy variants (not `nav`).
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
loading?: boolean;
|
|
32
|
+
children?: ReactNode;
|
|
25
33
|
}
|
|
26
34
|
/**
|
|
27
|
-
* NeoIconButton - Icon-only button component
|
|
35
|
+
* NeoIconButton - Icon-only button component
|
|
28
36
|
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
37
|
+
* For hierarchy variants (primary/secondary/destructive/tertiary), wraps NeoButton with
|
|
38
|
+
* icon-only sizing. For the `nav` variant, uses a standalone MUI IconButton with custom styling.
|
|
31
39
|
*
|
|
32
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=
|
|
40
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=4086-7590
|
|
33
41
|
*
|
|
34
42
|
* Figma Props Mapping:
|
|
43
|
+
* - Hierarchy (Primary|Secondary|Destructive|Tertiary) → variant prop
|
|
35
44
|
* - Size (Small|Medium) → size prop
|
|
45
|
+
* - Show text = false → always (this is the icon-only variant of NeoButton)
|
|
36
46
|
* - State=Disabled → disabled prop
|
|
47
|
+
* - State=Loading → loading prop
|
|
37
48
|
* - State=Hover → CSS :hover
|
|
38
|
-
* - State=
|
|
49
|
+
* - State=Pressed → CSS :active
|
|
39
50
|
* - State=Focus → CSS :focus-visible
|
|
40
|
-
* - State=Loading → not yet implemented
|
|
41
51
|
*/
|
|
42
52
|
export declare const NeoIconButton: {
|
|
43
|
-
({ size, variant, active, ...props }: NeoIconButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
({ size, variant, active, loading, children, ...props }: NeoIconButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
44
54
|
displayName: string;
|
|
45
55
|
};
|
|
46
56
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,6 @@ import { DividerProps } from '@mui/material/Divider';
|
|
|
18
18
|
import { PaperProps } from '@mui/material/Paper';
|
|
19
19
|
import { BadgeProps } from '@mui/material/Badge';
|
|
20
20
|
import { AvatarProps } from '@mui/material/Avatar';
|
|
21
|
-
import { IconButtonProps } from '@mui/material/IconButton';
|
|
22
21
|
import { InputBaseProps } from '@mui/material/InputBase';
|
|
23
22
|
import { MenuProps } from '@mui/material/Menu';
|
|
24
23
|
import { MenuItemProps } from '@mui/material/MenuItem';
|
|
@@ -1421,8 +1420,8 @@ declare const NeoGeneralAvatar: {
|
|
|
1421
1420
|
};
|
|
1422
1421
|
|
|
1423
1422
|
type IconButtonSize = 'small' | 'medium';
|
|
1424
|
-
type IconButtonVariant = '
|
|
1425
|
-
interface NeoIconButtonProps extends Omit<
|
|
1423
|
+
type IconButtonVariant = 'primary' | 'secondary' | 'destructive' | 'tertiary' | 'nav';
|
|
1424
|
+
interface NeoIconButtonProps extends Omit<ButtonBaseProps, 'children' | 'size'> {
|
|
1426
1425
|
/**
|
|
1427
1426
|
* The size of the icon button
|
|
1428
1427
|
* @default "medium"
|
|
@@ -1431,10 +1430,10 @@ interface NeoIconButtonProps extends Omit<IconButtonProps, 'color' | 'size'> {
|
|
|
1431
1430
|
*/
|
|
1432
1431
|
size?: IconButtonSize;
|
|
1433
1432
|
/**
|
|
1434
|
-
* The visual variant of the icon button
|
|
1435
|
-
* - `
|
|
1433
|
+
* The visual variant of the icon button.
|
|
1434
|
+
* - `primary`, `secondary`, `destructive`, `tertiary`: Uses NeoButton's hierarchy styling
|
|
1436
1435
|
* - `nav`: White background with border, used in global navigation
|
|
1437
|
-
* @default "
|
|
1436
|
+
* @default "tertiary"
|
|
1438
1437
|
*/
|
|
1439
1438
|
variant?: IconButtonVariant;
|
|
1440
1439
|
/**
|
|
@@ -1443,25 +1442,34 @@ interface NeoIconButtonProps extends Omit<IconButtonProps, 'color' | 'size'> {
|
|
|
1443
1442
|
* @default false
|
|
1444
1443
|
*/
|
|
1445
1444
|
active?: boolean;
|
|
1445
|
+
/**
|
|
1446
|
+
* Show loading spinner instead of icon.
|
|
1447
|
+
* Only applies to hierarchy variants (not `nav`).
|
|
1448
|
+
* @default false
|
|
1449
|
+
*/
|
|
1450
|
+
loading?: boolean;
|
|
1451
|
+
children?: ReactNode;
|
|
1446
1452
|
}
|
|
1447
1453
|
/**
|
|
1448
|
-
* NeoIconButton - Icon-only button component
|
|
1454
|
+
* NeoIconButton - Icon-only button component
|
|
1449
1455
|
*
|
|
1450
|
-
*
|
|
1451
|
-
*
|
|
1456
|
+
* For hierarchy variants (primary/secondary/destructive/tertiary), wraps NeoButton with
|
|
1457
|
+
* icon-only sizing. For the `nav` variant, uses a standalone MUI IconButton with custom styling.
|
|
1452
1458
|
*
|
|
1453
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=
|
|
1459
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=4086-7590
|
|
1454
1460
|
*
|
|
1455
1461
|
* Figma Props Mapping:
|
|
1462
|
+
* - Hierarchy (Primary|Secondary|Destructive|Tertiary) → variant prop
|
|
1456
1463
|
* - Size (Small|Medium) → size prop
|
|
1464
|
+
* - Show text = false → always (this is the icon-only variant of NeoButton)
|
|
1457
1465
|
* - State=Disabled → disabled prop
|
|
1466
|
+
* - State=Loading → loading prop
|
|
1458
1467
|
* - State=Hover → CSS :hover
|
|
1459
|
-
* - State=
|
|
1468
|
+
* - State=Pressed → CSS :active
|
|
1460
1469
|
* - State=Focus → CSS :focus-visible
|
|
1461
|
-
* - State=Loading → not yet implemented
|
|
1462
1470
|
*/
|
|
1463
1471
|
declare const NeoIconButton: {
|
|
1464
|
-
({ size, variant, active, ...props }: NeoIconButtonProps): react_jsx_runtime.JSX.Element;
|
|
1472
|
+
({ size, variant, active, loading, children, ...props }: NeoIconButtonProps): react_jsx_runtime.JSX.Element;
|
|
1465
1473
|
displayName: string;
|
|
1466
1474
|
};
|
|
1467
1475
|
|
|
@@ -2844,11 +2852,11 @@ interface NeoDatePickerProps {
|
|
|
2844
2852
|
/**
|
|
2845
2853
|
* Additional props passed to single DatePicker
|
|
2846
2854
|
*/
|
|
2847
|
-
datePickerProps?: Omit<Partial<DatePickerProps
|
|
2855
|
+
datePickerProps?: Omit<Partial<DatePickerProps>, 'value' | 'onChange' | 'open' | 'onOpen' | 'onClose' | 'label'>;
|
|
2848
2856
|
/**
|
|
2849
2857
|
* Additional props passed to DateRangePicker
|
|
2850
2858
|
*/
|
|
2851
|
-
dateRangePickerProps?: Omit<Partial<DateRangePickerProps
|
|
2859
|
+
dateRangePickerProps?: Omit<Partial<DateRangePickerProps>, 'value' | 'onChange' | 'open' | 'onOpen' | 'onClose' | 'label'>;
|
|
2852
2860
|
}
|
|
2853
2861
|
/**
|
|
2854
2862
|
* NeoDatePicker - Moderne design system date picker component
|
package/dist/index.esm.js
CHANGED
|
@@ -31,8 +31,8 @@ import Tooltip, { tooltipClasses } from '@mui/material/Tooltip';
|
|
|
31
31
|
import { dayCalendarClasses } from '@mui/x-date-pickers/DateCalendar';
|
|
32
32
|
import { DatePicker } from '@mui/x-date-pickers/DatePicker';
|
|
33
33
|
import { pickerPopperClasses } from '@mui/x-date-pickers/internals';
|
|
34
|
+
import { pickerDayClasses } from '@mui/x-date-pickers/PickerDay';
|
|
34
35
|
import { pickersCalendarHeaderClasses } from '@mui/x-date-pickers/PickersCalendarHeader';
|
|
35
|
-
import { pickersDayClasses } from '@mui/x-date-pickers/PickersDay';
|
|
36
36
|
import { PickersShortcuts } from '@mui/x-date-pickers/PickersShortcuts';
|
|
37
37
|
import { DateRangePicker } from '@mui/x-date-pickers-pro/DateRangePicker';
|
|
38
38
|
import { dateRangePickerDayClasses } from '@mui/x-date-pickers-pro/DateRangePickerDay';
|
|
@@ -1084,7 +1084,7 @@ const LinkText = styled('span')(({ bannerType = 'outlined' }) => ({
|
|
|
1084
1084
|
textDecoration: 'underline',
|
|
1085
1085
|
},
|
|
1086
1086
|
}));
|
|
1087
|
-
const StyledIconButton
|
|
1087
|
+
const StyledIconButton = styled(IconButton)(({ closeIconColor }) => ({
|
|
1088
1088
|
padding: 0,
|
|
1089
1089
|
color: closeIconColor,
|
|
1090
1090
|
'&:hover': {
|
|
@@ -1101,7 +1101,7 @@ const NeoBanner = ({ intent = 'info', type = 'outlined', message, messagePositio
|
|
|
1101
1101
|
return null;
|
|
1102
1102
|
}
|
|
1103
1103
|
const closeIconColor = type === 'filled' ? semanticColors.surfaces.white : intentColors$1[intent].default;
|
|
1104
|
-
return (jsx(StyledAlert$1, { ...props, intent: intent, bannerType: type, messagePosition: messagePosition, icon: messagePosition === 'left' ? icon || false : false, action: showClose ? (jsx(StyledIconButton
|
|
1104
|
+
return (jsx(StyledAlert$1, { ...props, intent: intent, bannerType: type, messagePosition: messagePosition, icon: messagePosition === 'left' ? icon || false : false, action: showClose ? (jsx(StyledIconButton, { size: "small", onClick: handleClose, closeIconColor: closeIconColor, children: jsx(X, { size: 24 }) })) : undefined, children: messagePosition === 'center' ? (jsxs(Fragment, { children: [icon, jsx("span", { children: message }), linkText && (jsx(LinkText, { bannerType: type, onClick: onLinkClick, children: linkText }))] })) : (jsxs(Fragment, { children: [jsx("span", { children: message }), linkText && (jsx(LinkText, { bannerType: type, onClick: onLinkClick, children: linkText }))] })) }));
|
|
1105
1105
|
};
|
|
1106
1106
|
NeoBanner.displayName = 'NeoBanner';
|
|
1107
1107
|
|
|
@@ -1171,7 +1171,7 @@ function NeoBreadcrumbs({ children, className }) {
|
|
|
1171
1171
|
}
|
|
1172
1172
|
|
|
1173
1173
|
// Props that should not be forwarded to ButtonBase (Button-specific props that ButtonBase doesn't support)
|
|
1174
|
-
const buttonOnlyProps
|
|
1174
|
+
const buttonOnlyProps = [
|
|
1175
1175
|
'variant',
|
|
1176
1176
|
'size',
|
|
1177
1177
|
'loading',
|
|
@@ -1181,7 +1181,7 @@ const buttonOnlyProps$1 = [
|
|
|
1181
1181
|
'disableElevation',
|
|
1182
1182
|
];
|
|
1183
1183
|
const StyledButtonBase$1 = styled(ButtonBase, {
|
|
1184
|
-
shouldForwardProp: prop => !buttonOnlyProps
|
|
1184
|
+
shouldForwardProp: prop => !buttonOnlyProps.includes(prop),
|
|
1185
1185
|
})(({ theme, variant = 'primary', size = 'medium', loading = false }) => {
|
|
1186
1186
|
// Size configurations using theme.spacing()
|
|
1187
1187
|
const sizeConfig = {
|
|
@@ -2785,18 +2785,21 @@ NeoDataGridColumnsButton.displayName = 'NeoDataGridColumnsButton';
|
|
|
2785
2785
|
const sizeStyles = {
|
|
2786
2786
|
small: {
|
|
2787
2787
|
height: 16,
|
|
2788
|
+
minWidth: 16,
|
|
2788
2789
|
paddingLeft: spacing.spacing_1_2, // 4px
|
|
2789
2790
|
paddingRight: spacing.spacing_1_2, // 4px
|
|
2790
2791
|
},
|
|
2791
2792
|
medium: {
|
|
2792
2793
|
height: 18,
|
|
2794
|
+
minWidth: 18,
|
|
2793
2795
|
paddingLeft: spacing.spacing_3_4, // 6px
|
|
2794
2796
|
paddingRight: spacing.spacing_3_4, // 6px
|
|
2795
2797
|
},
|
|
2796
2798
|
large: {
|
|
2797
2799
|
height: 20,
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
+
minWidth: 20,
|
|
2801
|
+
paddingLeft: spacing.spacing_1, // 8px
|
|
2802
|
+
paddingRight: spacing.spacing_1, // 8px
|
|
2800
2803
|
},
|
|
2801
2804
|
};
|
|
2802
2805
|
const outlinedColorStyles = {
|
|
@@ -2847,8 +2850,10 @@ const filledColorStyles = {
|
|
|
2847
2850
|
};
|
|
2848
2851
|
const StyledChip$1 = styled(Chip)(({ theme, size, variant, color }) => ({
|
|
2849
2852
|
padding: 0,
|
|
2853
|
+
boxSizing: 'border-box',
|
|
2850
2854
|
borderRadius: borderRadius.full,
|
|
2851
2855
|
fontSize: theme.typography.pxToRem(typography.fontSize.xs),
|
|
2856
|
+
lineHeight: 1,
|
|
2852
2857
|
fontWeight: typography.fontWeight.medium,
|
|
2853
2858
|
...(size && sizeStyles[size]),
|
|
2854
2859
|
[`& .${chipClasses.label}`]: {
|
|
@@ -3414,20 +3419,24 @@ function subMonths(date, amount, options) {
|
|
|
3414
3419
|
return addMonths(date, -1);
|
|
3415
3420
|
}
|
|
3416
3421
|
|
|
3417
|
-
//
|
|
3418
|
-
const
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
'
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
})
|
|
3430
|
-
|
|
3422
|
+
// Cast NeoButton to a simpler type for styled() compatibility (avoids generic inference issues)
|
|
3423
|
+
const NeoButtonBase = NeoButton;
|
|
3424
|
+
// Icon-only wrapper around NeoButton for hierarchy variants
|
|
3425
|
+
const StyledIconOnlyButton = styled(NeoButtonBase)(({ size = 'medium' }) => {
|
|
3426
|
+
const dimension = size === 'small' ? 32 : spacing.spacing_5;
|
|
3427
|
+
return {
|
|
3428
|
+
'&&': {
|
|
3429
|
+
minWidth: 'unset',
|
|
3430
|
+
padding: 0,
|
|
3431
|
+
width: dimension,
|
|
3432
|
+
},
|
|
3433
|
+
};
|
|
3434
|
+
});
|
|
3435
|
+
// Nav variant - standalone styled MUI IconButton (not backed by Figma)
|
|
3436
|
+
const navOnlyProps = ['size', 'variant', 'active'];
|
|
3437
|
+
const StyledNavButton = styled(IconButton, {
|
|
3438
|
+
shouldForwardProp: prop => !navOnlyProps.includes(prop),
|
|
3439
|
+
})(({ theme, size = 'medium', active = false }) => {
|
|
3431
3440
|
const sizeConfig = {
|
|
3432
3441
|
small: {
|
|
3433
3442
|
width: 32,
|
|
@@ -3441,50 +3450,24 @@ const StyledIconButton = styled(IconButton, {
|
|
|
3441
3450
|
},
|
|
3442
3451
|
};
|
|
3443
3452
|
const sizeStyles = sizeConfig[size];
|
|
3444
|
-
|
|
3445
|
-
|
|
3453
|
+
const activeNavStyles = {
|
|
3454
|
+
backgroundColor: semanticColors.icons.pressedBackground,
|
|
3455
|
+
borderColor: 'transparent',
|
|
3456
|
+
color: semanticColors.buttons.primary.pressed,
|
|
3457
|
+
};
|
|
3458
|
+
return {
|
|
3446
3459
|
width: sizeStyles.width,
|
|
3447
3460
|
height: sizeStyles.height,
|
|
3448
3461
|
padding: sizeStyles.padding,
|
|
3449
|
-
borderRadius: borderRadius.button,
|
|
3462
|
+
borderRadius: borderRadius.button,
|
|
3450
3463
|
transition: theme.transitions.create(['background-color', 'border-color', 'color'], {
|
|
3451
3464
|
duration: theme.transitions.duration.short,
|
|
3452
3465
|
}),
|
|
3453
|
-
// Disabled state
|
|
3454
|
-
[`&.${iconButtonClasses.disabled}`]: {
|
|
3455
|
-
cursor: 'not-allowed',
|
|
3456
|
-
pointerEvents: 'auto',
|
|
3457
|
-
},
|
|
3458
|
-
// Focus visible for keyboard navigation
|
|
3459
3466
|
'&:focus-visible': {
|
|
3460
3467
|
outline: `2px solid ${semanticColors.border.focus}`,
|
|
3461
3468
|
outlineOffset: 2,
|
|
3462
3469
|
},
|
|
3463
|
-
|
|
3464
|
-
// Default variant - transparent neutral style
|
|
3465
|
-
const defaultStyles = {
|
|
3466
|
-
backgroundColor: 'transparent',
|
|
3467
|
-
color: semanticColors.icons.default,
|
|
3468
|
-
border: 'none',
|
|
3469
|
-
'&:hover': {
|
|
3470
|
-
backgroundColor: semanticColors.icons.hoverBackground,
|
|
3471
|
-
color: semanticColors.icons.hover,
|
|
3472
|
-
},
|
|
3473
|
-
'&:active': {
|
|
3474
|
-
color: semanticColors.icons.pressed,
|
|
3475
|
-
},
|
|
3476
|
-
[`&.${iconButtonClasses.disabled}`]: {
|
|
3477
|
-
backgroundColor: 'transparent',
|
|
3478
|
-
color: semanticColors.icons.disabled,
|
|
3479
|
-
},
|
|
3480
|
-
};
|
|
3481
|
-
// Nav variant - 44px pill with border, used in global navigation
|
|
3482
|
-
const activeNavStyles = {
|
|
3483
|
-
backgroundColor: semanticColors.icons.pressedBackground,
|
|
3484
|
-
borderColor: 'transparent',
|
|
3485
|
-
color: semanticColors.buttons.primary.pressed,
|
|
3486
|
-
};
|
|
3487
|
-
const navStyles = {
|
|
3470
|
+
// Nav styles
|
|
3488
3471
|
backgroundColor: semanticColors.surfaces.white,
|
|
3489
3472
|
color: semanticColors.icons.default,
|
|
3490
3473
|
border: `1px solid ${semanticColors.border.secondary}`,
|
|
@@ -3495,6 +3478,8 @@ const StyledIconButton = styled(IconButton, {
|
|
|
3495
3478
|
},
|
|
3496
3479
|
'&:active': activeNavStyles,
|
|
3497
3480
|
[`&.${iconButtonClasses.disabled}`]: {
|
|
3481
|
+
cursor: 'not-allowed',
|
|
3482
|
+
pointerEvents: 'auto',
|
|
3498
3483
|
backgroundColor: semanticColors.surfaces.white,
|
|
3499
3484
|
borderColor: semanticColors.border.secondary,
|
|
3500
3485
|
color: semanticColors.icons.disabled,
|
|
@@ -3502,33 +3487,30 @@ const StyledIconButton = styled(IconButton, {
|
|
|
3502
3487
|
},
|
|
3503
3488
|
...(active ? activeNavStyles : {}),
|
|
3504
3489
|
};
|
|
3505
|
-
const variantStyles = {
|
|
3506
|
-
default: defaultStyles,
|
|
3507
|
-
nav: navStyles,
|
|
3508
|
-
};
|
|
3509
|
-
return {
|
|
3510
|
-
...baseStyles,
|
|
3511
|
-
...variantStyles[variant],
|
|
3512
|
-
};
|
|
3513
3490
|
});
|
|
3514
3491
|
/**
|
|
3515
|
-
* NeoIconButton - Icon-only button component
|
|
3492
|
+
* NeoIconButton - Icon-only button component
|
|
3516
3493
|
*
|
|
3517
|
-
*
|
|
3518
|
-
*
|
|
3494
|
+
* For hierarchy variants (primary/secondary/destructive/tertiary), wraps NeoButton with
|
|
3495
|
+
* icon-only sizing. For the `nav` variant, uses a standalone MUI IconButton with custom styling.
|
|
3519
3496
|
*
|
|
3520
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=
|
|
3497
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=4086-7590
|
|
3521
3498
|
*
|
|
3522
3499
|
* Figma Props Mapping:
|
|
3500
|
+
* - Hierarchy (Primary|Secondary|Destructive|Tertiary) → variant prop
|
|
3523
3501
|
* - Size (Small|Medium) → size prop
|
|
3502
|
+
* - Show text = false → always (this is the icon-only variant of NeoButton)
|
|
3524
3503
|
* - State=Disabled → disabled prop
|
|
3504
|
+
* - State=Loading → loading prop
|
|
3525
3505
|
* - State=Hover → CSS :hover
|
|
3526
|
-
* - State=
|
|
3506
|
+
* - State=Pressed → CSS :active
|
|
3527
3507
|
* - State=Focus → CSS :focus-visible
|
|
3528
|
-
* - State=Loading → not yet implemented
|
|
3529
3508
|
*/
|
|
3530
|
-
const NeoIconButton = ({ size = 'medium', variant = '
|
|
3531
|
-
|
|
3509
|
+
const NeoIconButton = ({ size = 'medium', variant = 'tertiary', active = false, loading, children, ...props }) => {
|
|
3510
|
+
if (variant === 'nav') {
|
|
3511
|
+
return (jsx(StyledNavButton, { size: size, active: active, disableRipple: true, ...props, children: children }));
|
|
3512
|
+
}
|
|
3513
|
+
return (jsx(StyledIconOnlyButton, { variant: variant, size: size, loading: loading, ...props, children: children }));
|
|
3532
3514
|
};
|
|
3533
3515
|
NeoIconButton.displayName = 'NeoIconButton';
|
|
3534
3516
|
|
|
@@ -3596,7 +3578,7 @@ const StyledDatePicker = styled(DatePicker)(({ theme }) => ({
|
|
|
3596
3578
|
fontWeight: typography.fontWeight.medium,
|
|
3597
3579
|
color: semanticColors.typography.bodySecondary,
|
|
3598
3580
|
},
|
|
3599
|
-
[`& .${
|
|
3581
|
+
[`& .${pickerDayClasses.root}`]: {
|
|
3600
3582
|
fontSize: theme.typography.pxToRem(typography.fontSize.sm),
|
|
3601
3583
|
color: semanticColors.typography.bodySecondary,
|
|
3602
3584
|
borderRadius: borderRadius.l,
|
|
@@ -3610,7 +3592,7 @@ const StyledDatePicker = styled(DatePicker)(({ theme }) => ({
|
|
|
3610
3592
|
backgroundColor: colors.grey[800],
|
|
3611
3593
|
},
|
|
3612
3594
|
},
|
|
3613
|
-
[`&.${
|
|
3595
|
+
[`&.${pickerDayClasses.today}`]: {
|
|
3614
3596
|
border: `2px solid ${colors.grey[800]}`,
|
|
3615
3597
|
backgroundColor: 'transparent',
|
|
3616
3598
|
},
|
|
@@ -3636,8 +3618,6 @@ const StyledDateRangePicker = styled(DateRangePicker)(({ theme }) => ({
|
|
|
3636
3618
|
fontSize: theme.typography.pxToRem(typography.fontSize.sm),
|
|
3637
3619
|
color: semanticColors.typography.bodySecondary,
|
|
3638
3620
|
borderRadius: borderRadius.l,
|
|
3639
|
-
},
|
|
3640
|
-
[`& .${dateRangePickerDayClasses.day}`]: {
|
|
3641
3621
|
'&:hover': {
|
|
3642
3622
|
backgroundColor: semanticColors.icons.hoverBackground,
|
|
3643
3623
|
},
|
|
@@ -3646,15 +3626,13 @@ const StyledDateRangePicker = styled(DateRangePicker)(({ theme }) => ({
|
|
|
3646
3626
|
color: semanticColors.surfaces.white,
|
|
3647
3627
|
},
|
|
3648
3628
|
},
|
|
3649
|
-
[`& .${dateRangePickerDayClasses.
|
|
3629
|
+
[`& .${dateRangePickerDayClasses.insideSelection}`]: {
|
|
3650
3630
|
backgroundColor: semanticColors.icons.hoverBackground,
|
|
3631
|
+
color: semanticColors.typography.input.default,
|
|
3651
3632
|
},
|
|
3652
|
-
[`& .${dateRangePickerDayClasses.
|
|
3633
|
+
[`& .${dateRangePickerDayClasses.selectionStart}, & .${dateRangePickerDayClasses.selectionEnd}`]: {
|
|
3653
3634
|
backgroundColor: colors.grey[800],
|
|
3654
3635
|
},
|
|
3655
|
-
[`& .${dateRangePickerDayClasses.dayInsideRangeInterval}`]: {
|
|
3656
|
-
color: semanticColors.typography.input.default,
|
|
3657
|
-
},
|
|
3658
3636
|
[`& .${pickersCalendarHeaderClasses.label}`]: {
|
|
3659
3637
|
fontSize: theme.typography.pxToRem(typography.fontSize.sm),
|
|
3660
3638
|
fontWeight: typography.fontWeight.semiBold,
|
|
@@ -6577,7 +6555,11 @@ const ItemEndAction = styled('span')({
|
|
|
6577
6555
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=4190-30493
|
|
6578
6556
|
*/
|
|
6579
6557
|
const NeoTreeView = ({ slots, ...props }) => {
|
|
6580
|
-
return (jsx(StyledTreeView
|
|
6558
|
+
return (jsx(StyledTreeView
|
|
6559
|
+
// v9 enables virtualization by default; disabled to preserve current layout behavior
|
|
6560
|
+
, {
|
|
6561
|
+
// v9 enables virtualization by default; disabled to preserve current layout behavior
|
|
6562
|
+
disableVirtualization: true, slots: {
|
|
6581
6563
|
item: NeoTreeItem,
|
|
6582
6564
|
collapseIcon: CollapseIcon,
|
|
6583
6565
|
expandIcon: ExpandIcon,
|
|
@@ -6598,17 +6580,14 @@ const StyledTreeView = styled(RichTreeViewPro)({
|
|
|
6598
6580
|
[`& .${treeItemClasses.content}:hover`]: {
|
|
6599
6581
|
backgroundColor: semanticColors.surfaces.listHover,
|
|
6600
6582
|
},
|
|
6601
|
-
[`& .${treeItemClasses.content}
|
|
6583
|
+
[`& .${treeItemClasses.content}[data-focused]`]: {
|
|
6602
6584
|
boxShadow: `inset 0 0 0 2px ${semanticColors.border.focus}`,
|
|
6603
6585
|
backgroundColor: 'transparent',
|
|
6604
6586
|
},
|
|
6605
|
-
[`& .${treeItemClasses.content}
|
|
6606
|
-
backgroundColor: semanticColors.surfaces.listHover,
|
|
6607
|
-
},
|
|
6608
|
-
[`& .${treeItemClasses.content}.Mui-selected:hover`]: {
|
|
6587
|
+
[`& .${treeItemClasses.content}[data-selected]`]: {
|
|
6609
6588
|
backgroundColor: semanticColors.surfaces.listHover,
|
|
6610
6589
|
},
|
|
6611
|
-
[`& .${treeItemClasses.content}
|
|
6590
|
+
[`& .${treeItemClasses.content}[data-selected][data-focused]`]: {
|
|
6612
6591
|
backgroundColor: semanticColors.surfaces.listHover,
|
|
6613
6592
|
boxShadow: `inset 0 0 0 2px ${semanticColors.border.focus}`,
|
|
6614
6593
|
},
|