@nadicodeai/ui 12.1.188 → 12.1.189
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/catalog-row.d.ts +3 -1
- package/dist/components/catalog-row.d.ts.map +1 -1
- package/dist/components/catalog-row.js +20 -15
- package/dist/components/page-actions.d.ts +1 -1
- package/dist/components/page-actions.js +1 -1
- package/dist/components/record-list.d.ts +34 -7
- package/dist/components/record-list.d.ts.map +1 -1
- package/dist/components/record-list.js +32 -15
- package/dist/components/table-value.d.ts +1 -2
- package/dist/components/table-value.d.ts.map +1 -1
- package/dist/showcase/specimens/compositions.d.ts.map +1 -1
- package/dist/showcase/specimens/compositions.js +6 -1
- package/dist/showcase/usage.generated.js +5 -5
- package/package.json +2 -2
|
@@ -73,6 +73,8 @@ export type CatalogRowWords<Kind extends CatalogRowKind = CatalogRowKind> = {
|
|
|
73
73
|
/** The origin column's name and words; a screen of a catalog's own entries leaves them out and draws no such column. */
|
|
74
74
|
origin?: {
|
|
75
75
|
label: string;
|
|
76
|
+
/** What a screen reader hears behind the dash for a row whose origin is not known. */
|
|
77
|
+
missing: string;
|
|
76
78
|
words: CatalogOriginWords<Kind>;
|
|
77
79
|
};
|
|
78
80
|
};
|
|
@@ -113,7 +115,7 @@ export declare function skillOrigin(facts: SkillFacts, on: "agent" | "company",
|
|
|
113
115
|
* category on its own is `CategoryTag`.
|
|
114
116
|
* @behaviour The mark is the neutral ringed tile with the card's own icon, its kind's when the card names none, and the
|
|
115
117
|
* server icon for a server; the name; under it the detail. Then the facts: a skill's or a plugin's category label
|
|
116
|
-
* (`CategoryTag`) on every row, Other when its card names none, a
|
|
118
|
+
* (`CategoryTag`) on every row, Other when its card names none, and no category column in a list of servers, which have none; where the Agent's copy came from,
|
|
117
119
|
* in one closed list of origins, a learned skill naming the Agent who learned it with her mark, or by her name where the screen has no mark for her; then the screen's own
|
|
118
120
|
* columns. The category filter stands after the search only while the rows hold more than one category; `keep` narrows
|
|
119
121
|
* rows to the chosen one, and a choice the rows no longer hold narrows nothing. `narrowed` says a category is chosen,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-row.d.ts","sourceRoot":"","sources":["../../src/components/catalog-row.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,OAAO,EAAsB,KAAK,eAAe,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"catalog-row.d.ts","sourceRoot":"","sources":["../../src/components/catalog-row.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,OAAO,EAAsB,KAAK,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAI3F,OAAO,KAAK,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACpG,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEpF,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE3D,MAAM,MAAM,cAAc,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC;AAEhE,KAAK,SAAS,GAAG;IACf,KAAK,EACD;QAAE,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAA;KAAE,GACnD;QAAE,IAAI,EAAE,KAAK,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAC5B;QAAE,IAAI,EAAE,SAAS,CAAC;QAAC,EAAE,EAAE,cAAc,GAAG,IAAI,CAAA;KAAE,CAAC;IACnD,MAAM,EAAE;QAAE,IAAI,EAAE,SAAS,GAAG,eAAe,GAAG,OAAO,GAAG,OAAO,CAAA;KAAE,CAAC;IAClE,MAAM,EAAE;QAAE,IAAI,EAAE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.detail = row.detail;
|
|
78
78
|
return shown;
|
|
79
79
|
};
|
|
80
|
-
const categoryFact =
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
80
|
+
const categoryFact = kind === "server"
|
|
81
|
+
? undefined
|
|
82
|
+
: {
|
|
83
|
+
id: "category",
|
|
84
|
+
label: words.category,
|
|
85
|
+
of: (record) => {
|
|
86
|
+
const shown = categoryOf(record) ?? "other";
|
|
87
|
+
return _jsx(CategoryTag, { category: shown, label: words.categoryName(shown) });
|
|
88
|
+
},
|
|
89
|
+
size: 128,
|
|
90
|
+
};
|
|
89
91
|
const origin = words.origin;
|
|
90
92
|
const own = extra === undefined ? [] : "id" in extra ? [extra] : extra;
|
|
91
93
|
const read = origin && originReader(kind, origin.words);
|
|
@@ -96,15 +98,18 @@ export function useCatalogRows(kind, records, rowOf, words, extra) {
|
|
|
96
98
|
const from = rowOf(record).origin;
|
|
97
99
|
return from && read ? read(from) : null;
|
|
98
100
|
},
|
|
101
|
+
missing: origin.missing,
|
|
99
102
|
size: 176,
|
|
100
103
|
wraps: true,
|
|
101
104
|
};
|
|
102
|
-
const [first, second] =
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
const [first, second, third] = [categoryFact, originFact, ...own].filter((fact) => fact !== undefined);
|
|
106
|
+
let facts = [];
|
|
107
|
+
if (first)
|
|
108
|
+
facts = [first];
|
|
109
|
+
if (first && second)
|
|
110
|
+
facts = [first, second];
|
|
111
|
+
if (first && second && third)
|
|
112
|
+
facts = [first, second, third];
|
|
108
113
|
return {
|
|
109
114
|
list: { name, facts },
|
|
110
115
|
filters,
|
|
@@ -131,7 +131,7 @@ export declare function PageActionsSlot(): import("react").JSX.Element;
|
|
|
131
131
|
* @family Actions
|
|
132
132
|
* @when The actions of a collection, an object or an overview page, on the title's row at its trailing edge. A Configuration page has none: each section saves from its footer.
|
|
133
133
|
* @instead A row's actions are the row's one button and its `ActionMenu`. A collection toolbar holds search and filters, never a page action. A page whose parts each have commands gathers them in the one `PageActions` of the component that owns the page; a part never draws a second.
|
|
134
|
-
* @behaviour One per page: the title row has one owner, so a second `PageActions` on the page a person sees would hide the first's commands without a word. It throws in development and in tests, and in production the one that mounted last keeps the row. A page kept hidden for a quick return (an `Activity` with `mode="hidden"`) has given the row back and does not count. Takes `period`, `secondary`, `primary` and `menu` and draws their order and variants itself: the period, outline, default, then the three dots last. The menu needs two commands or more; a single extra command is the secondary. A primary whose job comes in a few kinds takes `choices`: its button opens a menu of them aligned to its end, each with its icon, as Vercel's "Add New…" does; a kind that needs its own fields opens its dialog from its row. A destination outside the product ends in the arrow. A running command (`pending`) keeps its place and icon, says its pending word and holds, and the type requires `pendingLabel` whenever `pending` is set. A command here is never destructive or warning: those sit in the danger zone of the page, in a card.
|
|
134
|
+
* @behaviour The page's commands, the same on each of its sibling tabs and whatever its list shows or has chosen: only the viewer's permission removes one, so the filled button a person found on one tab is filled on the next. A command on chosen records is the list's own (`RecordList`'s `select.chosen`), and a record's is its row's. One per page: the title row has one owner, so a second `PageActions` on the page a person sees would hide the first's commands without a word. It throws in development and in tests, and in production the one that mounted last keeps the row. A page kept hidden for a quick return (an `Activity` with `mode="hidden"`) has given the row back and does not count. Takes `period`, `secondary`, `primary` and `menu` and draws their order and variants itself: the period, outline, default, then the three dots last. The menu needs two commands or more; a single extra command is the secondary. A primary whose job comes in a few kinds takes `choices`: its button opens a menu of them aligned to its end, each with its icon, as Vercel's "Add New…" does; a kind that needs its own fields opens its dialog from its row. A destination outside the product ends in the arrow. A running command (`pending`) keeps its place and icon, says its pending word and holds, and the type requires `pendingLabel` whenever `pending` is set. A command here is never destructive or warning: those sit in the danger zone of the page, in a card.
|
|
135
135
|
* @words The primary is the page's main job as verb and noun: "Invite member", "New Agent". Its choices are the kinds, as nouns: "Folder", "Documents", "Web page". The pending word is its -ing form: "Inviting member". The menu names the page's record at its top and keeps the destructive command last, after a divider.
|
|
136
136
|
* @access DOM order is visual order. A command whose label does not name its target carries `accessibleName`. A running command is `aria-busy` and keeps focus. The three dots carry "More for {record}"; the menu returns focus to them when it closes.
|
|
137
137
|
*/
|
|
@@ -115,7 +115,7 @@ export function PageActionsSlot() {
|
|
|
115
115
|
* @family Actions
|
|
116
116
|
* @when The actions of a collection, an object or an overview page, on the title's row at its trailing edge. A Configuration page has none: each section saves from its footer.
|
|
117
117
|
* @instead A row's actions are the row's one button and its `ActionMenu`. A collection toolbar holds search and filters, never a page action. A page whose parts each have commands gathers them in the one `PageActions` of the component that owns the page; a part never draws a second.
|
|
118
|
-
* @behaviour One per page: the title row has one owner, so a second `PageActions` on the page a person sees would hide the first's commands without a word. It throws in development and in tests, and in production the one that mounted last keeps the row. A page kept hidden for a quick return (an `Activity` with `mode="hidden"`) has given the row back and does not count. Takes `period`, `secondary`, `primary` and `menu` and draws their order and variants itself: the period, outline, default, then the three dots last. The menu needs two commands or more; a single extra command is the secondary. A primary whose job comes in a few kinds takes `choices`: its button opens a menu of them aligned to its end, each with its icon, as Vercel's "Add New…" does; a kind that needs its own fields opens its dialog from its row. A destination outside the product ends in the arrow. A running command (`pending`) keeps its place and icon, says its pending word and holds, and the type requires `pendingLabel` whenever `pending` is set. A command here is never destructive or warning: those sit in the danger zone of the page, in a card.
|
|
118
|
+
* @behaviour The page's commands, the same on each of its sibling tabs and whatever its list shows or has chosen: only the viewer's permission removes one, so the filled button a person found on one tab is filled on the next. A command on chosen records is the list's own (`RecordList`'s `select.chosen`), and a record's is its row's. One per page: the title row has one owner, so a second `PageActions` on the page a person sees would hide the first's commands without a word. It throws in development and in tests, and in production the one that mounted last keeps the row. A page kept hidden for a quick return (an `Activity` with `mode="hidden"`) has given the row back and does not count. Takes `period`, `secondary`, `primary` and `menu` and draws their order and variants itself: the period, outline, default, then the three dots last. The menu needs two commands or more; a single extra command is the secondary. A primary whose job comes in a few kinds takes `choices`: its button opens a menu of them aligned to its end, each with its icon, as Vercel's "Add New…" does; a kind that needs its own fields opens its dialog from its row. A destination outside the product ends in the arrow. A running command (`pending`) keeps its place and icon, says its pending word and holds, and the type requires `pendingLabel` whenever `pending` is set. A command here is never destructive or warning: those sit in the danger zone of the page, in a card.
|
|
119
119
|
* @words The primary is the page's main job as verb and noun: "Invite member", "New Agent". Its choices are the kinds, as nouns: "Folder", "Documents", "Web page". The pending word is its -ing form: "Inviting member". The menu names the page's record at its top and keeps the destructive command last, after a divider.
|
|
120
120
|
* @access DOM order is visual order. A command whose label does not name its target carries `accessibleName`. A running command is `aria-busy` and keeps focus. The three dots carry "More for {record}"; the menu returns focus to them when it closes.
|
|
121
121
|
*/
|
|
@@ -7,6 +7,7 @@ import type { IdentityMarkProps } from "./identity-mark.js";
|
|
|
7
7
|
import { type CardActions, type PageCommand } from "./page-actions.js";
|
|
8
8
|
import { type ProgressChecklistProps } from "./progress-checklist.js";
|
|
9
9
|
import { type StatusBadgeTone } from "./status-badge.js";
|
|
10
|
+
import { type TableReading } from "./table-value.js";
|
|
10
11
|
import type { CollectionNote } from "../internal/collection-note.js";
|
|
11
12
|
import { type RowMessage } from "../internal/row-message.js";
|
|
12
13
|
export type { RowMessage };
|
|
@@ -21,16 +22,31 @@ export type RecordName = {
|
|
|
21
22
|
/** Its identity mark, drawn at 32. Every row has one: an initials mark when the record has no picture. */
|
|
22
23
|
mark: IdentityMarkProps;
|
|
23
24
|
};
|
|
24
|
-
|
|
25
|
+
type RecordFactColumn = {
|
|
25
26
|
id: string;
|
|
26
27
|
/** The column's name for assistive technology. */
|
|
27
28
|
label: string;
|
|
28
|
-
of: (
|
|
29
|
+
/** The mark of the value's kind, drawn before it as Vercel draws a branch mark before "main": for a value whose words do not say what it is, such as a Partner's name, and never on one that names its own kind ("Customer", "3 keys"). */
|
|
30
|
+
icon?: ReactElement;
|
|
29
31
|
/** Its column's width in pixels, for its longest value in every language the product ships. */
|
|
30
32
|
size: number;
|
|
31
33
|
/** The value is more than one line, such as a disclosure: it wraps in full instead of ending in an ellipsis. */
|
|
32
34
|
wraps?: true;
|
|
33
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* One attribute of the records, in a column that stands on every row. `of` gives its value alone, as a
|
|
38
|
+
* Vercel list shows it ("Customer", "Partner Alpha", "3 keys"), never a sentence that restates the
|
|
39
|
+
* column. A fact some record can lack returns nothing for it, which the list draws as the muted dash,
|
|
40
|
+
* and names in `missing` what a screen reader hears behind the dash ("No Partner"), never a word on
|
|
41
|
+
* the screen in its place.
|
|
42
|
+
*/
|
|
43
|
+
export type RecordFact<TRecord> = RecordFactColumn & ({
|
|
44
|
+
of: (record: TRecord) => TableReading;
|
|
45
|
+
missing?: string;
|
|
46
|
+
} | {
|
|
47
|
+
of: (record: TRecord) => TableReading | null | undefined;
|
|
48
|
+
missing: string;
|
|
49
|
+
});
|
|
34
50
|
/** At most three. A list that needs more columns compares its records, which is a `DataTable`. */
|
|
35
51
|
export type RecordFacts<TRecord> = readonly [] | readonly [RecordFact<TRecord>] | readonly [RecordFact<TRecord>, RecordFact<TRecord>] | readonly [RecordFact<TRecord>, RecordFact<TRecord>, RecordFact<TRecord>];
|
|
36
52
|
export type RecordStatus = {
|
|
@@ -55,6 +71,14 @@ export type RecordSelection<TRecord> = {
|
|
|
55
71
|
label: (record: TRecord) => string;
|
|
56
72
|
checked: (record: TRecord) => boolean;
|
|
57
73
|
onCheckedChange: (record: TRecord, checked: boolean) => void;
|
|
74
|
+
/**
|
|
75
|
+
* While any record is chosen: their count, in the footer's count's place ("2 selected"), and
|
|
76
|
+
* the one command on all of them, at the footer's end ("Invite 2").
|
|
77
|
+
*/
|
|
78
|
+
chosen: (records: readonly TRecord[]) => {
|
|
79
|
+
count: string;
|
|
80
|
+
command: PageCommand;
|
|
81
|
+
};
|
|
58
82
|
};
|
|
59
83
|
export type RecordListFooter = {
|
|
60
84
|
/** "5 Agents" */
|
|
@@ -94,7 +118,7 @@ export type RecordListProps<TRecord extends RowData> = {
|
|
|
94
118
|
*/
|
|
95
119
|
layout?: "columns" | "line";
|
|
96
120
|
facts?: RecordFacts<TRecord>;
|
|
97
|
-
/** Only for the exception: null for the
|
|
121
|
+
/** Only for the exception: null for the healthy record, whose status cell stays empty. */
|
|
98
122
|
status?: {
|
|
99
123
|
label: string;
|
|
100
124
|
of: (record: TRecord) => RecordStatus | null;
|
|
@@ -179,8 +203,9 @@ export type RecordListProps<TRecord extends RowData> = {
|
|
|
179
203
|
export type RecordListWithout<TRecord extends RowData, Key extends PropertyKey> = Omit<RecordListProps<TRecord>, Key>;
|
|
180
204
|
/**
|
|
181
205
|
* Entity rows: objects a person opens or acts on, one line each on one resting card: the
|
|
182
|
-
* identity mark and name over what it is,
|
|
183
|
-
* happened, at most two row commands, and the
|
|
206
|
+
* identity mark and name over what it is, then its attributes as data, one per column: a few
|
|
207
|
+
* facts, a status only for the exception, when it happened, at most two row commands, and the
|
|
208
|
+
* three dots last.
|
|
184
209
|
*
|
|
185
210
|
* @family Compositions
|
|
186
211
|
* @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)
|
|
@@ -188,7 +213,7 @@ export type RecordListWithout<TRecord extends RowData, Key extends PropertyKey>
|
|
|
188
213
|
* @instead “For tabular data with sortable columns and shared row shape, use `Table` instead.” (https://vercel.com/geist/entity)
|
|
189
214
|
* “For a static key/value metadata block on a detail page, use `Description`.” (https://vercel.com/geist/entity)
|
|
190
215
|
* 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`.
|
|
191
|
-
* @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 row that draws a button or next steps is never narrower than a `commandsSize` the caller gives). 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; `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.
|
|
216
|
+
* @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 row that draws a button or next steps is never narrower than a `commandsSize` the caller gives). 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; `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.
|
|
192
217
|
* “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)
|
|
193
218
|
* Ours: `failed`, `noMatch` and `empty` are those variants, drawn inside the card.
|
|
194
219
|
* “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)
|
|
@@ -198,7 +223,9 @@ export type RecordListWithout<TRecord extends RowData, Key extends PropertyKey>
|
|
|
198
223
|
* @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)
|
|
199
224
|
* Ours: the name is the record's own and the labels around it are sentence case, not Title Case.
|
|
200
225
|
* “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)
|
|
201
|
-
*
|
|
226
|
+
* “Column headers (`<Table.Head>`) are Title Case nouns or noun phrases: `Last Used`, `Requests (7d)`, `Created`, `Status`. Never sentences.” (https://vercel.com/geist/table)
|
|
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
|
+
* 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".
|
|
202
229
|
* @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)
|
|
203
230
|
* 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.
|
|
204
231
|
* “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)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-list.d.ts","sourceRoot":"","sources":["../../src/components/record-list.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAiB,KAAK,YAAY,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAE5F,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAExE,OAAO,EAEL,KAAK,qBAAqB,EAE3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAqB,MAAM,2BAA2B,CAAC;AAClG,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAIjG,OAAO,EAAe,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"record-list.d.ts","sourceRoot":"","sources":["../../src/components/record-list.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAiB,KAAK,YAAY,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAE5F,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAExE,OAAO,EAEL,KAAK,qBAAqB,EAE3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC3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CAAC;QACd,+DAA+D;QAC/D,MAAM,CAAC,EAAE,YAAY,CAAC;QACtB,WAAW,CAAC,EAAE,SAAS,CAAC;QACxB,6GAA6G;QAC7G,OAAO,CAAC,EAAE,WAAW,CAAC;KACvB,CAAC;IACF,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,WAAW,GAAG,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC,GAAG,IAAI,CAAC;IACxF,iFAAiF;IACjF,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,UAAU,GAAG,IAAI,CAAC;IAC/C;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,iBAAiB,CAAC,OAAO,SAAS,OAAO,EAAE,GAAG,SAAS,WAAW,IAAI,IAAI,CACpF,eAAe,CAAC,OAAO,CAAC,EACxB,GAAG,CACJ,CAAC;AAgXF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,UAAU,CAAC,OAAO,SAAS,OAAO,EAAE,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,sCA8ClF"}
|
|
@@ -100,19 +100,30 @@ function SelectCell({ row }) {
|
|
|
100
100
|
const record = row.original;
|
|
101
101
|
return (_jsx(Checkbox, { "aria-label": select.label(record), checked: select.checked(record), onCheckedChange: (checked) => select.onCheckedChange(record, checked) }));
|
|
102
102
|
}
|
|
103
|
-
function FactCell({ column, row }) {
|
|
104
|
-
const facts = useShownList().facts ?? [];
|
|
105
|
-
return _jsx(_Fragment, { children: facts.find((each) => each.id === column.id)?.of(row.original) });
|
|
106
|
-
}
|
|
107
103
|
function hasValue(value) {
|
|
108
104
|
return value !== null && value !== undefined && value !== "";
|
|
109
105
|
}
|
|
106
|
+
function FactValue({ icon, value }) {
|
|
107
|
+
if (!icon)
|
|
108
|
+
return _jsx(_Fragment, { children: value });
|
|
109
|
+
return (_jsxs("span", { "data-slot": "record-fact", children: [_jsx("span", { "aria-hidden": "true", className: "mr-1.5 inline-block align-middle [&_svg]:size-4", children: icon }), value] }));
|
|
110
|
+
}
|
|
111
|
+
function FactCell({ column, row }) {
|
|
112
|
+
const facts = useShownList().facts ?? [];
|
|
113
|
+
const fact = facts.find((each) => each.id === column.id);
|
|
114
|
+
if (!fact)
|
|
115
|
+
return null;
|
|
116
|
+
const value = fact.of(row.original);
|
|
117
|
+
return hasValue(value) ? (_jsx(FactValue, { icon: fact.icon, value: value })) : (_jsx(TableValue, { missingLabel: fact.missing ?? fact.label, value: null }));
|
|
118
|
+
}
|
|
110
119
|
function summaryOf(list, record) {
|
|
111
120
|
const facts = list.facts ?? [];
|
|
112
121
|
const status = list.status?.of(record) ?? null;
|
|
113
122
|
const said = facts.flatMap((fact) => {
|
|
114
123
|
const value = fact.of(record);
|
|
115
|
-
|
|
124
|
+
if (!hasValue(value))
|
|
125
|
+
return [];
|
|
126
|
+
return fact.icon ? [{ id: fact.id, value, icon: fact.icon }] : [{ id: fact.id, value }];
|
|
116
127
|
});
|
|
117
128
|
return status || said.length > 0 ? { status, said } : undefined;
|
|
118
129
|
}
|
|
@@ -121,7 +132,7 @@ function SummaryCell({ row }) {
|
|
|
121
132
|
if (!summary)
|
|
122
133
|
return null;
|
|
123
134
|
const { status, said } = summary;
|
|
124
|
-
return (_jsxs("div", { className: "flex min-w-0 items-center gap-2", "data-slot": "record-summary", children: [status ? _jsx(StatusBadge, { label: status.label, tone: status.tone }) : null, _jsx("span", { className: "min-w-0 truncate", children: said.map(({ id, value }, index) => (_jsxs("span", { children: [index > 0 ? _jsx("span", { "aria-hidden": "true", children: " \u00B7 " }) : null, value] }, id))) })] }));
|
|
135
|
+
return (_jsxs("div", { className: "flex min-w-0 items-center gap-2", "data-slot": "record-summary", children: [status ? _jsx(StatusBadge, { label: status.label, tone: status.tone }) : null, _jsx("span", { className: "min-w-0 truncate", children: said.map(({ id, value, icon }, index) => (_jsxs("span", { children: [index > 0 ? _jsx("span", { "aria-hidden": "true", children: " \u00B7 " }) : null, _jsx(FactValue, { icon: icon, value: value })] }, id))) })] }));
|
|
125
136
|
}
|
|
126
137
|
function StatusCell({ row }) {
|
|
127
138
|
const shown = useShownList().status?.of(row.original);
|
|
@@ -191,8 +202,6 @@ function recordColumns(props) {
|
|
|
191
202
|
}
|
|
192
203
|
else {
|
|
193
204
|
for (const fact of facts) {
|
|
194
|
-
if (!props.records.some((record) => hasValue(fact.of(record))))
|
|
195
|
-
continue;
|
|
196
205
|
columns.push({
|
|
197
206
|
id: fact.id,
|
|
198
207
|
header: fact.label,
|
|
@@ -203,7 +212,7 @@ function recordColumns(props) {
|
|
|
203
212
|
});
|
|
204
213
|
}
|
|
205
214
|
const status = props.status;
|
|
206
|
-
if (status
|
|
215
|
+
if (status) {
|
|
207
216
|
columns.push({
|
|
208
217
|
id: "status",
|
|
209
218
|
header: status.label,
|
|
@@ -267,8 +276,9 @@ function RecordRows(props) {
|
|
|
267
276
|
}
|
|
268
277
|
/**
|
|
269
278
|
* Entity rows: objects a person opens or acts on, one line each on one resting card: the
|
|
270
|
-
* identity mark and name over what it is,
|
|
271
|
-
* happened, at most two row commands, and the
|
|
279
|
+
* identity mark and name over what it is, then its attributes as data, one per column: a few
|
|
280
|
+
* facts, a status only for the exception, when it happened, at most two row commands, and the
|
|
281
|
+
* three dots last.
|
|
272
282
|
*
|
|
273
283
|
* @family Compositions
|
|
274
284
|
* @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)
|
|
@@ -276,7 +286,7 @@ function RecordRows(props) {
|
|
|
276
286
|
* @instead “For tabular data with sortable columns and shared row shape, use `Table` instead.” (https://vercel.com/geist/entity)
|
|
277
287
|
* “For a static key/value metadata block on a detail page, use `Description`.” (https://vercel.com/geist/entity)
|
|
278
288
|
* 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`.
|
|
279
|
-
* @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 row that draws a button or next steps is never narrower than a `commandsSize` the caller gives). 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; `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.
|
|
289
|
+
* @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 row that draws a button or next steps is never narrower than a `commandsSize` the caller gives). 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; `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.
|
|
280
290
|
* “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)
|
|
281
291
|
* Ours: `failed`, `noMatch` and `empty` are those variants, drawn inside the card.
|
|
282
292
|
* “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)
|
|
@@ -286,15 +296,22 @@ function RecordRows(props) {
|
|
|
286
296
|
* @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)
|
|
287
297
|
* Ours: the name is the record's own and the labels around it are sentence case, not Title Case.
|
|
288
298
|
* “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)
|
|
289
|
-
*
|
|
299
|
+
* “Column headers (`<Table.Head>`) are Title Case nouns or noun phrases: `Last Used`, `Requests (7d)`, `Created`, `Status`. Never sentences.” (https://vercel.com/geist/table)
|
|
300
|
+
* “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)
|
|
301
|
+
* 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".
|
|
290
302
|
* @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)
|
|
291
303
|
* 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.
|
|
292
304
|
* “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)
|
|
293
305
|
* Ours: each box is named by `select.label`, which reads "Select {record}".
|
|
294
306
|
*/
|
|
295
307
|
export function RecordList(props) {
|
|
296
|
-
const { records, heading, footer } = props;
|
|
308
|
+
const { records, heading, footer, select } = props;
|
|
297
309
|
const loading = !props.failed && records === undefined;
|
|
310
|
+
const chosenRecords = records?.filter((record) => select?.checked(record) === true) ?? [];
|
|
311
|
+
const chosen = select && chosenRecords.length > 0 ? select.chosen(chosenRecords) : undefined;
|
|
312
|
+
const pages = footer?.pages?.onPrevious === undefined && footer?.pages?.onNext === undefined
|
|
313
|
+
? undefined
|
|
314
|
+
: footer.pages;
|
|
298
315
|
let body;
|
|
299
316
|
if (props.failed) {
|
|
300
317
|
body = _jsx(EmptyState, { ...props.failed, scope: "card" });
|
|
@@ -313,5 +330,5 @@ export function RecordList(props) {
|
|
|
313
330
|
else {
|
|
314
331
|
body = _jsx(RecordRows, { ...props, records: records });
|
|
315
332
|
}
|
|
316
|
-
return (_jsx(TableCard, { actions: heading?.actions, footer:
|
|
333
|
+
return (_jsx(TableCard, { actions: heading?.actions, footer: chosen || pages ? (_jsxs(_Fragment, { children: [chosen ? _jsx(PageCommandButton, { command: chosen.command, variant: "outline" }) : null, pages ? _jsx(Pages, { pages: pages }) : null] })) : undefined, footerHint: chosen?.count ?? footer?.count, note: footer?.note, description: heading?.description, status: heading?.status, title: heading?.title, children: _jsx(ShownList.Provider, { value: props, children: _jsx(SkeletonRegion, { busy: loading, children: body }) }) }));
|
|
317
334
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
|
-
type TableReading = string | number | ReactElement;
|
|
2
|
+
export type TableReading = string | number | ReactElement;
|
|
3
3
|
export type TableValueProps = {
|
|
4
4
|
state?: "read";
|
|
5
5
|
value: TableReading | null | undefined;
|
|
@@ -26,5 +26,4 @@ export type TableValueProps = {
|
|
|
26
26
|
* @access The dash is hidden and `missingLabel` is read in its place; the error mark is hidden beside its words; the placeholder is decorative, and its cell is `aria-busy` while it loads.
|
|
27
27
|
*/
|
|
28
28
|
export declare function TableValue(props: TableValueProps): string | number | import("react").JSX.Element;
|
|
29
|
-
export {};
|
|
30
29
|
//# sourceMappingURL=table-value.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-value.d.ts","sourceRoot":"","sources":["../../src/components/table-value.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAK1C,
|
|
1
|
+
{"version":3,"file":"table-value.d.ts","sourceRoot":"","sources":["../../src/components/table-value.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAK1C,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,CAAC;AAE1D,MAAM,MAAM,eAAe,GACvB;IACE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,2FAA2F;IAC3F,YAAY,EAAE,MAAM,CAAC;IACrB,qGAAqG;IACrG,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GACD;IACE,KAAK,EAAE,QAAQ,CAAC;IAChB,qEAAqE;IACrE,WAAW,EAAE,MAAM,CAAC;CACrB,GACD;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,CAAC;AAEzB;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,iDAwChD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compositions.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/compositions.tsx"],"names":[],"mappings":"AAuIA,iBAAS,oBAAoB,gCA+B5B;AAMD,iBAAS,wBAAwB,gCAahC;AAED,iBAAS,qBAAqB,gCA0B7B;AAED,iBAAS,yBAAyB,gCAGjC;AAwBD,iBAAS,mBAAmB,
|
|
1
|
+
{"version":3,"file":"compositions.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/compositions.tsx"],"names":[],"mappings":"AAuIA,iBAAS,oBAAoB,gCA+B5B;AAMD,iBAAS,wBAAwB,gCAahC;AAED,iBAAS,qBAAqB,gCA0B7B;AAED,iBAAS,yBAAyB,gCAGjC;AAwBD,iBAAS,mBAAmB,gCAoC3B;AAED,iBAAS,sBAAsB,gCAyD9B;AAED,iBAAS,yBAAyB,gCAUjC;AAED,iBAAS,qBAAqB,gCAwC7B;AAED,iBAAS,kBAAkB,gCAiB1B;AAED,iBAAS,oBAAoB,gCAS5B;AAED,iBAAS,kBAAkB,gCA0B1B;AAED,iBAAS,kBAAkB,gCAuE1B;AAED,iBAAS,kBAAkB,gCAwB1B;AAED,iBAAS,oBAAoB,gCAkD5B;AAED,iBAAS,oBAAoB,gCAqC5B;AAED,iBAAS,mBAAmB,gCA2B3B;AAED,iBAAS,mBAAmB,gCAoB3B;AAwBD,iBAAS,uBAAuB,gCAkD/B;AAmCD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;CA6FE,CAAC"}
|
|
@@ -185,6 +185,7 @@ function CatalogRowsSpecimen() {
|
|
|
185
185
|
filter: FILTER_COPY,
|
|
186
186
|
origin: {
|
|
187
187
|
label: "Origin",
|
|
188
|
+
missing: "Origin not known",
|
|
188
189
|
words: {
|
|
189
190
|
company: "Company skill",
|
|
190
191
|
library: "From the Library",
|
|
@@ -405,7 +406,7 @@ function SettingsSectionSpecimen() {
|
|
|
405
406
|
}
|
|
406
407
|
function SelectableRecordListSpecimen() {
|
|
407
408
|
const [selected, setSelected] = useState(new Set(["orders"]));
|
|
408
|
-
return (_jsx(RecordList, { ...MAILBOX_LIST, footer: { count: `${
|
|
409
|
+
return (_jsx(RecordList, { ...MAILBOX_LIST, footer: { count: `${MAILBOXES.length} mailboxes` }, label: "Mailboxes", records: MAILBOXES, select: {
|
|
409
410
|
header: "Select",
|
|
410
411
|
label: (mailbox) => `Select ${mailbox.address}`,
|
|
411
412
|
checked: (mailbox) => selected.has(mailbox.id),
|
|
@@ -417,6 +418,10 @@ function SelectableRecordListSpecimen() {
|
|
|
417
418
|
next.delete(mailbox.id);
|
|
418
419
|
return next;
|
|
419
420
|
}),
|
|
421
|
+
chosen: (chosen) => ({
|
|
422
|
+
count: `${chosen.length} of ${MAILBOXES.length} selected`,
|
|
423
|
+
command: { label: `Reconnect ${chosen.length}`, icon: _jsx(RefreshCw, {}), onClick: nothing },
|
|
424
|
+
}),
|
|
420
425
|
} }));
|
|
421
426
|
}
|
|
422
427
|
const reconnectMenu = (mailbox) => ({
|
|
@@ -205,11 +205,11 @@ export const USAGE = [
|
|
|
205
205
|
name: "RecordList",
|
|
206
206
|
module: "record-list",
|
|
207
207
|
family: "Compositions",
|
|
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, a few facts, a status only for the exception, when it happened, at most two row commands, and the three dots last.",
|
|
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 row that draws a button or next steps is never narrower than a `commandsSize` the caller gives). 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; `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.
|
|
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:
|
|
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 row that draws a button or next steps is never narrower than a `commandsSize` the caller gives). 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; `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
|
+
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) “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
|
},
|
|
215
215
|
{
|
|
@@ -263,7 +263,7 @@ export const USAGE = [
|
|
|
263
263
|
summary: "One row for every skill, plugin and MCP server a person meets, in the Portal's Library and an Agent's pages and in Nadia's Edit Agent and company skills: the screen says what each record is, this draws it, and the screen keeps its own commands, menu, status and editor.",
|
|
264
264
|
when: "A `CollectionPage` of skills, plugins or MCP servers. The screen calls it with its records, what each one is (`CatalogRow`) and its words, spreads `list` into the page, passes `filters` as the page's filters and lists `keep`'s rows; a new screen of the same things gets the same row by the same call. A skill's origin comes from `skillOrigin`.",
|
|
265
265
|
instead: "Any other record is the page's own `RecordList` row. The Library's add-from drawer is `CatalogDrawer`; a category on its own is `CategoryTag`.",
|
|
266
|
-
behaviour: "The mark is the neutral ringed tile with the card's own icon, its kind's when the card names none, and the server icon for a server; the name; under it the detail. Then the facts: a skill's or a plugin's category label (`CategoryTag`) on every row, Other when its card names none, a
|
|
266
|
+
behaviour: "The mark is the neutral ringed tile with the card's own icon, its kind's when the card names none, and the server icon for a server; the name; under it the detail. Then the facts: a skill's or a plugin's category label (`CategoryTag`) on every row, Other when its card names none, and no category column in a list of servers, which have none; where the Agent's copy came from, in one closed list of origins, a learned skill naming the Agent who learned it with her mark, or by her name where the screen has no mark for her; then the screen's own columns. The category filter stands after the search only while the rows hold more than one category; `keep` narrows rows to the chosen one, and a choice the rows no longer hold narrows nothing. `narrowed` says a category is chosen, for the page's no match, and `clear` unsets it.",
|
|
267
267
|
words: 'Every string is the product\'s, one per origin in the grammar of the row\'s kind: "Company skill", "From the Library", "Comes with Nadia", "Learned", "Added in Nadia", "Added in the Portal", "From the {plugin} plugin"; the category\'s name as its filter writes it.',
|
|
268
268
|
access: "The columns are named by `words.category` and `words.origin.label`; the category's icon is decorative, and a learned skill's origin reads \"Learned by {Agent}\".",
|
|
269
269
|
},
|
|
@@ -340,7 +340,7 @@ export const USAGE = [
|
|
|
340
340
|
summary: "A page's actions, drawn on its title's row. The row has one owner: a page kept hidden for a quick return has given it back, and a second `PageActions` on the page a person sees throws in development and in tests. Outside a `PageActionsHostProvider`, they render where they stand.",
|
|
341
341
|
when: "The actions of a collection, an object or an overview page, on the title's row at its trailing edge. A Configuration page has none: each section saves from its footer.",
|
|
342
342
|
instead: "A row's actions are the row's one button and its `ActionMenu`. A collection toolbar holds search and filters, never a page action. A page whose parts each have commands gathers them in the one `PageActions` of the component that owns the page; a part never draws a second.",
|
|
343
|
-
behaviour: 'One per page: the title row has one owner, so a second `PageActions` on the page a person sees would hide the first
|
|
343
|
+
behaviour: "The page's commands, the same on each of its sibling tabs and whatever its list shows or has chosen: only the viewer's permission removes one, so the filled button a person found on one tab is filled on the next. A command on chosen records is the list's own (`RecordList`'s `select.chosen`), and a record's is its row's. One per page: the title row has one owner, so a second `PageActions` on the page a person sees would hide the first's commands without a word. It throws in development and in tests, and in production the one that mounted last keeps the row. A page kept hidden for a quick return (an `Activity` with `mode=\"hidden\"`) has given the row back and does not count. Takes `period`, `secondary`, `primary` and `menu` and draws their order and variants itself: the period, outline, default, then the three dots last. The menu needs two commands or more; a single extra command is the secondary. A primary whose job comes in a few kinds takes `choices`: its button opens a menu of them aligned to its end, each with its icon, as Vercel's \"Add New…\" does; a kind that needs its own fields opens its dialog from its row. A destination outside the product ends in the arrow. A running command (`pending`) keeps its place and icon, says its pending word and holds, and the type requires `pendingLabel` whenever `pending` is set. A command here is never destructive or warning: those sit in the danger zone of the page, in a card.",
|
|
344
344
|
words: 'The primary is the page\'s main job as verb and noun: "Invite member", "New Agent". Its choices are the kinds, as nouns: "Folder", "Documents", "Web page". The pending word is its -ing form: "Inviting member". The menu names the page\'s record at its top and keeps the destructive command last, after a divider.',
|
|
345
345
|
access: 'DOM order is visual order. A command whose label does not name its target carries `accessibleName`. A running command is `aria-busy` and keeps focus. The three dots carry "More for {record}"; the menu returns focus to them when it closes.',
|
|
346
346
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadicodeai/ui",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.189",
|
|
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.189",
|
|
80
80
|
"@tanstack/react-table": "^9.3.1",
|
|
81
81
|
"@vgpu/wgsl": "0.6.0",
|
|
82
82
|
"class-variance-authority": "^0.7.1",
|