@vygruppen/spor-react 13.0.2 → 13.1.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/.turbo/turbo-build.log +25 -25
- package/.turbo/turbo-postinstall.log +4 -4
- package/CHANGELOG.md +21 -0
- package/dist/index.cjs +554 -397
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +194 -181
- package/dist/index.d.ts +194 -181
- package/dist/index.mjs +556 -399
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -8
- package/src/alert/AlertIcon.tsx +2 -2
- package/src/alert/ServiceAlert.tsx +2 -1
- package/src/calendar/CalendarCell.tsx +4 -4
- package/src/datepicker/CalendarHeader.tsx +1 -1
- package/src/dialog/Drawer.tsx +1 -1
- package/src/input/CardSelect.tsx +4 -4
- package/src/input/Combobox.tsx +1 -1
- package/src/input/Field.tsx +1 -1
- package/src/input/InputChip.tsx +33 -0
- package/src/input/PasswordInput.tsx +2 -1
- package/src/input/Popover.tsx +9 -7
- package/src/input/Select.tsx +44 -7
- package/src/input/index.ts +1 -0
- package/src/linjetag/LineIcon.tsx +1 -1
- package/src/loader/ColorInlineLoader.tsx +2 -1
- package/src/loader/ColorSpinner.tsx +2 -1
- package/src/loader/ContentLoader.tsx +2 -1
- package/src/loader/DarkFullScreenLoader.tsx +2 -1
- package/src/loader/DarkInlineLoader.tsx +2 -1
- package/src/loader/DarkSpinner.tsx +2 -1
- package/src/loader/LightFullScreenLoader.tsx +2 -1
- package/src/loader/LightInlineLoader.tsx +2 -1
- package/src/loader/LightSpinner.tsx +2 -1
- package/src/loader/Lottie.tsx +3 -2
- package/src/loader/text.ts +15 -0
- package/src/stepper/StepperStep.tsx +2 -2
- package/src/theme/recipes/badge.ts +24 -24
- package/src/theme/recipes/button.ts +22 -22
- package/src/theme/recipes/close-button.ts +2 -2
- package/src/theme/recipes/input.ts +9 -9
- package/src/theme/recipes/link.ts +1 -1
- package/src/theme/recipes/pressable-card.ts +12 -12
- package/src/theme/recipes/skeleton.ts +1 -1
- package/src/theme/recipes/static-card.ts +8 -8
- package/src/theme/semantic-tokens/colors.ts +1 -1
- package/src/theme/slot-recipes/accordion.ts +10 -10
- package/src/theme/slot-recipes/alert-expandable.ts +35 -35
- package/src/theme/slot-recipes/alert-service.ts +10 -10
- package/src/theme/slot-recipes/alert.ts +11 -11
- package/src/theme/slot-recipes/anatomy.ts +2 -0
- package/src/theme/slot-recipes/autocomplete.ts +5 -5
- package/src/theme/slot-recipes/breadcrumb.ts +4 -4
- package/src/theme/slot-recipes/checkbox.ts +11 -17
- package/src/theme/slot-recipes/choice-chip.ts +21 -21
- package/src/theme/slot-recipes/datepicker.ts +29 -29
- package/src/theme/slot-recipes/field.ts +3 -3
- package/src/theme/slot-recipes/floating-action-button.ts +14 -14
- package/src/theme/slot-recipes/index.ts +2 -0
- package/src/theme/slot-recipes/input-chip.ts +118 -0
- package/src/theme/slot-recipes/listbox.ts +9 -9
- package/src/theme/slot-recipes/media-controller-button.ts +9 -9
- package/src/theme/slot-recipes/menu.ts +7 -7
- package/src/theme/slot-recipes/numeric-stepper.ts +4 -4
- package/src/theme/slot-recipes/pagination.ts +4 -4
- package/src/theme/slot-recipes/popover.ts +4 -4
- package/src/theme/slot-recipes/progress-bar.ts +2 -2
- package/src/theme/slot-recipes/progress-indicator.ts +1 -1
- package/src/theme/slot-recipes/radio-card.ts +11 -11
- package/src/theme/slot-recipes/radio.ts +5 -5
- package/src/theme/slot-recipes/select.ts +16 -16
- package/src/theme/slot-recipes/stepper.ts +5 -5
- package/src/theme/slot-recipes/switch.ts +6 -6
- package/src/theme/slot-recipes/table.ts +2 -2
- package/src/theme/slot-recipes/tabs.ts +18 -18
- package/src/theme/slot-recipes/toast.ts +3 -3
|
@@ -4,21 +4,21 @@ import { alertAnatomy } from "./anatomy";
|
|
|
4
4
|
|
|
5
5
|
const createVariant = (variant: string) => ({
|
|
6
6
|
root: {
|
|
7
|
-
borderColor: `
|
|
8
|
-
background: `
|
|
7
|
+
borderColor: `outline.${variant}`,
|
|
8
|
+
background: `surface.${variant}`,
|
|
9
9
|
},
|
|
10
10
|
description: {
|
|
11
|
-
color: `
|
|
11
|
+
color: `text.${variant}.subtle`,
|
|
12
12
|
},
|
|
13
13
|
title: {
|
|
14
|
-
color: `
|
|
14
|
+
color: `text.${variant}`,
|
|
15
15
|
},
|
|
16
16
|
closeButton: {
|
|
17
|
-
color: `
|
|
17
|
+
color: `text.${variant}`,
|
|
18
18
|
_hover: {
|
|
19
|
-
bg: `
|
|
19
|
+
bg: `surface.${variant}.hover`,
|
|
20
20
|
_active: {
|
|
21
|
-
bg: `
|
|
21
|
+
bg: `surface.${variant}.active`,
|
|
22
22
|
},
|
|
23
23
|
},
|
|
24
24
|
},
|
|
@@ -54,13 +54,13 @@ export const alertSlotRecipe = defineSlotRecipe({
|
|
|
54
54
|
},
|
|
55
55
|
variants: {
|
|
56
56
|
variant: {
|
|
57
|
-
important: createVariant("
|
|
58
|
-
alt: createVariant("
|
|
59
|
-
error: createVariant("
|
|
57
|
+
important: createVariant("warning"),
|
|
58
|
+
alt: createVariant("notice"),
|
|
59
|
+
error: createVariant("critical"),
|
|
60
60
|
success: createVariant("success"),
|
|
61
61
|
info: createVariant("info"),
|
|
62
62
|
neutral: createVariant("neutral"),
|
|
63
|
-
"error-secondary": createVariant("
|
|
63
|
+
"error-secondary": createVariant("caution"),
|
|
64
64
|
service: createVariant("service"),
|
|
65
65
|
},
|
|
66
66
|
},
|
|
@@ -80,7 +80,7 @@ export const comboboxSlotRecipe = defineSlotRecipe({
|
|
|
80
80
|
borderRadius: "sm",
|
|
81
81
|
flex: "1",
|
|
82
82
|
_highlighted: {
|
|
83
|
-
bg: "ghost.
|
|
83
|
+
bg: "surface.ghost.active",
|
|
84
84
|
},
|
|
85
85
|
_disabled: {
|
|
86
86
|
pointerEvents: "none",
|
|
@@ -89,15 +89,15 @@ export const comboboxSlotRecipe = defineSlotRecipe({
|
|
|
89
89
|
},
|
|
90
90
|
|
|
91
91
|
_hover: {
|
|
92
|
-
bg: "ghost.
|
|
92
|
+
bg: "surface.ghost.hover",
|
|
93
93
|
},
|
|
94
94
|
|
|
95
95
|
_pressed: {
|
|
96
|
-
bg: "ghost.
|
|
96
|
+
bg: "surface.ghost.active",
|
|
97
97
|
},
|
|
98
98
|
|
|
99
99
|
_focus: {
|
|
100
|
-
bg: "ghost.
|
|
100
|
+
bg: "surface.ghost.active",
|
|
101
101
|
},
|
|
102
102
|
},
|
|
103
103
|
|
|
@@ -120,7 +120,7 @@ export const comboboxSlotRecipe = defineSlotRecipe({
|
|
|
120
120
|
itemGroupLabel: {
|
|
121
121
|
px: "3",
|
|
122
122
|
py: "0.5",
|
|
123
|
-
color: "floating
|
|
123
|
+
color: "text.floating",
|
|
124
124
|
fontFeatureSettings: "liga off",
|
|
125
125
|
fontSize: ["mobile.sm, desktop.sm"],
|
|
126
126
|
fontWeight: "bold",
|
|
@@ -33,11 +33,11 @@ export const breadcrumbSlotRecipe = defineSlotRecipe({
|
|
|
33
33
|
core: {
|
|
34
34
|
link: {
|
|
35
35
|
_hover: {
|
|
36
|
-
outlineColor: "core.
|
|
36
|
+
outlineColor: "outline.core.hover",
|
|
37
37
|
outlineWidth: tokens.size.stroke.md,
|
|
38
38
|
outlineStyle: "solid",
|
|
39
39
|
_active: {
|
|
40
|
-
backgroundColor: "core.
|
|
40
|
+
backgroundColor: "surface.core.active",
|
|
41
41
|
outline: "none",
|
|
42
42
|
},
|
|
43
43
|
},
|
|
@@ -46,9 +46,9 @@ export const breadcrumbSlotRecipe = defineSlotRecipe({
|
|
|
46
46
|
ghost: {
|
|
47
47
|
link: {
|
|
48
48
|
_hover: {
|
|
49
|
-
backgroundColor: "ghost.
|
|
49
|
+
backgroundColor: "surface.ghost.hover",
|
|
50
50
|
_active: {
|
|
51
|
-
backgroundColor: "ghost.
|
|
51
|
+
backgroundColor: "surface.ghost.active",
|
|
52
52
|
},
|
|
53
53
|
},
|
|
54
54
|
},
|
|
@@ -14,11 +14,11 @@ export const checkboxSlotRecipe = defineSlotRecipe({
|
|
|
14
14
|
gap: 1.5,
|
|
15
15
|
_hover: {
|
|
16
16
|
"& > input:enabled:not([aria-invalid]) + .spor-checkbox__control": {
|
|
17
|
-
borderColor: "core.
|
|
17
|
+
borderColor: "outline.core.hover",
|
|
18
18
|
},
|
|
19
19
|
"& > input:enabled:checked:not([aria-invalid]) + .spor-checkbox__control":
|
|
20
20
|
{
|
|
21
|
-
background: "brand.
|
|
21
|
+
background: "surface.brand.hover",
|
|
22
22
|
},
|
|
23
23
|
},
|
|
24
24
|
},
|
|
@@ -40,31 +40,25 @@ export const checkboxSlotRecipe = defineSlotRecipe({
|
|
|
40
40
|
transitionProperty: "background, border-color",
|
|
41
41
|
transitionDuration: "moderate",
|
|
42
42
|
border: "2px solid",
|
|
43
|
-
borderColor: "core
|
|
43
|
+
borderColor: "outline.core",
|
|
44
44
|
borderRadius: "xs",
|
|
45
45
|
|
|
46
46
|
_checked: {
|
|
47
|
-
color: "brand
|
|
48
|
-
borderColor: "brand
|
|
49
|
-
background: "brand
|
|
47
|
+
color: "icon.brand",
|
|
48
|
+
borderColor: "surface.brand",
|
|
49
|
+
background: "surface.brand",
|
|
50
50
|
_focus: {
|
|
51
|
-
borderColor: "brand.
|
|
51
|
+
borderColor: "surface.brand.active",
|
|
52
52
|
},
|
|
53
|
-
|
|
54
|
-
_disabled: {
|
|
55
|
-
background: "surface.disabled",
|
|
56
|
-
color: "text.disabled",
|
|
57
|
-
borderColor: "currentColor",
|
|
58
|
-
},
|
|
59
|
-
|
|
60
53
|
_invalid: {
|
|
61
54
|
backgroundColor: "outline.error",
|
|
62
55
|
borderColor: "outline.error",
|
|
63
56
|
},
|
|
64
57
|
},
|
|
65
58
|
_disabled: {
|
|
66
|
-
|
|
67
|
-
borderColor: "
|
|
59
|
+
background: "surface.disabled",
|
|
60
|
+
borderColor: "outline.disabled",
|
|
61
|
+
color: "text.disabled",
|
|
68
62
|
},
|
|
69
63
|
_invalid: {
|
|
70
64
|
borderColor: "outline.error",
|
|
@@ -74,7 +68,7 @@ export const checkboxSlotRecipe = defineSlotRecipe({
|
|
|
74
68
|
outlineColor: "outline.focus",
|
|
75
69
|
outlineOffset: tokens.size.stroke.md,
|
|
76
70
|
outlineWidth: tokens.size.stroke.md,
|
|
77
|
-
borderColor: "core
|
|
71
|
+
borderColor: "outline.core",
|
|
78
72
|
borderWidth: tokens.size.stroke.md,
|
|
79
73
|
},
|
|
80
74
|
},
|
|
@@ -18,16 +18,16 @@ export const choiceChipSlotRecipe = defineSlotRecipe({
|
|
|
18
18
|
paddingInlineEnd: "2",
|
|
19
19
|
|
|
20
20
|
outline: "1px solid",
|
|
21
|
-
outlineColor: "core
|
|
21
|
+
outlineColor: "outline.core",
|
|
22
22
|
_checked: {
|
|
23
|
-
backgroundColor: "brand
|
|
23
|
+
backgroundColor: "surface.brand",
|
|
24
24
|
borderRadius: "sm",
|
|
25
25
|
outline: "none",
|
|
26
|
-
color: "brand
|
|
26
|
+
color: "text.brand",
|
|
27
27
|
_hover: {
|
|
28
|
-
backgroundColor: "brand.
|
|
28
|
+
backgroundColor: "surface.brand.hover",
|
|
29
29
|
_active: {
|
|
30
|
-
backgroundColor: "brand.
|
|
30
|
+
backgroundColor: "surface.brand.active",
|
|
31
31
|
},
|
|
32
32
|
},
|
|
33
33
|
},
|
|
@@ -130,53 +130,53 @@ export const choiceChipSlotRecipe = defineSlotRecipe({
|
|
|
130
130
|
variant: {
|
|
131
131
|
core: {
|
|
132
132
|
root: {
|
|
133
|
-
color: "core
|
|
134
|
-
outlineColor: "core
|
|
133
|
+
color: "text.core",
|
|
134
|
+
outlineColor: "outline.core",
|
|
135
135
|
|
|
136
136
|
_hover: {
|
|
137
137
|
outline: "2px solid",
|
|
138
|
-
outlineColor: "core.
|
|
138
|
+
outlineColor: "outline.core.hover",
|
|
139
139
|
|
|
140
140
|
_active: {
|
|
141
141
|
outline: "1px solid",
|
|
142
|
-
outlineColor: "core
|
|
143
|
-
backgroundColor: "core.
|
|
142
|
+
outlineColor: "outline.core",
|
|
143
|
+
backgroundColor: "surface.core.active",
|
|
144
144
|
},
|
|
145
145
|
},
|
|
146
146
|
},
|
|
147
147
|
},
|
|
148
148
|
accent: {
|
|
149
149
|
root: {
|
|
150
|
-
backgroundColor: "accent
|
|
151
|
-
color: "accent
|
|
150
|
+
backgroundColor: "surface.accent",
|
|
151
|
+
color: "text.accent",
|
|
152
152
|
outline: "none",
|
|
153
153
|
|
|
154
154
|
_hover: {
|
|
155
|
-
backgroundColor: "accent.
|
|
155
|
+
backgroundColor: "surface.accent.hover",
|
|
156
156
|
|
|
157
157
|
_active: {
|
|
158
|
-
backgroundColor: "accent.
|
|
158
|
+
backgroundColor: "surface.accent.active",
|
|
159
159
|
},
|
|
160
160
|
},
|
|
161
161
|
},
|
|
162
162
|
},
|
|
163
163
|
floating: {
|
|
164
164
|
root: {
|
|
165
|
-
backgroundColor: "floating
|
|
165
|
+
backgroundColor: "surface.floating",
|
|
166
166
|
outline: "1px solid",
|
|
167
|
-
outlineColor: "floating
|
|
168
|
-
color: "floating
|
|
167
|
+
outlineColor: "outline.floating",
|
|
168
|
+
color: "text.floating",
|
|
169
169
|
|
|
170
170
|
boxShadow: "sm",
|
|
171
171
|
_hover: {
|
|
172
|
-
backgroundColor: "floating.
|
|
172
|
+
backgroundColor: "surface.floating.hover",
|
|
173
173
|
outline: "1px solid",
|
|
174
|
-
outlineColor: "floating.
|
|
174
|
+
outlineColor: "outline.floating.hover",
|
|
175
175
|
|
|
176
176
|
_active: {
|
|
177
|
-
backgroundColor: "floating.
|
|
177
|
+
backgroundColor: "surface.floating.active",
|
|
178
178
|
outline: "1px solid",
|
|
179
|
-
outlineColor: "floating
|
|
179
|
+
outlineColor: "outline.floating",
|
|
180
180
|
},
|
|
181
181
|
},
|
|
182
182
|
},
|
|
@@ -43,7 +43,7 @@ export const datePickerSlotRecipe = defineSlotRecipe({
|
|
|
43
43
|
},
|
|
44
44
|
dateTimeSegment: {
|
|
45
45
|
_focus: {
|
|
46
|
-
backgroundColor: "ghost.
|
|
46
|
+
backgroundColor: "surface.ghost.active",
|
|
47
47
|
color: "text",
|
|
48
48
|
},
|
|
49
49
|
},
|
|
@@ -60,10 +60,10 @@ export const datePickerSlotRecipe = defineSlotRecipe({
|
|
|
60
60
|
transitionProperty: "box-shadow, background-color",
|
|
61
61
|
right: "0.5rem",
|
|
62
62
|
_hover: {
|
|
63
|
-
backgroundColor: "ghost.
|
|
63
|
+
backgroundColor: "surface.ghost.hover",
|
|
64
64
|
},
|
|
65
65
|
_active: {
|
|
66
|
-
backgroundColor: "ghost.
|
|
66
|
+
backgroundColor: "surface.ghost.active",
|
|
67
67
|
},
|
|
68
68
|
_invalid: {
|
|
69
69
|
outline: "2px solid",
|
|
@@ -74,11 +74,11 @@ export const datePickerSlotRecipe = defineSlotRecipe({
|
|
|
74
74
|
backgroundColor: "surface",
|
|
75
75
|
},
|
|
76
76
|
calendarPopover: {
|
|
77
|
-
color: "core
|
|
77
|
+
color: "text.core",
|
|
78
78
|
outline: "1px solid",
|
|
79
|
-
outlineColor: "floating
|
|
79
|
+
outlineColor: "outline.floating",
|
|
80
80
|
boxShadow: "md",
|
|
81
|
-
backgroundColor: "floating
|
|
81
|
+
backgroundColor: "surface.floating",
|
|
82
82
|
minHeight: "min-content",
|
|
83
83
|
},
|
|
84
84
|
rangeCalendarPopover: {
|
|
@@ -86,11 +86,11 @@ export const datePickerSlotRecipe = defineSlotRecipe({
|
|
|
86
86
|
maxWidth: "100vw",
|
|
87
87
|
},
|
|
88
88
|
weekdays: {
|
|
89
|
-
color: "core
|
|
89
|
+
color: "text.core",
|
|
90
90
|
fontWeight: "bold",
|
|
91
91
|
},
|
|
92
92
|
weekend: {
|
|
93
|
-
color: "accent
|
|
93
|
+
color: "text.accent",
|
|
94
94
|
fontWeight: "bold",
|
|
95
95
|
},
|
|
96
96
|
cell: {
|
|
@@ -104,12 +104,12 @@ export const datePickerSlotRecipe = defineSlotRecipe({
|
|
|
104
104
|
top: 0,
|
|
105
105
|
bottom: 0,
|
|
106
106
|
zIndex: -1,
|
|
107
|
-
backgroundColor: "brand
|
|
107
|
+
backgroundColor: "surface.brand",
|
|
108
108
|
},
|
|
109
109
|
},
|
|
110
110
|
},
|
|
111
111
|
dateCell: {
|
|
112
|
-
color: "core
|
|
112
|
+
color: "text.core",
|
|
113
113
|
borderRadius: "xl",
|
|
114
114
|
position: "relative",
|
|
115
115
|
transition: ".1s ease-in-out",
|
|
@@ -119,10 +119,10 @@ export const datePickerSlotRecipe = defineSlotRecipe({
|
|
|
119
119
|
transitionProperty: "common",
|
|
120
120
|
|
|
121
121
|
_hover: {
|
|
122
|
-
backgroundColor: "ghost.
|
|
122
|
+
backgroundColor: "surface.ghost.hover",
|
|
123
123
|
},
|
|
124
124
|
_active: {
|
|
125
|
-
backgroundColor: "ghost.
|
|
125
|
+
backgroundColor: "surface.ghost.active",
|
|
126
126
|
},
|
|
127
127
|
_disabled: {
|
|
128
128
|
backgroundColor: "surface.disabled",
|
|
@@ -130,16 +130,16 @@ export const datePickerSlotRecipe = defineSlotRecipe({
|
|
|
130
130
|
pointerEvents: "none",
|
|
131
131
|
},
|
|
132
132
|
_selected: {
|
|
133
|
-
backgroundColor: "brand
|
|
134
|
-
color: "brand
|
|
133
|
+
backgroundColor: "surface.brand",
|
|
134
|
+
color: "text.brand",
|
|
135
135
|
_active: {
|
|
136
|
-
backgroundColor: "brand.
|
|
137
|
-
color: "brand
|
|
136
|
+
backgroundColor: "surface.brand.active",
|
|
137
|
+
color: "text.brand",
|
|
138
138
|
},
|
|
139
139
|
},
|
|
140
140
|
"&[data-today]": {
|
|
141
141
|
outline: "1px solid",
|
|
142
|
-
outlineColor: "core
|
|
142
|
+
outlineColor: "outline.core",
|
|
143
143
|
},
|
|
144
144
|
"&[data-unavailable]": {
|
|
145
145
|
pointerEvents: "none",
|
|
@@ -154,16 +154,16 @@ export const datePickerSlotRecipe = defineSlotRecipe({
|
|
|
154
154
|
core: {
|
|
155
155
|
wrapper: {
|
|
156
156
|
outline: "1px solid",
|
|
157
|
-
outlineColor: "core
|
|
157
|
+
outlineColor: "outline.core",
|
|
158
158
|
|
|
159
159
|
_hover: {
|
|
160
160
|
outline: "2px solid",
|
|
161
161
|
|
|
162
|
-
outlineColor: "core.
|
|
162
|
+
outlineColor: "outline.core.hover",
|
|
163
163
|
_active: {
|
|
164
|
-
backgroundColor: "ghost.
|
|
164
|
+
backgroundColor: "surface.ghost.active",
|
|
165
165
|
outline: "1px solid",
|
|
166
|
-
outlineColor: "core
|
|
166
|
+
outlineColor: "outline.core",
|
|
167
167
|
},
|
|
168
168
|
|
|
169
169
|
"&[data-active]": {
|
|
@@ -182,18 +182,18 @@ export const datePickerSlotRecipe = defineSlotRecipe({
|
|
|
182
182
|
},
|
|
183
183
|
floating: {
|
|
184
184
|
wrapper: {
|
|
185
|
-
bg: "floating
|
|
185
|
+
bg: "surface.floating",
|
|
186
186
|
outline: "1px solid",
|
|
187
|
-
outlineColor: "floating
|
|
187
|
+
outlineColor: "outline.floating",
|
|
188
188
|
boxShadow: "sm",
|
|
189
189
|
|
|
190
190
|
_hover: {
|
|
191
191
|
outline: "1px solid",
|
|
192
|
-
outlineColor: "floating.
|
|
192
|
+
outlineColor: "outline.floating.hover",
|
|
193
193
|
_active: {
|
|
194
|
-
backgroundColor: "ghost.
|
|
194
|
+
backgroundColor: "surface.ghost.active",
|
|
195
195
|
outline: "1px solid",
|
|
196
|
-
outlineColor: "core
|
|
196
|
+
outlineColor: "outline.core",
|
|
197
197
|
},
|
|
198
198
|
|
|
199
199
|
"&[data-active]": {
|
|
@@ -214,11 +214,11 @@ export const datePickerSlotRecipe = defineSlotRecipe({
|
|
|
214
214
|
wrapper: {
|
|
215
215
|
_hover: {
|
|
216
216
|
outline: "2px solid",
|
|
217
|
-
outlineColor: "core.
|
|
217
|
+
outlineColor: "outline.core.hover",
|
|
218
218
|
_active: {
|
|
219
|
-
backgroundColor: "ghost.
|
|
219
|
+
backgroundColor: "surface.ghost.active",
|
|
220
220
|
outline: "1px solid",
|
|
221
|
-
outlineColor: "core
|
|
221
|
+
outlineColor: "outline.core",
|
|
222
222
|
},
|
|
223
223
|
|
|
224
224
|
"&[data-active]": {
|
|
@@ -22,13 +22,13 @@ export const fieldSlotRecipe = defineSlotRecipe({
|
|
|
22
22
|
},
|
|
23
23
|
helperText: {
|
|
24
24
|
marginTop: 2,
|
|
25
|
-
color: "text.
|
|
25
|
+
color: "text.subtle",
|
|
26
26
|
lineHeight: "normal",
|
|
27
27
|
fontSize: "sm",
|
|
28
28
|
},
|
|
29
29
|
errorText: {
|
|
30
30
|
borderRadius: "xs",
|
|
31
|
-
backgroundColor: "
|
|
31
|
+
backgroundColor: "surface.critical",
|
|
32
32
|
color: "text",
|
|
33
33
|
paddingX: 1.5,
|
|
34
34
|
paddingY: 1,
|
|
@@ -46,7 +46,7 @@ export const fieldSlotRecipe = defineSlotRecipe({
|
|
|
46
46
|
left: "1em",
|
|
47
47
|
width: "0.5rem",
|
|
48
48
|
height: "0.5rem",
|
|
49
|
-
backgroundColor: "
|
|
49
|
+
backgroundColor: "surface.critical",
|
|
50
50
|
transform: "translateY(-50%) rotate(45deg)",
|
|
51
51
|
pointerEvents: "none",
|
|
52
52
|
},
|
|
@@ -57,12 +57,12 @@ export const floatingActionButtonSlotRecipe = defineSlotRecipe({
|
|
|
57
57
|
variant: {
|
|
58
58
|
brand: {
|
|
59
59
|
root: {
|
|
60
|
-
backgroundColor: "brand
|
|
61
|
-
color: "brand
|
|
60
|
+
backgroundColor: "surface.brand",
|
|
61
|
+
color: "text.brand",
|
|
62
62
|
_hover: {
|
|
63
|
-
backgroundColor: "brand.
|
|
63
|
+
backgroundColor: "surface.brand.hover",
|
|
64
64
|
_active: {
|
|
65
|
-
backgroundColor: "brand.
|
|
65
|
+
backgroundColor: "surface.brand.active",
|
|
66
66
|
},
|
|
67
67
|
},
|
|
68
68
|
},
|
|
@@ -71,29 +71,29 @@ export const floatingActionButtonSlotRecipe = defineSlotRecipe({
|
|
|
71
71
|
root: {
|
|
72
72
|
backgroundColor: "transparent",
|
|
73
73
|
outline: "1px solid",
|
|
74
|
-
outlineColor: "core
|
|
75
|
-
color: "core
|
|
74
|
+
outlineColor: "outline.core",
|
|
75
|
+
color: "text.core",
|
|
76
76
|
_hover: {
|
|
77
77
|
backgroundColor: "transparent",
|
|
78
78
|
outline: "2px solid",
|
|
79
|
-
outlineColor: "core
|
|
79
|
+
outlineColor: "outline.core",
|
|
80
80
|
_active: {
|
|
81
81
|
outline: "1px solid",
|
|
82
|
-
outlineColor: "core
|
|
83
|
-
backgroundColor: "core.
|
|
82
|
+
outlineColor: "outline.core",
|
|
83
|
+
backgroundColor: "surface.core.active",
|
|
84
84
|
},
|
|
85
85
|
},
|
|
86
86
|
},
|
|
87
87
|
},
|
|
88
88
|
accent: {
|
|
89
89
|
root: {
|
|
90
|
-
backgroundColor: "accent
|
|
91
|
-
color: "accent
|
|
90
|
+
backgroundColor: "surface.accent",
|
|
91
|
+
color: "text.accent",
|
|
92
92
|
_hover: {
|
|
93
|
-
backgroundColor: "accent.
|
|
94
|
-
color: "accent
|
|
93
|
+
backgroundColor: "surface.accent.hover",
|
|
94
|
+
color: "text.accent",
|
|
95
95
|
_active: {
|
|
96
|
-
backgroundColor: "accent.
|
|
96
|
+
backgroundColor: "surface.accent.active",
|
|
97
97
|
},
|
|
98
98
|
},
|
|
99
99
|
},
|
|
@@ -13,6 +13,7 @@ import { drawerSlotRecipe } from "./drawer";
|
|
|
13
13
|
import { fieldSlotRecipe } from "./field";
|
|
14
14
|
import { floatingActionButtonSlotRecipe } from "./floating-action-button";
|
|
15
15
|
import { infoTagSlotRecipe } from "./info-tag";
|
|
16
|
+
import { inputChipSlotRecipe } from "./input-chip";
|
|
16
17
|
import { lineIconSlotRecipe } from "./line-icon";
|
|
17
18
|
import { listSlotRecipe } from "./list";
|
|
18
19
|
import { listBoxSlotRecipe } from "./listbox";
|
|
@@ -70,5 +71,6 @@ export const slotRecipes = {
|
|
|
70
71
|
checkboxCard: choiceChipSlotRecipe,
|
|
71
72
|
collapsible: collapsibleSlotRecipe,
|
|
72
73
|
tooltip: popoverSlotRecipe,
|
|
74
|
+
tag: inputChipSlotRecipe,
|
|
73
75
|
menu: menuSlotRecipe,
|
|
74
76
|
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { defineSlotRecipe } from "@chakra-ui/react";
|
|
2
|
+
|
|
3
|
+
import { tagAnatomy } from "./anatomy";
|
|
4
|
+
|
|
5
|
+
export const inputChipSlotRecipe = defineSlotRecipe({
|
|
6
|
+
slots: tagAnatomy.keys(),
|
|
7
|
+
className: "chakra-tag",
|
|
8
|
+
base: {
|
|
9
|
+
root: {
|
|
10
|
+
display: "flex",
|
|
11
|
+
direction: "row",
|
|
12
|
+
width: "fit-content",
|
|
13
|
+
height: "fit-content",
|
|
14
|
+
alignItems: "center",
|
|
15
|
+
justifyContent: "center",
|
|
16
|
+
gap: "1",
|
|
17
|
+
outline: "none",
|
|
18
|
+
"&:focus": {
|
|
19
|
+
outline: "2px solid",
|
|
20
|
+
outlineColor: "outline.focus",
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
variants: {
|
|
25
|
+
variant: {
|
|
26
|
+
core: {
|
|
27
|
+
root: {
|
|
28
|
+
backgroundColor: "surface",
|
|
29
|
+
border: "1px solid",
|
|
30
|
+
borderColor: "outline",
|
|
31
|
+
"&:hover": {
|
|
32
|
+
outline: "2px solid",
|
|
33
|
+
outlineColor: "outline.core.hover",
|
|
34
|
+
},
|
|
35
|
+
"&:active": {
|
|
36
|
+
outline: "none",
|
|
37
|
+
backgroundColor: "surface.core.active",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
accent: {
|
|
42
|
+
root: {
|
|
43
|
+
backgroundColor: "surface.accent",
|
|
44
|
+
color: "text.highlight",
|
|
45
|
+
"& svg": {
|
|
46
|
+
color: "icon.highlight",
|
|
47
|
+
},
|
|
48
|
+
"&:hover": {
|
|
49
|
+
backgroundColor: "surface.accent.hover",
|
|
50
|
+
},
|
|
51
|
+
"&:active": {
|
|
52
|
+
backgroundColor: "surface.accent.active",
|
|
53
|
+
outline: "none",
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
brand: {
|
|
58
|
+
root: {
|
|
59
|
+
backgroundColor: "surface.brand",
|
|
60
|
+
color: "text.brand",
|
|
61
|
+
"& svg": {
|
|
62
|
+
color: "icon.brand",
|
|
63
|
+
},
|
|
64
|
+
"&:hover": {
|
|
65
|
+
backgroundColor: "surface.brand.hover",
|
|
66
|
+
},
|
|
67
|
+
"&:active": {
|
|
68
|
+
backgroundColor: "surface.brand.active",
|
|
69
|
+
outline: "none",
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
size: {
|
|
75
|
+
xs: {
|
|
76
|
+
root: {
|
|
77
|
+
fontSize: "desktop.xs",
|
|
78
|
+
paddingX: "1.5",
|
|
79
|
+
paddingY: "0",
|
|
80
|
+
fontWeight: "normal",
|
|
81
|
+
borderRadius: "xs",
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
sm: {
|
|
85
|
+
root: {
|
|
86
|
+
fontSize: "desktop.sm",
|
|
87
|
+
paddingX: "2",
|
|
88
|
+
paddingY: "0.5",
|
|
89
|
+
fontWeight: "bold",
|
|
90
|
+
borderRadius: "9px",
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
md: {
|
|
94
|
+
root: {
|
|
95
|
+
padding: 5,
|
|
96
|
+
fontSize: "desktop.md",
|
|
97
|
+
paddingX: "2",
|
|
98
|
+
paddingY: "1",
|
|
99
|
+
fontWeight: "bold",
|
|
100
|
+
borderRadius: "sm",
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
lg: {
|
|
104
|
+
root: {
|
|
105
|
+
fontSize: "desktop.md",
|
|
106
|
+
paddingX: "2",
|
|
107
|
+
paddingY: "3",
|
|
108
|
+
fontWeight: "bold",
|
|
109
|
+
borderRadius: "md",
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
defaultVariants: {
|
|
115
|
+
variant: "core",
|
|
116
|
+
size: "sm",
|
|
117
|
+
},
|
|
118
|
+
});
|