@wwtdev/bsds-css 2.16.0 → 2.17.0

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/wwt-bsds.css CHANGED
@@ -4422,6 +4422,270 @@ a.bs-profile:where([data-layout]):hover {
4422
4422
  :where(.bs-tab-panel, bs-tab-panel):where([role="tabpanel"][data-active]:not([data-active="false"])) {
4423
4423
  display: block;
4424
4424
  }
4425
+ /* ------ WRAPPER ------ */
4426
+ .bs-table-wrap {
4427
+ display: flex;
4428
+ flex-direction: column;
4429
+ overflow: hidden;
4430
+ }
4431
+ :where(.bs-table-wrap) {
4432
+ font-size: var(--bs-text-sm);
4433
+ color: var(--bs-table-cell-ink, var(--bs-ink-light));
4434
+ border-radius: var(--bs-space-2);
4435
+ border: 1px solid var(--bs-border-base);
4436
+ }
4437
+ :where(.bs-table-wrap-header, .bs-table-wrap-footer) {
4438
+ padding-block: var(--bs-space-3);
4439
+ padding-inline: var(--bs-table-cell-padding);
4440
+ background: var(--bs-bg-medium);
4441
+ border-color: inherit;
4442
+ }
4443
+ :where(.bs-table-wrap-header) {
4444
+ border-bottom-width: 1px;
4445
+ }
4446
+ :where(.bs-table-wrap-footer) {
4447
+ border-top-width: 1px;
4448
+ }
4449
+ /* ------ TABLE ------ */
4450
+ .bs-table-scroll-wrap {
4451
+ flex: 1;
4452
+ border-color: inherit;
4453
+ overflow: auto;
4454
+ overscroll-behavior: none;
4455
+ }
4456
+ .bs-table {
4457
+ display: grid;
4458
+ grid-template-columns: var(--bs-table-col-widths);
4459
+ }
4460
+ :where(.bs-table) {
4461
+ border-color: inherit;
4462
+ }
4463
+ /* ------ HEADER ROWGROUP ------ */
4464
+ .bs-table-header-rowgroup {
4465
+ grid-column: 1 / -1;
4466
+ grid-row: span var(--bs-table-header-row-count);
4467
+ display: grid;
4468
+ grid-template-columns: subgrid;
4469
+ grid-template-rows: subgrid;
4470
+ border-color: inherit;
4471
+ }
4472
+ .bs-table-header-rowgroup-freeze {
4473
+ position: sticky;
4474
+ top: 0;
4475
+ z-index: 1;
4476
+
4477
+ .bs-table:not(.bs-table-border-none) & {
4478
+ box-shadow: 0 3px 0 rgba(0, 0, 0, .03);
4479
+ }
4480
+ }
4481
+ /* ------ BODY ROWGROUP ------ */
4482
+ .bs-table-body-rowgroup {
4483
+ grid-column: 1 / -1;
4484
+ grid-row: span var(--bs-table-body-row-count);
4485
+ display: grid;
4486
+ grid-template-columns: subgrid;
4487
+ grid-template-rows: subgrid;
4488
+ border-color: inherit;
4489
+ }
4490
+ /* ------ FOOTER ROWGROUP ------ */
4491
+ .bs-table-footer-rowgroup {
4492
+ grid-column: 1 / -1;
4493
+ grid-row: span var(--bs-table-footer-row-count);
4494
+ display: grid;
4495
+ grid-template-columns: subgrid;
4496
+ grid-template-rows: subgrid;
4497
+ border-color: inherit;
4498
+ }
4499
+ .bs-table-footer-rowgroup-freeze {
4500
+ position: sticky;
4501
+ bottom: 0;
4502
+
4503
+ .bs-table:not(.bs-table-border-none) & {
4504
+ box-shadow: 0 -3px 0 rgba(0, 0, 0, .03);
4505
+ }
4506
+ }
4507
+ /* ------ ROWS ------ */
4508
+ .bs-table-row {
4509
+ grid-column: 1 / -1;
4510
+ }
4511
+ :where(.bs-table-row) {
4512
+ background: var(--bs-bg-base);
4513
+ border-color: inherit;
4514
+ }
4515
+ :where(.bs-table-header-rowgroup .bs-table-row) {
4516
+ background: var(--bs-bg-light);
4517
+ }
4518
+ :where(.bs-table-row:has(.bs-table-head-cell, .bs-table-cell)) {
4519
+ display: grid;
4520
+ grid-template-columns: subgrid;
4521
+ }
4522
+ /* ------ FROZEN COLS ------ */
4523
+ .bs-table-cols-frozen-left {
4524
+ position: sticky;
4525
+ left: 0;
4526
+ grid-column: span var(--bs-table-frozen-left-count);
4527
+ display: grid;
4528
+ grid-template-columns: subgrid;
4529
+ background: inherit;
4530
+ border-color: inherit;
4531
+
4532
+ .bs-table:not(.bs-table-border-none) & {
4533
+ box-shadow: 3px 0 0 rgba(0, 0, 0, .03);
4534
+ }
4535
+ }
4536
+ .bs-table-cols-frozen-right {
4537
+ position: sticky;
4538
+ right: 0;
4539
+ grid-column: span var(--bs-table-frozen-right-count);
4540
+ display: grid;
4541
+ grid-template-columns: subgrid;
4542
+ background: inherit;
4543
+ border-color: inherit;
4544
+
4545
+ .bs-table:not(.bs-table-border-none) & {
4546
+ box-shadow: -3px 0 0 rgba(0, 0, 0, .03);
4547
+ }
4548
+ }
4549
+ /* ------ CELLS ------ */
4550
+ :where(.bs-table-head-cell) {
4551
+ color: var(--bs-table-head-cell-ink, var(--bs-ink-base));
4552
+ font-weight: var(--bs-font-bold);
4553
+ border-color: inherit;
4554
+ }
4555
+ /* Couldn't use :where due to Blue Steel reset styles on <button> imposing font-size.
4556
+ Adding inherit in case consumer does custom header cell styles */
4557
+ .bs-table-head-cell .bs-sort-toggle {
4558
+ font-size: inherit;
4559
+ font-weight: var(--bs-font-bold);
4560
+ color: inherit;
4561
+ line-height: inherit;
4562
+ letter-spacing: inherit;
4563
+ }
4564
+ :where(.bs-table-cell) {
4565
+ border-color: inherit;
4566
+ }
4567
+ /* ------ PROP: CELL-PADDING ------ */
4568
+ :root {
4569
+ --bs-table-cell-padding-xs: var(--bs-space-2);
4570
+ --bs-table-cell-padding-sm: var(--bs-space-3);
4571
+ --bs-table-cell-padding-md: var(--bs-space-4);
4572
+ --bs-table-cell-padding-lg: var(--bs-space-6);
4573
+ --bs-table-cell-padding-xl: var(--bs-space-8);
4574
+ }
4575
+ :where(.bs-table-head-cell, .bs-table-cell) {
4576
+ padding: var(--bs-table-cell-padding);
4577
+ }
4578
+ /* ------ PROP: TRUNCATE ------ */
4579
+ :where(.bs-table-truncate):where(.bs-table-head-cell, .bs-table-cell) {
4580
+ overflow: hidden;
4581
+ text-overflow: ellipsis;
4582
+ white-space: nowrap;
4583
+ }
4584
+ /* ------ PROP: STRIPED ROWS ------ */
4585
+ :where(.bs-table-striped .bs-table-body-rowgroup .bs-table-row:nth-child(even)) {
4586
+ background: var(--bs-bg-light);
4587
+ }
4588
+ /* ------ PROP: ROW HOVER ------ */
4589
+ :where(.bs-table-row-hover .bs-table-body-rowgroup .bs-table-row:hover) {
4590
+ background: var(--bs-table-row-hover, var(--bs-bg-light));
4591
+ transition: background-color 200ms;
4592
+ }
4593
+ /* ------ PROP: BORDERS ------ */
4594
+ /* -- borders="rows" -- */
4595
+ :where(.bs-table-border-rows) :where(.bs-table-row) {
4596
+ border-bottom-width: 1px;
4597
+ }
4598
+ /* -- borders="cols" -- */
4599
+ /* setting following cell's left border instead of each cell's right, so Table's left/right border is easier for consumer to override with utility classes */
4600
+ :where(.bs-table-border-cols) :where(.bs-table-head-cell + .bs-table-head-cell, .bs-table-cell + .bs-table-cell) {
4601
+ border-left-width: 1px;
4602
+ }
4603
+ .bs-table-border-cols .bs-table-header-rowgroup {
4604
+ border-bottom-width: 1px;
4605
+ }
4606
+ /* -- borders="grid" -- */
4607
+ :where(.bs-table-border-grid) :where(.bs-table-row) {
4608
+ border-bottom-width: 1px;
4609
+ }
4610
+ /* setting following cell's left border instead of each cell's right, so Table's left/right border is easier for consumer to override with utility classes */
4611
+ :where(.bs-table-border-grid) :where(.bs-table-head-cell + .bs-table-head-cell, .bs-table-cell + .bs-table-cell) {
4612
+ border-left-width: 1px;
4613
+ }
4614
+ /* -- borders="frozen" -- */
4615
+ .bs-table-border-frozen .bs-table-header-rowgroup-freeze {
4616
+ border-bottom-width: 1px;
4617
+ }
4618
+ /* -- frozen col and footer-rowgroup sections will always show border, unless borders="none" -- */
4619
+ /* (header-rowgroup is not included below since TableRow bottom border covers most cases) */
4620
+ .bs-table:not(.bs-table-border-none) .bs-table-cols-frozen-left {
4621
+ border-right-width: 1px;
4622
+ }
4623
+ .bs-table:not(.bs-table-border-none) .bs-table-cols-frozen-right {
4624
+ border-left-width: 1px;
4625
+ }
4626
+ .bs-table:not(.bs-table-border-none) .bs-table-footer-rowgroup-freeze {
4627
+ border-top-width: 1px;
4628
+ }
4629
+ /* turn off last row's bottom border, since it would double-up with Table's border */
4630
+ :where(.bs-table-body-rowgroup, .bs-table-footer-rowgroup) .bs-table-row:last-of-type {
4631
+ border-bottom-width: 0;
4632
+ }
4633
+ /* ------ TABLE COLUMN RESIZER ------ */
4634
+ .bs-table-col-resizer {
4635
+ position: fixed; /* fixed instead of absolute, due to using coordinates from .getBoundingClientRect() */
4636
+ top: 0;
4637
+ left: -8px;
4638
+ bottom: 0;
4639
+ width: 15px; /* includes 5px resizer handle width + 5px of extra hover target area on left and right of handle */
4640
+ cursor: col-resize;
4641
+ touch-action: none;
4642
+ z-index: var(--bs-table-col-resizer-z, 10);
4643
+ transform: translate(var(--bs-table-col-resizer-x), var(--bs-table-col-resizer-y));
4644
+
4645
+ /* resizer handle and vertical line set-up */
4646
+ &:before,
4647
+ &::after {
4648
+ content: "";
4649
+ position: absolute;
4650
+ top: 0;
4651
+ left: 0;
4652
+ background: var(--bs-table-col-resizer-color, var(--bs-blue-base));
4653
+ }
4654
+
4655
+ /* resizer handle */
4656
+ &::after {
4657
+ left: 5px;
4658
+ width: 5px;
4659
+ height: var(--bs-table-col-resizer-handle-height);
4660
+ }
4661
+
4662
+ /* resizer vertical line/tail */
4663
+ &::before {
4664
+ left: 7px;
4665
+ width: 1px;
4666
+ height: var(--bs-table-col-resizer-tail-height);
4667
+ display: none;
4668
+ }
4669
+
4670
+ &.bs-table-col-resizer-active::before {
4671
+ display: block;
4672
+ }
4673
+ }
4674
+ /* ------ SORT TOGGLE ------ */
4675
+ /* Override Blue Steel CSS: It adds "relative" to buttons by default, which was causing an overlap issue when a Table with frozen, sortable cols scrolled horizontally */
4676
+ .bs-sort-toggle {
4677
+ position: static;
4678
+ }
4679
+ /* Using :where to lower specificity so consumers can use utility classes to override */
4680
+ :where(.bs-sort-toggle) {
4681
+ display: inline-flex;
4682
+ align-items: center;
4683
+ gap: var(--bs-space-2);
4684
+ cursor: pointer;
4685
+ }
4686
+ :where(.bs-sort-toggle .bs-icon) {
4687
+ flex-shrink: 0;
4688
+ }
4425
4689
  table {
4426
4690
  border-collapse: collapse;
4427
4691
  border-spacing: 0;
@@ -4769,8 +5033,8 @@ table:where([data-sticky^="left"]) :is(td:first-child, th:first-child) {
4769
5033
  /* Active States */
4770
5034
  :where(.bs-tooltip:not([data-position])):hover :where(.bs-tooltip-text),
4771
5035
  :where(.bs-tooltip[data-position="top"]):hover :where(.bs-tooltip-text),
4772
- :where(.bs-tooltip:not([data-position])):focus-within :where(.bs-tooltip-text),
4773
- :where(.bs-tooltip[data-position="top"]):focus-within :where(.bs-tooltip-text),
5036
+ :where(.bs-tooltip:not([data-position])):has(:focus-visible) :where(.bs-tooltip-text),
5037
+ :where(.bs-tooltip[data-position="top"]):has(:focus-visible) :where(.bs-tooltip-text),
4774
5038
  :where(.bs-tooltip:not([data-position]))[data-shown] :where(.bs-tooltip-text),
4775
5039
  :where(.bs-tooltip[data-position="top"])[data-shown] :where(.bs-tooltip-text) {
4776
5040
  opacity: 1;
@@ -4785,7 +5049,7 @@ table:where([data-sticky^="left"]) :is(td:first-child, th:first-child) {
4785
5049
  }
4786
5050
  /* Active States */
4787
5051
  :where(.bs-tooltip[data-position="bottom"]):hover :where(.bs-tooltip-text),
4788
- :where(.bs-tooltip[data-position="bottom"]):focus-within :where(.bs-tooltip-text),
5052
+ :where(.bs-tooltip[data-position="bottom"]):has(:focus-visible) :where(.bs-tooltip-text),
4789
5053
  :where(.bs-tooltip[data-position="bottom"])[data-shown] :where(.bs-tooltip-text) {
4790
5054
  opacity: 1;
4791
5055
  transform: translateX(-50%) scale(1);
@@ -4799,7 +5063,7 @@ table:where([data-sticky^="left"]) :is(td:first-child, th:first-child) {
4799
5063
  }
4800
5064
  /* Active States */
4801
5065
  :where(.bs-tooltip[data-position="left"]):hover :where(.bs-tooltip-text),
4802
- :where(.bs-tooltip[data-position="left"]):focus-within :where(.bs-tooltip-text),
5066
+ :where(.bs-tooltip[data-position="left"]):has(:focus-visible) :where(.bs-tooltip-text),
4803
5067
  :where(.bs-tooltip[data-position="left"])[data-shown] :where(.bs-tooltip-text) {
4804
5068
  opacity: 1;
4805
5069
  transform: translateY(-50%) scale(1);
@@ -4812,7 +5076,7 @@ table:where([data-sticky^="left"]) :is(td:first-child, th:first-child) {
4812
5076
  transform: translateY(-50%) scale(0);
4813
5077
  }
4814
5078
  :where(.bs-tooltip[data-position="right"]):hover :where(.bs-tooltip-text),
4815
- :where(.bs-tooltip[data-position="right"]):focus-within :where(.bs-tooltip-text),
5079
+ :where(.bs-tooltip[data-position="right"]):has(:focus-visible) :where(.bs-tooltip-text),
4816
5080
  :where(.bs-tooltip[data-position="right"])[data-shown] :where(.bs-tooltip-text) {
4817
5081
  opacity: 1;
4818
5082
  transform: translateY(-50%) scale(1);
@@ -4847,10 +5111,10 @@ table:where([data-sticky^="left"]) :is(td:first-child, th:first-child) {
4847
5111
  :where(.bs-tooltip[data-position="top-right"]):hover :where(.bs-tooltip-text),
4848
5112
  :where(.bs-tooltip[data-position="bottom-left"]):hover :where(.bs-tooltip-text),
4849
5113
  :where(.bs-tooltip[data-position="bottom-right"]):hover :where(.bs-tooltip-text),
4850
- :where(.bs-tooltip[data-position="top-left"]):focus-within :where(.bs-tooltip-text),
4851
- :where(.bs-tooltip[data-position="top-right"]):focus-within :where(.bs-tooltip-text),
4852
- :where(.bs-tooltip[data-position="bottom-left"]):focus-within :where(.bs-tooltip-text),
4853
- :where(.bs-tooltip[data-position="bottom-right"]):focus-within :where(.bs-tooltip-text),
5114
+ :where(.bs-tooltip[data-position="top-left"]):has(:focus-visible) :where(.bs-tooltip-text),
5115
+ :where(.bs-tooltip[data-position="top-right"]):has(:focus-visible) :where(.bs-tooltip-text),
5116
+ :where(.bs-tooltip[data-position="bottom-left"]):has(:focus-visible) :where(.bs-tooltip-text),
5117
+ :where(.bs-tooltip[data-position="bottom-right"]):has(:focus-visible) :where(.bs-tooltip-text),
4854
5118
  :where(.bs-tooltip[data-position="top-left"]:not([data-shown="false"]))[data-shown] :where(.bs-tooltip-text),
4855
5119
  :where(.bs-tooltip[data-position="top-right"]:not([data-shown="false"]))[data-shown] :where(.bs-tooltip-text),
4856
5120
  :where(.bs-tooltip[data-position="bottom-left"]:not([data-shown="false"]))[data-shown] :where(.bs-tooltip-text),
@@ -4864,12 +5128,25 @@ Don't display unless data-shown is present
4864
5128
  This must go last to properly override the other classes
4865
5129
  */
4866
5130
  :where(.bs-tooltip[data-disabled]:not([data-disabled="false"]):not([data-shown])):hover :where(.bs-tooltip-text),
4867
- :where(.bs-tooltip[data-disabled]:not([data-disabled="false"]):not([data-shown])):focus-within :where(.bs-tooltip-text) {
5131
+ :where(.bs-tooltip[data-disabled]:not([data-disabled="false"]):not([data-shown])):has(:focus-visible) :where(.bs-tooltip-text) {
4868
5132
  opacity: 0;
4869
5133
  transform: scale(0);
4870
5134
  }
4871
5135
  :where(.bs-tooltip[data-shown="false"][data-disabled]:not([data-disabled="false"])):hover :where(.bs-tooltip-text),
4872
- :where(.bs-tooltip[data-shown="false"][data-disabled]:not([data-disabled="false"])):focus-within :where(.bs-tooltip-text) {
5136
+ :where(.bs-tooltip[data-shown="false"][data-disabled]:not([data-disabled="false"])):has(:focus-visible) :where(.bs-tooltip-text) {
4873
5137
  opacity: 0;
4874
5138
  transform: scale(0);
4875
5139
  }
5140
+ /* -------------------- COMPONENT-SPECIFIC STYLES -------------------- */
5141
+ .bs-tooltip :where(.bs-tooltip-text.escaped) {
5142
+ opacity: 0;
5143
+ transform: scale(0.5);
5144
+ }
5145
+ .bs-tooltip :where(.bs-tooltip-text.escaped-x) {
5146
+ opacity: 0;
5147
+ transform: translateX(-50%) scale(0.5);
5148
+ }
5149
+ .bs-tooltip :where(.bs-tooltip-text.escaped-y) {
5150
+ opacity: 0;
5151
+ transform: translateY(-50%) scale(0.5);
5152
+ }