@wwtdev/bsds-css 2.1.2 → 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/wwt-bsds.css CHANGED
@@ -352,6 +352,9 @@ button {
352
352
  --bs-font-normal: 400;
353
353
  --bs-font-bold: 600;
354
354
 
355
+ /* Special use cases */
356
+ --bs-bg-input-hover: rgba(201, 202, 217, 0.20);
357
+
355
358
  /* deprecate / phase out.. */
356
359
  --bs-bg-subtle: var(--bs-gray-100);
357
360
  --bs-bg-invert: var(--bs-navy-500);
@@ -1047,7 +1050,7 @@ a:where(.bs-link):where(:focus:not(:focus-visible)) {
1047
1050
  cursor: pointer;
1048
1051
  display: inline-flex;
1049
1052
  font-size: var(--btn-text-size, var(--bs-text-md));
1050
- font-weight: 600;
1053
+ font-weight: var(--btn-weight, 600);
1051
1054
  height: var(--btn-height, 2.5rem);
1052
1055
  justify-content: center;
1053
1056
  line-height: 1.5;
@@ -1150,10 +1153,10 @@ a:where(.bs-link):where(:focus:not(:focus-visible)) {
1150
1153
  --btn-padding: 0;
1151
1154
  --btn-focus-pseudo-width: calc(100% + 1rem); /* text btns don't have side padding, but we do want focus outline to look padded */
1152
1155
  --btn-text-size: var(--bs-text-md);
1156
+ --btn-weight: 400;
1153
1157
  background-color: transparent;
1154
1158
  color: var(--bs-blue-500);
1155
1159
  cursor: pointer;
1156
- font-weight: 400;
1157
1160
  line-height: 150%;
1158
1161
  }
1159
1162
  .bs-button:where([data-text]:not([data-text="false"])):hover {
@@ -1166,24 +1169,41 @@ a:where(.bs-link):where(:focus:not(:focus-visible)) {
1166
1169
  }
1167
1170
  .bs-button:where([data-text]:not([data-text="false"])):active {
1168
1171
  box-shadow: none;
1172
+ transform: none;
1173
+ }
1174
+ /* ------------ Button Sizes, Media-based Text Sizing -------------- */
1175
+ /* Std button: Mobile text size, WM text size */
1176
+ .bs-button {
1177
+ --btn-text-size: 1rem;
1178
+ }
1179
+ @media (min-width: 752px) {
1180
+ .bs-button {
1181
+ --btn-text-size: 1.125rem;
1182
+ }
1169
1183
  }
1170
- /* ------------ Button Size -------------- */
1171
1184
  .bs-button:where([data-size^='sm']) {
1172
1185
  --btn-height: 1.75rem;
1173
1186
  --btn-padding: .25rem .75rem .375rem;
1187
+ /* Std button size="sm" text size is same across all media sizes */
1174
1188
  --btn-text-size: var(--bs-text-sm);
1175
1189
  }
1176
- .bs-button:where([data-size][data-text]:not([data-text="false"])) {
1190
+ /* Text buttons: For now, text size not dependent on media size */
1191
+ .bs-button:where([data-text]:not([data-text="false"])) {
1177
1192
  --btn-height: auto;
1178
1193
  --btn-padding: 0;
1194
+ --btn-text-size: var(--bs-text-md);
1179
1195
  }
1180
1196
  .bs-button:where([data-size^='sm'][data-text]:not([data-text="false"])) {
1181
1197
  --btn-text-size: var(--bs-text-base);
1182
1198
  }
1183
- /* Size XS only applies to text buttons */
1199
+ /* Size XS & XXS only applies to text buttons */
1184
1200
  .bs-button:where([data-size^='xs'][data-text]:not([data-text="false"])) {
1185
1201
  --btn-text-size: var(--bs-text-sm);
1186
1202
  }
1203
+ .bs-button:where([data-size^='xxs'][data-text]:not([data-text="false"])) {
1204
+ --btn-text-size: var(--bs-text-xs);
1205
+ --btn-weight: 600;
1206
+ }
1187
1207
  /* ------------ Disabled Styling ------------ */
1188
1208
  :where(button:disabled),
1189
1209
  .bs-button:where(:disabled),
@@ -1240,12 +1260,11 @@ a.bs-circle-button {
1240
1260
  outline: none;
1241
1261
  text-decoration: none;
1242
1262
  }
1243
- .bs-circle-button::before {
1263
+ .bs-circle-button :where(.bs-circle-button-icon)::before {
1244
1264
  border-color: var(--btn-border-color);
1245
1265
  border-radius: var(--btn-border-radius);
1246
1266
  border-style: solid;
1247
1267
  border-width: 0.125rem;
1248
- content: '';
1249
1268
  height: calc(100% + 0.5rem);
1250
1269
  inset: -0.25rem;
1251
1270
  position: absolute;
@@ -1268,15 +1287,16 @@ a.bs-circle-button {
1268
1287
  .bs-circle-button :where(.bs-circle-button-icon) :where(.bs-icon) {
1269
1288
  --icon-size: var(--btn-icon-size);
1270
1289
  }
1271
- /* Button Size */
1272
- .bs-circle-button:where([data-size^='sm']) {
1273
- --btn-icon-padding: .375rem;
1274
- --btn-icon-size: .75rem;
1275
- --btn-text-size: var(--bs-text-sm);
1290
+ /* non-bs-icon svgs */
1291
+ .bs-circle-button :where(.bs-circle-button-icon) > :where(svg) {
1292
+ height: var(--btn-icon-size);
1293
+ width: var(--btn-icon-size);
1276
1294
  }
1277
1295
  /* Icon Buttons with Text */
1278
1296
  .bs-circle-button:where([data-text]:not([data-text="false"])) {
1279
- --btn-border-radius: 0.5rem;
1297
+ --btn-text-size: var(--bs-text-md);
1298
+ --btn-icon-size: 0.75rem;
1299
+ --btn-icon-padding: 0.375rem;
1280
1300
  }
1281
1301
  /* Ghost Buttons */
1282
1302
  .bs-circle-button:where([data-ghost]:not([data-ghost="false"])) {
@@ -1317,9 +1337,12 @@ a.bs-circle-button {
1317
1337
  inset 0 0 0 1px var(--btn-main),
1318
1338
  inset 0px 0px 4px 1px var(--btn-highlight);
1319
1339
  }
1320
- .bs-circle-button:focus-visible {
1340
+ .bs-circle-button:where(:focus-visible) {
1321
1341
  --btn-border-color: var(--btn-main);
1322
1342
  }
1343
+ .bs-circle-button:where(:focus-visible) :where(.bs-circle-button-icon)::before {
1344
+ content: '';
1345
+ }
1323
1346
  /* Disabled State */
1324
1347
  .bs-circle-button:where(:disabled, [aria-disabled]:not([aria-disabled="false"])) /* for links as buttons */ {
1325
1348
  --btn-icon-stroke-color: var(--bs-ink-disabled);
@@ -1329,6 +1352,22 @@ a.bs-circle-button {
1329
1352
  .bs-circle-button:where(:disabled, [aria-disabled]:not([aria-disabled="false"])) :where(.bs-circle-button-icon) {
1330
1353
  background-color: var(--bs-bg-disabled);
1331
1354
  }
1355
+ /* Button Size */
1356
+ .bs-circle-button:where([data-size^='sm']) {
1357
+ --btn-icon-padding: .375rem;
1358
+ --btn-icon-size: .75rem;
1359
+ --btn-text-size: var(--bs-text-sm);
1360
+ }
1361
+ .bs-circle-button:where([data-size^='sm'][data-text]:not([data-text="false"])) {
1362
+ --btn-icon-padding: .3125rem;
1363
+ --btn-icon-size: .625rem;
1364
+ --btn-text-size: var(--bs-text-base);
1365
+ }
1366
+ .bs-circle-button:where([data-size='xs'][data-text]:not([data-text="false"])) {
1367
+ --btn-icon-padding: .25rem;
1368
+ --btn-icon-size: .5rem;
1369
+ --btn-text-size: var(--bs-text-sm);
1370
+ }
1332
1371
  /* Parent */
1333
1372
  .bs-dropdown-parent {
1334
1373
  display: inline-block;
@@ -1479,15 +1518,14 @@ a.bs-circle-button {
1479
1518
  }
1480
1519
  /* Option list */
1481
1520
  .bs-dropdown-options {
1521
+ display: flex;
1522
+ flex-direction: column;
1523
+ gap: 0.5rem;
1482
1524
  list-style: none;
1483
- margin-bottom: 0.25rem;
1484
- margin-top: 0.25rem;
1525
+ margin-block: 0.25rem;
1485
1526
  max-height: var(--options-height-max, 20rem);/* constrain scrollable to options section */
1486
1527
  overflow-y: auto;
1487
- padding: 0;
1488
- }
1489
- .bs-dropdown-options :where(li:first-child) {
1490
- margin-top: 0.5rem;
1528
+ padding-block: 0.5rem;
1491
1529
  }
1492
1530
  /* Option list item */
1493
1531
  .bs-dropdown-options :where(li) {
@@ -1502,11 +1540,8 @@ a.bs-circle-button {
1502
1540
  column-gap: 0.5rem;
1503
1541
  cursor: pointer;
1504
1542
  display: grid;
1505
- margin-bottom: 0.5rem;
1506
- padding-bottom: 0.25rem;
1507
- padding-left: 1.25rem;
1508
- padding-right: 1.375rem;
1509
- padding-top: 0.25rem;
1543
+ padding-block: 0.25rem;
1544
+ padding-inline: 1.25rem;
1510
1545
  row-gap: 0.125rem;
1511
1546
  word-break: break-word;
1512
1547
  word-wrap: break-word;
@@ -1516,14 +1551,14 @@ a.bs-circle-button {
1516
1551
  grid-template-columns: min-content 1fr;
1517
1552
  }
1518
1553
  /* Variant: description */
1519
- .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)) {
1520
1555
  color: var(--bs-ink-light);
1521
1556
  font-size: var(--bs-text-xs);
1522
1557
  min-height: 1.125rem;
1523
1558
  line-height: 1.125rem;
1524
1559
  }
1525
1560
  /* Variant: 2-col description */
1526
- .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)) {
1527
1562
  color: var(--bs-ink-light);
1528
1563
  font-size: var(--bs-text-xs);
1529
1564
  grid-column-start: 2;
@@ -1531,7 +1566,7 @@ a.bs-circle-button {
1531
1566
  line-height: 1.125rem;
1532
1567
  }
1533
1568
  /* Hover or data-selected */
1534
- .bs-dropdown-options :where(li:hover),
1569
+ .bs-dropdown-options :where(li:not([role="separator"]):hover),
1535
1570
  .bs-dropdown-options :where(li[data-selected]) {
1536
1571
  background-color: var(--bs-bg-medium);
1537
1572
  border-left: 4px solid var(--bs-blue-base);
@@ -1548,17 +1583,17 @@ a.bs-circle-button {
1548
1583
  color: var(--bs-red-500);
1549
1584
  }
1550
1585
  /* Hover or data-selected for 2-col/description variants */
1551
- .bs-dropdown-options :where(li:not([data-variant~="2-col"])[data-variant~="description"]:hover :nth-child(2)),
1552
- .bs-dropdown-options :where(li[data-variant~="2-col"][data-variant~="description"]:hover :nth-child(3)),
1553
- .bs-dropdown-options :where(li:not([data-variant~="2-col"])[data-variant~="description"][data-selected] :nth-child(2)),
1554
- .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)) {
1555
1590
  color: var(--bs-blue-base);
1556
1591
  }
1557
1592
  /* Hover or data-selected for negative + 2-col/description variants */
1558
- .bs-dropdown-options :where(li[data-variant~="negative"]:not([data-variant~="2-col"])[data-variant~="description"]:hover :nth-child(2)),
1559
- .bs-dropdown-options :where(li[data-variant~="negative"][data-variant~="2-col"][data-variant~="description"]:hover :nth-child(3)),
1560
- .bs-dropdown-options :where(li[data-variant~="negative"]:not([data-variant~="2-col"])[data-variant~="description"][data-selected] :nth-child(2)),
1561
- .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)) {
1562
1597
  color: var(--bs-red-500);
1563
1598
  }
1564
1599
  /* List option mouse click focus (do not show) */
@@ -1585,11 +1620,35 @@ a.bs-circle-button {
1585
1620
  .bs-dropdown-options :where(li[data-variant~="negative"]:focus-visible) {
1586
1621
  --focus-border-color: var(--bs-red-200);
1587
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
+ }
1588
1635
  @media (min-width: 752px) {
1589
1636
  .bs-dropdown-options :where(li) {
1590
1637
  padding-left: 0.5rem;
1591
1638
  padding-right: 0.75rem;
1592
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
+ }
1593
1652
  }
1594
1653
  /*
1595
1654
  custom properties:
@@ -1684,20 +1743,22 @@ label:where(.bs-label) {
1684
1743
  .bs-label,
1685
1744
  :where(label, legend) {
1686
1745
  --label-color: var(--bs-ink-base);
1687
-
1688
1746
  color: var(--label-color);
1689
1747
  font-size: var(--bs-text-sm);
1690
1748
  font-weight: 600;
1691
1749
  line-height: var(--bs-leading-base);
1692
1750
  }
1693
- :where([data-required]:not([data-required="false"])),
1751
+ /* Required asterisk */
1752
+ :where(label, legend) :where([data-required]:not([data-required="false"])),
1694
1753
  .bs-label :where([data-required="true"]) {
1695
- --label-color: var(--bs-ink-red);
1754
+ color: var(--label-asterisk-color, var(--bs-ink-red));
1696
1755
  }
1756
+ /* Disabled state */
1697
1757
  :where(label[data-disabled]:not([data-disabled="false"])),
1698
1758
  :where(label[data-disabled]:not([data-disabled="false"])) *,
1699
1759
  .bs-label:where([data-disabled="true"]),
1700
1760
  .bs-label:where([data-disabled="true"]) * {
1761
+ --label-asterisk-color: transparent;
1701
1762
  --label-color: var(--bs-ink-disabled);
1702
1763
  }
1703
1764
  /* Generally applicable (all input types) */
@@ -1800,12 +1861,19 @@ textarea {
1800
1861
  :is(.bs-input, .bs-select, .bs-textarea):where(:focus-visible)::placeholder {
1801
1862
  opacity: 0;
1802
1863
  }
1864
+ /* FOCUS state */
1803
1865
  :is(input:where(:not([type='checkbox'], [type='radio'])), textarea, select):where(:focus-visible),
1804
1866
  :is(.bs-input, .bs-select, .bs-textarea):where(:focus-visible) {
1805
1867
  --input-border: var(--bs-blue-base);
1806
1868
  outline-style: none;
1807
1869
  outline-width: 0px;
1808
1870
  }
1871
+ /* HOVER state */
1872
+ :is(input:where(:not([type='checkbox'], [type='radio'])), textarea, select):where(:hover),
1873
+ :is(.bs-input, .bs-select, .bs-textarea):where(:hover) {
1874
+ --input-bg: var(--bs-bg-input-hover);
1875
+ }
1876
+ /* DISABLED state */
1809
1877
  :is(input:where(:not([type='checkbox'],[type='radio'])), textarea, select):where(:disabled),
1810
1878
  :is(.bs-input, .bs-select, .bs-textarea):where(:disabled) {
1811
1879
  --input-border: var(--bs-ink-disabled);
@@ -1831,15 +1899,13 @@ see https://bugs.chromium.org/p/chromium/issues/detail?id=89530
1831
1899
  opacity: 1;
1832
1900
  }
1833
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 {
1834
- color: var(--bs-ink-disabled);
1835
- opacity: 1;
1902
+ opacity: 0;
1836
1903
  }
1837
1904
  :is(input, textarea, select):disabled::placeholder,
1838
1905
  :is(input, textarea, select)[disabled]::placeholder,
1839
1906
  :is(.bs-input, .bs-textarea, .bs-select):disabled::placeholder,
1840
1907
  :is(.bs-input, .bs-textarea, .bs-select)[disabled]::placeholder {
1841
- color: var(--bs-ink-disabled);
1842
- opacity: 1;
1908
+ opacity: 0;
1843
1909
  }
1844
1910
  /* Select */
1845
1911
  select,
@@ -1878,6 +1944,9 @@ select,
1878
1944
  pointer-events: none;
1879
1945
  position: relative;
1880
1946
  }
1947
+ .bs-input-addon * {
1948
+ background-color: transparent;
1949
+ }
1881
1950
  /**
1882
1951
  Implement an outer 'border' via pseudo-element instead of
1883
1952
  on main element to avoid content shifting, double-stroke effect,
@@ -1918,7 +1987,6 @@ and issues with box-sizing
1918
1987
  width: 100%;
1919
1988
  }
1920
1989
  .bs-input-addon > *:where(:not(.bs-input-addon)) {
1921
- background-color: var(--input-bg, var(--bs-bg-base));
1922
1990
  border-width: 0px;
1923
1991
  display: flex;
1924
1992
  height: 100%;
@@ -1951,7 +2019,7 @@ and issues with box-sizing
1951
2019
  /** Inner borders should be straight; shown only if variant: "inner-bordered" */
1952
2020
  .bs-input-addon:where([data-variant="inner-bordered"]),
1953
2021
  .bs-input-addon:where([data-variant="inner-bordered"]) :where(.bs-input-addon) {
1954
- --input-addon-nested-border: var(--bs-violet-100);
2022
+ --input-addon-nested-border: var(--bs-violet-lightest);
1955
2023
  }
1956
2024
  .bs-input-addon > :where(.bs-input-addon:not(:last-child, :focus-within)),
1957
2025
  .bs-input-addon > :where(:not(:last-child, :focus-within))::after {
@@ -1979,6 +2047,10 @@ and issues with box-sizing
1979
2047
  .bs-input-addon:where([data-variant="inner-bordered"]) > :where(.bs-input-addon)::after {
1980
2048
  border-radius: 0px;
1981
2049
  }
2050
+ /* -------- Hover styles -------- */
2051
+ .bs-input-addon:hover {
2052
+ --input-bg: var(--bs-bg-input-hover);
2053
+ }
1982
2054
  /* -------- Focus styles -------- */
1983
2055
  .bs-input-addon {
1984
2056
  --focus-border: var(--bs-blue-base);
@@ -2027,9 +2099,9 @@ and issues with box-sizing
2027
2099
  /* -------- Disabled styles -------- */
2028
2100
  .bs-input-addon:where([data-disabled]:not([data-disabled="false"])),
2029
2101
  .bs-input-addon:where([data-disabled]:not([data-disabled="false"])) .bs-button {
2030
- --input-bg: var(--bs-gray-200);
2031
- --input-border: var(--bs-gray-400);
2032
- color: var(--bs-gray-400);
2102
+ --input-bg: var(--bs-bg-disabled);
2103
+ --input-border: var(--bs-ink-disabled);
2104
+ color: var(--bs-ink-disabled);
2033
2105
  }
2034
2106
  .bs-input-addon:where([data-disabled]:not([data-disabled="false"])) * {
2035
2107
  pointer-events: none;
@@ -2093,6 +2165,10 @@ and issues with box-sizing
2093
2165
  --search-icon-size: 1rem;
2094
2166
  --search-icon-padding: 0;
2095
2167
  }
2168
+ /* Filter variant: cancels out base hover state styles */
2169
+ .bs-input-addon:where([data-variant="filter"]):hover {
2170
+ --input-bg: var(--bs-bg-base);
2171
+ }
2096
2172
  /* -------- Disabled styles -------- */
2097
2173
  .bs-input-addon:where([data-variant="filter"][data-disabled="true"]),
2098
2174
  .bs-input-addon:where([data-variant="filter"][data-disabled="true"]) :is(.bs-button, .bs-input) {
@@ -2353,12 +2429,12 @@ input:where([type='checkbox'], [type='radio'])[data-error]:where(:not([data-erro
2353
2429
  transition: 250ms;
2354
2430
  width: var(--switch-width);
2355
2431
  }
2356
- .bs-switch input:where(:checked) ~ span,
2357
- .bs-switch:where([aria-pressed]):where(:not([aria-pressed="false"])) span {
2432
+ .bs-switch :where(input:checked) ~ :where(span),
2433
+ .bs-switch:where([aria-pressed]:not([aria-pressed="false"])) :where(span) {
2358
2434
  --switch-background: var(--bs-blue-base);
2359
2435
  }
2360
2436
  /* Toggle "ball" */
2361
- .bs-switch span::before {
2437
+ .bs-switch :where(span)::before {
2362
2438
  background-color: var(--ball-background);
2363
2439
  border-radius: 50%;
2364
2440
  box-sizing: border-box;
@@ -2372,28 +2448,22 @@ input:where([type='checkbox'], [type='radio'])[data-error]:where(:not([data-erro
2372
2448
  width: var(--ball-diameter);
2373
2449
  z-index: 2;
2374
2450
  }
2375
- .bs-switch input:where(:checked) ~ span::before,
2376
- .bs-switch:where([aria-pressed]):where(:not([aria-pressed="false"])) span::before {
2451
+ .bs-switch :where(input:checked) ~ :where(span)::before,
2452
+ .bs-switch:where([aria-pressed]:not([aria-pressed="false"])) :where(span)::before {
2377
2453
  transform: translate(calc(var(--switch-width) - var(--offset-double) - var(--ball-diameter)), -50%);
2378
2454
  }
2379
- .bs-switch input:where(:checked) ~ span:where([data-inner-on-label][data-inner-off-label])::before,
2380
- .bs-switch:where([aria-pressed]):where(:not([aria-pressed="false"])) span:where([data-inner-on-label][data-inner-off-label])::before {
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 {
2381
2457
  transform: translate(calc(var(--switch-width) - var(--offset-double) - var(--ball-diameter)), -50%);
2382
2458
  }
2383
2459
  /* Inner "on/off" text */
2384
- .bs-switch span:where([data-inner-on-label][data-inner-off-label]) {
2385
- color: white;
2386
- --switch-width: 3.5rem;
2387
- }
2388
- .bs-switch:where([data-size="sm"]) span:where([data-inner-on-label][data-inner-off-label]) {
2389
- --switch-width: 2.625rem;
2390
- }
2391
- .bs-switch span::after {
2460
+ .bs-switch :where(span)::after {
2392
2461
  align-items: center;
2393
2462
  color: var(--ball-background);
2463
+ content: var(--inner-label-text);
2394
2464
  display: flex;
2395
2465
  height: 100%;
2396
- justify-content: flex-start;
2466
+ justify-content: var(--inner-label-position, flex-start);
2397
2467
  left: 0;
2398
2468
  line-height: var(--inner-text-line-height);
2399
2469
  padding: var(--inner-text-padding);
@@ -2402,30 +2472,39 @@ input:where([type='checkbox'], [type='radio'])[data-error]:where(:not([data-erro
2402
2472
  top: 0;
2403
2473
  width: 100%;
2404
2474
  }
2405
- .bs-switch input:where(:not(:checked)) ~ span:where([data-inner-on-label][data-inner-off-label])::after,
2406
- .bs-switch:where([aria-pressed="false"]) span:where([data-inner-on-label][data-inner-off-label])::after {
2407
- content: attr(data-inner-off-label);
2408
- justify-content: flex-end;
2475
+ .bs-switch :where([data-inner-on-label][data-inner-off-label]) {
2476
+ --switch-width: 3.5rem;
2409
2477
  }
2410
- .bs-switch input:where(:checked) ~ span:where([data-inner-on-label][data-inner-off-label])::after,
2411
- .bs-switch:where([aria-pressed]):where(:not([aria-pressed="false"])) span:where([data-inner-on-label][data-inner-off-label])::after {
2412
- content: attr(data-inner-on-label);
2413
- justify-content: flex-start;
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);
2414
2489
  }
2415
2490
  /* Focus state */
2416
- .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) {
2417
2493
  box-shadow: 0 0 0 2px var(--offset-color, var(--bs-bg-base)),
2418
2494
  0 0 0 4px var(--outline-color, var(--bs-blue-base));
2419
2495
  outline: 2px solid transparent;
2420
2496
  }
2421
- :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) {
2422
2499
  --offset-color: var(--bs-bg-medium);
2423
2500
  }
2424
- :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) {
2425
2503
  --offset-color: var(--bs-bg-invert-base);
2426
2504
  }
2427
2505
  /* Disabled state */
2428
- .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) {
2429
2508
  --ball-background: var(--bs-ink-disabled);
2430
2509
  --switch-background: var(--bs-bg-disabled);
2431
2510
  }
@@ -2466,7 +2545,16 @@ input:where([type='checkbox'], [type='radio'])[data-error]:where(:not([data-erro
2466
2545
  .bs-modal:where([data-shown]:not([data-shown="false"])) {
2467
2546
  opacity: 1;
2468
2547
  }
2469
- .bs-modal :where(.close-button-container) {
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) {
2470
2558
  display: flex;
2471
2559
  justify-content: flex-end;
2472
2560
  margin-bottom: 1.5rem;