@fy-/fws-vue 0.1.2 → 0.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 (92) hide show
  1. package/components/ui/DefaultInput.vue +21 -0
  2. package/index.ts +4 -1
  3. package/package.json +1 -1
  4. package/presets/Lara/accordion/index.js +86 -0
  5. package/presets/Lara/autocomplete/index.js +284 -0
  6. package/presets/Lara/avatar/index.js +46 -0
  7. package/presets/Lara/badge/index.js +44 -0
  8. package/presets/Lara/badgedirective/index.js +49 -0
  9. package/presets/Lara/blockui/index.js +8 -0
  10. package/presets/Lara/breadcrumb/index.js +64 -0
  11. package/presets/Lara/button/index.js +470 -0
  12. package/presets/Lara/calendar/index.js +683 -0
  13. package/presets/Lara/card/index.js +37 -0
  14. package/presets/Lara/carousel/index.js +152 -0
  15. package/presets/Lara/cascadeselect/index.js +228 -0
  16. package/presets/Lara/checkbox/index.js +106 -0
  17. package/presets/Lara/chip/index.js +45 -0
  18. package/presets/Lara/chips/index.js +118 -0
  19. package/presets/Lara/colorpicker/index.js +129 -0
  20. package/presets/Lara/confirmpopup/index.js +107 -0
  21. package/presets/Lara/contextmenu/index.js +130 -0
  22. package/presets/Lara/datatable/index.js +1289 -0
  23. package/presets/Lara/dataview/index.js +40 -0
  24. package/presets/Lara/deferred/index.js +3 -0
  25. package/presets/Lara/dialog/index.js +249 -0
  26. package/presets/Lara/divider/index.js +72 -0
  27. package/presets/Lara/dock/index.js +97 -0
  28. package/presets/Lara/dropdown/index.js +300 -0
  29. package/presets/Lara/fieldset/index.js +98 -0
  30. package/presets/Lara/fileupload/index.js +173 -0
  31. package/presets/Lara/floatlabel/index.js +26 -0
  32. package/presets/Lara/galleria/index.js +351 -0
  33. package/presets/Lara/global.js +90 -0
  34. package/presets/Lara/iconfield/index.js +22 -0
  35. package/presets/Lara/image/index.js +206 -0
  36. package/presets/Lara/index.js +181 -0
  37. package/presets/Lara/inlinemessage/index.js +36 -0
  38. package/presets/Lara/inplace/index.js +27 -0
  39. package/presets/Lara/inputgroup/index.js +5 -0
  40. package/presets/Lara/inputgroupaddon/index.js +28 -0
  41. package/presets/Lara/inputmask/index.js +37 -0
  42. package/presets/Lara/inputnumber/index.js +253 -0
  43. package/presets/Lara/inputotp/index.js +72 -0
  44. package/presets/Lara/inputswitch/index.js +93 -0
  45. package/presets/Lara/inputtext/index.js +61 -0
  46. package/presets/Lara/knob/index.js +47 -0
  47. package/presets/Lara/listbox/index.js +170 -0
  48. package/presets/Lara/megamenu/index.js +207 -0
  49. package/presets/Lara/menu/index.js +98 -0
  50. package/presets/Lara/menubar/index.js +181 -0
  51. package/presets/Lara/message/index.js +87 -0
  52. package/presets/Lara/metergroup/index.js +110 -0
  53. package/presets/Lara/multiselect/index.js +589 -0
  54. package/presets/Lara/orderlist/index.js +266 -0
  55. package/presets/Lara/organizationchart/index.js +142 -0
  56. package/presets/Lara/overlaypanel/index.js +41 -0
  57. package/presets/Lara/paginator/index.js +590 -0
  58. package/presets/Lara/panel/index.js +93 -0
  59. package/presets/Lara/panelmenu/index.js +139 -0
  60. package/presets/Lara/password/index.js +140 -0
  61. package/presets/Lara/picklist/index.js +659 -0
  62. package/presets/Lara/progressbar/index.js +61 -0
  63. package/presets/Lara/progressspinner/index.js +51 -0
  64. package/presets/Lara/radiobutton/index.js +116 -0
  65. package/presets/Lara/rating/index.js +95 -0
  66. package/presets/Lara/ripple/index.js +6 -0
  67. package/presets/Lara/scrollpanel/index.js +77 -0
  68. package/presets/Lara/scrolltop/index.js +45 -0
  69. package/presets/Lara/selectbutton/index.js +60 -0
  70. package/presets/Lara/sidebar/index.js +163 -0
  71. package/presets/Lara/skeleton/index.js +19 -0
  72. package/presets/Lara/slider/index.js +149 -0
  73. package/presets/Lara/speeddial/index.js +535 -0
  74. package/presets/Lara/splitbutton/index.js +1081 -0
  75. package/presets/Lara/splitter/index.js +64 -0
  76. package/presets/Lara/stepper/index.js +183 -0
  77. package/presets/Lara/steps/index.js +115 -0
  78. package/presets/Lara/tabmenu/index.js +82 -0
  79. package/presets/Lara/tabview/index.js +166 -0
  80. package/presets/Lara/tag/index.js +37 -0
  81. package/presets/Lara/terminal/index.js +60 -0
  82. package/presets/Lara/textarea/index.js +39 -0
  83. package/presets/Lara/tieredmenu/index.js +125 -0
  84. package/presets/Lara/timeline/index.js +107 -0
  85. package/presets/Lara/toast/index.js +113 -0
  86. package/presets/Lara/togglebutton/index.js +100 -0
  87. package/presets/Lara/toolbar/index.js +28 -0
  88. package/presets/Lara/tooltip/index.js +73 -0
  89. package/presets/Lara/tree/index.js +281 -0
  90. package/presets/Lara/treeselect/index.js +387 -0
  91. package/presets/Lara/treetable/index.js +509 -0
  92. package/presets/Lara/tristatecheckbox/index.js +112 -0
@@ -0,0 +1,1289 @@
1
+ export default {
2
+ root: ({ props }) => ({
3
+ class: [
4
+ "relative",
5
+
6
+ // Flex & Alignment
7
+ { "flex flex-col": props.scrollable && props.scrollHeight === "flex" },
8
+
9
+ // Size
10
+ { "h-full": props.scrollable && props.scrollHeight === "flex" },
11
+ ],
12
+ }),
13
+ loadingoverlay: {
14
+ class: [
15
+ // Position
16
+ "absolute",
17
+ "top-0 left-0",
18
+ "z-20",
19
+
20
+ // Flex & Alignment
21
+ "flex items-center justify-center",
22
+
23
+ // Size
24
+ "w-full h-full",
25
+
26
+ // Color
27
+ "bg-surface-100/40 dark:bg-surface-800/40",
28
+
29
+ // Transition
30
+ "transition duration-200",
31
+ ],
32
+ },
33
+ loadingicon: {
34
+ class: "w-8 h-8 animate-spin",
35
+ },
36
+ wrapper: ({ props }) => ({
37
+ class: [
38
+ {
39
+ relative: props.scrollable,
40
+ "flex flex-col grow": props.scrollable && props.scrollHeight === "flex",
41
+ },
42
+
43
+ // Size
44
+ { "h-full": props.scrollable && props.scrollHeight === "flex" },
45
+ ],
46
+ }),
47
+ header: ({ props }) => ({
48
+ class: [
49
+ "font-bold",
50
+
51
+ // Shape
52
+ props.showGridlines
53
+ ? "border-x border-t border-b-0"
54
+ : "border-y border-x-0",
55
+
56
+ // Spacing
57
+ "p-4",
58
+
59
+ // Color
60
+ "bg-surface-50 dark:bg-surface-800",
61
+ "border-surface-200 dark:border-surface-700",
62
+ "text-surface-700 dark:text-white/80",
63
+ ],
64
+ }),
65
+ table: {
66
+ class: "w-full border-spacing-0 border-separate",
67
+ },
68
+ thead: ({ context }) => ({
69
+ class: [
70
+ {
71
+ "bg-surface-50 top-0 z-40 sticky": context.scrollable,
72
+ },
73
+ ],
74
+ }),
75
+ tbody: ({ instance, context }) => ({
76
+ class: [
77
+ {
78
+ "sticky z-20": instance.frozenRow && context.scrollable,
79
+ },
80
+ ],
81
+ }),
82
+ tfoot: ({ context }) => ({
83
+ class: [
84
+ {
85
+ "bg-surface-50 bottom-0 z-0": context.scrollable,
86
+ },
87
+ ],
88
+ }),
89
+ footer: {
90
+ class: [
91
+ "font-bold",
92
+
93
+ // Shape
94
+ "border-t-0 border-b border-x-0",
95
+
96
+ // Spacing
97
+ "p-4",
98
+
99
+ // Color
100
+ "bg-surface-50 dark:bg-surface-800",
101
+ "border-surface-200 dark:border-surface-700",
102
+ "text-surface-700 dark:text-white/80",
103
+ ],
104
+ },
105
+ column: {
106
+ headercell: ({ context, props }) => ({
107
+ class: [
108
+ "font-bold",
109
+
110
+ // Position
111
+ { "sticky z-20 border-b": props.frozen || props.frozen === "" },
112
+
113
+ { relative: context.resizable },
114
+
115
+ // Alignment
116
+ "text-left",
117
+
118
+ // Shape
119
+ { "first:border-l border-y border-r": context?.showGridlines },
120
+ "border-0 border-b border-solid",
121
+
122
+ // Spacing
123
+ context?.size === "small"
124
+ ? "p-2"
125
+ : context?.size === "large"
126
+ ? "p-5"
127
+ : "p-4",
128
+
129
+ // Color
130
+ (props.sortable === "" || props.sortable) && context.sorted
131
+ ? "bg-primary-50 text-primary-700"
132
+ : "bg-surface-50 text-surface-700",
133
+ (props.sortable === "" || props.sortable) && context.sorted
134
+ ? "dark:text-white dark:bg-primary-400/30"
135
+ : "dark:text-white/80 dark:bg-surface-800",
136
+ "border-surface-200 dark:border-surface-700 ",
137
+
138
+ // States
139
+ {
140
+ "hover:bg-surface-100 dark:hover:bg-surface-400/30":
141
+ (props.sortable === "" || props.sortable) && !context?.sorted,
142
+ },
143
+ "focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:ring focus-visible:ring-inset focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50",
144
+
145
+ // Transition
146
+ { "transition duration-200": props.sortable === "" || props.sortable },
147
+
148
+ // Misc
149
+ { "cursor-pointer": props.sortable === "" || props.sortable },
150
+ {
151
+ "overflow-hidden space-nowrap border-y bg-clip-padding":
152
+ context.resizable, // Resizable
153
+ },
154
+ ],
155
+ }),
156
+ headercontent: {
157
+ class: "flex items-center",
158
+ },
159
+ sort: ({ context }) => ({
160
+ class: [
161
+ context.sorted ? "text-primary-500" : "text-surface-700",
162
+ context.sorted ? "dark:text-primary-400" : "dark:text-white/80",
163
+ ],
164
+ }),
165
+ bodycell: ({ props, context, state, parent }) => ({
166
+ class: [
167
+ // Position
168
+ { "sticky box-border border-b": parent.instance.frozenRow },
169
+ { "sticky box-border border-b": props.frozen || props.frozen === "" },
170
+
171
+ // Alignment
172
+ "text-left",
173
+
174
+ // Shape
175
+ "border-0 border-b border-solid",
176
+ { "first:border-l border-r border-b": context?.showGridlines },
177
+ {
178
+ "bg-surface-0 dark:bg-surface-800":
179
+ parent.instance.frozenRow || props.frozen || props.frozen === "",
180
+ },
181
+
182
+ // Spacing
183
+ { "p-2": context?.size === "small" && !state.d_editing },
184
+ { "p-5": context?.size === "large" && !state.d_editing },
185
+ {
186
+ "p-4":
187
+ context?.size !== "large" &&
188
+ context?.size !== "small" &&
189
+ !state.d_editing,
190
+ },
191
+ { "py-[0.6rem] px-2": state.d_editing },
192
+
193
+ // Color
194
+ "border-surface-200 dark:border-surface-700",
195
+ ],
196
+ }),
197
+ footercell: ({ context }) => ({
198
+ class: [
199
+ // Font
200
+ "font-bold",
201
+
202
+ // Alignment
203
+ "text-left",
204
+
205
+ // Shape
206
+ "border-0 border-b border-solid",
207
+ { "border-x border-y": context?.showGridlines },
208
+
209
+ // Spacing
210
+ context?.size === "small"
211
+ ? "p-2"
212
+ : context?.size === "large"
213
+ ? "p-5"
214
+ : "p-4",
215
+
216
+ // Color
217
+ "border-surface-200 dark:border-surface-700",
218
+ "text-surface-700 dark:text-white/80",
219
+ "bg-surface-50 dark:bg-surface-800",
220
+ ],
221
+ }),
222
+ sorticon: ({ context }) => ({
223
+ class: [
224
+ "ml-2",
225
+ context.sorted
226
+ ? "text-primary-700 dark:text-white/80"
227
+ : "text-surface-700 dark:text-white/70",
228
+ ],
229
+ }),
230
+ sortbadge: {
231
+ class: [
232
+ // Flex & Alignment
233
+ "flex items-center justify-center align-middle",
234
+
235
+ // Shape
236
+ "rounded-full",
237
+
238
+ // Size
239
+ "w-[1.143rem] leading-[1.143rem]",
240
+
241
+ // Spacing
242
+ "ml-2",
243
+
244
+ // Color
245
+ "text-primary-700 dark:text-white",
246
+ "bg-primary-50 dark:bg-primary-400/30",
247
+ ],
248
+ },
249
+ columnfilter: {
250
+ class: "inline-flex items-center ml-auto",
251
+ },
252
+ filteroverlay: {
253
+ class: [
254
+ // Position
255
+ "absolute top-0 left-0",
256
+
257
+ // Shape
258
+ "border-0 dark:border",
259
+ "rounded-md",
260
+ "shadow-md",
261
+
262
+ // Size
263
+ "min-w-[12.5rem]",
264
+
265
+ // Color
266
+ "bg-surface-0 dark:bg-surface-800",
267
+ "text-surface-800 dark:text-white/80",
268
+ "dark:border-surface-700",
269
+ ],
270
+ },
271
+ filtermatchmodedropdown: {
272
+ root: ({ state }) => ({
273
+ class: [
274
+ // Display and Position
275
+ "flex",
276
+ "relative",
277
+
278
+ // Spacing
279
+ "my-2",
280
+
281
+ // Shape
282
+ "w-full",
283
+ "rounded-md",
284
+
285
+ // Color and Background
286
+ "bg-surface-0 dark:bg-surface-900",
287
+ "border border-surface-300 dark:border-surface-700",
288
+ "text-surface-800 dark:text-white/80",
289
+ "placeholder:text-surface-400 dark:placeholder:text-surface-500",
290
+
291
+ // Transitions
292
+ "transition-all",
293
+ "duration-200",
294
+
295
+ // States
296
+ "hover:border-primary-500 dark:hover:border-primary-300",
297
+ {
298
+ "outline-none outline-offset-0 ring ring-primary-400/50 dark:ring-primary-300/50":
299
+ state.focused,
300
+ },
301
+
302
+ // Misc
303
+ "cursor-pointer",
304
+ "select-none",
305
+ ],
306
+ }),
307
+ },
308
+ filterrowitems: {
309
+ class: "m-0 p-0 py-3 list-none",
310
+ },
311
+ filterrowitem: ({ context }) => ({
312
+ class: [
313
+ // Font
314
+ "font-normal",
315
+ "leading-none",
316
+
317
+ // Position
318
+ "relative",
319
+
320
+ // Shape
321
+ "border-0",
322
+ "rounded-none",
323
+
324
+ // Spacing
325
+ "m-0",
326
+ "py-3 px-5",
327
+
328
+ // Color
329
+ { "text-surface-700 dark:text-white/80": !context?.highlighted },
330
+ {
331
+ "bg-surface-0 dark:bg-surface-800 text-surface-700 dark:text-white/80":
332
+ !context?.highlighted,
333
+ },
334
+ {
335
+ "bg-primary-100 dark:bg-primary-400/40 text-primary-700 dark:text-white/80":
336
+ context?.highlighted,
337
+ },
338
+ {
339
+ "bg-primary-50 dark:bg-primary-400/40 text-primary-700 dark:text-white/80":
340
+ context?.highlighted,
341
+ },
342
+
343
+ // States
344
+ {
345
+ "hover:bg-surface-100 dark:hover:bg-surface-600/80":
346
+ !context?.highlighted,
347
+ },
348
+ {
349
+ "hover:text-surface-700 hover:bg-surface-100 dark:hover:text-white dark:hover:bg-surface-600/80":
350
+ !context?.highlighted,
351
+ },
352
+ "focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:ring focus-visible:ring-inset focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50",
353
+
354
+ // Transitions
355
+ "transition-shadow",
356
+ "duration-200",
357
+
358
+ // Misc
359
+ "cursor-pointer",
360
+ "overflow-hidden",
361
+ "whitespace-nowrap",
362
+ ],
363
+ }),
364
+ filteroperator: {
365
+ class: [
366
+ // Spacing
367
+ "px-5 py-3",
368
+
369
+ // Shape
370
+ "border-b border-solid",
371
+ "rounded-t-md",
372
+
373
+ // Color
374
+ "text-surface-700 dark:text-white/80",
375
+ "border-surface-200 dark:border-surface-800",
376
+ "bg-surface-0 dark:bg-surface-700",
377
+ ],
378
+ },
379
+ filteroperatordropdown: {
380
+ root: ({ state }) => ({
381
+ class: [
382
+ // Display and Position
383
+ "inline-flex",
384
+ "relative",
385
+
386
+ // Shape
387
+ "w-full",
388
+ "rounded-md",
389
+
390
+ // Color and Background
391
+ "bg-surface-0 dark:bg-surface-900",
392
+ "border border-surface-300 dark:border-surface-700",
393
+
394
+ // Transitions
395
+ "transition-all",
396
+ "duration-200",
397
+
398
+ // States
399
+ "hover:border-primary-500 dark:hover:border-primary-300",
400
+ {
401
+ "outline-none outline-offset-0 ring ring-primary-400/50 dark:ring-primary-300/50":
402
+ state.focused,
403
+ },
404
+
405
+ // Misc
406
+ "cursor-pointer",
407
+ "select-none",
408
+ ],
409
+ }),
410
+ input: ({ props }) => ({
411
+ class: [
412
+ // Font
413
+ "font-sans",
414
+ "leading-none",
415
+
416
+ // Display
417
+ "block",
418
+ "flex-auto",
419
+
420
+ // Color and Background
421
+ "bg-transparent",
422
+ "border-0",
423
+ {
424
+ "text-surface-800 dark:text-white/80": props.modelValue,
425
+ "text-surface-400 dark:text-surface-500": !props.modelValue,
426
+ },
427
+ "placeholder:text-surface-400 dark:placeholder:text-surface-500",
428
+
429
+ // Sizing and Spacing
430
+ "w-[1%]",
431
+ "p-3",
432
+
433
+ // Shape
434
+ "rounded-none",
435
+
436
+ // Transitions
437
+ "transition",
438
+ "duration-200",
439
+
440
+ // States
441
+ "focus:outline-none focus:shadow-none",
442
+
443
+ // Misc
444
+ "relative",
445
+ "cursor-pointer",
446
+ "overflow-hidden overflow-ellipsis",
447
+ "whitespace-nowrap",
448
+ "appearance-none",
449
+ ],
450
+ }),
451
+ trigger: {
452
+ class: [
453
+ // Flexbox
454
+ "flex items-center justify-center",
455
+ "shrink-0",
456
+
457
+ // Color and Background
458
+ "bg-transparent",
459
+ "text-surface-500",
460
+
461
+ // Size
462
+ "w-12",
463
+
464
+ // Shape
465
+ "rounded-tr-md",
466
+ "rounded-br-md",
467
+ ],
468
+ },
469
+ panel: {
470
+ class: [
471
+ // Position
472
+ "absolute top-0 left-0",
473
+
474
+ // Shape
475
+ "border-0 dark:border",
476
+ "rounded-md",
477
+ "shadow-md",
478
+
479
+ // Color
480
+ "bg-surface-0 dark:bg-surface-800",
481
+ "text-surface-800 dark:text-white/80",
482
+ "dark:border-surface-700",
483
+ ],
484
+ },
485
+ item: ({ context }) => ({
486
+ class: [
487
+ // Font
488
+ "font-normal",
489
+ "leading-none",
490
+
491
+ // Position
492
+ "relative",
493
+
494
+ // Shape
495
+ "border-0",
496
+ "rounded-none",
497
+
498
+ // Spacing
499
+ "m-0",
500
+ "py-3 px-5",
501
+
502
+ // Color
503
+ {
504
+ "text-surface-700 dark:text-white/80":
505
+ !context.focused && !context.selected,
506
+ },
507
+ {
508
+ "bg-surface-50 dark:bg-surface-600/60 text-surface-700 dark:text-white/80":
509
+ context.focused && !context.selected,
510
+ },
511
+ {
512
+ "bg-primary-100 dark:bg-primary-400/40 text-primary-700 dark:text-white/80":
513
+ context.focused && context.selected,
514
+ },
515
+ {
516
+ "bg-primary-50 dark:bg-primary-400/40 text-primary-700 dark:text-white/80":
517
+ !context.focused && context.selected,
518
+ },
519
+
520
+ // States
521
+ {
522
+ "hover:bg-surface-100 dark:hover:bg-surface-600/80":
523
+ !context.focused && !context.selected,
524
+ },
525
+ {
526
+ "hover:text-surface-700 hover:bg-surface-100 dark:hover:text-white dark:hover:bg-surface-600/80":
527
+ context.focused && !context.selected,
528
+ },
529
+
530
+ // Transitions
531
+ "transition-shadow",
532
+ "duration-200",
533
+
534
+ // Misc
535
+ "cursor-pointer",
536
+ "overflow-hidden",
537
+ "whitespace-nowrap",
538
+ ],
539
+ }),
540
+ },
541
+ filterconstraint: {
542
+ class: [
543
+ // Spacing
544
+ "py-3 px-5",
545
+
546
+ // Shape
547
+ "border-b border-solid",
548
+
549
+ // Color
550
+ "border-surface-200 dark:border-surface-700",
551
+ ],
552
+ },
553
+ filteraddrule: {
554
+ class: "py-3 px-5",
555
+ },
556
+ filteraddrulebutton: {
557
+ root: {
558
+ class: [
559
+ "relative",
560
+
561
+ // Alignments
562
+ "items-center inline-flex text-center align-bottom justify-center",
563
+
564
+ // Sizes & Spacing
565
+ "text-sm py-2 px-3 w-full",
566
+
567
+ // Shape
568
+ "rounded-md",
569
+
570
+ "bg-transparent border-transparent",
571
+ "text-primary-500 dark:text-primary-400",
572
+ "hover:bg-primary-300/20",
573
+
574
+ // Transitions
575
+ "transition duration-200 ease-in-out",
576
+
577
+ // Misc
578
+ "cursor-pointer overflow-hidden select-none",
579
+ ],
580
+ },
581
+ label: {
582
+ class: "flex-auto grow-0",
583
+ },
584
+ icon: {
585
+ class: "mr-2",
586
+ },
587
+ },
588
+ filterremovebutton: {
589
+ root: {
590
+ class: [
591
+ "relative",
592
+
593
+ // Alignments
594
+ "items-center inline-flex text-center align-bottom justify-center",
595
+
596
+ // Sizes & Spacing
597
+ "text-sm py-2 px-3 w-full mt-2",
598
+
599
+ // Shape
600
+ "rounded-md",
601
+
602
+ "bg-transparent border-transparent",
603
+ "text-red-500 dark:text-red-400",
604
+ "hover:bg-red-300/20",
605
+
606
+ // Transitions
607
+ "transition duration-200 ease-in-out",
608
+
609
+ // Misc
610
+ "cursor-pointer overflow-hidden select-none",
611
+ ],
612
+ },
613
+ label: {
614
+ class: "flex-auto grow-0",
615
+ },
616
+ icon: {
617
+ class: "mr-2",
618
+ },
619
+ },
620
+ filterbuttonbar: {
621
+ class: [
622
+ // Flex & Alignment
623
+ "flex items-center justify-between",
624
+
625
+ // Space
626
+ "py-3 px-5",
627
+ ],
628
+ },
629
+ filterclearbutton: {
630
+ root: {
631
+ class: [
632
+ "relative",
633
+
634
+ // Alignments
635
+ "items-center inline-flex text-center align-bottom justify-center",
636
+
637
+ // Sizes & Spacing
638
+ "text-sm py-2 px-3",
639
+
640
+ // Shape
641
+ "rounded-md",
642
+
643
+ "text-primary-500 border border-primary-500",
644
+ "hover:bg-primary-300/20",
645
+
646
+ // Transitions
647
+ "transition duration-200 ease-in-out",
648
+
649
+ // Misc
650
+ "cursor-pointer overflow-hidden select-none",
651
+ ],
652
+ },
653
+ },
654
+ filterapplybutton: {
655
+ root: {
656
+ class: [
657
+ "relative",
658
+
659
+ // Alignments
660
+ "items-center inline-flex text-center align-bottom justify-center",
661
+
662
+ // Sizes & Spacing
663
+ "text-sm py-2 px-3",
664
+
665
+ // Shape
666
+ "rounded-md",
667
+
668
+ "text-white dark:text-surface-900",
669
+ "bg-primary-500 dark:bg-primary-400",
670
+ "hover:bg-primary-600 dark:hover:bg-primary-300 hover:border-primary-600 dark:hover:border-primary-300",
671
+
672
+ // Transitions
673
+ "transition duration-200 ease-in-out",
674
+
675
+ // Misc
676
+ "cursor-pointer overflow-hidden select-none",
677
+ ],
678
+ },
679
+ },
680
+ filtermenubutton: ({ context }) => ({
681
+ class: [
682
+ "relative",
683
+ // Flex & Alignment
684
+ "inline-flex items-center justify-center",
685
+
686
+ // Size
687
+ "w-8 h-8",
688
+
689
+ // Spacing
690
+ "ml-2",
691
+
692
+ // Shape
693
+ "rounded-full",
694
+
695
+ // Color
696
+ { "bg-primary-50 text-primary-700": context.active },
697
+ "dark:text-white/70 dark:hover:text-white/80 dark:bg-surface-800",
698
+
699
+ // States
700
+ "hover:text-surface-700 hover:bg-surface-300/20",
701
+ "focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50",
702
+
703
+ // Transition
704
+ "transition duration-200",
705
+
706
+ // Misc
707
+ "cursor-pointer no-underline overflow-hidden",
708
+ ],
709
+ }),
710
+ headerfilterclearbutton: ({ context }) => ({
711
+ class: [
712
+ "relative",
713
+
714
+ // Flex & Alignment
715
+ "inline-flex items-center justify-center",
716
+ "text-left",
717
+
718
+ // Shape
719
+ "border-none",
720
+
721
+ // Spacing
722
+ "m-0 p-0 ml-2",
723
+
724
+ // Color
725
+ "bg-transparent",
726
+
727
+ // Misc
728
+ "cursor-pointer no-underline overflow-hidden select-none",
729
+ {
730
+ invisible: !context.hidden,
731
+ },
732
+ ],
733
+ }),
734
+ rowtoggler: {
735
+ class: [
736
+ "relative",
737
+
738
+ // Flex & Alignment
739
+ "inline-flex items-center justify-center",
740
+ "text-left",
741
+
742
+ // Spacing
743
+ "m-0 p-0",
744
+
745
+ // Size
746
+ "w-8 h-8",
747
+
748
+ // Shape
749
+ "border-0 rounded-full",
750
+
751
+ // Color
752
+ "text-surface-500 dark:text-white/70",
753
+ "bg-transparent",
754
+ "focus-visible:outline-none focus-visible:outline-offset-0",
755
+ "focus-visible:ring focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50",
756
+
757
+ // Transition
758
+ "transition duration-200",
759
+
760
+ // Misc
761
+ "overflow-hidden",
762
+ "cursor-pointer select-none",
763
+ ],
764
+ },
765
+ columnresizer: {
766
+ class: [
767
+ "block",
768
+
769
+ // Position
770
+ "absolute top-0 right-0",
771
+
772
+ // Sizing
773
+ "w-2 h-full",
774
+
775
+ // Spacing
776
+ "m-0 p-0",
777
+
778
+ // Color
779
+ "border border-transparent",
780
+
781
+ // Misc
782
+ "cursor-col-resize",
783
+ ],
784
+ },
785
+ rowreordericon: {
786
+ class: "cursor-move",
787
+ },
788
+ roweditorinitbutton: {
789
+ class: [
790
+ "relative",
791
+
792
+ // Flex & Alignment
793
+ "inline-flex items-center justify-center",
794
+ "text-left",
795
+
796
+ // Size
797
+ "w-8 h-8",
798
+
799
+ // Shape
800
+ "border-0 rounded-full",
801
+
802
+ // Color
803
+ "text-surface-700 dark:text-white/70",
804
+ "border-transparent",
805
+
806
+ // States
807
+ "focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50",
808
+ "hover:text-surface-700 hover:bg-surface-300/20",
809
+
810
+ // Transition
811
+ "transition duration-200",
812
+
813
+ // Misc
814
+ "overflow-hidden",
815
+ "cursor-pointer select-none",
816
+ ],
817
+ },
818
+ roweditorsavebutton: {
819
+ class: [
820
+ "relative",
821
+
822
+ // Flex & Alignment
823
+ "inline-flex items-center justify-center",
824
+ "text-left",
825
+
826
+ // Size
827
+ "w-8 h-8",
828
+
829
+ // Shape
830
+ "border-0 rounded-full",
831
+
832
+ // Color
833
+ "text-surface-700 dark:text-white/70",
834
+ "border-transparent",
835
+
836
+ // States
837
+ "focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50",
838
+ "hover:text-surface-700 hover:bg-surface-300/20",
839
+
840
+ // Transition
841
+ "transition duration-200",
842
+
843
+ // Misc
844
+ "overflow-hidden",
845
+ "cursor-pointer select-none",
846
+ ],
847
+ },
848
+ roweditorcancelbutton: {
849
+ class: [
850
+ "relative",
851
+
852
+ // Flex & Alignment
853
+ "inline-flex items-center justify-center",
854
+ "text-left",
855
+
856
+ // Size
857
+ "w-8 h-8",
858
+
859
+ // Shape
860
+ "border-0 rounded-full",
861
+
862
+ // Color
863
+ "text-surface-700 dark:text-white/70",
864
+ "border-transparent",
865
+
866
+ // States
867
+ "focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50",
868
+ "hover:text-surface-700 hover:bg-surface-300/20",
869
+
870
+ // Transition
871
+ "transition duration-200",
872
+
873
+ // Misc
874
+ "overflow-hidden",
875
+ "cursor-pointer select-none",
876
+ ],
877
+ },
878
+ rowRadiobutton: {
879
+ root: {
880
+ class: [
881
+ "relative",
882
+
883
+ // Flexbox & Alignment
884
+ "inline-flex",
885
+ "align-bottom",
886
+
887
+ // Size
888
+ "w-[1.571rem] h-[1.571rem]",
889
+
890
+ // Misc
891
+ "cursor-pointer",
892
+ "select-none",
893
+ ],
894
+ },
895
+ box: ({ props }) => ({
896
+ class: [
897
+ // Flexbox
898
+ "flex justify-center items-center",
899
+
900
+ // Size
901
+ "w-[1.571rem] h-[1.571rem]",
902
+
903
+ // Shape
904
+ "border-2",
905
+ "rounded-full",
906
+
907
+ // Transition
908
+ "transition duration-200 ease-in-out",
909
+
910
+ // Colors
911
+ {
912
+ "text-surface-700 dark:text-white/80": !props.modelValue,
913
+ "bg-surface-0 dark:bg-surface-900": !props.modelValue,
914
+ "border-surface-300 dark:border-surface-700": !props.modelValue,
915
+ "border-primary-500 dark:border-primary-400": props.modelValue,
916
+ "bg-primary-500 dark:bg-primary-400": props.modelValue,
917
+ },
918
+
919
+ // States
920
+ {
921
+ "peer-hover:border-primary-500 dark:peer-hover:border-primary-400":
922
+ !props.disabled,
923
+ "peer-hover:border-primary-600 dark:peer-hover:border-primary-300 peer-hover:bg-primary-600 dark:peer-hover:bg-primary-300":
924
+ !props.disabled && props.modelValue,
925
+ "peer-focus-visible:border-primary-500 dark:peer-focus-visible:border-primary-400 peer-focus-visible:ring-2 peer-focus-visible:ring-primary-400/20 dark:peer-focus-visible:ring-primary-300/20":
926
+ !props.disabled,
927
+ "opacity-60 cursor-default": props.disabled,
928
+ },
929
+ ],
930
+ }),
931
+ input: {
932
+ class: [
933
+ "peer",
934
+
935
+ // Size
936
+ "w-full ",
937
+ "h-full",
938
+
939
+ // Position
940
+ "absolute",
941
+ "top-0 left-0",
942
+ "z-10",
943
+
944
+ // Spacing
945
+ "p-0",
946
+ "m-0",
947
+
948
+ // Shape
949
+ "opacity-0",
950
+ "rounded-md",
951
+ "outline-none",
952
+ "border-2 border-surface-200 dark:border-surface-700",
953
+
954
+ // Misc
955
+ "appearance-none",
956
+ "cursor-pointer",
957
+ ],
958
+ },
959
+ icon: ({ props }) => ({
960
+ class: [
961
+ "block",
962
+
963
+ // Shape
964
+ "rounded-full",
965
+
966
+ // Size
967
+ "w-[0.857rem] h-[0.857rem]",
968
+
969
+ // Colors
970
+ "bg-surface-0 dark:bg-surface-900",
971
+
972
+ // Conditions
973
+ {
974
+ "backface-hidden scale-10 invisible": !props.modelValue,
975
+ "transform visible scale-[1.1]": props.modelValue,
976
+ },
977
+
978
+ // Transition
979
+ "transition duration-200",
980
+ ],
981
+ }),
982
+ },
983
+ headercheckbox: {
984
+ root: {
985
+ class: [
986
+ "relative",
987
+
988
+ // Alignment
989
+ "inline-flex",
990
+ "align-bottom",
991
+
992
+ // Size
993
+ "w-6",
994
+ "h-6",
995
+
996
+ // Misc
997
+ "cursor-pointer",
998
+ "select-none",
999
+ ],
1000
+ },
1001
+ box: ({ props, context }) => ({
1002
+ class: [
1003
+ // Alignment
1004
+ "flex",
1005
+ "items-center",
1006
+ "justify-center",
1007
+
1008
+ // Size
1009
+ "w-6",
1010
+ "h-6",
1011
+
1012
+ // Shape
1013
+ "rounded-md",
1014
+ "border-2",
1015
+
1016
+ // Colors
1017
+ {
1018
+ "border-surface-200 bg-surface-0 dark:border-surface-700 dark:bg-surface-900":
1019
+ !context.checked,
1020
+ "border-primary-500 bg-primary-500 dark:border-primary-400 dark:bg-primary-400":
1021
+ context.checked,
1022
+ },
1023
+
1024
+ // States
1025
+ {
1026
+ "peer-hover:border-primary-500 dark:peer-hover:border-primary-400":
1027
+ !props.disabled && !context.checked,
1028
+ "peer-hover:bg-primary-600 dark:peer-hover:bg-primary-300 peer-hover:border-primary-700 dark:peer-hover:border-primary-300":
1029
+ !props.disabled && context.checked,
1030
+ "peer-focus-visible:border-primary-500 dark:peer-focus-visible:border-primary-400 peer-focus-visible:ring-2 peer-focus-visible:ring-primary-400/20 dark:peer-focus-visible:ring-primary-300/20":
1031
+ !props.disabled,
1032
+ "cursor-default opacity-60": props.disabled,
1033
+ },
1034
+
1035
+ // Transitions
1036
+ "transition-colors",
1037
+ "duration-200",
1038
+ ],
1039
+ }),
1040
+ input: {
1041
+ class: [
1042
+ "peer",
1043
+
1044
+ // Size
1045
+ "w-full ",
1046
+ "h-full",
1047
+
1048
+ // Position
1049
+ "absolute",
1050
+ "top-0 left-0",
1051
+ "z-10",
1052
+
1053
+ // Spacing
1054
+ "p-0",
1055
+ "m-0",
1056
+
1057
+ // Shape
1058
+ "opacity-0",
1059
+ "rounded-md",
1060
+ "outline-none",
1061
+ "border-2 border-surface-200 dark:border-surface-700",
1062
+
1063
+ // Misc
1064
+ "appearance-none",
1065
+ "cursor-pointer",
1066
+ ],
1067
+ },
1068
+ icon: {
1069
+ class: [
1070
+ // Font
1071
+ "text-base leading-none",
1072
+
1073
+ // Size
1074
+ "w-4",
1075
+ "h-4",
1076
+
1077
+ // Colors
1078
+ "text-white dark:text-surface-900",
1079
+
1080
+ // Transitions
1081
+ "transition-all",
1082
+ "duration-200",
1083
+ ],
1084
+ },
1085
+ },
1086
+ rowCheckbox: {
1087
+ root: {
1088
+ class: [
1089
+ "relative",
1090
+
1091
+ // Alignment
1092
+ "inline-flex",
1093
+ "align-bottom",
1094
+
1095
+ // Size
1096
+ "w-6",
1097
+ "h-6",
1098
+
1099
+ // Misc
1100
+ "cursor-pointer",
1101
+ "select-none",
1102
+ ],
1103
+ },
1104
+ box: ({ props, context }) => ({
1105
+ class: [
1106
+ // Alignment
1107
+ "flex",
1108
+ "items-center",
1109
+ "justify-center",
1110
+
1111
+ // Size
1112
+ "w-6",
1113
+ "h-6",
1114
+
1115
+ // Shape
1116
+ "rounded-md",
1117
+ "border-2",
1118
+
1119
+ // Colors
1120
+ {
1121
+ "border-surface-200 bg-surface-0 dark:border-surface-700 dark:bg-surface-900":
1122
+ !context.checked,
1123
+ "border-primary-500 bg-primary-500 dark:border-primary-400 dark:bg-primary-400":
1124
+ context.checked,
1125
+ },
1126
+
1127
+ // States
1128
+ {
1129
+ "peer-hover:border-primary-500 dark:peer-hover:border-primary-400":
1130
+ !props.disabled && !context.checked,
1131
+ "peer-hover:bg-primary-600 dark:peer-hover:bg-primary-300 peer-hover:border-primary-700 dark:peer-hover:border-primary-300":
1132
+ !props.disabled && context.checked,
1133
+ "peer-focus-visible:border-primary-500 dark:peer-focus-visible:border-primary-400 peer-focus-visible:ring-2 peer-focus-visible:ring-primary-400/20 dark:peer-focus-visible:ring-primary-300/20":
1134
+ !props.disabled,
1135
+ "cursor-default opacity-60": props.disabled,
1136
+ },
1137
+
1138
+ // Transitions
1139
+ "transition-colors",
1140
+ "duration-200",
1141
+ ],
1142
+ }),
1143
+ input: {
1144
+ class: [
1145
+ "peer",
1146
+
1147
+ // Size
1148
+ "w-full ",
1149
+ "h-full",
1150
+
1151
+ // Position
1152
+ "absolute",
1153
+ "top-0 left-0",
1154
+ "z-10",
1155
+
1156
+ // Spacing
1157
+ "p-0",
1158
+ "m-0",
1159
+
1160
+ // Shape
1161
+ "opacity-0",
1162
+ "rounded-md",
1163
+ "outline-none",
1164
+ "border-2 border-surface-200 dark:border-surface-700",
1165
+
1166
+ // Misc
1167
+ "appearance-none",
1168
+ "cursor-pointer",
1169
+ ],
1170
+ },
1171
+ icon: {
1172
+ class: [
1173
+ // Font
1174
+ "text-base leading-none",
1175
+
1176
+ // Size
1177
+ "w-4",
1178
+ "h-4",
1179
+
1180
+ // Colors
1181
+ "text-white dark:text-surface-900",
1182
+
1183
+ // Transitions
1184
+ "transition-all",
1185
+ "duration-200",
1186
+ ],
1187
+ },
1188
+ },
1189
+ transition: {
1190
+ enterFromClass: "opacity-0 scale-y-[0.8]",
1191
+ enterActiveClass:
1192
+ "transition-[transform,opacity] duration-[120ms] ease-[cubic-bezier(0,0,0.2,1)]",
1193
+ leaveActiveClass: "transition-opacity duration-100 ease-linear",
1194
+ leaveToClass: "opacity-0",
1195
+ },
1196
+ },
1197
+ bodyrow: ({ context, props }) => ({
1198
+ class: [
1199
+ // Color
1200
+ "dark:text-white/80",
1201
+ {
1202
+ "bg-primary-50 text-primary-700 dark:bg-primary-400/30":
1203
+ context.selected,
1204
+ },
1205
+ {
1206
+ "bg-surface-0 text-surface-600 dark:bg-surface-800": !context.selected,
1207
+ },
1208
+ { "font-bold bg-surface-0 dark:bg-surface-800": props.frozenRow },
1209
+ {
1210
+ "odd:bg-surface-0 odd:text-surface-600 dark:odd:bg-surface-800 even:bg-surface-50 even:text-surface-600 dark:even:bg-surface-900/50":
1211
+ context.stripedRows,
1212
+ },
1213
+
1214
+ // State
1215
+ {
1216
+ "focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 ring-inset dark:focus:ring-primary-300/50":
1217
+ context.selectable,
1218
+ },
1219
+ {
1220
+ "hover:bg-surface-300/20 hover:text-surface-600":
1221
+ props.selectionMode && !context.selected,
1222
+ },
1223
+
1224
+ // Transition
1225
+ {
1226
+ "transition duration-200":
1227
+ (props.selectionMode && !context.selected) || props.rowHover,
1228
+ },
1229
+
1230
+ // Misc
1231
+ { "cursor-pointer": props.selectionMode },
1232
+ ],
1233
+ }),
1234
+ rowexpansion: {
1235
+ class:
1236
+ "bg-surface-0 dark:bg-surface-800 text-surface-600 dark:text-white/80",
1237
+ },
1238
+ rowgroupheader: {
1239
+ class: [
1240
+ "sticky z-20",
1241
+ "bg-surface-0 text-surface-600 dark:text-white/70",
1242
+ "dark:bg-surface-800",
1243
+ ],
1244
+ },
1245
+ rowgroupfooter: {
1246
+ class: [
1247
+ "sticky z-20",
1248
+ "bg-surface-0 text-surface-600 dark:text-white/70",
1249
+ "dark:bg-surface-800",
1250
+ ],
1251
+ },
1252
+ rowgrouptoggler: {
1253
+ class: [
1254
+ "relative",
1255
+
1256
+ // Flex & Alignment
1257
+ "inline-flex items-center justify-center",
1258
+ "text-left",
1259
+
1260
+ // Spacing
1261
+ "m-0 p-0",
1262
+
1263
+ // Size
1264
+ "w-8 h-8",
1265
+
1266
+ // Shape
1267
+ "border-0 rounded-full",
1268
+
1269
+ // Color
1270
+ "text-surface-500 dark:text-white/70",
1271
+ "bg-transparent",
1272
+ "focus-visible:outline-none focus-visible:outline-offset-0",
1273
+ "focus-visible:ring focus-visible:ring-primary-400/50 dark:focus-visible:ring-primary-300/50",
1274
+
1275
+ // Transition
1276
+ "transition duration-200",
1277
+
1278
+ // Misc
1279
+ "overflow-hidden",
1280
+ "cursor-pointer select-none",
1281
+ ],
1282
+ },
1283
+ rowgrouptogglericon: {
1284
+ class: "inline-block w-4 h-4",
1285
+ },
1286
+ resizehelper: {
1287
+ class: "absolute hidden w-[2px] z-20 bg-primary-500 dark:bg-primary-400",
1288
+ },
1289
+ };