@scalewing/react 1.21.0 → 1.23.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/CHANGELOG.md +30 -0
- package/README.md +49 -5
- package/dist/components/ActionMenu.d.ts +13 -1
- package/dist/components/ActionMenu.js +2 -2
- package/dist/components/BarChart.d.ts +28 -0
- package/dist/components/BarChart.js +5 -4
- package/dist/components/CalendarButton.d.ts +10 -0
- package/dist/components/CalendarButton.js +4 -3
- package/dist/components/DenominationGrid.d.ts +2 -2
- package/dist/components/DenominationGrid.js +5 -2
- package/dist/components/Field.d.ts +9 -0
- package/dist/components/Field.js +3 -2
- package/dist/components/SectionNav.d.ts +44 -0
- package/dist/components/SectionNav.js +48 -0
- package/dist/components/Table.d.ts +38 -13
- package/dist/components/Table.js +7 -12
- package/dist/components/Tabs.d.ts +3 -1
- package/dist/components/Tabs.js +8 -2
- package/dist/components/Tooltip.js +19 -3
- package/dist/components/action-menu/ActionMenuList.d.ts +3 -2
- package/dist/components/action-menu/ActionMenuList.js +16 -4
- package/dist/components/date-field/CalendarDialog.d.ts +4 -1
- package/dist/components/date-field/CalendarDialog.js +2 -2
- package/dist/components/date-field/CalendarGrid.d.ts +4 -1
- package/dist/components/date-field/CalendarGrid.js +11 -3
- package/dist/components/denomination-grid/DenominationStrip.d.ts +2 -2
- package/dist/components/denomination-grid/DenominationStrip.js +17 -6
- package/dist/components/denomination-grid/types.d.ts +15 -2
- package/dist/components/table/TableCell.d.ts +42 -0
- package/dist/components/table/TableCell.js +27 -0
- package/dist/components/table/table-layout.d.ts +10 -0
- package/dist/components/table/table-layout.js +14 -0
- package/dist/components/tooltip/tooltip-open.d.ts +8 -0
- package/dist/components/tooltip/tooltip-open.js +60 -0
- package/dist/components/tooltip/use-tooltip-placement.d.ts +11 -0
- package/dist/components/tooltip/use-tooltip-placement.js +46 -0
- package/dist/components/use-anchored-popover.d.ts +2 -0
- package/dist/components/use-anchored-popover.js +2 -1
- package/dist/css/breakpoints.d.ts +24 -3
- package/dist/css/breakpoints.js +27 -1
- package/dist/css/css-action-menu.js +24 -0
- package/dist/css/css-chart.js +45 -1
- package/dist/css/css-chrome.js +13 -0
- package/dist/css/css-components.js +3 -0
- package/dist/css/css-date-field.js +47 -1
- package/dist/css/css-denomination-aligned.d.ts +7 -0
- package/dist/css/css-denomination-aligned.js +68 -0
- package/dist/css/css-denomination-grid.js +7 -1
- package/dist/css/css-field.js +14 -0
- package/dist/css/css-responsive.js +4 -5
- package/dist/css/css-scroll-region.d.ts +8 -0
- package/dist/css/css-scroll-region.js +9 -3
- package/dist/css/css-section-nav.d.ts +4 -0
- package/dist/css/css-section-nav.js +120 -0
- package/dist/css/css-table-layout.d.ts +20 -0
- package/dist/css/css-table-layout.js +59 -0
- package/dist/css/css-table-sort.d.ts +2 -0
- package/dist/css/css-table-sort.js +105 -0
- package/dist/css/css-table.js +8 -0
- package/dist/css/css-tabs.d.ts +6 -1
- package/dist/css/css-tabs.js +9 -1
- package/dist/css/css-tooltip.js +7 -4
- package/dist/css/stylesheet.js +2 -0
- package/dist/date-only.d.ts +12 -0
- package/dist/date-only.js +24 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.js +2 -0
- package/dist/styles.css +383 -6
- package/dist/visibility-classes.d.ts +3 -3
- package/dist/visibility-classes.js +7 -1
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -1420,6 +1420,121 @@ body {
|
|
|
1420
1420
|
padding: var(--sw-space-1) var(--sw-space-2);
|
|
1421
1421
|
}
|
|
1422
1422
|
|
|
1423
|
+
.sw-table-fixed {
|
|
1424
|
+
table-layout: fixed;
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
.sw-table .sw-table-col-min {
|
|
1428
|
+
white-space: nowrap;
|
|
1429
|
+
width: 1%;
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
.sw-table-fixed .sw-table-col-min {
|
|
1433
|
+
width: auto;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
.sw-table .sw-table-col-xs { width: 4rem; }
|
|
1437
|
+
.sw-table .sw-table-col-sm { width: 6rem; }
|
|
1438
|
+
.sw-table .sw-table-col-md { width: 8rem; }
|
|
1439
|
+
.sw-table .sw-table-col-lg { width: 12rem; }
|
|
1440
|
+
.sw-table .sw-table-col-xl { width: 16rem; }
|
|
1441
|
+
|
|
1442
|
+
.sw-table.sw-table-top th,
|
|
1443
|
+
.sw-table.sw-table-top td {
|
|
1444
|
+
vertical-align: top;
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
.sw-table-sort {
|
|
1448
|
+
align-items: center;
|
|
1449
|
+
appearance: none;
|
|
1450
|
+
background: transparent;
|
|
1451
|
+
border: 0;
|
|
1452
|
+
border-radius: var(--sw-radius-sm);
|
|
1453
|
+
color: inherit;
|
|
1454
|
+
cursor: pointer;
|
|
1455
|
+
display: inline-flex;
|
|
1456
|
+
font: inherit;
|
|
1457
|
+
gap: var(--sw-space-1);
|
|
1458
|
+
letter-spacing: inherit;
|
|
1459
|
+
/* A step of room for the focus ring, taken back so the name stays on the cell's edge. */
|
|
1460
|
+
margin-inline: calc(-1 * var(--sw-space-1));
|
|
1461
|
+
min-height: var(--sw-control-xs-min-height);
|
|
1462
|
+
padding: 0 var(--sw-space-1);
|
|
1463
|
+
text-align: inherit;
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
.sw-table .sw-table-numeric .sw-table-sort,
|
|
1467
|
+
.sw-table .sw-table-end .sw-table-sort {
|
|
1468
|
+
flex-direction: row-reverse;
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
.sw-table-sort:hover,
|
|
1472
|
+
.sw-table th[aria-sort] .sw-table-sort {
|
|
1473
|
+
color: var(--sw-color-text);
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
.sw-table-sort:focus-visible {
|
|
1477
|
+
outline: var(--sw-focus-ring-width) solid var(--sw-color-accent);
|
|
1478
|
+
outline-offset: var(--sw-focus-ring-offset);
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
.sw-table-sort-glyph {
|
|
1482
|
+
align-items: center;
|
|
1483
|
+
display: inline-flex;
|
|
1484
|
+
flex: none;
|
|
1485
|
+
flex-direction: column;
|
|
1486
|
+
justify-content: center;
|
|
1487
|
+
min-height: var(--sw-space-4);
|
|
1488
|
+
width: var(--sw-space-2);
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
.sw-table-sort-ascending::before,
|
|
1492
|
+
.sw-table-sort-none::before {
|
|
1493
|
+
content: '';
|
|
1494
|
+
border-bottom: 2px solid var(--sw-color-muted);
|
|
1495
|
+
border-right: 2px solid var(--sw-color-muted);
|
|
1496
|
+
box-sizing: border-box;
|
|
1497
|
+
height: var(--sw-space-2);
|
|
1498
|
+
width: var(--sw-space-2);
|
|
1499
|
+
border-color: currentColor;
|
|
1500
|
+
display: block;
|
|
1501
|
+
margin-top: calc(var(--sw-space-1) / 2);
|
|
1502
|
+
transform: rotate(-135deg);
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
.sw-table-sort-descending::after,
|
|
1506
|
+
.sw-table-sort-none::after {
|
|
1507
|
+
content: '';
|
|
1508
|
+
border-bottom: 2px solid var(--sw-color-muted);
|
|
1509
|
+
border-right: 2px solid var(--sw-color-muted);
|
|
1510
|
+
box-sizing: border-box;
|
|
1511
|
+
height: var(--sw-space-2);
|
|
1512
|
+
width: var(--sw-space-2);
|
|
1513
|
+
border-color: currentColor;
|
|
1514
|
+
display: block;
|
|
1515
|
+
margin-bottom: calc(var(--sw-space-1) / 2);
|
|
1516
|
+
transform: rotate(45deg);
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
.sw-table-sort-none {
|
|
1520
|
+
opacity: var(--sw-quiet-opacity);
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
.sw-table-sort-none::before,
|
|
1524
|
+
.sw-table-sort-none::after {
|
|
1525
|
+
height: calc(var(--sw-space-2) * 0.75);
|
|
1526
|
+
width: calc(var(--sw-space-2) * 0.75);
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
@media (pointer: coarse) {
|
|
1530
|
+
.sw-table-sort { min-height: var(--sw-control-md-min-height); }
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
@media (forced-colors: active) {
|
|
1534
|
+
.sw-table-sort { color: ButtonText; }
|
|
1535
|
+
.sw-table-sort-none { opacity: 1; }
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1423
1538
|
.sw-table-row-selected > :first-child {
|
|
1424
1539
|
position: relative;
|
|
1425
1540
|
}
|
|
@@ -1658,16 +1773,51 @@ body {
|
|
|
1658
1773
|
background: color-mix(in srgb, var(--sw-color-muted) 16%, transparent);
|
|
1659
1774
|
}
|
|
1660
1775
|
|
|
1776
|
+
/*
|
|
1777
|
+
* A range's days are one band in each week row: square-cornered, the accent
|
|
1778
|
+
* at 16 % over the calendar's glass, rounded at the range's start and end.
|
|
1779
|
+
* accentSubtle is mixed against the surface, not the glass, and fades to
|
|
1780
|
+
* nothing where the accent is near AA, so the band would vanish in most
|
|
1781
|
+
* dark palettes. Every number on the band is in the text colour, which
|
|
1782
|
+
* keeps 4.5:1 on it in every palette (muted and accent do not); a
|
|
1783
|
+
* neighbouring month's day and today are marked by the band and today's
|
|
1784
|
+
* accent ring (3:1 or more on the band). The selected day sits on top.
|
|
1785
|
+
*/
|
|
1786
|
+
.sw-date-field-day-in-range {
|
|
1787
|
+
background: color-mix(in srgb, var(--sw-color-accent) 16%, transparent);
|
|
1788
|
+
border-radius: 0;
|
|
1789
|
+
color: var(--sw-color-text);
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
.sw-date-field-day-range-start {
|
|
1793
|
+
border-end-start-radius: var(--sw-radius-pill);
|
|
1794
|
+
border-start-start-radius: var(--sw-radius-pill);
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
.sw-date-field-day-range-end {
|
|
1798
|
+
border-end-end-radius: var(--sw-radius-pill);
|
|
1799
|
+
border-start-end-radius: var(--sw-radius-pill);
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1661
1802
|
.sw-date-field-day[aria-current='date'] {
|
|
1662
1803
|
border-color: var(--sw-color-accent);
|
|
1663
1804
|
color: var(--sw-color-accent);
|
|
1664
1805
|
font-weight: 600;
|
|
1665
1806
|
}
|
|
1666
1807
|
|
|
1808
|
+
.sw-date-field-day-in-range[aria-current='date'] {
|
|
1809
|
+
color: var(--sw-color-text);
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
.sw-date-field-day-in-range:hover:not([aria-disabled='true']) {
|
|
1813
|
+
background: color-mix(in srgb, var(--sw-color-accent) 24%, transparent);
|
|
1814
|
+
}
|
|
1815
|
+
|
|
1667
1816
|
.sw-date-field-day[aria-selected='true'],
|
|
1668
1817
|
.sw-date-field-day[aria-selected='true']:hover {
|
|
1669
1818
|
background: var(--sw-color-accent);
|
|
1670
1819
|
border-color: var(--sw-color-accent);
|
|
1820
|
+
border-radius: var(--sw-radius-pill);
|
|
1671
1821
|
color: var(--sw-color-onAccent);
|
|
1672
1822
|
font-weight: 600;
|
|
1673
1823
|
}
|
|
@@ -1709,7 +1859,15 @@ body {
|
|
|
1709
1859
|
}
|
|
1710
1860
|
.sw-date-field-calendar { border-color: CanvasText; }
|
|
1711
1861
|
.sw-date-field-day[aria-current='date'] { border-color: CanvasText; }
|
|
1712
|
-
.sw-date-field-day
|
|
1862
|
+
.sw-date-field-day-in-range,
|
|
1863
|
+
.sw-date-field-day-in-range:hover:not([aria-disabled='true']),
|
|
1864
|
+
.sw-date-field-day-in-range[aria-current='date'] {
|
|
1865
|
+
background: Mark;
|
|
1866
|
+
color: MarkText;
|
|
1867
|
+
forced-color-adjust: none;
|
|
1868
|
+
}
|
|
1869
|
+
.sw-date-field-day[aria-selected='true'],
|
|
1870
|
+
.sw-date-field-day[aria-selected='true']:hover {
|
|
1713
1871
|
background: Highlight;
|
|
1714
1872
|
color: HighlightText;
|
|
1715
1873
|
forced-color-adjust: none;
|
|
@@ -1818,6 +1976,38 @@ body {
|
|
|
1818
1976
|
justify-content: space-between;
|
|
1819
1977
|
}
|
|
1820
1978
|
|
|
1979
|
+
.sw-bar-chart-diverging .sw-bar-chart-track {
|
|
1980
|
+
position: relative;
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
.sw-bar-chart-diverging .sw-bar-chart-track::before {
|
|
1984
|
+
background: var(--sw-color-border);
|
|
1985
|
+
content: '';
|
|
1986
|
+
inset-block: 0;
|
|
1987
|
+
inset-inline-start: 50%;
|
|
1988
|
+
position: absolute;
|
|
1989
|
+
width: 1px;
|
|
1990
|
+
}
|
|
1991
|
+
|
|
1992
|
+
.sw-bar-chart-diverging .sw-bar-chart-fill {
|
|
1993
|
+
border-end-start-radius: 0;
|
|
1994
|
+
border-start-start-radius: 0;
|
|
1995
|
+
margin-inline-start: 50%;
|
|
1996
|
+
width: calc(var(--sw-bar-fill, 0) * 50%);
|
|
1997
|
+
}
|
|
1998
|
+
|
|
1999
|
+
.sw-bar-chart-diverging .sw-bar-chart-fill-negative {
|
|
2000
|
+
border-end-end-radius: 0;
|
|
2001
|
+
border-end-start-radius: inherit;
|
|
2002
|
+
border-start-end-radius: 0;
|
|
2003
|
+
border-start-start-radius: inherit;
|
|
2004
|
+
margin-inline-start: calc(50% - var(--sw-bar-fill, 0) * 50%);
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
@media (forced-colors: active) {
|
|
2008
|
+
.sw-bar-chart-diverging .sw-bar-chart-track::before { background: CanvasText; }
|
|
2009
|
+
}
|
|
2010
|
+
|
|
1821
2011
|
.sw-app-header {
|
|
1822
2012
|
background: var(--sw-glass-fill);
|
|
1823
2013
|
border: 1px solid var(--sw-glass-border);
|
|
@@ -1851,6 +2041,18 @@ body {
|
|
|
1851
2041
|
color: var(--sw-color-text);
|
|
1852
2042
|
}
|
|
1853
2043
|
|
|
2044
|
+
/*
|
|
2045
|
+
* A button in a navigation is a destination: on a coarse pointer it grows to
|
|
2046
|
+
* the 44 px touch target both ways, whatever its size, as a section link
|
|
2047
|
+
* and a calendar button do. A label beside its glyph keeps its line.
|
|
2048
|
+
*/
|
|
2049
|
+
@media (pointer: coarse) {
|
|
2050
|
+
.sw-nav .sw-button {
|
|
2051
|
+
min-height: var(--sw-control-md-min-height);
|
|
2052
|
+
min-width: var(--sw-control-md-min-height);
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2055
|
+
|
|
1854
2056
|
.sw-field-xs :is(select, input, textarea) {
|
|
1855
2057
|
font-size: 13px;
|
|
1856
2058
|
letter-spacing: -0.08px;
|
|
@@ -1870,6 +2072,88 @@ body {
|
|
|
1870
2072
|
);
|
|
1871
2073
|
}
|
|
1872
2074
|
|
|
2075
|
+
.sw-section-nav-list {
|
|
2076
|
+
border-bottom: 1px solid var(--sw-color-border);
|
|
2077
|
+
display: flex;
|
|
2078
|
+
flex-wrap: wrap;
|
|
2079
|
+
gap: var(--sw-space-1) var(--sw-space-2);
|
|
2080
|
+
list-style: none;
|
|
2081
|
+
margin: 0;
|
|
2082
|
+
padding: 0;
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
[data-theme] .sw-section-nav-link {
|
|
2086
|
+
align-items: center;
|
|
2087
|
+
border-bottom: 2px solid transparent;
|
|
2088
|
+
border-radius: var(--sw-radius-sm) var(--sw-radius-sm) 0 0;
|
|
2089
|
+
box-sizing: border-box;
|
|
2090
|
+
color: var(--sw-color-muted);
|
|
2091
|
+
display: inline-flex;
|
|
2092
|
+
font-family: var(--sw-font-sans);
|
|
2093
|
+
font-size: 15px;
|
|
2094
|
+
font-weight: 600;
|
|
2095
|
+
gap: var(--sw-space-2);
|
|
2096
|
+
letter-spacing: -0.2px;
|
|
2097
|
+
line-height: 20px;
|
|
2098
|
+
margin-bottom: -1px;
|
|
2099
|
+
min-height: var(--sw-control-sm-min-height);
|
|
2100
|
+
padding-inline: var(--sw-control-xs-padding-inline);
|
|
2101
|
+
text-decoration: none;
|
|
2102
|
+
}
|
|
2103
|
+
|
|
2104
|
+
[data-theme] .sw-section-nav-link:hover {
|
|
2105
|
+
background: color-mix(in srgb, var(--sw-color-muted) 12%, transparent);
|
|
2106
|
+
color: var(--sw-color-text);
|
|
2107
|
+
}
|
|
2108
|
+
|
|
2109
|
+
[data-theme] .sw-section-nav-link:focus-visible {
|
|
2110
|
+
outline: var(--sw-focus-ring-width) solid var(--sw-color-accent);
|
|
2111
|
+
outline-offset: calc(-1 * var(--sw-focus-ring-width));
|
|
2112
|
+
}
|
|
2113
|
+
|
|
2114
|
+
[data-theme] .sw-section-nav-link[aria-current] {
|
|
2115
|
+
border-bottom-color: var(--sw-color-accent);
|
|
2116
|
+
color: var(--sw-color-text);
|
|
2117
|
+
}
|
|
2118
|
+
|
|
2119
|
+
.sw-section-nav-icon {
|
|
2120
|
+
display: inline-flex;
|
|
2121
|
+
flex: none;
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2124
|
+
@media (min-width: 48rem) {
|
|
2125
|
+
.sw-section-nav-vertical-from-md .sw-section-nav-list {
|
|
2126
|
+
border-bottom: 0;
|
|
2127
|
+
flex-direction: column;
|
|
2128
|
+
gap: var(--sw-space-1);
|
|
2129
|
+
}
|
|
2130
|
+
|
|
2131
|
+
.sw-section-nav-vertical-from-md .sw-section-nav-link {
|
|
2132
|
+
border-bottom: 0;
|
|
2133
|
+
border-inline-start: 2px solid transparent;
|
|
2134
|
+
border-radius: 0 var(--sw-radius-sm) var(--sw-radius-sm) 0;
|
|
2135
|
+
margin-bottom: 0;
|
|
2136
|
+
width: 100%;
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
.sw-section-nav-vertical-from-md .sw-section-nav-link:dir(rtl) {
|
|
2140
|
+
border-radius: var(--sw-radius-sm) 0 0 var(--sw-radius-sm);
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
.sw-section-nav-vertical-from-md .sw-section-nav-link[aria-current] {
|
|
2144
|
+
border-inline-start-color: var(--sw-color-accent);
|
|
2145
|
+
}
|
|
2146
|
+
}
|
|
2147
|
+
|
|
2148
|
+
@media (pointer: coarse) {
|
|
2149
|
+
[data-theme] .sw-section-nav-link { min-height: var(--sw-control-md-min-height); }
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
@media (forced-colors: active) {
|
|
2153
|
+
[data-theme] .sw-section-nav-link { color: LinkText; }
|
|
2154
|
+
[data-theme] .sw-section-nav-link[aria-current] { border-color: Highlight; color: CanvasText; }
|
|
2155
|
+
}
|
|
2156
|
+
|
|
1873
2157
|
.sw-dialog {
|
|
1874
2158
|
background: var(--sw-glass-fill);
|
|
1875
2159
|
border: 1px solid var(--sw-glass-border);
|
|
@@ -2285,6 +2569,27 @@ body {
|
|
|
2285
2569
|
z-index: 10;
|
|
2286
2570
|
}
|
|
2287
2571
|
|
|
2572
|
+
/* Each child of the header is a line of its own: a name, then a role. */
|
|
2573
|
+
.sw-action-menu-header {
|
|
2574
|
+
border-bottom: 1px solid var(--sw-color-border);
|
|
2575
|
+
color: var(--sw-color-muted);
|
|
2576
|
+
display: flex;
|
|
2577
|
+
flex-direction: column;
|
|
2578
|
+
gap: var(--sw-space-1);
|
|
2579
|
+
font-family: var(--sw-font-sans);
|
|
2580
|
+
font-size: 13px;
|
|
2581
|
+
letter-spacing: -0.08px;
|
|
2582
|
+
line-height: 18px;
|
|
2583
|
+
margin-bottom: var(--sw-space-1);
|
|
2584
|
+
/* The commands' inline padding, so the header's words line up with theirs. */
|
|
2585
|
+
padding: var(--sw-space-1) var(--sw-control-xs-padding-inline) var(--sw-space-2);
|
|
2586
|
+
}
|
|
2587
|
+
|
|
2588
|
+
/* With a header, the commands are the menu inside the popover. */
|
|
2589
|
+
.sw-action-menu-items {
|
|
2590
|
+
display: block;
|
|
2591
|
+
}
|
|
2592
|
+
|
|
2288
2593
|
.sw-action-menu-item {
|
|
2289
2594
|
align-items: center;
|
|
2290
2595
|
appearance: none;
|
|
@@ -2617,11 +2922,14 @@ body {
|
|
|
2617
2922
|
font-family: var(--sw-font-sans);
|
|
2618
2923
|
font-size: 13px;
|
|
2619
2924
|
line-height: 18px;
|
|
2620
|
-
inset
|
|
2621
|
-
inset
|
|
2622
|
-
|
|
2925
|
+
/* The popover layer's inset: 0 would ignore the placed left in right-to-left. */
|
|
2926
|
+
inset: auto;
|
|
2927
|
+
margin: 0;
|
|
2928
|
+
/* On the top layer 100% is the viewport without a classic scrollbar. */
|
|
2929
|
+
max-width: min(18rem, calc(100% - 2 * var(--sw-space-2)));
|
|
2930
|
+
overflow: visible;
|
|
2623
2931
|
padding: var(--sw-space-2);
|
|
2624
|
-
position:
|
|
2932
|
+
position: fixed;
|
|
2625
2933
|
width: max-content;
|
|
2626
2934
|
z-index: 10;
|
|
2627
2935
|
}
|
|
@@ -2760,6 +3068,12 @@ body {
|
|
|
2760
3068
|
outline-offset: var(--sw-focus-ring-offset);
|
|
2761
3069
|
}
|
|
2762
3070
|
|
|
3071
|
+
.sw-tabs.sw-scroll-more-start { box-shadow: inset var(--sw-space-6) 0 var(--sw-space-5) calc(-1 * var(--sw-space-5)) color-mix(in srgb, var(--sw-color-text) 28%, transparent); }
|
|
3072
|
+
.sw-tabs.sw-scroll-more-end { box-shadow: inset calc(-1 * var(--sw-space-6)) 0 var(--sw-space-5) calc(-1 * var(--sw-space-5)) color-mix(in srgb, var(--sw-color-text) 28%, transparent); }
|
|
3073
|
+
.sw-tabs.sw-scroll-more-start:dir(rtl) { box-shadow: inset calc(-1 * var(--sw-space-6)) 0 var(--sw-space-5) calc(-1 * var(--sw-space-5)) color-mix(in srgb, var(--sw-color-text) 28%, transparent); }
|
|
3074
|
+
.sw-tabs.sw-scroll-more-end:dir(rtl) { box-shadow: inset var(--sw-space-6) 0 var(--sw-space-5) calc(-1 * var(--sw-space-5)) color-mix(in srgb, var(--sw-color-text) 28%, transparent); }
|
|
3075
|
+
.sw-tabs.sw-scroll-more-start.sw-scroll-more-end { box-shadow: inset var(--sw-space-6) 0 var(--sw-space-5) calc(-1 * var(--sw-space-5)) color-mix(in srgb, var(--sw-color-text) 28%, transparent), inset calc(-1 * var(--sw-space-6)) 0 var(--sw-space-5) calc(-1 * var(--sw-space-5)) color-mix(in srgb, var(--sw-color-text) 28%, transparent); }
|
|
3076
|
+
|
|
2763
3077
|
.sw-tabs-sticky {
|
|
2764
3078
|
background: color-mix(in srgb, var(--sw-color-background) 90%, transparent);
|
|
2765
3079
|
backdrop-filter: blur(var(--sw-glass-blur)) saturate(var(--sw-glass-saturate));
|
|
@@ -3195,7 +3509,8 @@ body {
|
|
|
3195
3509
|
@media not all and (min-width: 48rem) {
|
|
3196
3510
|
.sw-denomination-strip .sw-denomination-total,
|
|
3197
3511
|
.sw-denomination-strip .sw-denomination-total-head { padding: 0; position: relative; }
|
|
3198
|
-
.sw-denomination-total-value
|
|
3512
|
+
.sw-denomination-total-value,
|
|
3513
|
+
.sw-denomination-total-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
|
|
3199
3514
|
.sw-denomination-total-inline { display: block; }
|
|
3200
3515
|
.sw-denomination-label-body { flex-direction: column; align-items: flex-start; gap: var(--sw-space-1); }
|
|
3201
3516
|
.sw-denomination-strip .sw-denomination-label-line { gap: var(--sw-space-1); }
|
|
@@ -3226,6 +3541,47 @@ body {
|
|
|
3226
3541
|
.sw-denomination-grid .sw-denomination-cell-toned .sw-denomination-cell-zero { color: GrayText; }
|
|
3227
3542
|
}
|
|
3228
3543
|
|
|
3544
|
+
.sw-denomination-scroll-aligned {
|
|
3545
|
+
container-type: inline-size;
|
|
3546
|
+
}
|
|
3547
|
+
|
|
3548
|
+
.sw-denomination-label-xs { --sw-denomination-label-width: 4rem; }
|
|
3549
|
+
.sw-denomination-label-sm { --sw-denomination-label-width: 6rem; }
|
|
3550
|
+
.sw-denomination-label-md { --sw-denomination-label-width: 8rem; }
|
|
3551
|
+
.sw-denomination-label-lg { --sw-denomination-label-width: 12rem; }
|
|
3552
|
+
.sw-denomination-label-xl { --sw-denomination-label-width: 16rem; }
|
|
3553
|
+
|
|
3554
|
+
.sw-denomination-strip-aligned {
|
|
3555
|
+
--sw-denomination-total-shown: 1;
|
|
3556
|
+
--sw-denomination-share: calc(
|
|
3557
|
+
(100cqi - var(--sw-denomination-label-width)) /
|
|
3558
|
+
(var(--sw-denomination-columns) + var(--sw-denomination-total) * var(--sw-denomination-total-shown))
|
|
3559
|
+
);
|
|
3560
|
+
}
|
|
3561
|
+
|
|
3562
|
+
.sw-denomination-strip-aligned th,
|
|
3563
|
+
.sw-denomination-strip-aligned td {
|
|
3564
|
+
box-sizing: border-box;
|
|
3565
|
+
}
|
|
3566
|
+
|
|
3567
|
+
.sw-denomination-strip-aligned .sw-denomination-label,
|
|
3568
|
+
.sw-denomination-strip-aligned thead .sw-denomination-corner:first-child {
|
|
3569
|
+
width: var(--sw-denomination-label-width);
|
|
3570
|
+
}
|
|
3571
|
+
|
|
3572
|
+
.sw-denomination-strip-aligned .sw-denomination-cell,
|
|
3573
|
+
.sw-denomination-strip-aligned .sw-denomination-head:not(.sw-denomination-total-head),
|
|
3574
|
+
.sw-denomination-strip-aligned .sw-denomination-total,
|
|
3575
|
+
.sw-denomination-strip-aligned .sw-denomination-total-head {
|
|
3576
|
+
width: var(--sw-denomination-share);
|
|
3577
|
+
}
|
|
3578
|
+
|
|
3579
|
+
@media not all and (min-width: 48rem) {
|
|
3580
|
+
.sw-denomination-strip-aligned { --sw-denomination-total-shown: 0; }
|
|
3581
|
+
.sw-denomination-strip-aligned .sw-denomination-total,
|
|
3582
|
+
.sw-denomination-strip-aligned .sw-denomination-total-head { width: 0; }
|
|
3583
|
+
}
|
|
3584
|
+
|
|
3229
3585
|
@media (forced-colors: active) {
|
|
3230
3586
|
.sw-denomination-label { border-inline-start-color: CanvasText; color: CanvasText; }
|
|
3231
3587
|
.sw-denomination-strip .sw-denomination-label::before { background: CanvasText; forced-color-adjust: none; }
|
|
@@ -3255,6 +3611,17 @@ body {
|
|
|
3255
3611
|
border-color: var(--sw-color-danger);
|
|
3256
3612
|
}
|
|
3257
3613
|
|
|
3614
|
+
/*
|
|
3615
|
+
* A changed value: the accent border, a hairline thicker through an inset
|
|
3616
|
+
* shadow so nothing moves, on the control or on an adorned frame (whose
|
|
3617
|
+
* input draws no border of its own).
|
|
3618
|
+
*/
|
|
3619
|
+
[data-theme] .sw-field-changed > :is(input, select, textarea),
|
|
3620
|
+
.sw-field-changed .sw-field-adorned {
|
|
3621
|
+
border-color: var(--sw-color-accent);
|
|
3622
|
+
box-shadow: inset 0 0 0 1px var(--sw-color-accent);
|
|
3623
|
+
}
|
|
3624
|
+
|
|
3258
3625
|
.sw-field-adorned {
|
|
3259
3626
|
background-color: var(--sw-glass-fill);
|
|
3260
3627
|
border: 1px solid var(--sw-color-border);
|
|
@@ -3321,6 +3688,8 @@ body {
|
|
|
3321
3688
|
@media (forced-colors: active) {
|
|
3322
3689
|
[data-theme] .sw-field-invalid :is(input, select, textarea),
|
|
3323
3690
|
.sw-field-invalid .sw-field-adorned { border-color: Mark; }
|
|
3691
|
+
[data-theme] .sw-field-changed > :is(input, select, textarea),
|
|
3692
|
+
.sw-field-changed .sw-field-adorned { border-color: Highlight; box-shadow: inset 0 0 0 1px Highlight; }
|
|
3324
3693
|
.sw-field-prefix, .sw-field-suffix { color: CanvasText; }
|
|
3325
3694
|
.sw-field-adorned:has(> input:disabled) {
|
|
3326
3695
|
border-color: GrayText;
|
|
@@ -3516,6 +3885,14 @@ body {
|
|
|
3516
3885
|
.sw-hide-below-md { display: none; }
|
|
3517
3886
|
}
|
|
3518
3887
|
|
|
3888
|
+
@media (min-width: 64rem) {
|
|
3889
|
+
.sw-hide-from-lg { display: none; }
|
|
3890
|
+
}
|
|
3891
|
+
|
|
3892
|
+
@media not all and (min-width: 64rem) {
|
|
3893
|
+
.sw-hide-below-lg { display: none; }
|
|
3894
|
+
}
|
|
3895
|
+
|
|
3519
3896
|
.sw-border { border: 1px solid var(--sw-color-border); }
|
|
3520
3897
|
.sw-border-dashed { border: 1px dashed var(--sw-color-border); }
|
|
3521
3898
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type VisibilityBreakpoint } from './css/breakpoints.js';
|
|
2
2
|
export type VisibilityProps = {
|
|
3
|
-
hideBelow?:
|
|
4
|
-
hideFrom?:
|
|
3
|
+
hideBelow?: VisibilityBreakpoint;
|
|
4
|
+
hideFrom?: VisibilityBreakpoint;
|
|
5
5
|
};
|
|
6
6
|
export declare function visibilityClassNames({ hideBelow, hideFrom, }: VisibilityProps): string[];
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import { hideClass } from './css/breakpoints.js';
|
|
1
|
+
import { hideClass, visibilityBreakpoints, } from './css/breakpoints.js';
|
|
2
|
+
function assertBreakpoint(prop, breakpoint) {
|
|
3
|
+
if (breakpoint && !visibilityBreakpoints.includes(breakpoint))
|
|
4
|
+
throw new RangeError(`${prop} must be one of ${visibilityBreakpoints.join(', ')}`);
|
|
5
|
+
}
|
|
2
6
|
export function visibilityClassNames({ hideBelow, hideFrom, }) {
|
|
7
|
+
assertBreakpoint('hideBelow', hideBelow);
|
|
8
|
+
assertBreakpoint('hideFrom', hideFrom);
|
|
3
9
|
return [
|
|
4
10
|
...(hideBelow ? [hideClass('below', hideBelow)] : []),
|
|
5
11
|
...(hideFrom ? [hideClass('from', hideFrom)] : []),
|