@scalewing/react 1.66.0 → 1.67.1
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 +12 -0
- package/README.md +1 -0
- package/dist/components/DenominationGrid.d.ts +1 -1
- package/dist/components/DenominationGrid.js +4 -2
- package/dist/components/denomination-grid/TransposedStrip.d.ts +5 -3
- package/dist/components/denomination-grid/TransposedStrip.js +17 -9
- package/dist/components/denomination-grid/types.d.ts +9 -0
- package/dist/css/css-checkbox-tile.js +7 -1
- package/dist/css/css-denomination-pin-end.d.ts +2 -0
- package/dist/css/css-denomination-pin-end.js +36 -0
- package/dist/css/css-denomination-transposed.js +4 -0
- package/dist/css/css-scroll-region.d.ts +6 -0
- package/dist/css/css-scroll-region.js +27 -0
- package/dist/styles.css +38 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @scalewing/react
|
|
2
2
|
|
|
3
|
+
## 1.67.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9f8a835: A tile Checkbox's box now sits above the layer that stretches its press target over the tile, so a press aimed at the box lands on its input. Pointer-driven tests and tools can click a tile's checkbox directly instead of being intercepted by the label.
|
|
8
|
+
|
|
9
|
+
## 1.67.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 17f6237: `DenominationGrid pinEnd`: while transposed, the last column (the last grid row's value line with its total, else its counts and total) stays in view at the inline end, with the end shade before it, while the columns between scroll (Teisoro F-001, request `docs/requests/teisoro-denomination-pin-end.md`). Needs `transposeBelow`; the default is unchanged. New classes `sw-denomination-scroll-pin-end`, `sw-denomination-transposed-end`. No new tokens or dependencies.
|
|
14
|
+
|
|
3
15
|
## 1.66.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1669,6 +1669,7 @@ Values outside the catalog throw a `RangeError`. There is no per-breakpoint span
|
|
|
1669
1669
|
|
|
1670
1670
|
- A row's `negativeAppearance="plain"` (`denominationNegativeAppearances`, default `"danger"`) sets its negative counts in the text colour with their minus. Use it for counts that go out by design, such as bills paid out: going out is not an error, so never red. `"danger"` stays for a shortage.
|
|
1671
1671
|
- `transposeBelow="md"` (or `"lg"`; `denominationTransposeBreakpoints`; the strip layout only) draws the strip transposed below that width, for a phone. Each denomination is a row (its label and caption, pinned while the columns scroll), each grid row a column (its label over its counts, entry steppers or value line), and the totals a last row named by `totalLabel`. Names, entry, cell tones, the zero label and quiet and disabled rows are the strip's; a disabled row says so on its column heads. It reads the width with the breakpoint's media query, so a server render draws the strip, and crossing the breakpoint (turning a phone) remounts the grid, so a count being typed loses focus.
|
|
1672
|
+
- `pinEnd` (opt-in; needs `transposeBelow`, a `TypeError` otherwise) keeps the transposed grid's last column in view at the inline end while the columns between scroll: the last grid row's value line with its total (or, without one, its counts and total), on the glass fill with the end shade before it while there is more to scroll, so a phone always sees each denomination's worth and the total, as a long table keeps its total pinned. It changes nothing while the strip is not transposed. New classes `sw-denomination-scroll-pin-end`, `sw-denomination-transposed-end`.
|
|
1672
1673
|
- `countDigits` (3 to 6, entry rows only) keeps that many digits' room in every entry count before the strip scrolls, such as 4 for counts in the thousands in seven columns. The default room is 3.
|
|
1673
1674
|
- An unknown appearance or breakpoint, `transposeBelow` on tiles, or a `countDigits` out of range or without entry rows throws a `RangeError`.
|
|
1674
1675
|
|
|
@@ -6,4 +6,4 @@ export type { DenominationCellToneAppearance, DenominationGridColumn, Denominati
|
|
|
6
6
|
export { denominationNegativeAppearances, denominationTransposeBreakpoints, } from './denomination-grid/types.js';
|
|
7
7
|
export type { DenominationLabelAppearance } from '../css/css-denomination-label.js';
|
|
8
8
|
export { denominationCellToneAppearances, denominationGridFrames, denominationLabelAppearances, denominationTotalEmphases, };
|
|
9
|
-
export declare function DenominationGrid({ label, columns, rows, layout, subtotal, zeroLabel, totalLabel, rowRole, labelWidth, labelAppearance, frame, totalEmphasis, cellToneAppearance, transposeBelow, countDigits, }: DenominationGridProps): import("react").JSX.Element;
|
|
9
|
+
export declare function DenominationGrid({ label, columns, rows, layout, subtotal, zeroLabel, totalLabel, rowRole, labelWidth, labelAppearance, frame, totalEmphasis, cellToneAppearance, transposeBelow, pinEnd, countDigits, }: DenominationGridProps): import("react").JSX.Element;
|
|
@@ -22,12 +22,14 @@ function assertOneOf(values, value, prop) {
|
|
|
22
22
|
if (!values.includes(value))
|
|
23
23
|
throw new RangeError(`Unknown ${prop}: ${String(value)}`);
|
|
24
24
|
}
|
|
25
|
-
export function DenominationGrid({ label, columns, rows, layout = 'strip', subtotal, zeroLabel = '—', totalLabel, rowRole = 'region', labelWidth, labelAppearance = 'tone', frame = 'none', totalEmphasis = 'default', cellToneAppearance = 'text', transposeBelow, countDigits, }) {
|
|
25
|
+
export function DenominationGrid({ label, columns, rows, layout = 'strip', subtotal, zeroLabel = '—', totalLabel, rowRole = 'region', labelWidth, labelAppearance = 'tone', frame = 'none', totalEmphasis = 'default', cellToneAppearance = 'text', transposeBelow, pinEnd = false, countDigits, }) {
|
|
26
26
|
assertDenominationGrid(label, columns, rows);
|
|
27
27
|
assertDenominationExtras(layout, columns, rows);
|
|
28
28
|
assertDenominationEntries(layout, columns, rows);
|
|
29
29
|
assertDenominationValueRows(layout, columns, rows);
|
|
30
30
|
assertDenominationOptions(layout, rows, transposeBelow, countDigits);
|
|
31
|
+
if (pinEnd && transposeBelow === undefined)
|
|
32
|
+
throw new TypeError('DenominationGrid pinEnd needs transposeBelow');
|
|
31
33
|
if (typeof zeroLabel !== 'string')
|
|
32
34
|
throw new RangeError('zeroLabel must be a string');
|
|
33
35
|
if (totalLabel !== undefined && !totalLabel.trim())
|
|
@@ -52,6 +54,6 @@ export function DenominationGrid({ label, columns, rows, layout = 'strip', subto
|
|
|
52
54
|
if (layout === 'tiles')
|
|
53
55
|
return (_jsx(DenominationTiles, { className: appearanceClass || undefined, columns: columns, label: label, rowRole: rowRole, rows: rows, subtotal: subtotal, zeroLabel: zeroLabel }));
|
|
54
56
|
if (transposeBelow !== undefined && transposed)
|
|
55
|
-
return (_jsx(TransposedStrip, { className: appearanceClass || undefined, columns: columns, label: label, rows: rows, style: countStyle, totalLabel: totalLabel, zeroLabel: zeroLabel }));
|
|
57
|
+
return (_jsx(TransposedStrip, { className: appearanceClass || undefined, columns: columns, label: label, rows: rows, pinEnd: pinEnd, style: countStyle, totalLabel: totalLabel, zeroLabel: zeroLabel }));
|
|
56
58
|
return (_jsx(DenominationStrip, { className: appearanceClass || undefined, countStyle: countStyle, columns: columns, framed: frame === 'table', label: label, labelWidth: labelWidth, rows: rows, totalLabel: totalLabel, zeroLabel: zeroLabel }));
|
|
57
59
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type CSSProperties } from 'react';
|
|
2
2
|
import { type DenominationGridProps } from './types.js';
|
|
3
|
-
type TransposedProps = Required<Pick<DenominationGridProps, 'label' | 'columns' | 'rows' | 'zeroLabel'>> & Pick<DenominationGridProps, 'totalLabel'> & {
|
|
3
|
+
type TransposedProps = Required<Pick<DenominationGridProps, 'label' | 'columns' | 'rows' | 'zeroLabel'>> & Pick<DenominationGridProps, 'totalLabel' | 'pinEnd'> & {
|
|
4
4
|
/** The grid's appearance classes (cell tones), if any. */
|
|
5
5
|
className?: string;
|
|
6
6
|
/** The entry counts' room, as the strip's. */
|
|
@@ -11,7 +11,9 @@ type TransposedProps = Required<Pick<DenominationGridProps, 'label' | 'columns'
|
|
|
11
11
|
* caption), a column per grid row (its counts, read-only or entered, then
|
|
12
12
|
* its value line's values), and the totals in a last row named by
|
|
13
13
|
* `totalLabel`. Names, entry, tones and the zero label are the strip's;
|
|
14
|
-
* the denomination column stays in view while the columns scroll under it
|
|
14
|
+
* the denomination column stays in view while the columns scroll under it,
|
|
15
|
+
* and with `pinEnd` the last column (the last grid row's value line, which
|
|
16
|
+
* holds its total, else its counts and total) stays in view at the end.
|
|
15
17
|
*/
|
|
16
|
-
export declare function TransposedStrip({ className, style, label, columns, rows, zeroLabel, totalLabel, }: TransposedProps): import("react").JSX.Element;
|
|
18
|
+
export declare function TransposedStrip({ className, style, label, columns, rows, zeroLabel, totalLabel, pinEnd, }: TransposedProps): import("react").JSX.Element;
|
|
17
19
|
export {};
|
|
@@ -7,6 +7,8 @@ import { CountCell } from './CountCell.js';
|
|
|
7
7
|
import { EntryCell } from './EntryCell.js';
|
|
8
8
|
import { RowLabelLine } from './RowLabelLine.js';
|
|
9
9
|
import { hasValue, valueCellId } from './StripValueRow.js';
|
|
10
|
+
/** The class of the cells of the column pinned at the inline end. */
|
|
11
|
+
const endClass = 'sw-denomination-transposed-end';
|
|
10
12
|
/** The look a grid row lends each of its cells in a column. */
|
|
11
13
|
function columnClass(row) {
|
|
12
14
|
return (cx(row.emphasis === 'quiet' && 'sw-denomination-transposed-quiet', row.disabled && 'sw-denomination-transposed-disabled') || undefined);
|
|
@@ -17,12 +19,12 @@ function columnClass(row) {
|
|
|
17
19
|
* `aria-disabled`), as the strip's row does, since a column has no element
|
|
18
20
|
* of its own.
|
|
19
21
|
*/
|
|
20
|
-
function RowHeads({ row }) {
|
|
21
|
-
return (_jsxs(_Fragment, { children: [_jsx("th", { "aria-disabled": row.disabled || undefined, className: cx('sw-denomination-head sw-denomination-transposed-head', columnClass(row)), scope: "col", children: _jsx(RowLabelLine, { row: row }) }), row.valueRow ? (_jsx("th", { "aria-disabled": row.disabled || undefined, "aria-label": `${row.label} ${row.valueRow.label}`, className: cx('sw-denomination-head sw-denomination-transposed-head', columnClass(row)), scope: "col", children: row.valueRow.label })) : null] }));
|
|
22
|
+
function RowHeads({ row, pinned, }) {
|
|
23
|
+
return (_jsxs(_Fragment, { children: [_jsx("th", { "aria-disabled": row.disabled || undefined, className: cx('sw-denomination-head sw-denomination-transposed-head', columnClass(row), pinned && !row.valueRow && endClass), scope: "col", children: _jsx(RowLabelLine, { row: row }) }), row.valueRow ? (_jsx("th", { "aria-disabled": row.disabled || undefined, "aria-label": `${row.label} ${row.valueRow.label}`, className: cx('sw-denomination-head sw-denomination-transposed-head', columnClass(row), pinned && endClass), scope: "col", children: row.valueRow.label })) : null] }));
|
|
22
24
|
}
|
|
23
25
|
/** A grid row's total: under its value line when it has one, else under its counts. */
|
|
24
|
-
function RowTotal({ row }) {
|
|
25
|
-
const total = (_jsx("td", { className: cx('sw-denomination-transposed-total', `sw-denomination-row-${row.tone ?? 'neutral'}`, columnClass(row)), children: row.total ?? '' }));
|
|
26
|
+
function RowTotal({ row, pinned, }) {
|
|
27
|
+
const total = (_jsx("td", { className: cx('sw-denomination-transposed-total', `sw-denomination-row-${row.tone ?? 'neutral'}`, columnClass(row), pinned && endClass), children: row.total ?? '' }));
|
|
26
28
|
return row.valueRow ? (_jsxs(_Fragment, { children: [_jsx("td", { className: columnClass(row) }), total] })) : (total);
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
@@ -30,14 +32,20 @@ function RowTotal({ row }) {
|
|
|
30
32
|
* caption), a column per grid row (its counts, read-only or entered, then
|
|
31
33
|
* its value line's values), and the totals in a last row named by
|
|
32
34
|
* `totalLabel`. Names, entry, tones and the zero label are the strip's;
|
|
33
|
-
* the denomination column stays in view while the columns scroll under it
|
|
35
|
+
* the denomination column stays in view while the columns scroll under it,
|
|
36
|
+
* and with `pinEnd` the last column (the last grid row's value line, which
|
|
37
|
+
* holds its total, else its counts and total) stays in view at the end.
|
|
34
38
|
*/
|
|
35
|
-
export function TransposedStrip({ className, style, label, columns, rows, zeroLabel, totalLabel, }) {
|
|
39
|
+
export function TransposedStrip({ className, style, label, columns, rows, zeroLabel, totalLabel, pinEnd = false, }) {
|
|
36
40
|
const idPrefix = useId();
|
|
41
|
+
const last = rows.length - 1;
|
|
42
|
+
const pinned = (rowIndex) => pinEnd && rowIndex === last;
|
|
43
|
+
/** A count cell is the pinned one when its row has no value line after it. */
|
|
44
|
+
const countEnd = (row, rowIndex) => pinned(rowIndex) && !row.valueRow && endClass;
|
|
37
45
|
const hasTotals = rows.some((row) => row.total !== undefined);
|
|
38
|
-
return (_jsx(ScrollRegion, { "aria-label": label, className:
|
|
46
|
+
return (_jsx(ScrollRegion, { "aria-label": label, className: cx('sw-denomination-scroll sw-denomination-scroll-transposed', pinEnd && 'sw-denomination-scroll-pin-end'), children: _jsxs("table", { className: cx('sw-denomination-grid sw-denomination-transposed', rows.some((row) => row.entry) && 'sw-denomination-transposed-entry', className), style: style, children: [_jsx("caption", { className: "sw-sr-only", children: label }), _jsx("thead", { children: _jsxs("tr", { children: [_jsx("td", { className: "sw-denomination-corner" }), rows.map((row, rowIndex) => (_jsx(RowHeads, { pinned: pinned(rowIndex), row: row }, row.id)))] }) }), _jsx("tbody", { children: columns.map((column, index) => (_jsxs("tr", { className: "sw-denomination-row", children: [_jsx("th", { className: "sw-denomination-transposed-label", scope: "row", children: _jsx(ColumnHeadText, { column: column }) }), rows.map((row, rowIndex) => {
|
|
39
47
|
const value = row.valueRow?.cells[index];
|
|
40
48
|
const valueId = valueCellId(idPrefix, rowIndex, index);
|
|
41
|
-
return (_jsxs(Fragment, { children: [row.entry ? (_jsx(EntryCell, { className: columnClass(row), column: column, describedBy: hasValue(value) ? valueId : undefined, entry: row.entry, index: index, row: row })) : (_jsx(CountCell, { className: columnClass(row), index: index, row: row, zeroLabel: zeroLabel })), row.valueRow ? (_jsx("td", { className: cx('sw-denomination-transposed-value', columnClass(row)), id: valueId, children: hasValue(value) ? value : '' })) : null] }, row.id));
|
|
42
|
-
})] }, column.key))) }), hasTotals ? (_jsx("tfoot", { children: _jsxs("tr", { className: "sw-denomination-row", children: [totalLabel === undefined ? (_jsx("td", { className: "sw-denomination-corner" })) : (_jsx("th", { className: "sw-denomination-transposed-label", scope: "row", children: totalLabel })), rows.map((row) => (_jsx(RowTotal, { row: row }, row.id)))] }) })) : null] }) }));
|
|
49
|
+
return (_jsxs(Fragment, { children: [row.entry ? (_jsx(EntryCell, { className: cx(columnClass(row), countEnd(row, rowIndex)), column: column, describedBy: hasValue(value) ? valueId : undefined, entry: row.entry, index: index, row: row })) : (_jsx(CountCell, { className: cx(columnClass(row), countEnd(row, rowIndex)), index: index, row: row, zeroLabel: zeroLabel })), row.valueRow ? (_jsx("td", { className: cx('sw-denomination-transposed-value', columnClass(row), pinned(rowIndex) && endClass), id: valueId, children: hasValue(value) ? value : '' })) : null] }, row.id));
|
|
50
|
+
})] }, column.key))) }), hasTotals ? (_jsx("tfoot", { children: _jsxs("tr", { className: "sw-denomination-row", children: [totalLabel === undefined ? (_jsx("td", { className: "sw-denomination-corner" })) : (_jsx("th", { className: "sw-denomination-transposed-label", scope: "row", children: totalLabel })), rows.map((row, rowIndex) => (_jsx(RowTotal, { pinned: pinned(rowIndex), row: row }, row.id)))] }) })) : null] }) }));
|
|
43
51
|
}
|
|
@@ -188,6 +188,15 @@ export type DenominationGridProps = {
|
|
|
188
188
|
* and zero label are the strip's. The `strip` layout only.
|
|
189
189
|
*/
|
|
190
190
|
transposeBelow?: DenominationTransposeBreakpoint;
|
|
191
|
+
/**
|
|
192
|
+
* While transposed, the last column (the last grid row's value line,
|
|
193
|
+
* which holds its total, else its counts and total) stays in view at the
|
|
194
|
+
* inline end, as the denomination column does at the start, and only the
|
|
195
|
+
* columns between them scroll, so a phone always sees each row's worth
|
|
196
|
+
* and the total. It needs `transposeBelow` (a `TypeError` otherwise) and
|
|
197
|
+
* changes nothing while the strip is not transposed.
|
|
198
|
+
*/
|
|
199
|
+
pinEnd?: boolean;
|
|
191
200
|
/**
|
|
192
201
|
* The digits an entry count holds without clipping, from 3 (the
|
|
193
202
|
* default room) to 6: a column of steppers keeps that many digits'
|
|
@@ -9,7 +9,10 @@ function edge(color) {
|
|
|
9
9
|
* A tile Checkbox: the box, the label and the description inside one
|
|
10
10
|
* bordered tile as wide as its column, at least the 44 px target plus its
|
|
11
11
|
* padding. The label's `::after` stretches over the whole tile, so a press
|
|
12
|
-
* anywhere on it (the description included) toggles the box
|
|
12
|
+
* anywhere on it (the description included) toggles the box; the box itself
|
|
13
|
+
* sits above that layer, so a press aimed at the box lands on its input
|
|
14
|
+
* (what a pointer-driven test or tool hits first). The tile isolates its
|
|
15
|
+
* layers, so the box never paints over a header or popover. A chosen or
|
|
13
16
|
* mixed tile takes the accent edge, an invalid one the danger edge (which
|
|
14
17
|
* wins), twice the hairline through an inset shadow. The description and
|
|
15
18
|
* the error start under the label's words. Forced colours keep the edges
|
|
@@ -21,6 +24,7 @@ export function cssCheckboxTileClasses() {
|
|
|
21
24
|
border-radius: var(--sw-radius-md);
|
|
22
25
|
box-sizing: border-box;
|
|
23
26
|
gap: 0;
|
|
27
|
+
isolation: isolate;
|
|
24
28
|
padding: var(--sw-space-2) var(--sw-space-3);
|
|
25
29
|
position: relative;
|
|
26
30
|
width: 100%;
|
|
@@ -31,6 +35,8 @@ export function cssCheckboxTileClasses() {
|
|
|
31
35
|
width: 100%;
|
|
32
36
|
}
|
|
33
37
|
|
|
38
|
+
.sw-checkbox-tile .sw-checkbox-control { z-index: 1; }
|
|
39
|
+
|
|
34
40
|
.sw-checkbox-tile .sw-checkbox-label::after {
|
|
35
41
|
border-radius: inherit;
|
|
36
42
|
content: '';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { pinnedEndShadeRules } from './css-scroll-region.js';
|
|
2
|
+
import { zIndex } from './stacking.js';
|
|
3
|
+
const region = '.sw-denomination-scroll-pin-end';
|
|
4
|
+
const end = '.sw-denomination-transposed-end';
|
|
5
|
+
/*
|
|
6
|
+
* A transposed strip with `pinEnd`: the last column stays in view at the
|
|
7
|
+
* inline end, on the glass fill as the pinned denomination column is (its
|
|
8
|
+
* value cells and a quiet row's cells keep their subtle fill over the
|
|
9
|
+
* blur), and casts the end shade just before it while there is more to
|
|
10
|
+
* scroll to. A disabled last row cannot fade its pinned cells (the columns
|
|
11
|
+
* scrolling under them would show through), so they stay opaque and their
|
|
12
|
+
* words take the muted colour instead.
|
|
13
|
+
*/
|
|
14
|
+
export function cssDenominationPinEndClasses() {
|
|
15
|
+
return `${region} ${end} {
|
|
16
|
+
backdrop-filter: blur(var(--sw-glass-blur)) saturate(var(--sw-glass-saturate));
|
|
17
|
+
-webkit-backdrop-filter: blur(var(--sw-glass-blur)) saturate(var(--sw-glass-saturate));
|
|
18
|
+
inset-inline-end: 0;
|
|
19
|
+
position: sticky;
|
|
20
|
+
${zIndex('stickyCell')}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
${region} ${end}:not(.sw-denomination-transposed-value, .sw-denomination-transposed-quiet) {
|
|
24
|
+
background-color: var(--sw-glass-fill);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
${region} .sw-denomination-grid.sw-denomination-transposed ${end}.sw-denomination-transposed-disabled {
|
|
28
|
+
color: var(--sw-color-muted);
|
|
29
|
+
opacity: 1;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
${pinnedEndShadeRules(region, [end])}`;
|
|
33
|
+
}
|
|
34
|
+
export function denominationPinEndClassCatalog() {
|
|
35
|
+
return ['sw-denomination-scroll-pin-end', 'sw-denomination-transposed-end'];
|
|
36
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { typographyVariants } from '@scalewing/tokens';
|
|
2
|
+
import { cssDenominationPinEndClasses, denominationPinEndClassCatalog, } from './css-denomination-pin-end.js';
|
|
2
3
|
import { pinnedStartShadeRules } from './css-scroll-region.js';
|
|
3
4
|
import { zIndex } from './stacking.js';
|
|
4
5
|
const body = typographyVariants.body;
|
|
@@ -158,6 +159,8 @@ function countRules() {
|
|
|
158
159
|
export function cssDenominationTransposedClasses() {
|
|
159
160
|
return `${transposedRules()}
|
|
160
161
|
|
|
162
|
+
${cssDenominationPinEndClasses()}
|
|
163
|
+
|
|
161
164
|
${countRules()}`;
|
|
162
165
|
}
|
|
163
166
|
export function denominationTransposedClassCatalog() {
|
|
@@ -174,5 +177,6 @@ export function denominationTransposedClassCatalog() {
|
|
|
174
177
|
'sw-denomination-cell-signed',
|
|
175
178
|
'sw-denomination-cell-plain',
|
|
176
179
|
denominationCountDigitsClass,
|
|
180
|
+
...denominationPinEndClassCatalog(),
|
|
177
181
|
];
|
|
178
182
|
}
|
|
@@ -51,3 +51,9 @@ export declare function scrollRegionClassCatalog(): string[];
|
|
|
51
51
|
* draw no shade here either.
|
|
52
52
|
*/
|
|
53
53
|
export declare function pinnedStartShadeRules(region: string, pinned: readonly string[]): string;
|
|
54
|
+
/**
|
|
55
|
+
* The end-side twin of `pinnedStartShadeRules`: a region whose end column
|
|
56
|
+
* is pinned hides its end shade under that column, so the column casts the
|
|
57
|
+
* shade just before its inline start, drawn by its `::before`.
|
|
58
|
+
*/
|
|
59
|
+
export declare function pinnedEndShadeRules(region: string, pinned: readonly string[]): string;
|
|
@@ -139,3 +139,30 @@ ${after(':dir(rtl)')} {
|
|
|
139
139
|
${after('').replaceAll('\n', '\n ')} { display: none; }
|
|
140
140
|
}`;
|
|
141
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* The end-side twin of `pinnedStartShadeRules`: a region whose end column
|
|
144
|
+
* is pinned hides its end shade under that column, so the column casts the
|
|
145
|
+
* shade just before its inline start, drawn by its `::before`.
|
|
146
|
+
*/
|
|
147
|
+
export function pinnedEndShadeRules(region, pinned) {
|
|
148
|
+
const before = (direction) => pinned
|
|
149
|
+
.map((cell) => `${region}.sw-scroll-more-end${direction} ${cell}::before`)
|
|
150
|
+
.join(',\n');
|
|
151
|
+
return `${before('')} {
|
|
152
|
+
background: linear-gradient(to left, ${scrollShadeColor}, transparent);
|
|
153
|
+
content: '';
|
|
154
|
+
inset-block: 0;
|
|
155
|
+
inset-inline-end: 100%;
|
|
156
|
+
pointer-events: none;
|
|
157
|
+
position: absolute;
|
|
158
|
+
width: var(--sw-space-5);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
${before(':dir(rtl)')} {
|
|
162
|
+
background: linear-gradient(to right, ${scrollShadeColor}, transparent);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
@media (forced-colors: active) {
|
|
166
|
+
${before('').replaceAll('\n', '\n ')} { display: none; }
|
|
167
|
+
}`;
|
|
168
|
+
}
|
package/dist/styles.css
CHANGED
|
@@ -1301,6 +1301,7 @@ body {
|
|
|
1301
1301
|
border-radius: var(--sw-radius-md);
|
|
1302
1302
|
box-sizing: border-box;
|
|
1303
1303
|
gap: 0;
|
|
1304
|
+
isolation: isolate;
|
|
1304
1305
|
padding: var(--sw-space-2) var(--sw-space-3);
|
|
1305
1306
|
position: relative;
|
|
1306
1307
|
width: 100%;
|
|
@@ -1311,6 +1312,8 @@ body {
|
|
|
1311
1312
|
width: 100%;
|
|
1312
1313
|
}
|
|
1313
1314
|
|
|
1315
|
+
.sw-checkbox-tile .sw-checkbox-control { z-index: 1; }
|
|
1316
|
+
|
|
1314
1317
|
.sw-checkbox-tile .sw-checkbox-label::after {
|
|
1315
1318
|
border-radius: inherit;
|
|
1316
1319
|
content: '';
|
|
@@ -10459,6 +10462,41 @@ html:has(.sw-site-header-sticky) .sw-docs-layout {
|
|
|
10459
10462
|
.sw-denomination-transposed-total { color: CanvasText; }
|
|
10460
10463
|
}
|
|
10461
10464
|
|
|
10465
|
+
.sw-denomination-scroll-pin-end .sw-denomination-transposed-end {
|
|
10466
|
+
backdrop-filter: blur(var(--sw-glass-blur)) saturate(var(--sw-glass-saturate));
|
|
10467
|
+
-webkit-backdrop-filter: blur(var(--sw-glass-blur)) saturate(var(--sw-glass-saturate));
|
|
10468
|
+
inset-inline-end: 0;
|
|
10469
|
+
position: sticky;
|
|
10470
|
+
z-index: 1;
|
|
10471
|
+
}
|
|
10472
|
+
|
|
10473
|
+
.sw-denomination-scroll-pin-end .sw-denomination-transposed-end:not(.sw-denomination-transposed-value, .sw-denomination-transposed-quiet) {
|
|
10474
|
+
background-color: var(--sw-glass-fill);
|
|
10475
|
+
}
|
|
10476
|
+
|
|
10477
|
+
.sw-denomination-scroll-pin-end .sw-denomination-grid.sw-denomination-transposed .sw-denomination-transposed-end.sw-denomination-transposed-disabled {
|
|
10478
|
+
color: var(--sw-color-muted);
|
|
10479
|
+
opacity: 1;
|
|
10480
|
+
}
|
|
10481
|
+
|
|
10482
|
+
.sw-denomination-scroll-pin-end.sw-scroll-more-end .sw-denomination-transposed-end::before {
|
|
10483
|
+
background: linear-gradient(to left, color-mix(in srgb, var(--sw-color-text) 28%, transparent), transparent);
|
|
10484
|
+
content: '';
|
|
10485
|
+
inset-block: 0;
|
|
10486
|
+
inset-inline-end: 100%;
|
|
10487
|
+
pointer-events: none;
|
|
10488
|
+
position: absolute;
|
|
10489
|
+
width: var(--sw-space-5);
|
|
10490
|
+
}
|
|
10491
|
+
|
|
10492
|
+
.sw-denomination-scroll-pin-end.sw-scroll-more-end:dir(rtl) .sw-denomination-transposed-end::before {
|
|
10493
|
+
background: linear-gradient(to right, color-mix(in srgb, var(--sw-color-text) 28%, transparent), transparent);
|
|
10494
|
+
}
|
|
10495
|
+
|
|
10496
|
+
@media (forced-colors: active) {
|
|
10497
|
+
.sw-denomination-scroll-pin-end.sw-scroll-more-end .sw-denomination-transposed-end::before { display: none; }
|
|
10498
|
+
}
|
|
10499
|
+
|
|
10462
10500
|
.sw-denomination-cell-signed.sw-denomination-cell-positive {
|
|
10463
10501
|
color: var(--sw-color-success);
|
|
10464
10502
|
}
|