@moderneinc/neo-styled-components 2.8.0 → 3.0.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 +20 -22
- package/dist/Card/Card.d.ts +32 -0
- package/dist/Checkbox/Checkbox.d.ts +2 -2
- package/dist/CodeSnippet/CodeSnippet.d.ts +4 -4
- package/dist/DownloadToast/DownloadToast.d.ts +47 -0
- package/dist/MarketplaceCard/MarketplaceCard.d.ts +10 -72
- package/dist/MarketplaceLargeCard/MarketplaceLargeCard.d.ts +15 -83
- package/dist/Radio/Radio.d.ts +0 -1
- package/dist/Tag/Tag.d.ts +12 -7
- package/dist/Toast/Toast.d.ts +3 -12
- package/dist/index.d.ts +98 -115
- package/dist/index.esm.js +414 -448
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +431 -463
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -16,6 +16,7 @@ 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');
|
|
19
|
+
var MuiCard = require('@mui/material/Card');
|
|
19
20
|
var Checkbox = require('@mui/material/Checkbox');
|
|
20
21
|
var xDataGridPro = require('@mui/x-data-grid-pro');
|
|
21
22
|
var Button = require('@mui/material/Button');
|
|
@@ -38,23 +39,22 @@ var PickersShortcuts = require('@mui/x-date-pickers/PickersShortcuts');
|
|
|
38
39
|
var DateRangePicker = require('@mui/x-date-pickers-pro/DateRangePicker');
|
|
39
40
|
var DateRangePickerDay = require('@mui/x-date-pickers-pro/DateRangePickerDay');
|
|
40
41
|
var Badge = require('@mui/material/Badge');
|
|
42
|
+
var LinearProgress = require('@mui/material/LinearProgress');
|
|
43
|
+
var Paper = require('@mui/material/Paper');
|
|
44
|
+
var Stack = require('@mui/material/Stack');
|
|
41
45
|
var List = require('@mui/material/List');
|
|
42
46
|
var Menu = require('@mui/material/Menu');
|
|
43
|
-
var Paper = require('@mui/material/Paper');
|
|
44
47
|
var FormControl = require('@mui/material/FormControl');
|
|
45
48
|
var FormHelperText = require('@mui/material/FormHelperText');
|
|
46
49
|
var ListItemButton = require('@mui/material/ListItemButton');
|
|
47
50
|
var ListItemIcon = require('@mui/material/ListItemIcon');
|
|
48
51
|
var ListItemText = require('@mui/material/ListItemText');
|
|
49
52
|
var Typography = require('@mui/material/Typography');
|
|
50
|
-
var MuiCard = require('@mui/material/Card');
|
|
51
53
|
var Dialog = require('@mui/material/Dialog');
|
|
52
54
|
var DialogActions = require('@mui/material/DialogActions');
|
|
53
55
|
var DialogContent = require('@mui/material/DialogContent');
|
|
54
56
|
var Fab = require('@mui/material/Fab');
|
|
55
57
|
var Fade = require('@mui/material/Fade');
|
|
56
|
-
var Stack = require('@mui/material/Stack');
|
|
57
|
-
var LinearProgress = require('@mui/material/LinearProgress');
|
|
58
58
|
var Radio = require('@mui/material/Radio');
|
|
59
59
|
var Skeleton = require('@mui/material/Skeleton');
|
|
60
60
|
var MuiTab = require('@mui/material/Tab');
|
|
@@ -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,23 @@ 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
|
+
|
|
882
|
+
/**
|
|
883
|
+
* @license lucide-react v0.577.0 - ISC
|
|
884
|
+
*
|
|
885
|
+
* This source code is licensed under the ISC license.
|
|
886
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
887
|
+
*/
|
|
888
|
+
|
|
889
|
+
|
|
890
|
+
const __iconNode$5 = [["path", { d: "M5 12h14", key: "1ays0h" }]];
|
|
891
|
+
const Minus = createLucideIcon("minus", __iconNode$5);
|
|
881
892
|
|
|
882
893
|
/**
|
|
883
894
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -957,33 +968,27 @@ const __iconNode = [
|
|
|
957
968
|
];
|
|
958
969
|
const X = createLucideIcon("x", __iconNode);
|
|
959
970
|
|
|
971
|
+
const intentColors = {
|
|
972
|
+
info: neoDesign.semanticColors.status.info,
|
|
973
|
+
success: neoDesign.semanticColors.status.success,
|
|
974
|
+
error: neoDesign.semanticColors.status.error,
|
|
975
|
+
warning: neoDesign.semanticColors.status.warning,
|
|
976
|
+
neutral: neoDesign.semanticColors.status.neutral,
|
|
977
|
+
};
|
|
960
978
|
// biome-ignore lint/suspicious/noExplicitAny: Type cast required to override MUI Alert variant type without global augmentation
|
|
961
979
|
const StyledAlert$2 = styles.styled(Alert, {
|
|
962
|
-
shouldForwardProp: prop => prop !== 'messagePosition' && prop !== '
|
|
963
|
-
})(({
|
|
964
|
-
|
|
965
|
-
const
|
|
966
|
-
|
|
967
|
-
backgroundColor:
|
|
980
|
+
shouldForwardProp: prop => prop !== 'messagePosition' && prop !== 'intent' && prop !== 'bannerType',
|
|
981
|
+
})(({ intent = 'info', bannerType = 'outlined', messagePosition = 'left' }) => {
|
|
982
|
+
const palette = intentColors[intent];
|
|
983
|
+
const typeStyles = bannerType === 'filled'
|
|
984
|
+
? {
|
|
985
|
+
backgroundColor: palette.dark,
|
|
968
986
|
color: neoDesign.semanticColors.surfaces.white,
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
backgroundColor:
|
|
972
|
-
color: neoDesign.colors.grey['800'],
|
|
973
|
-
},
|
|
974
|
-
success: {
|
|
975
|
-
backgroundColor: neoDesign.semanticColors.status.success.light,
|
|
976
|
-
color: neoDesign.colors.grey['800'],
|
|
977
|
-
},
|
|
978
|
-
error: {
|
|
979
|
-
backgroundColor: neoDesign.semanticColors.status.error.light,
|
|
980
|
-
color: neoDesign.colors.grey['800'],
|
|
981
|
-
},
|
|
982
|
-
warning: {
|
|
983
|
-
backgroundColor: neoDesign.semanticColors.status.warning.light,
|
|
987
|
+
}
|
|
988
|
+
: {
|
|
989
|
+
backgroundColor: palette.light,
|
|
984
990
|
color: neoDesign.colors.grey['800'],
|
|
985
|
-
}
|
|
986
|
-
};
|
|
991
|
+
};
|
|
987
992
|
return {
|
|
988
993
|
width: '100%',
|
|
989
994
|
minHeight: 52,
|
|
@@ -997,9 +1002,9 @@ const StyledAlert$2 = styles.styled(Alert, {
|
|
|
997
1002
|
...(messagePosition === 'center' && { position: 'relative' }),
|
|
998
1003
|
boxShadow: `${neoDesign.shadows.neutralSmall.x}px ${neoDesign.shadows.neutralSmall.y}px ${neoDesign.shadows.neutralSmall.blur}px ${neoDesign.shadows.neutralSmall.spread}px ${neoDesign.shadows.neutralSmall.shadow}`,
|
|
999
1004
|
fontSize: neoDesign.typography.fontSize.default,
|
|
1000
|
-
fontWeight: neoDesign.typography.fontWeight.
|
|
1005
|
+
fontWeight: neoDesign.typography.fontWeight.medium,
|
|
1001
1006
|
lineHeight: 1.5,
|
|
1002
|
-
...
|
|
1007
|
+
...typeStyles,
|
|
1003
1008
|
[`& .${Alert.alertClasses.icon}`]: {
|
|
1004
1009
|
padding: 0,
|
|
1005
1010
|
opacity: 1,
|
|
@@ -1022,26 +1027,18 @@ const StyledAlert$2 = styles.styled(Alert, {
|
|
|
1022
1027
|
},
|
|
1023
1028
|
};
|
|
1024
1029
|
});
|
|
1025
|
-
const LinkText = styles.styled('span')(({
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
fontWeight: neoDesign.typography.fontWeight.semiBold,
|
|
1038
|
-
color: getLinkColor(),
|
|
1039
|
-
cursor: 'pointer',
|
|
1040
|
-
'&:hover': {
|
|
1041
|
-
textDecoration: 'underline',
|
|
1042
|
-
},
|
|
1043
|
-
};
|
|
1044
|
-
});
|
|
1030
|
+
const LinkText = styles.styled('span')(({ bannerType = 'outlined' }) => ({
|
|
1031
|
+
marginLeft: 'auto',
|
|
1032
|
+
fontWeight: neoDesign.typography.fontWeight.semiBold,
|
|
1033
|
+
color: bannerType === 'filled'
|
|
1034
|
+
? neoDesign.semanticColors.typography.link.white
|
|
1035
|
+
: neoDesign.semanticColors.typography.link.primary,
|
|
1036
|
+
cursor: 'pointer',
|
|
1037
|
+
whiteSpace: 'nowrap',
|
|
1038
|
+
'&:hover': {
|
|
1039
|
+
textDecoration: 'underline',
|
|
1040
|
+
},
|
|
1041
|
+
}));
|
|
1045
1042
|
const StyledIconButton$1 = styles.styled(IconButton)(({ closeIconColor }) => ({
|
|
1046
1043
|
padding: 0,
|
|
1047
1044
|
color: closeIconColor,
|
|
@@ -1049,35 +1046,17 @@ const StyledIconButton$1 = styles.styled(IconButton)(({ closeIconColor }) => ({
|
|
|
1049
1046
|
backgroundColor: 'transparent',
|
|
1050
1047
|
},
|
|
1051
1048
|
}));
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
* Figma Props Mapping:
|
|
1058
|
-
* - color (Dark|Light|Success|Error|Warning) → variant (dark|light|success|error|warning)
|
|
1059
|
-
* - messagePosition (Left|Center) → messagePosition ("left"|"center")
|
|
1060
|
-
* - closeIcon (boolean) → showClose (boolean)
|
|
1061
|
-
* - link (boolean) → linkText (string)
|
|
1062
|
-
* - {Message} → message (string)
|
|
1063
|
-
*/
|
|
1064
|
-
const NeoBanner = ({ variant = 'light', message, messagePosition = 'left', linkText, showClose = true, icon, onClose, onLinkClick, ...props }) => {
|
|
1065
|
-
const getCloseIconColor = () => {
|
|
1066
|
-
if (variant === 'dark') {
|
|
1067
|
-
return neoDesign.semanticColors.surfaces.white;
|
|
1068
|
-
}
|
|
1069
|
-
if (variant === 'success') {
|
|
1070
|
-
return neoDesign.semanticColors.status.success.default;
|
|
1071
|
-
}
|
|
1072
|
-
if (variant === 'error') {
|
|
1073
|
-
return neoDesign.semanticColors.status.error.default;
|
|
1074
|
-
}
|
|
1075
|
-
if (variant === 'warning') {
|
|
1076
|
-
return neoDesign.semanticColors.status.warning.default;
|
|
1077
|
-
}
|
|
1078
|
-
return neoDesign.colors.grey['800'];
|
|
1049
|
+
const NeoBanner = ({ intent = 'info', type = 'outlined', message, messagePosition = 'left', linkText, showClose = false, icon, onClose, onLinkClick, ...props }) => {
|
|
1050
|
+
const [dismissed, setDismissed] = React.useState(false);
|
|
1051
|
+
const handleClose = () => {
|
|
1052
|
+
setDismissed(true);
|
|
1053
|
+
onClose?.();
|
|
1079
1054
|
};
|
|
1080
|
-
|
|
1055
|
+
if (dismissed) {
|
|
1056
|
+
return null;
|
|
1057
|
+
}
|
|
1058
|
+
const closeIconColor = type === 'filled' ? neoDesign.semanticColors.surfaces.white : intentColors[intent].default;
|
|
1059
|
+
return (jsxRuntime.jsx(StyledAlert$2, { ...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 }))] })) }));
|
|
1081
1060
|
};
|
|
1082
1061
|
NeoBanner.displayName = 'NeoBanner';
|
|
1083
1062
|
|
|
@@ -1529,6 +1508,197 @@ const NeoButtonTabGroup = ({ size = 'medium', exclusive = true, ...props }) => {
|
|
|
1529
1508
|
};
|
|
1530
1509
|
NeoButtonTabGroup.displayName = 'NeoButtonTabGroup';
|
|
1531
1510
|
|
|
1511
|
+
// ─── Shared ──────────────────────────────────────────────────────────────────
|
|
1512
|
+
const activeShadow = `${neoDesign.shadows.card.x}px ${neoDesign.shadows.card.y}px ${neoDesign.shadows.card.blur}px ${neoDesign.shadows.card.spread}px ${neoDesign.shadows.card.shadow}`;
|
|
1513
|
+
// ─── Small card styled components ────────────────────────────────────────────
|
|
1514
|
+
const SmallStyledCard = styles.styled(MuiCard, {
|
|
1515
|
+
shouldForwardProp: prop => prop !== 'selected' && prop !== 'disabled',
|
|
1516
|
+
})(({ theme, selected, disabled }) => ({
|
|
1517
|
+
width: 160,
|
|
1518
|
+
height: 160,
|
|
1519
|
+
padding: theme.spacing(1.5), // 12px
|
|
1520
|
+
display: 'flex',
|
|
1521
|
+
flexDirection: 'column',
|
|
1522
|
+
gap: theme.spacing(2), // 16px
|
|
1523
|
+
backgroundColor: neoDesign.semanticColors.surfaces.card,
|
|
1524
|
+
border: `1px solid ${selected ? neoDesign.semanticColors.buttons.primary.default : neoDesign.semanticColors.border.primary}`,
|
|
1525
|
+
borderRadius: neoDesign.borderRadius.xS,
|
|
1526
|
+
boxShadow: selected ? activeShadow : 'none',
|
|
1527
|
+
transition: theme.transitions.create(['border-color', 'background-color', 'box-shadow']),
|
|
1528
|
+
cursor: 'pointer',
|
|
1529
|
+
'&:hover': {
|
|
1530
|
+
borderColor: neoDesign.semanticColors.buttons.primary.default,
|
|
1531
|
+
boxShadow: activeShadow,
|
|
1532
|
+
},
|
|
1533
|
+
'&:focus-visible': {
|
|
1534
|
+
borderColor: neoDesign.semanticColors.buttons.primary.default,
|
|
1535
|
+
...focusRingStyles,
|
|
1536
|
+
},
|
|
1537
|
+
...(disabled && {
|
|
1538
|
+
opacity: 0.5,
|
|
1539
|
+
pointerEvents: 'none',
|
|
1540
|
+
cursor: 'not-allowed',
|
|
1541
|
+
}),
|
|
1542
|
+
}));
|
|
1543
|
+
const SmallCardHeader = styles.styled('div')({
|
|
1544
|
+
display: 'flex',
|
|
1545
|
+
alignItems: 'flex-start',
|
|
1546
|
+
justifyContent: 'space-between',
|
|
1547
|
+
width: '100%',
|
|
1548
|
+
});
|
|
1549
|
+
const SmallLogoContainer = styles.styled('div')({
|
|
1550
|
+
width: neoDesign.spacing.spacing_6,
|
|
1551
|
+
height: neoDesign.spacing.spacing_6,
|
|
1552
|
+
flexShrink: 0,
|
|
1553
|
+
});
|
|
1554
|
+
const SmallRecipeCount = styles.styled('p')(({ theme }) => ({
|
|
1555
|
+
margin: 0,
|
|
1556
|
+
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.xxs), // 10px
|
|
1557
|
+
fontWeight: neoDesign.typography.fontWeight.semiBold, // 600
|
|
1558
|
+
lineHeight: 1.2,
|
|
1559
|
+
color: neoDesign.colors.grey[800],
|
|
1560
|
+
whiteSpace: 'nowrap',
|
|
1561
|
+
}));
|
|
1562
|
+
const SmallCardContent = styles.styled('div')(({ theme }) => ({
|
|
1563
|
+
display: 'flex',
|
|
1564
|
+
flexDirection: 'column',
|
|
1565
|
+
gap: theme.spacing(2), // 16px
|
|
1566
|
+
width: '100%',
|
|
1567
|
+
}));
|
|
1568
|
+
const SmallTitle = styles.styled('p')(({ theme }) => ({
|
|
1569
|
+
margin: 0,
|
|
1570
|
+
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.h6), // 16px
|
|
1571
|
+
fontWeight: neoDesign.typography.fontWeight.semiBold, // 600
|
|
1572
|
+
lineHeight: 1.4,
|
|
1573
|
+
color: neoDesign.colors.grey[800],
|
|
1574
|
+
width: '100%',
|
|
1575
|
+
}));
|
|
1576
|
+
const SmallDescription = styles.styled('p')(({ theme }) => ({
|
|
1577
|
+
margin: 0,
|
|
1578
|
+
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.xs), // 12px
|
|
1579
|
+
fontWeight: neoDesign.typography.fontWeight.regular, // 400
|
|
1580
|
+
lineHeight: 1.5,
|
|
1581
|
+
color: neoDesign.colors.grey[800],
|
|
1582
|
+
width: '100%',
|
|
1583
|
+
display: '-webkit-box',
|
|
1584
|
+
WebkitLineClamp: 2,
|
|
1585
|
+
WebkitBoxOrient: 'vertical',
|
|
1586
|
+
overflow: 'hidden',
|
|
1587
|
+
textOverflow: 'ellipsis',
|
|
1588
|
+
}));
|
|
1589
|
+
const LargeStyledCard = styles.styled(MuiCard, {
|
|
1590
|
+
shouldForwardProp: prop => prop !== 'disabled' && prop !== 'cardTheme',
|
|
1591
|
+
})(({ disabled = false, cardTheme = 'light' }) => {
|
|
1592
|
+
const isLight = cardTheme === 'light';
|
|
1593
|
+
const activeBorderColor = isLight
|
|
1594
|
+
? neoDesign.semanticColors.buttons.primary.default
|
|
1595
|
+
: neoDesign.colors.digitalGreen[300];
|
|
1596
|
+
const defaultBorderColor = isLight
|
|
1597
|
+
? neoDesign.semanticColors.border.primary
|
|
1598
|
+
: `${neoDesign.semanticColors.border.primary}80`;
|
|
1599
|
+
return {
|
|
1600
|
+
width: 340,
|
|
1601
|
+
height: 162,
|
|
1602
|
+
display: 'flex',
|
|
1603
|
+
flexDirection: 'column',
|
|
1604
|
+
justifyContent: 'space-between',
|
|
1605
|
+
alignItems: 'flex-start',
|
|
1606
|
+
padding: neoDesign.spacing.spacing_2,
|
|
1607
|
+
borderRadius: neoDesign.borderRadius.xS,
|
|
1608
|
+
backgroundColor: isLight ? neoDesign.semanticColors.surfaces.card : neoDesign.colors.grey[800],
|
|
1609
|
+
border: `1px solid ${defaultBorderColor}`,
|
|
1610
|
+
boxShadow: 'none',
|
|
1611
|
+
overflow: 'hidden',
|
|
1612
|
+
cursor: 'pointer',
|
|
1613
|
+
transition: 'border-color 0.2s, box-shadow 0.2s',
|
|
1614
|
+
'&:hover': {
|
|
1615
|
+
borderColor: activeBorderColor,
|
|
1616
|
+
boxShadow: activeShadow,
|
|
1617
|
+
},
|
|
1618
|
+
'&:active': {
|
|
1619
|
+
borderColor: activeBorderColor,
|
|
1620
|
+
boxShadow: activeShadow,
|
|
1621
|
+
},
|
|
1622
|
+
'&:focus-visible': {
|
|
1623
|
+
borderColor: activeBorderColor,
|
|
1624
|
+
...focusRingStyles,
|
|
1625
|
+
},
|
|
1626
|
+
...(disabled && {
|
|
1627
|
+
opacity: 0.5,
|
|
1628
|
+
pointerEvents: 'none',
|
|
1629
|
+
cursor: 'not-allowed',
|
|
1630
|
+
}),
|
|
1631
|
+
};
|
|
1632
|
+
});
|
|
1633
|
+
const LargeTopSection = styles.styled('div')({
|
|
1634
|
+
display: 'flex',
|
|
1635
|
+
flexDirection: 'column',
|
|
1636
|
+
gap: neoDesign.spacing.spacing_2,
|
|
1637
|
+
alignItems: 'flex-start',
|
|
1638
|
+
width: '100%',
|
|
1639
|
+
flexShrink: 0,
|
|
1640
|
+
});
|
|
1641
|
+
const LargeHeaderRow = styles.styled('div')({
|
|
1642
|
+
display: 'flex',
|
|
1643
|
+
gap: neoDesign.spacing.spacing_1,
|
|
1644
|
+
alignItems: 'center',
|
|
1645
|
+
flexShrink: 0,
|
|
1646
|
+
});
|
|
1647
|
+
const LargeHeaderSlot = styles.styled('div')({
|
|
1648
|
+
display: 'flex',
|
|
1649
|
+
flexDirection: 'column',
|
|
1650
|
+
alignItems: 'center',
|
|
1651
|
+
justifyContent: 'center',
|
|
1652
|
+
width: 20,
|
|
1653
|
+
height: 20,
|
|
1654
|
+
flexShrink: 0,
|
|
1655
|
+
});
|
|
1656
|
+
const LargeHeaderTitle = styles.styled('span', {
|
|
1657
|
+
shouldForwardProp: prop => prop !== 'cardTheme',
|
|
1658
|
+
})(({ cardTheme = 'light' }) => ({
|
|
1659
|
+
fontFamily: `${neoDesign.typography.fontFamily.heading}, sans-serif`,
|
|
1660
|
+
fontWeight: neoDesign.typography.fontWeight.semiBold,
|
|
1661
|
+
fontSize: neoDesign.typography.fontSize.h6,
|
|
1662
|
+
lineHeight: 1.4,
|
|
1663
|
+
color: cardTheme === 'light' ? neoDesign.colors.grey[800] : neoDesign.semanticColors.surfaces.white,
|
|
1664
|
+
flexShrink: 0,
|
|
1665
|
+
}));
|
|
1666
|
+
const LargeDescription = styles.styled('p', {
|
|
1667
|
+
shouldForwardProp: prop => prop !== 'cardTheme',
|
|
1668
|
+
})(({ cardTheme = 'light' }) => ({
|
|
1669
|
+
fontFamily: `${neoDesign.typography.fontFamily.body}, sans-serif`,
|
|
1670
|
+
fontWeight: neoDesign.typography.fontWeight.regular,
|
|
1671
|
+
fontSize: neoDesign.typography.fontSize.xs,
|
|
1672
|
+
lineHeight: 1.5,
|
|
1673
|
+
color: cardTheme === 'light' ? neoDesign.colors.grey[800] : neoDesign.semanticColors.surfaces.white,
|
|
1674
|
+
margin: 0,
|
|
1675
|
+
minWidth: '100%',
|
|
1676
|
+
wordWrap: 'break-word',
|
|
1677
|
+
}));
|
|
1678
|
+
const LargeButtonsRow = styles.styled('div')({
|
|
1679
|
+
display: 'flex',
|
|
1680
|
+
gap: neoDesign.spacing.spacing_3,
|
|
1681
|
+
alignItems: 'flex-start',
|
|
1682
|
+
flexShrink: 0,
|
|
1683
|
+
});
|
|
1684
|
+
// ─── Internal implementations ────────────────────────────────────────────────
|
|
1685
|
+
const SmallCardImpl = ({ logo, recipeCount, title, description, selected = false, disabled = false, onClick, ...props }) => {
|
|
1686
|
+
return (jsxRuntime.jsxs(SmallStyledCard, { selected: selected, disabled: disabled, onClick: disabled ? undefined : onClick, tabIndex: disabled ? -1 : 0, role: "button", "aria-disabled": disabled, "aria-pressed": selected, ...props, children: [jsxRuntime.jsxs(SmallCardHeader, { children: [jsxRuntime.jsx(SmallLogoContainer, { children: logo }), jsxRuntime.jsx(SmallRecipeCount, { children: recipeCount })] }), jsxRuntime.jsxs(SmallCardContent, { children: [jsxRuntime.jsx(SmallTitle, { children: title }), jsxRuntime.jsx(SmallDescription, { children: description })] })] }));
|
|
1687
|
+
};
|
|
1688
|
+
const LargeCardImpl = ({ disabled = false, cardTheme = 'light', showIcon = true, showGel = true, showButtons = true, icon, gel, title, children, actions, onClick, ...props }) => {
|
|
1689
|
+
return (jsxRuntime.jsxs(LargeStyledCard, { disabled: disabled, cardTheme: cardTheme, onClick: disabled ? undefined : onClick, tabIndex: disabled ? -1 : 0, "aria-disabled": disabled || undefined, ...props, children: [jsxRuntime.jsxs(LargeTopSection, { children: [jsxRuntime.jsxs(LargeHeaderRow, { children: [showIcon && icon && jsxRuntime.jsx(LargeHeaderSlot, { children: icon }), showGel && gel && jsxRuntime.jsx(LargeHeaderSlot, { children: gel }), title && jsxRuntime.jsx(LargeHeaderTitle, { cardTheme: cardTheme, children: title })] }), children && jsxRuntime.jsx(LargeDescription, { cardTheme: cardTheme, children: children })] }), showButtons && actions && jsxRuntime.jsx(LargeButtonsRow, { children: actions })] }));
|
|
1690
|
+
};
|
|
1691
|
+
// ─── Exported component ──────────────────────────────────────────────────────
|
|
1692
|
+
const NeoCard = (props) => {
|
|
1693
|
+
if (props.size === 'small') {
|
|
1694
|
+
const { size: _, ...rest } = props;
|
|
1695
|
+
return jsxRuntime.jsx(SmallCardImpl, { ...rest });
|
|
1696
|
+
}
|
|
1697
|
+
const { size: _, ...rest } = props;
|
|
1698
|
+
return jsxRuntime.jsx(LargeCardImpl, { ...rest });
|
|
1699
|
+
};
|
|
1700
|
+
NeoCard.displayName = 'NeoCard';
|
|
1701
|
+
|
|
1532
1702
|
// Border radius per size (from Figma)
|
|
1533
1703
|
const borderRadiusConfig = {
|
|
1534
1704
|
xs: 2,
|
|
@@ -1602,6 +1772,7 @@ const StyledCheckbox = styles.styled(Checkbox, {
|
|
|
1602
1772
|
padding: 0,
|
|
1603
1773
|
marginTop: size === 'xs' ? 3 : 2,
|
|
1604
1774
|
color: neoDesign.semanticColors.border.primary,
|
|
1775
|
+
borderRadius: config.borderRadius,
|
|
1605
1776
|
flexShrink: 0,
|
|
1606
1777
|
// Root element
|
|
1607
1778
|
[`&.${Checkbox.checkboxClasses.root}`]: {
|
|
@@ -1652,7 +1823,7 @@ const StyledCheckbox = styles.styled(Checkbox, {
|
|
|
1652
1823
|
/**
|
|
1653
1824
|
* NeoCheckbox - Checkbox component based on MUI Checkbox
|
|
1654
1825
|
*
|
|
1655
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=
|
|
1826
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=11487-81
|
|
1656
1827
|
*
|
|
1657
1828
|
* Figma Props Mapping:
|
|
1658
1829
|
* - Checked (True|False) → checked prop
|
|
@@ -1808,9 +1979,9 @@ const IconWrapper$2 = styles.styled('span')(({ theme, isMultiline }) => ({
|
|
|
1808
1979
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4187-30353
|
|
1809
1980
|
*
|
|
1810
1981
|
* Figma Props Mapping:
|
|
1811
|
-
* -
|
|
1812
|
-
* -
|
|
1813
|
-
* -
|
|
1982
|
+
* - Theme (Dark|Light) → variant (filled|outlined)
|
|
1983
|
+
* - Content (Multi|Inline) → size prop + auto-detected multiline
|
|
1984
|
+
* - Show icon → endIcon (ReactNode, unmappable: boolean vs ReactNode)
|
|
1814
1985
|
* - Text content → children prop
|
|
1815
1986
|
*/
|
|
1816
1987
|
const NeoCodeSnippet = ({ variant = 'outlined', size = 'small', endIcon, children, ...props }) => {
|
|
@@ -2678,9 +2849,9 @@ const StyledChip$1 = styles.styled(Chip)(({ theme, size, variant, color }) => ({
|
|
|
2678
2849
|
* - state (Neutral|Error|Warning|Success|Info|Violet|Beta) → color (default|error|warning|success|info|violet|beta)
|
|
2679
2850
|
* - Label text → label prop
|
|
2680
2851
|
*/
|
|
2681
|
-
|
|
2852
|
+
function NeoTag({ size = 'small', variant = 'outlined', ...props }) {
|
|
2682
2853
|
return jsxRuntime.jsx(StyledChip$1, { size: size, variant: variant, ...props });
|
|
2683
|
-
}
|
|
2854
|
+
}
|
|
2684
2855
|
NeoTag.displayName = 'NeoTag';
|
|
2685
2856
|
|
|
2686
2857
|
/**
|
|
@@ -3640,23 +3811,101 @@ const NeoDot = ({ size = 'medium', variant = 'solid', color = 'neutral', ...prop
|
|
|
3640
3811
|
};
|
|
3641
3812
|
NeoDot.displayName = 'NeoDot';
|
|
3642
3813
|
|
|
3643
|
-
const
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3814
|
+
const StyledRoot$1 = styles.styled(Paper)({
|
|
3815
|
+
padding: neoDesign.spacing.spacing_2,
|
|
3816
|
+
borderRadius: neoDesign.borderRadius.s,
|
|
3817
|
+
backgroundColor: neoDesign.semanticColors.surfaces.snackbarDarkMode,
|
|
3818
|
+
color: neoDesign.colors.grey['800'],
|
|
3819
|
+
border: `1px solid ${neoDesign.semanticColors.border.primary}`,
|
|
3820
|
+
display: 'flex',
|
|
3821
|
+
flexDirection: 'column',
|
|
3822
|
+
gap: neoDesign.spacing.spacing_3,
|
|
3823
|
+
});
|
|
3824
|
+
const Title = styles.styled('p')(({ theme }) => ({
|
|
3825
|
+
margin: 0,
|
|
3826
|
+
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.sm),
|
|
3827
|
+
fontWeight: neoDesign.typography.fontWeight.semiBold,
|
|
3828
|
+
lineHeight: 1.4,
|
|
3829
|
+
color: neoDesign.colors.grey['700'],
|
|
3830
|
+
}));
|
|
3831
|
+
const FileName = styles.styled('p')(({ theme }) => ({
|
|
3832
|
+
margin: 0,
|
|
3833
|
+
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.xs),
|
|
3834
|
+
fontWeight: neoDesign.typography.fontWeight.medium,
|
|
3835
|
+
lineHeight: 1.5,
|
|
3836
|
+
color: neoDesign.colors.grey['800'],
|
|
3837
|
+
overflow: 'hidden',
|
|
3838
|
+
textOverflow: 'ellipsis',
|
|
3839
|
+
whiteSpace: 'nowrap',
|
|
3840
|
+
minWidth: 0,
|
|
3841
|
+
}));
|
|
3842
|
+
const ProgressLabel$1 = styles.styled('p')(({ theme }) => ({
|
|
3843
|
+
margin: 0,
|
|
3844
|
+
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.xs),
|
|
3845
|
+
fontWeight: neoDesign.typography.fontWeight.medium,
|
|
3846
|
+
lineHeight: 1.5,
|
|
3847
|
+
color: neoDesign.colors.grey['800'],
|
|
3848
|
+
flexShrink: 0,
|
|
3849
|
+
}));
|
|
3850
|
+
const StyledLinearProgress$1 = styles.styled(LinearProgress)({
|
|
3851
|
+
width: '100%',
|
|
3852
|
+
height: neoDesign.spacing.spacing_1,
|
|
3853
|
+
borderRadius: neoDesign.borderRadius.s,
|
|
3854
|
+
backgroundColor: neoDesign.colors.grey['200'],
|
|
3855
|
+
[`& .${LinearProgress.linearProgressClasses.bar}`]: {
|
|
3856
|
+
backgroundColor: neoDesign.semanticColors.buttons.primary.default,
|
|
3857
|
+
borderRadius: `${neoDesign.borderRadius.xS}px 0 0 ${neoDesign.borderRadius.xS}px`,
|
|
3858
|
+
},
|
|
3859
|
+
});
|
|
3860
|
+
const ActionButton = styles.styled(IconButton)({
|
|
3861
|
+
padding: 0,
|
|
3862
|
+
width: neoDesign.spacing.spacing_2,
|
|
3863
|
+
height: neoDesign.spacing.spacing_2,
|
|
3864
|
+
color: neoDesign.colors.grey['500'],
|
|
3865
|
+
'&:hover': {
|
|
3866
|
+
backgroundColor: 'transparent',
|
|
3867
|
+
},
|
|
3868
|
+
});
|
|
3869
|
+
/**
|
|
3870
|
+
* NeoDownloadToast - Standalone download progress toast notification
|
|
3871
|
+
*
|
|
3872
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=3377-26954
|
|
3873
|
+
*/
|
|
3874
|
+
const NeoDownloadToast = ({ title, fileName, progress, showClose = true, showPause = true, onClose, onPause, actions, ...props }) => {
|
|
3875
|
+
const renderActions = () => {
|
|
3876
|
+
if (actions)
|
|
3877
|
+
return actions;
|
|
3878
|
+
const hasActions = showPause || showClose;
|
|
3879
|
+
if (!hasActions)
|
|
3880
|
+
return null;
|
|
3881
|
+
return (jsxRuntime.jsxs(Stack, { direction: "row", gap: `${neoDesign.spacing.spacing_2}px`, sx: { alignItems: 'center' }, children: [showPause && (jsxRuntime.jsx(ActionButton, { size: "small", onClick: onPause, "aria-label": "Pause download", children: jsxRuntime.jsx(Minus, { size: neoDesign.spacing.spacing_2 }) })), showClose && (jsxRuntime.jsx(ActionButton, { size: "small", onClick: onClose, "aria-label": "Close", children: jsxRuntime.jsx(X, { size: neoDesign.spacing.spacing_2 }) }))] }));
|
|
3882
|
+
};
|
|
3883
|
+
return (jsxRuntime.jsxs(StyledRoot$1, { elevation: 0, role: "status", ...props, children: [jsxRuntime.jsxs(Stack, { direction: "row", sx: {
|
|
3884
|
+
alignItems: 'flex-start',
|
|
3885
|
+
justifyContent: 'space-between',
|
|
3886
|
+
width: '100%',
|
|
3887
|
+
gap: `${neoDesign.spacing.spacing_4}px`,
|
|
3888
|
+
}, children: [title && jsxRuntime.jsx(Title, { children: title }), renderActions()] }), jsxRuntime.jsxs(Stack, { gap: `${neoDesign.spacing.spacing_1}px`, sx: { width: '100%' }, children: [jsxRuntime.jsxs(Stack, { direction: "row", gap: `${neoDesign.spacing.spacing_2}px`, sx: { alignItems: 'flex-end', justifyContent: 'space-between', width: '100%' }, children: [fileName && jsxRuntime.jsx(FileName, { children: fileName }), progress !== undefined && jsxRuntime.jsxs(ProgressLabel$1, { children: [progress, "%"] })] }), jsxRuntime.jsx(StyledLinearProgress$1, { variant: "determinate", value: progress ?? 0 })] })] }));
|
|
3889
|
+
};
|
|
3890
|
+
NeoDownloadToast.displayName = 'NeoDownloadToast';
|
|
3891
|
+
|
|
3892
|
+
const StyledMenu = styles.styled(Menu)(({ theme }) => ({
|
|
3893
|
+
[`& .${Paper.paperClasses.root}`]: {
|
|
3894
|
+
backgroundColor: neoDesign.semanticColors.surfaces.white,
|
|
3895
|
+
borderRadius: neoDesign.borderRadius.s,
|
|
3896
|
+
border: `1px solid ${neoDesign.semanticColors.border.primary}`,
|
|
3897
|
+
boxShadow: `${neoDesign.shadows.dropdown.x}px ${neoDesign.shadows.dropdown.y}px ${neoDesign.shadows.dropdown.blur}px ${neoDesign.shadows.dropdown.spread}px ${neoDesign.shadows.dropdown.shadow}`,
|
|
3898
|
+
minWidth: 200,
|
|
3899
|
+
marginTop: theme.spacing(1),
|
|
3900
|
+
paddingTop: theme.spacing(1),
|
|
3901
|
+
paddingBottom: theme.spacing(1),
|
|
3902
|
+
},
|
|
3903
|
+
[`& .${List.listClasses.root}`]: {
|
|
3904
|
+
padding: 0,
|
|
3905
|
+
},
|
|
3906
|
+
}));
|
|
3907
|
+
/**
|
|
3908
|
+
* NeoDropdownMenu - Dropdown menu component based on MUI Menu
|
|
3660
3909
|
*
|
|
3661
3910
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=11141-4980
|
|
3662
3911
|
*
|
|
@@ -4247,7 +4496,7 @@ const InfoIconWrapper = styles.styled('span')({
|
|
|
4247
4496
|
});
|
|
4248
4497
|
const StyledInputBase = styles.styled(InputBase, {
|
|
4249
4498
|
shouldForwardProp: prop => prop !== 'size' && prop !== 'destructive',
|
|
4250
|
-
})(({ theme, size = 'medium', destructive, startAdornment }) => {
|
|
4499
|
+
})(({ theme, size = 'medium', destructive, startAdornment, multiline }) => {
|
|
4251
4500
|
const sizeConfig = {
|
|
4252
4501
|
small: {
|
|
4253
4502
|
height: neoDesign.spacing.spacing_5,
|
|
@@ -4264,7 +4513,7 @@ const StyledInputBase = styles.styled(InputBase, {
|
|
|
4264
4513
|
};
|
|
4265
4514
|
const sizeStyles = sizeConfig[size];
|
|
4266
4515
|
return {
|
|
4267
|
-
height: sizeStyles.height,
|
|
4516
|
+
height: multiline ? 'auto' : sizeStyles.height,
|
|
4268
4517
|
fontSize: sizeStyles.fontSize,
|
|
4269
4518
|
borderRadius: sizeStyles.borderRadius,
|
|
4270
4519
|
backgroundColor: neoDesign.semanticColors.input.background,
|
|
@@ -4734,271 +4983,36 @@ const NeoListItemButton = ({ children, selected = false, disabled = false, ...pr
|
|
|
4734
4983
|
NeoListItemButton.displayName = 'NeoListItemButton';
|
|
4735
4984
|
|
|
4736
4985
|
/**
|
|
4737
|
-
*
|
|
4738
|
-
*/
|
|
4739
|
-
const activeShadow$1 = `${neoDesign.shadows.card.x}px ${neoDesign.shadows.card.y}px ${neoDesign.shadows.card.blur}px ${neoDesign.shadows.card.spread}px ${neoDesign.shadows.card.shadow}`;
|
|
4740
|
-
/**
|
|
4741
|
-
* Styled Card component with Neo design tokens
|
|
4742
|
-
*/
|
|
4743
|
-
const StyledCard = styles.styled(MuiCard, {
|
|
4744
|
-
shouldForwardProp: prop => prop !== 'selected' && prop !== 'disabled',
|
|
4745
|
-
})(({ theme, selected, disabled }) => ({
|
|
4746
|
-
width: 160,
|
|
4747
|
-
height: 160,
|
|
4748
|
-
padding: theme.spacing(1.5), // 12px
|
|
4749
|
-
display: 'flex',
|
|
4750
|
-
flexDirection: 'column',
|
|
4751
|
-
gap: theme.spacing(2), // 16px
|
|
4752
|
-
backgroundColor: neoDesign.semanticColors.surfaces.card,
|
|
4753
|
-
border: `1px solid ${selected ? neoDesign.semanticColors.buttons.primary.default : neoDesign.semanticColors.border.primary}`,
|
|
4754
|
-
borderRadius: neoDesign.borderRadius.xS,
|
|
4755
|
-
boxShadow: selected ? activeShadow$1 : 'none',
|
|
4756
|
-
transition: theme.transitions.create(['border-color', 'background-color', 'box-shadow']),
|
|
4757
|
-
cursor: 'pointer',
|
|
4758
|
-
'&:hover': {
|
|
4759
|
-
borderColor: neoDesign.semanticColors.buttons.primary.default,
|
|
4760
|
-
boxShadow: activeShadow$1,
|
|
4761
|
-
},
|
|
4762
|
-
'&:focus-visible': {
|
|
4763
|
-
borderColor: neoDesign.semanticColors.buttons.primary.default,
|
|
4764
|
-
...focusRingStyles,
|
|
4765
|
-
},
|
|
4766
|
-
...(disabled && {
|
|
4767
|
-
opacity: 0.5,
|
|
4768
|
-
pointerEvents: 'none',
|
|
4769
|
-
cursor: 'not-allowed',
|
|
4770
|
-
}),
|
|
4771
|
-
}));
|
|
4772
|
-
/**
|
|
4773
|
-
* Header section containing logo and recipe count
|
|
4774
|
-
*/
|
|
4775
|
-
const CardHeader = styles.styled('div')({
|
|
4776
|
-
display: 'flex',
|
|
4777
|
-
alignItems: 'flex-start',
|
|
4778
|
-
justifyContent: 'space-between',
|
|
4779
|
-
width: '100%',
|
|
4780
|
-
});
|
|
4781
|
-
/**
|
|
4782
|
-
* Logo container
|
|
4783
|
-
*/
|
|
4784
|
-
const LogoContainer = styles.styled('div')({
|
|
4785
|
-
width: neoDesign.spacing.spacing_6,
|
|
4786
|
-
height: neoDesign.spacing.spacing_6,
|
|
4787
|
-
flexShrink: 0,
|
|
4788
|
-
});
|
|
4789
|
-
/**
|
|
4790
|
-
* Recipe count badge
|
|
4791
|
-
*/
|
|
4792
|
-
const RecipeCount = styles.styled('p')(({ theme }) => ({
|
|
4793
|
-
margin: 0,
|
|
4794
|
-
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.xxs), // 10px
|
|
4795
|
-
fontWeight: neoDesign.typography.fontWeight.semiBold, // 600
|
|
4796
|
-
lineHeight: 1.2,
|
|
4797
|
-
color: neoDesign.colors.grey[800],
|
|
4798
|
-
whiteSpace: 'nowrap',
|
|
4799
|
-
}));
|
|
4800
|
-
/**
|
|
4801
|
-
* Content section containing title and description
|
|
4802
|
-
*/
|
|
4803
|
-
const CardContent = styles.styled('div')(({ theme }) => ({
|
|
4804
|
-
display: 'flex',
|
|
4805
|
-
flexDirection: 'column',
|
|
4806
|
-
gap: theme.spacing(2), // 16px
|
|
4807
|
-
width: '100%',
|
|
4808
|
-
}));
|
|
4809
|
-
/**
|
|
4810
|
-
* Title text
|
|
4811
|
-
*/
|
|
4812
|
-
const Title = styles.styled('p')(({ theme }) => ({
|
|
4813
|
-
margin: 0,
|
|
4814
|
-
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.h6), // 16px
|
|
4815
|
-
fontWeight: neoDesign.typography.fontWeight.semiBold, // 600
|
|
4816
|
-
lineHeight: 1.4,
|
|
4817
|
-
color: neoDesign.colors.grey[800],
|
|
4818
|
-
width: '100%',
|
|
4819
|
-
}));
|
|
4820
|
-
/**
|
|
4821
|
-
* Description text
|
|
4822
|
-
*/
|
|
4823
|
-
const Description$1 = styles.styled('p')(({ theme }) => ({
|
|
4824
|
-
margin: 0,
|
|
4825
|
-
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.xs), // 12px
|
|
4826
|
-
fontWeight: neoDesign.typography.fontWeight.regular, // 400
|
|
4827
|
-
lineHeight: 1.5,
|
|
4828
|
-
color: neoDesign.colors.grey[800],
|
|
4829
|
-
width: '100%',
|
|
4830
|
-
display: '-webkit-box',
|
|
4831
|
-
WebkitLineClamp: 2,
|
|
4832
|
-
WebkitBoxOrient: 'vertical',
|
|
4833
|
-
overflow: 'hidden',
|
|
4834
|
-
textOverflow: 'ellipsis',
|
|
4835
|
-
}));
|
|
4836
|
-
/**
|
|
4837
|
-
* NeoMarketplaceCard - Selectable card component for marketplace items
|
|
4838
|
-
*
|
|
4839
|
-
* A fixed-size card (160x160px) displaying a logo, recipe count, title, and description.
|
|
4840
|
-
* Supports selected (active), disabled, and focused states.
|
|
4986
|
+
* @deprecated Use `NeoCard` with `size="small"` instead.
|
|
4841
4987
|
*
|
|
4842
4988
|
* @example
|
|
4843
4989
|
* ```tsx
|
|
4844
|
-
*
|
|
4845
|
-
*
|
|
4846
|
-
* recipeCount="1,260 recipes"
|
|
4847
|
-
* title="Java"
|
|
4848
|
-
* description="Basic building blocks for transforming Java..."
|
|
4849
|
-
* selected={false}
|
|
4850
|
-
* disabled={false}
|
|
4851
|
-
* onClick={() => console.log('clicked')}
|
|
4852
|
-
* />
|
|
4853
|
-
* ```
|
|
4990
|
+
* // Before
|
|
4991
|
+
* <NeoMarketplaceCard logo={...} title="Java" ... />
|
|
4854
4992
|
*
|
|
4855
|
-
*
|
|
4856
|
-
*
|
|
4857
|
-
*
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
* - State="Hover" → CSS :hover state (not a prop)
|
|
4862
|
-
* - State="Default" → Base state (no props)
|
|
4863
|
-
*
|
|
4864
|
-
* Design Tokens Used:
|
|
4865
|
-
* - semanticColors.surfaces.card (#FFFFFF) - Default card background
|
|
4866
|
-
* - semanticColors.status.info.light (#f2f3ff) - Active/focused card background
|
|
4867
|
-
* - semanticColors.border.primary (#d1d5db) - Default border
|
|
4868
|
-
* - semanticColors.buttons.primary.default (#2f42ff) - Active/focused border
|
|
4869
|
-
* - shadows.focusWhite1 - Inner white focus ring (2px spread)
|
|
4870
|
-
* - shadows.focusBlue2 - Outer blue focus ring (4px spread)
|
|
4871
|
-
* - colors.grey[800] (#1F2937) - Text color
|
|
4872
|
-
* - typography.fontSize.xxs (10px) - Recipe count
|
|
4873
|
-
* - typography.fontSize.xs (12px) - Description
|
|
4874
|
-
* - typography.fontSize.h6 (16px) - Title
|
|
4875
|
-
* - typography.fontWeight.semiBold (600) - Title and recipe count
|
|
4876
|
-
* - typography.fontWeight.regular (400) - Description
|
|
4877
|
-
*/
|
|
4878
|
-
const NeoMarketplaceCard = ({ logo, recipeCount, title, description, selected = false, disabled = false, onClick, ...props }) => {
|
|
4879
|
-
return (jsxRuntime.jsxs(StyledCard, { selected: selected, disabled: disabled, onClick: disabled ? undefined : onClick, tabIndex: disabled ? -1 : 0, role: "button", "aria-disabled": disabled, "aria-pressed": selected, ...props, children: [jsxRuntime.jsxs(CardHeader, { children: [jsxRuntime.jsx(LogoContainer, { children: logo }), jsxRuntime.jsx(RecipeCount, { children: recipeCount })] }), jsxRuntime.jsxs(CardContent, { children: [jsxRuntime.jsx(Title, { children: title }), jsxRuntime.jsx(Description$1, { children: description })] })] }));
|
|
4993
|
+
* // After
|
|
4994
|
+
* <NeoCard size="small" logo={...} title="Java" ... />
|
|
4995
|
+
* ```
|
|
4996
|
+
*/
|
|
4997
|
+
const NeoMarketplaceCard = (props) => {
|
|
4998
|
+
return jsxRuntime.jsx(NeoCard, { size: "small", ...props });
|
|
4880
4999
|
};
|
|
4881
5000
|
NeoMarketplaceCard.displayName = 'NeoMarketplaceCard';
|
|
4882
5001
|
|
|
4883
|
-
const activeShadow = `${neoDesign.shadows.card.x}px ${neoDesign.shadows.card.y}px ${neoDesign.shadows.card.blur}px ${neoDesign.shadows.card.spread}px ${neoDesign.shadows.card.shadow}`;
|
|
4884
|
-
const StyledLargeCard = styles.styled(MuiCard, {
|
|
4885
|
-
shouldForwardProp: prop => prop !== 'cardState' && prop !== 'cardTheme',
|
|
4886
|
-
})(({ cardState = 'default', cardTheme = 'light' }) => {
|
|
4887
|
-
const isLight = cardTheme === 'light';
|
|
4888
|
-
const isActive = cardState === 'active';
|
|
4889
|
-
const isDisabled = cardState === 'disabled';
|
|
4890
|
-
const isFocused = cardState === 'focused';
|
|
4891
|
-
const activeBorderColor = isLight
|
|
4892
|
-
? neoDesign.semanticColors.buttons.primary.default
|
|
4893
|
-
: neoDesign.colors.digitalGreen[300];
|
|
4894
|
-
const defaultBorderColor = isLight
|
|
4895
|
-
? neoDesign.semanticColors.border.primary
|
|
4896
|
-
: `${neoDesign.semanticColors.border.primary}80`;
|
|
4897
|
-
return {
|
|
4898
|
-
width: 340,
|
|
4899
|
-
height: 162,
|
|
4900
|
-
display: 'flex',
|
|
4901
|
-
flexDirection: 'column',
|
|
4902
|
-
justifyContent: 'space-between',
|
|
4903
|
-
alignItems: 'flex-start',
|
|
4904
|
-
padding: neoDesign.spacing.spacing_2,
|
|
4905
|
-
borderRadius: neoDesign.borderRadius.xS,
|
|
4906
|
-
backgroundColor: isLight ? neoDesign.semanticColors.surfaces.card : neoDesign.colors.grey[800],
|
|
4907
|
-
border: `1px solid ${isActive || isFocused ? activeBorderColor : defaultBorderColor}`,
|
|
4908
|
-
boxShadow: isActive ? activeShadow : 'none',
|
|
4909
|
-
overflow: 'hidden',
|
|
4910
|
-
...(isFocused && focusRingStyles),
|
|
4911
|
-
'&:focus-visible': {
|
|
4912
|
-
borderColor: isLight ? neoDesign.semanticColors.buttons.primary.default : neoDesign.colors.digitalGreen[300],
|
|
4913
|
-
...focusRingStyles,
|
|
4914
|
-
},
|
|
4915
|
-
...(isDisabled && {
|
|
4916
|
-
opacity: 0.5,
|
|
4917
|
-
pointerEvents: 'none',
|
|
4918
|
-
cursor: 'not-allowed',
|
|
4919
|
-
}),
|
|
4920
|
-
};
|
|
4921
|
-
});
|
|
4922
|
-
const TopSection = styles.styled('div')({
|
|
4923
|
-
display: 'flex',
|
|
4924
|
-
flexDirection: 'column',
|
|
4925
|
-
gap: neoDesign.spacing.spacing_2,
|
|
4926
|
-
alignItems: 'flex-start',
|
|
4927
|
-
width: '100%',
|
|
4928
|
-
flexShrink: 0,
|
|
4929
|
-
});
|
|
4930
|
-
const HeaderRow = styles.styled('div')({
|
|
4931
|
-
display: 'flex',
|
|
4932
|
-
gap: neoDesign.spacing.spacing_1,
|
|
4933
|
-
alignItems: 'center',
|
|
4934
|
-
flexShrink: 0,
|
|
4935
|
-
});
|
|
4936
|
-
const HeaderSlot = styles.styled('div')({
|
|
4937
|
-
display: 'flex',
|
|
4938
|
-
flexDirection: 'column',
|
|
4939
|
-
alignItems: 'center',
|
|
4940
|
-
justifyContent: 'center',
|
|
4941
|
-
width: 20,
|
|
4942
|
-
height: 20,
|
|
4943
|
-
flexShrink: 0,
|
|
4944
|
-
});
|
|
4945
|
-
const HeaderTitle = styles.styled('span', {
|
|
4946
|
-
shouldForwardProp: prop => prop !== 'cardTheme',
|
|
4947
|
-
})(({ cardTheme = 'light' }) => ({
|
|
4948
|
-
fontFamily: `${neoDesign.typography.fontFamily.heading}, sans-serif`,
|
|
4949
|
-
fontWeight: neoDesign.typography.fontWeight.semiBold,
|
|
4950
|
-
fontSize: neoDesign.typography.fontSize.h6,
|
|
4951
|
-
lineHeight: 1.4,
|
|
4952
|
-
color: cardTheme === 'light' ? neoDesign.colors.grey[800] : neoDesign.semanticColors.surfaces.white,
|
|
4953
|
-
flexShrink: 0,
|
|
4954
|
-
}));
|
|
4955
|
-
const Description = styles.styled('p', {
|
|
4956
|
-
shouldForwardProp: prop => prop !== 'cardTheme',
|
|
4957
|
-
})(({ cardTheme = 'light' }) => ({
|
|
4958
|
-
fontFamily: `${neoDesign.typography.fontFamily.body}, sans-serif`,
|
|
4959
|
-
fontWeight: neoDesign.typography.fontWeight.regular,
|
|
4960
|
-
fontSize: neoDesign.typography.fontSize.xs,
|
|
4961
|
-
lineHeight: 1.5,
|
|
4962
|
-
color: cardTheme === 'light' ? neoDesign.colors.grey[800] : neoDesign.semanticColors.surfaces.white,
|
|
4963
|
-
margin: 0,
|
|
4964
|
-
minWidth: '100%',
|
|
4965
|
-
wordWrap: 'break-word',
|
|
4966
|
-
}));
|
|
4967
|
-
const ButtonsRow = styles.styled('div')({
|
|
4968
|
-
display: 'flex',
|
|
4969
|
-
gap: neoDesign.spacing.spacing_3,
|
|
4970
|
-
alignItems: 'flex-start',
|
|
4971
|
-
flexShrink: 0,
|
|
4972
|
-
});
|
|
4973
5002
|
/**
|
|
4974
|
-
*
|
|
4975
|
-
*
|
|
4976
|
-
* A 340x162px card with optional icon, gel brand icon, title, description, and action buttons.
|
|
4977
|
-
* Icon, gel, and title display inline in a header row.
|
|
4978
|
-
* Supports 4 states (default, active, disabled, focused) and 2 themes (light, dark).
|
|
5003
|
+
* @deprecated Use `NeoCard` with `size="large"` instead.
|
|
4979
5004
|
*
|
|
4980
|
-
* @
|
|
4981
|
-
*
|
|
4982
|
-
*
|
|
4983
|
-
*
|
|
4984
|
-
* - Theme → cardTheme (Dark/Light)
|
|
4985
|
-
* - Show Icon → showIcon
|
|
4986
|
-
* - Show Gel → showGel
|
|
4987
|
-
* - Show Buttons → showButtons
|
|
5005
|
+
* @example
|
|
5006
|
+
* ```tsx
|
|
5007
|
+
* // Before
|
|
5008
|
+
* <NeoMarketplaceLargeCard cardTheme="light" ... />
|
|
4988
5009
|
*
|
|
4989
|
-
*
|
|
4990
|
-
*
|
|
4991
|
-
*
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
* - borderRadius.xS (4px) - Corner radius
|
|
4996
|
-
* - shadows.focusWhite1 + shadows.focusBlue2 - Focus ring
|
|
4997
|
-
* - shadows.card - Active state shadow
|
|
4998
|
-
*/
|
|
4999
|
-
const NeoMarketplaceLargeCard = ({ state = 'default', cardTheme = 'light', showIcon = true, showGel = true, showButtons = true, icon, gel, title, children, actions, onClick, ...props }) => {
|
|
5000
|
-
const isDisabled = state === 'disabled';
|
|
5001
|
-
return (jsxRuntime.jsxs(StyledLargeCard, { cardState: state, cardTheme: cardTheme, onClick: isDisabled ? undefined : onClick, tabIndex: isDisabled ? -1 : 0, "aria-disabled": isDisabled || undefined, ...props, children: [jsxRuntime.jsxs(TopSection, { children: [jsxRuntime.jsxs(HeaderRow, { children: [showIcon && icon && jsxRuntime.jsx(HeaderSlot, { children: icon }), showGel && gel && jsxRuntime.jsx(HeaderSlot, { children: gel }), title && jsxRuntime.jsx(HeaderTitle, { cardTheme: cardTheme, children: title })] }), children && jsxRuntime.jsx(Description, { cardTheme: cardTheme, children: children })] }), showButtons && actions && jsxRuntime.jsx(ButtonsRow, { children: actions })] }));
|
|
5010
|
+
* // After
|
|
5011
|
+
* <NeoCard size="large" cardTheme="light" ... />
|
|
5012
|
+
* ```
|
|
5013
|
+
*/
|
|
5014
|
+
const NeoMarketplaceLargeCard = (props) => {
|
|
5015
|
+
return jsxRuntime.jsx(NeoCard, { size: "large", ...props });
|
|
5002
5016
|
};
|
|
5003
5017
|
NeoMarketplaceLargeCard.displayName = 'NeoMarketplaceLargeCard';
|
|
5004
5018
|
|
|
@@ -5225,15 +5239,14 @@ const StyledRoot = styles.styled(ButtonBase, {
|
|
|
5225
5239
|
})(({ selected }) => ({
|
|
5226
5240
|
display: 'flex',
|
|
5227
5241
|
flexDirection: 'column',
|
|
5228
|
-
gap: neoDesign.spacing.
|
|
5242
|
+
gap: neoDesign.spacing.spacing_1_2, // 4px
|
|
5229
5243
|
alignItems: 'center',
|
|
5230
5244
|
justifyContent: 'center',
|
|
5231
5245
|
paddingTop: neoDesign.spacing.spacing_1, // 8px
|
|
5232
5246
|
paddingBottom: neoDesign.spacing.spacing_1, // 8px
|
|
5233
5247
|
paddingLeft: neoDesign.spacing.spacing_1_2, // 4px
|
|
5234
5248
|
paddingRight: neoDesign.spacing.spacing_1_2, // 4px
|
|
5235
|
-
borderRadius: neoDesign.borderRadius.
|
|
5236
|
-
width: 95,
|
|
5249
|
+
borderRadius: neoDesign.borderRadius.s, // 8px
|
|
5237
5250
|
cursor: 'pointer',
|
|
5238
5251
|
textDecoration: 'none',
|
|
5239
5252
|
'&:hover .neo-nav-icon-padding': {
|
|
@@ -5279,7 +5292,7 @@ const IconPadding = styles.styled('span')({
|
|
|
5279
5292
|
display: 'flex',
|
|
5280
5293
|
alignItems: 'center',
|
|
5281
5294
|
padding: neoDesign.spacing.spacing_1, // 8px
|
|
5282
|
-
borderRadius: neoDesign.
|
|
5295
|
+
borderRadius: neoDesign.borderRadius.s, // 8px
|
|
5283
5296
|
border: '1px solid transparent',
|
|
5284
5297
|
transition: 'background-color 150ms, border-color 150ms',
|
|
5285
5298
|
});
|
|
@@ -5539,7 +5552,7 @@ function NeoPaginatedGrid({ slots, pageSizeOptions, slotProps: userSlotProps, ..
|
|
|
5539
5552
|
}
|
|
5540
5553
|
NeoPaginatedGrid.displayName = 'NeoPaginatedGrid';
|
|
5541
5554
|
|
|
5542
|
-
const StyledLinearProgress
|
|
5555
|
+
const StyledLinearProgress = styles.styled(LinearProgress, {
|
|
5543
5556
|
shouldForwardProp: prop => prop !== 'labelPosition',
|
|
5544
5557
|
})(() => ({
|
|
5545
5558
|
height: 8,
|
|
@@ -5584,7 +5597,7 @@ const ProgressWrapper = styles.styled('div')(({ labelPosition }) => ({
|
|
|
5584
5597
|
flexDirection: 'row',
|
|
5585
5598
|
}),
|
|
5586
5599
|
}));
|
|
5587
|
-
const ProgressLabel
|
|
5600
|
+
const ProgressLabel = styles.styled(Typography)(({ theme }) => ({
|
|
5588
5601
|
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.sm),
|
|
5589
5602
|
fontWeight: neoDesign.typography.fontWeight.medium,
|
|
5590
5603
|
color: neoDesign.colors.grey[800],
|
|
@@ -5613,7 +5626,7 @@ const ProgressBarContainer = styles.styled('div')(({ labelPosition }) => ({
|
|
|
5613
5626
|
const NeoProgressbar = ({ value = 0, labelPosition = 'none', variant = 'default', labelText, ...props }) => {
|
|
5614
5627
|
const showLabel = labelPosition !== 'none';
|
|
5615
5628
|
const displayLabel = labelText || (variant === 'cancelled' ? 'Canceled' : `${Math.round(value)}%`);
|
|
5616
|
-
return (jsxRuntime.jsxs(ProgressWrapper, { labelPosition: labelPosition, children: [jsxRuntime.jsx(ProgressBarContainer, { labelPosition: labelPosition, children: jsxRuntime.jsx(StyledLinearProgress
|
|
5629
|
+
return (jsxRuntime.jsxs(ProgressWrapper, { labelPosition: labelPosition, children: [jsxRuntime.jsx(ProgressBarContainer, { labelPosition: labelPosition, children: jsxRuntime.jsx(StyledLinearProgress, { variant: "determinate", value: variant === 'cancelled' ? 100 : value, "data-variant": variant, labelPosition: labelPosition, ...props }) }), showLabel && jsxRuntime.jsx(ProgressLabel, { children: displayLabel })] }));
|
|
5617
5630
|
};
|
|
5618
5631
|
NeoProgressbar.displayName = 'NeoProgressbar';
|
|
5619
5632
|
|
|
@@ -5715,17 +5728,19 @@ const NeoQuickFilter = ({ placeholder = 'Search...', onKeyDown, autoFocus = fals
|
|
|
5715
5728
|
NeoQuickFilter.displayName = 'NeoQuickFilter';
|
|
5716
5729
|
|
|
5717
5730
|
// Custom radio icons to match Figma design
|
|
5718
|
-
const UncheckedIcon = ({ size }) => {
|
|
5731
|
+
const UncheckedIcon = ({ size, disabled }) => {
|
|
5719
5732
|
const dimensions = size === 'small' ? 16 : 20;
|
|
5720
5733
|
const radius = size === 'small' ? 8 : 10;
|
|
5721
|
-
return (jsxRuntime.jsxs("svg", { width: dimensions, height: dimensions, viewBox: `0 0 ${dimensions} ${dimensions}`, fill: "none", "aria-hidden": "true", children: [jsxRuntime.jsx("title", { children: "Unchecked radio button" }), jsxRuntime.jsx("circle", { cx: dimensions / 2, cy: dimensions / 2, r: radius - 0.5, stroke: neoDesign.semanticColors.border.primary, strokeWidth: "1", fill:
|
|
5734
|
+
return (jsxRuntime.jsxs("svg", { width: dimensions, height: dimensions, viewBox: `0 0 ${dimensions} ${dimensions}`, fill: "none", "aria-hidden": "true", children: [jsxRuntime.jsx("title", { children: "Unchecked radio button" }), jsxRuntime.jsx("circle", { cx: dimensions / 2, cy: dimensions / 2, r: radius - 0.5, stroke: neoDesign.semanticColors.border.primary, strokeWidth: "1", fill: disabled ? neoDesign.semanticColors.buttons.primary.disabled : 'transparent' })] }));
|
|
5722
5735
|
};
|
|
5723
|
-
const CheckedIcon = ({ size }) => {
|
|
5736
|
+
const CheckedIcon = ({ size, disabled }) => {
|
|
5724
5737
|
const dimensions = size === 'small' ? 16 : 20;
|
|
5725
5738
|
const radius = size === 'small' ? 8 : 10;
|
|
5726
5739
|
const inset = size === 'small' ? 0.3125 : 0.3; // 31.25% or 30%
|
|
5727
5740
|
const innerRadius = radius * (1 - 2 * inset);
|
|
5728
|
-
return (jsxRuntime.jsxs("svg", { width: dimensions, height: dimensions, viewBox: `0 0 ${dimensions} ${dimensions}`, fill: "none", "aria-hidden": "true", children: [jsxRuntime.jsx("title", { children: "Checked radio button" }), jsxRuntime.jsx("circle", { cx: dimensions / 2, cy: dimensions / 2, r: radius - 0.5, fill:
|
|
5741
|
+
return (jsxRuntime.jsxs("svg", { width: dimensions, height: dimensions, viewBox: `0 0 ${dimensions} ${dimensions}`, fill: "none", "aria-hidden": "true", children: [jsxRuntime.jsx("title", { children: "Checked radio button" }), jsxRuntime.jsx("circle", { cx: dimensions / 2, cy: dimensions / 2, r: radius - 0.5, fill: disabled
|
|
5742
|
+
? neoDesign.semanticColors.buttons.primary.disabled
|
|
5743
|
+
: neoDesign.semanticColors.buttons.primary.default, stroke: disabled ? neoDesign.semanticColors.border.primary : neoDesign.semanticColors.buttons.primary.default, strokeWidth: "1" }), jsxRuntime.jsx("circle", { cx: dimensions / 2, cy: dimensions / 2, r: innerRadius, fill: disabled ? neoDesign.semanticColors.icons.disabled : neoDesign.semanticColors.surfaces.white })] }));
|
|
5729
5744
|
};
|
|
5730
5745
|
const RadioContainer = styles.styled('label')(({ disabled }) => ({
|
|
5731
5746
|
display: 'inline-flex',
|
|
@@ -5770,6 +5785,10 @@ const StyledRadio = styles.styled(Radio, {
|
|
|
5770
5785
|
height: dimensions,
|
|
5771
5786
|
flexShrink: 0,
|
|
5772
5787
|
borderRadius: radius,
|
|
5788
|
+
color: neoDesign.semanticColors.border.primary,
|
|
5789
|
+
[`&.${Radio.radioClasses.checked}`]: {
|
|
5790
|
+
color: neoDesign.semanticColors.buttons.primary.default,
|
|
5791
|
+
},
|
|
5773
5792
|
'&:hover': {
|
|
5774
5793
|
backgroundColor: 'transparent',
|
|
5775
5794
|
},
|
|
@@ -5787,9 +5806,12 @@ const StyledRadio = styles.styled(Radio, {
|
|
|
5787
5806
|
backgroundColor: 'transparent',
|
|
5788
5807
|
},
|
|
5789
5808
|
},
|
|
5790
|
-
// Disabled state
|
|
5809
|
+
// Disabled state — icons handle their own disabled colors
|
|
5791
5810
|
[`&.${Radio.radioClasses.disabled}`]: {
|
|
5792
|
-
|
|
5811
|
+
color: neoDesign.semanticColors.border.primary,
|
|
5812
|
+
[`&.${Radio.radioClasses.checked}`]: {
|
|
5813
|
+
color: neoDesign.semanticColors.border.primary,
|
|
5814
|
+
},
|
|
5793
5815
|
},
|
|
5794
5816
|
};
|
|
5795
5817
|
});
|
|
@@ -5797,7 +5819,6 @@ const StyledRadio = styles.styled(Radio, {
|
|
|
5797
5819
|
* NeoRadio - Radio button component based on MUI Radio
|
|
5798
5820
|
*
|
|
5799
5821
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4122-40039
|
|
5800
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4122-40150
|
|
5801
5822
|
*
|
|
5802
5823
|
* Figma Props Mapping:
|
|
5803
5824
|
* - Checked (True|False) → checked prop
|
|
@@ -5837,9 +5858,9 @@ const StyledRadio = styles.styled(Radio, {
|
|
|
5837
5858
|
* </RadioGroup>
|
|
5838
5859
|
*/
|
|
5839
5860
|
const NeoRadio = ({ size = 'medium', label, helperText, disabled, ...props }) => {
|
|
5840
|
-
// Custom icons based on size
|
|
5841
|
-
const uncheckedIcon = jsxRuntime.jsx(UncheckedIcon, { size: size });
|
|
5842
|
-
const checkedIcon = jsxRuntime.jsx(CheckedIcon, { size: size });
|
|
5861
|
+
// Custom icons based on size and disabled state
|
|
5862
|
+
const uncheckedIcon = jsxRuntime.jsx(UncheckedIcon, { size: size, disabled: disabled });
|
|
5863
|
+
const checkedIcon = jsxRuntime.jsx(CheckedIcon, { size: size, disabled: disabled });
|
|
5843
5864
|
// If no label, return just the radio button
|
|
5844
5865
|
if (!label && !helperText) {
|
|
5845
5866
|
return (jsxRuntime.jsx(StyledRadio, { size: size, disabled: disabled, icon: uncheckedIcon, checkedIcon: checkedIcon, ...props }));
|
|
@@ -6154,7 +6175,7 @@ NeoTab.displayName = 'NeoTab';
|
|
|
6154
6175
|
|
|
6155
6176
|
// biome-ignore lint/suspicious/noExplicitAny: Type cast required to override MUI Alert variant type without global augmentation
|
|
6156
6177
|
const StyledAlert = styles.styled(Alert, {
|
|
6157
|
-
shouldForwardProp: prop => prop !== 'variant'
|
|
6178
|
+
shouldForwardProp: prop => prop !== 'variant',
|
|
6158
6179
|
})(({ theme, variant = 'default' }) => {
|
|
6159
6180
|
// Base styles
|
|
6160
6181
|
const baseStyles = {
|
|
@@ -6211,11 +6232,6 @@ const StyledAlert = styles.styled(Alert, {
|
|
|
6211
6232
|
color: neoDesign.semanticColors.status.info.dark,
|
|
6212
6233
|
border: `1px solid ${neoDesign.semanticColors.status.info.default}`,
|
|
6213
6234
|
},
|
|
6214
|
-
download: {
|
|
6215
|
-
backgroundColor: neoDesign.semanticColors.surfaces.snackbarDarkMode,
|
|
6216
|
-
color: neoDesign.colors.grey['800'],
|
|
6217
|
-
border: `1px solid ${neoDesign.semanticColors.border.primary}`,
|
|
6218
|
-
},
|
|
6219
6235
|
};
|
|
6220
6236
|
return {
|
|
6221
6237
|
...baseStyles,
|
|
@@ -6230,7 +6246,6 @@ const ToastTitle = styles.styled('p')(({ theme, variant = 'default' }) => {
|
|
|
6230
6246
|
error: neoDesign.semanticColors.status.error.dark,
|
|
6231
6247
|
success: neoDesign.semanticColors.status.success.dark,
|
|
6232
6248
|
info: neoDesign.semanticColors.status.info.dark,
|
|
6233
|
-
download: neoDesign.colors.grey['700'],
|
|
6234
6249
|
};
|
|
6235
6250
|
return {
|
|
6236
6251
|
margin: 0,
|
|
@@ -6248,7 +6263,6 @@ const ToastMessage = styles.styled('p')(({ theme, variant = 'default' }) => {
|
|
|
6248
6263
|
error: neoDesign.semanticColors.status.error.dark,
|
|
6249
6264
|
success: neoDesign.semanticColors.status.success.dark,
|
|
6250
6265
|
info: neoDesign.semanticColors.status.info.dark,
|
|
6251
|
-
download: neoDesign.colors.grey['800'],
|
|
6252
6266
|
};
|
|
6253
6267
|
return {
|
|
6254
6268
|
margin: 0,
|
|
@@ -6286,7 +6300,7 @@ const ToastButton = styles.styled(Button, {
|
|
|
6286
6300
|
if (toastVariant === 'info') {
|
|
6287
6301
|
return neoDesign.semanticColors.status.info.dark;
|
|
6288
6302
|
}
|
|
6289
|
-
// default
|
|
6303
|
+
// default variant uses icon placeholder color
|
|
6290
6304
|
return neoDesign.semanticColors.icons.placeholder;
|
|
6291
6305
|
};
|
|
6292
6306
|
return {
|
|
@@ -6303,68 +6317,20 @@ const ToastButton = styles.styled(Button, {
|
|
|
6303
6317
|
},
|
|
6304
6318
|
};
|
|
6305
6319
|
});
|
|
6306
|
-
const ProgressSection = styles.styled(Stack)({
|
|
6307
|
-
gap: neoDesign.spacing.spacing_1,
|
|
6308
|
-
width: '100%',
|
|
6309
|
-
});
|
|
6310
|
-
const FileName = styles.styled('p')(({ theme }) => ({
|
|
6311
|
-
margin: 0,
|
|
6312
|
-
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.xs),
|
|
6313
|
-
fontWeight: neoDesign.typography.fontWeight.medium,
|
|
6314
|
-
lineHeight: 1.5,
|
|
6315
|
-
color: neoDesign.colors.grey['800'],
|
|
6316
|
-
}));
|
|
6317
|
-
const ProgressLabel = styles.styled('p')(({ theme }) => ({
|
|
6318
|
-
margin: 0,
|
|
6319
|
-
fontSize: theme.typography.pxToRem(neoDesign.typography.fontSize.xs),
|
|
6320
|
-
fontWeight: neoDesign.typography.fontWeight.medium,
|
|
6321
|
-
lineHeight: 1.5,
|
|
6322
|
-
color: neoDesign.colors.grey['800'],
|
|
6323
|
-
}));
|
|
6324
|
-
const StyledLinearProgress = styles.styled(LinearProgress)({
|
|
6325
|
-
width: '100%',
|
|
6326
|
-
height: neoDesign.spacing.spacing_2,
|
|
6327
|
-
borderRadius: neoDesign.borderRadius.s,
|
|
6328
|
-
backgroundColor: neoDesign.colors.grey['200'],
|
|
6329
|
-
[`& .${LinearProgress.linearProgressClasses.bar}`]: {
|
|
6330
|
-
backgroundColor: neoDesign.semanticColors.buttons.primary.default,
|
|
6331
|
-
borderRadius: `${neoDesign.borderRadius.xS}px 0 0 ${neoDesign.borderRadius.xS}px`,
|
|
6332
|
-
},
|
|
6333
|
-
});
|
|
6334
|
-
const DownloadActions = styles.styled(Stack)({
|
|
6335
|
-
gap: `${neoDesign.spacing.spacing_4}px`,
|
|
6336
|
-
alignItems: 'center',
|
|
6337
|
-
});
|
|
6338
|
-
const DownloadIconButton = styles.styled(IconButton)({
|
|
6339
|
-
padding: 0,
|
|
6340
|
-
width: 16,
|
|
6341
|
-
height: 16,
|
|
6342
|
-
color: neoDesign.colors.grey['800'],
|
|
6343
|
-
'&:hover': {
|
|
6344
|
-
backgroundColor: 'transparent',
|
|
6345
|
-
},
|
|
6346
|
-
});
|
|
6347
6320
|
/**
|
|
6348
6321
|
* NeoToast - Notification/Toast component based on MUI Alert
|
|
6349
6322
|
*
|
|
6350
6323
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4122-37223
|
|
6351
6324
|
*
|
|
6352
6325
|
* Figma Props Mapping:
|
|
6353
|
-
* - type (Light mode|Dark mode|Brand color|Error|Success|Info
|
|
6326
|
+
* - type (Light mode|Dark mode|Brand color|Error|Success|Info) → variant (default|dark|brand|error|success|info)
|
|
6354
6327
|
* - header → title (string)
|
|
6355
6328
|
* - supportingText → message (string)
|
|
6356
6329
|
* - xCloseButton → showClose (boolean)
|
|
6357
6330
|
* - actions → actions (ReactNode)
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
const isDownloadVariant = variant === 'download';
|
|
6362
|
-
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: {
|
|
6363
|
-
alignItems: 'flex-start',
|
|
6364
|
-
justifyContent: 'space-between',
|
|
6365
|
-
width: '100%',
|
|
6366
|
-
gap: `${neoDesign.spacing.spacing_4}px`,
|
|
6367
|
-
}, 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 })] })) }));
|
|
6331
|
+
*/
|
|
6332
|
+
const NeoToast = ({ variant = 'default', title, message, showClose = true, actions, onClose, ...props }) => {
|
|
6333
|
+
return (jsxRuntime.jsxs(StyledAlert, { ...props, variant: variant, action: showClose ? (jsxRuntime.jsx(IconButton, { size: "small", onClick: onClose, sx: { color: neoDesign.semanticColors.icons.placeholder }, children: jsxRuntime.jsx(X, { size: 16 }) })) : undefined, children: [jsxRuntime.jsxs(Stack, { sx: { gap: `${neoDesign.spacing.spacing_1}px`, width: '100%' }, children: [title && jsxRuntime.jsx(ToastTitle, { variant: variant, children: title }), message && jsxRuntime.jsx(ToastMessage, { variant: variant, children: message })] }), actions && jsxRuntime.jsx(ToastActions, { direction: "row", children: actions })] }));
|
|
6368
6334
|
};
|
|
6369
6335
|
/**
|
|
6370
6336
|
* Helper component for creating toast action buttons with proper styling
|
|
@@ -6892,6 +6858,7 @@ exports.NeoBreadcrumbs = NeoBreadcrumbs;
|
|
|
6892
6858
|
exports.NeoButton = NeoButton;
|
|
6893
6859
|
exports.NeoButtonTab = NeoButtonTab;
|
|
6894
6860
|
exports.NeoButtonTabGroup = NeoButtonTabGroup;
|
|
6861
|
+
exports.NeoCard = NeoCard;
|
|
6895
6862
|
exports.NeoCheckbox = NeoCheckbox;
|
|
6896
6863
|
exports.NeoCodeSnippet = NeoCodeSnippet;
|
|
6897
6864
|
exports.NeoDataGrid = NeoDataGrid;
|
|
@@ -6908,6 +6875,7 @@ exports.NeoDataGridSelect = NeoDropdown;
|
|
|
6908
6875
|
exports.NeoDatePicker = NeoDatePicker;
|
|
6909
6876
|
exports.NeoDivider = NeoDivider;
|
|
6910
6877
|
exports.NeoDot = NeoDot;
|
|
6878
|
+
exports.NeoDownloadToast = NeoDownloadToast;
|
|
6911
6879
|
exports.NeoDropdown = NeoDropdown;
|
|
6912
6880
|
exports.NeoDropdownMenu = NeoDropdownMenu;
|
|
6913
6881
|
exports.NeoDropdownMenuItem = NeoDropdownMenuItem;
|