nuance-ui 0.2.1 → 0.2.5

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 (113) hide show
  1. package/LICENSE.md +9 -9
  2. package/README.md +75 -75
  3. package/dist/module.json +1 -1
  4. package/dist/runtime/components/action-icon/action-icon-section.vue +3 -3
  5. package/dist/runtime/components/action-icon/action-icon.vue +22 -22
  6. package/dist/runtime/components/alert.vue +128 -128
  7. package/dist/runtime/components/app-shell/app-shell-aside.vue +30 -30
  8. package/dist/runtime/components/app-shell/app-shell-footer.vue +29 -29
  9. package/dist/runtime/components/app-shell/app-shell-header.vue +30 -30
  10. package/dist/runtime/components/app-shell/app-shell-navbar.vue +34 -34
  11. package/dist/runtime/components/app-shell/app-shell-section.vue +10 -10
  12. package/dist/runtime/components/app-shell/app-shell.vue +34 -34
  13. package/dist/runtime/components/avatar/avatar-group.vue +3 -3
  14. package/dist/runtime/components/avatar/avatar.vue +14 -14
  15. package/dist/runtime/components/background-image.vue +18 -18
  16. package/dist/runtime/components/badge.vue +159 -160
  17. package/dist/runtime/components/box.vue +3 -3
  18. package/dist/runtime/components/breadcrumbs.vue +78 -78
  19. package/dist/runtime/components/button/button-group.vue +3 -3
  20. package/dist/runtime/components/button/button.vue +37 -37
  21. package/dist/runtime/components/button/unstyled-button.vue +23 -23
  22. package/dist/runtime/components/calendar/calendar.vue +60 -60
  23. package/dist/runtime/components/calendar/ui/core/calendar-cell.vue +115 -115
  24. package/dist/runtime/components/calendar/ui/core/calendar-header.vue +95 -95
  25. package/dist/runtime/components/calendar/ui/core/calendar-root.vue +3 -3
  26. package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue +40 -40
  27. package/dist/runtime/components/calendar/ui/levels/calendar-month.vue +77 -77
  28. package/dist/runtime/components/calendar/ui/levels/calendar-year.vue +40 -40
  29. package/dist/runtime/components/card/card-section.vue +3 -3
  30. package/dist/runtime/components/card/card.vue +3 -3
  31. package/dist/runtime/components/checkbox/checkbox-card.vue +36 -36
  32. package/dist/runtime/components/checkbox/checkbox-group.vue +16 -16
  33. package/dist/runtime/components/checkbox/checkbox-indicator.vue +116 -116
  34. package/dist/runtime/components/checkbox/checkbox.vue +140 -140
  35. package/dist/runtime/components/chip/chip-group.vue +2 -2
  36. package/dist/runtime/components/chip/chip.vue +200 -200
  37. package/dist/runtime/components/combobox/combobox-dropdown.vue +14 -14
  38. package/dist/runtime/components/combobox/combobox-empty.vue +3 -3
  39. package/dist/runtime/components/combobox/combobox-group.vue +21 -21
  40. package/dist/runtime/components/combobox/combobox-option-list.vue +3 -3
  41. package/dist/runtime/components/combobox/combobox-option.vue +26 -26
  42. package/dist/runtime/components/combobox/combobox-options-dropdown.vue +28 -28
  43. package/dist/runtime/components/combobox/combobox-root.vue +3 -3
  44. package/dist/runtime/components/combobox/combobox-target.vue +3 -3
  45. package/dist/runtime/components/container.vue +8 -8
  46. package/dist/runtime/components/date-time-picker.vue +65 -65
  47. package/dist/runtime/components/dialog/ui/dialog-close-button.vue +11 -11
  48. package/dist/runtime/components/dialog/ui/dialog-header.vue +5 -5
  49. package/dist/runtime/components/dialog/ui/dialog-root.vue +20 -20
  50. package/dist/runtime/components/dialog/ui/dialog-title.vue +5 -5
  51. package/dist/runtime/components/drawer/drawer-close-button.vue +3 -3
  52. package/dist/runtime/components/drawer/drawer-header.vue +3 -3
  53. package/dist/runtime/components/drawer/drawer-root.vue +15 -15
  54. package/dist/runtime/components/drawer/drawer-title.vue +3 -3
  55. package/dist/runtime/components/files/file-upload-button.vue +12 -12
  56. package/dist/runtime/components/files/file-upload-icon.vue +1 -1
  57. package/dist/runtime/components/input/date-picker.vue +85 -85
  58. package/dist/runtime/components/input/email-input.vue +21 -21
  59. package/dist/runtime/components/input/number-input.vue +132 -132
  60. package/dist/runtime/components/input/password-input.vue +28 -28
  61. package/dist/runtime/components/input/text-input.vue +33 -33
  62. package/dist/runtime/components/input/ui/button-input.vue +64 -64
  63. package/dist/runtime/components/input/ui/input-base.vue +283 -283
  64. package/dist/runtime/components/input/ui/input-inline.vue +105 -105
  65. package/dist/runtime/components/input/ui/input-label.vue +4 -4
  66. package/dist/runtime/components/input/ui/input-wrapper.vue +54 -54
  67. package/dist/runtime/components/input/ui/spin-input.vue +69 -69
  68. package/dist/runtime/components/link/link-button.vue +16 -16
  69. package/dist/runtime/components/link/link.vue +10 -10
  70. package/dist/runtime/components/loader/_loaders/bars-loader.vue +5 -5
  71. package/dist/runtime/components/loader/_loaders/dots-loader.vue +5 -5
  72. package/dist/runtime/components/loader/_loaders/oval-loader.vue +1 -1
  73. package/dist/runtime/components/loader/loader.vue +1 -1
  74. package/dist/runtime/components/modal/modal-close-button.vue +3 -3
  75. package/dist/runtime/components/modal/modal-header.vue +3 -3
  76. package/dist/runtime/components/modal/modal-root.vue +13 -13
  77. package/dist/runtime/components/modal/modal-title.vue +3 -3
  78. package/dist/runtime/components/nav-link/nav-icon-link.vue +15 -15
  79. package/dist/runtime/components/nav-link/nav-link.vue +130 -130
  80. package/dist/runtime/components/paper.vue +33 -33
  81. package/dist/runtime/components/popover/popover-dropdown.vue +69 -70
  82. package/dist/runtime/components/popover/popover-target.vue +8 -8
  83. package/dist/runtime/components/popover/popover.vue +1 -1
  84. package/dist/runtime/components/progress/progress-label.vue +3 -3
  85. package/dist/runtime/components/progress/progress-root.vue +3 -3
  86. package/dist/runtime/components/progress/progress-section.vue +8 -8
  87. package/dist/runtime/components/progress/progress.vue +9 -9
  88. package/dist/runtime/components/renderless/renderless.vue +3 -3
  89. package/dist/runtime/components/roving-focus/roving-focus-item.vue +14 -14
  90. package/dist/runtime/components/roving-focus/roving-focus.vue +3 -3
  91. package/dist/runtime/components/select/select.vue +59 -59
  92. package/dist/runtime/components/table/table.d.ts +30 -30
  93. package/dist/runtime/components/table/ui/table-sort-icon.vue +1 -1
  94. package/dist/runtime/components/table/ui/table-sortable-header.vue +11 -11
  95. package/dist/runtime/components/table/ui/table.vue +295 -295
  96. package/dist/runtime/components/tabs/tabs-list.vue +10 -10
  97. package/dist/runtime/components/tabs/tabs-panel.vue +11 -11
  98. package/dist/runtime/components/tabs/tabs-root.vue +8 -8
  99. package/dist/runtime/components/tabs/tabs-tab.vue +20 -20
  100. package/dist/runtime/components/text.vue +67 -67
  101. package/dist/runtime/components/textarea.vue +34 -34
  102. package/dist/runtime/components/time-picker/time-picker.vue +230 -230
  103. package/dist/runtime/components/title.vue +14 -14
  104. package/dist/runtime/components/transition/transition.vue +3 -3
  105. package/dist/runtime/components/tree/_ui/tree-item.vue +128 -129
  106. package/dist/runtime/components/tree/_ui/tree-root.vue +21 -21
  107. package/dist/runtime/components/tree/tree.vue +20 -20
  108. package/dist/runtime/components/visually-hidden/visually-hidden-input.vue +1 -1
  109. package/dist/runtime/components/visually-hidden/visually-hidden.vue +9 -9
  110. package/dist/runtime/modals/_confirm-modal/confirm-modal.vue +31 -31
  111. package/dist/runtime/modals/modals-provider.vue +10 -10
  112. package/dist/runtime/styles/dark-theme.css +1 -1
  113. package/package.json +30 -10
@@ -216,319 +216,319 @@ defineExpose({
216
216
  </script>
217
217
 
218
218
  <template>
219
- <Box ref='rootRef' :class='[$style.root, props.classes?.root]' :style>
220
- <table ref='tableRef' :class='[$style.table, props.classes?.table]'>
221
- <caption v-if='caption || $slots.caption' :class='props.classes?.caption'>
222
- <slot name='caption'>
223
- {{ props.caption }}
224
- </slot>
225
- </caption>
226
-
227
- <Box
228
- is='thead'
229
- :class='$style.thead'
219
+ <Box ref='rootRef' :class='[$style.root, props.classes?.root]' :style>
220
+ <table ref='tableRef' :class='[$style.table, props.classes?.table]'>
221
+ <caption v-if='caption || $slots.caption' :class='props.classes?.caption'>
222
+ <slot name='caption'>
223
+ {{ props.caption }}
224
+ </slot>
225
+ </caption>
226
+
227
+ <Box
228
+ is='thead'
229
+ :class='$style.thead'
230
230
  :mod='{
231
231
  sticky: props.sticky === "header" || props.sticky === true,
232
232
  loading: props.loading
233
- }'
234
- >
235
- <tr v-for='headerGroup in table.getHeaderGroups()' :key='headerGroup.id' :class='$style.tr'>
236
- <Box
237
- is='th'
238
- v-for='header in headerGroup.headers'
239
- :key='header.id'
240
- :mod='{ pinned: header.column.getIsPinned() }'
241
- :scope="header.colSpan > 1 ? 'colgroup' : 'col'"
242
- :colspan='header.colSpan > 1 ? header.colSpan : void 0'
243
- :rowspan='header.rowSpan > 1 ? header.rowSpan : void 0'
233
+ }'
234
+ >
235
+ <tr v-for='headerGroup in table.getHeaderGroups()' :key='headerGroup.id' :class='$style.tr'>
236
+ <Box
237
+ is='th'
238
+ v-for='header in headerGroup.headers'
239
+ :key='header.id'
240
+ :mod='{ pinned: header.column.getIsPinned() }'
241
+ :scope="header.colSpan > 1 ? 'colgroup' : 'col'"
242
+ :colspan='header.colSpan > 1 ? header.colSpan : void 0'
243
+ :rowspan='header.rowSpan > 1 ? header.rowSpan : void 0'
244
244
  :class='[
245
245
  $style.th,
246
246
  props.classes?.th,
247
247
  resolveValue(header.column.columnDef.meta?.class?.th, header)
248
- ]'
248
+ ]'
249
249
  :style='[
250
250
  { width: header.getSize() !== 150 ? `${header.getSize()}px` : void 0 },
251
251
  resolveValue(header.column.columnDef.meta?.style?.th, header)
252
- ]'
253
- >
254
- <slot :name='`${header.id}-header`' v-bind='header.getContext()'>
255
- <FlexRender
256
- v-if='!header.isPlaceholder'
257
- :render='header.column.columnDef.header'
258
- :props='header.getContext()'
259
- />
260
- </slot>
261
- </Box>
262
- </tr>
263
-
264
- <tr :class='[$style.separator, props.classes?.separator]' />
265
- </Box>
266
-
267
- <tbody :class='[$style.tbody, props.classes?.tbody]'>
268
- <slot name='body-top' />
269
-
270
- <template v-if='rows.length'>
271
- <template v-for='row in rows' :key='row.id'>
272
- <Box
273
- is='tr'
252
+ ]'
253
+ >
254
+ <slot :name='`${header.id}-header`' v-bind='header.getContext()'>
255
+ <FlexRender
256
+ v-if='!header.isPlaceholder'
257
+ :render='header.column.columnDef.header'
258
+ :props='header.getContext()'
259
+ />
260
+ </slot>
261
+ </Box>
262
+ </tr>
263
+
264
+ <tr :class='[$style.separator, props.classes?.separator]' />
265
+ </Box>
266
+
267
+ <tbody :class='[$style.tbody, props.classes?.tbody]'>
268
+ <slot name='body-top' />
269
+
270
+ <template v-if='rows.length'>
271
+ <template v-for='row in rows' :key='row.id'>
272
+ <Box
273
+ is='tr'
274
274
  :mod='{
275
275
  selected: row.getIsSelected(),
276
276
  expanded: row.getIsExpanded(),
277
277
  selectable: !!onSelect || !!onHover || !!onContextmenu
278
- }'
279
- :role="onSelect ? 'button' : void 0"
280
- :tabindex='onSelect ? 0 : void 0'
281
- :class='[$style.tr, props.classes?.tr, resolveValue(table.options.meta?.class?.tr, row)]'
282
- :style='resolveValue(table.options.meta?.style?.tr, row)'
283
- @click='onRowSelect($event, row)'
284
- @pointerenter='onRowHover($event, row)'
285
- @pointerleave='onRowHover($event, null)'
286
- @contextmenu='onRowContextmenu($event, row)'
287
- >
288
- <Box
289
- is='td'
290
- v-for='cell in row.getVisibleCells()'
291
- :key='cell.id'
292
- :mod='{ pinned: cell.column.getIsPinned() }'
293
- :colspan='resolveValue(cell.column.columnDef.meta?.colspan?.td, cell)'
294
- :rowspan='resolveValue(cell.column.columnDef.meta?.rowspan?.td, cell)'
295
- :class='resolveValue(cell.column.columnDef.meta?.class?.td, cell)'
278
+ }'
279
+ :role="onSelect ? 'button' : void 0"
280
+ :tabindex='onSelect ? 0 : void 0'
281
+ :class='[$style.tr, props.classes?.tr, resolveValue(table.options.meta?.class?.tr, row)]'
282
+ :style='resolveValue(table.options.meta?.style?.tr, row)'
283
+ @click='onRowSelect($event, row)'
284
+ @pointerenter='onRowHover($event, row)'
285
+ @pointerleave='onRowHover($event, null)'
286
+ @contextmenu='onRowContextmenu($event, row)'
287
+ >
288
+ <Box
289
+ is='td'
290
+ v-for='cell in row.getVisibleCells()'
291
+ :key='cell.id'
292
+ :mod='{ pinned: cell.column.getIsPinned() }'
293
+ :colspan='resolveValue(cell.column.columnDef.meta?.colspan?.td, cell)'
294
+ :rowspan='resolveValue(cell.column.columnDef.meta?.rowspan?.td, cell)'
295
+ :class='resolveValue(cell.column.columnDef.meta?.class?.td, cell)'
296
296
  :style='[
297
297
  { width: cell.column.getSize() !== 150 ? `${cell.column.getSize()}px` : void 0 },
298
298
  resolveValue(cell.column.columnDef.meta?.style?.td, cell)
299
- ]'
300
- >
301
- <slot :name='`${cell.column.id}-cell`' v-bind='cell.getContext()'>
302
- <FlexRender :render='cell.column.columnDef.cell' :props='cell.getContext()' />
303
- </slot>
304
- </Box>
305
- </Box>
306
-
307
- <tr v-if='row.getIsExpanded()'>
308
- <td :colspan='row.getAllCells().length'>
309
- <slot name='expanded' :row='row' />
310
- </td>
311
- </tr>
312
- </template>
313
- </template>
314
-
315
- <tr v-else-if='loading && !!$slots.loading'>
316
- <td :colspan='table.getAllLeafColumns().length' :class='[$style.loading, props.classes?.loading]'>
317
- <slot name='loading' />
318
- </td>
319
- </tr>
320
-
321
- <tr v-else>
322
- <td :colspan='table.getAllLeafColumns().length' :class='[$style.empty, props.classes?.empty]'>
323
- <slot name='empty'>
324
- {{ empty || "\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445" }}
325
- </slot>
326
- </td>
327
- </tr>
328
-
329
- <slot name='body-bottom' />
330
- </tbody>
331
-
332
- <Box
333
- is='tfoot'
334
- v-if='hasFooter'
335
- :class='[$style.tfoot, props.classes?.tfoot]'
336
- :mod='{ sticky: props.sticky === "footer" || props.sticky === true }'
337
- >
338
- <tr :class='[$style.separator, props.classes?.separator]' />
339
-
340
- <tr v-for='footerGroup in table.getFooterGroups()' :key='footerGroup.id' :class='[$style.tr, props.classes?.tr]'>
341
- <Box
342
- is='th'
343
- v-for='header in footerGroup.headers'
344
- :key='header.id'
345
- :mod='{ pinned: header.column.getIsPinned() }'
346
- :colspan='header.colSpan > 1 ? header.colSpan : void 0'
347
- :rowspan='header.rowSpan > 1 ? header.rowSpan : void 0'
348
- :class='[$style.th, props.classes?.th, resolveValue(header.column.columnDef.meta?.class?.th, header)]'
349
- :style='resolveValue(header.column.columnDef.meta?.style?.th, header)'
350
- >
351
- <slot :name='`${header.id}-footer`' v-bind='header.getContext()'>
352
- <FlexRender
353
- v-if='!header.isPlaceholder'
354
- :render='header.column.columnDef.footer'
355
- :props='header.getContext()'
356
- />
357
- </slot>
358
- </Box>
359
- </tr>
360
- </Box>
361
- </table>
362
- </Box>
299
+ ]'
300
+ >
301
+ <slot :name='`${cell.column.id}-cell`' v-bind='cell.getContext()'>
302
+ <FlexRender :render='cell.column.columnDef.cell' :props='cell.getContext()' />
303
+ </slot>
304
+ </Box>
305
+ </Box>
306
+
307
+ <tr v-if='row.getIsExpanded()'>
308
+ <td :colspan='row.getAllCells().length'>
309
+ <slot name='expanded' :row='row' />
310
+ </td>
311
+ </tr>
312
+ </template>
313
+ </template>
314
+
315
+ <tr v-else-if='loading && !!$slots.loading'>
316
+ <td :colspan='table.getAllLeafColumns().length' :class='[$style.loading, props.classes?.loading]'>
317
+ <slot name='loading' />
318
+ </td>
319
+ </tr>
320
+
321
+ <tr v-else>
322
+ <td :colspan='table.getAllLeafColumns().length' :class='[$style.empty, props.classes?.empty]'>
323
+ <slot name='empty'>
324
+ {{ empty || "\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445" }}
325
+ </slot>
326
+ </td>
327
+ </tr>
328
+
329
+ <slot name='body-bottom' />
330
+ </tbody>
331
+
332
+ <Box
333
+ is='tfoot'
334
+ v-if='hasFooter'
335
+ :class='[$style.tfoot, props.classes?.tfoot]'
336
+ :mod='{ sticky: props.sticky === "footer" || props.sticky === true }'
337
+ >
338
+ <tr :class='[$style.separator, props.classes?.separator]' />
339
+
340
+ <tr v-for='footerGroup in table.getFooterGroups()' :key='footerGroup.id' :class='[$style.tr, props.classes?.tr]'>
341
+ <Box
342
+ is='th'
343
+ v-for='header in footerGroup.headers'
344
+ :key='header.id'
345
+ :mod='{ pinned: header.column.getIsPinned() }'
346
+ :colspan='header.colSpan > 1 ? header.colSpan : void 0'
347
+ :rowspan='header.rowSpan > 1 ? header.rowSpan : void 0'
348
+ :class='[$style.th, props.classes?.th, resolveValue(header.column.columnDef.meta?.class?.th, header)]'
349
+ :style='resolveValue(header.column.columnDef.meta?.style?.th, header)'
350
+ >
351
+ <slot :name='`${header.id}-footer`' v-bind='header.getContext()'>
352
+ <FlexRender
353
+ v-if='!header.isPlaceholder'
354
+ :render='header.column.columnDef.footer'
355
+ :props='header.getContext()'
356
+ />
357
+ </slot>
358
+ </Box>
359
+ </tr>
360
+ </Box>
361
+ </table>
362
+ </Box>
363
363
  </template>
364
364
 
365
365
  <style lang="postcss" module>
366
- .root {
367
- --table-color: var(--color-primary-4);
368
- --table-loader-color: var(--table-color);
369
- --table-loader-animation: carousel 2s ease-in-out infinite;
370
- --table-padding-x: .5rem;
371
- --table-padding-y: .5rem;
372
- --vertical-align: baseline;
373
-
374
- position: relative;
375
-
376
- overflow: auto;
377
-
378
- &:not([data-virtualize]) {
379
- .table {
380
- overflow: clip;
381
- }
382
-
383
- .tbody>tr:not(:last-of-type) {
384
- border-bottom: 1px solid var(--table-bd-color);
385
- }
386
- }
387
-
388
- @mixin where-light {
389
- --table-active-bg: alpha(var(--color-slate-1), .5);
390
- --table-c: var(--color-slate-7);
391
- --table-bd-color: var(--color-slate-3);
392
- }
393
-
394
- @mixin where-dark {
395
- --table-active-bg: alpha(var(--color-slate-7), .5);
396
- --table-c: var(--color-slate-4);
397
- --table-bd-color: var(--color-slate-7);
398
- }
399
- }
400
-
401
- .table {
402
- border-collapse: collapse;
403
-
404
- min-width: 100%;
405
- }
406
-
407
- .thead {
408
- position: relative;
409
-
410
- &[data-loading]::after {
411
- content: '';
412
-
413
- position: absolute;
414
- z-index: 1;
415
-
416
- height: 1px;
417
-
418
- background-color: alpha(var(--table-loader-color), .75);
419
-
420
- animation: var(--table-loader-animation);
421
- }
422
-
423
- &[data-sticky] {
424
- position: sticky;
425
- z-index: 1;
426
- top: 0;
427
- inset-inline: 0rem;
428
-
429
- background-color: alpha(var(--color-body), .75);
430
- backdrop-filter: blur(8px);
431
- }
432
- }
433
-
434
- .th {
435
- padding-block: var(--table-padding-y);
436
- padding-inline: var(--table-padding-x);
437
-
438
- font-weight: 600;
439
- color: var(--table-c);
440
- text-align: left;
441
- vertical-align: var(--vertical-align);
442
-
443
- &:has([role='checkbox']) {
444
- padding-inline-end: 0;
445
- }
446
- }
447
-
448
- .th[data-pinned],
449
- .tr td[data-pinned] {
450
- position: sticky;
451
- z-index: 1;
452
-
453
- background-color: alpha(var(--color-body), .75);
454
- }
455
-
456
- .tbody {
457
- isolation: isolate;
458
- }
459
-
460
- .tfoot {
461
- position: relative;
462
-
463
- &[data-sticky] {
464
- position: sticky;
465
- z-index: 1;
466
- bottom: 0;
467
- inset-inline: 0rem;
468
-
469
- background-color: var(--color-body);
470
- backdrop-filter: blur(8px);
471
- }
472
- }
473
-
474
- .tr {
475
- &[data-selectable] {
476
- &:hover {
477
- background-color: var(--table-active-bg);
478
- }
479
-
480
- &:focus-visible {
481
- outline: 1px solid var(--table-color);
482
- }
483
- }
484
-
485
- &[data-selected] {
486
- background-color: var(--table-active-bg);
487
- }
488
-
489
- td {
490
- padding-block: var(--table-padding-y);
491
- padding-inline: var(--table-padding-x);
492
-
493
- color: var(--table-c);
494
- white-space: nowrap;
495
- vertical-align: var(--vertical-align);
496
-
497
- &:has([role='checkbox']) {
498
- padding-inline-end: 0;
499
- }
500
- }
501
- }
502
-
503
- .separator {
504
- position: absolute;
505
- z-index: 1;
506
- left: 0;
507
-
508
- width: 100%;
509
- height: 1px;
510
-
511
- background-color: var(--table-bd-color);
512
- }
513
-
514
- .loading,
515
- .empty {
516
- padding-inline: 1.5rem;
517
-
518
- text-align: center;
519
- }
520
-
521
- @keyframes carousel {
522
- 0% {
523
- transform: translate(-100%);
524
-
525
- width: 50%;
526
- }
527
-
528
- to {
529
- transform: translate(200%);
530
-
531
- width: 50%;
532
- }
533
- }
366
+ .root {
367
+ --table-color: var(--color-primary-4);
368
+ --table-loader-color: var(--table-color);
369
+ --table-loader-animation: carousel 2s ease-in-out infinite;
370
+ --table-padding-x: .5rem;
371
+ --table-padding-y: .5rem;
372
+ --vertical-align: baseline;
373
+
374
+ position: relative;
375
+
376
+ overflow: auto;
377
+
378
+ &:not([data-virtualize]) {
379
+ .table {
380
+ overflow: clip;
381
+ }
382
+
383
+ .tbody>tr:not(:last-of-type) {
384
+ border-bottom: 1px solid var(--table-bd-color);
385
+ }
386
+ }
387
+
388
+ @mixin where-light {
389
+ --table-active-bg: alpha(var(--color-slate-1), .5);
390
+ --table-c: var(--color-slate-7);
391
+ --table-bd-color: var(--color-slate-3);
392
+ }
393
+
394
+ @mixin where-dark {
395
+ --table-active-bg: alpha(var(--color-slate-7), .5);
396
+ --table-c: var(--color-slate-4);
397
+ --table-bd-color: var(--color-slate-7);
398
+ }
399
+ }
400
+
401
+ .table {
402
+ border-collapse: collapse;
403
+
404
+ min-width: 100%;
405
+ }
406
+
407
+ .thead {
408
+ position: relative;
409
+
410
+ &[data-loading]::after {
411
+ content: '';
412
+
413
+ position: absolute;
414
+ z-index: 1;
415
+
416
+ height: 1px;
417
+
418
+ background-color: alpha(var(--table-loader-color), .75);
419
+
420
+ animation: var(--table-loader-animation);
421
+ }
422
+
423
+ &[data-sticky] {
424
+ position: sticky;
425
+ z-index: 1;
426
+ top: 0;
427
+ inset-inline: 0rem;
428
+
429
+ background-color: alpha(var(--color-body), .75);
430
+ backdrop-filter: blur(8px);
431
+ }
432
+ }
433
+
434
+ .th {
435
+ padding-block: var(--table-padding-y);
436
+ padding-inline: var(--table-padding-x);
437
+
438
+ font-weight: 600;
439
+ color: var(--table-c);
440
+ text-align: left;
441
+ vertical-align: var(--vertical-align);
442
+
443
+ &:has([role='checkbox']) {
444
+ padding-inline-end: 0;
445
+ }
446
+ }
447
+
448
+ .th[data-pinned],
449
+ .tr td[data-pinned] {
450
+ position: sticky;
451
+ z-index: 1;
452
+
453
+ background-color: alpha(var(--color-body), .75);
454
+ }
455
+
456
+ .tbody {
457
+ isolation: isolate;
458
+ }
459
+
460
+ .tfoot {
461
+ position: relative;
462
+
463
+ &[data-sticky] {
464
+ position: sticky;
465
+ z-index: 1;
466
+ bottom: 0;
467
+ inset-inline: 0rem;
468
+
469
+ background-color: var(--color-body);
470
+ backdrop-filter: blur(8px);
471
+ }
472
+ }
473
+
474
+ .tr {
475
+ &[data-selectable] {
476
+ &:hover {
477
+ background-color: var(--table-active-bg);
478
+ }
479
+
480
+ &:focus-visible {
481
+ outline: 1px solid var(--table-color);
482
+ }
483
+ }
484
+
485
+ &[data-selected] {
486
+ background-color: var(--table-active-bg);
487
+ }
488
+
489
+ td {
490
+ padding-block: var(--table-padding-y);
491
+ padding-inline: var(--table-padding-x);
492
+
493
+ color: var(--table-c);
494
+ white-space: nowrap;
495
+ vertical-align: var(--vertical-align);
496
+
497
+ &:has([role='checkbox']) {
498
+ padding-inline-end: 0;
499
+ }
500
+ }
501
+ }
502
+
503
+ .separator {
504
+ position: absolute;
505
+ z-index: 1;
506
+ left: 0;
507
+
508
+ width: 100%;
509
+ height: 1px;
510
+
511
+ background-color: var(--table-bd-color);
512
+ }
513
+
514
+ .loading,
515
+ .empty {
516
+ padding-inline: 1.5rem;
517
+
518
+ text-align: center;
519
+ }
520
+
521
+ @keyframes carousel {
522
+ 0% {
523
+ transform: translate(-100%);
524
+
525
+ width: 50%;
526
+ }
527
+
528
+ to {
529
+ transform: translate(200%);
530
+
531
+ width: 50%;
532
+ }
533
+ }
534
534
  </style>
@@ -14,20 +14,20 @@ const style = computed(() => ({ "--tabs-justify": justify }));
14
14
  </script>
15
15
 
16
16
  <template>
17
- <Box
18
- :is
19
- :style
20
- :class='css.list'
21
- role='tablist'
17
+ <Box
18
+ :is
19
+ :style
20
+ :class='css.list'
21
+ role='tablist'
22
22
  :mod='[mod, {
23
23
  variant: ctx?.variant,
24
24
  grow,
25
25
  orientation: ctx?.orientation,
26
26
  placement: ctx?.orientation === "vertical" && ctx.placement,
27
27
  inverted: ctx?.inverted
28
- }]'
29
- :aria-orientation='ctx?.orientation'
30
- >
31
- <slot />
32
- </Box>
28
+ }]'
29
+ :aria-orientation='ctx?.orientation'
30
+ >
31
+ <slot />
32
+ </Box>
33
33
  </template>
@@ -11,15 +11,15 @@ const ctx = useTabsState();
11
11
  </script>
12
12
 
13
13
  <template>
14
- <Box
15
- :is
16
- :id='ctx?.getPanelId(value)'
17
- :mod='[mod, { orientation: ctx?.orientation }]'
18
- :data-active='ctx?.active.value === value'
19
- :class='css.panel'
20
- role='tabpanel'
21
- :aria-labelledby='ctx?.getTabId(value)'
22
- >
23
- <slot />
24
- </Box>
14
+ <Box
15
+ :is
16
+ :id='ctx?.getPanelId(value)'
17
+ :mod='[mod, { orientation: ctx?.orientation }]'
18
+ :data-active='ctx?.active.value === value'
19
+ :class='css.panel'
20
+ role='tabpanel'
21
+ :aria-labelledby='ctx?.getTabId(value)'
22
+ >
23
+ <slot />
24
+ </Box>
25
25
  </template>