@webority/theme 0.17.2 → 0.17.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/theme",
3
- "version": "0.17.2",
3
+ "version": "0.17.3",
4
4
  "description": "Webority shared design system — Bootstrap 5.3 SCSS overrides, --wui-* tokens, and shared component CSS. The single source of brand chrome for React portals and Razor sites.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "publishConfig": {
@@ -407,31 +407,111 @@
407
407
  gap: 6px;
408
408
  }
409
409
 
410
- // Pagination footer — rows-per-page + range + prev/next, sits flush under a
411
- // table.
410
+ // Density (AppDataTable / <app-data-table> `density`). Comfortable is the rules above. An avatar
411
+ // with no size of its own follows the density through --avatar-size; one given a size keeps it.
412
+ .table-ledger {
413
+ --avatar-size: 32px;
414
+ }
415
+ .table-ledger.wui-table-cozy {
416
+ --avatar-size: 28px;
417
+ }
418
+ .table-ledger.wui-table-cozy tbody td {
419
+ height: 48px;
420
+ padding-top: 8px;
421
+ padding-bottom: 8px;
422
+ }
423
+ // Compact is one line per row: the identity subline is hidden and text steps down to 13px.
424
+ .table-ledger.wui-table-compact {
425
+ --avatar-size: 24px;
426
+ }
427
+ .table-ledger.wui-table-compact thead th {
428
+ height: 36px;
429
+ }
430
+ .table-ledger.wui-table-compact tbody td {
431
+ height: 40px;
432
+ padding-top: 6px;
433
+ padding-bottom: 6px;
434
+ font-size: 13px;
435
+ }
436
+ .table-ledger.wui-table-compact .u-meta > .u-email,
437
+ .table-ledger.wui-table-compact .u-meta > .wui-text-xs {
438
+ display: none;
439
+ }
440
+ .table-ledger.wui-table-compact .u-cell {
441
+ gap: 10px;
442
+ }
443
+ // Striped (`striped`): alternate-row shading in place of divider lines, on any density.
444
+ .table-ledger.wui-table-striped tbody td {
445
+ border-bottom: 0;
446
+ }
447
+ .table-ledger.wui-table-striped tbody tr:nth-child(even) {
448
+ --bs-table-bg-state: var(--color-bg-subtle);
449
+ }
450
+ .table-ledger.wui-table-striped tbody tr:hover {
451
+ --bs-table-bg-state: var(--color-bg-muted);
452
+ }
453
+
454
+ // Table toolbar (AppTableToolbar / <app-table-toolbar>): filters left, search and actions right;
455
+ // while rows are selected the bulk bar takes the same strip. Both rows are always in the markup,
456
+ // one `hidden`, so the swap never moves the table.
457
+ .wui-table-toolbar {
458
+ padding: 12px var(--wui-table-pad, 20px) 0;
459
+ }
460
+ .wui-table-toolbar-main,
461
+ .wui-table-toolbar-filters,
462
+ .wui-table-toolbar-actions,
463
+ .wui-table-toolbar-bulk {
464
+ display: flex;
465
+ flex-wrap: wrap;
466
+ align-items: center;
467
+ gap: 12px;
468
+ }
469
+ .wui-table-toolbar-actions {
470
+ margin-left: auto;
471
+ gap: 8px;
472
+ }
473
+ // The search box is full-width on its own; in a toolbar it is one control among several.
474
+ .wui-table-toolbar .search-wrap {
475
+ width: min(320px, 100%);
476
+ }
477
+ .wui-table-toolbar-bulk {
478
+ gap: 8px;
479
+ min-height: 40px;
480
+ padding: 4px 8px 4px 16px;
481
+ border-radius: var(--radius);
482
+ background: var(--color-primary-soft);
483
+ }
484
+ .wui-table-toolbar-count {
485
+ margin-right: 8px;
486
+ font-size: 13px;
487
+ font-weight: 600;
488
+ color: var(--color-text);
489
+ }
490
+ .wui-table-toolbar-clear {
491
+ margin-left: auto;
492
+ }
493
+ .wui-table-toolbar-main[hidden],
494
+ .wui-table-toolbar-bulk[hidden] {
495
+ display: none;
496
+ }
497
+
498
+ // Pagination footer: a "10 per page" menu beside the page buttons, flush under a table. No row
499
+ // range and no total; the page buttons say where you are.
412
500
  .table-pagination {
413
501
  display: flex;
414
502
  align-items: center;
415
503
  justify-content: flex-end;
416
- gap: 22px;
504
+ gap: 16px;
417
505
  padding: 12px 16px;
418
506
  border-top: 1px solid var(--color-border);
419
507
  font-size: 13px;
420
508
  color: var(--color-text-muted);
421
509
  flex-wrap: wrap;
422
510
  }
423
- // Rows-per-page sits at the leading edge; range + nav stay grouped on the
424
- // right.
425
511
  .tpg-rows {
426
512
  display: inline-flex;
427
513
  align-items: center;
428
- gap: 8px;
429
514
  white-space: nowrap;
430
- margin-right: auto;
431
- font-size: 12px;
432
- font-weight: 500;
433
- text-transform: uppercase;
434
- color: var(--color-text-subtle);
435
515
  }
436
516
  .select.tpg-select {
437
517
  width: auto;
@@ -617,22 +697,94 @@
617
697
  --bs-table-bg-state: color-mix(in srgb, var(--color-primary) 14%, transparent);
618
698
  }
619
699
 
620
- // Row status affordance — a colour bar on the leading edge, so a row's state is
621
- // legible without relying on a tint alone.
700
+ // Row status affordance (AppDataTable `rowStatus`, or `data-status` on a Razor <tr>): a colour bar
701
+ // on the leading edge, so a row's state is legible without relying on a tint alone. Bootstrap paints
702
+ // a cell's hover/selected tint with its own inset box-shadow, so the bar is LAYERED over that shadow
703
+ // rather than replacing it; replacing it dropped the tint from the first cell of a status row.
704
+ .table-ledger tbody tr[data-status] {
705
+ --wui-row-status: var(--color-border-strong);
706
+ }
707
+ .table-ledger tbody tr[data-status="success"] {
708
+ --wui-row-status: var(--color-success);
709
+ }
710
+ .table-ledger tbody tr[data-status="warning"] {
711
+ --wui-row-status: var(--color-warning);
712
+ }
713
+ .table-ledger tbody tr[data-status="danger"] {
714
+ --wui-row-status: var(--color-danger);
715
+ }
716
+ .table-ledger tbody tr[data-status="info"] {
717
+ --wui-row-status: var(--color-info);
718
+ }
622
719
  .table-ledger tbody tr[data-status] > td:first-child {
623
- box-shadow: inset 3px 0 0 0 var(--color-border-strong);
720
+ box-shadow:
721
+ inset 3px 0 0 0 var(--wui-row-status),
722
+ inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, var(--bs-table-accent-bg)));
624
723
  }
625
- .table-ledger tbody tr[data-status="success"] > td:first-child {
626
- box-shadow: inset 3px 0 0 0 var(--color-success);
724
+
725
+ // Totals row (AppDataTable column `footer`, or an author <tfoot> on Razor).
726
+ .table-ledger tfoot td {
727
+ height: 48px;
728
+ padding: 12px;
729
+ border-top: 1px solid var(--color-border);
730
+ font-size: 13px;
731
+ font-weight: 600;
732
+ color: var(--color-text);
733
+ font-variant-numeric: tabular-nums;
627
734
  }
628
- .table-ledger tbody tr[data-status="warning"] > td:first-child {
629
- box-shadow: inset 3px 0 0 0 var(--color-warning);
735
+ .table-ledger tfoot td:first-child {
736
+ padding-left: 20px;
630
737
  }
631
- .table-ledger tbody tr[data-status="danger"] > td:first-child {
632
- box-shadow: inset 3px 0 0 0 var(--color-danger);
738
+ .table-ledger tfoot td:last-child {
739
+ padding-right: 20px;
633
740
  }
634
- .table-ledger tbody tr[data-status="info"] > td:first-child {
635
- box-shadow: inset 3px 0 0 0 var(--color-info);
741
+
742
+ // Pinned header (`maxHeight`): the wrap becomes the scroll box and the header sticks to its top.
743
+ .table-wrap.wui-table-scroll {
744
+ overflow-y: auto;
745
+ overscroll-behavior-y: contain;
746
+ }
747
+ .table-wrap.wui-table-scroll .table-ledger thead th {
748
+ position: sticky;
749
+ top: 0;
750
+ z-index: 2;
751
+ }
752
+ // The wrap's own top padding would otherwise show rows scrolling behind it, above the header.
753
+ .table-wrap.wui-table-scroll:has(> .table-ledger) {
754
+ padding-top: 0;
755
+ }
756
+
757
+ // Pinned first column (`stickyFirstColumn`): the identity column, and the select/expand columns the
758
+ // library puts before it, hold their place while a wide table scrolls sideways. The identity column
759
+ // is found by position, because Razor authors write plain cells: it is the first cell after the
760
+ // library-owned select (44px) and expand (40px) cells. Pinned cells take the surface colour so
761
+ // scrolled cells do not show through; hover and selection still tint them through the inset shadow.
762
+ .table-ledger.wui-table-sticky-first > * > tr:not(.wui-row-expanded) > .wui-expand-cell,
763
+ .table-ledger.wui-table-sticky-first > * > tr:not(.wui-row-expanded) > .wui-select-cell,
764
+ .table-ledger.wui-table-sticky-first > * > tr:not(.wui-row-expanded) > :not(.wui-expand-cell, .wui-select-cell):is(:first-child, .wui-expand-cell + *, .wui-select-cell + *) {
765
+ position: sticky;
766
+ // The offset is a custom property so the per-layout rules below can set it without having to
767
+ // out-rank this selector's specificity.
768
+ left: var(--wui-sticky-left, 0);
769
+ z-index: 1;
770
+ }
771
+ .table-ledger.wui-table-sticky-first > :is(tbody, tfoot) > tr:not(.wui-row-expanded) > :is(.wui-expand-cell, .wui-select-cell),
772
+ .table-ledger.wui-table-sticky-first > :is(tbody, tfoot) > tr:not(.wui-row-expanded) > :not(.wui-expand-cell, .wui-select-cell):is(:first-child, .wui-expand-cell + *, .wui-select-cell + *) {
773
+ background-color: var(--color-surface);
774
+ }
775
+ .table-ledger.wui-table-sticky-first > * > tr > .wui-expand-cell + .wui-select-cell,
776
+ .table-ledger.wui-table-sticky-first > * > tr > .wui-expand-cell + :not(.wui-select-cell) {
777
+ --wui-sticky-left: 40px;
778
+ }
779
+ .table-ledger.wui-table-sticky-first > * > tr > .wui-select-cell + * {
780
+ --wui-sticky-left: 44px;
781
+ }
782
+ .table-ledger.wui-table-sticky-first > * > tr > .wui-expand-cell + .wui-select-cell + * {
783
+ --wui-sticky-left: 84px;
784
+ }
785
+ // A pinned header cell over a pinned column sits above both.
786
+ .table-wrap.wui-table-scroll .table-ledger.wui-table-sticky-first > thead > tr > :is(.wui-expand-cell, .wui-select-cell, :first-child, .wui-expand-cell + *, .wui-select-cell + *) {
787
+ z-index: 3;
636
788
  }
637
789
 
638
790
  // Row actions — icon-only buttons replacing a kebab dropdown.
@@ -656,7 +808,8 @@
656
808
  height: var(--wui-action-size);
657
809
  padding: 0;
658
810
  border: none;
659
- background: var(--color-bg-subtle);
811
+ // No disc at rest: a row of actions reads as quiet icons, and the tint below appears on hover.
812
+ background: transparent;
660
813
  border-radius: 999px;
661
814
  color: var(--color-text-subtle);
662
815
  cursor: pointer;
@@ -808,6 +961,12 @@
808
961
  opacity: 0;
809
962
  transition: opacity 0.12s ease;
810
963
  }
964
+ // On a right-aligned (numeric) header the arrow leads the label, so the label ends flush with
965
+ // the values under it.
966
+ .table th.sortable .wui-sort-lead {
967
+ margin-left: 0;
968
+ margin-right: 6px;
969
+ }
811
970
  .table th.sortable:hover .sort-icon {
812
971
  opacity: 0.6;
813
972
  }