@moderneinc/neo-styled-components 2.6.0-next.ffaf01 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Banner/Banner.d.ts +22 -17
- package/dist/CodeSnippet/CodeSnippet.d.ts +4 -4
- package/dist/StatusBanner/StatusBanner.d.ts +10 -7
- package/dist/Tabs/Tabs.d.ts +5 -7
- package/dist/Tag/Tag.d.ts +7 -7
- package/dist/Toast/Toast.d.ts +19 -11
- package/dist/Tooltip/Tooltip.d.ts +6 -6
- package/dist/index.d.ts +73 -59
- package/dist/index.esm.js +293 -132
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +293 -132
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -690,11 +690,11 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
690
690
|
*/
|
|
691
691
|
|
|
692
692
|
|
|
693
|
-
const __iconNode$
|
|
693
|
+
const __iconNode$j = [
|
|
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$j);
|
|
698
698
|
|
|
699
699
|
/**
|
|
700
700
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -704,11 +704,11 @@ const ArrowDown = createLucideIcon("arrow-down", __iconNode$i);
|
|
|
704
704
|
*/
|
|
705
705
|
|
|
706
706
|
|
|
707
|
-
const __iconNode$
|
|
707
|
+
const __iconNode$i = [
|
|
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$i);
|
|
712
712
|
|
|
713
713
|
/**
|
|
714
714
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -718,7 +718,7 @@ const ArrowUp = createLucideIcon("arrow-up", __iconNode$h);
|
|
|
718
718
|
*/
|
|
719
719
|
|
|
720
720
|
|
|
721
|
-
const __iconNode$
|
|
721
|
+
const __iconNode$h = [
|
|
722
722
|
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
723
723
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
724
724
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
@@ -730,7 +730,7 @@ const __iconNode$g = [
|
|
|
730
730
|
["path", { d: "M12 18h.01", key: "mhygvu" }],
|
|
731
731
|
["path", { d: "M16 18h.01", key: "kzsmim" }]
|
|
732
732
|
];
|
|
733
|
-
const CalendarDays = createLucideIcon("calendar-days", __iconNode$
|
|
733
|
+
const CalendarDays = createLucideIcon("calendar-days", __iconNode$h);
|
|
734
734
|
|
|
735
735
|
/**
|
|
736
736
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -740,8 +740,8 @@ const CalendarDays = createLucideIcon("calendar-days", __iconNode$g);
|
|
|
740
740
|
*/
|
|
741
741
|
|
|
742
742
|
|
|
743
|
-
const __iconNode$
|
|
744
|
-
const ChevronDown = createLucideIcon("chevron-down", __iconNode$
|
|
743
|
+
const __iconNode$g = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
744
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$g);
|
|
745
745
|
|
|
746
746
|
/**
|
|
747
747
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -751,8 +751,8 @@ const ChevronDown = createLucideIcon("chevron-down", __iconNode$f);
|
|
|
751
751
|
*/
|
|
752
752
|
|
|
753
753
|
|
|
754
|
-
const __iconNode$
|
|
755
|
-
const ChevronLeft = createLucideIcon("chevron-left", __iconNode$
|
|
754
|
+
const __iconNode$f = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
|
|
755
|
+
const ChevronLeft = createLucideIcon("chevron-left", __iconNode$f);
|
|
756
756
|
|
|
757
757
|
/**
|
|
758
758
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -762,8 +762,8 @@ const ChevronLeft = createLucideIcon("chevron-left", __iconNode$e);
|
|
|
762
762
|
*/
|
|
763
763
|
|
|
764
764
|
|
|
765
|
-
const __iconNode$
|
|
766
|
-
const ChevronRight = createLucideIcon("chevron-right", __iconNode$
|
|
765
|
+
const __iconNode$e = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
766
|
+
const ChevronRight = createLucideIcon("chevron-right", __iconNode$e);
|
|
767
767
|
|
|
768
768
|
/**
|
|
769
769
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -773,8 +773,8 @@ const ChevronRight = createLucideIcon("chevron-right", __iconNode$d);
|
|
|
773
773
|
*/
|
|
774
774
|
|
|
775
775
|
|
|
776
|
-
const __iconNode$
|
|
777
|
-
const ChevronUp = createLucideIcon("chevron-up", __iconNode$
|
|
776
|
+
const __iconNode$d = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
777
|
+
const ChevronUp = createLucideIcon("chevron-up", __iconNode$d);
|
|
778
778
|
|
|
779
779
|
/**
|
|
780
780
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -784,11 +784,11 @@ const ChevronUp = createLucideIcon("chevron-up", __iconNode$c);
|
|
|
784
784
|
*/
|
|
785
785
|
|
|
786
786
|
|
|
787
|
-
const __iconNode$
|
|
787
|
+
const __iconNode$c = [
|
|
788
788
|
["path", { d: "m7 15 5 5 5-5", key: "1hf1tw" }],
|
|
789
789
|
["path", { d: "m7 9 5-5 5 5", key: "sgt6xg" }]
|
|
790
790
|
];
|
|
791
|
-
const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$
|
|
791
|
+
const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$c);
|
|
792
792
|
|
|
793
793
|
/**
|
|
794
794
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -798,12 +798,12 @@ const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$b);
|
|
|
798
798
|
*/
|
|
799
799
|
|
|
800
800
|
|
|
801
|
-
const __iconNode$
|
|
801
|
+
const __iconNode$b = [
|
|
802
802
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
803
803
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
804
804
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
805
805
|
];
|
|
806
|
-
const CircleAlert = createLucideIcon("circle-alert", __iconNode$
|
|
806
|
+
const CircleAlert = createLucideIcon("circle-alert", __iconNode$b);
|
|
807
807
|
|
|
808
808
|
/**
|
|
809
809
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -813,11 +813,11 @@ const CircleAlert = createLucideIcon("circle-alert", __iconNode$a);
|
|
|
813
813
|
*/
|
|
814
814
|
|
|
815
815
|
|
|
816
|
-
const __iconNode$
|
|
816
|
+
const __iconNode$a = [
|
|
817
817
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
818
818
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
819
819
|
];
|
|
820
|
-
const CircleCheck = createLucideIcon("circle-check", __iconNode$
|
|
820
|
+
const CircleCheck = createLucideIcon("circle-check", __iconNode$a);
|
|
821
821
|
|
|
822
822
|
/**
|
|
823
823
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -827,12 +827,12 @@ const CircleCheck = createLucideIcon("circle-check", __iconNode$9);
|
|
|
827
827
|
*/
|
|
828
828
|
|
|
829
829
|
|
|
830
|
-
const __iconNode$
|
|
830
|
+
const __iconNode$9 = [
|
|
831
831
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
832
832
|
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
833
833
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
834
834
|
];
|
|
835
|
-
const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$
|
|
835
|
+
const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$9);
|
|
836
836
|
|
|
837
837
|
/**
|
|
838
838
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -842,12 +842,12 @@ const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$8
|
|
|
842
842
|
*/
|
|
843
843
|
|
|
844
844
|
|
|
845
|
-
const __iconNode$
|
|
845
|
+
const __iconNode$8 = [
|
|
846
846
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
847
847
|
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
848
848
|
["path", { d: "M15 3v18", key: "14nvp0" }]
|
|
849
849
|
];
|
|
850
|
-
const Columns3 = createLucideIcon("columns-3", __iconNode$
|
|
850
|
+
const Columns3 = createLucideIcon("columns-3", __iconNode$8);
|
|
851
851
|
|
|
852
852
|
/**
|
|
853
853
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -857,12 +857,12 @@ const Columns3 = createLucideIcon("columns-3", __iconNode$7);
|
|
|
857
857
|
*/
|
|
858
858
|
|
|
859
859
|
|
|
860
|
-
const __iconNode$
|
|
860
|
+
const __iconNode$7 = [
|
|
861
861
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
862
862
|
["path", { d: "M12 16v-4", key: "1dtifu" }],
|
|
863
863
|
["path", { d: "M12 8h.01", key: "e9boi3" }]
|
|
864
864
|
];
|
|
865
|
-
const Info = createLucideIcon("info", __iconNode$
|
|
865
|
+
const Info = createLucideIcon("info", __iconNode$7);
|
|
866
866
|
|
|
867
867
|
/**
|
|
868
868
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -872,12 +872,12 @@ const Info = createLucideIcon("info", __iconNode$6);
|
|
|
872
872
|
*/
|
|
873
873
|
|
|
874
874
|
|
|
875
|
-
const __iconNode$
|
|
875
|
+
const __iconNode$6 = [
|
|
876
876
|
["path", { d: "M2 5h20", key: "1fs1ex" }],
|
|
877
877
|
["path", { d: "M6 12h12", key: "8npq4p" }],
|
|
878
878
|
["path", { d: "M9 19h6", key: "456am0" }]
|
|
879
879
|
];
|
|
880
|
-
const ListFilter = createLucideIcon("list-filter", __iconNode$
|
|
880
|
+
const ListFilter = createLucideIcon("list-filter", __iconNode$6);
|
|
881
881
|
|
|
882
882
|
/**
|
|
883
883
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -887,11 +887,11 @@ const ListFilter = createLucideIcon("list-filter", __iconNode$5);
|
|
|
887
887
|
*/
|
|
888
888
|
|
|
889
889
|
|
|
890
|
-
const __iconNode$
|
|
890
|
+
const __iconNode$5 = [
|
|
891
891
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
892
892
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
893
893
|
];
|
|
894
|
-
const Plus = createLucideIcon("plus", __iconNode$
|
|
894
|
+
const Plus = createLucideIcon("plus", __iconNode$5);
|
|
895
895
|
|
|
896
896
|
/**
|
|
897
897
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -901,11 +901,11 @@ const Plus = createLucideIcon("plus", __iconNode$4);
|
|
|
901
901
|
*/
|
|
902
902
|
|
|
903
903
|
|
|
904
|
-
const __iconNode$
|
|
904
|
+
const __iconNode$4 = [
|
|
905
905
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
906
906
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
907
907
|
];
|
|
908
|
-
const Search = createLucideIcon("search", __iconNode$
|
|
908
|
+
const Search = createLucideIcon("search", __iconNode$4);
|
|
909
909
|
|
|
910
910
|
/**
|
|
911
911
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -915,14 +915,35 @@ const Search = createLucideIcon("search", __iconNode$3);
|
|
|
915
915
|
*/
|
|
916
916
|
|
|
917
917
|
|
|
918
|
-
const __iconNode$
|
|
918
|
+
const __iconNode$3 = [
|
|
919
919
|
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
920
920
|
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
921
921
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
922
922
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
923
923
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
924
924
|
];
|
|
925
|
-
const Trash2 = createLucideIcon("trash-2", __iconNode$
|
|
925
|
+
const Trash2 = createLucideIcon("trash-2", __iconNode$3);
|
|
926
|
+
|
|
927
|
+
/**
|
|
928
|
+
* @license lucide-react v0.577.0 - ISC
|
|
929
|
+
*
|
|
930
|
+
* This source code is licensed under the ISC license.
|
|
931
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
932
|
+
*/
|
|
933
|
+
|
|
934
|
+
|
|
935
|
+
const __iconNode$2 = [
|
|
936
|
+
[
|
|
937
|
+
"path",
|
|
938
|
+
{
|
|
939
|
+
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",
|
|
940
|
+
key: "wmoenq"
|
|
941
|
+
}
|
|
942
|
+
],
|
|
943
|
+
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
944
|
+
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
945
|
+
];
|
|
946
|
+
const TriangleAlert = createLucideIcon("triangle-alert", __iconNode$2);
|
|
926
947
|
|
|
927
948
|
/**
|
|
928
949
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -959,15 +980,11 @@ const X = createLucideIcon("x", __iconNode);
|
|
|
959
980
|
|
|
960
981
|
// biome-ignore lint/suspicious/noExplicitAny: Type cast required to override MUI Alert variant type without global augmentation
|
|
961
982
|
const StyledAlert$2 = styles.styled(Alert, {
|
|
962
|
-
shouldForwardProp: prop => prop !== 'messagePosition' && prop !== 'variant',
|
|
963
|
-
})(({ variant = '
|
|
964
|
-
//
|
|
965
|
-
const
|
|
966
|
-
|
|
967
|
-
backgroundColor: neoDesign.semanticColors.surfaces.snackbarBrand,
|
|
968
|
-
color: neoDesign.semanticColors.surfaces.white,
|
|
969
|
-
},
|
|
970
|
-
light: {
|
|
983
|
+
shouldForwardProp: prop => prop !== 'messagePosition' && prop !== 'variant' && prop !== 'bannerType',
|
|
984
|
+
})(({ variant = 'info', bannerType = 'outlined', messagePosition = 'left' }) => {
|
|
985
|
+
// Outlined styles (light bg + colored border)
|
|
986
|
+
const outlinedStyles = {
|
|
987
|
+
info: {
|
|
971
988
|
backgroundColor: neoDesign.semanticColors.status.info.light,
|
|
972
989
|
color: neoDesign.colors.grey['800'],
|
|
973
990
|
},
|
|
@@ -983,6 +1000,50 @@ const StyledAlert$2 = styles.styled(Alert, {
|
|
|
983
1000
|
backgroundColor: neoDesign.semanticColors.status.warning.light,
|
|
984
1001
|
color: neoDesign.colors.grey['800'],
|
|
985
1002
|
},
|
|
1003
|
+
neutral: {
|
|
1004
|
+
backgroundColor: neoDesign.semanticColors.status.neutral.light,
|
|
1005
|
+
color: neoDesign.colors.grey['800'],
|
|
1006
|
+
},
|
|
1007
|
+
};
|
|
1008
|
+
// Filled styles (solid bg)
|
|
1009
|
+
const filledStyles = {
|
|
1010
|
+
info: {
|
|
1011
|
+
backgroundColor: neoDesign.semanticColors.status.info.dark,
|
|
1012
|
+
color: neoDesign.semanticColors.surfaces.white,
|
|
1013
|
+
},
|
|
1014
|
+
success: {
|
|
1015
|
+
backgroundColor: neoDesign.semanticColors.status.success.dark,
|
|
1016
|
+
color: neoDesign.semanticColors.surfaces.white,
|
|
1017
|
+
},
|
|
1018
|
+
error: {
|
|
1019
|
+
backgroundColor: neoDesign.semanticColors.status.error.dark,
|
|
1020
|
+
color: neoDesign.semanticColors.surfaces.white,
|
|
1021
|
+
},
|
|
1022
|
+
warning: {
|
|
1023
|
+
backgroundColor: neoDesign.semanticColors.status.warning.default,
|
|
1024
|
+
color: neoDesign.semanticColors.typography.warning,
|
|
1025
|
+
},
|
|
1026
|
+
neutral: {
|
|
1027
|
+
backgroundColor: neoDesign.semanticColors.surfaces.snackbarLightMode,
|
|
1028
|
+
color: neoDesign.semanticColors.surfaces.white,
|
|
1029
|
+
},
|
|
1030
|
+
};
|
|
1031
|
+
// Legacy variants (ignore bannerType)
|
|
1032
|
+
const legacyStyles = {
|
|
1033
|
+
dark: {
|
|
1034
|
+
backgroundColor: neoDesign.semanticColors.surfaces.snackbarBrand,
|
|
1035
|
+
color: neoDesign.semanticColors.surfaces.white,
|
|
1036
|
+
},
|
|
1037
|
+
light: {
|
|
1038
|
+
backgroundColor: neoDesign.semanticColors.status.info.light,
|
|
1039
|
+
color: neoDesign.colors.grey['800'],
|
|
1040
|
+
},
|
|
1041
|
+
};
|
|
1042
|
+
const getVariantStyles = () => {
|
|
1043
|
+
if (legacyStyles[variant])
|
|
1044
|
+
return legacyStyles[variant];
|
|
1045
|
+
const styleMap = bannerType === 'filled' ? filledStyles : outlinedStyles;
|
|
1046
|
+
return styleMap[variant] ?? outlinedStyles.info;
|
|
986
1047
|
};
|
|
987
1048
|
return {
|
|
988
1049
|
width: '100%',
|
|
@@ -999,7 +1060,7 @@ const StyledAlert$2 = styles.styled(Alert, {
|
|
|
999
1060
|
fontSize: neoDesign.typography.fontSize.default,
|
|
1000
1061
|
fontWeight: neoDesign.typography.fontWeight.regular,
|
|
1001
1062
|
lineHeight: 1.5,
|
|
1002
|
-
...
|
|
1063
|
+
...getVariantStyles(),
|
|
1003
1064
|
[`& .${Alert.alertClasses.icon}`]: {
|
|
1004
1065
|
padding: 0,
|
|
1005
1066
|
opacity: 1,
|
|
@@ -1022,15 +1083,16 @@ const StyledAlert$2 = styles.styled(Alert, {
|
|
|
1022
1083
|
},
|
|
1023
1084
|
};
|
|
1024
1085
|
});
|
|
1025
|
-
const LinkText = styles.styled('span')(({ variant = '
|
|
1086
|
+
const LinkText = styles.styled('span')(({ variant = 'info', bannerType = 'outlined' }) => {
|
|
1087
|
+
const isLegacy = variant === 'dark' || variant === 'light';
|
|
1088
|
+
const isFilled = !isLegacy && bannerType === 'filled';
|
|
1026
1089
|
const getLinkColor = () => {
|
|
1027
|
-
if (variant === 'dark') {
|
|
1028
|
-
return neoDesign.semanticColors.typography.link.default;
|
|
1090
|
+
if (variant === 'dark' || isFilled) {
|
|
1091
|
+
return neoDesign.semanticColors.typography.link.default;
|
|
1029
1092
|
}
|
|
1030
|
-
if (variant === 'light') {
|
|
1031
|
-
return neoDesign.semanticColors.typography.link.primary;
|
|
1093
|
+
if (variant === 'light' || variant === 'info') {
|
|
1094
|
+
return neoDesign.semanticColors.typography.link.primary;
|
|
1032
1095
|
}
|
|
1033
|
-
// For success, error, warning - use dark body color #1f2937
|
|
1034
1096
|
return neoDesign.colors.grey['800'];
|
|
1035
1097
|
};
|
|
1036
1098
|
return {
|
|
@@ -1055,15 +1117,20 @@ const StyledIconButton$1 = styles.styled(IconButton)(({ closeIconColor }) => ({
|
|
|
1055
1117
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4170-2158
|
|
1056
1118
|
*
|
|
1057
1119
|
* Figma Props Mapping:
|
|
1058
|
-
* -
|
|
1059
|
-
* -
|
|
1060
|
-
* -
|
|
1061
|
-
* -
|
|
1062
|
-
* -
|
|
1063
|
-
*/
|
|
1064
|
-
const NeoBanner = ({ variant = '
|
|
1120
|
+
* - Intention (Info|Success|Error|Warning|Neutral) → variant (info|success|error|warning|neutral)
|
|
1121
|
+
* - Type (Outlined|Filled) → type ('outlined'|'filled')
|
|
1122
|
+
* - Message Position (Left|Center) → messagePosition ('left'|'center')
|
|
1123
|
+
* - Dismissible (boolean) → showClose (boolean)
|
|
1124
|
+
* - Show Link (boolean) → linkText presence (string when shown)
|
|
1125
|
+
*/
|
|
1126
|
+
const NeoBanner = ({ variant = 'info', type = 'outlined', message, messagePosition = 'left', linkText, showClose = true, icon, onClose, onLinkClick, ...props }) => {
|
|
1127
|
+
const isLegacy = variant === 'dark' || variant === 'light';
|
|
1128
|
+
const isFilled = !isLegacy && type === 'filled';
|
|
1065
1129
|
const getCloseIconColor = () => {
|
|
1066
|
-
if (variant === '
|
|
1130
|
+
if (isFilled && variant === 'warning') {
|
|
1131
|
+
return neoDesign.semanticColors.typography.warning;
|
|
1132
|
+
}
|
|
1133
|
+
if (variant === 'dark' || isFilled) {
|
|
1067
1134
|
return neoDesign.semanticColors.surfaces.white;
|
|
1068
1135
|
}
|
|
1069
1136
|
if (variant === 'success') {
|
|
@@ -1077,7 +1144,7 @@ const NeoBanner = ({ variant = 'light', message, messagePosition = 'left', linkT
|
|
|
1077
1144
|
}
|
|
1078
1145
|
return neoDesign.colors.grey['800'];
|
|
1079
1146
|
};
|
|
1080
|
-
return (jsxRuntime.jsx(StyledAlert$2, { ...props, variant: variant, messagePosition: messagePosition, icon: messagePosition === 'left' ? icon || false : false, action: showClose ? (jsxRuntime.jsx(StyledIconButton$1, { size: "small", onClick: onClose, closeIconColor: getCloseIconColor(), 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, { variant: variant, onClick: onLinkClick, children: linkText }))] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { children: message }), linkText && (jsxRuntime.jsx(LinkText, { variant: variant, onClick: onLinkClick, children: linkText }))] })) }));
|
|
1147
|
+
return (jsxRuntime.jsx(StyledAlert$2, { ...props, variant: variant, bannerType: type, messagePosition: messagePosition, icon: messagePosition === 'left' ? icon || false : false, action: showClose ? (jsxRuntime.jsx(StyledIconButton$1, { size: "small", onClick: onClose, closeIconColor: getCloseIconColor(), 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, { variant: variant, bannerType: type, onClick: onLinkClick, children: linkText }))] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { children: message }), linkText && (jsxRuntime.jsx(LinkText, { variant: variant, bannerType: type, onClick: onLinkClick, children: linkText }))] })) }));
|
|
1081
1148
|
};
|
|
1082
1149
|
NeoBanner.displayName = 'NeoBanner';
|
|
1083
1150
|
|
|
@@ -1808,9 +1875,9 @@ const IconWrapper$2 = styles.styled('span')(({ theme, isMultiline }) => ({
|
|
|
1808
1875
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4187-30353
|
|
1809
1876
|
*
|
|
1810
1877
|
* Figma Props Mapping:
|
|
1811
|
-
* -
|
|
1812
|
-
* -
|
|
1813
|
-
* -
|
|
1878
|
+
* - Theme (Dark|Light) → variant (outlined|filled)
|
|
1879
|
+
* - Content (Single|Multi|Inline) → size (small|large|inline)
|
|
1880
|
+
* - Show icon (boolean) → endIcon (ReactNode, unmappable)
|
|
1814
1881
|
* - Text content → children prop
|
|
1815
1882
|
*/
|
|
1816
1883
|
const NeoCodeSnippet = ({ variant = 'outlined', size = 'small', endIcon, children, ...props }) => {
|
|
@@ -2685,9 +2752,9 @@ const StyledChip$1 = styles.styled(Chip)(({ theme, size, variant, color }) => ({
|
|
|
2685
2752
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4120-34533
|
|
2686
2753
|
*
|
|
2687
2754
|
* Figma Props Mapping:
|
|
2688
|
-
* -
|
|
2689
|
-
* -
|
|
2690
|
-
* -
|
|
2755
|
+
* - Size (Small|Medium|Large) → size (small|medium|large)
|
|
2756
|
+
* - Type (Outline|Filled) → variant (outlined|filled)
|
|
2757
|
+
* - Intent (Neutral|Error|Warning|Success|Info|Violet|Beta) → color (default|error|warning|success|info|violet|beta)
|
|
2691
2758
|
* - Label text → label prop
|
|
2692
2759
|
*/
|
|
2693
2760
|
const NeoTag = ({ size = 'small', variant = 'outlined', ...props }) => {
|
|
@@ -5990,7 +6057,7 @@ NeoSkeleton.displayName = 'NeoSkeleton';
|
|
|
5990
6057
|
|
|
5991
6058
|
/**
|
|
5992
6059
|
* Styled Alert component with custom severity and variant styling
|
|
5993
|
-
* Uses Custom Variants Pattern to add 'neutral' and '
|
|
6060
|
+
* Uses Custom Variants Pattern to add 'neutral', 'info', and 'warning' severities
|
|
5994
6061
|
*/
|
|
5995
6062
|
const StyledAlert$1 = styles.styled(Alert, {
|
|
5996
6063
|
shouldForwardProp: prop => prop !== 'severity' && prop !== 'variant',
|
|
@@ -6013,27 +6080,35 @@ const StyledAlert$1 = styles.styled(Alert, {
|
|
|
6013
6080
|
light: neoDesign.semanticColors.status.info.light,
|
|
6014
6081
|
medium: neoDesign.semanticColors.status.info.default,
|
|
6015
6082
|
},
|
|
6083
|
+
warning: {
|
|
6084
|
+
light: neoDesign.semanticColors.status.warning.light,
|
|
6085
|
+
medium: neoDesign.semanticColors.status.warning.default,
|
|
6086
|
+
},
|
|
6016
6087
|
};
|
|
6017
6088
|
const severityColors = colorMap[severity];
|
|
6018
|
-
|
|
6089
|
+
const isWarningFilled = severity === 'warning' && variant === 'filled';
|
|
6090
|
+
// Variant-specific styles
|
|
6019
6091
|
const variantStyles = (() => {
|
|
6020
6092
|
if (variant === 'filled') {
|
|
6021
|
-
//
|
|
6093
|
+
// Warning filled uses dark text for contrast on yellow bg
|
|
6094
|
+
const textColor = isWarningFilled
|
|
6095
|
+
? neoDesign.semanticColors.typography.warning
|
|
6096
|
+
: neoDesign.semanticColors.typography.tooltip;
|
|
6022
6097
|
return {
|
|
6023
6098
|
backgroundColor: severityColors.medium,
|
|
6024
6099
|
border: 'none',
|
|
6025
|
-
color:
|
|
6100
|
+
color: textColor,
|
|
6026
6101
|
padding: theme.spacing(0.75, 3),
|
|
6027
6102
|
boxShadow: `0px 1px 3px ${neoDesign.semanticColors.surfaces.shadowNeutral}1a`, // 1a = 10% opacity
|
|
6028
6103
|
[`& .${Alert.alertClasses.icon}`]: {
|
|
6029
|
-
color:
|
|
6104
|
+
color: textColor,
|
|
6030
6105
|
},
|
|
6031
6106
|
[`& .${Alert.alertClasses.message}`]: {
|
|
6032
|
-
color:
|
|
6107
|
+
color: textColor,
|
|
6033
6108
|
},
|
|
6034
6109
|
};
|
|
6035
6110
|
}
|
|
6036
|
-
//
|
|
6111
|
+
// Outlined: light background with border
|
|
6037
6112
|
return {
|
|
6038
6113
|
backgroundColor: severityColors.light,
|
|
6039
6114
|
border: `1px solid ${severityColors.medium}`,
|
|
@@ -6062,7 +6137,9 @@ const StyledAlert$1 = styles.styled(Alert, {
|
|
|
6062
6137
|
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.sm),
|
|
6063
6138
|
fontWeight: neoDesign.typography.fontWeight.regular,
|
|
6064
6139
|
color: variant === 'filled'
|
|
6065
|
-
?
|
|
6140
|
+
? isWarningFilled
|
|
6141
|
+
? neoDesign.semanticColors.typography.warning
|
|
6142
|
+
: neoDesign.semanticColors.typography.tooltip
|
|
6066
6143
|
: neoDesign.semanticColors.typography.bodySecondary,
|
|
6067
6144
|
lineHeight: 1.4,
|
|
6068
6145
|
marginTop: theme.spacing(0.25),
|
|
@@ -6072,20 +6149,21 @@ const StyledAlert$1 = styles.styled(Alert, {
|
|
|
6072
6149
|
/**
|
|
6073
6150
|
* NeoStatusBanner - Status banner component for displaying system status messages
|
|
6074
6151
|
*
|
|
6075
|
-
* Displays status information with different severity levels (success, error, info, neutral)
|
|
6076
|
-
* visual modes (outlined for light backgrounds, filled for emphasis).
|
|
6152
|
+
* Displays status information with different severity levels (success, error, info, neutral, warning)
|
|
6153
|
+
* and visual modes (outlined for light backgrounds, filled for emphasis).
|
|
6077
6154
|
*
|
|
6078
6155
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4921-3427
|
|
6079
6156
|
*
|
|
6080
6157
|
* Figma Props Mapping:
|
|
6081
|
-
* -
|
|
6082
|
-
* -
|
|
6158
|
+
* - Intent (Success|Error|Info|Offline|Warning) → severity ('success'|'error'|'info'|'neutral'|'warning')
|
|
6159
|
+
* - Type (Outlined|Filled) → variant ('outlined'|'filled')
|
|
6083
6160
|
*
|
|
6084
6161
|
* Design Tokens Used:
|
|
6085
6162
|
* - status.success.light, status.success.default
|
|
6086
6163
|
* - status.error.light, status.error.default
|
|
6087
6164
|
* - status.neutral.light, status.neutral.default
|
|
6088
6165
|
* - status.info.light, status.info.default
|
|
6166
|
+
* - status.warning.light, status.warning.default
|
|
6089
6167
|
* - typography.tooltip, typography.bodySecondary
|
|
6090
6168
|
* - grey[800]
|
|
6091
6169
|
* - fontSize.default, fontSize.sm
|
|
@@ -6100,6 +6178,7 @@ const NeoStatusBanner = ({ severity = 'success', variant = 'outlined', icon, chi
|
|
|
6100
6178
|
error: jsxRuntime.jsx(CircleAlert, { size: 24 }),
|
|
6101
6179
|
neutral: jsxRuntime.jsx(WifiOff, { size: 24 }),
|
|
6102
6180
|
info: jsxRuntime.jsx(Info, { size: 24 }),
|
|
6181
|
+
warning: jsxRuntime.jsx(TriangleAlert, { size: 24 }),
|
|
6103
6182
|
};
|
|
6104
6183
|
const defaultIcon = iconMap[severity];
|
|
6105
6184
|
// Type assertion needed: severity and variant are custom props filtered by shouldForwardProp
|
|
@@ -6164,11 +6243,9 @@ const TabLabelContainer = styles.styled('span')(({ theme }) => ({
|
|
|
6164
6243
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=3368-26152
|
|
6165
6244
|
*
|
|
6166
6245
|
* Figma Props Mapping:
|
|
6167
|
-
* -
|
|
6168
|
-
* - State
|
|
6169
|
-
* -
|
|
6170
|
-
* - State=Focus → CSS :focus-visible
|
|
6171
|
-
* - Tag count → count prop (renders NeoTag)
|
|
6246
|
+
* - Selected (True|False) → Controlled by parent NeoTabs value
|
|
6247
|
+
* - State (Default|Hover|Focus|Disabled) → CSS states + disabled prop
|
|
6248
|
+
* - Show tag (boolean) → count prop (renders NeoTag)
|
|
6172
6249
|
* - Text label → label prop
|
|
6173
6250
|
*/
|
|
6174
6251
|
const NeoTab = ({ label, count, ...props }) => {
|
|
@@ -6179,8 +6256,8 @@ NeoTab.displayName = 'NeoTab';
|
|
|
6179
6256
|
|
|
6180
6257
|
// biome-ignore lint/suspicious/noExplicitAny: Type cast required to override MUI Alert variant type without global augmentation
|
|
6181
6258
|
const StyledAlert = styles.styled(Alert, {
|
|
6182
|
-
shouldForwardProp: prop => prop !== 'variant' && prop !== 'showProgress',
|
|
6183
|
-
})(({ theme, variant = 'default' }) => {
|
|
6259
|
+
shouldForwardProp: prop => prop !== 'variant' && prop !== 'toastType' && prop !== 'showProgress',
|
|
6260
|
+
})(({ theme, variant = 'default', toastType = 'outlined' }) => {
|
|
6184
6261
|
// Base styles
|
|
6185
6262
|
const baseStyles = {
|
|
6186
6263
|
padding: neoDesign.spacing.spacing_2,
|
|
@@ -6204,23 +6281,13 @@ const StyledAlert = styles.styled(Alert, {
|
|
|
6204
6281
|
marginRight: 0,
|
|
6205
6282
|
},
|
|
6206
6283
|
};
|
|
6207
|
-
//
|
|
6208
|
-
const
|
|
6284
|
+
// Outlined intent styles (light bg + colored border)
|
|
6285
|
+
const outlinedStyles = {
|
|
6209
6286
|
default: {
|
|
6210
6287
|
backgroundColor: neoDesign.semanticColors.surfaces.snackbarDarkMode,
|
|
6211
6288
|
color: neoDesign.colors.grey['800'],
|
|
6212
6289
|
border: `1px solid ${neoDesign.semanticColors.border.primary}`,
|
|
6213
6290
|
},
|
|
6214
|
-
dark: {
|
|
6215
|
-
backgroundColor: neoDesign.semanticColors.surfaces.snackbarLightMode,
|
|
6216
|
-
color: neoDesign.semanticColors.surfaces.white,
|
|
6217
|
-
border: `1px solid ${neoDesign.semanticColors.surfaces.snackbarLightMode}`,
|
|
6218
|
-
},
|
|
6219
|
-
brand: {
|
|
6220
|
-
backgroundColor: neoDesign.semanticColors.surfaces.snackbarBrand,
|
|
6221
|
-
color: neoDesign.semanticColors.surfaces.white,
|
|
6222
|
-
border: `1px solid ${neoDesign.semanticColors.surfaces.snackbarBrand}`,
|
|
6223
|
-
},
|
|
6224
6291
|
error: {
|
|
6225
6292
|
backgroundColor: neoDesign.semanticColors.status.error.light,
|
|
6226
6293
|
color: neoDesign.semanticColors.status.error.dark,
|
|
@@ -6236,51 +6303,135 @@ const StyledAlert = styles.styled(Alert, {
|
|
|
6236
6303
|
color: neoDesign.semanticColors.status.info.dark,
|
|
6237
6304
|
border: `1px solid ${neoDesign.semanticColors.status.info.default}`,
|
|
6238
6305
|
},
|
|
6306
|
+
warning: {
|
|
6307
|
+
backgroundColor: neoDesign.semanticColors.status.warning.light,
|
|
6308
|
+
color: neoDesign.semanticColors.status.warning.dark,
|
|
6309
|
+
border: `1px solid ${neoDesign.semanticColors.status.warning.default}`,
|
|
6310
|
+
},
|
|
6311
|
+
};
|
|
6312
|
+
// Filled intent styles (solid bg)
|
|
6313
|
+
const filledStyles = {
|
|
6314
|
+
default: {
|
|
6315
|
+
backgroundColor: neoDesign.semanticColors.surfaces.snackbarLightMode,
|
|
6316
|
+
color: neoDesign.semanticColors.surfaces.white,
|
|
6317
|
+
border: `1px solid ${neoDesign.semanticColors.surfaces.snackbarLightMode}`,
|
|
6318
|
+
},
|
|
6319
|
+
error: {
|
|
6320
|
+
backgroundColor: neoDesign.semanticColors.status.error.dark,
|
|
6321
|
+
color: neoDesign.semanticColors.surfaces.white,
|
|
6322
|
+
border: `1px solid ${neoDesign.semanticColors.status.error.dark}`,
|
|
6323
|
+
},
|
|
6324
|
+
success: {
|
|
6325
|
+
backgroundColor: neoDesign.semanticColors.status.success.dark,
|
|
6326
|
+
color: neoDesign.semanticColors.surfaces.white,
|
|
6327
|
+
border: `1px solid ${neoDesign.semanticColors.status.success.dark}`,
|
|
6328
|
+
},
|
|
6329
|
+
info: {
|
|
6330
|
+
backgroundColor: neoDesign.semanticColors.status.info.dark,
|
|
6331
|
+
color: neoDesign.semanticColors.surfaces.white,
|
|
6332
|
+
border: `1px solid ${neoDesign.semanticColors.status.info.dark}`,
|
|
6333
|
+
},
|
|
6334
|
+
warning: {
|
|
6335
|
+
backgroundColor: neoDesign.semanticColors.status.warning.default,
|
|
6336
|
+
color: neoDesign.semanticColors.typography.warning,
|
|
6337
|
+
border: `1px solid ${neoDesign.semanticColors.status.warning.default}`,
|
|
6338
|
+
},
|
|
6339
|
+
};
|
|
6340
|
+
// Legacy variants (ignore toastType)
|
|
6341
|
+
const legacyStyles = {
|
|
6342
|
+
dark: {
|
|
6343
|
+
backgroundColor: neoDesign.semanticColors.surfaces.snackbarLightMode,
|
|
6344
|
+
color: neoDesign.semanticColors.surfaces.white,
|
|
6345
|
+
border: `1px solid ${neoDesign.semanticColors.surfaces.snackbarLightMode}`,
|
|
6346
|
+
},
|
|
6347
|
+
brand: {
|
|
6348
|
+
backgroundColor: neoDesign.semanticColors.surfaces.snackbarBrand,
|
|
6349
|
+
color: neoDesign.semanticColors.surfaces.white,
|
|
6350
|
+
border: `1px solid ${neoDesign.semanticColors.surfaces.snackbarBrand}`,
|
|
6351
|
+
},
|
|
6239
6352
|
download: {
|
|
6240
6353
|
backgroundColor: neoDesign.semanticColors.surfaces.snackbarDarkMode,
|
|
6241
6354
|
color: neoDesign.colors.grey['800'],
|
|
6242
6355
|
border: `1px solid ${neoDesign.semanticColors.border.primary}`,
|
|
6243
6356
|
},
|
|
6244
6357
|
};
|
|
6358
|
+
const getVariantStyles = () => {
|
|
6359
|
+
if (legacyStyles[variant])
|
|
6360
|
+
return legacyStyles[variant];
|
|
6361
|
+
const styleMap = toastType === 'filled' ? filledStyles : outlinedStyles;
|
|
6362
|
+
return styleMap[variant] ?? outlinedStyles.default;
|
|
6363
|
+
};
|
|
6245
6364
|
return {
|
|
6246
6365
|
...baseStyles,
|
|
6247
|
-
...
|
|
6366
|
+
...getVariantStyles(),
|
|
6248
6367
|
};
|
|
6249
6368
|
});
|
|
6250
|
-
const ToastTitle = styles.styled('p')(({ theme, variant = 'default' }) => {
|
|
6251
|
-
const
|
|
6369
|
+
const ToastTitle = styles.styled('p')(({ theme, variant = 'default', toastType = 'outlined' }) => {
|
|
6370
|
+
const outlinedColors = {
|
|
6252
6371
|
default: neoDesign.colors.grey['700'],
|
|
6253
|
-
dark: neoDesign.semanticColors.surfaces.white,
|
|
6254
|
-
brand: neoDesign.semanticColors.surfaces.white,
|
|
6255
6372
|
error: neoDesign.semanticColors.status.error.dark,
|
|
6256
6373
|
success: neoDesign.semanticColors.status.success.dark,
|
|
6257
6374
|
info: neoDesign.semanticColors.status.info.dark,
|
|
6375
|
+
warning: neoDesign.semanticColors.status.warning.dark,
|
|
6376
|
+
};
|
|
6377
|
+
const filledColors = {
|
|
6378
|
+
default: neoDesign.semanticColors.surfaces.white,
|
|
6379
|
+
error: neoDesign.semanticColors.surfaces.white,
|
|
6380
|
+
success: neoDesign.semanticColors.surfaces.white,
|
|
6381
|
+
info: neoDesign.semanticColors.surfaces.white,
|
|
6382
|
+
warning: neoDesign.semanticColors.typography.warning,
|
|
6383
|
+
};
|
|
6384
|
+
const legacyColors = {
|
|
6385
|
+
dark: neoDesign.semanticColors.surfaces.white,
|
|
6386
|
+
brand: neoDesign.semanticColors.surfaces.white,
|
|
6258
6387
|
download: neoDesign.colors.grey['700'],
|
|
6259
6388
|
};
|
|
6389
|
+
const getColor = () => {
|
|
6390
|
+
if (legacyColors[variant])
|
|
6391
|
+
return legacyColors[variant];
|
|
6392
|
+
const colorMap = toastType === 'filled' ? filledColors : outlinedColors;
|
|
6393
|
+
return colorMap[variant] ?? outlinedColors.default;
|
|
6394
|
+
};
|
|
6260
6395
|
return {
|
|
6261
6396
|
margin: 0,
|
|
6262
6397
|
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.sm),
|
|
6263
6398
|
fontWeight: neoDesign.typography.fontWeight.semiBold,
|
|
6264
6399
|
lineHeight: 1.4,
|
|
6265
|
-
color:
|
|
6400
|
+
color: getColor(),
|
|
6266
6401
|
};
|
|
6267
6402
|
});
|
|
6268
|
-
const ToastMessage = styles.styled('p')(({ theme, variant = 'default' }) => {
|
|
6269
|
-
const
|
|
6403
|
+
const ToastMessage = styles.styled('p')(({ theme, variant = 'default', toastType = 'outlined' }) => {
|
|
6404
|
+
const outlinedColors = {
|
|
6270
6405
|
default: neoDesign.semanticColors.typography.bodySecondary,
|
|
6271
|
-
dark: neoDesign.colors.grey['200'],
|
|
6272
|
-
brand: neoDesign.colors.grey['200'],
|
|
6273
6406
|
error: neoDesign.semanticColors.status.error.dark,
|
|
6274
6407
|
success: neoDesign.semanticColors.status.success.dark,
|
|
6275
6408
|
info: neoDesign.semanticColors.status.info.dark,
|
|
6409
|
+
warning: neoDesign.semanticColors.status.warning.dark,
|
|
6410
|
+
};
|
|
6411
|
+
const filledColors = {
|
|
6412
|
+
default: neoDesign.colors.grey['200'],
|
|
6413
|
+
error: neoDesign.semanticColors.surfaces.white,
|
|
6414
|
+
success: neoDesign.semanticColors.surfaces.white,
|
|
6415
|
+
info: neoDesign.semanticColors.surfaces.white,
|
|
6416
|
+
warning: neoDesign.semanticColors.typography.warning,
|
|
6417
|
+
};
|
|
6418
|
+
const legacyColors = {
|
|
6419
|
+
dark: neoDesign.colors.grey['200'],
|
|
6420
|
+
brand: neoDesign.colors.grey['200'],
|
|
6276
6421
|
download: neoDesign.colors.grey['800'],
|
|
6277
6422
|
};
|
|
6423
|
+
const getColor = () => {
|
|
6424
|
+
if (legacyColors[variant])
|
|
6425
|
+
return legacyColors[variant];
|
|
6426
|
+
const colorMap = toastType === 'filled' ? filledColors : outlinedColors;
|
|
6427
|
+
return colorMap[variant] ?? outlinedColors.default;
|
|
6428
|
+
};
|
|
6278
6429
|
return {
|
|
6279
6430
|
margin: 0,
|
|
6280
6431
|
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.sm),
|
|
6281
6432
|
fontWeight: neoDesign.typography.fontWeight.regular,
|
|
6282
6433
|
lineHeight: 1.4,
|
|
6283
|
-
color:
|
|
6434
|
+
color: getColor(),
|
|
6284
6435
|
};
|
|
6285
6436
|
});
|
|
6286
6437
|
const ToastActions = styles.styled(Stack)({
|
|
@@ -6289,29 +6440,39 @@ const ToastActions = styles.styled(Stack)({
|
|
|
6289
6440
|
justifyContent: 'flex-start',
|
|
6290
6441
|
});
|
|
6291
6442
|
const ToastButton = styles.styled(Button, {
|
|
6292
|
-
shouldForwardProp: prop => prop !== 'toastVariant' && prop !== 'primary',
|
|
6293
|
-
})(({ toastVariant = 'default', primary }) => {
|
|
6443
|
+
shouldForwardProp: prop => prop !== 'toastVariant' && prop !== 'toastType' && prop !== 'primary',
|
|
6444
|
+
})(({ toastVariant = 'default', toastType = 'outlined', primary }) => {
|
|
6445
|
+
const isLegacy = toastVariant === 'dark' || toastVariant === 'brand' || toastVariant === 'download';
|
|
6446
|
+
const isFilled = !isLegacy && toastType === 'filled';
|
|
6294
6447
|
const getColor = () => {
|
|
6295
6448
|
if (primary) {
|
|
6296
6449
|
if (toastVariant === 'dark' || toastVariant === 'brand') {
|
|
6297
6450
|
return neoDesign.colors.digitalBlue['200'];
|
|
6298
6451
|
}
|
|
6452
|
+
if (isFilled) {
|
|
6453
|
+
return toastVariant === 'warning'
|
|
6454
|
+
? neoDesign.semanticColors.typography.link.primary
|
|
6455
|
+
: neoDesign.semanticColors.surfaces.white;
|
|
6456
|
+
}
|
|
6299
6457
|
return neoDesign.semanticColors.typography.link.primary;
|
|
6300
6458
|
}
|
|
6301
6459
|
// Non-primary button colors
|
|
6302
6460
|
if (toastVariant === 'dark' || toastVariant === 'brand') {
|
|
6303
6461
|
return neoDesign.semanticColors.surfaces.white;
|
|
6304
6462
|
}
|
|
6305
|
-
if (
|
|
6306
|
-
return
|
|
6463
|
+
if (isFilled) {
|
|
6464
|
+
return toastVariant === 'warning'
|
|
6465
|
+
? neoDesign.semanticColors.typography.warning
|
|
6466
|
+
: neoDesign.semanticColors.surfaces.white;
|
|
6307
6467
|
}
|
|
6308
|
-
if (toastVariant === '
|
|
6468
|
+
if (toastVariant === 'error')
|
|
6469
|
+
return neoDesign.semanticColors.status.error.dark;
|
|
6470
|
+
if (toastVariant === 'success')
|
|
6309
6471
|
return neoDesign.semanticColors.status.success.dark;
|
|
6310
|
-
|
|
6311
|
-
if (toastVariant === 'info') {
|
|
6472
|
+
if (toastVariant === 'info')
|
|
6312
6473
|
return neoDesign.semanticColors.status.info.dark;
|
|
6313
|
-
|
|
6314
|
-
|
|
6474
|
+
if (toastVariant === 'warning')
|
|
6475
|
+
return neoDesign.semanticColors.status.warning.dark;
|
|
6315
6476
|
return neoDesign.semanticColors.icons.placeholder;
|
|
6316
6477
|
};
|
|
6317
6478
|
return {
|
|
@@ -6375,27 +6536,27 @@ const DownloadIconButton = styles.styled(IconButton)({
|
|
|
6375
6536
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4122-37223
|
|
6376
6537
|
*
|
|
6377
6538
|
* Figma Props Mapping:
|
|
6378
|
-
* -
|
|
6379
|
-
* -
|
|
6380
|
-
* -
|
|
6381
|
-
* -
|
|
6382
|
-
* -
|
|
6383
|
-
* -
|
|
6384
|
-
*/
|
|
6385
|
-
const NeoToast = ({ variant = 'default', title, message, showClose = true, actions, progress, fileName, onClose, ...props }) => {
|
|
6539
|
+
* - Intent (Neutral|Error|Success|Info|Warning) → variant (default|error|success|info|warning)
|
|
6540
|
+
* - Type (Outlined|Filled) → type ('outlined'|'filled')
|
|
6541
|
+
* - Show header → title (string)
|
|
6542
|
+
* - Show supporting text → message (string)
|
|
6543
|
+
* - Show close icon → showClose (boolean)
|
|
6544
|
+
* - Show actions → actions (ReactNode)
|
|
6545
|
+
*/
|
|
6546
|
+
const NeoToast = ({ variant = 'default', type = 'outlined', title, message, showClose = true, actions, progress, fileName, onClose, ...props }) => {
|
|
6386
6547
|
const isDownloadVariant = variant === 'download';
|
|
6387
|
-
return (jsxRuntime.jsx(StyledAlert, { ...props, variant: variant, showProgress: isDownloadVariant, action: showClose && !isDownloadVariant ? (jsxRuntime.jsx(IconButton, { size: "small", onClick: onClose, sx: { color: neoDesign.semanticColors.icons.placeholder }, children: jsxRuntime.jsx(X, { size: 16 }) })) : undefined, children: isDownloadVariant ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(Stack, { direction: "row", sx: {
|
|
6548
|
+
return (jsxRuntime.jsx(StyledAlert, { ...props, variant: variant, toastType: type, showProgress: isDownloadVariant, action: showClose && !isDownloadVariant ? (jsxRuntime.jsx(IconButton, { size: "small", onClick: onClose, sx: { color: neoDesign.semanticColors.icons.placeholder }, children: jsxRuntime.jsx(X, { size: 16 }) })) : undefined, children: isDownloadVariant ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(Stack, { direction: "row", sx: {
|
|
6388
6549
|
alignItems: 'flex-start',
|
|
6389
6550
|
justifyContent: 'space-between',
|
|
6390
6551
|
width: '100%',
|
|
6391
6552
|
gap: `${neoDesign.spacing.spacing_4}px`,
|
|
6392
|
-
}, children: [title && jsxRuntime.jsx(ToastTitle, { variant: variant, children: title }), showClose && (jsxRuntime.jsxs(DownloadActions, { direction: "row", children: [jsxRuntime.jsx(DownloadIconButton, { size: "small", children: jsxRuntime.jsx(Stack, { sx: { width: 16, height: 16 } }) }), jsxRuntime.jsx(DownloadIconButton, { size: "small", onClick: onClose, children: jsxRuntime.jsx(X, { size: 16 }) })] }))] }), jsxRuntime.jsxs(ProgressSection, { children: [jsxRuntime.jsxs(Stack, { direction: "row", sx: { alignItems: 'flex-end', justifyContent: 'space-between', width: '100%' }, children: [fileName && jsxRuntime.jsx(FileName, { children: fileName }), progress !== undefined && jsxRuntime.jsxs(ProgressLabel, { children: [progress, "%"] })] }), jsxRuntime.jsx(StyledLinearProgress, { variant: "determinate", value: progress ?? 0 })] })] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { 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 })] })) }));
|
|
6553
|
+
}, children: [title && (jsxRuntime.jsx(ToastTitle, { variant: variant, toastType: type, children: title })), showClose && (jsxRuntime.jsxs(DownloadActions, { direction: "row", children: [jsxRuntime.jsx(DownloadIconButton, { size: "small", children: jsxRuntime.jsx(Stack, { sx: { width: 16, height: 16 } }) }), jsxRuntime.jsx(DownloadIconButton, { size: "small", onClick: onClose, children: jsxRuntime.jsx(X, { size: 16 }) })] }))] }), jsxRuntime.jsxs(ProgressSection, { children: [jsxRuntime.jsxs(Stack, { direction: "row", sx: { alignItems: 'flex-end', justifyContent: 'space-between', width: '100%' }, children: [fileName && jsxRuntime.jsx(FileName, { children: fileName }), progress !== undefined && jsxRuntime.jsxs(ProgressLabel, { children: [progress, "%"] })] }), jsxRuntime.jsx(StyledLinearProgress, { variant: "determinate", value: progress ?? 0 })] })] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(Stack, { sx: { gap: `${neoDesign.spacing.spacing_1}px`, width: '100%' }, children: [title && (jsxRuntime.jsx(ToastTitle, { variant: variant, toastType: type, children: title })), message && (jsxRuntime.jsx(ToastMessage, { variant: variant, toastType: type, children: message }))] }), actions && jsxRuntime.jsx(ToastActions, { direction: "row", children: actions })] })) }));
|
|
6393
6554
|
};
|
|
6394
6555
|
/**
|
|
6395
6556
|
* Helper component for creating toast action buttons with proper styling
|
|
6396
6557
|
*/
|
|
6397
|
-
const NeoToastButton = ({ primary, variant = 'default', children, ...props }) => {
|
|
6398
|
-
return (jsxRuntime.jsx(ToastButton, { variant: "text", toastVariant: variant, primary: primary, ...props, children: children }));
|
|
6558
|
+
const NeoToastButton = ({ primary, variant = 'default', type = 'outlined', children, ...props }) => {
|
|
6559
|
+
return (jsxRuntime.jsx(ToastButton, { variant: "text", toastVariant: variant, toastType: type, primary: primary, ...props, children: children }));
|
|
6399
6560
|
};
|
|
6400
6561
|
NeoToast.displayName = 'NeoToast';
|
|
6401
6562
|
NeoToastButton.displayName = 'NeoToastButton';
|
|
@@ -6682,10 +6843,10 @@ const StyledTooltip = styles.styled(Tooltip, {
|
|
|
6682
6843
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4091-26557&t=Bo58EpFmg6ILJtmv-11
|
|
6683
6844
|
*
|
|
6684
6845
|
* Figma Props Mapping:
|
|
6685
|
-
* -
|
|
6686
|
-
* -
|
|
6687
|
-
* -
|
|
6688
|
-
* -
|
|
6846
|
+
* - Theme (Light mode|Dark mode|Brand color) → variant ('light'|'dark'|'brand')
|
|
6847
|
+
* - Placement (None|Bottom left|...|Top center) → arrow (boolean) + placement
|
|
6848
|
+
* - Show description (boolean) → description (string|undefined)
|
|
6849
|
+
* - Text → title (string, literal content)
|
|
6689
6850
|
*
|
|
6690
6851
|
* Design Tokens Used:
|
|
6691
6852
|
* - Light: surfaces.tooltip (#4b5563), typography.tooltip (#ffffff)
|