@apliteni/apliteni-ui 0.136.0 → 0.137.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/package.json +1 -1
- package/react/README.md +13 -0
- package/react/dist/index.d.ts +15 -1
- package/react/dist/index.js +117 -93
- package/src/styles/table.css +28 -24
- package/src/tokens/tokens.css +8 -7
package/package.json
CHANGED
package/react/README.md
CHANGED
|
@@ -307,6 +307,19 @@ once installed. In the repo there is no copy to resolve to, so `kit-alias.ts` po
|
|
|
307
307
|
vitest and Storybook straight at `../src/` — which is why the class-name parity tests
|
|
308
308
|
now compare against the working tree rather than the last published release.
|
|
309
309
|
|
|
310
|
+
### Table appearance
|
|
311
|
+
|
|
312
|
+
`DataTable` takes the vanilla table hooks as props. `zebra`, `hover` (on unless `false`), `stack`,
|
|
313
|
+
`density`, `stickyHeader` and `pinnedIdentity` set the table modifiers. `rowState={(row) => 'target' | 'dead' | undefined}`
|
|
314
|
+
marks a row, `footer` takes totals rows, and `caption` names the table for assistive technology. A column takes
|
|
315
|
+
`rowHeader` and `cell` (`'title' | 'code' | 'long' | 'strong' | 'act'`). A `dead` row is muted, so put the word
|
|
316
|
+
that names its state in one of its cells.
|
|
317
|
+
|
|
318
|
+
```tsx
|
|
319
|
+
<DataTable columns={columns} rows={rows} selectable={false} pager={false}
|
|
320
|
+
density="dense" zebra stack rowState={(r) => (r.id === landedOn ? 'target' : undefined)} />
|
|
321
|
+
```
|
|
322
|
+
|
|
310
323
|
### Tables with another presentation of the same rows
|
|
311
324
|
|
|
312
325
|
Pass `selectable={false}` to omit selection controls and their callbacks. Existing callers
|
package/react/dist/index.d.ts
CHANGED
|
@@ -281,6 +281,10 @@ type Column<T> = {
|
|
|
281
281
|
* why: docs/components.md#dense-financial-tables
|
|
282
282
|
*/
|
|
283
283
|
linked?: boolean;
|
|
284
|
+
/** Renders this column's body cells as row headers (`th scope="row"`), as the kit's compact table does. */
|
|
285
|
+
rowHeader?: boolean;
|
|
286
|
+
/** `title` gives the column the remaining width, `code` sets a handle or id in the table's small text, `long` is running text that gets its own line in a stacked row, `strong` bolds a figure, `act` right-aligns a row action. */
|
|
287
|
+
cell?: 'title' | 'code' | 'long' | 'strong' | 'act';
|
|
284
288
|
};
|
|
285
289
|
type TableSort<T> = {
|
|
286
290
|
key: (keyof T & string) | undefined;
|
|
@@ -316,6 +320,16 @@ type PagerProps = {
|
|
|
316
320
|
type DataTableProps<T> = {
|
|
317
321
|
columns: Column<T>[];
|
|
318
322
|
rows: T[];
|
|
323
|
+
/** The kit's `--zebra`, `--hover` (on unless `false`) and `--stack` hooks. A stacked table lays each row out as a block below the phone step, so no column scrolls out of reach. */
|
|
324
|
+
zebra?: boolean;
|
|
325
|
+
hover?: boolean;
|
|
326
|
+
stack?: boolean;
|
|
327
|
+
/** Marks a row the reader landed on (`target`) or a revoked one (`dead`). A dead row is muted, so put the word that names its state in one of its cells. */
|
|
328
|
+
rowState?: (row: T) => 'target' | 'dead' | undefined;
|
|
329
|
+
/** Table footer rows, such as totals: `<tr>` elements with a `th scope="row"` label. */
|
|
330
|
+
footer?: ReactNode;
|
|
331
|
+
/** A caption read by assistive technology only. */
|
|
332
|
+
caption?: string;
|
|
319
333
|
dense?: boolean;
|
|
320
334
|
density?: 'default' | 'dense' | 'compact';
|
|
321
335
|
stickyHeader?: boolean;
|
|
@@ -345,7 +359,7 @@ type DataTableProps<T> = {
|
|
|
345
359
|
declare function sortTableRows<T>(rows: T[], sort: TableSort<T>): T[];
|
|
346
360
|
declare function DataTable<T extends {
|
|
347
361
|
name: string;
|
|
348
|
-
}>({ columns, rows, dense, density, stickyHeader, pinnedIdentity, scrollLabel, empty, pageSize, pageSizes, onPageSizeChange, pager, pagerLabel, loading, selectable, selected, onToggle, onTogglePage, sort: controlledSort, onSortChange, page: controlledPage, onPageChange, total, hasMore, }: DataTableProps<T>): react.JSX.Element;
|
|
362
|
+
}>({ columns, rows, zebra, hover, stack, rowState, footer, caption, dense, density, stickyHeader, pinnedIdentity, scrollLabel, empty, pageSize, pageSizes, onPageSizeChange, pager, pagerLabel, loading, selectable, selected, onToggle, onTogglePage, sort: controlledSort, onSortChange, page: controlledPage, onPageChange, total, hasMore, }: DataTableProps<T>): react.JSX.Element;
|
|
349
363
|
|
|
350
364
|
type PaginationProps = {
|
|
351
365
|
page?: number;
|
package/react/dist/index.js
CHANGED
|
@@ -1351,7 +1351,7 @@ function rowId(uid, groups, item) {
|
|
|
1351
1351
|
}
|
|
1352
1352
|
|
|
1353
1353
|
// src/DataTable.tsx
|
|
1354
|
-
import { useCallback as useCallback3, useEffect as useEffect6, useMemo as useMemo2, useRef as useRef10, useState as useState7 } from "react";
|
|
1354
|
+
import { Fragment as Fragment6, useCallback as useCallback3, useEffect as useEffect6, useMemo as useMemo2, useRef as useRef10, useState as useState7 } from "react";
|
|
1355
1355
|
import { DEFAULT_PAGE_SIZE as DEFAULT_PAGE_SIZE2 } from "@apliteni/apliteni-ui";
|
|
1356
1356
|
|
|
1357
1357
|
// src/Pagination.tsx
|
|
@@ -1579,7 +1579,8 @@ function Pagination({
|
|
|
1579
1579
|
}
|
|
1580
1580
|
|
|
1581
1581
|
// src/DataTable.tsx
|
|
1582
|
-
import { Fragment as
|
|
1582
|
+
import { Fragment as Fragment7, jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1583
|
+
var CELL_CLASS = { title: "ui-table__title", code: "ui-table__code", long: "ui-table__long", strong: "ui-table__num--strong", act: "ui-table__act" };
|
|
1583
1584
|
var NO_SORT = { key: void 0, dir: -1 };
|
|
1584
1585
|
function sortTableRows(rows, sort) {
|
|
1585
1586
|
if (sort.key === void 0) return [...rows];
|
|
@@ -1589,6 +1590,12 @@ function sortTableRows(rows, sort) {
|
|
|
1589
1590
|
function DataTable({
|
|
1590
1591
|
columns,
|
|
1591
1592
|
rows,
|
|
1593
|
+
zebra = false,
|
|
1594
|
+
hover = true,
|
|
1595
|
+
stack: stack2 = false,
|
|
1596
|
+
rowState,
|
|
1597
|
+
footer,
|
|
1598
|
+
caption,
|
|
1592
1599
|
dense = false,
|
|
1593
1600
|
density,
|
|
1594
1601
|
stickyHeader = false,
|
|
@@ -1686,70 +1693,72 @@ function DataTable({
|
|
|
1686
1693
|
strokeLinejoin: "round",
|
|
1687
1694
|
"aria-hidden": "true",
|
|
1688
1695
|
focusable: "false",
|
|
1689
|
-
children: sort.key === k ? /* @__PURE__ */ jsx19("path", { d: "m8 10 4 4 4-4" }) : /* @__PURE__ */ jsxs15(
|
|
1696
|
+
children: sort.key === k ? /* @__PURE__ */ jsx19("path", { d: "m8 10 4 4 4-4" }) : /* @__PURE__ */ jsxs15(Fragment7, { children: [
|
|
1690
1697
|
/* @__PURE__ */ jsx19("path", { d: "m8 9 4-4 4 4" }),
|
|
1691
1698
|
/* @__PURE__ */ jsx19("path", { d: "m8 15 4 4 4-4" })
|
|
1692
1699
|
] })
|
|
1693
1700
|
}
|
|
1694
1701
|
);
|
|
1702
|
+
const Wrap = scrollable ? "div" : Fragment6;
|
|
1695
1703
|
const pageAllOn = selectable && slice.length > 0 && slice.every((r) => selected.has(r.name));
|
|
1696
1704
|
const pageSomeOn = selectable && !pageAllOn && slice.some((r) => selected.has(r.name));
|
|
1697
|
-
return /* @__PURE__ */ jsxs15(
|
|
1698
|
-
/* @__PURE__ */ jsx19(
|
|
1699
|
-
"
|
|
1705
|
+
return /* @__PURE__ */ jsxs15(Fragment7, { children: [
|
|
1706
|
+
/* @__PURE__ */ jsx19(Wrap, { ...scrollable ? { className: "ui-table-scroll", role: "region", "aria-label": scrollLabel, tabIndex: 0 } : {}, children: /* @__PURE__ */ jsxs15(
|
|
1707
|
+
"table",
|
|
1700
1708
|
{
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
"aria-
|
|
1704
|
-
|
|
1705
|
-
children:
|
|
1706
|
-
"
|
|
1707
|
-
{
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1709
|
+
ref: table,
|
|
1710
|
+
className: ["ui-table", hover && "ui-table--hover", zebra && "ui-table--zebra", stack2 && "ui-table--stack", (density === "dense" || !density && dense) && "ui-table--dense", density === "compact" && "ui-table--compact", stickyHeader && "ui-table--sticky", pinnedIdentity && "ui-table--pinned"].filter(Boolean).join(" "),
|
|
1711
|
+
"aria-busy": loading || void 0,
|
|
1712
|
+
role: stack2 ? "table" : void 0,
|
|
1713
|
+
children: [
|
|
1714
|
+
caption ? /* @__PURE__ */ jsx19("caption", { className: "ui-sr", children: caption }) : null,
|
|
1715
|
+
/* @__PURE__ */ jsx19("thead", { role: stack2 ? "rowgroup" : void 0, children: /* @__PURE__ */ jsxs15("tr", { role: stack2 ? "row" : void 0, children: [
|
|
1716
|
+
selectable ? /* @__PURE__ */ jsx19("th", { scope: "col", role: stack2 ? "columnheader" : void 0, className: "ui-table__selection", children: /* @__PURE__ */ jsx19(
|
|
1717
|
+
"input",
|
|
1718
|
+
{
|
|
1719
|
+
type: "checkbox",
|
|
1720
|
+
checked: pageAllOn,
|
|
1721
|
+
"aria-label": "Select all rows on this page",
|
|
1722
|
+
ref: (input) => {
|
|
1723
|
+
if (input) input.indeterminate = pageSomeOn;
|
|
1724
|
+
},
|
|
1725
|
+
onChange: () => onTogglePage(slice.map((r) => r.name))
|
|
1726
|
+
}
|
|
1727
|
+
) }) : null,
|
|
1728
|
+
columns.map((c, columnIndex) => (
|
|
1729
|
+
// The sort control is a real <button> inside the header cell. It used to be
|
|
1730
|
+
// role="button" ON the <th>, which threw away the columnheader role and put
|
|
1731
|
+
// aria-sort on a role that forbids it.
|
|
1732
|
+
/* @__PURE__ */ jsx19(
|
|
1733
|
+
"th",
|
|
1734
|
+
{
|
|
1735
|
+
scope: "col",
|
|
1736
|
+
role: stack2 ? "columnheader" : void 0,
|
|
1737
|
+
className: [pinnedIdentity && columnIndex === 0 && "ui-table__identity", c.num && "ui-table__num", c.sortable && "rx-sortable"].filter(Boolean).join(" "),
|
|
1738
|
+
"aria-sort": sort.key === c.key ? sort.dir === 1 ? "ascending" : "descending" : c.sortable && sortIsKnown ? "none" : void 0,
|
|
1739
|
+
children: c.sortable ? (
|
|
1740
|
+
// The label is its own box so it can truncate: in a pinned
|
|
1741
|
+
// identity column on a phone the header is capped, and a bare
|
|
1742
|
+
// text node would push the caret out of the cell instead.
|
|
1743
|
+
/* @__PURE__ */ jsxs15("button", { type: "button", className: "rx-sort", onClick: () => onSort(c.key), children: [
|
|
1744
|
+
/* @__PURE__ */ jsx19("span", { className: "rx-sort__label", children: c.label }),
|
|
1745
|
+
caret(c.key)
|
|
1746
|
+
] })
|
|
1747
|
+
) : c.label
|
|
1748
|
+
},
|
|
1749
|
+
c.key
|
|
1750
|
+
)
|
|
1751
|
+
))
|
|
1752
|
+
] }) }),
|
|
1753
|
+
/* @__PURE__ */ jsxs15("tbody", { role: stack2 ? "rowgroup" : void 0, children: [
|
|
1754
|
+
!slice.length && /* @__PURE__ */ jsx19("tr", { role: stack2 ? "row" : void 0, children: /* @__PURE__ */ jsx19("td", { role: stack2 ? "cell" : void 0, colSpan: columns.length + (selectable ? 1 : 0), children: loading ? "Loading rows\u2026" : empty }) }),
|
|
1755
|
+
slice.map((r) => /* @__PURE__ */ jsxs15(
|
|
1756
|
+
"tr",
|
|
1757
|
+
{
|
|
1758
|
+
role: stack2 ? "row" : void 0,
|
|
1759
|
+
className: rowState?.(r) ? `is-${rowState(r)}` : void 0,
|
|
1760
|
+
children: [
|
|
1761
|
+
selectable ? /* @__PURE__ */ jsx19("td", { role: stack2 ? "cell" : void 0, className: "ui-table__selection", children: /* @__PURE__ */ jsx19(
|
|
1753
1762
|
"input",
|
|
1754
1763
|
{
|
|
1755
1764
|
type: "checkbox",
|
|
@@ -1758,14 +1767,29 @@ function DataTable({
|
|
|
1758
1767
|
onChange: () => onToggle(r.name)
|
|
1759
1768
|
}
|
|
1760
1769
|
) }) : null,
|
|
1761
|
-
columns.map((c, columnIndex) =>
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1770
|
+
columns.map((c, columnIndex) => {
|
|
1771
|
+
const Cell = c.rowHeader ? "th" : "td";
|
|
1772
|
+
return /* @__PURE__ */ jsx19(
|
|
1773
|
+
Cell,
|
|
1774
|
+
{
|
|
1775
|
+
scope: c.rowHeader ? "row" : void 0,
|
|
1776
|
+
role: stack2 ? c.rowHeader ? "rowheader" : "cell" : void 0,
|
|
1777
|
+
"data-label": stack2 && c.num && typeof c.label === "string" ? c.label : void 0,
|
|
1778
|
+
className: [c.num && "ui-table__num", c.cell && CELL_CLASS[c.cell], pinnedIdentity && columnIndex === 0 && "ui-table__identity", c.linked && "ui-table__linked"].filter(Boolean).join(" ") || void 0,
|
|
1779
|
+
children: c.render ? c.render(r) : String(r[c.key])
|
|
1780
|
+
},
|
|
1781
|
+
c.key
|
|
1782
|
+
);
|
|
1783
|
+
})
|
|
1784
|
+
]
|
|
1785
|
+
},
|
|
1786
|
+
r.name
|
|
1787
|
+
))
|
|
1788
|
+
] }),
|
|
1789
|
+
footer ? /* @__PURE__ */ jsx19("tfoot", { role: stack2 ? "rowgroup" : void 0, children: footer }) : null
|
|
1790
|
+
]
|
|
1767
1791
|
}
|
|
1768
|
-
),
|
|
1792
|
+
) }),
|
|
1769
1793
|
pager ? (
|
|
1770
1794
|
// The strip that pages a table may not be wider than the rows it pages (#504).
|
|
1771
1795
|
// The two are siblings, and no selector sizes one to the other, so the width is
|
|
@@ -2347,7 +2371,7 @@ function DatePicker({
|
|
|
2347
2371
|
|
|
2348
2372
|
// src/Dropdown.tsx
|
|
2349
2373
|
import {
|
|
2350
|
-
Fragment as
|
|
2374
|
+
Fragment as Fragment8,
|
|
2351
2375
|
useCallback as useCallback5,
|
|
2352
2376
|
useContext as useContext2,
|
|
2353
2377
|
useEffect as useEffect8,
|
|
@@ -2375,7 +2399,7 @@ import { createContext as createContext2 } from "react";
|
|
|
2375
2399
|
var FieldContext = createContext2(null);
|
|
2376
2400
|
|
|
2377
2401
|
// src/Dropdown.tsx
|
|
2378
|
-
import { Fragment as
|
|
2402
|
+
import { Fragment as Fragment9, jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2379
2403
|
var EXIT_SLACK_MS2 = 50;
|
|
2380
2404
|
var SETTLE_MS = 450;
|
|
2381
2405
|
var inPanel = (node) => {
|
|
@@ -2838,7 +2862,7 @@ function Dropdown({
|
|
|
2838
2862
|
...asLink ? { href: entry.href, ...entry.target ? { target: entry.target } : null } : null,
|
|
2839
2863
|
...sx ? { id: rowIds.get(entry), hidden: hiddenBy(entry) || void 0 } : null,
|
|
2840
2864
|
onClick: (e) => choose(entry, e),
|
|
2841
|
-
children: /* @__PURE__ */ jsxs18(
|
|
2865
|
+
children: /* @__PURE__ */ jsxs18(Fragment9, { children: [
|
|
2842
2866
|
entry.avatar ? /* @__PURE__ */ jsx22(Avatar, { personKey: entry.avatar.key, name: entry.avatar.name, src: entry.avatar.src, empty: entry.avatar.empty }) : entry.icon && /* @__PURE__ */ jsx22(Glyph2, { name: entry.icon, className: "ui-dropdown__ic" }),
|
|
2843
2867
|
/* @__PURE__ */ jsxs18("span", { className: "ui-dropdown__main", children: [
|
|
2844
2868
|
/* @__PURE__ */ jsx22("span", { className: "ui-dropdown__label", children: entry.label }),
|
|
@@ -2848,7 +2872,7 @@ function Dropdown({
|
|
|
2848
2872
|
asOption && /* @__PURE__ */ jsx22(Glyph2, { name: "check", className: "ui-dropdown__tick", hidden: true })
|
|
2849
2873
|
] })
|
|
2850
2874
|
};
|
|
2851
|
-
if (row) return /* @__PURE__ */ jsx22(
|
|
2875
|
+
if (row) return /* @__PURE__ */ jsx22(Fragment8, { children: row(entry, props) }, key);
|
|
2852
2876
|
const Tag = asLink ? "a" : "div";
|
|
2853
2877
|
return /* @__PURE__ */ jsx22(Tag, { ...props }, key);
|
|
2854
2878
|
}
|
|
@@ -2870,7 +2894,7 @@ function Dropdown({
|
|
|
2870
2894
|
);
|
|
2871
2895
|
}) : (items || []).map((entry, i) => renderRow(entry, `i${i}`));
|
|
2872
2896
|
const cap = scroll && scroll !== true ? { "--ui-dropdown-cap": typeof scroll === "number" ? `${scroll}px` : scroll } : void 0;
|
|
2873
|
-
const none = sx && filtering && !visible.length ? /* @__PURE__ */ jsxs18(
|
|
2897
|
+
const none = sx && filtering && !visible.length ? /* @__PURE__ */ jsxs18(Fragment9, { children: [
|
|
2874
2898
|
/* @__PURE__ */ jsx22("span", { className: "ui-dropdown__none-title", children: sx.empty.replace("{q}", () => query.trim()) }),
|
|
2875
2899
|
/* @__PURE__ */ jsx22("span", { className: "ui-dropdown__none-hint", children: sx.hint })
|
|
2876
2900
|
] }) : null;
|
|
@@ -2895,7 +2919,7 @@ function Dropdown({
|
|
|
2895
2919
|
setOpen(!open);
|
|
2896
2920
|
},
|
|
2897
2921
|
children: [
|
|
2898
|
-
triggerContent != null ? triggerContent : /* @__PURE__ */ jsxs18(
|
|
2922
|
+
triggerContent != null ? triggerContent : /* @__PURE__ */ jsxs18(Fragment9, { children: [
|
|
2899
2923
|
marked2 && (chosen?.avatar ? /* @__PURE__ */ jsx22(Avatar, { personKey: chosen.avatar.key, name: chosen.avatar.name, src: chosen.avatar.src, empty: chosen.avatar.empty }) : /* @__PURE__ */ jsx22(Avatar, { empty: true })),
|
|
2900
2924
|
label && /* @__PURE__ */ jsx22("span", { className: "ui-dropdown__pre", children: label }),
|
|
2901
2925
|
/* @__PURE__ */ jsx22("span", { className: cx6("ui-dropdown__value", marked2 && !chosen && "is-placeholder"), children: shown != null ? shown : placeholder })
|
|
@@ -2925,7 +2949,7 @@ function Dropdown({
|
|
|
2925
2949
|
onMouseMove,
|
|
2926
2950
|
children: [
|
|
2927
2951
|
header,
|
|
2928
|
-
sx ? /* @__PURE__ */ jsxs18(
|
|
2952
|
+
sx ? /* @__PURE__ */ jsxs18(Fragment9, { children: [
|
|
2929
2953
|
/* @__PURE__ */ jsxs18("div", { className: "ui-dropdown__search", children: [
|
|
2930
2954
|
/* @__PURE__ */ jsx22(Glyph2, { name: "search", className: "ui-dropdown__search-ic", hidden: true }),
|
|
2931
2955
|
/* @__PURE__ */ jsx22(
|
|
@@ -3076,7 +3100,7 @@ function Segmented({ options, value, onChange, label, appearance = "pill", size,
|
|
|
3076
3100
|
// src/FilterBar.tsx
|
|
3077
3101
|
import { useRef as useRef13, useState as useState10 } from "react";
|
|
3078
3102
|
import { filterChipText, filterChipName, filterChipUnset, filterChipItems, focusNextStop } from "@apliteni/apliteni-ui";
|
|
3079
|
-
import { Fragment as
|
|
3103
|
+
import { Fragment as Fragment10, jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3080
3104
|
var SEARCH_AT = 10;
|
|
3081
3105
|
var isRow2 = (entry) => entry !== "---" && !entry.separator;
|
|
3082
3106
|
function FilterBar({ filters, label = "Filters", clearLabel = "Clear all", clearVariant = "ghost", add, addLabel = "Filter", disabled = false, busy = false, onRemove, onClear, onChange, onAdd }) {
|
|
@@ -3183,7 +3207,7 @@ function FilterBar({ filters, label = "Filters", clearLabel = "Clear all", clear
|
|
|
3183
3207
|
variant: "menu",
|
|
3184
3208
|
sections,
|
|
3185
3209
|
ariaLabel: addLabel,
|
|
3186
|
-
triggerContent: /* @__PURE__ */ jsxs21(
|
|
3210
|
+
triggerContent: /* @__PURE__ */ jsxs21(Fragment10, { children: [
|
|
3187
3211
|
/* @__PURE__ */ jsx26(Icon, { name: "plus" }),
|
|
3188
3212
|
addLabel
|
|
3189
3213
|
] }),
|
|
@@ -3234,7 +3258,7 @@ function DrawerSection({ title, headingLevel = 3, className, children, ...rest }
|
|
|
3234
3258
|
|
|
3235
3259
|
// src/Snippet.tsx
|
|
3236
3260
|
import { useEffect as useEffect9, useRef as useRef14, useState as useState11 } from "react";
|
|
3237
|
-
import { Fragment as
|
|
3261
|
+
import { Fragment as Fragment11, jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3238
3262
|
function Snippet({ label = "shell", code = "", children, copy = true, reveal = false, copyLabel = "Copy code" }) {
|
|
3239
3263
|
const [status, setStatus] = useState11("idle");
|
|
3240
3264
|
const request = useRef14(0);
|
|
@@ -3262,7 +3286,7 @@ function Snippet({ label = "shell", code = "", children, copy = true, reveal = f
|
|
|
3262
3286
|
return /* @__PURE__ */ jsxs23("div", { className: reveal ? "ui-snippet ui-snippet--reveal" : "ui-snippet", children: [
|
|
3263
3287
|
/* @__PURE__ */ jsxs23("div", { className: "ui-snippet__bar", children: [
|
|
3264
3288
|
/* @__PURE__ */ jsx28("span", { children: label }),
|
|
3265
|
-
copy && /* @__PURE__ */ jsxs23(
|
|
3289
|
+
copy && /* @__PURE__ */ jsxs23(Fragment11, { children: [
|
|
3266
3290
|
/* @__PURE__ */ jsx28(
|
|
3267
3291
|
"button",
|
|
3268
3292
|
{
|
|
@@ -3284,7 +3308,7 @@ function Snippet({ label = "shell", code = "", children, copy = true, reveal = f
|
|
|
3284
3308
|
// src/Tabs.tsx
|
|
3285
3309
|
import { useEffect as useEffect10, useId as useId9, useRef as useRef15 } from "react";
|
|
3286
3310
|
import { playEntrance } from "@apliteni/apliteni-ui/motion";
|
|
3287
|
-
import { Fragment as
|
|
3311
|
+
import { Fragment as Fragment12, jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3288
3312
|
function Tabs({ items, value, onChange, label }) {
|
|
3289
3313
|
const id = useId9();
|
|
3290
3314
|
const previous = useRef15(value);
|
|
@@ -3333,7 +3357,7 @@ function Tabs({ items, value, onChange, label }) {
|
|
|
3333
3357
|
},
|
|
3334
3358
|
children: [
|
|
3335
3359
|
item.label,
|
|
3336
|
-
item.count != null && /* @__PURE__ */ jsxs24(
|
|
3360
|
+
item.count != null && /* @__PURE__ */ jsxs24(Fragment12, { children: [
|
|
3337
3361
|
" ",
|
|
3338
3362
|
item.count
|
|
3339
3363
|
] })
|
|
@@ -3585,7 +3609,7 @@ function EmptyState({ variant = "first-run", title, sub, icon: icon8, art, actio
|
|
|
3585
3609
|
}
|
|
3586
3610
|
|
|
3587
3611
|
// src/FileDrop.tsx
|
|
3588
|
-
import { Fragment as
|
|
3612
|
+
import { Fragment as Fragment13, jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3589
3613
|
var MARKS = {
|
|
3590
3614
|
uploading: "clock",
|
|
3591
3615
|
done: "circleCheck",
|
|
@@ -3753,7 +3777,7 @@ function FileDrop({
|
|
|
3753
3777
|
children: /* @__PURE__ */ jsx33("span", { style: { width: `${file.progress}%` } })
|
|
3754
3778
|
}
|
|
3755
3779
|
)
|
|
3756
|
-
] }) : /* @__PURE__ */ jsxs28(
|
|
3780
|
+
] }) : /* @__PURE__ */ jsxs28(Fragment13, { children: [
|
|
3757
3781
|
/* @__PURE__ */ jsx33(
|
|
3758
3782
|
Button,
|
|
3759
3783
|
{
|
|
@@ -3936,7 +3960,7 @@ import { paletteHotkey, prism, railCollapsed } from "@apliteni/apliteni-ui";
|
|
|
3936
3960
|
// src/SidebarNav.tsx
|
|
3937
3961
|
import { forwardRef as forwardRef8, useEffect as useEffect14, useId as useId11, useState as useState15 } from "react";
|
|
3938
3962
|
import { ENTRANCE_FALLBACK_MS } from "@apliteni/apliteni-ui/motion";
|
|
3939
|
-
import { Fragment as
|
|
3963
|
+
import { Fragment as Fragment14, jsx as jsx36, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3940
3964
|
var badgeText = (badge) => typeof badge === "object" ? badge.text : badge;
|
|
3941
3965
|
function Row({ item, active, activeIs, collapsed, renderLink, sub }) {
|
|
3942
3966
|
const uid = useId11();
|
|
@@ -3962,7 +3986,7 @@ function Row({ item, active, activeIs, collapsed, renderLink, sub }) {
|
|
|
3962
3986
|
item.disabled && "is-disabled",
|
|
3963
3987
|
item.danger && "is-danger"
|
|
3964
3988
|
].filter(Boolean).join(" ");
|
|
3965
|
-
const children = /* @__PURE__ */ jsxs31(
|
|
3989
|
+
const children = /* @__PURE__ */ jsxs31(Fragment14, { children: [
|
|
3966
3990
|
(item.leading ?? item.icon) && /* @__PURE__ */ jsx36("span", { className: "ui-nav__ic", children: item.leading ?? /* @__PURE__ */ jsx36(Icon, { name: item.icon }) }),
|
|
3967
3991
|
/* @__PURE__ */ jsx36("span", { className: "ui-nav__label", children: item.label }),
|
|
3968
3992
|
count != null && count !== "" && /* @__PURE__ */ jsx36("span", { className: `ui-nav__badge is-${typeof item.badge === "object" ? item.badge.tone ?? "neutral" : "neutral"}`, children: count }),
|
|
@@ -4102,7 +4126,7 @@ function ThemeToggle({ labelled = false }) {
|
|
|
4102
4126
|
}
|
|
4103
4127
|
|
|
4104
4128
|
// src/AppShell.tsx
|
|
4105
|
-
import { Fragment as
|
|
4129
|
+
import { Fragment as Fragment15, jsx as jsx38, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4106
4130
|
var path = (value) => value.split(/[?#]/)[0].replace(/\/+$/, "") || "/";
|
|
4107
4131
|
function AppShell({
|
|
4108
4132
|
sections,
|
|
@@ -4204,7 +4228,7 @@ function AppShell({
|
|
|
4204
4228
|
] }),
|
|
4205
4229
|
/* @__PURE__ */ jsxs33("div", { className: "ui-app__well", children: [
|
|
4206
4230
|
/* @__PURE__ */ jsxs33("header", { className: "ui-app__bar", children: [
|
|
4207
|
-
navigable && /* @__PURE__ */ jsxs33(
|
|
4231
|
+
navigable && /* @__PURE__ */ jsxs33(Fragment15, { children: [
|
|
4208
4232
|
/* @__PURE__ */ jsx38(
|
|
4209
4233
|
Button,
|
|
4210
4234
|
{
|
|
@@ -4467,7 +4491,7 @@ import {
|
|
|
4467
4491
|
useState as useState18
|
|
4468
4492
|
} from "react";
|
|
4469
4493
|
import { CHART_FLOOR, bridgeWalk, chartScale, pointTarget } from "@apliteni/apliteni-ui";
|
|
4470
|
-
import { Fragment as
|
|
4494
|
+
import { Fragment as Fragment16, jsx as jsx41, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4471
4495
|
var HEIGHT = { months: 216, bridge: 216, spark: 32 };
|
|
4472
4496
|
var PAD = 2;
|
|
4473
4497
|
var ZERO_INSET = 1.5;
|
|
@@ -5097,7 +5121,7 @@ function Chart(props) {
|
|
|
5097
5121
|
`${column.label}-${i}`
|
|
5098
5122
|
)) })
|
|
5099
5123
|
] }) }),
|
|
5100
|
-
/* @__PURE__ */ jsx41("span", { ref: tipEl, className: cx8("ui-tip", openId && "is-open"), role: open ? "tooltip" : void 0, children: open && /* @__PURE__ */ jsxs36(
|
|
5124
|
+
/* @__PURE__ */ jsx41("span", { ref: tipEl, className: cx8("ui-tip", openId && "is-open"), role: open ? "tooltip" : void 0, children: open && /* @__PURE__ */ jsxs36(Fragment16, { children: [
|
|
5101
5125
|
/* @__PURE__ */ jsx41("span", { className: "ui-tip__label", children: spark ? columns[open.column]?.label : `${open.name}, ${columns[open.column]?.label}` }),
|
|
5102
5126
|
/* @__PURE__ */ jsx41("span", { className: "ui-tip__value", children: format(open.value) }),
|
|
5103
5127
|
(stateOf(columns[open.column]) || open.detail) && /* @__PURE__ */ jsx41("span", { className: "ui-tip__detail", children: stateOf(columns[open.column]) || open.detail })
|
|
@@ -5120,7 +5144,7 @@ function Chart(props) {
|
|
|
5120
5144
|
/* @__PURE__ */ jsx41("tbody", { children: tableRows.map((row, i) => /* @__PURE__ */ jsxs36("tr", { "aria-current": pick === i ? true : void 0, children: [
|
|
5121
5145
|
/* @__PURE__ */ jsxs36("th", { scope: "row", children: [
|
|
5122
5146
|
row.column.label,
|
|
5123
|
-
row.column.estimated && /* @__PURE__ */ jsxs36(
|
|
5147
|
+
row.column.estimated && /* @__PURE__ */ jsxs36(Fragment16, { children: [
|
|
5124
5148
|
" ",
|
|
5125
5149
|
/* @__PURE__ */ jsx41("span", { className: "ui-chart__state", children: stateOf(row.column) })
|
|
5126
5150
|
] })
|
|
@@ -5178,9 +5202,9 @@ var AccentPicker = forwardRef10(function AccentPicker2({
|
|
|
5178
5202
|
});
|
|
5179
5203
|
|
|
5180
5204
|
// src/NavTabs.tsx
|
|
5181
|
-
import { Fragment as
|
|
5205
|
+
import { Fragment as Fragment17, forwardRef as forwardRef11, useEffect as useEffect18, useRef as useRef23, useImperativeHandle as useImperativeHandle2 } from "react";
|
|
5182
5206
|
import { safeUrl as safeUrl3, observeNavFit, revealCurrentNav, revealFocusedNav } from "@apliteni/apliteni-ui";
|
|
5183
|
-
import { Fragment as
|
|
5207
|
+
import { Fragment as Fragment18, jsx as jsx43, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
5184
5208
|
var NavTabs = forwardRef11(function NavTabs2({
|
|
5185
5209
|
items,
|
|
5186
5210
|
active,
|
|
@@ -5211,7 +5235,7 @@ var NavTabs = forwardRef11(function NavTabs2({
|
|
|
5211
5235
|
},
|
|
5212
5236
|
children: items.map((item) => {
|
|
5213
5237
|
const badge = item.badge != null && typeof item.badge === "object" ? item.badge : { text: item.badge, tone: void 0 };
|
|
5214
|
-
const inner = /* @__PURE__ */ jsxs37(
|
|
5238
|
+
const inner = /* @__PURE__ */ jsxs37(Fragment18, { children: [
|
|
5215
5239
|
/* @__PURE__ */ jsx43("span", { className: "ui-nav__tab-label", children: item.label }),
|
|
5216
5240
|
badge.text != null && badge.text !== "" && /* @__PURE__ */ jsx43("span", { className: `ui-nav__badge is-${badge.tone || "neutral"}`, children: badge.text })
|
|
5217
5241
|
] });
|
|
@@ -5224,7 +5248,7 @@ var NavTabs = forwardRef11(function NavTabs2({
|
|
|
5224
5248
|
"aria-current": current ? "page" : void 0,
|
|
5225
5249
|
children: inner
|
|
5226
5250
|
};
|
|
5227
|
-
return /* @__PURE__ */ jsx43(
|
|
5251
|
+
return /* @__PURE__ */ jsx43(Fragment17, { children: renderLink ? renderLink(item, linkProps) : /* @__PURE__ */ jsx43("a", { ...linkProps }) }, item.id);
|
|
5228
5252
|
})
|
|
5229
5253
|
}
|
|
5230
5254
|
);
|
|
@@ -5233,7 +5257,7 @@ var NavTabs = forwardRef11(function NavTabs2({
|
|
|
5233
5257
|
// src/Breadcrumbs.tsx
|
|
5234
5258
|
import { forwardRef as forwardRef12 } from "react";
|
|
5235
5259
|
import { icon as icon7, safeUrl as safeUrl4 } from "@apliteni/apliteni-ui";
|
|
5236
|
-
import { Fragment as
|
|
5260
|
+
import { Fragment as Fragment19, jsx as jsx44, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
5237
5261
|
var Breadcrumbs = forwardRef12(function Breadcrumbs2({
|
|
5238
5262
|
items,
|
|
5239
5263
|
renderLink,
|
|
@@ -5250,7 +5274,7 @@ var Breadcrumbs = forwardRef12(function Breadcrumbs2({
|
|
|
5250
5274
|
"aria-label": ariaLabel,
|
|
5251
5275
|
children: /* @__PURE__ */ jsx44("ol", { className: "ui-nav__crumbs", children: items.map((item, index) => {
|
|
5252
5276
|
const current = index === items.length - 1;
|
|
5253
|
-
const inner = /* @__PURE__ */ jsxs38(
|
|
5277
|
+
const inner = /* @__PURE__ */ jsxs38(Fragment19, { children: [
|
|
5254
5278
|
item.icon && /* @__PURE__ */ jsx44("span", { className: "ui-nav__ic", dangerouslySetInnerHTML: { __html: icon7(item.icon) } }),
|
|
5255
5279
|
/* @__PURE__ */ jsx44("span", { className: "ui-nav__crumb-label", children: item.label })
|
|
5256
5280
|
] });
|
package/src/styles/table.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* ============================================================================
|
|
2
2
|
* Table — .ui-table (hairline rows, opaque base surface)
|
|
3
|
-
* Row modifiers: .is-dead (revoked
|
|
3
|
+
* Row modifiers: .is-dead (revoked, shown by its muted ink and a word), .is-target (landed on), right-aligned .ui-table__act
|
|
4
4
|
* ========================================================================== */
|
|
5
5
|
|
|
6
6
|
.ui-table {
|
|
@@ -52,14 +52,6 @@
|
|
|
52
52
|
.ui-table th:last-child { padding-right: 0; }
|
|
53
53
|
.ui-table td.ui-table__act { padding-right: 0; text-align: right; }
|
|
54
54
|
.ui-table tr.is-dead td { /* muted-ink: state — revoked row */ color: var(--muted); }
|
|
55
|
-
.ui-table tr.is-dead td.ui-table__title { text-decoration: line-through; }
|
|
56
|
-
/* The strike is painted by the cell across its in-flow inline descendants, and an atomic
|
|
57
|
-
inline-level box is not one — so a linked name in a revoked row needs it struck itself.
|
|
58
|
-
On hover it carries both lines: the cell-link hover rule below is a whole `text-decoration`,
|
|
59
|
-
which would otherwise replace the strike with the underline.
|
|
60
|
-
held by: src/styles/table-focus.test.js */
|
|
61
|
-
.ui-table tr.is-dead td.ui-table__title a { text-decoration: line-through; }
|
|
62
|
-
.ui-table tr.is-dead td.ui-table__title a:hover { text-decoration-line: underline line-through; }
|
|
63
55
|
.ui-table tbody tr { transition: background var(--dur-fast) var(--ease); }
|
|
64
56
|
|
|
65
57
|
/* Row hover: an inset, rounded fill so the highlight never sits flush against a
|
|
@@ -72,7 +64,6 @@
|
|
|
72
64
|
border-spacing: 0;
|
|
73
65
|
padding: 0 var(--space-2);
|
|
74
66
|
}
|
|
75
|
-
.ui-table--hover:not(.ui-table--zebra) tbody tr:hover td { background: var(--surface-2); }
|
|
76
67
|
.ui-table--hover:not(.ui-table--zebra) tbody tr:hover td:first-child {
|
|
77
68
|
border-top-left-radius: var(--radius-sm); border-bottom-left-radius: var(--radius-sm); }
|
|
78
69
|
.ui-table--hover:not(.ui-table--zebra) tbody tr:hover td:last-child {
|
|
@@ -106,8 +97,6 @@
|
|
|
106
97
|
.ui-table--zebra td:first-child { padding-left: var(--space-3); }
|
|
107
98
|
.ui-table--zebra th:last-child,
|
|
108
99
|
.ui-table--zebra td:last-child { padding-right: var(--space-3); }
|
|
109
|
-
.ui-table--zebra.ui-table--hover tbody tr:hover td,
|
|
110
|
-
.ui-table--zebra tbody tr:hover td { background: color-mix(in srgb, var(--accent) 8%, transparent); /* code-bg: inherit — a wash paints over a ground and behind a chip, so the opaque ground below it is the step. */ }
|
|
111
100
|
|
|
112
101
|
/* A link in a cell is a value that happens to open something: the row's ink, underlined
|
|
113
102
|
on hover — what .ui-identity below has always done. Without it, base.css's bare
|
|
@@ -213,7 +202,7 @@
|
|
|
213
202
|
* bold only in the figure. Scoped to the table, the helper wins on either cell and the
|
|
214
203
|
* row reads as one row. */
|
|
215
204
|
.ui-table :is(th, td).ui-table__num--strong { color: var(--strong); font-weight: var(--weight-semibold); }
|
|
216
|
-
.ui-table__code { font-
|
|
205
|
+
.ui-table__code { font-size: var(--text-sm); color: var(--text); }
|
|
217
206
|
/* Two things in one cell — a row's own name and the state of it — side by side
|
|
218
207
|
* while the column has room and stacked when it does not. The wrap comes from flex
|
|
219
208
|
* because a dense cell is nowrap, and the column is then only as wide as the wider
|
|
@@ -234,13 +223,13 @@
|
|
|
234
223
|
|
|
235
224
|
/* White in light, base canvas in dark; never a grey or tinted data surface. */
|
|
236
225
|
.ui-table { background: var(--table-bg); }
|
|
237
|
-
.ui-table--zebra tbody tr:nth-child(even) td
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
.ui-table--
|
|
241
|
-
|
|
226
|
+
.ui-table--zebra tbody tr:nth-child(even) td { background: var(--table-bg); }
|
|
227
|
+
/* A row hover is a quiet neutral step. The row paints under transparent cells in a
|
|
228
|
+
scroll region, while ordinary cells cover the row without breaking its fill. */
|
|
229
|
+
.ui-table--hover tbody tr:hover:not(.is-target),
|
|
230
|
+
.ui-table--hover tbody tr:hover:not(.is-target) > :is(td, th) {
|
|
231
|
+
background: var(--surface-2);
|
|
242
232
|
}
|
|
243
|
-
.ui-table tbody tr:hover { outline: 1px solid var(--border-strong); outline-offset: -1px; }
|
|
244
233
|
|
|
245
234
|
/* The row a reference landed a reader on. The mark is a GROUND, not a line: an outline
|
|
246
235
|
says the keyboard is here (Artur, r34), and this one persists — it answers which row the
|
|
@@ -332,6 +321,9 @@
|
|
|
332
321
|
beneath them. */
|
|
333
322
|
.ui-table-scroll > .ui-table,
|
|
334
323
|
.ui-table-scroll > .ui-table tbody td:not(.ui-table__identity, .ui-table__selection) { background-color: transparent; }
|
|
324
|
+
.ui-table-scroll > .ui-table--hover tbody tr:hover:not(.is-target) > :is(td, th) {
|
|
325
|
+
background: var(--surface-2);
|
|
326
|
+
}
|
|
335
327
|
/* The kit's first ringed scroller, and a scroll region inside a card like the rest, so
|
|
336
328
|
it draws the band inward too rather than spending a halo across the card around it.
|
|
337
329
|
It had no room of its own to draw in — the padding above is horizontal — which is the
|
|
@@ -387,7 +379,7 @@
|
|
|
387
379
|
.ui-delta--success { color: var(--chip-success-ink); }
|
|
388
380
|
.ui-delta--danger { color: var(--chip-danger-ink); }
|
|
389
381
|
.ui-identity { min-height: 24px; display: inline-flex; align-items: center; gap: var(--space-2); color: var(--text); text-decoration: none; }
|
|
390
|
-
.ui-identity__symbol { font-
|
|
382
|
+
.ui-identity__symbol { font-weight: var(--weight-semibold); }
|
|
391
383
|
.ui-identity__name { white-space: normal; max-width: var(--panel-sm); }
|
|
392
384
|
.ui-identity__logo { width: 24px; height: 24px; flex: 0 0 24px; position: relative; display: grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-xs); font-size: var(--text-xs); }
|
|
393
385
|
.ui-identity__logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
|
|
@@ -500,10 +492,8 @@ a.ui-identity:hover { text-decoration: underline; }
|
|
|
500
492
|
.ui-table.ui-table--stack > tbody > tr {
|
|
501
493
|
display: flex; flex-wrap: wrap; align-items: baseline;
|
|
502
494
|
column-gap: var(--space-3); row-gap: var(--space-1);
|
|
503
|
-
/* The inset is on the row, not the table
|
|
504
|
-
|
|
505
|
-
the step a dense cell already pays sideways, so the outline and the row separator keep
|
|
506
|
-
the clearance they had at the width above this one. */
|
|
495
|
+
/* The inset is on the row, not the table, so its hover fill and separator keep
|
|
496
|
+
their clearance at the width above this one. */
|
|
507
497
|
padding: var(--space-3); border-bottom: 1px solid var(--border);
|
|
508
498
|
}
|
|
509
499
|
.ui-table.ui-table--stack > tbody > tr:last-child { border-bottom: 0; }
|
|
@@ -515,7 +505,21 @@ a.ui-identity:hover { text-decoration: underline; }
|
|
|
515
505
|
display: block; width: auto; min-width: 0; max-width: 100%; height: auto;
|
|
516
506
|
padding: 0; border-bottom: 0; white-space: normal; overflow-wrap: break-word;
|
|
517
507
|
}
|
|
508
|
+
.ui-table.ui-table--stack.ui-table--hover tbody tr:hover:not(.is-target) > :is(td, th) {
|
|
509
|
+
background: transparent;
|
|
510
|
+
}
|
|
518
511
|
.ui-table.ui-table--stack > tbody > tr > td.ui-table__long { flex: 0 0 100%; text-align: left; }
|
|
512
|
+
/* The head is gone, so an amount that names its column in `data-label` says it in front of
|
|
513
|
+
the figure, in the unit's size and body ink. */
|
|
514
|
+
.ui-table.ui-table--stack > tbody > tr > td[data-label]::before {
|
|
515
|
+
content: attr(data-label) / ""; margin-right: var(--space-1); font-size: var(--text-xs);
|
|
516
|
+
}
|
|
517
|
+
/* The cells of a stacked row are separate boxes with gaps between them, so a tint on each
|
|
518
|
+
would paint patches. The row paints one tint and the cells let it through. */
|
|
519
|
+
.ui-table.ui-table--stack tbody tr.is-target:is(*, :hover) {
|
|
520
|
+
background: color-mix(in srgb, var(--accent) 12%, transparent); /* code-bg: inherit — this translucent wash leaves the chip on its opaque ground. */
|
|
521
|
+
}
|
|
522
|
+
.ui-table.ui-table--stack tbody tr.is-target:is(*, :hover) > :is(td, th) { background: transparent; }
|
|
519
523
|
/* A stacked row has no columns left to pin, stick or inset, and the identity's name is
|
|
520
524
|
what the row is about — the fold hides it only because a pinned column is narrow. */
|
|
521
525
|
.ui-table.ui-table--stack.ui-table--pinned > :where(thead, tbody) > tr > :where(.ui-table__identity, .ui-table__selection) {
|
package/src/tokens/tokens.css
CHANGED
|
@@ -574,10 +574,7 @@
|
|
|
574
574
|
.ui-table-scroll,
|
|
575
575
|
.ui-table--sticky thead th,
|
|
576
576
|
.ui-table--pinned .ui-table__identity, .ui-table--pinned .ui-table__selection,
|
|
577
|
-
.ui-table--hover:not(.ui-table--zebra) tbody tr:hover td,
|
|
578
577
|
.ui-table--zebra tbody tr:nth-child(even) td,
|
|
579
|
-
.ui-table--zebra tbody tr:hover td,
|
|
580
|
-
.ui-table--zebra.ui-table--hover tbody tr:hover td,
|
|
581
578
|
.ui-toast,
|
|
582
579
|
.ui-toast--soft,
|
|
583
580
|
.ui-toast--outline,
|
|
@@ -598,10 +595,14 @@
|
|
|
598
595
|
.ui-table-scroll,
|
|
599
596
|
.ui-table--sticky thead th,
|
|
600
597
|
.ui-table--pinned .ui-table__identity, .ui-table--pinned .ui-table__selection,
|
|
601
|
-
.ui-table--
|
|
602
|
-
.
|
|
603
|
-
|
|
604
|
-
.ui-table--
|
|
598
|
+
.ui-table--zebra tbody tr:nth-child(even) td { --code-bg: var(--table-code-bg); }
|
|
599
|
+
/* A neutral hovered row gives an inline code chip the card surface. The step from
|
|
600
|
+
* --surface-2 clears 1.1:1 in both themes, even when the table follows a card. */
|
|
601
|
+
.ui-table--hover tbody tr:hover:not(.is-target),
|
|
602
|
+
.ui-table--hover tbody tr:hover:not(.is-target) > :is(td, th),
|
|
603
|
+
.ui-table-scroll > .ui-table--hover tbody tr:hover:not(.is-target) > :is(td, th) {
|
|
604
|
+
--code-bg: var(--surface);
|
|
605
|
+
}
|
|
605
606
|
.ui-card--accent,
|
|
606
607
|
.ui-card--live,
|
|
607
608
|
.ui-snippet--reveal { --code-bg: var(--surface); }
|