@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.esm.js
CHANGED
|
@@ -6,11 +6,11 @@ import Avatar from '@mui/material/Avatar';
|
|
|
6
6
|
import Chip, { chipClasses } from '@mui/material/Chip';
|
|
7
7
|
import SvgIcon, { svgIconClasses } from '@mui/material/SvgIcon';
|
|
8
8
|
import Alert, { alertClasses } from '@mui/material/Alert';
|
|
9
|
-
import
|
|
9
|
+
import ButtonBase, { buttonBaseClasses } from '@mui/material/ButtonBase';
|
|
10
10
|
import React, { forwardRef, createElement, useState, useRef, useCallback, useMemo, useEffect } from 'react';
|
|
11
|
+
import IconButton, { iconButtonClasses } from '@mui/material/IconButton';
|
|
11
12
|
import Breadcrumbs, { breadcrumbsClasses } from '@mui/material/Breadcrumbs';
|
|
12
13
|
import Link from '@mui/material/Link';
|
|
13
|
-
import ButtonBase, { buttonBaseClasses } from '@mui/material/ButtonBase';
|
|
14
14
|
import CircularProgress from '@mui/material/CircularProgress';
|
|
15
15
|
import MuiToggleButton, { toggleButtonClasses } from '@mui/material/ToggleButton';
|
|
16
16
|
import MuiToggleButtonGroup, { toggleButtonGroupClasses } from '@mui/material/ToggleButtonGroup';
|
|
@@ -136,7 +136,7 @@ const AvatarContainer = styled(Box)(({ size = 'medium' }) => ({
|
|
|
136
136
|
alignItems: 'center',
|
|
137
137
|
justifyContent: 'center',
|
|
138
138
|
overflow: 'hidden',
|
|
139
|
-
boxShadow: `${shadows.
|
|
139
|
+
boxShadow: `${shadows.neutral.small.x}px ${shadows.neutral.small.y}px ${shadows.neutral.small.blur}px ${shadows.neutral.small.spread}px ${shadows.neutral.small.shadow}`,
|
|
140
140
|
}),
|
|
141
141
|
'&:focus-within': {
|
|
142
142
|
...focusRingStyles,
|
|
@@ -688,11 +688,11 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
688
688
|
*/
|
|
689
689
|
|
|
690
690
|
|
|
691
|
-
const __iconNode$
|
|
691
|
+
const __iconNode$k = [
|
|
692
692
|
["path", { d: "M12 5v14", key: "s699le" }],
|
|
693
693
|
["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
|
|
694
694
|
];
|
|
695
|
-
const ArrowDown = createLucideIcon("arrow-down", __iconNode$
|
|
695
|
+
const ArrowDown = createLucideIcon("arrow-down", __iconNode$k);
|
|
696
696
|
|
|
697
697
|
/**
|
|
698
698
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -702,11 +702,32 @@ const ArrowDown = createLucideIcon("arrow-down", __iconNode$j);
|
|
|
702
702
|
*/
|
|
703
703
|
|
|
704
704
|
|
|
705
|
-
const __iconNode$
|
|
705
|
+
const __iconNode$j = [
|
|
706
706
|
["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
|
|
707
707
|
["path", { d: "M12 19V5", key: "x0mq9r" }]
|
|
708
708
|
];
|
|
709
|
-
const ArrowUp = createLucideIcon("arrow-up", __iconNode$
|
|
709
|
+
const ArrowUp = createLucideIcon("arrow-up", __iconNode$j);
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* @license lucide-react v0.577.0 - ISC
|
|
713
|
+
*
|
|
714
|
+
* This source code is licensed under the ISC license.
|
|
715
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
716
|
+
*/
|
|
717
|
+
|
|
718
|
+
|
|
719
|
+
const __iconNode$i = [
|
|
720
|
+
[
|
|
721
|
+
"path",
|
|
722
|
+
{
|
|
723
|
+
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",
|
|
724
|
+
key: "3c2336"
|
|
725
|
+
}
|
|
726
|
+
],
|
|
727
|
+
["line", { x1: "12", x2: "12", y1: "16", y2: "12", key: "1y1yb1" }],
|
|
728
|
+
["line", { x1: "12", x2: "12.01", y1: "8", y2: "8", key: "110wyk" }]
|
|
729
|
+
];
|
|
730
|
+
const BadgeInfo = createLucideIcon("badge-info", __iconNode$i);
|
|
710
731
|
|
|
711
732
|
/**
|
|
712
733
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -812,10 +833,10 @@ const CircleAlert = createLucideIcon("circle-alert", __iconNode$b);
|
|
|
812
833
|
|
|
813
834
|
|
|
814
835
|
const __iconNode$a = [
|
|
815
|
-
["
|
|
816
|
-
["path", { d: "m9
|
|
836
|
+
["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
|
|
837
|
+
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
817
838
|
];
|
|
818
|
-
const
|
|
839
|
+
const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$a);
|
|
819
840
|
|
|
820
841
|
/**
|
|
821
842
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -856,26 +877,11 @@ const Columns3 = createLucideIcon("columns-3", __iconNode$8);
|
|
|
856
877
|
|
|
857
878
|
|
|
858
879
|
const __iconNode$7 = [
|
|
859
|
-
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
860
|
-
["path", { d: "M12 16v-4", key: "1dtifu" }],
|
|
861
|
-
["path", { d: "M12 8h.01", key: "e9boi3" }]
|
|
862
|
-
];
|
|
863
|
-
const Info = createLucideIcon("info", __iconNode$7);
|
|
864
|
-
|
|
865
|
-
/**
|
|
866
|
-
* @license lucide-react v0.577.0 - ISC
|
|
867
|
-
*
|
|
868
|
-
* This source code is licensed under the ISC license.
|
|
869
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
870
|
-
*/
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
const __iconNode$6 = [
|
|
874
880
|
["path", { d: "M2 5h20", key: "1fs1ex" }],
|
|
875
881
|
["path", { d: "M6 12h12", key: "8npq4p" }],
|
|
876
882
|
["path", { d: "M9 19h6", key: "456am0" }]
|
|
877
883
|
];
|
|
878
|
-
const ListFilter = createLucideIcon("list-filter", __iconNode$
|
|
884
|
+
const ListFilter = createLucideIcon("list-filter", __iconNode$7);
|
|
879
885
|
|
|
880
886
|
/**
|
|
881
887
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -885,8 +891,8 @@ const ListFilter = createLucideIcon("list-filter", __iconNode$6);
|
|
|
885
891
|
*/
|
|
886
892
|
|
|
887
893
|
|
|
888
|
-
const __iconNode$
|
|
889
|
-
const Minus = createLucideIcon("minus", __iconNode$
|
|
894
|
+
const __iconNode$6 = [["path", { d: "M5 12h14", key: "1ays0h" }]];
|
|
895
|
+
const Minus = createLucideIcon("minus", __iconNode$6);
|
|
890
896
|
|
|
891
897
|
/**
|
|
892
898
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -896,11 +902,11 @@ const Minus = createLucideIcon("minus", __iconNode$5);
|
|
|
896
902
|
*/
|
|
897
903
|
|
|
898
904
|
|
|
899
|
-
const __iconNode$
|
|
905
|
+
const __iconNode$5 = [
|
|
900
906
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
901
907
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
902
908
|
];
|
|
903
|
-
const Plus = createLucideIcon("plus", __iconNode$
|
|
909
|
+
const Plus = createLucideIcon("plus", __iconNode$5);
|
|
904
910
|
|
|
905
911
|
/**
|
|
906
912
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -910,11 +916,11 @@ const Plus = createLucideIcon("plus", __iconNode$4);
|
|
|
910
916
|
*/
|
|
911
917
|
|
|
912
918
|
|
|
913
|
-
const __iconNode$
|
|
919
|
+
const __iconNode$4 = [
|
|
914
920
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
915
921
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
916
922
|
];
|
|
917
|
-
const Search = createLucideIcon("search", __iconNode$
|
|
923
|
+
const Search = createLucideIcon("search", __iconNode$4);
|
|
918
924
|
|
|
919
925
|
/**
|
|
920
926
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -924,14 +930,35 @@ const Search = createLucideIcon("search", __iconNode$3);
|
|
|
924
930
|
*/
|
|
925
931
|
|
|
926
932
|
|
|
927
|
-
const __iconNode$
|
|
933
|
+
const __iconNode$3 = [
|
|
928
934
|
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
929
935
|
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
930
936
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
931
937
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
932
938
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
933
939
|
];
|
|
934
|
-
const Trash2 = createLucideIcon("trash-2", __iconNode$
|
|
940
|
+
const Trash2 = createLucideIcon("trash-2", __iconNode$3);
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* @license lucide-react v0.577.0 - ISC
|
|
944
|
+
*
|
|
945
|
+
* This source code is licensed under the ISC license.
|
|
946
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
947
|
+
*/
|
|
948
|
+
|
|
949
|
+
|
|
950
|
+
const __iconNode$2 = [
|
|
951
|
+
[
|
|
952
|
+
"path",
|
|
953
|
+
{
|
|
954
|
+
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",
|
|
955
|
+
key: "wmoenq"
|
|
956
|
+
}
|
|
957
|
+
],
|
|
958
|
+
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
959
|
+
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
960
|
+
];
|
|
961
|
+
const TriangleAlert = createLucideIcon("triangle-alert", __iconNode$2);
|
|
935
962
|
|
|
936
963
|
/**
|
|
937
964
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -966,6 +993,92 @@ const __iconNode = [
|
|
|
966
993
|
];
|
|
967
994
|
const X = createLucideIcon("x", __iconNode);
|
|
968
995
|
|
|
996
|
+
const neutralSmallShadow = `${shadows.neutral.small.x}px ${shadows.neutral.small.y}px ${shadows.neutral.small.blur}px ${shadows.neutral.small.spread}px ${shadows.neutral.small.shadow}`;
|
|
997
|
+
const intentColors$1 = {
|
|
998
|
+
success: semanticColors.status.success,
|
|
999
|
+
error: semanticColors.status.error,
|
|
1000
|
+
warning: semanticColors.status.warning,
|
|
1001
|
+
offline: semanticColors.status.neutral,
|
|
1002
|
+
info: semanticColors.status.info,
|
|
1003
|
+
};
|
|
1004
|
+
// biome-ignore lint/suspicious/noExplicitAny: Type cast required to override MUI Alert variant type without global augmentation
|
|
1005
|
+
const StyledAlert$2 = styled(Alert, {
|
|
1006
|
+
shouldForwardProp: prop => prop !== 'intent' && prop !== 'alertType',
|
|
1007
|
+
})(({ theme, intent = 'success', alertType = 'outlined' }) => {
|
|
1008
|
+
const palette = intentColors$1[intent];
|
|
1009
|
+
const isFilled = alertType === 'filled';
|
|
1010
|
+
const iconColor = isFilled ? semanticColors.typography.tooltip : palette.default;
|
|
1011
|
+
const messageColor = isFilled ? semanticColors.typography.tooltip : semanticColors.typography.body;
|
|
1012
|
+
return {
|
|
1013
|
+
height: spacing.spacing_8,
|
|
1014
|
+
width: '100%',
|
|
1015
|
+
borderRadius: borderRadius.xS,
|
|
1016
|
+
alignItems: 'center',
|
|
1017
|
+
fontFamily: typography.fontFamily.body,
|
|
1018
|
+
fontSize: theme.typography.pxToRem(typography.fontSize.default),
|
|
1019
|
+
fontWeight: typography.fontWeight.semiBold,
|
|
1020
|
+
lineHeight: 1.5,
|
|
1021
|
+
padding: theme.spacing(0, 2),
|
|
1022
|
+
backgroundColor: isFilled ? palette.dark : palette.light,
|
|
1023
|
+
border: isFilled ? 'none' : `1px solid ${palette.transparent}`,
|
|
1024
|
+
color: isFilled ? semanticColors.typography.tooltip : semanticColors.typography.body,
|
|
1025
|
+
boxShadow: isFilled ? neutralSmallShadow : undefined,
|
|
1026
|
+
[`& .${alertClasses.icon}`]: {
|
|
1027
|
+
color: iconColor,
|
|
1028
|
+
padding: 0,
|
|
1029
|
+
opacity: 1,
|
|
1030
|
+
marginRight: spacing.spacing_1_1_2,
|
|
1031
|
+
},
|
|
1032
|
+
[`& .${alertClasses.message}`]: {
|
|
1033
|
+
color: messageColor,
|
|
1034
|
+
padding: 0,
|
|
1035
|
+
flex: 1,
|
|
1036
|
+
display: 'flex',
|
|
1037
|
+
flexDirection: 'column',
|
|
1038
|
+
justifyContent: 'center',
|
|
1039
|
+
'& span:last-child': {
|
|
1040
|
+
fontSize: theme.typography.pxToRem(typography.fontSize.sm),
|
|
1041
|
+
fontWeight: typography.fontWeight.medium,
|
|
1042
|
+
color: isFilled
|
|
1043
|
+
? semanticColors.typography.tooltip
|
|
1044
|
+
: semanticColors.typography.bodySecondary,
|
|
1045
|
+
lineHeight: 1.4,
|
|
1046
|
+
},
|
|
1047
|
+
},
|
|
1048
|
+
[`& .${alertClasses.action}`]: {
|
|
1049
|
+
padding: 0,
|
|
1050
|
+
marginRight: 0,
|
|
1051
|
+
...(isFilled && {
|
|
1052
|
+
color: semanticColors.typography.tooltip,
|
|
1053
|
+
[`& .${buttonBaseClasses.root}`]: { color: 'inherit' },
|
|
1054
|
+
}),
|
|
1055
|
+
},
|
|
1056
|
+
};
|
|
1057
|
+
});
|
|
1058
|
+
const iconMap = {
|
|
1059
|
+
success: jsx(CircleCheckBig, { size: 24 }),
|
|
1060
|
+
error: jsx(CircleAlert, { size: 24 }),
|
|
1061
|
+
warning: jsx(TriangleAlert, { size: 24 }),
|
|
1062
|
+
offline: jsx(WifiOff, { size: 24 }),
|
|
1063
|
+
info: jsx(BadgeInfo, { size: 24 }),
|
|
1064
|
+
};
|
|
1065
|
+
/**
|
|
1066
|
+
* NeoAlert - Alert component for displaying contextual status messages
|
|
1067
|
+
*
|
|
1068
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4921-3427
|
|
1069
|
+
*
|
|
1070
|
+
* Figma Props Mapping:
|
|
1071
|
+
* - Intent (Success|Error|Warning|Offline|Info) → intent
|
|
1072
|
+
* - Type (Outlined|Filled) → type
|
|
1073
|
+
* - Show supporting text → description prop presence
|
|
1074
|
+
* - Show Button → action prop presence
|
|
1075
|
+
*/
|
|
1076
|
+
const NeoAlert = ({ intent = 'success', type = 'outlined', title, description, icon, action, ...props }) => {
|
|
1077
|
+
const defaultIcon = iconMap[intent];
|
|
1078
|
+
return (jsxs(StyledAlert$2, { ...props, intent: intent, alertType: type, icon: icon ?? defaultIcon, action: action, children: [jsx("span", { children: title }), description && jsx("span", { children: description })] }));
|
|
1079
|
+
};
|
|
1080
|
+
NeoAlert.displayName = 'NeoAlert';
|
|
1081
|
+
|
|
969
1082
|
const intentColors = {
|
|
970
1083
|
info: semanticColors.status.info,
|
|
971
1084
|
success: semanticColors.status.success,
|
|
@@ -974,7 +1087,7 @@ const intentColors = {
|
|
|
974
1087
|
neutral: semanticColors.status.neutral,
|
|
975
1088
|
};
|
|
976
1089
|
// biome-ignore lint/suspicious/noExplicitAny: Type cast required to override MUI Alert variant type without global augmentation
|
|
977
|
-
const StyledAlert$
|
|
1090
|
+
const StyledAlert$1 = styled(Alert, {
|
|
978
1091
|
shouldForwardProp: prop => prop !== 'messagePosition' && prop !== 'intent' && prop !== 'bannerType',
|
|
979
1092
|
})(({ intent = 'info', bannerType = 'outlined', messagePosition = 'left' }) => {
|
|
980
1093
|
const palette = intentColors[intent];
|
|
@@ -998,7 +1111,7 @@ const StyledAlert$2 = styled(Alert, {
|
|
|
998
1111
|
alignItems: 'center',
|
|
999
1112
|
justifyContent: messagePosition === 'center' ? 'center' : 'flex-start',
|
|
1000
1113
|
...(messagePosition === 'center' && { position: 'relative' }),
|
|
1001
|
-
boxShadow: `${shadows.
|
|
1114
|
+
boxShadow: `${shadows.neutral.small.x}px ${shadows.neutral.small.y}px ${shadows.neutral.small.blur}px ${shadows.neutral.small.spread}px ${shadows.neutral.small.shadow}`,
|
|
1002
1115
|
fontSize: typography.fontSize.default,
|
|
1003
1116
|
fontWeight: typography.fontWeight.medium,
|
|
1004
1117
|
lineHeight: 1.5,
|
|
@@ -1054,7 +1167,7 @@ const NeoBanner = ({ intent = 'info', type = 'outlined', message, messagePositio
|
|
|
1054
1167
|
return null;
|
|
1055
1168
|
}
|
|
1056
1169
|
const closeIconColor = type === 'filled' ? semanticColors.surfaces.white : intentColors[intent].default;
|
|
1057
|
-
return (jsx(StyledAlert$
|
|
1170
|
+
return (jsx(StyledAlert$1, { ...props, intent: intent, bannerType: type, messagePosition: messagePosition, icon: messagePosition === 'left' ? icon || false : false, action: showClose ? (jsx(StyledIconButton$1, { size: "small", onClick: handleClose, closeIconColor: closeIconColor, children: jsx(X, { size: 24 }) })) : undefined, children: messagePosition === 'center' ? (jsxs(Fragment, { children: [icon, jsx("span", { children: message }), linkText && (jsx(LinkText, { bannerType: type, onClick: onLinkClick, children: linkText }))] })) : (jsxs(Fragment, { children: [jsx("span", { children: message }), linkText && (jsx(LinkText, { bannerType: type, onClick: onLinkClick, children: linkText }))] })) }));
|
|
1058
1171
|
};
|
|
1059
1172
|
NeoBanner.displayName = 'NeoBanner';
|
|
1060
1173
|
|
|
@@ -4071,11 +4184,11 @@ const StyledFooter = styled(Box, {
|
|
|
4071
4184
|
'&::before': {
|
|
4072
4185
|
content: showShadow ? '""' : 'none',
|
|
4073
4186
|
position: 'absolute',
|
|
4074
|
-
top: `-${shadows.
|
|
4187
|
+
top: `-${shadows.neutral.regular.blur}px`, // -4px
|
|
4075
4188
|
left: 0,
|
|
4076
4189
|
right: 0,
|
|
4077
|
-
height: `${shadows.
|
|
4078
|
-
background: `linear-gradient(to top, ${shadows.
|
|
4190
|
+
height: `${shadows.neutral.regular.blur}px`, // 4px
|
|
4191
|
+
background: `linear-gradient(to top, ${shadows.neutral.regular.shadow}, transparent)`, // rgba(31, 41, 55, 0.1)
|
|
4079
4192
|
pointerEvents: 'none',
|
|
4080
4193
|
},
|
|
4081
4194
|
[theme.breakpoints.down('sm')]: {
|
|
@@ -5324,9 +5437,9 @@ const TagPill = styled('span')(({ theme }) => ({
|
|
|
5324
5437
|
*
|
|
5325
5438
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=8455-6120
|
|
5326
5439
|
*/
|
|
5327
|
-
|
|
5440
|
+
function NeoNavigationItem({ icon, label, selected = false, tag, children, ...props }) {
|
|
5328
5441
|
return (jsxs(StyledRoot, { selected: selected, disableRipple: true, ...props, children: [jsx(IconPadding, { className: "neo-nav-icon-padding", children: icon }), label && jsx(Label$2, { className: "neo-nav-label", children: label }), tag && jsx(TagPill, { children: tag }), children] }));
|
|
5329
|
-
}
|
|
5442
|
+
}
|
|
5330
5443
|
NeoNavigationItem.displayName = 'NeoNavigationItem';
|
|
5331
5444
|
|
|
5332
5445
|
/**
|
|
@@ -5982,127 +6095,6 @@ const NeoSkeleton = ({ colorTheme = 'light', position = 'start', ...props }) =>
|
|
|
5982
6095
|
};
|
|
5983
6096
|
NeoSkeleton.displayName = 'NeoSkeleton';
|
|
5984
6097
|
|
|
5985
|
-
/**
|
|
5986
|
-
* Styled Alert component with custom severity and variant styling
|
|
5987
|
-
* Uses Custom Variants Pattern to add 'neutral' and 'info' severities
|
|
5988
|
-
*/
|
|
5989
|
-
const StyledAlert$1 = styled(Alert, {
|
|
5990
|
-
shouldForwardProp: prop => prop !== 'severity' && prop !== 'variant',
|
|
5991
|
-
})(({ theme, severity = 'success', variant = 'outlined' }) => {
|
|
5992
|
-
// Color mapping for different severities
|
|
5993
|
-
const colorMap = {
|
|
5994
|
-
success: {
|
|
5995
|
-
light: semanticColors.status.success.light,
|
|
5996
|
-
medium: semanticColors.status.success.default,
|
|
5997
|
-
},
|
|
5998
|
-
error: {
|
|
5999
|
-
light: semanticColors.status.error.light,
|
|
6000
|
-
medium: semanticColors.status.error.default,
|
|
6001
|
-
},
|
|
6002
|
-
neutral: {
|
|
6003
|
-
light: semanticColors.status.neutral.light,
|
|
6004
|
-
medium: semanticColors.status.neutral.default,
|
|
6005
|
-
},
|
|
6006
|
-
info: {
|
|
6007
|
-
light: semanticColors.status.info.light,
|
|
6008
|
-
medium: semanticColors.status.info.default,
|
|
6009
|
-
},
|
|
6010
|
-
};
|
|
6011
|
-
const severityColors = colorMap[severity];
|
|
6012
|
-
// Variant-specific styles based on Phase 1.1 analysis
|
|
6013
|
-
const variantStyles = (() => {
|
|
6014
|
-
if (variant === 'filled') {
|
|
6015
|
-
// Dark mode: solid background with white text
|
|
6016
|
-
return {
|
|
6017
|
-
backgroundColor: severityColors.medium,
|
|
6018
|
-
border: 'none',
|
|
6019
|
-
color: semanticColors.typography.tooltip,
|
|
6020
|
-
padding: theme.spacing(0.75, 3),
|
|
6021
|
-
boxShadow: `0px 1px 3px ${semanticColors.surfaces.shadowNeutral}1a`, // 1a = 10% opacity
|
|
6022
|
-
[`& .${alertClasses.icon}`]: {
|
|
6023
|
-
color: semanticColors.typography.tooltip,
|
|
6024
|
-
},
|
|
6025
|
-
[`& .${alertClasses.message}`]: {
|
|
6026
|
-
color: semanticColors.typography.tooltip,
|
|
6027
|
-
},
|
|
6028
|
-
};
|
|
6029
|
-
}
|
|
6030
|
-
// Light mode: light background with border
|
|
6031
|
-
return {
|
|
6032
|
-
backgroundColor: severityColors.light,
|
|
6033
|
-
border: `1px solid ${severityColors.medium}`,
|
|
6034
|
-
color: colors.grey[800],
|
|
6035
|
-
padding: theme.spacing(0.125, 2),
|
|
6036
|
-
[`& .${alertClasses.icon}`]: {
|
|
6037
|
-
color: severityColors.medium,
|
|
6038
|
-
},
|
|
6039
|
-
[`& .${alertClasses.message}`]: {
|
|
6040
|
-
color: colors.grey[800],
|
|
6041
|
-
},
|
|
6042
|
-
};
|
|
6043
|
-
})();
|
|
6044
|
-
return {
|
|
6045
|
-
height: spacing.spacing_8,
|
|
6046
|
-
width: '100%',
|
|
6047
|
-
borderRadius: borderRadius.xS,
|
|
6048
|
-
alignItems: 'center',
|
|
6049
|
-
fontFamily: typography.fontFamily.body,
|
|
6050
|
-
fontSize: theme.typography.pxToRem(typography.fontSize.default),
|
|
6051
|
-
fontWeight: typography.fontWeight.medium,
|
|
6052
|
-
lineHeight: 1.5,
|
|
6053
|
-
...variantStyles,
|
|
6054
|
-
// Supporting text styling
|
|
6055
|
-
[`& .${alertClasses.message} > *:not(:first-child)`]: {
|
|
6056
|
-
fontSize: theme.typography.pxToRem(typography.fontSize.sm),
|
|
6057
|
-
fontWeight: typography.fontWeight.regular,
|
|
6058
|
-
color: variant === 'filled'
|
|
6059
|
-
? semanticColors.typography.tooltip
|
|
6060
|
-
: semanticColors.typography.bodySecondary,
|
|
6061
|
-
lineHeight: 1.4,
|
|
6062
|
-
marginTop: theme.spacing(0.25),
|
|
6063
|
-
},
|
|
6064
|
-
};
|
|
6065
|
-
});
|
|
6066
|
-
/**
|
|
6067
|
-
* NeoStatusBanner - Status banner component for displaying system status messages
|
|
6068
|
-
*
|
|
6069
|
-
* Displays status information with different severity levels (success, error, info, neutral) and
|
|
6070
|
-
* visual modes (outlined for light backgrounds, filled for emphasis).
|
|
6071
|
-
*
|
|
6072
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4921-3427
|
|
6073
|
-
*
|
|
6074
|
-
* Figma Props Mapping:
|
|
6075
|
-
* - Status (Success|Error|Info|Offline) → severity ('success'|'error'|'info'|'neutral')
|
|
6076
|
-
* - Mode (Light|Dark) → variant ('outlined'|'filled')
|
|
6077
|
-
*
|
|
6078
|
-
* Design Tokens Used:
|
|
6079
|
-
* - status.success.light, status.success.default
|
|
6080
|
-
* - status.error.light, status.error.default
|
|
6081
|
-
* - status.neutral.light, status.neutral.default
|
|
6082
|
-
* - status.info.light, status.info.default
|
|
6083
|
-
* - typography.tooltip, typography.bodySecondary
|
|
6084
|
-
* - grey[800]
|
|
6085
|
-
* - fontSize.default, fontSize.sm
|
|
6086
|
-
* - fontWeight.medium, fontWeight.regular
|
|
6087
|
-
* - fontFamily.body
|
|
6088
|
-
* - surfaces.shadowNeutral
|
|
6089
|
-
*/
|
|
6090
|
-
const NeoStatusBanner = ({ severity = 'success', variant = 'outlined', icon, children, ...props }) => {
|
|
6091
|
-
// Icon mapping for different severities
|
|
6092
|
-
const iconMap = {
|
|
6093
|
-
success: jsx(CircleCheck, { size: 24 }),
|
|
6094
|
-
error: jsx(CircleAlert, { size: 24 }),
|
|
6095
|
-
neutral: jsx(WifiOff, { size: 24 }),
|
|
6096
|
-
info: jsx(Info, { size: 24 }),
|
|
6097
|
-
};
|
|
6098
|
-
const defaultIcon = iconMap[severity];
|
|
6099
|
-
// Type assertion needed: severity and variant are custom props filtered by shouldForwardProp
|
|
6100
|
-
// biome-ignore lint/suspicious/noExplicitAny: Custom props pattern requires any cast
|
|
6101
|
-
const StyledAlertAny = StyledAlert$1;
|
|
6102
|
-
return (jsx(StyledAlertAny, { ...props, severity: severity, variant: variant, icon: icon ?? defaultIcon, children: children }));
|
|
6103
|
-
};
|
|
6104
|
-
NeoStatusBanner.displayName = 'NeoStatusBanner';
|
|
6105
|
-
|
|
6106
6098
|
/**
|
|
6107
6099
|
* NeoTabs - Tabs container component based on MUI Tabs
|
|
6108
6100
|
*
|
|
@@ -6137,7 +6129,20 @@ const StyledTab = styled(MuiTab)(({ theme }) => ({
|
|
|
6137
6129
|
color: semanticColors.typography.tab.active,
|
|
6138
6130
|
fontWeight: typography.fontWeight.semiBold,
|
|
6139
6131
|
},
|
|
6132
|
+
'&:hover': {
|
|
6133
|
+
backgroundColor: semanticColors.buttons.secondary.hoverBackground,
|
|
6134
|
+
[`&.${tabClasses.selected}::after`]: {
|
|
6135
|
+
content: '""',
|
|
6136
|
+
position: 'absolute',
|
|
6137
|
+
bottom: 0,
|
|
6138
|
+
left: 0,
|
|
6139
|
+
right: 0,
|
|
6140
|
+
height: 2,
|
|
6141
|
+
backgroundColor: semanticColors.buttons.primary.hover,
|
|
6142
|
+
},
|
|
6143
|
+
},
|
|
6140
6144
|
[`&.${buttonBaseClasses.focusVisible}`]: {
|
|
6145
|
+
color: semanticColors.typography.tab.active,
|
|
6141
6146
|
outline: `2px solid ${semanticColors.border.focus}`,
|
|
6142
6147
|
outlineOffset: -2,
|
|
6143
6148
|
},
|
|
@@ -6145,6 +6150,21 @@ const StyledTab = styled(MuiTab)(({ theme }) => ({
|
|
|
6145
6150
|
color: semanticColors.typography.button.disabled,
|
|
6146
6151
|
cursor: 'not-allowed',
|
|
6147
6152
|
pointerEvents: 'auto',
|
|
6153
|
+
'&:hover': {
|
|
6154
|
+
backgroundColor: 'transparent',
|
|
6155
|
+
},
|
|
6156
|
+
[`&.${tabClasses.selected}`]: {
|
|
6157
|
+
color: semanticColors.typography.button.disabled,
|
|
6158
|
+
'&::after': {
|
|
6159
|
+
content: '""',
|
|
6160
|
+
position: 'absolute',
|
|
6161
|
+
bottom: 0,
|
|
6162
|
+
left: 0,
|
|
6163
|
+
right: 0,
|
|
6164
|
+
height: 2,
|
|
6165
|
+
backgroundColor: semanticColors.buttons.tertiary.disabled,
|
|
6166
|
+
},
|
|
6167
|
+
},
|
|
6148
6168
|
},
|
|
6149
6169
|
}));
|
|
6150
6170
|
const TabLabelContainer = styled('span')(({ theme }) => ({
|
|
@@ -6159,10 +6179,7 @@ const TabLabelContainer = styled('span')(({ theme }) => ({
|
|
|
6159
6179
|
*
|
|
6160
6180
|
* Figma Props Mapping:
|
|
6161
6181
|
* - Current=True/False → Controlled by parent NeoTabs value
|
|
6162
|
-
* -
|
|
6163
|
-
* - State=Hover → CSS :hover
|
|
6164
|
-
* - State=Focus → CSS :focus-visible
|
|
6165
|
-
* - Tag count → count prop (renders NeoTag)
|
|
6182
|
+
* - Show tag → count prop (renders NeoTag)
|
|
6166
6183
|
* - Text label → label prop
|
|
6167
6184
|
*/
|
|
6168
6185
|
const NeoTab = ({ label, count, ...props }) => {
|
|
@@ -6435,7 +6452,7 @@ const StyledSwitch = styled(Switch, {
|
|
|
6435
6452
|
[`& .${switchClasses.thumb}`]: {
|
|
6436
6453
|
width: config.thumbSize,
|
|
6437
6454
|
height: config.thumbSize,
|
|
6438
|
-
boxShadow: `${shadows.
|
|
6455
|
+
boxShadow: `${shadows.neutral.small.x}px ${shadows.neutral.small.y}px ${shadows.neutral.small.blur}px ${shadows.neutral.small.spread}px ${shadows.neutral.small.shadow}`,
|
|
6439
6456
|
transition: theme.transitions.create(['width'], {
|
|
6440
6457
|
duration: theme.transitions.duration.shortest,
|
|
6441
6458
|
}),
|
|
@@ -6604,7 +6621,7 @@ const StyledTooltip = styled(Tooltip, {
|
|
|
6604
6621
|
justifyContent: 'center',
|
|
6605
6622
|
}),
|
|
6606
6623
|
// Apply shadow
|
|
6607
|
-
boxShadow: `${shadows.
|
|
6624
|
+
boxShadow: `${shadows.neutral.medium.x}px ${shadows.neutral.medium.y}px ${shadows.neutral.medium.blur}px ${shadows.neutral.medium.spread}px ${shadows.neutral.medium.shadow}`,
|
|
6608
6625
|
},
|
|
6609
6626
|
// Style the arrow
|
|
6610
6627
|
[`& .${tooltipClasses.arrow}`]: {
|
|
@@ -6845,5 +6862,5 @@ NeoTypologyControl.displayName = 'NeoTypologyControl';
|
|
|
6845
6862
|
|
|
6846
6863
|
const version = '0.0.0-development';
|
|
6847
6864
|
|
|
6848
|
-
export { ActivityScene, CIRCLE_RADIUS, NeoActivityHeader, NeoActivityIndicatorCell, NeoAvatar, NeoBadge, NeoBanner, NeoBreadcrumbLink, NeoBreadcrumbs, NeoButton, NeoButtonTab, NeoButtonTabGroup, NeoCard, NeoCheckbox, NeoCodeSnippet, NeoDataGrid, NeoDataGridCellContent, NeoDataGridColumnsButton, NeoDataGridColumnsPanel, NeoDataGridFilterPanel, NeoDataGridFilterPanelAddIcon, NeoDataGridFilterPanelDeleteIcon, NeoDataGridFilterPanelRemoveAllIcon, NeoDataGridFiltersButton, NeoDataGridHeaderLabel, NeoDropdown as NeoDataGridSelect, NeoDatePicker, NeoDivider, NeoDot, NeoDownloadToast, NeoDropdown, NeoDropdownMenu, NeoDropdownMenuItem, NeoDropdownMenuItem as NeoDropdownOption, NeoFilterChip, NeoFooter, NeoGeneralAvatar, NeoIconButton, NeoIconWrapper, NeoInfiniteScrollGrid, NeoInputField, NeoListItem, NeoListItemButton, NeoLoadingSpinner, NeoMarketplaceCard, NeoMarketplaceLargeCard, NeoDropdownMenu as NeoMenu, NeoDropdownMenuItem as NeoMenuItem, NeoModal, NeoModalContent, NeoModalFooter, NeoModalHeader, NeoMultiBadgesCell, NeoNavigationAvatar, NeoNavigationItem, NeoPageContent, NeoPaginatedGrid, NeoProgressbar, NeoQuickFilter, NeoRadio, NeoSearchChip, NeoDropdown as NeoSelect, NeoDropdownMenuItem as NeoSelectOption, NeoSkeleton, NeoStatusBadgeCell,
|
|
6865
|
+
export { ActivityScene, CIRCLE_RADIUS, NeoActivityHeader, NeoActivityIndicatorCell, NeoAlert, NeoAvatar, NeoBadge, NeoBanner, NeoBreadcrumbLink, NeoBreadcrumbs, NeoButton, NeoButtonTab, NeoButtonTabGroup, NeoCard, NeoCheckbox, NeoCodeSnippet, NeoDataGrid, NeoDataGridCellContent, NeoDataGridColumnsButton, NeoDataGridColumnsPanel, NeoDataGridFilterPanel, NeoDataGridFilterPanelAddIcon, NeoDataGridFilterPanelDeleteIcon, NeoDataGridFilterPanelRemoveAllIcon, NeoDataGridFiltersButton, NeoDataGridHeaderLabel, NeoDropdown as NeoDataGridSelect, NeoDatePicker, NeoDivider, NeoDot, NeoDownloadToast, NeoDropdown, NeoDropdownMenu, NeoDropdownMenuItem, NeoDropdownMenuItem as NeoDropdownOption, NeoFilterChip, NeoFooter, NeoGeneralAvatar, NeoIconButton, NeoIconWrapper, NeoInfiniteScrollGrid, NeoInputField, NeoListItem, NeoListItemButton, NeoLoadingSpinner, NeoMarketplaceCard, NeoMarketplaceLargeCard, NeoDropdownMenu as NeoMenu, NeoDropdownMenuItem as NeoMenuItem, NeoModal, NeoModalContent, NeoModalFooter, NeoModalHeader, NeoMultiBadgesCell, NeoNavigationAvatar, NeoNavigationItem, NeoPageContent, NeoPaginatedGrid, NeoProgressbar, NeoQuickFilter, NeoRadio, NeoSearchChip, NeoDropdown as NeoSelect, NeoDropdownMenuItem as NeoSelectOption, NeoSkeleton, NeoStatusBadgeCell, NeoTab, NeoTabs, NeoTag, NeoToast, NeoToastButton, NeoToggle, NeoToolbar, NeoTooltip, NeoTreeItem, NeoTreeView, StyledToggleButton as NeoTypologyButton, NeoTypologyControl, NeoUserAvatarCell, SortedAscendingIcon, SortedDescendingIcon, UnsortedIcon, getDataGridHeaderStyles, neoRowHeights, version };
|
|
6849
6866
|
//# sourceMappingURL=index.esm.js.map
|