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