@scalewing/react 1.8.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.
Files changed (85) hide show
  1. package/CHANGELOG.md +153 -0
  2. package/README.md +93 -2
  3. package/dist/anchored-position.d.ts +28 -0
  4. package/dist/anchored-position.js +17 -0
  5. package/dist/calendar-button-labels.d.ts +19 -0
  6. package/dist/calendar-button-labels.js +10 -0
  7. package/dist/calendar-keys.d.ts +19 -0
  8. package/dist/calendar-keys.js +39 -0
  9. package/dist/calendar-labels.d.ts +19 -0
  10. package/dist/calendar-labels.js +41 -0
  11. package/dist/calendar-month.d.ts +38 -0
  12. package/dist/calendar-month.js +116 -0
  13. package/dist/calendar-years.d.ts +14 -0
  14. package/dist/calendar-years.js +20 -0
  15. package/dist/components/Accordion.d.ts +6 -1
  16. package/dist/components/Accordion.js +12 -3
  17. package/dist/components/ActionBar.d.ts +30 -0
  18. package/dist/components/ActionBar.js +13 -0
  19. package/dist/components/Box.d.ts +7 -3
  20. package/dist/components/Box.js +2 -2
  21. package/dist/components/CalendarButton.d.ts +43 -0
  22. package/dist/components/CalendarButton.js +47 -0
  23. package/dist/components/DateField.d.ts +15 -1
  24. package/dist/components/DateField.js +47 -18
  25. package/dist/components/Field.d.ts +5 -1
  26. package/dist/components/Field.js +16 -4
  27. package/dist/components/FieldAdornment.d.ts +20 -0
  28. package/dist/components/FieldAdornment.js +34 -0
  29. package/dist/components/Grid.d.ts +4 -1
  30. package/dist/components/Grid.js +2 -2
  31. package/dist/components/Progress.d.ts +3 -1
  32. package/dist/components/Progress.js +2 -2
  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-calendar-popup.d.ts +36 -0
  44. package/dist/components/date-field/use-calendar-popup.js +43 -0
  45. package/dist/components/date-field/use-date-entry.d.ts +20 -0
  46. package/dist/components/date-field/use-date-entry.js +61 -0
  47. package/dist/components/date-field/use-lang-locale.d.ts +7 -0
  48. package/dist/components/date-field/use-lang-locale.js +17 -0
  49. package/dist/css/css-accordion.js +55 -8
  50. package/dist/css/css-action-bar.d.ts +4 -0
  51. package/dist/css/css-action-bar.js +99 -0
  52. package/dist/css/css-action-menu.js +2 -1
  53. package/dist/css/css-box-border.d.ts +5 -0
  54. package/dist/css/css-box-border.js +24 -0
  55. package/dist/css/css-calendar-button.d.ts +2 -0
  56. package/dist/css/css-calendar-button.js +33 -0
  57. package/dist/css/css-chrome.js +2 -1
  58. package/dist/css/css-components.js +13 -6
  59. package/dist/css/css-data.js +2 -1
  60. package/dist/css/css-date-field.js +241 -11
  61. package/dist/css/css-denomination-grid.js +2 -1
  62. package/dist/css/css-document.d.ts +2 -0
  63. package/dist/css/css-document.js +2 -1
  64. package/dist/css/css-field.js +61 -1
  65. package/dist/css/css-select.js +2 -1
  66. package/dist/css/css-tooltip.js +2 -1
  67. package/dist/css/stacking.d.ts +10 -0
  68. package/dist/css/stacking.js +49 -0
  69. package/dist/css/stylesheet.js +6 -0
  70. package/dist/date-entry-validity.d.ts +10 -0
  71. package/dist/date-entry-validity.js +16 -0
  72. package/dist/date-entry.d.ts +32 -0
  73. package/dist/date-entry.js +106 -0
  74. package/dist/date-field-labels.d.ts +38 -0
  75. package/dist/date-field-labels.js +22 -0
  76. package/dist/date-field-locale.d.ts +8 -0
  77. package/dist/date-field-locale.js +27 -0
  78. package/dist/date-formatters.d.ts +13 -0
  79. package/dist/date-formatters.js +28 -0
  80. package/dist/date-only.d.ts +23 -0
  81. package/dist/date-only.js +63 -9
  82. package/dist/index.d.ts +6 -3
  83. package/dist/index.js +4 -2
  84. package/dist/styles.css +410 -21
  85. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,8 +1,10 @@
1
1
  export { ActionMenu, type ActionMenuItem, type ActionMenuProps, } from './components/ActionMenu.js';
2
+ export { ActionBar, type ActionBarProps } from './components/ActionBar.js';
2
3
  export { Accordion } from './components/Accordion.js';
3
- export type { AccordionProps } from './components/Accordion.js';
4
+ export type { AccordionProps, AccordionSize } from './components/Accordion.js';
4
5
  export { Switch, type SwitchProps } from './components/Switch.js';
5
- export { DateField, type DateFieldProps } from './components/DateField.js';
6
+ export { DateField, type DateFieldLabels, type DateFieldProps, type WeekStart, } from './components/DateField.js';
7
+ export { CalendarButton, type CalendarButtonLabels, type CalendarButtonProps, } from './components/CalendarButton.js';
6
8
  export { Checkbox, type CheckboxProps } from './components/Checkbox.js';
7
9
  export { Spinner, type SpinnerProps, type SpinnerSize, } from './components/Spinner.js';
8
10
  export { Progress, type ProgressProps, type ProgressTone, } from './components/Progress.js';
@@ -12,7 +14,7 @@ export { AppHeader, type AppHeaderProps } from './components/AppHeader.js';
12
14
  export { Badge, type BadgeProps, type BadgeSize, type BadgeTone, badgeSizes, badgeTones, } from './components/Badge.js';
13
15
  export { BarChart, type BarChartItem, type BarChartProps, } from './components/BarChart.js';
14
16
  export { Button, type ButtonProps, type ButtonSize, type ButtonVariant, } from './components/Button.js';
15
- export { Box, type BoxElement, type BoxProps } from './components/Box.js';
17
+ export { Box, type BoxBorder, type BoxElement, type BoxProps, } from './components/Box.js';
16
18
  export { ButtonGroup, type ButtonGroupJustify, type ButtonGroupProps, } from './components/ButtonGroup.js';
17
19
  export { Card, type CardProps, type CardVariant } from './components/Card.js';
18
20
  export { Dialog, type DialogProps, type DialogSize, } from './components/Dialog.js';
@@ -34,6 +36,7 @@ export { Text, type TextAlign, type TextElement, type TextProps, } from './compo
34
36
  export { ThemeProvider, useTheme, type ThemeProviderProps, } from './theme/ThemeProvider.js';
35
37
  export { utilityClassCatalog } from './css/stylesheet.js';
36
38
  export type { VisibilityProps } from './visibility-classes.js';
39
+ export type { Breakpoint } from './css/breakpoints.js';
37
40
  export { Separator } from './components/Separator.js';
38
41
  export type { SeparatorOrientation, SeparatorProps, } from './components/Separator.js';
39
42
  export { Grid } from './components/Grid.js';
package/dist/index.js CHANGED
@@ -1,7 +1,9 @@
1
1
  export { ActionMenu, } from './components/ActionMenu.js';
2
+ export { ActionBar } from './components/ActionBar.js';
2
3
  export { Accordion } from './components/Accordion.js';
3
4
  export { Switch } from './components/Switch.js';
4
- export { DateField } from './components/DateField.js';
5
+ export { DateField, } from './components/DateField.js';
6
+ export { CalendarButton, } from './components/CalendarButton.js';
5
7
  export { Checkbox } from './components/Checkbox.js';
6
8
  export { Spinner, } from './components/Spinner.js';
7
9
  export { Progress, } from './components/Progress.js';
@@ -11,7 +13,7 @@ export { AppHeader } from './components/AppHeader.js';
11
13
  export { Badge, badgeSizes, badgeTones, } from './components/Badge.js';
12
14
  export { BarChart, } from './components/BarChart.js';
13
15
  export { Button, } from './components/Button.js';
14
- export { Box } from './components/Box.js';
16
+ export { Box, } from './components/Box.js';
15
17
  export { ButtonGroup, } from './components/ButtonGroup.js';
16
18
  export { Card } from './components/Card.js';
17
19
  export { Dialog, } from './components/Dialog.js';
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 {
@@ -1296,7 +1296,15 @@ body {
1296
1296
  line-height: 20px;
1297
1297
  }
1298
1298
 
1299
- .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 {
1300
1308
  background: var(--sw-glass-fill);
1301
1309
  border: 1px solid var(--sw-color-border);
1302
1310
  border-radius: var(--sw-radius-sm);
@@ -1304,26 +1312,78 @@ body {
1304
1312
  color: var(--sw-color-text);
1305
1313
  font-family: var(--sw-font-sans);
1306
1314
  font-size: 17px;
1315
+ font-variant-numeric: tabular-nums;
1316
+ margin: 0;
1317
+ max-width: 100%;
1307
1318
  min-height: var(--sw-control-md-min-height);
1308
1319
  min-width: 0;
1309
- padding-inline: var(--sw-control-md-padding-inline);
1310
- 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));
1311
1322
  }
1312
1323
 
1313
- .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 {
1314
1335
  outline: var(--sw-focus-ring-width) solid var(--sw-color-accent);
1315
1336
  outline-offset: var(--sw-focus-ring-offset);
1316
1337
  }
1317
1338
 
1318
- .sw-date-field-input[aria-invalid='true'] {
1339
+ .sw-date-field .sw-date-field-control > .sw-date-field-input[aria-invalid='true'] {
1319
1340
  border-color: var(--sw-color-danger);
1320
1341
  }
1321
1342
 
1322
- .sw-date-field-input:disabled {
1343
+ .sw-date-field .sw-date-field-control > .sw-date-field-input:disabled,
1344
+ .sw-date-field-button:disabled {
1323
1345
  cursor: not-allowed;
1324
1346
  opacity: var(--sw-disabled-opacity);
1325
1347
  }
1326
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
+
1327
1387
  .sw-date-field-description,
1328
1388
  .sw-date-field-error {
1329
1389
  font-family: var(--sw-font-sans);
@@ -1334,12 +1394,176 @@ body {
1334
1394
  .sw-date-field-description { color: var(--sw-color-muted); }
1335
1395
  .sw-date-field-error { color: var(--sw-color-danger); }
1336
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
+
1337
1532
  @media (prefers-reduced-transparency: reduce) {
1338
- .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); }
1339
1534
  }
1340
1535
 
1341
1536
  @media (forced-colors: active) {
1342
- .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
+ }
1545
+ }
1546
+
1547
+ .sw-button.sw-calendar-button {
1548
+ flex: none;
1549
+ padding-inline: 0;
1550
+ }
1551
+
1552
+ .sw-button-xs.sw-calendar-button { min-width: var(--sw-control-xs-min-height); }
1553
+ .sw-button-sm.sw-calendar-button { min-width: var(--sw-control-sm-min-height); }
1554
+ .sw-button-md.sw-calendar-button { min-width: var(--sw-control-md-min-height); }
1555
+
1556
+ .sw-calendar-button:not(.sw-button-md) .sw-date-field-glyph {
1557
+ height: var(--sw-space-4);
1558
+ width: var(--sw-space-4);
1559
+ }
1560
+
1561
+ /* A coarse pointer gets the full touch target at the smaller sizes too. */
1562
+ @media (pointer: coarse) {
1563
+ .sw-button.sw-calendar-button {
1564
+ min-height: var(--sw-control-md-min-height);
1565
+ min-width: var(--sw-control-md-min-height);
1566
+ }
1343
1567
  }
1344
1568
 
1345
1569
  .sw-bar-chart {
@@ -1434,7 +1658,7 @@ body {
1434
1658
  .sw-app-header-sticky {
1435
1659
  position: sticky;
1436
1660
  top: 0;
1437
- z-index: 2;
1661
+ z-index: 4;
1438
1662
  }
1439
1663
 
1440
1664
  .sw-nav {
@@ -1513,18 +1737,27 @@ body {
1513
1737
  color: var(--sw-color-text);
1514
1738
  }
1515
1739
 
1740
+ /* A nested disclosure sits inside a larger surface, so its corners are smaller. */
1741
+ .sw-accordion-sm { border-radius: var(--sw-radius-md); }
1742
+
1516
1743
  .sw-accordion-summary {
1744
+ align-items: center;
1745
+ box-sizing: border-box;
1517
1746
  cursor: pointer;
1518
- display: list-item;
1747
+ display: flex;
1748
+ gap: var(--sw-space-3);
1749
+ list-style: none;
1519
1750
  min-height: var(--sw-control-md-min-height);
1520
1751
  }
1521
1752
 
1522
- .sw-accordion-summary::-webkit-details-marker {
1523
- color: var(--sw-color-muted);
1524
- }
1753
+ /* A nested header is an sm control, still a comfortable pointer and touch target. */
1754
+ .sw-accordion-sm > .sw-accordion-summary { min-height: var(--sw-control-sm-min-height); }
1525
1755
 
1526
- .sw-accordion-summary::marker {
1527
- color: var(--sw-color-muted);
1756
+ .sw-accordion-heading {
1757
+ display: flex;
1758
+ flex: 1 1 auto;
1759
+ flex-direction: column;
1760
+ min-width: 0;
1528
1761
  }
1529
1762
 
1530
1763
  .sw-accordion-summary:focus-visible {
@@ -1532,6 +1765,35 @@ body {
1532
1765
  outline-offset: var(--sw-focus-ring-offset);
1533
1766
  }
1534
1767
 
1768
+ /* A token chevron replaces the user-agent triangle: it points to the inline end when closed and down when open. */
1769
+ .sw-accordion-summary::-webkit-details-marker { display: none; }
1770
+
1771
+ .sw-accordion-marker {
1772
+ border-bottom: 2px solid var(--sw-color-muted);
1773
+ border-right: 2px solid var(--sw-color-muted);
1774
+ box-sizing: border-box;
1775
+ flex: none;
1776
+ height: var(--sw-space-2);
1777
+ margin-inline-end: var(--sw-space-1);
1778
+ transform: rotate(-45deg);
1779
+ transition: transform var(--sw-motion-default) var(--sw-motion-easing);
1780
+ width: var(--sw-space-2);
1781
+ }
1782
+
1783
+ .sw-accordion-marker:dir(rtl) { transform: rotate(135deg); }
1784
+
1785
+ .sw-accordion[open] > .sw-accordion-summary .sw-accordion-marker {
1786
+ transform: rotate(45deg);
1787
+ }
1788
+
1789
+ @media (prefers-reduced-motion: reduce) {
1790
+ .sw-accordion-marker { transition: none; }
1791
+ }
1792
+
1793
+ @media (forced-colors: active) {
1794
+ .sw-accordion-marker { border-color: CanvasText; }
1795
+ }
1796
+
1535
1797
  .sw-select {
1536
1798
  max-width: 100%;
1537
1799
  width: max-content;
@@ -1617,7 +1879,7 @@ body {
1617
1879
  padding: var(--sw-space-1);
1618
1880
  position: absolute;
1619
1881
  width: max-content;
1620
- z-index: 3;
1882
+ z-index: 10;
1621
1883
  }
1622
1884
 
1623
1885
  .sw-select-option {
@@ -1733,6 +1995,74 @@ body {
1733
1995
  color: var(--sw-color-danger);
1734
1996
  }
1735
1997
 
1998
+ .sw-action-bar {
1999
+ align-items: center;
2000
+ background: var(--sw-glass-fill);
2001
+ border: 1px solid var(--sw-glass-border);
2002
+ border-radius: var(--sw-radius-lg);
2003
+ box-shadow: inset 0 1px 0 var(--sw-glass-specular);
2004
+ backdrop-filter: blur(var(--sw-glass-blur)) saturate(var(--sw-glass-saturate));
2005
+ -webkit-backdrop-filter: blur(var(--sw-glass-blur)) saturate(var(--sw-glass-saturate));
2006
+ box-sizing: border-box;
2007
+ color: var(--sw-color-text);
2008
+ display: flex;
2009
+ flex-wrap: wrap;
2010
+ gap: var(--sw-space-2) var(--sw-space-4);
2011
+ padding-block: var(--sw-space-3);
2012
+ padding-left: max(var(--sw-space-4), env(safe-area-inset-left, 0px));
2013
+ padding-right: max(var(--sw-space-4), env(safe-area-inset-right, 0px));
2014
+ }
2015
+
2016
+ .sw-action-bar-status {
2017
+ color: var(--sw-color-muted);
2018
+ flex: 1 1 auto;
2019
+ font-family: var(--sw-font-sans);
2020
+ font-size: 13px;
2021
+ line-height: 18px;
2022
+ margin: 0;
2023
+ min-width: 0;
2024
+ }
2025
+
2026
+ /* With no status the live region stays in the page, so a first status is
2027
+ still announced, but it takes no room in the bar. */
2028
+ .sw-action-bar-status:empty {
2029
+ clip-path: inset(50%);
2030
+ height: 1px;
2031
+ overflow: hidden;
2032
+ position: absolute;
2033
+ width: 1px;
2034
+ }
2035
+
2036
+ .sw-action-bar-actions {
2037
+ align-items: center;
2038
+ display: flex;
2039
+ flex: 0 1 auto;
2040
+ flex-wrap: wrap;
2041
+ gap: var(--sw-space-2);
2042
+ justify-content: flex-end;
2043
+ margin-inline-start: auto;
2044
+ }
2045
+
2046
+ @media not all and (min-width: 48rem) {
2047
+ .sw-action-bar-status,
2048
+ .sw-action-bar-actions { flex-basis: 100%; }
2049
+ .sw-action-bar-actions > * { flex: 1 1 auto; }
2050
+ }
2051
+
2052
+ .sw-action-bar-sticky {
2053
+ bottom: calc(var(--sw-space-2) + env(safe-area-inset-bottom, 0px));
2054
+ position: sticky;
2055
+ z-index: 2;
2056
+ }
2057
+
2058
+ @media not all and (min-width: 48rem) {
2059
+ .sw-action-bar-sticky-below-md {
2060
+ bottom: calc(var(--sw-space-2) + env(safe-area-inset-bottom, 0px));
2061
+ position: sticky;
2062
+ z-index: 2;
2063
+ }
2064
+ }
2065
+
1736
2066
  .sw-switch {
1737
2067
  align-items: center;
1738
2068
  cursor: pointer;
@@ -2486,8 +2816,62 @@ body {
2486
2816
  border-color: var(--sw-color-danger);
2487
2817
  }
2488
2818
 
2819
+ .sw-field-adorned {
2820
+ background-color: var(--sw-glass-fill);
2821
+ border: 1px solid var(--sw-color-border);
2822
+ border-radius: var(--sw-radius-sm);
2823
+ color: inherit;
2824
+ font-family: inherit;
2825
+ font-size: inherit;
2826
+ padding-inline: var(--sw-control-md-padding-inline);
2827
+ align-items: center;
2828
+ box-sizing: border-box;
2829
+ cursor: text;
2830
+ display: flex;
2831
+ gap: var(--sw-space-1);
2832
+ min-height: var(--sw-control-md-min-height);
2833
+ }
2834
+
2835
+ [data-theme] .sw-field-adorned > input {
2836
+ align-self: stretch;
2837
+ background: transparent;
2838
+ border: 0;
2839
+ border-radius: 0;
2840
+ flex: 1 1 auto;
2841
+ min-height: 0;
2842
+ min-width: 0;
2843
+ padding-inline: 0;
2844
+ }
2845
+
2846
+ [data-theme] .sw-field-adorned > input:focus-visible { outline: none; }
2847
+
2848
+ .sw-field-adorned:focus-within {
2849
+ outline: var(--sw-focus-ring-width) solid var(--sw-color-accent);
2850
+ outline-offset: var(--sw-focus-ring-offset);
2851
+ }
2852
+
2853
+ .sw-field-prefix,
2854
+ .sw-field-suffix {
2855
+ color: var(--sw-color-muted);
2856
+ flex: none;
2857
+ user-select: none;
2858
+ white-space: nowrap;
2859
+ }
2860
+
2861
+ .sw-field-xs .sw-field-adorned {
2862
+ font-size: 13px;
2863
+ letter-spacing: -0.08px;
2864
+ line-height: 18px;
2865
+ min-height: var(--sw-control-xs-min-height);
2866
+ padding-inline: var(--sw-control-xs-padding-inline);
2867
+ }
2868
+
2869
+ .sw-field-invalid .sw-field-adorned { border-color: var(--sw-color-danger); }
2870
+
2489
2871
  @media (forced-colors: active) {
2490
- [data-theme] .sw-field-invalid :is(input, select, textarea) { border-color: Mark; }
2872
+ [data-theme] .sw-field-invalid :is(input, select, textarea),
2873
+ .sw-field-invalid .sw-field-adorned { border-color: Mark; }
2874
+ .sw-field-prefix, .sw-field-suffix { color: CanvasText; }
2491
2875
  .sw-field-error, .sw-field-required { color: Mark; }
2492
2876
  }
2493
2877
 
@@ -2650,9 +3034,13 @@ body {
2650
3034
  .sw-hide-below-md { display: none; }
2651
3035
  }
2652
3036
 
3037
+ .sw-border { border: 1px solid var(--sw-color-border); }
3038
+ .sw-border-dashed { border: 1px dashed var(--sw-color-border); }
3039
+
2653
3040
  @media (prefers-reduced-transparency: reduce) {
2654
3041
  .sw-card-glass,
2655
3042
  .sw-app-header,
3043
+ .sw-action-bar,
2656
3044
  .sw-badge-neutral,
2657
3045
  .sw-segmented,
2658
3046
  .sw-table-sticky thead th,
@@ -2663,6 +3051,7 @@ body {
2663
3051
  .sw-accordion,
2664
3052
  .sw-select-list,
2665
3053
  .sw-action-menu-list,
3054
+ .sw-date-field-calendar,
2666
3055
  .sw-toast {
2667
3056
  background: var(--sw-color-surface);
2668
3057
  backdrop-filter: none;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalewing/react",
3
- "version": "1.8.0",
3
+ "version": "1.10.0",
4
4
  "description": "Scalewing DOM components and package-owned CSS utilities.",
5
5
  "type": "module",
6
6
  "license": "MIT",