@wwtdev/bsds-css 2.1.3 → 2.1.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.
- package/dist/components/_buttons.scss +1 -0
- package/dist/components/_dropdown-options.scss +44 -21
- package/dist/components/_form-input-composite.scss +3 -3
- package/dist/components/_form-labels.scss +5 -3
- package/dist/components/_form-switches.scss +33 -32
- package/dist/components/_form-text-fields.scss +1 -2
- package/dist/components/_modal.scss +12 -1
- package/dist/components/buttons.css +1 -0
- package/dist/components/dropdown-options.css +44 -21
- package/dist/components/form-input-composite.css +3 -3
- package/dist/components/form-labels.css +5 -3
- package/dist/components/form-switches.css +33 -32
- package/dist/components/form-text-fields.css +1 -2
- package/dist/components/modal.css +12 -1
- package/dist/wwt-bsds.css +94 -59
- package/dist/wwt-bsds.min.css +1 -1
- package/package.json +1 -1
package/dist/wwt-bsds.css
CHANGED
|
@@ -1169,6 +1169,7 @@ a:where(.bs-link):where(:focus:not(:focus-visible)) {
|
|
|
1169
1169
|
}
|
|
1170
1170
|
.bs-button:where([data-text]:not([data-text="false"])):active {
|
|
1171
1171
|
box-shadow: none;
|
|
1172
|
+
transform: none;
|
|
1172
1173
|
}
|
|
1173
1174
|
/* ------------ Button Sizes, Media-based Text Sizing -------------- */
|
|
1174
1175
|
/* Std button: Mobile text size, WM text size */
|
|
@@ -1517,15 +1518,16 @@ a.bs-circle-button {
|
|
|
1517
1518
|
}
|
|
1518
1519
|
/* Option list */
|
|
1519
1520
|
.bs-dropdown-options {
|
|
1521
|
+
display: flex;
|
|
1522
|
+
flex-direction: column;
|
|
1523
|
+
gap: 0.5rem;
|
|
1520
1524
|
list-style: none;
|
|
1521
1525
|
margin-bottom: 0.25rem;
|
|
1522
1526
|
margin-top: 0.25rem;
|
|
1523
1527
|
max-height: var(--options-height-max, 20rem);/* constrain scrollable to options section */
|
|
1524
1528
|
overflow-y: auto;
|
|
1525
|
-
padding: 0;
|
|
1526
|
-
|
|
1527
|
-
.bs-dropdown-options :where(li:first-child) {
|
|
1528
|
-
margin-top: 0.5rem;
|
|
1529
|
+
padding-block: 0.5rem;
|
|
1530
|
+
padding-left: 0;
|
|
1529
1531
|
}
|
|
1530
1532
|
/* Option list item */
|
|
1531
1533
|
.bs-dropdown-options :where(li) {
|
|
@@ -1540,11 +1542,8 @@ a.bs-circle-button {
|
|
|
1540
1542
|
column-gap: 0.5rem;
|
|
1541
1543
|
cursor: pointer;
|
|
1542
1544
|
display: grid;
|
|
1543
|
-
|
|
1544
|
-
padding-
|
|
1545
|
-
padding-left: 1.25rem;
|
|
1546
|
-
padding-right: 1.375rem;
|
|
1547
|
-
padding-top: 0.25rem;
|
|
1545
|
+
padding-block: 0.25rem;
|
|
1546
|
+
padding-inline: 1.25rem;
|
|
1548
1547
|
row-gap: 0.125rem;
|
|
1549
1548
|
word-break: break-word;
|
|
1550
1549
|
word-wrap: break-word;
|
|
@@ -1554,14 +1553,14 @@ a.bs-circle-button {
|
|
|
1554
1553
|
grid-template-columns: min-content 1fr;
|
|
1555
1554
|
}
|
|
1556
1555
|
/* Variant: description */
|
|
1557
|
-
.bs-dropdown-options :where(li:not([data-variant~="2-col"])[data-variant~="description"] :nth-child(2)) {
|
|
1556
|
+
.bs-dropdown-options :where(li:not([data-variant~="2-col"])[data-variant~="description"] > :nth-child(2)) {
|
|
1558
1557
|
color: var(--bs-ink-light);
|
|
1559
1558
|
font-size: var(--bs-text-xs);
|
|
1560
1559
|
min-height: 1.125rem;
|
|
1561
1560
|
line-height: 1.125rem;
|
|
1562
1561
|
}
|
|
1563
1562
|
/* Variant: 2-col description */
|
|
1564
|
-
.bs-dropdown-options :where(li[data-variant~="2-col"][data-variant~="description"] :nth-child(3)) {
|
|
1563
|
+
.bs-dropdown-options :where(li[data-variant~="2-col"][data-variant~="description"] > :nth-child(3)) {
|
|
1565
1564
|
color: var(--bs-ink-light);
|
|
1566
1565
|
font-size: var(--bs-text-xs);
|
|
1567
1566
|
grid-column-start: 2;
|
|
@@ -1569,7 +1568,7 @@ a.bs-circle-button {
|
|
|
1569
1568
|
line-height: 1.125rem;
|
|
1570
1569
|
}
|
|
1571
1570
|
/* Hover or data-selected */
|
|
1572
|
-
.bs-dropdown-options :where(li:hover),
|
|
1571
|
+
.bs-dropdown-options :where(li:not([role="separator"]):hover),
|
|
1573
1572
|
.bs-dropdown-options :where(li[data-selected]) {
|
|
1574
1573
|
background-color: var(--bs-bg-medium);
|
|
1575
1574
|
border-left: 4px solid var(--bs-blue-base);
|
|
@@ -1586,17 +1585,17 @@ a.bs-circle-button {
|
|
|
1586
1585
|
color: var(--bs-red-500);
|
|
1587
1586
|
}
|
|
1588
1587
|
/* Hover or data-selected for 2-col/description variants */
|
|
1589
|
-
.bs-dropdown-options :where(li:not([data-variant~="2-col"])[data-variant~="description"]:hover :nth-child(2)),
|
|
1590
|
-
.bs-dropdown-options :where(li[data-variant~="2-col"][data-variant~="description"]:hover :nth-child(3)),
|
|
1591
|
-
.bs-dropdown-options :where(li:not([data-variant~="2-col"])[data-variant~="description"][data-selected] :nth-child(2)),
|
|
1592
|
-
.bs-dropdown-options :where(li[data-variant~="2-col"][data-variant~="description"][data-selected] :nth-child(3)) {
|
|
1588
|
+
.bs-dropdown-options :where(li:not([data-variant~="2-col"])[data-variant~="description"]:hover > :nth-child(2)),
|
|
1589
|
+
.bs-dropdown-options :where(li[data-variant~="2-col"][data-variant~="description"]:hover > :nth-child(3)),
|
|
1590
|
+
.bs-dropdown-options :where(li:not([data-variant~="2-col"])[data-variant~="description"][data-selected] > :nth-child(2)),
|
|
1591
|
+
.bs-dropdown-options :where(li[data-variant~="2-col"][data-variant~="description"][data-selected] > :nth-child(3)) {
|
|
1593
1592
|
color: var(--bs-blue-base);
|
|
1594
1593
|
}
|
|
1595
1594
|
/* Hover or data-selected for negative + 2-col/description variants */
|
|
1596
|
-
.bs-dropdown-options :where(li[data-variant~="negative"]:not([data-variant~="2-col"])[data-variant~="description"]:hover :nth-child(2)),
|
|
1597
|
-
.bs-dropdown-options :where(li[data-variant~="negative"][data-variant~="2-col"][data-variant~="description"]:hover :nth-child(3)),
|
|
1598
|
-
.bs-dropdown-options :where(li[data-variant~="negative"]:not([data-variant~="2-col"])[data-variant~="description"][data-selected] :nth-child(2)),
|
|
1599
|
-
.bs-dropdown-options :where(li[data-variant~="negative"][data-variant~="2-col"][data-variant~="description"][data-selected] :nth-child(3)) {
|
|
1595
|
+
.bs-dropdown-options :where(li[data-variant~="negative"]:not([data-variant~="2-col"])[data-variant~="description"]:hover > :nth-child(2)),
|
|
1596
|
+
.bs-dropdown-options :where(li[data-variant~="negative"][data-variant~="2-col"][data-variant~="description"]:hover > :nth-child(3)),
|
|
1597
|
+
.bs-dropdown-options :where(li[data-variant~="negative"]:not([data-variant~="2-col"])[data-variant~="description"][data-selected] > :nth-child(2)),
|
|
1598
|
+
.bs-dropdown-options :where(li[data-variant~="negative"][data-variant~="2-col"][data-variant~="description"][data-selected] > :nth-child(3)) {
|
|
1600
1599
|
color: var(--bs-red-500);
|
|
1601
1600
|
}
|
|
1602
1601
|
/* List option mouse click focus (do not show) */
|
|
@@ -1623,11 +1622,35 @@ a.bs-circle-button {
|
|
|
1623
1622
|
.bs-dropdown-options :where(li[data-variant~="negative"]:focus-visible) {
|
|
1624
1623
|
--focus-border-color: var(--bs-red-200);
|
|
1625
1624
|
}
|
|
1625
|
+
/* Multi-select divider */
|
|
1626
|
+
.bs-dropdown-options :where(li[role="separator"]) {
|
|
1627
|
+
cursor: default;
|
|
1628
|
+
padding-block: 0.125rem;
|
|
1629
|
+
padding-right: 1.375rem;
|
|
1630
|
+
}
|
|
1631
|
+
.bs-dropdown-options :where(hr) {
|
|
1632
|
+
background-color: var(--bs-navy-light);
|
|
1633
|
+
height: .0625rem;
|
|
1634
|
+
margin-block: 0;
|
|
1635
|
+
margin-inline: 0;
|
|
1636
|
+
}
|
|
1626
1637
|
@media (min-width: 752px) {
|
|
1627
1638
|
.bs-dropdown-options :where(li) {
|
|
1628
1639
|
padding-left: 0.5rem;
|
|
1629
1640
|
padding-right: 0.75rem;
|
|
1630
1641
|
}
|
|
1642
|
+
|
|
1643
|
+
.bs-dropdown-options :where(li[role="separator"]) {
|
|
1644
|
+
padding-right: 0.625rem;
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
.bs-dropdown-options :where(li:focus-visible) {
|
|
1648
|
+
padding-left: 0.625rem;
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
.bs-dropdown-options :where(li[data-selected]:focus-visible) {
|
|
1652
|
+
padding-left: 0.5rem;
|
|
1653
|
+
}
|
|
1631
1654
|
}
|
|
1632
1655
|
/*
|
|
1633
1656
|
custom properties:
|
|
@@ -1722,20 +1745,22 @@ label:where(.bs-label) {
|
|
|
1722
1745
|
.bs-label,
|
|
1723
1746
|
:where(label, legend) {
|
|
1724
1747
|
--label-color: var(--bs-ink-base);
|
|
1725
|
-
|
|
1726
1748
|
color: var(--label-color);
|
|
1727
1749
|
font-size: var(--bs-text-sm);
|
|
1728
1750
|
font-weight: 600;
|
|
1729
1751
|
line-height: var(--bs-leading-base);
|
|
1730
1752
|
}
|
|
1731
|
-
|
|
1753
|
+
/* Required asterisk */
|
|
1754
|
+
:where(label, legend) :where([data-required]:not([data-required="false"])),
|
|
1732
1755
|
.bs-label :where([data-required="true"]) {
|
|
1733
|
-
--label-color
|
|
1756
|
+
color: var(--label-asterisk-color, var(--bs-ink-red));
|
|
1734
1757
|
}
|
|
1758
|
+
/* Disabled state */
|
|
1735
1759
|
:where(label[data-disabled]:not([data-disabled="false"])),
|
|
1736
1760
|
:where(label[data-disabled]:not([data-disabled="false"])) *,
|
|
1737
1761
|
.bs-label:where([data-disabled="true"]),
|
|
1738
1762
|
.bs-label:where([data-disabled="true"]) * {
|
|
1763
|
+
--label-asterisk-color: transparent;
|
|
1739
1764
|
--label-color: var(--bs-ink-disabled);
|
|
1740
1765
|
}
|
|
1741
1766
|
/* Generally applicable (all input types) */
|
|
@@ -1876,15 +1901,13 @@ see https://bugs.chromium.org/p/chromium/issues/detail?id=89530
|
|
|
1876
1901
|
opacity: 1;
|
|
1877
1902
|
}
|
|
1878
1903
|
:is(input, textarea, select):disabled::-moz-placeholder, :is(input, textarea, select)[disabled]::-moz-placeholder, :is(.bs-input, .bs-textarea, .bs-select):disabled::-moz-placeholder, :is(.bs-input, .bs-textarea, .bs-select)[disabled]::-moz-placeholder {
|
|
1879
|
-
|
|
1880
|
-
opacity: 1;
|
|
1904
|
+
opacity: 0;
|
|
1881
1905
|
}
|
|
1882
1906
|
:is(input, textarea, select):disabled::placeholder,
|
|
1883
1907
|
:is(input, textarea, select)[disabled]::placeholder,
|
|
1884
1908
|
:is(.bs-input, .bs-textarea, .bs-select):disabled::placeholder,
|
|
1885
1909
|
:is(.bs-input, .bs-textarea, .bs-select)[disabled]::placeholder {
|
|
1886
|
-
|
|
1887
|
-
opacity: 1;
|
|
1910
|
+
opacity: 0;
|
|
1888
1911
|
}
|
|
1889
1912
|
/* Select */
|
|
1890
1913
|
select,
|
|
@@ -2078,9 +2101,9 @@ and issues with box-sizing
|
|
|
2078
2101
|
/* -------- Disabled styles -------- */
|
|
2079
2102
|
.bs-input-addon:where([data-disabled]:not([data-disabled="false"])),
|
|
2080
2103
|
.bs-input-addon:where([data-disabled]:not([data-disabled="false"])) .bs-button {
|
|
2081
|
-
--input-bg: var(--bs-
|
|
2082
|
-
--input-border: var(--bs-
|
|
2083
|
-
color: var(--bs-
|
|
2104
|
+
--input-bg: var(--bs-bg-disabled);
|
|
2105
|
+
--input-border: var(--bs-ink-disabled);
|
|
2106
|
+
color: var(--bs-ink-disabled);
|
|
2084
2107
|
}
|
|
2085
2108
|
.bs-input-addon:where([data-disabled]:not([data-disabled="false"])) * {
|
|
2086
2109
|
pointer-events: none;
|
|
@@ -2408,12 +2431,12 @@ input:where([type='checkbox'], [type='radio'])[data-error]:where(:not([data-erro
|
|
|
2408
2431
|
transition: 250ms;
|
|
2409
2432
|
width: var(--switch-width);
|
|
2410
2433
|
}
|
|
2411
|
-
.bs-switch
|
|
2412
|
-
.bs-switch:where([aria-pressed]
|
|
2434
|
+
.bs-switch :where(input:checked) ~ :where(span),
|
|
2435
|
+
.bs-switch:where([aria-pressed]:not([aria-pressed="false"])) :where(span) {
|
|
2413
2436
|
--switch-background: var(--bs-blue-base);
|
|
2414
2437
|
}
|
|
2415
2438
|
/* Toggle "ball" */
|
|
2416
|
-
.bs-switch span::before {
|
|
2439
|
+
.bs-switch :where(span)::before {
|
|
2417
2440
|
background-color: var(--ball-background);
|
|
2418
2441
|
border-radius: 50%;
|
|
2419
2442
|
box-sizing: border-box;
|
|
@@ -2427,28 +2450,22 @@ input:where([type='checkbox'], [type='radio'])[data-error]:where(:not([data-erro
|
|
|
2427
2450
|
width: var(--ball-diameter);
|
|
2428
2451
|
z-index: 2;
|
|
2429
2452
|
}
|
|
2430
|
-
.bs-switch
|
|
2431
|
-
.bs-switch:where([aria-pressed]
|
|
2453
|
+
.bs-switch :where(input:checked) ~ :where(span)::before,
|
|
2454
|
+
.bs-switch:where([aria-pressed]:not([aria-pressed="false"])) :where(span)::before {
|
|
2432
2455
|
transform: translate(calc(var(--switch-width) - var(--offset-double) - var(--ball-diameter)), -50%);
|
|
2433
2456
|
}
|
|
2434
|
-
.bs-switch
|
|
2435
|
-
.bs-switch:where([aria-pressed]
|
|
2457
|
+
.bs-switch :where(input:checked) ~ :where(span[data-inner-on-label][data-inner-off-label])::before,
|
|
2458
|
+
.bs-switch:where([aria-pressed]:not([aria-pressed="false"])) :where(span[data-inner-on-label][data-inner-off-label])::before {
|
|
2436
2459
|
transform: translate(calc(var(--switch-width) - var(--offset-double) - var(--ball-diameter)), -50%);
|
|
2437
2460
|
}
|
|
2438
2461
|
/* Inner "on/off" text */
|
|
2439
|
-
.bs-switch
|
|
2440
|
-
color: white;
|
|
2441
|
-
--switch-width: 3.5rem;
|
|
2442
|
-
}
|
|
2443
|
-
.bs-switch:where([data-size="sm"]) span:where([data-inner-on-label][data-inner-off-label]) {
|
|
2444
|
-
--switch-width: 2.625rem;
|
|
2445
|
-
}
|
|
2446
|
-
.bs-switch span::after {
|
|
2462
|
+
.bs-switch :where(span)::after {
|
|
2447
2463
|
align-items: center;
|
|
2448
2464
|
color: var(--ball-background);
|
|
2465
|
+
content: var(--inner-label-text);
|
|
2449
2466
|
display: flex;
|
|
2450
2467
|
height: 100%;
|
|
2451
|
-
justify-content: flex-start;
|
|
2468
|
+
justify-content: var(--inner-label-position, flex-start);
|
|
2452
2469
|
left: 0;
|
|
2453
2470
|
line-height: var(--inner-text-line-height);
|
|
2454
2471
|
padding: var(--inner-text-padding);
|
|
@@ -2457,30 +2474,39 @@ input:where([type='checkbox'], [type='radio'])[data-error]:where(:not([data-erro
|
|
|
2457
2474
|
top: 0;
|
|
2458
2475
|
width: 100%;
|
|
2459
2476
|
}
|
|
2460
|
-
.bs-switch
|
|
2461
|
-
|
|
2462
|
-
content: attr(data-inner-off-label);
|
|
2463
|
-
justify-content: flex-end;
|
|
2477
|
+
.bs-switch :where([data-inner-on-label][data-inner-off-label]) {
|
|
2478
|
+
--switch-width: 3.5rem;
|
|
2464
2479
|
}
|
|
2465
|
-
.bs-switch
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2480
|
+
.bs-switch:where([data-size="sm"]) :where([data-inner-on-label][data-inner-off-label]) {
|
|
2481
|
+
--switch-width: 2.625rem;
|
|
2482
|
+
}
|
|
2483
|
+
.bs-switch :where(input:not(:checked)) ~ :where([data-inner-on-label][data-inner-off-label])::after,
|
|
2484
|
+
.bs-switch:where([aria-pressed="false"]) :where([data-inner-on-label][data-inner-off-label])::after {
|
|
2485
|
+
--inner-label-position: flex-end;
|
|
2486
|
+
--inner-label-text: attr(data-inner-off-label);
|
|
2487
|
+
}
|
|
2488
|
+
.bs-switch :where(input:checked) ~ :where([data-inner-on-label][data-inner-off-label])::after,
|
|
2489
|
+
.bs-switch:where([aria-pressed]:not([aria-pressed="false"])) :where([data-inner-on-label][data-inner-off-label])::after {
|
|
2490
|
+
--inner-label-text: attr(data-inner-on-label);
|
|
2469
2491
|
}
|
|
2470
2492
|
/* Focus state */
|
|
2471
|
-
.bs-switch :where(input:focus-visible) + span
|
|
2493
|
+
.bs-switch :where(input:focus-visible) + :where(span),
|
|
2494
|
+
.bs-switch:where(:focus-visible) :where(button span) {
|
|
2472
2495
|
box-shadow: 0 0 0 2px var(--offset-color, var(--bs-bg-base)),
|
|
2473
2496
|
0 0 0 4px var(--outline-color, var(--bs-blue-base));
|
|
2474
2497
|
outline: 2px solid transparent;
|
|
2475
2498
|
}
|
|
2476
|
-
:where(.box) .bs-switch :where(input:focus-visible) + span
|
|
2499
|
+
:where(.box) .bs-switch :where(input:focus-visible) + :where(span),
|
|
2500
|
+
:where(.box) .bs-switch:where(:focus-visible) :where(button span) {
|
|
2477
2501
|
--offset-color: var(--bs-bg-medium);
|
|
2478
2502
|
}
|
|
2479
|
-
:where(.box[data-invert]) .bs-switch :where(input:focus-visible) + span
|
|
2503
|
+
:where(.box[data-invert]) .bs-switch :where(input:focus-visible) + :where(span),
|
|
2504
|
+
:where(.box[data-invert]) .bs-switch:where(:focus-visible) :where(button span) {
|
|
2480
2505
|
--offset-color: var(--bs-bg-invert-base);
|
|
2481
2506
|
}
|
|
2482
2507
|
/* Disabled state */
|
|
2483
|
-
.bs-switch:where([data-disabled]:not([data-disabled="false"]))
|
|
2508
|
+
.bs-switch:where([data-disabled]:not([data-disabled="false"]), :disabled, [disabled]),
|
|
2509
|
+
.bs-switch:where([data-disabled]:not([data-disabled="false"]), :disabled, [disabled]) :is(input ~ span, button span) {
|
|
2484
2510
|
--ball-background: var(--bs-ink-disabled);
|
|
2485
2511
|
--switch-background: var(--bs-bg-disabled);
|
|
2486
2512
|
}
|
|
@@ -2521,7 +2547,16 @@ input:where([type='checkbox'], [type='radio'])[data-error]:where(:not([data-erro
|
|
|
2521
2547
|
.bs-modal:where([data-shown]:not([data-shown="false"])) {
|
|
2522
2548
|
opacity: 1;
|
|
2523
2549
|
}
|
|
2524
|
-
.bs-modal :where(.
|
|
2550
|
+
.bs-modal :where(.modal-header) {
|
|
2551
|
+
align-items: center;
|
|
2552
|
+
display: flex;
|
|
2553
|
+
justify-content: space-between;
|
|
2554
|
+
margin-bottom: 1.5rem;
|
|
2555
|
+
}
|
|
2556
|
+
.bs-modal :where(.modal-title) {
|
|
2557
|
+
flex-grow: 1;
|
|
2558
|
+
}
|
|
2559
|
+
.bs-modal :where(.only-close-button-modal-header) {
|
|
2525
2560
|
display: flex;
|
|
2526
2561
|
justify-content: flex-end;
|
|
2527
2562
|
margin-bottom: 1.5rem;
|