@frontile/theme 0.17.0 → 0.18.0-alpha.0

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