@nadicodeai/ui 12.1.195 → 12.1.197
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/chart-ranking.d.ts +1 -1
- package/dist/components/chart-ranking.d.ts.map +1 -1
- package/dist/components/chart-ranking.js +4 -2
- package/dist/components/overview-page.d.ts +13 -3
- package/dist/components/overview-page.d.ts.map +1 -1
- package/dist/components/overview-page.js +6 -4
- package/dist/components/record-identity.d.ts +3 -2
- package/dist/components/record-identity.d.ts.map +1 -1
- package/dist/components/record-identity.js +4 -2
- package/dist/components/record-list.d.ts +12 -8
- package/dist/components/record-list.d.ts.map +1 -1
- package/dist/components/record-list.js +2 -2
- package/dist/components/sidebar.d.ts +9 -2
- package/dist/components/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar.js +3 -3
- package/dist/components/table.js +1 -1
- package/dist/internal/table-compact-line.d.ts +10 -3
- package/dist/internal/table-compact-line.d.ts.map +1 -1
- package/dist/internal/table-compact-line.js +13 -4
- package/dist/showcase/usage.generated.js +4 -4
- package/package.json +2 -2
|
@@ -13,7 +13,7 @@ type ChartRankingRow = {
|
|
|
13
13
|
* @family Charts
|
|
14
14
|
* @when A chart summary needs a ranking beside its plot.
|
|
15
15
|
* @instead Exact breakdown columns belong in a DataTable. This list compares shares of one nonnegative total.
|
|
16
|
-
* @behaviour Shows the first five rows and an optional aggregate remainder, each identity and figure above its coloured share bar. The remainder identifies the neutral plot segment; View all expands the named entities rather than repeating their aggregate. View all opens the complete supplied ranking in a dialog. Rows arrive already sorted and share one total and colour map with the chart.
|
|
16
|
+
* @behaviour Shows the first five rows and an optional aggregate remainder, each identity and figure above its coloured share bar. The remainder identifies the neutral plot segment; View all expands the named entities rather than repeating their aggregate. View all stands only when more rows exist than the five shown, and opens the complete supplied ranking in a dialog. Rows arrive already sorted and share one total and colour map with the chart.
|
|
17
17
|
* @words The product supplies the title, metric description, View all count, dialog description and close label.
|
|
18
18
|
* @access Each share bar is named by its entity. The dialog is named by the ranking title and retains the selected period and metric.
|
|
19
19
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-ranking.d.ts","sourceRoot":"","sources":["../../src/components/chart-ranking.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAS,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI9C,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"chart-ranking.d.ts","sourceRoot":"","sources":["../../src/components/chart-ranking.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAS,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI9C,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAepF,KAAK,eAAe,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAsCF;;;;;;;;;GASG;AACH,iBAAS,YAAY,CAAC,EACpB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,SAAS,EACT,KAAK,EACL,cAAc,EACd,UAAU,GACX,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,IAAI,EAAE,SAAS,eAAe,EAAE,CAAC;IACjC,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,cAAc,CAAC;IAC/B,UAAU,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;CACxE,+BAuCA;AAED,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,YAAY,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -6,6 +6,8 @@ import { Button } from "./button.js";
|
|
|
6
6
|
import { entityColor } from "./chart-entity-colors.js";
|
|
7
7
|
import { Dialog, DialogBody, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger, } from "./dialog.js";
|
|
8
8
|
import { Progress } from "./progress.js";
|
|
9
|
+
/** The leading rows the card shows; the rest wait behind View all. */
|
|
10
|
+
const SHOWN = 5;
|
|
9
11
|
function RankingRows({ rows, title, total, entityColorMap, }) {
|
|
10
12
|
const id = useId();
|
|
11
13
|
return (_jsx("ol", { "aria-label": title, className: "flex min-w-0 flex-col gap-4", children: rows.map((row, index) => (_jsxs("li", { className: "flex min-w-0 flex-col gap-2", children: [_jsxs("div", { className: "flex min-w-0 items-center justify-between gap-3 text-sm", children: [_jsx("span", { id: `${id}-${index}`, className: "min-w-0 truncate", children: row.label }), _jsx("span", { className: "shrink-0 tabular-nums", title: row.exactDisplay, children: row.display })] }), _jsx(Progress, { "aria-labelledby": `${id}-${index}`, value: total > 0 ? (row.value / total) * 100 : 0, indicatorColor: entityColor(entityColorMap, row.id), size: "sm" })] }, row.id))) }));
|
|
@@ -16,12 +18,12 @@ function RankingRows({ rows, title, total, entityColorMap, }) {
|
|
|
16
18
|
* @family Charts
|
|
17
19
|
* @when A chart summary needs a ranking beside its plot.
|
|
18
20
|
* @instead Exact breakdown columns belong in a DataTable. This list compares shares of one nonnegative total.
|
|
19
|
-
* @behaviour Shows the first five rows and an optional aggregate remainder, each identity and figure above its coloured share bar. The remainder identifies the neutral plot segment; View all expands the named entities rather than repeating their aggregate. View all opens the complete supplied ranking in a dialog. Rows arrive already sorted and share one total and colour map with the chart.
|
|
21
|
+
* @behaviour Shows the first five rows and an optional aggregate remainder, each identity and figure above its coloured share bar. The remainder identifies the neutral plot segment; View all expands the named entities rather than repeating their aggregate. View all stands only when more rows exist than the five shown, and opens the complete supplied ranking in a dialog. Rows arrive already sorted and share one total and colour map with the chart.
|
|
20
22
|
* @words The product supplies the title, metric description, View all count, dialog description and close label.
|
|
21
23
|
* @access Each share bar is named by its entity. The dialog is named by the ranking title and retains the selected period and metric.
|
|
22
24
|
*/
|
|
23
25
|
function ChartRanking({ title, description, rows, remainder, total, entityColorMap, disclosure, }) {
|
|
24
26
|
const list = { title, total, entityColorMap };
|
|
25
|
-
return (_jsxs("div", { className: "flex min-w-0 flex-col gap-4", children: [_jsxs("div", { className: "flex flex-wrap items-baseline gap-x-2 gap-y-1", children: [_jsx("h3", { className: "text-heading-xs", children: title }), description ? _jsx("span", { className: "text-muted-foreground text-sm", children: description }) : null] }), _jsx(RankingRows, { ...list, rows: remainder ? [...rows.slice(0,
|
|
27
|
+
return (_jsxs("div", { className: "flex min-w-0 flex-col gap-4", children: [_jsxs("div", { className: "flex flex-wrap items-baseline gap-x-2 gap-y-1", children: [_jsx("h3", { className: "text-heading-xs", children: title }), description ? _jsx("span", { className: "text-muted-foreground text-sm", children: description }) : null] }), _jsx(RankingRows, { ...list, rows: remainder ? [...rows.slice(0, SHOWN), remainder] : rows.slice(0, SHOWN) }), rows.length > SHOWN ? (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { render: _jsx(Button, { variant: "ghost", size: "sm", className: "self-end", suffix: _jsx(ChevronRight, { "aria-hidden": "true" }) }), children: disclosure.label }), _jsxs(DialogContent, { closeLabel: disclosure.closeLabel, children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: title }), _jsx(DialogDescription, { children: disclosure.description })] }), _jsx(DialogBody, { children: _jsx(RankingRows, { ...list, rows: rows }) })] })] })) : null] }));
|
|
26
28
|
}
|
|
27
29
|
export { ChartRanking };
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import type { ReactElement, ReactNode } from "react";
|
|
2
2
|
import { type KpiCardProps } from "./kpi-card.js";
|
|
3
|
-
|
|
3
|
+
type OverviewTitle = {
|
|
4
|
+
/** The page's title, when the product's chrome draws no path that names the page. */
|
|
5
|
+
title: string;
|
|
6
|
+
/** One muted line under the title, saying what the page reads. */
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
} | {
|
|
9
|
+
title?: undefined;
|
|
10
|
+
description?: never;
|
|
11
|
+
};
|
|
12
|
+
export type OverviewPageProps = OverviewTitle & {
|
|
4
13
|
/** On the title row, through PageActions. */
|
|
5
14
|
period?: ReactElement;
|
|
6
15
|
/** The figures, one row of equal cards, one column below md. */
|
|
@@ -21,9 +30,10 @@ export type OverviewPageProps = {
|
|
|
21
30
|
* @family Compositions
|
|
22
31
|
* @when "For in-product cards and dashboard tiles, use `Card`; Book is too decorative for repeated UI rows." (https://vercel.com/geist/book) Ours: the landing page of an area a person checks: the Portal's Dashboard, Analytics, Statements, System health, an Agent's Usage.
|
|
23
32
|
* @instead A list of records a person finds one of is a `CollectionPage`; one record is an `ObjectPage`. Never a stack of previews of every section: each exception links to its owner instead.
|
|
24
|
-
* @behaviour "Show a Skeleton when async data fills a known layout: table rows, card grids, profile blocks, sidebars." (https://vercel.com/geist/skeleton) "Use the Error component as a block surface when a section or page-level resource failed to load: a panel, a dashboard card, a route boundary." (https://vercel.com/geist/error) Ours: the reading period on the title row, then the figures in one row of equal `KpiCard`s (as many columns as figures up to five, five reading two by two from md, three over two from lg and one row from xl at 1280 px; six as three over three, more in rows of four; one column below md), then the chart cards, then the exceptions. Cards stand 24 px apart with no heading between them (the figures 16 px apart in their row), and the title row has no title
|
|
33
|
+
* @behaviour "Show a Skeleton when async data fills a known layout: table rows, card grids, profile blocks, sidebars." (https://vercel.com/geist/skeleton) "Use the Error component as a block surface when a section or page-level resource failed to load: a panel, a dashboard card, a route boundary." (https://vercel.com/geist/error) Ours: the reading period on the title row, then the figures in one row of equal `KpiCard`s (as many columns as figures up to five, five reading two by two from md, three over two from lg and one row from xl at 1280 px; six as three over three, more in rows of four; one column below md), then the chart cards, then the exceptions. Cards stand 24 px apart with no heading between them (the figures 16 px apart in their row), and the title row has no title where the path names the page; a product whose chrome draws no path, such as Alveare Server's window, gives the page its `title` (and the one line under it), drawn by `PageHeader` with the period on its row, as every other page of that product opens. Its cards are dashboard cards: a figure or a chart that reads, drills into its owner and holds no setting; neither an object card nor a setting card appears here. Colour sits in a figure's change and tone, never in the page. It has no states of its own but one: when nothing has happened yet, `nothingYet` is one muted line in place of the figures and charts, never a row of figures that all read zero; each card and the exceptions' `RecordList` draw theirs.
|
|
25
34
|
* @words The product words every figure, chart and exception. A figure's label names its measure ("Active Agents", "Spend"), the chart's title names its reading ("Usage"), and the exceptions' heading says what they are ("Needs attention").
|
|
26
35
|
* @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
36
|
*/
|
|
28
|
-
export declare function OverviewPage({ period, figures, nothingYet, charts, exceptions, }: OverviewPageProps): import("react").JSX.Element;
|
|
37
|
+
export declare function OverviewPage({ title, description, period, figures, nothingYet, charts, exceptions, }: OverviewPageProps): import("react").JSX.Element;
|
|
38
|
+
export {};
|
|
29
39
|
//# sourceMappingURL=overview-page.d.ts.map
|
|
@@ -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,EAAW,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;
|
|
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,EAAW,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAInE,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,6CAA6C;IAC7C,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,gEAAgE;IAChE,OAAO,CAAC,EAAE,SAAS,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,EAAE,CAAC;IACxD;;;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;AAWF;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,WAAW,EACX,MAAM,EACN,OAAoB,EACpB,UAAU,EACV,MAAM,EACN,UAAU,GACX,EAAE,iBAAiB,+BAyBnB"}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { CardRow } from "./card-row.js";
|
|
4
4
|
import { KpiCard } from "./kpi-card.js";
|
|
5
|
-
import { PageActions } from "./page-actions.js";
|
|
5
|
+
import { PageActions, PageActionsHostProvider } from "./page-actions.js";
|
|
6
|
+
import { PageHeader } from "./page-header.js";
|
|
6
7
|
function figureColumns(count) {
|
|
7
8
|
if (count === 2 || count === 3 || count === 4 || count === 5)
|
|
8
9
|
return count;
|
|
@@ -19,10 +20,11 @@ const NO_FIGURES = [];
|
|
|
19
20
|
* @family Compositions
|
|
20
21
|
* @when "For in-product cards and dashboard tiles, use `Card`; Book is too decorative for repeated UI rows." (https://vercel.com/geist/book) Ours: the landing page of an area a person checks: the Portal's Dashboard, Analytics, Statements, System health, an Agent's Usage.
|
|
21
22
|
* @instead A list of records a person finds one of is a `CollectionPage`; one record is an `ObjectPage`. Never a stack of previews of every section: each exception links to its owner instead.
|
|
22
|
-
* @behaviour "Show a Skeleton when async data fills a known layout: table rows, card grids, profile blocks, sidebars." (https://vercel.com/geist/skeleton) "Use the Error component as a block surface when a section or page-level resource failed to load: a panel, a dashboard card, a route boundary." (https://vercel.com/geist/error) Ours: the reading period on the title row, then the figures in one row of equal `KpiCard`s (as many columns as figures up to five, five reading two by two from md, three over two from lg and one row from xl at 1280 px; six as three over three, more in rows of four; one column below md), then the chart cards, then the exceptions. Cards stand 24 px apart with no heading between them (the figures 16 px apart in their row), and the title row has no title
|
|
23
|
+
* @behaviour "Show a Skeleton when async data fills a known layout: table rows, card grids, profile blocks, sidebars." (https://vercel.com/geist/skeleton) "Use the Error component as a block surface when a section or page-level resource failed to load: a panel, a dashboard card, a route boundary." (https://vercel.com/geist/error) Ours: the reading period on the title row, then the figures in one row of equal `KpiCard`s (as many columns as figures up to five, five reading two by two from md, three over two from lg and one row from xl at 1280 px; six as three over three, more in rows of four; one column below md), then the chart cards, then the exceptions. Cards stand 24 px apart with no heading between them (the figures 16 px apart in their row), and the title row has no title where the path names the page; a product whose chrome draws no path, such as Alveare Server's window, gives the page its `title` (and the one line under it), drawn by `PageHeader` with the period on its row, as every other page of that product opens. Its cards are dashboard cards: a figure or a chart that reads, drills into its owner and holds no setting; neither an object card nor a setting card appears here. Colour sits in a figure's change and tone, never in the page. It has no states of its own but one: when nothing has happened yet, `nothingYet` is one muted line in place of the figures and charts, never a row of figures that all read zero; each card and the exceptions' `RecordList` draw theirs.
|
|
23
24
|
* @words The product words every figure, chart and exception. A figure's label names its measure ("Active Agents", "Spend"), the chart's title names its reading ("Usage"), and the exceptions' heading says what they are ("Needs attention").
|
|
24
25
|
* @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.
|
|
25
26
|
*/
|
|
26
|
-
export function OverviewPage({ period, figures = NO_FIGURES, nothingYet, charts, exceptions, }) {
|
|
27
|
-
|
|
27
|
+
export function OverviewPage({ title, description, period, figures = NO_FIGURES, nothingYet, charts, exceptions, }) {
|
|
28
|
+
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 }), 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(CardRow, { columns: figureColumns(figures.length), from: "md", children: figures.map((figure) => (_jsx(KpiCard, { ...figure }, figure.label))) })) : null, charts] })), exceptions] }));
|
|
29
|
+
return title ? _jsx(PageActionsHostProvider, { children: page }) : page;
|
|
28
30
|
}
|
|
@@ -8,7 +8,7 @@ import { type IdentityMarkProps } from "./identity-mark.js";
|
|
|
8
8
|
* @family Status
|
|
9
9
|
* @when The first cell of every collection row: the mark, the name, and one muted line saying what the record is or where it comes from, so the row reads without a heading.
|
|
10
10
|
* @instead An Agent in a gallery is `AgentListRow`; a model is `ModelIdentity`. A descriptive item with prose and actions is `Item`.
|
|
11
|
-
* @behaviour The mark stands 16 px before the name. The name is semibold (600) ink and the detail a muted 14 px line, two lines with no gap between them, so the row is an entity row; `mark` is required; a record with nothing to say under its name leaves `detail` out and is the name alone, never a dash, which is a table cell's missing value and not a record's. The name holds one line and ends in an ellipsis, whole in its title, with a `hint` such as an ID read after it. The detail is one line too and ends in an ellipsis, whole in its title when it is text; in a row on a card narrower than its columns, the facts that leave the row join it after a middle dot and wrap so every value stays readable, and a status that leaves the row stands beside the name, which ends in an ellipsis before it. `wraps` only when the name is the whole record, such as a memory: the name is then a sentence at the body's regular weight, not a name in semibold, and the detail wraps too. The table owns the link.
|
|
11
|
+
* @behaviour The mark stands 16 px before the name. The name is semibold (600) ink and the detail a muted 14 px line, two lines with no gap between them, so the row is an entity row; `mark` is required; a record with nothing to say under its name leaves `detail` out and is the name alone, never a dash, which is a table cell's missing value and not a record's. The name holds one line and ends in an ellipsis, whole in its title, with a `hint` such as an ID read after it. The detail is one line too and ends in an ellipsis, whole in its title when it is text; in a row on a card narrower than its columns, the facts that leave the row join it after a middle dot and wrap so every value stays readable, and a status that leaves the row stands beside the name, which ends in an ellipsis before it. `wraps` only when the name is the whole record, such as a memory: the name is then a sentence at the body's regular weight, not a name in semibold, and the detail wraps too. `wraps="detail"` keeps the name a one-line name in semibold and wraps the detail in full, for a line the person must read whole, such as the code a request asks them to check. The table owns the link.
|
|
12
12
|
* @words “Lead the left column with a scannable identifier: an `Avatar` or icon, a Title Case label, then sentence-case secondary metadata (`Member since Mar 14, 2026`).” (https://vercel.com/geist/entity)
|
|
13
13
|
* Ours: the name as the record calls itself, and the detail in sentence case: kind, then relation, three to six words, "Company skill · every Agent has it".
|
|
14
14
|
* @access The name is the row link's text; the mark is decorative; the title carries the full name.
|
|
@@ -21,7 +21,8 @@ declare function RecordIdentity({ name, mark, hint, detail, wraps, }: {
|
|
|
21
21
|
hint?: string;
|
|
22
22
|
/** The muted line under the name; absent, the row is the name alone. */
|
|
23
23
|
detail?: ReactNode;
|
|
24
|
-
wraps
|
|
24
|
+
/** `true` wraps the name and the detail; `"detail"` the detail alone. */
|
|
25
|
+
wraps?: boolean | "detail";
|
|
25
26
|
}): import("react").JSX.Element;
|
|
26
27
|
export { RecordIdentity };
|
|
27
28
|
//# sourceMappingURL=record-identity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-identity.d.ts","sourceRoot":"","sources":["../../src/components/record-identity.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAIlF;;;;;;;;;;;;GAYG;AACH,iBAAS,cAAc,CAAC,EACtB,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,KAAa,GACd,EAAE;IACD,IAAI,EAAE,SAAS,CAAC;IAChB,8FAA8F;IAC9F,IAAI,EAAE,iBAAiB,CAAC;IACxB,qFAAqF;IACrF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"record-identity.d.ts","sourceRoot":"","sources":["../../src/components/record-identity.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAIlF;;;;;;;;;;;;GAYG;AACH,iBAAS,cAAc,CAAC,EACtB,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,KAAa,GACd,EAAE;IACD,IAAI,EAAE,SAAS,CAAC;IAChB,8FAA8F;IAC9F,IAAI,EAAE,iBAAiB,CAAC;IACxB,qFAAqF;IACrF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,yEAAyE;IACzE,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;CAC5B,+BAkCA;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -10,13 +10,15 @@ import { cn } from "../lib/utils.js";
|
|
|
10
10
|
* @family Status
|
|
11
11
|
* @when The first cell of every collection row: the mark, the name, and one muted line saying what the record is or where it comes from, so the row reads without a heading.
|
|
12
12
|
* @instead An Agent in a gallery is `AgentListRow`; a model is `ModelIdentity`. A descriptive item with prose and actions is `Item`.
|
|
13
|
-
* @behaviour The mark stands 16 px before the name. The name is semibold (600) ink and the detail a muted 14 px line, two lines with no gap between them, so the row is an entity row; `mark` is required; a record with nothing to say under its name leaves `detail` out and is the name alone, never a dash, which is a table cell's missing value and not a record's. The name holds one line and ends in an ellipsis, whole in its title, with a `hint` such as an ID read after it. The detail is one line too and ends in an ellipsis, whole in its title when it is text; in a row on a card narrower than its columns, the facts that leave the row join it after a middle dot and wrap so every value stays readable, and a status that leaves the row stands beside the name, which ends in an ellipsis before it. `wraps` only when the name is the whole record, such as a memory: the name is then a sentence at the body's regular weight, not a name in semibold, and the detail wraps too. The table owns the link.
|
|
13
|
+
* @behaviour The mark stands 16 px before the name. The name is semibold (600) ink and the detail a muted 14 px line, two lines with no gap between them, so the row is an entity row; `mark` is required; a record with nothing to say under its name leaves `detail` out and is the name alone, never a dash, which is a table cell's missing value and not a record's. The name holds one line and ends in an ellipsis, whole in its title, with a `hint` such as an ID read after it. The detail is one line too and ends in an ellipsis, whole in its title when it is text; in a row on a card narrower than its columns, the facts that leave the row join it after a middle dot and wrap so every value stays readable, and a status that leaves the row stands beside the name, which ends in an ellipsis before it. `wraps` only when the name is the whole record, such as a memory: the name is then a sentence at the body's regular weight, not a name in semibold, and the detail wraps too. `wraps="detail"` keeps the name a one-line name in semibold and wraps the detail in full, for a line the person must read whole, such as the code a request asks them to check. The table owns the link.
|
|
14
14
|
* @words “Lead the left column with a scannable identifier: an `Avatar` or icon, a Title Case label, then sentence-case secondary metadata (`Member since Mar 14, 2026`).” (https://vercel.com/geist/entity)
|
|
15
15
|
* Ours: the name as the record calls itself, and the detail in sentence case: kind, then relation, three to six words, "Company skill · every Agent has it".
|
|
16
16
|
* @access The name is the row link's text; the mark is decorative; the title carries the full name.
|
|
17
17
|
*/
|
|
18
18
|
function RecordIdentity({ name, mark, hint, detail, wraps = false, }) {
|
|
19
|
+
const nameWraps = wraps === true;
|
|
20
|
+
const detailWraps = wraps !== false;
|
|
19
21
|
const title = typeof name === "string" ? (hint ? `${name} · ${hint}` : name) : undefined;
|
|
20
|
-
return (_jsxs("span", { className: "flex min-w-0 items-center gap-4", "data-slot": "record-identity", children: [_jsx(IdentityMark, { ...mark, size: 32 }), _jsxs("span", { className: "grid min-w-0 in-[table]:w-0 in-[table]:flex-1", children: [_jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [_jsx("span", { className: cn("min-w-0 text-foreground",
|
|
22
|
+
return (_jsxs("span", { className: "flex min-w-0 items-center gap-4", "data-slot": "record-identity", children: [_jsx(IdentityMark, { ...mark, size: 32 }), _jsxs("span", { className: "grid min-w-0 in-[table]:w-0 in-[table]:flex-1", children: [_jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [_jsx("span", { className: cn("min-w-0 text-foreground", nameWraps ? "wrap-break-word whitespace-pre-wrap" : "truncate font-semibold"), title: nameWraps ? undefined : title, children: name }), _jsx(TableCompactNameFacts, {})] }), _jsx("span", { className: cn("text-sm text-muted-foreground", detailWraps ? "wrap-break-word whitespace-normal" : "truncate"), "data-slot": "record-identity-detail", title: !detailWraps && typeof detail === "string" ? detail : undefined, children: detail }), _jsx(TableCompactFacts, {})] })] }));
|
|
21
23
|
}
|
|
22
24
|
export { RecordIdentity };
|
|
@@ -12,7 +12,7 @@ import type { CollectionNote } from "../internal/collection-note.js";
|
|
|
12
12
|
import { type RowMessage } from "../internal/row-message.js";
|
|
13
13
|
export type { RowMessage };
|
|
14
14
|
export type RecordName = {
|
|
15
|
-
/** One line, ending in an ellipsis and whole in its title, unless the list `wraps
|
|
15
|
+
/** One line, ending in an ellipsis and whole in its title, unless the list `wraps` it. */
|
|
16
16
|
name: string;
|
|
17
17
|
/**
|
|
18
18
|
* The muted line under the name: what it is or where it comes from. A record with nothing to
|
|
@@ -152,8 +152,12 @@ export type RecordListProps<TRecord extends RowData, TCommand extends string = n
|
|
|
152
152
|
getId: (record: TRecord) => string;
|
|
153
153
|
/** What the row is called: required, because every row is an entity with a mark, a name and a line under it. */
|
|
154
154
|
name: (record: TRecord) => RecordName;
|
|
155
|
-
/**
|
|
156
|
-
|
|
155
|
+
/**
|
|
156
|
+
* `true`: the name is the record's whole text, such as a memory: it wraps in full. `"detail"`:
|
|
157
|
+
* the name stays one line and the line under it wraps in full, for a detail the person must read
|
|
158
|
+
* whole, such as the code a request asks them to check.
|
|
159
|
+
*/
|
|
160
|
+
wraps?: boolean | "detail";
|
|
157
161
|
/** A box before each record, so a person can pick several. */
|
|
158
162
|
select?: RecordSelection<TRecord>;
|
|
159
163
|
/**
|
|
@@ -233,10 +237,10 @@ export type RecordListProps<TRecord extends RowData, TCommand extends string = n
|
|
|
233
237
|
/** The record's own action failed or was refused: its message inside its row. */
|
|
234
238
|
state?: (record: TRecord) => RowMessage | null;
|
|
235
239
|
/**
|
|
236
|
-
* The least width of the commands column in pixels,
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
+
* The least width of the commands column in pixels, whatever its rows draw. The column is
|
|
241
|
+
* already as wide as its widest row's buttons, next steps and three dots need, worked out from
|
|
242
|
+
* their labels, so none is cut: a list gives it only to hold a wider column, such as two lists
|
|
243
|
+
* on one page whose columns line up although only one of them has buttons.
|
|
240
244
|
*/
|
|
241
245
|
commandsSize?: number;
|
|
242
246
|
};
|
|
@@ -253,7 +257,7 @@ export type RecordListWithout<TRecord extends RowData, Key extends PropertyKey,
|
|
|
253
257
|
* @instead “For tabular data with sortable columns and shared row shape, use `Table` instead.” (https://vercel.com/geist/entity)
|
|
254
258
|
* “For a static key/value metadata block on a detail page, use `Description`.” (https://vercel.com/geist/entity)
|
|
255
259
|
* Ours: Geist's `Table` is a `DataTable`: this list has no visible headings and at most three facts, so a fourth fact is a table, and anything more than a few facts lives on the record's page. A screen gives `RecordList` the records and what each one says, never its own toolbar, table, rows or menus, and nothing else draws a record row. Its `Description` is `ObjectFacts`. Events in time are an `ActivityFeed`. Reusable things a person adds from a catalogue are a `LibraryShelf`. A descriptive row with prose is an `Item`.
|
|
256
|
-
* @behaviour One bordered card, a 1 px rule between records and none after the last. A row is 72 px, with 16 px above and below, and its columns stand left to right at the widths the list declares, so a person reads every list the same way: the `select` box (40 px, only when the list is picked from, an optional column), the identity (the rest: the one column without a size), the facts (each its `size`), the status (`status.size`), the time (`time.size`, tabular), the `checklist` ring (52 px, only when the record has steps to be ready) and the commands (as wide as the widest row's buttons, a failed action's next steps and the three dots after them need, worked out from their labels, each label at most 8 px a character and a button holding the longer of its label and its pending label, the dots at their 44 px touch target; 64 px for the three dots alone; a
|
|
260
|
+
* @behaviour One bordered card, a 1 px rule between records and none after the last. A row is 72 px, with 16 px above and below, and its columns stand left to right at the widths the list declares, so a person reads every list the same way: the `select` box (40 px, only when the list is picked from, an optional column), the identity (the rest: the one column without a size), the facts (each its `size`), the status (`status.size`), the time (`time.size`, tabular), the `checklist` ring (52 px, only when the record has steps to be ready) and the commands (as wide as the widest row's buttons, a failed action's next steps and the three dots after them need, worked out from their labels, each label at most 8 px a character and a button holding the longer of its label and its pending label, the dots at their 44 px touch target; 64 px for the three dots alone; never narrower than a `commandsSize` the caller gives, which two lists on one page share so their columns line up although only one has buttons). A `checklist` puts the record's `ProgressChecklist` ring just before its commands, where Vercel ends a project's row with its Production Checklist; the ring opens its own drawer, never the row. Every row has its 32 px mark, its name (600) and, under it, one muted 14 px line, which `wraps="detail"` lets wrap in full where the person must read it whole; `name` and the mark are required; a record with nothing to say under its name leaves the line out and is the name alone, never a dash. Give every column a `size` in pixels; the name takes the rest. With `layout="line"`, as on Vercel's Projects page, the facts and the status share one muted line, joined by a middle dot, in a column as wide as the name's, and the row stays one line (mark, name over its line, that summary, the time, the ring, the three dots) on a card wide enough for its sized columns and 160 px each for the name and the summary, and on a narrower card the summary and the time move under the name as muted text joined by a middle dot that wraps, the status keeping its mark whole and breaking between its words only when it alone is wider than the line, in the same row, their labels read by assistive technology only. Rows of `columns` follow the same rule once the card is narrower than their columns: the facts and the time leave the row for that muted text, wrapping so every value stays readable, never a labelled list, and the status stands beside the name, which ends in an ellipsis before it, so the exception is never the part a phone's line cuts. `facts` takes at most three. A menu keeps every command in the three dots, one alone included, as Vercel's Environment Variables and Members rows do: a button stands on a row only where the list names it as `command`, the record's main job, on every row that can do it, so one list never mixes rows ending in a button with rows ending in dots. The commands never take the name's room: once the row is compact, its commands column holds only the three dots and the row's own buttons stand under the name, beside a failed action's next steps, outside the row's link, so pressing one never opens the record. Every column of the records' attributes stands on every row, as Vercel's lists keep theirs, so a person reads one attribute down a column: a record with no value for a fact draws `TableValue`'s muted dash, with the fact's `missing` read in its place; status is only for the exception, so a healthy record's status cell stays empty and the records that need a person stand out; the commands column, which holds no attribute, stands only while a record has a command, a menu or a message, or the rows open, and it widens for a failed action's next steps only while a row shows one. Never the three dots before the button, a decorative icon for the record's mark, a status on every row, or a destructive button on every row: a destructive command stays in the three dots. A `line` row's summary joins only the facts the record has, so it never ends in a dot. A failed or refused action of the record shows as its catalogue message inside its own row, never a notice under the row: it replaces the detail line, with its next steps beside its commands, or under the message on a card too narrow for the row's columns. With `open` the whole row is one target and takes the `accent` hover, with no chevron, as Vercel's Deployments rows open theirs; a row that opens nothing never reacts to hover. Opening is the row's alone: the three dots never hold a command that only shows the record (*Details*, *View*, *Open*). With `editor` the record's row opens its form under its line. `empty` is required: `null` is the choice to draw nothing for a list with no records, and any other value is the state it draws. A list that is a section of another page takes `heading`: its title, the one line under it, and at the trailing edge the card's `actions`, such as its Add command and a muted count, drawn as every card draws them, so the list and its commands are one card, never a list inside a setting card. A note about the whole list is `footer.note`: one muted line, an optional *Learn more* after it at the left and one secondary action at the right, in a strip of its own under the count and the paging, as Vercel ends its deployments list ("Deployment retention is enabled. Learn more", *View recently deleted*). A list a person picks from (`select`) says what the chosen records do together: while any is chosen, the footer's count becomes theirs ("2 selected") and their one command stands at the footer's end as an outline button ("Invite 2"), so choosing never changes the page's title row; the record's own main job stays its row's `command`, so a person never has to choose a record to act on it. Colour is neutral, the name in ink and every other cell in the body grey, except the status badge and a failed action's message.
|
|
257
261
|
* “Pick the variant by what the user needs: no-results for a filtered list that returned zero rows, blank slate or informational for a resource the user hasn’t created, cleared for completed work, permission for role or tier denials, error for a failed load.” (https://vercel.com/geist/empty-state)
|
|
258
262
|
* Ours: `failed`, `noMatch` and `empty` are those variants, drawn inside the card.
|
|
259
263
|
* “The right column holds at most one or two controls. If the row needs more, move secondary actions into a `Dots Menu`.” (https://vercel.com/geist/entity)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-list.d.ts","sourceRoot":"","sources":["../../src/components/record-list.ts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?? []).map((action) => buttonRoom(action, "default")),
|
|
76
76
|
];
|
|
77
77
|
if (widths.length === 0)
|
|
78
|
-
return DOTS_ALONE_SIZE;
|
|
78
|
+
return Math.max(DOTS_ALONE_SIZE, list.commandsSize ?? 0);
|
|
79
79
|
if (dots)
|
|
80
80
|
widths.push(TOUCH_TARGET);
|
|
81
81
|
const room = CELL_START +
|
|
@@ -310,7 +310,7 @@ function RecordRows(props) {
|
|
|
310
310
|
* @instead “For tabular data with sortable columns and shared row shape, use `Table` instead.” (https://vercel.com/geist/entity)
|
|
311
311
|
* “For a static key/value metadata block on a detail page, use `Description`.” (https://vercel.com/geist/entity)
|
|
312
312
|
* Ours: Geist's `Table` is a `DataTable`: this list has no visible headings and at most three facts, so a fourth fact is a table, and anything more than a few facts lives on the record's page. A screen gives `RecordList` the records and what each one says, never its own toolbar, table, rows or menus, and nothing else draws a record row. Its `Description` is `ObjectFacts`. Events in time are an `ActivityFeed`. Reusable things a person adds from a catalogue are a `LibraryShelf`. A descriptive row with prose is an `Item`.
|
|
313
|
-
* @behaviour One bordered card, a 1 px rule between records and none after the last. A row is 72 px, with 16 px above and below, and its columns stand left to right at the widths the list declares, so a person reads every list the same way: the `select` box (40 px, only when the list is picked from, an optional column), the identity (the rest: the one column without a size), the facts (each its `size`), the status (`status.size`), the time (`time.size`, tabular), the `checklist` ring (52 px, only when the record has steps to be ready) and the commands (as wide as the widest row's buttons, a failed action's next steps and the three dots after them need, worked out from their labels, each label at most 8 px a character and a button holding the longer of its label and its pending label, the dots at their 44 px touch target; 64 px for the three dots alone; a
|
|
313
|
+
* @behaviour One bordered card, a 1 px rule between records and none after the last. A row is 72 px, with 16 px above and below, and its columns stand left to right at the widths the list declares, so a person reads every list the same way: the `select` box (40 px, only when the list is picked from, an optional column), the identity (the rest: the one column without a size), the facts (each its `size`), the status (`status.size`), the time (`time.size`, tabular), the `checklist` ring (52 px, only when the record has steps to be ready) and the commands (as wide as the widest row's buttons, a failed action's next steps and the three dots after them need, worked out from their labels, each label at most 8 px a character and a button holding the longer of its label and its pending label, the dots at their 44 px touch target; 64 px for the three dots alone; never narrower than a `commandsSize` the caller gives, which two lists on one page share so their columns line up although only one has buttons). A `checklist` puts the record's `ProgressChecklist` ring just before its commands, where Vercel ends a project's row with its Production Checklist; the ring opens its own drawer, never the row. Every row has its 32 px mark, its name (600) and, under it, one muted 14 px line, which `wraps="detail"` lets wrap in full where the person must read it whole; `name` and the mark are required; a record with nothing to say under its name leaves the line out and is the name alone, never a dash. Give every column a `size` in pixels; the name takes the rest. With `layout="line"`, as on Vercel's Projects page, the facts and the status share one muted line, joined by a middle dot, in a column as wide as the name's, and the row stays one line (mark, name over its line, that summary, the time, the ring, the three dots) on a card wide enough for its sized columns and 160 px each for the name and the summary, and on a narrower card the summary and the time move under the name as muted text joined by a middle dot that wraps, the status keeping its mark whole and breaking between its words only when it alone is wider than the line, in the same row, their labels read by assistive technology only. Rows of `columns` follow the same rule once the card is narrower than their columns: the facts and the time leave the row for that muted text, wrapping so every value stays readable, never a labelled list, and the status stands beside the name, which ends in an ellipsis before it, so the exception is never the part a phone's line cuts. `facts` takes at most three. A menu keeps every command in the three dots, one alone included, as Vercel's Environment Variables and Members rows do: a button stands on a row only where the list names it as `command`, the record's main job, on every row that can do it, so one list never mixes rows ending in a button with rows ending in dots. The commands never take the name's room: once the row is compact, its commands column holds only the three dots and the row's own buttons stand under the name, beside a failed action's next steps, outside the row's link, so pressing one never opens the record. Every column of the records' attributes stands on every row, as Vercel's lists keep theirs, so a person reads one attribute down a column: a record with no value for a fact draws `TableValue`'s muted dash, with the fact's `missing` read in its place; status is only for the exception, so a healthy record's status cell stays empty and the records that need a person stand out; the commands column, which holds no attribute, stands only while a record has a command, a menu or a message, or the rows open, and it widens for a failed action's next steps only while a row shows one. Never the three dots before the button, a decorative icon for the record's mark, a status on every row, or a destructive button on every row: a destructive command stays in the three dots. A `line` row's summary joins only the facts the record has, so it never ends in a dot. A failed or refused action of the record shows as its catalogue message inside its own row, never a notice under the row: it replaces the detail line, with its next steps beside its commands, or under the message on a card too narrow for the row's columns. With `open` the whole row is one target and takes the `accent` hover, with no chevron, as Vercel's Deployments rows open theirs; a row that opens nothing never reacts to hover. Opening is the row's alone: the three dots never hold a command that only shows the record (*Details*, *View*, *Open*). With `editor` the record's row opens its form under its line. `empty` is required: `null` is the choice to draw nothing for a list with no records, and any other value is the state it draws. A list that is a section of another page takes `heading`: its title, the one line under it, and at the trailing edge the card's `actions`, such as its Add command and a muted count, drawn as every card draws them, so the list and its commands are one card, never a list inside a setting card. A note about the whole list is `footer.note`: one muted line, an optional *Learn more* after it at the left and one secondary action at the right, in a strip of its own under the count and the paging, as Vercel ends its deployments list ("Deployment retention is enabled. Learn more", *View recently deleted*). A list a person picks from (`select`) says what the chosen records do together: while any is chosen, the footer's count becomes theirs ("2 selected") and their one command stands at the footer's end as an outline button ("Invite 2"), so choosing never changes the page's title row; the record's own main job stays its row's `command`, so a person never has to choose a record to act on it. Colour is neutral, the name in ink and every other cell in the body grey, except the status badge and a failed action's message.
|
|
314
314
|
* “Pick the variant by what the user needs: no-results for a filtered list that returned zero rows, blank slate or informational for a resource the user hasn’t created, cleared for completed work, permission for role or tier denials, error for a failed load.” (https://vercel.com/geist/empty-state)
|
|
315
315
|
* Ours: `failed`, `noMatch` and `empty` are those variants, drawn inside the card.
|
|
316
316
|
* “The right column holds at most one or two controls. If the row needs more, move secondary actions into a `Dots Menu`.” (https://vercel.com/geist/entity)
|
|
@@ -83,8 +83,15 @@ type SidebarProps = React.ComponentProps<"div"> & ({
|
|
|
83
83
|
* @access The column is a landmark; each row is a link or a button with its name, and the current one carries aria-current="page". The handle is a focusable separator with its value in px. The badge's number is read with its row.
|
|
84
84
|
*/
|
|
85
85
|
declare function Sidebar({ collapsible, resize, mobileTitle, mobileDescription, mobileCloseLabel, mobileFinalFocus, className, children, dir, ...props }: SidebarProps): React.JSX.Element;
|
|
86
|
-
type SidebarTriggerProps = Omit<IconButtonPartProps, "aria-label" | "aria-labelledby"> & AccessibleName
|
|
87
|
-
|
|
86
|
+
type SidebarTriggerProps = Omit<IconButtonPartProps, "aria-label" | "aria-labelledby"> & AccessibleName & {
|
|
87
|
+
/**
|
|
88
|
+
* A count among the places that needs the person, such as requests waiting for an answer: the
|
|
89
|
+
* attention badge of the place that holds it, drawn on the trigger while the places are out of
|
|
90
|
+
* sight. The caller's name says it too ("Open the places, 1 waiting").
|
|
91
|
+
*/
|
|
92
|
+
attention?: number;
|
|
93
|
+
};
|
|
94
|
+
declare function SidebarTrigger({ className, onClick, attention, ...props }: SidebarTriggerProps): React.JSX.Element;
|
|
88
95
|
declare function SidebarInset({ className, focusTarget, render, ...props }: useRender.ComponentProps<"div"> & React.ComponentProps<"div"> & {
|
|
89
96
|
focusTarget?: boolean;
|
|
90
97
|
}): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../src/components/sidebar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAMlE,OAAO,EAAE,KAAK,cAAc,EAAU,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC5F,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAS,YAAY,EAA6C,MAAM,oBAAoB,CAAC;AAEpG,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAA6B,MAAM,cAAc,CAAC;AAI3E,QAAA,MAAM,aAAa,MAAM,CAAC;AAC1B,QAAA,MAAM,iBAAiB,MAAM,CAAC;AAC9B,QAAA,MAAM,iBA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,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,yDAAyD;IACzD,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;GASG;AACH,iBAAS,YAAY,CAAC,EACpB,MAAM,EACN,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,OAAO,GACR,EAAE,iBAAiB,qBAiCnB;AAED,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,OAAO,EACP,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EACzB,UAAU,GACX,CAAC"}
|
|
@@ -201,12 +201,12 @@ function SidebarResizeHandle(name) {
|
|
|
201
201
|
});
|
|
202
202
|
} }));
|
|
203
203
|
}
|
|
204
|
-
function SidebarTrigger({ className, onClick, ...props }) {
|
|
204
|
+
function SidebarTrigger({ className, onClick, attention = 0, ...props }) {
|
|
205
205
|
const { toggleSidebar } = useSidebar();
|
|
206
|
-
return (
|
|
206
|
+
return (_jsxs(Button, { "data-sidebar": "trigger", "data-slot": "sidebar-trigger", variant: "ghost", size: "icon-sm", className: cn(attention > 0 && "relative", className), onClick: (event) => {
|
|
207
207
|
onClick?.(event);
|
|
208
208
|
toggleSidebar();
|
|
209
|
-
}, ...props, children: _jsx(PanelLeftIcon, {}) }));
|
|
209
|
+
}, ...props, children: [_jsx(PanelLeftIcon, {}), attention > 0 ? (_jsx("span", { "aria-hidden": "true", className: "pointer-events-none absolute -top-1.5 -right-1.5 flex h-4.5 min-w-4.5 items-center justify-center rounded-full bg-destructive px-1 text-xs font-semibold text-destructive-foreground tabular-nums select-none", "data-slot": "sidebar-trigger-badge", children: attention })) : null] }));
|
|
210
210
|
}
|
|
211
211
|
function SidebarInset({ className, focusTarget = false, render, ...props }) {
|
|
212
212
|
return useRender({
|
package/dist/components/table.js
CHANGED
|
@@ -86,7 +86,7 @@ function TableCell({ className, ...props }) {
|
|
|
86
86
|
}
|
|
87
87
|
function TableDetailRow({ colSpan, facts, layout = "standard", }) {
|
|
88
88
|
const wraps = facts.some((fact) => fact.wraps);
|
|
89
|
-
return (_jsx(TableRow, { "data-slot": "table-detail-row", className: cn("h-auto!", tableCompactLayouts[layout].details), children: _jsx(TableCell, { colSpan: colSpan, className: "pt-0! pb-3! whitespace-normal text-muted-foreground last:text-left", children: _jsx("div", { className: cn("relative min-w-0 in-[[data-slot=table-record-group]:has([data-slot=record-identity])]:pl-12", detailFactsLine, wraps ? ["wrap-break-word", detailFactsWrap] : "w-0 min-w-full truncate"), "data-slot": "table-detail-line", onFocus: wraps ? undefined : titleWhenCut, onPointerEnter: wraps ? undefined : titleWhenCut, children: _jsx(DetailFacts, { facts: facts }) }) }) }));
|
|
89
|
+
return (_jsx(TableRow, { "data-slot": "table-detail-row", className: cn("h-auto!", tableCompactLayouts[layout].details), children: _jsx(TableCell, { colSpan: colSpan, className: "pt-0! pb-3! whitespace-normal text-muted-foreground last:text-left", children: _jsx("div", { className: cn("relative min-w-0 in-[[data-slot=table-record-group]:has([data-slot=record-identity])]:pl-12", detailFactsLine, wraps ? ["wrap-break-word", detailFactsWrap] : "w-0 min-w-full truncate"), "data-slot": "table-detail-line", onFocus: wraps ? undefined : titleWhenCut, onPointerEnter: wraps ? undefined : titleWhenCut, children: _jsx(DetailFacts, { facts: facts, wraps: wraps }) }) }) }));
|
|
90
90
|
}
|
|
91
91
|
function TableCaption({ className, ...props }) {
|
|
92
92
|
return (_jsx("caption", { "data-slot": "table-caption", className: cn("mt-4 text-sm text-muted-foreground", className), ...props }));
|
|
@@ -9,11 +9,18 @@ export type TableDetailFact = {
|
|
|
9
9
|
/** The value stands beside the record's name instead, which ends in an ellipsis before it: a status. */
|
|
10
10
|
besideName?: boolean;
|
|
11
11
|
};
|
|
12
|
-
export declare const detailFactsLine = "**:data-[slot=tag]:align-middle [
|
|
12
|
+
export declare const detailFactsLine = "**:data-[slot=tag]:align-middle [&_[data-slot=detail-fact]>:is(div,p,.block,.grid,.flex)]:inline";
|
|
13
13
|
export declare const detailFactsWrap = "[&_:not(.sr-only,[data-slot=badge],[data-slot=badge]_*)]:whitespace-normal";
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* The facts joined by a middle dot. On one line each fact after the first opens with its dot. A line
|
|
16
|
+
* that wraps gives every fact its dot in a 10 px box and shifts the line 10 px back under a clip, so
|
|
17
|
+
* the dot of whichever fact opens a line, the first included, falls outside it: no line starts with
|
|
18
|
+
* a dot.
|
|
19
|
+
*/
|
|
20
|
+
export declare function DetailFacts({ facts, wraps, }: {
|
|
15
21
|
facts: readonly TableDetailFact[];
|
|
16
|
-
|
|
22
|
+
wraps?: boolean;
|
|
23
|
+
}): React.JSX.Element | React.JSX.Element[];
|
|
17
24
|
type TableCompactLineValue = {
|
|
18
25
|
layout: TableCompactLayout;
|
|
19
26
|
facts: readonly TableDetailFact[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-compact-line.d.ts","sourceRoot":"","sources":["../../src/internal/table-compact-line.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAuB,KAAK,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAG1F,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,4HAA4H;IAC5H,KAAK,C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K,uBAAuB,GAAG;IAAE,MAAM,EAAE,kBAAkB,CAAC;IAAC,KAAK,EAAE,WAAW,CAAA;CAAE,CAAC;AAMlF;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,KAAK,EACL,QAAQ,GACT,EAAE,uBAAuB,GAAG;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,qBAGzD;AAwDD,oEAAoE;AACpE,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,4BAenE;AAED,gDAAgD;AAChD,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,4BAetE"}
|
|
@@ -3,10 +3,19 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { tableCompactLayouts } from "../components/table-layouts.js";
|
|
5
5
|
import { cn } from "../lib/utils.js";
|
|
6
|
-
export const detailFactsLine = "**:data-[slot=tag]:align-middle [
|
|
6
|
+
export const detailFactsLine = "**:data-[slot=tag]:align-middle [&_[data-slot=detail-fact]>:is(div,p,.block,.grid,.flex)]:inline";
|
|
7
7
|
export const detailFactsWrap = "[&_:not(.sr-only,[data-slot=badge],[data-slot=badge]_*)]:whitespace-normal";
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
/**
|
|
9
|
+
* The facts joined by a middle dot. On one line each fact after the first opens with its dot. A line
|
|
10
|
+
* that wraps gives every fact its dot in a 10 px box and shifts the line 10 px back under a clip, so
|
|
11
|
+
* the dot of whichever fact opens a line, the first included, falls outside it: no line starts with
|
|
12
|
+
* a dot.
|
|
13
|
+
*/
|
|
14
|
+
export function DetailFacts({ facts, wraps = false, }) {
|
|
15
|
+
const shown = facts.map((fact, index) => (_jsxs(React.Fragment, { children: [index > 0 ? " " : null, _jsxs("span", { className: "inline-block max-w-full", "data-slot": "detail-fact", children: [wraps ? (_jsx("span", { "aria-hidden": "true", className: "inline-block w-2.5 text-start", children: "\u00B7" })) : index > 0 ? (_jsx("span", { "aria-hidden": "true", children: "\u00B7 " })) : null, _jsxs("span", { className: "sr-only", children: [fact.label, ": "] }), fact.value] })] }, fact.id)));
|
|
16
|
+
if (!wraps)
|
|
17
|
+
return shown;
|
|
18
|
+
return (_jsx("span", { className: "block overflow-hidden", "data-slot": "detail-facts-clip", children: _jsx("span", { className: "-ms-2.5 flow-root", children: shown }) }));
|
|
10
19
|
}
|
|
11
20
|
const TableCompactLineContext = React.createContext(null);
|
|
12
21
|
export function TableCompactLine({ children, ...value }) {
|
|
@@ -19,7 +28,7 @@ export function TableCompactFacts() {
|
|
|
19
28
|
const facts = line.facts.filter((fact) => !fact.besideName);
|
|
20
29
|
if (facts.length === 0)
|
|
21
30
|
return null;
|
|
22
|
-
return (_jsx("span", { className: cn("relative text-sm text-muted-foreground", detailFactsLine, detailFactsWrap, tableCompactLayouts[line.layout].details), "data-slot": "table-detail-line", children: _jsx(DetailFacts, { facts: facts }) }));
|
|
31
|
+
return (_jsx("span", { className: cn("relative text-sm text-muted-foreground", detailFactsLine, detailFactsWrap, tableCompactLayouts[line.layout].details), "data-slot": "table-detail-line", children: _jsx(DetailFacts, { facts: facts, wraps: true }) }));
|
|
23
32
|
}
|
|
24
33
|
/** The compact facts that stand beside the name of the row this stands in, which no ellipsis cuts; nothing outside such a row or on a card wide enough for the columns. */
|
|
25
34
|
export function TableCompactNameFacts() {
|
|
@@ -186,7 +186,7 @@ export const USAGE = [
|
|
|
186
186
|
summary: 'The page that answers "what needs attention?": is anything wrong, and where.',
|
|
187
187
|
when: "\"For in-product cards and dashboard tiles, use `Card`; Book is too decorative for repeated UI rows.\" (https://vercel.com/geist/book) Ours: the landing page of an area a person checks: the Portal's Dashboard, Analytics, Statements, System health, an Agent's Usage.",
|
|
188
188
|
instead: "A list of records a person finds one of is a `CollectionPage`; one record is an `ObjectPage`. Never a stack of previews of every section: each exception links to its owner instead.",
|
|
189
|
-
behaviour: '"Show a Skeleton when async data fills a known layout: table rows, card grids, profile blocks, sidebars." (https://vercel.com/geist/skeleton) "Use the Error component as a block surface when a section or page-level resource failed to load: a panel, a dashboard card, a route boundary." (https://vercel.com/geist/error) Ours: the reading period on the title row, then the figures in one row of equal `KpiCard`s (as many columns as figures up to five, five reading two by two from md, three over two from lg and one row from xl at 1280 px; six as three over three, more in rows of four; one column below md), then the chart cards, then the exceptions. Cards stand 24 px apart with no heading between them (the figures 16 px apart in their row), and the title row has no title
|
|
189
|
+
behaviour: '"Show a Skeleton when async data fills a known layout: table rows, card grids, profile blocks, sidebars." (https://vercel.com/geist/skeleton) "Use the Error component as a block surface when a section or page-level resource failed to load: a panel, a dashboard card, a route boundary." (https://vercel.com/geist/error) Ours: the reading period on the title row, then the figures in one row of equal `KpiCard`s (as many columns as figures up to five, five reading two by two from md, three over two from lg and one row from xl at 1280 px; six as three over three, more in rows of four; one column below md), then the chart cards, then the exceptions. Cards stand 24 px apart with no heading between them (the figures 16 px apart in their row), and the title row has no title where the path names the page; a product whose chrome draws no path, such as Alveare Server\'s window, gives the page its `title` (and the one line under it), drawn by `PageHeader` with the period on its row, as every other page of that product opens. Its cards are dashboard cards: a figure or a chart that reads, drills into its owner and holds no setting; neither an object card nor a setting card appears here. Colour sits in a figure\'s change and tone, never in the page. It has no states of its own but one: when nothing has happened yet, `nothingYet` is one muted line in place of the figures and charts, never a row of figures that all read zero; each card and the exceptions\' `RecordList` draw theirs.',
|
|
190
190
|
words: 'The product words every figure, chart and exception. A figure\'s label names its measure ("Active Agents", "Spend"), the chart\'s title names its reading ("Usage"), and the exceptions\' heading says what they are ("Needs attention").',
|
|
191
191
|
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.",
|
|
192
192
|
},
|
|
@@ -208,7 +208,7 @@ export const USAGE = [
|
|
|
208
208
|
summary: "Entity rows: objects a person opens or acts on, one line each on one resting card: the identity mark and name over what it is, then its attributes as data, one per column: a few facts, a status only for the exception, when it happened, at most two row commands, and the three dots last.",
|
|
209
209
|
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: the records are things a person opens or acts on and that name themselves: projects, deployments, domains, members, integrations, Agents, Skills, mailboxes. A list inside another page: an Overview's exceptions, an object page's \"Needs attention\". A page whose whole job is the list is a `CollectionPage`, which draws this. Values edited in place (a domain, an environment variable) are the same rows with an `editor`: the row expands into its form. Of the three kinds of list, entity rows and rows edited in place are this; records compared across columns are a `DataTable`.",
|
|
210
210
|
instead: "“For tabular data with sortable columns and shared row shape, use `Table` instead.” (https://vercel.com/geist/entity) “For a static key/value metadata block on a detail page, use `Description`.” (https://vercel.com/geist/entity) Ours: Geist's `Table` is a `DataTable`: this list has no visible headings and at most three facts, so a fourth fact is a table, and anything more than a few facts lives on the record's page. A screen gives `RecordList` the records and what each one says, never its own toolbar, table, rows or menus, and nothing else draws a record row. Its `Description` is `ObjectFacts`. Events in time are an `ActivityFeed`. Reusable things a person adds from a catalogue are a `LibraryShelf`. A descriptive row with prose is an `Item`.",
|
|
211
|
-
behaviour: "One bordered card, a 1 px rule between records and none after the last. A row is 72 px, with 16 px above and below, and its columns stand left to right at the widths the list declares, so a person reads every list the same way: the `select` box (40 px, only when the list is picked from, an optional column), the identity (the rest: the one column without a size), the facts (each its `size`), the status (`status.size`), the time (`time.size`, tabular), the `checklist` ring (52 px, only when the record has steps to be ready) and the commands (as wide as the widest row's buttons, a failed action's next steps and the three dots after them need, worked out from their labels, each label at most 8 px a character and a button holding the longer of its label and its pending label, the dots at their 44 px touch target; 64 px for the three dots alone; a
|
|
211
|
+
behaviour: "One bordered card, a 1 px rule between records and none after the last. A row is 72 px, with 16 px above and below, and its columns stand left to right at the widths the list declares, so a person reads every list the same way: the `select` box (40 px, only when the list is picked from, an optional column), the identity (the rest: the one column without a size), the facts (each its `size`), the status (`status.size`), the time (`time.size`, tabular), the `checklist` ring (52 px, only when the record has steps to be ready) and the commands (as wide as the widest row's buttons, a failed action's next steps and the three dots after them need, worked out from their labels, each label at most 8 px a character and a button holding the longer of its label and its pending label, the dots at their 44 px touch target; 64 px for the three dots alone; never narrower than a `commandsSize` the caller gives, which two lists on one page share so their columns line up although only one has buttons). A `checklist` puts the record's `ProgressChecklist` ring just before its commands, where Vercel ends a project's row with its Production Checklist; the ring opens its own drawer, never the row. Every row has its 32 px mark, its name (600) and, under it, one muted 14 px line, which `wraps=\"detail\"` lets wrap in full where the person must read it whole; `name` and the mark are required; a record with nothing to say under its name leaves the line out and is the name alone, never a dash. Give every column a `size` in pixels; the name takes the rest. With `layout=\"line\"`, as on Vercel's Projects page, the facts and the status share one muted line, joined by a middle dot, in a column as wide as the name's, and the row stays one line (mark, name over its line, that summary, the time, the ring, the three dots) on a card wide enough for its sized columns and 160 px each for the name and the summary, and on a narrower card the summary and the time move under the name as muted text joined by a middle dot that wraps, the status keeping its mark whole and breaking between its words only when it alone is wider than the line, in the same row, their labels read by assistive technology only. Rows of `columns` follow the same rule once the card is narrower than their columns: the facts and the time leave the row for that muted text, wrapping so every value stays readable, never a labelled list, and the status stands beside the name, which ends in an ellipsis before it, so the exception is never the part a phone's line cuts. `facts` takes at most three. A menu keeps every command in the three dots, one alone included, as Vercel's Environment Variables and Members rows do: a button stands on a row only where the list names it as `command`, the record's main job, on every row that can do it, so one list never mixes rows ending in a button with rows ending in dots. The commands never take the name's room: once the row is compact, its commands column holds only the three dots and the row's own buttons stand under the name, beside a failed action's next steps, outside the row's link, so pressing one never opens the record. Every column of the records' attributes stands on every row, as Vercel's lists keep theirs, so a person reads one attribute down a column: a record with no value for a fact draws `TableValue`'s muted dash, with the fact's `missing` read in its place; status is only for the exception, so a healthy record's status cell stays empty and the records that need a person stand out; the commands column, which holds no attribute, stands only while a record has a command, a menu or a message, or the rows open, and it widens for a failed action's next steps only while a row shows one. Never the three dots before the button, a decorative icon for the record's mark, a status on every row, or a destructive button on every row: a destructive command stays in the three dots. A `line` row's summary joins only the facts the record has, so it never ends in a dot. A failed or refused action of the record shows as its catalogue message inside its own row, never a notice under the row: it replaces the detail line, with its next steps beside its commands, or under the message on a card too narrow for the row's columns. With `open` the whole row is one target and takes the `accent` hover, with no chevron, as Vercel's Deployments rows open theirs; a row that opens nothing never reacts to hover. Opening is the row's alone: the three dots never hold a command that only shows the record (*Details*, *View*, *Open*). With `editor` the record's row opens its form under its line. `empty` is required: `null` is the choice to draw nothing for a list with no records, and any other value is the state it draws. A list that is a section of another page takes `heading`: its title, the one line under it, and at the trailing edge the card's `actions`, such as its Add command and a muted count, drawn as every card draws them, so the list and its commands are one card, never a list inside a setting card. A note about the whole list is `footer.note`: one muted line, an optional *Learn more* after it at the left and one secondary action at the right, in a strip of its own under the count and the paging, as Vercel ends its deployments list (\"Deployment retention is enabled. Learn more\", *View recently deleted*). A list a person picks from (`select`) says what the chosen records do together: while any is chosen, the footer's count becomes theirs (\"2 selected\") and their one command stands at the footer's end as an outline button (\"Invite 2\"), so choosing never changes the page's title row; the record's own main job stays its row's `command`, so a person never has to choose a record to act on it. Colour is neutral, the name in ink and every other cell in the body grey, except the status badge and a failed action's message. “Pick the variant by what the user needs: no-results for a filtered list that returned zero rows, blank slate or informational for a resource the user hasn’t created, cleared for completed work, permission for role or tier denials, error for a failed load.” (https://vercel.com/geist/empty-state) Ours: `failed`, `noMatch` and `empty` are those variants, drawn inside the card. “The right column holds at most one or two controls. If the row needs more, move secondary actions into a `Dots Menu`.” (https://vercel.com/geist/entity) Ours: one or two row commands (outline buttons of 32 px) stand before the three dots (36 px), the Dots Menu. “Render the Skeleton variant (`entity-with-skeleton`) during load instead of an empty row, and swap to real content once data resolves.” (https://vercel.com/geist/entity) Ours: three still skeleton rows hold the place, in a region that announces what replaces them; then the first that holds: the failed read, no match, the empty state, the rows.",
|
|
212
212
|
words: '“Lead the left column with a scannable identifier: an `Avatar` or icon, a Title Case label, then sentence-case secondary metadata (`Member since Mar 14, 2026`).” (https://vercel.com/geist/entity) Ours: the name is the record\'s own and the labels around it are sentence case, not Title Case. “Keep right-column buttons Verb + Noun (`Remove Member`, `Resend Invite`). Bare verbs like `Remove` or `Confirm` lose context once the row scrolls offscreen.” (https://vercel.com/geist/entity) Ours: the list names each kind of row button once, in `commands`, so every row that does a job draws the same words at the same width; the record\'s own name goes in the row\'s `accessibleName`, never in the label. “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) Ours: a list is the records\' attributes shown as data, not written as text. Its columns are the few attributes a person compares across the records to decide what to do with one (a deployment\'s status, environment, commit, branch and time), chosen from that job, never from what there is to say about a record. A cell holds the value alone, in the same shape down its column: a name, a kind ("Customer"), a count with its unit ("3 keys"), an amount; its position, the mark of its kind (`icon`, as Vercel marks a branch before "main") and its type say what it is, so the hidden heading needs no words in the cell. Never a sentence that restates the column ("Through Partner Alpha", "Joins as a company"), and never a word in place of a missing value ("Not available", "No Partner"): `of` returns nothing and the list draws the dash, and `nadicodeai/record-fact-no-stand-in` refuses the word given by `??`, a presence check or a guard clause. A known zero stays the count ("0 Agents") and a complete report that found nothing keeps its word ("None"), as `DESIGN.md` says; a word that names a kind of its own, a glossary term such as "Direct customer", is a value. A fact\'s `label`, the status\'s and the time\'s are the nouns the headings would be ("Partner", "State", "Asked"). The name\'s line under it is the one place a record is described in words, and the time keeps its verb\'s sentence ("Updated 3h ago"), as the approved canvas rules. Every string is the product\'s: `label` names the list, a time\'s `phrase` writes its sentence, `missing` is what a screen reader hears behind a dash, the menu\'s `label` reads "More for {record}". A row command names its result in sentence case ("Edit domain"). A status is the exception\'s word ("Needs attention", "Can\'t sign in"), never "Active" on every row, and never the state a row\'s own command already says: a row that ends in "Resend link" carries no "Link sent".',
|
|
213
213
|
access: '“Wrap the loading region in `aria-busy="true"` and announce completion with `aria-live="polite"` on the destination container, not the skeleton itself.” (https://vercel.com/geist/skeleton) Ours: the loading rows sit in one `SkeletonRegion` that is busy while they stand and announces what replaces them. A table named by `label`, its column headings read by assistive technology only; the commands column\'s is `commandsHeader`, and empty without one, since its controls name themselves, never the list\'s name a second time. The row link carries `open.label`; the three dots carry the menu\'s `label`, and the menu\'s first line names the record. The loading rows are a status named by `loadingLabel`, inside the one live region that announces what replaces them. “For multi-select rows, the leading `Checkbox` carries `aria-label="Select {entity name}"` so the row is selectable without relying on the visual label.” (https://vercel.com/geist/entity) Ours: each box is named by `select.label`, which reads "Select {record}".',
|
|
214
214
|
},
|
|
@@ -868,7 +868,7 @@ export const USAGE = [
|
|
|
868
868
|
summary: 'A record\'s identity in a row (DESIGN.md "Tables and missing values"): its mark at 32, its name, and under it one muted `detail` line saying what the record is or where it comes from, so the row reads without a column heading.',
|
|
869
869
|
when: "The first cell of every collection row: the mark, the name, and one muted line saying what the record is or where it comes from, so the row reads without a heading.",
|
|
870
870
|
instead: "An Agent in a gallery is `AgentListRow`; a model is `ModelIdentity`. A descriptive item with prose and actions is `Item`.",
|
|
871
|
-
behaviour: "The mark stands 16 px before the name. The name is semibold (600) ink and the detail a muted 14 px line, two lines with no gap between them, so the row is an entity row; `mark` is required; a record with nothing to say under its name leaves `detail` out and is the name alone, never a dash, which is a table cell's missing value and not a record's. The name holds one line and ends in an ellipsis, whole in its title, with a `hint` such as an ID read after it. The detail is one line too and ends in an ellipsis, whole in its title when it is text; in a row on a card narrower than its columns, the facts that leave the row join it after a middle dot and wrap so every value stays readable, and a status that leaves the row stands beside the name, which ends in an ellipsis before it. `wraps` only when the name is the whole record, such as a memory: the name is then a sentence at the body's regular weight, not a name in semibold, and the detail wraps too. The table owns the link.",
|
|
871
|
+
behaviour: "The mark stands 16 px before the name. The name is semibold (600) ink and the detail a muted 14 px line, two lines with no gap between them, so the row is an entity row; `mark` is required; a record with nothing to say under its name leaves `detail` out and is the name alone, never a dash, which is a table cell's missing value and not a record's. The name holds one line and ends in an ellipsis, whole in its title, with a `hint` such as an ID read after it. The detail is one line too and ends in an ellipsis, whole in its title when it is text; in a row on a card narrower than its columns, the facts that leave the row join it after a middle dot and wrap so every value stays readable, and a status that leaves the row stands beside the name, which ends in an ellipsis before it. `wraps` only when the name is the whole record, such as a memory: the name is then a sentence at the body's regular weight, not a name in semibold, and the detail wraps too. `wraps=\"detail\"` keeps the name a one-line name in semibold and wraps the detail in full, for a line the person must read whole, such as the code a request asks them to check. The table owns the link.",
|
|
872
872
|
words: '“Lead the left column with a scannable identifier: an `Avatar` or icon, a Title Case label, then sentence-case secondary metadata (`Member since Mar 14, 2026`).” (https://vercel.com/geist/entity) Ours: the name as the record calls itself, and the detail in sentence case: kind, then relation, three to six words, "Company skill · every Agent has it".',
|
|
873
873
|
access: "The name is the row link's text; the mark is decorative; the title carries the full name.",
|
|
874
874
|
},
|
|
@@ -1737,7 +1737,7 @@ export const USAGE = [
|
|
|
1737
1737
|
summary: "The leading entities beside a usage chart, with the complete ranking one step away.",
|
|
1738
1738
|
when: "A chart summary needs a ranking beside its plot.",
|
|
1739
1739
|
instead: "Exact breakdown columns belong in a DataTable. This list compares shares of one nonnegative total.",
|
|
1740
|
-
behaviour: "Shows the first five rows and an optional aggregate remainder, each identity and figure above its coloured share bar. The remainder identifies the neutral plot segment; View all expands the named entities rather than repeating their aggregate. View all opens the complete supplied ranking in a dialog. Rows arrive already sorted and share one total and colour map with the chart.",
|
|
1740
|
+
behaviour: "Shows the first five rows and an optional aggregate remainder, each identity and figure above its coloured share bar. The remainder identifies the neutral plot segment; View all expands the named entities rather than repeating their aggregate. View all stands only when more rows exist than the five shown, and opens the complete supplied ranking in a dialog. Rows arrive already sorted and share one total and colour map with the chart.",
|
|
1741
1741
|
words: "The product supplies the title, metric description, View all count, dialog description and close label.",
|
|
1742
1742
|
access: "Each share bar is named by its entity. The dialog is named by the ranking title and retains the selected period and metric.",
|
|
1743
1743
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadicodeai/ui",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.197",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#jsx": "./src/jsx/index.ts",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"@base-ui/react": "^1.9.0",
|
|
77
77
|
"@iconify-icons/logos": "^2.0.3",
|
|
78
78
|
"@iconify/react": "^6.0.2",
|
|
79
|
-
"@nadicodeai/design-system": "12.1.
|
|
79
|
+
"@nadicodeai/design-system": "12.1.197",
|
|
80
80
|
"@tanstack/react-table": "^9.3.1",
|
|
81
81
|
"@vgpu/wgsl": "0.6.0",
|
|
82
82
|
"class-variance-authority": "^0.7.1",
|