@scalewing/react 1.7.0 → 1.9.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.
Files changed (84) hide show
  1. package/CHANGELOG.md +166 -0
  2. package/README.md +70 -3
  3. package/dist/anchored-position.d.ts +28 -0
  4. package/dist/anchored-position.js +17 -0
  5. package/dist/calendar-keys.d.ts +19 -0
  6. package/dist/calendar-keys.js +39 -0
  7. package/dist/calendar-labels.d.ts +12 -0
  8. package/dist/calendar-labels.js +32 -0
  9. package/dist/calendar-month.d.ts +36 -0
  10. package/dist/calendar-month.js +111 -0
  11. package/dist/calendar-years.d.ts +14 -0
  12. package/dist/calendar-years.js +20 -0
  13. package/dist/components/Accordion.d.ts +6 -1
  14. package/dist/components/Accordion.js +12 -3
  15. package/dist/components/ActionBar.d.ts +30 -0
  16. package/dist/components/ActionBar.js +13 -0
  17. package/dist/components/Box.d.ts +7 -3
  18. package/dist/components/Box.js +2 -2
  19. package/dist/components/DateField.d.ts +15 -1
  20. package/dist/components/DateField.js +58 -18
  21. package/dist/components/Field.d.ts +5 -1
  22. package/dist/components/Field.js +16 -4
  23. package/dist/components/FieldAdornment.d.ts +20 -0
  24. package/dist/components/FieldAdornment.js +34 -0
  25. package/dist/components/Grid.d.ts +4 -1
  26. package/dist/components/Grid.js +2 -2
  27. package/dist/components/Progress.d.ts +3 -1
  28. package/dist/components/Progress.js +2 -2
  29. package/dist/components/ScrollRegion.d.ts +15 -0
  30. package/dist/components/ScrollRegion.js +10 -0
  31. package/dist/components/Table.d.ts +1 -5
  32. package/dist/components/Table.js +3 -6
  33. package/dist/components/date-field/CalendarDialog.d.ts +26 -0
  34. package/dist/components/date-field/CalendarDialog.js +93 -0
  35. package/dist/components/date-field/CalendarGrid.d.ts +23 -0
  36. package/dist/components/date-field/CalendarGrid.js +36 -0
  37. package/dist/components/date-field/CalendarHeader.d.ts +18 -0
  38. package/dist/components/date-field/CalendarHeader.js +33 -0
  39. package/dist/components/date-field/DateFieldGlyph.d.ts +9 -0
  40. package/dist/components/date-field/DateFieldGlyph.js +15 -0
  41. package/dist/components/date-field/use-anchored-popover.d.ts +8 -0
  42. package/dist/components/date-field/use-anchored-popover.js +61 -0
  43. package/dist/components/date-field/use-date-entry.d.ts +20 -0
  44. package/dist/components/date-field/use-date-entry.js +61 -0
  45. package/dist/components/date-field/use-lang-locale.d.ts +7 -0
  46. package/dist/components/date-field/use-lang-locale.js +17 -0
  47. package/dist/components/denomination-grid/DenominationStrip.js +5 -4
  48. package/dist/css/css-accordion.js +55 -8
  49. package/dist/css/css-action-bar.d.ts +4 -0
  50. package/dist/css/css-action-bar.js +99 -0
  51. package/dist/css/css-action-menu.js +2 -1
  52. package/dist/css/css-box-border.d.ts +5 -0
  53. package/dist/css/css-box-border.js +24 -0
  54. package/dist/css/css-chrome.js +2 -1
  55. package/dist/css/css-components.js +39 -26
  56. package/dist/css/css-data.js +4 -10
  57. package/dist/css/css-date-field.js +241 -11
  58. package/dist/css/css-denomination-grid.js +49 -5
  59. package/dist/css/css-document.d.ts +2 -0
  60. package/dist/css/css-document.js +2 -1
  61. package/dist/css/css-field.js +61 -1
  62. package/dist/css/css-scroll-region.d.ts +8 -0
  63. package/dist/css/css-scroll-region.js +18 -0
  64. package/dist/css/css-select.js +2 -1
  65. package/dist/css/css-tooltip.js +2 -1
  66. package/dist/css/stacking.d.ts +10 -0
  67. package/dist/css/stacking.js +47 -0
  68. package/dist/css/stylesheet.js +4 -0
  69. package/dist/date-entry-validity.d.ts +10 -0
  70. package/dist/date-entry-validity.js +16 -0
  71. package/dist/date-entry.d.ts +32 -0
  72. package/dist/date-entry.js +106 -0
  73. package/dist/date-field-labels.d.ts +38 -0
  74. package/dist/date-field-labels.js +22 -0
  75. package/dist/date-field-locale.d.ts +8 -0
  76. package/dist/date-field-locale.js +27 -0
  77. package/dist/date-formatters.d.ts +13 -0
  78. package/dist/date-formatters.js +28 -0
  79. package/dist/date-only.d.ts +23 -0
  80. package/dist/date-only.js +63 -9
  81. package/dist/index.d.ts +5 -3
  82. package/dist/index.js +3 -2
  83. package/dist/styles.css +461 -45
  84. package/package.json +1 -1
package/dist/styles.css CHANGED
@@ -733,11 +733,11 @@ body {
733
733
  -webkit-backdrop-filter: blur(var(--sw-glass-blur)) saturate(var(--sw-glass-saturate));
734
734
  }
735
735
 
736
- /* Backdrop blur makes a glass surface its own stacking context, so an open popup inside it would paint under the next surface. */
737
- .sw-card-glass:has(.sw-select-list, .sw-action-menu-list:not([hidden]), .sw-tooltip:not([hidden])),
738
- .sw-accordion:has(.sw-select-list, .sw-action-menu-list:not([hidden]), .sw-tooltip:not([hidden])) {
736
+ /* Backdrop blur makes a glass surface its own stacking context, so it lifts while it holds an open popup (see stacking.ts). */
737
+ .sw-card-glass:has(.sw-select-list, .sw-action-menu-list:not([hidden]), .sw-tooltip:not([hidden]), .sw-date-field-calendar),
738
+ .sw-accordion:has(.sw-select-list, .sw-action-menu-list:not([hidden]), .sw-tooltip:not([hidden]), .sw-date-field-calendar) {
739
739
  position: relative;
740
- z-index: 1;
740
+ z-index: 3;
741
741
  }
742
742
 
743
743
  .sw-card-outlined {
@@ -756,25 +756,6 @@ body {
756
756
  background: var(--sw-color-subtle);
757
757
  }
758
758
 
759
- @media (prefers-reduced-transparency: reduce) {
760
- .sw-card-glass,
761
- .sw-app-header,
762
- .sw-button-secondary,
763
- .sw-badge-neutral,
764
- .sw-segmented,
765
- .sw-table-sticky thead th,
766
- .sw-bar-chart-track,
767
- .sw-dialog,
768
- .sw-accordion,
769
- .sw-select-list,
770
- .sw-action-menu-list,
771
- .sw-toast {
772
- background: var(--sw-color-surface);
773
- backdrop-filter: none;
774
- -webkit-backdrop-filter: none;
775
- }
776
- }
777
-
778
759
  .sw-text-align-start { text-align: start; }
779
760
  .sw-text-align-center { text-align: center; }
780
761
  .sw-text-align-end { text-align: end; }
@@ -1315,7 +1296,15 @@ body {
1315
1296
  line-height: 20px;
1316
1297
  }
1317
1298
 
1318
- .sw-date-field-input {
1299
+ .sw-date-field-control {
1300
+ align-self: flex-start;
1301
+ display: flex;
1302
+ max-width: 100%;
1303
+ min-width: 0;
1304
+ position: relative;
1305
+ }
1306
+
1307
+ .sw-date-field .sw-date-field-control > .sw-date-field-input {
1319
1308
  background: var(--sw-glass-fill);
1320
1309
  border: 1px solid var(--sw-color-border);
1321
1310
  border-radius: var(--sw-radius-sm);
@@ -1323,26 +1312,78 @@ body {
1323
1312
  color: var(--sw-color-text);
1324
1313
  font-family: var(--sw-font-sans);
1325
1314
  font-size: 17px;
1315
+ font-variant-numeric: tabular-nums;
1316
+ margin: 0;
1317
+ max-width: 100%;
1326
1318
  min-height: var(--sw-control-md-min-height);
1327
1319
  min-width: 0;
1328
- padding-inline: var(--sw-control-md-padding-inline);
1329
- width: 100%;
1320
+ padding-inline: var(--sw-control-md-padding-inline) var(--sw-control-md-min-height);
1321
+ width: calc(12ch + var(--sw-control-md-padding-inline) + var(--sw-control-md-min-height));
1330
1322
  }
1331
1323
 
1332
- .sw-date-field-input:focus-visible {
1324
+ .sw-date-field .sw-date-field-control > .sw-date-field-input::placeholder {
1325
+ color: var(--sw-color-muted);
1326
+ opacity: 1;
1327
+ }
1328
+
1329
+ .sw-date-field .sw-date-field-control > .sw-date-field-input:focus {
1330
+ box-shadow: none;
1331
+ outline: none;
1332
+ }
1333
+
1334
+ .sw-date-field .sw-date-field-control > .sw-date-field-input:focus-visible {
1333
1335
  outline: var(--sw-focus-ring-width) solid var(--sw-color-accent);
1334
1336
  outline-offset: var(--sw-focus-ring-offset);
1335
1337
  }
1336
1338
 
1337
- .sw-date-field-input[aria-invalid='true'] {
1339
+ .sw-date-field .sw-date-field-control > .sw-date-field-input[aria-invalid='true'] {
1338
1340
  border-color: var(--sw-color-danger);
1339
1341
  }
1340
1342
 
1341
- .sw-date-field-input:disabled {
1343
+ .sw-date-field .sw-date-field-control > .sw-date-field-input:disabled,
1344
+ .sw-date-field-button:disabled {
1342
1345
  cursor: not-allowed;
1343
1346
  opacity: var(--sw-disabled-opacity);
1344
1347
  }
1345
1348
 
1349
+ .sw-date-field-button {
1350
+ align-items: center;
1351
+ appearance: none;
1352
+ background: transparent;
1353
+ border: 0;
1354
+ border-radius: var(--sw-radius-sm);
1355
+ color: var(--sw-color-muted);
1356
+ cursor: pointer;
1357
+ display: flex;
1358
+ inset-block: 0;
1359
+ inset-inline-end: 0;
1360
+ justify-content: center;
1361
+ margin: 0;
1362
+ padding: 0;
1363
+ position: absolute;
1364
+ width: var(--sw-control-md-min-height);
1365
+ }
1366
+
1367
+ .sw-date-field-button:hover:not(:disabled),
1368
+ .sw-date-field-button[aria-expanded='true'] {
1369
+ color: var(--sw-color-text);
1370
+ }
1371
+
1372
+ .sw-date-field-glyph {
1373
+ fill: none;
1374
+ flex: none;
1375
+ height: var(--sw-space-5);
1376
+ stroke: currentColor;
1377
+ stroke-linecap: round;
1378
+ stroke-linejoin: round;
1379
+ stroke-width: 1.75;
1380
+ width: var(--sw-space-5);
1381
+ }
1382
+
1383
+ [dir='rtl'] .sw-date-field-glyph-directional {
1384
+ transform: scaleX(-1);
1385
+ }
1386
+
1346
1387
  .sw-date-field-description,
1347
1388
  .sw-date-field-error {
1348
1389
  font-family: var(--sw-font-sans);
@@ -1353,12 +1394,154 @@ body {
1353
1394
  .sw-date-field-description { color: var(--sw-color-muted); }
1354
1395
  .sw-date-field-error { color: var(--sw-color-danger); }
1355
1396
 
1397
+ .sw-date-field-calendar {
1398
+ background: var(--sw-glass-fill);
1399
+ border: 1px solid var(--sw-glass-border);
1400
+ border-radius: var(--sw-radius-md);
1401
+ box-shadow: var(--sw-elevation-md), inset 0 1px 0 var(--sw-glass-specular);
1402
+ backdrop-filter: blur(var(--sw-glass-blur)) saturate(var(--sw-glass-saturate));
1403
+ -webkit-backdrop-filter: blur(var(--sw-glass-blur)) saturate(var(--sw-glass-saturate));
1404
+ box-sizing: border-box;
1405
+ color: var(--sw-color-text);
1406
+ display: flex;
1407
+ flex-direction: column;
1408
+ font-family: var(--sw-font-sans);
1409
+ gap: var(--sw-space-2);
1410
+ height: auto;
1411
+ inset: auto;
1412
+ margin: 0;
1413
+ max-width: calc(100vw - var(--sw-space-2) - var(--sw-space-2));
1414
+ overflow: visible;
1415
+ padding: var(--sw-space-3);
1416
+ position: fixed;
1417
+ width: max-content;
1418
+ z-index: 10;
1419
+ }
1420
+
1421
+ .sw-date-field-header {
1422
+ align-items: center;
1423
+ display: flex;
1424
+ gap: var(--sw-space-1);
1425
+ justify-content: space-between;
1426
+ }
1427
+
1428
+ .sw-date-field-jump {
1429
+ display: flex;
1430
+ gap: var(--sw-space-1);
1431
+ min-width: 0;
1432
+ }
1433
+
1434
+ .sw-date-field-step {
1435
+ align-items: center;
1436
+ appearance: none;
1437
+ background: transparent;
1438
+ border: 0;
1439
+ border-radius: var(--sw-radius-pill);
1440
+ color: var(--sw-color-text);
1441
+ cursor: pointer;
1442
+ display: flex;
1443
+ flex: none;
1444
+ height: var(--sw-control-md-min-height);
1445
+ justify-content: center;
1446
+ margin: 0;
1447
+ padding: 0;
1448
+ width: var(--sw-control-md-min-height);
1449
+ }
1450
+
1451
+ .sw-date-field-step[aria-disabled='true'] {
1452
+ cursor: not-allowed;
1453
+ opacity: var(--sw-disabled-opacity);
1454
+ }
1455
+
1456
+ .sw-date-field-grid {
1457
+ border-collapse: separate;
1458
+ border-spacing: 0;
1459
+ table-layout: fixed;
1460
+ }
1461
+
1462
+ .sw-date-field-grid th {
1463
+ color: var(--sw-color-muted);
1464
+ font-size: 13px;
1465
+ font-weight: normal;
1466
+ line-height: 18px;
1467
+ padding: 0 0 var(--sw-space-1);
1468
+ text-align: center;
1469
+ }
1470
+
1471
+ .sw-date-field-day {
1472
+ border: 1px solid transparent;
1473
+ border-radius: var(--sw-radius-pill);
1474
+ box-sizing: border-box;
1475
+ cursor: pointer;
1476
+ font-size: 15px;
1477
+ font-variant-numeric: tabular-nums;
1478
+ height: var(--sw-control-md-min-height);
1479
+ padding: 0;
1480
+ text-align: center;
1481
+ vertical-align: middle;
1482
+ width: var(--sw-control-md-min-height);
1483
+ }
1484
+
1485
+ .sw-date-field-day-outside {
1486
+ color: var(--sw-color-muted);
1487
+ }
1488
+
1489
+ .sw-date-field-step:hover:not([aria-disabled='true']),
1490
+ .sw-date-field-day:hover:not([aria-disabled='true']) {
1491
+ background: color-mix(in srgb, var(--sw-color-muted) 16%, transparent);
1492
+ }
1493
+
1494
+ .sw-date-field-day[aria-current='date'] {
1495
+ border-color: var(--sw-color-accent);
1496
+ color: var(--sw-color-accent);
1497
+ font-weight: 600;
1498
+ }
1499
+
1500
+ .sw-date-field-day[aria-selected='true'],
1501
+ .sw-date-field-day[aria-selected='true']:hover {
1502
+ background: var(--sw-color-accent);
1503
+ border-color: var(--sw-color-accent);
1504
+ color: var(--sw-color-onAccent);
1505
+ font-weight: 600;
1506
+ }
1507
+
1508
+ .sw-date-field-day[aria-disabled='true'] {
1509
+ cursor: not-allowed;
1510
+ opacity: var(--sw-disabled-opacity);
1511
+ }
1512
+
1513
+ .sw-date-field-button:focus,
1514
+ .sw-date-field-step:focus,
1515
+ .sw-date-field-day:focus {
1516
+ outline: none;
1517
+ }
1518
+
1519
+ .sw-date-field-button:focus-visible,
1520
+ .sw-date-field-step:focus-visible,
1521
+ .sw-date-field-day:focus-visible {
1522
+ outline: var(--sw-focus-ring-width) solid var(--sw-color-accent);
1523
+ outline-offset: var(--sw-focus-ring-offset);
1524
+ }
1525
+
1526
+ .sw-date-field-footer {
1527
+ display: flex;
1528
+ gap: var(--sw-space-1);
1529
+ justify-content: flex-end;
1530
+ }
1531
+
1356
1532
  @media (prefers-reduced-transparency: reduce) {
1357
- .sw-date-field-input { background: var(--sw-color-surface); }
1533
+ .sw-date-field .sw-date-field-control > .sw-date-field-input { background: var(--sw-color-surface); }
1358
1534
  }
1359
1535
 
1360
1536
  @media (forced-colors: active) {
1361
- .sw-date-field-input[aria-invalid='true'] { border-color: CanvasText; }
1537
+ .sw-date-field .sw-date-field-control > .sw-date-field-input[aria-invalid='true'] { border-color: CanvasText; }
1538
+ .sw-date-field-calendar { border-color: CanvasText; }
1539
+ .sw-date-field-day[aria-current='date'] { border-color: CanvasText; }
1540
+ .sw-date-field-day[aria-selected='true'] {
1541
+ background: Highlight;
1542
+ color: HighlightText;
1543
+ forced-color-adjust: none;
1544
+ }
1362
1545
  }
1363
1546
 
1364
1547
  .sw-bar-chart {
@@ -1453,7 +1636,7 @@ body {
1453
1636
  .sw-app-header-sticky {
1454
1637
  position: sticky;
1455
1638
  top: 0;
1456
- z-index: 2;
1639
+ z-index: 4;
1457
1640
  }
1458
1641
 
1459
1642
  .sw-nav {
@@ -1532,18 +1715,27 @@ body {
1532
1715
  color: var(--sw-color-text);
1533
1716
  }
1534
1717
 
1718
+ /* A nested disclosure sits inside a larger surface, so its corners are smaller. */
1719
+ .sw-accordion-sm { border-radius: var(--sw-radius-md); }
1720
+
1535
1721
  .sw-accordion-summary {
1722
+ align-items: center;
1723
+ box-sizing: border-box;
1536
1724
  cursor: pointer;
1537
- display: list-item;
1725
+ display: flex;
1726
+ gap: var(--sw-space-3);
1727
+ list-style: none;
1538
1728
  min-height: var(--sw-control-md-min-height);
1539
1729
  }
1540
1730
 
1541
- .sw-accordion-summary::-webkit-details-marker {
1542
- color: var(--sw-color-muted);
1543
- }
1731
+ /* A nested header is an sm control, still a comfortable pointer and touch target. */
1732
+ .sw-accordion-sm > .sw-accordion-summary { min-height: var(--sw-control-sm-min-height); }
1544
1733
 
1545
- .sw-accordion-summary::marker {
1546
- color: var(--sw-color-muted);
1734
+ .sw-accordion-heading {
1735
+ display: flex;
1736
+ flex: 1 1 auto;
1737
+ flex-direction: column;
1738
+ min-width: 0;
1547
1739
  }
1548
1740
 
1549
1741
  .sw-accordion-summary:focus-visible {
@@ -1551,6 +1743,35 @@ body {
1551
1743
  outline-offset: var(--sw-focus-ring-offset);
1552
1744
  }
1553
1745
 
1746
+ /* A token chevron replaces the user-agent triangle: it points to the inline end when closed and down when open. */
1747
+ .sw-accordion-summary::-webkit-details-marker { display: none; }
1748
+
1749
+ .sw-accordion-marker {
1750
+ border-bottom: 2px solid var(--sw-color-muted);
1751
+ border-right: 2px solid var(--sw-color-muted);
1752
+ box-sizing: border-box;
1753
+ flex: none;
1754
+ height: var(--sw-space-2);
1755
+ margin-inline-end: var(--sw-space-1);
1756
+ transform: rotate(-45deg);
1757
+ transition: transform var(--sw-motion-default) var(--sw-motion-easing);
1758
+ width: var(--sw-space-2);
1759
+ }
1760
+
1761
+ .sw-accordion-marker:dir(rtl) { transform: rotate(135deg); }
1762
+
1763
+ .sw-accordion[open] > .sw-accordion-summary .sw-accordion-marker {
1764
+ transform: rotate(45deg);
1765
+ }
1766
+
1767
+ @media (prefers-reduced-motion: reduce) {
1768
+ .sw-accordion-marker { transition: none; }
1769
+ }
1770
+
1771
+ @media (forced-colors: active) {
1772
+ .sw-accordion-marker { border-color: CanvasText; }
1773
+ }
1774
+
1554
1775
  .sw-select {
1555
1776
  max-width: 100%;
1556
1777
  width: max-content;
@@ -1636,7 +1857,7 @@ body {
1636
1857
  padding: var(--sw-space-1);
1637
1858
  position: absolute;
1638
1859
  width: max-content;
1639
- z-index: 3;
1860
+ z-index: 10;
1640
1861
  }
1641
1862
 
1642
1863
  .sw-select-option {
@@ -1752,6 +1973,74 @@ body {
1752
1973
  color: var(--sw-color-danger);
1753
1974
  }
1754
1975
 
1976
+ .sw-action-bar {
1977
+ align-items: center;
1978
+ background: var(--sw-glass-fill);
1979
+ border: 1px solid var(--sw-glass-border);
1980
+ border-radius: var(--sw-radius-lg);
1981
+ box-shadow: inset 0 1px 0 var(--sw-glass-specular);
1982
+ backdrop-filter: blur(var(--sw-glass-blur)) saturate(var(--sw-glass-saturate));
1983
+ -webkit-backdrop-filter: blur(var(--sw-glass-blur)) saturate(var(--sw-glass-saturate));
1984
+ box-sizing: border-box;
1985
+ color: var(--sw-color-text);
1986
+ display: flex;
1987
+ flex-wrap: wrap;
1988
+ gap: var(--sw-space-2) var(--sw-space-4);
1989
+ padding-block: var(--sw-space-3);
1990
+ padding-left: max(var(--sw-space-4), env(safe-area-inset-left, 0px));
1991
+ padding-right: max(var(--sw-space-4), env(safe-area-inset-right, 0px));
1992
+ }
1993
+
1994
+ .sw-action-bar-status {
1995
+ color: var(--sw-color-muted);
1996
+ flex: 1 1 auto;
1997
+ font-family: var(--sw-font-sans);
1998
+ font-size: 13px;
1999
+ line-height: 18px;
2000
+ margin: 0;
2001
+ min-width: 0;
2002
+ }
2003
+
2004
+ /* With no status the live region stays in the page, so a first status is
2005
+ still announced, but it takes no room in the bar. */
2006
+ .sw-action-bar-status:empty {
2007
+ clip-path: inset(50%);
2008
+ height: 1px;
2009
+ overflow: hidden;
2010
+ position: absolute;
2011
+ width: 1px;
2012
+ }
2013
+
2014
+ .sw-action-bar-actions {
2015
+ align-items: center;
2016
+ display: flex;
2017
+ flex: 0 1 auto;
2018
+ flex-wrap: wrap;
2019
+ gap: var(--sw-space-2);
2020
+ justify-content: flex-end;
2021
+ margin-inline-start: auto;
2022
+ }
2023
+
2024
+ @media not all and (min-width: 48rem) {
2025
+ .sw-action-bar-status,
2026
+ .sw-action-bar-actions { flex-basis: 100%; }
2027
+ .sw-action-bar-actions > * { flex: 1 1 auto; }
2028
+ }
2029
+
2030
+ .sw-action-bar-sticky {
2031
+ bottom: calc(var(--sw-space-2) + env(safe-area-inset-bottom, 0px));
2032
+ position: sticky;
2033
+ z-index: 2;
2034
+ }
2035
+
2036
+ @media not all and (min-width: 48rem) {
2037
+ .sw-action-bar-sticky-below-md {
2038
+ bottom: calc(var(--sw-space-2) + env(safe-area-inset-bottom, 0px));
2039
+ position: sticky;
2040
+ z-index: 2;
2041
+ }
2042
+ }
2043
+
1755
2044
  .sw-switch {
1756
2045
  align-items: center;
1757
2046
  cursor: pointer;
@@ -2274,6 +2563,16 @@ body {
2274
2563
  .sw-denomination-row-danger { --sw-denomination-tone: var(--sw-color-danger); }
2275
2564
  .sw-denomination-row-warning { --sw-denomination-tone: var(--sw-color-warning); }
2276
2565
 
2566
+ .sw-denomination-scroll {
2567
+ overflow: auto;
2568
+ width: 100%;
2569
+ }
2570
+
2571
+ .sw-denomination-scroll:focus-visible {
2572
+ outline: var(--sw-focus-ring-width) solid var(--sw-color-accent);
2573
+ outline-offset: calc(-1 * var(--sw-focus-ring-width));
2574
+ }
2575
+
2277
2576
  .sw-denomination-strip {
2278
2577
  border-collapse: collapse;
2279
2578
  width: 100%;
@@ -2303,20 +2602,56 @@ body {
2303
2602
  }
2304
2603
 
2305
2604
  .sw-denomination-label {
2306
- align-items: center;
2307
2605
  border-inline-start: var(--sw-space-1) solid var(--sw-denomination-tone);
2308
2606
  color: var(--sw-denomination-tone);
2309
- display: flex;
2310
- flex-wrap: wrap;
2311
2607
  font-size: 15px;
2312
2608
  font-weight: 600;
2313
- gap: var(--sw-space-2);
2314
2609
  letter-spacing: -0.2px;
2315
2610
  line-height: 20px;
2316
2611
  min-width: 0;
2317
2612
  text-align: start;
2318
2613
  }
2319
2614
 
2615
+ .sw-denomination-tiles .sw-denomination-label,
2616
+ .sw-denomination-label-body {
2617
+ align-items: center;
2618
+ display: flex;
2619
+ flex-wrap: wrap;
2620
+ gap: var(--sw-space-2);
2621
+ }
2622
+
2623
+ /*
2624
+ * The row labels and the header corner above them stay in view while a wide
2625
+ * strip scrolls under them, so each column head stays over its counts.
2626
+ */
2627
+ .sw-denomination-strip .sw-denomination-label,
2628
+ .sw-denomination-strip thead .sw-denomination-corner:first-child {
2629
+ background: var(--sw-glass-fill);
2630
+ backdrop-filter: blur(var(--sw-glass-blur)) saturate(var(--sw-glass-saturate));
2631
+ -webkit-backdrop-filter: blur(var(--sw-glass-blur)) saturate(var(--sw-glass-saturate));
2632
+ inset-inline-start: 0;
2633
+ position: sticky;
2634
+ z-index: 1;
2635
+ }
2636
+
2637
+ /*
2638
+ * A collapsed-table border does not travel with a sticky cell in every
2639
+ * browser, so the pinned label draws its tone stripe as its own box.
2640
+ */
2641
+ .sw-denomination-strip .sw-denomination-label {
2642
+ border-inline-start: 0;
2643
+ padding-inline-start: calc(var(--sw-space-2) + var(--sw-space-1));
2644
+ }
2645
+
2646
+ .sw-denomination-strip .sw-denomination-label::before {
2647
+ background: var(--sw-denomination-tone);
2648
+ content: '';
2649
+ inset-block: 0;
2650
+ inset-inline-start: 0;
2651
+ position: absolute;
2652
+ width: var(--sw-space-1);
2653
+ }
2654
+
2320
2655
  .sw-denomination-icon {
2321
2656
  display: inline-flex;
2322
2657
  flex: none;
@@ -2426,14 +2761,16 @@ body {
2426
2761
  @media not all and (min-width: 48rem) {
2427
2762
  .sw-denomination-strip .sw-denomination-total { display: none; }
2428
2763
  .sw-denomination-total-inline { display: block; }
2429
- .sw-denomination-strip .sw-denomination-label { flex-direction: column; align-items: flex-start; gap: var(--sw-space-1); }
2764
+ .sw-denomination-label-body { flex-direction: column; align-items: flex-start; gap: var(--sw-space-1); }
2430
2765
  .sw-denomination-strip th,
2431
2766
  .sw-denomination-strip td { padding: var(--sw-space-1); }
2767
+ .sw-denomination-strip .sw-denomination-label { padding-inline-start: calc(var(--sw-space-1) * 2); }
2432
2768
  .sw-denomination-tile-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
2433
2769
  }
2434
2770
 
2435
2771
  @media (forced-colors: active) {
2436
2772
  .sw-denomination-label { border-inline-start-color: CanvasText; color: CanvasText; }
2773
+ .sw-denomination-strip .sw-denomination-label::before { background: CanvasText; forced-color-adjust: none; }
2437
2774
  .sw-denomination-cell-zero { color: GrayText; opacity: 1; }
2438
2775
  .sw-denomination-cell-negative,
2439
2776
  .sw-denomination-row-signed .sw-denomination-cell-positive,
@@ -2457,8 +2794,62 @@ body {
2457
2794
  border-color: var(--sw-color-danger);
2458
2795
  }
2459
2796
 
2797
+ .sw-field-adorned {
2798
+ background-color: var(--sw-glass-fill);
2799
+ border: 1px solid var(--sw-color-border);
2800
+ border-radius: var(--sw-radius-sm);
2801
+ color: inherit;
2802
+ font-family: inherit;
2803
+ font-size: inherit;
2804
+ padding-inline: var(--sw-control-md-padding-inline);
2805
+ align-items: center;
2806
+ box-sizing: border-box;
2807
+ cursor: text;
2808
+ display: flex;
2809
+ gap: var(--sw-space-1);
2810
+ min-height: var(--sw-control-md-min-height);
2811
+ }
2812
+
2813
+ [data-theme] .sw-field-adorned > input {
2814
+ align-self: stretch;
2815
+ background: transparent;
2816
+ border: 0;
2817
+ border-radius: 0;
2818
+ flex: 1 1 auto;
2819
+ min-height: 0;
2820
+ min-width: 0;
2821
+ padding-inline: 0;
2822
+ }
2823
+
2824
+ [data-theme] .sw-field-adorned > input:focus-visible { outline: none; }
2825
+
2826
+ .sw-field-adorned:focus-within {
2827
+ outline: var(--sw-focus-ring-width) solid var(--sw-color-accent);
2828
+ outline-offset: var(--sw-focus-ring-offset);
2829
+ }
2830
+
2831
+ .sw-field-prefix,
2832
+ .sw-field-suffix {
2833
+ color: var(--sw-color-muted);
2834
+ flex: none;
2835
+ user-select: none;
2836
+ white-space: nowrap;
2837
+ }
2838
+
2839
+ .sw-field-xs .sw-field-adorned {
2840
+ font-size: 13px;
2841
+ letter-spacing: -0.08px;
2842
+ line-height: 18px;
2843
+ min-height: var(--sw-control-xs-min-height);
2844
+ padding-inline: var(--sw-control-xs-padding-inline);
2845
+ }
2846
+
2847
+ .sw-field-invalid .sw-field-adorned { border-color: var(--sw-color-danger); }
2848
+
2460
2849
  @media (forced-colors: active) {
2461
- [data-theme] .sw-field-invalid :is(input, select, textarea) { border-color: Mark; }
2850
+ [data-theme] .sw-field-invalid :is(input, select, textarea),
2851
+ .sw-field-invalid .sw-field-adorned { border-color: Mark; }
2852
+ .sw-field-prefix, .sw-field-suffix { color: CanvasText; }
2462
2853
  .sw-field-error, .sw-field-required { color: Mark; }
2463
2854
  }
2464
2855
 
@@ -2620,3 +3011,28 @@ body {
2620
3011
  @media not all and (min-width: 48rem) {
2621
3012
  .sw-hide-below-md { display: none; }
2622
3013
  }
3014
+
3015
+ .sw-border { border: 1px solid var(--sw-color-border); }
3016
+ .sw-border-dashed { border: 1px dashed var(--sw-color-border); }
3017
+
3018
+ @media (prefers-reduced-transparency: reduce) {
3019
+ .sw-card-glass,
3020
+ .sw-app-header,
3021
+ .sw-action-bar,
3022
+ .sw-badge-neutral,
3023
+ .sw-segmented,
3024
+ .sw-table-sticky thead th,
3025
+ .sw-denomination-strip .sw-denomination-label,
3026
+ .sw-denomination-strip thead .sw-denomination-corner:first-child,
3027
+ .sw-bar-chart-track,
3028
+ .sw-dialog,
3029
+ .sw-accordion,
3030
+ .sw-select-list,
3031
+ .sw-action-menu-list,
3032
+ .sw-date-field-calendar,
3033
+ .sw-toast {
3034
+ background: var(--sw-color-surface);
3035
+ backdrop-filter: none;
3036
+ -webkit-backdrop-filter: none;
3037
+ }
3038
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalewing/react",
3
- "version": "1.7.0",
3
+ "version": "1.9.0",
4
4
  "description": "Scalewing DOM components and package-owned CSS utilities.",
5
5
  "type": "module",
6
6
  "license": "MIT",