@wwtdev/bsds-css 2.1.5 → 2.2.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.
@@ -99,8 +99,8 @@ and issues with box-sizing
99
99
 
100
100
  /* -------- Inner-bordered styles -------- */
101
101
  /** Inner borders should be straight; shown only if variant: "inner-bordered" */
102
- .bs-input-addon:where([data-variant="inner-bordered"]),
103
- .bs-input-addon:where([data-variant="inner-bordered"]) :where(.bs-input-addon) {
102
+
103
+ .bs-input-addon:where([data-variant="inner-bordered"]) {
104
104
  --input-addon-nested-border: var(--bs-violet-lightest);
105
105
  }
106
106
 
@@ -164,7 +164,7 @@ and issues with box-sizing
164
164
  z-index: 1;
165
165
  }
166
166
 
167
- .bs-input-addon:where([data-multifocus]:not([data-multifocus="false"])) > :where(:not(.bs-input-addon)) > :where(input:focus, select:focus, button:focus),
167
+ .bs-input-addon:where([data-multifocus]:not([data-multifocus="false"])) > :where(:not(.bs-input-addon)) > :is(input, select, button):where(:focus),
168
168
  .bs-input-addon:where([data-multifocus]:not([data-multifocus="false"])) > :is(input, select):where(.bs-input, .bs-select):where(:focus),
169
169
  .bs-input-addon:where([data-multifocus]:not([data-multifocus="false"])) > :is(bs-input, bs-select) :where(input:focus, select:focus),
170
170
  .bs-input-addon:where([data-multifocus]:not([data-multifocus="false"])) > :where(input:focus, select:focus, button:focus) {
@@ -198,6 +198,7 @@ and issues with box-sizing
198
198
  .bs-input-addon:where([data-disabled]:not([data-disabled="false"])) .bs-button {
199
199
  --input-bg: var(--bs-bg-disabled);
200
200
  --input-border: var(--bs-ink-disabled);
201
+ --input-addon-nested-border: var(--bs-ink-disabled);
201
202
  color: var(--bs-ink-disabled);
202
203
  }
203
204
  .bs-input-addon:where([data-disabled]:not([data-disabled="false"])) * {
@@ -0,0 +1,12 @@
1
+ .bs-input-phone :where(.bs-input-addon) > button {
2
+ align-items: center;
3
+ column-gap: .5rem;
4
+ cursor: pointer;
5
+ display: grid;
6
+ grid-template-columns: 1.25rem auto .75rem;
7
+ min-width: 6rem;
8
+ padding: 0 1rem;
9
+ }
10
+ .bs-input-phone ul:where(.bs-dropdown-options) {
11
+ min-width: 7.5rem;
12
+ }
@@ -39,13 +39,14 @@
39
39
  }
40
40
  /* Initials */
41
41
  .bs-profile-img:where([data-no-img]:not([data-no-img="false"]))::after {
42
+ align-items: center;
42
43
  border: 1px solid currentColor;
43
44
  color: var(--bs-blue-500);
44
45
  content: attr(data-initials);
46
+ display: flex;
45
47
  font-size: var(--profile-text);
48
+ justify-content: center;
46
49
  text-transform: uppercase;
47
- display: grid;
48
- place-items: center;
49
50
  }
50
51
 
51
52
  /* Profile Sizes */
@@ -138,14 +138,6 @@ module.exports = {
138
138
  "f-3xl": "clamp(2.00rem, calc(1.88rem + 0.50vw), 2.25rem)",
139
139
  "f-4xl": "clamp(2.25rem, calc(1.88rem + 1.50vw), 3.00rem)"
140
140
  },
141
- minHeight: {
142
- ...defaultTheme.minHeight,
143
- ...defaultTheme.spacing,
144
- "half-screen": "50vh",
145
- "13": "3.25rem",
146
- "15": "3.75rem",
147
- "18": "4.5rem",
148
- },
149
141
  extend: {
150
142
  animation: {
151
143
  'spin-2': 'spin 2s linear infinite',
@@ -262,6 +254,12 @@ module.exports = {
262
254
  "5xl": "90rem",
263
255
  "6xl": "100rem",
264
256
  },
257
+ minHeight: {
258
+ "half-screen": "50vh",
259
+ "13": "3.25rem",
260
+ "15": "3.75rem",
261
+ "18": "4.5rem",
262
+ },
265
263
  screens: {
266
264
  // these are pretty wwt.com-specific, but they're additive/non-standard so should be fine to include here
267
265
  wm: "752px",
package/dist/wwt-bsds.css CHANGED
@@ -1386,13 +1386,15 @@ a.bs-circle-button {
1386
1386
  top: 0;
1387
1387
  z-index: 998;
1388
1388
  }
1389
- /* Content (mobile version and general styles) */
1389
+ /* Content */
1390
1390
  .bs-dropdown {
1391
1391
  --dropdown-bottom: 0;
1392
1392
  --dropdown-left: 0;
1393
1393
  --dropdown-right: auto;
1394
1394
  --dropdown-top: auto;
1395
1395
  --dropdown-width: 100%;
1396
+ --dropdown-transform: translate(0, 100%);
1397
+
1396
1398
  background-color: var(--bs-bg-base-elevated);
1397
1399
  border-radius: 4px;
1398
1400
  bottom: var(--dropdown-bottom);
@@ -1406,15 +1408,14 @@ a.bs-circle-button {
1406
1408
  right: var(--dropdown-right);
1407
1409
  top: var(--dropdown-top);
1408
1410
  transform-origin: center bottom;
1409
- transform: translateY(100%);
1411
+ transform: var(--dropdown-transform);
1410
1412
  transition-duration: 75ms;
1411
1413
  transition-property: opacity, transform;
1412
1414
  transition-timing-function: ease-in-out;
1413
1415
  width: var(--dropdown-width);
1414
- z-index: -1;
1416
+ z-index: 999;
1415
1417
  }
1416
- /* mobile header */
1417
- /* TODO: h3 may not be the right tag to use here... label, possibly? */
1418
+ /* Mobile Header */
1418
1419
  .bs-dropdown > :where(header) {
1419
1420
  border-bottom: 1px solid var(--bs-border-base);
1420
1421
  display: flex;
@@ -1432,23 +1433,52 @@ a.bs-circle-button {
1432
1433
  height: 1rem;
1433
1434
  width: 1rem;
1434
1435
  }
1435
- /* mobile search input */
1436
- .bs-dropdown :where(.bs-dropdown-search) {
1437
- padding: 1.5rem 1.5rem 0 1.5rem;
1438
- }
1439
- .bs-dropdown :where(.bs-dropdown-search bs-input-search) {
1440
- margin-bottom: 1rem;
1441
- margin-left: -0.75rem;
1442
- width: calc(100% + 1.5rem);
1443
- }
1444
- .bs-dropdown:where([data-search]:not([data-search="false"])) :where(.bs-dropdown-options) {
1445
- --options-height-max: 11.5rem;
1446
- }
1447
1436
  /* data-shown */
1448
1437
  .bs-dropdown:where([data-shown]:not([data-shown="false"])) {
1438
+ --dropdown-transform: translate(0, 0);
1449
1439
  opacity: 1;
1450
- transform: translateY(0);
1451
- z-index: 999;
1440
+ }
1441
+ /* Sizing */
1442
+ .bs-dropdown:where([data-width="sm"]) {
1443
+ --dropdown-wscreen-width: 10rem;
1444
+ }
1445
+ .bs-dropdown:where([data-width="md"]),
1446
+ .bs-dropdown:where(:not([data-width])) {
1447
+ --dropdown-wscreen-width: 20rem;
1448
+ }
1449
+ .bs-dropdown:where([data-width="lg"]) {
1450
+ --dropdown-wscreen-width: 40rem;
1451
+ }
1452
+ .bs-dropdown:where([data-width="content"]) {
1453
+ --dropdown-wscreen-width: auto;
1454
+ }
1455
+ .bs-dropdown-parent:where([data-width="toggle"]) :where(.bs-dropdown),
1456
+ .bs-dropdown-parent:where([data-width="anchor"]) :where(.bs-dropdown) {
1457
+ --dropdown-wscreen-width: 100%;
1458
+ }
1459
+ /* data-top */
1460
+ .bs-dropdown:where([data-top]:not([data-top="false"])) {
1461
+ --dropdown-wscreen-bottom: calc(100% + 0.5rem);
1462
+ --dropdown-wscreen-top: auto;
1463
+ }
1464
+ /* data-center */
1465
+ .bs-dropdown-parent:where([data-center]:not([data-center="false"])) :where(.bs-dropdown) {
1466
+ --dropdown-transform: translate(-50%, 0);
1467
+ --dropdown-wscreen-left: 50%;
1468
+ }
1469
+ /* Overrides mobile style when not min-width 752 */
1470
+ .bs-dropdown:where([data-no-mobile="true"]) {
1471
+ --dropdown-bottom: var(--dropdown-wscreen-bottom, auto);
1472
+ --dropdown-left: var(--dropdown-wscreen-left, initial);
1473
+ --dropdown-right: var(--dropdown-wscreen-right, initial);
1474
+ --dropdown-top: var(--dropdown-wscreen-top, calc(100% + 0.5rem));
1475
+ --dropdown-width: var(--dropdown-wscreen-width, initial);
1476
+ --dropdown-transform: initial;
1477
+
1478
+ position: absolute;
1479
+ }
1480
+ .bs-dropdown:where([data-no-mobile="true"]) > :where(header) {
1481
+ display: none;
1452
1482
  }
1453
1483
  @media (min-width: 752px) {
1454
1484
  .bs-dropdown-backdrop {
@@ -1461,60 +1491,15 @@ a.bs-circle-button {
1461
1491
  --dropdown-right: var(--dropdown-wscreen-right, initial);
1462
1492
  --dropdown-top: var(--dropdown-wscreen-top, calc(100% + 0.5rem));
1463
1493
  --dropdown-width: var(--dropdown-wscreen-width, initial);
1494
+ --dropdown-transform: initial;
1495
+
1464
1496
  position: absolute;
1465
- transform: initial;
1466
1497
  }
1467
1498
 
1468
1499
  /* Hide the header */
1469
1500
  .bs-dropdown > :where(header) {
1470
1501
  display: none;
1471
1502
  }
1472
-
1473
- /* Sizing */
1474
- .bs-dropdown:where([data-width="sm"]) {
1475
- --dropdown-wscreen-width: 10rem;
1476
- }
1477
-
1478
- .bs-dropdown:where([data-width="md"]),
1479
- .bs-dropdown:where(:not([data-width])) {
1480
- --dropdown-wscreen-width: 20rem;
1481
- }
1482
-
1483
- .bs-dropdown:where([data-width="lg"]) {
1484
- --dropdown-wscreen-width: 40rem;
1485
- }
1486
-
1487
- .bs-dropdown:where([data-width="content"]) {
1488
- --dropdown-wscreen-width: auto;
1489
- }
1490
-
1491
- .bs-dropdown-parent:where([data-width="toggle"]) :where(.bs-dropdown) {
1492
- --dropdown-wscreen-width: 100%;
1493
- }
1494
-
1495
- /* data-shown */
1496
- .bs-dropdown:where([data-shown]:not([data-shown="false"])) {
1497
- opacity: 1;
1498
- }
1499
-
1500
- /* data-top */
1501
- .bs-dropdown:where([data-top]:not([data-top="false"])) {
1502
- --dropdown-wscreen-bottom: calc(100% + 0.5rem);
1503
- --dropdown-wscreen-top: auto;
1504
- }
1505
-
1506
- /* data-justify="center" */
1507
- .bs-dropdown-parent:where([data-center]:not([data-center="false"])) :where(.bs-dropdown) {
1508
- --dropdown-wscreen-left: 50%;
1509
- transform: translateX(-50%);
1510
- }
1511
-
1512
- .bs-dropdown :where(.bs-dropdown-options) {
1513
- --options-height-max: 20rem;
1514
- }
1515
- .bs-dropdown:where([data-search]:not([data-search="false"])) :where(.bs-dropdown-options) {
1516
- --options-height-max: 17.25rem;
1517
- }
1518
1503
  }
1519
1504
  /* Option list */
1520
1505
  .bs-dropdown-options {
@@ -1552,8 +1537,14 @@ a.bs-circle-button {
1552
1537
  .bs-dropdown-options :where(li[data-variant~="2-col"]) {
1553
1538
  grid-template-columns: min-content 1fr;
1554
1539
  }
1540
+ /* Variant: 3-col */
1541
+ .bs-dropdown-options :where(li[data-variant~="3-col"]) {
1542
+ grid-template-columns: min-content min-content 1fr;
1543
+ }
1555
1544
  /* Variant: description */
1556
- .bs-dropdown-options :where(li:not([data-variant~="2-col"])[data-variant~="description"] > :nth-child(2)) {
1545
+ .bs-dropdown-options :where(li:not([data-variant*="-col"])[data-variant~="description"] > :nth-child(2)),
1546
+ .bs-dropdown-options :where(li[data-variant~="2-col"][data-variant~="description"] > :nth-child(3)),
1547
+ .bs-dropdown-options :where(li[data-variant~="3-col"][data-variant~="description"] > :nth-child(4)) {
1557
1548
  color: var(--bs-ink-light);
1558
1549
  font-size: var(--bs-text-xs);
1559
1550
  min-height: 1.125rem;
@@ -1561,11 +1552,11 @@ a.bs-circle-button {
1561
1552
  }
1562
1553
  /* Variant: 2-col description */
1563
1554
  .bs-dropdown-options :where(li[data-variant~="2-col"][data-variant~="description"] > :nth-child(3)) {
1564
- color: var(--bs-ink-light);
1565
- font-size: var(--bs-text-xs);
1566
1555
  grid-column-start: 2;
1567
- min-height: 1.125rem;
1568
- line-height: 1.125rem;
1556
+ }
1557
+ /* Variant: 3-col description */
1558
+ .bs-dropdown-options :where(li[data-variant~="3-col"][data-variant~="description"] > :nth-child(4)) {
1559
+ grid-column-start: 3;
1569
1560
  }
1570
1561
  /* Hover or data-selected */
1571
1562
  .bs-dropdown-options :where(li:not([role="separator"]):hover),
@@ -1584,18 +1575,22 @@ a.bs-circle-button {
1584
1575
  border-left: 4px solid var(--bs-red-500);
1585
1576
  color: var(--bs-red-500);
1586
1577
  }
1587
- /* Hover or data-selected for 2-col/description variants */
1588
- .bs-dropdown-options :where(li:not([data-variant~="2-col"])[data-variant~="description"]:hover > :nth-child(2)),
1578
+ /* Hover or data-selected for 2-col/3-col/description variants */
1579
+ .bs-dropdown-options :where(li:not([data-variant*="-col"])[data-variant~="description"]:hover > :nth-child(2)),
1589
1580
  .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)) {
1581
+ .bs-dropdown-options :where(li[data-variant~="3-col"][data-variant~="description"]:hover > :nth-child(4)),
1582
+ .bs-dropdown-options :where(li:not([data-variant*="-col"])[data-variant~="description"][data-selected] > :nth-child(2)),
1583
+ .bs-dropdown-options :where(li[data-variant~="2-col"][data-variant~="description"][data-selected] > :nth-child(3)),
1584
+ .bs-dropdown-options :where(li[data-variant~="3-col"][data-variant~="description"][data-selected] > :nth-child(4)) {
1592
1585
  color: var(--bs-blue-base);
1593
1586
  }
1594
- /* Hover or data-selected for negative + 2-col/description variants */
1595
- .bs-dropdown-options :where(li[data-variant~="negative"]:not([data-variant~="2-col"])[data-variant~="description"]:hover > :nth-child(2)),
1587
+ /* Hover or data-selected for negative + 2-col/3-col/description variants */
1588
+ .bs-dropdown-options :where(li[data-variant~="negative"]:not([data-variant*="-col"])[data-variant~="description"]:hover > :nth-child(2)),
1596
1589
  .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)) {
1590
+ .bs-dropdown-options :where(li[data-variant~="negative"][data-variant~="3-col"][data-variant~="description"]:hover > :nth-child(4)),
1591
+ .bs-dropdown-options :where(li[data-variant~="negative"]:not([data-variant*="-col"])[data-variant~="description"][data-selected] > :nth-child(2)),
1592
+ .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"][data-variant~="3-col"][data-variant~="description"][data-selected] > :nth-child(4)) {
1599
1594
  color: var(--bs-red-500);
1600
1595
  }
1601
1596
  /* List option mouse click focus (do not show) */
@@ -1628,12 +1623,52 @@ a.bs-circle-button {
1628
1623
  padding-block: 0.125rem;
1629
1624
  padding-right: 1.375rem;
1630
1625
  }
1626
+ /* Multi-select divider line */
1631
1627
  .bs-dropdown-options :where(hr) {
1632
1628
  background-color: var(--bs-navy-light);
1633
1629
  height: .0625rem;
1634
1630
  margin-block: 0;
1635
1631
  margin-inline: 0;
1636
1632
  }
1633
+ /* Disable hover styles */
1634
+ .bs-dropdown-options :where(li[data-no-hover]:hover) {
1635
+ background-color: transparent;
1636
+ border-left-color: transparent;
1637
+ color: var(--bs-ink-base);
1638
+ cursor: default;
1639
+ }
1640
+ /* Style label to look like other options */
1641
+ .bs-dropdown-options :where(li label) {
1642
+ cursor: pointer;
1643
+ font-size: 1rem;
1644
+ font-weight: 400;
1645
+ }
1646
+ /* Don't change option color when checkbox is present */
1647
+ .bs-dropdown-options :where(li[data-variant~="checkbox"]):hover,
1648
+ .bs-dropdown-options :where(li[data-variant~="checkbox"][data-selected]) {
1649
+ color: var(--bs-ink-base);
1650
+ }
1651
+ /* Don't change description color when checkbox is present */
1652
+ .bs-dropdown-options :where(li[data-variant~="checkbox"][data-variant~="2-col"][data-variant~="description"]):hover > :nth-child(3),
1653
+ .bs-dropdown-options :where(li[data-variant~="checkbox"][data-variant~="2-col"][data-variant~="description"][data-selected]) > :nth-child(3),
1654
+ .bs-dropdown-options :where(li[data-variant~="checkbox"][data-variant~="3-col"][data-variant~="description"]):hover > :nth-child(4),
1655
+ .bs-dropdown-options :where(li[data-variant~="checkbox"][data-variant~="3-col"][data-variant~="description"][data-selected]) > :nth-child(4) {
1656
+ color: var(--bs-ink-light);
1657
+ }
1658
+ /* Overrides mobile style when not min-width 752 */
1659
+ .bs-dropdown:where([data-no-mobile="true"]) :where(.bs-dropdown-options) :where(li) {
1660
+ padding-left: 0.5rem;
1661
+ padding-right: 0.75rem;
1662
+ }
1663
+ .bs-dropdown:where([data-no-mobile="true"]) :where(.bs-dropdown-options) :where(li[role="separator"]) {
1664
+ padding-right: 0.625rem;
1665
+ }
1666
+ .bs-dropdown:where([data-no-mobile="true"]) :where(.bs-dropdown-options) :where(li:focus-visible) {
1667
+ padding-left: 0.625rem;
1668
+ }
1669
+ .bs-dropdown:where([data-no-mobile="true"]) :where(.bs-dropdown-options) :where(li[data-selected]:focus-visible) {
1670
+ padding-left: 0.5rem;
1671
+ }
1637
1672
  @media (min-width: 752px) {
1638
1673
  .bs-dropdown-options :where(li) {
1639
1674
  padding-left: 0.5rem;
@@ -2019,8 +2054,7 @@ and issues with box-sizing
2019
2054
  }
2020
2055
  /* -------- Inner-bordered styles -------- */
2021
2056
  /** Inner borders should be straight; shown only if variant: "inner-bordered" */
2022
- .bs-input-addon:where([data-variant="inner-bordered"]),
2023
- .bs-input-addon:where([data-variant="inner-bordered"]) :where(.bs-input-addon) {
2057
+ .bs-input-addon:where([data-variant="inner-bordered"]) {
2024
2058
  --input-addon-nested-border: var(--bs-violet-lightest);
2025
2059
  }
2026
2060
  .bs-input-addon > :where(.bs-input-addon:not(:last-child, :focus-within)),
@@ -2073,7 +2107,7 @@ and issues with box-sizing
2073
2107
  .bs-input-addon :where(.bs-input-addon:focus-within)::after {
2074
2108
  z-index: 1;
2075
2109
  }
2076
- .bs-input-addon:where([data-multifocus]:not([data-multifocus="false"])) > :where(:not(.bs-input-addon)) > :where(input:focus, select:focus, button:focus),
2110
+ .bs-input-addon:where([data-multifocus]:not([data-multifocus="false"])) > :where(:not(.bs-input-addon)) > :is(input, select, button):where(:focus),
2077
2111
  .bs-input-addon:where([data-multifocus]:not([data-multifocus="false"])) > :is(input, select):where(.bs-input, .bs-select):where(:focus),
2078
2112
  .bs-input-addon:where([data-multifocus]:not([data-multifocus="false"])) > :is(bs-input, bs-select) :where(input:focus, select:focus),
2079
2113
  .bs-input-addon:where([data-multifocus]:not([data-multifocus="false"])) > :where(input:focus, select:focus, button:focus) {
@@ -2103,6 +2137,7 @@ and issues with box-sizing
2103
2137
  .bs-input-addon:where([data-disabled]:not([data-disabled="false"])) .bs-button {
2104
2138
  --input-bg: var(--bs-bg-disabled);
2105
2139
  --input-border: var(--bs-ink-disabled);
2140
+ --input-addon-nested-border: var(--bs-ink-disabled);
2106
2141
  color: var(--bs-ink-disabled);
2107
2142
  }
2108
2143
  .bs-input-addon:where([data-disabled]:not([data-disabled="false"])) * {
@@ -2122,6 +2157,19 @@ and issues with box-sizing
2122
2157
  :where(label, .bs-label, bs-label) + .bs-input-addon {
2123
2158
  margin-top: 0.25rem;
2124
2159
  }
2160
+ .bs-input-phone :where(.bs-input-addon) > button {
2161
+ align-items: center;
2162
+ -moz-column-gap: .5rem;
2163
+ column-gap: .5rem;
2164
+ cursor: pointer;
2165
+ display: grid;
2166
+ grid-template-columns: 1.25rem auto .75rem;
2167
+ min-width: 6rem;
2168
+ padding: 0 1rem;
2169
+ }
2170
+ .bs-input-phone ul:where(.bs-dropdown-options) {
2171
+ min-width: 7.5rem;
2172
+ }
2125
2173
  :where(.bs-input-search) {
2126
2174
  display: inline-block;
2127
2175
  width: 100%;
@@ -2995,13 +3043,14 @@ input:where([type='checkbox'], [type='radio'])[data-error]:where(:not([data-erro
2995
3043
  }
2996
3044
  /* Initials */
2997
3045
  .bs-profile-img:where([data-no-img]:not([data-no-img="false"]))::after {
3046
+ align-items: center;
2998
3047
  border: 1px solid currentColor;
2999
3048
  color: var(--bs-blue-500);
3000
3049
  content: attr(data-initials);
3050
+ display: flex;
3001
3051
  font-size: var(--profile-text);
3052
+ justify-content: center;
3002
3053
  text-transform: uppercase;
3003
- display: grid;
3004
- place-items: center;
3005
3054
  }
3006
3055
  /* Profile Sizes */
3007
3056
  .bs-profile-img:where([data-img-size^='xs']) {