@wwtdev/bsds-css 1.9.0 → 1.10.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
@@ -1265,57 +1265,125 @@ a.bs-circle-button {
1265
1265
  }
1266
1266
  /* Content */
1267
1267
  .bs-dropdown {
1268
+ --dropdown-bottom: 0;
1269
+ --dropdown-left: 0;
1270
+ --dropdown-top: auto;
1271
+ --dropdown-width: 100%;
1268
1272
  background-color: var(--bs-bg-base-elevated);
1269
1273
  border-radius: 4px;
1270
- bottom: auto;
1274
+ bottom: var(--dropdown-bottom);
1271
1275
  box-shadow: var(--bs-shadow-contentMedium);
1276
+ left: var(--dropdown-left);
1272
1277
  line-height: 1.5rem;
1273
1278
  margin: 0;
1274
- max-height: 0;
1275
1279
  opacity: 0;
1276
1280
  overflow-y: auto;
1277
- position: absolute;
1278
- top: calc(100% + 0.5rem);
1281
+ position: fixed;
1282
+ top: var(--dropdown-top);
1283
+ transform: translateY(100%);
1284
+ transform-origin: center bottom;
1279
1285
  transition-duration: 75ms;
1280
- transition-property: opacity, max-height;
1286
+ transition-property: opacity, transform;
1281
1287
  transition-timing-function: ease-in-out;
1282
- z-index: 999;
1288
+ width: var(--dropdown-width);
1289
+ z-index: -1;
1283
1290
  }
1284
- /* Sizing */
1285
- .bs-dropdown:where([data-width="sm"]) {
1286
- width: 10rem;
1291
+ /* mobile header */
1292
+ /* TODO: h3 may not be the right tag to use here... label, possibly? */
1293
+ .bs-dropdown > :where(header) {
1294
+ border-bottom: 1px solid var(--bs-border-base);
1295
+ padding: 1.5rem;
1287
1296
  }
1288
- .bs-dropdown:where([data-width="md"]),
1289
- .bs-dropdown:where(:not([data-width])) {
1290
- width: 20rem;
1297
+ .bs-dropdown > :where(header) :where(h3) {
1298
+ font-size: 1.25rem;
1291
1299
  }
1292
- .bs-dropdown:where([data-width="lg"]) {
1293
- width: 40rem;
1300
+ .bs-dropdown > :where(header) :where(p) {
1301
+ font-size: 1rem;
1294
1302
  }
1295
- .bs-dropdown:where([data-width="content"]) {
1296
- width: auto;
1303
+ /* mobile search input */
1304
+ .bs-dropdown :where(.bs-dropdown-search) {
1305
+ padding: 1.5rem 1.5rem 0 1.5rem;
1297
1306
  }
1298
- .bs-dropdown-parent:where([data-width="toggle"]) :where(.bs-dropdown) {
1299
- width: 100%;
1307
+ .bs-dropdown :where(.bs-dropdown-search bs-input-search) {
1308
+ margin-bottom: 1rem;
1309
+ margin-left: -0.75rem;
1310
+ width: calc(100% + 1.5rem);
1311
+ }
1312
+ .bs-dropdown:where([data-search]) :where(.bs-dropdown-options) {
1313
+ --options-height-max: 11.5rem;
1300
1314
  }
1301
1315
  /* data-shown */
1302
1316
  .bs-dropdown:where([data-shown]) {
1303
- max-height: 20rem;
1304
1317
  opacity: 1;
1318
+ transform: translateY(0);
1319
+ z-index: 999;
1305
1320
  }
1306
- /* data-top */
1307
- .bs-dropdown:where([data-top]) {
1308
- bottom: calc(100% + 0.5rem);
1309
- top: auto;
1310
- }
1311
- /* data-justify="center" */
1312
- .bs-dropdown-parent:where([data-center]) :where(.bs-dropdown) {
1313
- left: 50%;
1314
- transform: translateX(-50%);
1321
+ @media (min-width: 752px) {
1322
+ .bs-dropdown {
1323
+ --dropdown-bottom: var(--dropdown-wscreen-bottom, auto);
1324
+ --dropdown-left: var(--dropdown-wscreen-left, initial);
1325
+ --dropdown-top: var(--dropdown-wscreen-top, calc(100% + 0.5rem));
1326
+ --dropdown-width: var(--dropdown-wscreen-width, initial);
1327
+ position: absolute;
1328
+ transform: initial;
1329
+ }
1330
+
1331
+ /* Hide the header */
1332
+ .bs-dropdown > :where(header) {
1333
+ display: none;
1334
+ }
1335
+
1336
+ /* Sizing */
1337
+ .bs-dropdown:where([data-width="sm"]) {
1338
+ --dropdown-wscreen-width: 10rem;
1339
+ }
1340
+
1341
+ .bs-dropdown:where([data-width="md"]),
1342
+ .bs-dropdown:where(:not([data-width])) {
1343
+ --dropdown-wscreen-width: 20rem;
1344
+ }
1345
+
1346
+ .bs-dropdown:where([data-width="lg"]) {
1347
+ --dropdown-wscreen-width: 40rem;
1348
+ }
1349
+
1350
+ .bs-dropdown:where([data-width="content"]) {
1351
+ --dropdown-wscreen-width: auto;
1352
+ }
1353
+
1354
+ .bs-dropdown-parent:where([data-width="toggle"]) :where(.bs-dropdown) {
1355
+ --dropdown-wscreen-width: 100%;
1356
+ }
1357
+
1358
+ /* data-shown */
1359
+ .bs-dropdown:where([data-shown]) {
1360
+ opacity: 1;
1361
+ }
1362
+
1363
+ /* data-top */
1364
+ .bs-dropdown:where([data-top]) {
1365
+ --dropdown-wscreen-bottom: calc(100% + 0.5rem);
1366
+ --dropdown-wscreen-top: auto;
1367
+ }
1368
+
1369
+ /* data-justify="center" */
1370
+ .bs-dropdown-parent:where([data-center]) :where(.bs-dropdown) {
1371
+ --dropdown-wscreen-left: 50%;
1372
+ transform: translateX(-50%);
1373
+ }
1374
+
1375
+ .bs-dropdown :where(.bs-dropdown-options) {
1376
+ --options-height-max: 20rem;
1377
+ }
1378
+ .bs-dropdown:where([data-search]) :where(.bs-dropdown-options) {
1379
+ --options-height-max: 17.25rem;
1380
+ }
1315
1381
  }
1316
1382
  /* Option list */
1317
1383
  .bs-dropdown-options {
1318
1384
  list-style: none;
1385
+ max-height: var(--options-height-max, 20rem);/* constrain scrollable to options section */
1386
+ overflow-y: auto;
1319
1387
  padding: 0;
1320
1388
  }
1321
1389
  .bs-dropdown-options :where(li:first-child) {
@@ -1336,10 +1404,12 @@ a.bs-circle-button {
1336
1404
  display: grid;
1337
1405
  margin-bottom: 0.5rem;
1338
1406
  padding-bottom: 0.25rem;
1339
- padding-left: 0.5rem;
1340
- padding-right: 0.75rem;
1407
+ padding-left: 1.25rem;
1408
+ padding-right: 1.375rem;
1341
1409
  padding-top: 0.25rem;
1342
1410
  row-gap: 0.125rem;
1411
+ word-break: break-word;
1412
+ word-wrap: break-word;
1343
1413
  }
1344
1414
  /* Variant: 2-col */
1345
1415
  .bs-dropdown-options :where(li[data-variant~="2-col"]) {
@@ -1349,7 +1419,7 @@ a.bs-circle-button {
1349
1419
  .bs-dropdown-options :where(li:not([data-variant~="2-col"])[data-variant~="description"] :nth-child(2)) {
1350
1420
  color: var(--bs-ink-light);
1351
1421
  font-size: var(--bs-text-xs);
1352
- height: 1.125rem;
1422
+ min-height: 1.125rem;
1353
1423
  line-height: 1.125rem;
1354
1424
  }
1355
1425
  /* Variant: 2-col description */
@@ -1357,7 +1427,7 @@ a.bs-circle-button {
1357
1427
  color: var(--bs-ink-light);
1358
1428
  font-size: var(--bs-text-xs);
1359
1429
  grid-column-start: 2;
1360
- height: 1.125rem;
1430
+ min-height: 1.125rem;
1361
1431
  line-height: 1.125rem;
1362
1432
  }
1363
1433
  /* Hover or data-selected */
@@ -1415,6 +1485,12 @@ a.bs-circle-button {
1415
1485
  .bs-dropdown-options :where(li[data-variant~="negative"]:focus-visible) {
1416
1486
  --focus-border-color: var(--bs-red-200);
1417
1487
  }
1488
+ @media (min-width: 752px) {
1489
+ .bs-dropdown-options :where(li) {
1490
+ padding-left: 0.5rem;
1491
+ padding-right: 0.75rem;
1492
+ }
1493
+ }
1418
1494
  :where(label, legend) {
1419
1495
  --label-color: var(--bs-ink-base);
1420
1496
 
@@ -2230,6 +2306,9 @@ input:where([type='checkbox'], [type='radio'])[data-error] {
2230
2306
  .bs-loader:where([data-variant="black"]) {
2231
2307
  --loader-dot-bg: var(--bs-black);
2232
2308
  }
2309
+ .bs-loader:where([data-variant="gray"]) {
2310
+ --loader-dot-bg: var(--bs-gray-400);
2311
+ }
2233
2312
  .bs-loader:where([data-variant="white"]) {
2234
2313
  --loader-dot-bg: var(--bs-white);
2235
2314
  }
@@ -2618,12 +2697,15 @@ table:where([data-sticky^="left"]) :is(td:first-child, th:first-child) {
2618
2697
  opacity: 0;
2619
2698
  position: fixed;
2620
2699
  right: 0;
2621
- transform: translateY(calc(100% + 1.5rem));
2700
+ transform: translate(0, calc(100% + 1.5rem));
2701
+ transition-duration: 200ms;
2702
+ transition-property: transform, opacity;
2703
+ transition-timing-function: ease;
2622
2704
  /* Clamp width for mobile -> full screen */
2623
2705
  width: clamp(17rem, calc(100vw - 3rem), 25rem);
2624
2706
  z-index: 999;
2625
2707
  }
2626
- .bs-toast[data-stacked] {
2708
+ .bs-toast:where([data-stacked]) {
2627
2709
  bottom: auto;
2628
2710
  left: auto;
2629
2711
  position: static;
@@ -2631,39 +2713,9 @@ table:where([data-sticky^="left"]) :is(td:first-child, th:first-child) {
2631
2713
  z-index: auto;
2632
2714
  }
2633
2715
  /* Mobile - Toast comes up from bottom */
2634
- @keyframes slideDown {
2635
- 0% {
2636
- opacity: 1;
2637
- transform: translateY(0);
2638
- }
2639
- 100% {
2640
- opacity: 0;
2641
- transform: translateY(calc(100% + 1.5rem));
2642
- }
2643
- }
2644
- @keyframes slideUp {
2645
- 0% {
2646
- opacity: 0;
2647
- transform: translateY(calc(100% + 1.5rem));
2648
- }
2649
- 100% {
2650
- opacity: 1;
2651
- transform: translateY(0);
2652
- }
2653
- }
2654
2716
  .bs-toast:where([data-shown]) {
2655
- /* Small delay on load to alow for HTML element to exist */
2656
- animation-delay: 10ms;
2657
- animation-duration: 200ms;
2658
- animation-fill-mode: forwards;
2659
- animation-name: slideUp;
2660
- animation-timing-function: ease;
2661
- }
2662
- .bs-toast:where([data-dismissed]) {
2663
- animation-duration: 200ms;
2664
- animation-fill-mode: forwards;
2665
- animation-name: slideDown;
2666
- animation-timing-function: ease;
2717
+ opacity: 1;
2718
+ transform: translate(0, 0);
2667
2719
  }
2668
2720
  .bs-toast-header {
2669
2721
  align-items: center;
@@ -2727,53 +2779,18 @@ table:where([data-sticky^="left"]) :is(td:first-child, th:first-child) {
2727
2779
  color: var(--bs-red-400);
2728
2780
  }
2729
2781
  @media (min-width: 440px) {
2730
-
2731
2782
  .bs-toast {
2732
2783
  left: auto;
2733
2784
  margin-left: 0;
2734
2785
  margin-right: 0;
2735
2786
  opacity: 0;
2736
2787
  right: 1.5rem;
2737
- transform: translateX(calc(100% + 1.5rem));
2788
+ transform: translate(calc(100% + 1.5rem), 0);
2738
2789
  }
2739
2790
 
2740
2791
  .bs-toast:where([data-shown]) {
2741
- /* Small delay on load to alow for HTML element to exist */
2742
- animation-delay: 10ms;
2743
- animation-duration: 200ms;
2744
- animation-fill-mode: forwards;
2745
- animation-name: slideLeft;
2746
- animation-timing-function: ease;
2747
- }
2748
-
2749
- .bs-toast:where([data-dismissed]) {
2750
- animation-duration: 200ms;
2751
- animation-fill-mode: forwards;
2752
- animation-name: slideRight;
2753
- animation-timing-function: ease;
2754
- }
2755
-
2756
- /* Non-mobile toasts come in from the right */
2757
- @keyframes slideRight {
2758
- 0% {
2759
- opacity: 1;
2760
- transform: translateX(0);
2761
- }
2762
- 100% {
2763
- opacity: 0;
2764
- transform: translateX(calc(100% + 1.5rem));
2765
- }
2766
- }
2767
-
2768
- @keyframes slideLeft {
2769
- 0% {
2770
- opacity: 0;
2771
- transform: translateX(calc(100% + 1.5rem));
2772
- }
2773
- 100% {
2774
- opacity: 1;
2775
- transform: translateX(0);
2776
- }
2792
+ opacity: 1;
2793
+ transform: translate(0, 0);
2777
2794
  }
2778
2795
 
2779
2796
  .bs-toast-actions:where([data-stacked]) {