@yahoo/uds-v5-wip 1.17.0 → 1.18.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/components/dist/accordion.config.js +1 -1
- package/dist/components/dist/alert.config.js +1 -1
- package/dist/components/dist/avatar-group.config.js +1 -1
- package/dist/components/dist/avatar.config.js +2 -2
- package/dist/components/dist/badge.config.js +2 -2
- package/dist/components/dist/button.config.js +3 -3
- package/dist/components/dist/card.config.js +1 -1
- package/dist/components/dist/command.config.js +3 -3
- package/dist/components/dist/control-curve.config.js +1 -1
- package/dist/components/dist/control-select.config.js +2 -2
- package/dist/components/dist/control-slider.config.js +5 -5
- package/dist/components/dist/control-stepper.config.js +4 -4
- package/dist/components/dist/dropdown.config.js +6 -6
- package/dist/components/dist/empty-state.config.js +1 -1
- package/dist/components/dist/input.config.js +3 -3
- package/dist/components/dist/item.config.js +2 -2
- package/dist/components/dist/modal.config.js +1 -1
- package/dist/components/dist/progress.config.js +2 -2
- package/dist/components/dist/select.config.js +1 -1
- package/dist/components/dist/sheet.config.js +1 -1
- package/dist/components/dist/sidebar.config.js +8 -8
- package/dist/components/dist/skeleton.config.js +1 -1
- package/dist/components/dist/slider.config.js +3 -3
- package/dist/components/dist/switch.config.js +2 -2
- package/dist/components/dist/tabs.config.js +5 -5
- package/dist/components/dist/textarea.config.js +3 -3
- package/dist/components/dist/toast.config.js +2 -2
- package/dist/components/dist/tooltip.config.js +1 -1
- package/dist/config/dist/createConfig.d.ts +18 -6
- package/dist/config/dist/createConfig.js +14 -6
- package/dist/config/dist/preset-merge.js +3 -0
- package/dist/config/dist/types.d.ts +6 -2
- package/dist/config.d.ts +384 -1
- package/dist/core/dist/createComponent.js +1 -1
- package/dist/foundational-presets/dist/boldVibrant.d.ts +384 -1
- package/dist/foundational-presets/dist/brutalist.d.ts +384 -1
- package/dist/foundational-presets/dist/candy.d.ts +384 -1
- package/dist/foundational-presets/dist/cleanMinimalist.d.ts +384 -1
- package/dist/foundational-presets/dist/corporate.d.ts +384 -1
- package/dist/foundational-presets/dist/darkMoody.d.ts +384 -1
- package/dist/foundational-presets/dist/defaultPreset.d.ts +384 -1
- package/dist/foundational-presets/dist/forest.d.ts +384 -1
- package/dist/foundational-presets/dist/highContrast.d.ts +384 -1
- package/dist/foundational-presets/dist/lavender.d.ts +384 -1
- package/dist/foundational-presets/dist/luxury.d.ts +384 -1
- package/dist/foundational-presets/dist/monochrome.d.ts +384 -1
- package/dist/foundational-presets/dist/neonCyber.d.ts +384 -1
- package/dist/foundational-presets/dist/newspaper.d.ts +384 -1
- package/dist/foundational-presets/dist/ocean.d.ts +384 -1
- package/dist/foundational-presets/dist/slate.d.ts +384 -1
- package/dist/foundational-presets/dist/sunset.d.ts +384 -1
- package/dist/foundational-presets/dist/terminal.d.ts +384 -1
- package/dist/foundational-presets/dist/warmOrganic.d.ts +384 -1
- package/dist/remotion/dist/components/quote-card.config.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -7,7 +7,7 @@ const accordionConfig = defaultFoundationPreset.defineComponent("Accordion", ({
|
|
|
7
7
|
width: "100%",
|
|
8
8
|
borderWidth: tokens.borderWidth.thin,
|
|
9
9
|
borderColor: tokens.borderColor.secondary,
|
|
10
|
-
borderRadius: tokens.
|
|
10
|
+
borderRadius: tokens.radius.md,
|
|
11
11
|
overflow: "hidden",
|
|
12
12
|
backgroundColor: tokens.bg.primary
|
|
13
13
|
},
|
|
@@ -8,7 +8,7 @@ const alertConfig = defaultFoundationPreset.defineComponent("Alert", ({ tokens }
|
|
|
8
8
|
display: "flex",
|
|
9
9
|
alignItems: "center",
|
|
10
10
|
padding: tokens.spacing["4"],
|
|
11
|
-
borderRadius: tokens.
|
|
11
|
+
borderRadius: tokens.radius.md,
|
|
12
12
|
borderWidth: tokens.borderWidth.thin
|
|
13
13
|
},
|
|
14
14
|
text: {
|
|
@@ -14,7 +14,7 @@ const avatarGroupConfig = defaultFoundationPreset.defineComponent("AvatarGroup",
|
|
|
14
14
|
justifyContent: "center",
|
|
15
15
|
width: "2.5rem",
|
|
16
16
|
height: "2.5rem",
|
|
17
|
-
borderRadius: tokens.
|
|
17
|
+
borderRadius: tokens.radius.full,
|
|
18
18
|
backgroundColor: tokens.bg.tertiary,
|
|
19
19
|
borderWidth: tokens.borderWidth.medium,
|
|
20
20
|
borderColor: tokens.borderColor.primary
|
|
@@ -10,7 +10,7 @@ const avatarConfig = defaultFoundationPreset.defineComponent("Avatar", ({ tokens
|
|
|
10
10
|
justifyContent: "center",
|
|
11
11
|
width: "2.5rem",
|
|
12
12
|
height: "2.5rem",
|
|
13
|
-
borderRadius: tokens.
|
|
13
|
+
borderRadius: tokens.radius.full,
|
|
14
14
|
backgroundColor: tokens.bg.brand,
|
|
15
15
|
borderWidth: tokens.borderWidth.medium,
|
|
16
16
|
borderColor: tokens.borderColor.primary
|
|
@@ -19,7 +19,7 @@ const avatarConfig = defaultFoundationPreset.defineComponent("Avatar", ({ tokens
|
|
|
19
19
|
width: "100%",
|
|
20
20
|
height: "100%",
|
|
21
21
|
objectFit: "cover",
|
|
22
|
-
borderRadius: tokens.
|
|
22
|
+
borderRadius: tokens.radius.full
|
|
23
23
|
},
|
|
24
24
|
fallbackText: {
|
|
25
25
|
...textVariants.label2,
|
|
@@ -9,13 +9,13 @@ const badgeConfig = defaultFoundationPreset.defineComponent("Badge", ({ tokens }
|
|
|
9
9
|
alignItems: "center",
|
|
10
10
|
gap: tokens.spacing["1.5"],
|
|
11
11
|
padding: `${tokens.spacing["0.5"]} ${tokens.spacing["2"]}`,
|
|
12
|
-
borderRadius: tokens.
|
|
12
|
+
borderRadius: tokens.radius.full,
|
|
13
13
|
backgroundColor: tokens.bg.tertiary
|
|
14
14
|
},
|
|
15
15
|
dot: {
|
|
16
16
|
width: "0.375rem",
|
|
17
17
|
height: "0.375rem",
|
|
18
|
-
borderRadius: tokens.
|
|
18
|
+
borderRadius: tokens.radius.full,
|
|
19
19
|
display: "none"
|
|
20
20
|
},
|
|
21
21
|
text: {
|
|
@@ -14,7 +14,7 @@ const buttonConfig = defaultFoundationPreset.defineComponent("Button", ({ tokens
|
|
|
14
14
|
justifyContent: "center",
|
|
15
15
|
gap: tokens.spacing["1.5"],
|
|
16
16
|
padding: tokens.spacing["3"],
|
|
17
|
-
borderRadius: tokens.
|
|
17
|
+
borderRadius: tokens.radius.md
|
|
18
18
|
},
|
|
19
19
|
startIcon: {
|
|
20
20
|
display: "flex",
|
|
@@ -31,12 +31,12 @@ const buttonConfig = defaultFoundationPreset.defineComponent("Button", ({ tokens
|
|
|
31
31
|
padding: `${tokens.spacing["0.5"]} ${tokens.spacing["1.5"]}`,
|
|
32
32
|
fontSize: "0.6875rem",
|
|
33
33
|
lineHeight: tokens.lineHeight.tight,
|
|
34
|
-
borderRadius: tokens.
|
|
34
|
+
borderRadius: tokens.radius.xs
|
|
35
35
|
} },
|
|
36
36
|
sm: { root: {
|
|
37
37
|
padding: `${tokens.spacing["1"]} ${tokens.spacing["2"]}`,
|
|
38
38
|
fontSize: "0.75rem",
|
|
39
|
-
borderRadius: tokens.
|
|
39
|
+
borderRadius: tokens.radius.sm
|
|
40
40
|
} },
|
|
41
41
|
md: { root: {
|
|
42
42
|
padding: tokens.spacing["3"],
|
|
@@ -4,7 +4,7 @@ import { textVariants } from "./text.config.js";
|
|
|
4
4
|
//#region ../components/dist/card.config.js
|
|
5
5
|
const cardConfig = defaultFoundationPreset.defineComponent("Card", ({ tokens }) => ({ base: {
|
|
6
6
|
root: {
|
|
7
|
-
borderRadius: tokens.
|
|
7
|
+
borderRadius: tokens.radius.md,
|
|
8
8
|
borderWidth: tokens.borderWidth.thin,
|
|
9
9
|
borderColor: tokens.borderColor.secondary,
|
|
10
10
|
backgroundColor: tokens.bg.primary,
|
|
@@ -6,7 +6,7 @@ const commandConfig = defaultFoundationPreset.defineComponent("Command", ({ toke
|
|
|
6
6
|
display: "flex",
|
|
7
7
|
flexDirection: "column",
|
|
8
8
|
overflow: "hidden",
|
|
9
|
-
borderRadius: tokens.
|
|
9
|
+
borderRadius: tokens.radius.lg,
|
|
10
10
|
backgroundColor: tokens.bg["elevation-1"]
|
|
11
11
|
} } }));
|
|
12
12
|
const commandDialogConfig = defaultFoundationPreset.defineComponent("CommandDialog", ({ tokens }) => ({ base: {
|
|
@@ -39,7 +39,7 @@ const commandDialogConfig = defaultFoundationPreset.defineComponent("CommandDial
|
|
|
39
39
|
zIndex: "1",
|
|
40
40
|
width: "100%",
|
|
41
41
|
maxWidth: "32rem",
|
|
42
|
-
borderRadius: tokens.
|
|
42
|
+
borderRadius: tokens.radius.lg,
|
|
43
43
|
backgroundColor: tokens.bg["elevation-2"],
|
|
44
44
|
borderWidth: tokens.borderWidth.thin,
|
|
45
45
|
borderColor: tokens.borderColor.secondary,
|
|
@@ -141,7 +141,7 @@ const commandItemConfig = defaultFoundationPreset.defineComponent("CommandItem",
|
|
|
141
141
|
paddingRight: tokens.spacing["3"],
|
|
142
142
|
paddingTop: tokens.spacing["2.5"],
|
|
143
143
|
paddingBottom: tokens.spacing["2.5"],
|
|
144
|
-
borderRadius: tokens.
|
|
144
|
+
borderRadius: tokens.radius.md,
|
|
145
145
|
cursor: "pointer",
|
|
146
146
|
color: tokens.color["on-primary"],
|
|
147
147
|
_ariaSelected: { backgroundColor: tokens.bg.secondary },
|
|
@@ -3,7 +3,7 @@ import "../../foundational-presets/dist/index.js";
|
|
|
3
3
|
//#region ../components/dist/control-curve.config.js
|
|
4
4
|
const controlCurveConfig = defaultFoundationPreset.defineComponent("ControlCurve", ({ tokens }) => ({
|
|
5
5
|
base: { root: {
|
|
6
|
-
borderRadius: tokens.
|
|
6
|
+
borderRadius: tokens.radius.md,
|
|
7
7
|
overflow: "hidden",
|
|
8
8
|
backgroundColor: tokens.bg.secondary
|
|
9
9
|
} },
|
|
@@ -17,7 +17,7 @@ const controlSelectConfig = defaultFoundationPreset.defineComponent("ControlSele
|
|
|
17
17
|
},
|
|
18
18
|
trigger: {
|
|
19
19
|
backgroundColor: tokens.bg.secondary,
|
|
20
|
-
borderRadius: tokens.
|
|
20
|
+
borderRadius: tokens.radius.md,
|
|
21
21
|
padding: `${tokens.spacing["1"]} ${tokens.spacing["2"]}`,
|
|
22
22
|
cursor: "pointer",
|
|
23
23
|
borderWidth: tokens.borderWidth.thin,
|
|
@@ -35,7 +35,7 @@ const controlSelectConfig = defaultFoundationPreset.defineComponent("ControlSele
|
|
|
35
35
|
backgroundColor: tokens.bg.primary,
|
|
36
36
|
borderWidth: tokens.borderWidth.thin,
|
|
37
37
|
borderColor: tokens.borderColor.secondary,
|
|
38
|
-
borderRadius: tokens.
|
|
38
|
+
borderRadius: tokens.radius.md,
|
|
39
39
|
overflow: "hidden",
|
|
40
40
|
zIndex: "50",
|
|
41
41
|
minWidth: "120px",
|
|
@@ -7,7 +7,7 @@ const controlSliderConfig = defaultFoundationPreset.defineComponent("ControlSlid
|
|
|
7
7
|
display: "flex",
|
|
8
8
|
alignItems: "center",
|
|
9
9
|
height: tokens.spacing["8"],
|
|
10
|
-
borderRadius: tokens.
|
|
10
|
+
borderRadius: tokens.radius.md,
|
|
11
11
|
backgroundColor: tokens.bg.secondary,
|
|
12
12
|
cursor: "ew-resize",
|
|
13
13
|
userSelect: "none",
|
|
@@ -22,7 +22,7 @@ const controlSliderConfig = defaultFoundationPreset.defineComponent("ControlSlid
|
|
|
22
22
|
right: tokens.spacing["0"],
|
|
23
23
|
top: tokens.spacing["0"],
|
|
24
24
|
bottom: tokens.spacing["0"],
|
|
25
|
-
borderRadius: tokens.
|
|
25
|
+
borderRadius: tokens.radius.md,
|
|
26
26
|
cursor: "ew-resize"
|
|
27
27
|
},
|
|
28
28
|
markers: {
|
|
@@ -41,7 +41,7 @@ const controlSliderConfig = defaultFoundationPreset.defineComponent("ControlSlid
|
|
|
41
41
|
marker: {
|
|
42
42
|
width: tokens.spacing["0.5"],
|
|
43
43
|
height: tokens.spacing["0.5"],
|
|
44
|
-
borderRadius: tokens.
|
|
44
|
+
borderRadius: tokens.radius.full,
|
|
45
45
|
backgroundColor: tokens.color["on-secondary"]
|
|
46
46
|
},
|
|
47
47
|
fill: {
|
|
@@ -50,7 +50,7 @@ const controlSliderConfig = defaultFoundationPreset.defineComponent("ControlSlid
|
|
|
50
50
|
top: tokens.spacing["0"],
|
|
51
51
|
bottom: tokens.spacing["0"],
|
|
52
52
|
width: tokens.spacing["0"],
|
|
53
|
-
borderRadius: tokens.
|
|
53
|
+
borderRadius: tokens.radius.md,
|
|
54
54
|
backgroundColor: tokens.color["always/black"],
|
|
55
55
|
opacity: "0.05",
|
|
56
56
|
transition: "width 0.1s linear",
|
|
@@ -63,7 +63,7 @@ const controlSliderConfig = defaultFoundationPreset.defineComponent("ControlSlid
|
|
|
63
63
|
transform: "translate(-50%, -50%)",
|
|
64
64
|
width: tokens.spacing["1"],
|
|
65
65
|
height: tokens.spacing["3"],
|
|
66
|
-
borderRadius: tokens.
|
|
66
|
+
borderRadius: tokens.radius.full,
|
|
67
67
|
backgroundColor: tokens.color["on-secondary"],
|
|
68
68
|
opacity: "0.5",
|
|
69
69
|
transition: "left 0.1s linear",
|
|
@@ -34,8 +34,8 @@ const controlStepperConfig = defaultFoundationPreset.defineComponent("ControlSte
|
|
|
34
34
|
cursor: "pointer",
|
|
35
35
|
borderWidth: "0",
|
|
36
36
|
fontSize: "16px",
|
|
37
|
-
borderTopRightRadius: tokens.
|
|
38
|
-
borderBottomRightRadius: tokens.
|
|
37
|
+
borderTopRightRadius: tokens.radius.sm,
|
|
38
|
+
borderBottomRightRadius: tokens.radius.sm,
|
|
39
39
|
_hover: {
|
|
40
40
|
backgroundColor: tokens.bg.tertiary,
|
|
41
41
|
color: tokens.color["on-primary"]
|
|
@@ -53,8 +53,8 @@ const controlStepperConfig = defaultFoundationPreset.defineComponent("ControlSte
|
|
|
53
53
|
cursor: "pointer",
|
|
54
54
|
borderWidth: "0",
|
|
55
55
|
fontSize: "16px",
|
|
56
|
-
borderTopLeftRadius: tokens.
|
|
57
|
-
borderBottomLeftRadius: tokens.
|
|
56
|
+
borderTopLeftRadius: tokens.radius.sm,
|
|
57
|
+
borderBottomLeftRadius: tokens.radius.sm,
|
|
58
58
|
_hover: {
|
|
59
59
|
backgroundColor: tokens.bg.tertiary,
|
|
60
60
|
color: tokens.color["on-primary"]
|
|
@@ -15,7 +15,7 @@ const dropdownConfig = defaultFoundationPreset.defineComponent("Dropdown", ({ to
|
|
|
15
15
|
marginTop: "4px",
|
|
16
16
|
zIndex: "50",
|
|
17
17
|
backgroundColor: tokens.bg["elevation-1"],
|
|
18
|
-
borderRadius: tokens.
|
|
18
|
+
borderRadius: tokens.radius.md,
|
|
19
19
|
borderWidth: tokens.borderWidth.thin,
|
|
20
20
|
borderColor: tokens.borderColor.secondary,
|
|
21
21
|
padding: tokens.spacing["1"],
|
|
@@ -56,7 +56,7 @@ const dropdownConfig = defaultFoundationPreset.defineComponent("Dropdown", ({ to
|
|
|
56
56
|
justifyContent: "space-between",
|
|
57
57
|
gap: tokens.spacing["4"],
|
|
58
58
|
padding: `${tokens.spacing["2"]} ${tokens.spacing["3"]}`,
|
|
59
|
-
borderRadius: tokens.
|
|
59
|
+
borderRadius: tokens.radius.sm,
|
|
60
60
|
cursor: "pointer",
|
|
61
61
|
color: tokens.color["on-primary"],
|
|
62
62
|
_hover: { backgroundColor: tokens.bg.tertiary }
|
|
@@ -68,7 +68,7 @@ const dropdownConfig = defaultFoundationPreset.defineComponent("Dropdown", ({ to
|
|
|
68
68
|
justifyContent: "space-between",
|
|
69
69
|
gap: tokens.spacing["4"],
|
|
70
70
|
padding: `${tokens.spacing["2"]} ${tokens.spacing["3"]}`,
|
|
71
|
-
borderRadius: tokens.
|
|
71
|
+
borderRadius: tokens.radius.sm,
|
|
72
72
|
cursor: "pointer",
|
|
73
73
|
color: tokens.color.alert,
|
|
74
74
|
_hover: { backgroundColor: tokens.bg["alert-wash"] }
|
|
@@ -88,17 +88,17 @@ const dropdownConfig = defaultFoundationPreset.defineComponent("Dropdown", ({ to
|
|
|
88
88
|
menu: {
|
|
89
89
|
padding: tokens.spacing["0.5"],
|
|
90
90
|
minWidth: "8rem",
|
|
91
|
-
borderRadius: tokens.
|
|
91
|
+
borderRadius: tokens.radius.sm
|
|
92
92
|
},
|
|
93
93
|
item: {
|
|
94
94
|
padding: `${tokens.spacing["1"]} ${tokens.spacing["2"]}`,
|
|
95
95
|
fontSize: "0.75rem",
|
|
96
|
-
borderRadius: tokens.
|
|
96
|
+
borderRadius: tokens.radius.xs
|
|
97
97
|
},
|
|
98
98
|
destructiveItem: {
|
|
99
99
|
padding: `${tokens.spacing["1"]} ${tokens.spacing["2"]}`,
|
|
100
100
|
fontSize: "0.75rem",
|
|
101
|
-
borderRadius: tokens.
|
|
101
|
+
borderRadius: tokens.radius.xs
|
|
102
102
|
},
|
|
103
103
|
shortcut: { fontSize: "0.625rem" }
|
|
104
104
|
} } }
|
|
@@ -15,7 +15,7 @@ const emptyStateConfig = defaultFoundationPreset.defineComponent("EmptyState", (
|
|
|
15
15
|
icon: {
|
|
16
16
|
width: "36px",
|
|
17
17
|
height: "36px",
|
|
18
|
-
borderRadius: tokens.
|
|
18
|
+
borderRadius: tokens.radius.full,
|
|
19
19
|
backgroundColor: tokens.bg.tertiary,
|
|
20
20
|
display: "flex",
|
|
21
21
|
alignItems: "center",
|
|
@@ -6,7 +6,7 @@ const inputConfig = defaultFoundationPreset.defineComponent("Input", ({ tokens }
|
|
|
6
6
|
backgroundColor: tokens.bg.primary,
|
|
7
7
|
color: tokens.color["on-primary"],
|
|
8
8
|
padding: tokens.spacing["3"],
|
|
9
|
-
borderRadius: tokens.
|
|
9
|
+
borderRadius: tokens.radius.md,
|
|
10
10
|
borderWidth: tokens.borderWidth.thin,
|
|
11
11
|
borderColor: tokens.borderColor.secondary,
|
|
12
12
|
outlineStyle: "none",
|
|
@@ -21,12 +21,12 @@ const inputConfig = defaultFoundationPreset.defineComponent("Input", ({ tokens }
|
|
|
21
21
|
padding: `${tokens.spacing["0.5"]} ${tokens.spacing["1.5"]}`,
|
|
22
22
|
fontSize: "0.6875rem",
|
|
23
23
|
lineHeight: tokens.lineHeight.tight,
|
|
24
|
-
borderRadius: tokens.
|
|
24
|
+
borderRadius: tokens.radius.xs
|
|
25
25
|
} },
|
|
26
26
|
sm: { root: {
|
|
27
27
|
padding: `${tokens.spacing["1"]} ${tokens.spacing["2"]}`,
|
|
28
28
|
fontSize: "0.75rem",
|
|
29
|
-
borderRadius: tokens.
|
|
29
|
+
borderRadius: tokens.radius.sm
|
|
30
30
|
} },
|
|
31
31
|
md: { root: {
|
|
32
32
|
padding: tokens.spacing["3"],
|
|
@@ -12,7 +12,7 @@ const itemConfig = defaultFoundationPreset.defineComponent("Item", ({ tokens })
|
|
|
12
12
|
paddingRight: tokens.spacing["3"],
|
|
13
13
|
paddingTop: tokens.spacing["2"],
|
|
14
14
|
paddingBottom: tokens.spacing["2"],
|
|
15
|
-
borderRadius: tokens.
|
|
15
|
+
borderRadius: tokens.radius.lg,
|
|
16
16
|
cursor: "pointer",
|
|
17
17
|
_hover: { backgroundColor: tokens.bg.secondary }
|
|
18
18
|
},
|
|
@@ -22,7 +22,7 @@ const itemConfig = defaultFoundationPreset.defineComponent("Item", ({ tokens })
|
|
|
22
22
|
display: "flex",
|
|
23
23
|
alignItems: "center",
|
|
24
24
|
justifyContent: "center",
|
|
25
|
-
borderRadius: tokens.
|
|
25
|
+
borderRadius: tokens.radius.md,
|
|
26
26
|
flexShrink: "0",
|
|
27
27
|
color: tokens.color["on-secondary"]
|
|
28
28
|
},
|
|
@@ -34,7 +34,7 @@ const modalConfig = defaultFoundationPreset.defineComponent("Modal", ({ tokens }
|
|
|
34
34
|
position: "relative",
|
|
35
35
|
zIndex: "1",
|
|
36
36
|
backgroundColor: tokens.bg["elevation-1"],
|
|
37
|
-
borderRadius: tokens.
|
|
37
|
+
borderRadius: tokens.radius.lg,
|
|
38
38
|
padding: tokens.spacing["6"],
|
|
39
39
|
minWidth: "24rem",
|
|
40
40
|
maxWidth: "32rem",
|
|
@@ -19,14 +19,14 @@ const progressConfig = defaultFoundationPreset.defineComponent("Progress", ({ to
|
|
|
19
19
|
},
|
|
20
20
|
track: {
|
|
21
21
|
height: "0.5rem",
|
|
22
|
-
borderRadius: tokens.
|
|
22
|
+
borderRadius: tokens.radius.full,
|
|
23
23
|
backgroundColor: tokens.bg.secondary,
|
|
24
24
|
overflow: "hidden",
|
|
25
25
|
width: "100%"
|
|
26
26
|
},
|
|
27
27
|
fill: {
|
|
28
28
|
height: "100%",
|
|
29
|
-
borderRadius: tokens.
|
|
29
|
+
borderRadius: tokens.radius.full,
|
|
30
30
|
backgroundColor: tokens.bg.brand,
|
|
31
31
|
transition: "width 0.8s cubic-bezier(0.16, 1, 0.3, 1)"
|
|
32
32
|
}
|
|
@@ -8,7 +8,7 @@ const selectConfig = defaultFoundationPreset.defineComponent("Select", ({ tokens
|
|
|
8
8
|
spacingY: tokens.spacing["2"],
|
|
9
9
|
spacingLeft: tokens.spacing["3"],
|
|
10
10
|
spacingRight: tokens.spacing["8"],
|
|
11
|
-
borderRadius: tokens.
|
|
11
|
+
borderRadius: tokens.radius.md,
|
|
12
12
|
borderWidth: tokens.borderWidth.thin,
|
|
13
13
|
borderColor: tokens.borderColor.secondary,
|
|
14
14
|
outlineStyle: "none",
|
|
@@ -62,7 +62,7 @@ const sheetConfig = defaultFoundationPreset.defineComponent("Sheet", ({ tokens }
|
|
|
62
62
|
justifyContent: "center",
|
|
63
63
|
width: "2rem",
|
|
64
64
|
height: "2rem",
|
|
65
|
-
borderRadius: tokens.
|
|
65
|
+
borderRadius: tokens.radius.sm,
|
|
66
66
|
cursor: "pointer",
|
|
67
67
|
color: tokens.color["on-secondary"],
|
|
68
68
|
_hover: { backgroundColor: tokens.bg.tertiary }
|
|
@@ -44,7 +44,7 @@ const sidebarConfig = defaultFoundationPreset.defineComponent("Sidebar", ({ toke
|
|
|
44
44
|
justifyContent: "center",
|
|
45
45
|
width: "1.5rem",
|
|
46
46
|
height: "1.5rem",
|
|
47
|
-
borderRadius: tokens.
|
|
47
|
+
borderRadius: tokens.radius.sm,
|
|
48
48
|
cursor: "pointer",
|
|
49
49
|
color: tokens.color["on-secondary"],
|
|
50
50
|
backgroundColor: "transparent",
|
|
@@ -70,7 +70,7 @@ const sidebarConfig = defaultFoundationPreset.defineComponent("Sidebar", ({ toke
|
|
|
70
70
|
gap: tokens.spacing["2"],
|
|
71
71
|
width: "100%",
|
|
72
72
|
padding: `${tokens.spacing["1.5"]} ${tokens.spacing["2"]}`,
|
|
73
|
-
borderRadius: tokens.
|
|
73
|
+
borderRadius: tokens.radius.md,
|
|
74
74
|
color: tokens.color["on-secondary"],
|
|
75
75
|
backgroundColor: "transparent",
|
|
76
76
|
borderWidth: "0",
|
|
@@ -94,7 +94,7 @@ const sidebarConfig = defaultFoundationPreset.defineComponent("Sidebar", ({ toke
|
|
|
94
94
|
justifyContent: "center",
|
|
95
95
|
width: "1.5rem",
|
|
96
96
|
height: "1.5rem",
|
|
97
|
-
borderRadius: tokens.
|
|
97
|
+
borderRadius: tokens.radius.sm,
|
|
98
98
|
cursor: "pointer",
|
|
99
99
|
color: tokens.color["on-tertiary"],
|
|
100
100
|
backgroundColor: "transparent",
|
|
@@ -133,7 +133,7 @@ const sidebarConfig = defaultFoundationPreset.defineComponent("Sidebar", ({ toke
|
|
|
133
133
|
alignItems: "center",
|
|
134
134
|
width: "100%",
|
|
135
135
|
padding: `${tokens.spacing["1"]} ${tokens.spacing["2"]}`,
|
|
136
|
-
borderRadius: tokens.
|
|
136
|
+
borderRadius: tokens.radius.sm,
|
|
137
137
|
color: tokens.color["on-tertiary"],
|
|
138
138
|
backgroundColor: "transparent",
|
|
139
139
|
borderWidth: "0",
|
|
@@ -151,7 +151,7 @@ const sidebarConfig = defaultFoundationPreset.defineComponent("Sidebar", ({ toke
|
|
|
151
151
|
justifyContent: "center",
|
|
152
152
|
width: "2rem",
|
|
153
153
|
height: "2rem",
|
|
154
|
-
borderRadius: tokens.
|
|
154
|
+
borderRadius: tokens.radius.sm,
|
|
155
155
|
cursor: "pointer",
|
|
156
156
|
color: tokens.color["on-secondary"],
|
|
157
157
|
backgroundColor: "transparent",
|
|
@@ -188,14 +188,14 @@ const sidebarConfig = defaultFoundationPreset.defineComponent("Sidebar", ({ toke
|
|
|
188
188
|
},
|
|
189
189
|
skeleton: {
|
|
190
190
|
backgroundColor: tokens.bg.secondary,
|
|
191
|
-
borderRadius: tokens.
|
|
191
|
+
borderRadius: tokens.radius.md
|
|
192
192
|
}
|
|
193
193
|
},
|
|
194
194
|
variants: { variant: {
|
|
195
195
|
sidebar: { root: {} },
|
|
196
196
|
floating: { root: {
|
|
197
197
|
margin: tokens.spacing["3"],
|
|
198
|
-
borderRadius: tokens.
|
|
198
|
+
borderRadius: tokens.radius.lg,
|
|
199
199
|
borderWidth: tokens.borderWidth.thin,
|
|
200
200
|
borderColor: tokens.borderColor.secondary,
|
|
201
201
|
borderRightWidth: tokens.borderWidth.thin,
|
|
@@ -204,7 +204,7 @@ const sidebarConfig = defaultFoundationPreset.defineComponent("Sidebar", ({ toke
|
|
|
204
204
|
} },
|
|
205
205
|
inset: { root: {
|
|
206
206
|
margin: tokens.spacing["3"],
|
|
207
|
-
borderRadius: tokens.
|
|
207
|
+
borderRadius: tokens.radius.lg,
|
|
208
208
|
borderWidth: tokens.borderWidth.thin,
|
|
209
209
|
borderColor: tokens.borderColor.secondary,
|
|
210
210
|
borderRightWidth: tokens.borderWidth.thin,
|
|
@@ -2,7 +2,7 @@ import { defaultFoundationPreset } from "../../foundational-presets/dist/default
|
|
|
2
2
|
import "../../foundational-presets/dist/index.js";
|
|
3
3
|
//#region ../components/dist/skeleton.config.js
|
|
4
4
|
const skeletonConfig = defaultFoundationPreset.defineComponent("Skeleton", ({ tokens }) => ({ base: { block: {
|
|
5
|
-
borderRadius: tokens.
|
|
5
|
+
borderRadius: tokens.radius.md,
|
|
6
6
|
backgroundColor: tokens.bg.secondary,
|
|
7
7
|
animation: "pulse 1.5s ease-in-out infinite"
|
|
8
8
|
} } }));
|
|
@@ -10,20 +10,20 @@ const sliderConfig = defaultFoundationPreset.defineComponent("Slider", ({ tokens
|
|
|
10
10
|
},
|
|
11
11
|
track: {
|
|
12
12
|
height: "0.5rem",
|
|
13
|
-
borderRadius: tokens.
|
|
13
|
+
borderRadius: tokens.radius.full,
|
|
14
14
|
backgroundColor: tokens.bg.secondary,
|
|
15
15
|
overflow: "visible",
|
|
16
16
|
width: "100%"
|
|
17
17
|
},
|
|
18
18
|
range: {
|
|
19
19
|
height: "100%",
|
|
20
|
-
borderRadius: tokens.
|
|
20
|
+
borderRadius: tokens.radius.full,
|
|
21
21
|
backgroundColor: tokens.bg.brand
|
|
22
22
|
},
|
|
23
23
|
thumb: {
|
|
24
24
|
width: "1.25rem",
|
|
25
25
|
height: "1.25rem",
|
|
26
|
-
borderRadius: tokens.
|
|
26
|
+
borderRadius: tokens.radius.full,
|
|
27
27
|
backgroundColor: tokens.bg.primary,
|
|
28
28
|
borderWidth: tokens.borderWidth.medium,
|
|
29
29
|
borderColor: tokens.borderColor.brand,
|
|
@@ -14,7 +14,7 @@ const switchConfig = defaultFoundationPreset.defineComponent("Switch", ({ tokens
|
|
|
14
14
|
track: {
|
|
15
15
|
width: "2.75rem",
|
|
16
16
|
height: "1.5rem",
|
|
17
|
-
borderRadius: tokens.
|
|
17
|
+
borderRadius: tokens.radius.full,
|
|
18
18
|
padding: tokens.spacing["0.5"],
|
|
19
19
|
display: "flex",
|
|
20
20
|
alignItems: "center",
|
|
@@ -25,7 +25,7 @@ const switchConfig = defaultFoundationPreset.defineComponent("Switch", ({ tokens
|
|
|
25
25
|
thumb: {
|
|
26
26
|
width: "1.25rem",
|
|
27
27
|
height: "1.25rem",
|
|
28
|
-
borderRadius: tokens.
|
|
28
|
+
borderRadius: tokens.radius.full,
|
|
29
29
|
backgroundColor: tokens.bg.primary,
|
|
30
30
|
boxShadow: "0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",
|
|
31
31
|
transition: "transform 0.15s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
@@ -13,7 +13,7 @@ const tabsConfig = defaultFoundationPreset.defineComponent("Tabs", ({ tokens })
|
|
|
13
13
|
gap: tokens.spacing["1"],
|
|
14
14
|
backgroundColor: tokens.bg.tertiary,
|
|
15
15
|
padding: tokens.spacing["1.5"],
|
|
16
|
-
borderRadius: tokens.
|
|
16
|
+
borderRadius: tokens.radius.sm
|
|
17
17
|
},
|
|
18
18
|
tab: {
|
|
19
19
|
...textVariants.label2,
|
|
@@ -21,7 +21,7 @@ const tabsConfig = defaultFoundationPreset.defineComponent("Tabs", ({ tokens })
|
|
|
21
21
|
flex: "1",
|
|
22
22
|
textAlign: "center",
|
|
23
23
|
padding: tokens.spacing["2"],
|
|
24
|
-
borderRadius: tokens.
|
|
24
|
+
borderRadius: tokens.radius.xs,
|
|
25
25
|
color: tokens.color["on-tertiary"],
|
|
26
26
|
cursor: "pointer",
|
|
27
27
|
backgroundColor: "transparent"
|
|
@@ -32,21 +32,21 @@ const tabsConfig = defaultFoundationPreset.defineComponent("Tabs", ({ tokens })
|
|
|
32
32
|
flex: "1",
|
|
33
33
|
textAlign: "center",
|
|
34
34
|
padding: tokens.spacing["2"],
|
|
35
|
-
borderRadius: tokens.
|
|
35
|
+
borderRadius: tokens.radius.xs,
|
|
36
36
|
color: tokens.color["on-primary"],
|
|
37
37
|
cursor: "pointer",
|
|
38
38
|
backgroundColor: "transparent"
|
|
39
39
|
},
|
|
40
40
|
indicator: {
|
|
41
41
|
backgroundColor: tokens.bg.primary,
|
|
42
|
-
borderRadius: tokens.
|
|
42
|
+
borderRadius: tokens.radius.xs,
|
|
43
43
|
boxShadow: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
|
|
44
44
|
transition: "left 0.4s cubic-bezier(0.16, 1, 0.3, 1), width 0.4s cubic-bezier(0.16, 1, 0.3, 1)"
|
|
45
45
|
},
|
|
46
46
|
content: {
|
|
47
47
|
padding: tokens.spacing["4"],
|
|
48
48
|
backgroundColor: tokens.bg.tertiary,
|
|
49
|
-
borderRadius: tokens.
|
|
49
|
+
borderRadius: tokens.radius.sm,
|
|
50
50
|
borderWidth: tokens.borderWidth.thin,
|
|
51
51
|
borderColor: tokens.borderColor.secondary,
|
|
52
52
|
minHeight: "4rem"
|
|
@@ -7,7 +7,7 @@ const textareaConfig = defaultFoundationPreset.defineComponent("Textarea", ({ to
|
|
|
7
7
|
backgroundColor: tokens.bg.primary,
|
|
8
8
|
color: tokens.color["on-primary"],
|
|
9
9
|
padding: tokens.spacing["3"],
|
|
10
|
-
borderRadius: tokens.
|
|
10
|
+
borderRadius: tokens.radius.md,
|
|
11
11
|
borderWidth: tokens.borderWidth.thin,
|
|
12
12
|
borderColor: tokens.borderColor.secondary,
|
|
13
13
|
outlineStyle: "none",
|
|
@@ -35,12 +35,12 @@ const textareaConfig = defaultFoundationPreset.defineComponent("Textarea", ({ to
|
|
|
35
35
|
padding: `${tokens.spacing["0.5"]} ${tokens.spacing["1.5"]}`,
|
|
36
36
|
fontSize: "0.6875rem",
|
|
37
37
|
lineHeight: tokens.lineHeight.tight,
|
|
38
|
-
borderRadius: tokens.
|
|
38
|
+
borderRadius: tokens.radius.xs
|
|
39
39
|
} },
|
|
40
40
|
sm: { root: {
|
|
41
41
|
padding: `${tokens.spacing["1"]} ${tokens.spacing["2"]}`,
|
|
42
42
|
fontSize: "0.75rem",
|
|
43
|
-
borderRadius: tokens.
|
|
43
|
+
borderRadius: tokens.radius.sm
|
|
44
44
|
} },
|
|
45
45
|
md: { root: {
|
|
46
46
|
padding: tokens.spacing["3"],
|
|
@@ -18,7 +18,7 @@ const toastConfig = defaultFoundationPreset.defineComponent("Toast", ({ tokens }
|
|
|
18
18
|
justifyContent: "space-between",
|
|
19
19
|
gap: tokens.spacing["3"],
|
|
20
20
|
padding: `${tokens.spacing["3"]} ${tokens.spacing["4"]}`,
|
|
21
|
-
borderRadius: tokens.
|
|
21
|
+
borderRadius: tokens.radius.md,
|
|
22
22
|
borderWidth: tokens.borderWidth.thin,
|
|
23
23
|
borderColor: tokens.borderColor.secondary,
|
|
24
24
|
backgroundColor: tokens.bg["elevation-3"],
|
|
@@ -96,7 +96,7 @@ const toastConfig = defaultFoundationPreset.defineComponent("Toast", ({ tokens }
|
|
|
96
96
|
justifyContent: "center",
|
|
97
97
|
width: "1.5rem",
|
|
98
98
|
height: "1.5rem",
|
|
99
|
-
borderRadius: tokens.
|
|
99
|
+
borderRadius: tokens.radius.sm,
|
|
100
100
|
cursor: "pointer",
|
|
101
101
|
color: tokens.color["on-secondary"],
|
|
102
102
|
fontSize: "0.75rem",
|
|
@@ -14,7 +14,7 @@ const tooltipConfig = defaultFoundationPreset.defineComponent("Tooltip", ({ toke
|
|
|
14
14
|
marginBottom: "6px",
|
|
15
15
|
pointerEvents: "none",
|
|
16
16
|
backgroundColor: tokens.bg.inverse,
|
|
17
|
-
borderRadius: tokens.
|
|
17
|
+
borderRadius: tokens.radius.md,
|
|
18
18
|
padding: `${tokens.spacing["1.5"]} ${tokens.spacing["3"]}`,
|
|
19
19
|
opacity: "0",
|
|
20
20
|
display: "none",
|
|
@@ -65,6 +65,12 @@ interface AtomicToken<M extends ModifierNameShape = ModifierNameShape> {
|
|
|
65
65
|
* during config resolution.
|
|
66
66
|
*/
|
|
67
67
|
type?: TokenType;
|
|
68
|
+
/**
|
|
69
|
+
* Free-form group description surfaced in Studio. Mirrors `$description`
|
|
70
|
+
* on the source `defineVars` namespace; not used by the runtime / CSS
|
|
71
|
+
* generator.
|
|
72
|
+
*/
|
|
73
|
+
description?: string;
|
|
68
74
|
/**
|
|
69
75
|
* Optional CSS variable prefix override
|
|
70
76
|
*
|
|
@@ -89,13 +95,19 @@ interface AtomicToken<M extends ModifierNameShape = ModifierNameShape> {
|
|
|
89
95
|
/** Merge two token structures */
|
|
90
96
|
type MergeTokens<A, B> = { [K in keyof A | keyof B]: K extends keyof B ? K extends keyof A ? A[K] & B[K] : B[K] : K extends keyof A ? A[K] : never };
|
|
91
97
|
/**
|
|
92
|
-
* Derive token types directly from defineVars namespaces.
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
98
|
+
* Derive token types directly from defineVars namespaces. Each var namespace
|
|
99
|
+
* key becomes a property on `tokens.*` with the namespace's token names.
|
|
100
|
+
*
|
|
101
|
+
* NOTE: We intentionally do NOT add a `Record<string, Record<string, string>>`
|
|
102
|
+
* index-signature fallback here. The fallback used to support property-name
|
|
103
|
+
* access (e.g. `tokens.borderRadius.*` for the `radius` namespace scoped to
|
|
104
|
+
* `borderRadius`), but it caused TypeScript to silently widen every
|
|
105
|
+
* `tokens.<ns>.<name>` access to `string` — typos like
|
|
106
|
+
* `tokens.borderColor.aksjdf` would not be flagged. With the fallback removed,
|
|
107
|
+
* accesses must use the defineVars namespace key (e.g. `tokens.radius.full`,
|
|
108
|
+
* not `tokens.borderRadius.full`); both forms remain valid at runtime.
|
|
97
109
|
*/
|
|
98
|
-
type VarsToTokens<TVars extends VarsConfig> = { [K in keyof TVars]: { [T in Exclude<keyof TVars[K], '$type'>]: string } }
|
|
110
|
+
type VarsToTokens<TVars extends VarsConfig> = { [K in keyof TVars]: { [T in Exclude<keyof TVars[K], '$type' | '$description'>]: string } };
|
|
99
111
|
/** Empty tokens type for initial state */
|
|
100
112
|
type EmptyTokens = {};
|
|
101
113
|
/** Empty vars type for initial state */
|