@okshaun/components 2.0.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/icon-metadata.json +385 -41
- package/dist/index.js +13414 -5259
- package/dist/index.js.map +1 -1
- package/dist/panda.buildinfo.json +1245 -263
- package/dist/{preset-DAmO4B54.js → preset-BOFHjPdQ.js} +2265 -1727
- package/dist/preset-BOFHjPdQ.js.map +1 -0
- package/dist/preset.js +1 -1
- package/dist/specs/conditions.json +75 -51
- package/dist/specs/keyframes.json +33 -0
- package/dist/specs/recipes.json +359 -103
- package/dist/specs/semantic-tokens.json +152 -44
- package/dist/specs/tokens.json +21 -36
- package/dist/sprite.svg +1 -1
- package/dist/sprite.symbol.html +499 -43
- package/dist/styles.css +18229 -7568
- package/dist/svgs/barcode-off.svg +1 -0
- package/dist/svgs/cheese.svg +1 -0
- package/dist/svgs/collapse-vertical.svg +1 -0
- package/dist/svgs/expand-vertical.svg +1 -0
- package/dist/svgs/magnet.svg +1 -0
- package/dist/svgs/spinner.svg +1 -0
- package/dist/svgs/to-date-backward.svg +1 -0
- package/dist/svgs/to-date-forward.svg +1 -0
- package/dist/types/index.d.ts +2804 -296
- package/package.json +4 -2
- package/src/recipes/autocomplete.ts +266 -0
- package/src/recipes/avatar.ts +1 -1
- package/src/recipes/badge.ts +31 -43
- package/src/recipes/breakpointIndicator.ts +11 -0
- package/src/recipes/button.ts +172 -223
- package/src/recipes/calendar.ts +91 -0
- package/src/recipes/card.ts +4 -70
- package/src/recipes/chip.ts +213 -142
- package/src/recipes/dateMenus.ts +40 -0
- package/src/recipes/dateTimeMenus.ts +43 -0
- package/src/recipes/icon.ts +25 -6
- package/src/recipes/kbd.ts +56 -0
- package/src/recipes/list.ts +17 -1
- package/src/recipes/listDensity.ts +66 -0
- package/src/recipes/listItem.ts +29 -161
- package/src/recipes/listItemGroup.ts +17 -39
- package/src/recipes/menu.ts +17 -3
- package/src/recipes/modal.ts +70 -39
- package/src/recipes/radio.ts +6 -6
- package/src/recipes/recipes-regular.ts +2 -0
- package/src/recipes/recipes-slot.ts +8 -2
- package/src/recipes/segmentedFields.ts +192 -0
- package/src/recipes/segmentedInputs.ts +109 -0
- package/src/recipes/select.ts +8 -1
- package/src/recipes/skeleton.ts +72 -0
- package/src/recipes/spinner.ts +27 -24
- package/src/recipes/tag.ts +218 -210
- package/src/recipes/text.ts +37 -19
- package/src/recipes/textInput.ts +106 -117
- package/src/recipes/themeSwitcher.ts +3 -3
- package/src/recipes/timeMenus.ts +110 -0
- package/src/recipes/toggle.ts +3 -1
- package/src/styles/primitives/animations.ts +3 -0
- package/src/styles/primitives/shadows.ts +26 -60
- package/src/styles/primitives/zIndex.ts +1 -0
- package/src/styles/semantics/colors.ts +43 -0
- package/src/styles/semantics/shadows.ts +4 -30
- package/src/styles/semantics/zIndex.ts +2 -0
- package/src/styles/utilities/conditions.ts +61 -51
- package/src/styles/utilities/dropShadows.ts +51 -0
- package/src/styles/utilities/filters.ts +22 -7
- package/src/styles/utilities/globalStyle.ts +5 -2
- package/src/styles/utilities/index.ts +3 -0
- package/src/styles/utilities/keyframes.ts +31 -4
- package/src/styles/utilities/recipeGlobalStyles.ts +22 -0
- package/src/styles/utilities/shadowDefinitions.ts +112 -0
- package/src/utils/dsChain.ts +113 -0
- package/src/utils/dsComponent.ts +44 -0
- package/src/utils/dsPart.ts +41 -0
- package/src/utils/mergeAriaDescribedBy.ts +7 -0
- package/dist/preset-DAmO4B54.js.map +0 -1
- package/src/recipes/datePicker.ts +0 -212
- package/src/recipes/timePicker.ts +0 -199
package/src/recipes/tag.ts
CHANGED
|
@@ -18,239 +18,247 @@ export const tagRecipe = defineRecipe({
|
|
|
18
18
|
whiteSpace: 'nowrap',
|
|
19
19
|
},
|
|
20
20
|
variants: {
|
|
21
|
-
variant
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
// Each hue publishes both colour pairs; `variant` picks one. This replaces
|
|
22
|
+
// 24 compoundVariants, which Panda emitted no CSS for at all: the variant
|
|
23
|
+
// bodies were empty, so every Tag rendered as the uncoloured base. Doing it
|
|
24
|
+
// through custom properties also makes `hue` and `variant` responsive.
|
|
25
25
|
hue: {
|
|
26
|
-
gray: {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
green: {},
|
|
32
|
-
teal: {},
|
|
33
|
-
blue: {},
|
|
34
|
-
indigo: {},
|
|
35
|
-
purple: {},
|
|
36
|
-
magenta: {},
|
|
37
|
-
tan: {},
|
|
38
|
-
},
|
|
39
|
-
iconBefore: {
|
|
40
|
-
true: {
|
|
41
|
-
gap: '1',
|
|
42
|
-
pl: '1',
|
|
43
|
-
},
|
|
44
|
-
false: {},
|
|
45
|
-
},
|
|
46
|
-
iconAfter: {
|
|
47
|
-
true: {
|
|
48
|
-
gap: '1',
|
|
49
|
-
pr: '1',
|
|
50
|
-
},
|
|
51
|
-
false: {},
|
|
52
|
-
},
|
|
53
|
-
hasIcon: {
|
|
54
|
-
true: {},
|
|
55
|
-
false: {
|
|
56
|
-
px: '4',
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
compoundVariants: [
|
|
61
|
-
{
|
|
62
|
-
hue: 'gray',
|
|
63
|
-
variant: 'default',
|
|
64
|
-
css: {
|
|
65
|
-
color: 'text.subtle',
|
|
66
|
-
bg: 'bg.neutral',
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
hue: 'gray',
|
|
71
|
-
variant: 'bold',
|
|
72
|
-
css: {
|
|
73
|
-
color: 'text.inverse',
|
|
74
|
-
bg: 'bg.neutral.boldest',
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
hue: 'red',
|
|
79
|
-
variant: 'default',
|
|
80
|
-
css: {
|
|
81
|
-
color: { base: 'red.70', _dark: 'red.20' },
|
|
82
|
-
bg: { base: 'red.20', _dark: 'red.100' },
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
hue: 'red',
|
|
87
|
-
variant: 'bold',
|
|
88
|
-
css: {
|
|
89
|
-
color: { base: 'red.10', _dark: 'red.100' },
|
|
90
|
-
bg: { base: 'red.60', _dark: 'red.40' },
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
hue: 'orange',
|
|
95
|
-
variant: 'default',
|
|
96
|
-
css: {
|
|
97
|
-
color: { base: 'orange.70', _dark: 'orange.20' },
|
|
98
|
-
bg: { base: 'orange.20', _dark: 'orange.100' },
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
hue: 'orange',
|
|
103
|
-
variant: 'bold',
|
|
104
|
-
css: {
|
|
105
|
-
color: { base: 'orange.10', _dark: 'orange.100' },
|
|
106
|
-
bg: { base: 'orange.60', _dark: 'orange.50' },
|
|
26
|
+
gray: {
|
|
27
|
+
'--tag-fg': 'token(colors.text.subtle)',
|
|
28
|
+
'--tag-bg': 'token(colors.bg.neutral)',
|
|
29
|
+
'--tag-fg-bold': 'token(colors.text.inverse)',
|
|
30
|
+
'--tag-bg-bold': 'token(colors.bg.neutral.boldest)',
|
|
107
31
|
},
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
32
|
+
red: {
|
|
33
|
+
'--tag-fg': {
|
|
34
|
+
base: 'token(colors.red.70)',
|
|
35
|
+
_dark: 'token(colors.red.20)',
|
|
36
|
+
},
|
|
37
|
+
'--tag-bg': {
|
|
38
|
+
base: 'token(colors.red.20)',
|
|
39
|
+
_dark: 'token(colors.red.100)',
|
|
40
|
+
},
|
|
41
|
+
'--tag-fg-bold': {
|
|
42
|
+
base: 'token(colors.red.10)',
|
|
43
|
+
_dark: 'token(colors.red.100)',
|
|
44
|
+
},
|
|
45
|
+
'--tag-bg-bold': {
|
|
46
|
+
base: 'token(colors.red.60)',
|
|
47
|
+
_dark: 'token(colors.red.40)',
|
|
48
|
+
},
|
|
115
49
|
},
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
50
|
+
orange: {
|
|
51
|
+
'--tag-fg': {
|
|
52
|
+
base: 'token(colors.orange.70)',
|
|
53
|
+
_dark: 'token(colors.orange.20)',
|
|
54
|
+
},
|
|
55
|
+
'--tag-bg': {
|
|
56
|
+
base: 'token(colors.orange.20)',
|
|
57
|
+
_dark: 'token(colors.orange.100)',
|
|
58
|
+
},
|
|
59
|
+
'--tag-fg-bold': {
|
|
60
|
+
base: 'token(colors.orange.10)',
|
|
61
|
+
_dark: 'token(colors.orange.100)',
|
|
62
|
+
},
|
|
63
|
+
'--tag-bg-bold': {
|
|
64
|
+
base: 'token(colors.orange.60)',
|
|
65
|
+
_dark: 'token(colors.orange.50)',
|
|
66
|
+
},
|
|
123
67
|
},
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
68
|
+
yellow: {
|
|
69
|
+
'--tag-fg': {
|
|
70
|
+
base: 'token(colors.yellow.80)',
|
|
71
|
+
_dark: 'token(colors.yellow.50)',
|
|
72
|
+
},
|
|
73
|
+
'--tag-bg': {
|
|
74
|
+
base: 'token(colors.yellow.20)',
|
|
75
|
+
_dark: 'token(colors.yellow.90)',
|
|
76
|
+
},
|
|
77
|
+
'--tag-fg-bold': {
|
|
78
|
+
base: 'token(colors.yellow.100)',
|
|
79
|
+
_dark: 'token(colors.yellow.100)',
|
|
80
|
+
},
|
|
81
|
+
'--tag-bg-bold': {
|
|
82
|
+
base: 'token(colors.yellow.40)',
|
|
83
|
+
_dark: 'token(colors.yellow.60)',
|
|
84
|
+
},
|
|
131
85
|
},
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
86
|
+
lime: {
|
|
87
|
+
'--tag-fg': {
|
|
88
|
+
base: 'token(colors.lime.70)',
|
|
89
|
+
_dark: 'token(colors.lime.20)',
|
|
90
|
+
},
|
|
91
|
+
'--tag-bg': {
|
|
92
|
+
base: 'token(colors.lime.20)',
|
|
93
|
+
_dark: 'token(colors.lime.90)',
|
|
94
|
+
},
|
|
95
|
+
'--tag-fg-bold': {
|
|
96
|
+
base: 'token(colors.lime.10)',
|
|
97
|
+
_dark: 'token(colors.lime.100)',
|
|
98
|
+
},
|
|
99
|
+
'--tag-bg-bold': {
|
|
100
|
+
base: 'token(colors.lime.60)',
|
|
101
|
+
_dark: 'token(colors.lime.40)',
|
|
102
|
+
},
|
|
139
103
|
},
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
104
|
+
green: {
|
|
105
|
+
'--tag-fg': {
|
|
106
|
+
base: 'token(colors.green.70)',
|
|
107
|
+
_dark: 'token(colors.green.20)',
|
|
108
|
+
},
|
|
109
|
+
'--tag-bg': {
|
|
110
|
+
base: 'token(colors.green.20)',
|
|
111
|
+
_dark: 'token(colors.green.90)',
|
|
112
|
+
},
|
|
113
|
+
'--tag-fg-bold': {
|
|
114
|
+
base: 'token(colors.gray.10)',
|
|
115
|
+
_dark: 'token(colors.green.100)',
|
|
116
|
+
},
|
|
117
|
+
'--tag-bg-bold': {
|
|
118
|
+
base: 'token(colors.green.70)',
|
|
119
|
+
_dark: 'token(colors.green.40)',
|
|
120
|
+
},
|
|
147
121
|
},
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
122
|
+
teal: {
|
|
123
|
+
'--tag-fg': {
|
|
124
|
+
base: 'token(colors.teal.80)',
|
|
125
|
+
_dark: 'token(colors.teal.20)',
|
|
126
|
+
},
|
|
127
|
+
'--tag-bg': {
|
|
128
|
+
base: 'token(colors.teal.20)',
|
|
129
|
+
_dark: 'token(colors.teal.90)',
|
|
130
|
+
},
|
|
131
|
+
'--tag-fg-bold': {
|
|
132
|
+
base: 'token(colors.teal.10)',
|
|
133
|
+
_dark: 'token(colors.teal.100)',
|
|
134
|
+
},
|
|
135
|
+
'--tag-bg-bold': {
|
|
136
|
+
base: 'token(colors.teal.60)',
|
|
137
|
+
_dark: 'token(colors.teal.50)',
|
|
138
|
+
},
|
|
155
139
|
},
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
140
|
+
blue: {
|
|
141
|
+
'--tag-fg': {
|
|
142
|
+
base: 'token(colors.blue.70)',
|
|
143
|
+
_dark: 'token(colors.blue.20)',
|
|
144
|
+
},
|
|
145
|
+
'--tag-bg': {
|
|
146
|
+
base: 'token(colors.blue.20)',
|
|
147
|
+
_dark: 'token(colors.blue.90)',
|
|
148
|
+
},
|
|
149
|
+
'--tag-fg-bold': {
|
|
150
|
+
base: 'token(colors.blue.10)',
|
|
151
|
+
_dark: 'token(colors.blue.10)',
|
|
152
|
+
},
|
|
153
|
+
'--tag-bg-bold': {
|
|
154
|
+
base: 'token(colors.blue.50)',
|
|
155
|
+
_dark: 'token(colors.blue.70)',
|
|
156
|
+
},
|
|
163
157
|
},
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
158
|
+
indigo: {
|
|
159
|
+
'--tag-fg': {
|
|
160
|
+
base: 'token(colors.indigo.70)',
|
|
161
|
+
_dark: 'token(colors.indigo.20)',
|
|
162
|
+
},
|
|
163
|
+
'--tag-bg': {
|
|
164
|
+
base: 'token(colors.indigo.20)',
|
|
165
|
+
_dark: 'token(colors.indigo.90)',
|
|
166
|
+
},
|
|
167
|
+
'--tag-fg-bold': {
|
|
168
|
+
base: 'token(colors.indigo.10)',
|
|
169
|
+
_dark: 'token(colors.indigo.10)',
|
|
170
|
+
},
|
|
171
|
+
'--tag-bg-bold': {
|
|
172
|
+
base: 'token(colors.indigo.60)',
|
|
173
|
+
_dark: 'token(colors.indigo.70)',
|
|
174
|
+
},
|
|
171
175
|
},
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
176
|
+
purple: {
|
|
177
|
+
'--tag-fg': {
|
|
178
|
+
base: 'token(colors.purple.70)',
|
|
179
|
+
_dark: 'token(colors.purple.20)',
|
|
180
|
+
},
|
|
181
|
+
'--tag-bg': {
|
|
182
|
+
base: 'token(colors.purple.20)',
|
|
183
|
+
_dark: 'token(colors.purple.90)',
|
|
184
|
+
},
|
|
185
|
+
'--tag-fg-bold': {
|
|
186
|
+
base: 'token(colors.purple.10)',
|
|
187
|
+
_dark: 'token(colors.purple.10)',
|
|
188
|
+
},
|
|
189
|
+
'--tag-bg-bold': {
|
|
190
|
+
base: 'token(colors.purple.60)',
|
|
191
|
+
_dark: 'token(colors.purple.80)',
|
|
192
|
+
},
|
|
187
193
|
},
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
194
|
+
magenta: {
|
|
195
|
+
'--tag-fg': {
|
|
196
|
+
base: 'token(colors.magenta.80)',
|
|
197
|
+
_dark: 'token(colors.magenta.20)',
|
|
198
|
+
},
|
|
199
|
+
'--tag-bg': {
|
|
200
|
+
base: 'token(colors.magenta.20)',
|
|
201
|
+
_dark: 'token(colors.magenta.90)',
|
|
202
|
+
},
|
|
203
|
+
'--tag-fg-bold': {
|
|
204
|
+
base: 'token(colors.magenta.10)',
|
|
205
|
+
_dark: 'token(colors.magenta.10)',
|
|
206
|
+
},
|
|
207
|
+
'--tag-bg-bold': {
|
|
208
|
+
base: 'token(colors.magenta.70)',
|
|
209
|
+
_dark: 'token(colors.magenta.70)',
|
|
210
|
+
},
|
|
195
211
|
},
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
212
|
+
tan: {
|
|
213
|
+
'--tag-fg': {
|
|
214
|
+
base: 'token(colors.tan.70)',
|
|
215
|
+
_dark: 'token(colors.tan.20)',
|
|
216
|
+
},
|
|
217
|
+
'--tag-bg': {
|
|
218
|
+
base: 'token(colors.tan.20)',
|
|
219
|
+
_dark: 'token(colors.tan.80)',
|
|
220
|
+
},
|
|
221
|
+
'--tag-fg-bold': {
|
|
222
|
+
base: 'token(colors.gray.10)',
|
|
223
|
+
_dark: 'token(colors.tan.90)',
|
|
224
|
+
},
|
|
225
|
+
'--tag-bg-bold': {
|
|
226
|
+
base: 'token(colors.tan.60)',
|
|
227
|
+
_dark: 'token(colors.tan.40)',
|
|
228
|
+
},
|
|
203
229
|
},
|
|
204
230
|
},
|
|
205
|
-
{
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
color: { base: 'purple.70', _dark: 'purple.20' },
|
|
210
|
-
bg: { base: 'purple.20', _dark: 'purple.90' },
|
|
231
|
+
variant: {
|
|
232
|
+
default: {
|
|
233
|
+
color: 'var(--tag-fg)',
|
|
234
|
+
bg: 'var(--tag-bg)',
|
|
211
235
|
},
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
variant: 'bold',
|
|
216
|
-
css: {
|
|
217
|
-
color: { base: 'purple.10', _dark: 'purple.10' },
|
|
218
|
-
bg: { base: 'purple.60', _dark: 'purple.80' },
|
|
236
|
+
bold: {
|
|
237
|
+
color: 'var(--tag-fg-bold)',
|
|
238
|
+
bg: 'var(--tag-bg-bold)',
|
|
219
239
|
},
|
|
220
240
|
},
|
|
221
|
-
{
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
color: { base: 'magenta.80', _dark: 'magenta.20' },
|
|
226
|
-
bg: { base: 'magenta.20', _dark: 'magenta.90' },
|
|
227
|
-
},
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
hue: 'magenta',
|
|
231
|
-
variant: 'bold',
|
|
232
|
-
css: {
|
|
233
|
-
color: { base: 'magenta.10', _dark: 'magenta.10' },
|
|
234
|
-
bg: { base: 'magenta.70', _dark: 'magenta.70' },
|
|
241
|
+
iconBefore: {
|
|
242
|
+
true: {
|
|
243
|
+
gap: '1',
|
|
244
|
+
pl: '1',
|
|
235
245
|
},
|
|
246
|
+
false: {},
|
|
236
247
|
},
|
|
237
|
-
{
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
color: { base: 'tan.70', _dark: 'tan.20' },
|
|
242
|
-
bg: { base: 'tan.20', _dark: 'tan.80' },
|
|
248
|
+
iconAfter: {
|
|
249
|
+
true: {
|
|
250
|
+
gap: '1',
|
|
251
|
+
pr: '1',
|
|
243
252
|
},
|
|
253
|
+
false: {},
|
|
244
254
|
},
|
|
245
|
-
{
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
color: { base: 'gray.10', _dark: 'tan.90' },
|
|
250
|
-
bg: { base: 'tan.60', _dark: 'tan.40' },
|
|
255
|
+
hasIcon: {
|
|
256
|
+
true: {},
|
|
257
|
+
false: {
|
|
258
|
+
px: '4',
|
|
251
259
|
},
|
|
252
260
|
},
|
|
253
|
-
|
|
261
|
+
},
|
|
254
262
|
defaultVariants: {
|
|
255
263
|
variant: 'default',
|
|
256
264
|
hue: 'gray',
|
package/src/recipes/text.ts
CHANGED
|
@@ -56,6 +56,18 @@ const textVariants = {
|
|
|
56
56
|
underline: {
|
|
57
57
|
true: {
|
|
58
58
|
textDecoration: 'underline',
|
|
59
|
+
textDecorationThickness: '[0.0625em]',
|
|
60
|
+
textUnderlineOffset: '[0.15625em]',
|
|
61
|
+
textDecorationSkipInk: 'all',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
dashedUnderline: {
|
|
65
|
+
true: {
|
|
66
|
+
textDecoration: 'underline',
|
|
67
|
+
textDecorationStyle: 'dashed',
|
|
68
|
+
textDecorationThickness: '[0.0625em]',
|
|
69
|
+
textUnderlineOffset: '[0.15625em]',
|
|
70
|
+
textDecorationSkipInk: 'all',
|
|
59
71
|
},
|
|
60
72
|
},
|
|
61
73
|
truncate: {
|
|
@@ -106,41 +118,47 @@ const linkBase = {
|
|
|
106
118
|
fontWeight: 'medium',
|
|
107
119
|
gap: '1',
|
|
108
120
|
color: 'link',
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
121
|
+
// A real text-decoration replaces the former linear-gradient background,
|
|
122
|
+
// so the underline follows descenders and respects skip-ink.
|
|
123
|
+
textDecoration: 'underline',
|
|
124
|
+
textDecorationThickness: '[0.0625em]',
|
|
125
|
+
textUnderlineOffset: '[0.15625em]',
|
|
126
|
+
textDecorationSkipInk: 'all',
|
|
127
|
+
textDecorationColor: '[color-mix(in srgb, currentColor 30%, transparent)]',
|
|
114
128
|
outlineWidth: '2',
|
|
115
129
|
outlineStyle: 'solid',
|
|
116
130
|
outlineColor: 'transparent',
|
|
117
131
|
outlineOffset: '1',
|
|
118
132
|
width: 'fit-content',
|
|
119
133
|
cursor: 'pointer',
|
|
134
|
+
transitionProperty: 'all',
|
|
135
|
+
transitionDuration: 'fast',
|
|
136
|
+
transitionTimingFunction: 'default',
|
|
120
137
|
_hover: {
|
|
121
|
-
color: 'link',
|
|
122
|
-
|
|
138
|
+
color: 'link.pressed',
|
|
139
|
+
textDecorationColor: 'current',
|
|
140
|
+
textDecorationThickness: '[0.125em]',
|
|
123
141
|
},
|
|
124
142
|
_focusVisible: {
|
|
125
143
|
borderRadius: '{sizes.4}',
|
|
126
144
|
outlineColor: 'border.focused',
|
|
127
145
|
},
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
146
|
+
// Link never passed a `_disabled` variant to the recipe, so the disabled
|
|
147
|
+
// styles below never rendered. As a base condition they match the real
|
|
148
|
+
// disabled state, including the aria-disabled Link already sets.
|
|
149
|
+
//
|
|
150
|
+
// Deliberately no colour change. globalStyle already fades anything disabled
|
|
151
|
+
// to 0.4 opacity, and text.disabled is itself a 29% alpha: together they
|
|
152
|
+
// render the label at roughly 1.2:1 against the page, which is invisible.
|
|
153
|
+
// The opacity alone carries the state, as it does in the Cetec DS.
|
|
135
154
|
_disabled: {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
color: 'text.disabled',
|
|
139
|
-
pointerEvents: 'none',
|
|
140
|
-
},
|
|
155
|
+
cursor: 'not-allowed',
|
|
156
|
+
pointerEvents: 'none',
|
|
141
157
|
},
|
|
142
158
|
};
|
|
143
159
|
|
|
160
|
+
const linkVariants = { ...textVariants };
|
|
161
|
+
|
|
144
162
|
const labelBase = {
|
|
145
163
|
fontSize: '{sizes.16}',
|
|
146
164
|
fontWeight: 'normal',
|