@particle-network/ui-react 0.7.0-beta.2 → 0.7.0-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ProgressWrapper/index.js +47 -45
- package/dist/components/UXButton/button-theme.js +8 -8
- package/dist/components/UXColorPicker/color-fields.js +1 -1
- package/dist/components/UXHint/index.d.ts +6 -3
- package/dist/components/UXHint/index.js +9 -19
- package/dist/components/UXSimplePopover/index.d.ts +1 -0
- package/dist/components/UXSimplePopover/index.js +1 -0
- package/dist/components/UXSimplePopover/provider.d.ts +22 -0
- package/dist/components/UXSimplePopover/provider.js +197 -0
- package/dist/components/UXSimplePopover/simple-popover.d.ts +8 -3
- package/dist/components/UXSimplePopover/simple-popover.js +114 -104
- package/dist/components/UXTable/base/index.d.ts +10 -0
- package/dist/components/UXTable/base/index.js +6 -0
- package/dist/components/UXTable/base/table-body.d.ts +20 -0
- package/dist/components/UXTable/base/table-body.js +4 -0
- package/dist/components/UXTable/base/table-cell.d.ts +6 -0
- package/dist/components/UXTable/base/table-cell.js +4 -0
- package/dist/components/UXTable/base/table-column.d.ts +6 -0
- package/dist/components/UXTable/base/table-column.js +4 -0
- package/dist/components/UXTable/base/table-header.d.ts +6 -0
- package/dist/components/UXTable/base/table-header.js +4 -0
- package/dist/components/UXTable/base/table-row.d.ts +6 -0
- package/dist/components/UXTable/base/table-row.js +4 -0
- package/dist/components/UXTable/index.d.ts +7 -37
- package/dist/components/UXTable/index.js +5 -14
- package/dist/components/UXTable/table-body.d.ts +15 -0
- package/dist/components/UXTable/table-body.js +87 -0
- package/dist/components/UXTable/table-cell.d.ts +19 -0
- package/dist/components/UXTable/table-cell.js +45 -0
- package/dist/components/UXTable/table-checkbox-cell.d.ts +23 -0
- package/dist/components/UXTable/table-checkbox-cell.js +48 -0
- package/dist/components/UXTable/table-column-header.d.ts +25 -0
- package/dist/components/UXTable/table-column-header.js +66 -0
- package/dist/components/UXTable/table-header-row.d.ts +14 -0
- package/dist/components/UXTable/table-header-row.js +29 -0
- package/dist/components/UXTable/table-row-group.d.ts +8 -0
- package/dist/components/UXTable/table-row-group.js +24 -0
- package/dist/components/UXTable/table-row.d.ts +15 -0
- package/dist/components/UXTable/table-row.js +61 -0
- package/dist/components/UXTable/table-select-all-checkbox.d.ts +18 -0
- package/dist/components/UXTable/table-select-all-checkbox.js +46 -0
- package/dist/components/UXTable/table-theme.d.ts +452 -0
- package/dist/components/UXTable/table-theme.js +282 -0
- package/dist/components/UXTable/table.d.ts +8 -0
- package/dist/components/UXTable/table.js +96 -0
- package/dist/components/UXTable/use-table.d.ts +145 -0
- package/dist/components/UXTable/use-table.js +127 -0
- package/dist/components/UXTable/virtualized-table-body.d.ts +17 -0
- package/dist/components/UXTable/virtualized-table-body.js +107 -0
- package/dist/components/UXTable/virtualized-table.d.ts +8 -0
- package/dist/components/UXTable/virtualized-table.js +115 -0
- package/dist/components/UXThemeSwitch/theme-switch.js +8 -1
- package/dist/components/UXThemeSwitch/use-theme.js +1 -1
- package/dist/components/UXToast/index.d.ts +4 -1
- package/dist/components/UXToast/index.js +2 -2
- package/dist/components/layout/Box/box-theme.d.ts +2 -2
- package/dist/components/layout/Box/box-theme.js +1 -1
- package/dist/components/typography/text-theme.d.ts +2 -2
- package/dist/components/typography/text-theme.js +1 -1
- package/package.json +10 -4
- package/dist/components/UXTable/table.extend.d.ts +0 -34
- package/dist/components/UXTable/table.extend.js +0 -145
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
/**
|
|
3
|
+
* Table **Tailwind Variants** component
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```js
|
|
7
|
+
* const {base, table, thead, tbody, tr, th, td, tfoot} = table({...})
|
|
8
|
+
*
|
|
9
|
+
* <div className={base()}>
|
|
10
|
+
* <table className={table()}>
|
|
11
|
+
* <thead className={thead()}>
|
|
12
|
+
* <tr className={tr()}>
|
|
13
|
+
* <th className={th()}>...</th>
|
|
14
|
+
* <th className={th()}>...</th>
|
|
15
|
+
* </tr>
|
|
16
|
+
* </thead>
|
|
17
|
+
* <tbody className={tbody()}>
|
|
18
|
+
* <tr className={tr()}>
|
|
19
|
+
* <td className={td()}>...</td>
|
|
20
|
+
* <td className={td()}>...</td>
|
|
21
|
+
* </tr>
|
|
22
|
+
* <tr className={tr()}>
|
|
23
|
+
* <td className={td()}>...</td>
|
|
24
|
+
* <td className={td()}>...</td>
|
|
25
|
+
* </tr>
|
|
26
|
+
* </tbody>
|
|
27
|
+
* <tfoot className={tfoot()}>
|
|
28
|
+
* <tr className={tr()}>
|
|
29
|
+
* <td className={td()}>...</td>
|
|
30
|
+
* <td className={td()}>...</td>
|
|
31
|
+
* </tr>
|
|
32
|
+
* </tfoot>
|
|
33
|
+
* </table>
|
|
34
|
+
* </div>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
declare const table: import("tailwind-variants").TVReturnType<{
|
|
38
|
+
color: {
|
|
39
|
+
default: {
|
|
40
|
+
td: string;
|
|
41
|
+
};
|
|
42
|
+
primary: {
|
|
43
|
+
td: string;
|
|
44
|
+
};
|
|
45
|
+
secondary: {
|
|
46
|
+
td: string;
|
|
47
|
+
};
|
|
48
|
+
success: {
|
|
49
|
+
td: string;
|
|
50
|
+
};
|
|
51
|
+
warning: {
|
|
52
|
+
td: string;
|
|
53
|
+
};
|
|
54
|
+
danger: {
|
|
55
|
+
td: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
size: {
|
|
59
|
+
md: {
|
|
60
|
+
th: string;
|
|
61
|
+
};
|
|
62
|
+
lg: {
|
|
63
|
+
th: string;
|
|
64
|
+
td: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
layout: {
|
|
68
|
+
auto: {
|
|
69
|
+
table: string;
|
|
70
|
+
};
|
|
71
|
+
fixed: {
|
|
72
|
+
table: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
shadow: {
|
|
76
|
+
none: {
|
|
77
|
+
wrapper: string;
|
|
78
|
+
};
|
|
79
|
+
sm: {
|
|
80
|
+
wrapper: string;
|
|
81
|
+
};
|
|
82
|
+
md: {
|
|
83
|
+
wrapper: string;
|
|
84
|
+
};
|
|
85
|
+
lg: {
|
|
86
|
+
wrapper: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
hideHeader: {
|
|
90
|
+
true: {
|
|
91
|
+
thead: string;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
isStriped: {
|
|
95
|
+
true: {
|
|
96
|
+
td: string[];
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
isCompact: {
|
|
100
|
+
true: {
|
|
101
|
+
td: string;
|
|
102
|
+
};
|
|
103
|
+
false: {};
|
|
104
|
+
};
|
|
105
|
+
isHeaderSticky: {
|
|
106
|
+
true: {
|
|
107
|
+
thead: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
isSelectable: {
|
|
111
|
+
true: {
|
|
112
|
+
tr: string;
|
|
113
|
+
td: string[];
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
isMultiSelectable: {
|
|
117
|
+
true: {
|
|
118
|
+
td: string[];
|
|
119
|
+
};
|
|
120
|
+
false: {
|
|
121
|
+
td: string[];
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
radius: {
|
|
125
|
+
none: {
|
|
126
|
+
wrapper: string;
|
|
127
|
+
th: never[];
|
|
128
|
+
td: never[];
|
|
129
|
+
};
|
|
130
|
+
sm: {
|
|
131
|
+
wrapper: string;
|
|
132
|
+
};
|
|
133
|
+
md: {
|
|
134
|
+
wrapper: string;
|
|
135
|
+
};
|
|
136
|
+
lg: {
|
|
137
|
+
wrapper: string;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
fullWidth: {
|
|
141
|
+
true: {
|
|
142
|
+
base: string;
|
|
143
|
+
wrapper: string;
|
|
144
|
+
table: string;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
align: {
|
|
148
|
+
start: {
|
|
149
|
+
th: string;
|
|
150
|
+
td: string;
|
|
151
|
+
};
|
|
152
|
+
center: {
|
|
153
|
+
th: string;
|
|
154
|
+
td: string;
|
|
155
|
+
};
|
|
156
|
+
end: {
|
|
157
|
+
th: string;
|
|
158
|
+
td: string;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
}, {
|
|
162
|
+
base: string;
|
|
163
|
+
wrapper: string[];
|
|
164
|
+
table: string;
|
|
165
|
+
thead: string;
|
|
166
|
+
tbody: string;
|
|
167
|
+
tr: string[];
|
|
168
|
+
th: string[];
|
|
169
|
+
td: string[];
|
|
170
|
+
tfoot: string;
|
|
171
|
+
sortIcon: string[];
|
|
172
|
+
emptyWrapper: string;
|
|
173
|
+
loadingWrapper: string;
|
|
174
|
+
}, undefined, {
|
|
175
|
+
color: {
|
|
176
|
+
default: {
|
|
177
|
+
td: string;
|
|
178
|
+
};
|
|
179
|
+
primary: {
|
|
180
|
+
td: string;
|
|
181
|
+
};
|
|
182
|
+
secondary: {
|
|
183
|
+
td: string;
|
|
184
|
+
};
|
|
185
|
+
success: {
|
|
186
|
+
td: string;
|
|
187
|
+
};
|
|
188
|
+
warning: {
|
|
189
|
+
td: string;
|
|
190
|
+
};
|
|
191
|
+
danger: {
|
|
192
|
+
td: string;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
size: {
|
|
196
|
+
md: {
|
|
197
|
+
th: string;
|
|
198
|
+
};
|
|
199
|
+
lg: {
|
|
200
|
+
th: string;
|
|
201
|
+
td: string;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
layout: {
|
|
205
|
+
auto: {
|
|
206
|
+
table: string;
|
|
207
|
+
};
|
|
208
|
+
fixed: {
|
|
209
|
+
table: string;
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
shadow: {
|
|
213
|
+
none: {
|
|
214
|
+
wrapper: string;
|
|
215
|
+
};
|
|
216
|
+
sm: {
|
|
217
|
+
wrapper: string;
|
|
218
|
+
};
|
|
219
|
+
md: {
|
|
220
|
+
wrapper: string;
|
|
221
|
+
};
|
|
222
|
+
lg: {
|
|
223
|
+
wrapper: string;
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
hideHeader: {
|
|
227
|
+
true: {
|
|
228
|
+
thead: string;
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
isStriped: {
|
|
232
|
+
true: {
|
|
233
|
+
td: string[];
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
isCompact: {
|
|
237
|
+
true: {
|
|
238
|
+
td: string;
|
|
239
|
+
};
|
|
240
|
+
false: {};
|
|
241
|
+
};
|
|
242
|
+
isHeaderSticky: {
|
|
243
|
+
true: {
|
|
244
|
+
thead: string;
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
isSelectable: {
|
|
248
|
+
true: {
|
|
249
|
+
tr: string;
|
|
250
|
+
td: string[];
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
isMultiSelectable: {
|
|
254
|
+
true: {
|
|
255
|
+
td: string[];
|
|
256
|
+
};
|
|
257
|
+
false: {
|
|
258
|
+
td: string[];
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
radius: {
|
|
262
|
+
none: {
|
|
263
|
+
wrapper: string;
|
|
264
|
+
th: never[];
|
|
265
|
+
td: never[];
|
|
266
|
+
};
|
|
267
|
+
sm: {
|
|
268
|
+
wrapper: string;
|
|
269
|
+
};
|
|
270
|
+
md: {
|
|
271
|
+
wrapper: string;
|
|
272
|
+
};
|
|
273
|
+
lg: {
|
|
274
|
+
wrapper: string;
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
fullWidth: {
|
|
278
|
+
true: {
|
|
279
|
+
base: string;
|
|
280
|
+
wrapper: string;
|
|
281
|
+
table: string;
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
align: {
|
|
285
|
+
start: {
|
|
286
|
+
th: string;
|
|
287
|
+
td: string;
|
|
288
|
+
};
|
|
289
|
+
center: {
|
|
290
|
+
th: string;
|
|
291
|
+
td: string;
|
|
292
|
+
};
|
|
293
|
+
end: {
|
|
294
|
+
th: string;
|
|
295
|
+
td: string;
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
}, {
|
|
299
|
+
base: string;
|
|
300
|
+
wrapper: string[];
|
|
301
|
+
table: string;
|
|
302
|
+
thead: string;
|
|
303
|
+
tbody: string;
|
|
304
|
+
tr: string[];
|
|
305
|
+
th: string[];
|
|
306
|
+
td: string[];
|
|
307
|
+
tfoot: string;
|
|
308
|
+
sortIcon: string[];
|
|
309
|
+
emptyWrapper: string;
|
|
310
|
+
loadingWrapper: string;
|
|
311
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
312
|
+
color: {
|
|
313
|
+
default: {
|
|
314
|
+
td: string;
|
|
315
|
+
};
|
|
316
|
+
primary: {
|
|
317
|
+
td: string;
|
|
318
|
+
};
|
|
319
|
+
secondary: {
|
|
320
|
+
td: string;
|
|
321
|
+
};
|
|
322
|
+
success: {
|
|
323
|
+
td: string;
|
|
324
|
+
};
|
|
325
|
+
warning: {
|
|
326
|
+
td: string;
|
|
327
|
+
};
|
|
328
|
+
danger: {
|
|
329
|
+
td: string;
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
size: {
|
|
333
|
+
md: {
|
|
334
|
+
th: string;
|
|
335
|
+
};
|
|
336
|
+
lg: {
|
|
337
|
+
th: string;
|
|
338
|
+
td: string;
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
layout: {
|
|
342
|
+
auto: {
|
|
343
|
+
table: string;
|
|
344
|
+
};
|
|
345
|
+
fixed: {
|
|
346
|
+
table: string;
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
shadow: {
|
|
350
|
+
none: {
|
|
351
|
+
wrapper: string;
|
|
352
|
+
};
|
|
353
|
+
sm: {
|
|
354
|
+
wrapper: string;
|
|
355
|
+
};
|
|
356
|
+
md: {
|
|
357
|
+
wrapper: string;
|
|
358
|
+
};
|
|
359
|
+
lg: {
|
|
360
|
+
wrapper: string;
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
hideHeader: {
|
|
364
|
+
true: {
|
|
365
|
+
thead: string;
|
|
366
|
+
};
|
|
367
|
+
};
|
|
368
|
+
isStriped: {
|
|
369
|
+
true: {
|
|
370
|
+
td: string[];
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
isCompact: {
|
|
374
|
+
true: {
|
|
375
|
+
td: string;
|
|
376
|
+
};
|
|
377
|
+
false: {};
|
|
378
|
+
};
|
|
379
|
+
isHeaderSticky: {
|
|
380
|
+
true: {
|
|
381
|
+
thead: string;
|
|
382
|
+
};
|
|
383
|
+
};
|
|
384
|
+
isSelectable: {
|
|
385
|
+
true: {
|
|
386
|
+
tr: string;
|
|
387
|
+
td: string[];
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
isMultiSelectable: {
|
|
391
|
+
true: {
|
|
392
|
+
td: string[];
|
|
393
|
+
};
|
|
394
|
+
false: {
|
|
395
|
+
td: string[];
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
radius: {
|
|
399
|
+
none: {
|
|
400
|
+
wrapper: string;
|
|
401
|
+
th: never[];
|
|
402
|
+
td: never[];
|
|
403
|
+
};
|
|
404
|
+
sm: {
|
|
405
|
+
wrapper: string;
|
|
406
|
+
};
|
|
407
|
+
md: {
|
|
408
|
+
wrapper: string;
|
|
409
|
+
};
|
|
410
|
+
lg: {
|
|
411
|
+
wrapper: string;
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
fullWidth: {
|
|
415
|
+
true: {
|
|
416
|
+
base: string;
|
|
417
|
+
wrapper: string;
|
|
418
|
+
table: string;
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
align: {
|
|
422
|
+
start: {
|
|
423
|
+
th: string;
|
|
424
|
+
td: string;
|
|
425
|
+
};
|
|
426
|
+
center: {
|
|
427
|
+
th: string;
|
|
428
|
+
td: string;
|
|
429
|
+
};
|
|
430
|
+
end: {
|
|
431
|
+
th: string;
|
|
432
|
+
td: string;
|
|
433
|
+
};
|
|
434
|
+
};
|
|
435
|
+
}, {
|
|
436
|
+
base: string;
|
|
437
|
+
wrapper: string[];
|
|
438
|
+
table: string;
|
|
439
|
+
thead: string;
|
|
440
|
+
tbody: string;
|
|
441
|
+
tr: string[];
|
|
442
|
+
th: string[];
|
|
443
|
+
td: string[];
|
|
444
|
+
tfoot: string;
|
|
445
|
+
sortIcon: string[];
|
|
446
|
+
emptyWrapper: string;
|
|
447
|
+
loadingWrapper: string;
|
|
448
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
449
|
+
export type TableVariantProps = VariantProps<typeof table>;
|
|
450
|
+
export type TableSlots = keyof ReturnType<typeof table>;
|
|
451
|
+
export type TableReturnType = ReturnType<typeof table>;
|
|
452
|
+
export { table };
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { tv } from "@heroui/theme";
|
|
2
|
+
import { dataFocusVisibleClasses } from "../../utils/index.js";
|
|
3
|
+
const table = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
base: 'flex flex-col relative gap-4',
|
|
6
|
+
wrapper: [
|
|
7
|
+
'p-0',
|
|
8
|
+
'z-0',
|
|
9
|
+
'flex',
|
|
10
|
+
'flex-col',
|
|
11
|
+
'relative',
|
|
12
|
+
'justify-between',
|
|
13
|
+
'gap-5',
|
|
14
|
+
'shadow-small',
|
|
15
|
+
'bg-content1',
|
|
16
|
+
'overflow-auto'
|
|
17
|
+
],
|
|
18
|
+
table: 'min-w-full h-auto',
|
|
19
|
+
thead: "[&>tr]:first:rounded-lg after:content-[''] after:table-row after:h-[5px] [&>tr]:first:border-b [&>tr]:first:border-divider",
|
|
20
|
+
tbody: 'after:block',
|
|
21
|
+
tr: [
|
|
22
|
+
'group/tr',
|
|
23
|
+
'outline-solid outline-transparent',
|
|
24
|
+
...dataFocusVisibleClasses
|
|
25
|
+
],
|
|
26
|
+
th: [
|
|
27
|
+
'group/th',
|
|
28
|
+
'px-2.5',
|
|
29
|
+
'h-auto',
|
|
30
|
+
'text-start',
|
|
31
|
+
'align-middle',
|
|
32
|
+
'bg-transparent',
|
|
33
|
+
'whitespace-nowrap',
|
|
34
|
+
'text-foreground-300',
|
|
35
|
+
'text-[11px]',
|
|
36
|
+
'font-medium',
|
|
37
|
+
'first:rounded-s-lg',
|
|
38
|
+
'last:rounded-e-lg',
|
|
39
|
+
'outline-solid outline-transparent',
|
|
40
|
+
'data-[sortable=true]:cursor-pointer',
|
|
41
|
+
'data-[hover=true]:text-foreground-400',
|
|
42
|
+
...dataFocusVisibleClasses
|
|
43
|
+
],
|
|
44
|
+
td: [
|
|
45
|
+
'py-2',
|
|
46
|
+
'px-2.5',
|
|
47
|
+
'relative',
|
|
48
|
+
'align-middle',
|
|
49
|
+
'whitespace-normal',
|
|
50
|
+
'text-small',
|
|
51
|
+
'font-medium',
|
|
52
|
+
'outline-solid outline-transparent',
|
|
53
|
+
'[&>*]:z-1',
|
|
54
|
+
'[&>*]:relative',
|
|
55
|
+
...dataFocusVisibleClasses,
|
|
56
|
+
'before:pointer-events-none',
|
|
57
|
+
"before:content-['']",
|
|
58
|
+
'before:absolute',
|
|
59
|
+
'before:z-0',
|
|
60
|
+
'before:inset-0',
|
|
61
|
+
'before:opacity-0',
|
|
62
|
+
'data-[selected=true]:before:opacity-100',
|
|
63
|
+
'before:bg-default/60',
|
|
64
|
+
'data-[selected=true]:text-default-foreground',
|
|
65
|
+
'first:before:rounded-l-md last:before:rounded-r-md',
|
|
66
|
+
'group-data-[disabled=true]/tr:text-foreground-300',
|
|
67
|
+
'group-data-[disabled=true]/tr:cursor-not-allowed'
|
|
68
|
+
],
|
|
69
|
+
tfoot: '',
|
|
70
|
+
sortIcon: [
|
|
71
|
+
'ms-2',
|
|
72
|
+
'mb-px',
|
|
73
|
+
'opacity-0',
|
|
74
|
+
'text-inherit',
|
|
75
|
+
'inline-block',
|
|
76
|
+
'transition-transform-opacity',
|
|
77
|
+
'data-[visible=true]:opacity-100',
|
|
78
|
+
'group-data-[hover=true]/th:opacity-100',
|
|
79
|
+
'data-[direction=ascending]:rotate-180'
|
|
80
|
+
],
|
|
81
|
+
emptyWrapper: 'text-foreground-400 align-middle text-center h-40',
|
|
82
|
+
loadingWrapper: 'absolute inset-0 flex items-center justify-center'
|
|
83
|
+
},
|
|
84
|
+
variants: {
|
|
85
|
+
color: {
|
|
86
|
+
default: {
|
|
87
|
+
td: 'before:bg-default/60 data-[selected=true]:text-default-foreground'
|
|
88
|
+
},
|
|
89
|
+
primary: {
|
|
90
|
+
td: 'before:bg-primary/20 data-[selected=true]:text-primary'
|
|
91
|
+
},
|
|
92
|
+
secondary: {
|
|
93
|
+
td: 'before:bg-secondary/20 data-[selected=true]:text-secondary'
|
|
94
|
+
},
|
|
95
|
+
success: {
|
|
96
|
+
td: 'before:bg-success/20 data-[selected=true]:text-success-600 dark:data-[selected=true]:text-success'
|
|
97
|
+
},
|
|
98
|
+
warning: {
|
|
99
|
+
td: 'before:bg-warning/20 data-[selected=true]:text-warning-600 dark:data-[selected=true]:text-warning'
|
|
100
|
+
},
|
|
101
|
+
danger: {
|
|
102
|
+
td: 'before:bg-danger/20 data-[selected=true]:text-danger dark:data-[selected=true]:text-danger-500'
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
size: {
|
|
106
|
+
md: {
|
|
107
|
+
th: 'py-md'
|
|
108
|
+
},
|
|
109
|
+
lg: {
|
|
110
|
+
th: 'py-5',
|
|
111
|
+
td: 'py-lg'
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
layout: {
|
|
115
|
+
auto: {
|
|
116
|
+
table: 'table-auto'
|
|
117
|
+
},
|
|
118
|
+
fixed: {
|
|
119
|
+
table: 'table-fixed'
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
shadow: {
|
|
123
|
+
none: {
|
|
124
|
+
wrapper: 'shadow-none'
|
|
125
|
+
},
|
|
126
|
+
sm: {
|
|
127
|
+
wrapper: 'shadow-small'
|
|
128
|
+
},
|
|
129
|
+
md: {
|
|
130
|
+
wrapper: 'shadow-medium'
|
|
131
|
+
},
|
|
132
|
+
lg: {
|
|
133
|
+
wrapper: 'shadow-large'
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
hideHeader: {
|
|
137
|
+
true: {
|
|
138
|
+
thead: 'hidden'
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
isStriped: {
|
|
142
|
+
true: {
|
|
143
|
+
td: [
|
|
144
|
+
'group-data-[odd=true]/tr:before:bg-default-100',
|
|
145
|
+
'group-data-[odd=true]/tr:before:opacity-100',
|
|
146
|
+
'group-data-[odd=true]/tr:before:-z-10'
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
isCompact: {
|
|
151
|
+
true: {
|
|
152
|
+
td: 'py-1'
|
|
153
|
+
},
|
|
154
|
+
false: {}
|
|
155
|
+
},
|
|
156
|
+
isHeaderSticky: {
|
|
157
|
+
true: {
|
|
158
|
+
thead: 'sticky top-0 z-20 [&>tr]:first:shadow-small'
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
isSelectable: {
|
|
162
|
+
true: {
|
|
163
|
+
tr: 'cursor-default',
|
|
164
|
+
td: [
|
|
165
|
+
'group-aria-[selected=false]/tr:group-data-[hover=true]/tr:before:bg-default-100',
|
|
166
|
+
'group-aria-[selected=false]/tr:group-data-[hover=true]/tr:before:opacity-70'
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
isMultiSelectable: {
|
|
171
|
+
true: {
|
|
172
|
+
td: [
|
|
173
|
+
'group-data-[first=true]/tr:first:before:rounded-ss-lg',
|
|
174
|
+
'group-data-[first=true]/tr:last:before:rounded-se-lg',
|
|
175
|
+
'group-data-[middle=true]/tr:before:rounded-none',
|
|
176
|
+
'group-data-[last=true]/tr:first:before:rounded-es-lg',
|
|
177
|
+
'group-data-[last=true]/tr:last:before:rounded-ee-lg'
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
false: {
|
|
181
|
+
td: [
|
|
182
|
+
'first:before:rounded-s-lg',
|
|
183
|
+
'last:before:rounded-e-lg'
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
radius: {
|
|
188
|
+
none: {
|
|
189
|
+
wrapper: 'rounded-none',
|
|
190
|
+
th: [],
|
|
191
|
+
td: []
|
|
192
|
+
},
|
|
193
|
+
sm: {
|
|
194
|
+
wrapper: 'rounded-small'
|
|
195
|
+
},
|
|
196
|
+
md: {
|
|
197
|
+
wrapper: 'rounded-medium'
|
|
198
|
+
},
|
|
199
|
+
lg: {
|
|
200
|
+
wrapper: 'rounded-large'
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
fullWidth: {
|
|
204
|
+
true: {
|
|
205
|
+
base: 'w-full',
|
|
206
|
+
wrapper: 'w-full',
|
|
207
|
+
table: 'w-full'
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
align: {
|
|
211
|
+
start: {
|
|
212
|
+
th: 'text-start',
|
|
213
|
+
td: 'text-start'
|
|
214
|
+
},
|
|
215
|
+
center: {
|
|
216
|
+
th: 'text-center',
|
|
217
|
+
td: 'text-center'
|
|
218
|
+
},
|
|
219
|
+
end: {
|
|
220
|
+
th: 'text-end',
|
|
221
|
+
td: 'text-end'
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
defaultVariants: {
|
|
226
|
+
layout: 'auto',
|
|
227
|
+
shadow: 'none',
|
|
228
|
+
radius: 'none',
|
|
229
|
+
color: 'default',
|
|
230
|
+
size: 'md',
|
|
231
|
+
isCompact: false,
|
|
232
|
+
hideHeader: false,
|
|
233
|
+
isStriped: false,
|
|
234
|
+
fullWidth: true,
|
|
235
|
+
align: 'start'
|
|
236
|
+
},
|
|
237
|
+
compoundVariants: [
|
|
238
|
+
{
|
|
239
|
+
isStriped: true,
|
|
240
|
+
color: 'default',
|
|
241
|
+
class: {
|
|
242
|
+
td: 'group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-default/60'
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
isStriped: true,
|
|
247
|
+
color: 'primary',
|
|
248
|
+
class: {
|
|
249
|
+
td: 'group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-primary/20'
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
isStriped: true,
|
|
254
|
+
color: 'secondary',
|
|
255
|
+
class: {
|
|
256
|
+
td: 'group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-secondary/20'
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
isStriped: true,
|
|
261
|
+
color: 'success',
|
|
262
|
+
class: {
|
|
263
|
+
td: 'group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-success/20'
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
isStriped: true,
|
|
268
|
+
color: 'warning',
|
|
269
|
+
class: {
|
|
270
|
+
td: 'group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-warning/20'
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
isStriped: true,
|
|
275
|
+
color: 'danger',
|
|
276
|
+
class: {
|
|
277
|
+
td: 'group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-danger/20'
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
]
|
|
281
|
+
});
|
|
282
|
+
export { table };
|