@wwtdev/bsds-css 1.8.1 → 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.
@@ -10,13 +10,16 @@
10
10
  opacity: 0;
11
11
  position: fixed;
12
12
  right: 0;
13
- transform: translateY(calc(100% + 1.5rem));
13
+ transform: translate(0, calc(100% + 1.5rem));
14
+ transition-duration: 200ms;
15
+ transition-property: transform, opacity;
16
+ transition-timing-function: ease;
14
17
  /* Clamp width for mobile -> full screen */
15
18
  width: clamp(17rem, calc(100vw - 3rem), 25rem);
16
19
  z-index: 999;
17
20
  }
18
21
 
19
- .bs-toast[data-stacked] {
22
+ .bs-toast:where([data-stacked]) {
20
23
  bottom: auto;
21
24
  left: auto;
22
25
  position: static;
@@ -25,42 +28,9 @@
25
28
  }
26
29
 
27
30
  /* Mobile - Toast comes up from bottom */
28
- @keyframes slideDown {
29
- 0% {
30
- opacity: 1;
31
- transform: translateY(0);
32
- }
33
- 100% {
34
- opacity: 0;
35
- transform: translateY(calc(100% + 1.5rem));
36
- }
37
- }
38
-
39
- @keyframes slideUp {
40
- 0% {
41
- opacity: 0;
42
- transform: translateY(calc(100% + 1.5rem));
43
- }
44
- 100% {
45
- opacity: 1;
46
- transform: translateY(0);
47
- }
48
- }
49
-
50
31
  .bs-toast:where([data-shown]) {
51
- /* Small delay on load to alow for HTML element to exist */
52
- animation-delay: 10ms;
53
- animation-duration: 200ms;
54
- animation-fill-mode: forwards;
55
- animation-name: slideUp;
56
- animation-timing-function: ease;
57
- }
58
-
59
- .bs-toast:where([data-dismissed]) {
60
- animation-duration: 200ms;
61
- animation-fill-mode: forwards;
62
- animation-name: slideDown;
63
- animation-timing-function: ease;
32
+ opacity: 1;
33
+ transform: translate(0, 0);
64
34
  }
65
35
 
66
36
  .bs-toast-header {
@@ -139,53 +109,18 @@
139
109
  }
140
110
 
141
111
  @media (min-width: 440px) {
142
-
143
112
  .bs-toast {
144
113
  left: auto;
145
114
  margin-left: 0;
146
115
  margin-right: 0;
147
116
  opacity: 0;
148
117
  right: 1.5rem;
149
- transform: translateX(calc(100% + 1.5rem));
118
+ transform: translate(calc(100% + 1.5rem), 0);
150
119
  }
151
120
 
152
121
  .bs-toast:where([data-shown]) {
153
- /* Small delay on load to alow for HTML element to exist */
154
- animation-delay: 10ms;
155
- animation-duration: 200ms;
156
- animation-fill-mode: forwards;
157
- animation-name: slideLeft;
158
- animation-timing-function: ease;
159
- }
160
-
161
- .bs-toast:where([data-dismissed]) {
162
- animation-duration: 200ms;
163
- animation-fill-mode: forwards;
164
- animation-name: slideRight;
165
- animation-timing-function: ease;
166
- }
167
-
168
- /* Non-mobile toasts come in from the right */
169
- @keyframes slideRight {
170
- 0% {
171
- opacity: 1;
172
- transform: translateX(0);
173
- }
174
- 100% {
175
- opacity: 0;
176
- transform: translateX(calc(100% + 1.5rem));
177
- }
178
- }
179
-
180
- @keyframes slideLeft {
181
- 0% {
182
- opacity: 0;
183
- transform: translateX(calc(100% + 1.5rem));
184
- }
185
- 100% {
186
- opacity: 1;
187
- transform: translateX(0);
188
- }
122
+ opacity: 1;
123
+ transform: translate(0, 0);
189
124
  }
190
125
 
191
126
  .bs-toast-actions:where([data-stacked]) {
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
 
@@ -2167,13 +2243,12 @@ input:where([type='checkbox'], [type='radio'])[data-error] {
2167
2243
  width: auto;
2168
2244
  }
2169
2245
  .bs-loader {
2170
- --loader-dot-bg: var(--bs-blue-500); /* possibly add variants if requested */
2246
+ --loader-dot-bg: var(--bs-blue-500);
2171
2247
  --loader-dot-size: .75rem;
2172
- --loader-dot-top: 18px;
2173
2248
  --loader-dot-top: calc(50% - var(--loader-dot-size)/2);
2174
2249
  --loader-dot-translate: 1.75rem; /* i.e., calc(var(--loader-width)/2 - var(--loader-dot-size)/2); */
2175
2250
  --loader-height: 3rem;
2176
- --loader-width: 4rem;
2251
+ --loader-width: 4rem; /* approx 6 * dot size */
2177
2252
  display: block;
2178
2253
  height: var(--loader-height);
2179
2254
  margin-inline-start: auto;
@@ -2181,9 +2256,14 @@ input:where([type='checkbox'], [type='radio'])[data-error] {
2181
2256
  position: relative;
2182
2257
  width: var(--loader-width);
2183
2258
  }
2259
+ .bs-loader:where([data-size="xs"]) {
2260
+ --loader-dot-size: .3rem;
2261
+ --loader-dot-translate: .75rem;
2262
+ --loader-height: .3rem;
2263
+ --loader-width: 1.8rem;
2264
+ }
2184
2265
  .bs-loader:where([data-size="sm"]) {
2185
2266
  --loader-dot-size: .5rem;
2186
- --loader-dot-top: 0;
2187
2267
  --loader-dot-translate: 1.125rem;
2188
2268
  --loader-height: .5rem;
2189
2269
  --loader-width: 3rem;
@@ -2222,6 +2302,16 @@ input:where([type='checkbox'], [type='radio'])[data-error] {
2222
2302
  animation: loading-3 0.6s infinite;
2223
2303
  left: 80%;
2224
2304
  }
2305
+ /* ----- color variants ----- */
2306
+ .bs-loader:where([data-variant="black"]) {
2307
+ --loader-dot-bg: var(--bs-black);
2308
+ }
2309
+ .bs-loader:where([data-variant="gray"]) {
2310
+ --loader-dot-bg: var(--bs-gray-400);
2311
+ }
2312
+ .bs-loader:where([data-variant="white"]) {
2313
+ --loader-dot-bg: var(--bs-white);
2314
+ }
2225
2315
  @keyframes loading-1 {
2226
2316
  0% {
2227
2317
  transform: scale(0);
@@ -2607,12 +2697,15 @@ table:where([data-sticky^="left"]) :is(td:first-child, th:first-child) {
2607
2697
  opacity: 0;
2608
2698
  position: fixed;
2609
2699
  right: 0;
2610
- 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;
2611
2704
  /* Clamp width for mobile -> full screen */
2612
2705
  width: clamp(17rem, calc(100vw - 3rem), 25rem);
2613
2706
  z-index: 999;
2614
2707
  }
2615
- .bs-toast[data-stacked] {
2708
+ .bs-toast:where([data-stacked]) {
2616
2709
  bottom: auto;
2617
2710
  left: auto;
2618
2711
  position: static;
@@ -2620,39 +2713,9 @@ table:where([data-sticky^="left"]) :is(td:first-child, th:first-child) {
2620
2713
  z-index: auto;
2621
2714
  }
2622
2715
  /* Mobile - Toast comes up from bottom */
2623
- @keyframes slideDown {
2624
- 0% {
2625
- opacity: 1;
2626
- transform: translateY(0);
2627
- }
2628
- 100% {
2629
- opacity: 0;
2630
- transform: translateY(calc(100% + 1.5rem));
2631
- }
2632
- }
2633
- @keyframes slideUp {
2634
- 0% {
2635
- opacity: 0;
2636
- transform: translateY(calc(100% + 1.5rem));
2637
- }
2638
- 100% {
2639
- opacity: 1;
2640
- transform: translateY(0);
2641
- }
2642
- }
2643
2716
  .bs-toast:where([data-shown]) {
2644
- /* Small delay on load to alow for HTML element to exist */
2645
- animation-delay: 10ms;
2646
- animation-duration: 200ms;
2647
- animation-fill-mode: forwards;
2648
- animation-name: slideUp;
2649
- animation-timing-function: ease;
2650
- }
2651
- .bs-toast:where([data-dismissed]) {
2652
- animation-duration: 200ms;
2653
- animation-fill-mode: forwards;
2654
- animation-name: slideDown;
2655
- animation-timing-function: ease;
2717
+ opacity: 1;
2718
+ transform: translate(0, 0);
2656
2719
  }
2657
2720
  .bs-toast-header {
2658
2721
  align-items: center;
@@ -2716,53 +2779,18 @@ table:where([data-sticky^="left"]) :is(td:first-child, th:first-child) {
2716
2779
  color: var(--bs-red-400);
2717
2780
  }
2718
2781
  @media (min-width: 440px) {
2719
-
2720
2782
  .bs-toast {
2721
2783
  left: auto;
2722
2784
  margin-left: 0;
2723
2785
  margin-right: 0;
2724
2786
  opacity: 0;
2725
2787
  right: 1.5rem;
2726
- transform: translateX(calc(100% + 1.5rem));
2788
+ transform: translate(calc(100% + 1.5rem), 0);
2727
2789
  }
2728
2790
 
2729
2791
  .bs-toast:where([data-shown]) {
2730
- /* Small delay on load to alow for HTML element to exist */
2731
- animation-delay: 10ms;
2732
- animation-duration: 200ms;
2733
- animation-fill-mode: forwards;
2734
- animation-name: slideLeft;
2735
- animation-timing-function: ease;
2736
- }
2737
-
2738
- .bs-toast:where([data-dismissed]) {
2739
- animation-duration: 200ms;
2740
- animation-fill-mode: forwards;
2741
- animation-name: slideRight;
2742
- animation-timing-function: ease;
2743
- }
2744
-
2745
- /* Non-mobile toasts come in from the right */
2746
- @keyframes slideRight {
2747
- 0% {
2748
- opacity: 1;
2749
- transform: translateX(0);
2750
- }
2751
- 100% {
2752
- opacity: 0;
2753
- transform: translateX(calc(100% + 1.5rem));
2754
- }
2755
- }
2756
-
2757
- @keyframes slideLeft {
2758
- 0% {
2759
- opacity: 0;
2760
- transform: translateX(calc(100% + 1.5rem));
2761
- }
2762
- 100% {
2763
- opacity: 1;
2764
- transform: translateX(0);
2765
- }
2792
+ opacity: 1;
2793
+ transform: translate(0, 0);
2766
2794
  }
2767
2795
 
2768
2796
  .bs-toast-actions:where([data-stacked]) {