@scalewing/react 1.34.0 → 1.35.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @scalewing/react
2
2
 
3
+ ## 1.35.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 521903d: `Table` `stickyHeader` (`true` or `'page'`) now pins the whole `TableHeader` as one group (Teisoro F-011 task 2200): the `thead` is sticky, not each `thead th`, so a row under the column headings (such as a running total) stays in view right under them with all its cells, `td` as well as `th`, where before only its `th` pinned (at the same edge as the headings) and its `td` cells scrolled away. Every pinned head cell is on the glass (solid under Reduce Transparency, the system canvas in forced colours) and draws its row rule on its own `::before` instead of a collapsed bottom border, which stayed behind as the row moved and left a gap the rows under it showed through. No public API change, no new class, no new tokens, no new dependency.
8
+
9
+ ## 1.35.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 287d933: `Table` `stickyHeader="page"` pins the header row to the page's top while the page scrolls, without a sticky `TableFooter` (`docs/requests/teisoro-table-sticky-page.md`, Teisoro F-011 task 2180). While the table fits its width its region stops being a scroll box, as it already did for a sticky footer; a table wider than its region scrolls sideways in it and pins inside it. `true` (the default) and `false` are unchanged; any other value (including an untyped `null` or `0`, which used to mean not sticky) throws a `RangeError`. New type `TableStickyHeader` and generated class `sw-table-sticky-page`. No new tokens, no new dependency.
14
+
3
15
  ## 1.34.0
4
16
 
5
17
  ### Minor Changes
package/README.md CHANGED
@@ -416,6 +416,14 @@ A header `TableCell` (`as="th"`) with `sort` (`'ascending'`, `'descending'` or `
416
416
 
417
417
  A ledger read across as well as down takes `Table` `columnRules` (a hairline at the inline start of every cell after a row's first, mirrored right to left) and `TableCell` `tone` (`success`, `danger`, `muted` or `accent`: the cell's text in the theme colour, as `Text color` uses it; never the only signal, so keep the sign or the words). `TableRow` `variant="sub"` (default `"default"`) sets a row under the one above, as a batch's items: its row header, a `TableCell as="th" scope="row"`, is indented a `space-6` step with a guide bar at the indent (a sub row without a row header is not indented). `TableRow` `struck` keeps a voided row on the record: the subtle fill and the text muted and struck through, toned cells included; it works with either variant. A line-through is not read aloud, so say why in the row, such as a `Badge` "Voided": a Badge in a line of text is not struck, but one that is itself a flex item (a direct child of `Inline`) is, so put it in the title's line. A row header in the body or footer (`th scope="row"`) reads as body text. An unknown `tone` or `variant` throws a `RangeError`.
418
418
 
419
+ `Table` `stickyHeader` pins the header: the whole `TableHeader` as one group, every row in it (the column headings and any row under them, such as a running total) with all its cells, `th` and `td`, each row under the one above, on the glass with its row and column rules. `true` (default) pins it to the top of the table's own scroll region, `false` lets it scroll away, and `'page'` pins it to the page's top as the page scrolls. With `'page'`, while the table fits its width its region stops being a scroll box (`sw-table-sticky-page`), so the header stays in view under any sticky `AppHeader` (which covers it); a table wider than its region scrolls sideways in it and pins inside it. Use it for a long table whose last row, such as a non-sticky `TableFooter` total, should scroll with the rows. An unknown value throws a `RangeError`.
420
+
421
+ ```tsx
422
+ <Table aria-label="Site census" stickyHeader="page">
423
+ …
424
+ </Table>
425
+ ```
426
+
419
427
  `TableFooter` is the table's `tfoot`, for a total: its cells are set at weight 600 under a 2 px rule across its first row (drawn on each cell's `::before`, so forced colors keep it), and a `TableCell as="th" scope="row"` in it names the total. `sticky` pins the footer to the bottom edge on the header's glass (solid under Reduce Transparency, the system canvas in forced colors), on its own layer over the cells and the pinned header. While the table fits its width, a table with a sticky footer stops being a scroll box, so the footer pins to the page's bottom and the sticky header to its top as the page scrolls; a sticky `AppHeader` covers that header. A table wider than its region scrolls sideways in it and pins to the region instead. A sticky `ActionBar` covers a pinned footer, and so does a `Dialog`'s pinned footer, so do not pair them.
420
428
 
421
429
  `BarChart` `formatValue` writes the axis's values and each value without its own `valueLabel`, such as a currency. `diverging` puts zero in the middle of each track behind a hairline: a positive bar grows toward the inline end and a negative one toward the start, on one scale, and the axis reads minus the maximum, zero and the maximum. Without it every bar grows from the start. An item's `tone` (`BarChartTone`: `'accent'`, `'success'`, `'warning'` or `'danger'`, listed in the exported `barChartTones`) colors its bar by what it means in place of its sign's default (the accent, or danger for a negative value), such as a diverging chart's overage in `'warning'` and shortage in `'danger'`; a toned bar keeps its sign's place, every tone keeps 3:1 against the track, and an unknown tone throws a `RangeError`. Forced colors draw every bar in the system text color, so the value and its side of zero carry the meaning there.
@@ -1,19 +1,23 @@
1
1
  import { type HTMLAttributes } from 'react';
2
- import { type TableLayout, type TableVerticalAlign } from './table/table-layout.js';
2
+ import { type TableLayout, type TableStickyHeader, type TableVerticalAlign } from './table/table-layout.js';
3
3
  export { TableCell, type TableCellProps, type TableColumnWidth, type TableSort, } from './table/TableCell.js';
4
4
  export { TableRow, type TableRowProps, type TableRowVariant, } from './table/TableRow.js';
5
5
  export type { TableCellTone } from '../css/css-table-ledger.js';
6
6
  export { tableCellTones, tableRowVariants } from '../css/css-table-ledger.js';
7
- export type { TableLayout, TableVerticalAlign };
7
+ export type { TableLayout, TableStickyHeader, TableVerticalAlign };
8
8
  export type TableDensity = 'comfortable' | 'compact';
9
9
  export type TableProps = HTMLAttributes<HTMLTableElement> & {
10
10
  density?: TableDensity;
11
11
  /**
12
12
  * Pins the header row to the top of the table's own scroll region
13
- * (default). In a table with a sticky `TableFooter` that fits its width
14
- * the region does not scroll, so the header pins to the page's top.
13
+ * (`true`, default). `'page'` pins it to the page's top while the page
14
+ * scrolls: while the table fits its width its region stops being a
15
+ * scroll box (under any sticky AppHeader, which covers it); a table
16
+ * wider than its region scrolls sideways in it and pins to the region.
17
+ * A table with a sticky `TableFooter` that fits its width pins its
18
+ * header to the page with `true` too. `false` lets it scroll away.
15
19
  */
16
- stickyHeader?: boolean;
20
+ stickyHeader?: TableStickyHeader;
17
21
  /**
18
22
  * `auto` (default) sizes each column by its content. `fixed` sizes the
19
23
  * columns from the header row's `width`s alone (`table-layout: fixed`),
@@ -42,10 +46,14 @@ export declare const Table: import("react").ForwardRefExoticComponent<HTMLAttrib
42
46
  density?: TableDensity;
43
47
  /**
44
48
  * Pins the header row to the top of the table's own scroll region
45
- * (default). In a table with a sticky `TableFooter` that fits its width
46
- * the region does not scroll, so the header pins to the page's top.
49
+ * (`true`, default). `'page'` pins it to the page's top while the page
50
+ * scrolls: while the table fits its width its region stops being a
51
+ * scroll box (under any sticky AppHeader, which covers it); a table
52
+ * wider than its region scrolls sideways in it and pins to the region.
53
+ * A table with a sticky `TableFooter` that fits its width pins its
54
+ * header to the page with `true` too. `false` lets it scroll away.
47
55
  */
48
- stickyHeader?: boolean;
56
+ stickyHeader?: TableStickyHeader;
49
57
  /**
50
58
  * `auto` (default) sizes each column by its content. `fixed` sizes the
51
59
  * columns from the header row's `width`s alone (`table-layout: fixed`),
@@ -2,15 +2,16 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from 'react';
3
3
  import { cx } from '../class-names.js';
4
4
  import { ScrollRegion } from './ScrollRegion.js';
5
- import { assertTableLayout, assertTableVerticalAlign, } from './table/table-layout.js';
5
+ import { assertTableLayout, assertTableStickyHeader, assertTableVerticalAlign, } from './table/table-layout.js';
6
6
  export { TableCell, } from './table/TableCell.js';
7
7
  export { TableRow, } from './table/TableRow.js';
8
8
  export { tableCellTones, tableRowVariants } from '../css/css-table-ledger.js';
9
9
  /** A wide table scrolls inside its own `ScrollRegion`, named after the table. */
10
10
  export const Table = forwardRef(function Table({ children, className, columnRules = false, density = 'comfortable', layout = 'auto', stickyHeader = true, verticalAlign = 'middle', ...rest }, ref) {
11
11
  assertTableLayout(layout);
12
+ assertTableStickyHeader(stickyHeader);
12
13
  assertTableVerticalAlign(verticalAlign);
13
- return (_jsx(ScrollRegion, { "aria-label": rest['aria-label'], "aria-labelledby": rest['aria-labelledby'], className: "sw-table-wrap", markFits: true, children: _jsx("table", { ref: ref, className: cx('sw-table', density === 'compact' && 'sw-table-compact', layout === 'fixed' && 'sw-table-fixed', stickyHeader && 'sw-table-sticky', verticalAlign === 'top' && 'sw-table-top', columnRules && 'sw-table-column-rules', className), ...rest, children: children }) }));
14
+ return (_jsx(ScrollRegion, { "aria-label": rest['aria-label'], "aria-labelledby": rest['aria-labelledby'], className: "sw-table-wrap", markFits: true, children: _jsx("table", { ref: ref, className: cx('sw-table', density === 'compact' && 'sw-table-compact', layout === 'fixed' && 'sw-table-fixed', stickyHeader !== false && 'sw-table-sticky', stickyHeader === 'page' && 'sw-table-sticky-page', verticalAlign === 'top' && 'sw-table-top', columnRules && 'sw-table-column-rules', className), ...rest, children: children }) }));
14
15
  });
15
16
  export const TableHeader = forwardRef(function TableHeader({ className, ...rest }, ref) {
16
17
  return _jsx("thead", { ref: ref, className: className, ...rest });
@@ -5,6 +5,12 @@ export type { TableColumnWidth };
5
5
  export type TableLayout = 'auto' | 'fixed';
6
6
  /** Where a cell's content sits in a row taller than it. */
7
7
  export type TableVerticalAlign = 'middle' | 'top';
8
+ /**
9
+ * Whether the header row pins: `true` to the top of the table's own scroll
10
+ * region, `'page'` to the page's top while the table fits its width.
11
+ */
12
+ export type TableStickyHeader = boolean | 'page';
13
+ export declare function assertTableStickyHeader(sticky: TableStickyHeader): void;
8
14
  export declare function assertTableLayout(layout: TableLayout): void;
9
15
  export declare function assertTableVerticalAlign(align: TableVerticalAlign): void;
10
16
  export declare function assertTableColumnWidth(width: TableColumnWidth | undefined): void;
@@ -1,5 +1,9 @@
1
1
  import { tableColumnWidths, } from '../../css/css-table-layout.js';
2
2
  export { tableColumnWidthClass } from '../../css/css-table-layout.js';
3
+ export function assertTableStickyHeader(sticky) {
4
+ if (typeof sticky !== 'boolean' && sticky !== 'page')
5
+ throw new RangeError(`Unknown Table stickyHeader: ${String(sticky)}`);
6
+ }
3
7
  export function assertTableLayout(layout) {
4
8
  if (layout !== 'auto' && layout !== 'fixed')
5
9
  throw new RangeError(`Unknown Table layout: ${String(layout)}`);
@@ -56,7 +56,7 @@ function reducedTransparencyRules() {
56
56
  .sw-steps-item,
57
57
  .sw-badge-neutral,
58
58
  .sw-segmented,
59
- .sw-table-sticky thead th,
59
+ .sw-table-sticky thead :is(th, td),
60
60
  .sw-table .sw-table-footer-sticky :is(th, td),
61
61
  .sw-denomination-strip .sw-denomination-label,
62
62
  .sw-denomination-strip thead .sw-denomination-corner:first-child,
@@ -9,13 +9,9 @@ import { zIndex } from './stacking.js';
9
9
  * A sticky footer pins its cells to the bottom edge on the header's glass
10
10
  * (solid surface under reduced transparency, the system canvas in forced
11
11
  * colours, as the pinned header cells), on the `stickyFooter` layer: over
12
- * the cells and the pinned header cells, under the ActionBar, which covers
13
- * it, so a page does not pair the two. A table's region is a scroll box,
14
- * which would pin it to the region's own bottom; while the table fits its
15
- * width (`sw-scroll-fits`) a region that holds a sticky footer stops being
16
- * one, so the footer pins to the page's bottom and the sticky header to
17
- * its top, under any sticky top chrome (an AppHeader covers it). A table
18
- * wider than its region scrolls sideways in it and pins to the region.
12
+ * the cells and the pinned head group, under the ActionBar, which covers
13
+ * it, so a page does not pair the two. Where it pins (the page or the
14
+ * table's own region) is `css-table-page-pin.ts`.
19
15
  */
20
16
  export function cssTableFooterClasses() {
21
17
  return `.sw-table tfoot :is(th, td) {
@@ -42,16 +38,12 @@ export function cssTableFooterClasses() {
42
38
  ${zIndex('stickyFooter')}
43
39
  }
44
40
 
45
- .sw-table-wrap.sw-scroll-fits:has(> .sw-table > .sw-table-footer-sticky) {
46
- overflow: visible;
47
- }
48
-
49
41
  @media (forced-colors: active) {
50
42
  .sw-table tfoot > tr:first-child > :is(th, td)::before { border-color: CanvasText; }
51
43
  .sw-table .sw-table-footer-sticky :is(th, td),
52
- .sw-table-sticky thead th { background: Canvas; backdrop-filter: none; -webkit-backdrop-filter: none; }
44
+ .sw-table-sticky thead :is(th, td) { background: Canvas; backdrop-filter: none; -webkit-backdrop-filter: none; }
53
45
  }`;
54
46
  }
55
47
  export function tableFooterClassCatalog() {
56
- return ['sw-table-footer-sticky', 'sw-scroll-fits'];
48
+ return ['sw-table-footer-sticky'];
57
49
  }
@@ -54,9 +54,10 @@ export function cssTableLedgerClasses() {
54
54
  border-inline-start: 1px solid var(--sw-color-border);
55
55
  }
56
56
 
57
- /* A sticky header cell is positioned, so the next cell's fill covers a
58
- collapsed border; its rule is a border on its own ::after instead, so
59
- forced colours keep it and the logical inset mirrors it. */
57
+ /* A pinned head cell (in a sticky header group) is positioned, so the
58
+ next cell's fill covers a collapsed border; its rule is a border on its
59
+ own ::after instead, so forced colours keep it and the logical inset
60
+ mirrors it. */
60
61
  .sw-table-sticky.sw-table-column-rules thead :is(th, td) + :is(th, td)::after {
61
62
  border-inline-start: 1px solid var(--sw-color-border);
62
63
  content: '';
@@ -0,0 +1,2 @@
1
+ export declare function cssTablePagePinClasses(): string;
2
+ export declare function tablePagePinClassCatalog(): string[];
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Where a table's pinned rows pin. A table's region is a scroll box (it
3
+ * scrolls a wide table sideways), and a sticky cell pins to its nearest
4
+ * scroll box: the region, which never scrolls vertically, so on a page
5
+ * that scrolls nothing would stay in view. While the table fits its width
6
+ * (`sw-scroll-fits`, set once the region is measured) a region that holds
7
+ * a sticky footer, or a table whose header pins to the page
8
+ * (`stickyHeader="page"`, `sw-table-sticky-page`), stops being a scroll
9
+ * box, so the footer pins to the page's bottom edge and the sticky header
10
+ * to its top, under any sticky top chrome (an AppHeader covers it). A
11
+ * table wider than its region scrolls sideways in it and pins to the
12
+ * region instead.
13
+ */
14
+ export function cssTablePagePinClasses() {
15
+ return `.sw-table-wrap.sw-scroll-fits:has(> .sw-table > .sw-table-footer-sticky),
16
+ .sw-table-wrap.sw-scroll-fits:has(> .sw-table-sticky-page) {
17
+ overflow: visible;
18
+ }`;
19
+ }
20
+ export function tablePagePinClassCatalog() {
21
+ return ['sw-scroll-fits', 'sw-table-sticky-page'];
22
+ }
@@ -0,0 +1,2 @@
1
+ export declare function cssTableStickyHeaderClasses(): string;
2
+ export declare function tableStickyHeaderClassCatalog(): string[];
@@ -0,0 +1,52 @@
1
+ import { zIndex } from './stacking.js';
2
+ /*
3
+ * A sticky header pins the table's whole head group, not cell by cell: the
4
+ * `thead` itself is sticky at the top edge, so every row in it (the column
5
+ * headings and any row under them, such as a running total) and every cell
6
+ * in those rows, `th` and `td` alike, stays in view together, each row at
7
+ * its own offset under the one above. A cell-by-cell pin would leave a
8
+ * second row's `td` cells to scroll away and stack every row's `th` at the
9
+ * same edge. Where the group pins (the page or the table's own region) is
10
+ * `css-table-page-pin.ts`.
11
+ *
12
+ * Each pinned cell is on the glass (solid surface under Reduce
13
+ * Transparency, the system canvas in forced colours), so the rows that
14
+ * scroll under the group never show through, and positioned, so its rules
15
+ * can draw on it. A collapsed border stays where the cell was as the cell
16
+ * moves and leaves a gap the rows under it show through, so a pinned
17
+ * cell has none at its bottom and draws its row rule as a border on its
18
+ * own ::before (forced colours keep it), as its column rule is on its
19
+ * ::after (`css-table-ledger.ts`). The group is on the `stickyCell`
20
+ * layer, over the body cells and under a pinned footer.
21
+ */
22
+ export function cssTableStickyHeaderClasses() {
23
+ return `.sw-table-sticky thead {
24
+ position: sticky;
25
+ top: 0;
26
+ ${zIndex('stickyCell')}
27
+ }
28
+
29
+ .sw-table-sticky thead :is(th, td) {
30
+ background: var(--sw-glass-fill);
31
+ backdrop-filter: blur(var(--sw-glass-blur)) saturate(var(--sw-glass-saturate));
32
+ -webkit-backdrop-filter: blur(var(--sw-glass-blur)) saturate(var(--sw-glass-saturate));
33
+ border-bottom: 0;
34
+ position: relative;
35
+ }
36
+
37
+ .sw-table-sticky thead :is(th, td)::before {
38
+ border-bottom: 1px solid var(--sw-color-border);
39
+ content: '';
40
+ inset-block-end: 0;
41
+ inset-inline: 0;
42
+ pointer-events: none;
43
+ position: absolute;
44
+ }
45
+
46
+ @media (forced-colors: active) {
47
+ .sw-table-sticky thead :is(th, td)::before { border-color: CanvasText; }
48
+ }`;
49
+ }
50
+ export function tableStickyHeaderClassCatalog() {
51
+ return ['sw-table-sticky'];
52
+ }
@@ -3,9 +3,10 @@ import { scrollRegionRules } from './css-scroll-region.js';
3
3
  import { cssTableLayoutClasses, tableLayoutClassCatalog, } from './css-table-layout.js';
4
4
  import { cssTableLedgerClasses, tableLedgerClassCatalog, } from './css-table-ledger.js';
5
5
  import { cssTableFooterClasses, tableFooterClassCatalog, } from './css-table-footer.js';
6
+ import { cssTablePagePinClasses, tablePagePinClassCatalog, } from './css-table-page-pin.js';
6
7
  import { cssTablePressClasses, tablePressClassCatalog, } from './css-table-press.js';
8
+ import { cssTableStickyHeaderClasses, tableStickyHeaderClassCatalog, } from './css-table-sticky-header.js';
7
9
  import { cssTableSortClasses, tableSortClassCatalog, } from './css-table-sort.js';
8
- import { zIndex } from './stacking.js';
9
10
  const caption = typographyVariants.caption;
10
11
  /*
11
12
  * A selected row is marked by an accent bar at its inline start and nothing
@@ -74,14 +75,7 @@ export function cssTableClasses() {
74
75
  overflow: hidden;
75
76
  }
76
77
 
77
- .sw-table-sticky thead th {
78
- background: var(--sw-glass-fill);
79
- backdrop-filter: blur(var(--sw-glass-blur)) saturate(var(--sw-glass-saturate));
80
- -webkit-backdrop-filter: blur(var(--sw-glass-blur)) saturate(var(--sw-glass-saturate));
81
- position: sticky;
82
- top: 0;
83
- ${zIndex('stickyCell')}
84
- }
78
+ ${cssTableStickyHeaderClasses()}
85
79
 
86
80
  .sw-table-compact th,
87
81
  .sw-table-compact td {
@@ -96,6 +90,8 @@ ${cssTableLedgerClasses()}
96
90
 
97
91
  ${cssTableFooterClasses()}
98
92
 
93
+ ${cssTablePagePinClasses()}
94
+
99
95
  ${cssTablePressClasses()}
100
96
 
101
97
  ${selectedRowRules()}`;
@@ -107,13 +103,14 @@ export function tableClassCatalog() {
107
103
  'sw-table-end',
108
104
  'sw-table-numeric',
109
105
  'sw-table-clip',
110
- 'sw-table-sticky',
106
+ ...tableStickyHeaderClassCatalog(),
111
107
  'sw-table-compact',
112
108
  'sw-table-row-selected',
113
109
  ...tableLayoutClassCatalog(),
114
110
  ...tableSortClassCatalog(),
115
111
  ...tableLedgerClassCatalog(),
116
112
  ...tableFooterClassCatalog(),
113
+ ...tablePagePinClassCatalog(),
117
114
  ...tablePressClassCatalog(),
118
115
  ];
119
116
  }
@@ -2,8 +2,8 @@
2
2
  * The one stacking order of the generated stylesheet. Every generated
3
3
  * `z-index` reads a layer from here, lowest first:
4
4
  *
5
- * 1. `stickyCell`: a sticky table header cell or row label over the cells
6
- * that scroll under it.
5
+ * 1. `stickyCell`: a sticky table head group (every row in a sticky
6
+ * `thead`) or row label over the cells that scroll under it.
7
7
  * 2. `stickyFooter`: a sticky table footer (a pinned total row) over the
8
8
  * cells and pinned header cells that scroll under it, and under the
9
9
  * ActionBar, which stays the page's last word at the bottom edge.
package/dist/index.d.ts CHANGED
@@ -42,7 +42,7 @@ export { Select } from './components/Select.js';
42
42
  export type { SelectAction, SelectOption, SelectProps, SelectWidth, } from './components/Select.js';
43
43
  export { MultiSelect, type MultiSelectAlign, type MultiSelectOption, type MultiSelectProps, } from './components/MultiSelect.js';
44
44
  export { Stack, type Align, type Justify, type StackProps, } from './components/Stack.js';
45
- export { Table, TableBody, TableCell, TableFooter, TableHeader, TableRow, tableCellTones, tableRowVariants, type TableBodyProps, type TableCellProps, type TableCellTone, type TableColumnWidth, type TableDensity, type TableFooterProps, type TableHeaderProps, type TableLayout, type TableProps, type TableRowProps, type TableRowVariant, type TableSort, type TableVerticalAlign, } from './components/Table.js';
45
+ export { Table, TableBody, TableCell, TableFooter, TableHeader, TableRow, tableCellTones, tableRowVariants, type TableBodyProps, type TableCellProps, type TableCellTone, type TableColumnWidth, type TableDensity, type TableFooterProps, type TableHeaderProps, type TableLayout, type TableProps, type TableRowProps, type TableRowVariant, type TableSort, type TableStickyHeader, type TableVerticalAlign, } from './components/Table.js';
46
46
  export { Text, type TextAlign, type TextElement, type TextProps, } from './components/Text.js';
47
47
  export { ThemeProvider, useTheme, type ThemeProviderProps, } from './theme/ThemeProvider.js';
48
48
  export { utilityClassCatalog } from './css/stylesheet.js';
package/dist/styles.css CHANGED
@@ -1600,15 +1600,33 @@ body {
1600
1600
  overflow: hidden;
1601
1601
  }
1602
1602
 
1603
- .sw-table-sticky thead th {
1604
- background: var(--sw-glass-fill);
1605
- backdrop-filter: blur(var(--sw-glass-blur)) saturate(var(--sw-glass-saturate));
1606
- -webkit-backdrop-filter: blur(var(--sw-glass-blur)) saturate(var(--sw-glass-saturate));
1603
+ .sw-table-sticky thead {
1607
1604
  position: sticky;
1608
1605
  top: 0;
1609
1606
  z-index: 1;
1610
1607
  }
1611
1608
 
1609
+ .sw-table-sticky thead :is(th, td) {
1610
+ background: var(--sw-glass-fill);
1611
+ backdrop-filter: blur(var(--sw-glass-blur)) saturate(var(--sw-glass-saturate));
1612
+ -webkit-backdrop-filter: blur(var(--sw-glass-blur)) saturate(var(--sw-glass-saturate));
1613
+ border-bottom: 0;
1614
+ position: relative;
1615
+ }
1616
+
1617
+ .sw-table-sticky thead :is(th, td)::before {
1618
+ border-bottom: 1px solid var(--sw-color-border);
1619
+ content: '';
1620
+ inset-block-end: 0;
1621
+ inset-inline: 0;
1622
+ pointer-events: none;
1623
+ position: absolute;
1624
+ }
1625
+
1626
+ @media (forced-colors: active) {
1627
+ .sw-table-sticky thead :is(th, td)::before { border-color: CanvasText; }
1628
+ }
1629
+
1612
1630
  .sw-table-compact th,
1613
1631
  .sw-table-compact td {
1614
1632
  padding: var(--sw-space-1) var(--sw-space-2);
@@ -1749,9 +1767,10 @@ body {
1749
1767
  border-inline-start: 1px solid var(--sw-color-border);
1750
1768
  }
1751
1769
 
1752
- /* A sticky header cell is positioned, so the next cell's fill covers a
1753
- collapsed border; its rule is a border on its own ::after instead, so
1754
- forced colours keep it and the logical inset mirrors it. */
1770
+ /* A pinned head cell (in a sticky header group) is positioned, so the
1771
+ next cell's fill covers a collapsed border; its rule is a border on its
1772
+ own ::after instead, so forced colours keep it and the logical inset
1773
+ mirrors it. */
1755
1774
  .sw-table-sticky.sw-table-column-rules thead :is(th, td) + :is(th, td)::after {
1756
1775
  border-inline-start: 1px solid var(--sw-color-border);
1757
1776
  content: '';
@@ -1831,14 +1850,15 @@ body {
1831
1850
  z-index: 2;
1832
1851
  }
1833
1852
 
1834
- .sw-table-wrap.sw-scroll-fits:has(> .sw-table > .sw-table-footer-sticky) {
1835
- overflow: visible;
1836
- }
1837
-
1838
1853
  @media (forced-colors: active) {
1839
1854
  .sw-table tfoot > tr:first-child > :is(th, td)::before { border-color: CanvasText; }
1840
1855
  .sw-table .sw-table-footer-sticky :is(th, td),
1841
- .sw-table-sticky thead th { background: Canvas; backdrop-filter: none; -webkit-backdrop-filter: none; }
1856
+ .sw-table-sticky thead :is(th, td) { background: Canvas; backdrop-filter: none; -webkit-backdrop-filter: none; }
1857
+ }
1858
+
1859
+ .sw-table-wrap.sw-scroll-fits:has(> .sw-table > .sw-table-footer-sticky),
1860
+ .sw-table-wrap.sw-scroll-fits:has(> .sw-table-sticky-page) {
1861
+ overflow: visible;
1842
1862
  }
1843
1863
 
1844
1864
  .sw-table-row-press {
@@ -5670,7 +5690,7 @@ body {
5670
5690
  .sw-steps-item,
5671
5691
  .sw-badge-neutral,
5672
5692
  .sw-segmented,
5673
- .sw-table-sticky thead th,
5693
+ .sw-table-sticky thead :is(th, td),
5674
5694
  .sw-table .sw-table-footer-sticky :is(th, td),
5675
5695
  .sw-denomination-strip .sw-denomination-label,
5676
5696
  .sw-denomination-strip thead .sw-denomination-corner:first-child,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalewing/react",
3
- "version": "1.34.0",
3
+ "version": "1.35.1",
4
4
  "description": "Scalewing DOM components and package-owned CSS utilities.",
5
5
  "type": "module",
6
6
  "license": "MIT",