@frontile/theme 0.18.0-alpha.9 → 0.18.0-beta.1

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.
Files changed (65) hide show
  1. package/README.md +3 -2
  2. package/declarations/colors/config.d.ts +10 -4
  3. package/declarations/colors/semantic.d.ts +4 -0
  4. package/declarations/colors/types.d.ts +118 -13
  5. package/declarations/colors/util.d.ts +2 -1
  6. package/declarations/colors.d.ts +1 -0
  7. package/declarations/components/accordion.d.ts +308 -0
  8. package/declarations/components/alert.d.ts +294 -0
  9. package/declarations/components/avatar.d.ts +9 -7
  10. package/declarations/components/button.d.ts +118 -48
  11. package/declarations/components/calendar.d.ts +382 -0
  12. package/declarations/components/chip.d.ts +79 -42
  13. package/declarations/components/close-button.d.ts +9 -7
  14. package/declarations/components/command.d.ts +281 -0
  15. package/declarations/components/divider.d.ts +9 -7
  16. package/declarations/components/dropdown.d.ts +11 -9
  17. package/declarations/components/external-link.d.ts +160 -0
  18. package/declarations/components/forms/forms-legacy.d.ts +108 -84
  19. package/declarations/components/forms/forms.d.ts +652 -162
  20. package/declarations/components/index.d.ts +11 -0
  21. package/declarations/components/kbd.d.ts +315 -0
  22. package/declarations/components/listbox.d.ts +122 -23
  23. package/declarations/components/notification-card.d.ts +182 -111
  24. package/declarations/components/notifications-container.d.ts +111 -40
  25. package/declarations/components/overlays.d.ts +429 -29
  26. package/declarations/components/pagination.d.ts +359 -0
  27. package/declarations/components/popover.d.ts +11 -9
  28. package/declarations/components/progress-bar.d.ts +29 -12
  29. package/declarations/components/segmented-control.d.ts +463 -0
  30. package/declarations/components/shared.d.ts +9 -0
  31. package/declarations/components/skeleton.d.ts +151 -0
  32. package/declarations/components/spinner.d.ts +19 -12
  33. package/declarations/components/table.d.ts +20 -12
  34. package/declarations/components/tabs.d.ts +463 -0
  35. package/declarations/components/tooltip.d.ts +270 -0
  36. package/declarations/plugin/default-config.d.ts +10 -4
  37. package/declarations/tw.d.ts +9 -7
  38. package/declarations/types.d.ts +18 -1
  39. package/dist/colors.js +2 -1
  40. package/dist/colors.js.map +1 -1
  41. package/dist/index.js +3831 -5
  42. package/dist/index.js.map +1 -1
  43. package/dist/overlays-DIZlPzFH.js +654 -0
  44. package/dist/overlays-DIZlPzFH.js.map +1 -0
  45. package/dist/plugin.js +54 -83
  46. package/dist/plugin.js.map +1 -1
  47. package/dist/util-Dp_dlOPq.js +482 -0
  48. package/dist/util-Dp_dlOPq.js.map +1 -0
  49. package/package.json +12 -12
  50. package/src/index.css +64 -15
  51. package/src/styles/font-faces.css +23 -5
  52. package/src/styles/theme.css +18 -7
  53. package/src/styles/typography.css +36 -29
  54. package/declarations/colors/contrast.d.ts +0 -16
  55. package/declarations/colors/defaults.d.ts +0 -66
  56. package/declarations/colors/palette-dark.d.ts +0 -123
  57. package/declarations/colors/palette-light.d.ts +0 -123
  58. package/dist/config-CDp8PRHs.js +0 -370
  59. package/dist/config-CDp8PRHs.js.map +0 -1
  60. package/dist/forms-legacy-CgoY8bbm.js +0 -1967
  61. package/dist/forms-legacy-CgoY8bbm.js.map +0 -1
  62. package/dist/index.css +0 -63
  63. package/dist/styles/font-faces.css +0 -70
  64. package/dist/styles/theme.css +0 -48
  65. package/dist/styles/typography.css +0 -387
@@ -1,1967 +0,0 @@
1
- import { extendTailwindMerge } from 'tailwind-merge';
2
- import { createTV } from 'tailwind-variants';
3
-
4
- function flat(arr, target) {
5
- arr.forEach(el => {
6
- if (Array.isArray(el)) {
7
- flat(el, target);
8
- } else {
9
- target.push(el);
10
- }
11
- });
12
- }
13
- function flatArray(arr) {
14
- const flattened = [];
15
- flat(arr, flattened);
16
- return flattened;
17
- }
18
- const voidEmpty = value => value ? value : undefined;
19
- const clsx = (...classes) => {
20
- return voidEmpty(flatArray(classes).filter(Boolean).join(' '));
21
- };
22
-
23
- // Common size units used across all design tokens (icons, typography, etc.)
24
- const COMMON_UNITS = ['pico', 'nano', 'micro', '3xs', '2xs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', 'kilo', 'mega'];
25
- const ELEVATION_LEVELS = ['0', '1', '2', '3', '4', '5'];
26
- const twMergeConfig = {
27
- extend: {
28
- classGroups: {
29
- // Icon sizes
30
- 'icon-size': [{
31
- 'size-icon': COMMON_UNITS
32
- }],
33
- // Border widths (directional variants handled automatically)
34
- 'border-w': [{
35
- border: ['thin', 'heavy', 'aggressive']
36
- }],
37
- // Border radius (extend existing rounded utilities)
38
- rounded: [{
39
- rounded: ['default', 'pill']
40
- }],
41
- // Elevation shadows
42
- shadow: [{
43
- 'shadow-elevation': ELEVATION_LEVELS
44
- }],
45
- // Opacity
46
- opacity: [{
47
- opacity: ['hover', 'disabled']
48
- }],
49
- // Typography composite text styles (extend font-size class group)
50
- // These set font-size + other properties, so they should conflict with text-* utilities
51
- 'font-size': [{
52
- 'text-marquee': [...COMMON_UNITS]
53
- }, {
54
- 'text-header': [...COMMON_UNITS]
55
- }, {
56
- 'text-body': [...COMMON_UNITS]
57
- }, {
58
- 'text-code': [...COMMON_UNITS]
59
- }, {
60
- 'text-caption': [...COMMON_UNITS]
61
- }, {
62
- 'text-label': [...COMMON_UNITS]
63
- }]
64
- },
65
- conflictingClassGroups: {
66
- 'icon-size': ['w', 'h', 'size']
67
- }
68
- }
69
- };
70
- const twMergeBase = extendTailwindMerge(twMergeConfig);
71
- function twMerge(defaultClass, overwrites) {
72
- if (overwrites) {
73
- return twMergeBase(clsx(defaultClass, overwrites));
74
- }
75
- return clsx(defaultClass);
76
- }
77
- const tv = createTV({
78
- twMerge: true,
79
- twMergeConfig
80
- });
81
-
82
- const avatar = tv({
83
- slots: {
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
- img: 'size-full',
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
- },
88
- variants: {
89
- shape: {
90
- square: 'rounded-[20%]',
91
- circle: 'rounded-full'
92
- },
93
- size: {
94
- xs: {
95
- base: 'size-5 text-label-2xs'
96
- },
97
- sm: {
98
- base: 'size-6 text-label-xs'
99
- },
100
- md: {
101
- base: 'size-8 text-label-sm'
102
- },
103
- lg: {
104
- base: 'size-10 text-label-md'
105
- },
106
- xl: {
107
- base: 'size-12 text-label-lg'
108
- }
109
- }
110
- },
111
- defaultVariants: {
112
- size: 'md',
113
- shape: 'circle'
114
- }
115
- });
116
-
117
- const focusVisibleRing = ['outline-hidden', 'focus-visible:z-10', 'focus-visible:ring-3', 'focus-visible:ring-focus', 'focus-visible:ring-offset-2', 'focus-visible:ring-offset-background'];
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
-
120
- const baseButton = tv({
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],
125
- variants: {
126
- appearance: {
127
- outlined: ''
128
- },
129
- intent: {
130
- default: '',
131
- primary: 'focus-visible:ring-primary-soft',
132
- accent: 'focus-visible:ring-accent-soft',
133
- success: 'focus-visible:ring-success-soft',
134
- warning: 'focus-visible:ring-warning-soft',
135
- danger: 'focus-visible:ring-danger-soft'
136
- },
137
- size: {
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'
144
- },
145
- isInGroup: {
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']
147
- }
148
- },
149
- compoundVariants: [
150
- // APPEARANCE: outlined
151
- {
152
- appearance: 'outlined',
153
- intent: 'default',
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'
155
- }, {
156
- appearance: 'outlined',
157
- intent: 'primary',
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'
159
- }, {
160
- appearance: 'outlined',
161
- intent: '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'
163
- }, {
164
- appearance: 'outlined',
165
- intent: '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'
167
- }, {
168
- appearance: 'outlined',
169
- intent: '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'
171
- }, {
172
- appearance: 'outlined',
173
- intent: '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'
175
- }],
176
- defaultVariants: {
177
- size: 'md',
178
- intent: 'default'
179
- }
180
- });
181
- const button = tv({
182
- extend: baseButton,
183
- base: [''],
184
- variants: {
185
- appearance: {
186
- default: 'shadow-elevation-2',
187
- soft: '',
188
- outlined: '',
189
- minimal: '',
190
- tonal: 'shadow-elevation-2',
191
- custom: ''
192
- }
193
- },
194
- compoundVariants: [
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).
201
- {
202
- appearance: 'default',
203
- intent: 'default',
204
- class: 'bg-neutral-bolder text-on-neutral-bolder hover:bg-neutral-bolder active:bg-neutral-strong'
205
- }, {
206
- appearance: 'default',
207
- intent: 'primary',
208
- class: 'bg-primary text-on-primary hover:bg-primary-soft active:bg-primary-firm'
209
- }, {
210
- appearance: 'default',
211
- intent: 'accent',
212
- class: 'bg-accent text-on-accent hover:bg-accent-soft active:bg-accent-firm'
213
- }, {
214
- appearance: 'default',
215
- intent: 'success',
216
- class: 'bg-success text-on-success hover:bg-success-soft active:bg-success-firm'
217
- }, {
218
- appearance: 'default',
219
- intent: 'warning',
220
- class: 'bg-warning text-on-warning hover:bg-warning-soft active:bg-warning-firm'
221
- }, {
222
- appearance: 'default',
223
- intent: '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'
251
- },
252
- // APPEARANCE: minimal (ghost)
253
- {
254
- appearance: 'minimal',
255
- intent: 'default',
256
- class: 'text-neutral-bolder hover:bg-neutral-subtle hover:text-neutral-bolder active:bg-neutral-muted active:text-neutral-strong'
257
- }, {
258
- appearance: 'minimal',
259
- intent: 'primary',
260
- class: 'text-primary-strong hover:bg-primary-subtle hover:text-primary-bolder active:bg-primary-muted active:text-primary-bolder'
261
- }, {
262
- appearance: 'minimal',
263
- intent: 'accent',
264
- class: 'text-accent-strong hover:bg-accent-subtle hover:text-accent-bolder active:bg-accent-muted active:text-accent-bolder'
265
- }, {
266
- appearance: 'minimal',
267
- intent: 'success',
268
- class: 'text-success-strong hover:bg-success-subtle hover:text-success-bolder active:bg-success-muted active:text-success-bolder'
269
- }, {
270
- appearance: 'minimal',
271
- intent: 'warning',
272
- class: 'text-warning-strong hover:bg-warning-subtle hover:text-warning-bolder active:bg-warning-muted active:text-warning-bolder'
273
- }, {
274
- appearance: 'minimal',
275
- intent: 'danger',
276
- class: 'text-danger-strong hover:bg-danger-subtle hover:text-danger-bolder active:bg-danger-muted active:text-danger-bolder'
277
- },
278
- // APPEARANCE: tonal — text stays fixed (on-tonal); only the tint
279
- // background walks tonal → tint-hover → tint-pressed.
280
- {
281
- appearance: 'tonal',
282
- intent: 'default',
283
- class: 'bg-neutral-subtle text-neutral-bolder hover:bg-neutral-muted active:bg-neutral-soft'
284
- }, {
285
- appearance: 'tonal',
286
- intent: 'primary',
287
- class: 'bg-primary-subtle text-primary-strong hover:bg-primary-muted active:bg-primary-soft'
288
- }, {
289
- appearance: 'tonal',
290
- intent: 'accent',
291
- class: 'bg-accent-subtle text-accent-strong hover:bg-accent-muted active:bg-accent-soft'
292
- }, {
293
- appearance: 'tonal',
294
- intent: 'success',
295
- class: 'bg-success-subtle text-success-strong hover:bg-success-muted active:bg-success-soft'
296
- }, {
297
- appearance: 'tonal',
298
- intent: 'warning',
299
- class: 'bg-warning-subtle text-warning-strong hover:bg-warning-muted active:bg-warning-soft'
300
- }, {
301
- appearance: 'tonal',
302
- intent: 'danger',
303
- class: 'bg-danger-subtle text-danger-strong hover:bg-danger-muted active:bg-danger-soft'
304
- },
305
- // APPEARANCE: custom
306
- {
307
- appearance: 'custom',
308
- intent: 'default',
309
- class: 'text-neutral-strong'
310
- }, {
311
- appearance: 'custom',
312
- intent: 'primary',
313
- class: 'text-primary-strong'
314
- }, {
315
- appearance: 'custom',
316
- intent: 'accent',
317
- class: 'text-accent-strong'
318
- }, {
319
- appearance: 'custom',
320
- intent: 'success',
321
- class: 'text-success-strong'
322
- }, {
323
- appearance: 'custom',
324
- intent: 'warning',
325
- class: 'text-warning-strong'
326
- }, {
327
- appearance: 'custom',
328
- intent: 'danger',
329
- class: 'text-danger-strong'
330
- }],
331
- defaultVariants: {
332
- size: 'md',
333
- intent: 'primary'
334
- }
335
- });
336
- const toggleButton = tv({
337
- extend: baseButton,
338
- base: [''],
339
- variants: {
340
- isSelected: {
341
- true: ''
342
- }
343
- },
344
- compoundVariants: [{
345
- appearance: 'outlined',
346
- intent: 'default',
347
- isSelected: true,
348
- class: 'bg-neutral-bolder text-on-neutral-bolder hover:bg-neutral-bolder'
349
- }, {
350
- appearance: 'outlined',
351
- intent: 'primary',
352
- isSelected: true,
353
- class: 'bg-primary text-on-primary hover:bg-primary-soft'
354
- }, {
355
- appearance: 'outlined',
356
- intent: 'accent',
357
- isSelected: true,
358
- class: 'bg-accent text-on-accent hover:bg-accent-soft'
359
- }, {
360
- appearance: 'outlined',
361
- intent: 'success',
362
- isSelected: true,
363
- class: 'bg-success text-on-success hover:bg-success-soft'
364
- }, {
365
- appearance: 'outlined',
366
- intent: 'warning',
367
- isSelected: true,
368
- class: 'bg-warning text-on-warning hover:bg-warning-soft'
369
- }, {
370
- appearance: 'outlined',
371
- intent: 'danger',
372
- isSelected: true,
373
- class: 'bg-danger text-on-danger hover:bg-danger-soft'
374
- }]
375
- });
376
- const buttonGroup = tv({
377
- base: ['inline-flex items-center justify-center h-auto']
378
- });
379
-
380
- const chip = tv({
381
- slots: {
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'],
385
- dot: ['w-2', 'h-2', 'ml-1', 'rounded-full'],
386
- closeButton: ['p-0.5']
387
- },
388
- variants: {
389
- isDisabled: {
390
- true: 'opacity-40'
391
- },
392
- appearance: {
393
- default: '',
394
- outlined: '',
395
- faded: ''
396
- },
397
- intent: {
398
- default: {
399
- dot: 'bg-neutral-strong',
400
- closeButton: ['bg-neutral-muted', 'text-on-neutral', 'hover:bg-neutral']
401
- },
402
- primary: {
403
- dot: 'bg-primary',
404
- closeButton: ['bg-primary-muted', 'text-on-primary', 'hover:bg-primary-firm', 'focus-visible:ring-primary-soft']
405
- },
406
- accent: {
407
- dot: 'bg-accent',
408
- closeButton: ['bg-accent-muted', 'text-on-accent', 'hover:bg-accent-firm', 'focus-visible:ring-accent-soft']
409
- },
410
- success: {
411
- dot: 'bg-success',
412
- closeButton: ['bg-success-muted', 'text-on-success', 'hover:bg-success-firm', 'focus-visible:ring-success-soft']
413
- },
414
- warning: {
415
- dot: 'bg-warning',
416
- closeButton: ['bg-warning-muted', 'text-on-warning', 'hover:bg-warning-firm', 'focus-visible:ring-warning-soft']
417
- },
418
- danger: {
419
- dot: 'bg-danger',
420
- closeButton: ['bg-danger-muted', 'text-on-danger', 'hover:bg-danger-firm', 'focus-visible:ring-danger-soft']
421
- }
422
- },
423
- size: {
424
- sm: {
425
- base: 'text-label-2xs px-1 h-6',
426
- content: 'px-1',
427
- closeButton: 'text-label-2xs'
428
- },
429
- md: {
430
- base: 'text-label-xs px-1 h-7',
431
- content: 'px-2',
432
- closeButton: 'text-label-xs'
433
- },
434
- lg: {
435
- base: 'text-label-md px-2 h-8',
436
- content: 'px-2',
437
- closeButton: 'text-label-md'
438
- }
439
- },
440
- radius: {
441
- none: 'rounded-none',
442
- sm: 'rounded-sm',
443
- lg: 'rounded-lg',
444
- full: 'rounded-full'
445
- }
446
- },
447
- compoundVariants: [
448
- // APPEARANCE: default (filled)
449
- {
450
- appearance: 'default',
451
- intent: 'default',
452
- class: {
453
- base: 'bg-neutral-bolder text-on-neutral-bolder'
454
- }
455
- }, {
456
- appearance: 'default',
457
- intent: 'primary',
458
- class: {
459
- base: 'bg-primary text-on-primary'
460
- }
461
- }, {
462
- appearance: 'default',
463
- intent: 'accent',
464
- class: {
465
- base: 'bg-accent text-on-accent'
466
- }
467
- }, {
468
- appearance: 'default',
469
- intent: 'success',
470
- class: {
471
- base: 'bg-success text-on-success'
472
- }
473
- }, {
474
- appearance: 'default',
475
- intent: 'warning',
476
- class: {
477
- base: 'bg-warning text-on-warning'
478
- }
479
- }, {
480
- appearance: 'default',
481
- intent: 'danger',
482
- class: {
483
- base: 'bg-danger text-on-danger'
484
- }
485
- },
486
- // APPEARANCE: faded (tonal)
487
- {
488
- appearance: 'faded',
489
- intent: 'default',
490
- class: {
491
- base: 'text-neutral-strong bg-neutral-subtle'
492
- }
493
- }, {
494
- appearance: 'faded',
495
- intent: 'primary',
496
- class: {
497
- base: 'text-primary-strong bg-primary-subtle'
498
- }
499
- }, {
500
- appearance: 'faded',
501
- intent: 'accent',
502
- class: {
503
- base: 'text-accent-strong bg-accent-subtle'
504
- }
505
- }, {
506
- appearance: 'faded',
507
- intent: 'success',
508
- class: {
509
- base: 'text-success-strong bg-success-subtle'
510
- }
511
- }, {
512
- appearance: 'faded',
513
- intent: 'warning',
514
- class: {
515
- base: 'text-warning-strong bg-warning-subtle'
516
- }
517
- }, {
518
- appearance: 'faded',
519
- intent: 'danger',
520
- class: {
521
- base: 'text-danger-strong bg-danger-subtle'
522
- }
523
- },
524
- // APPEARANCE: outlined
525
- {
526
- appearance: 'outlined',
527
- intent: 'default',
528
- class: {
529
- base: 'text-neutral-strong border border-neutral'
530
- }
531
- }, {
532
- appearance: 'outlined',
533
- intent: 'primary',
534
- class: {
535
- base: 'text-primary-strong border border-primary'
536
- }
537
- }, {
538
- appearance: 'outlined',
539
- intent: 'accent',
540
- class: {
541
- base: 'text-accent-strong border border-accent'
542
- }
543
- }, {
544
- appearance: 'outlined',
545
- intent: 'success',
546
- class: {
547
- base: 'text-success-strong border border-success'
548
- }
549
- }, {
550
- appearance: 'outlined',
551
- intent: 'warning',
552
- class: {
553
- base: 'text-warning-strong border border-warning'
554
- }
555
- }, {
556
- appearance: 'outlined',
557
- intent: 'danger',
558
- class: {
559
- base: 'text-danger-strong border border-danger'
560
- }
561
- }],
562
- defaultVariants: {
563
- size: 'md',
564
- intent: 'default',
565
- appearance: 'default',
566
- radius: 'full'
567
- }
568
- });
569
-
570
- const progressBar = tv({
571
- slots: {
572
- base: ['overflow-hidden w-full bg-surface-overlay-soft'],
573
- label: ['flex justify-between pb-1 gap-2 font-label text-label-sm'],
574
- progress: [''],
575
- description: ['text-neutral font-body text-body-micro pb-1']
576
- },
577
- variants: {
578
- isIndeterminate: {
579
- true: {
580
- progress: ['animate-loading origin-left']
581
- }
582
- },
583
- intent: {
584
- default: {
585
- progress: 'bg-neutral-strong'
586
- },
587
- primary: {
588
- progress: 'bg-primary-soft'
589
- },
590
- accent: {
591
- progress: 'bg-accent-soft'
592
- },
593
- success: {
594
- progress: 'bg-success-soft'
595
- },
596
- warning: {
597
- progress: 'bg-warning-soft'
598
- },
599
- danger: {
600
- progress: 'bg-danger-soft'
601
- }
602
- },
603
- size: {
604
- xs: {
605
- base: 'h-1',
606
- progress: 'h-1',
607
- label: 'text-label-2xs',
608
- description: 'text-body-micro'
609
- },
610
- sm: {
611
- base: 'h-2',
612
- progress: 'h-2',
613
- label: 'text-label-xs',
614
- description: 'text-body-2xs'
615
- },
616
- md: {
617
- base: 'h-4',
618
- progress: 'h-4'
619
- },
620
- lg: {
621
- base: 'h-8',
622
- progress: 'h-8',
623
- label: 'text-label-md',
624
- description: 'text-body-sm'
625
- }
626
- },
627
- radius: {
628
- none: 'rounded-none',
629
- sm: 'rounded-sm',
630
- lg: 'rounded-lg',
631
- full: 'rounded-full'
632
- }
633
- },
634
- defaultVariants: {
635
- size: 'md',
636
- intent: 'default',
637
- radius: 'sm'
638
- }
639
- });
640
-
641
- const closeButton = tv({
642
- slots: {
643
- base: ['rounded-full transition transition-200 text-inherit', ...focusVisibleRing],
644
- icon: 'size-[1em]'
645
- },
646
- variants: {
647
- size: {
648
- xs: {
649
- base: 'text-sm p-1'
650
- },
651
- sm: {
652
- base: 'text-base p-2'
653
- },
654
- md: {
655
- base: 'text-xl p-2'
656
- },
657
- lg: {
658
- base: 'text-2xl p-3'
659
- },
660
- xl: {
661
- base: 'text-4xl p-3'
662
- }
663
- },
664
- variant: {
665
- transparent: {
666
- base: ['bg-transparent', 'hover:bg-surface-overlay-subtle']
667
- },
668
- subtle: {
669
- base: ['bg-neutral-subtle', 'text-on-neutral-subtle', 'hover:bg-surface-overlay-subtle']
670
- }
671
- }
672
- },
673
- defaultVariants: {
674
- size: 'md',
675
- variant: 'transparent'
676
- }
677
- });
678
-
679
- const listbox = tv({
680
- base: 'w-full flex flex-col gap-0.5 outline-hidden p-1'
681
- });
682
- const listboxItem = tv({
683
- slots: {
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'],
685
- descriptionWrapper: 'w-full flex flex-col items-start justify-center',
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'],
688
- selectedIcon: ['text-inherit', 'w-4', 'h-4', 'shrink-0'],
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']
690
- },
691
- variants: {
692
- appearance: {
693
- default: {
694
- base: ''
695
- },
696
- outlined: {
697
- base: 'border border-transparent bg-transparent'
698
- },
699
- faded: {
700
- base: ['border border-transparent']
701
- }
702
- },
703
- intent: {
704
- default: {},
705
- primary: {},
706
- secondary: {},
707
- accent: {},
708
- success: {},
709
- warning: {},
710
- danger: {}
711
- },
712
- isActive: {
713
- true: {
714
- base: []
715
- }
716
- },
717
- withDivider: {
718
- true: {
719
- base: ['mb-1.5']
720
- }
721
- },
722
- isDisabled: {
723
- true: {
724
- base: 'opacity-disabled pointer-events-none'
725
- }
726
- },
727
- isSelected: {
728
- true: {
729
- base: ''
730
- }
731
- }
732
- },
733
- defaultVariants: {
734
- appearance: 'default',
735
- intent: 'default'
736
- },
737
- compoundVariants: [
738
- // appearance: default
739
- {
740
- appearance: 'default',
741
- intent: 'default',
742
- class: {
743
- base: ['data-is-active:bg-neutral-subtle', 'data-is-active:text-neutral-strong']
744
- }
745
- }, {
746
- appearance: 'default',
747
- intent: 'primary',
748
- class: {
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']
756
- }
757
- }, {
758
- appearance: 'default',
759
- intent: 'success',
760
- class: {
761
- base: ['data-is-active:bg-success-soft', 'data-is-active:text-on-success-soft']
762
- }
763
- }, {
764
- appearance: 'default',
765
- intent: 'warning',
766
- class: {
767
- base: ['data-is-active:bg-warning-soft', 'data-is-active:text-on-warning-soft']
768
- }
769
- }, {
770
- appearance: 'default',
771
- intent: 'danger',
772
- class: {
773
- base: ['data-is-active:bg-danger-soft', 'data-is-active:text-on-danger-soft']
774
- }
775
- }, {
776
- appearance: 'default',
777
- intent: 'default',
778
- isActive: true,
779
- class: {
780
- shortcut: ['text-on-neutral', 'border-on-neutral/20']
781
- }
782
- }, {
783
- appearance: 'default',
784
- intent: 'primary',
785
- isActive: true,
786
- class: {
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']
795
- }
796
- }, {
797
- appearance: 'default',
798
- intent: 'success',
799
- isActive: true,
800
- class: {
801
- shortcut: ['text-on-success-soft', 'border-on-success-soft/20']
802
- }
803
- }, {
804
- appearance: 'default',
805
- intent: 'warning',
806
- isActive: true,
807
- class: {
808
- shortcut: ['text-on-warning-soft', 'border-on-warning-soft/20']
809
- }
810
- }, {
811
- appearance: 'default',
812
- intent: 'danger',
813
- isActive: true,
814
- class: {
815
- shortcut: ['text-on-danger-soft', 'border-on-danger-soft/20']
816
- }
817
- },
818
- // appearance: outlined
819
- {
820
- appearance: 'outlined',
821
- intent: 'default',
822
- class: {
823
- base: ['data-is-active:border-neutral', 'data-is-active:text-neutral-strong']
824
- }
825
- }, {
826
- appearance: 'outlined',
827
- intent: 'primary',
828
- class: {
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']
836
- }
837
- }, {
838
- appearance: 'outlined',
839
- intent: 'success',
840
- class: {
841
- base: ['data-is-active:border-success', 'data-is-active:text-success-strong']
842
- }
843
- }, {
844
- appearance: 'outlined',
845
- intent: 'warning',
846
- class: {
847
- base: ['data-is-active:border-warning', 'data-is-active:text-warning-strong']
848
- }
849
- }, {
850
- appearance: 'outlined',
851
- intent: 'danger',
852
- class: {
853
- base: ['data-is-active:border-danger', 'data-is-active:text-danger-strong']
854
- }
855
- },
856
- // appearance: faded
857
- {
858
- appearance: 'faded',
859
- intent: 'default',
860
- class: {
861
- base: ['data-is-active:bg-neutral-soft/20', 'data-is-active:border-neutral', 'data-is-active:text-neutral-strong']
862
- }
863
- }, {
864
- appearance: 'faded',
865
- intent: 'primary',
866
- class: {
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']
874
- }
875
- }, {
876
- appearance: 'faded',
877
- intent: 'success',
878
- class: {
879
- base: ['data-is-active:bg-success-soft/20', 'data-is-active:border-success', 'data-is-active:text-success-strong']
880
- }
881
- }, {
882
- appearance: 'faded',
883
- intent: 'warning',
884
- class: {
885
- base: ['data-is-active:bg-warning-soft/20', 'data-is-active:border-warning', 'data-is-active:text-warning-strong']
886
- }
887
- }, {
888
- appearance: 'faded',
889
- intent: 'danger',
890
- class: {
891
- base: ['data-is-active:bg-danger-soft/20', 'data-is-active:border-danger', 'data-is-active:text-danger-strong']
892
- }
893
- }]
894
- });
895
-
896
- const dropdownContent = tv({
897
- base: 'bg-surface-input w-[260px] rounded-sm border border-neutral-subtle'
898
- });
899
-
900
- const popover = tv({
901
- base: 'bg-surface-input rounded-sm border border-neutral-subtle',
902
- variants: {
903
- size: {
904
- sm: 'w-40',
905
- md: 'w-64',
906
- lg: 'w-96',
907
- xl: 'w-136',
908
- trigger: 'w-(--trigger-width)'
909
- }
910
- },
911
- defaultVariants: {
912
- size: 'md'
913
- }
914
- });
915
-
916
- const divider = tv({
917
- base: 'shrink-0 bg-neutral-subtle border-none',
918
- variants: {
919
- orientation: {
920
- horizontal: 'w-full h-px',
921
- vertical: 'h-full w-px'
922
- }
923
- },
924
- defaultVariants: {
925
- orientation: 'horizontal'
926
- }
927
- });
928
-
929
- const spinner = tv({
930
- base: 'text-neutral-muted animate-spin',
931
- variants: {
932
- size: {
933
- xs: 'w-4 h-4',
934
- sm: 'w-6 h-6,',
935
- md: 'w-8 h-8,',
936
- lg: 'w-10 h-10',
937
- xl: 'w-12 h-12'
938
- },
939
- intent: {
940
- default: 'fill-neutral-strong',
941
- primary: 'fill-primary',
942
- accent: 'fill-accent',
943
- success: 'fill-success',
944
- warning: 'fill-warning',
945
- danger: 'fill-danger'
946
- }
947
- },
948
- defaultVariants: {
949
- size: 'md',
950
- intent: 'default'
951
- }
952
- });
953
-
954
- const table = tv({
955
- slots: {
956
- base: ['w-full', 'caption-bottom', 'font-body text-body-2xs'],
957
- wrapper: ['relative', 'isolate', 'overflow-auto', 'rounded-default', 'bg-surface-card'],
958
- table: ['w-full', 'table-auto'],
959
- thead: ['relative', 'bg-surface-overlay-subtle'],
960
- tbody: ['divide-y', 'divide-surface-overlay-subtle', '[&>tr]:data-[selectable=true]:data-[selected=false]:hover:bg-neutral-subtle', '[&>tr]:data-[selectable=true]:transition-colors'],
961
- tfoot: ['relative'],
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'],
963
- separator: ['absolute', 'z-2', 'left-0', 'w-full', 'h-px', 'bg-surface-overlay-medium'],
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'],
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'],
967
- columnVisibilityButton: ['flex'],
968
- columnVisibilityIcon: ['size-6'],
969
- td: ['p-4', 'align-middle', 'text-neutral-strong', '[&:has([role=checkbox])]:pr-0'],
970
- empty: ['text-neutral-soft', 'align-middle', 'text-center', 'py-12']
971
- },
972
- variants: {
973
- size: {
974
- sm: {
975
- th: 'h-10 px-3 py-2 text-label-2xs',
976
- td: 'px-3 py-2 text-body-micro'
977
- },
978
- md: {
979
- th: 'h-12 px-4 text-label-xs',
980
- td: 'p-4 text-body-2xs'
981
- },
982
- lg: {
983
- th: 'h-14 px-6 text-label-sm',
984
- td: 'p-6 text-body-xs'
985
- }
986
- },
987
- isLoading: {
988
- true: {
989
- thead: ['after:absolute', 'after:top-full', 'after:left-0', 'after:w-1/2', 'after:animate-swing', 'after:h-px', 'after:z-10']
990
- }
991
- },
992
- loadingColor: {
993
- default: {},
994
- primary: {},
995
- success: {},
996
- warning: {},
997
- danger: {}
998
- },
999
- selectionColor: {
1000
- default: {},
1001
- primary: {},
1002
- success: {},
1003
- warning: {},
1004
- danger: {}
1005
- },
1006
- layout: {
1007
- auto: {
1008
- table: 'table-auto'
1009
- },
1010
- fixed: {
1011
- table: 'table-fixed'
1012
- }
1013
- },
1014
- striped: {
1015
- true: {
1016
- tbody: '[&_tr:nth-child(odd)]:bg-surface-overlay-subtle'
1017
- }
1018
- },
1019
- isSticky: {
1020
- true: {}
1021
- },
1022
- stickyPosition: {
1023
- left: {},
1024
- right: {},
1025
- top: {},
1026
- bottom: {}
1027
- },
1028
- isScrollable: {
1029
- true: {
1030
- wrapper: ['overflow-auto']
1031
- }
1032
- },
1033
- hasStickyHeader: {
1034
- true: {}
1035
- },
1036
- isInStickyRow: {
1037
- true: {}
1038
- }
1039
- },
1040
- compoundVariants: [
1041
- // Sticky header - highest priority for intersections with columns
1042
- {
1043
- isSticky: true,
1044
- stickyPosition: 'top',
1045
- class: {
1046
- thead: ['sticky', 'top-0', 'z-2', 'bg-surface-card']
1047
- }
1048
- },
1049
- // Sticky footer
1050
- {
1051
- isSticky: true,
1052
- stickyPosition: 'bottom',
1053
- class: {
1054
- tfoot: ['sticky', 'bottom-0', 'z-2', 'bg-surface-card']
1055
- }
1056
- },
1057
- // Sticky columns - medium priority, header cells get higher z-index
1058
- {
1059
- isSticky: true,
1060
- stickyPosition: 'left',
1061
- class: {
1062
- th: ['sticky', 'left-0', 'z-3', 'bg-surface-card', '[background-image:linear-gradient(var(--color-surface-overlay-subtle),var(--color-surface-overlay-subtle))]'],
1063
- td: ['sticky', 'left-0', 'z-1', 'bg-surface-card']
1064
- }
1065
- }, {
1066
- isSticky: true,
1067
- stickyPosition: 'right',
1068
- class: {
1069
- th: ['sticky', 'right-0', 'z-3', 'bg-surface-card', '[background-image:linear-gradient(var(--color-surface-overlay-subtle),var(--color-surface-overlay-subtle))]'],
1070
- td: ['sticky', 'right-0', 'z-1', 'bg-surface-card']
1071
- }
1072
- },
1073
- // Sticky rows - base layer
1074
- {
1075
- isSticky: true,
1076
- stickyPosition: 'top',
1077
- class: {
1078
- tr: ['sticky', 'top-0', 'z-1', 'bg-surface-card']
1079
- }
1080
- }, {
1081
- isSticky: true,
1082
- stickyPosition: 'bottom',
1083
- class: {
1084
- tr: ['sticky', 'bottom-0', 'z-1', 'bg-surface-card']
1085
- }
1086
- },
1087
- // Sticky rows with sticky header - position after header
1088
- {
1089
- isSticky: true,
1090
- stickyPosition: 'top',
1091
- hasStickyHeader: true,
1092
- class: {
1093
- tr: ['sticky', 'z-2', 'bg-surface-card', '[&.sticky]:[top:var(--table-header-height,48px)]']
1094
- }
1095
- },
1096
- // Intersection cells: sticky column + sticky row - highest z-index
1097
- {
1098
- isSticky: true,
1099
- stickyPosition: 'left',
1100
- isInStickyRow: true,
1101
- class: {
1102
- td: ['sticky', 'left-0', 'z-2', 'bg-surface-card']
1103
- }
1104
- }, {
1105
- isSticky: true,
1106
- stickyPosition: 'right',
1107
- isInStickyRow: true,
1108
- class: {
1109
- td: ['sticky', 'right-0', 'z-2', 'bg-surface-card']
1110
- }
1111
- },
1112
- // Loading states with color variants
1113
- {
1114
- isLoading: true,
1115
- loadingColor: 'default',
1116
- class: {
1117
- thead: `after:bg-neutral`
1118
- }
1119
- }, {
1120
- isLoading: true,
1121
- loadingColor: 'primary',
1122
- class: {
1123
- thead: `after:bg-primary`
1124
- }
1125
- }, {
1126
- isLoading: true,
1127
- loadingColor: 'success',
1128
- class: {
1129
- thead: `after:bg-success`
1130
- }
1131
- }, {
1132
- isLoading: true,
1133
- loadingColor: 'warning',
1134
- class: {
1135
- thead: `after:bg-warning`
1136
- }
1137
- }, {
1138
- isLoading: true,
1139
- loadingColor: 'danger',
1140
- class: {
1141
- thead: `after:bg-danger`
1142
- }
1143
- },
1144
- // Selection color variants
1145
- {
1146
- selectionColor: 'default',
1147
- class: {
1148
- tbody: '[&>tr]:data-[selected=true]:bg-neutral-subtle/50',
1149
- tr: ['data-[selectable=true]:focus-visible:ring-default']
1150
- }
1151
- }, {
1152
- selectionColor: 'primary',
1153
- class: {
1154
- tbody: '[&>tr]:data-[selected=true]:bg-primary-subtle',
1155
- tr: ['data-[selectable=true]:focus-visible:ring-primary-soft']
1156
- }
1157
- }, {
1158
- selectionColor: 'success',
1159
- class: {
1160
- tbody: '[&>tr]:data-[selected=true]:bg-success-subtle',
1161
- tr: ['data-[selectable=true]:focus-visible:ring-success']
1162
- }
1163
- }, {
1164
- selectionColor: 'warning',
1165
- class: {
1166
- tbody: '[&>tr]:data-[selected=true]:bg-warning-subtle',
1167
- tr: ['data-[selectable=true]:focus-visible:ring-warning']
1168
- }
1169
- }, {
1170
- selectionColor: 'danger',
1171
- class: {
1172
- tbody: '[&>tr]:data-[selected=true]:bg-danger-subtle',
1173
- tr: ['data-[selectable=true]:focus-visible:ring-danger']
1174
- }
1175
- }],
1176
- defaultVariants: {
1177
- size: 'md',
1178
- layout: 'auto',
1179
- loadingColor: 'default',
1180
- selectionColor: 'primary'
1181
- }
1182
- });
1183
-
1184
- const notificationsContainer = tv({
1185
- base: ['w-full', 'max-h-full', 'overflow-hidden', 'px-4', 'fixed', 'max-w-lg', 'z-1000'],
1186
- variants: {
1187
- placement: {
1188
- 'top-left': 'top-0 left-0',
1189
- 'top-center': 'top-0 left-2/4 translate-x-[-50%]',
1190
- 'top-right': 'top-0 right-0',
1191
- 'bottom-left': 'bottom-0 left-0',
1192
- 'bottom-center': 'bottom-0 left-2/4 translate-x-[-50%]',
1193
- 'bottom-right': 'bottom-0 right-0 '
1194
- }
1195
- },
1196
- defaultVariants: {
1197
- placement: 'bottom-right'
1198
- }
1199
- });
1200
-
1201
- const btn = ['transition transition-200', ...focusVisibleRing];
1202
- const notificationCard = tv({
1203
- slots: {
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',
1205
- message: 'grow',
1206
- customActions: 'flex flex-nowrap',
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'],
1208
- closeButton: [...btn, 'inline-block p-2 ml-2 -mr-2 rounded-full hover:bg-surface-overlay-soft']
1209
- },
1210
- variants: {
1211
- appearance: {
1212
- info: {
1213
- base: 'bg-neutral-firm text-on-neutral-firm'
1214
- },
1215
- success: {
1216
- base: 'bg-success-soft text-on-success-soft'
1217
- },
1218
- warning: {
1219
- base: 'bg-warning-soft text-on-warning-soft'
1220
- },
1221
- error: {
1222
- base: 'bg-danger-soft text-on-danger-soft'
1223
- }
1224
- }
1225
- },
1226
- defaultVariants: {
1227
- appearance: 'info'
1228
- }
1229
- });
1230
- const zoomOut = {
1231
- leaveTo: {
1232
- transform: 'scale(0.80)',
1233
- opacity: '0'
1234
- },
1235
- leave: {
1236
- transform: 'translate3d(0,0,0)'
1237
- }
1238
- };
1239
- const notificationEnteringFrom = {
1240
- right: {
1241
- transform: 'translate3d(125%, 0, 0)'
1242
- },
1243
- left: {
1244
- transform: 'translate3d(-125%, 0, 0)'
1245
- },
1246
- top: {
1247
- transform: 'translate3d(0, -125%, 0)'
1248
- },
1249
- bottom: {
1250
- transform: 'translate3d(0, 125%, 0)'
1251
- }
1252
- };
1253
- const notificationTransitions = {
1254
- slideFromTopLeft: {
1255
- ...zoomOut,
1256
- enter: {
1257
- ...notificationEnteringFrom.left
1258
- }
1259
- },
1260
- slideFromTopCenter: {
1261
- ...zoomOut,
1262
- enter: notificationEnteringFrom.top
1263
- },
1264
- slideFromTopRight: {
1265
- ...zoomOut,
1266
- enter: notificationEnteringFrom.right
1267
- },
1268
- slideFromBottomLeft: {
1269
- ...zoomOut,
1270
- enter: notificationEnteringFrom.left
1271
- },
1272
- slideFromBottomCenter: {
1273
- ...zoomOut,
1274
- enter: notificationEnteringFrom.bottom
1275
- },
1276
- slideFromBottomRight: {
1277
- ...zoomOut,
1278
- enter: notificationEnteringFrom.right
1279
- }
1280
- };
1281
-
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-['_']`;
1283
- const overlay = tv({
1284
- base: 'will-change-transform overflow-auto',
1285
- variants: {
1286
- enableFlexContent: {
1287
- true: 'flex items-center fixed inset-0 flex-col'
1288
- },
1289
- inPlace: {
1290
- true: 'absolute'
1291
- }
1292
- }
1293
- });
1294
- const backdrop = tv({
1295
- base: 'fixed inset-0 select-none',
1296
- variants: {
1297
- type: {
1298
- none: '',
1299
- transparent: '',
1300
- blur: 'bg-surface-overlay-scrim backdrop-blur-sm',
1301
- faded: 'bg-surface-overlay-scrim'
1302
- },
1303
- inPlace: {
1304
- true: 'absolute'
1305
- }
1306
- }
1307
- });
1308
- const modal = tv({
1309
- slots: {
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',
1311
- closeButton: 'absolute top-3 right-3',
1312
- header: 'font-header text-header-lg px-6 pt-8 pb-2',
1313
- body: 'px-6 py-2 grow overflow-y-auto',
1314
- footer: 'flex justify-end items-center px-6 pt-6 pb-8 gap-4'
1315
- },
1316
- variants: {
1317
- size: {
1318
- xs: 'modal--xs',
1319
- sm: 'modal--sm',
1320
- md: 'modal--md',
1321
- lg: 'modal--lg',
1322
- xl: 'modal--xl',
1323
- full: 'modal--full'
1324
- },
1325
- isCentered: {
1326
- true: 'my-auto'
1327
- }
1328
- }
1329
- });
1330
- const drawer = tv({
1331
- slots: {
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',
1333
- closeButton: 'absolute top-3 right-3',
1334
- header: 'font-header text-header-lg text-center px-8 pt-10 pb-2',
1335
- body: 'px-8 py-4 grow overflow-y-auto',
1336
- footer: `${obscurer} flex justify-end items-center relative border-t border-surface-overlay-medium bg-surface-modal p-8 gap-4`
1337
- },
1338
- variants: {
1339
- size: {
1340
- xs: '',
1341
- sm: '',
1342
- md: '',
1343
- lg: '',
1344
- xl: '',
1345
- full: ''
1346
- },
1347
- placement: {
1348
- top: 'top-0 right-0 left-0',
1349
- bottom: 'bottom-0 right-0 left-0',
1350
- left: 'top-0 bottom-0 left-0',
1351
- right: 'top-0 bottom-0 right-0'
1352
- }
1353
- },
1354
- compoundVariants: [
1355
- // vertical
1356
- {
1357
- placement: ['top', 'bottom'],
1358
- size: 'xs',
1359
- class: 'drawer--vertical-xs'
1360
- }, {
1361
- placement: ['top', 'bottom'],
1362
- size: 'sm',
1363
- class: 'drawer--vertical-sm'
1364
- }, {
1365
- placement: ['top', 'bottom'],
1366
- size: 'md',
1367
- class: 'drawer--vertical-md'
1368
- }, {
1369
- placement: ['top', 'bottom'],
1370
- size: 'lg',
1371
- class: 'drawer--vertical-lg'
1372
- }, {
1373
- placement: ['top', 'bottom'],
1374
- size: 'xl',
1375
- class: 'drawer--vertical-xl'
1376
- }, {
1377
- placement: ['top', 'bottom'],
1378
- size: 'full',
1379
- class: 'drawer--vertical-full'
1380
- },
1381
- // horizontal
1382
- {
1383
- placement: ['right', 'left'],
1384
- size: 'xs',
1385
- class: 'drawer--horizontal-xs'
1386
- }, {
1387
- placement: ['right', 'left'],
1388
- size: 'sm',
1389
- class: 'drawer--horizontal-sm'
1390
- }, {
1391
- placement: ['right', 'left'],
1392
- size: 'md',
1393
- class: 'drawer--horizontal-md'
1394
- }, {
1395
- placement: ['right', 'left'],
1396
- size: 'lg',
1397
- class: 'drawer--horizontal-lg'
1398
- }, {
1399
- placement: ['right', 'left'],
1400
- size: 'xl',
1401
- class: 'drawer--horizontal-xl'
1402
- }, {
1403
- placement: ['right', 'left'],
1404
- size: 'full',
1405
- class: 'drawer--horizontal-full'
1406
- }]
1407
- });
1408
- const slideTransition = {
1409
- enterActive: {
1410
- transition: 'transform 0.2s cubic-bezier(0.37, 0, 0.63, 1)'
1411
- },
1412
- leaveActive: {
1413
- transition: 'transform 0.2s cubic-bezier(0.37, 0, 0.63, 1)'
1414
- }
1415
- };
1416
- const overlayTransitions = {
1417
- fade: {
1418
- enter: {
1419
- opacity: '0'
1420
- },
1421
- enterActive: {
1422
- transition: 'opacity 0.2s linear'
1423
- },
1424
- leave: {
1425
- opacity: '1'
1426
- },
1427
- leaveActive: {
1428
- transition: 'opacity 0.2s linear'
1429
- }
1430
- },
1431
- zoom: {
1432
- enter: {
1433
- opacity: '0',
1434
- transform: 'scale(0.8)'
1435
- },
1436
- enterActive: {
1437
- transition: 'all 0.2s ease-in-out'
1438
- },
1439
- leave: {
1440
- opacity: '1',
1441
- transform: 'scale(1)'
1442
- },
1443
- leaveActive: {
1444
- transition: 'all 0.2s ease-in-out'
1445
- }
1446
- },
1447
- slideFromLeft: {
1448
- enter: {
1449
- transform: 'translateX(-100%)'
1450
- },
1451
- leave: {
1452
- transform: 'translateX(0%)'
1453
- },
1454
- ...slideTransition
1455
- },
1456
- slideFromRight: {
1457
- enter: {
1458
- transform: 'translateX(100%)'
1459
- },
1460
- leave: {
1461
- transform: 'translateX(0%)'
1462
- },
1463
- ...slideTransition
1464
- },
1465
- slideFromTop: {
1466
- enter: {
1467
- transform: 'translateY(-100%)'
1468
- },
1469
- leave: {
1470
- transform: 'translateY(0%)'
1471
- },
1472
- ...slideTransition
1473
- },
1474
- slideFromBottom: {
1475
- enter: {
1476
- transform: 'translateY(100%)'
1477
- },
1478
- leave: {
1479
- transform: 'translateY(0%)'
1480
- },
1481
- ...slideTransition
1482
- },
1483
- scale: {
1484
- enter: {
1485
- opacity: '0',
1486
- transform: 'scale(0.95)'
1487
- },
1488
- enterActive: {
1489
- transitionProperty: 'transform, opacity',
1490
- transitionDuration: '200ms',
1491
- transitionTimingFunction: 'cubic-bezier(0, 0, 0.2, 1)'
1492
- },
1493
- enterTo: {
1494
- opacity: '1',
1495
- transform: 'translate(scaleX(1) scaleY(1))'
1496
- },
1497
- leave: {
1498
- opacity: '1',
1499
- transform: 'translate(scaleX(1) scaleY(1))'
1500
- },
1501
- leaveActive: {
1502
- transitionProperty: 'transform, opacity',
1503
- transitionDuration: '100ms',
1504
- transitionTimingFunction: 'cubic-bezier(0.4, 0, 1, 1)'
1505
- },
1506
- leaveTo: {
1507
- opacity: '0',
1508
- transform: 'scale(0.95)'
1509
- }
1510
- }
1511
- };
1512
-
1513
- const label = tv({
1514
- slots: {
1515
- // label text role (Open Sans semibold, tight leading)
1516
- base: 'text-neutral-bolder inline-block font-label text-label-sm pb-2',
1517
- asterisk: 'text-danger'
1518
- },
1519
- variants: {
1520
- size: {
1521
- sm: {
1522
- base: 'text-label-2xs'
1523
- },
1524
- md: {},
1525
- lg: {
1526
- base: 'text-label-md'
1527
- }
1528
- }
1529
- },
1530
- defaultVariants: {
1531
- size: 'md'
1532
- }
1533
- });
1534
- const formDescription = tv({
1535
- // help/description text — body role
1536
- base: 'text-neutral font-body text-body-micro pb-1 last:pb-0',
1537
- variants: {
1538
- size: {
1539
- sm: 'text-body-micro',
1540
- md: '',
1541
- lg: 'text-body-sm'
1542
- }
1543
- },
1544
- defaultVariants: {
1545
- size: 'md'
1546
- }
1547
- });
1548
- const formFeedback = tv({
1549
- // validation/feedback text — body role
1550
- base: 'font-body text-body-micro pt-1',
1551
- variants: {
1552
- intent: {
1553
- primary: 'text-primary',
1554
- accent: 'text-accent',
1555
- success: 'text-success',
1556
- danger: 'text-danger',
1557
- warning: 'text-warning'
1558
- },
1559
- size: {
1560
- sm: 'text-body-micro',
1561
- md: '',
1562
- lg: 'text-body-sm'
1563
- }
1564
- },
1565
- defaultVariants: {
1566
- size: 'sm'
1567
- }
1568
- });
1569
- const input = tv({
1570
- slots: {
1571
- base: '',
1572
- innerContainer: 'relative flex',
1573
- startContent: 'absolute inset-y-0 left-0 flex items-center',
1574
- endContent: 'absolute inset-y-0 right-0 flex items-center',
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']
1578
- },
1579
- variants: {
1580
- size: {
1581
- sm: {
1582
- input: 'p-2',
1583
- startContent: 'pl-2',
1584
- endContent: 'pr-2'
1585
- },
1586
- md: {
1587
- input: 'p-3',
1588
- startContent: 'pl-3',
1589
- endContent: 'pr-3'
1590
- },
1591
- lg: {
1592
- input: 'p-4',
1593
- startContent: 'pl-4',
1594
- endContent: 'pr-4'
1595
- }
1596
- },
1597
- hasStartContent: {
1598
- true: {
1599
- input: 'ps-8'
1600
- }
1601
- },
1602
- hasEndContent: {
1603
- true: {
1604
- input: 'pe-10'
1605
- }
1606
- },
1607
- startContentPointerEvents: {
1608
- auto: {
1609
- startContent: 'pointer-events-auto'
1610
- },
1611
- none: {
1612
- startContent: 'pointer-events-none'
1613
- }
1614
- },
1615
- endContentPointerEvents: {
1616
- auto: {
1617
- endContent: 'pointer-events-auto'
1618
- },
1619
- none: {
1620
- endContent: 'pointer-events-none'
1621
- }
1622
- }
1623
- },
1624
- defaultVariants: {
1625
- size: 'md'
1626
- }
1627
- });
1628
- const textarea = tv({
1629
- extend: input,
1630
- slots: {
1631
- input: 'min-h-24'
1632
- },
1633
- variants: {
1634
- size: {
1635
- sm: {},
1636
- md: {},
1637
- lg: {}
1638
- }
1639
- }
1640
- });
1641
- const checkboxRadioBase = tv({
1642
- slots: {
1643
- base: ['max-w-fit flex items-center justify-start'],
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],
1645
- labelContainer: ['flex flex-col ml-2'],
1646
- label: 'font-body text-body-xs pb-0'
1647
- },
1648
- variants: {
1649
- size: {
1650
- sm: {
1651
- input: 'h-4 w-4'
1652
- },
1653
- md: {
1654
- input: 'h-5 w-5'
1655
- },
1656
- lg: {
1657
- input: 'h-6 w-6'
1658
- }
1659
- }
1660
- },
1661
- defaultVariants: {
1662
- size: 'md'
1663
- }
1664
- });
1665
- const checkboxRadioGroupBase = tv({
1666
- slots: {
1667
- base: '',
1668
- optionsContainer: ['flex flex-col flex-wrap gap-4 data-[orientation=horizontal]:flex-row'],
1669
- label: 'pb-2'
1670
- },
1671
- variants: {
1672
- size: {
1673
- sm: '',
1674
- md: '',
1675
- lg: ''
1676
- }
1677
- }
1678
- });
1679
- const checkbox = tv({
1680
- extend: checkboxRadioBase,
1681
- slots: {
1682
- input: ['checked-bg-checkbox', 'indeterminate-bg-checkbox', 'rounded-sm', 'checked:bg-primary checked:border-primary',
1683
- // Indeterminate state styles - show minus/dash icon
1684
- 'indeterminate:bg-primary', 'indeterminate:border-primary', 'indeterminate:bg-origin-border', 'indeterminate:bg-center', 'indeterminate:bg-no-repeat']
1685
- },
1686
- variants: {
1687
- size: {
1688
- sm: {},
1689
- md: {},
1690
- lg: {}
1691
- }
1692
- },
1693
- defaultVariants: {
1694
- size: 'md'
1695
- }
1696
- });
1697
- const radio = tv({
1698
- extend: checkboxRadioBase,
1699
- slots: {
1700
- input: ['checked-bg-radio', 'rounded-full', 'checked:bg-primary checked:border-primary']
1701
- },
1702
- variants: {
1703
- size: {
1704
- sm: {},
1705
- md: {},
1706
- lg: {}
1707
- }
1708
- },
1709
- defaultVariants: {
1710
- size: 'md'
1711
- }
1712
- });
1713
- const radioGroup = tv({
1714
- extend: checkboxRadioGroupBase
1715
- });
1716
- const checkboxGroup = tv({
1717
- extend: checkboxRadioGroupBase
1718
- });
1719
- const select = tv({
1720
- extend: input,
1721
- slots: {
1722
- base: [],
1723
- placeholder: 'text-neutral',
1724
- listbox: 'scroll-py-6 max-h-64',
1725
- icon: 'w-5 h-5',
1726
- clearButton: 'pointer-events-auto',
1727
- input: '[button]:cursor-default',
1728
- emptyContent: 'p-2'
1729
- },
1730
- variants: {
1731
- size: {
1732
- sm: {},
1733
- md: {},
1734
- lg: {}
1735
- }
1736
- },
1737
- defaultVariants: {
1738
- size: 'md'
1739
- }
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
- });
1765
- const nativeSelect = tv({
1766
- extend: input,
1767
- slots: {
1768
- input: ['appearance-none'],
1769
- icon: 'w-5 h-5'
1770
- },
1771
- variants: {
1772
- size: {
1773
- sm: {},
1774
- md: {},
1775
- lg: {}
1776
- }
1777
- }
1778
- });
1779
- const switchInput = tv({
1780
- slots: {
1781
- base: 'group relative max-w-fit inline-flex items-center justify-start',
1782
- labelContainer: 'flex flex-col ml-2',
1783
- label: 'font-body text-body-xs pb-0',
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],
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'],
1786
- thumb: ['z-10', 'flex', 'items-center', 'justify-center', 'bg-white', 'shadow-small', 'rounded-full', 'origin-right', 'transition-all', 'pointer-events-none', 'text-black'],
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'],
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']
1789
- },
1790
- variants: {
1791
- isDisabled: {
1792
- true: {
1793
- wrapper: 'opacity-disabled pointer-events-none'
1794
- }
1795
- },
1796
- size: {
1797
- sm: {
1798
- wrapper: 'w-6 h-3 px-[2px]',
1799
- thumb: ['w-2 h-2 text-xs', 'group-data-[selected=true]:ms-3'],
1800
- endContent: 'text-xs',
1801
- startContent: 'text-xs',
1802
- label: 'text-small'
1803
- },
1804
- md: {
1805
- wrapper: 'w-11 h-6',
1806
- thumb: ['w-4 h-4 text-sm', 'group-data-[selected=true]:ms-5'],
1807
- endContent: 'text-sm',
1808
- startContent: 'text-sm',
1809
- label: 'text-md'
1810
- },
1811
- lg: {
1812
- wrapper: 'w-12 h-7',
1813
- thumb: ['w-5 h-5 text-medium', 'group-data-[selected=true]:ms-5'],
1814
- endContent: 'text-md',
1815
- startContent: 'text-md',
1816
- label: 'text-lg'
1817
- }
1818
- },
1819
- intent: {
1820
- default: {
1821
- wrapper: ['group-data-[selected=true]:bg-neutral-firm', 'group-data-[selected=true]:text-on-neutral-firm']
1822
- },
1823
- primary: {
1824
- wrapper: ['group-data-[selected=true]:bg-primary', 'group-data-[selected=true]:text-on-primary']
1825
- },
1826
- accent: {
1827
- wrapper: ['group-data-[selected=true]:bg-accent', 'group-data-[selected=true]:text-on-accent']
1828
- },
1829
- success: {
1830
- wrapper: ['group-data-[selected=true]:bg-success', 'group-data-[selected=true]:text-on-success']
1831
- },
1832
- warning: {
1833
- wrapper: ['group-data-[selected=true]:bg-warning', 'group-data-[selected=true]:text-on-warning']
1834
- },
1835
- danger: {
1836
- wrapper: ['group-data-[selected=true]:bg-danger', 'group-data-[selected=true]:text-on-danger']
1837
- }
1838
- }
1839
- },
1840
- defaultVariants: {
1841
- size: 'md',
1842
- intent: 'primary',
1843
- isDisabled: false
1844
- }
1845
- });
1846
-
1847
- const base = tv({
1848
- slots: {
1849
- base: 'flex flex-wrap flex-row items-center',
1850
- labelContainer: 'leading-tight flex items-start',
1851
- inputContainer: 'flex items-center',
1852
- label: 'font-body text-body-xs pl-2 pb-0',
1853
- hint: 'pl-2 flex basis-full before:content-["_"] before:inline-block before:w-[1em] before:h-[1em] shrink-0'
1854
- },
1855
- variants: {
1856
- size: {
1857
- sm: {
1858
- label: 'text-body-2xs'
1859
- },
1860
- md: '',
1861
- lg: ''
1862
- }
1863
- },
1864
- defaultVariants: {
1865
- size: 'md'
1866
- }
1867
- });
1868
- const formCheckbox = tv({
1869
- extend: base,
1870
- slots: {
1871
- checkbox: ''
1872
- }
1873
- });
1874
- const formRadio = tv({
1875
- extend: base,
1876
- slots: {
1877
- radio: ''
1878
- }
1879
- });
1880
- const baseGroup = tv({
1881
- slots: {
1882
- base: '',
1883
- label: 'pb-1 last:pb-0',
1884
- hint: 'pb-1 last:pb-0',
1885
- feedback: 'pt-0 flex-[1_100%]'
1886
- },
1887
- variants: {
1888
- isInline: {
1889
- true: {
1890
- base: 'flex flex-wrap flex-row items-start',
1891
- label: 'pr-4 pb-0',
1892
- hint: 'pr-4 pb-0',
1893
- feedback: 'pr-4 pb-0'
1894
- }
1895
- }
1896
- }
1897
- });
1898
- const formCheckboxGroup = tv({
1899
- extend: baseGroup,
1900
- slots: {
1901
- formCheckbox: 'pb-1 last:pb-0'
1902
- },
1903
- variants: {
1904
- isInline: {
1905
- true: {
1906
- formCheckbox: 'pr-4 pb-0'
1907
- }
1908
- }
1909
- }
1910
- });
1911
- const formRadioGroup = tv({
1912
- extend: baseGroup,
1913
- slots: {
1914
- formRadio: 'pb-1 last:pb-0'
1915
- },
1916
- variants: {
1917
- isInline: {
1918
- true: {
1919
- formRadio: 'pr-4 pb-0'
1920
- }
1921
- }
1922
- }
1923
- });
1924
- const formInput = tv({
1925
- slots: {
1926
- base: 'flex flex-wrap flex-row',
1927
- label: 'flex-[1_100%]',
1928
- input: '',
1929
- hint: 'flex-[1_100%]',
1930
- feedback: 'flex-[1_100%]'
1931
- },
1932
- variants: {
1933
- size: {
1934
- sm: '',
1935
- md: '',
1936
- lg: ''
1937
- }
1938
- },
1939
- defaultVariants: {
1940
- size: 'md'
1941
- }
1942
- });
1943
- const formTextarea = tv({
1944
- extend: formInput
1945
- });
1946
- const formSelect = tv({
1947
- slots: {
1948
- base: 'flex flex-wrap flex-row',
1949
- label: 'flex-[1_100%]',
1950
- select: '',
1951
- hint: 'flex-[1_100%]',
1952
- feedback: 'flex-[1_100%]'
1953
- },
1954
- variants: {
1955
- size: {
1956
- sm: '',
1957
- md: '',
1958
- lg: ''
1959
- }
1960
- },
1961
- defaultVariants: {
1962
- size: 'md'
1963
- }
1964
- });
1965
-
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