@moderneinc/neo-styled-components 3.0.0 → 4.0.0-next.86aaff
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/NavigationItem/NavigationItem.d.ts +12 -8
- package/dist/Tabs/Tabs.d.ts +1 -4
- package/dist/Tag/Tag.d.ts +2 -2
- package/dist/index.d.ts +42 -48
- package/dist/index.esm.js +187 -170
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +187 -170
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- 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');
|
|
@@ -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,6 +995,92 @@ const __iconNode = [
|
|
|
968
995
|
];
|
|
969
996
|
const X = createLucideIcon("x", __iconNode);
|
|
970
997
|
|
|
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$1 = {
|
|
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$1[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
|
+
|
|
971
1084
|
const intentColors = {
|
|
972
1085
|
info: neoDesign.semanticColors.status.info,
|
|
973
1086
|
success: neoDesign.semanticColors.status.success,
|
|
@@ -976,7 +1089,7 @@ 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
1095
|
const palette = intentColors[intent];
|
|
@@ -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,
|
|
@@ -1056,7 +1169,7 @@ const NeoBanner = ({ intent = 'info', type = 'outlined', message, messagePositio
|
|
|
1056
1169
|
return null;
|
|
1057
1170
|
}
|
|
1058
1171
|
const closeIconColor = type === 'filled' ? neoDesign.semanticColors.surfaces.white : intentColors[intent].default;
|
|
1059
|
-
return (jsxRuntime.jsx(StyledAlert$
|
|
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
|
|
|
@@ -4073,11 +4186,11 @@ const StyledFooter = styles.styled(Box, {
|
|
|
4073
4186
|
'&::before': {
|
|
4074
4187
|
content: showShadow ? '""' : 'none',
|
|
4075
4188
|
position: 'absolute',
|
|
4076
|
-
top: `-${neoDesign.shadows.
|
|
4189
|
+
top: `-${neoDesign.shadows.neutral.regular.blur}px`, // -4px
|
|
4077
4190
|
left: 0,
|
|
4078
4191
|
right: 0,
|
|
4079
|
-
height: `${neoDesign.shadows.
|
|
4080
|
-
background: `linear-gradient(to top, ${neoDesign.shadows.
|
|
4192
|
+
height: `${neoDesign.shadows.neutral.regular.blur}px`, // 4px
|
|
4193
|
+
background: `linear-gradient(to top, ${neoDesign.shadows.neutral.regular.shadow}, transparent)`, // rgba(31, 41, 55, 0.1)
|
|
4081
4194
|
pointerEvents: 'none',
|
|
4082
4195
|
},
|
|
4083
4196
|
[theme.breakpoints.down('sm')]: {
|
|
@@ -5326,9 +5439,9 @@ const TagPill = styles.styled('span')(({ theme }) => ({
|
|
|
5326
5439
|
*
|
|
5327
5440
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=8455-6120
|
|
5328
5441
|
*/
|
|
5329
|
-
|
|
5442
|
+
function NeoNavigationItem({ icon, label, selected = false, tag, children, ...props }) {
|
|
5330
5443
|
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
|
-
}
|
|
5444
|
+
}
|
|
5332
5445
|
NeoNavigationItem.displayName = 'NeoNavigationItem';
|
|
5333
5446
|
|
|
5334
5447
|
/**
|
|
@@ -5984,127 +6097,6 @@ const NeoSkeleton = ({ colorTheme = 'light', position = 'start', ...props }) =>
|
|
|
5984
6097
|
};
|
|
5985
6098
|
NeoSkeleton.displayName = 'NeoSkeleton';
|
|
5986
6099
|
|
|
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
6100
|
/**
|
|
6109
6101
|
* NeoTabs - Tabs container component based on MUI Tabs
|
|
6110
6102
|
*
|
|
@@ -6139,7 +6131,20 @@ const StyledTab = styles.styled(MuiTab)(({ theme }) => ({
|
|
|
6139
6131
|
color: neoDesign.semanticColors.typography.tab.active,
|
|
6140
6132
|
fontWeight: neoDesign.typography.fontWeight.semiBold,
|
|
6141
6133
|
},
|
|
6134
|
+
'&:hover': {
|
|
6135
|
+
backgroundColor: neoDesign.semanticColors.buttons.secondary.hoverBackground,
|
|
6136
|
+
[`&.${MuiTab.tabClasses.selected}::after`]: {
|
|
6137
|
+
content: '""',
|
|
6138
|
+
position: 'absolute',
|
|
6139
|
+
bottom: 0,
|
|
6140
|
+
left: 0,
|
|
6141
|
+
right: 0,
|
|
6142
|
+
height: 2,
|
|
6143
|
+
backgroundColor: neoDesign.semanticColors.buttons.primary.hover,
|
|
6144
|
+
},
|
|
6145
|
+
},
|
|
6142
6146
|
[`&.${ButtonBase.buttonBaseClasses.focusVisible}`]: {
|
|
6147
|
+
color: neoDesign.semanticColors.typography.tab.active,
|
|
6143
6148
|
outline: `2px solid ${neoDesign.semanticColors.border.focus}`,
|
|
6144
6149
|
outlineOffset: -2,
|
|
6145
6150
|
},
|
|
@@ -6147,6 +6152,21 @@ const StyledTab = styles.styled(MuiTab)(({ theme }) => ({
|
|
|
6147
6152
|
color: neoDesign.semanticColors.typography.button.disabled,
|
|
6148
6153
|
cursor: 'not-allowed',
|
|
6149
6154
|
pointerEvents: 'auto',
|
|
6155
|
+
'&:hover': {
|
|
6156
|
+
backgroundColor: 'transparent',
|
|
6157
|
+
},
|
|
6158
|
+
[`&.${MuiTab.tabClasses.selected}`]: {
|
|
6159
|
+
color: neoDesign.semanticColors.typography.button.disabled,
|
|
6160
|
+
'&::after': {
|
|
6161
|
+
content: '""',
|
|
6162
|
+
position: 'absolute',
|
|
6163
|
+
bottom: 0,
|
|
6164
|
+
left: 0,
|
|
6165
|
+
right: 0,
|
|
6166
|
+
height: 2,
|
|
6167
|
+
backgroundColor: neoDesign.semanticColors.buttons.tertiary.disabled,
|
|
6168
|
+
},
|
|
6169
|
+
},
|
|
6150
6170
|
},
|
|
6151
6171
|
}));
|
|
6152
6172
|
const TabLabelContainer = styles.styled('span')(({ theme }) => ({
|
|
@@ -6161,10 +6181,7 @@ const TabLabelContainer = styles.styled('span')(({ theme }) => ({
|
|
|
6161
6181
|
*
|
|
6162
6182
|
* Figma Props Mapping:
|
|
6163
6183
|
* - 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)
|
|
6184
|
+
* - Show tag → count prop (renders NeoTag)
|
|
6168
6185
|
* - Text label → label prop
|
|
6169
6186
|
*/
|
|
6170
6187
|
const NeoTab = ({ label, count, ...props }) => {
|
|
@@ -6437,7 +6454,7 @@ const StyledSwitch = styles.styled(Switch, {
|
|
|
6437
6454
|
[`& .${Switch.switchClasses.thumb}`]: {
|
|
6438
6455
|
width: config.thumbSize,
|
|
6439
6456
|
height: config.thumbSize,
|
|
6440
|
-
boxShadow: `${neoDesign.shadows.
|
|
6457
|
+
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
6458
|
transition: theme.transitions.create(['width'], {
|
|
6442
6459
|
duration: theme.transitions.duration.shortest,
|
|
6443
6460
|
}),
|
|
@@ -6606,7 +6623,7 @@ const StyledTooltip = styles.styled(Tooltip, {
|
|
|
6606
6623
|
justifyContent: 'center',
|
|
6607
6624
|
}),
|
|
6608
6625
|
// Apply shadow
|
|
6609
|
-
boxShadow: `${neoDesign.shadows.
|
|
6626
|
+
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
6627
|
},
|
|
6611
6628
|
// Style the arrow
|
|
6612
6629
|
[`& .${Tooltip.tooltipClasses.arrow}`]: {
|
|
@@ -6850,6 +6867,7 @@ const version = '0.0.0-development';
|
|
|
6850
6867
|
exports.CIRCLE_RADIUS = CIRCLE_RADIUS;
|
|
6851
6868
|
exports.NeoActivityHeader = NeoActivityHeader;
|
|
6852
6869
|
exports.NeoActivityIndicatorCell = NeoActivityIndicatorCell;
|
|
6870
|
+
exports.NeoAlert = NeoAlert;
|
|
6853
6871
|
exports.NeoAvatar = NeoAvatar;
|
|
6854
6872
|
exports.NeoBadge = NeoBadge;
|
|
6855
6873
|
exports.NeoBanner = NeoBanner;
|
|
@@ -6911,7 +6929,6 @@ exports.NeoSelect = NeoDropdown;
|
|
|
6911
6929
|
exports.NeoSelectOption = NeoDropdownMenuItem;
|
|
6912
6930
|
exports.NeoSkeleton = NeoSkeleton;
|
|
6913
6931
|
exports.NeoStatusBadgeCell = NeoStatusBadgeCell;
|
|
6914
|
-
exports.NeoStatusBanner = NeoStatusBanner;
|
|
6915
6932
|
exports.NeoTab = NeoTab;
|
|
6916
6933
|
exports.NeoTabs = NeoTabs;
|
|
6917
6934
|
exports.NeoTag = NeoTag;
|