@moderneinc/neo-styled-components 3.0.0 → 4.0.0-next.44b6fc
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 +50 -0
- package/dist/DataGridFilterPanel/DataGridFilterPanel.d.ts +2 -2
- package/dist/DatePicker/DatePicker.d.ts +3 -5
- package/dist/Divider/Divider.d.ts +4 -4
- package/dist/ListItem/ListItem.d.ts +7 -7
- package/dist/{DropdownMenu/DropdownMenu.d.ts → Menu/Menu.d.ts} +9 -9
- package/dist/{DropdownMenuItem/DropdownMenuItem.d.ts → MenuItem/MenuItem.d.ts} +9 -9
- package/dist/NavigationItem/NavigationItem.d.ts +12 -8
- package/dist/Select/Select.d.ts +24 -0
- package/dist/Tabs/Tabs.d.ts +1 -4
- package/dist/Tag/Tag.d.ts +12 -12
- package/dist/Toast/Toast.d.ts +20 -14
- package/dist/Tooltip/Tooltip.d.ts +3 -3
- package/dist/index.d.ts +116 -165
- package/dist/index.esm.js +350 -396
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +360 -407
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/Dropdown/Dropdown.d.ts +0 -24
- package/dist/MarketplaceCard/MarketplaceCard.d.ts +0 -23
- package/dist/MarketplaceLargeCard/MarketplaceLargeCard.d.ts +0 -23
- package/dist/NavItem/NavItem.d.ts +0 -26
- package/dist/StatusBanner/StatusBanner.d.ts +0 -55
package/dist/index.js
CHANGED
|
@@ -8,11 +8,11 @@ var Avatar = require('@mui/material/Avatar');
|
|
|
8
8
|
var Chip = require('@mui/material/Chip');
|
|
9
9
|
var SvgIcon = require('@mui/material/SvgIcon');
|
|
10
10
|
var Alert = require('@mui/material/Alert');
|
|
11
|
-
var
|
|
11
|
+
var ButtonBase = require('@mui/material/ButtonBase');
|
|
12
12
|
var React = require('react');
|
|
13
|
+
var IconButton = require('@mui/material/IconButton');
|
|
13
14
|
var Breadcrumbs = require('@mui/material/Breadcrumbs');
|
|
14
15
|
var Link = require('@mui/material/Link');
|
|
15
|
-
var ButtonBase = require('@mui/material/ButtonBase');
|
|
16
16
|
var CircularProgress = require('@mui/material/CircularProgress');
|
|
17
17
|
var MuiToggleButton = require('@mui/material/ToggleButton');
|
|
18
18
|
var MuiToggleButtonGroup = require('@mui/material/ToggleButtonGroup');
|
|
@@ -42,14 +42,14 @@ var Badge = require('@mui/material/Badge');
|
|
|
42
42
|
var LinearProgress = require('@mui/material/LinearProgress');
|
|
43
43
|
var Paper = require('@mui/material/Paper');
|
|
44
44
|
var Stack = require('@mui/material/Stack');
|
|
45
|
-
var List = require('@mui/material/List');
|
|
46
|
-
var Menu = require('@mui/material/Menu');
|
|
47
45
|
var FormControl = require('@mui/material/FormControl');
|
|
48
46
|
var FormHelperText = require('@mui/material/FormHelperText');
|
|
49
47
|
var ListItemButton = require('@mui/material/ListItemButton');
|
|
50
48
|
var ListItemIcon = require('@mui/material/ListItemIcon');
|
|
51
49
|
var ListItemText = require('@mui/material/ListItemText');
|
|
52
50
|
var Typography = require('@mui/material/Typography');
|
|
51
|
+
var List = require('@mui/material/List');
|
|
52
|
+
var Menu = require('@mui/material/Menu');
|
|
53
53
|
var Dialog = require('@mui/material/Dialog');
|
|
54
54
|
var DialogActions = require('@mui/material/DialogActions');
|
|
55
55
|
var DialogContent = require('@mui/material/DialogContent');
|
|
@@ -138,7 +138,7 @@ const AvatarContainer = styles.styled(Box)(({ size = 'medium' }) => ({
|
|
|
138
138
|
alignItems: 'center',
|
|
139
139
|
justifyContent: 'center',
|
|
140
140
|
overflow: 'hidden',
|
|
141
|
-
boxShadow: `${neoDesign.shadows.
|
|
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
142
|
}),
|
|
143
143
|
'&:focus-within': {
|
|
144
144
|
...focusRingStyles,
|
|
@@ -690,11 +690,11 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
690
690
|
*/
|
|
691
691
|
|
|
692
692
|
|
|
693
|
-
const __iconNode$
|
|
693
|
+
const __iconNode$k = [
|
|
694
694
|
["path", { d: "M12 5v14", key: "s699le" }],
|
|
695
695
|
["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
|
|
696
696
|
];
|
|
697
|
-
const ArrowDown = createLucideIcon("arrow-down", __iconNode$
|
|
697
|
+
const ArrowDown = createLucideIcon("arrow-down", __iconNode$k);
|
|
698
698
|
|
|
699
699
|
/**
|
|
700
700
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -704,11 +704,32 @@ const ArrowDown = createLucideIcon("arrow-down", __iconNode$j);
|
|
|
704
704
|
*/
|
|
705
705
|
|
|
706
706
|
|
|
707
|
-
const __iconNode$
|
|
707
|
+
const __iconNode$j = [
|
|
708
708
|
["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
|
|
709
709
|
["path", { d: "M12 19V5", key: "x0mq9r" }]
|
|
710
710
|
];
|
|
711
|
-
const ArrowUp = createLucideIcon("arrow-up", __iconNode$
|
|
711
|
+
const ArrowUp = createLucideIcon("arrow-up", __iconNode$j);
|
|
712
|
+
|
|
713
|
+
/**
|
|
714
|
+
* @license lucide-react v0.577.0 - ISC
|
|
715
|
+
*
|
|
716
|
+
* This source code is licensed under the ISC license.
|
|
717
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
718
|
+
*/
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+
const __iconNode$i = [
|
|
722
|
+
[
|
|
723
|
+
"path",
|
|
724
|
+
{
|
|
725
|
+
d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",
|
|
726
|
+
key: "3c2336"
|
|
727
|
+
}
|
|
728
|
+
],
|
|
729
|
+
["line", { x1: "12", x2: "12", y1: "16", y2: "12", key: "1y1yb1" }],
|
|
730
|
+
["line", { x1: "12", x2: "12.01", y1: "8", y2: "8", key: "110wyk" }]
|
|
731
|
+
];
|
|
732
|
+
const BadgeInfo = createLucideIcon("badge-info", __iconNode$i);
|
|
712
733
|
|
|
713
734
|
/**
|
|
714
735
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -814,10 +835,10 @@ const CircleAlert = createLucideIcon("circle-alert", __iconNode$b);
|
|
|
814
835
|
|
|
815
836
|
|
|
816
837
|
const __iconNode$a = [
|
|
817
|
-
["
|
|
818
|
-
["path", { d: "m9
|
|
838
|
+
["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
|
|
839
|
+
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
819
840
|
];
|
|
820
|
-
const
|
|
841
|
+
const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$a);
|
|
821
842
|
|
|
822
843
|
/**
|
|
823
844
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -858,26 +879,11 @@ const Columns3 = createLucideIcon("columns-3", __iconNode$8);
|
|
|
858
879
|
|
|
859
880
|
|
|
860
881
|
const __iconNode$7 = [
|
|
861
|
-
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
862
|
-
["path", { d: "M12 16v-4", key: "1dtifu" }],
|
|
863
|
-
["path", { d: "M12 8h.01", key: "e9boi3" }]
|
|
864
|
-
];
|
|
865
|
-
const Info = createLucideIcon("info", __iconNode$7);
|
|
866
|
-
|
|
867
|
-
/**
|
|
868
|
-
* @license lucide-react v0.577.0 - ISC
|
|
869
|
-
*
|
|
870
|
-
* This source code is licensed under the ISC license.
|
|
871
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
872
|
-
*/
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
const __iconNode$6 = [
|
|
876
882
|
["path", { d: "M2 5h20", key: "1fs1ex" }],
|
|
877
883
|
["path", { d: "M6 12h12", key: "8npq4p" }],
|
|
878
884
|
["path", { d: "M9 19h6", key: "456am0" }]
|
|
879
885
|
];
|
|
880
|
-
const ListFilter = createLucideIcon("list-filter", __iconNode$
|
|
886
|
+
const ListFilter = createLucideIcon("list-filter", __iconNode$7);
|
|
881
887
|
|
|
882
888
|
/**
|
|
883
889
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -887,8 +893,8 @@ const ListFilter = createLucideIcon("list-filter", __iconNode$6);
|
|
|
887
893
|
*/
|
|
888
894
|
|
|
889
895
|
|
|
890
|
-
const __iconNode$
|
|
891
|
-
const Minus = createLucideIcon("minus", __iconNode$
|
|
896
|
+
const __iconNode$6 = [["path", { d: "M5 12h14", key: "1ays0h" }]];
|
|
897
|
+
const Minus = createLucideIcon("minus", __iconNode$6);
|
|
892
898
|
|
|
893
899
|
/**
|
|
894
900
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -898,11 +904,11 @@ const Minus = createLucideIcon("minus", __iconNode$5);
|
|
|
898
904
|
*/
|
|
899
905
|
|
|
900
906
|
|
|
901
|
-
const __iconNode$
|
|
907
|
+
const __iconNode$5 = [
|
|
902
908
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
903
909
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
904
910
|
];
|
|
905
|
-
const Plus = createLucideIcon("plus", __iconNode$
|
|
911
|
+
const Plus = createLucideIcon("plus", __iconNode$5);
|
|
906
912
|
|
|
907
913
|
/**
|
|
908
914
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -912,11 +918,11 @@ const Plus = createLucideIcon("plus", __iconNode$4);
|
|
|
912
918
|
*/
|
|
913
919
|
|
|
914
920
|
|
|
915
|
-
const __iconNode$
|
|
921
|
+
const __iconNode$4 = [
|
|
916
922
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
917
923
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
918
924
|
];
|
|
919
|
-
const Search = createLucideIcon("search", __iconNode$
|
|
925
|
+
const Search = createLucideIcon("search", __iconNode$4);
|
|
920
926
|
|
|
921
927
|
/**
|
|
922
928
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -926,14 +932,35 @@ const Search = createLucideIcon("search", __iconNode$3);
|
|
|
926
932
|
*/
|
|
927
933
|
|
|
928
934
|
|
|
929
|
-
const __iconNode$
|
|
935
|
+
const __iconNode$3 = [
|
|
930
936
|
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
931
937
|
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
932
938
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
933
939
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
934
940
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
935
941
|
];
|
|
936
|
-
const Trash2 = createLucideIcon("trash-2", __iconNode$
|
|
942
|
+
const Trash2 = createLucideIcon("trash-2", __iconNode$3);
|
|
943
|
+
|
|
944
|
+
/**
|
|
945
|
+
* @license lucide-react v0.577.0 - ISC
|
|
946
|
+
*
|
|
947
|
+
* This source code is licensed under the ISC license.
|
|
948
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
949
|
+
*/
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
const __iconNode$2 = [
|
|
953
|
+
[
|
|
954
|
+
"path",
|
|
955
|
+
{
|
|
956
|
+
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
957
|
+
key: "wmoenq"
|
|
958
|
+
}
|
|
959
|
+
],
|
|
960
|
+
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
961
|
+
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
962
|
+
];
|
|
963
|
+
const TriangleAlert = createLucideIcon("triangle-alert", __iconNode$2);
|
|
937
964
|
|
|
938
965
|
/**
|
|
939
966
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -968,7 +995,93 @@ const __iconNode = [
|
|
|
968
995
|
];
|
|
969
996
|
const X = createLucideIcon("x", __iconNode);
|
|
970
997
|
|
|
971
|
-
const
|
|
998
|
+
const neutralSmallShadow = `${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}`;
|
|
999
|
+
const intentColors$2 = {
|
|
1000
|
+
success: neoDesign.semanticColors.status.success,
|
|
1001
|
+
error: neoDesign.semanticColors.status.error,
|
|
1002
|
+
warning: neoDesign.semanticColors.status.warning,
|
|
1003
|
+
offline: neoDesign.semanticColors.status.neutral,
|
|
1004
|
+
info: neoDesign.semanticColors.status.info,
|
|
1005
|
+
};
|
|
1006
|
+
// biome-ignore lint/suspicious/noExplicitAny: Type cast required to override MUI Alert variant type without global augmentation
|
|
1007
|
+
const StyledAlert$2 = styles.styled(Alert, {
|
|
1008
|
+
shouldForwardProp: prop => prop !== 'intent' && prop !== 'alertType',
|
|
1009
|
+
})(({ theme, intent = 'success', alertType = 'outlined' }) => {
|
|
1010
|
+
const palette = intentColors$2[intent];
|
|
1011
|
+
const isFilled = alertType === 'filled';
|
|
1012
|
+
const iconColor = isFilled ? neoDesign.semanticColors.typography.tooltip : palette.default;
|
|
1013
|
+
const messageColor = isFilled ? neoDesign.semanticColors.typography.tooltip : neoDesign.semanticColors.typography.body;
|
|
1014
|
+
return {
|
|
1015
|
+
height: neoDesign.spacing.spacing_8,
|
|
1016
|
+
width: '100%',
|
|
1017
|
+
borderRadius: neoDesign.borderRadius.xS,
|
|
1018
|
+
alignItems: 'center',
|
|
1019
|
+
fontFamily: neoDesign.typography.fontFamily.body,
|
|
1020
|
+
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.default),
|
|
1021
|
+
fontWeight: neoDesign.typography.fontWeight.semiBold,
|
|
1022
|
+
lineHeight: 1.5,
|
|
1023
|
+
padding: theme.spacing(0, 2),
|
|
1024
|
+
backgroundColor: isFilled ? palette.dark : palette.light,
|
|
1025
|
+
border: isFilled ? 'none' : `1px solid ${palette.transparent}`,
|
|
1026
|
+
color: isFilled ? neoDesign.semanticColors.typography.tooltip : neoDesign.semanticColors.typography.body,
|
|
1027
|
+
boxShadow: isFilled ? neutralSmallShadow : undefined,
|
|
1028
|
+
[`& .${Alert.alertClasses.icon}`]: {
|
|
1029
|
+
color: iconColor,
|
|
1030
|
+
padding: 0,
|
|
1031
|
+
opacity: 1,
|
|
1032
|
+
marginRight: neoDesign.spacing.spacing_1_1_2,
|
|
1033
|
+
},
|
|
1034
|
+
[`& .${Alert.alertClasses.message}`]: {
|
|
1035
|
+
color: messageColor,
|
|
1036
|
+
padding: 0,
|
|
1037
|
+
flex: 1,
|
|
1038
|
+
display: 'flex',
|
|
1039
|
+
flexDirection: 'column',
|
|
1040
|
+
justifyContent: 'center',
|
|
1041
|
+
'& span:last-child': {
|
|
1042
|
+
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.sm),
|
|
1043
|
+
fontWeight: neoDesign.typography.fontWeight.medium,
|
|
1044
|
+
color: isFilled
|
|
1045
|
+
? neoDesign.semanticColors.typography.tooltip
|
|
1046
|
+
: neoDesign.semanticColors.typography.bodySecondary,
|
|
1047
|
+
lineHeight: 1.4,
|
|
1048
|
+
},
|
|
1049
|
+
},
|
|
1050
|
+
[`& .${Alert.alertClasses.action}`]: {
|
|
1051
|
+
padding: 0,
|
|
1052
|
+
marginRight: 0,
|
|
1053
|
+
...(isFilled && {
|
|
1054
|
+
color: neoDesign.semanticColors.typography.tooltip,
|
|
1055
|
+
[`& .${ButtonBase.buttonBaseClasses.root}`]: { color: 'inherit' },
|
|
1056
|
+
}),
|
|
1057
|
+
},
|
|
1058
|
+
};
|
|
1059
|
+
});
|
|
1060
|
+
const iconMap = {
|
|
1061
|
+
success: jsxRuntime.jsx(CircleCheckBig, { size: 24 }),
|
|
1062
|
+
error: jsxRuntime.jsx(CircleAlert, { size: 24 }),
|
|
1063
|
+
warning: jsxRuntime.jsx(TriangleAlert, { size: 24 }),
|
|
1064
|
+
offline: jsxRuntime.jsx(WifiOff, { size: 24 }),
|
|
1065
|
+
info: jsxRuntime.jsx(BadgeInfo, { size: 24 }),
|
|
1066
|
+
};
|
|
1067
|
+
/**
|
|
1068
|
+
* NeoAlert - Alert component for displaying contextual status messages
|
|
1069
|
+
*
|
|
1070
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4921-3427
|
|
1071
|
+
*
|
|
1072
|
+
* Figma Props Mapping:
|
|
1073
|
+
* - Intent (Success|Error|Warning|Offline|Info) → intent
|
|
1074
|
+
* - Type (Outlined|Filled) → type
|
|
1075
|
+
* - Show supporting text → description prop presence
|
|
1076
|
+
* - Show Button → action prop presence
|
|
1077
|
+
*/
|
|
1078
|
+
const NeoAlert = ({ intent = 'success', type = 'outlined', title, description, icon, action, ...props }) => {
|
|
1079
|
+
const defaultIcon = iconMap[intent];
|
|
1080
|
+
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 })] }));
|
|
1081
|
+
};
|
|
1082
|
+
NeoAlert.displayName = 'NeoAlert';
|
|
1083
|
+
|
|
1084
|
+
const intentColors$1 = {
|
|
972
1085
|
info: neoDesign.semanticColors.status.info,
|
|
973
1086
|
success: neoDesign.semanticColors.status.success,
|
|
974
1087
|
error: neoDesign.semanticColors.status.error,
|
|
@@ -976,10 +1089,10 @@ const intentColors = {
|
|
|
976
1089
|
neutral: neoDesign.semanticColors.status.neutral,
|
|
977
1090
|
};
|
|
978
1091
|
// biome-ignore lint/suspicious/noExplicitAny: Type cast required to override MUI Alert variant type without global augmentation
|
|
979
|
-
const StyledAlert$
|
|
1092
|
+
const StyledAlert$1 = styles.styled(Alert, {
|
|
980
1093
|
shouldForwardProp: prop => prop !== 'messagePosition' && prop !== 'intent' && prop !== 'bannerType',
|
|
981
1094
|
})(({ intent = 'info', bannerType = 'outlined', messagePosition = 'left' }) => {
|
|
982
|
-
const palette = intentColors[intent];
|
|
1095
|
+
const palette = intentColors$1[intent];
|
|
983
1096
|
const typeStyles = bannerType === 'filled'
|
|
984
1097
|
? {
|
|
985
1098
|
backgroundColor: palette.dark,
|
|
@@ -1000,7 +1113,7 @@ const StyledAlert$2 = styles.styled(Alert, {
|
|
|
1000
1113
|
alignItems: 'center',
|
|
1001
1114
|
justifyContent: messagePosition === 'center' ? 'center' : 'flex-start',
|
|
1002
1115
|
...(messagePosition === 'center' && { position: 'relative' }),
|
|
1003
|
-
boxShadow: `${neoDesign.shadows.
|
|
1116
|
+
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}`,
|
|
1004
1117
|
fontSize: neoDesign.typography.fontSize.default,
|
|
1005
1118
|
fontWeight: neoDesign.typography.fontWeight.medium,
|
|
1006
1119
|
lineHeight: 1.5,
|
|
@@ -1055,8 +1168,8 @@ const NeoBanner = ({ intent = 'info', type = 'outlined', message, messagePositio
|
|
|
1055
1168
|
if (dismissed) {
|
|
1056
1169
|
return null;
|
|
1057
1170
|
}
|
|
1058
|
-
const closeIconColor = type === 'filled' ? neoDesign.semanticColors.surfaces.white : intentColors[intent].default;
|
|
1059
|
-
return (jsxRuntime.jsx(StyledAlert$
|
|
1171
|
+
const closeIconColor = type === 'filled' ? neoDesign.semanticColors.surfaces.white : intentColors$1[intent].default;
|
|
1172
|
+
return (jsxRuntime.jsx(StyledAlert$1, { ...props, intent: intent, bannerType: type, messagePosition: messagePosition, icon: messagePosition === 'left' ? icon || false : false, action: showClose ? (jsxRuntime.jsx(StyledIconButton$1, { size: "small", onClick: handleClose, closeIconColor: closeIconColor, children: jsxRuntime.jsx(X, { size: 24 }) })) : undefined, children: messagePosition === 'center' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [icon, jsxRuntime.jsx("span", { children: message }), linkText && (jsxRuntime.jsx(LinkText, { bannerType: type, onClick: onLinkClick, children: linkText }))] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { children: message }), linkText && (jsxRuntime.jsx(LinkText, { bannerType: type, onClick: onLinkClick, children: linkText }))] })) }));
|
|
1060
1173
|
};
|
|
1061
1174
|
NeoBanner.displayName = 'NeoBanner';
|
|
1062
1175
|
|
|
@@ -2220,32 +2333,32 @@ const Shortcut = styles.styled('span')(({ theme }) => ({
|
|
|
2220
2333
|
backgroundColor: neoDesign.semanticColors.surfaces.white,
|
|
2221
2334
|
}));
|
|
2222
2335
|
/**
|
|
2223
|
-
*
|
|
2336
|
+
* NeoMenuItem - Menu item component based on MUI MenuItem
|
|
2224
2337
|
*
|
|
2225
2338
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4159-8584
|
|
2226
2339
|
*
|
|
2227
2340
|
* @example
|
|
2228
2341
|
* ```tsx
|
|
2229
2342
|
* // With icon and shortcut
|
|
2230
|
-
* <
|
|
2343
|
+
* <NeoMenuItem icon={<UserIcon />} shortcut="⌘+P">
|
|
2231
2344
|
* View profile
|
|
2232
|
-
* </
|
|
2345
|
+
* </NeoMenuItem>
|
|
2233
2346
|
*
|
|
2234
2347
|
* // With secondary text (user list pattern from Figma node 4305:41844)
|
|
2235
|
-
* <
|
|
2236
|
-
* <
|
|
2348
|
+
* <NeoMenuItem secondaryText="@phoenix">Phoenix Baker</NeoMenuItem>
|
|
2349
|
+
* <NeoMenuItem secondaryText="@olivia">Olivia Rhye</NeoMenuItem>
|
|
2237
2350
|
*
|
|
2238
2351
|
* // Disabled state
|
|
2239
|
-
* <
|
|
2352
|
+
* <NeoMenuItem disabled>Disabled item</NeoMenuItem>
|
|
2240
2353
|
* ```
|
|
2241
2354
|
*/
|
|
2242
|
-
const
|
|
2355
|
+
const NeoMenuItem = ({ icon, shortcut, secondaryText, children, ...props }) => {
|
|
2243
2356
|
return (jsxRuntime.jsx(StyledMenuItem, { ...props, children: jsxRuntime.jsxs(MenuItemContent, { children: [icon && jsxRuntime.jsx(IconWrapper$1, { children: icon }), jsxRuntime.jsxs(LabelContainer$3, { children: [jsxRuntime.jsx(Label$3, { children: children }), secondaryText && jsxRuntime.jsx(SecondaryLabel, { children: secondaryText })] }), shortcut && jsxRuntime.jsx(Shortcut, { children: shortcut })] }) }));
|
|
2244
2357
|
};
|
|
2245
|
-
|
|
2358
|
+
NeoMenuItem.displayName = 'NeoMenuItem';
|
|
2246
2359
|
|
|
2247
2360
|
/**
|
|
2248
|
-
* Custom chevron icon for
|
|
2361
|
+
* Custom chevron icon for select
|
|
2249
2362
|
* Must accept props from MUI Select to work correctly
|
|
2250
2363
|
*/
|
|
2251
2364
|
const ChevronDownIcon = (props) => (jsxRuntime.jsx(ChevronDown, { ...props, size: neoDesign.spacing.spacing_2_1_2, color: neoDesign.semanticColors.typography.input.default, style: { ...props.style } }));
|
|
@@ -2285,22 +2398,22 @@ const StyledSelect = styles.styled(MuiSelect)({
|
|
|
2285
2398
|
},
|
|
2286
2399
|
});
|
|
2287
2400
|
/**
|
|
2288
|
-
*
|
|
2401
|
+
* NeoSelect - Select component with Neo design system styling
|
|
2289
2402
|
*
|
|
2290
2403
|
* A styled version of MUI's Select that uses Neo design tokens, Lucide ChevronDown icon,
|
|
2291
|
-
* and
|
|
2404
|
+
* and NeoMenu/NeoMenuItem for the dropdown list.
|
|
2292
2405
|
*
|
|
2293
2406
|
* @example
|
|
2294
2407
|
* ```tsx
|
|
2295
|
-
* import {
|
|
2408
|
+
* import { NeoSelect, NeoSelectOption } from '@moderneinc/neo-styled-components'
|
|
2296
2409
|
*
|
|
2297
|
-
* <
|
|
2298
|
-
* <
|
|
2299
|
-
* <
|
|
2300
|
-
* </
|
|
2410
|
+
* <NeoSelect value={value} onChange={handleChange}>
|
|
2411
|
+
* <NeoSelectOption value="option1">Option 1</NeoSelectOption>
|
|
2412
|
+
* <NeoSelectOption value="option2">Option 2</NeoSelectOption>
|
|
2413
|
+
* </NeoSelect>
|
|
2301
2414
|
* ```
|
|
2302
2415
|
*/
|
|
2303
|
-
const
|
|
2416
|
+
const NeoSelect = (props) => {
|
|
2304
2417
|
return (jsxRuntime.jsx(StyledSelect, { ...props, IconComponent: ChevronDownIcon, variant: "standard", MenuProps: {
|
|
2305
2418
|
...props.MenuProps,
|
|
2306
2419
|
PaperProps: {
|
|
@@ -2315,7 +2428,7 @@ const NeoDropdown = (props) => {
|
|
|
2315
2428
|
},
|
|
2316
2429
|
} }));
|
|
2317
2430
|
};
|
|
2318
|
-
|
|
2431
|
+
NeoSelect.displayName = 'NeoSelect';
|
|
2319
2432
|
|
|
2320
2433
|
/**
|
|
2321
2434
|
* Icon components for DataGrid filter panel slots
|
|
@@ -2776,37 +2889,37 @@ const outlinedColorStyles = {
|
|
|
2776
2889
|
default: {
|
|
2777
2890
|
backgroundColor: neoDesign.semanticColors.status.neutral.light,
|
|
2778
2891
|
color: neoDesign.semanticColors.status.neutral.dark,
|
|
2779
|
-
borderColor: neoDesign.
|
|
2892
|
+
borderColor: neoDesign.semanticColors.status.neutral.transparent,
|
|
2780
2893
|
},
|
|
2781
2894
|
error: {
|
|
2782
2895
|
backgroundColor: neoDesign.semanticColors.status.error.light,
|
|
2783
2896
|
color: neoDesign.semanticColors.status.error.dark,
|
|
2784
|
-
borderColor: neoDesign.
|
|
2897
|
+
borderColor: neoDesign.semanticColors.status.error.transparent,
|
|
2785
2898
|
},
|
|
2786
2899
|
warning: {
|
|
2787
2900
|
backgroundColor: neoDesign.semanticColors.status.warning.light,
|
|
2788
2901
|
color: neoDesign.semanticColors.status.warning.dark,
|
|
2789
|
-
borderColor: neoDesign.
|
|
2902
|
+
borderColor: neoDesign.semanticColors.status.warning.transparent,
|
|
2790
2903
|
},
|
|
2791
2904
|
success: {
|
|
2792
2905
|
backgroundColor: neoDesign.semanticColors.status.success.light,
|
|
2793
2906
|
color: neoDesign.semanticColors.status.success.dark,
|
|
2794
|
-
borderColor:
|
|
2907
|
+
borderColor: neoDesign.semanticColors.status.success.transparent,
|
|
2795
2908
|
},
|
|
2796
2909
|
info: {
|
|
2797
2910
|
backgroundColor: neoDesign.semanticColors.status.info.light,
|
|
2798
2911
|
color: neoDesign.semanticColors.status.info.dark,
|
|
2799
|
-
borderColor: neoDesign.
|
|
2912
|
+
borderColor: neoDesign.semanticColors.status.info.transparent,
|
|
2800
2913
|
},
|
|
2801
2914
|
violet: {
|
|
2802
|
-
backgroundColor:
|
|
2915
|
+
backgroundColor: 'rgba(235, 213, 241, 0.4)',
|
|
2803
2916
|
color: neoDesign.colors.violet[600],
|
|
2804
|
-
borderColor: neoDesign.colors.violet[
|
|
2917
|
+
borderColor: neoDesign.colors.violet[200],
|
|
2805
2918
|
},
|
|
2806
2919
|
beta: {
|
|
2807
|
-
backgroundColor: neoDesign.colors.digitalBlue[
|
|
2920
|
+
backgroundColor: neoDesign.colors.digitalBlue[50],
|
|
2808
2921
|
color: neoDesign.colors.digitalBlue[400],
|
|
2809
|
-
borderColor: neoDesign.colors.digitalBlue[
|
|
2922
|
+
borderColor: neoDesign.colors.digitalBlue[200],
|
|
2810
2923
|
},
|
|
2811
2924
|
};
|
|
2812
2925
|
const filledColorStyles = {
|
|
@@ -2844,13 +2957,13 @@ const StyledChip$1 = styles.styled(Chip)(({ theme, size, variant, color }) => ({
|
|
|
2844
2957
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4120-34533
|
|
2845
2958
|
*
|
|
2846
2959
|
* Figma Props Mapping:
|
|
2847
|
-
* -
|
|
2848
|
-
* -
|
|
2849
|
-
* -
|
|
2850
|
-
* - Label
|
|
2960
|
+
* - Size (Small|Medium|Large) → size (small|medium|large)
|
|
2961
|
+
* - Variant (Subtle|Filled) → variant (outlined|filled)
|
|
2962
|
+
* - Intent (Neutral|Error|Warning|Success|Info|Violet|Beta) → intent (default|error|warning|success|info|violet|beta)
|
|
2963
|
+
* - TEXT Label → label prop
|
|
2851
2964
|
*/
|
|
2852
|
-
function NeoTag({ size = 'small', variant = 'outlined', ...props }) {
|
|
2853
|
-
return jsxRuntime.jsx(StyledChip$1, { size: size, variant: variant, ...props });
|
|
2965
|
+
function NeoTag({ size = 'small', variant = 'outlined', intent = 'default', ...props }) {
|
|
2966
|
+
return jsxRuntime.jsx(StyledChip$1, { size: size, variant: variant, color: intent, ...props });
|
|
2854
2967
|
}
|
|
2855
2968
|
NeoTag.displayName = 'NeoTag';
|
|
2856
2969
|
|
|
@@ -3632,11 +3745,10 @@ const shortcutChipStyles = {
|
|
|
3632
3745
|
* customization. Supports both single date selection and date range selection with
|
|
3633
3746
|
* built-in shortcuts.
|
|
3634
3747
|
*
|
|
3635
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4176-
|
|
3748
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4176-8593
|
|
3636
3749
|
*
|
|
3637
3750
|
* Figma Props Mapping:
|
|
3638
|
-
* -
|
|
3639
|
-
* - type ('Single date'|'Dual dates') → type ('single'|'range')
|
|
3751
|
+
* - Mode ('Single'|'Range') → type ('single'|'range')
|
|
3640
3752
|
*
|
|
3641
3753
|
* Design Tokens Used:
|
|
3642
3754
|
* - colors: semanticColors.grey[800], semanticColors.grey[700], semanticColors.surfaces.white, semanticColors.icons.hoverBackground
|
|
@@ -3736,11 +3848,11 @@ const StyledDivider = styles.styled(Divider)(({ theme }) => ({
|
|
|
3736
3848
|
* @example
|
|
3737
3849
|
* ```tsx
|
|
3738
3850
|
* // In a menu
|
|
3739
|
-
* <
|
|
3740
|
-
* <
|
|
3851
|
+
* <NeoMenu>
|
|
3852
|
+
* <NeoMenuItem>Settings</NeoMenuItem>
|
|
3741
3853
|
* <NeoDivider />
|
|
3742
|
-
* <
|
|
3743
|
-
* </
|
|
3854
|
+
* <NeoMenuItem>Sign out</NeoMenuItem>
|
|
3855
|
+
* </NeoMenu>
|
|
3744
3856
|
*
|
|
3745
3857
|
* // In a card
|
|
3746
3858
|
* <Card>
|
|
@@ -3889,47 +4001,6 @@ const NeoDownloadToast = ({ title, fileName, progress, showClose = true, showPau
|
|
|
3889
4001
|
};
|
|
3890
4002
|
NeoDownloadToast.displayName = 'NeoDownloadToast';
|
|
3891
4003
|
|
|
3892
|
-
const StyledMenu = styles.styled(Menu)(({ theme }) => ({
|
|
3893
|
-
[`& .${Paper.paperClasses.root}`]: {
|
|
3894
|
-
backgroundColor: neoDesign.semanticColors.surfaces.white,
|
|
3895
|
-
borderRadius: neoDesign.borderRadius.s,
|
|
3896
|
-
border: `1px solid ${neoDesign.semanticColors.border.primary}`,
|
|
3897
|
-
boxShadow: `${neoDesign.shadows.dropdown.x}px ${neoDesign.shadows.dropdown.y}px ${neoDesign.shadows.dropdown.blur}px ${neoDesign.shadows.dropdown.spread}px ${neoDesign.shadows.dropdown.shadow}`,
|
|
3898
|
-
minWidth: 200,
|
|
3899
|
-
marginTop: theme.spacing(1),
|
|
3900
|
-
paddingTop: theme.spacing(1),
|
|
3901
|
-
paddingBottom: theme.spacing(1),
|
|
3902
|
-
},
|
|
3903
|
-
[`& .${List.listClasses.root}`]: {
|
|
3904
|
-
padding: 0,
|
|
3905
|
-
},
|
|
3906
|
-
}));
|
|
3907
|
-
/**
|
|
3908
|
-
* NeoDropdownMenu - Dropdown menu component based on MUI Menu
|
|
3909
|
-
*
|
|
3910
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=11141-4980
|
|
3911
|
-
*
|
|
3912
|
-
* @example
|
|
3913
|
-
* ```tsx
|
|
3914
|
-
* const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
|
|
3915
|
-
* const open = Boolean(anchorEl);
|
|
3916
|
-
*
|
|
3917
|
-
* <Button onClick={(e) => setAnchorEl(e.currentTarget)}>Open Menu</Button>
|
|
3918
|
-
* <NeoDropdownMenu
|
|
3919
|
-
* open={open}
|
|
3920
|
-
* anchorEl={anchorEl}
|
|
3921
|
-
* onClose={() => setAnchorEl(null)}
|
|
3922
|
-
* >
|
|
3923
|
-
* <NeoDropdownMenuItem icon={<Icon />} shortcut="⌘+P">View profile</NeoDropdownMenuItem>
|
|
3924
|
-
* <NeoDropdownMenuItem>Settings</NeoDropdownMenuItem>
|
|
3925
|
-
* </NeoDropdownMenu>
|
|
3926
|
-
* ```
|
|
3927
|
-
*/
|
|
3928
|
-
const NeoDropdownMenu = ({ children, ...props }) => {
|
|
3929
|
-
return jsxRuntime.jsx(StyledMenu, { ...props, children: children });
|
|
3930
|
-
};
|
|
3931
|
-
NeoDropdownMenu.displayName = 'NeoDropdownMenu';
|
|
3932
|
-
|
|
3933
4004
|
const filterChipOnlyProps = ['selected', 'expanded', 'selectedLabel', 'count', 'onClear'];
|
|
3934
4005
|
const StyledChip = styles.styled(Chip, {
|
|
3935
4006
|
shouldForwardProp: prop => !filterChipOnlyProps.includes(prop),
|
|
@@ -4073,11 +4144,11 @@ const StyledFooter = styles.styled(Box, {
|
|
|
4073
4144
|
'&::before': {
|
|
4074
4145
|
content: showShadow ? '""' : 'none',
|
|
4075
4146
|
position: 'absolute',
|
|
4076
|
-
top: `-${neoDesign.shadows.
|
|
4147
|
+
top: `-${neoDesign.shadows.neutral.regular.blur}px`, // -4px
|
|
4077
4148
|
left: 0,
|
|
4078
4149
|
right: 0,
|
|
4079
|
-
height: `${neoDesign.shadows.
|
|
4080
|
-
background: `linear-gradient(to top, ${neoDesign.shadows.
|
|
4150
|
+
height: `${neoDesign.shadows.neutral.regular.blur}px`, // 4px
|
|
4151
|
+
background: `linear-gradient(to top, ${neoDesign.shadows.neutral.regular.shadow}, transparent)`, // rgba(31, 41, 55, 0.1)
|
|
4081
4152
|
pointerEvents: 'none',
|
|
4082
4153
|
},
|
|
4083
4154
|
[theme.breakpoints.down('sm')]: {
|
|
@@ -4667,6 +4738,19 @@ const sizeConfig = {
|
|
|
4667
4738
|
badgeFontSize: neoDesign.typography.fontSize.xs,
|
|
4668
4739
|
lineHeight: 1.5,
|
|
4669
4740
|
},
|
|
4741
|
+
xxxlarge: {
|
|
4742
|
+
height: neoDesign.spacing.spacing_10,
|
|
4743
|
+
paddingTop: 1,
|
|
4744
|
+
paddingRight: neoDesign.spacing.spacing_3_4,
|
|
4745
|
+
paddingBottom: 1,
|
|
4746
|
+
paddingLeft: neoDesign.spacing.spacing_3_4,
|
|
4747
|
+
gap: neoDesign.spacing.spacing_2,
|
|
4748
|
+
iconSize: neoDesign.spacing.spacing_6,
|
|
4749
|
+
fontSize: neoDesign.typography.fontSize.h5,
|
|
4750
|
+
secondaryFontSize: neoDesign.typography.fontSize.sm,
|
|
4751
|
+
badgeFontSize: neoDesign.typography.fontSize.xs,
|
|
4752
|
+
lineHeight: 1.5,
|
|
4753
|
+
},
|
|
4670
4754
|
};
|
|
4671
4755
|
const StyledListItemButton$1 = styles.styled(ListItemButton, {
|
|
4672
4756
|
shouldForwardProp: prop => prop !== 'size' &&
|
|
@@ -4711,7 +4795,7 @@ const StyledListItemButton$1 = styles.styled(ListItemButton, {
|
|
|
4711
4795
|
'& .list-item-primary': {
|
|
4712
4796
|
fontSize: theme.typography.pxToRem(config.fontSize),
|
|
4713
4797
|
lineHeight: config.lineHeight,
|
|
4714
|
-
fontWeight: isLink && size === 'xxlarge'
|
|
4798
|
+
fontWeight: isLink && (size === 'xxlarge' || size === 'xxxlarge')
|
|
4715
4799
|
? neoDesign.typography.fontWeight.semiBold
|
|
4716
4800
|
: size === 'small' || size === 'medium'
|
|
4717
4801
|
? neoDesign.typography.fontWeight.regular
|
|
@@ -4722,18 +4806,20 @@ const StyledListItemButton$1 = styles.styled(ListItemButton, {
|
|
|
4722
4806
|
overflow: 'hidden',
|
|
4723
4807
|
textOverflow: 'ellipsis',
|
|
4724
4808
|
whiteSpace: 'nowrap',
|
|
4725
|
-
...(isLink && size === 'xxlarge' && { textDecoration: 'none' }),
|
|
4809
|
+
...(isLink && (size === 'xxlarge' || size === 'xxxlarge') && { textDecoration: 'none' }),
|
|
4726
4810
|
},
|
|
4727
|
-
// Link hover styling (underline on hover for xxlarge)
|
|
4811
|
+
// Link hover styling (underline on hover for xxlarge/xxxlarge)
|
|
4728
4812
|
...(isLink &&
|
|
4729
|
-
size === 'xxlarge' && {
|
|
4813
|
+
(size === 'xxlarge' || size === 'xxxlarge') && {
|
|
4730
4814
|
'&:hover .list-item-primary': {
|
|
4731
4815
|
textDecoration: 'underline',
|
|
4732
4816
|
},
|
|
4733
4817
|
}),
|
|
4734
|
-
// Badge styling (for xxlarge link variant)
|
|
4818
|
+
// Badge styling (for xxlarge/xxxlarge link variant)
|
|
4735
4819
|
'& .list-item-badge': {
|
|
4736
|
-
fontSize: theme.typography.pxToRem(size === 'xxlarge'
|
|
4820
|
+
fontSize: theme.typography.pxToRem(size === 'xxlarge' || size === 'xxxlarge'
|
|
4821
|
+
? config.badgeFontSize || 12
|
|
4822
|
+
: 12),
|
|
4737
4823
|
lineHeight: 1.5,
|
|
4738
4824
|
fontWeight: neoDesign.typography.fontWeight.regular,
|
|
4739
4825
|
color: neoDesign.semanticColors.typography.bodySecondary,
|
|
@@ -4811,14 +4897,14 @@ const StyledListItemButton$1 = styles.styled(ListItemButton, {
|
|
|
4811
4897
|
/**
|
|
4812
4898
|
* NeoListItem - Flexible list item component with multiple size variants and states
|
|
4813
4899
|
*
|
|
4814
|
-
* A versatile list item component built on MUI's ListItemButton that supports
|
|
4815
|
-
* (small to
|
|
4900
|
+
* A versatile list item component built on MUI's ListItemButton that supports six size variants
|
|
4901
|
+
* (small to xxxlarge), interactive states (default, selected, disabled, link), and optional
|
|
4816
4902
|
* icons/logos, secondary text, and badges.
|
|
4817
4903
|
*
|
|
4818
4904
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4205-36442
|
|
4819
4905
|
*
|
|
4820
4906
|
* Figma Props Mapping:
|
|
4821
|
-
* - size (
|
|
4907
|
+
* - size (Small|Medium|Large|Extra Large|XX Large|TripleExtraLarge) → size (small|medium|large|xlarge|xxlarge|xxxlarge)
|
|
4822
4908
|
* - state (default|active|disabled|link) → selected, disabled, isLink props
|
|
4823
4909
|
* - showIcon → icon prop (pass ReactNode)
|
|
4824
4910
|
* - showSupportingText → secondaryText prop (pass ReactNode)
|
|
@@ -4841,9 +4927,10 @@ const StyledListItemButton$1 = styles.styled(ListItemButton, {
|
|
|
4841
4927
|
*/
|
|
4842
4928
|
const NeoListItem = ({ size = 'medium', primaryText, secondaryText, badge, icon, isLink = false, trailingElement, component, ...props }) => {
|
|
4843
4929
|
// Determine if secondary text should be shown based on size
|
|
4844
|
-
const showSecondaryText = secondaryText &&
|
|
4845
|
-
|
|
4846
|
-
|
|
4930
|
+
const showSecondaryText = secondaryText &&
|
|
4931
|
+
(size === 'large' || size === 'xlarge' || size === 'xxlarge' || size === 'xxxlarge');
|
|
4932
|
+
// Determine if badge should be shown (for xxlarge/xxxlarge)
|
|
4933
|
+
const showBadge = badge && (size === 'xxlarge' || size === 'xxxlarge');
|
|
4847
4934
|
// Prepare primary text with badge if needed
|
|
4848
4935
|
const primaryContent = showBadge ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [primaryText, ' ', jsxRuntime.jsx(Typography, { component: "span", className: "list-item-badge", children: badge })] })) : (primaryText);
|
|
4849
4936
|
return (jsxRuntime.jsxs(StyledListItemButton$1, { size: size, isLink: isLink, hasSecondaryText: !!showSecondaryText, ...(component && { component }), ...props, children: [icon && jsxRuntime.jsx(ListItemIcon, { children: icon }), jsxRuntime.jsx(ListItemText, { primary: primaryContent, secondary: showSecondaryText ? secondaryText : undefined, sx: { minWidth: 0, flex: 1 }, slotProps: {
|
|
@@ -4982,39 +5069,46 @@ const NeoListItemButton = ({ children, selected = false, disabled = false, ...pr
|
|
|
4982
5069
|
};
|
|
4983
5070
|
NeoListItemButton.displayName = 'NeoListItemButton';
|
|
4984
5071
|
|
|
5072
|
+
const StyledMenu = styles.styled(Menu)(({ theme }) => ({
|
|
5073
|
+
[`& .${Paper.paperClasses.root}`]: {
|
|
5074
|
+
backgroundColor: neoDesign.semanticColors.surfaces.white,
|
|
5075
|
+
borderRadius: neoDesign.borderRadius.s,
|
|
5076
|
+
border: `1px solid ${neoDesign.semanticColors.border.primary}`,
|
|
5077
|
+
boxShadow: `${neoDesign.shadows.dropdown.x}px ${neoDesign.shadows.dropdown.y}px ${neoDesign.shadows.dropdown.blur}px ${neoDesign.shadows.dropdown.spread}px ${neoDesign.shadows.dropdown.shadow}`,
|
|
5078
|
+
minWidth: 200,
|
|
5079
|
+
marginTop: theme.spacing(1),
|
|
5080
|
+
paddingTop: theme.spacing(1),
|
|
5081
|
+
paddingBottom: theme.spacing(1),
|
|
5082
|
+
},
|
|
5083
|
+
[`& .${List.listClasses.root}`]: {
|
|
5084
|
+
padding: 0,
|
|
5085
|
+
},
|
|
5086
|
+
}));
|
|
4985
5087
|
/**
|
|
4986
|
-
*
|
|
5088
|
+
* NeoMenu - Menu component based on MUI Menu
|
|
4987
5089
|
*
|
|
4988
|
-
* @
|
|
4989
|
-
* ```tsx
|
|
4990
|
-
* // Before
|
|
4991
|
-
* <NeoMarketplaceCard logo={...} title="Java" ... />
|
|
4992
|
-
*
|
|
4993
|
-
* // After
|
|
4994
|
-
* <NeoCard size="small" logo={...} title="Java" ... />
|
|
4995
|
-
* ```
|
|
4996
|
-
*/
|
|
4997
|
-
const NeoMarketplaceCard = (props) => {
|
|
4998
|
-
return jsxRuntime.jsx(NeoCard, { size: "small", ...props });
|
|
4999
|
-
};
|
|
5000
|
-
NeoMarketplaceCard.displayName = 'NeoMarketplaceCard';
|
|
5001
|
-
|
|
5002
|
-
/**
|
|
5003
|
-
* @deprecated Use `NeoCard` with `size="large"` instead.
|
|
5090
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=11141-4980
|
|
5004
5091
|
*
|
|
5005
5092
|
* @example
|
|
5006
5093
|
* ```tsx
|
|
5007
|
-
*
|
|
5008
|
-
*
|
|
5094
|
+
* const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
|
|
5095
|
+
* const open = Boolean(anchorEl);
|
|
5009
5096
|
*
|
|
5010
|
-
*
|
|
5011
|
-
* <
|
|
5097
|
+
* <Button onClick={(e) => setAnchorEl(e.currentTarget)}>Open Menu</Button>
|
|
5098
|
+
* <NeoMenu
|
|
5099
|
+
* open={open}
|
|
5100
|
+
* anchorEl={anchorEl}
|
|
5101
|
+
* onClose={() => setAnchorEl(null)}
|
|
5102
|
+
* >
|
|
5103
|
+
* <NeoMenuItem icon={<Icon />} shortcut="⌘+P">View profile</NeoMenuItem>
|
|
5104
|
+
* <NeoMenuItem>Settings</NeoMenuItem>
|
|
5105
|
+
* </NeoMenu>
|
|
5012
5106
|
* ```
|
|
5013
5107
|
*/
|
|
5014
|
-
const
|
|
5015
|
-
return jsxRuntime.jsx(
|
|
5108
|
+
const NeoMenu = ({ children, ...props }) => {
|
|
5109
|
+
return jsxRuntime.jsx(StyledMenu, { ...props, children: children });
|
|
5016
5110
|
};
|
|
5017
|
-
|
|
5111
|
+
NeoMenu.displayName = 'NeoMenu';
|
|
5018
5112
|
|
|
5019
5113
|
// ============================================================================
|
|
5020
5114
|
// NeoModal - Main Dialog Container
|
|
@@ -5326,9 +5420,9 @@ const TagPill = styles.styled('span')(({ theme }) => ({
|
|
|
5326
5420
|
*
|
|
5327
5421
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=8455-6120
|
|
5328
5422
|
*/
|
|
5329
|
-
|
|
5423
|
+
function NeoNavigationItem({ icon, label, selected = false, tag, children, ...props }) {
|
|
5330
5424
|
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(TagPill, { children: tag }), children] }));
|
|
5331
|
-
}
|
|
5425
|
+
}
|
|
5332
5426
|
NeoNavigationItem.displayName = 'NeoNavigationItem';
|
|
5333
5427
|
|
|
5334
5428
|
/**
|
|
@@ -5984,127 +6078,6 @@ const NeoSkeleton = ({ colorTheme = 'light', position = 'start', ...props }) =>
|
|
|
5984
6078
|
};
|
|
5985
6079
|
NeoSkeleton.displayName = 'NeoSkeleton';
|
|
5986
6080
|
|
|
5987
|
-
/**
|
|
5988
|
-
* Styled Alert component with custom severity and variant styling
|
|
5989
|
-
* Uses Custom Variants Pattern to add 'neutral' and 'info' severities
|
|
5990
|
-
*/
|
|
5991
|
-
const StyledAlert$1 = styles.styled(Alert, {
|
|
5992
|
-
shouldForwardProp: prop => prop !== 'severity' && prop !== 'variant',
|
|
5993
|
-
})(({ theme, severity = 'success', variant = 'outlined' }) => {
|
|
5994
|
-
// Color mapping for different severities
|
|
5995
|
-
const colorMap = {
|
|
5996
|
-
success: {
|
|
5997
|
-
light: neoDesign.semanticColors.status.success.light,
|
|
5998
|
-
medium: neoDesign.semanticColors.status.success.default,
|
|
5999
|
-
},
|
|
6000
|
-
error: {
|
|
6001
|
-
light: neoDesign.semanticColors.status.error.light,
|
|
6002
|
-
medium: neoDesign.semanticColors.status.error.default,
|
|
6003
|
-
},
|
|
6004
|
-
neutral: {
|
|
6005
|
-
light: neoDesign.semanticColors.status.neutral.light,
|
|
6006
|
-
medium: neoDesign.semanticColors.status.neutral.default,
|
|
6007
|
-
},
|
|
6008
|
-
info: {
|
|
6009
|
-
light: neoDesign.semanticColors.status.info.light,
|
|
6010
|
-
medium: neoDesign.semanticColors.status.info.default,
|
|
6011
|
-
},
|
|
6012
|
-
};
|
|
6013
|
-
const severityColors = colorMap[severity];
|
|
6014
|
-
// Variant-specific styles based on Phase 1.1 analysis
|
|
6015
|
-
const variantStyles = (() => {
|
|
6016
|
-
if (variant === 'filled') {
|
|
6017
|
-
// Dark mode: solid background with white text
|
|
6018
|
-
return {
|
|
6019
|
-
backgroundColor: severityColors.medium,
|
|
6020
|
-
border: 'none',
|
|
6021
|
-
color: neoDesign.semanticColors.typography.tooltip,
|
|
6022
|
-
padding: theme.spacing(0.75, 3),
|
|
6023
|
-
boxShadow: `0px 1px 3px ${neoDesign.semanticColors.surfaces.shadowNeutral}1a`, // 1a = 10% opacity
|
|
6024
|
-
[`& .${Alert.alertClasses.icon}`]: {
|
|
6025
|
-
color: neoDesign.semanticColors.typography.tooltip,
|
|
6026
|
-
},
|
|
6027
|
-
[`& .${Alert.alertClasses.message}`]: {
|
|
6028
|
-
color: neoDesign.semanticColors.typography.tooltip,
|
|
6029
|
-
},
|
|
6030
|
-
};
|
|
6031
|
-
}
|
|
6032
|
-
// Light mode: light background with border
|
|
6033
|
-
return {
|
|
6034
|
-
backgroundColor: severityColors.light,
|
|
6035
|
-
border: `1px solid ${severityColors.medium}`,
|
|
6036
|
-
color: neoDesign.colors.grey[800],
|
|
6037
|
-
padding: theme.spacing(0.125, 2),
|
|
6038
|
-
[`& .${Alert.alertClasses.icon}`]: {
|
|
6039
|
-
color: severityColors.medium,
|
|
6040
|
-
},
|
|
6041
|
-
[`& .${Alert.alertClasses.message}`]: {
|
|
6042
|
-
color: neoDesign.colors.grey[800],
|
|
6043
|
-
},
|
|
6044
|
-
};
|
|
6045
|
-
})();
|
|
6046
|
-
return {
|
|
6047
|
-
height: neoDesign.spacing.spacing_8,
|
|
6048
|
-
width: '100%',
|
|
6049
|
-
borderRadius: neoDesign.borderRadius.xS,
|
|
6050
|
-
alignItems: 'center',
|
|
6051
|
-
fontFamily: neoDesign.typography.fontFamily.body,
|
|
6052
|
-
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.default),
|
|
6053
|
-
fontWeight: neoDesign.typography.fontWeight.medium,
|
|
6054
|
-
lineHeight: 1.5,
|
|
6055
|
-
...variantStyles,
|
|
6056
|
-
// Supporting text styling
|
|
6057
|
-
[`& .${Alert.alertClasses.message} > *:not(:first-child)`]: {
|
|
6058
|
-
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.sm),
|
|
6059
|
-
fontWeight: neoDesign.typography.fontWeight.regular,
|
|
6060
|
-
color: variant === 'filled'
|
|
6061
|
-
? neoDesign.semanticColors.typography.tooltip
|
|
6062
|
-
: neoDesign.semanticColors.typography.bodySecondary,
|
|
6063
|
-
lineHeight: 1.4,
|
|
6064
|
-
marginTop: theme.spacing(0.25),
|
|
6065
|
-
},
|
|
6066
|
-
};
|
|
6067
|
-
});
|
|
6068
|
-
/**
|
|
6069
|
-
* NeoStatusBanner - Status banner component for displaying system status messages
|
|
6070
|
-
*
|
|
6071
|
-
* Displays status information with different severity levels (success, error, info, neutral) and
|
|
6072
|
-
* visual modes (outlined for light backgrounds, filled for emphasis).
|
|
6073
|
-
*
|
|
6074
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4921-3427
|
|
6075
|
-
*
|
|
6076
|
-
* Figma Props Mapping:
|
|
6077
|
-
* - Status (Success|Error|Info|Offline) → severity ('success'|'error'|'info'|'neutral')
|
|
6078
|
-
* - Mode (Light|Dark) → variant ('outlined'|'filled')
|
|
6079
|
-
*
|
|
6080
|
-
* Design Tokens Used:
|
|
6081
|
-
* - status.success.light, status.success.default
|
|
6082
|
-
* - status.error.light, status.error.default
|
|
6083
|
-
* - status.neutral.light, status.neutral.default
|
|
6084
|
-
* - status.info.light, status.info.default
|
|
6085
|
-
* - typography.tooltip, typography.bodySecondary
|
|
6086
|
-
* - grey[800]
|
|
6087
|
-
* - fontSize.default, fontSize.sm
|
|
6088
|
-
* - fontWeight.medium, fontWeight.regular
|
|
6089
|
-
* - fontFamily.body
|
|
6090
|
-
* - surfaces.shadowNeutral
|
|
6091
|
-
*/
|
|
6092
|
-
const NeoStatusBanner = ({ severity = 'success', variant = 'outlined', icon, children, ...props }) => {
|
|
6093
|
-
// Icon mapping for different severities
|
|
6094
|
-
const iconMap = {
|
|
6095
|
-
success: jsxRuntime.jsx(CircleCheck, { size: 24 }),
|
|
6096
|
-
error: jsxRuntime.jsx(CircleAlert, { size: 24 }),
|
|
6097
|
-
neutral: jsxRuntime.jsx(WifiOff, { size: 24 }),
|
|
6098
|
-
info: jsxRuntime.jsx(Info, { size: 24 }),
|
|
6099
|
-
};
|
|
6100
|
-
const defaultIcon = iconMap[severity];
|
|
6101
|
-
// Type assertion needed: severity and variant are custom props filtered by shouldForwardProp
|
|
6102
|
-
// biome-ignore lint/suspicious/noExplicitAny: Custom props pattern requires any cast
|
|
6103
|
-
const StyledAlertAny = StyledAlert$1;
|
|
6104
|
-
return (jsxRuntime.jsx(StyledAlertAny, { ...props, severity: severity, variant: variant, icon: icon ?? defaultIcon, children: children }));
|
|
6105
|
-
};
|
|
6106
|
-
NeoStatusBanner.displayName = 'NeoStatusBanner';
|
|
6107
|
-
|
|
6108
6081
|
/**
|
|
6109
6082
|
* NeoTabs - Tabs container component based on MUI Tabs
|
|
6110
6083
|
*
|
|
@@ -6139,7 +6112,20 @@ const StyledTab = styles.styled(MuiTab)(({ theme }) => ({
|
|
|
6139
6112
|
color: neoDesign.semanticColors.typography.tab.active,
|
|
6140
6113
|
fontWeight: neoDesign.typography.fontWeight.semiBold,
|
|
6141
6114
|
},
|
|
6115
|
+
'&:hover': {
|
|
6116
|
+
backgroundColor: neoDesign.semanticColors.buttons.secondary.hoverBackground,
|
|
6117
|
+
[`&.${MuiTab.tabClasses.selected}::after`]: {
|
|
6118
|
+
content: '""',
|
|
6119
|
+
position: 'absolute',
|
|
6120
|
+
bottom: 0,
|
|
6121
|
+
left: 0,
|
|
6122
|
+
right: 0,
|
|
6123
|
+
height: 2,
|
|
6124
|
+
backgroundColor: neoDesign.semanticColors.buttons.primary.hover,
|
|
6125
|
+
},
|
|
6126
|
+
},
|
|
6142
6127
|
[`&.${ButtonBase.buttonBaseClasses.focusVisible}`]: {
|
|
6128
|
+
color: neoDesign.semanticColors.typography.tab.active,
|
|
6143
6129
|
outline: `2px solid ${neoDesign.semanticColors.border.focus}`,
|
|
6144
6130
|
outlineOffset: -2,
|
|
6145
6131
|
},
|
|
@@ -6147,6 +6133,21 @@ const StyledTab = styles.styled(MuiTab)(({ theme }) => ({
|
|
|
6147
6133
|
color: neoDesign.semanticColors.typography.button.disabled,
|
|
6148
6134
|
cursor: 'not-allowed',
|
|
6149
6135
|
pointerEvents: 'auto',
|
|
6136
|
+
'&:hover': {
|
|
6137
|
+
backgroundColor: 'transparent',
|
|
6138
|
+
},
|
|
6139
|
+
[`&.${MuiTab.tabClasses.selected}`]: {
|
|
6140
|
+
color: neoDesign.semanticColors.typography.button.disabled,
|
|
6141
|
+
'&::after': {
|
|
6142
|
+
content: '""',
|
|
6143
|
+
position: 'absolute',
|
|
6144
|
+
bottom: 0,
|
|
6145
|
+
left: 0,
|
|
6146
|
+
right: 0,
|
|
6147
|
+
height: 2,
|
|
6148
|
+
backgroundColor: neoDesign.semanticColors.buttons.tertiary.disabled,
|
|
6149
|
+
},
|
|
6150
|
+
},
|
|
6150
6151
|
},
|
|
6151
6152
|
}));
|
|
6152
6153
|
const TabLabelContainer = styles.styled('span')(({ theme }) => ({
|
|
@@ -6161,10 +6162,7 @@ const TabLabelContainer = styles.styled('span')(({ theme }) => ({
|
|
|
6161
6162
|
*
|
|
6162
6163
|
* Figma Props Mapping:
|
|
6163
6164
|
* - Current=True/False → Controlled by parent NeoTabs value
|
|
6164
|
-
* -
|
|
6165
|
-
* - State=Hover → CSS :hover
|
|
6166
|
-
* - State=Focus → CSS :focus-visible
|
|
6167
|
-
* - Tag count → count prop (renders NeoTag)
|
|
6165
|
+
* - Show tag → count prop (renders NeoTag)
|
|
6168
6166
|
* - Text label → label prop
|
|
6169
6167
|
*/
|
|
6170
6168
|
const NeoTab = ({ label, count, ...props }) => {
|
|
@@ -6173,18 +6171,37 @@ const NeoTab = ({ label, count, ...props }) => {
|
|
|
6173
6171
|
};
|
|
6174
6172
|
NeoTab.displayName = 'NeoTab';
|
|
6175
6173
|
|
|
6174
|
+
const intentColors = {
|
|
6175
|
+
info: neoDesign.semanticColors.status.info,
|
|
6176
|
+
success: neoDesign.semanticColors.status.success,
|
|
6177
|
+
error: neoDesign.semanticColors.status.error,
|
|
6178
|
+
warning: neoDesign.semanticColors.status.warning,
|
|
6179
|
+
neutral: neoDesign.semanticColors.status.neutral,
|
|
6180
|
+
};
|
|
6176
6181
|
// biome-ignore lint/suspicious/noExplicitAny: Type cast required to override MUI Alert variant type without global augmentation
|
|
6177
6182
|
const StyledAlert = styles.styled(Alert, {
|
|
6178
|
-
shouldForwardProp: prop => prop !== '
|
|
6179
|
-
})(({ theme,
|
|
6180
|
-
|
|
6181
|
-
const
|
|
6183
|
+
shouldForwardProp: prop => prop !== 'intent' && prop !== 'toastType',
|
|
6184
|
+
})(({ theme, intent = 'neutral', toastType = 'outlined' }) => {
|
|
6185
|
+
const palette = intentColors[intent];
|
|
6186
|
+
const typeStyles = toastType === 'filled'
|
|
6187
|
+
? {
|
|
6188
|
+
backgroundColor: palette.dark,
|
|
6189
|
+
color: neoDesign.semanticColors.surfaces.white,
|
|
6190
|
+
border: `1px solid ${palette.dark}`,
|
|
6191
|
+
}
|
|
6192
|
+
: {
|
|
6193
|
+
backgroundColor: palette.light,
|
|
6194
|
+
color: neoDesign.colors.grey['800'],
|
|
6195
|
+
border: `1px solid ${palette.default}`,
|
|
6196
|
+
};
|
|
6197
|
+
return {
|
|
6182
6198
|
padding: neoDesign.spacing.spacing_2,
|
|
6183
6199
|
borderRadius: neoDesign.borderRadius.s,
|
|
6184
6200
|
gap: neoDesign.spacing.spacing_4,
|
|
6185
6201
|
alignItems: 'flex-start',
|
|
6186
6202
|
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.sm),
|
|
6187
6203
|
lineHeight: 1.4,
|
|
6204
|
+
...typeStyles,
|
|
6188
6205
|
[`& .${Alert.alertClasses.icon}`]: {
|
|
6189
6206
|
display: 'none',
|
|
6190
6207
|
},
|
|
@@ -6200,76 +6217,31 @@ const StyledAlert = styles.styled(Alert, {
|
|
|
6200
6217
|
marginRight: 0,
|
|
6201
6218
|
},
|
|
6202
6219
|
};
|
|
6203
|
-
// Variant-specific styles
|
|
6204
|
-
const variantStyles = {
|
|
6205
|
-
default: {
|
|
6206
|
-
backgroundColor: neoDesign.semanticColors.surfaces.snackbarDarkMode,
|
|
6207
|
-
color: neoDesign.colors.grey['800'],
|
|
6208
|
-
border: `1px solid ${neoDesign.semanticColors.border.primary}`,
|
|
6209
|
-
},
|
|
6210
|
-
dark: {
|
|
6211
|
-
backgroundColor: neoDesign.semanticColors.surfaces.snackbarLightMode,
|
|
6212
|
-
color: neoDesign.semanticColors.surfaces.white,
|
|
6213
|
-
border: `1px solid ${neoDesign.semanticColors.surfaces.snackbarLightMode}`,
|
|
6214
|
-
},
|
|
6215
|
-
brand: {
|
|
6216
|
-
backgroundColor: neoDesign.semanticColors.surfaces.snackbarBrand,
|
|
6217
|
-
color: neoDesign.semanticColors.surfaces.white,
|
|
6218
|
-
border: `1px solid ${neoDesign.semanticColors.surfaces.snackbarBrand}`,
|
|
6219
|
-
},
|
|
6220
|
-
error: {
|
|
6221
|
-
backgroundColor: neoDesign.semanticColors.status.error.light,
|
|
6222
|
-
color: neoDesign.semanticColors.status.error.dark,
|
|
6223
|
-
border: `1px solid ${neoDesign.semanticColors.status.error.default}`,
|
|
6224
|
-
},
|
|
6225
|
-
success: {
|
|
6226
|
-
backgroundColor: neoDesign.semanticColors.status.success.light,
|
|
6227
|
-
color: neoDesign.semanticColors.status.success.dark,
|
|
6228
|
-
border: `1px solid ${neoDesign.semanticColors.status.success.default}`,
|
|
6229
|
-
},
|
|
6230
|
-
info: {
|
|
6231
|
-
backgroundColor: neoDesign.semanticColors.status.info.light,
|
|
6232
|
-
color: neoDesign.semanticColors.status.info.dark,
|
|
6233
|
-
border: `1px solid ${neoDesign.semanticColors.status.info.default}`,
|
|
6234
|
-
},
|
|
6235
|
-
};
|
|
6236
|
-
return {
|
|
6237
|
-
...baseStyles,
|
|
6238
|
-
...variantStyles[variant],
|
|
6239
|
-
};
|
|
6240
6220
|
});
|
|
6241
|
-
const ToastTitle = styles.styled('p')(({ theme,
|
|
6242
|
-
const
|
|
6243
|
-
|
|
6244
|
-
dark: neoDesign.semanticColors.surfaces.white,
|
|
6245
|
-
brand: neoDesign.semanticColors.surfaces.white,
|
|
6246
|
-
error: neoDesign.semanticColors.status.error.dark,
|
|
6247
|
-
success: neoDesign.semanticColors.status.success.dark,
|
|
6248
|
-
info: neoDesign.semanticColors.status.info.dark,
|
|
6249
|
-
};
|
|
6221
|
+
const ToastTitle = styles.styled('p')(({ theme, intent = 'neutral', toastType = 'outlined' }) => {
|
|
6222
|
+
const palette = intentColors[intent];
|
|
6223
|
+
const color = toastType === 'filled' ? neoDesign.semanticColors.surfaces.white : palette.dark;
|
|
6250
6224
|
return {
|
|
6251
6225
|
margin: 0,
|
|
6252
6226
|
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.sm),
|
|
6253
6227
|
fontWeight: neoDesign.typography.fontWeight.semiBold,
|
|
6254
6228
|
lineHeight: 1.4,
|
|
6255
|
-
color
|
|
6229
|
+
color,
|
|
6256
6230
|
};
|
|
6257
6231
|
});
|
|
6258
|
-
const ToastMessage = styles.styled('p')(({ theme,
|
|
6259
|
-
const
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
info: neoDesign.semanticColors.status.info.dark,
|
|
6266
|
-
};
|
|
6232
|
+
const ToastMessage = styles.styled('p')(({ theme, intent = 'neutral', toastType = 'outlined' }) => {
|
|
6233
|
+
const palette = intentColors[intent];
|
|
6234
|
+
const color = toastType === 'filled'
|
|
6235
|
+
? neoDesign.colors.grey['200']
|
|
6236
|
+
: intent === 'neutral'
|
|
6237
|
+
? neoDesign.semanticColors.typography.bodySecondary
|
|
6238
|
+
: palette.dark;
|
|
6267
6239
|
return {
|
|
6268
6240
|
margin: 0,
|
|
6269
6241
|
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.sm),
|
|
6270
6242
|
fontWeight: neoDesign.typography.fontWeight.regular,
|
|
6271
6243
|
lineHeight: 1.4,
|
|
6272
|
-
color
|
|
6244
|
+
color,
|
|
6273
6245
|
};
|
|
6274
6246
|
});
|
|
6275
6247
|
const ToastActions = styles.styled(Stack)({
|
|
@@ -6278,30 +6250,20 @@ const ToastActions = styles.styled(Stack)({
|
|
|
6278
6250
|
justifyContent: 'flex-start',
|
|
6279
6251
|
});
|
|
6280
6252
|
const ToastButton = styles.styled(Button, {
|
|
6281
|
-
shouldForwardProp: prop => prop !== '
|
|
6282
|
-
})(({
|
|
6253
|
+
shouldForwardProp: prop => prop !== 'toastIntent' && prop !== 'toastType' && prop !== 'primary',
|
|
6254
|
+
})(({ toastIntent = 'neutral', toastType = 'outlined', primary }) => {
|
|
6255
|
+
const palette = intentColors[toastIntent];
|
|
6283
6256
|
const getColor = () => {
|
|
6257
|
+
if (toastType === 'filled') {
|
|
6258
|
+
return primary ? neoDesign.colors.digitalBlue['200'] : neoDesign.semanticColors.surfaces.white;
|
|
6259
|
+
}
|
|
6284
6260
|
if (primary) {
|
|
6285
|
-
if (toastVariant === 'dark' || toastVariant === 'brand') {
|
|
6286
|
-
return neoDesign.colors.digitalBlue['200'];
|
|
6287
|
-
}
|
|
6288
6261
|
return neoDesign.semanticColors.typography.link.primary;
|
|
6289
6262
|
}
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
return neoDesign.semanticColors.surfaces.white;
|
|
6293
|
-
}
|
|
6294
|
-
if (toastVariant === 'error') {
|
|
6295
|
-
return neoDesign.semanticColors.status.error.dark;
|
|
6296
|
-
}
|
|
6297
|
-
if (toastVariant === 'success') {
|
|
6298
|
-
return neoDesign.semanticColors.status.success.dark;
|
|
6263
|
+
if (toastIntent === 'neutral') {
|
|
6264
|
+
return neoDesign.semanticColors.icons.placeholder;
|
|
6299
6265
|
}
|
|
6300
|
-
|
|
6301
|
-
return neoDesign.semanticColors.status.info.dark;
|
|
6302
|
-
}
|
|
6303
|
-
// default variant uses icon placeholder color
|
|
6304
|
-
return neoDesign.semanticColors.icons.placeholder;
|
|
6266
|
+
return palette.dark;
|
|
6305
6267
|
};
|
|
6306
6268
|
return {
|
|
6307
6269
|
padding: 0,
|
|
@@ -6321,22 +6283,17 @@ const ToastButton = styles.styled(Button, {
|
|
|
6321
6283
|
* NeoToast - Notification/Toast component based on MUI Alert
|
|
6322
6284
|
*
|
|
6323
6285
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4122-37223
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
* - xCloseButton → showClose (boolean)
|
|
6330
|
-
* - actions → actions (ReactNode)
|
|
6331
|
-
*/
|
|
6332
|
-
const NeoToast = ({ variant = 'default', title, message, showClose = true, actions, onClose, ...props }) => {
|
|
6333
|
-
return (jsxRuntime.jsxs(StyledAlert, { ...props, variant: variant, action: showClose ? (jsxRuntime.jsx(IconButton, { size: "small", onClick: onClose, sx: { color: neoDesign.semanticColors.icons.placeholder }, 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, { variant: variant, children: title }), message && jsxRuntime.jsx(ToastMessage, { variant: variant, children: message })] }), actions && jsxRuntime.jsx(ToastActions, { direction: "row", children: actions })] }));
|
|
6286
|
+
*/
|
|
6287
|
+
const NeoToast = ({ intent = 'neutral', type = 'outlined', title, message, showClose = false, actions, onClose, ...props }) => {
|
|
6288
|
+
const palette = intentColors[intent];
|
|
6289
|
+
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 })] }));
|
|
6334
6291
|
};
|
|
6335
6292
|
/**
|
|
6336
6293
|
* Helper component for creating toast action buttons with proper styling
|
|
6337
6294
|
*/
|
|
6338
|
-
const NeoToastButton = ({ primary,
|
|
6339
|
-
return (jsxRuntime.jsx(ToastButton, { variant: "text",
|
|
6295
|
+
const NeoToastButton = ({ primary, intent = 'neutral', type = 'outlined', children, ...props }) => {
|
|
6296
|
+
return (jsxRuntime.jsx(ToastButton, { variant: "text", toastIntent: intent, toastType: type, primary: primary, ...props, children: children }));
|
|
6340
6297
|
};
|
|
6341
6298
|
NeoToast.displayName = 'NeoToast';
|
|
6342
6299
|
NeoToastButton.displayName = 'NeoToastButton';
|
|
@@ -6437,7 +6394,7 @@ const StyledSwitch = styles.styled(Switch, {
|
|
|
6437
6394
|
[`& .${Switch.switchClasses.thumb}`]: {
|
|
6438
6395
|
width: config.thumbSize,
|
|
6439
6396
|
height: config.thumbSize,
|
|
6440
|
-
boxShadow: `${neoDesign.shadows.
|
|
6397
|
+
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}`,
|
|
6441
6398
|
transition: theme.transitions.create(['width'], {
|
|
6442
6399
|
duration: theme.transitions.duration.shortest,
|
|
6443
6400
|
}),
|
|
@@ -6581,7 +6538,7 @@ const variantConfig = {
|
|
|
6581
6538
|
*/
|
|
6582
6539
|
const StyledTooltip = styles.styled(Tooltip, {
|
|
6583
6540
|
shouldForwardProp: prop => prop !== 'variant' && prop !== 'description',
|
|
6584
|
-
})(({
|
|
6541
|
+
})(({ variant = 'light', description }) => {
|
|
6585
6542
|
const hasDescription = Boolean(description);
|
|
6586
6543
|
const variantStyles = variantConfig[variant];
|
|
6587
6544
|
return {
|
|
@@ -6589,24 +6546,21 @@ const StyledTooltip = styles.styled(Tooltip, {
|
|
|
6589
6546
|
[`& .${Tooltip.tooltipClasses.tooltip}`]: {
|
|
6590
6547
|
backgroundColor: variantStyles.backgroundColor,
|
|
6591
6548
|
color: variantStyles.color,
|
|
6592
|
-
fontSize:
|
|
6593
|
-
fontWeight:
|
|
6594
|
-
lineHeight: hasDescription ? 1.5 : 1,
|
|
6595
|
-
borderRadius: hasDescription ?
|
|
6596
|
-
padding: hasDescription
|
|
6597
|
-
? theme.spacing(1.5) // 12px all sides
|
|
6598
|
-
: theme.spacing(0, 1), // 0 vertical, 8px horizontal
|
|
6549
|
+
fontSize: neoDesign.typography.fontSize.xs,
|
|
6550
|
+
fontWeight: neoDesign.typography.fontWeight.medium,
|
|
6551
|
+
lineHeight: hasDescription ? 1.5 : 1,
|
|
6552
|
+
borderRadius: hasDescription ? neoDesign.borderRadius.s : neoDesign.borderRadius.xS,
|
|
6553
|
+
padding: hasDescription ? neoDesign.spacing.spacing_1_1_2 : `0 ${neoDesign.spacing.spacing_1}px`,
|
|
6599
6554
|
...(hasDescription && {
|
|
6600
6555
|
maxWidth: 296,
|
|
6601
6556
|
}),
|
|
6602
6557
|
...(!hasDescription && {
|
|
6603
|
-
height:
|
|
6558
|
+
height: neoDesign.spacing.spacing_3_1_4,
|
|
6604
6559
|
display: 'flex',
|
|
6605
6560
|
alignItems: 'center',
|
|
6606
6561
|
justifyContent: 'center',
|
|
6607
6562
|
}),
|
|
6608
|
-
|
|
6609
|
-
boxShadow: `${neoDesign.shadows.neutralMedium.x}px ${neoDesign.shadows.neutralMedium.y}px ${neoDesign.shadows.neutralMedium.blur}px ${neoDesign.shadows.neutralMedium.spread}px ${neoDesign.shadows.neutralMedium.shadow}`,
|
|
6563
|
+
boxShadow: `${neoDesign.shadows.neutral.medium.x}px ${neoDesign.shadows.neutral.medium.y}px ${neoDesign.shadows.neutral.medium.blur}px ${neoDesign.shadows.neutral.medium.spread}px ${neoDesign.shadows.neutral.medium.shadow}`,
|
|
6610
6564
|
},
|
|
6611
6565
|
// Style the arrow
|
|
6612
6566
|
[`& .${Tooltip.tooltipClasses.arrow}`]: {
|
|
@@ -6623,8 +6577,8 @@ const StyledTooltip = styles.styled(Tooltip, {
|
|
|
6623
6577
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4091-26557&t=Bo58EpFmg6ILJtmv-11
|
|
6624
6578
|
*
|
|
6625
6579
|
* Figma Props Mapping:
|
|
6626
|
-
* -
|
|
6627
|
-
* -
|
|
6580
|
+
* - Theme (Light mode|Dark mode|Brand color) → variant ('light'|'dark'|'brand')
|
|
6581
|
+
* - Placement → arrow (boolean) + placement (top/bottom/left/right/etc)
|
|
6628
6582
|
* - Supporting text (True|False) → description (string|undefined)
|
|
6629
6583
|
* - text → title (string, literal content)
|
|
6630
6584
|
*
|
|
@@ -6850,6 +6804,7 @@ const version = '0.0.0-development';
|
|
|
6850
6804
|
exports.CIRCLE_RADIUS = CIRCLE_RADIUS;
|
|
6851
6805
|
exports.NeoActivityHeader = NeoActivityHeader;
|
|
6852
6806
|
exports.NeoActivityIndicatorCell = NeoActivityIndicatorCell;
|
|
6807
|
+
exports.NeoAlert = NeoAlert;
|
|
6853
6808
|
exports.NeoAvatar = NeoAvatar;
|
|
6854
6809
|
exports.NeoBadge = NeoBadge;
|
|
6855
6810
|
exports.NeoBanner = NeoBanner;
|
|
@@ -6871,15 +6826,15 @@ exports.NeoDataGridFilterPanelDeleteIcon = NeoDataGridFilterPanelDeleteIcon;
|
|
|
6871
6826
|
exports.NeoDataGridFilterPanelRemoveAllIcon = NeoDataGridFilterPanelRemoveAllIcon;
|
|
6872
6827
|
exports.NeoDataGridFiltersButton = NeoDataGridFiltersButton;
|
|
6873
6828
|
exports.NeoDataGridHeaderLabel = NeoDataGridHeaderLabel;
|
|
6874
|
-
exports.NeoDataGridSelect =
|
|
6829
|
+
exports.NeoDataGridSelect = NeoSelect;
|
|
6875
6830
|
exports.NeoDatePicker = NeoDatePicker;
|
|
6876
6831
|
exports.NeoDivider = NeoDivider;
|
|
6877
6832
|
exports.NeoDot = NeoDot;
|
|
6878
6833
|
exports.NeoDownloadToast = NeoDownloadToast;
|
|
6879
|
-
exports.NeoDropdown =
|
|
6880
|
-
exports.NeoDropdownMenu =
|
|
6881
|
-
exports.NeoDropdownMenuItem =
|
|
6882
|
-
exports.NeoDropdownOption =
|
|
6834
|
+
exports.NeoDropdown = NeoSelect;
|
|
6835
|
+
exports.NeoDropdownMenu = NeoMenu;
|
|
6836
|
+
exports.NeoDropdownMenuItem = NeoMenuItem;
|
|
6837
|
+
exports.NeoDropdownOption = NeoMenuItem;
|
|
6883
6838
|
exports.NeoFilterChip = NeoFilterChip;
|
|
6884
6839
|
exports.NeoFooter = NeoFooter;
|
|
6885
6840
|
exports.NeoGeneralAvatar = NeoGeneralAvatar;
|
|
@@ -6890,10 +6845,8 @@ exports.NeoInputField = NeoInputField;
|
|
|
6890
6845
|
exports.NeoListItem = NeoListItem;
|
|
6891
6846
|
exports.NeoListItemButton = NeoListItemButton;
|
|
6892
6847
|
exports.NeoLoadingSpinner = NeoLoadingSpinner;
|
|
6893
|
-
exports.
|
|
6894
|
-
exports.
|
|
6895
|
-
exports.NeoMenu = NeoDropdownMenu;
|
|
6896
|
-
exports.NeoMenuItem = NeoDropdownMenuItem;
|
|
6848
|
+
exports.NeoMenu = NeoMenu;
|
|
6849
|
+
exports.NeoMenuItem = NeoMenuItem;
|
|
6897
6850
|
exports.NeoModal = NeoModal;
|
|
6898
6851
|
exports.NeoModalContent = NeoModalContent;
|
|
6899
6852
|
exports.NeoModalFooter = NeoModalFooter;
|
|
@@ -6907,11 +6860,10 @@ exports.NeoProgressbar = NeoProgressbar;
|
|
|
6907
6860
|
exports.NeoQuickFilter = NeoQuickFilter;
|
|
6908
6861
|
exports.NeoRadio = NeoRadio;
|
|
6909
6862
|
exports.NeoSearchChip = NeoSearchChip;
|
|
6910
|
-
exports.NeoSelect =
|
|
6911
|
-
exports.NeoSelectOption =
|
|
6863
|
+
exports.NeoSelect = NeoSelect;
|
|
6864
|
+
exports.NeoSelectOption = NeoMenuItem;
|
|
6912
6865
|
exports.NeoSkeleton = NeoSkeleton;
|
|
6913
6866
|
exports.NeoStatusBadgeCell = NeoStatusBadgeCell;
|
|
6914
|
-
exports.NeoStatusBanner = NeoStatusBanner;
|
|
6915
6867
|
exports.NeoTab = NeoTab;
|
|
6916
6868
|
exports.NeoTabs = NeoTabs;
|
|
6917
6869
|
exports.NeoTag = NeoTag;
|
|
@@ -6928,6 +6880,7 @@ exports.NeoUserAvatarCell = NeoUserAvatarCell;
|
|
|
6928
6880
|
exports.SortedAscendingIcon = SortedAscendingIcon;
|
|
6929
6881
|
exports.SortedDescendingIcon = SortedDescendingIcon;
|
|
6930
6882
|
exports.UnsortedIcon = UnsortedIcon;
|
|
6883
|
+
exports.focusRingStyles = focusRingStyles;
|
|
6931
6884
|
exports.getDataGridHeaderStyles = getDataGridHeaderStyles;
|
|
6932
6885
|
exports.neoRowHeights = neoRowHeights;
|
|
6933
6886
|
exports.version = version;
|