@frontile/theme 0.18.0-alpha.1 → 0.18.0-alpha.10
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/README.md +20 -22
- package/declarations/colors/config.d.ts +8 -32
- package/declarations/colors/palette-absolute.d.ts +2 -2
- package/declarations/colors/palette.d.ts +1 -1
- package/declarations/colors/types.d.ts +102 -151
- package/declarations/components/button.d.ts +13 -0
- package/declarations/components/dropdown.d.ts +2 -2
- package/declarations/components/forms/forms.d.ts +414 -23
- package/declarations/components/listbox.d.ts +5 -0
- package/declarations/components/popover.d.ts +2 -2
- package/declarations/components/progress-bar.d.ts +15 -0
- package/declarations/components/spinner.d.ts +5 -0
- package/declarations/plugin/default-config.d.ts +8 -32
- package/dist/colors.js +1 -1
- package/dist/config-CDp8PRHs.js +370 -0
- package/dist/config-CDp8PRHs.js.map +1 -0
- package/dist/{forms-legacy-B-L2HELt.js → forms-legacy-CgoY8bbm.js} +256 -170
- package/dist/forms-legacy-CgoY8bbm.js.map +1 -0
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/plugin.js +10 -6
- package/dist/plugin.js.map +1 -1
- package/dist/styles/font-faces.css +52 -8
- package/dist/styles/typography.css +213 -117
- package/package.json +8 -5
- package/public/fonts/domine-variable.woff2 +0 -0
- package/public/fonts/open-sans-italic-variable.woff2 +0 -0
- package/public/fonts/open-sans-variable.woff2 +0 -0
- package/public/fonts/source-code-pro-italic-variable.woff2 +0 -0
- package/public/fonts/source-code-pro-variable.woff2 +0 -0
- package/src/styles/font-faces.css +52 -8
- package/src/styles/typography.css +213 -117
- package/dist/config-4CswsBlg.js +0 -342
- package/dist/config-4CswsBlg.js.map +0 -1
- package/dist/config-B3XkEtHW.js +0 -377
- package/dist/config-B3XkEtHW.js.map +0 -1
- package/dist/config-BpWBpuzR.js +0 -335
- package/dist/config-BpWBpuzR.js.map +0 -1
- package/dist/config-Cle59Y4k.js +0 -523
- package/dist/config-Cle59Y4k.js.map +0 -1
- package/dist/config-D0EoeVzn.js +0 -388
- package/dist/config-D0EoeVzn.js.map +0 -1
- package/dist/config-DBAavoE2.js +0 -336
- package/dist/config-DBAavoE2.js.map +0 -1
- package/dist/config-Oysuq2Z9.js +0 -341
- package/dist/config-Oysuq2Z9.js.map +0 -1
- package/dist/config-PYki2g7N.js +0 -335
- package/dist/config-PYki2g7N.js.map +0 -1
- package/dist/forms-legacy-15iy0KmK.js +0 -1851
- package/dist/forms-legacy-15iy0KmK.js.map +0 -1
- package/dist/forms-legacy-B-L2HELt.js.map +0 -1
- package/dist/forms-legacy-BMIAioRi.js +0 -1807
- package/dist/forms-legacy-BMIAioRi.js.map +0 -1
- package/dist/forms-legacy-B_EygtyK.js +0 -1763
- package/dist/forms-legacy-B_EygtyK.js.map +0 -1
- package/dist/forms-legacy-Bg_UoLDR.js +0 -1763
- package/dist/forms-legacy-Bg_UoLDR.js.map +0 -1
- package/dist/forms-legacy-CVLZ-9BG.js +0 -1804
- package/dist/forms-legacy-CVLZ-9BG.js.map +0 -1
- package/dist/forms-legacy-CuFc3hcn.js +0 -1807
- package/dist/forms-legacy-CuFc3hcn.js.map +0 -1
- package/dist/forms-legacy-DiKImAli.js +0 -1809
- package/dist/forms-legacy-DiKImAli.js.map +0 -1
- package/dist/forms-legacy-edWQVbZP.js +0 -1809
- package/dist/forms-legacy-edWQVbZP.js.map +0 -1
- package/dist/semantic-DUv6Lpqq.js +0 -218
- package/dist/semantic-DUv6Lpqq.js.map +0 -1
- package/public/fonts/stix-two-text-italic-variable.woff2 +0 -0
- package/public/fonts/stix-two-text-variable.woff2 +0 -0
|
@@ -83,7 +83,7 @@ const avatar = tv({
|
|
|
83
83
|
slots: {
|
|
84
84
|
base: ['flex', 'relative', 'justify-center', 'items-center', 'box-border', 'overflow-hidden', 'align-middle', 'text-neutral-strong', 'z-0', 'bg-neutral-subtle', 'ring-1 ring-default ring-offset-1 ring-offset-background'],
|
|
85
85
|
img: 'size-full',
|
|
86
|
-
name: ['w-full', 'font-
|
|
86
|
+
name: ['w-full', 'font-label', 'text-center', 'text-inherit', 'absolute', 'top-1/2', 'left-1/2', '-translate-x-1/2', '-translate-y-1/2', 'select-none']
|
|
87
87
|
},
|
|
88
88
|
variants: {
|
|
89
89
|
shape: {
|
|
@@ -92,19 +92,19 @@ const avatar = tv({
|
|
|
92
92
|
},
|
|
93
93
|
size: {
|
|
94
94
|
xs: {
|
|
95
|
-
base: 'size-5 text-
|
|
95
|
+
base: 'size-5 text-label-2xs'
|
|
96
96
|
},
|
|
97
97
|
sm: {
|
|
98
|
-
base: 'size-6 text-
|
|
98
|
+
base: 'size-6 text-label-xs'
|
|
99
99
|
},
|
|
100
100
|
md: {
|
|
101
|
-
base: 'size-8 text-
|
|
101
|
+
base: 'size-8 text-label-sm'
|
|
102
102
|
},
|
|
103
103
|
lg: {
|
|
104
|
-
base: 'size-10 text-
|
|
104
|
+
base: 'size-10 text-label-md'
|
|
105
105
|
},
|
|
106
106
|
xl: {
|
|
107
|
-
base: 'size-12 text-
|
|
107
|
+
base: 'size-12 text-label-lg'
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
},
|
|
@@ -118,28 +118,32 @@ const focusVisibleRing = ['outline-hidden', 'focus-visible:z-10', 'focus-visible
|
|
|
118
118
|
const focusVisibleWithinRing = ['outline-hidden', 'has-focus-visible:z-10', 'has-focus-visible:ring-3', 'has-[:focus-visible]:ring-focus', 'has-focus-visible:ring-offset-2', 'has-[:focus-visible]:ring-offset-background'];
|
|
119
119
|
|
|
120
120
|
const baseButton = tv({
|
|
121
|
-
base: [
|
|
121
|
+
base: [
|
|
122
|
+
// strong text role (Open Sans bold); size variants set text-strong-* which
|
|
123
|
+
// carries the label size, weight, tracking, and line-height per the Facet spec
|
|
124
|
+
'inline-flex items-center justify-center', '[&_svg]:size-[1em]', 'font-header', 'border', 'border-transparent', 'disabled:cursor-not-allowed', 'disabled:bg-surface-overlay-soft', 'disabled:text-neutral', 'disabled:border-neutral-soft', ...focusVisibleRing],
|
|
122
125
|
variants: {
|
|
123
126
|
appearance: {
|
|
124
127
|
outlined: ''
|
|
125
128
|
},
|
|
126
129
|
intent: {
|
|
127
130
|
default: '',
|
|
128
|
-
primary: 'focus-visible:ring-
|
|
131
|
+
primary: 'focus-visible:ring-primary-soft',
|
|
129
132
|
accent: 'focus-visible:ring-accent-soft',
|
|
130
133
|
success: 'focus-visible:ring-success-soft',
|
|
131
134
|
warning: 'focus-visible:ring-warning-soft',
|
|
132
135
|
danger: 'focus-visible:ring-danger-soft'
|
|
133
136
|
},
|
|
134
137
|
size: {
|
|
135
|
-
xs: 'text-
|
|
136
|
-
sm: 'text-
|
|
137
|
-
md: 'text-lg
|
|
138
|
-
lg: 'text-xl
|
|
139
|
-
xl: 'text-
|
|
138
|
+
xs: 'text-strong-sm px-4 py-1 gap-1 rounded-full',
|
|
139
|
+
sm: 'text-strong-md px-5 py-1.5 gap-1 rounded-full',
|
|
140
|
+
md: 'text-strong-lg px-6 py-2 gap-1.5 rounded-full',
|
|
141
|
+
lg: 'text-strong-xl px-8 py-2.5 gap-1.5 rounded-full',
|
|
142
|
+
xl: 'text-strong-2xl px-10 py-3 gap-2 rounded-full',
|
|
143
|
+
'2xl': 'text-strong-3xl px-12 py-3.5 gap-2.5 rounded-full'
|
|
140
144
|
},
|
|
141
145
|
isInGroup: {
|
|
142
|
-
true: ['rounded-none first:rounded-
|
|
146
|
+
true: ['rounded-none first:rounded-s-full last:rounded-e-full', '[&:not(:first-child):not(:last-child)]:rounded-none', 'not-last-of-type:-me-px']
|
|
143
147
|
}
|
|
144
148
|
},
|
|
145
149
|
compoundVariants: [
|
|
@@ -147,27 +151,27 @@ const baseButton = tv({
|
|
|
147
151
|
{
|
|
148
152
|
appearance: 'outlined',
|
|
149
153
|
intent: 'default',
|
|
150
|
-
class: 'text-neutral-
|
|
154
|
+
class: 'text-neutral-bolder border-neutral-bolder hover:bg-neutral-subtle hover:border-neutral-bolder hover:text-neutral-bolder active:bg-neutral-muted active:border-neutral-strong active:text-neutral-strong'
|
|
151
155
|
}, {
|
|
152
156
|
appearance: 'outlined',
|
|
153
157
|
intent: 'primary',
|
|
154
|
-
class: 'text-
|
|
158
|
+
class: 'text-primary-strong border-primary hover:bg-primary-subtle hover:border-primary-soft hover:text-primary-bolder active:bg-primary-muted active:border-primary-firm active:text-primary-bolder'
|
|
155
159
|
}, {
|
|
156
160
|
appearance: 'outlined',
|
|
157
161
|
intent: 'accent',
|
|
158
|
-
class: 'text-accent-strong border-accent
|
|
162
|
+
class: 'text-accent-strong border-accent hover:bg-accent-subtle hover:border-accent-soft hover:text-accent-bolder active:bg-accent-muted active:border-accent-firm active:text-accent-bolder'
|
|
159
163
|
}, {
|
|
160
164
|
appearance: 'outlined',
|
|
161
165
|
intent: 'success',
|
|
162
|
-
class: 'text-success-strong border-success
|
|
166
|
+
class: 'text-success-strong border-success hover:bg-success-subtle hover:border-success-soft hover:text-success-bolder active:bg-success-muted active:border-success-firm active:text-success-bolder'
|
|
163
167
|
}, {
|
|
164
168
|
appearance: 'outlined',
|
|
165
169
|
intent: 'warning',
|
|
166
|
-
class: 'text-warning-strong border-warning
|
|
170
|
+
class: 'text-warning-strong border-warning hover:bg-warning-subtle hover:border-warning-soft hover:text-warning-bolder active:bg-warning-muted active:border-warning-firm active:text-warning-bolder'
|
|
167
171
|
}, {
|
|
168
172
|
appearance: 'outlined',
|
|
169
173
|
intent: 'danger',
|
|
170
|
-
class: 'text-danger-strong border-danger
|
|
174
|
+
class: 'text-danger-strong border-danger hover:bg-danger-subtle hover:border-danger-soft hover:text-danger-bolder active:bg-danger-muted active:border-danger-firm active:text-danger-bolder'
|
|
171
175
|
}],
|
|
172
176
|
defaultVariants: {
|
|
173
177
|
size: 'md',
|
|
@@ -180,6 +184,7 @@ const button = tv({
|
|
|
180
184
|
variants: {
|
|
181
185
|
appearance: {
|
|
182
186
|
default: 'shadow-elevation-2',
|
|
187
|
+
soft: '',
|
|
183
188
|
outlined: '',
|
|
184
189
|
minimal: '',
|
|
185
190
|
tonal: 'shadow-elevation-2',
|
|
@@ -188,82 +193,114 @@ const button = tv({
|
|
|
188
193
|
},
|
|
189
194
|
compoundVariants: [
|
|
190
195
|
// APPEARANCE: default (filled)
|
|
196
|
+
// Text color is fixed to the rest on-color for all states — only the
|
|
197
|
+
// background walks the interaction trio. Switching the on-color per
|
|
198
|
+
// state causes the label to flip white/black mid-interaction whenever
|
|
199
|
+
// a state's background crosses the contrast threshold (e.g. primary's
|
|
200
|
+
// hover step is lighter than its rest step in light mode).
|
|
191
201
|
{
|
|
192
202
|
appearance: 'default',
|
|
193
203
|
intent: 'default',
|
|
194
|
-
class: 'bg-neutral-
|
|
204
|
+
class: 'bg-neutral-bolder text-on-neutral-bolder hover:bg-neutral-bolder active:bg-neutral-strong'
|
|
195
205
|
}, {
|
|
196
206
|
appearance: 'default',
|
|
197
207
|
intent: 'primary',
|
|
198
|
-
class: 'bg-
|
|
208
|
+
class: 'bg-primary text-on-primary hover:bg-primary-soft active:bg-primary-firm'
|
|
199
209
|
}, {
|
|
200
210
|
appearance: 'default',
|
|
201
211
|
intent: 'accent',
|
|
202
|
-
class: 'bg-accent
|
|
212
|
+
class: 'bg-accent text-on-accent hover:bg-accent-soft active:bg-accent-firm'
|
|
203
213
|
}, {
|
|
204
214
|
appearance: 'default',
|
|
205
215
|
intent: 'success',
|
|
206
|
-
class: 'bg-success
|
|
216
|
+
class: 'bg-success text-on-success hover:bg-success-soft active:bg-success-firm'
|
|
207
217
|
}, {
|
|
208
218
|
appearance: 'default',
|
|
209
219
|
intent: 'warning',
|
|
210
|
-
class: 'bg-warning
|
|
220
|
+
class: 'bg-warning text-on-warning hover:bg-warning-soft active:bg-warning-firm'
|
|
211
221
|
}, {
|
|
212
222
|
appearance: 'default',
|
|
213
223
|
intent: 'danger',
|
|
214
|
-
class: 'bg-danger
|
|
224
|
+
class: 'bg-danger text-on-danger hover:bg-danger-soft active:bg-danger-firm'
|
|
225
|
+
},
|
|
226
|
+
// APPEARANCE: soft (tint fill + colored stroke)
|
|
227
|
+
{
|
|
228
|
+
appearance: 'soft',
|
|
229
|
+
intent: 'default',
|
|
230
|
+
class: 'bg-neutral-subtle border-neutral-bolder text-neutral-bolder hover:bg-neutral-muted hover:border-neutral-bolder hover:text-neutral-bolder active:bg-neutral-soft active:border-neutral-strong active:text-neutral-strong'
|
|
231
|
+
}, {
|
|
232
|
+
appearance: 'soft',
|
|
233
|
+
intent: 'primary',
|
|
234
|
+
class: 'bg-primary-subtle border-primary text-primary-strong hover:bg-primary-muted hover:border-primary-soft hover:text-primary-bolder active:bg-primary-soft active:border-primary-firm active:text-primary-bolder'
|
|
235
|
+
}, {
|
|
236
|
+
appearance: 'soft',
|
|
237
|
+
intent: 'accent',
|
|
238
|
+
class: 'bg-accent-subtle border-accent text-accent-strong hover:bg-accent-muted hover:border-accent-soft hover:text-accent-bolder active:bg-accent-soft active:border-accent-firm active:text-accent-bolder'
|
|
239
|
+
}, {
|
|
240
|
+
appearance: 'soft',
|
|
241
|
+
intent: 'success',
|
|
242
|
+
class: 'bg-success-subtle border-success text-success-strong hover:bg-success-muted hover:border-success-soft hover:text-success-bolder active:bg-success-soft active:border-success-firm active:text-success-bolder'
|
|
243
|
+
}, {
|
|
244
|
+
appearance: 'soft',
|
|
245
|
+
intent: 'warning',
|
|
246
|
+
class: 'bg-warning-subtle border-warning text-warning-strong hover:bg-warning-muted hover:border-warning-soft hover:text-warning-bolder active:bg-warning-soft active:border-warning-firm active:text-warning-bolder'
|
|
247
|
+
}, {
|
|
248
|
+
appearance: 'soft',
|
|
249
|
+
intent: 'danger',
|
|
250
|
+
class: 'bg-danger-subtle border-danger text-danger-strong hover:bg-danger-muted hover:border-danger-soft hover:text-danger-bolder active:bg-danger-soft active:border-danger-firm active:text-danger-bolder'
|
|
215
251
|
},
|
|
216
252
|
// APPEARANCE: minimal (ghost)
|
|
217
253
|
{
|
|
218
254
|
appearance: 'minimal',
|
|
219
255
|
intent: 'default',
|
|
220
|
-
class: 'text-neutral-
|
|
256
|
+
class: 'text-neutral-bolder hover:bg-neutral-subtle hover:text-neutral-bolder active:bg-neutral-muted active:text-neutral-strong'
|
|
221
257
|
}, {
|
|
222
258
|
appearance: 'minimal',
|
|
223
259
|
intent: 'primary',
|
|
224
|
-
class: 'text-
|
|
260
|
+
class: 'text-primary-strong hover:bg-primary-subtle hover:text-primary-bolder active:bg-primary-muted active:text-primary-bolder'
|
|
225
261
|
}, {
|
|
226
262
|
appearance: 'minimal',
|
|
227
263
|
intent: 'accent',
|
|
228
|
-
class: 'text-accent-strong hover:bg-accent-subtle active:bg-accent-muted active:text-accent-bolder'
|
|
264
|
+
class: 'text-accent-strong hover:bg-accent-subtle hover:text-accent-bolder active:bg-accent-muted active:text-accent-bolder'
|
|
229
265
|
}, {
|
|
230
266
|
appearance: 'minimal',
|
|
231
267
|
intent: 'success',
|
|
232
|
-
class: 'text-success-strong hover:bg-success-subtle active:bg-success-muted active:text-success-bolder'
|
|
268
|
+
class: 'text-success-strong hover:bg-success-subtle hover:text-success-bolder active:bg-success-muted active:text-success-bolder'
|
|
233
269
|
}, {
|
|
234
270
|
appearance: 'minimal',
|
|
235
271
|
intent: 'warning',
|
|
236
|
-
class: 'text-warning-strong hover:bg-warning-subtle active:bg-warning-muted active:text-warning-bolder'
|
|
272
|
+
class: 'text-warning-strong hover:bg-warning-subtle hover:text-warning-bolder active:bg-warning-muted active:text-warning-bolder'
|
|
237
273
|
}, {
|
|
238
274
|
appearance: 'minimal',
|
|
239
275
|
intent: 'danger',
|
|
240
|
-
class: 'text-danger-strong hover:bg-danger-subtle active:bg-danger-muted active:text-danger-bolder'
|
|
276
|
+
class: 'text-danger-strong hover:bg-danger-subtle hover:text-danger-bolder active:bg-danger-muted active:text-danger-bolder'
|
|
241
277
|
},
|
|
242
|
-
// APPEARANCE: tonal
|
|
278
|
+
// APPEARANCE: tonal — text stays fixed (on-tonal); only the tint
|
|
279
|
+
// background walks tonal → tint-hover → tint-pressed.
|
|
243
280
|
{
|
|
244
281
|
appearance: 'tonal',
|
|
245
282
|
intent: 'default',
|
|
246
|
-
class: 'bg-neutral-subtle text-neutral-
|
|
283
|
+
class: 'bg-neutral-subtle text-neutral-bolder hover:bg-neutral-muted active:bg-neutral-soft'
|
|
247
284
|
}, {
|
|
248
285
|
appearance: 'tonal',
|
|
249
286
|
intent: 'primary',
|
|
250
|
-
class: 'bg-
|
|
287
|
+
class: 'bg-primary-subtle text-primary-strong hover:bg-primary-muted active:bg-primary-soft'
|
|
251
288
|
}, {
|
|
252
289
|
appearance: 'tonal',
|
|
253
290
|
intent: 'accent',
|
|
254
|
-
class: 'bg-accent-subtle text-accent-strong hover:bg-accent-muted active:bg-accent-soft
|
|
291
|
+
class: 'bg-accent-subtle text-accent-strong hover:bg-accent-muted active:bg-accent-soft'
|
|
255
292
|
}, {
|
|
256
293
|
appearance: 'tonal',
|
|
257
294
|
intent: 'success',
|
|
258
|
-
class: 'bg-success-subtle text-success-strong hover:bg-success-muted active:bg-success-soft
|
|
295
|
+
class: 'bg-success-subtle text-success-strong hover:bg-success-muted active:bg-success-soft'
|
|
259
296
|
}, {
|
|
260
297
|
appearance: 'tonal',
|
|
261
298
|
intent: 'warning',
|
|
262
|
-
class: 'bg-warning-subtle text-warning-strong hover:bg-warning-muted active:bg-warning-soft
|
|
299
|
+
class: 'bg-warning-subtle text-warning-strong hover:bg-warning-muted active:bg-warning-soft'
|
|
263
300
|
}, {
|
|
264
301
|
appearance: 'tonal',
|
|
265
302
|
intent: 'danger',
|
|
266
|
-
class: 'bg-danger-subtle text-danger-strong hover:bg-danger-muted active:bg-danger-soft
|
|
303
|
+
class: 'bg-danger-subtle text-danger-strong hover:bg-danger-muted active:bg-danger-soft'
|
|
267
304
|
},
|
|
268
305
|
// APPEARANCE: custom
|
|
269
306
|
{
|
|
@@ -273,7 +310,7 @@ const button = tv({
|
|
|
273
310
|
}, {
|
|
274
311
|
appearance: 'custom',
|
|
275
312
|
intent: 'primary',
|
|
276
|
-
class: 'text-
|
|
313
|
+
class: 'text-primary-strong'
|
|
277
314
|
}, {
|
|
278
315
|
appearance: 'custom',
|
|
279
316
|
intent: 'accent',
|
|
@@ -308,32 +345,32 @@ const toggleButton = tv({
|
|
|
308
345
|
appearance: 'outlined',
|
|
309
346
|
intent: 'default',
|
|
310
347
|
isSelected: true,
|
|
311
|
-
class: 'bg-neutral-
|
|
348
|
+
class: 'bg-neutral-bolder text-on-neutral-bolder hover:bg-neutral-bolder'
|
|
312
349
|
}, {
|
|
313
350
|
appearance: 'outlined',
|
|
314
351
|
intent: 'primary',
|
|
315
352
|
isSelected: true,
|
|
316
|
-
class: 'bg-
|
|
353
|
+
class: 'bg-primary text-on-primary hover:bg-primary-soft'
|
|
317
354
|
}, {
|
|
318
355
|
appearance: 'outlined',
|
|
319
356
|
intent: 'accent',
|
|
320
357
|
isSelected: true,
|
|
321
|
-
class: 'bg-accent
|
|
358
|
+
class: 'bg-accent text-on-accent hover:bg-accent-soft'
|
|
322
359
|
}, {
|
|
323
360
|
appearance: 'outlined',
|
|
324
361
|
intent: 'success',
|
|
325
362
|
isSelected: true,
|
|
326
|
-
class: 'bg-success
|
|
363
|
+
class: 'bg-success text-on-success hover:bg-success-soft'
|
|
327
364
|
}, {
|
|
328
365
|
appearance: 'outlined',
|
|
329
366
|
intent: 'warning',
|
|
330
367
|
isSelected: true,
|
|
331
|
-
class: 'bg-warning
|
|
368
|
+
class: 'bg-warning text-on-warning hover:bg-warning-soft'
|
|
332
369
|
}, {
|
|
333
370
|
appearance: 'outlined',
|
|
334
371
|
intent: 'danger',
|
|
335
372
|
isSelected: true,
|
|
336
|
-
class: 'bg-danger
|
|
373
|
+
class: 'bg-danger text-on-danger hover:bg-danger-soft'
|
|
337
374
|
}]
|
|
338
375
|
});
|
|
339
376
|
const buttonGroup = tv({
|
|
@@ -342,8 +379,9 @@ const buttonGroup = tv({
|
|
|
342
379
|
|
|
343
380
|
const chip = tv({
|
|
344
381
|
slots: {
|
|
345
|
-
base: ['
|
|
346
|
-
|
|
382
|
+
base: ['disabled:cursor-not-allowed', 'disabled:opacity-40', 'whitespace-nowrap', 'inline-flex items-center justify-between box-border'],
|
|
383
|
+
// label text role (size set per size variant)
|
|
384
|
+
content: ['flex-1 text-inherit font-label'],
|
|
347
385
|
dot: ['w-2', 'h-2', 'ml-1', 'rounded-full'],
|
|
348
386
|
closeButton: ['p-0.5']
|
|
349
387
|
},
|
|
@@ -359,44 +397,44 @@ const chip = tv({
|
|
|
359
397
|
intent: {
|
|
360
398
|
default: {
|
|
361
399
|
dot: 'bg-neutral-strong',
|
|
362
|
-
closeButton: ['bg-neutral-muted', 'text-on-neutral
|
|
400
|
+
closeButton: ['bg-neutral-muted', 'text-on-neutral', 'hover:bg-neutral']
|
|
363
401
|
},
|
|
364
402
|
primary: {
|
|
365
|
-
dot: 'bg-
|
|
366
|
-
closeButton: ['bg-
|
|
403
|
+
dot: 'bg-primary',
|
|
404
|
+
closeButton: ['bg-primary-muted', 'text-on-primary', 'hover:bg-primary-firm', 'focus-visible:ring-primary-soft']
|
|
367
405
|
},
|
|
368
406
|
accent: {
|
|
369
|
-
dot: 'bg-accent
|
|
370
|
-
closeButton: ['bg-accent-muted', 'text-on-accent
|
|
407
|
+
dot: 'bg-accent',
|
|
408
|
+
closeButton: ['bg-accent-muted', 'text-on-accent', 'hover:bg-accent-firm', 'focus-visible:ring-accent-soft']
|
|
371
409
|
},
|
|
372
410
|
success: {
|
|
373
|
-
dot: 'bg-success
|
|
374
|
-
closeButton: ['bg-success-muted', 'text-on-success
|
|
411
|
+
dot: 'bg-success',
|
|
412
|
+
closeButton: ['bg-success-muted', 'text-on-success', 'hover:bg-success-firm', 'focus-visible:ring-success-soft']
|
|
375
413
|
},
|
|
376
414
|
warning: {
|
|
377
|
-
dot: 'bg-warning
|
|
378
|
-
closeButton: ['bg-warning-muted', 'text-on-warning
|
|
415
|
+
dot: 'bg-warning',
|
|
416
|
+
closeButton: ['bg-warning-muted', 'text-on-warning', 'hover:bg-warning-firm', 'focus-visible:ring-warning-soft']
|
|
379
417
|
},
|
|
380
418
|
danger: {
|
|
381
|
-
dot: 'bg-danger
|
|
382
|
-
closeButton: ['bg-danger-muted', 'text-on-danger
|
|
419
|
+
dot: 'bg-danger',
|
|
420
|
+
closeButton: ['bg-danger-muted', 'text-on-danger', 'hover:bg-danger-firm', 'focus-visible:ring-danger-soft']
|
|
383
421
|
}
|
|
384
422
|
},
|
|
385
423
|
size: {
|
|
386
424
|
sm: {
|
|
387
|
-
base: 'text-
|
|
425
|
+
base: 'text-label-2xs px-1 h-6',
|
|
388
426
|
content: 'px-1',
|
|
389
|
-
closeButton: 'text-
|
|
427
|
+
closeButton: 'text-label-2xs'
|
|
390
428
|
},
|
|
391
429
|
md: {
|
|
392
|
-
base: 'text-
|
|
430
|
+
base: 'text-label-xs px-1 h-7',
|
|
393
431
|
content: 'px-2',
|
|
394
|
-
closeButton: 'text-
|
|
432
|
+
closeButton: 'text-label-xs'
|
|
395
433
|
},
|
|
396
434
|
lg: {
|
|
397
|
-
base: 'text-
|
|
435
|
+
base: 'text-label-md px-2 h-8',
|
|
398
436
|
content: 'px-2',
|
|
399
|
-
closeButton: 'text-
|
|
437
|
+
closeButton: 'text-label-md'
|
|
400
438
|
}
|
|
401
439
|
},
|
|
402
440
|
radius: {
|
|
@@ -412,37 +450,37 @@ const chip = tv({
|
|
|
412
450
|
appearance: 'default',
|
|
413
451
|
intent: 'default',
|
|
414
452
|
class: {
|
|
415
|
-
base: 'bg-neutral-
|
|
453
|
+
base: 'bg-neutral-bolder text-on-neutral-bolder'
|
|
416
454
|
}
|
|
417
455
|
}, {
|
|
418
456
|
appearance: 'default',
|
|
419
457
|
intent: 'primary',
|
|
420
458
|
class: {
|
|
421
|
-
base: 'bg-
|
|
459
|
+
base: 'bg-primary text-on-primary'
|
|
422
460
|
}
|
|
423
461
|
}, {
|
|
424
462
|
appearance: 'default',
|
|
425
463
|
intent: 'accent',
|
|
426
464
|
class: {
|
|
427
|
-
base: 'bg-accent
|
|
465
|
+
base: 'bg-accent text-on-accent'
|
|
428
466
|
}
|
|
429
467
|
}, {
|
|
430
468
|
appearance: 'default',
|
|
431
469
|
intent: 'success',
|
|
432
470
|
class: {
|
|
433
|
-
base: 'bg-success
|
|
471
|
+
base: 'bg-success text-on-success'
|
|
434
472
|
}
|
|
435
473
|
}, {
|
|
436
474
|
appearance: 'default',
|
|
437
475
|
intent: 'warning',
|
|
438
476
|
class: {
|
|
439
|
-
base: 'bg-warning
|
|
477
|
+
base: 'bg-warning text-on-warning'
|
|
440
478
|
}
|
|
441
479
|
}, {
|
|
442
480
|
appearance: 'default',
|
|
443
481
|
intent: 'danger',
|
|
444
482
|
class: {
|
|
445
|
-
base: 'bg-danger
|
|
483
|
+
base: 'bg-danger text-on-danger'
|
|
446
484
|
}
|
|
447
485
|
},
|
|
448
486
|
// APPEARANCE: faded (tonal)
|
|
@@ -456,7 +494,7 @@ const chip = tv({
|
|
|
456
494
|
appearance: 'faded',
|
|
457
495
|
intent: 'primary',
|
|
458
496
|
class: {
|
|
459
|
-
base: 'text-
|
|
497
|
+
base: 'text-primary-strong bg-primary-subtle'
|
|
460
498
|
}
|
|
461
499
|
}, {
|
|
462
500
|
appearance: 'faded',
|
|
@@ -488,37 +526,37 @@ const chip = tv({
|
|
|
488
526
|
appearance: 'outlined',
|
|
489
527
|
intent: 'default',
|
|
490
528
|
class: {
|
|
491
|
-
base: 'text-neutral-strong border border-neutral
|
|
529
|
+
base: 'text-neutral-strong border border-neutral'
|
|
492
530
|
}
|
|
493
531
|
}, {
|
|
494
532
|
appearance: 'outlined',
|
|
495
533
|
intent: 'primary',
|
|
496
534
|
class: {
|
|
497
|
-
base: 'text-
|
|
535
|
+
base: 'text-primary-strong border border-primary'
|
|
498
536
|
}
|
|
499
537
|
}, {
|
|
500
538
|
appearance: 'outlined',
|
|
501
539
|
intent: 'accent',
|
|
502
540
|
class: {
|
|
503
|
-
base: 'text-accent-strong border border-accent
|
|
541
|
+
base: 'text-accent-strong border border-accent'
|
|
504
542
|
}
|
|
505
543
|
}, {
|
|
506
544
|
appearance: 'outlined',
|
|
507
545
|
intent: 'success',
|
|
508
546
|
class: {
|
|
509
|
-
base: 'text-success-strong border border-success
|
|
547
|
+
base: 'text-success-strong border border-success'
|
|
510
548
|
}
|
|
511
549
|
}, {
|
|
512
550
|
appearance: 'outlined',
|
|
513
551
|
intent: 'warning',
|
|
514
552
|
class: {
|
|
515
|
-
base: 'text-warning-strong border border-warning
|
|
553
|
+
base: 'text-warning-strong border border-warning'
|
|
516
554
|
}
|
|
517
555
|
}, {
|
|
518
556
|
appearance: 'outlined',
|
|
519
557
|
intent: 'danger',
|
|
520
558
|
class: {
|
|
521
|
-
base: 'text-danger-strong border border-danger
|
|
559
|
+
base: 'text-danger-strong border border-danger'
|
|
522
560
|
}
|
|
523
561
|
}],
|
|
524
562
|
defaultVariants: {
|
|
@@ -532,9 +570,9 @@ const chip = tv({
|
|
|
532
570
|
const progressBar = tv({
|
|
533
571
|
slots: {
|
|
534
572
|
base: ['overflow-hidden w-full bg-surface-overlay-soft'],
|
|
535
|
-
label: ['flex justify-between pb-1 gap-2
|
|
573
|
+
label: ['flex justify-between pb-1 gap-2 font-label text-label-sm'],
|
|
536
574
|
progress: [''],
|
|
537
|
-
description: ['text-neutral-
|
|
575
|
+
description: ['text-neutral font-body text-body-micro pb-1']
|
|
538
576
|
},
|
|
539
577
|
variants: {
|
|
540
578
|
isIndeterminate: {
|
|
@@ -547,7 +585,10 @@ const progressBar = tv({
|
|
|
547
585
|
progress: 'bg-neutral-strong'
|
|
548
586
|
},
|
|
549
587
|
primary: {
|
|
550
|
-
progress: 'bg-
|
|
588
|
+
progress: 'bg-primary-soft'
|
|
589
|
+
},
|
|
590
|
+
accent: {
|
|
591
|
+
progress: 'bg-accent-soft'
|
|
551
592
|
},
|
|
552
593
|
success: {
|
|
553
594
|
progress: 'bg-success-soft'
|
|
@@ -563,14 +604,14 @@ const progressBar = tv({
|
|
|
563
604
|
xs: {
|
|
564
605
|
base: 'h-1',
|
|
565
606
|
progress: 'h-1',
|
|
566
|
-
label: 'text-
|
|
567
|
-
description: 'text-
|
|
607
|
+
label: 'text-label-2xs',
|
|
608
|
+
description: 'text-body-micro'
|
|
568
609
|
},
|
|
569
610
|
sm: {
|
|
570
611
|
base: 'h-2',
|
|
571
612
|
progress: 'h-2',
|
|
572
|
-
label: 'text-
|
|
573
|
-
description: 'text-
|
|
613
|
+
label: 'text-label-xs',
|
|
614
|
+
description: 'text-body-2xs'
|
|
574
615
|
},
|
|
575
616
|
md: {
|
|
576
617
|
base: 'h-4',
|
|
@@ -579,8 +620,8 @@ const progressBar = tv({
|
|
|
579
620
|
lg: {
|
|
580
621
|
base: 'h-8',
|
|
581
622
|
progress: 'h-8',
|
|
582
|
-
label: 'text-
|
|
583
|
-
description: 'text-
|
|
623
|
+
label: 'text-label-md',
|
|
624
|
+
description: 'text-body-sm'
|
|
584
625
|
}
|
|
585
626
|
},
|
|
586
627
|
radius: {
|
|
@@ -642,10 +683,10 @@ const listboxItem = tv({
|
|
|
642
683
|
slots: {
|
|
643
684
|
base: ['flex', 'group', 'gap-2', 'items-center', 'justify-between', 'relative', 'px-2', 'py-1.5', 'w-full', 'h-full', 'box-border', 'rounded-sm', 'subpixel-antialiased', 'outline-hidden', 'cursor-pointer', 'tap-highlight-transparent'],
|
|
644
685
|
descriptionWrapper: 'w-full flex flex-col items-start justify-center',
|
|
645
|
-
label: 'flex-1
|
|
646
|
-
description: ['w-full', 'text-
|
|
686
|
+
label: 'flex-1 font-body text-body-2xs truncate',
|
|
687
|
+
description: ['w-full', 'font-body text-body-micro', 'text-neutral-firm', 'group-hover:text-current'],
|
|
647
688
|
selectedIcon: ['text-inherit', 'w-4', 'h-4', 'shrink-0'],
|
|
648
|
-
shortcut: ['px-1', 'py-0.5', 'rounded-sm', 'font-
|
|
689
|
+
shortcut: ['px-1', 'py-0.5', 'rounded-sm', 'font-label', 'text-neutral', 'text-label-2xs', 'border', 'border-neutral-soft', 'group-data-is-active:border-current']
|
|
649
690
|
},
|
|
650
691
|
variants: {
|
|
651
692
|
appearance: {
|
|
@@ -663,6 +704,7 @@ const listboxItem = tv({
|
|
|
663
704
|
default: {},
|
|
664
705
|
primary: {},
|
|
665
706
|
secondary: {},
|
|
707
|
+
accent: {},
|
|
666
708
|
success: {},
|
|
667
709
|
warning: {},
|
|
668
710
|
danger: {}
|
|
@@ -704,7 +746,13 @@ const listboxItem = tv({
|
|
|
704
746
|
appearance: 'default',
|
|
705
747
|
intent: 'primary',
|
|
706
748
|
class: {
|
|
707
|
-
base: ['data-is-active:bg-
|
|
749
|
+
base: ['data-is-active:bg-primary-soft', 'data-is-active:text-on-primary-soft']
|
|
750
|
+
}
|
|
751
|
+
}, {
|
|
752
|
+
appearance: 'default',
|
|
753
|
+
intent: 'accent',
|
|
754
|
+
class: {
|
|
755
|
+
base: ['data-is-active:bg-accent-soft', 'data-is-active:text-on-accent-soft']
|
|
708
756
|
}
|
|
709
757
|
}, {
|
|
710
758
|
appearance: 'default',
|
|
@@ -736,7 +784,14 @@ const listboxItem = tv({
|
|
|
736
784
|
intent: 'primary',
|
|
737
785
|
isActive: true,
|
|
738
786
|
class: {
|
|
739
|
-
shortcut: ['text-on-
|
|
787
|
+
shortcut: ['text-on-primary-soft', 'border-on-primary-soft/20']
|
|
788
|
+
}
|
|
789
|
+
}, {
|
|
790
|
+
appearance: 'default',
|
|
791
|
+
intent: 'accent',
|
|
792
|
+
isActive: true,
|
|
793
|
+
class: {
|
|
794
|
+
shortcut: ['text-on-accent-soft', 'border-on-accent-soft/20']
|
|
740
795
|
}
|
|
741
796
|
}, {
|
|
742
797
|
appearance: 'default',
|
|
@@ -765,13 +820,19 @@ const listboxItem = tv({
|
|
|
765
820
|
appearance: 'outlined',
|
|
766
821
|
intent: 'default',
|
|
767
822
|
class: {
|
|
768
|
-
base: ['data-is-active:border-neutral
|
|
823
|
+
base: ['data-is-active:border-neutral', 'data-is-active:text-neutral-strong']
|
|
769
824
|
}
|
|
770
825
|
}, {
|
|
771
826
|
appearance: 'outlined',
|
|
772
827
|
intent: 'primary',
|
|
773
828
|
class: {
|
|
774
|
-
base: ['data-is-active:border-
|
|
829
|
+
base: ['data-is-active:border-primary', 'data-is-active:text-primary-strong']
|
|
830
|
+
}
|
|
831
|
+
}, {
|
|
832
|
+
appearance: 'outlined',
|
|
833
|
+
intent: 'accent',
|
|
834
|
+
class: {
|
|
835
|
+
base: ['data-is-active:border-accent', 'data-is-active:text-accent-strong']
|
|
775
836
|
}
|
|
776
837
|
}, {
|
|
777
838
|
appearance: 'outlined',
|
|
@@ -797,13 +858,19 @@ const listboxItem = tv({
|
|
|
797
858
|
appearance: 'faded',
|
|
798
859
|
intent: 'default',
|
|
799
860
|
class: {
|
|
800
|
-
base: ['data-is-active:bg-neutral-soft/20', 'data-is-active:border-neutral
|
|
861
|
+
base: ['data-is-active:bg-neutral-soft/20', 'data-is-active:border-neutral', 'data-is-active:text-neutral-strong']
|
|
801
862
|
}
|
|
802
863
|
}, {
|
|
803
864
|
appearance: 'faded',
|
|
804
865
|
intent: 'primary',
|
|
805
866
|
class: {
|
|
806
|
-
base: ['data-is-active:bg-
|
|
867
|
+
base: ['data-is-active:bg-primary-soft/20', 'data-is-active:border-primary', 'data-is-active:text-primary-strong']
|
|
868
|
+
}
|
|
869
|
+
}, {
|
|
870
|
+
appearance: 'faded',
|
|
871
|
+
intent: 'accent',
|
|
872
|
+
class: {
|
|
873
|
+
base: ['data-is-active:bg-accent-soft/20', 'data-is-active:border-accent', 'data-is-active:text-accent-strong']
|
|
807
874
|
}
|
|
808
875
|
}, {
|
|
809
876
|
appearance: 'faded',
|
|
@@ -827,11 +894,11 @@ const listboxItem = tv({
|
|
|
827
894
|
});
|
|
828
895
|
|
|
829
896
|
const dropdownContent = tv({
|
|
830
|
-
base: 'bg-surface-
|
|
897
|
+
base: 'bg-surface-input w-[260px] rounded-sm border border-neutral-subtle'
|
|
831
898
|
});
|
|
832
899
|
|
|
833
900
|
const popover = tv({
|
|
834
|
-
base: 'bg-surface-
|
|
901
|
+
base: 'bg-surface-input rounded-sm border border-neutral-subtle',
|
|
835
902
|
variants: {
|
|
836
903
|
size: {
|
|
837
904
|
sm: 'w-40',
|
|
@@ -871,7 +938,8 @@ const spinner = tv({
|
|
|
871
938
|
},
|
|
872
939
|
intent: {
|
|
873
940
|
default: 'fill-neutral-strong',
|
|
874
|
-
primary: 'fill-
|
|
941
|
+
primary: 'fill-primary',
|
|
942
|
+
accent: 'fill-accent',
|
|
875
943
|
success: 'fill-success',
|
|
876
944
|
warning: 'fill-warning',
|
|
877
945
|
danger: 'fill-danger'
|
|
@@ -885,7 +953,7 @@ const spinner = tv({
|
|
|
885
953
|
|
|
886
954
|
const table = tv({
|
|
887
955
|
slots: {
|
|
888
|
-
base: ['w-full', 'caption-bottom', 'text-
|
|
956
|
+
base: ['w-full', 'caption-bottom', 'font-body text-body-2xs'],
|
|
889
957
|
wrapper: ['relative', 'isolate', 'overflow-auto', 'rounded-default', 'bg-surface-card'],
|
|
890
958
|
table: ['w-full', 'table-auto'],
|
|
891
959
|
thead: ['relative', 'bg-surface-overlay-subtle'],
|
|
@@ -893,8 +961,8 @@ const table = tv({
|
|
|
893
961
|
tfoot: ['relative'],
|
|
894
962
|
tr: ['data-[disabled=true]:opacity-50', 'data-[disabled=true]:cursor-not-allowed', 'data-[disabled=true]:hover:bg-transparent', 'data-[selectable=true]:focus-visible:ring-2', 'data-[selectable=true]:focus-visible:ring-inset', 'data-[selectable=true]:focus-visible:ring-default', 'data-[selectable=true]:focus-visible:z-10', 'transition-colors', 'duration-150', 'outline-hidden'],
|
|
895
963
|
separator: ['absolute', 'z-2', 'left-0', 'w-full', 'h-px', 'bg-surface-overlay-medium'],
|
|
896
|
-
th: ['h-12', 'px-4', 'text-left', 'align-middle', 'font-
|
|
897
|
-
sortButton: ['group/sort', 'inline-flex', 'items-center', 'gap-1', 'w-full', 'text-left', 'font-
|
|
964
|
+
th: ['h-12', 'px-4', 'text-left', 'align-middle', 'font-label', 'text-neutral-bolder', '[&:has([role=checkbox])]:pr-0', 'data-[sortable=true]:cursor-pointer'],
|
|
965
|
+
sortButton: ['group/sort', 'inline-flex', 'items-center', 'gap-1', 'w-full', 'text-left', 'font-label', 'text-neutral-bolder', 'outline-hidden', 'focus-visible:z-10', 'focus-visible:ring-3', 'focus-visible:ring-focus', 'focus-visible:ring-offset-2', 'focus-visible:ring-offset-background'],
|
|
898
966
|
sortIcon: ['size-4', 'flex-shrink-0', 'text-neutral-soft', 'transition-opacity', 'data-[sorted=false]:opacity-0', 'group-hover/sort:data-[sorted=false]:opacity-100', 'data-[sorted=true]:opacity-100'],
|
|
899
967
|
columnVisibilityButton: ['flex'],
|
|
900
968
|
columnVisibilityIcon: ['size-6'],
|
|
@@ -904,16 +972,16 @@ const table = tv({
|
|
|
904
972
|
variants: {
|
|
905
973
|
size: {
|
|
906
974
|
sm: {
|
|
907
|
-
th: 'h-10 px-3 py-2 text-
|
|
908
|
-
td: 'px-3 py-2 text-
|
|
975
|
+
th: 'h-10 px-3 py-2 text-label-2xs',
|
|
976
|
+
td: 'px-3 py-2 text-body-micro'
|
|
909
977
|
},
|
|
910
978
|
md: {
|
|
911
|
-
th: 'h-12 px-4 text-
|
|
912
|
-
td: 'p-4 text-
|
|
979
|
+
th: 'h-12 px-4 text-label-xs',
|
|
980
|
+
td: 'p-4 text-body-2xs'
|
|
913
981
|
},
|
|
914
982
|
lg: {
|
|
915
|
-
th: 'h-14 px-6 text-
|
|
916
|
-
td: 'p-6 text-
|
|
983
|
+
th: 'h-14 px-6 text-label-sm',
|
|
984
|
+
td: 'p-6 text-body-xs'
|
|
917
985
|
}
|
|
918
986
|
},
|
|
919
987
|
isLoading: {
|
|
@@ -1052,7 +1120,7 @@ const table = tv({
|
|
|
1052
1120
|
isLoading: true,
|
|
1053
1121
|
loadingColor: 'primary',
|
|
1054
1122
|
class: {
|
|
1055
|
-
thead: `after:bg-
|
|
1123
|
+
thead: `after:bg-primary`
|
|
1056
1124
|
}
|
|
1057
1125
|
}, {
|
|
1058
1126
|
isLoading: true,
|
|
@@ -1083,8 +1151,8 @@ const table = tv({
|
|
|
1083
1151
|
}, {
|
|
1084
1152
|
selectionColor: 'primary',
|
|
1085
1153
|
class: {
|
|
1086
|
-
tbody: '[&>tr]:data-[selected=true]:bg-
|
|
1087
|
-
tr: ['data-[selectable=true]:focus-visible:ring-
|
|
1154
|
+
tbody: '[&>tr]:data-[selected=true]:bg-primary-subtle',
|
|
1155
|
+
tr: ['data-[selectable=true]:focus-visible:ring-primary-soft']
|
|
1088
1156
|
}
|
|
1089
1157
|
}, {
|
|
1090
1158
|
selectionColor: 'success',
|
|
@@ -1133,10 +1201,10 @@ const notificationsContainer = tv({
|
|
|
1133
1201
|
const btn = ['transition transition-200', ...focusVisibleRing];
|
|
1134
1202
|
const notificationCard = tv({
|
|
1135
1203
|
slots: {
|
|
1136
|
-
base: 'py-3 px-4 overflow-hidden flex items-center justify-between relative min-h-16 text-
|
|
1204
|
+
base: 'py-3 px-4 overflow-hidden flex items-center justify-between relative min-h-16 font-body text-body-2xs rounded-sm shadow-sm transition-all transition-200 ease-in-out',
|
|
1137
1205
|
message: 'grow',
|
|
1138
1206
|
customActions: 'flex flex-nowrap',
|
|
1139
|
-
customActionButton: [...btn, 'first:ml-4 last:-mr-2 font-
|
|
1207
|
+
customActionButton: [...btn, 'first:ml-4 last:-mr-2 font-label text-label-xs py-1 px-2 rounded-sm hover:bg-surface-overlay-soft'],
|
|
1140
1208
|
closeButton: [...btn, 'inline-block p-2 ml-2 -mr-2 rounded-full hover:bg-surface-overlay-soft']
|
|
1141
1209
|
},
|
|
1142
1210
|
variants: {
|
|
@@ -1211,7 +1279,7 @@ const notificationTransitions = {
|
|
|
1211
1279
|
}
|
|
1212
1280
|
};
|
|
1213
1281
|
|
|
1214
|
-
const obscurer = `before:bg-linear-to-b before:to-surface-
|
|
1282
|
+
const obscurer = `before:bg-linear-to-b before:to-surface-modal before:from-surface-modal/75 before:absolute before:left-0 before:w-full before:h-4 before:-top-4 before:content-['_']`;
|
|
1215
1283
|
const overlay = tv({
|
|
1216
1284
|
base: 'will-change-transform overflow-auto',
|
|
1217
1285
|
variants: {
|
|
@@ -1229,8 +1297,8 @@ const backdrop = tv({
|
|
|
1229
1297
|
type: {
|
|
1230
1298
|
none: '',
|
|
1231
1299
|
transparent: '',
|
|
1232
|
-
blur: 'bg-surface-overlay-
|
|
1233
|
-
faded: 'bg-surface-overlay-
|
|
1300
|
+
blur: 'bg-surface-overlay-scrim backdrop-blur-sm',
|
|
1301
|
+
faded: 'bg-surface-overlay-scrim'
|
|
1234
1302
|
},
|
|
1235
1303
|
inPlace: {
|
|
1236
1304
|
true: 'absolute'
|
|
@@ -1239,9 +1307,9 @@ const backdrop = tv({
|
|
|
1239
1307
|
});
|
|
1240
1308
|
const modal = tv({
|
|
1241
1309
|
slots: {
|
|
1242
|
-
base: 'flex flex-col shrink-0 relative text-surface-
|
|
1310
|
+
base: 'flex flex-col shrink-0 relative text-on-surface-modal bg-surface-modal border border-surface-overlay-medium rounded-2xl my-24 w-full outline-hidden overflow-clip',
|
|
1243
1311
|
closeButton: 'absolute top-3 right-3',
|
|
1244
|
-
header: 'font-
|
|
1312
|
+
header: 'font-header text-header-lg px-6 pt-8 pb-2',
|
|
1245
1313
|
body: 'px-6 py-2 grow overflow-y-auto',
|
|
1246
1314
|
footer: 'flex justify-end items-center px-6 pt-6 pb-8 gap-4'
|
|
1247
1315
|
},
|
|
@@ -1261,11 +1329,11 @@ const modal = tv({
|
|
|
1261
1329
|
});
|
|
1262
1330
|
const drawer = tv({
|
|
1263
1331
|
slots: {
|
|
1264
|
-
base: 'flex flex-col absolute text-surface-
|
|
1332
|
+
base: 'flex flex-col absolute text-on-surface-modal bg-surface-modal border border-surface-overlay-medium rounded-2xl w-full h-full outline-hidden overflow-clip',
|
|
1265
1333
|
closeButton: 'absolute top-3 right-3',
|
|
1266
|
-
header: 'font-
|
|
1334
|
+
header: 'font-header text-header-lg text-center px-8 pt-10 pb-2',
|
|
1267
1335
|
body: 'px-8 py-4 grow overflow-y-auto',
|
|
1268
|
-
footer: `${obscurer} flex justify-end items-center relative border-t border-surface-overlay-medium bg-surface-
|
|
1336
|
+
footer: `${obscurer} flex justify-end items-center relative border-t border-surface-overlay-medium bg-surface-modal p-8 gap-4`
|
|
1269
1337
|
},
|
|
1270
1338
|
variants: {
|
|
1271
1339
|
size: {
|
|
@@ -1444,17 +1512,18 @@ const overlayTransitions = {
|
|
|
1444
1512
|
|
|
1445
1513
|
const label = tv({
|
|
1446
1514
|
slots: {
|
|
1447
|
-
|
|
1515
|
+
// label text role (Open Sans semibold, tight leading)
|
|
1516
|
+
base: 'text-neutral-bolder inline-block font-label text-label-sm pb-2',
|
|
1448
1517
|
asterisk: 'text-danger'
|
|
1449
1518
|
},
|
|
1450
1519
|
variants: {
|
|
1451
1520
|
size: {
|
|
1452
1521
|
sm: {
|
|
1453
|
-
base: 'text-
|
|
1522
|
+
base: 'text-label-2xs'
|
|
1454
1523
|
},
|
|
1455
1524
|
md: {},
|
|
1456
1525
|
lg: {
|
|
1457
|
-
base: 'text-
|
|
1526
|
+
base: 'text-label-md'
|
|
1458
1527
|
}
|
|
1459
1528
|
}
|
|
1460
1529
|
},
|
|
@@ -1463,12 +1532,13 @@ const label = tv({
|
|
|
1463
1532
|
}
|
|
1464
1533
|
});
|
|
1465
1534
|
const formDescription = tv({
|
|
1466
|
-
|
|
1535
|
+
// help/description text — body role
|
|
1536
|
+
base: 'text-neutral font-body text-body-micro pb-1 last:pb-0',
|
|
1467
1537
|
variants: {
|
|
1468
1538
|
size: {
|
|
1469
|
-
sm: 'text-
|
|
1539
|
+
sm: 'text-body-micro',
|
|
1470
1540
|
md: '',
|
|
1471
|
-
lg: 'text-
|
|
1541
|
+
lg: 'text-body-sm'
|
|
1472
1542
|
}
|
|
1473
1543
|
},
|
|
1474
1544
|
defaultVariants: {
|
|
@@ -1476,18 +1546,20 @@ const formDescription = tv({
|
|
|
1476
1546
|
}
|
|
1477
1547
|
});
|
|
1478
1548
|
const formFeedback = tv({
|
|
1479
|
-
|
|
1549
|
+
// validation/feedback text — body role
|
|
1550
|
+
base: 'font-body text-body-micro pt-1',
|
|
1480
1551
|
variants: {
|
|
1481
1552
|
intent: {
|
|
1482
|
-
primary: 'text-
|
|
1553
|
+
primary: 'text-primary',
|
|
1554
|
+
accent: 'text-accent',
|
|
1483
1555
|
success: 'text-success',
|
|
1484
1556
|
danger: 'text-danger',
|
|
1485
1557
|
warning: 'text-warning'
|
|
1486
1558
|
},
|
|
1487
1559
|
size: {
|
|
1488
|
-
sm: 'text-
|
|
1560
|
+
sm: 'text-body-micro',
|
|
1489
1561
|
md: '',
|
|
1490
|
-
lg: 'text-
|
|
1562
|
+
lg: 'text-body-sm'
|
|
1491
1563
|
}
|
|
1492
1564
|
},
|
|
1493
1565
|
defaultVariants: {
|
|
@@ -1500,7 +1572,9 @@ const input = tv({
|
|
|
1500
1572
|
innerContainer: 'relative flex',
|
|
1501
1573
|
startContent: 'absolute inset-y-0 left-0 flex items-center',
|
|
1502
1574
|
endContent: 'absolute inset-y-0 right-0 flex items-center',
|
|
1503
|
-
input: ['appearance-none', 'flex-1', 'w-full', 'bg-surface-
|
|
1575
|
+
input: ['appearance-none', 'flex-1', 'w-full', 'bg-surface-input', 'text-neutral-strong', 'placeholder-neutral',
|
|
1576
|
+
// body role family; single-line controls keep tight leading (not the body relaxed leading)
|
|
1577
|
+
'font-body text-base text-left', 'border', 'border-neutral-soft', 'rounded-xl', 'leading-tight', 'focus:ring-3', 'focus:ring-focus', 'focus:outline-hidden', 'focus:border-primary-soft', 'selection:bg-surface-overlay-soft', 'disabled:border-neutral-subtle disabled:text-neutral-soft', 'aria-invalid:border-danger-soft', 'aria-invalid:focus:ring-danger-soft']
|
|
1504
1578
|
},
|
|
1505
1579
|
variants: {
|
|
1506
1580
|
size: {
|
|
@@ -1567,20 +1641,20 @@ const textarea = tv({
|
|
|
1567
1641
|
const checkboxRadioBase = tv({
|
|
1568
1642
|
slots: {
|
|
1569
1643
|
base: ['max-w-fit flex items-center justify-start'],
|
|
1570
|
-
input: ['appearance-none', 'inline-block', 'align-middle', 'select-none', 'shrink-0', '
|
|
1644
|
+
input: ['appearance-none', 'inline-block', 'align-middle', 'select-none', 'shrink-0', 'text-base', 'border-2 border-neutral', 'bg-surface-input', 'transition-colors', 'checked:bg-origin-border checked:bg-center checked:bg-no-repeat', 'checked:disabled:bg-neutral-soft checked:disabled:border-neutral-soft', ...focusVisibleRing],
|
|
1571
1645
|
labelContainer: ['flex flex-col ml-2'],
|
|
1572
|
-
label: 'font-
|
|
1646
|
+
label: 'font-body text-body-xs pb-0'
|
|
1573
1647
|
},
|
|
1574
1648
|
variants: {
|
|
1575
1649
|
size: {
|
|
1576
1650
|
sm: {
|
|
1577
|
-
input: ''
|
|
1651
|
+
input: 'h-4 w-4'
|
|
1578
1652
|
},
|
|
1579
1653
|
md: {
|
|
1580
|
-
input: ''
|
|
1654
|
+
input: 'h-5 w-5'
|
|
1581
1655
|
},
|
|
1582
1656
|
lg: {
|
|
1583
|
-
input: ''
|
|
1657
|
+
input: 'h-6 w-6'
|
|
1584
1658
|
}
|
|
1585
1659
|
}
|
|
1586
1660
|
},
|
|
@@ -1605,21 +1679,15 @@ const checkboxRadioGroupBase = tv({
|
|
|
1605
1679
|
const checkbox = tv({
|
|
1606
1680
|
extend: checkboxRadioBase,
|
|
1607
1681
|
slots: {
|
|
1608
|
-
input: ['checked-bg-checkbox', 'indeterminate-bg-checkbox', 'rounded-
|
|
1682
|
+
input: ['checked-bg-checkbox', 'indeterminate-bg-checkbox', 'rounded-sm', 'checked:bg-primary checked:border-primary',
|
|
1609
1683
|
// Indeterminate state styles - show minus/dash icon
|
|
1610
|
-
'indeterminate:bg-
|
|
1684
|
+
'indeterminate:bg-primary', 'indeterminate:border-primary', 'indeterminate:bg-origin-border', 'indeterminate:bg-center', 'indeterminate:bg-no-repeat']
|
|
1611
1685
|
},
|
|
1612
1686
|
variants: {
|
|
1613
1687
|
size: {
|
|
1614
|
-
sm: {
|
|
1615
|
-
|
|
1616
|
-
}
|
|
1617
|
-
md: {
|
|
1618
|
-
input: ''
|
|
1619
|
-
},
|
|
1620
|
-
lg: {
|
|
1621
|
-
input: ''
|
|
1622
|
-
}
|
|
1688
|
+
sm: {},
|
|
1689
|
+
md: {},
|
|
1690
|
+
lg: {}
|
|
1623
1691
|
}
|
|
1624
1692
|
},
|
|
1625
1693
|
defaultVariants: {
|
|
@@ -1629,19 +1697,13 @@ const checkbox = tv({
|
|
|
1629
1697
|
const radio = tv({
|
|
1630
1698
|
extend: checkboxRadioBase,
|
|
1631
1699
|
slots: {
|
|
1632
|
-
input: ['checked-bg-radio', 'rounded-full']
|
|
1700
|
+
input: ['checked-bg-radio', 'rounded-full', 'checked:bg-primary checked:border-primary']
|
|
1633
1701
|
},
|
|
1634
1702
|
variants: {
|
|
1635
1703
|
size: {
|
|
1636
|
-
sm: {
|
|
1637
|
-
|
|
1638
|
-
}
|
|
1639
|
-
md: {
|
|
1640
|
-
input: ''
|
|
1641
|
-
},
|
|
1642
|
-
lg: {
|
|
1643
|
-
input: ''
|
|
1644
|
-
}
|
|
1704
|
+
sm: {},
|
|
1705
|
+
md: {},
|
|
1706
|
+
lg: {}
|
|
1645
1707
|
}
|
|
1646
1708
|
},
|
|
1647
1709
|
defaultVariants: {
|
|
@@ -1658,7 +1720,7 @@ const select = tv({
|
|
|
1658
1720
|
extend: input,
|
|
1659
1721
|
slots: {
|
|
1660
1722
|
base: [],
|
|
1661
|
-
placeholder: 'text-neutral
|
|
1723
|
+
placeholder: 'text-neutral',
|
|
1662
1724
|
listbox: 'scroll-py-6 max-h-64',
|
|
1663
1725
|
icon: 'w-5 h-5',
|
|
1664
1726
|
clearButton: 'pointer-events-auto',
|
|
@@ -1676,6 +1738,30 @@ const select = tv({
|
|
|
1676
1738
|
size: 'md'
|
|
1677
1739
|
}
|
|
1678
1740
|
});
|
|
1741
|
+
|
|
1742
|
+
// Note: extends `input` rather than `select` because tailwind-variants
|
|
1743
|
+
// loses inherited slot types across two levels of `extend`.
|
|
1744
|
+
const autocomplete = tv({
|
|
1745
|
+
extend: input,
|
|
1746
|
+
slots: {
|
|
1747
|
+
base: [],
|
|
1748
|
+
listbox: 'scroll-py-6 max-h-64',
|
|
1749
|
+
icon: 'w-5 h-5',
|
|
1750
|
+
clearButton: 'pointer-events-auto',
|
|
1751
|
+
input: 'cursor-text',
|
|
1752
|
+
emptyContent: 'p-2'
|
|
1753
|
+
},
|
|
1754
|
+
variants: {
|
|
1755
|
+
size: {
|
|
1756
|
+
sm: {},
|
|
1757
|
+
md: {},
|
|
1758
|
+
lg: {}
|
|
1759
|
+
}
|
|
1760
|
+
},
|
|
1761
|
+
defaultVariants: {
|
|
1762
|
+
size: 'md'
|
|
1763
|
+
}
|
|
1764
|
+
});
|
|
1679
1765
|
const nativeSelect = tv({
|
|
1680
1766
|
extend: input,
|
|
1681
1767
|
slots: {
|
|
@@ -1694,12 +1780,12 @@ const switchInput = tv({
|
|
|
1694
1780
|
slots: {
|
|
1695
1781
|
base: 'group relative max-w-fit inline-flex items-center justify-start',
|
|
1696
1782
|
labelContainer: 'flex flex-col ml-2',
|
|
1697
|
-
label: 'font-
|
|
1783
|
+
label: 'font-body text-body-xs pb-0',
|
|
1698
1784
|
wrapper: ['px-1', 'relative', 'inline-flex', 'items-center', 'justify-start', 'shrink-0', 'overflow-hidden', 'bg-neutral-soft', 'rounded-full', 'cursor-pointer touch-none tap-highlight-transparent select-none', 'transition-background', ...focusVisibleWithinRing],
|
|
1699
1785
|
hiddenInput: ['font-inherit', 'text-[100%]', 'leading-[1.15]', 'm-0', 'p-0', 'overflow-visible', 'box-border', 'absolute', 'top-0', 'w-full', 'h-full', 'opacity-[0.0001]', 'z-1', 'cursor-pointer', 'disabled:cursor-default'],
|
|
1700
1786
|
thumb: ['z-10', 'flex', 'items-center', 'justify-center', 'bg-white', 'shadow-small', 'rounded-full', 'origin-right', 'transition-all', 'pointer-events-none', 'text-black'],
|
|
1701
1787
|
startContent: ['z-0 absolute start-1.5 text-current', 'opacity-0', 'scale-50', 'transition-transform-opacity', 'group-data-[selected=true]:scale-100', 'group-data-[selected=true]:opacity-100'],
|
|
1702
|
-
endContent: ['z-0 absolute end-1.5 text-neutral
|
|
1788
|
+
endContent: ['z-0 absolute end-1.5 text-neutral', 'opacity-100', 'transition-transform-opacity', 'group-data-[selected=true]:translate-x-3', 'group-data-[selected=true]:opacity-0']
|
|
1703
1789
|
},
|
|
1704
1790
|
variants: {
|
|
1705
1791
|
isDisabled: {
|
|
@@ -1735,19 +1821,19 @@ const switchInput = tv({
|
|
|
1735
1821
|
wrapper: ['group-data-[selected=true]:bg-neutral-firm', 'group-data-[selected=true]:text-on-neutral-firm']
|
|
1736
1822
|
},
|
|
1737
1823
|
primary: {
|
|
1738
|
-
wrapper: ['group-data-[selected=true]:bg-
|
|
1824
|
+
wrapper: ['group-data-[selected=true]:bg-primary', 'group-data-[selected=true]:text-on-primary']
|
|
1739
1825
|
},
|
|
1740
1826
|
accent: {
|
|
1741
|
-
wrapper: ['group-data-[selected=true]:bg-accent
|
|
1827
|
+
wrapper: ['group-data-[selected=true]:bg-accent', 'group-data-[selected=true]:text-on-accent']
|
|
1742
1828
|
},
|
|
1743
1829
|
success: {
|
|
1744
|
-
wrapper: ['group-data-[selected=true]:bg-success
|
|
1830
|
+
wrapper: ['group-data-[selected=true]:bg-success', 'group-data-[selected=true]:text-on-success']
|
|
1745
1831
|
},
|
|
1746
1832
|
warning: {
|
|
1747
|
-
wrapper: ['group-data-[selected=true]:bg-warning
|
|
1833
|
+
wrapper: ['group-data-[selected=true]:bg-warning', 'group-data-[selected=true]:text-on-warning']
|
|
1748
1834
|
},
|
|
1749
1835
|
danger: {
|
|
1750
|
-
wrapper: ['group-data-[selected=true]:bg-danger
|
|
1836
|
+
wrapper: ['group-data-[selected=true]:bg-danger', 'group-data-[selected=true]:text-on-danger']
|
|
1751
1837
|
}
|
|
1752
1838
|
}
|
|
1753
1839
|
},
|
|
@@ -1763,13 +1849,13 @@ const base = tv({
|
|
|
1763
1849
|
base: 'flex flex-wrap flex-row items-center',
|
|
1764
1850
|
labelContainer: 'leading-tight flex items-start',
|
|
1765
1851
|
inputContainer: 'flex items-center',
|
|
1766
|
-
label: 'font-
|
|
1852
|
+
label: 'font-body text-body-xs pl-2 pb-0',
|
|
1767
1853
|
hint: 'pl-2 flex basis-full before:content-["_"] before:inline-block before:w-[1em] before:h-[1em] shrink-0'
|
|
1768
1854
|
},
|
|
1769
1855
|
variants: {
|
|
1770
1856
|
size: {
|
|
1771
1857
|
sm: {
|
|
1772
|
-
label: 'text-
|
|
1858
|
+
label: 'text-body-2xs'
|
|
1773
1859
|
},
|
|
1774
1860
|
md: '',
|
|
1775
1861
|
lg: ''
|
|
@@ -1877,5 +1963,5 @@ const formSelect = tv({
|
|
|
1877
1963
|
}
|
|
1878
1964
|
});
|
|
1879
1965
|
|
|
1880
|
-
export {
|
|
1881
|
-
//# sourceMappingURL=forms-legacy-
|
|
1966
|
+
export { nativeSelect as A, notificationCard as B, notificationTransitions as C, notificationsContainer as D, overlay as E, overlayTransitions as F, popover as G, progressBar as H, radio as I, radioGroup as J, select as K, spinner as L, switchInput as M, table as N, textarea as O, toggleButton as P, twMerge as Q, tv as R, autocomplete as a, avatar as b, backdrop as c, button as d, buttonGroup as e, checkbox as f, checkboxGroup as g, chip as h, closeButton as i, divider as j, drawer as k, dropdownContent as l, formCheckbox as m, formCheckboxGroup as n, formDescription as o, formFeedback as p, formInput as q, formRadio as r, formRadioGroup as s, formSelect as t, formTextarea as u, input as v, label as w, listbox as x, listboxItem as y, modal as z };
|
|
1967
|
+
//# sourceMappingURL=forms-legacy-CgoY8bbm.js.map
|