@moderneinc/neo-styled-components 2.6.0 → 2.7.0-next.e807e4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Banner/Banner.d.ts +22 -17
- package/dist/ButtonTab/ButtonTab.d.ts +19 -0
- package/dist/ButtonTabGroup/ButtonTabGroup.d.ts +39 -0
- package/dist/CodeSnippet/CodeSnippet.d.ts +4 -4
- package/dist/GeneralAvatar/GeneralAvatar.d.ts +26 -0
- package/dist/ListItemButton/ListItemButton.d.ts +1 -1
- package/dist/MarketplaceCard/MarketplaceCard.d.ts +2 -2
- package/dist/MarketplaceLargeCard/MarketplaceLargeCard.d.ts +2 -2
- package/dist/NavigationAvatar/NavigationAvatar.d.ts +15 -0
- package/dist/StatusBanner/StatusBanner.d.ts +14 -11
- package/dist/Tabs/Tabs.d.ts +5 -7
- package/dist/Tag/Tag.d.ts +7 -7
- package/dist/Toast/Toast.d.ts +19 -11
- package/dist/Tooltip/Tooltip.d.ts +6 -6
- package/dist/index.d.ts +160 -89
- package/dist/index.esm.js +557 -260
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +560 -260
- package/dist/index.js.map +1 -1
- package/dist/utils/avatarColors.d.ts +7 -0
- package/dist/utils/focusRing.d.ts +3 -3
- package/package.json +1 -1
- package/dist/ButtonGroup/ButtonGroup.d.ts +0 -41
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { semanticColors, colors, spacing, typography, borderRadius, shadows } from '@moderneinc/neo-design';
|
|
3
3
|
import Box from '@mui/material/Box';
|
|
4
4
|
import { styled, alpha } from '@mui/material/styles';
|
|
5
5
|
import Avatar from '@mui/material/Avatar';
|
|
@@ -7,12 +7,13 @@ 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, useState, useMemo,
|
|
10
|
+
import React, { forwardRef, createElement, useRef, useCallback, useState, 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
|
-
import
|
|
15
|
+
import MuiToggleButton, { toggleButtonClasses } from '@mui/material/ToggleButton';
|
|
16
|
+
import MuiToggleButtonGroup, { toggleButtonGroupClasses } from '@mui/material/ToggleButtonGroup';
|
|
16
17
|
import Checkbox, { checkboxClasses } from '@mui/material/Checkbox';
|
|
17
18
|
import { useGridApiContext, useGridSelector, gridColumnDefinitionsSelector, gridColumnVisibilityModelSelector, GridPanelWrapper, useGridApiRef, gridClasses as gridClasses$1, DataGridPro, ColumnsPanelTrigger, ToolbarButton, gridFilterModelSelector, FilterPanelTrigger, Toolbar } from '@mui/x-data-grid-pro';
|
|
18
19
|
import Button, { buttonClasses } from '@mui/material/Button';
|
|
@@ -60,22 +61,20 @@ import Switch, { switchClasses } from '@mui/material/Switch';
|
|
|
60
61
|
import { useTreeItemModel } from '@mui/x-tree-view/hooks';
|
|
61
62
|
import { TreeItem, treeItemClasses } from '@mui/x-tree-view/TreeItem';
|
|
62
63
|
import { RichTreeViewPro } from '@mui/x-tree-view-pro/RichTreeViewPro';
|
|
63
|
-
import ToggleButton, { toggleButtonClasses } from '@mui/material/ToggleButton';
|
|
64
|
-
import ToggleButtonGroup, { toggleButtonGroupClasses } from '@mui/material/ToggleButtonGroup';
|
|
65
64
|
|
|
66
65
|
/**
|
|
67
|
-
* Outline-based focus ring styles derived from Neo
|
|
66
|
+
* Outline-based focus ring styles derived from Neo border tokens.
|
|
68
67
|
* Uses CSS outline (not box-shadow) so focus rings are never clipped by overflow:hidden.
|
|
69
68
|
*
|
|
70
|
-
* Produces a double-ring effect: a white inner gap (via outline-offset) and a
|
|
69
|
+
* Produces a double-ring effect: a white inner gap (via outline-offset) and a colored outer ring.
|
|
71
70
|
*/
|
|
72
71
|
const focusRingStyles = {
|
|
73
|
-
outline:
|
|
74
|
-
outlineOffset:
|
|
72
|
+
outline: `2px solid ${semanticColors.border.focus}`,
|
|
73
|
+
outlineOffset: '2px',
|
|
75
74
|
};
|
|
76
75
|
|
|
77
76
|
// biome-ignore lint/suspicious/noExplicitAny: Type cast required to override MUI Avatar variant type without global augmentation
|
|
78
|
-
const StyledAvatar = styled(Avatar, {
|
|
77
|
+
const StyledAvatar$1 = styled(Avatar, {
|
|
79
78
|
shouldForwardProp: prop => prop !== 'size' && prop !== 'variant',
|
|
80
79
|
})(({ theme, size = 'medium', variant = 'circular' }) => ({
|
|
81
80
|
boxSizing: 'border-box',
|
|
@@ -177,7 +176,7 @@ const AvatarContainer = styled(Box)(({ size = 'medium' }) => ({
|
|
|
177
176
|
*/
|
|
178
177
|
const NeoAvatar = ({ size = 'medium', variant = 'circular', ...props }) => {
|
|
179
178
|
// shouldForwardProp filters out size and variant from being passed to the DOM
|
|
180
|
-
const avatar = jsx(StyledAvatar, { size: size, variant: variant, ...props });
|
|
179
|
+
const avatar = jsx(StyledAvatar$1, { size: size, variant: variant, ...props });
|
|
181
180
|
// Medium size with circular variant (image) gets wrapped in white container
|
|
182
181
|
if (size === 'medium' && variant === 'circular') {
|
|
183
182
|
return jsx(AvatarContainer, { size: size, children: avatar });
|
|
@@ -219,7 +218,7 @@ const StyledChip$2 = styled(Chip)(({ theme }) => ({
|
|
|
219
218
|
[`&.${chipClasses.colorDefault}`]: {
|
|
220
219
|
backgroundColor: semanticColors.status.neutral.light,
|
|
221
220
|
color: semanticColors.status.neutral.dark,
|
|
222
|
-
border: `1px solid ${semanticColors.status.neutral.
|
|
221
|
+
border: `1px solid ${semanticColors.status.neutral.default}80`,
|
|
223
222
|
[`& .${chipClasses.icon}, & .${chipClasses.deleteIcon}`]: {
|
|
224
223
|
color: semanticColors.status.neutral.dark,
|
|
225
224
|
},
|
|
@@ -228,7 +227,7 @@ const StyledChip$2 = styled(Chip)(({ theme }) => ({
|
|
|
228
227
|
[`&.${chipClasses.colorError}`]: {
|
|
229
228
|
backgroundColor: semanticColors.status.error.light,
|
|
230
229
|
color: semanticColors.status.error.dark,
|
|
231
|
-
border: `1px solid ${semanticColors.status.error.
|
|
230
|
+
border: `1px solid ${semanticColors.status.error.default}80`,
|
|
232
231
|
[`& .${chipClasses.icon}, & .${chipClasses.deleteIcon}`]: {
|
|
233
232
|
color: semanticColors.status.error.dark,
|
|
234
233
|
},
|
|
@@ -237,7 +236,7 @@ const StyledChip$2 = styled(Chip)(({ theme }) => ({
|
|
|
237
236
|
[`&.${chipClasses.colorWarning}`]: {
|
|
238
237
|
backgroundColor: semanticColors.status.warning.light,
|
|
239
238
|
color: semanticColors.status.warning.dark,
|
|
240
|
-
border: `1px solid ${semanticColors.status.warning.
|
|
239
|
+
border: `1px solid ${semanticColors.status.warning.default}80`,
|
|
241
240
|
[`& .${chipClasses.icon}, & .${chipClasses.deleteIcon}`]: {
|
|
242
241
|
color: semanticColors.status.warning.dark,
|
|
243
242
|
},
|
|
@@ -246,7 +245,7 @@ const StyledChip$2 = styled(Chip)(({ theme }) => ({
|
|
|
246
245
|
[`&.${chipClasses.colorSuccess}`]: {
|
|
247
246
|
backgroundColor: semanticColors.status.success.light,
|
|
248
247
|
color: semanticColors.status.success.dark,
|
|
249
|
-
border: `1px solid ${semanticColors.status.success.
|
|
248
|
+
border: `1px solid ${semanticColors.status.success.default}80`,
|
|
250
249
|
[`& .${chipClasses.icon}, & .${chipClasses.deleteIcon}`]: {
|
|
251
250
|
color: semanticColors.status.success.dark,
|
|
252
251
|
},
|
|
@@ -255,7 +254,7 @@ const StyledChip$2 = styled(Chip)(({ theme }) => ({
|
|
|
255
254
|
[`&.${chipClasses.colorInfo}`]: {
|
|
256
255
|
backgroundColor: semanticColors.status.info.light,
|
|
257
256
|
color: semanticColors.status.info.dark,
|
|
258
|
-
border: `1px solid ${semanticColors.status.info.
|
|
257
|
+
border: `1px solid ${semanticColors.status.info.default}80`,
|
|
259
258
|
[`& .${chipClasses.icon}, & .${chipClasses.deleteIcon}`]: {
|
|
260
259
|
color: semanticColors.status.info.dark,
|
|
261
260
|
},
|
|
@@ -689,11 +688,11 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
689
688
|
*/
|
|
690
689
|
|
|
691
690
|
|
|
692
|
-
const __iconNode$
|
|
691
|
+
const __iconNode$j = [
|
|
693
692
|
["path", { d: "M12 5v14", key: "s699le" }],
|
|
694
693
|
["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
|
|
695
694
|
];
|
|
696
|
-
const ArrowDown = createLucideIcon("arrow-down", __iconNode$
|
|
695
|
+
const ArrowDown = createLucideIcon("arrow-down", __iconNode$j);
|
|
697
696
|
|
|
698
697
|
/**
|
|
699
698
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -703,11 +702,11 @@ const ArrowDown = createLucideIcon("arrow-down", __iconNode$i);
|
|
|
703
702
|
*/
|
|
704
703
|
|
|
705
704
|
|
|
706
|
-
const __iconNode$
|
|
705
|
+
const __iconNode$i = [
|
|
707
706
|
["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
|
|
708
707
|
["path", { d: "M12 19V5", key: "x0mq9r" }]
|
|
709
708
|
];
|
|
710
|
-
const ArrowUp = createLucideIcon("arrow-up", __iconNode$
|
|
709
|
+
const ArrowUp = createLucideIcon("arrow-up", __iconNode$i);
|
|
711
710
|
|
|
712
711
|
/**
|
|
713
712
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -717,7 +716,7 @@ const ArrowUp = createLucideIcon("arrow-up", __iconNode$h);
|
|
|
717
716
|
*/
|
|
718
717
|
|
|
719
718
|
|
|
720
|
-
const __iconNode$
|
|
719
|
+
const __iconNode$h = [
|
|
721
720
|
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
722
721
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
723
722
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
@@ -729,7 +728,7 @@ const __iconNode$g = [
|
|
|
729
728
|
["path", { d: "M12 18h.01", key: "mhygvu" }],
|
|
730
729
|
["path", { d: "M16 18h.01", key: "kzsmim" }]
|
|
731
730
|
];
|
|
732
|
-
const CalendarDays = createLucideIcon("calendar-days", __iconNode$
|
|
731
|
+
const CalendarDays = createLucideIcon("calendar-days", __iconNode$h);
|
|
733
732
|
|
|
734
733
|
/**
|
|
735
734
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -739,8 +738,8 @@ const CalendarDays = createLucideIcon("calendar-days", __iconNode$g);
|
|
|
739
738
|
*/
|
|
740
739
|
|
|
741
740
|
|
|
742
|
-
const __iconNode$
|
|
743
|
-
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);
|
|
744
743
|
|
|
745
744
|
/**
|
|
746
745
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -750,8 +749,8 @@ const ChevronDown = createLucideIcon("chevron-down", __iconNode$f);
|
|
|
750
749
|
*/
|
|
751
750
|
|
|
752
751
|
|
|
753
|
-
const __iconNode$
|
|
754
|
-
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);
|
|
755
754
|
|
|
756
755
|
/**
|
|
757
756
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -761,8 +760,8 @@ const ChevronLeft = createLucideIcon("chevron-left", __iconNode$e);
|
|
|
761
760
|
*/
|
|
762
761
|
|
|
763
762
|
|
|
764
|
-
const __iconNode$
|
|
765
|
-
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);
|
|
766
765
|
|
|
767
766
|
/**
|
|
768
767
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -772,8 +771,8 @@ const ChevronRight = createLucideIcon("chevron-right", __iconNode$d);
|
|
|
772
771
|
*/
|
|
773
772
|
|
|
774
773
|
|
|
775
|
-
const __iconNode$
|
|
776
|
-
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);
|
|
777
776
|
|
|
778
777
|
/**
|
|
779
778
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -783,11 +782,11 @@ const ChevronUp = createLucideIcon("chevron-up", __iconNode$c);
|
|
|
783
782
|
*/
|
|
784
783
|
|
|
785
784
|
|
|
786
|
-
const __iconNode$
|
|
785
|
+
const __iconNode$c = [
|
|
787
786
|
["path", { d: "m7 15 5 5 5-5", key: "1hf1tw" }],
|
|
788
787
|
["path", { d: "m7 9 5-5 5 5", key: "sgt6xg" }]
|
|
789
788
|
];
|
|
790
|
-
const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$
|
|
789
|
+
const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$c);
|
|
791
790
|
|
|
792
791
|
/**
|
|
793
792
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -797,12 +796,12 @@ const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$b);
|
|
|
797
796
|
*/
|
|
798
797
|
|
|
799
798
|
|
|
800
|
-
const __iconNode$
|
|
799
|
+
const __iconNode$b = [
|
|
801
800
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
802
801
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
803
802
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
804
803
|
];
|
|
805
|
-
const CircleAlert = createLucideIcon("circle-alert", __iconNode$
|
|
804
|
+
const CircleAlert = createLucideIcon("circle-alert", __iconNode$b);
|
|
806
805
|
|
|
807
806
|
/**
|
|
808
807
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -812,11 +811,11 @@ const CircleAlert = createLucideIcon("circle-alert", __iconNode$a);
|
|
|
812
811
|
*/
|
|
813
812
|
|
|
814
813
|
|
|
815
|
-
const __iconNode$
|
|
814
|
+
const __iconNode$a = [
|
|
816
815
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
817
816
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
818
817
|
];
|
|
819
|
-
const CircleCheck = createLucideIcon("circle-check", __iconNode$
|
|
818
|
+
const CircleCheck = createLucideIcon("circle-check", __iconNode$a);
|
|
820
819
|
|
|
821
820
|
/**
|
|
822
821
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -826,12 +825,12 @@ const CircleCheck = createLucideIcon("circle-check", __iconNode$9);
|
|
|
826
825
|
*/
|
|
827
826
|
|
|
828
827
|
|
|
829
|
-
const __iconNode$
|
|
828
|
+
const __iconNode$9 = [
|
|
830
829
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
831
830
|
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
832
831
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
833
832
|
];
|
|
834
|
-
const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$
|
|
833
|
+
const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$9);
|
|
835
834
|
|
|
836
835
|
/**
|
|
837
836
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -841,12 +840,12 @@ const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$8
|
|
|
841
840
|
*/
|
|
842
841
|
|
|
843
842
|
|
|
844
|
-
const __iconNode$
|
|
843
|
+
const __iconNode$8 = [
|
|
845
844
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
846
845
|
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
847
846
|
["path", { d: "M15 3v18", key: "14nvp0" }]
|
|
848
847
|
];
|
|
849
|
-
const Columns3 = createLucideIcon("columns-3", __iconNode$
|
|
848
|
+
const Columns3 = createLucideIcon("columns-3", __iconNode$8);
|
|
850
849
|
|
|
851
850
|
/**
|
|
852
851
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -856,12 +855,12 @@ const Columns3 = createLucideIcon("columns-3", __iconNode$7);
|
|
|
856
855
|
*/
|
|
857
856
|
|
|
858
857
|
|
|
859
|
-
const __iconNode$
|
|
858
|
+
const __iconNode$7 = [
|
|
860
859
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
861
860
|
["path", { d: "M12 16v-4", key: "1dtifu" }],
|
|
862
861
|
["path", { d: "M12 8h.01", key: "e9boi3" }]
|
|
863
862
|
];
|
|
864
|
-
const Info = createLucideIcon("info", __iconNode$
|
|
863
|
+
const Info = createLucideIcon("info", __iconNode$7);
|
|
865
864
|
|
|
866
865
|
/**
|
|
867
866
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -871,12 +870,12 @@ const Info = createLucideIcon("info", __iconNode$6);
|
|
|
871
870
|
*/
|
|
872
871
|
|
|
873
872
|
|
|
874
|
-
const __iconNode$
|
|
873
|
+
const __iconNode$6 = [
|
|
875
874
|
["path", { d: "M2 5h20", key: "1fs1ex" }],
|
|
876
875
|
["path", { d: "M6 12h12", key: "8npq4p" }],
|
|
877
876
|
["path", { d: "M9 19h6", key: "456am0" }]
|
|
878
877
|
];
|
|
879
|
-
const ListFilter = createLucideIcon("list-filter", __iconNode$
|
|
878
|
+
const ListFilter = createLucideIcon("list-filter", __iconNode$6);
|
|
880
879
|
|
|
881
880
|
/**
|
|
882
881
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -886,11 +885,11 @@ const ListFilter = createLucideIcon("list-filter", __iconNode$5);
|
|
|
886
885
|
*/
|
|
887
886
|
|
|
888
887
|
|
|
889
|
-
const __iconNode$
|
|
888
|
+
const __iconNode$5 = [
|
|
890
889
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
891
890
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
892
891
|
];
|
|
893
|
-
const Plus = createLucideIcon("plus", __iconNode$
|
|
892
|
+
const Plus = createLucideIcon("plus", __iconNode$5);
|
|
894
893
|
|
|
895
894
|
/**
|
|
896
895
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -900,11 +899,11 @@ const Plus = createLucideIcon("plus", __iconNode$4);
|
|
|
900
899
|
*/
|
|
901
900
|
|
|
902
901
|
|
|
903
|
-
const __iconNode$
|
|
902
|
+
const __iconNode$4 = [
|
|
904
903
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
905
904
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
906
905
|
];
|
|
907
|
-
const Search = createLucideIcon("search", __iconNode$
|
|
906
|
+
const Search = createLucideIcon("search", __iconNode$4);
|
|
908
907
|
|
|
909
908
|
/**
|
|
910
909
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -914,14 +913,35 @@ const Search = createLucideIcon("search", __iconNode$3);
|
|
|
914
913
|
*/
|
|
915
914
|
|
|
916
915
|
|
|
917
|
-
const __iconNode$
|
|
916
|
+
const __iconNode$3 = [
|
|
918
917
|
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
919
918
|
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
920
919
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
921
920
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
922
921
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
923
922
|
];
|
|
924
|
-
const Trash2 = createLucideIcon("trash-2", __iconNode$
|
|
923
|
+
const Trash2 = createLucideIcon("trash-2", __iconNode$3);
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* @license lucide-react v0.577.0 - ISC
|
|
927
|
+
*
|
|
928
|
+
* This source code is licensed under the ISC license.
|
|
929
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
930
|
+
*/
|
|
931
|
+
|
|
932
|
+
|
|
933
|
+
const __iconNode$2 = [
|
|
934
|
+
[
|
|
935
|
+
"path",
|
|
936
|
+
{
|
|
937
|
+
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
938
|
+
key: "wmoenq"
|
|
939
|
+
}
|
|
940
|
+
],
|
|
941
|
+
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
942
|
+
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
943
|
+
];
|
|
944
|
+
const TriangleAlert = createLucideIcon("triangle-alert", __iconNode$2);
|
|
925
945
|
|
|
926
946
|
/**
|
|
927
947
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -958,15 +978,11 @@ const X = createLucideIcon("x", __iconNode);
|
|
|
958
978
|
|
|
959
979
|
// biome-ignore lint/suspicious/noExplicitAny: Type cast required to override MUI Alert variant type without global augmentation
|
|
960
980
|
const StyledAlert$2 = styled(Alert, {
|
|
961
|
-
shouldForwardProp: prop => prop !== 'messagePosition' && prop !== 'variant',
|
|
962
|
-
})(({ variant = '
|
|
963
|
-
//
|
|
964
|
-
const
|
|
965
|
-
|
|
966
|
-
backgroundColor: semanticColors.surfaces.snackbarBrand,
|
|
967
|
-
color: semanticColors.surfaces.white,
|
|
968
|
-
},
|
|
969
|
-
light: {
|
|
981
|
+
shouldForwardProp: prop => prop !== 'messagePosition' && prop !== 'variant' && prop !== 'bannerType',
|
|
982
|
+
})(({ variant = 'info', bannerType = 'outlined', messagePosition = 'left' }) => {
|
|
983
|
+
// Outlined styles (light bg + colored border)
|
|
984
|
+
const outlinedStyles = {
|
|
985
|
+
info: {
|
|
970
986
|
backgroundColor: semanticColors.status.info.light,
|
|
971
987
|
color: colors.grey['800'],
|
|
972
988
|
},
|
|
@@ -982,6 +998,50 @@ const StyledAlert$2 = styled(Alert, {
|
|
|
982
998
|
backgroundColor: semanticColors.status.warning.light,
|
|
983
999
|
color: colors.grey['800'],
|
|
984
1000
|
},
|
|
1001
|
+
neutral: {
|
|
1002
|
+
backgroundColor: semanticColors.status.neutral.light,
|
|
1003
|
+
color: colors.grey['800'],
|
|
1004
|
+
},
|
|
1005
|
+
};
|
|
1006
|
+
// Filled styles (solid bg)
|
|
1007
|
+
const filledStyles = {
|
|
1008
|
+
info: {
|
|
1009
|
+
backgroundColor: semanticColors.status.info.dark,
|
|
1010
|
+
color: semanticColors.surfaces.white,
|
|
1011
|
+
},
|
|
1012
|
+
success: {
|
|
1013
|
+
backgroundColor: semanticColors.status.success.dark,
|
|
1014
|
+
color: semanticColors.surfaces.white,
|
|
1015
|
+
},
|
|
1016
|
+
error: {
|
|
1017
|
+
backgroundColor: semanticColors.status.error.dark,
|
|
1018
|
+
color: semanticColors.surfaces.white,
|
|
1019
|
+
},
|
|
1020
|
+
warning: {
|
|
1021
|
+
backgroundColor: semanticColors.status.warning.default,
|
|
1022
|
+
color: semanticColors.typography.warning,
|
|
1023
|
+
},
|
|
1024
|
+
neutral: {
|
|
1025
|
+
backgroundColor: semanticColors.surfaces.snackbarLightMode,
|
|
1026
|
+
color: semanticColors.surfaces.white,
|
|
1027
|
+
},
|
|
1028
|
+
};
|
|
1029
|
+
// Legacy variants (ignore bannerType)
|
|
1030
|
+
const legacyStyles = {
|
|
1031
|
+
dark: {
|
|
1032
|
+
backgroundColor: semanticColors.surfaces.snackbarBrand,
|
|
1033
|
+
color: semanticColors.surfaces.white,
|
|
1034
|
+
},
|
|
1035
|
+
light: {
|
|
1036
|
+
backgroundColor: semanticColors.status.info.light,
|
|
1037
|
+
color: colors.grey['800'],
|
|
1038
|
+
},
|
|
1039
|
+
};
|
|
1040
|
+
const getVariantStyles = () => {
|
|
1041
|
+
if (legacyStyles[variant])
|
|
1042
|
+
return legacyStyles[variant];
|
|
1043
|
+
const styleMap = bannerType === 'filled' ? filledStyles : outlinedStyles;
|
|
1044
|
+
return styleMap[variant] ?? outlinedStyles.info;
|
|
985
1045
|
};
|
|
986
1046
|
return {
|
|
987
1047
|
width: '100%',
|
|
@@ -998,7 +1058,7 @@ const StyledAlert$2 = styled(Alert, {
|
|
|
998
1058
|
fontSize: typography.fontSize.default,
|
|
999
1059
|
fontWeight: typography.fontWeight.regular,
|
|
1000
1060
|
lineHeight: 1.5,
|
|
1001
|
-
...
|
|
1061
|
+
...getVariantStyles(),
|
|
1002
1062
|
[`& .${alertClasses.icon}`]: {
|
|
1003
1063
|
padding: 0,
|
|
1004
1064
|
opacity: 1,
|
|
@@ -1021,15 +1081,16 @@ const StyledAlert$2 = styled(Alert, {
|
|
|
1021
1081
|
},
|
|
1022
1082
|
};
|
|
1023
1083
|
});
|
|
1024
|
-
const LinkText = styled('span')(({ variant = '
|
|
1084
|
+
const LinkText = styled('span')(({ variant = 'info', bannerType = 'outlined' }) => {
|
|
1085
|
+
const isLegacy = variant === 'dark' || variant === 'light';
|
|
1086
|
+
const isFilled = !isLegacy && bannerType === 'filled';
|
|
1025
1087
|
const getLinkColor = () => {
|
|
1026
|
-
if (variant === 'dark') {
|
|
1027
|
-
return semanticColors.typography.link.default;
|
|
1088
|
+
if (variant === 'dark' || isFilled) {
|
|
1089
|
+
return semanticColors.typography.link.default;
|
|
1028
1090
|
}
|
|
1029
|
-
if (variant === 'light') {
|
|
1030
|
-
return semanticColors.typography.link.primary;
|
|
1091
|
+
if (variant === 'light' || variant === 'info') {
|
|
1092
|
+
return semanticColors.typography.link.primary;
|
|
1031
1093
|
}
|
|
1032
|
-
// For success, error, warning - use dark body color #1f2937
|
|
1033
1094
|
return colors.grey['800'];
|
|
1034
1095
|
};
|
|
1035
1096
|
return {
|
|
@@ -1054,29 +1115,34 @@ const StyledIconButton$1 = styled(IconButton)(({ closeIconColor }) => ({
|
|
|
1054
1115
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4170-2158
|
|
1055
1116
|
*
|
|
1056
1117
|
* Figma Props Mapping:
|
|
1057
|
-
* -
|
|
1058
|
-
* -
|
|
1059
|
-
* -
|
|
1060
|
-
* -
|
|
1061
|
-
* -
|
|
1062
|
-
*/
|
|
1063
|
-
const NeoBanner = ({ variant = '
|
|
1118
|
+
* - Intention (Info|Success|Error|Warning|Neutral) → variant (info|success|error|warning|neutral)
|
|
1119
|
+
* - Type (Outlined|Filled) → type ('outlined'|'filled')
|
|
1120
|
+
* - Message Position (Left|Center) → messagePosition ('left'|'center')
|
|
1121
|
+
* - Dismissible (boolean) → showClose (boolean)
|
|
1122
|
+
* - Show Link (boolean) → linkText presence (string when shown)
|
|
1123
|
+
*/
|
|
1124
|
+
const NeoBanner = ({ variant = 'info', type = 'outlined', message, messagePosition = 'left', linkText, showClose = true, icon, onClose, onLinkClick, ...props }) => {
|
|
1125
|
+
const isLegacy = variant === 'dark' || variant === 'light';
|
|
1126
|
+
const isFilled = !isLegacy && type === 'filled';
|
|
1064
1127
|
const getCloseIconColor = () => {
|
|
1065
|
-
if (variant === '
|
|
1128
|
+
if (isFilled && variant === 'warning') {
|
|
1129
|
+
return semanticColors.typography.warning;
|
|
1130
|
+
}
|
|
1131
|
+
if (variant === 'dark' || isFilled) {
|
|
1066
1132
|
return semanticColors.surfaces.white;
|
|
1067
1133
|
}
|
|
1068
1134
|
if (variant === 'success') {
|
|
1069
|
-
return semanticColors.status.success.
|
|
1135
|
+
return semanticColors.status.success.default;
|
|
1070
1136
|
}
|
|
1071
1137
|
if (variant === 'error') {
|
|
1072
|
-
return semanticColors.status.error.
|
|
1138
|
+
return semanticColors.status.error.default;
|
|
1073
1139
|
}
|
|
1074
1140
|
if (variant === 'warning') {
|
|
1075
|
-
return semanticColors.status.warning.
|
|
1141
|
+
return semanticColors.status.warning.default;
|
|
1076
1142
|
}
|
|
1077
1143
|
return colors.grey['800'];
|
|
1078
1144
|
};
|
|
1079
|
-
return (jsx(StyledAlert$2, { ...props, variant: variant, messagePosition: messagePosition, icon: messagePosition === 'left' ? icon || false : false, action: showClose ? (jsx(StyledIconButton$1, { size: "small", onClick: onClose, closeIconColor: getCloseIconColor(), children: jsx(X, { size: 24 }) })) : undefined, children: messagePosition === 'center' ? (jsxs(Fragment, { children: [icon, jsx("span", { children: message }), linkText && (jsx(LinkText, { variant: variant, onClick: onLinkClick, children: linkText }))] })) : (jsxs(Fragment, { children: [jsx("span", { children: message }), linkText && (jsx(LinkText, { variant: variant, onClick: onLinkClick, children: linkText }))] })) }));
|
|
1145
|
+
return (jsx(StyledAlert$2, { ...props, variant: variant, bannerType: type, messagePosition: messagePosition, icon: messagePosition === 'left' ? icon || false : false, action: showClose ? (jsx(StyledIconButton$1, { size: "small", onClick: onClose, closeIconColor: getCloseIconColor(), children: jsx(X, { size: 24 }) })) : undefined, children: messagePosition === 'center' ? (jsxs(Fragment, { children: [icon, jsx("span", { children: message }), linkText && (jsx(LinkText, { variant: variant, bannerType: type, onClick: onLinkClick, children: linkText }))] })) : (jsxs(Fragment, { children: [jsx("span", { children: message }), linkText && (jsx(LinkText, { variant: variant, bannerType: type, onClick: onLinkClick, children: linkText }))] })) }));
|
|
1080
1146
|
};
|
|
1081
1147
|
NeoBanner.displayName = 'NeoBanner';
|
|
1082
1148
|
|
|
@@ -1104,7 +1170,7 @@ const StyledBreadcrumbLink = styled(Link, {
|
|
|
1104
1170
|
color: current ? semanticColors.buttons.tertiary.hover : semanticColors.icons.hover,
|
|
1105
1171
|
},
|
|
1106
1172
|
'&:focus-visible': {
|
|
1107
|
-
outline: `2px solid ${semanticColors.
|
|
1173
|
+
outline: `2px solid ${semanticColors.border.focus}`,
|
|
1108
1174
|
outlineOffset: 2,
|
|
1109
1175
|
},
|
|
1110
1176
|
}));
|
|
@@ -1194,7 +1260,7 @@ const StyledButtonBase$1 = styled(ButtonBase, {
|
|
|
1194
1260
|
},
|
|
1195
1261
|
// Focus visible for keyboard navigation
|
|
1196
1262
|
[`&.${buttonBaseClasses.focusVisible}`]: {
|
|
1197
|
-
outline: `2px solid ${semanticColors.
|
|
1263
|
+
outline: `2px solid ${semanticColors.border.focus}`,
|
|
1198
1264
|
outlineOffset: 2,
|
|
1199
1265
|
},
|
|
1200
1266
|
};
|
|
@@ -1234,7 +1300,7 @@ const StyledButtonBase$1 = styled(ButtonBase, {
|
|
|
1234
1300
|
: {
|
|
1235
1301
|
[`&.${buttonBaseClasses.disabled}`]: {
|
|
1236
1302
|
backgroundColor: semanticColors.buttons.secondary.disabledBackground,
|
|
1237
|
-
borderColor: semanticColors.
|
|
1303
|
+
borderColor: semanticColors.border.secondary,
|
|
1238
1304
|
color: semanticColors.typography.button.disabled,
|
|
1239
1305
|
},
|
|
1240
1306
|
}),
|
|
@@ -1362,40 +1428,102 @@ function NeoButton({ variant = 'primary', size = 'medium', loading = false, chil
|
|
|
1362
1428
|
}
|
|
1363
1429
|
NeoButton.displayName = 'NeoButton';
|
|
1364
1430
|
|
|
1431
|
+
const StyledButtonTab = styled(MuiToggleButton)(({ theme }) => ({
|
|
1432
|
+
fontFamily: typography.fontFamily.body,
|
|
1433
|
+
fontSize: theme.typography.pxToRem(typography.fontSize.sm),
|
|
1434
|
+
lineHeight: 1,
|
|
1435
|
+
color: semanticColors.typography.tab.inactive,
|
|
1436
|
+
backgroundColor: 'transparent',
|
|
1437
|
+
border: 'none',
|
|
1438
|
+
padding: theme.spacing(1, 1.5),
|
|
1439
|
+
cursor: 'pointer',
|
|
1440
|
+
textTransform: 'none',
|
|
1441
|
+
transition: theme.transitions.create(['color'], {
|
|
1442
|
+
duration: theme.transitions.duration.short,
|
|
1443
|
+
}),
|
|
1444
|
+
'&:hover': {
|
|
1445
|
+
color: semanticColors.typography.tab.active,
|
|
1446
|
+
},
|
|
1447
|
+
'&.Mui-focusVisible': {
|
|
1448
|
+
outline: `2px solid ${semanticColors.border.focus}`,
|
|
1449
|
+
outlineOffset: -2,
|
|
1450
|
+
borderRadius: borderRadius.xXS,
|
|
1451
|
+
},
|
|
1452
|
+
'&.Mui-disabled': {
|
|
1453
|
+
color: semanticColors.typography.button.disabled,
|
|
1454
|
+
cursor: 'default',
|
|
1455
|
+
pointerEvents: 'none',
|
|
1456
|
+
},
|
|
1457
|
+
}));
|
|
1458
|
+
/**
|
|
1459
|
+
* Syncs aria-selected with MUI's Mui-selected class via MutationObserver.
|
|
1460
|
+
* MUI ToggleButton computes selection internally from context and applies
|
|
1461
|
+
* the Mui-selected class — we mirror that to aria-selected for tab semantics.
|
|
1462
|
+
*/
|
|
1463
|
+
function useTabAriaSync() {
|
|
1464
|
+
const observerRef = useRef(null);
|
|
1465
|
+
return useCallback((node) => {
|
|
1466
|
+
if (observerRef.current) {
|
|
1467
|
+
observerRef.current.disconnect();
|
|
1468
|
+
observerRef.current = null;
|
|
1469
|
+
}
|
|
1470
|
+
if (!node)
|
|
1471
|
+
return;
|
|
1472
|
+
const sync = () => {
|
|
1473
|
+
node.setAttribute('role', 'tab');
|
|
1474
|
+
node.setAttribute('aria-selected', String(node.classList.contains('Mui-selected')));
|
|
1475
|
+
};
|
|
1476
|
+
sync();
|
|
1477
|
+
observerRef.current = new MutationObserver(sync);
|
|
1478
|
+
observerRef.current.observe(node, { attributes: true, attributeFilter: ['class'] });
|
|
1479
|
+
}, []);
|
|
1480
|
+
}
|
|
1481
|
+
/**
|
|
1482
|
+
* NeoButtonTab - A tab-style toggle button for use within NeoButtonGroup
|
|
1483
|
+
*
|
|
1484
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=4106-11048
|
|
1485
|
+
*/
|
|
1486
|
+
const NeoButtonTab = ({ children, ...props }) => {
|
|
1487
|
+
const tabRef = useTabAriaSync();
|
|
1488
|
+
return (jsx(StyledButtonTab, { ref: tabRef, ...props, children: children }));
|
|
1489
|
+
};
|
|
1490
|
+
NeoButtonTab.displayName = 'NeoButtonTab';
|
|
1491
|
+
|
|
1365
1492
|
/**
|
|
1366
|
-
* Styled
|
|
1493
|
+
* Styled toggle button group that implements the Figma "Button tab group" design.
|
|
1367
1494
|
*
|
|
1368
|
-
*
|
|
1369
|
-
* -
|
|
1370
|
-
* -
|
|
1371
|
-
* -
|
|
1495
|
+
* Built on MUI ToggleButtonGroup which provides:
|
|
1496
|
+
* - Selection state management (value/onChange/exclusive)
|
|
1497
|
+
* - Size and disabled propagation via context
|
|
1498
|
+
* - Positional classes (firstButton/middleButton/lastButton)
|
|
1372
1499
|
*
|
|
1373
|
-
* Custom styling
|
|
1374
|
-
* -
|
|
1500
|
+
* Custom styling:
|
|
1501
|
+
* - Pill-shaped border (borderRadius.full)
|
|
1375
1502
|
* - Size variants (small=32px, medium=40px)
|
|
1376
1503
|
* - Border colors using semantic tokens
|
|
1377
|
-
* -
|
|
1504
|
+
* - Selected state colors from Neo design tokens
|
|
1378
1505
|
*/
|
|
1379
|
-
const
|
|
1506
|
+
const StyledButtonTabGroup = styled(MuiToggleButtonGroup)(({ theme, size = 'medium' }) => {
|
|
1380
1507
|
const sizeStyles = {
|
|
1381
1508
|
small: {
|
|
1382
|
-
height:
|
|
1509
|
+
height: spacing.spacing_4,
|
|
1383
1510
|
},
|
|
1384
1511
|
medium: {
|
|
1385
1512
|
height: spacing.spacing_5,
|
|
1386
1513
|
},
|
|
1387
1514
|
};
|
|
1388
1515
|
return {
|
|
1389
|
-
// Apply pill-shaped border radius
|
|
1390
1516
|
borderRadius: borderRadius.full,
|
|
1391
1517
|
border: `1px solid ${semanticColors.border.primary}`,
|
|
1392
|
-
|
|
1393
|
-
|
|
1518
|
+
overflow: 'hidden',
|
|
1519
|
+
// Style all grouped children
|
|
1520
|
+
[`& .${toggleButtonGroupClasses.grouped}`]: {
|
|
1521
|
+
flex: 1,
|
|
1394
1522
|
minWidth: 'auto',
|
|
1395
1523
|
height: sizeStyles[size].height,
|
|
1396
1524
|
padding: `${theme.spacing(1)} ${theme.spacing(2)}`,
|
|
1397
1525
|
fontSize: theme.typography.pxToRem(typography.fontSize.sm),
|
|
1398
|
-
fontWeight: typography.fontWeight.
|
|
1526
|
+
fontWeight: typography.fontWeight.regular,
|
|
1399
1527
|
lineHeight: 1,
|
|
1400
1528
|
textTransform: 'none',
|
|
1401
1529
|
border: 'none',
|
|
@@ -1406,40 +1534,35 @@ const StyledButtonGroup = styled(MuiButtonGroup)(({ theme, size = 'medium' }) =>
|
|
|
1406
1534
|
transition: theme.transitions.create(['background-color', 'color', 'border-color'], {
|
|
1407
1535
|
duration: theme.transitions.duration.short,
|
|
1408
1536
|
}),
|
|
1409
|
-
//
|
|
1410
|
-
|
|
1537
|
+
// Selected state — double selector for specificity over MUI ToggleButton defaults
|
|
1538
|
+
[`&.${toggleButtonClasses.selected}.${toggleButtonClasses.selected}`]: {
|
|
1411
1539
|
backgroundColor: semanticColors.surfaces.white,
|
|
1412
1540
|
color: semanticColors.buttons.tertiary.default,
|
|
1413
1541
|
fontWeight: typography.fontWeight.semiBold,
|
|
1414
1542
|
},
|
|
1415
1543
|
// Hover state
|
|
1416
|
-
|
|
1544
|
+
[`&:hover, &.${toggleButtonClasses.selected}:hover`]: {
|
|
1417
1545
|
backgroundColor: semanticColors.buttons.secondary.hoverBackground,
|
|
1418
|
-
borderRight: `1px solid ${semanticColors.border.primary}`,
|
|
1419
1546
|
},
|
|
1420
1547
|
// Focus visible for keyboard navigation
|
|
1421
|
-
|
|
1422
|
-
outline: `2px solid ${semanticColors.
|
|
1548
|
+
'&.Mui-focusVisible': {
|
|
1549
|
+
outline: `2px solid ${semanticColors.border.focus}`,
|
|
1423
1550
|
outlineOffset: -2,
|
|
1424
1551
|
zIndex: 1,
|
|
1425
1552
|
},
|
|
1426
1553
|
// First button: rounded left edge
|
|
1427
|
-
[`&.${
|
|
1554
|
+
[`&.${toggleButtonGroupClasses.firstButton}`]: {
|
|
1428
1555
|
borderTopLeftRadius: borderRadius.full,
|
|
1429
1556
|
borderBottomLeftRadius: borderRadius.full,
|
|
1430
1557
|
},
|
|
1431
1558
|
// Last button: rounded right edge, no right border
|
|
1432
|
-
[`&.${
|
|
1559
|
+
[`&.${toggleButtonGroupClasses.lastButton}`]: {
|
|
1433
1560
|
borderTopRightRadius: borderRadius.full,
|
|
1434
1561
|
borderBottomRightRadius: borderRadius.full,
|
|
1435
1562
|
borderRight: 'none',
|
|
1436
1563
|
},
|
|
1437
|
-
// Middle buttons: no border radius
|
|
1438
|
-
[`&.${buttonGroupClasses.middleButton}`]: {
|
|
1439
|
-
borderRadius: 0,
|
|
1440
|
-
},
|
|
1441
1564
|
// Disabled state
|
|
1442
|
-
[`&.${
|
|
1565
|
+
[`&.${toggleButtonClasses.disabled}`]: {
|
|
1443
1566
|
backgroundColor: semanticColors.buttons.secondary.disabledBackground,
|
|
1444
1567
|
color: semanticColors.typography.button.disabled,
|
|
1445
1568
|
cursor: 'not-allowed',
|
|
@@ -1449,29 +1572,27 @@ const StyledButtonGroup = styled(MuiButtonGroup)(({ theme, size = 'medium' }) =>
|
|
|
1449
1572
|
};
|
|
1450
1573
|
});
|
|
1451
1574
|
/**
|
|
1452
|
-
*
|
|
1575
|
+
* NeoButtonTabGroup - Button tab group container
|
|
1453
1576
|
*
|
|
1454
1577
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4106-11129
|
|
1455
1578
|
*
|
|
1456
1579
|
* Figma Props Mapping:
|
|
1457
1580
|
* - Size (Sm|Md) → size prop (small|medium)
|
|
1458
|
-
* - Active button state → Controlled
|
|
1581
|
+
* - Active button state → Controlled via value/onChange props
|
|
1459
1582
|
*
|
|
1460
1583
|
* Usage:
|
|
1461
1584
|
* ```tsx
|
|
1462
|
-
* <
|
|
1463
|
-
* <
|
|
1464
|
-
* <
|
|
1465
|
-
* <
|
|
1466
|
-
* </
|
|
1585
|
+
* <NeoButtonTabGroup value={selected} onChange={(_, val) => setSelected(val)} size="medium">
|
|
1586
|
+
* <NeoButtonTab value="tab1">Tab 1</NeoButtonTab>
|
|
1587
|
+
* <NeoButtonTab value="tab2">Tab 2</NeoButtonTab>
|
|
1588
|
+
* <NeoButtonTab value="tab3">Tab 3</NeoButtonTab>
|
|
1589
|
+
* </NeoButtonTabGroup>
|
|
1467
1590
|
* ```
|
|
1468
|
-
*
|
|
1469
|
-
* Note: To show active state, add 'active' class to the selected button
|
|
1470
1591
|
*/
|
|
1471
|
-
const
|
|
1472
|
-
return jsx(
|
|
1592
|
+
const NeoButtonTabGroup = ({ size = 'medium', exclusive = true, ...props }) => {
|
|
1593
|
+
return jsx(StyledButtonTabGroup, { role: "tablist", size: size, exclusive: exclusive, ...props });
|
|
1473
1594
|
};
|
|
1474
|
-
|
|
1595
|
+
NeoButtonTabGroup.displayName = 'NeoButtonTabGroup';
|
|
1475
1596
|
|
|
1476
1597
|
// Border radius per size (from Figma)
|
|
1477
1598
|
const borderRadiusConfig = {
|
|
@@ -1545,7 +1666,7 @@ const StyledCheckbox = styled(Checkbox, {
|
|
|
1545
1666
|
height: config.size,
|
|
1546
1667
|
padding: 0,
|
|
1547
1668
|
marginTop: size === 'xs' ? 3 : 2,
|
|
1548
|
-
color: semanticColors.border.
|
|
1669
|
+
color: semanticColors.border.primary,
|
|
1549
1670
|
flexShrink: 0,
|
|
1550
1671
|
// Root element
|
|
1551
1672
|
[`&.${checkboxClasses.root}`]: {
|
|
@@ -1568,20 +1689,20 @@ const StyledCheckbox = styled(Checkbox, {
|
|
|
1568
1689
|
},
|
|
1569
1690
|
// Disabled state
|
|
1570
1691
|
[`&.${checkboxClasses.disabled}`]: {
|
|
1571
|
-
color: semanticColors.border.
|
|
1692
|
+
color: semanticColors.border.primary,
|
|
1572
1693
|
cursor: 'not-allowed',
|
|
1573
1694
|
// When checked and disabled
|
|
1574
1695
|
[`&.${checkboxClasses.checked}`]: {
|
|
1575
|
-
color: semanticColors.border.
|
|
1696
|
+
color: semanticColors.border.primary,
|
|
1576
1697
|
},
|
|
1577
1698
|
// When indeterminate and disabled
|
|
1578
1699
|
[`&.${checkboxClasses.indeterminate}`]: {
|
|
1579
|
-
color: semanticColors.border.
|
|
1700
|
+
color: semanticColors.border.primary,
|
|
1580
1701
|
},
|
|
1581
1702
|
},
|
|
1582
1703
|
// Focus visible for keyboard navigation
|
|
1583
1704
|
'&.Mui-focusVisible': {
|
|
1584
|
-
outline: `2px solid ${semanticColors.
|
|
1705
|
+
outline: `2px solid ${semanticColors.border.focus}`,
|
|
1585
1706
|
outlineOffset: 2,
|
|
1586
1707
|
borderRadius: config.borderRadius,
|
|
1587
1708
|
},
|
|
@@ -1711,7 +1832,7 @@ const StyledButtonBase = styled(ButtonBase, {
|
|
|
1711
1832
|
cursor: 'text',
|
|
1712
1833
|
// Focus visible for keyboard navigation
|
|
1713
1834
|
[`&.${buttonBaseClasses.focusVisible}`]: {
|
|
1714
|
-
outline: `2px solid ${semanticColors.
|
|
1835
|
+
outline: `2px solid ${semanticColors.border.focus}`,
|
|
1715
1836
|
outlineOffset: 2,
|
|
1716
1837
|
},
|
|
1717
1838
|
};
|
|
@@ -1752,9 +1873,9 @@ const IconWrapper$2 = styled('span')(({ theme, isMultiline }) => ({
|
|
|
1752
1873
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4187-30353
|
|
1753
1874
|
*
|
|
1754
1875
|
* Figma Props Mapping:
|
|
1755
|
-
* -
|
|
1756
|
-
* -
|
|
1757
|
-
* -
|
|
1876
|
+
* - Theme (Dark|Light) → variant (outlined|filled)
|
|
1877
|
+
* - Content (Single|Multi|Inline) → size (small|large|inline)
|
|
1878
|
+
* - Show icon (boolean) → endIcon (ReactNode, unmappable)
|
|
1758
1879
|
* - Text content → children prop
|
|
1759
1880
|
*/
|
|
1760
1881
|
const NeoCodeSnippet = ({ variant = 'outlined', size = 'small', endIcon, children, ...props }) => {
|
|
@@ -1782,7 +1903,7 @@ const StyledSearchField = styled(TextField)(({ theme }) => ({
|
|
|
1782
1903
|
fontSize: theme.typography.pxToRem(typography.fontSize.default),
|
|
1783
1904
|
borderRadius: borderRadius.input,
|
|
1784
1905
|
backgroundColor: semanticColors.input.background,
|
|
1785
|
-
border: `1px solid ${semanticColors.border.
|
|
1906
|
+
border: `1px solid ${semanticColors.border.primary}`,
|
|
1786
1907
|
paddingTop: spacing.spacing_1,
|
|
1787
1908
|
paddingBottom: spacing.spacing_1,
|
|
1788
1909
|
paddingLeft: spacing.spacing_1_1_2,
|
|
@@ -2039,11 +2160,11 @@ const ChevronDownIcon = (props) => (jsx(ChevronDown, { ...props, size: spacing.s
|
|
|
2039
2160
|
const StyledSelect = styled(MuiSelect)({
|
|
2040
2161
|
minHeight: spacing.spacing_5,
|
|
2041
2162
|
backgroundColor: semanticColors.input.background,
|
|
2042
|
-
border: `1px solid ${semanticColors.border.
|
|
2163
|
+
border: `1px solid ${semanticColors.border.primary}`,
|
|
2043
2164
|
borderRadius: `${borderRadius.input}px`,
|
|
2044
2165
|
'&:hover': {
|
|
2045
2166
|
backgroundColor: semanticColors.input.hoverBackground,
|
|
2046
|
-
borderColor: semanticColors.border.
|
|
2167
|
+
borderColor: semanticColors.border.primary,
|
|
2047
2168
|
},
|
|
2048
2169
|
'&.Mui-focused': {
|
|
2049
2170
|
backgroundColor: semanticColors.input.background,
|
|
@@ -2159,7 +2280,7 @@ const StyledGridFilterPanel = styled(GridFilterPanel)({
|
|
|
2159
2280
|
position: 'relative',
|
|
2160
2281
|
minHeight: spacing.spacing_5,
|
|
2161
2282
|
backgroundColor: semanticColors.input.background,
|
|
2162
|
-
border: `1px solid ${semanticColors.border.
|
|
2283
|
+
border: `1px solid ${semanticColors.border.primary}`,
|
|
2163
2284
|
borderRadius: `${borderRadius.input}px`,
|
|
2164
2285
|
fontSize: typography.fontSize.default,
|
|
2165
2286
|
fontWeight: typography.fontWeight.regular,
|
|
@@ -2167,11 +2288,11 @@ const StyledGridFilterPanel = styled(GridFilterPanel)({
|
|
|
2167
2288
|
},
|
|
2168
2289
|
[`& .${gridClasses.filterForm} .${inputBaseClasses.root}:hover`]: {
|
|
2169
2290
|
backgroundColor: semanticColors.input.hoverBackground,
|
|
2170
|
-
borderColor: semanticColors.border.
|
|
2291
|
+
borderColor: semanticColors.border.primary,
|
|
2171
2292
|
},
|
|
2172
2293
|
[`& .${gridClasses.filterForm} .${inputBaseClasses.root}.${inputBaseClasses.focused}`]: {
|
|
2173
2294
|
backgroundColor: semanticColors.input.background,
|
|
2174
|
-
borderColor: semanticColors.border.
|
|
2295
|
+
borderColor: semanticColors.border.primary,
|
|
2175
2296
|
},
|
|
2176
2297
|
[`& .${gridClasses.filterForm} .${inputBaseClasses.root}::before`]: {
|
|
2177
2298
|
display: 'none',
|
|
@@ -2595,11 +2716,11 @@ const outlinedColorStyles = {
|
|
|
2595
2716
|
},
|
|
2596
2717
|
};
|
|
2597
2718
|
const filledColorStyles = {
|
|
2598
|
-
default: semanticColors.status.neutral.
|
|
2599
|
-
error: semanticColors.status.error.
|
|
2600
|
-
warning: semanticColors.status.warning.
|
|
2601
|
-
success: semanticColors.status.success.
|
|
2602
|
-
info: semanticColors.status.info.
|
|
2719
|
+
default: semanticColors.status.neutral.default,
|
|
2720
|
+
error: semanticColors.status.error.default,
|
|
2721
|
+
warning: semanticColors.status.warning.default,
|
|
2722
|
+
success: semanticColors.status.success.default,
|
|
2723
|
+
info: semanticColors.status.info.default,
|
|
2603
2724
|
violet: colors.violet[500],
|
|
2604
2725
|
beta: colors.digitalBlue[300],
|
|
2605
2726
|
};
|
|
@@ -2629,9 +2750,9 @@ const StyledChip$1 = styled(Chip)(({ theme, size, variant, color }) => ({
|
|
|
2629
2750
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4120-34533
|
|
2630
2751
|
*
|
|
2631
2752
|
* Figma Props Mapping:
|
|
2632
|
-
* -
|
|
2633
|
-
* -
|
|
2634
|
-
* -
|
|
2753
|
+
* - Size (Small|Medium|Large) → size (small|medium|large)
|
|
2754
|
+
* - Type (Outline|Filled) → variant (outlined|filled)
|
|
2755
|
+
* - Intent (Neutral|Error|Warning|Success|Info|Violet|Beta) → color (default|error|warning|success|info|violet|beta)
|
|
2635
2756
|
* - Label text → label prop
|
|
2636
2757
|
*/
|
|
2637
2758
|
const NeoTag = ({ size = 'small', variant = 'outlined', ...props }) => {
|
|
@@ -3207,7 +3328,7 @@ const StyledIconButton = styled(IconButton, {
|
|
|
3207
3328
|
},
|
|
3208
3329
|
// Focus visible for keyboard navigation
|
|
3209
3330
|
'&:focus-visible': {
|
|
3210
|
-
outline: `2px solid ${semanticColors.
|
|
3331
|
+
outline: `2px solid ${semanticColors.border.focus}`,
|
|
3211
3332
|
outlineOffset: 2,
|
|
3212
3333
|
},
|
|
3213
3334
|
};
|
|
@@ -3547,7 +3668,7 @@ const sizeMap = {
|
|
|
3547
3668
|
};
|
|
3548
3669
|
const StyledBadge = styled(Badge)(({ ownerState }) => {
|
|
3549
3670
|
const size = sizeMap[ownerState.size];
|
|
3550
|
-
const color = semanticColors.status[ownerState.color].
|
|
3671
|
+
const color = semanticColors.status[ownerState.color].default;
|
|
3551
3672
|
return {
|
|
3552
3673
|
[`& .${badgeClasses.badge}`]: {
|
|
3553
3674
|
width: size,
|
|
@@ -3575,7 +3696,7 @@ const StyledBadge = styled(Badge)(({ ownerState }) => {
|
|
|
3575
3696
|
*/
|
|
3576
3697
|
const NeoDot = ({ size = 'medium', variant = 'solid', color = 'neutral', ...props }) => {
|
|
3577
3698
|
const dotSize = sizeMap[size];
|
|
3578
|
-
const mediumColor = semanticColors.status[color].
|
|
3699
|
+
const mediumColor = semanticColors.status[color].default;
|
|
3579
3700
|
const lightColor = semanticColors.status[color].light;
|
|
3580
3701
|
// For outline variant, use SVG for precise control
|
|
3581
3702
|
const renderDot = () => {
|
|
@@ -3941,6 +4062,56 @@ const NeoFooter = ({ variant = 'pagination', showShadow = false, loading = false
|
|
|
3941
4062
|
};
|
|
3942
4063
|
NeoFooter.displayName = 'NeoFooter';
|
|
3943
4064
|
|
|
4065
|
+
/**
|
|
4066
|
+
* Shared color palette for avatar components (GeneralAvatar, NavigationAvatar).
|
|
4067
|
+
* Maps color index (1-7) to background color token pairs.
|
|
4068
|
+
*/
|
|
4069
|
+
const avatarColorPalette = {
|
|
4070
|
+
1: { bg: colors.digitalBlue[100] },
|
|
4071
|
+
2: { bg: colors.digitalGreen[100] },
|
|
4072
|
+
3: { bg: colors.gold[100] },
|
|
4073
|
+
4: { bg: colors.red[100] },
|
|
4074
|
+
5: { bg: colors.violet[100] },
|
|
4075
|
+
6: { bg: colors.tealGreen[100] },
|
|
4076
|
+
7: { bg: colors.orange[100] },
|
|
4077
|
+
};
|
|
4078
|
+
|
|
4079
|
+
const sizeConfig$1 = {
|
|
4080
|
+
small: { width: spacing.spacing_4, height: spacing.spacing_4, fontSize: typography.fontSize.xs },
|
|
4081
|
+
medium: { width: spacing.spacing_5, height: spacing.spacing_5, fontSize: typography.fontSize.sm },
|
|
4082
|
+
};
|
|
4083
|
+
const StyledAvatar = styled(Avatar, {
|
|
4084
|
+
shouldForwardProp: prop => prop !== 'avatarSize' && prop !== 'colorIndex',
|
|
4085
|
+
})(({ theme, avatarSize, colorIndex }) => {
|
|
4086
|
+
const size = sizeConfig$1[avatarSize];
|
|
4087
|
+
const palette = avatarColorPalette[colorIndex];
|
|
4088
|
+
return {
|
|
4089
|
+
boxSizing: 'border-box',
|
|
4090
|
+
width: size.width,
|
|
4091
|
+
height: size.height,
|
|
4092
|
+
fontSize: theme.typography.pxToRem(size.fontSize),
|
|
4093
|
+
fontFamily: typography.fontFamily.body,
|
|
4094
|
+
fontWeight: typography.fontWeight.regular,
|
|
4095
|
+
lineHeight: 1,
|
|
4096
|
+
color: semanticColors.typography.body,
|
|
4097
|
+
backgroundColor: palette ? palette.bg : undefined,
|
|
4098
|
+
border: `1px solid ${semanticColors.border.primary}`,
|
|
4099
|
+
'&:focus-visible': {
|
|
4100
|
+
...focusRingStyles,
|
|
4101
|
+
borderColor: semanticColors.border.focus,
|
|
4102
|
+
},
|
|
4103
|
+
};
|
|
4104
|
+
});
|
|
4105
|
+
/**
|
|
4106
|
+
* NeoGeneralAvatar - Avatar with image or colored initials display
|
|
4107
|
+
*
|
|
4108
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=9600-185
|
|
4109
|
+
*/
|
|
4110
|
+
const NeoGeneralAvatar = ({ size = 'medium', colorIndex = 0, children, ...props }) => {
|
|
4111
|
+
return (jsx(StyledAvatar, { avatarSize: size, colorIndex: colorIndex, ...props, children: children }));
|
|
4112
|
+
};
|
|
4113
|
+
NeoGeneralAvatar.displayName = 'NeoGeneralAvatar';
|
|
4114
|
+
|
|
3944
4115
|
const customProps$1 = ['iconSize'];
|
|
3945
4116
|
const StyledIconWrapper = styled('div', {
|
|
3946
4117
|
shouldForwardProp: prop => !customProps$1.includes(prop),
|
|
@@ -4122,9 +4293,9 @@ const StyledInputBase = styled(InputBase, {
|
|
|
4122
4293
|
},
|
|
4123
4294
|
medium: {
|
|
4124
4295
|
height: spacing.spacing_5_1_2,
|
|
4125
|
-
padding: `${spacing.
|
|
4296
|
+
padding: `${spacing.spacing_1_1_4}px ${spacing.spacing_2}px ${spacing.spacing_1_1_4}px ${startAdornment ? 0 : spacing.spacing_2}px`,
|
|
4126
4297
|
fontSize: theme.typography.pxToRem(typography.fontSize.default),
|
|
4127
|
-
borderRadius:
|
|
4298
|
+
borderRadius: spacing.spacing_8,
|
|
4128
4299
|
},
|
|
4129
4300
|
};
|
|
4130
4301
|
const sizeStyles = sizeConfig[size];
|
|
@@ -4133,7 +4304,7 @@ const StyledInputBase = styled(InputBase, {
|
|
|
4133
4304
|
fontSize: sizeStyles.fontSize,
|
|
4134
4305
|
borderRadius: sizeStyles.borderRadius,
|
|
4135
4306
|
backgroundColor: semanticColors.input.background,
|
|
4136
|
-
border: `1px solid ${destructive ? semanticColors.status.error.
|
|
4307
|
+
border: `1px solid ${destructive ? semanticColors.status.error.default : semanticColors.border.primary}`,
|
|
4137
4308
|
transition: theme.transitions.create(['border-color', 'background-color'], {
|
|
4138
4309
|
duration: theme.transitions.duration.short,
|
|
4139
4310
|
}),
|
|
@@ -4147,19 +4318,21 @@ const StyledInputBase = styled(InputBase, {
|
|
|
4147
4318
|
// Hover state
|
|
4148
4319
|
'&:hover': {
|
|
4149
4320
|
backgroundColor: semanticColors.input.hoverBackground,
|
|
4150
|
-
borderColor: destructive
|
|
4321
|
+
borderColor: destructive
|
|
4322
|
+
? semanticColors.status.error.default
|
|
4323
|
+
: semanticColors.border.primary,
|
|
4151
4324
|
},
|
|
4152
4325
|
// Focused state
|
|
4153
4326
|
[`&.${inputBaseClasses.focused}`]: {
|
|
4154
4327
|
backgroundColor: semanticColors.input.background,
|
|
4155
4328
|
borderColor: destructive
|
|
4156
|
-
? semanticColors.status.error.
|
|
4329
|
+
? semanticColors.status.error.default
|
|
4157
4330
|
: semanticColors.buttons.primary.default,
|
|
4158
4331
|
},
|
|
4159
4332
|
// Disabled state
|
|
4160
4333
|
[`&.${inputBaseClasses.disabled}`]: {
|
|
4161
4334
|
backgroundColor: semanticColors.input.disabledBackground,
|
|
4162
|
-
borderColor: semanticColors.border.
|
|
4335
|
+
borderColor: semanticColors.border.primary,
|
|
4163
4336
|
color: semanticColors.icons.disabled,
|
|
4164
4337
|
[`& .${inputBaseClasses.input}`]: {
|
|
4165
4338
|
WebkitTextFillColor: semanticColors.icons.disabled,
|
|
@@ -4167,11 +4340,11 @@ const StyledInputBase = styled(InputBase, {
|
|
|
4167
4340
|
},
|
|
4168
4341
|
// Error state
|
|
4169
4342
|
[`&.${inputBaseClasses.error}`]: {
|
|
4170
|
-
borderColor: semanticColors.status.error.
|
|
4343
|
+
borderColor: semanticColors.status.error.default,
|
|
4171
4344
|
},
|
|
4172
4345
|
// Adornment styling
|
|
4173
4346
|
[`& .${inputAdornmentClasses.root}`]: {
|
|
4174
|
-
color: destructive ? semanticColors.status.error.
|
|
4347
|
+
color: destructive ? semanticColors.status.error.default : semanticColors.icons.placeholder,
|
|
4175
4348
|
},
|
|
4176
4349
|
};
|
|
4177
4350
|
});
|
|
@@ -4185,7 +4358,7 @@ const StyledFormHelperText = styled(FormHelperText, {
|
|
|
4185
4358
|
fontSize: theme.typography.pxToRem(typography.fontSize.sm),
|
|
4186
4359
|
color: semanticColors.typography.input.helper,
|
|
4187
4360
|
[`&.${formHelperTextClasses.error}`]: {
|
|
4188
|
-
color: semanticColors.status.error.
|
|
4361
|
+
color: semanticColors.status.error.default,
|
|
4189
4362
|
},
|
|
4190
4363
|
[`&.${formHelperTextClasses.disabled}`]: {
|
|
4191
4364
|
color: semanticColors.icons.disabled,
|
|
@@ -4485,7 +4658,7 @@ const StyledListItemButton = styled(ListItemButton)(({ theme }) => ({
|
|
|
4485
4658
|
transition: theme.transitions.create(['border', 'background-color']),
|
|
4486
4659
|
// Active (selected) state
|
|
4487
4660
|
[`&.${listItemButtonClasses.selected}`]: {
|
|
4488
|
-
border: `2px solid ${semanticColors.
|
|
4661
|
+
border: `2px solid ${semanticColors.buttons.primary.default}`,
|
|
4489
4662
|
backgroundColor: theme.palette.common.white,
|
|
4490
4663
|
'&:hover': {
|
|
4491
4664
|
backgroundColor: theme.palette.common.white,
|
|
@@ -4519,9 +4692,9 @@ const StyledListItemButton = styled(ListItemButton)(({ theme }) => ({
|
|
|
4519
4692
|
},
|
|
4520
4693
|
// Focus state
|
|
4521
4694
|
[`&.${listItemButtonClasses.focusVisible}`]: {
|
|
4522
|
-
outline: `2px solid ${semanticColors.
|
|
4695
|
+
outline: `2px solid ${semanticColors.buttons.primary.default}`,
|
|
4523
4696
|
outlineOffset: 2,
|
|
4524
|
-
border: `2px solid ${semanticColors.
|
|
4697
|
+
border: `2px solid ${semanticColors.buttons.primary.default}`,
|
|
4525
4698
|
backgroundColor: theme.palette.common.white,
|
|
4526
4699
|
[`& .${listItemIconClasses.root}`]: {
|
|
4527
4700
|
color: semanticColors.icons.default,
|
|
@@ -4580,7 +4753,7 @@ const StyledListItemButton = styled(ListItemButton)(({ theme }) => ({
|
|
|
4580
4753
|
* - showIcon → Conditional rendering of ListItemIcon child
|
|
4581
4754
|
*
|
|
4582
4755
|
* Design Tokens Used:
|
|
4583
|
-
* - semanticColors.
|
|
4756
|
+
* - semanticColors.buttons.primary.default (#2f42ff) - Active border
|
|
4584
4757
|
* - semanticColors.border.primary (#d1d5db) - Default/disabled border
|
|
4585
4758
|
* - semanticColors.icons.default (#1f2937) - Active icon color
|
|
4586
4759
|
* - semanticColors.icons.disabled (#d1d5db) - Deselected/disabled icon color
|
|
@@ -4613,17 +4786,17 @@ const StyledCard = styled(MuiCard, {
|
|
|
4613
4786
|
flexDirection: 'column',
|
|
4614
4787
|
gap: theme.spacing(2), // 16px
|
|
4615
4788
|
backgroundColor: semanticColors.surfaces.card,
|
|
4616
|
-
border: `1px solid ${selected ? semanticColors.
|
|
4789
|
+
border: `1px solid ${selected ? semanticColors.buttons.primary.default : semanticColors.border.primary}`,
|
|
4617
4790
|
borderRadius: borderRadius.xS,
|
|
4618
4791
|
boxShadow: selected ? activeShadow$1 : 'none',
|
|
4619
4792
|
transition: theme.transitions.create(['border-color', 'background-color', 'box-shadow']),
|
|
4620
4793
|
cursor: 'pointer',
|
|
4621
4794
|
'&:hover': {
|
|
4622
|
-
borderColor: semanticColors.
|
|
4795
|
+
borderColor: semanticColors.buttons.primary.default,
|
|
4623
4796
|
boxShadow: activeShadow$1,
|
|
4624
4797
|
},
|
|
4625
4798
|
'&:focus-visible': {
|
|
4626
|
-
borderColor: semanticColors.
|
|
4799
|
+
borderColor: semanticColors.buttons.primary.default,
|
|
4627
4800
|
...focusRingStyles,
|
|
4628
4801
|
},
|
|
4629
4802
|
...(disabled && {
|
|
@@ -4727,8 +4900,8 @@ const Description$1 = styled('p')(({ theme }) => ({
|
|
|
4727
4900
|
* Design Tokens Used:
|
|
4728
4901
|
* - semanticColors.surfaces.card (#FFFFFF) - Default card background
|
|
4729
4902
|
* - semanticColors.status.info.light (#f2f3ff) - Active/focused card background
|
|
4730
|
-
* - semanticColors.border.
|
|
4731
|
-
* - semanticColors.
|
|
4903
|
+
* - semanticColors.border.primary (#d1d5db) - Default border
|
|
4904
|
+
* - semanticColors.buttons.primary.default (#2f42ff) - Active/focused border
|
|
4732
4905
|
* - shadows.focusWhite1 - Inner white focus ring (2px spread)
|
|
4733
4906
|
* - shadows.focusBlue2 - Outer blue focus ring (4px spread)
|
|
4734
4907
|
* - colors.grey[800] (#1F2937) - Text color
|
|
@@ -4751,10 +4924,12 @@ const StyledLargeCard = styled(MuiCard, {
|
|
|
4751
4924
|
const isActive = cardState === 'active';
|
|
4752
4925
|
const isDisabled = cardState === 'disabled';
|
|
4753
4926
|
const isFocused = cardState === 'focused';
|
|
4754
|
-
const activeBorderColor = isLight
|
|
4927
|
+
const activeBorderColor = isLight
|
|
4928
|
+
? semanticColors.buttons.primary.default
|
|
4929
|
+
: colors.digitalGreen[300];
|
|
4755
4930
|
const defaultBorderColor = isLight
|
|
4756
|
-
? semanticColors.border.
|
|
4757
|
-
: `${semanticColors.border.
|
|
4931
|
+
? semanticColors.border.primary
|
|
4932
|
+
: `${semanticColors.border.primary}80`;
|
|
4758
4933
|
return {
|
|
4759
4934
|
width: 340,
|
|
4760
4935
|
height: 162,
|
|
@@ -4770,7 +4945,7 @@ const StyledLargeCard = styled(MuiCard, {
|
|
|
4770
4945
|
overflow: 'hidden',
|
|
4771
4946
|
...(isFocused && focusRingStyles),
|
|
4772
4947
|
'&:focus-visible': {
|
|
4773
|
-
borderColor: isLight ? semanticColors.
|
|
4948
|
+
borderColor: isLight ? semanticColors.buttons.primary.default : colors.digitalGreen[300],
|
|
4774
4949
|
...focusRingStyles,
|
|
4775
4950
|
},
|
|
4776
4951
|
...(isDisabled && {
|
|
@@ -4850,8 +5025,8 @@ const ButtonsRow = styled('div')({
|
|
|
4850
5025
|
* Design Tokens Used:
|
|
4851
5026
|
* - semanticColors.surfaces.card (#ffffff) - Light theme background
|
|
4852
5027
|
* - colors.grey[800] (#1f2937) - Dark theme background
|
|
4853
|
-
* - semanticColors.border.
|
|
4854
|
-
* - semanticColors.
|
|
5028
|
+
* - semanticColors.border.primary (#d1d5db) - Default border (50% opacity on dark)
|
|
5029
|
+
* - semanticColors.buttons.primary.default (#2f42ff) - Active/focused border (light theme)
|
|
4855
5030
|
* - colors.digitalGreen[300] (#88fe9b) - Active/focused border (dark theme)
|
|
4856
5031
|
* - borderRadius.xS (4px) - Corner radius
|
|
4857
5032
|
* - shadows.focusWhite1 + shadows.focusBlue2 - Focus ring
|
|
@@ -4923,7 +5098,7 @@ NeoMenu.displayName = 'NeoMenu';
|
|
|
4923
5098
|
const StyledDialog = styled(Dialog)({
|
|
4924
5099
|
[`& .${dialogClasses.paper}`]: {
|
|
4925
5100
|
borderRadius: borderRadius.card,
|
|
4926
|
-
border: `1px solid ${semanticColors.border.
|
|
5101
|
+
border: `1px solid ${semanticColors.border.primary}`,
|
|
4927
5102
|
boxShadow: 'none',
|
|
4928
5103
|
},
|
|
4929
5104
|
[`& .${dialogClasses.container}`]: {
|
|
@@ -5106,6 +5281,34 @@ const NeoModalFooter = ({ leadingContent, children }) => {
|
|
|
5106
5281
|
};
|
|
5107
5282
|
NeoModalFooter.displayName = 'NeoModalFooter';
|
|
5108
5283
|
|
|
5284
|
+
const NavigationAvatarContainer = styled('div')({
|
|
5285
|
+
display: 'flex',
|
|
5286
|
+
boxSizing: 'border-box',
|
|
5287
|
+
width: spacing.spacing_5_1_2,
|
|
5288
|
+
height: spacing.spacing_5_1_2,
|
|
5289
|
+
padding: spacing.spacing_3_4,
|
|
5290
|
+
justifyContent: 'center',
|
|
5291
|
+
alignItems: 'center',
|
|
5292
|
+
borderRadius: '50%',
|
|
5293
|
+
border: `1px solid ${semanticColors.border.primary}`,
|
|
5294
|
+
backgroundColor: semanticColors.buttons.secondary.defaultBackground,
|
|
5295
|
+
'&:focus-within': {
|
|
5296
|
+
borderColor: semanticColors.border.focus,
|
|
5297
|
+
},
|
|
5298
|
+
});
|
|
5299
|
+
/**
|
|
5300
|
+
* NeoNavigationAvatar - Compact avatar for navigation contexts
|
|
5301
|
+
*
|
|
5302
|
+
* Wraps NeoGeneralAvatar (size="small") in a 44px container with 6px padding,
|
|
5303
|
+
* providing a larger interactive area for navigation UI.
|
|
5304
|
+
*
|
|
5305
|
+
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC?node-id=11325-102
|
|
5306
|
+
*/
|
|
5307
|
+
const NeoNavigationAvatar = ({ colorIndex = 0, children, ...props }) => {
|
|
5308
|
+
return (jsx(NavigationAvatarContainer, { children: jsx(NeoGeneralAvatar, { size: "small", colorIndex: colorIndex, ...props, children: children }) }));
|
|
5309
|
+
};
|
|
5310
|
+
NeoNavigationAvatar.displayName = 'NeoNavigationAvatar';
|
|
5311
|
+
|
|
5109
5312
|
const customProps = ['selected'];
|
|
5110
5313
|
const StyledRoot = styled(ButtonBase, {
|
|
5111
5314
|
shouldForwardProp: prop => !customProps.includes(prop),
|
|
@@ -5445,7 +5648,7 @@ const StyledLinearProgress$1 = styled(LinearProgress, {
|
|
|
5445
5648
|
// Cancelled variant uses warning color
|
|
5446
5649
|
'&[data-variant="cancelled"]': {
|
|
5447
5650
|
[`& .${linearProgressClasses.bar}`]: {
|
|
5448
|
-
backgroundColor: semanticColors.status.warning.
|
|
5651
|
+
backgroundColor: semanticColors.status.warning.default,
|
|
5449
5652
|
},
|
|
5450
5653
|
},
|
|
5451
5654
|
}));
|
|
@@ -5510,7 +5713,7 @@ const StyledTextField = styled(TextField)(({ theme }) => ({
|
|
|
5510
5713
|
fontSize: theme.typography.pxToRem(typography.fontSize.default),
|
|
5511
5714
|
borderRadius: borderRadius.input,
|
|
5512
5715
|
backgroundColor: semanticColors.input.background,
|
|
5513
|
-
border: `1px solid ${semanticColors.border.
|
|
5716
|
+
border: `1px solid ${semanticColors.border.primary}`,
|
|
5514
5717
|
paddingTop: spacing.spacing_1,
|
|
5515
5718
|
paddingBottom: spacing.spacing_1,
|
|
5516
5719
|
paddingLeft: spacing.spacing_1_1_2,
|
|
@@ -5605,7 +5808,7 @@ NeoQuickFilter.displayName = 'NeoQuickFilter';
|
|
|
5605
5808
|
const UncheckedIcon = ({ size }) => {
|
|
5606
5809
|
const dimensions = size === 'small' ? 16 : 20;
|
|
5607
5810
|
const radius = size === 'small' ? 8 : 10;
|
|
5608
|
-
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.
|
|
5811
|
+
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: "transparent" })] }));
|
|
5609
5812
|
};
|
|
5610
5813
|
const CheckedIcon = ({ size }) => {
|
|
5611
5814
|
const dimensions = size === 'small' ? 16 : 20;
|
|
@@ -5852,7 +6055,7 @@ NeoSkeleton.displayName = 'NeoSkeleton';
|
|
|
5852
6055
|
|
|
5853
6056
|
/**
|
|
5854
6057
|
* Styled Alert component with custom severity and variant styling
|
|
5855
|
-
* Uses Custom Variants Pattern to add 'neutral' and '
|
|
6058
|
+
* Uses Custom Variants Pattern to add 'neutral', 'info', and 'warning' severities
|
|
5856
6059
|
*/
|
|
5857
6060
|
const StyledAlert$1 = styled(Alert, {
|
|
5858
6061
|
shouldForwardProp: prop => prop !== 'severity' && prop !== 'variant',
|
|
@@ -5861,41 +6064,49 @@ const StyledAlert$1 = styled(Alert, {
|
|
|
5861
6064
|
const colorMap = {
|
|
5862
6065
|
success: {
|
|
5863
6066
|
light: semanticColors.status.success.light,
|
|
5864
|
-
medium: semanticColors.status.success.
|
|
6067
|
+
medium: semanticColors.status.success.default,
|
|
5865
6068
|
},
|
|
5866
6069
|
error: {
|
|
5867
6070
|
light: semanticColors.status.error.light,
|
|
5868
|
-
medium: semanticColors.status.error.
|
|
6071
|
+
medium: semanticColors.status.error.default,
|
|
5869
6072
|
},
|
|
5870
6073
|
neutral: {
|
|
5871
6074
|
light: semanticColors.status.neutral.light,
|
|
5872
|
-
medium: semanticColors.status.neutral.
|
|
6075
|
+
medium: semanticColors.status.neutral.default,
|
|
5873
6076
|
},
|
|
5874
6077
|
info: {
|
|
5875
6078
|
light: semanticColors.status.info.light,
|
|
5876
|
-
medium: semanticColors.status.info.
|
|
6079
|
+
medium: semanticColors.status.info.default,
|
|
6080
|
+
},
|
|
6081
|
+
warning: {
|
|
6082
|
+
light: semanticColors.status.warning.light,
|
|
6083
|
+
medium: semanticColors.status.warning.default,
|
|
5877
6084
|
},
|
|
5878
6085
|
};
|
|
5879
6086
|
const severityColors = colorMap[severity];
|
|
5880
|
-
|
|
6087
|
+
const isWarningFilled = severity === 'warning' && variant === 'filled';
|
|
6088
|
+
// Variant-specific styles
|
|
5881
6089
|
const variantStyles = (() => {
|
|
5882
6090
|
if (variant === 'filled') {
|
|
5883
|
-
//
|
|
6091
|
+
// Warning filled uses dark text for contrast on yellow bg
|
|
6092
|
+
const textColor = isWarningFilled
|
|
6093
|
+
? semanticColors.typography.warning
|
|
6094
|
+
: semanticColors.typography.tooltip;
|
|
5884
6095
|
return {
|
|
5885
6096
|
backgroundColor: severityColors.medium,
|
|
5886
6097
|
border: 'none',
|
|
5887
|
-
color:
|
|
6098
|
+
color: textColor,
|
|
5888
6099
|
padding: theme.spacing(0.75, 3),
|
|
5889
6100
|
boxShadow: `0px 1px 3px ${semanticColors.surfaces.shadowNeutral}1a`, // 1a = 10% opacity
|
|
5890
6101
|
[`& .${alertClasses.icon}`]: {
|
|
5891
|
-
color:
|
|
6102
|
+
color: textColor,
|
|
5892
6103
|
},
|
|
5893
6104
|
[`& .${alertClasses.message}`]: {
|
|
5894
|
-
color:
|
|
6105
|
+
color: textColor,
|
|
5895
6106
|
},
|
|
5896
6107
|
};
|
|
5897
6108
|
}
|
|
5898
|
-
//
|
|
6109
|
+
// Outlined: light background with border
|
|
5899
6110
|
return {
|
|
5900
6111
|
backgroundColor: severityColors.light,
|
|
5901
6112
|
border: `1px solid ${severityColors.medium}`,
|
|
@@ -5924,7 +6135,9 @@ const StyledAlert$1 = styled(Alert, {
|
|
|
5924
6135
|
fontSize: theme.typography.pxToRem(typography.fontSize.sm),
|
|
5925
6136
|
fontWeight: typography.fontWeight.regular,
|
|
5926
6137
|
color: variant === 'filled'
|
|
5927
|
-
?
|
|
6138
|
+
? isWarningFilled
|
|
6139
|
+
? semanticColors.typography.warning
|
|
6140
|
+
: semanticColors.typography.tooltip
|
|
5928
6141
|
: semanticColors.typography.bodySecondary,
|
|
5929
6142
|
lineHeight: 1.4,
|
|
5930
6143
|
marginTop: theme.spacing(0.25),
|
|
@@ -5934,20 +6147,21 @@ const StyledAlert$1 = styled(Alert, {
|
|
|
5934
6147
|
/**
|
|
5935
6148
|
* NeoStatusBanner - Status banner component for displaying system status messages
|
|
5936
6149
|
*
|
|
5937
|
-
* Displays status information with different severity levels (success, error, info, neutral)
|
|
5938
|
-
* visual modes (outlined for light backgrounds, filled for emphasis).
|
|
6150
|
+
* Displays status information with different severity levels (success, error, info, neutral, warning)
|
|
6151
|
+
* and visual modes (outlined for light backgrounds, filled for emphasis).
|
|
5939
6152
|
*
|
|
5940
6153
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4921-3427
|
|
5941
6154
|
*
|
|
5942
6155
|
* Figma Props Mapping:
|
|
5943
|
-
* -
|
|
5944
|
-
* -
|
|
6156
|
+
* - Intent (Success|Error|Info|Offline|Warning) → severity ('success'|'error'|'info'|'neutral'|'warning')
|
|
6157
|
+
* - Type (Outlined|Filled) → variant ('outlined'|'filled')
|
|
5945
6158
|
*
|
|
5946
6159
|
* Design Tokens Used:
|
|
5947
|
-
* - status.success.light, status.success.
|
|
5948
|
-
* - status.error.light, status.error.
|
|
5949
|
-
* - status.neutral.light, status.neutral.
|
|
5950
|
-
* - status.info.light, status.info.
|
|
6160
|
+
* - status.success.light, status.success.default
|
|
6161
|
+
* - status.error.light, status.error.default
|
|
6162
|
+
* - status.neutral.light, status.neutral.default
|
|
6163
|
+
* - status.info.light, status.info.default
|
|
6164
|
+
* - status.warning.light, status.warning.default
|
|
5951
6165
|
* - typography.tooltip, typography.bodySecondary
|
|
5952
6166
|
* - grey[800]
|
|
5953
6167
|
* - fontSize.default, fontSize.sm
|
|
@@ -5962,6 +6176,7 @@ const NeoStatusBanner = ({ severity = 'success', variant = 'outlined', icon, chi
|
|
|
5962
6176
|
error: jsx(CircleAlert, { size: 24 }),
|
|
5963
6177
|
neutral: jsx(WifiOff, { size: 24 }),
|
|
5964
6178
|
info: jsx(Info, { size: 24 }),
|
|
6179
|
+
warning: jsx(TriangleAlert, { size: 24 }),
|
|
5965
6180
|
};
|
|
5966
6181
|
const defaultIcon = iconMap[severity];
|
|
5967
6182
|
// Type assertion needed: severity and variant are custom props filtered by shouldForwardProp
|
|
@@ -5984,7 +6199,7 @@ NeoStatusBanner.displayName = 'NeoStatusBanner';
|
|
|
5984
6199
|
const NeoTabs = styled(MuiTabs)(() => ({
|
|
5985
6200
|
minHeight: spacing.spacing_5,
|
|
5986
6201
|
[`& .${tabsClasses.indicator}`]: {
|
|
5987
|
-
backgroundColor: semanticColors.
|
|
6202
|
+
backgroundColor: semanticColors.buttons.primary.default,
|
|
5988
6203
|
height: 2,
|
|
5989
6204
|
},
|
|
5990
6205
|
[`& .${tabsClasses.flexContainer}`]: {
|
|
@@ -6006,7 +6221,7 @@ const StyledTab = styled(MuiTab)(({ theme }) => ({
|
|
|
6006
6221
|
fontWeight: typography.fontWeight.semiBold,
|
|
6007
6222
|
},
|
|
6008
6223
|
[`&.${buttonBaseClasses.focusVisible}`]: {
|
|
6009
|
-
outline: `2px solid ${semanticColors.
|
|
6224
|
+
outline: `2px solid ${semanticColors.border.focus}`,
|
|
6010
6225
|
outlineOffset: -2,
|
|
6011
6226
|
},
|
|
6012
6227
|
[`&.${tabClasses.disabled}`]: {
|
|
@@ -6026,11 +6241,9 @@ const TabLabelContainer = styled('span')(({ theme }) => ({
|
|
|
6026
6241
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=3368-26152
|
|
6027
6242
|
*
|
|
6028
6243
|
* Figma Props Mapping:
|
|
6029
|
-
* -
|
|
6030
|
-
* - State
|
|
6031
|
-
* -
|
|
6032
|
-
* - State=Focus → CSS :focus-visible
|
|
6033
|
-
* - Tag count → count prop (renders NeoTag)
|
|
6244
|
+
* - Selected (True|False) → Controlled by parent NeoTabs value
|
|
6245
|
+
* - State (Default|Hover|Focus|Disabled) → CSS states + disabled prop
|
|
6246
|
+
* - Show tag (boolean) → count prop (renders NeoTag)
|
|
6034
6247
|
* - Text label → label prop
|
|
6035
6248
|
*/
|
|
6036
6249
|
const NeoTab = ({ label, count, ...props }) => {
|
|
@@ -6041,8 +6254,8 @@ NeoTab.displayName = 'NeoTab';
|
|
|
6041
6254
|
|
|
6042
6255
|
// biome-ignore lint/suspicious/noExplicitAny: Type cast required to override MUI Alert variant type without global augmentation
|
|
6043
6256
|
const StyledAlert = styled(Alert, {
|
|
6044
|
-
shouldForwardProp: prop => prop !== 'variant' && prop !== 'showProgress',
|
|
6045
|
-
})(({ theme, variant = 'default' }) => {
|
|
6257
|
+
shouldForwardProp: prop => prop !== 'variant' && prop !== 'toastType' && prop !== 'showProgress',
|
|
6258
|
+
})(({ theme, variant = 'default', toastType = 'outlined' }) => {
|
|
6046
6259
|
// Base styles
|
|
6047
6260
|
const baseStyles = {
|
|
6048
6261
|
padding: spacing.spacing_2,
|
|
@@ -6066,37 +6279,73 @@ const StyledAlert = styled(Alert, {
|
|
|
6066
6279
|
marginRight: 0,
|
|
6067
6280
|
},
|
|
6068
6281
|
};
|
|
6069
|
-
//
|
|
6070
|
-
const
|
|
6282
|
+
// Outlined intent styles (light bg + colored border)
|
|
6283
|
+
const outlinedStyles = {
|
|
6071
6284
|
default: {
|
|
6072
6285
|
backgroundColor: semanticColors.surfaces.snackbarDarkMode,
|
|
6073
6286
|
color: colors.grey['800'],
|
|
6074
6287
|
border: `1px solid ${semanticColors.border.primary}`,
|
|
6075
6288
|
},
|
|
6076
|
-
dark: {
|
|
6077
|
-
backgroundColor: semanticColors.surfaces.snackbarLightMode,
|
|
6078
|
-
color: semanticColors.surfaces.white,
|
|
6079
|
-
border: `1px solid ${semanticColors.surfaces.snackbarLightMode}`,
|
|
6080
|
-
},
|
|
6081
|
-
brand: {
|
|
6082
|
-
backgroundColor: semanticColors.surfaces.snackbarBrand,
|
|
6083
|
-
color: semanticColors.surfaces.white,
|
|
6084
|
-
border: `1px solid ${semanticColors.surfaces.snackbarBrand}`,
|
|
6085
|
-
},
|
|
6086
6289
|
error: {
|
|
6087
6290
|
backgroundColor: semanticColors.status.error.light,
|
|
6088
6291
|
color: semanticColors.status.error.dark,
|
|
6089
|
-
border: `1px solid ${semanticColors.status.error.
|
|
6292
|
+
border: `1px solid ${semanticColors.status.error.default}`,
|
|
6090
6293
|
},
|
|
6091
6294
|
success: {
|
|
6092
6295
|
backgroundColor: semanticColors.status.success.light,
|
|
6093
6296
|
color: semanticColors.status.success.dark,
|
|
6094
|
-
border: `1px solid ${semanticColors.status.success.
|
|
6297
|
+
border: `1px solid ${semanticColors.status.success.default}`,
|
|
6095
6298
|
},
|
|
6096
6299
|
info: {
|
|
6097
6300
|
backgroundColor: semanticColors.status.info.light,
|
|
6098
6301
|
color: semanticColors.status.info.dark,
|
|
6099
|
-
border: `1px solid ${semanticColors.status.info.
|
|
6302
|
+
border: `1px solid ${semanticColors.status.info.default}`,
|
|
6303
|
+
},
|
|
6304
|
+
warning: {
|
|
6305
|
+
backgroundColor: semanticColors.status.warning.light,
|
|
6306
|
+
color: semanticColors.status.warning.dark,
|
|
6307
|
+
border: `1px solid ${semanticColors.status.warning.default}`,
|
|
6308
|
+
},
|
|
6309
|
+
};
|
|
6310
|
+
// Filled intent styles (solid bg)
|
|
6311
|
+
const filledStyles = {
|
|
6312
|
+
default: {
|
|
6313
|
+
backgroundColor: semanticColors.surfaces.snackbarLightMode,
|
|
6314
|
+
color: semanticColors.surfaces.white,
|
|
6315
|
+
border: `1px solid ${semanticColors.surfaces.snackbarLightMode}`,
|
|
6316
|
+
},
|
|
6317
|
+
error: {
|
|
6318
|
+
backgroundColor: semanticColors.status.error.dark,
|
|
6319
|
+
color: semanticColors.surfaces.white,
|
|
6320
|
+
border: `1px solid ${semanticColors.status.error.dark}`,
|
|
6321
|
+
},
|
|
6322
|
+
success: {
|
|
6323
|
+
backgroundColor: semanticColors.status.success.dark,
|
|
6324
|
+
color: semanticColors.surfaces.white,
|
|
6325
|
+
border: `1px solid ${semanticColors.status.success.dark}`,
|
|
6326
|
+
},
|
|
6327
|
+
info: {
|
|
6328
|
+
backgroundColor: semanticColors.status.info.dark,
|
|
6329
|
+
color: semanticColors.surfaces.white,
|
|
6330
|
+
border: `1px solid ${semanticColors.status.info.dark}`,
|
|
6331
|
+
},
|
|
6332
|
+
warning: {
|
|
6333
|
+
backgroundColor: semanticColors.status.warning.default,
|
|
6334
|
+
color: semanticColors.typography.warning,
|
|
6335
|
+
border: `1px solid ${semanticColors.status.warning.default}`,
|
|
6336
|
+
},
|
|
6337
|
+
};
|
|
6338
|
+
// Legacy variants (ignore toastType)
|
|
6339
|
+
const legacyStyles = {
|
|
6340
|
+
dark: {
|
|
6341
|
+
backgroundColor: semanticColors.surfaces.snackbarLightMode,
|
|
6342
|
+
color: semanticColors.surfaces.white,
|
|
6343
|
+
border: `1px solid ${semanticColors.surfaces.snackbarLightMode}`,
|
|
6344
|
+
},
|
|
6345
|
+
brand: {
|
|
6346
|
+
backgroundColor: semanticColors.surfaces.snackbarBrand,
|
|
6347
|
+
color: semanticColors.surfaces.white,
|
|
6348
|
+
border: `1px solid ${semanticColors.surfaces.snackbarBrand}`,
|
|
6100
6349
|
},
|
|
6101
6350
|
download: {
|
|
6102
6351
|
backgroundColor: semanticColors.surfaces.snackbarDarkMode,
|
|
@@ -6104,45 +6353,83 @@ const StyledAlert = styled(Alert, {
|
|
|
6104
6353
|
border: `1px solid ${semanticColors.border.primary}`,
|
|
6105
6354
|
},
|
|
6106
6355
|
};
|
|
6356
|
+
const getVariantStyles = () => {
|
|
6357
|
+
if (legacyStyles[variant])
|
|
6358
|
+
return legacyStyles[variant];
|
|
6359
|
+
const styleMap = toastType === 'filled' ? filledStyles : outlinedStyles;
|
|
6360
|
+
return styleMap[variant] ?? outlinedStyles.default;
|
|
6361
|
+
};
|
|
6107
6362
|
return {
|
|
6108
6363
|
...baseStyles,
|
|
6109
|
-
...
|
|
6364
|
+
...getVariantStyles(),
|
|
6110
6365
|
};
|
|
6111
6366
|
});
|
|
6112
|
-
const ToastTitle = styled('p')(({ theme, variant = 'default' }) => {
|
|
6113
|
-
const
|
|
6367
|
+
const ToastTitle = styled('p')(({ theme, variant = 'default', toastType = 'outlined' }) => {
|
|
6368
|
+
const outlinedColors = {
|
|
6114
6369
|
default: colors.grey['700'],
|
|
6115
|
-
dark: semanticColors.surfaces.white,
|
|
6116
|
-
brand: semanticColors.surfaces.white,
|
|
6117
6370
|
error: semanticColors.status.error.dark,
|
|
6118
6371
|
success: semanticColors.status.success.dark,
|
|
6119
6372
|
info: semanticColors.status.info.dark,
|
|
6373
|
+
warning: semanticColors.status.warning.dark,
|
|
6374
|
+
};
|
|
6375
|
+
const filledColors = {
|
|
6376
|
+
default: semanticColors.surfaces.white,
|
|
6377
|
+
error: semanticColors.surfaces.white,
|
|
6378
|
+
success: semanticColors.surfaces.white,
|
|
6379
|
+
info: semanticColors.surfaces.white,
|
|
6380
|
+
warning: semanticColors.typography.warning,
|
|
6381
|
+
};
|
|
6382
|
+
const legacyColors = {
|
|
6383
|
+
dark: semanticColors.surfaces.white,
|
|
6384
|
+
brand: semanticColors.surfaces.white,
|
|
6120
6385
|
download: colors.grey['700'],
|
|
6121
6386
|
};
|
|
6387
|
+
const getColor = () => {
|
|
6388
|
+
if (legacyColors[variant])
|
|
6389
|
+
return legacyColors[variant];
|
|
6390
|
+
const colorMap = toastType === 'filled' ? filledColors : outlinedColors;
|
|
6391
|
+
return colorMap[variant] ?? outlinedColors.default;
|
|
6392
|
+
};
|
|
6122
6393
|
return {
|
|
6123
6394
|
margin: 0,
|
|
6124
6395
|
fontSize: theme.typography.pxToRem(typography.fontSize.sm),
|
|
6125
6396
|
fontWeight: typography.fontWeight.semiBold,
|
|
6126
6397
|
lineHeight: 1.4,
|
|
6127
|
-
color:
|
|
6398
|
+
color: getColor(),
|
|
6128
6399
|
};
|
|
6129
6400
|
});
|
|
6130
|
-
const ToastMessage = styled('p')(({ theme, variant = 'default' }) => {
|
|
6131
|
-
const
|
|
6401
|
+
const ToastMessage = styled('p')(({ theme, variant = 'default', toastType = 'outlined' }) => {
|
|
6402
|
+
const outlinedColors = {
|
|
6132
6403
|
default: semanticColors.typography.bodySecondary,
|
|
6133
|
-
dark: colors.grey['200'],
|
|
6134
|
-
brand: colors.grey['200'],
|
|
6135
6404
|
error: semanticColors.status.error.dark,
|
|
6136
6405
|
success: semanticColors.status.success.dark,
|
|
6137
6406
|
info: semanticColors.status.info.dark,
|
|
6407
|
+
warning: semanticColors.status.warning.dark,
|
|
6408
|
+
};
|
|
6409
|
+
const filledColors = {
|
|
6410
|
+
default: colors.grey['200'],
|
|
6411
|
+
error: semanticColors.surfaces.white,
|
|
6412
|
+
success: semanticColors.surfaces.white,
|
|
6413
|
+
info: semanticColors.surfaces.white,
|
|
6414
|
+
warning: semanticColors.typography.warning,
|
|
6415
|
+
};
|
|
6416
|
+
const legacyColors = {
|
|
6417
|
+
dark: colors.grey['200'],
|
|
6418
|
+
brand: colors.grey['200'],
|
|
6138
6419
|
download: colors.grey['800'],
|
|
6139
6420
|
};
|
|
6421
|
+
const getColor = () => {
|
|
6422
|
+
if (legacyColors[variant])
|
|
6423
|
+
return legacyColors[variant];
|
|
6424
|
+
const colorMap = toastType === 'filled' ? filledColors : outlinedColors;
|
|
6425
|
+
return colorMap[variant] ?? outlinedColors.default;
|
|
6426
|
+
};
|
|
6140
6427
|
return {
|
|
6141
6428
|
margin: 0,
|
|
6142
6429
|
fontSize: theme.typography.pxToRem(typography.fontSize.sm),
|
|
6143
6430
|
fontWeight: typography.fontWeight.regular,
|
|
6144
6431
|
lineHeight: 1.4,
|
|
6145
|
-
color:
|
|
6432
|
+
color: getColor(),
|
|
6146
6433
|
};
|
|
6147
6434
|
});
|
|
6148
6435
|
const ToastActions = styled(Stack)({
|
|
@@ -6151,29 +6438,39 @@ const ToastActions = styled(Stack)({
|
|
|
6151
6438
|
justifyContent: 'flex-start',
|
|
6152
6439
|
});
|
|
6153
6440
|
const ToastButton = styled(Button, {
|
|
6154
|
-
shouldForwardProp: prop => prop !== 'toastVariant' && prop !== 'primary',
|
|
6155
|
-
})(({ toastVariant = 'default', primary }) => {
|
|
6441
|
+
shouldForwardProp: prop => prop !== 'toastVariant' && prop !== 'toastType' && prop !== 'primary',
|
|
6442
|
+
})(({ toastVariant = 'default', toastType = 'outlined', primary }) => {
|
|
6443
|
+
const isLegacy = toastVariant === 'dark' || toastVariant === 'brand' || toastVariant === 'download';
|
|
6444
|
+
const isFilled = !isLegacy && toastType === 'filled';
|
|
6156
6445
|
const getColor = () => {
|
|
6157
6446
|
if (primary) {
|
|
6158
6447
|
if (toastVariant === 'dark' || toastVariant === 'brand') {
|
|
6159
6448
|
return colors.digitalBlue['200'];
|
|
6160
6449
|
}
|
|
6450
|
+
if (isFilled) {
|
|
6451
|
+
return toastVariant === 'warning'
|
|
6452
|
+
? semanticColors.typography.link.primary
|
|
6453
|
+
: semanticColors.surfaces.white;
|
|
6454
|
+
}
|
|
6161
6455
|
return semanticColors.typography.link.primary;
|
|
6162
6456
|
}
|
|
6163
6457
|
// Non-primary button colors
|
|
6164
6458
|
if (toastVariant === 'dark' || toastVariant === 'brand') {
|
|
6165
6459
|
return semanticColors.surfaces.white;
|
|
6166
6460
|
}
|
|
6167
|
-
if (
|
|
6168
|
-
return
|
|
6461
|
+
if (isFilled) {
|
|
6462
|
+
return toastVariant === 'warning'
|
|
6463
|
+
? semanticColors.typography.warning
|
|
6464
|
+
: semanticColors.surfaces.white;
|
|
6169
6465
|
}
|
|
6170
|
-
if (toastVariant === '
|
|
6466
|
+
if (toastVariant === 'error')
|
|
6467
|
+
return semanticColors.status.error.dark;
|
|
6468
|
+
if (toastVariant === 'success')
|
|
6171
6469
|
return semanticColors.status.success.dark;
|
|
6172
|
-
|
|
6173
|
-
if (toastVariant === 'info') {
|
|
6470
|
+
if (toastVariant === 'info')
|
|
6174
6471
|
return semanticColors.status.info.dark;
|
|
6175
|
-
|
|
6176
|
-
|
|
6472
|
+
if (toastVariant === 'warning')
|
|
6473
|
+
return semanticColors.status.warning.dark;
|
|
6177
6474
|
return semanticColors.icons.placeholder;
|
|
6178
6475
|
};
|
|
6179
6476
|
return {
|
|
@@ -6237,27 +6534,27 @@ const DownloadIconButton = styled(IconButton)({
|
|
|
6237
6534
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4122-37223
|
|
6238
6535
|
*
|
|
6239
6536
|
* Figma Props Mapping:
|
|
6240
|
-
* -
|
|
6241
|
-
* -
|
|
6242
|
-
* -
|
|
6243
|
-
* -
|
|
6244
|
-
* -
|
|
6245
|
-
* -
|
|
6246
|
-
*/
|
|
6247
|
-
const NeoToast = ({ variant = 'default', title, message, showClose = true, actions, progress, fileName, onClose, ...props }) => {
|
|
6537
|
+
* - Intent (Neutral|Error|Success|Info|Warning) → variant (default|error|success|info|warning)
|
|
6538
|
+
* - Type (Outlined|Filled) → type ('outlined'|'filled')
|
|
6539
|
+
* - Show header → title (string)
|
|
6540
|
+
* - Show supporting text → message (string)
|
|
6541
|
+
* - Show close icon → showClose (boolean)
|
|
6542
|
+
* - Show actions → actions (ReactNode)
|
|
6543
|
+
*/
|
|
6544
|
+
const NeoToast = ({ variant = 'default', type = 'outlined', title, message, showClose = true, actions, progress, fileName, onClose, ...props }) => {
|
|
6248
6545
|
const isDownloadVariant = variant === 'download';
|
|
6249
|
-
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: {
|
|
6546
|
+
return (jsx(StyledAlert, { ...props, variant: variant, toastType: type, 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: {
|
|
6250
6547
|
alignItems: 'flex-start',
|
|
6251
6548
|
justifyContent: 'space-between',
|
|
6252
6549
|
width: '100%',
|
|
6253
6550
|
gap: `${spacing.spacing_4}px`,
|
|
6254
|
-
}, 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 })] })) }));
|
|
6551
|
+
}, children: [title && (jsx(ToastTitle, { variant: variant, toastType: type, 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, toastType: type, children: title })), message && (jsx(ToastMessage, { variant: variant, toastType: type, children: message }))] }), actions && jsx(ToastActions, { direction: "row", children: actions })] })) }));
|
|
6255
6552
|
};
|
|
6256
6553
|
/**
|
|
6257
6554
|
* Helper component for creating toast action buttons with proper styling
|
|
6258
6555
|
*/
|
|
6259
|
-
const NeoToastButton = ({ primary, variant = 'default', children, ...props }) => {
|
|
6260
|
-
return (jsx(ToastButton, { variant: "text", toastVariant: variant, primary: primary, ...props, children: children }));
|
|
6556
|
+
const NeoToastButton = ({ primary, variant = 'default', type = 'outlined', children, ...props }) => {
|
|
6557
|
+
return (jsx(ToastButton, { variant: "text", toastVariant: variant, toastType: type, primary: primary, ...props, children: children }));
|
|
6261
6558
|
};
|
|
6262
6559
|
NeoToast.displayName = 'NeoToast';
|
|
6263
6560
|
NeoToastButton.displayName = 'NeoToastButton';
|
|
@@ -6324,7 +6621,7 @@ const StyledSwitch = styled(Switch, {
|
|
|
6324
6621
|
// Focus visible for keyboard navigation
|
|
6325
6622
|
'&.Mui-focusVisible': {
|
|
6326
6623
|
[`& + .${switchClasses.track}`]: {
|
|
6327
|
-
outline: `2px solid ${semanticColors.
|
|
6624
|
+
outline: `2px solid ${semanticColors.border.focus}`,
|
|
6328
6625
|
outlineOffset: 2,
|
|
6329
6626
|
},
|
|
6330
6627
|
},
|
|
@@ -6544,10 +6841,10 @@ const StyledTooltip = styled(Tooltip, {
|
|
|
6544
6841
|
* @figma https://www.figma.com/design/fQTkGSFbYyE7LiHuQJsENC/Neo---Moderne-Design-system---2025?node-id=4091-26557&t=Bo58EpFmg6ILJtmv-11
|
|
6545
6842
|
*
|
|
6546
6843
|
* Figma Props Mapping:
|
|
6547
|
-
* -
|
|
6548
|
-
* -
|
|
6549
|
-
* -
|
|
6550
|
-
* -
|
|
6844
|
+
* - Theme (Light mode|Dark mode|Brand color) → variant ('light'|'dark'|'brand')
|
|
6845
|
+
* - Placement (None|Bottom left|...|Top center) → arrow (boolean) + placement
|
|
6846
|
+
* - Show description (boolean) → description (string|undefined)
|
|
6847
|
+
* - Text → title (string, literal content)
|
|
6551
6848
|
*
|
|
6552
6849
|
* Design Tokens Used:
|
|
6553
6850
|
* - Light: surfaces.tooltip (#4b5563), typography.tooltip (#ffffff)
|
|
@@ -6665,7 +6962,7 @@ const StyledTreeView = styled(RichTreeViewPro)({
|
|
|
6665
6962
|
backgroundColor: semanticColors.surfaces.listHover,
|
|
6666
6963
|
},
|
|
6667
6964
|
[`& .${treeItemClasses.content}.Mui-focused`]: {
|
|
6668
|
-
boxShadow: `inset 0 0 0 2px ${semanticColors.
|
|
6965
|
+
boxShadow: `inset 0 0 0 2px ${semanticColors.border.focus}`,
|
|
6669
6966
|
backgroundColor: 'transparent',
|
|
6670
6967
|
},
|
|
6671
6968
|
[`& .${treeItemClasses.content}.Mui-selected`]: {
|
|
@@ -6676,7 +6973,7 @@ const StyledTreeView = styled(RichTreeViewPro)({
|
|
|
6676
6973
|
},
|
|
6677
6974
|
[`& .${treeItemClasses.content}.Mui-selected.Mui-focused`]: {
|
|
6678
6975
|
backgroundColor: semanticColors.surfaces.listHover,
|
|
6679
|
-
boxShadow: `inset 0 0 0 2px ${semanticColors.
|
|
6976
|
+
boxShadow: `inset 0 0 0 2px ${semanticColors.border.focus}`,
|
|
6680
6977
|
},
|
|
6681
6978
|
[`& .${treeItemClasses.label}`]: {
|
|
6682
6979
|
fontSize: typography.fontSize.xs,
|
|
@@ -6701,7 +6998,7 @@ const StyledTreeView = styled(RichTreeViewPro)({
|
|
|
6701
6998
|
|
|
6702
6999
|
// Figma-exact border radius for toggle buttons — no matching design token
|
|
6703
7000
|
const TOGGLE_BUTTON_BORDER_RADIUS = 14;
|
|
6704
|
-
const StyledToggleButtonGroup = styled(
|
|
7001
|
+
const StyledToggleButtonGroup = styled(MuiToggleButtonGroup)(({ theme }) => ({
|
|
6705
7002
|
backgroundColor: colors.grey[50],
|
|
6706
7003
|
padding: theme.spacing(0.625, 0.875),
|
|
6707
7004
|
borderRadius: borderRadius.full,
|
|
@@ -6719,7 +7016,7 @@ const StyledToggleButtonGroup = styled(ToggleButtonGroup)(({ theme }) => ({
|
|
|
6719
7016
|
},
|
|
6720
7017
|
},
|
|
6721
7018
|
}));
|
|
6722
|
-
const StyledToggleButton = styled(
|
|
7019
|
+
const StyledToggleButton = styled(MuiToggleButton)(({ theme }) => ({
|
|
6723
7020
|
padding: theme.spacing(0.625),
|
|
6724
7021
|
minWidth: 'auto',
|
|
6725
7022
|
color: semanticColors.icons.default,
|
|
@@ -6768,5 +7065,5 @@ NeoTypologyControl.displayName = 'NeoTypologyControl';
|
|
|
6768
7065
|
|
|
6769
7066
|
const version = '0.0.0-development';
|
|
6770
7067
|
|
|
6771
|
-
export { ActivityScene, CIRCLE_RADIUS, NeoActivityHeader, NeoActivityIndicatorCell, NeoAvatar, NeoBadge, NeoBanner, NeoBreadcrumbLink, NeoBreadcrumbs, NeoButton,
|
|
7068
|
+
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, NeoSelect as NeoDataGridSelect, NeoDatePicker, NeoDivider, NeoDot, NeoFilterChip, NeoFooter, NeoGeneralAvatar, NeoIconButton, NeoIconWrapper, NeoInfiniteScrollGrid, NeoInputField, NeoListItem, NeoListItemButton, NeoLoadingSpinner, NeoMarketplaceCard, NeoMarketplaceLargeCard, NeoMenu, NeoMenuItem, NeoModal, NeoModalContent, NeoModalFooter, NeoModalHeader, NeoMultiBadgesCell, NeoNavigationAvatar, NeoNavigationItem, NeoPageContent, NeoPaginatedGrid, NeoProgressbar, NeoQuickFilter, NeoRadio, NeoSearchChip, NeoSelect, NeoMenuItem 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 };
|
|
6772
7069
|
//# sourceMappingURL=index.esm.js.map
|