@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.esm.js
CHANGED
|
@@ -7,13 +7,14 @@ import Chip, { chipClasses } from '@mui/material/Chip';
|
|
|
7
7
|
import SvgIcon, { svgIconClasses } from '@mui/material/SvgIcon';
|
|
8
8
|
import Alert, { alertClasses } from '@mui/material/Alert';
|
|
9
9
|
import IconButton, { iconButtonClasses } from '@mui/material/IconButton';
|
|
10
|
-
import React, { forwardRef, createElement, useRef, useCallback,
|
|
10
|
+
import React, { forwardRef, createElement, useState, useRef, useCallback, useMemo, useEffect } from 'react';
|
|
11
11
|
import Breadcrumbs, { breadcrumbsClasses } from '@mui/material/Breadcrumbs';
|
|
12
12
|
import Link from '@mui/material/Link';
|
|
13
13
|
import ButtonBase, { buttonBaseClasses } from '@mui/material/ButtonBase';
|
|
14
14
|
import CircularProgress from '@mui/material/CircularProgress';
|
|
15
15
|
import MuiToggleButton, { toggleButtonClasses } from '@mui/material/ToggleButton';
|
|
16
16
|
import MuiToggleButtonGroup, { toggleButtonGroupClasses } from '@mui/material/ToggleButtonGroup';
|
|
17
|
+
import MuiCard from '@mui/material/Card';
|
|
17
18
|
import Checkbox, { checkboxClasses } from '@mui/material/Checkbox';
|
|
18
19
|
import { useGridApiContext, useGridSelector, gridColumnDefinitionsSelector, gridColumnVisibilityModelSelector, GridPanelWrapper, useGridApiRef, gridClasses as gridClasses$1, DataGridPro, ColumnsPanelTrigger, ToolbarButton, gridFilterModelSelector, FilterPanelTrigger, Toolbar } from '@mui/x-data-grid-pro';
|
|
19
20
|
import Button, { buttonClasses } from '@mui/material/Button';
|
|
@@ -36,23 +37,22 @@ import { PickersShortcuts } from '@mui/x-date-pickers/PickersShortcuts';
|
|
|
36
37
|
import { DateRangePicker } from '@mui/x-date-pickers-pro/DateRangePicker';
|
|
37
38
|
import { dateRangePickerDayClasses } from '@mui/x-date-pickers-pro/DateRangePickerDay';
|
|
38
39
|
import Badge, { badgeClasses } from '@mui/material/Badge';
|
|
40
|
+
import LinearProgress, { linearProgressClasses } from '@mui/material/LinearProgress';
|
|
41
|
+
import Paper, { paperClasses } from '@mui/material/Paper';
|
|
42
|
+
import Stack from '@mui/material/Stack';
|
|
39
43
|
import { listClasses } from '@mui/material/List';
|
|
40
44
|
import Menu from '@mui/material/Menu';
|
|
41
|
-
import { paperClasses } from '@mui/material/Paper';
|
|
42
45
|
import FormControl from '@mui/material/FormControl';
|
|
43
46
|
import FormHelperText, { formHelperTextClasses } from '@mui/material/FormHelperText';
|
|
44
47
|
import ListItemButton, { listItemButtonClasses } from '@mui/material/ListItemButton';
|
|
45
48
|
import ListItemIcon, { listItemIconClasses } from '@mui/material/ListItemIcon';
|
|
46
49
|
import ListItemText, { listItemTextClasses } from '@mui/material/ListItemText';
|
|
47
50
|
import Typography from '@mui/material/Typography';
|
|
48
|
-
import MuiCard from '@mui/material/Card';
|
|
49
51
|
import Dialog, { dialogClasses } from '@mui/material/Dialog';
|
|
50
52
|
import DialogActions, { dialogActionsClasses } from '@mui/material/DialogActions';
|
|
51
53
|
import DialogContent, { dialogContentClasses } from '@mui/material/DialogContent';
|
|
52
54
|
import Fab from '@mui/material/Fab';
|
|
53
55
|
import Fade from '@mui/material/Fade';
|
|
54
|
-
import Stack from '@mui/material/Stack';
|
|
55
|
-
import LinearProgress, { linearProgressClasses } from '@mui/material/LinearProgress';
|
|
56
56
|
import Radio, { radioClasses } from '@mui/material/Radio';
|
|
57
57
|
import Skeleton from '@mui/material/Skeleton';
|
|
58
58
|
import MuiTab, { tabClasses } from '@mui/material/Tab';
|
|
@@ -688,11 +688,11 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
688
688
|
*/
|
|
689
689
|
|
|
690
690
|
|
|
691
|
-
const __iconNode$
|
|
691
|
+
const __iconNode$j = [
|
|
692
692
|
["path", { d: "M12 5v14", key: "s699le" }],
|
|
693
693
|
["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
|
|
694
694
|
];
|
|
695
|
-
const ArrowDown = createLucideIcon("arrow-down", __iconNode$
|
|
695
|
+
const ArrowDown = createLucideIcon("arrow-down", __iconNode$j);
|
|
696
696
|
|
|
697
697
|
/**
|
|
698
698
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -702,11 +702,11 @@ const ArrowDown = createLucideIcon("arrow-down", __iconNode$i);
|
|
|
702
702
|
*/
|
|
703
703
|
|
|
704
704
|
|
|
705
|
-
const __iconNode$
|
|
705
|
+
const __iconNode$i = [
|
|
706
706
|
["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
|
|
707
707
|
["path", { d: "M12 19V5", key: "x0mq9r" }]
|
|
708
708
|
];
|
|
709
|
-
const ArrowUp = createLucideIcon("arrow-up", __iconNode$
|
|
709
|
+
const ArrowUp = createLucideIcon("arrow-up", __iconNode$i);
|
|
710
710
|
|
|
711
711
|
/**
|
|
712
712
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -716,7 +716,7 @@ const ArrowUp = createLucideIcon("arrow-up", __iconNode$h);
|
|
|
716
716
|
*/
|
|
717
717
|
|
|
718
718
|
|
|
719
|
-
const __iconNode$
|
|
719
|
+
const __iconNode$h = [
|
|
720
720
|
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
721
721
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
722
722
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
@@ -728,7 +728,7 @@ const __iconNode$g = [
|
|
|
728
728
|
["path", { d: "M12 18h.01", key: "mhygvu" }],
|
|
729
729
|
["path", { d: "M16 18h.01", key: "kzsmim" }]
|
|
730
730
|
];
|
|
731
|
-
const CalendarDays = createLucideIcon("calendar-days", __iconNode$
|
|
731
|
+
const CalendarDays = createLucideIcon("calendar-days", __iconNode$h);
|
|
732
732
|
|
|
733
733
|
/**
|
|
734
734
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -738,8 +738,8 @@ const CalendarDays = createLucideIcon("calendar-days", __iconNode$g);
|
|
|
738
738
|
*/
|
|
739
739
|
|
|
740
740
|
|
|
741
|
-
const __iconNode$
|
|
742
|
-
const ChevronDown = createLucideIcon("chevron-down", __iconNode$
|
|
741
|
+
const __iconNode$g = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
742
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$g);
|
|
743
743
|
|
|
744
744
|
/**
|
|
745
745
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -749,8 +749,8 @@ const ChevronDown = createLucideIcon("chevron-down", __iconNode$f);
|
|
|
749
749
|
*/
|
|
750
750
|
|
|
751
751
|
|
|
752
|
-
const __iconNode$
|
|
753
|
-
const ChevronLeft = createLucideIcon("chevron-left", __iconNode$
|
|
752
|
+
const __iconNode$f = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
|
|
753
|
+
const ChevronLeft = createLucideIcon("chevron-left", __iconNode$f);
|
|
754
754
|
|
|
755
755
|
/**
|
|
756
756
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -760,8 +760,8 @@ const ChevronLeft = createLucideIcon("chevron-left", __iconNode$e);
|
|
|
760
760
|
*/
|
|
761
761
|
|
|
762
762
|
|
|
763
|
-
const __iconNode$
|
|
764
|
-
const ChevronRight = createLucideIcon("chevron-right", __iconNode$
|
|
763
|
+
const __iconNode$e = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
764
|
+
const ChevronRight = createLucideIcon("chevron-right", __iconNode$e);
|
|
765
765
|
|
|
766
766
|
/**
|
|
767
767
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -771,8 +771,8 @@ const ChevronRight = createLucideIcon("chevron-right", __iconNode$d);
|
|
|
771
771
|
*/
|
|
772
772
|
|
|
773
773
|
|
|
774
|
-
const __iconNode$
|
|
775
|
-
const ChevronUp = createLucideIcon("chevron-up", __iconNode$
|
|
774
|
+
const __iconNode$d = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
775
|
+
const ChevronUp = createLucideIcon("chevron-up", __iconNode$d);
|
|
776
776
|
|
|
777
777
|
/**
|
|
778
778
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -782,11 +782,11 @@ const ChevronUp = createLucideIcon("chevron-up", __iconNode$c);
|
|
|
782
782
|
*/
|
|
783
783
|
|
|
784
784
|
|
|
785
|
-
const __iconNode$
|
|
785
|
+
const __iconNode$c = [
|
|
786
786
|
["path", { d: "m7 15 5 5 5-5", key: "1hf1tw" }],
|
|
787
787
|
["path", { d: "m7 9 5-5 5 5", key: "sgt6xg" }]
|
|
788
788
|
];
|
|
789
|
-
const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$
|
|
789
|
+
const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$c);
|
|
790
790
|
|
|
791
791
|
/**
|
|
792
792
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -796,12 +796,12 @@ const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$b);
|
|
|
796
796
|
*/
|
|
797
797
|
|
|
798
798
|
|
|
799
|
-
const __iconNode$
|
|
799
|
+
const __iconNode$b = [
|
|
800
800
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
801
801
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
802
802
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
803
803
|
];
|
|
804
|
-
const CircleAlert = createLucideIcon("circle-alert", __iconNode$
|
|
804
|
+
const CircleAlert = createLucideIcon("circle-alert", __iconNode$b);
|
|
805
805
|
|
|
806
806
|
/**
|
|
807
807
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -811,11 +811,11 @@ const CircleAlert = createLucideIcon("circle-alert", __iconNode$a);
|
|
|
811
811
|
*/
|
|
812
812
|
|
|
813
813
|
|
|
814
|
-
const __iconNode$
|
|
814
|
+
const __iconNode$a = [
|
|
815
815
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
816
816
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
817
817
|
];
|
|
818
|
-
const CircleCheck = createLucideIcon("circle-check", __iconNode$
|
|
818
|
+
const CircleCheck = createLucideIcon("circle-check", __iconNode$a);
|
|
819
819
|
|
|
820
820
|
/**
|
|
821
821
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -825,12 +825,12 @@ const CircleCheck = createLucideIcon("circle-check", __iconNode$9);
|
|
|
825
825
|
*/
|
|
826
826
|
|
|
827
827
|
|
|
828
|
-
const __iconNode$
|
|
828
|
+
const __iconNode$9 = [
|
|
829
829
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
830
830
|
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
831
831
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
832
832
|
];
|
|
833
|
-
const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$
|
|
833
|
+
const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$9);
|
|
834
834
|
|
|
835
835
|
/**
|
|
836
836
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -840,12 +840,12 @@ const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$8
|
|
|
840
840
|
*/
|
|
841
841
|
|
|
842
842
|
|
|
843
|
-
const __iconNode$
|
|
843
|
+
const __iconNode$8 = [
|
|
844
844
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
845
845
|
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
846
846
|
["path", { d: "M15 3v18", key: "14nvp0" }]
|
|
847
847
|
];
|
|
848
|
-
const Columns3 = createLucideIcon("columns-3", __iconNode$
|
|
848
|
+
const Columns3 = createLucideIcon("columns-3", __iconNode$8);
|
|
849
849
|
|
|
850
850
|
/**
|
|
851
851
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -855,12 +855,12 @@ const Columns3 = createLucideIcon("columns-3", __iconNode$7);
|
|
|
855
855
|
*/
|
|
856
856
|
|
|
857
857
|
|
|
858
|
-
const __iconNode$
|
|
858
|
+
const __iconNode$7 = [
|
|
859
859
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
860
860
|
["path", { d: "M12 16v-4", key: "1dtifu" }],
|
|
861
861
|
["path", { d: "M12 8h.01", key: "e9boi3" }]
|
|
862
862
|
];
|
|
863
|
-
const Info = createLucideIcon("info", __iconNode$
|
|
863
|
+
const Info = createLucideIcon("info", __iconNode$7);
|
|
864
864
|
|
|
865
865
|
/**
|
|
866
866
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -870,12 +870,23 @@ const Info = createLucideIcon("info", __iconNode$6);
|
|
|
870
870
|
*/
|
|
871
871
|
|
|
872
872
|
|
|
873
|
-
const __iconNode$
|
|
873
|
+
const __iconNode$6 = [
|
|
874
874
|
["path", { d: "M2 5h20", key: "1fs1ex" }],
|
|
875
875
|
["path", { d: "M6 12h12", key: "8npq4p" }],
|
|
876
876
|
["path", { d: "M9 19h6", key: "456am0" }]
|
|
877
877
|
];
|
|
878
|
-
const ListFilter = createLucideIcon("list-filter", __iconNode$
|
|
878
|
+
const ListFilter = createLucideIcon("list-filter", __iconNode$6);
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* @license lucide-react v0.577.0 - ISC
|
|
882
|
+
*
|
|
883
|
+
* This source code is licensed under the ISC license.
|
|
884
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
885
|
+
*/
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
const __iconNode$5 = [["path", { d: "M5 12h14", key: "1ays0h" }]];
|
|
889
|
+
const Minus = createLucideIcon("minus", __iconNode$5);
|
|
879
890
|
|
|
880
891
|
/**
|
|
881
892
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -955,33 +966,27 @@ const __iconNode = [
|
|
|
955
966
|
];
|
|
956
967
|
const X = createLucideIcon("x", __iconNode);
|
|
957
968
|
|
|
969
|
+
const intentColors = {
|
|
970
|
+
info: semanticColors.status.info,
|
|
971
|
+
success: semanticColors.status.success,
|
|
972
|
+
error: semanticColors.status.error,
|
|
973
|
+
warning: semanticColors.status.warning,
|
|
974
|
+
neutral: semanticColors.status.neutral,
|
|
975
|
+
};
|
|
958
976
|
// biome-ignore lint/suspicious/noExplicitAny: Type cast required to override MUI Alert variant type without global augmentation
|
|
959
977
|
const StyledAlert$2 = styled(Alert, {
|
|
960
|
-
shouldForwardProp: prop => prop !== 'messagePosition' && prop !== '
|
|
961
|
-
})(({
|
|
962
|
-
|
|
963
|
-
const
|
|
964
|
-
|
|
965
|
-
backgroundColor:
|
|
978
|
+
shouldForwardProp: prop => prop !== 'messagePosition' && prop !== 'intent' && prop !== 'bannerType',
|
|
979
|
+
})(({ intent = 'info', bannerType = 'outlined', messagePosition = 'left' }) => {
|
|
980
|
+
const palette = intentColors[intent];
|
|
981
|
+
const typeStyles = bannerType === 'filled'
|
|
982
|
+
? {
|
|
983
|
+
backgroundColor: palette.dark,
|
|
966
984
|
color: semanticColors.surfaces.white,
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
backgroundColor:
|
|
970
|
-
color: colors.grey['800'],
|
|
971
|
-
},
|
|
972
|
-
success: {
|
|
973
|
-
backgroundColor: semanticColors.status.success.light,
|
|
974
|
-
color: colors.grey['800'],
|
|
975
|
-
},
|
|
976
|
-
error: {
|
|
977
|
-
backgroundColor: semanticColors.status.error.light,
|
|
978
|
-
color: colors.grey['800'],
|
|
979
|
-
},
|
|
980
|
-
warning: {
|
|
981
|
-
backgroundColor: semanticColors.status.warning.light,
|
|
985
|
+
}
|
|
986
|
+
: {
|
|
987
|
+
backgroundColor: palette.light,
|
|
982
988
|
color: colors.grey['800'],
|
|
983
|
-
}
|
|
984
|
-
};
|
|
989
|
+
};
|
|
985
990
|
return {
|
|
986
991
|
width: '100%',
|
|
987
992
|
minHeight: 52,
|
|
@@ -995,9 +1000,9 @@ const StyledAlert$2 = styled(Alert, {
|
|
|
995
1000
|
...(messagePosition === 'center' && { position: 'relative' }),
|
|
996
1001
|
boxShadow: `${shadows.neutralSmall.x}px ${shadows.neutralSmall.y}px ${shadows.neutralSmall.blur}px ${shadows.neutralSmall.spread}px ${shadows.neutralSmall.shadow}`,
|
|
997
1002
|
fontSize: typography.fontSize.default,
|
|
998
|
-
fontWeight: typography.fontWeight.
|
|
1003
|
+
fontWeight: typography.fontWeight.medium,
|
|
999
1004
|
lineHeight: 1.5,
|
|
1000
|
-
...
|
|
1005
|
+
...typeStyles,
|
|
1001
1006
|
[`& .${alertClasses.icon}`]: {
|
|
1002
1007
|
padding: 0,
|
|
1003
1008
|
opacity: 1,
|
|
@@ -1020,26 +1025,18 @@ const StyledAlert$2 = styled(Alert, {
|
|
|
1020
1025
|
},
|
|
1021
1026
|
};
|
|
1022
1027
|
});
|
|
1023
|
-
const LinkText = styled('span')(({
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
fontWeight: typography.fontWeight.semiBold,
|
|
1036
|
-
color: getLinkColor(),
|
|
1037
|
-
cursor: 'pointer',
|
|
1038
|
-
'&:hover': {
|
|
1039
|
-
textDecoration: 'underline',
|
|
1040
|
-
},
|
|
1041
|
-
};
|
|
1042
|
-
});
|
|
1028
|
+
const LinkText = styled('span')(({ bannerType = 'outlined' }) => ({
|
|
1029
|
+
marginLeft: 'auto',
|
|
1030
|
+
fontWeight: typography.fontWeight.semiBold,
|
|
1031
|
+
color: bannerType === 'filled'
|
|
1032
|
+
? semanticColors.typography.link.white
|
|
1033
|
+
: semanticColors.typography.link.primary,
|
|
1034
|
+
cursor: 'pointer',
|
|
1035
|
+
whiteSpace: 'nowrap',
|
|
1036
|
+
'&:hover': {
|
|
1037
|
+
textDecoration: 'underline',
|
|
1038
|
+
},
|
|
1039
|
+
}));
|
|
1043
1040
|
const StyledIconButton$1 = styled(IconButton)(({ closeIconColor }) => ({
|
|
1044
1041
|
padding: 0,
|
|
1045
1042
|
color: closeIconColor,
|
|
@@ -1047,35 +1044,17 @@ const StyledIconButton$1 = styled(IconButton)(({ closeIconColor }) => ({
|
|
|
1047
1044
|
backgroundColor: 'transparent',
|
|
1048
1045
|
},
|
|
1049
1046
|
}));
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
* Figma Props Mapping:
|
|
1056
|
-
* - color (Dark|Light|Success|Error|Warning) → variant (dark|light|success|error|warning)
|
|
1057
|
-
* - messagePosition (Left|Center) → messagePosition ("left"|"center")
|
|
1058
|
-
* - closeIcon (boolean) → showClose (boolean)
|
|
1059
|
-
* - link (boolean) → linkText (string)
|
|
1060
|
-
* - {Message} → message (string)
|
|
1061
|
-
*/
|
|
1062
|
-
const NeoBanner = ({ variant = 'light', message, messagePosition = 'left', linkText, showClose = true, icon, onClose, onLinkClick, ...props }) => {
|
|
1063
|
-
const getCloseIconColor = () => {
|
|
1064
|
-
if (variant === 'dark') {
|
|
1065
|
-
return semanticColors.surfaces.white;
|
|
1066
|
-
}
|
|
1067
|
-
if (variant === 'success') {
|
|
1068
|
-
return semanticColors.status.success.default;
|
|
1069
|
-
}
|
|
1070
|
-
if (variant === 'error') {
|
|
1071
|
-
return semanticColors.status.error.default;
|
|
1072
|
-
}
|
|
1073
|
-
if (variant === 'warning') {
|
|
1074
|
-
return semanticColors.status.warning.default;
|
|
1075
|
-
}
|
|
1076
|
-
return colors.grey['800'];
|
|
1047
|
+
const NeoBanner = ({ intent = 'info', type = 'outlined', message, messagePosition = 'left', linkText, showClose = false, icon, onClose, onLinkClick, ...props }) => {
|
|
1048
|
+
const [dismissed, setDismissed] = useState(false);
|
|
1049
|
+
const handleClose = () => {
|
|
1050
|
+
setDismissed(true);
|
|
1051
|
+
onClose?.();
|
|
1077
1052
|
};
|
|
1078
|
-
|
|
1053
|
+
if (dismissed) {
|
|
1054
|
+
return null;
|
|
1055
|
+
}
|
|
1056
|
+
const closeIconColor = type === 'filled' ? semanticColors.surfaces.white : intentColors[intent].default;
|
|
1057
|
+
return (jsx(StyledAlert$2, { ...props, intent: intent, bannerType: type, messagePosition: messagePosition, icon: messagePosition === 'left' ? icon || false : false, action: showClose ? (jsx(StyledIconButton$1, { size: "small", onClick: handleClose, closeIconColor: closeIconColor, children: jsx(X, { size: 24 }) })) : undefined, children: messagePosition === 'center' ? (jsxs(Fragment, { children: [icon, jsx("span", { children: message }), linkText && (jsx(LinkText, { bannerType: type, onClick: onLinkClick, children: linkText }))] })) : (jsxs(Fragment, { children: [jsx("span", { children: message }), linkText && (jsx(LinkText, { bannerType: type, onClick: onLinkClick, children: linkText }))] })) }));
|
|
1079
1058
|
};
|
|
1080
1059
|
NeoBanner.displayName = 'NeoBanner';
|
|
1081
1060
|
|
|
@@ -1527,6 +1506,197 @@ const NeoButtonTabGroup = ({ size = 'medium', exclusive = true, ...props }) => {
|
|
|
1527
1506
|
};
|
|
1528
1507
|
NeoButtonTabGroup.displayName = 'NeoButtonTabGroup';
|
|
1529
1508
|
|
|
1509
|
+
// ─── Shared ──────────────────────────────────────────────────────────────────
|
|
1510
|
+
const activeShadow = `${shadows.card.x}px ${shadows.card.y}px ${shadows.card.blur}px ${shadows.card.spread}px ${shadows.card.shadow}`;
|
|
1511
|
+
// ─── Small card styled components ────────────────────────────────────────────
|
|
1512
|
+
const SmallStyledCard = styled(MuiCard, {
|
|
1513
|
+
shouldForwardProp: prop => prop !== 'selected' && prop !== 'disabled',
|
|
1514
|
+
})(({ theme, selected, disabled }) => ({
|
|
1515
|
+
width: 160,
|
|
1516
|
+
height: 160,
|
|
1517
|
+
padding: theme.spacing(1.5), // 12px
|
|
1518
|
+
display: 'flex',
|
|
1519
|
+
flexDirection: 'column',
|
|
1520
|
+
gap: theme.spacing(2), // 16px
|
|
1521
|
+
backgroundColor: semanticColors.surfaces.card,
|
|
1522
|
+
border: `1px solid ${selected ? semanticColors.buttons.primary.default : semanticColors.border.primary}`,
|
|
1523
|
+
borderRadius: borderRadius.xS,
|
|
1524
|
+
boxShadow: selected ? activeShadow : 'none',
|
|
1525
|
+
transition: theme.transitions.create(['border-color', 'background-color', 'box-shadow']),
|
|
1526
|
+
cursor: 'pointer',
|
|
1527
|
+
'&:hover': {
|
|
1528
|
+
borderColor: semanticColors.buttons.primary.default,
|
|
1529
|
+
boxShadow: activeShadow,
|
|
1530
|
+
},
|
|
1531
|
+
'&:focus-visible': {
|
|
1532
|
+
borderColor: semanticColors.buttons.primary.default,
|
|
1533
|
+
...focusRingStyles,
|
|
1534
|
+
},
|
|
1535
|
+
...(disabled && {
|
|
1536
|
+
opacity: 0.5,
|
|
1537
|
+
pointerEvents: 'none',
|
|
1538
|
+
cursor: 'not-allowed',
|
|
1539
|
+
}),
|
|
1540
|
+
}));
|
|
1541
|
+
const SmallCardHeader = styled('div')({
|
|
1542
|
+
display: 'flex',
|
|
1543
|
+
alignItems: 'flex-start',
|
|
1544
|
+
justifyContent: 'space-between',
|
|
1545
|
+
width: '100%',
|
|
1546
|
+
});
|
|
1547
|
+
const SmallLogoContainer = styled('div')({
|
|
1548
|
+
width: spacing.spacing_6,
|
|
1549
|
+
height: spacing.spacing_6,
|
|
1550
|
+
flexShrink: 0,
|
|
1551
|
+
});
|
|
1552
|
+
const SmallRecipeCount = styled('p')(({ theme }) => ({
|
|
1553
|
+
margin: 0,
|
|
1554
|
+
fontSize: theme.typography.pxToRem(typography.fontSize.xxs), // 10px
|
|
1555
|
+
fontWeight: typography.fontWeight.semiBold, // 600
|
|
1556
|
+
lineHeight: 1.2,
|
|
1557
|
+
color: colors.grey[800],
|
|
1558
|
+
whiteSpace: 'nowrap',
|
|
1559
|
+
}));
|
|
1560
|
+
const SmallCardContent = styled('div')(({ theme }) => ({
|
|
1561
|
+
display: 'flex',
|
|
1562
|
+
flexDirection: 'column',
|
|
1563
|
+
gap: theme.spacing(2), // 16px
|
|
1564
|
+
width: '100%',
|
|
1565
|
+
}));
|
|
1566
|
+
const SmallTitle = styled('p')(({ theme }) => ({
|
|
1567
|
+
margin: 0,
|
|
1568
|
+
fontSize: theme.typography.pxToRem(typography.fontSize.h6), // 16px
|
|
1569
|
+
fontWeight: typography.fontWeight.semiBold, // 600
|
|
1570
|
+
lineHeight: 1.4,
|
|
1571
|
+
color: colors.grey[800],
|
|
1572
|
+
width: '100%',
|
|
1573
|
+
}));
|
|
1574
|
+
const SmallDescription = styled('p')(({ theme }) => ({
|
|
1575
|
+
margin: 0,
|
|
1576
|
+
fontSize: theme.typography.pxToRem(typography.fontSize.xs), // 12px
|
|
1577
|
+
fontWeight: typography.fontWeight.regular, // 400
|
|
1578
|
+
lineHeight: 1.5,
|
|
1579
|
+
color: colors.grey[800],
|
|
1580
|
+
width: '100%',
|
|
1581
|
+
display: '-webkit-box',
|
|
1582
|
+
WebkitLineClamp: 2,
|
|
1583
|
+
WebkitBoxOrient: 'vertical',
|
|
1584
|
+
overflow: 'hidden',
|
|
1585
|
+
textOverflow: 'ellipsis',
|
|
1586
|
+
}));
|
|
1587
|
+
const LargeStyledCard = styled(MuiCard, {
|
|
1588
|
+
shouldForwardProp: prop => prop !== 'disabled' && prop !== 'cardTheme',
|
|
1589
|
+
})(({ disabled = false, cardTheme = 'light' }) => {
|
|
1590
|
+
const isLight = cardTheme === 'light';
|
|
1591
|
+
const activeBorderColor = isLight
|
|
1592
|
+
? semanticColors.buttons.primary.default
|
|
1593
|
+
: colors.digitalGreen[300];
|
|
1594
|
+
const defaultBorderColor = isLight
|
|
1595
|
+
? semanticColors.border.primary
|
|
1596
|
+
: `${semanticColors.border.primary}80`;
|
|
1597
|
+
return {
|
|
1598
|
+
width: 340,
|
|
1599
|
+
height: 162,
|
|
1600
|
+
display: 'flex',
|
|
1601
|
+
flexDirection: 'column',
|
|
1602
|
+
justifyContent: 'space-between',
|
|
1603
|
+
alignItems: 'flex-start',
|
|
1604
|
+
padding: spacing.spacing_2,
|
|
1605
|
+
borderRadius: borderRadius.xS,
|
|
1606
|
+
backgroundColor: isLight ? semanticColors.surfaces.card : colors.grey[800],
|
|
1607
|
+
border: `1px solid ${defaultBorderColor}`,
|
|
1608
|
+
boxShadow: 'none',
|
|
1609
|
+
overflow: 'hidden',
|
|
1610
|
+
cursor: 'pointer',
|
|
1611
|
+
transition: 'border-color 0.2s, box-shadow 0.2s',
|
|
1612
|
+
'&:hover': {
|
|
1613
|
+
borderColor: activeBorderColor,
|
|
1614
|
+
boxShadow: activeShadow,
|
|
1615
|
+
},
|
|
1616
|
+
'&:active': {
|
|
1617
|
+
borderColor: activeBorderColor,
|
|
1618
|
+
boxShadow: activeShadow,
|
|
1619
|
+
},
|
|
1620
|
+
'&:focus-visible': {
|
|
1621
|
+
borderColor: activeBorderColor,
|
|
1622
|
+
...focusRingStyles,
|
|
1623
|
+
},
|
|
1624
|
+
...(disabled && {
|
|
1625
|
+
opacity: 0.5,
|
|
1626
|
+
pointerEvents: 'none',
|
|
1627
|
+
cursor: 'not-allowed',
|
|
1628
|
+
}),
|
|
1629
|
+
};
|
|
1630
|
+
});
|
|
1631
|
+
const LargeTopSection = styled('div')({
|
|
1632
|
+
display: 'flex',
|
|
1633
|
+
flexDirection: 'column',
|
|
1634
|
+
gap: spacing.spacing_2,
|
|
1635
|
+
alignItems: 'flex-start',
|
|
1636
|
+
width: '100%',
|
|
1637
|
+
flexShrink: 0,
|
|
1638
|
+
});
|
|
1639
|
+
const LargeHeaderRow = styled('div')({
|
|
1640
|
+
display: 'flex',
|
|
1641
|
+
gap: spacing.spacing_1,
|
|
1642
|
+
alignItems: 'center',
|
|
1643
|
+
flexShrink: 0,
|
|
1644
|
+
});
|
|
1645
|
+
const LargeHeaderSlot = styled('div')({
|
|
1646
|
+
display: 'flex',
|
|
1647
|
+
flexDirection: 'column',
|
|
1648
|
+
alignItems: 'center',
|
|
1649
|
+
justifyContent: 'center',
|
|
1650
|
+
width: 20,
|
|
1651
|
+
height: 20,
|
|
1652
|
+
flexShrink: 0,
|
|
1653
|
+
});
|
|
1654
|
+
const LargeHeaderTitle = styled('span', {
|
|
1655
|
+
shouldForwardProp: prop => prop !== 'cardTheme',
|
|
1656
|
+
})(({ cardTheme = 'light' }) => ({
|
|
1657
|
+
fontFamily: `${typography.fontFamily.heading}, sans-serif`,
|
|
1658
|
+
fontWeight: typography.fontWeight.semiBold,
|
|
1659
|
+
fontSize: typography.fontSize.h6,
|
|
1660
|
+
lineHeight: 1.4,
|
|
1661
|
+
color: cardTheme === 'light' ? colors.grey[800] : semanticColors.surfaces.white,
|
|
1662
|
+
flexShrink: 0,
|
|
1663
|
+
}));
|
|
1664
|
+
const LargeDescription = styled('p', {
|
|
1665
|
+
shouldForwardProp: prop => prop !== 'cardTheme',
|
|
1666
|
+
})(({ cardTheme = 'light' }) => ({
|
|
1667
|
+
fontFamily: `${typography.fontFamily.body}, sans-serif`,
|
|
1668
|
+
fontWeight: typography.fontWeight.regular,
|
|
1669
|
+
fontSize: typography.fontSize.xs,
|
|
1670
|
+
lineHeight: 1.5,
|
|
1671
|
+
color: cardTheme === 'light' ? colors.grey[800] : semanticColors.surfaces.white,
|
|
1672
|
+
margin: 0,
|
|
1673
|
+
minWidth: '100%',
|
|
1674
|
+
wordWrap: 'break-word',
|
|
1675
|
+
}));
|
|
1676
|
+
const LargeButtonsRow = styled('div')({
|
|
1677
|
+
display: 'flex',
|
|
1678
|
+
gap: spacing.spacing_3,
|
|
1679
|
+
alignItems: 'flex-start',
|
|
1680
|
+
flexShrink: 0,
|
|
1681
|
+
});
|
|
1682
|
+
// ─── Internal implementations ────────────────────────────────────────────────
|
|
1683
|
+
const SmallCardImpl = ({ logo, recipeCount, title, description, selected = false, disabled = false, onClick, ...props }) => {
|
|
1684
|
+
return (jsxs(SmallStyledCard, { selected: selected, disabled: disabled, onClick: disabled ? undefined : onClick, tabIndex: disabled ? -1 : 0, role: "button", "aria-disabled": disabled, "aria-pressed": selected, ...props, children: [jsxs(SmallCardHeader, { children: [jsx(SmallLogoContainer, { children: logo }), jsx(SmallRecipeCount, { children: recipeCount })] }), jsxs(SmallCardContent, { children: [jsx(SmallTitle, { children: title }), jsx(SmallDescription, { children: description })] })] }));
|
|
1685
|
+
};
|
|
1686
|
+
const LargeCardImpl = ({ disabled = false, cardTheme = 'light', showIcon = true, showGel = true, showButtons = true, icon, gel, title, children, actions, onClick, ...props }) => {
|
|
1687
|
+
return (jsxs(LargeStyledCard, { disabled: disabled, cardTheme: cardTheme, onClick: disabled ? undefined : onClick, tabIndex: disabled ? -1 : 0, "aria-disabled": disabled || undefined, ...props, children: [jsxs(LargeTopSection, { children: [jsxs(LargeHeaderRow, { children: [showIcon && icon && jsx(LargeHeaderSlot, { children: icon }), showGel && gel && jsx(LargeHeaderSlot, { children: gel }), title && jsx(LargeHeaderTitle, { cardTheme: cardTheme, children: title })] }), children && jsx(LargeDescription, { cardTheme: cardTheme, children: children })] }), showButtons && actions && jsx(LargeButtonsRow, { children: actions })] }));
|
|
1688
|
+
};
|
|
1689
|
+
// ─── Exported component ──────────────────────────────────────────────────────
|
|
1690
|
+
const NeoCard = (props) => {
|
|
1691
|
+
if (props.size === 'small') {
|
|
1692
|
+
const { size: _, ...rest } = props;
|
|
1693
|
+
return jsx(SmallCardImpl, { ...rest });
|
|
1694
|
+
}
|
|
1695
|
+
const { size: _, ...rest } = props;
|
|
1696
|
+
return jsx(LargeCardImpl, { ...rest });
|
|
1697
|
+
};
|
|
1698
|
+
NeoCard.displayName = 'NeoCard';
|
|
1699
|
+
|
|
1530
1700
|
// Border radius per size (from Figma)
|
|
1531
1701
|
const borderRadiusConfig = {
|
|
1532
1702
|
xs: 2,
|
|
@@ -1600,6 +1770,7 @@ const StyledCheckbox = styled(Checkbox, {
|
|
|
1600
1770
|
padding: 0,
|
|
1601
1771
|
marginTop: size === 'xs' ? 3 : 2,
|
|
1602
1772
|
color: semanticColors.border.primary,
|
|
1773
|
+
borderRadius: config.borderRadius,
|
|
1603
1774
|
flexShrink: 0,
|
|
1604
1775
|
// Root element
|
|
1605
1776
|
[`&.${checkboxClasses.root}`]: {
|
|
@@ -1650,7 +1821,7 @@ const StyledCheckbox = styled(Checkbox, {
|
|
|
1650
1821
|
/**
|
|
1651
1822
|
* NeoCheckbox - Checkbox component based on MUI Checkbox
|
|
1652
1823
|
*
|
|
1653
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=
|
|
1824
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=11487-81
|
|
1654
1825
|
*
|
|
1655
1826
|
* Figma Props Mapping:
|
|
1656
1827
|
* - Checked (True|False) → checked prop
|
|
@@ -1806,9 +1977,9 @@ const IconWrapper$2 = styled('span')(({ theme, isMultiline }) => ({
|
|
|
1806
1977
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4187-30353
|
|
1807
1978
|
*
|
|
1808
1979
|
* Figma Props Mapping:
|
|
1809
|
-
* -
|
|
1810
|
-
* -
|
|
1811
|
-
* -
|
|
1980
|
+
* - Theme (Dark|Light) → variant (filled|outlined)
|
|
1981
|
+
* - Content (Multi|Inline) → size prop + auto-detected multiline
|
|
1982
|
+
* - Show icon → endIcon (ReactNode, unmappable: boolean vs ReactNode)
|
|
1812
1983
|
* - Text content → children prop
|
|
1813
1984
|
*/
|
|
1814
1985
|
const NeoCodeSnippet = ({ variant = 'outlined', size = 'small', endIcon, children, ...props }) => {
|
|
@@ -2676,9 +2847,9 @@ const StyledChip$1 = styled(Chip)(({ theme, size, variant, color }) => ({
|
|
|
2676
2847
|
* - state (Neutral|Error|Warning|Success|Info|Violet|Beta) → color (default|error|warning|success|info|violet|beta)
|
|
2677
2848
|
* - Label text → label prop
|
|
2678
2849
|
*/
|
|
2679
|
-
|
|
2850
|
+
function NeoTag({ size = 'small', variant = 'outlined', ...props }) {
|
|
2680
2851
|
return jsx(StyledChip$1, { size: size, variant: variant, ...props });
|
|
2681
|
-
}
|
|
2852
|
+
}
|
|
2682
2853
|
NeoTag.displayName = 'NeoTag';
|
|
2683
2854
|
|
|
2684
2855
|
/**
|
|
@@ -3638,6 +3809,84 @@ const NeoDot = ({ size = 'medium', variant = 'solid', color = 'neutral', ...prop
|
|
|
3638
3809
|
};
|
|
3639
3810
|
NeoDot.displayName = 'NeoDot';
|
|
3640
3811
|
|
|
3812
|
+
const StyledRoot$1 = styled(Paper)({
|
|
3813
|
+
padding: spacing.spacing_2,
|
|
3814
|
+
borderRadius: borderRadius.s,
|
|
3815
|
+
backgroundColor: semanticColors.surfaces.snackbarDarkMode,
|
|
3816
|
+
color: colors.grey['800'],
|
|
3817
|
+
border: `1px solid ${semanticColors.border.primary}`,
|
|
3818
|
+
display: 'flex',
|
|
3819
|
+
flexDirection: 'column',
|
|
3820
|
+
gap: spacing.spacing_3,
|
|
3821
|
+
});
|
|
3822
|
+
const Title = styled('p')(({ theme }) => ({
|
|
3823
|
+
margin: 0,
|
|
3824
|
+
fontSize: theme.typography.pxToRem(typography.fontSize.sm),
|
|
3825
|
+
fontWeight: typography.fontWeight.semiBold,
|
|
3826
|
+
lineHeight: 1.4,
|
|
3827
|
+
color: colors.grey['700'],
|
|
3828
|
+
}));
|
|
3829
|
+
const FileName = styled('p')(({ theme }) => ({
|
|
3830
|
+
margin: 0,
|
|
3831
|
+
fontSize: theme.typography.pxToRem(typography.fontSize.xs),
|
|
3832
|
+
fontWeight: typography.fontWeight.medium,
|
|
3833
|
+
lineHeight: 1.5,
|
|
3834
|
+
color: colors.grey['800'],
|
|
3835
|
+
overflow: 'hidden',
|
|
3836
|
+
textOverflow: 'ellipsis',
|
|
3837
|
+
whiteSpace: 'nowrap',
|
|
3838
|
+
minWidth: 0,
|
|
3839
|
+
}));
|
|
3840
|
+
const ProgressLabel$1 = styled('p')(({ theme }) => ({
|
|
3841
|
+
margin: 0,
|
|
3842
|
+
fontSize: theme.typography.pxToRem(typography.fontSize.xs),
|
|
3843
|
+
fontWeight: typography.fontWeight.medium,
|
|
3844
|
+
lineHeight: 1.5,
|
|
3845
|
+
color: colors.grey['800'],
|
|
3846
|
+
flexShrink: 0,
|
|
3847
|
+
}));
|
|
3848
|
+
const StyledLinearProgress$1 = styled(LinearProgress)({
|
|
3849
|
+
width: '100%',
|
|
3850
|
+
height: spacing.spacing_1,
|
|
3851
|
+
borderRadius: borderRadius.s,
|
|
3852
|
+
backgroundColor: colors.grey['200'],
|
|
3853
|
+
[`& .${linearProgressClasses.bar}`]: {
|
|
3854
|
+
backgroundColor: semanticColors.buttons.primary.default,
|
|
3855
|
+
borderRadius: `${borderRadius.xS}px 0 0 ${borderRadius.xS}px`,
|
|
3856
|
+
},
|
|
3857
|
+
});
|
|
3858
|
+
const ActionButton = styled(IconButton)({
|
|
3859
|
+
padding: 0,
|
|
3860
|
+
width: spacing.spacing_2,
|
|
3861
|
+
height: spacing.spacing_2,
|
|
3862
|
+
color: colors.grey['500'],
|
|
3863
|
+
'&:hover': {
|
|
3864
|
+
backgroundColor: 'transparent',
|
|
3865
|
+
},
|
|
3866
|
+
});
|
|
3867
|
+
/**
|
|
3868
|
+
* NeoDownloadToast - Standalone download progress toast notification
|
|
3869
|
+
*
|
|
3870
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=3377-26954
|
|
3871
|
+
*/
|
|
3872
|
+
const NeoDownloadToast = ({ title, fileName, progress, showClose = true, showPause = true, onClose, onPause, actions, ...props }) => {
|
|
3873
|
+
const renderActions = () => {
|
|
3874
|
+
if (actions)
|
|
3875
|
+
return actions;
|
|
3876
|
+
const hasActions = showPause || showClose;
|
|
3877
|
+
if (!hasActions)
|
|
3878
|
+
return null;
|
|
3879
|
+
return (jsxs(Stack, { direction: "row", gap: `${spacing.spacing_2}px`, sx: { alignItems: 'center' }, children: [showPause && (jsx(ActionButton, { size: "small", onClick: onPause, "aria-label": "Pause download", children: jsx(Minus, { size: spacing.spacing_2 }) })), showClose && (jsx(ActionButton, { size: "small", onClick: onClose, "aria-label": "Close", children: jsx(X, { size: spacing.spacing_2 }) }))] }));
|
|
3880
|
+
};
|
|
3881
|
+
return (jsxs(StyledRoot$1, { elevation: 0, role: "status", ...props, children: [jsxs(Stack, { direction: "row", sx: {
|
|
3882
|
+
alignItems: 'flex-start',
|
|
3883
|
+
justifyContent: 'space-between',
|
|
3884
|
+
width: '100%',
|
|
3885
|
+
gap: `${spacing.spacing_4}px`,
|
|
3886
|
+
}, children: [title && jsx(Title, { children: title }), renderActions()] }), jsxs(Stack, { gap: `${spacing.spacing_1}px`, sx: { width: '100%' }, children: [jsxs(Stack, { direction: "row", gap: `${spacing.spacing_2}px`, sx: { alignItems: 'flex-end', justifyContent: 'space-between', width: '100%' }, children: [fileName && jsx(FileName, { children: fileName }), progress !== undefined && jsxs(ProgressLabel$1, { children: [progress, "%"] })] }), jsx(StyledLinearProgress$1, { variant: "determinate", value: progress ?? 0 })] })] }));
|
|
3887
|
+
};
|
|
3888
|
+
NeoDownloadToast.displayName = 'NeoDownloadToast';
|
|
3889
|
+
|
|
3641
3890
|
const StyledMenu = styled(Menu)(({ theme }) => ({
|
|
3642
3891
|
[`& .${paperClasses.root}`]: {
|
|
3643
3892
|
backgroundColor: semanticColors.surfaces.white,
|
|
@@ -4245,7 +4494,7 @@ const InfoIconWrapper = styled('span')({
|
|
|
4245
4494
|
});
|
|
4246
4495
|
const StyledInputBase = styled(InputBase, {
|
|
4247
4496
|
shouldForwardProp: prop => prop !== 'size' && prop !== 'destructive',
|
|
4248
|
-
})(({ theme, size = 'medium', destructive, startAdornment }) => {
|
|
4497
|
+
})(({ theme, size = 'medium', destructive, startAdornment, multiline }) => {
|
|
4249
4498
|
const sizeConfig = {
|
|
4250
4499
|
small: {
|
|
4251
4500
|
height: spacing.spacing_5,
|
|
@@ -4262,7 +4511,7 @@ const StyledInputBase = styled(InputBase, {
|
|
|
4262
4511
|
};
|
|
4263
4512
|
const sizeStyles = sizeConfig[size];
|
|
4264
4513
|
return {
|
|
4265
|
-
height: sizeStyles.height,
|
|
4514
|
+
height: multiline ? 'auto' : sizeStyles.height,
|
|
4266
4515
|
fontSize: sizeStyles.fontSize,
|
|
4267
4516
|
borderRadius: sizeStyles.borderRadius,
|
|
4268
4517
|
backgroundColor: semanticColors.input.background,
|
|
@@ -4732,271 +4981,36 @@ const NeoListItemButton = ({ children, selected = false, disabled = false, ...pr
|
|
|
4732
4981
|
NeoListItemButton.displayName = 'NeoListItemButton';
|
|
4733
4982
|
|
|
4734
4983
|
/**
|
|
4735
|
-
*
|
|
4736
|
-
*/
|
|
4737
|
-
const activeShadow$1 = `${shadows.card.x}px ${shadows.card.y}px ${shadows.card.blur}px ${shadows.card.spread}px ${shadows.card.shadow}`;
|
|
4738
|
-
/**
|
|
4739
|
-
* Styled Card component with Neo design tokens
|
|
4740
|
-
*/
|
|
4741
|
-
const StyledCard = styled(MuiCard, {
|
|
4742
|
-
shouldForwardProp: prop => prop !== 'selected' && prop !== 'disabled',
|
|
4743
|
-
})(({ theme, selected, disabled }) => ({
|
|
4744
|
-
width: 160,
|
|
4745
|
-
height: 160,
|
|
4746
|
-
padding: theme.spacing(1.5), // 12px
|
|
4747
|
-
display: 'flex',
|
|
4748
|
-
flexDirection: 'column',
|
|
4749
|
-
gap: theme.spacing(2), // 16px
|
|
4750
|
-
backgroundColor: semanticColors.surfaces.card,
|
|
4751
|
-
border: `1px solid ${selected ? semanticColors.buttons.primary.default : semanticColors.border.primary}`,
|
|
4752
|
-
borderRadius: borderRadius.xS,
|
|
4753
|
-
boxShadow: selected ? activeShadow$1 : 'none',
|
|
4754
|
-
transition: theme.transitions.create(['border-color', 'background-color', 'box-shadow']),
|
|
4755
|
-
cursor: 'pointer',
|
|
4756
|
-
'&:hover': {
|
|
4757
|
-
borderColor: semanticColors.buttons.primary.default,
|
|
4758
|
-
boxShadow: activeShadow$1,
|
|
4759
|
-
},
|
|
4760
|
-
'&:focus-visible': {
|
|
4761
|
-
borderColor: semanticColors.buttons.primary.default,
|
|
4762
|
-
...focusRingStyles,
|
|
4763
|
-
},
|
|
4764
|
-
...(disabled && {
|
|
4765
|
-
opacity: 0.5,
|
|
4766
|
-
pointerEvents: 'none',
|
|
4767
|
-
cursor: 'not-allowed',
|
|
4768
|
-
}),
|
|
4769
|
-
}));
|
|
4770
|
-
/**
|
|
4771
|
-
* Header section containing logo and recipe count
|
|
4772
|
-
*/
|
|
4773
|
-
const CardHeader = styled('div')({
|
|
4774
|
-
display: 'flex',
|
|
4775
|
-
alignItems: 'flex-start',
|
|
4776
|
-
justifyContent: 'space-between',
|
|
4777
|
-
width: '100%',
|
|
4778
|
-
});
|
|
4779
|
-
/**
|
|
4780
|
-
* Logo container
|
|
4781
|
-
*/
|
|
4782
|
-
const LogoContainer = styled('div')({
|
|
4783
|
-
width: spacing.spacing_6,
|
|
4784
|
-
height: spacing.spacing_6,
|
|
4785
|
-
flexShrink: 0,
|
|
4786
|
-
});
|
|
4787
|
-
/**
|
|
4788
|
-
* Recipe count badge
|
|
4789
|
-
*/
|
|
4790
|
-
const RecipeCount = styled('p')(({ theme }) => ({
|
|
4791
|
-
margin: 0,
|
|
4792
|
-
fontSize: theme.typography.pxToRem(typography.fontSize.xxs), // 10px
|
|
4793
|
-
fontWeight: typography.fontWeight.semiBold, // 600
|
|
4794
|
-
lineHeight: 1.2,
|
|
4795
|
-
color: colors.grey[800],
|
|
4796
|
-
whiteSpace: 'nowrap',
|
|
4797
|
-
}));
|
|
4798
|
-
/**
|
|
4799
|
-
* Content section containing title and description
|
|
4800
|
-
*/
|
|
4801
|
-
const CardContent = styled('div')(({ theme }) => ({
|
|
4802
|
-
display: 'flex',
|
|
4803
|
-
flexDirection: 'column',
|
|
4804
|
-
gap: theme.spacing(2), // 16px
|
|
4805
|
-
width: '100%',
|
|
4806
|
-
}));
|
|
4807
|
-
/**
|
|
4808
|
-
* Title text
|
|
4809
|
-
*/
|
|
4810
|
-
const Title = styled('p')(({ theme }) => ({
|
|
4811
|
-
margin: 0,
|
|
4812
|
-
fontSize: theme.typography.pxToRem(typography.fontSize.h6), // 16px
|
|
4813
|
-
fontWeight: typography.fontWeight.semiBold, // 600
|
|
4814
|
-
lineHeight: 1.4,
|
|
4815
|
-
color: colors.grey[800],
|
|
4816
|
-
width: '100%',
|
|
4817
|
-
}));
|
|
4818
|
-
/**
|
|
4819
|
-
* Description text
|
|
4820
|
-
*/
|
|
4821
|
-
const Description$1 = styled('p')(({ theme }) => ({
|
|
4822
|
-
margin: 0,
|
|
4823
|
-
fontSize: theme.typography.pxToRem(typography.fontSize.xs), // 12px
|
|
4824
|
-
fontWeight: typography.fontWeight.regular, // 400
|
|
4825
|
-
lineHeight: 1.5,
|
|
4826
|
-
color: colors.grey[800],
|
|
4827
|
-
width: '100%',
|
|
4828
|
-
display: '-webkit-box',
|
|
4829
|
-
WebkitLineClamp: 2,
|
|
4830
|
-
WebkitBoxOrient: 'vertical',
|
|
4831
|
-
overflow: 'hidden',
|
|
4832
|
-
textOverflow: 'ellipsis',
|
|
4833
|
-
}));
|
|
4834
|
-
/**
|
|
4835
|
-
* NeoMarketplaceCard - Selectable card component for marketplace items
|
|
4836
|
-
*
|
|
4837
|
-
* A fixed-size card (160x160px) displaying a logo, recipe count, title, and description.
|
|
4838
|
-
* Supports selected (active), disabled, and focused states.
|
|
4984
|
+
* @deprecated Use `NeoCard` with `size="small"` instead.
|
|
4839
4985
|
*
|
|
4840
4986
|
* @example
|
|
4841
4987
|
* ```tsx
|
|
4842
|
-
*
|
|
4843
|
-
*
|
|
4844
|
-
* recipeCount="1,260 recipes"
|
|
4845
|
-
* title="Java"
|
|
4846
|
-
* description="Basic building blocks for transforming Java..."
|
|
4847
|
-
* selected={false}
|
|
4848
|
-
* disabled={false}
|
|
4849
|
-
* onClick={() => console.log('clicked')}
|
|
4850
|
-
* />
|
|
4851
|
-
* ```
|
|
4988
|
+
* // Before
|
|
4989
|
+
* <NeoMarketplaceCard logo={...} title="Java" ... />
|
|
4852
4990
|
*
|
|
4853
|
-
*
|
|
4854
|
-
*
|
|
4855
|
-
*
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
* - State="Hover" → CSS :hover state (not a prop)
|
|
4860
|
-
* - State="Default" → Base state (no props)
|
|
4861
|
-
*
|
|
4862
|
-
* Design Tokens Used:
|
|
4863
|
-
* - semanticColors.surfaces.card (#FFFFFF) - Default card background
|
|
4864
|
-
* - semanticColors.status.info.light (#f2f3ff) - Active/focused card background
|
|
4865
|
-
* - semanticColors.border.primary (#d1d5db) - Default border
|
|
4866
|
-
* - semanticColors.buttons.primary.default (#2f42ff) - Active/focused border
|
|
4867
|
-
* - shadows.focusWhite1 - Inner white focus ring (2px spread)
|
|
4868
|
-
* - shadows.focusBlue2 - Outer blue focus ring (4px spread)
|
|
4869
|
-
* - colors.grey[800] (#1F2937) - Text color
|
|
4870
|
-
* - typography.fontSize.xxs (10px) - Recipe count
|
|
4871
|
-
* - typography.fontSize.xs (12px) - Description
|
|
4872
|
-
* - typography.fontSize.h6 (16px) - Title
|
|
4873
|
-
* - typography.fontWeight.semiBold (600) - Title and recipe count
|
|
4874
|
-
* - typography.fontWeight.regular (400) - Description
|
|
4875
|
-
*/
|
|
4876
|
-
const NeoMarketplaceCard = ({ logo, recipeCount, title, description, selected = false, disabled = false, onClick, ...props }) => {
|
|
4877
|
-
return (jsxs(StyledCard, { selected: selected, disabled: disabled, onClick: disabled ? undefined : onClick, tabIndex: disabled ? -1 : 0, role: "button", "aria-disabled": disabled, "aria-pressed": selected, ...props, children: [jsxs(CardHeader, { children: [jsx(LogoContainer, { children: logo }), jsx(RecipeCount, { children: recipeCount })] }), jsxs(CardContent, { children: [jsx(Title, { children: title }), jsx(Description$1, { children: description })] })] }));
|
|
4991
|
+
* // After
|
|
4992
|
+
* <NeoCard size="small" logo={...} title="Java" ... />
|
|
4993
|
+
* ```
|
|
4994
|
+
*/
|
|
4995
|
+
const NeoMarketplaceCard = (props) => {
|
|
4996
|
+
return jsx(NeoCard, { size: "small", ...props });
|
|
4878
4997
|
};
|
|
4879
4998
|
NeoMarketplaceCard.displayName = 'NeoMarketplaceCard';
|
|
4880
4999
|
|
|
4881
|
-
const activeShadow = `${shadows.card.x}px ${shadows.card.y}px ${shadows.card.blur}px ${shadows.card.spread}px ${shadows.card.shadow}`;
|
|
4882
|
-
const StyledLargeCard = styled(MuiCard, {
|
|
4883
|
-
shouldForwardProp: prop => prop !== 'cardState' && prop !== 'cardTheme',
|
|
4884
|
-
})(({ cardState = 'default', cardTheme = 'light' }) => {
|
|
4885
|
-
const isLight = cardTheme === 'light';
|
|
4886
|
-
const isActive = cardState === 'active';
|
|
4887
|
-
const isDisabled = cardState === 'disabled';
|
|
4888
|
-
const isFocused = cardState === 'focused';
|
|
4889
|
-
const activeBorderColor = isLight
|
|
4890
|
-
? semanticColors.buttons.primary.default
|
|
4891
|
-
: colors.digitalGreen[300];
|
|
4892
|
-
const defaultBorderColor = isLight
|
|
4893
|
-
? semanticColors.border.primary
|
|
4894
|
-
: `${semanticColors.border.primary}80`;
|
|
4895
|
-
return {
|
|
4896
|
-
width: 340,
|
|
4897
|
-
height: 162,
|
|
4898
|
-
display: 'flex',
|
|
4899
|
-
flexDirection: 'column',
|
|
4900
|
-
justifyContent: 'space-between',
|
|
4901
|
-
alignItems: 'flex-start',
|
|
4902
|
-
padding: spacing.spacing_2,
|
|
4903
|
-
borderRadius: borderRadius.xS,
|
|
4904
|
-
backgroundColor: isLight ? semanticColors.surfaces.card : colors.grey[800],
|
|
4905
|
-
border: `1px solid ${isActive || isFocused ? activeBorderColor : defaultBorderColor}`,
|
|
4906
|
-
boxShadow: isActive ? activeShadow : 'none',
|
|
4907
|
-
overflow: 'hidden',
|
|
4908
|
-
...(isFocused && focusRingStyles),
|
|
4909
|
-
'&:focus-visible': {
|
|
4910
|
-
borderColor: isLight ? semanticColors.buttons.primary.default : colors.digitalGreen[300],
|
|
4911
|
-
...focusRingStyles,
|
|
4912
|
-
},
|
|
4913
|
-
...(isDisabled && {
|
|
4914
|
-
opacity: 0.5,
|
|
4915
|
-
pointerEvents: 'none',
|
|
4916
|
-
cursor: 'not-allowed',
|
|
4917
|
-
}),
|
|
4918
|
-
};
|
|
4919
|
-
});
|
|
4920
|
-
const TopSection = styled('div')({
|
|
4921
|
-
display: 'flex',
|
|
4922
|
-
flexDirection: 'column',
|
|
4923
|
-
gap: spacing.spacing_2,
|
|
4924
|
-
alignItems: 'flex-start',
|
|
4925
|
-
width: '100%',
|
|
4926
|
-
flexShrink: 0,
|
|
4927
|
-
});
|
|
4928
|
-
const HeaderRow = styled('div')({
|
|
4929
|
-
display: 'flex',
|
|
4930
|
-
gap: spacing.spacing_1,
|
|
4931
|
-
alignItems: 'center',
|
|
4932
|
-
flexShrink: 0,
|
|
4933
|
-
});
|
|
4934
|
-
const HeaderSlot = styled('div')({
|
|
4935
|
-
display: 'flex',
|
|
4936
|
-
flexDirection: 'column',
|
|
4937
|
-
alignItems: 'center',
|
|
4938
|
-
justifyContent: 'center',
|
|
4939
|
-
width: 20,
|
|
4940
|
-
height: 20,
|
|
4941
|
-
flexShrink: 0,
|
|
4942
|
-
});
|
|
4943
|
-
const HeaderTitle = styled('span', {
|
|
4944
|
-
shouldForwardProp: prop => prop !== 'cardTheme',
|
|
4945
|
-
})(({ cardTheme = 'light' }) => ({
|
|
4946
|
-
fontFamily: `${typography.fontFamily.heading}, sans-serif`,
|
|
4947
|
-
fontWeight: typography.fontWeight.semiBold,
|
|
4948
|
-
fontSize: typography.fontSize.h6,
|
|
4949
|
-
lineHeight: 1.4,
|
|
4950
|
-
color: cardTheme === 'light' ? colors.grey[800] : semanticColors.surfaces.white,
|
|
4951
|
-
flexShrink: 0,
|
|
4952
|
-
}));
|
|
4953
|
-
const Description = styled('p', {
|
|
4954
|
-
shouldForwardProp: prop => prop !== 'cardTheme',
|
|
4955
|
-
})(({ cardTheme = 'light' }) => ({
|
|
4956
|
-
fontFamily: `${typography.fontFamily.body}, sans-serif`,
|
|
4957
|
-
fontWeight: typography.fontWeight.regular,
|
|
4958
|
-
fontSize: typography.fontSize.xs,
|
|
4959
|
-
lineHeight: 1.5,
|
|
4960
|
-
color: cardTheme === 'light' ? colors.grey[800] : semanticColors.surfaces.white,
|
|
4961
|
-
margin: 0,
|
|
4962
|
-
minWidth: '100%',
|
|
4963
|
-
wordWrap: 'break-word',
|
|
4964
|
-
}));
|
|
4965
|
-
const ButtonsRow = styled('div')({
|
|
4966
|
-
display: 'flex',
|
|
4967
|
-
gap: spacing.spacing_3,
|
|
4968
|
-
alignItems: 'flex-start',
|
|
4969
|
-
flexShrink: 0,
|
|
4970
|
-
});
|
|
4971
5000
|
/**
|
|
4972
|
-
*
|
|
4973
|
-
*
|
|
4974
|
-
* A 340x162px card with optional icon, gel brand icon, title, description, and action buttons.
|
|
4975
|
-
* Icon, gel, and title display inline in a header row.
|
|
4976
|
-
* Supports 4 states (default, active, disabled, focused) and 2 themes (light, dark).
|
|
5001
|
+
* @deprecated Use `NeoCard` with `size="large"` instead.
|
|
4977
5002
|
*
|
|
4978
|
-
* @
|
|
4979
|
-
*
|
|
4980
|
-
*
|
|
4981
|
-
*
|
|
4982
|
-
* - Theme → cardTheme (Dark/Light)
|
|
4983
|
-
* - Show Icon → showIcon
|
|
4984
|
-
* - Show Gel → showGel
|
|
4985
|
-
* - Show Buttons → showButtons
|
|
5003
|
+
* @example
|
|
5004
|
+
* ```tsx
|
|
5005
|
+
* // Before
|
|
5006
|
+
* <NeoMarketplaceLargeCard cardTheme="light" ... />
|
|
4986
5007
|
*
|
|
4987
|
-
*
|
|
4988
|
-
*
|
|
4989
|
-
*
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
* - borderRadius.xS (4px) - Corner radius
|
|
4994
|
-
* - shadows.focusWhite1 + shadows.focusBlue2 - Focus ring
|
|
4995
|
-
* - shadows.card - Active state shadow
|
|
4996
|
-
*/
|
|
4997
|
-
const NeoMarketplaceLargeCard = ({ state = 'default', cardTheme = 'light', showIcon = true, showGel = true, showButtons = true, icon, gel, title, children, actions, onClick, ...props }) => {
|
|
4998
|
-
const isDisabled = state === 'disabled';
|
|
4999
|
-
return (jsxs(StyledLargeCard, { cardState: state, cardTheme: cardTheme, onClick: isDisabled ? undefined : onClick, tabIndex: isDisabled ? -1 : 0, "aria-disabled": isDisabled || undefined, ...props, children: [jsxs(TopSection, { children: [jsxs(HeaderRow, { children: [showIcon && icon && jsx(HeaderSlot, { children: icon }), showGel && gel && jsx(HeaderSlot, { children: gel }), title && jsx(HeaderTitle, { cardTheme: cardTheme, children: title })] }), children && jsx(Description, { cardTheme: cardTheme, children: children })] }), showButtons && actions && jsx(ButtonsRow, { children: actions })] }));
|
|
5008
|
+
* // After
|
|
5009
|
+
* <NeoCard size="large" cardTheme="light" ... />
|
|
5010
|
+
* ```
|
|
5011
|
+
*/
|
|
5012
|
+
const NeoMarketplaceLargeCard = (props) => {
|
|
5013
|
+
return jsx(NeoCard, { size: "large", ...props });
|
|
5000
5014
|
};
|
|
5001
5015
|
NeoMarketplaceLargeCard.displayName = 'NeoMarketplaceLargeCard';
|
|
5002
5016
|
|
|
@@ -5223,15 +5237,14 @@ const StyledRoot = styled(ButtonBase, {
|
|
|
5223
5237
|
})(({ selected }) => ({
|
|
5224
5238
|
display: 'flex',
|
|
5225
5239
|
flexDirection: 'column',
|
|
5226
|
-
gap: spacing.
|
|
5240
|
+
gap: spacing.spacing_1_2, // 4px
|
|
5227
5241
|
alignItems: 'center',
|
|
5228
5242
|
justifyContent: 'center',
|
|
5229
5243
|
paddingTop: spacing.spacing_1, // 8px
|
|
5230
5244
|
paddingBottom: spacing.spacing_1, // 8px
|
|
5231
5245
|
paddingLeft: spacing.spacing_1_2, // 4px
|
|
5232
5246
|
paddingRight: spacing.spacing_1_2, // 4px
|
|
5233
|
-
borderRadius: borderRadius.
|
|
5234
|
-
width: 95,
|
|
5247
|
+
borderRadius: borderRadius.s, // 8px
|
|
5235
5248
|
cursor: 'pointer',
|
|
5236
5249
|
textDecoration: 'none',
|
|
5237
5250
|
'&:hover .neo-nav-icon-padding': {
|
|
@@ -5277,7 +5290,7 @@ const IconPadding = styled('span')({
|
|
|
5277
5290
|
display: 'flex',
|
|
5278
5291
|
alignItems: 'center',
|
|
5279
5292
|
padding: spacing.spacing_1, // 8px
|
|
5280
|
-
borderRadius:
|
|
5293
|
+
borderRadius: borderRadius.s, // 8px
|
|
5281
5294
|
border: '1px solid transparent',
|
|
5282
5295
|
transition: 'background-color 150ms, border-color 150ms',
|
|
5283
5296
|
});
|
|
@@ -5537,7 +5550,7 @@ function NeoPaginatedGrid({ slots, pageSizeOptions, slotProps: userSlotProps, ..
|
|
|
5537
5550
|
}
|
|
5538
5551
|
NeoPaginatedGrid.displayName = 'NeoPaginatedGrid';
|
|
5539
5552
|
|
|
5540
|
-
const StyledLinearProgress
|
|
5553
|
+
const StyledLinearProgress = styled(LinearProgress, {
|
|
5541
5554
|
shouldForwardProp: prop => prop !== 'labelPosition',
|
|
5542
5555
|
})(() => ({
|
|
5543
5556
|
height: 8,
|
|
@@ -5582,7 +5595,7 @@ const ProgressWrapper = styled('div')(({ labelPosition }) => ({
|
|
|
5582
5595
|
flexDirection: 'row',
|
|
5583
5596
|
}),
|
|
5584
5597
|
}));
|
|
5585
|
-
const ProgressLabel
|
|
5598
|
+
const ProgressLabel = styled(Typography)(({ theme }) => ({
|
|
5586
5599
|
fontSize: theme.typography.pxToRem(typography.fontSize.sm),
|
|
5587
5600
|
fontWeight: typography.fontWeight.medium,
|
|
5588
5601
|
color: colors.grey[800],
|
|
@@ -5611,7 +5624,7 @@ const ProgressBarContainer = styled('div')(({ labelPosition }) => ({
|
|
|
5611
5624
|
const NeoProgressbar = ({ value = 0, labelPosition = 'none', variant = 'default', labelText, ...props }) => {
|
|
5612
5625
|
const showLabel = labelPosition !== 'none';
|
|
5613
5626
|
const displayLabel = labelText || (variant === 'cancelled' ? 'Canceled' : `${Math.round(value)}%`);
|
|
5614
|
-
return (jsxs(ProgressWrapper, { labelPosition: labelPosition, children: [jsx(ProgressBarContainer, { labelPosition: labelPosition, children: jsx(StyledLinearProgress
|
|
5627
|
+
return (jsxs(ProgressWrapper, { labelPosition: labelPosition, children: [jsx(ProgressBarContainer, { labelPosition: labelPosition, children: jsx(StyledLinearProgress, { variant: "determinate", value: variant === 'cancelled' ? 100 : value, "data-variant": variant, labelPosition: labelPosition, ...props }) }), showLabel && jsx(ProgressLabel, { children: displayLabel })] }));
|
|
5615
5628
|
};
|
|
5616
5629
|
NeoProgressbar.displayName = 'NeoProgressbar';
|
|
5617
5630
|
|
|
@@ -5713,17 +5726,19 @@ const NeoQuickFilter = ({ placeholder = 'Search...', onKeyDown, autoFocus = fals
|
|
|
5713
5726
|
NeoQuickFilter.displayName = 'NeoQuickFilter';
|
|
5714
5727
|
|
|
5715
5728
|
// Custom radio icons to match Figma design
|
|
5716
|
-
const UncheckedIcon = ({ size }) => {
|
|
5729
|
+
const UncheckedIcon = ({ size, disabled }) => {
|
|
5717
5730
|
const dimensions = size === 'small' ? 16 : 20;
|
|
5718
5731
|
const radius = size === 'small' ? 8 : 10;
|
|
5719
|
-
return (jsxs("svg", { width: dimensions, height: dimensions, viewBox: `0 0 ${dimensions} ${dimensions}`, fill: "none", "aria-hidden": "true", children: [jsx("title", { children: "Unchecked radio button" }), jsx("circle", { cx: dimensions / 2, cy: dimensions / 2, r: radius - 0.5, stroke: semanticColors.border.primary, strokeWidth: "1", fill:
|
|
5732
|
+
return (jsxs("svg", { width: dimensions, height: dimensions, viewBox: `0 0 ${dimensions} ${dimensions}`, fill: "none", "aria-hidden": "true", children: [jsx("title", { children: "Unchecked radio button" }), jsx("circle", { cx: dimensions / 2, cy: dimensions / 2, r: radius - 0.5, stroke: semanticColors.border.primary, strokeWidth: "1", fill: disabled ? semanticColors.buttons.primary.disabled : 'transparent' })] }));
|
|
5720
5733
|
};
|
|
5721
|
-
const CheckedIcon = ({ size }) => {
|
|
5734
|
+
const CheckedIcon = ({ size, disabled }) => {
|
|
5722
5735
|
const dimensions = size === 'small' ? 16 : 20;
|
|
5723
5736
|
const radius = size === 'small' ? 8 : 10;
|
|
5724
5737
|
const inset = size === 'small' ? 0.3125 : 0.3; // 31.25% or 30%
|
|
5725
5738
|
const innerRadius = radius * (1 - 2 * inset);
|
|
5726
|
-
return (jsxs("svg", { width: dimensions, height: dimensions, viewBox: `0 0 ${dimensions} ${dimensions}`, fill: "none", "aria-hidden": "true", children: [jsx("title", { children: "Checked radio button" }), jsx("circle", { cx: dimensions / 2, cy: dimensions / 2, r: radius - 0.5, fill:
|
|
5739
|
+
return (jsxs("svg", { width: dimensions, height: dimensions, viewBox: `0 0 ${dimensions} ${dimensions}`, fill: "none", "aria-hidden": "true", children: [jsx("title", { children: "Checked radio button" }), jsx("circle", { cx: dimensions / 2, cy: dimensions / 2, r: radius - 0.5, fill: disabled
|
|
5740
|
+
? semanticColors.buttons.primary.disabled
|
|
5741
|
+
: semanticColors.buttons.primary.default, stroke: disabled ? semanticColors.border.primary : semanticColors.buttons.primary.default, strokeWidth: "1" }), jsx("circle", { cx: dimensions / 2, cy: dimensions / 2, r: innerRadius, fill: disabled ? semanticColors.icons.disabled : semanticColors.surfaces.white })] }));
|
|
5727
5742
|
};
|
|
5728
5743
|
const RadioContainer = styled('label')(({ disabled }) => ({
|
|
5729
5744
|
display: 'inline-flex',
|
|
@@ -5768,6 +5783,10 @@ const StyledRadio = styled(Radio, {
|
|
|
5768
5783
|
height: dimensions,
|
|
5769
5784
|
flexShrink: 0,
|
|
5770
5785
|
borderRadius: radius,
|
|
5786
|
+
color: semanticColors.border.primary,
|
|
5787
|
+
[`&.${radioClasses.checked}`]: {
|
|
5788
|
+
color: semanticColors.buttons.primary.default,
|
|
5789
|
+
},
|
|
5771
5790
|
'&:hover': {
|
|
5772
5791
|
backgroundColor: 'transparent',
|
|
5773
5792
|
},
|
|
@@ -5785,9 +5804,12 @@ const StyledRadio = styled(Radio, {
|
|
|
5785
5804
|
backgroundColor: 'transparent',
|
|
5786
5805
|
},
|
|
5787
5806
|
},
|
|
5788
|
-
// Disabled state
|
|
5807
|
+
// Disabled state — icons handle their own disabled colors
|
|
5789
5808
|
[`&.${radioClasses.disabled}`]: {
|
|
5790
|
-
|
|
5809
|
+
color: semanticColors.border.primary,
|
|
5810
|
+
[`&.${radioClasses.checked}`]: {
|
|
5811
|
+
color: semanticColors.border.primary,
|
|
5812
|
+
},
|
|
5791
5813
|
},
|
|
5792
5814
|
};
|
|
5793
5815
|
});
|
|
@@ -5795,7 +5817,6 @@ const StyledRadio = styled(Radio, {
|
|
|
5795
5817
|
* NeoRadio - Radio button component based on MUI Radio
|
|
5796
5818
|
*
|
|
5797
5819
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4122-40039
|
|
5798
|
-
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4122-40150
|
|
5799
5820
|
*
|
|
5800
5821
|
* Figma Props Mapping:
|
|
5801
5822
|
* - Checked (True|False) → checked prop
|
|
@@ -5835,9 +5856,9 @@ const StyledRadio = styled(Radio, {
|
|
|
5835
5856
|
* </RadioGroup>
|
|
5836
5857
|
*/
|
|
5837
5858
|
const NeoRadio = ({ size = 'medium', label, helperText, disabled, ...props }) => {
|
|
5838
|
-
// Custom icons based on size
|
|
5839
|
-
const uncheckedIcon = jsx(UncheckedIcon, { size: size });
|
|
5840
|
-
const checkedIcon = jsx(CheckedIcon, { size: size });
|
|
5859
|
+
// Custom icons based on size and disabled state
|
|
5860
|
+
const uncheckedIcon = jsx(UncheckedIcon, { size: size, disabled: disabled });
|
|
5861
|
+
const checkedIcon = jsx(CheckedIcon, { size: size, disabled: disabled });
|
|
5841
5862
|
// If no label, return just the radio button
|
|
5842
5863
|
if (!label && !helperText) {
|
|
5843
5864
|
return (jsx(StyledRadio, { size: size, disabled: disabled, icon: uncheckedIcon, checkedIcon: checkedIcon, ...props }));
|
|
@@ -6152,7 +6173,7 @@ NeoTab.displayName = 'NeoTab';
|
|
|
6152
6173
|
|
|
6153
6174
|
// biome-ignore lint/suspicious/noExplicitAny: Type cast required to override MUI Alert variant type without global augmentation
|
|
6154
6175
|
const StyledAlert = styled(Alert, {
|
|
6155
|
-
shouldForwardProp: prop => prop !== 'variant'
|
|
6176
|
+
shouldForwardProp: prop => prop !== 'variant',
|
|
6156
6177
|
})(({ theme, variant = 'default' }) => {
|
|
6157
6178
|
// Base styles
|
|
6158
6179
|
const baseStyles = {
|
|
@@ -6209,11 +6230,6 @@ const StyledAlert = styled(Alert, {
|
|
|
6209
6230
|
color: semanticColors.status.info.dark,
|
|
6210
6231
|
border: `1px solid ${semanticColors.status.info.default}`,
|
|
6211
6232
|
},
|
|
6212
|
-
download: {
|
|
6213
|
-
backgroundColor: semanticColors.surfaces.snackbarDarkMode,
|
|
6214
|
-
color: colors.grey['800'],
|
|
6215
|
-
border: `1px solid ${semanticColors.border.primary}`,
|
|
6216
|
-
},
|
|
6217
6233
|
};
|
|
6218
6234
|
return {
|
|
6219
6235
|
...baseStyles,
|
|
@@ -6228,7 +6244,6 @@ const ToastTitle = styled('p')(({ theme, variant = 'default' }) => {
|
|
|
6228
6244
|
error: semanticColors.status.error.dark,
|
|
6229
6245
|
success: semanticColors.status.success.dark,
|
|
6230
6246
|
info: semanticColors.status.info.dark,
|
|
6231
|
-
download: colors.grey['700'],
|
|
6232
6247
|
};
|
|
6233
6248
|
return {
|
|
6234
6249
|
margin: 0,
|
|
@@ -6246,7 +6261,6 @@ const ToastMessage = styled('p')(({ theme, variant = 'default' }) => {
|
|
|
6246
6261
|
error: semanticColors.status.error.dark,
|
|
6247
6262
|
success: semanticColors.status.success.dark,
|
|
6248
6263
|
info: semanticColors.status.info.dark,
|
|
6249
|
-
download: colors.grey['800'],
|
|
6250
6264
|
};
|
|
6251
6265
|
return {
|
|
6252
6266
|
margin: 0,
|
|
@@ -6284,7 +6298,7 @@ const ToastButton = styled(Button, {
|
|
|
6284
6298
|
if (toastVariant === 'info') {
|
|
6285
6299
|
return semanticColors.status.info.dark;
|
|
6286
6300
|
}
|
|
6287
|
-
// default
|
|
6301
|
+
// default variant uses icon placeholder color
|
|
6288
6302
|
return semanticColors.icons.placeholder;
|
|
6289
6303
|
};
|
|
6290
6304
|
return {
|
|
@@ -6301,68 +6315,20 @@ const ToastButton = styled(Button, {
|
|
|
6301
6315
|
},
|
|
6302
6316
|
};
|
|
6303
6317
|
});
|
|
6304
|
-
const ProgressSection = styled(Stack)({
|
|
6305
|
-
gap: spacing.spacing_1,
|
|
6306
|
-
width: '100%',
|
|
6307
|
-
});
|
|
6308
|
-
const FileName = styled('p')(({ theme }) => ({
|
|
6309
|
-
margin: 0,
|
|
6310
|
-
fontSize: theme.typography.pxToRem(typography.fontSize.xs),
|
|
6311
|
-
fontWeight: typography.fontWeight.medium,
|
|
6312
|
-
lineHeight: 1.5,
|
|
6313
|
-
color: colors.grey['800'],
|
|
6314
|
-
}));
|
|
6315
|
-
const ProgressLabel = styled('p')(({ theme }) => ({
|
|
6316
|
-
margin: 0,
|
|
6317
|
-
fontSize: theme.typography.pxToRem(typography.fontSize.xs),
|
|
6318
|
-
fontWeight: typography.fontWeight.medium,
|
|
6319
|
-
lineHeight: 1.5,
|
|
6320
|
-
color: colors.grey['800'],
|
|
6321
|
-
}));
|
|
6322
|
-
const StyledLinearProgress = styled(LinearProgress)({
|
|
6323
|
-
width: '100%',
|
|
6324
|
-
height: spacing.spacing_2,
|
|
6325
|
-
borderRadius: borderRadius.s,
|
|
6326
|
-
backgroundColor: colors.grey['200'],
|
|
6327
|
-
[`& .${linearProgressClasses.bar}`]: {
|
|
6328
|
-
backgroundColor: semanticColors.buttons.primary.default,
|
|
6329
|
-
borderRadius: `${borderRadius.xS}px 0 0 ${borderRadius.xS}px`,
|
|
6330
|
-
},
|
|
6331
|
-
});
|
|
6332
|
-
const DownloadActions = styled(Stack)({
|
|
6333
|
-
gap: `${spacing.spacing_4}px`,
|
|
6334
|
-
alignItems: 'center',
|
|
6335
|
-
});
|
|
6336
|
-
const DownloadIconButton = styled(IconButton)({
|
|
6337
|
-
padding: 0,
|
|
6338
|
-
width: 16,
|
|
6339
|
-
height: 16,
|
|
6340
|
-
color: colors.grey['800'],
|
|
6341
|
-
'&:hover': {
|
|
6342
|
-
backgroundColor: 'transparent',
|
|
6343
|
-
},
|
|
6344
|
-
});
|
|
6345
6318
|
/**
|
|
6346
6319
|
* NeoToast - Notification/Toast component based on MUI Alert
|
|
6347
6320
|
*
|
|
6348
6321
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4122-37223
|
|
6349
6322
|
*
|
|
6350
6323
|
* Figma Props Mapping:
|
|
6351
|
-
* - type (Light mode|Dark mode|Brand color|Error|Success|Info
|
|
6324
|
+
* - type (Light mode|Dark mode|Brand color|Error|Success|Info) → variant (default|dark|brand|error|success|info)
|
|
6352
6325
|
* - header → title (string)
|
|
6353
6326
|
* - supportingText → message (string)
|
|
6354
6327
|
* - xCloseButton → showClose (boolean)
|
|
6355
6328
|
* - actions → actions (ReactNode)
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
const isDownloadVariant = variant === 'download';
|
|
6360
|
-
return (jsx(StyledAlert, { ...props, variant: variant, showProgress: isDownloadVariant, action: showClose && !isDownloadVariant ? (jsx(IconButton, { size: "small", onClick: onClose, sx: { color: semanticColors.icons.placeholder }, children: jsx(X, { size: 16 }) })) : undefined, children: isDownloadVariant ? (jsxs(Fragment, { children: [jsxs(Stack, { direction: "row", sx: {
|
|
6361
|
-
alignItems: 'flex-start',
|
|
6362
|
-
justifyContent: 'space-between',
|
|
6363
|
-
width: '100%',
|
|
6364
|
-
gap: `${spacing.spacing_4}px`,
|
|
6365
|
-
}, children: [title && jsx(ToastTitle, { variant: variant, children: title }), showClose && (jsxs(DownloadActions, { direction: "row", children: [jsx(DownloadIconButton, { size: "small", children: jsx(Stack, { sx: { width: 16, height: 16 } }) }), jsx(DownloadIconButton, { size: "small", onClick: onClose, children: jsx(X, { size: 16 }) })] }))] }), jsxs(ProgressSection, { children: [jsxs(Stack, { direction: "row", sx: { alignItems: 'flex-end', justifyContent: 'space-between', width: '100%' }, children: [fileName && jsx(FileName, { children: fileName }), progress !== undefined && jsxs(ProgressLabel, { children: [progress, "%"] })] }), jsx(StyledLinearProgress, { variant: "determinate", value: progress ?? 0 })] })] })) : (jsxs(Fragment, { children: [jsxs(Stack, { sx: { gap: `${spacing.spacing_1}px`, width: '100%' }, children: [title && jsx(ToastTitle, { variant: variant, children: title }), message && jsx(ToastMessage, { variant: variant, children: message })] }), actions && jsx(ToastActions, { direction: "row", children: actions })] })) }));
|
|
6329
|
+
*/
|
|
6330
|
+
const NeoToast = ({ variant = 'default', title, message, showClose = true, actions, onClose, ...props }) => {
|
|
6331
|
+
return (jsxs(StyledAlert, { ...props, variant: variant, action: showClose ? (jsx(IconButton, { size: "small", onClick: onClose, sx: { color: semanticColors.icons.placeholder }, children: jsx(X, { size: 16 }) })) : undefined, children: [jsxs(Stack, { sx: { gap: `${spacing.spacing_1}px`, width: '100%' }, children: [title && jsx(ToastTitle, { variant: variant, children: title }), message && jsx(ToastMessage, { variant: variant, children: message })] }), actions && jsx(ToastActions, { direction: "row", children: actions })] }));
|
|
6366
6332
|
};
|
|
6367
6333
|
/**
|
|
6368
6334
|
* Helper component for creating toast action buttons with proper styling
|
|
@@ -6879,5 +6845,5 @@ NeoTypologyControl.displayName = 'NeoTypologyControl';
|
|
|
6879
6845
|
|
|
6880
6846
|
const version = '0.0.0-development';
|
|
6881
6847
|
|
|
6882
|
-
export { ActivityScene, CIRCLE_RADIUS, NeoActivityHeader, NeoActivityIndicatorCell, NeoAvatar, NeoBadge, NeoBanner, NeoBreadcrumbLink, NeoBreadcrumbs, NeoButton, NeoButtonTab, NeoButtonTabGroup, NeoCheckbox, NeoCodeSnippet, NeoDataGrid, NeoDataGridCellContent, NeoDataGridColumnsButton, NeoDataGridColumnsPanel, NeoDataGridFilterPanel, NeoDataGridFilterPanelAddIcon, NeoDataGridFilterPanelDeleteIcon, NeoDataGridFilterPanelRemoveAllIcon, NeoDataGridFiltersButton, NeoDataGridHeaderLabel, NeoDropdown as NeoDataGridSelect, NeoDatePicker, NeoDivider, NeoDot, NeoDropdown, NeoDropdownMenu, NeoDropdownMenuItem, NeoDropdownMenuItem as NeoDropdownOption, NeoFilterChip, NeoFooter, NeoGeneralAvatar, NeoIconButton, NeoIconWrapper, NeoInfiniteScrollGrid, NeoInputField, NeoListItem, NeoListItemButton, NeoLoadingSpinner, NeoMarketplaceCard, NeoMarketplaceLargeCard, NeoDropdownMenu as NeoMenu, NeoDropdownMenuItem as NeoMenuItem, NeoModal, NeoModalContent, NeoModalFooter, NeoModalHeader, NeoMultiBadgesCell, NeoNavigationAvatar, NeoNavigationItem, NeoPageContent, NeoPaginatedGrid, NeoProgressbar, NeoQuickFilter, NeoRadio, NeoSearchChip, NeoDropdown as NeoSelect, NeoDropdownMenuItem as NeoSelectOption, NeoSkeleton, NeoStatusBadgeCell, NeoStatusBanner, NeoTab, NeoTabs, NeoTag, NeoToast, NeoToastButton, NeoToggle, NeoToolbar, NeoTooltip, NeoTreeItem, NeoTreeView, StyledToggleButton as NeoTypologyButton, NeoTypologyControl, NeoUserAvatarCell, SortedAscendingIcon, SortedDescendingIcon, UnsortedIcon, getDataGridHeaderStyles, neoRowHeights, version };
|
|
6848
|
+
export { ActivityScene, CIRCLE_RADIUS, NeoActivityHeader, NeoActivityIndicatorCell, NeoAvatar, NeoBadge, NeoBanner, NeoBreadcrumbLink, NeoBreadcrumbs, NeoButton, NeoButtonTab, NeoButtonTabGroup, NeoCard, NeoCheckbox, NeoCodeSnippet, NeoDataGrid, NeoDataGridCellContent, NeoDataGridColumnsButton, NeoDataGridColumnsPanel, NeoDataGridFilterPanel, NeoDataGridFilterPanelAddIcon, NeoDataGridFilterPanelDeleteIcon, NeoDataGridFilterPanelRemoveAllIcon, NeoDataGridFiltersButton, NeoDataGridHeaderLabel, NeoDropdown as NeoDataGridSelect, NeoDatePicker, NeoDivider, NeoDot, NeoDownloadToast, NeoDropdown, NeoDropdownMenu, NeoDropdownMenuItem, NeoDropdownMenuItem as NeoDropdownOption, NeoFilterChip, NeoFooter, NeoGeneralAvatar, NeoIconButton, NeoIconWrapper, NeoInfiniteScrollGrid, NeoInputField, NeoListItem, NeoListItemButton, NeoLoadingSpinner, NeoMarketplaceCard, NeoMarketplaceLargeCard, NeoDropdownMenu as NeoMenu, NeoDropdownMenuItem as NeoMenuItem, NeoModal, NeoModalContent, NeoModalFooter, NeoModalHeader, NeoMultiBadgesCell, NeoNavigationAvatar, NeoNavigationItem, NeoPageContent, NeoPaginatedGrid, NeoProgressbar, NeoQuickFilter, NeoRadio, NeoSearchChip, NeoDropdown as NeoSelect, NeoDropdownMenuItem as NeoSelectOption, NeoSkeleton, NeoStatusBadgeCell, NeoStatusBanner, NeoTab, NeoTabs, NeoTag, NeoToast, NeoToastButton, NeoToggle, NeoToolbar, NeoTooltip, NeoTreeItem, NeoTreeView, StyledToggleButton as NeoTypologyButton, NeoTypologyControl, NeoUserAvatarCell, SortedAscendingIcon, SortedDescendingIcon, UnsortedIcon, getDataGridHeaderStyles, neoRowHeights, version };
|
|
6883
6849
|
//# sourceMappingURL=index.esm.js.map
|