@nadicodeai/ui 12.1.260 → 12.1.262
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/dist/components/collection-page.d.ts +8 -3
- package/dist/components/collection-page.d.ts.map +1 -1
- package/dist/components/collection-page.js +7 -5
- package/dist/components/data-table.d.ts +2 -2
- package/dist/components/data-table.d.ts.map +1 -1
- package/dist/components/data-table.js +9 -4
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/kpi-card.d.ts +1 -1
- package/dist/components/kpi-card.d.ts.map +1 -1
- package/dist/components/kpi-card.js +6 -4
- package/dist/components/overview-page.d.ts +3 -6
- package/dist/components/overview-page.d.ts.map +1 -1
- package/dist/components/overview-page.js +2 -12
- package/dist/internal/figure-cards.d.ts +8 -0
- package/dist/internal/figure-cards.d.ts.map +1 -0
- package/dist/internal/figure-cards.js +15 -0
- package/dist/showcase/usage.generated.js +6 -6
- package/package.json +2 -2
|
@@ -8,6 +8,9 @@ import { type PageActionsProps } from "./page-actions.js";
|
|
|
8
8
|
import { type NoticeBannerProps } from "./notice-banner.js";
|
|
9
9
|
import { type RecordListWithout } from "./record-list.js";
|
|
10
10
|
import { type CollectionRail } from "../internal/collection-rail.js";
|
|
11
|
+
import { type FigureCard } from "../internal/figure-cards.js";
|
|
12
|
+
/** One figure of the whole collection: a `KpiCard`'s props without its presentation. */
|
|
13
|
+
export type CollectionFigure = FigureCard;
|
|
11
14
|
export type { RowMessage } from "./record-list.js";
|
|
12
15
|
export type { CollectionRail, CollectionRailItem, CollectionRailLinkProps, CollectionRailSection, } from "../internal/collection-rail.js";
|
|
13
16
|
type CollectionTitle = {
|
|
@@ -24,6 +27,8 @@ export type CollectionPageProps<TRecord extends RowData> = RecordListWithout<TRe
|
|
|
24
27
|
actions?: Omit<PageActionsProps, "period">;
|
|
25
28
|
/** The page's sibling collections, under the title row: `TabsNav variant="line"`. */
|
|
26
29
|
tabs?: ReactElement;
|
|
30
|
+
/** The figures of the whole collection, one row of equal cards under the tabs, as an overview draws its figures. */
|
|
31
|
+
figures?: readonly CollectionFigure[];
|
|
27
32
|
/** Actionable conditions above the toolbar, independent of sibling navigation. */
|
|
28
33
|
attention?: ReactNode;
|
|
29
34
|
/** A condition of the collection's own owner that the page fixes, under the title: one `NoticeBanner`. */
|
|
@@ -54,11 +59,11 @@ export type CollectionPageProps<TRecord extends RowData> = RecordListWithout<TRe
|
|
|
54
59
|
* Ours: Customers and Partners use the full-width list, with actionable attention above the toolbar when present. Business summaries belong on Dashboard and Analytics. A rail remains available for context that belongs to the collection itself, such as the selected Library hub.
|
|
55
60
|
* @instead “For tabular data with sortable columns and shared row shape, use `Table` instead.” (https://vercel.com/geist/entity)
|
|
56
61
|
* Ours: rows that are not things a person opens but lines of figures read under their headings, such as usage per product or invoices, are a `DataTable` under the page's own title and toolbar (owner, 2026-11-08). A list inside another page's section is a `RecordList` with its `heading`.
|
|
57
|
-
* @behaviour The page supplies its records and their commands as data, never its own toolbar, table, rows or menus. Title or none, as the product decides it: where no title is drawn over the page, as under `ProductShell`, whose path names the page and whose title stays unseen, the page's actions end its search row, after the filters, whatever they do (owner, 2026-11-08); where a title is drawn (`PageActionsHostProvider`'s `titled`, as a `PageFrame` with its `title`, or this composition's own `title`), every action stands on the title's row. The product says which, never what the page shows at the moment, so an issue appearing above the list never moves the actions. With a `rail`, the toolbar spans the page and under it stand two columns from 1280 px: the rail, 300 px, then the records' card, its top level with the rail's first title and named by the page's title alone, never a second heading, and the records' rows are `RecordList`'s `line` rows; below 1280 px the records come first and the rail follows them. Each rail card has its title above it at 16 px, an optional 44 px muted summary row with its one outline button at its end (a button never stands in a row of its own, so a card with an `action` has a `summary`), then its items: a figure is one 36 px row, its title and its number at the trailing edge; a record is its 24 px mark, a title over a muted line that wraps to a second before it is cut, and a figure or a status at its end, the whole item opening its record; a card with no items draws its `empty` inside it as one 44 px row like an item. While the rail's read is in flight a card's `items` are undefined and it holds its place with three placeholder lines, so the two columns stand from the first frame; a rail whose read `failed` is one card saying so, and the records beside it stay. Under the title sits only the `description`, when the collection's kind needs explaining; otherwise nothing. The page's title names the collection once, and the records' card never adds a header that only describes it. The actions are drawn from `actions` in `PageActions`' order. The primary stays where they stand whether the collection is empty or not, filled; a first use repeats it as the filled button in its card. The page's actions stay where they stand whichever tab is shown, each tab's collection given the same `actions`; the toolbar belongs to the tab shown, and switching clears its search and page. One toolbar holds the search, which grows, then the filters, then the sort; it shows while there are records, a search or filter is set, or a facet hides records while unset (`hidesWhileUnset`, as the archived companies), and is glass only where the rows scroll under it. While a new search, filter or sort is read, the toolbar is busy and, after a second, shows the one waiting line, while the last rows stay. The toolbar is the kit's `FilterToolbar`, the one `DataTable` draws too, so its order, its waiting line and its search's wait for the page to be interactive are the same over every list (nadicode decision). The rows, their states and their loading are the RecordList's; no match is offered only in those same cases, so records a facet hides by default are always one choice away.
|
|
62
|
+
* @behaviour The page supplies its records and their commands as data, never its own toolbar, table, rows or menus. Title or none, as the product decides it: where no title is drawn over the page, as under `ProductShell`, whose path names the page and whose title stays unseen, the page's actions end its search row, after the filters, whatever they do (owner, 2026-11-08); where a title is drawn (`PageActionsHostProvider`'s `titled`, as a `PageFrame` with its `title`, or this composition's own `title`), every action stands on the title's row. The product says which, never what the page shows at the moment, so an issue appearing above the list never moves the actions. With a `rail`, the toolbar spans the page and under it stand two columns from 1280 px: the rail, 300 px, then the records' card, its top level with the rail's first title and named by the page's title alone, never a second heading, and the records' rows are `RecordList`'s `line` rows; below 1280 px the records come first and the rail follows them. Each rail card has its title above it at 16 px, an optional 44 px muted summary row with its one outline button at its end (a button never stands in a row of its own, so a card with an `action` has a `summary`), then its items: a figure is one 36 px row, its title and its number at the trailing edge; a record is its 24 px mark, a title over a muted line that wraps to a second before it is cut, and a figure or a status at its end, the whole item opening its record; a card with no items draws its `empty` inside it as one 44 px row like an item. While the rail's read is in flight a card's `items` are undefined and it holds its place with three placeholder lines, so the two columns stand from the first frame; a rail whose read `failed` is one card saying so, and the records beside it stay. Under the title sits only the `description`, when the collection's kind needs explaining; otherwise nothing. The page's title names the collection once, and the records' card never adds a header that only describes it. The actions are drawn from `actions` in `PageActions`' order. The primary stays where they stand whether the collection is empty or not, filled; a first use repeats it as the filled button in its card. The page's actions stay where they stand whichever tab is shown, each tab's collection given the same `actions`; the toolbar belongs to the tab shown, and switching clears its search and page. With `figures`, the figures of the whole collection stand under the tabs, above `attention` and the toolbar: one row of equal `KpiCard`s, laid out as `OverviewPage` lays out its figures, so how far the whole collection has got is read before its rows, as Nadia's Brain reads Searchable, Not read and Model usage over its folders; they belong to the tab shown, and while the collection has no records and no search or filter is set they are left out, so a first use reads its empty state alone (nadicode decision). Figures beside the records, in a column of their own, are the `rail`'s. One toolbar holds the search, which grows, then the filters, then the sort; it shows while there are records, a search or filter is set, or a facet hides records while unset (`hidesWhileUnset`, as the archived companies), and is glass only where the rows scroll under it. While a new search, filter or sort is read, the toolbar is busy and, after a second, shows the one waiting line, while the last rows stay. The toolbar is the kit's `FilterToolbar`, the one `DataTable` draws too, so its order, its waiting line and its search's wait for the page to be interactive are the same over every list (nadicode decision). The rows, their states and their loading are the RecordList's; no match is offered only in those same cases, so records a facet hides by default are always one choice away.
|
|
58
63
|
* @words “For multi-facet filters use the plural template `No {Items} Match Your Filters` and suggest widening or clearing.” (https://vercel.com/geist/empty-state)
|
|
59
|
-
* Ours: every string is the product's, in sentence case. The title names the collection in the plural ("Agents"); the search says what it finds ("Find a skill"); no match says what found nothing and offers to clear it ("Clear search", "Clear filters").
|
|
64
|
+
* Ours: every string is the product's, in sentence case. The title names the collection in the plural ("Agents"); a figure's label names its measure over the whole collection ("Searchable"), its value the count ("61,930") and its note what the count is of ("of 82,248 files · 17,169 in line"); the search says what it finds ("Find a skill"); no match says what found nothing and offers to clear it ("Clear search", "Clear filters").
|
|
60
65
|
* @access “After an async filter change, wrap the region in `aria-live="polite"` so screen readers announce the new state.” (https://vercel.com/geist/empty-state)
|
|
61
|
-
* Ours: the rows' region is the RecordList's, which holds it. The title is the page's h1 when the composition draws it. The toolbar is named by `label` and busy while `pending`; the rows are the RecordList's table, named by `label`.
|
|
66
|
+
* Ours: the rows' region is the RecordList's, which holds it. The title is the page's h1 when the composition draws it. Each figure is read as its `KpiCard`'s usage page says, its label naming its value and its bar. The toolbar is named by `label` and busy while `pending`; the rows are the RecordList's table, named by `label`.
|
|
62
67
|
*/
|
|
63
68
|
export declare function CollectionPage<TRecord extends RowData>(props: CollectionPageProps<TRecord>): import("react").JSX.Element;
|
|
64
69
|
//# sourceMappingURL=collection-page.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection-page.d.ts","sourceRoot":"","sources":["../../src/components/collection-page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAIL,KAAK,gBAAgB,EAEtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAGlF,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"collection-page.d.ts","sourceRoot":"","sources":["../../src/components/collection-page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAA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C3C,qFAAqF;IACrF,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,oHAAoH;IACpH,OAAO,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACtC,kFAAkF;IAClF,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,0GAA0G;IAC1G,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,0DAA0D;IAC1D,cAAc,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACnC,iDAAiD;IACjD,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;IACpD,oGAAoG;IACpG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB,CAAC;AAEJ;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAAC,OAAO,SAAS,OAAO,EAAE,KAAK,EAAE,mBAAmB,CAAC,OAAO,CAAC,+BA4D1F"}
|
|
@@ -6,6 +6,7 @@ import { PageHeader } from "./page-header.js";
|
|
|
6
6
|
import { FilterToolbar } from "./filter-toolbar.js";
|
|
7
7
|
import { RecordList } from "./record-list.js";
|
|
8
8
|
import { CollectionRailColumn } from "../internal/collection-rail.js";
|
|
9
|
+
import { FigureCards } from "../internal/figure-cards.js";
|
|
9
10
|
/**
|
|
10
11
|
* A page whose job is a list of records: its title with the page's actions on
|
|
11
12
|
* one row, or, where no title is drawn, its actions at the end of its search
|
|
@@ -17,20 +18,21 @@ import { CollectionRailColumn } from "../internal/collection-rail.js";
|
|
|
17
18
|
* Ours: Customers and Partners use the full-width list, with actionable attention above the toolbar when present. Business summaries belong on Dashboard and Analytics. A rail remains available for context that belongs to the collection itself, such as the selected Library hub.
|
|
18
19
|
* @instead “For tabular data with sortable columns and shared row shape, use `Table` instead.” (https://vercel.com/geist/entity)
|
|
19
20
|
* Ours: rows that are not things a person opens but lines of figures read under their headings, such as usage per product or invoices, are a `DataTable` under the page's own title and toolbar (owner, 2026-11-08). A list inside another page's section is a `RecordList` with its `heading`.
|
|
20
|
-
* @behaviour The page supplies its records and their commands as data, never its own toolbar, table, rows or menus. Title or none, as the product decides it: where no title is drawn over the page, as under `ProductShell`, whose path names the page and whose title stays unseen, the page's actions end its search row, after the filters, whatever they do (owner, 2026-11-08); where a title is drawn (`PageActionsHostProvider`'s `titled`, as a `PageFrame` with its `title`, or this composition's own `title`), every action stands on the title's row. The product says which, never what the page shows at the moment, so an issue appearing above the list never moves the actions. With a `rail`, the toolbar spans the page and under it stand two columns from 1280 px: the rail, 300 px, then the records' card, its top level with the rail's first title and named by the page's title alone, never a second heading, and the records' rows are `RecordList`'s `line` rows; below 1280 px the records come first and the rail follows them. Each rail card has its title above it at 16 px, an optional 44 px muted summary row with its one outline button at its end (a button never stands in a row of its own, so a card with an `action` has a `summary`), then its items: a figure is one 36 px row, its title and its number at the trailing edge; a record is its 24 px mark, a title over a muted line that wraps to a second before it is cut, and a figure or a status at its end, the whole item opening its record; a card with no items draws its `empty` inside it as one 44 px row like an item. While the rail's read is in flight a card's `items` are undefined and it holds its place with three placeholder lines, so the two columns stand from the first frame; a rail whose read `failed` is one card saying so, and the records beside it stay. Under the title sits only the `description`, when the collection's kind needs explaining; otherwise nothing. The page's title names the collection once, and the records' card never adds a header that only describes it. The actions are drawn from `actions` in `PageActions`' order. The primary stays where they stand whether the collection is empty or not, filled; a first use repeats it as the filled button in its card. The page's actions stay where they stand whichever tab is shown, each tab's collection given the same `actions`; the toolbar belongs to the tab shown, and switching clears its search and page. One toolbar holds the search, which grows, then the filters, then the sort; it shows while there are records, a search or filter is set, or a facet hides records while unset (`hidesWhileUnset`, as the archived companies), and is glass only where the rows scroll under it. While a new search, filter or sort is read, the toolbar is busy and, after a second, shows the one waiting line, while the last rows stay. The toolbar is the kit's `FilterToolbar`, the one `DataTable` draws too, so its order, its waiting line and its search's wait for the page to be interactive are the same over every list (nadicode decision). The rows, their states and their loading are the RecordList's; no match is offered only in those same cases, so records a facet hides by default are always one choice away.
|
|
21
|
+
* @behaviour The page supplies its records and their commands as data, never its own toolbar, table, rows or menus. Title or none, as the product decides it: where no title is drawn over the page, as under `ProductShell`, whose path names the page and whose title stays unseen, the page's actions end its search row, after the filters, whatever they do (owner, 2026-11-08); where a title is drawn (`PageActionsHostProvider`'s `titled`, as a `PageFrame` with its `title`, or this composition's own `title`), every action stands on the title's row. The product says which, never what the page shows at the moment, so an issue appearing above the list never moves the actions. With a `rail`, the toolbar spans the page and under it stand two columns from 1280 px: the rail, 300 px, then the records' card, its top level with the rail's first title and named by the page's title alone, never a second heading, and the records' rows are `RecordList`'s `line` rows; below 1280 px the records come first and the rail follows them. Each rail card has its title above it at 16 px, an optional 44 px muted summary row with its one outline button at its end (a button never stands in a row of its own, so a card with an `action` has a `summary`), then its items: a figure is one 36 px row, its title and its number at the trailing edge; a record is its 24 px mark, a title over a muted line that wraps to a second before it is cut, and a figure or a status at its end, the whole item opening its record; a card with no items draws its `empty` inside it as one 44 px row like an item. While the rail's read is in flight a card's `items` are undefined and it holds its place with three placeholder lines, so the two columns stand from the first frame; a rail whose read `failed` is one card saying so, and the records beside it stay. Under the title sits only the `description`, when the collection's kind needs explaining; otherwise nothing. The page's title names the collection once, and the records' card never adds a header that only describes it. The actions are drawn from `actions` in `PageActions`' order. The primary stays where they stand whether the collection is empty or not, filled; a first use repeats it as the filled button in its card. The page's actions stay where they stand whichever tab is shown, each tab's collection given the same `actions`; the toolbar belongs to the tab shown, and switching clears its search and page. With `figures`, the figures of the whole collection stand under the tabs, above `attention` and the toolbar: one row of equal `KpiCard`s, laid out as `OverviewPage` lays out its figures, so how far the whole collection has got is read before its rows, as Nadia's Brain reads Searchable, Not read and Model usage over its folders; they belong to the tab shown, and while the collection has no records and no search or filter is set they are left out, so a first use reads its empty state alone (nadicode decision). Figures beside the records, in a column of their own, are the `rail`'s. One toolbar holds the search, which grows, then the filters, then the sort; it shows while there are records, a search or filter is set, or a facet hides records while unset (`hidesWhileUnset`, as the archived companies), and is glass only where the rows scroll under it. While a new search, filter or sort is read, the toolbar is busy and, after a second, shows the one waiting line, while the last rows stay. The toolbar is the kit's `FilterToolbar`, the one `DataTable` draws too, so its order, its waiting line and its search's wait for the page to be interactive are the same over every list (nadicode decision). The rows, their states and their loading are the RecordList's; no match is offered only in those same cases, so records a facet hides by default are always one choice away.
|
|
21
22
|
* @words “For multi-facet filters use the plural template `No {Items} Match Your Filters` and suggest widening or clearing.” (https://vercel.com/geist/empty-state)
|
|
22
|
-
* Ours: every string is the product's, in sentence case. The title names the collection in the plural ("Agents"); the search says what it finds ("Find a skill"); no match says what found nothing and offers to clear it ("Clear search", "Clear filters").
|
|
23
|
+
* Ours: every string is the product's, in sentence case. The title names the collection in the plural ("Agents"); a figure's label names its measure over the whole collection ("Searchable"), its value the count ("61,930") and its note what the count is of ("of 82,248 files · 17,169 in line"); the search says what it finds ("Find a skill"); no match says what found nothing and offers to clear it ("Clear search", "Clear filters").
|
|
23
24
|
* @access “After an async filter change, wrap the region in `aria-live="polite"` so screen readers announce the new state.” (https://vercel.com/geist/empty-state)
|
|
24
|
-
* Ours: the rows' region is the RecordList's, which holds it. The title is the page's h1 when the composition draws it. The toolbar is named by `label` and busy while `pending`; the rows are the RecordList's table, named by `label`.
|
|
25
|
+
* Ours: the rows' region is the RecordList's, which holds it. The title is the page's h1 when the composition draws it. Each figure is read as its `KpiCard`'s usage page says, its label naming its value and its bar. The toolbar is named by `label` and busy while `pending`; the rows are the RecordList's table, named by `label`.
|
|
25
26
|
*/
|
|
26
27
|
export function CollectionPage(props) {
|
|
27
|
-
const { title, description, actions, tabs, attention, notice, search, filters, sort, toolbarSurface, noMatch, pending, rail, ...list } = props;
|
|
28
|
+
const { title, description, actions, tabs, figures, attention, notice, search, filters, sort, toolbarSurface, noMatch, pending, rail, ...list } = props;
|
|
28
29
|
const hostTitled = usePageTitled();
|
|
29
30
|
const titled = Boolean(title) || hostTitled;
|
|
30
31
|
const toolbarActions = actions && !titled ? _jsx(CardActionsRow, { ...actions }) : null;
|
|
31
32
|
const hasRecords = list.records !== undefined && list.records.length > 0;
|
|
32
33
|
const narrowed = Boolean(search?.value) ||
|
|
33
34
|
(filters?.facets.some((facet) => facet.value || facet.hidesWhileUnset) ?? false);
|
|
34
|
-
const
|
|
35
|
+
const nothingYet = list.records?.length === 0 && !narrowed;
|
|
36
|
+
const page = (_jsxs("div", { className: "grid min-w-0 gap-4", "data-slot": "collection-page", children: [title ? _jsx(PageHeader, { description: description, title: title }) : null, actions && titled ? _jsx(PageActions, { ...actions }) : null, notice ? _jsx(NoticeBanner, { ...notice }) : null, tabs, figures && figures.length > 0 && !nothingYet ? _jsx(FigureCards, { figures: figures }) : null, attention, _jsx(FilterToolbar, { actions: toolbarActions, filters: hasRecords || narrowed ? filters : undefined, label: list.label, pending: pending, search: hasRecords || narrowed ? search : undefined, sort: hasRecords || narrowed ? sort : undefined, surface: toolbarSurface ?? "plain" }), rail ? (_jsxs("div", { className: "grid min-w-0 gap-6 xl:grid-cols-[18.75rem_minmax(0,1fr)] xl:items-start", "data-slot": "collection-columns", children: [_jsx("div", { className: "min-w-0 xl:col-start-2 xl:row-start-1", children: _jsx(RecordList, { ...list, layout: "line", noMatch: narrowed ? noMatch : undefined }) }), _jsx(CollectionRailColumn, { className: "xl:col-start-1 xl:row-start-1", rail: rail })] })) : (_jsx(RecordList, { ...list, noMatch: narrowed ? noMatch : undefined }))] }));
|
|
35
37
|
return title ? _jsx(PageActionsHostProvider, { children: page }) : page;
|
|
36
38
|
}
|
|
@@ -213,7 +213,7 @@ export declare function columnMenuLabel<TData extends RowData, TValue extends Ce
|
|
|
213
213
|
* @instead “For a row of descriptive content paired with a single action (membership row, integration row), use `Entity` instead.” (https://vercel.com/geist/table)
|
|
214
214
|
* “For a key/value metadata block on a detail page, use `Description`, not a two-column table.” (https://vercel.com/geist/table)
|
|
215
215
|
* Ours: Geist's `Entity` is a `RecordList` row: a row that is one thing with a name a person opens, such as a deployment, a Customer, a Member account or an Agent, is a `RecordList`'s, however many facts it shows (owner, 2026-11-08). Its `Description` is `ObjectFacts`. A list on a page of its own is a `CollectionPage`. A descriptive list is `ItemGroup`.
|
|
216
|
-
* @behaviour Every column has a `header`; a column without one does not compile. The headings are always visible, medium weight in the cells' body grey, 48 px high, with 12 px of room under the labels and then the rule, so the first row starts at the rule like every other; rows are 40 px. Each column is at least its definition's `size`, in pixels, and as wide as its longest value, whose words stay on one line unless the column `wraps`; a column marked `identifier` holds ids or paths and is cut in the middle. The last column trails unless it `wraps` or is `centered`; a `centered` column's heading and values sit in the middle of it. Records are divided by a 1 px rule, none after the last. The first and last columns stand in from the card's edges by the card's spacing, so the first lines up with the title. Records of several kinds stand in one table under `group` headings: a heading row that spans the columns, in ink, medium text, 36 px high with the same rule under it, one per group in the order the groups first appear, never a second table; a heading is the group's name and carries no figure of its own. A row that opens a record takes `accent` on hover, and any row on focus within and while its menu is open; a row that opens nothing never reacts to hover. A selected row takes `muted`; headers and footers never highlight and carry no fill. On a card narrower than its columns a table of figures keeps every column and scrolls sideways inside its card, as Geist's and shadcn's tables do (owner, 2026-11-08); a document's table, such as a legal page's, takes the `wraps` option on its columns, so their words wrap and the row grows. A bounded page's paging stands in the card's footer strip at its trailing edge, opposite `footer`, which stands at the leading edge: its `status` ("Page 2 of 7") before Previous and Next, which are the product's router links (`previousLink`, `nextLink`) when each page is its own address, and buttons otherwise; the one that leads nowhere stays, disabled. A note about the whole table is `footerNote`, in a strip of its own under that one: one muted line, an optional *Learn more* after it at the left and one secondary action at the right; it is the one place a table says a sentence. Colour is neutral: headings and cells in the body grey, no hue, except a status badge or a tone the cell itself carries.
|
|
216
|
+
* @behaviour Every column has a `header`; a column without one does not compile. The headings are always visible, medium weight in the cells' body grey, 48 px high, with 12 px of room under the labels and then the rule, so the first row starts at the rule like every other; rows are 40 px. Each column is at least its definition's `size`, in pixels, and as wide as its longest value, whose words stay on one line unless the column `wraps`; a column marked `identifier` holds ids or paths and is cut in the middle. The last column trails unless it `wraps` or is `centered`; a `centered` column's heading and values sit in the middle of it. Records are divided by a 1 px rule, none after the last. The first and last columns stand in from the card's edges by the card's spacing, so the first lines up with the title. Records of several kinds stand in one table under `group` headings: a heading row that spans the columns, in ink, medium text, 36 px high with the same rule under it, one per group in the order the groups first appear, never a second table; a heading is the group's name and carries no figure of its own. A row that opens a record takes `accent` on hover, and any row on focus within and while its menu is open; a row that opens nothing never reacts to hover. A selected row takes `muted`; headers and footers never highlight and carry no fill. On a card narrower than its columns a table of figures keeps every column and scrolls sideways inside its card, as Geist's and shadcn's tables do (owner, 2026-11-08); a document's table, such as a legal page's, takes the `wraps` option on its columns, so their words wrap and the row grows. A bounded page's paging stands in the card's footer strip at its trailing edge, opposite `footer`, which stands at the leading edge: its `status` ("Page 2 of 7") before Previous and Next, which are the product's router links (`previousLink`, `nextLink`) when each page is its own address, and buttons otherwise; the one that leads nowhere stays, disabled. A note about the whole table is `footerNote`, in a strip of its own under that one: one muted line, an optional *Learn more* after it at the left and one secondary action at the right; it is the one place a table says a sentence. A column's `footer` is its total: when a shown column has one, a row of totals closes the table under a rule, in ink, medium text, each total under its own column, a figure trailing in tabular digits like the column's values, the first column's footer naming the row, and a column with no total leaving its cell empty. One total with no column of its own is `summary`, under the table at its trailing edge, where it reads as the last column's; a total of another column is that column's `footer` (nadicode decision). Colour is neutral: headings and cells in the body grey, no hue, except a status badge or a tone the cell itself carries.
|
|
217
217
|
* “When the underlying list is empty (filter cleared, never created), render `Empty State` outside the table rather than an empty `<Table.Body>`.” (https://vercel.com/geist/table)
|
|
218
218
|
* “After an async filter change, wrap the region in `aria-live="polite"` so screen readers announce the new state.” (https://vercel.com/geist/empty-state)
|
|
219
219
|
* Ours: empty sits outside the body, in a polite live region that stays in place so a filter that empties the table is announced.
|
|
@@ -227,7 +227,7 @@ export declare function columnMenuLabel<TData extends RowData, TValue extends Ce
|
|
|
227
227
|
* “Render `—` in cells where a value is unknown or not applicable. Don’t substitute `N/A`, `null`, or an empty string.” (https://vercel.com/geist/table)
|
|
228
228
|
* “Use the canonical short relative-time form in cells (`2m ago`, `5h ago`); switch to `Mar 14, 2026` past 7 days. See `Relative Time Card`.” (https://vercel.com/geist/table)
|
|
229
229
|
* “Pagination labels are `Previous` and `Next`. Page-count copy reads `Page 2 of 7` or `21–40 of 142` with an en-dash inside the range.” (https://vercel.com/geist/table)
|
|
230
|
-
* Ours: headings are sentence case nouns with their unit, "Cost (€)", "Tokens", where Geist writes Title Case. The words of a time and of Previous and Next are the product's catalogue, in both languages. The footer is a count or the paging, never a help sentence: guidance a step needs lives in that step. Totals and paging each stand in a footer zone of their own, the paging at the trailing edge; the summary row is a labelled total. Italian headings run a third longer and never wrap.
|
|
230
|
+
* Ours: headings are sentence case nouns with their unit, "Cost (€)", "Tokens", where Geist writes Title Case. The words of a time and of Previous and Next are the product's catalogue, in both languages. The footer is a count or the paging, never a help sentence: guidance a step needs lives in that step. Totals and paging each stand in a footer zone of their own, the paging at the trailing edge; the summary row is a labelled total, and the first cell of a row of totals names what it totals ("All files"). Italian headings run a third longer and never wrap.
|
|
231
231
|
* @access A native table named by `tableLabel`, which is required; `th scope="col"`; the record's name is the row's one link. A sorted column's heading carries `aria-sort`. `DataTableSkeleton` is busy and its placeholder table is hidden from assistive technology. Ours: a missing value is a hidden "—" with screen-reader text, never blank.
|
|
232
232
|
*/
|
|
233
233
|
export declare function DataTable<TData extends RowData>(props: DataTableProps<TData>): React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../src/components/data-table.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EAGnB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,WAAW,EAIX,KAAK,QAAQ,EACb,KAAK,MAAM,EACX,KAAK,SAAS,EAGd,KAAK,OAAO,EAGb,MAAM,uBAAuB,CAAC;AAI/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAS1F,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EAEL,KAAK,kBAAkB,EAExB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../src/components/data-table.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EAGnB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,WAAW,EAIX,KAAK,QAAQ,EACb,KAAK,MAAM,EACX,KAAK,SAAS,EAGd,KAAK,OAAO,EAGb,MAAM,uBAAuB,CAAC;AAI/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAS1F,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC5E,O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,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,OAAO,EACP,MAAM,GACP,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;CACxC,qBAwCA;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,SAAS,OAAO,EAAE,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,qBAEhF"}
|
|
@@ -11,7 +11,7 @@ import { EmptyState } from "./empty-state.js";
|
|
|
11
11
|
import { FilterToolbar, filterToolbarHolds, } from "./filter-toolbar.js";
|
|
12
12
|
import { MiddleTruncate } from "./middle-truncate.js";
|
|
13
13
|
import { NoticeBanner } from "./notice-banner.js";
|
|
14
|
-
import { Table, TableBody, TableCell, TableCol, TableColgroup, TableHead, TableHeader, TableRecordGroup, TableRow, } from "./table.js";
|
|
14
|
+
import { Table, TableBody, TableCell, TableCol, TableColgroup, TableFooter, TableHead, TableHeader, TableRecordGroup, TableRow, } from "./table.js";
|
|
15
15
|
import { Skeleton } from "./skeleton.js";
|
|
16
16
|
import { TableCard } from "./table-card.js";
|
|
17
17
|
import { openRowOnClick, RecordGrid, RecordGridGroupHeading, RecordGridRow, } from "../internal/record-grid.js";
|
|
@@ -119,7 +119,7 @@ function GroupHeading({ children, span }) {
|
|
|
119
119
|
* @instead “For a row of descriptive content paired with a single action (membership row, integration row), use `Entity` instead.” (https://vercel.com/geist/table)
|
|
120
120
|
* “For a key/value metadata block on a detail page, use `Description`, not a two-column table.” (https://vercel.com/geist/table)
|
|
121
121
|
* Ours: Geist's `Entity` is a `RecordList` row: a row that is one thing with a name a person opens, such as a deployment, a Customer, a Member account or an Agent, is a `RecordList`'s, however many facts it shows (owner, 2026-11-08). Its `Description` is `ObjectFacts`. A list on a page of its own is a `CollectionPage`. A descriptive list is `ItemGroup`.
|
|
122
|
-
* @behaviour Every column has a `header`; a column without one does not compile. The headings are always visible, medium weight in the cells' body grey, 48 px high, with 12 px of room under the labels and then the rule, so the first row starts at the rule like every other; rows are 40 px. Each column is at least its definition's `size`, in pixels, and as wide as its longest value, whose words stay on one line unless the column `wraps`; a column marked `identifier` holds ids or paths and is cut in the middle. The last column trails unless it `wraps` or is `centered`; a `centered` column's heading and values sit in the middle of it. Records are divided by a 1 px rule, none after the last. The first and last columns stand in from the card's edges by the card's spacing, so the first lines up with the title. Records of several kinds stand in one table under `group` headings: a heading row that spans the columns, in ink, medium text, 36 px high with the same rule under it, one per group in the order the groups first appear, never a second table; a heading is the group's name and carries no figure of its own. A row that opens a record takes `accent` on hover, and any row on focus within and while its menu is open; a row that opens nothing never reacts to hover. A selected row takes `muted`; headers and footers never highlight and carry no fill. On a card narrower than its columns a table of figures keeps every column and scrolls sideways inside its card, as Geist's and shadcn's tables do (owner, 2026-11-08); a document's table, such as a legal page's, takes the `wraps` option on its columns, so their words wrap and the row grows. A bounded page's paging stands in the card's footer strip at its trailing edge, opposite `footer`, which stands at the leading edge: its `status` ("Page 2 of 7") before Previous and Next, which are the product's router links (`previousLink`, `nextLink`) when each page is its own address, and buttons otherwise; the one that leads nowhere stays, disabled. A note about the whole table is `footerNote`, in a strip of its own under that one: one muted line, an optional *Learn more* after it at the left and one secondary action at the right; it is the one place a table says a sentence. Colour is neutral: headings and cells in the body grey, no hue, except a status badge or a tone the cell itself carries.
|
|
122
|
+
* @behaviour Every column has a `header`; a column without one does not compile. The headings are always visible, medium weight in the cells' body grey, 48 px high, with 12 px of room under the labels and then the rule, so the first row starts at the rule like every other; rows are 40 px. Each column is at least its definition's `size`, in pixels, and as wide as its longest value, whose words stay on one line unless the column `wraps`; a column marked `identifier` holds ids or paths and is cut in the middle. The last column trails unless it `wraps` or is `centered`; a `centered` column's heading and values sit in the middle of it. Records are divided by a 1 px rule, none after the last. The first and last columns stand in from the card's edges by the card's spacing, so the first lines up with the title. Records of several kinds stand in one table under `group` headings: a heading row that spans the columns, in ink, medium text, 36 px high with the same rule under it, one per group in the order the groups first appear, never a second table; a heading is the group's name and carries no figure of its own. A row that opens a record takes `accent` on hover, and any row on focus within and while its menu is open; a row that opens nothing never reacts to hover. A selected row takes `muted`; headers and footers never highlight and carry no fill. On a card narrower than its columns a table of figures keeps every column and scrolls sideways inside its card, as Geist's and shadcn's tables do (owner, 2026-11-08); a document's table, such as a legal page's, takes the `wraps` option on its columns, so their words wrap and the row grows. A bounded page's paging stands in the card's footer strip at its trailing edge, opposite `footer`, which stands at the leading edge: its `status` ("Page 2 of 7") before Previous and Next, which are the product's router links (`previousLink`, `nextLink`) when each page is its own address, and buttons otherwise; the one that leads nowhere stays, disabled. A note about the whole table is `footerNote`, in a strip of its own under that one: one muted line, an optional *Learn more* after it at the left and one secondary action at the right; it is the one place a table says a sentence. A column's `footer` is its total: when a shown column has one, a row of totals closes the table under a rule, in ink, medium text, each total under its own column, a figure trailing in tabular digits like the column's values, the first column's footer naming the row, and a column with no total leaving its cell empty. One total with no column of its own is `summary`, under the table at its trailing edge, where it reads as the last column's; a total of another column is that column's `footer` (nadicode decision). Colour is neutral: headings and cells in the body grey, no hue, except a status badge or a tone the cell itself carries.
|
|
123
123
|
* “When the underlying list is empty (filter cleared, never created), render `Empty State` outside the table rather than an empty `<Table.Body>`.” (https://vercel.com/geist/table)
|
|
124
124
|
* “After an async filter change, wrap the region in `aria-live="polite"` so screen readers announce the new state.” (https://vercel.com/geist/empty-state)
|
|
125
125
|
* Ours: empty sits outside the body, in a polite live region that stays in place so a filter that empties the table is announced.
|
|
@@ -133,7 +133,7 @@ function GroupHeading({ children, span }) {
|
|
|
133
133
|
* “Render `—` in cells where a value is unknown or not applicable. Don’t substitute `N/A`, `null`, or an empty string.” (https://vercel.com/geist/table)
|
|
134
134
|
* “Use the canonical short relative-time form in cells (`2m ago`, `5h ago`); switch to `Mar 14, 2026` past 7 days. See `Relative Time Card`.” (https://vercel.com/geist/table)
|
|
135
135
|
* “Pagination labels are `Previous` and `Next`. Page-count copy reads `Page 2 of 7` or `21–40 of 142` with an en-dash inside the range.” (https://vercel.com/geist/table)
|
|
136
|
-
* Ours: headings are sentence case nouns with their unit, "Cost (€)", "Tokens", where Geist writes Title Case. The words of a time and of Previous and Next are the product's catalogue, in both languages. The footer is a count or the paging, never a help sentence: guidance a step needs lives in that step. Totals and paging each stand in a footer zone of their own, the paging at the trailing edge; the summary row is a labelled total. Italian headings run a third longer and never wrap.
|
|
136
|
+
* Ours: headings are sentence case nouns with their unit, "Cost (€)", "Tokens", where Geist writes Title Case. The words of a time and of Previous and Next are the product's catalogue, in both languages. The footer is a count or the paging, never a help sentence: guidance a step needs lives in that step. Totals and paging each stand in a footer zone of their own, the paging at the trailing edge; the summary row is a labelled total, and the first cell of a row of totals names what it totals ("All files"). Italian headings run a third longer and never wrap.
|
|
137
137
|
* @access A native table named by `tableLabel`, which is required; `th scope="col"`; the record's name is the row's one link. A sorted column's heading carries `aria-sort`. `DataTableSkeleton` is busy and its placeholder table is hidden from assistive technology. Ours: a missing value is a hidden "—" with screen-reader text, never blank.
|
|
138
138
|
*/
|
|
139
139
|
export function DataTable(props) {
|
|
@@ -278,7 +278,12 @@ function RecordsTable({ kind, columns, data, getRowId, filterColumnId, filterPla
|
|
|
278
278
|
const size = sizeOf.get(column.id);
|
|
279
279
|
return (_jsx(TableCol, { style: size === undefined ? undefined : { width: size } }, column.id));
|
|
280
280
|
}) }), _jsx(TableHeader, { children: _jsx(TableRow, { children: headings.map((heading) => (_jsx(TableHead, { "aria-sort": sortOrder(heading.column.getIsSorted()), className: cn(isNumericColumn(heading.column) && "text-right tabular-nums", heading.column.columnDef.meta?.wraps === true && "last:text-left", heading.column.columnDef.meta?.centered === true &&
|
|
281
|
-
"text-center last:text-center"), children: heading.content }, heading.id))) }) }), records
|
|
281
|
+
"text-center last:text-center"), children: heading.content }, heading.id))) }) }), records, visibleColumns.some((column) => column.columnDef.footer !== undefined) ? (_jsx(TableFooter, { children: _jsx(TableRow, { children: table
|
|
282
|
+
.getFooterGroups()
|
|
283
|
+
.flatMap((footerGroup) => footerGroup.headers)
|
|
284
|
+
.map((footer) => (_jsx(TableCell, { className: cn(isNumericColumn(footer.column) && "text-right tabular-nums"), children: footer.isPlaceholder
|
|
285
|
+
? null
|
|
286
|
+
: flexRender(footer.column.columnDef.footer, footer.getContext()) }, footer.id))) }) })) : null] }))] }));
|
|
282
287
|
const actions = columnsControl || toolbarActions ? (_jsxs(_Fragment, { children: [columnsControl, toolbarActions] })) : null;
|
|
283
288
|
const tools = toolbar ?? {
|
|
284
289
|
label: filterPlaceholder ?? columnsLabel ?? tableLabel,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/components/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAWlE,OAAO,EAAE,KAAK,WAAW,EAAoB,MAAM,wBAAwB,CAAC;AAG5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,iBAAS,MAAM,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,EAAE,aAAa,CAAC,qBAE5E;AAED,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,OAAO,CAAC,KAAK,qBAEjE;AAED,iBAAS,YAAY,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,MAAM,CAAC,KAAK,qBAE/D;AAED,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,qBAE7D;AAED,KAAK,YAAY,GAAG,SAAS,GAAG,SAAS,CAAC;AAE1C,KAAK,kBAAkB,GAAG,eAAe,CAAC,QAAQ,CAAC,KAAK,GAAG;IACzD,MAAM,CAAC,EAAE,YAA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,CAAC,KAAK,CAAC,qBAYzE;AAED;;;;;;GAMG;AACH,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAYvE;AAED,KAAK,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GACpE,CACI;IAAE,eAAe,CAAC,EAAE,KAAK,CAAC;IAAC,UAAU,CAAC,EAAE,SAAS,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE;AAChF,4EAA4E;GAC1E;IAAE,eAAe,EAAE,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAC5E,CAAC;AAEJ,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,eAAe,EACf,UAAU,EACV,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,iBAAiB,qBAmBnB;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,qBASxE;AAED,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,WAAW,CAAC,KAAK,qBAYpF;AAED,OAAO,EACL,MAAM,EACN,UAAU,EACV,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAC"}
|
|
@@ -78,7 +78,7 @@ function DialogHeader({ className, ...props }) {
|
|
|
78
78
|
* the scroll container.
|
|
79
79
|
*/
|
|
80
80
|
function DialogBody({ className, ...props }) {
|
|
81
|
-
return (_jsx("div", { "data-slot": "dialog-body", className: cn("-mx-(--dialog-padding) flex min-h-0 flex-1 flex-col gap-nadicode-sm overflow-y-auto px-(--dialog-padding) group-data-[sticky=false]/dialog-content:shrink-0 group-data-[sticky=false]/dialog-content:overflow-y-visible group-data-[sticky=true]/dialog-content:-my-(--dialog-gap) group-data-[sticky=true]/dialog-content:py-(--dialog-padding)", className), ...props }));
|
|
81
|
+
return (_jsx("div", { "data-slot": "dialog-body", "data-nc-ui": "", className: cn("-mx-(--dialog-padding) flex min-h-0 flex-1 flex-col gap-nadicode-sm overflow-y-auto px-(--dialog-padding) group-data-[sticky=false]/dialog-content:shrink-0 group-data-[sticky=false]/dialog-content:overflow-y-visible group-data-[sticky=true]/dialog-content:-my-(--dialog-gap) group-data-[sticky=true]/dialog-content:py-(--dialog-padding)", className), ...props }));
|
|
82
82
|
}
|
|
83
83
|
function DialogFooter({ className, showCloseButton, closeLabel, children, ...props }) {
|
|
84
84
|
return (_jsxs("div", { "data-slot": "dialog-footer", "data-nc-ui": "", className: cn("-mx-(--dialog-padding) -mb-(--dialog-padding) flex shrink-0 flex-row justify-between gap-nadicode-md rounded-b-lg border-t border-border bg-recessed p-nadicode-sm group-data-[phone-layout=sheet]/dialog-content:max-sm:rounded-b-none group-data-[sticky=false]/dialog-content:sticky group-data-[sticky=false]/dialog-content:-bottom-(--dialog-padding) group-data-[sticky=false]/dialog-content:z-10 *:only:w-full **:data-[slot=button]:h-nadicode-control-height-sm **:data-[slot=button]:min-h-nadicode-control-height-sm **:data-[slot=button]:px-button-padding-inline-sm **:data-[slot=dialog-close]:h-nadicode-control-height-sm **:data-[slot=dialog-close]:min-h-nadicode-control-height-sm **:data-[slot=dialog-close]:px-button-padding-inline-sm", className), ...props, children: [showCloseButton ? (_jsx(DialogPrimitive.Close, { render: _jsx(Button, { variant: "outline" }), children: closeLabel })) : null, children] }));
|
|
@@ -62,7 +62,7 @@ type KpiCardProps = {
|
|
|
62
62
|
* @instead A figure read over time is a `ChartCard`, and a single figure is never nested inside one. A ratio beside two money measures is a `KpiCard` next to the chart, never a second axis. A level against a cap in a row or a card is `Progress`; as one of an overview's figures it is this card with `meter`, a 4 px bar under the value in the sparkline's place.
|
|
63
63
|
* @behaviour Label left and the change badge right on the first line, the value under them, the comparison in the footer. The footer is one line in every card of a row, so their dividers line up: the comparison and the note, joined, cut with an ellipsis when long and whole on hover. A figure with no comparison shows no badge and no empty footer. A figure that opens its owner (`render`) ends its label with a chevron. Colour sits only where it reads a fact: direction crossed with whether up is good sets the badge icon's tone (success, blocked, or grey for a flat or neutral measure), and `tone` marks the value itself as warning or critical when it crosses a threshold; the card, label and comparison stay neutral. The label keeps two lines, wrapped or not, and the value stands under them at the same height in either layout, so the values of a row sit level whichever layout each card takes. With `sparkline`, a tile: the label across the tile, the value under it with the change badge at its right, a 32 px line in `chart-1` across the card's width, then the comparison and the note in muted ink on up to two lines, which every tile of a row reserves, so the tiles' lines and comparisons sit at the same heights and nothing is cut at a five-tile row. A figure with no line or no comparison keeps the empty rows. With `meter`, the same tile with a 4 px bar in the line's place, centred in its 32 px row so it lines up with the tiles beside it: the neutral track, the fill in the action colour or the threshold `tone` the reading crossed, red past the maximum; an inline figure draws the same bar under its value. A card takes `meter` or `sparkline`, never both, and the type refuses both. The line loads on demand: a streaming server render and the browser draw it once it has loaded, and a synchronous `renderToString` leaves its row empty. While its page reads the figure, `KpiCardSkeleton` stands in its place: the same small card, the label's two lines, the value's line and, with `footer`, the footer's line, with no words; with `presentation="inline"`, the same lines with no card, inside the section that groups the figure (nadicode decision).
|
|
64
64
|
* @words The label names the measure in sentence case: "Active Agents", "Spend". The change is signed with a true minus and its unit ("+12.4%", "−1"), the comparison names the period: "vs 16 last week", "vs August 2026". No icon beside the label.
|
|
65
|
-
* @access The trend icon is hidden and the direction is read as a word in the reader's language (`directionLabel`). Figures use tabular digits. The value is text, never only colour. `KpiCardSkeleton` is busy and its bars are hidden from assistive technology.
|
|
65
|
+
* @access A figure that opens nothing is a group named by its label, so its value, its bar and its note are read as that label's; one that opens its owner is a link named by its label and its value. A `meter` is a progress bar named by its `label`, with its value read as a percentage. The trend icon is hidden and the direction is read as a word in the reader's language (`directionLabel`). Figures use tabular digits. The value is text, never only colour. `KpiCardSkeleton` is busy and its bars are hidden from assistive technology.
|
|
66
66
|
*/
|
|
67
67
|
declare function KpiCard({ label, value, delta, note, tone, render, presentation, sparkline, meter, }: KpiCardProps): React.JSX.Element;
|
|
68
68
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kpi-card.d.ts","sourceRoot":"","sources":["../../src/components/kpi-card.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAW3D,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEpE,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAQtF,KAAK,gBAAgB,GAAG,cAAc,CAAC;AACvC,KAAK,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAEtD,KAAK,YAAY,GAAG;IAClB,2CAA2C;IAC3C,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,qEAAqE;IACrE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sGAAsG;IACtG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0GAA0G;IAC1G,UAAU,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,2EAA2E;AAC3E,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,4FAA4F;IAC5F,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,wDAAwD;IACxD,KAAK,EAAE,MAAM,C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E,YAAY,qBA4Id;AAeD;;;;GAIG;AACH,iBAAS,eAAe,CAAC,EACvB,MAAc,EACd,YAAqB,GACtB,EAAE;IACD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC;CAC7C,qBA6BA;AAED,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -28,18 +28,20 @@ const VALUE_TONE_CLASS = {
|
|
|
28
28
|
* @instead A figure read over time is a `ChartCard`, and a single figure is never nested inside one. A ratio beside two money measures is a `KpiCard` next to the chart, never a second axis. A level against a cap in a row or a card is `Progress`; as one of an overview's figures it is this card with `meter`, a 4 px bar under the value in the sparkline's place.
|
|
29
29
|
* @behaviour Label left and the change badge right on the first line, the value under them, the comparison in the footer. The footer is one line in every card of a row, so their dividers line up: the comparison and the note, joined, cut with an ellipsis when long and whole on hover. A figure with no comparison shows no badge and no empty footer. A figure that opens its owner (`render`) ends its label with a chevron. Colour sits only where it reads a fact: direction crossed with whether up is good sets the badge icon's tone (success, blocked, or grey for a flat or neutral measure), and `tone` marks the value itself as warning or critical when it crosses a threshold; the card, label and comparison stay neutral. The label keeps two lines, wrapped or not, and the value stands under them at the same height in either layout, so the values of a row sit level whichever layout each card takes. With `sparkline`, a tile: the label across the tile, the value under it with the change badge at its right, a 32 px line in `chart-1` across the card's width, then the comparison and the note in muted ink on up to two lines, which every tile of a row reserves, so the tiles' lines and comparisons sit at the same heights and nothing is cut at a five-tile row. A figure with no line or no comparison keeps the empty rows. With `meter`, the same tile with a 4 px bar in the line's place, centred in its 32 px row so it lines up with the tiles beside it: the neutral track, the fill in the action colour or the threshold `tone` the reading crossed, red past the maximum; an inline figure draws the same bar under its value. A card takes `meter` or `sparkline`, never both, and the type refuses both. The line loads on demand: a streaming server render and the browser draw it once it has loaded, and a synchronous `renderToString` leaves its row empty. While its page reads the figure, `KpiCardSkeleton` stands in its place: the same small card, the label's two lines, the value's line and, with `footer`, the footer's line, with no words; with `presentation="inline"`, the same lines with no card, inside the section that groups the figure (nadicode decision).
|
|
30
30
|
* @words The label names the measure in sentence case: "Active Agents", "Spend". The change is signed with a true minus and its unit ("+12.4%", "−1"), the comparison names the period: "vs 16 last week", "vs August 2026". No icon beside the label.
|
|
31
|
-
* @access The trend icon is hidden and the direction is read as a word in the reader's language (`directionLabel`). Figures use tabular digits. The value is text, never only colour. `KpiCardSkeleton` is busy and its bars are hidden from assistive technology.
|
|
31
|
+
* @access A figure that opens nothing is a group named by its label, so its value, its bar and its note are read as that label's; one that opens its owner is a link named by its label and its value. A `meter` is a progress bar named by its `label`, with its value read as a percentage. The trend icon is hidden and the direction is read as a word in the reader's language (`directionLabel`). Figures use tabular digits. The value is text, never only colour. `KpiCardSkeleton` is busy and its bars are hidden from assistive technology.
|
|
32
32
|
*/
|
|
33
33
|
function KpiCard({ label, value, delta, note, tone = "default", render, presentation = "card", sparkline, meter, }) {
|
|
34
|
+
const labelId = React.useId();
|
|
35
|
+
const figure = render ? {} : { role: "group", "aria-labelledby": labelId };
|
|
34
36
|
if (presentation === "inline") {
|
|
35
|
-
return (_jsxs("div", { className: "grid min-w-0 content-start gap-2", "data-slot": "metric-summary", children: [_jsx("p", { className: "text-sm text-muted-foreground", children: label }), _jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx("p", { className: cn("text-2xl font-semibold tabular-nums", VALUE_TONE_CLASS[tone]), "data-kpi-value": "", children: value }), delta ? (_jsx(TrendBadge, { value: delta.value, direction: delta.direction, tone: trendTone(delta.direction, delta.upIsGood, delta.neutral), directionLabel: delta.directionLabel })) : null] }), meter ? _jsx(MeterBar, { meter: meter }) : null, delta ? _jsx("p", { className: "text-xs text-muted-foreground", children: delta.comparison }) : null, note ? _jsx("p", { className: "text-xs text-muted-foreground", children: note }) : null] }));
|
|
37
|
+
return (_jsxs("div", { className: "grid min-w-0 content-start gap-2", "data-slot": "metric-summary", ...figure, children: [_jsx("p", { className: "text-sm text-muted-foreground", id: labelId, children: label }), _jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx("p", { className: cn("text-2xl font-semibold tabular-nums", VALUE_TONE_CLASS[tone]), "data-kpi-value": "", children: value }), delta ? (_jsx(TrendBadge, { value: delta.value, direction: delta.direction, tone: trendTone(delta.direction, delta.upIsGood, delta.neutral), directionLabel: delta.directionLabel })) : null] }), meter ? _jsx(MeterBar, { meter: meter }) : null, delta ? _jsx("p", { className: "text-xs text-muted-foreground", children: delta.comparison }) : null, note ? _jsx("p", { className: "text-xs text-muted-foreground", children: note }) : null] }));
|
|
36
38
|
}
|
|
37
39
|
const footerLine = [delta?.comparison, note].filter(Boolean).join(" · ");
|
|
38
40
|
const badge = delta ? (_jsx(TrendBadge, { value: delta.value, direction: delta.direction, tone: trendTone(delta.direction, delta.upIsGood, delta.neutral), directionLabel: delta.directionLabel })) : null;
|
|
39
41
|
if (sparkline || meter) {
|
|
40
|
-
return (_jsx(Card, { size: "sm", "data-slot": "kpi-card", "data-tone": tone, render: render, variant: render ? "link" : "default", children: _jsxs(CardHeader, { className: "gap-y-1", children: [_jsxs(CardDescription, { className: "col-span-2 mb-1 flex min-h-10 min-w-0 items-start gap-0.5", children: [_jsx("span", { className: "line-clamp-2", children: label }), render ? _jsx(ChevronRight, { "aria-hidden": "true", className: "mt-0.5 size-4 shrink-0" }) : null] }), delta ? (_jsx(CardAction, { "data-kpi-delta": delta.direction, className: "row-span-1 row-start-2 self-center", children: badge })) : null, _jsx(CardTitle, { className: cn("col-start-1 row-start-2 min-w-0 truncate text-heading-md tabular-nums group-data-[size=sm]/card:text-heading-md", VALUE_TONE_CLASS[tone]), "data-kpi-value": "", children: value }), meter ? (_jsx("div", { "data-slot": "kpi-card-meter", className: "col-span-2 mt-1 flex h-8 min-w-0 items-center", children: _jsx(MeterBar, { meter: meter }) })) : (_jsx("div", { "data-slot": "kpi-card-sparkline", className: "col-span-2 mt-1 h-8 min-w-0", children: sparkline && sparkline.length > 1 ? (_jsx(React.Suspense, { fallback: null, children: _jsx(ChartSparkline, { data: sparkline, className: "h-8 w-full" }) })) : null })), _jsx("p", { "data-slot": "kpi-card-change", className: "col-span-2 mt-1 line-clamp-2 min-h-10 min-w-0 text-sm text-muted-foreground", title: footerLine || undefined, children: footerLine })] }) }));
|
|
42
|
+
return (_jsx(Card, { size: "sm", "data-slot": "kpi-card", "data-tone": tone, render: render, variant: render ? "link" : "default", ...figure, children: _jsxs(CardHeader, { className: "gap-y-1", children: [_jsxs(CardDescription, { className: "col-span-2 mb-1 flex min-h-10 min-w-0 items-start gap-0.5", children: [_jsx("span", { className: "line-clamp-2", id: labelId, children: label }), render ? _jsx(ChevronRight, { "aria-hidden": "true", className: "mt-0.5 size-4 shrink-0" }) : null] }), delta ? (_jsx(CardAction, { "data-kpi-delta": delta.direction, className: "row-span-1 row-start-2 self-center", children: badge })) : null, _jsx(CardTitle, { className: cn("col-start-1 row-start-2 min-w-0 truncate text-heading-md tabular-nums group-data-[size=sm]/card:text-heading-md", VALUE_TONE_CLASS[tone]), "data-kpi-value": "", children: value }), meter ? (_jsx("div", { "data-slot": "kpi-card-meter", className: "col-span-2 mt-1 flex h-8 min-w-0 items-center", children: _jsx(MeterBar, { meter: meter }) })) : (_jsx("div", { "data-slot": "kpi-card-sparkline", className: "col-span-2 mt-1 h-8 min-w-0", children: sparkline && sparkline.length > 1 ? (_jsx(React.Suspense, { fallback: null, children: _jsx(ChartSparkline, { data: sparkline, className: "h-8 w-full" }) })) : null })), _jsx("p", { "data-slot": "kpi-card-change", className: "col-span-2 mt-1 line-clamp-2 min-h-10 min-w-0 text-sm text-muted-foreground", title: footerLine || undefined, children: footerLine })] }) }));
|
|
41
43
|
}
|
|
42
|
-
return (_jsxs(Card, { size: "sm", "data-slot": "kpi-card", "data-tone": tone, render: render, variant: render ? "link" : "default", children: [_jsxs(CardHeader, { children: [_jsxs(CardDescription, { className: "flex min-h-10 items-start gap-0.5", children: [_jsx("span", { className: "line-clamp-2", children: label }), render ? _jsx(ChevronRight, { "aria-hidden": "true", className: "mt-0.5 size-4 shrink-0" }) : null] }), _jsx(CardTitle, { className: cn("text-heading-md tabular-nums group-data-[size=sm]/card:text-heading-md", VALUE_TONE_CLASS[tone]), "data-kpi-value": "", children: value }), delta ? _jsx(CardAction, { "data-kpi-delta": delta.direction, children: badge }) : null] }), delta || note ? (_jsx(CardFooter, { className: "flex-nowrap", children: _jsx("span", { className: "min-w-0 truncate", title: footerLine, children: footerLine }) })) : null] }));
|
|
44
|
+
return (_jsxs(Card, { size: "sm", "data-slot": "kpi-card", "data-tone": tone, render: render, variant: render ? "link" : "default", ...figure, children: [_jsxs(CardHeader, { children: [_jsxs(CardDescription, { className: "flex min-h-10 items-start gap-0.5", children: [_jsx("span", { className: "line-clamp-2", id: labelId, children: label }), render ? _jsx(ChevronRight, { "aria-hidden": "true", className: "mt-0.5 size-4 shrink-0" }) : null] }), _jsx(CardTitle, { className: cn("text-heading-md tabular-nums group-data-[size=sm]/card:text-heading-md", VALUE_TONE_CLASS[tone]), "data-kpi-value": "", children: value }), delta ? _jsx(CardAction, { "data-kpi-delta": delta.direction, children: badge }) : null] }), delta || note ? (_jsx(CardFooter, { className: "flex-nowrap", children: _jsx("span", { className: "min-w-0 truncate", title: footerLine, children: footerLine }) })) : null] }));
|
|
43
45
|
}
|
|
44
46
|
function MeterBar({ meter }) {
|
|
45
47
|
return (_jsx(Progress, { "aria-label": meter.label, className: "w-full", max: meter.max, size: "sm", tone: meter.tone, value: meter.value }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactElement, ReactNode } from "react";
|
|
2
|
-
import { type KpiCardProps } from "./kpi-card.js";
|
|
3
2
|
import { type NoticeBannerProps } from "./notice-banner.js";
|
|
3
|
+
import { type FigureCard } from "../internal/figure-cards.js";
|
|
4
4
|
type OverviewTitle = {
|
|
5
5
|
/** The page's title, when the product's chrome draws no path that names the page. */
|
|
6
6
|
title: string;
|
|
@@ -16,7 +16,7 @@ export type OverviewPageProps = OverviewTitle & {
|
|
|
16
16
|
/** On the title row, through PageActions. */
|
|
17
17
|
period?: ReactElement;
|
|
18
18
|
/** The figures, one row of equal cards, one column below md. */
|
|
19
|
-
figures?: readonly
|
|
19
|
+
figures?: readonly OverviewFigure[];
|
|
20
20
|
/**
|
|
21
21
|
* When nothing has happened yet: one line drawn in place of the figures and charts, such as "No
|
|
22
22
|
* commission yet this month." Given only when every figure would read zero.
|
|
@@ -27,11 +27,8 @@ export type OverviewPageProps = OverviewTitle & {
|
|
|
27
27
|
/** The exceptions that need a person, each opening its owner: a RecordList with its heading. */
|
|
28
28
|
exceptions?: ReactNode;
|
|
29
29
|
};
|
|
30
|
-
/** A figure's card props without its presentation, kept apart per kind, a bar or a sparkline. */
|
|
31
|
-
type WithoutPresentation<Props> = Props extends unknown ? Omit<Props, "presentation"> : never;
|
|
32
30
|
/** One figure of an overview: a `KpiCard`'s props without its presentation, with a bar or a sparkline. */
|
|
33
|
-
export type OverviewFigure =
|
|
34
|
-
type KpiFigure = OverviewFigure;
|
|
31
|
+
export type OverviewFigure = FigureCard;
|
|
35
32
|
/**
|
|
36
33
|
* The page that answers "what needs attention?": is anything wrong, and where.
|
|
37
34
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overview-page.d.ts","sourceRoot":"","sources":["../../src/components/overview-page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGrD,OAAO,
|
|
1
|
+
{"version":3,"file":"overview-page.d.ts","sourceRoot":"","sources":["../../src/components/overview-page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGrD,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAElF,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEvE,KAAK,aAAa,GACd;IACE,qFAAqF;IACrF,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB,GACD;IAAE,KAAK,CAAC,EAAE,SAAS,CAAC;IAAC,WAAW,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAE/C,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG;IAC9C,mGAAmG;IACnG,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,6CAA6C;IAC7C,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,gEAAgE;IAChE,OAAO,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;IACpC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mEAAmE;IACnE,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,gGAAgG;IAChG,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB,CAAC;AAEF,0GAA0G;AAC1G,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC;AAIxC;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,WAAW,EACX,MAAM,EACN,OAAoB,EACpB,UAAU,EACV,MAAM,EACN,UAAU,EACV,MAAM,GACP,EAAE,iBAAiB,+BAoBnB"}
|
|
@@ -1,19 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { CardRow } from "./card-row.js";
|
|
4
|
-
import { KpiCard } from "./kpi-card.js";
|
|
5
3
|
import { PageActions, PageActionsHostProvider } from "./page-actions.js";
|
|
6
4
|
import { NoticeBanner } from "./notice-banner.js";
|
|
7
5
|
import { PageHeader } from "./page-header.js";
|
|
8
|
-
|
|
9
|
-
if (count === 2 || count === 3 || count === 4 || count === 5)
|
|
10
|
-
return count;
|
|
11
|
-
if (count === 6)
|
|
12
|
-
return 3;
|
|
13
|
-
if (count > 6)
|
|
14
|
-
return 4;
|
|
15
|
-
return "auto";
|
|
16
|
-
}
|
|
6
|
+
import { FigureCards } from "../internal/figure-cards.js";
|
|
17
7
|
const NO_FIGURES = [];
|
|
18
8
|
/**
|
|
19
9
|
* The page that answers "what needs attention?": is anything wrong, and where.
|
|
@@ -26,6 +16,6 @@ const NO_FIGURES = [];
|
|
|
26
16
|
* @access Each chart card is a named section at the page's heading level, and the exceptions carry their own heading; figures are text, never colour alone.
|
|
27
17
|
*/
|
|
28
18
|
export function OverviewPage({ title, description, period, figures = NO_FIGURES, nothingYet, charts, exceptions, notice, }) {
|
|
29
|
-
const page = (_jsxs("div", { "data-slot": "overview-page", className: "grid min-w-0 gap-6", children: [title ? _jsx(PageHeader, { description: description, title: title }) : null, _jsx(PageActions, { period: period }), notice ? _jsx(NoticeBanner, { ...notice }) : null, nothingYet ? (_jsx("p", { className: "text-muted-foreground nc-type-body-sm", "data-slot": "overview-nothing-yet", children: nothingYet })) : (_jsxs(_Fragment, { children: [figures.length > 0 ?
|
|
19
|
+
const page = (_jsxs("div", { "data-slot": "overview-page", className: "grid min-w-0 gap-6", children: [title ? _jsx(PageHeader, { description: description, title: title }) : null, _jsx(PageActions, { period: period }), notice ? _jsx(NoticeBanner, { ...notice }) : null, nothingYet ? (_jsx("p", { className: "text-muted-foreground nc-type-body-sm", "data-slot": "overview-nothing-yet", children: nothingYet })) : (_jsxs(_Fragment, { children: [figures.length > 0 ? _jsx(FigureCards, { figures: figures }) : null, charts] })), exceptions] }));
|
|
30
20
|
return title ? _jsx(PageActionsHostProvider, { children: page }) : page;
|
|
31
21
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type KpiCardProps } from "../components/kpi-card.js";
|
|
2
|
+
type WithoutPresentation<Props> = Props extends unknown ? Omit<Props, "presentation"> : never;
|
|
3
|
+
export type FigureCard = WithoutPresentation<KpiCardProps>;
|
|
4
|
+
export declare function FigureCards({ figures }: {
|
|
5
|
+
figures: readonly FigureCard[];
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=figure-cards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"figure-cards.d.ts","sourceRoot":"","sources":["../../src/internal/figure-cards.tsx"],"names":[],"mappings":"AACA,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEnE,KAAK,mBAAmB,CAAC,KAAK,IAAI,KAAK,SAAS,OAAO,GAAG,IAAI,CAAC,KAAK,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC;AAC9F,MAAM,MAAM,UAAU,GAAG,mBAAmB,CAAC,YAAY,CAAC,CAAC;AAS3D,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,SAAS,UAAU,EAAE,CAAA;CAAE,+BAQ1E"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { CardRow } from "../components/card-row.js";
|
|
3
|
+
import { KpiCard } from "../components/kpi-card.js";
|
|
4
|
+
function figureColumns(count) {
|
|
5
|
+
if (count === 2 || count === 3 || count === 4 || count === 5)
|
|
6
|
+
return count;
|
|
7
|
+
if (count === 6)
|
|
8
|
+
return 3;
|
|
9
|
+
if (count > 6)
|
|
10
|
+
return 4;
|
|
11
|
+
return "auto";
|
|
12
|
+
}
|
|
13
|
+
export function FigureCards({ figures }) {
|
|
14
|
+
return (_jsx(CardRow, { columns: figureColumns(figures.length), from: "md", children: figures.map((figure) => (_jsx(KpiCard, { ...figure }, figure.label))) }));
|
|
15
|
+
}
|
|
@@ -98,9 +98,9 @@ export const USAGE = [
|
|
|
98
98
|
summary: "A page whose job is a list of records: its title with the page's actions on one row, or, where no title is drawn, its actions at the end of its search row; its sibling collections, one toolbar, then one line per record.",
|
|
99
99
|
when: "“Use `<Entity>` for a row of descriptive content paired with one or two controls (member rows, integration rows, domain rows).” (https://vercel.com/geist/entity) Ours: a list of things a person finds one of, opens and acts on: Customers, Member accounts, Agents, Skills, Apps, MCP servers, Mailboxes, domains, environment variables (a row with an `editor` expands into its form). Its rows are a `RecordList`'s, so a row has a mark, a name over a muted line and the facts a person reads to choose one, each naming itself, with no heading row (owner, 2026-11-08). Ours: Customers and Partners use the full-width list, with actionable attention above the toolbar when present. Business summaries belong on Dashboard and Analytics. A rail remains available for context that belongs to the collection itself, such as the selected Library hub.",
|
|
100
100
|
instead: "“For tabular data with sortable columns and shared row shape, use `Table` instead.” (https://vercel.com/geist/entity) Ours: rows that are not things a person opens but lines of figures read under their headings, such as usage per product or invoices, are a `DataTable` under the page's own title and toolbar (owner, 2026-11-08). A list inside another page's section is a `RecordList` with its `heading`.",
|
|
101
|
-
behaviour: "The page supplies its records and their commands as data, never its own toolbar, table, rows or menus. Title or none, as the product decides it: where no title is drawn over the page, as under `ProductShell`, whose path names the page and whose title stays unseen, the page's actions end its search row, after the filters, whatever they do (owner, 2026-11-08); where a title is drawn (`PageActionsHostProvider`'s `titled`, as a `PageFrame` with its `title`, or this composition's own `title`), every action stands on the title's row. The product says which, never what the page shows at the moment, so an issue appearing above the list never moves the actions. With a `rail`, the toolbar spans the page and under it stand two columns from 1280 px: the rail, 300 px, then the records' card, its top level with the rail's first title and named by the page's title alone, never a second heading, and the records' rows are `RecordList`'s `line` rows; below 1280 px the records come first and the rail follows them. Each rail card has its title above it at 16 px, an optional 44 px muted summary row with its one outline button at its end (a button never stands in a row of its own, so a card with an `action` has a `summary`), then its items: a figure is one 36 px row, its title and its number at the trailing edge; a record is its 24 px mark, a title over a muted line that wraps to a second before it is cut, and a figure or a status at its end, the whole item opening its record; a card with no items draws its `empty` inside it as one 44 px row like an item. While the rail's read is in flight a card's `items` are undefined and it holds its place with three placeholder lines, so the two columns stand from the first frame; a rail whose read `failed` is one card saying so, and the records beside it stay. Under the title sits only the `description`, when the collection's kind needs explaining; otherwise nothing. The page's title names the collection once, and the records' card never adds a header that only describes it. The actions are drawn from `actions` in `PageActions`' order. The primary stays where they stand whether the collection is empty or not, filled; a first use repeats it as the filled button in its card. The page's actions stay where they stand whichever tab is shown, each tab's collection given the same `actions`; the toolbar belongs to the tab shown, and switching clears its search and page. One toolbar holds the search, which grows, then the filters, then the sort; it shows while there are records, a search or filter is set, or a facet hides records while unset (`hidesWhileUnset`, as the archived companies), and is glass only where the rows scroll under it. While a new search, filter or sort is read, the toolbar is busy and, after a second, shows the one waiting line, while the last rows stay. The toolbar is the kit's `FilterToolbar`, the one `DataTable` draws too, so its order, its waiting line and its search's wait for the page to be interactive are the same over every list (nadicode decision). The rows, their states and their loading are the RecordList's; no match is offered only in those same cases, so records a facet hides by default are always one choice away.",
|
|
102
|
-
words: '“For multi-facet filters use the plural template `No {Items} Match Your Filters` and suggest widening or clearing.” (https://vercel.com/geist/empty-state) Ours: every string is the product\'s, in sentence case. The title names the collection in the plural ("Agents"); the search says what it finds ("Find a skill"); no match says what found nothing and offers to clear it ("Clear search", "Clear filters").',
|
|
103
|
-
access: "“After an async filter change, wrap the region in `aria-live=\"polite\"` so screen readers announce the new state.” (https://vercel.com/geist/empty-state) Ours: the rows' region is the RecordList's, which holds it. The title is the page's h1 when the composition draws it. The toolbar is named by `label` and busy while `pending`; the rows are the RecordList's table, named by `label`.",
|
|
101
|
+
behaviour: "The page supplies its records and their commands as data, never its own toolbar, table, rows or menus. Title or none, as the product decides it: where no title is drawn over the page, as under `ProductShell`, whose path names the page and whose title stays unseen, the page's actions end its search row, after the filters, whatever they do (owner, 2026-11-08); where a title is drawn (`PageActionsHostProvider`'s `titled`, as a `PageFrame` with its `title`, or this composition's own `title`), every action stands on the title's row. The product says which, never what the page shows at the moment, so an issue appearing above the list never moves the actions. With a `rail`, the toolbar spans the page and under it stand two columns from 1280 px: the rail, 300 px, then the records' card, its top level with the rail's first title and named by the page's title alone, never a second heading, and the records' rows are `RecordList`'s `line` rows; below 1280 px the records come first and the rail follows them. Each rail card has its title above it at 16 px, an optional 44 px muted summary row with its one outline button at its end (a button never stands in a row of its own, so a card with an `action` has a `summary`), then its items: a figure is one 36 px row, its title and its number at the trailing edge; a record is its 24 px mark, a title over a muted line that wraps to a second before it is cut, and a figure or a status at its end, the whole item opening its record; a card with no items draws its `empty` inside it as one 44 px row like an item. While the rail's read is in flight a card's `items` are undefined and it holds its place with three placeholder lines, so the two columns stand from the first frame; a rail whose read `failed` is one card saying so, and the records beside it stay. Under the title sits only the `description`, when the collection's kind needs explaining; otherwise nothing. The page's title names the collection once, and the records' card never adds a header that only describes it. The actions are drawn from `actions` in `PageActions`' order. The primary stays where they stand whether the collection is empty or not, filled; a first use repeats it as the filled button in its card. The page's actions stay where they stand whichever tab is shown, each tab's collection given the same `actions`; the toolbar belongs to the tab shown, and switching clears its search and page. With `figures`, the figures of the whole collection stand under the tabs, above `attention` and the toolbar: one row of equal `KpiCard`s, laid out as `OverviewPage` lays out its figures, so how far the whole collection has got is read before its rows, as Nadia's Brain reads Searchable, Not read and Model usage over its folders; they belong to the tab shown, and while the collection has no records and no search or filter is set they are left out, so a first use reads its empty state alone (nadicode decision). Figures beside the records, in a column of their own, are the `rail`'s. One toolbar holds the search, which grows, then the filters, then the sort; it shows while there are records, a search or filter is set, or a facet hides records while unset (`hidesWhileUnset`, as the archived companies), and is glass only where the rows scroll under it. While a new search, filter or sort is read, the toolbar is busy and, after a second, shows the one waiting line, while the last rows stay. The toolbar is the kit's `FilterToolbar`, the one `DataTable` draws too, so its order, its waiting line and its search's wait for the page to be interactive are the same over every list (nadicode decision). The rows, their states and their loading are the RecordList's; no match is offered only in those same cases, so records a facet hides by default are always one choice away.",
|
|
102
|
+
words: '“For multi-facet filters use the plural template `No {Items} Match Your Filters` and suggest widening or clearing.” (https://vercel.com/geist/empty-state) Ours: every string is the product\'s, in sentence case. The title names the collection in the plural ("Agents"); a figure\'s label names its measure over the whole collection ("Searchable"), its value the count ("61,930") and its note what the count is of ("of 82,248 files · 17,169 in line"); the search says what it finds ("Find a skill"); no match says what found nothing and offers to clear it ("Clear search", "Clear filters").',
|
|
103
|
+
access: "“After an async filter change, wrap the region in `aria-live=\"polite\"` so screen readers announce the new state.” (https://vercel.com/geist/empty-state) Ours: the rows' region is the RecordList's, which holds it. The title is the page's h1 when the composition draws it. Each figure is read as its `KpiCard`'s usage page says, its label naming its value and its bar. The toolbar is named by `label` and busy while `pending`; the rows are the RecordList's table, named by `label`.",
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
106
|
name: "CollectionToolbar",
|
|
@@ -1407,8 +1407,8 @@ export const USAGE = [
|
|
|
1407
1407
|
summary: "Lines of figures read and compared: the same figures on every row, read down a column under its heading and across a row, inside their `TableCard`.",
|
|
1408
1408
|
when: "“Use `<Table>` for tabular data where rows share the same shape and at least one column is sortable or comparable across rows.” (https://vercel.com/geist/table) Ours: if each row is a thing you can open, it is a list; if each row is a line of numbers you read, it is a table (owner, 2026-11-08). This is the table: its rows are not things a person opens but lines of figures read and compared, such as usage per product, the amounts in a statement or invoices. It has a visible heading row, because a number means nothing without its label, and at least one column is a figure.",
|
|
1409
1409
|
instead: "“For a row of descriptive content paired with a single action (membership row, integration row), use `Entity` instead.” (https://vercel.com/geist/table) “For a key/value metadata block on a detail page, use `Description`, not a two-column table.” (https://vercel.com/geist/table) Ours: Geist's `Entity` is a `RecordList` row: a row that is one thing with a name a person opens, such as a deployment, a Customer, a Member account or an Agent, is a `RecordList`'s, however many facts it shows (owner, 2026-11-08). Its `Description` is `ObjectFacts`. A list on a page of its own is a `CollectionPage`. A descriptive list is `ItemGroup`.",
|
|
1410
|
-
behaviour: "Every column has a `header`; a column without one does not compile. The headings are always visible, medium weight in the cells' body grey, 48 px high, with 12 px of room under the labels and then the rule, so the first row starts at the rule like every other; rows are 40 px. Each column is at least its definition's `size`, in pixels, and as wide as its longest value, whose words stay on one line unless the column `wraps`; a column marked `identifier` holds ids or paths and is cut in the middle. The last column trails unless it `wraps` or is `centered`; a `centered` column's heading and values sit in the middle of it. Records are divided by a 1 px rule, none after the last. The first and last columns stand in from the card's edges by the card's spacing, so the first lines up with the title. Records of several kinds stand in one table under `group` headings: a heading row that spans the columns, in ink, medium text, 36 px high with the same rule under it, one per group in the order the groups first appear, never a second table; a heading is the group's name and carries no figure of its own. A row that opens a record takes `accent` on hover, and any row on focus within and while its menu is open; a row that opens nothing never reacts to hover. A selected row takes `muted`; headers and footers never highlight and carry no fill. On a card narrower than its columns a table of figures keeps every column and scrolls sideways inside its card, as Geist's and shadcn's tables do (owner, 2026-11-08); a document's table, such as a legal page's, takes the `wraps` option on its columns, so their words wrap and the row grows. A bounded page's paging stands in the card's footer strip at its trailing edge, opposite `footer`, which stands at the leading edge: its `status` (\"Page 2 of 7\") before Previous and Next, which are the product's router links (`previousLink`, `nextLink`) when each page is its own address, and buttons otherwise; the one that leads nowhere stays, disabled. A note about the whole table is `footerNote`, in a strip of its own under that one: one muted line, an optional *Learn more* after it at the left and one secondary action at the right; it is the one place a table says a sentence. Colour is neutral: headings and cells in the body grey, no hue, except a status badge or a tone the cell itself carries. “When the underlying list is empty (filter cleared, never created), render `Empty State` outside the table rather than an empty `<Table.Body>`.” (https://vercel.com/geist/table) “After an async filter change, wrap the region in `aria-live=\"polite\"` so screen readers announce the new state.” (https://vercel.com/geist/empty-state) Ours: empty sits outside the body, in a polite live region that stays in place so a filter that empties the table is announced. Ours: a table that is the page's job under its title takes the page's `notice`, one `NoticeBanner` above its toolbar, 12 px over it, as a collection page places it under the title: a refresh of the rows that failed, with Try again (nadicode decision). Ours: the table draws its own toolbar, a `FilterToolbar`: from `toolbar` for a registry whose search, filters and sort the product keeps (the URL), or else its own local search; the column menu and `toolbarActions` end it. A product never draws a table's toolbar itself. While the page reads the rows, `DataTableSkeleton` stands in the table's place: the same card, a heading row and the given number of rows at the table's heights, the columns after the second leaving it below 640 px, with no words (nadicode decision). “Sortable column headers are buttons. The visible label stays Title Case; the sort-direction arrow is decorative and the button announces the next sort state to assistive tech.” (https://vercel.com/geist/table) Ours: the order has one owner, the app's `sorting`, which the URL holds and a `CollectionSort` above the list sets, so no heading is a button and every page of a paged list follows one order. “Apply `tabular-nums` (or Geist Mono) to numeric columns so digits align across rows for comparison.” (https://vercel.com/geist/table) Ours: a numeric column trails in tabular figures.",
|
|
1411
|
-
words: '“Column headers (`<Table.Head>`) are Title Case nouns or noun phrases: `Last Used`, `Requests (7d)`, `Created`, `Status`. Never sentences.” (https://vercel.com/geist/table) “Render `—` in cells where a value is unknown or not applicable. Don’t substitute `N/A`, `null`, or an empty string.” (https://vercel.com/geist/table) “Use the canonical short relative-time form in cells (`2m ago`, `5h ago`); switch to `Mar 14, 2026` past 7 days. See `Relative Time Card`.” (https://vercel.com/geist/table) “Pagination labels are `Previous` and `Next`. Page-count copy reads `Page 2 of 7` or `21–40 of 142` with an en-dash inside the range.” (https://vercel.com/geist/table) Ours: headings are sentence case nouns with their unit, "Cost (€)", "Tokens", where Geist writes Title Case. The words of a time and of Previous and Next are the product\'s catalogue, in both languages. The footer is a count or the paging, never a help sentence: guidance a step needs lives in that step. Totals and paging each stand in a footer zone of their own, the paging at the trailing edge; the summary row is a labelled total. Italian headings run a third longer and never wrap.',
|
|
1410
|
+
behaviour: "Every column has a `header`; a column without one does not compile. The headings are always visible, medium weight in the cells' body grey, 48 px high, with 12 px of room under the labels and then the rule, so the first row starts at the rule like every other; rows are 40 px. Each column is at least its definition's `size`, in pixels, and as wide as its longest value, whose words stay on one line unless the column `wraps`; a column marked `identifier` holds ids or paths and is cut in the middle. The last column trails unless it `wraps` or is `centered`; a `centered` column's heading and values sit in the middle of it. Records are divided by a 1 px rule, none after the last. The first and last columns stand in from the card's edges by the card's spacing, so the first lines up with the title. Records of several kinds stand in one table under `group` headings: a heading row that spans the columns, in ink, medium text, 36 px high with the same rule under it, one per group in the order the groups first appear, never a second table; a heading is the group's name and carries no figure of its own. A row that opens a record takes `accent` on hover, and any row on focus within and while its menu is open; a row that opens nothing never reacts to hover. A selected row takes `muted`; headers and footers never highlight and carry no fill. On a card narrower than its columns a table of figures keeps every column and scrolls sideways inside its card, as Geist's and shadcn's tables do (owner, 2026-11-08); a document's table, such as a legal page's, takes the `wraps` option on its columns, so their words wrap and the row grows. A bounded page's paging stands in the card's footer strip at its trailing edge, opposite `footer`, which stands at the leading edge: its `status` (\"Page 2 of 7\") before Previous and Next, which are the product's router links (`previousLink`, `nextLink`) when each page is its own address, and buttons otherwise; the one that leads nowhere stays, disabled. A note about the whole table is `footerNote`, in a strip of its own under that one: one muted line, an optional *Learn more* after it at the left and one secondary action at the right; it is the one place a table says a sentence. A column's `footer` is its total: when a shown column has one, a row of totals closes the table under a rule, in ink, medium text, each total under its own column, a figure trailing in tabular digits like the column's values, the first column's footer naming the row, and a column with no total leaving its cell empty. One total with no column of its own is `summary`, under the table at its trailing edge, where it reads as the last column's; a total of another column is that column's `footer` (nadicode decision). Colour is neutral: headings and cells in the body grey, no hue, except a status badge or a tone the cell itself carries. “When the underlying list is empty (filter cleared, never created), render `Empty State` outside the table rather than an empty `<Table.Body>`.” (https://vercel.com/geist/table) “After an async filter change, wrap the region in `aria-live=\"polite\"` so screen readers announce the new state.” (https://vercel.com/geist/empty-state) Ours: empty sits outside the body, in a polite live region that stays in place so a filter that empties the table is announced. Ours: a table that is the page's job under its title takes the page's `notice`, one `NoticeBanner` above its toolbar, 12 px over it, as a collection page places it under the title: a refresh of the rows that failed, with Try again (nadicode decision). Ours: the table draws its own toolbar, a `FilterToolbar`: from `toolbar` for a registry whose search, filters and sort the product keeps (the URL), or else its own local search; the column menu and `toolbarActions` end it. A product never draws a table's toolbar itself. While the page reads the rows, `DataTableSkeleton` stands in the table's place: the same card, a heading row and the given number of rows at the table's heights, the columns after the second leaving it below 640 px, with no words (nadicode decision). “Sortable column headers are buttons. The visible label stays Title Case; the sort-direction arrow is decorative and the button announces the next sort state to assistive tech.” (https://vercel.com/geist/table) Ours: the order has one owner, the app's `sorting`, which the URL holds and a `CollectionSort` above the list sets, so no heading is a button and every page of a paged list follows one order. “Apply `tabular-nums` (or Geist Mono) to numeric columns so digits align across rows for comparison.” (https://vercel.com/geist/table) Ours: a numeric column trails in tabular figures.",
|
|
1411
|
+
words: '“Column headers (`<Table.Head>`) are Title Case nouns or noun phrases: `Last Used`, `Requests (7d)`, `Created`, `Status`. Never sentences.” (https://vercel.com/geist/table) “Render `—` in cells where a value is unknown or not applicable. Don’t substitute `N/A`, `null`, or an empty string.” (https://vercel.com/geist/table) “Use the canonical short relative-time form in cells (`2m ago`, `5h ago`); switch to `Mar 14, 2026` past 7 days. See `Relative Time Card`.” (https://vercel.com/geist/table) “Pagination labels are `Previous` and `Next`. Page-count copy reads `Page 2 of 7` or `21–40 of 142` with an en-dash inside the range.” (https://vercel.com/geist/table) Ours: headings are sentence case nouns with their unit, "Cost (€)", "Tokens", where Geist writes Title Case. The words of a time and of Previous and Next are the product\'s catalogue, in both languages. The footer is a count or the paging, never a help sentence: guidance a step needs lives in that step. Totals and paging each stand in a footer zone of their own, the paging at the trailing edge; the summary row is a labelled total, and the first cell of a row of totals names what it totals ("All files"). Italian headings run a third longer and never wrap.',
|
|
1412
1412
|
access: 'A native table named by `tableLabel`, which is required; `th scope="col"`; the record\'s name is the row\'s one link. A sorted column\'s heading carries `aria-sort`. `DataTableSkeleton` is busy and its placeholder table is hidden from assistive technology. Ours: a missing value is a hidden "—" with screen-reader text, never blank.',
|
|
1413
1413
|
},
|
|
1414
1414
|
{
|
|
@@ -2069,7 +2069,7 @@ export const USAGE = [
|
|
|
2069
2069
|
instead: "A figure read over time is a `ChartCard`, and a single figure is never nested inside one. A ratio beside two money measures is a `KpiCard` next to the chart, never a second axis. A level against a cap in a row or a card is `Progress`; as one of an overview's figures it is this card with `meter`, a 4 px bar under the value in the sparkline's place.",
|
|
2070
2070
|
behaviour: "Label left and the change badge right on the first line, the value under them, the comparison in the footer. The footer is one line in every card of a row, so their dividers line up: the comparison and the note, joined, cut with an ellipsis when long and whole on hover. A figure with no comparison shows no badge and no empty footer. A figure that opens its owner (`render`) ends its label with a chevron. Colour sits only where it reads a fact: direction crossed with whether up is good sets the badge icon's tone (success, blocked, or grey for a flat or neutral measure), and `tone` marks the value itself as warning or critical when it crosses a threshold; the card, label and comparison stay neutral. The label keeps two lines, wrapped or not, and the value stands under them at the same height in either layout, so the values of a row sit level whichever layout each card takes. With `sparkline`, a tile: the label across the tile, the value under it with the change badge at its right, a 32 px line in `chart-1` across the card's width, then the comparison and the note in muted ink on up to two lines, which every tile of a row reserves, so the tiles' lines and comparisons sit at the same heights and nothing is cut at a five-tile row. A figure with no line or no comparison keeps the empty rows. With `meter`, the same tile with a 4 px bar in the line's place, centred in its 32 px row so it lines up with the tiles beside it: the neutral track, the fill in the action colour or the threshold `tone` the reading crossed, red past the maximum; an inline figure draws the same bar under its value. A card takes `meter` or `sparkline`, never both, and the type refuses both. The line loads on demand: a streaming server render and the browser draw it once it has loaded, and a synchronous `renderToString` leaves its row empty. While its page reads the figure, `KpiCardSkeleton` stands in its place: the same small card, the label's two lines, the value's line and, with `footer`, the footer's line, with no words; with `presentation=\"inline\"`, the same lines with no card, inside the section that groups the figure (nadicode decision).",
|
|
2071
2071
|
words: 'The label names the measure in sentence case: "Active Agents", "Spend". The change is signed with a true minus and its unit ("+12.4%", "−1"), the comparison names the period: "vs 16 last week", "vs August 2026". No icon beside the label.',
|
|
2072
|
-
access: "The trend icon is hidden and the direction is read as a word in the reader's language (`directionLabel`). Figures use tabular digits. The value is text, never only colour. `KpiCardSkeleton` is busy and its bars are hidden from assistive technology.",
|
|
2072
|
+
access: "A figure that opens nothing is a group named by its label, so its value, its bar and its note are read as that label's; one that opens its owner is a link named by its label and its value. A `meter` is a progress bar named by its `label`, with its value read as a percentage. The trend icon is hidden and the direction is read as a word in the reader's language (`directionLabel`). Figures use tabular digits. The value is text, never only colour. `KpiCardSkeleton` is busy and its bars are hidden from assistive technology.",
|
|
2073
2073
|
},
|
|
2074
2074
|
{
|
|
2075
2075
|
name: "TrendBadge",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadicodeai/ui",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.262",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#jsx": "./src/jsx/index.ts",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"@headless-tree/react": "1.8.0",
|
|
83
83
|
"@iconify-icons/logos": "^2.0.3",
|
|
84
84
|
"@iconify/react": "^6.0.2",
|
|
85
|
-
"@nadicodeai/design-system": "12.1.
|
|
85
|
+
"@nadicodeai/design-system": "12.1.262",
|
|
86
86
|
"@tanstack/react-table": "^9.3.1",
|
|
87
87
|
"@vgpu/wgsl": "0.6.0",
|
|
88
88
|
"class-variance-authority": "^0.7.1",
|