@urbicon-ui/table 6.1.4

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 (154) hide show
  1. package/README.md +153 -0
  2. package/dist/cells/ActionButtons.svelte +224 -0
  3. package/dist/cells/ActionButtons.svelte.d.ts +74 -0
  4. package/dist/cells/CopyButton.svelte +89 -0
  5. package/dist/cells/CopyButton.svelte.d.ts +33 -0
  6. package/dist/cells/CustomCell.svelte +136 -0
  7. package/dist/cells/CustomCell.svelte.d.ts +44 -0
  8. package/dist/cells/DateCell.svelte +194 -0
  9. package/dist/cells/DateCell.svelte.d.ts +39 -0
  10. package/dist/cells/LinkCell.svelte +240 -0
  11. package/dist/cells/LinkCell.svelte.d.ts +42 -0
  12. package/dist/cells/NumberCell.svelte +225 -0
  13. package/dist/cells/NumberCell.svelte.d.ts +47 -0
  14. package/dist/cells/StatusBadge.svelte +121 -0
  15. package/dist/cells/StatusBadge.svelte.d.ts +44 -0
  16. package/dist/cells/UserAvatar.svelte +71 -0
  17. package/dist/cells/UserAvatar.svelte.d.ts +37 -0
  18. package/dist/cells/index.d.ts +8 -0
  19. package/dist/cells/index.js +9 -0
  20. package/dist/core/EmptyState.svelte +161 -0
  21. package/dist/core/EmptyState.svelte.d.ts +16 -0
  22. package/dist/core/ErrorState.svelte +158 -0
  23. package/dist/core/ErrorState.svelte.d.ts +15 -0
  24. package/dist/core/GroupedRow.svelte +239 -0
  25. package/dist/core/GroupedRow.svelte.d.ts +18 -0
  26. package/dist/core/LoadingState.svelte +75 -0
  27. package/dist/core/LoadingState.svelte.d.ts +14 -0
  28. package/dist/core/MobileCard.svelte +151 -0
  29. package/dist/core/MobileCard.svelte.d.ts +15 -0
  30. package/dist/core/TableCell.svelte +105 -0
  31. package/dist/core/TableCell.svelte.d.ts +14 -0
  32. package/dist/core/TableDesktop.svelte +480 -0
  33. package/dist/core/TableDesktop.svelte.d.ts +26 -0
  34. package/dist/core/TableHead.svelte +314 -0
  35. package/dist/core/TableHead.svelte.d.ts +7 -0
  36. package/dist/core/TableMobile.svelte +112 -0
  37. package/dist/core/TableMobile.svelte.d.ts +13 -0
  38. package/dist/core/TableProvider.svelte +271 -0
  39. package/dist/core/TableProvider.svelte.d.ts +40 -0
  40. package/dist/core/TableRow.svelte +171 -0
  41. package/dist/core/TableRow.svelte.d.ts +16 -0
  42. package/dist/core/index.d.ts +17 -0
  43. package/dist/core/index.js +14 -0
  44. package/dist/core/sticky-context.svelte.d.ts +48 -0
  45. package/dist/core/sticky-context.svelte.js +88 -0
  46. package/dist/core/table/Table.svelte +304 -0
  47. package/dist/core/table/Table.svelte.d.ts +26 -0
  48. package/dist/core/table/index.d.ts +448 -0
  49. package/dist/core/table/index.js +1 -0
  50. package/dist/core/table-style-context.d.ts +66 -0
  51. package/dist/core/table-style-context.js +26 -0
  52. package/dist/factories/ColumnValidation.d.ts +49 -0
  53. package/dist/factories/ColumnValidation.js +188 -0
  54. package/dist/factories/TableColumns.d.ts +97 -0
  55. package/dist/factories/TableColumns.js +262 -0
  56. package/dist/factories/TypedColumnBuilder.d.ts +41 -0
  57. package/dist/factories/TypedColumnBuilder.js +72 -0
  58. package/dist/factories/index.d.ts +12 -0
  59. package/dist/factories/index.js +13 -0
  60. package/dist/features/HeaderMenu.svelte +236 -0
  61. package/dist/features/HeaderMenu.svelte.d.ts +8 -0
  62. package/dist/features/LiveUpdateBanner.svelte +66 -0
  63. package/dist/features/LiveUpdateBanner.svelte.d.ts +6 -0
  64. package/dist/features/SearchHighlight.svelte +21 -0
  65. package/dist/features/SearchHighlight.svelte.d.ts +8 -0
  66. package/dist/features/SmartFilterBar/ChipsField.svelte +104 -0
  67. package/dist/features/SmartFilterBar/ChipsField.svelte.d.ts +5 -0
  68. package/dist/features/SmartFilterBar/ColumnVisibilityMenu.svelte +84 -0
  69. package/dist/features/SmartFilterBar/ColumnVisibilityMenu.svelte.d.ts +3 -0
  70. package/dist/features/SmartFilterBar/FilterMenu.svelte +367 -0
  71. package/dist/features/SmartFilterBar/FilterMenu.svelte.d.ts +3 -0
  72. package/dist/features/SmartFilterBar/GroupingMenu.svelte +82 -0
  73. package/dist/features/SmartFilterBar/GroupingMenu.svelte.d.ts +3 -0
  74. package/dist/features/SmartFilterBar/SmartFilterBar.svelte +109 -0
  75. package/dist/features/SmartFilterBar/SmartFilterBar.svelte.d.ts +11 -0
  76. package/dist/features/SmartFilterBar/SummaryMenu.svelte +118 -0
  77. package/dist/features/SmartFilterBar/SummaryMenu.svelte.d.ts +3 -0
  78. package/dist/features/SummaryRow.svelte +97 -0
  79. package/dist/features/SummaryRow.svelte.d.ts +8 -0
  80. package/dist/features/index.d.ts +4 -0
  81. package/dist/features/index.js +4 -0
  82. package/dist/i18n/index.d.ts +366 -0
  83. package/dist/i18n/index.js +21 -0
  84. package/dist/index.d.ts +28 -0
  85. package/dist/index.js +41 -0
  86. package/dist/stores/TableStore.svelte.d.ts +192 -0
  87. package/dist/stores/TableStore.svelte.js +362 -0
  88. package/dist/stores/concerns/index.d.ts +15 -0
  89. package/dist/stores/concerns/index.js +14 -0
  90. package/dist/stores/concerns/types.d.ts +31 -0
  91. package/dist/stores/concerns/types.js +1 -0
  92. package/dist/stores/concerns/useColumnOrder.svelte.d.ts +16 -0
  93. package/dist/stores/concerns/useColumnOrder.svelte.js +81 -0
  94. package/dist/stores/concerns/useColumnVisibility.svelte.d.ts +16 -0
  95. package/dist/stores/concerns/useColumnVisibility.svelte.js +58 -0
  96. package/dist/stores/concerns/useExpansion.svelte.d.ts +9 -0
  97. package/dist/stores/concerns/useExpansion.svelte.js +32 -0
  98. package/dist/stores/concerns/useFiltering.svelte.d.ts +20 -0
  99. package/dist/stores/concerns/useFiltering.svelte.js +109 -0
  100. package/dist/stores/concerns/useFocusManagement.svelte.d.ts +15 -0
  101. package/dist/stores/concerns/useFocusManagement.svelte.js +52 -0
  102. package/dist/stores/concerns/useGrouping.svelte.d.ts +15 -0
  103. package/dist/stores/concerns/useGrouping.svelte.js +86 -0
  104. package/dist/stores/concerns/useLiveUpdates.svelte.d.ts +45 -0
  105. package/dist/stores/concerns/useLiveUpdates.svelte.js +175 -0
  106. package/dist/stores/concerns/usePagination.svelte.d.ts +18 -0
  107. package/dist/stores/concerns/usePagination.svelte.js +54 -0
  108. package/dist/stores/concerns/usePersistence.svelte.d.ts +36 -0
  109. package/dist/stores/concerns/usePersistence.svelte.js +167 -0
  110. package/dist/stores/concerns/useRemoteData.svelte.d.ts +21 -0
  111. package/dist/stores/concerns/useRemoteData.svelte.js +64 -0
  112. package/dist/stores/concerns/useSearch.svelte.d.ts +8 -0
  113. package/dist/stores/concerns/useSearch.svelte.js +16 -0
  114. package/dist/stores/concerns/useSelection.svelte.d.ts +21 -0
  115. package/dist/stores/concerns/useSelection.svelte.js +110 -0
  116. package/dist/stores/concerns/useSorting.svelte.d.ts +11 -0
  117. package/dist/stores/concerns/useSorting.svelte.js +70 -0
  118. package/dist/stores/concerns/useSummary.svelte.d.ts +18 -0
  119. package/dist/stores/concerns/useSummary.svelte.js +96 -0
  120. package/dist/stores/index.d.ts +1 -0
  121. package/dist/stores/index.js +1 -0
  122. package/dist/style/index.css +137 -0
  123. package/dist/style/index.d.ts +2 -0
  124. package/dist/style/index.js +2 -0
  125. package/dist/style/table-theme.css +131 -0
  126. package/dist/style/themes/comfortable.css +20 -0
  127. package/dist/style/themes/compact.css +20 -0
  128. package/dist/translations/de.d.ts +177 -0
  129. package/dist/translations/de.js +176 -0
  130. package/dist/translations/en.d.ts +177 -0
  131. package/dist/translations/en.js +176 -0
  132. package/dist/types/index.d.ts +1 -0
  133. package/dist/types/index.js +1 -0
  134. package/dist/types/tableTypes.d.ts +262 -0
  135. package/dist/types/tableTypes.js +1 -0
  136. package/dist/utils/index.d.ts +165 -0
  137. package/dist/utils/index.js +330 -0
  138. package/dist/utils/sticky-measure.d.ts +54 -0
  139. package/dist/utils/sticky-measure.js +107 -0
  140. package/dist/utils/virtualizer.d.ts +43 -0
  141. package/dist/utils/virtualizer.js +43 -0
  142. package/dist/variants/index.d.ts +11 -0
  143. package/dist/variants/index.js +15 -0
  144. package/dist/variants/table-cells.variants.d.ts +827 -0
  145. package/dist/variants/table-cells.variants.js +627 -0
  146. package/dist/variants/table-features.variants.d.ts +547 -0
  147. package/dist/variants/table-features.variants.js +412 -0
  148. package/dist/variants/table-states.variants.d.ts +594 -0
  149. package/dist/variants/table-states.variants.js +394 -0
  150. package/dist/variants/table.system.d.ts +301 -0
  151. package/dist/variants/table.system.js +314 -0
  152. package/dist/variants/table.variants.d.ts +428 -0
  153. package/dist/variants/table.variants.js +360 -0
  154. package/package.json +93 -0
@@ -0,0 +1,627 @@
1
+ /**
2
+ * TABLE CELL VARIANTS
3
+ * Specialized cell variants for different data types.
4
+ */
5
+ import { tv } from '@urbicon-ui/blocks';
6
+ import { TABLE_DIMENSIONS, TABLE_INDICATORS } from './table.system';
7
+ const CELL_BASE = [
8
+ 'h-full w-full flex items-center',
9
+ 'transition-colors duration-[var(--blocks-duration-fast)]',
10
+ 'text-text-primary'
11
+ ];
12
+ /**
13
+ * TEXT CELL VARIANTS
14
+ */
15
+ export const textCellVariants = tv({
16
+ slots: {
17
+ container: CELL_BASE,
18
+ text: ['block overflow-hidden']
19
+ },
20
+ variants: {
21
+ size: {
22
+ sm: {
23
+ container: [TABLE_DIMENSIONS.padding.cell.sm, 'text-xs'],
24
+ text: 'text-xs'
25
+ },
26
+ md: {
27
+ container: [TABLE_DIMENSIONS.padding.cell.md, 'text-sm'],
28
+ text: 'text-sm'
29
+ },
30
+ lg: {
31
+ container: [TABLE_DIMENSIONS.padding.cell.lg, 'text-base'],
32
+ text: 'text-base'
33
+ }
34
+ },
35
+ align: {
36
+ left: {
37
+ container: 'justify-start text-left'
38
+ },
39
+ center: {
40
+ container: 'justify-center text-center'
41
+ },
42
+ right: {
43
+ container: 'justify-end text-right'
44
+ }
45
+ },
46
+ weight: {
47
+ normal: {
48
+ text: 'font-normal'
49
+ },
50
+ medium: {
51
+ text: 'font-medium'
52
+ },
53
+ semibold: {
54
+ text: 'font-semibold'
55
+ },
56
+ bold: {
57
+ text: 'font-bold'
58
+ }
59
+ },
60
+ truncate: {
61
+ true: {
62
+ text: 'truncate'
63
+ },
64
+ false: {
65
+ text: 'whitespace-normal break-words'
66
+ }
67
+ },
68
+ highlight: {
69
+ true: {
70
+ text: 'bg-warning-subtle px-1 rounded-modify'
71
+ },
72
+ false: {}
73
+ }
74
+ },
75
+ defaultVariants: {
76
+ size: 'md',
77
+ align: 'left',
78
+ weight: 'normal',
79
+ truncate: true,
80
+ highlight: false
81
+ }
82
+ });
83
+ /**
84
+ * NUMBER CELL VARIANTS
85
+ * Numeric cells with formatting.
86
+ */
87
+ export const numberCellVariants = tv({
88
+ slots: {
89
+ container: [...CELL_BASE, 'font-mono tabular-nums'],
90
+ number: ['whitespace-nowrap'],
91
+ prefix: ['text-text-secondary mr-1'],
92
+ suffix: ['text-text-secondary ml-1'],
93
+ trend: ['ml-2 flex items-center']
94
+ },
95
+ variants: {
96
+ size: {
97
+ sm: {
98
+ container: [TABLE_DIMENSIONS.padding.cell.sm, 'text-xs'],
99
+ number: 'text-xs'
100
+ },
101
+ md: {
102
+ container: [TABLE_DIMENSIONS.padding.cell.md, 'text-sm'],
103
+ number: 'text-sm'
104
+ },
105
+ lg: {
106
+ container: [TABLE_DIMENSIONS.padding.cell.lg, 'text-base'],
107
+ number: 'text-base'
108
+ }
109
+ },
110
+ align: {
111
+ left: {
112
+ container: 'justify-start'
113
+ },
114
+ center: {
115
+ container: 'justify-center'
116
+ },
117
+ right: {
118
+ container: 'justify-end'
119
+ }
120
+ },
121
+ variant: {
122
+ default: {
123
+ number: 'text-text-primary'
124
+ },
125
+ positive: {
126
+ number: 'text-success'
127
+ },
128
+ negative: {
129
+ number: 'text-danger'
130
+ },
131
+ neutral: {
132
+ number: 'text-text-secondary'
133
+ },
134
+ currency: {
135
+ number: 'font-semibold'
136
+ }
137
+ }
138
+ },
139
+ defaultVariants: {
140
+ size: 'md',
141
+ align: 'right',
142
+ variant: 'default'
143
+ }
144
+ });
145
+ /**
146
+ * DATE CELL VARIANTS
147
+ */
148
+ export const dateCellVariants = tv({
149
+ slots: {
150
+ container: [...CELL_BASE, 'gap-2'],
151
+ date: ['whitespace-nowrap'],
152
+ time: ['text-text-secondary text-xs'],
153
+ relative: ['text-text-tertiary italic']
154
+ },
155
+ variants: {
156
+ size: {
157
+ sm: {
158
+ container: TABLE_DIMENSIONS.padding.cell.sm,
159
+ date: 'text-xs'
160
+ },
161
+ md: {
162
+ container: TABLE_DIMENSIONS.padding.cell.md,
163
+ date: 'text-sm'
164
+ },
165
+ lg: {
166
+ container: TABLE_DIMENSIONS.padding.cell.lg,
167
+ date: 'text-base'
168
+ }
169
+ },
170
+ format: {
171
+ short: {},
172
+ medium: {},
173
+ long: {},
174
+ relative: {},
175
+ datetime: {}
176
+ },
177
+ interactive: {
178
+ true: {
179
+ container: 'cursor-pointer hover:text-primary',
180
+ date: 'underline decoration-dotted decoration-1 underline-offset-2'
181
+ },
182
+ false: {}
183
+ }
184
+ },
185
+ defaultVariants: {
186
+ size: 'md',
187
+ format: 'medium',
188
+ interactive: false
189
+ }
190
+ });
191
+ /**
192
+ * STATUS CELL VARIANTS
193
+ */
194
+ export const statusCellVariants = tv({
195
+ slots: {
196
+ container: CELL_BASE,
197
+ badge: [
198
+ 'inline-flex items-center gap-1.5',
199
+ 'font-medium rounded-commit',
200
+ 'transition-colors duration-[var(--blocks-duration-fast)]'
201
+ ],
202
+ dot: TABLE_INDICATORS.dot.base,
203
+ text: []
204
+ },
205
+ variants: {
206
+ size: {
207
+ sm: {
208
+ container: TABLE_DIMENSIONS.padding.cell.sm,
209
+ badge: 'px-2 py-0.5 text-xs',
210
+ dot: TABLE_INDICATORS.dot.size.sm
211
+ },
212
+ md: {
213
+ container: TABLE_DIMENSIONS.padding.cell.md,
214
+ badge: 'px-2.5 py-1 text-sm',
215
+ dot: TABLE_INDICATORS.dot.size.md
216
+ },
217
+ lg: {
218
+ container: TABLE_DIMENSIONS.padding.cell.lg,
219
+ badge: 'px-3 py-1.5 text-base',
220
+ dot: TABLE_INDICATORS.dot.size.lg
221
+ }
222
+ },
223
+ status: {
224
+ active: {
225
+ badge: 'bg-success-subtle text-success-emphasis',
226
+ dot: 'bg-success'
227
+ },
228
+ inactive: {
229
+ badge: 'bg-surface-subtle text-text-secondary',
230
+ dot: 'bg-text-tertiary'
231
+ },
232
+ pending: {
233
+ badge: 'bg-warning-subtle text-warning-emphasis',
234
+ dot: 'bg-warning animate-pulse'
235
+ },
236
+ error: {
237
+ badge: 'bg-danger-subtle text-danger-emphasis',
238
+ dot: 'bg-danger'
239
+ },
240
+ custom: {}
241
+ }
242
+ },
243
+ defaultVariants: {
244
+ size: 'md',
245
+ status: 'active'
246
+ }
247
+ });
248
+ /**
249
+ * USER CELL VARIANTS
250
+ */
251
+ export const userCellVariants = tv({
252
+ slots: {
253
+ container: [...CELL_BASE, 'gap-3'],
254
+ avatar: ['flex-shrink-0 rounded-full overflow-hidden'],
255
+ content: ['min-w-0 flex-1 flex flex-col'],
256
+ name: ['font-medium text-text-primary truncate'],
257
+ email: ['text-text-secondary truncate'],
258
+ badge: ['ml-2']
259
+ },
260
+ variants: {
261
+ size: {
262
+ sm: {
263
+ container: TABLE_DIMENSIONS.padding.cell.sm,
264
+ avatar: 'w-8 h-8',
265
+ name: 'text-xs',
266
+ email: 'text-xs'
267
+ },
268
+ md: {
269
+ container: TABLE_DIMENSIONS.padding.cell.md,
270
+ avatar: 'w-10 h-10',
271
+ name: 'text-sm',
272
+ email: 'text-xs'
273
+ },
274
+ lg: {
275
+ container: TABLE_DIMENSIONS.padding.cell.lg,
276
+ avatar: 'w-12 h-12',
277
+ name: 'text-base',
278
+ email: 'text-sm'
279
+ }
280
+ },
281
+ layout: {
282
+ horizontal: {
283
+ container: 'flex-row'
284
+ },
285
+ vertical: {
286
+ container: 'flex-col text-center',
287
+ content: 'items-center'
288
+ },
289
+ compact: {
290
+ container: 'flex-row gap-2',
291
+ avatar: 'w-6 h-6'
292
+ }
293
+ },
294
+ clickable: {
295
+ true: {
296
+ container: 'cursor-pointer hover:bg-surface-hover rounded-contain',
297
+ name: 'hover:text-primary'
298
+ },
299
+ false: {}
300
+ }
301
+ },
302
+ defaultVariants: {
303
+ size: 'md',
304
+ layout: 'horizontal',
305
+ clickable: false
306
+ }
307
+ });
308
+ // No legacy alias – use userCellVariants directly
309
+ /**
310
+ * ACTION CELL VARIANTS
311
+ */
312
+ export const actionCellVariants = tv({
313
+ slots: {
314
+ container: [...CELL_BASE, 'justify-end gap-1'],
315
+ button: [
316
+ 'inline-flex items-center justify-center',
317
+ 'rounded-modify transition-[color,background-color,border-color,box-shadow,opacity] duration-[var(--blocks-duration-fast)]',
318
+ 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1'
319
+ ],
320
+ icon: ['flex-shrink-0']
321
+ },
322
+ variants: {
323
+ size: {
324
+ sm: {
325
+ container: TABLE_DIMENSIONS.padding.cell.sm,
326
+ button: 'w-7 h-7',
327
+ icon: 'w-3.5 h-3.5'
328
+ },
329
+ md: {
330
+ container: TABLE_DIMENSIONS.padding.cell.md,
331
+ button: 'w-8 h-8',
332
+ icon: 'w-4 h-4'
333
+ },
334
+ lg: {
335
+ container: TABLE_DIMENSIONS.padding.cell.lg,
336
+ button: 'w-9 h-9',
337
+ icon: 'w-5 h-5'
338
+ }
339
+ },
340
+ variant: {
341
+ ghost: {
342
+ button: ['text-text-secondary', 'hover:bg-surface-hover hover:text-text-primary']
343
+ },
344
+ subtle: {
345
+ button: ['bg-surface-subtle text-text-primary', 'hover:bg-surface-hover']
346
+ },
347
+ solid: {
348
+ button: [
349
+ 'bg-surface-elevated text-text-primary',
350
+ 'border border-border-subtle',
351
+ 'hover:bg-surface-hover hover:border-border-default'
352
+ ]
353
+ }
354
+ },
355
+ destructive: {
356
+ true: {
357
+ button: 'hover:bg-danger-subtle hover:text-danger-emphasis'
358
+ },
359
+ false: {}
360
+ }
361
+ },
362
+ defaultVariants: {
363
+ size: 'md',
364
+ variant: 'ghost',
365
+ destructive: false
366
+ }
367
+ });
368
+ // No legacy alias – use actionCellVariants directly
369
+ /**
370
+ * LINK CELL VARIANTS
371
+ */
372
+ export const linkCellVariants = tv({
373
+ slots: {
374
+ container: CELL_BASE,
375
+ link: [
376
+ 'inline-flex items-center gap-1.5',
377
+ 'text-primary hover:text-primary-hover',
378
+ 'underline decoration-1 underline-offset-2',
379
+ 'transition-colors duration-[var(--blocks-duration-fast)]',
380
+ 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2'
381
+ ],
382
+ icon: ['flex-shrink-0'],
383
+ text: ['truncate']
384
+ },
385
+ variants: {
386
+ size: {
387
+ sm: {
388
+ container: TABLE_DIMENSIONS.padding.cell.sm,
389
+ link: 'text-xs gap-1',
390
+ icon: 'w-3 h-3'
391
+ },
392
+ md: {
393
+ container: TABLE_DIMENSIONS.padding.cell.md,
394
+ link: 'text-sm gap-1.5',
395
+ icon: 'w-4 h-4'
396
+ },
397
+ lg: {
398
+ container: TABLE_DIMENSIONS.padding.cell.lg,
399
+ link: 'text-base gap-2',
400
+ icon: 'w-5 h-5'
401
+ }
402
+ },
403
+ variant: {
404
+ default: {},
405
+ subtle: {
406
+ link: 'text-text-primary hover:text-primary no-underline hover:underline'
407
+ },
408
+ external: {
409
+ icon: 'opacity-60'
410
+ }
411
+ },
412
+ disabled: {
413
+ true: {
414
+ link: 'text-text-disabled cursor-not-allowed no-underline pointer-events-none'
415
+ },
416
+ false: {}
417
+ }
418
+ },
419
+ defaultVariants: {
420
+ size: 'md',
421
+ variant: 'default',
422
+ disabled: false
423
+ }
424
+ });
425
+ /**
426
+ * PROGRESS CELL VARIANTS
427
+ */
428
+ export const progressCellVariants = tv({
429
+ slots: {
430
+ container: [...CELL_BASE, 'flex-col gap-1'],
431
+ label: ['flex justify-between w-full'],
432
+ text: ['text-text-primary'],
433
+ value: ['text-text-secondary text-xs'],
434
+ track: ['w-full bg-surface-subtle rounded-commit overflow-hidden'],
435
+ bar: [
436
+ 'h-full rounded-commit transition-[width,background-color] duration-[var(--blocks-duration-slow)]'
437
+ ]
438
+ },
439
+ variants: {
440
+ size: {
441
+ sm: {
442
+ container: TABLE_DIMENSIONS.padding.cell.sm,
443
+ track: 'h-1.5',
444
+ text: 'text-xs'
445
+ },
446
+ md: {
447
+ container: TABLE_DIMENSIONS.padding.cell.md,
448
+ track: 'h-2',
449
+ text: 'text-sm'
450
+ },
451
+ lg: {
452
+ container: TABLE_DIMENSIONS.padding.cell.lg,
453
+ track: 'h-2.5',
454
+ text: 'text-base'
455
+ }
456
+ },
457
+ variant: {
458
+ default: {
459
+ bar: 'bg-primary'
460
+ },
461
+ success: {
462
+ bar: 'bg-success'
463
+ },
464
+ warning: {
465
+ bar: 'bg-warning'
466
+ },
467
+ danger: {
468
+ bar: 'bg-danger'
469
+ }
470
+ },
471
+ animated: {
472
+ true: {
473
+ bar: 'animate-pulse'
474
+ },
475
+ false: {}
476
+ }
477
+ },
478
+ defaultVariants: {
479
+ size: 'md',
480
+ variant: 'default',
481
+ animated: false
482
+ }
483
+ });
484
+ /**
485
+ * COPY BUTTON VARIANTS (compat)
486
+ */
487
+ export const copyButtonVariants = tv({
488
+ slots: {
489
+ container: [...CELL_BASE],
490
+ button: [],
491
+ text: ['text-xs font-medium leading-none', 'hidden sm:inline'],
492
+ textSuccess: ['text-xs font-medium leading-none text-success', 'hidden sm:inline'],
493
+ icon: ['w-4 h-4 flex-shrink-0']
494
+ },
495
+ variants: {
496
+ size: {
497
+ xs: {
498
+ container: TABLE_DIMENSIONS.padding.cell.sm,
499
+ text: 'text-xs',
500
+ textSuccess: 'text-xs',
501
+ icon: 'w-3 h-3'
502
+ },
503
+ sm: {
504
+ container: TABLE_DIMENSIONS.padding.cell.sm,
505
+ text: 'text-sm',
506
+ textSuccess: 'text-sm',
507
+ icon: 'w-4 h-4'
508
+ },
509
+ md: {
510
+ container: TABLE_DIMENSIONS.padding.cell.md,
511
+ text: 'text-sm',
512
+ textSuccess: 'text-sm',
513
+ icon: 'w-5 h-5'
514
+ }
515
+ },
516
+ align: {
517
+ left: {
518
+ container: 'justify-start text-left'
519
+ },
520
+ center: {
521
+ container: 'justify-center text-center'
522
+ },
523
+ right: {
524
+ container: 'justify-end text-right'
525
+ }
526
+ },
527
+ responsive: {
528
+ true: {
529
+ text: 'hidden sm:inline',
530
+ textSuccess: 'hidden sm:inline'
531
+ },
532
+ false: {
533
+ text: 'inline',
534
+ textSuccess: 'inline'
535
+ }
536
+ }
537
+ },
538
+ defaultVariants: {
539
+ size: 'xs',
540
+ align: 'left',
541
+ responsive: true
542
+ }
543
+ });
544
+ /**
545
+ * CUSTOM CELL VARIANTS (compat)
546
+ */
547
+ export const customCellVariants = tv({
548
+ slots: {
549
+ container: [
550
+ 'h-full w-full flex items-center transition-colors',
551
+ 'px-3 py-2 text-sm leading-normal text-text-primary'
552
+ ],
553
+ content: ['flex items-center min-w-0 gap-2 h-full w-full'],
554
+ text: ['block overflow-hidden text-ellipsis max-w-full line-clamp-1'],
555
+ fallback: ['text-text-tertiary font-mono text-xs opacity-70']
556
+ },
557
+ variants: {
558
+ align: {
559
+ left: {
560
+ container: 'justify-start text-left',
561
+ content: 'justify-start'
562
+ },
563
+ center: {
564
+ container: 'justify-center text-center',
565
+ content: 'justify-center'
566
+ },
567
+ right: {
568
+ container: 'justify-end text-right',
569
+ content: 'justify-end'
570
+ }
571
+ },
572
+ wrap: {
573
+ true: {
574
+ text: 'whitespace-normal break-words line-clamp-none'
575
+ },
576
+ false: {
577
+ text: 'whitespace-nowrap overflow-hidden text-ellipsis'
578
+ }
579
+ },
580
+ truncate: {
581
+ true: {
582
+ text: 'truncate max-w-full'
583
+ },
584
+ false: {
585
+ text: 'break-words'
586
+ }
587
+ },
588
+ interactive: {
589
+ true: {
590
+ container: [
591
+ 'cursor-pointer rounded-modify',
592
+ 'hover:bg-surface-hover hover:-translate-y-0.5',
593
+ 'active:translate-y-0 active:bg-surface-active',
594
+ 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-primary'
595
+ ]
596
+ },
597
+ false: {
598
+ container: 'cursor-default'
599
+ }
600
+ },
601
+ size: {
602
+ xs: {
603
+ container: 'px-1 py-0.5 text-xs',
604
+ text: 'text-xs'
605
+ },
606
+ sm: {
607
+ container: 'px-1 py-1.5 text-xs',
608
+ text: 'text-xs'
609
+ },
610
+ md: {
611
+ container: 'px-2 py-1 text-sm',
612
+ text: 'text-sm'
613
+ },
614
+ lg: {
615
+ container: 'px-3 py-2 text-base',
616
+ text: 'text-base'
617
+ }
618
+ }
619
+ },
620
+ defaultVariants: {
621
+ align: 'left',
622
+ wrap: false,
623
+ truncate: true,
624
+ interactive: false,
625
+ size: 'md'
626
+ }
627
+ });