@nadicodeai/ui 12.1.267 → 12.1.268
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/code-block.js +1 -1
- package/dist/components/collection-toolbar.js +1 -1
- package/dist/components/data-table.d.ts +1 -1
- package/dist/components/data-table.js +5 -2
- package/dist/components/native-select.js +1 -1
- package/dist/components/select.js +3 -3
- package/dist/components/settings-section.js +2 -2
- package/dist/internal/button-classes.js +1 -1
- package/dist/showcase/usage.generated.js +1 -1
- package/package.json +2 -2
|
@@ -19,7 +19,7 @@ function LanguageSwitcher({ label, onChange, options, value }) {
|
|
|
19
19
|
return (_jsxs(Select, { value: value, onValueChange: (next) => {
|
|
20
20
|
if (next !== null)
|
|
21
21
|
onChange(next);
|
|
22
|
-
}, children: [_jsx(SelectTrigger, { "aria-label": label, size: "sm", className: "w-auto bg-transparent px-2
|
|
22
|
+
}, children: [_jsx(SelectTrigger, { "aria-label": label, size: "sm", className: "w-auto bg-transparent px-2 text-label-sm text-muted-foreground md:text-label-sm shadow-none hover:bg-accent focus-visible:shadow-[0_0_0_2px_var(--ring)] data-popup-open:bg-accent [&_svg]:size-4", children: _jsx(SelectValue, { children: options.find((option) => option.value === value)?.label }) }), _jsx(SelectContent, { children: _jsx(SelectGroup, { children: options.map((option) => (_jsx(SelectItem, { value: option.value, children: option.label }, option.value))) }) })] }));
|
|
23
23
|
}
|
|
24
24
|
function LanguageTabs({ label, onChange, options, value }) {
|
|
25
25
|
return (_jsx(Tabs, { value: value, onValueChange: (next) => onChange(String(next)), className: "min-w-0", children: _jsx(TabsList, { "aria-label": label, children: options.map((option) => (_jsx(TabsTrigger, { value: option.value, children: option.label }, option.value))) }) }));
|
|
@@ -34,5 +34,5 @@ export function CollectionToolbar({ label, controls, search, actions, status, su
|
|
|
34
34
|
const drawn = surface === "glass" && (controls || actions) ? "glass" : "plain";
|
|
35
35
|
return (_jsxs("div", { "data-slot": "collection-toolbar", ...props, role: "toolbar", "aria-label": label, "data-surface": drawn, className: `flex min-w-0 flex-wrap items-center gap-2 ${drawn === "glass" ? ON_PAGE : PLAIN} ${IN_CARD}`, children: [controls ? (_jsx("div", { "data-slot": "collection-toolbar-controls", className: "flex min-w-0 max-w-full flex-wrap items-center gap-2 max-sm:contents", children: controls })) : null, search || actions ? (_jsxs("div", { "data-slot": "collection-toolbar-end", className: controls
|
|
36
36
|
? cn("flex min-w-0 items-center gap-2 max-sm:contents", search ? (actions ? "flex-1 basis-80" : "flex-1 basis-64") : "ml-auto")
|
|
37
|
-
: "contents", children: [search ? (_jsx("div", { "data-slot": "collection-toolbar-search", className: "min-w-0 flex-1 basis-64 max-sm:-order-1 max-sm:basis-full", children: search })) : null, actions ? (_jsx("div", { "data-slot": "collection-toolbar-actions", className: "ml-auto flex min-w-0 max-w-full shrink-0 flex-wrap items-center gap-2", children: actions })) : null] })) : null, status ? _jsx("div", { className: "absolute right-0 bottom-0", children: status }) : null] }));
|
|
37
|
+
: "contents", children: [search ? (_jsx("div", { "data-slot": "collection-toolbar-search", className: "min-w-0 flex-1 basis-64 max-sm:-order-1 max-sm:basis-full", children: search })) : null, actions ? (_jsx("div", { "data-slot": "collection-toolbar-actions", className: "ml-auto flex min-w-0 max-w-full shrink-0 flex-wrap items-center justify-end gap-2", children: actions })) : null] })) : null, status ? _jsx("div", { className: "absolute right-0 bottom-0", children: status }) : null] }));
|
|
38
38
|
}
|
|
@@ -216,7 +216,7 @@ export declare function columnMenuLabel<TData extends RowData, TValue extends Ce
|
|
|
216
216
|
* @instead “For a row of descriptive content paired with a single action (membership row, integration row), use `Entity` instead.” (https://vercel.com/geist/table)
|
|
217
217
|
* “For a key/value metadata block on a detail page, use `Description`, not a two-column table.” (https://vercel.com/geist/table)
|
|
218
218
|
* Ours: Geist's `Entity` is a `RecordList` row: a row that is one thing with a name a person opens, such as a deployment, a Customer, a Member account or an Agent, is a `RecordList`'s, however many facts it shows (owner, 2026-11-08). Its `Description` is `ObjectFacts`. A list on a page of its own is a `CollectionPage`. A descriptive list is `ItemGroup`.
|
|
219
|
-
* @behaviour Every column has a `header`; a column without one does not compile. The headings are always visible, medium weight in the cells' body grey, 48 px high, with 12 px of room under the labels and then the rule, so the first row starts at the rule like every other; rows are 40 px. Each column is at least its definition's `size`, in pixels, and as wide as its longest value, whose words stay on one line unless the column `wraps`; a column marked `identifier` holds ids or paths and is cut in the middle. The last column trails unless it `wraps` or is `centered`; a `centered` column's heading and values sit in the middle of it. Records are divided by a 1 px rule, none after the last. The first and last columns stand in from the card's edges by the card's spacing, so the first lines up with the title. Records of several kinds stand in one table under `group` headings: a heading row that spans the columns, in ink, medium text, 36 px high with the same rule under it, one per group in the order the groups first appear, never a second table; a heading is the group's name and carries no figure of its own. A row that opens a record takes `accent` on hover, and any row on focus within and while its menu is open; a row that opens nothing never reacts to hover. A selected row takes `muted`; headers and footers never highlight and carry no fill. On a card narrower than its columns a table of figures keeps every column and scrolls sideways inside its card, as Geist's and shadcn's tables do (owner, 2026-11-08); a document's table, such as a legal page's, takes the `wraps` option on its columns, so their words wrap and the row grows. A bounded page's paging stands in the card's footer strip at its trailing edge, opposite `footer`, which stands at the leading edge: its `status` ("Page 2 of 7") before Previous and Next, which are the product's router links (`previousLink`, `nextLink`) when each page is its own address, and buttons otherwise; the one that leads nowhere stays, disabled. A note about the whole table is `footerNote`, in a strip of its own under that one: one muted line, an optional *Learn more* after it at the left and one secondary action at the right; it is the one place a table says a sentence. A column's `footer` is its total: when a shown column has one, a row of totals closes the table under a rule, in ink, medium text, each total under its own column, a figure trailing in tabular digits like the column's values, the first column's footer naming the row, and a column with no total leaving its cell empty. One total with no column of its own is `summary`, under the table at its trailing edge, where it reads as the last column's; a total of another column is that column's `footer` (nadicode decision). Colour is neutral: headings and cells in the body grey, no hue, except a status badge or a tone the cell itself carries.
|
|
219
|
+
* @behaviour Every column has a `header`; a column without one does not compile. The headings are always visible, medium weight in the cells' body grey, 48 px high, with 12 px of room under the labels and then the rule, so the first row starts at the rule like every other; rows are 40 px. Each column is at least its definition's `size`, in pixels, and as wide as its longest value, whose words stay on one line unless the column `wraps`; a column marked `identifier` holds ids or paths and is cut in the middle. A column that wraps (`meta.wraps`) gives way first and shrinks toward its longest word; its definition's `minSize` is the floor it keeps, so a narrow card scrolls the table sideways instead of breaking a sentence one word per line. The last column trails unless it `wraps` or is `centered`; a `centered` column's heading and values sit in the middle of it. Records are divided by a 1 px rule, none after the last. The first and last columns stand in from the card's edges by the card's spacing, so the first lines up with the title. Records of several kinds stand in one table under `group` headings: a heading row that spans the columns, in ink, medium text, 36 px high with the same rule under it, one per group in the order the groups first appear, never a second table; a heading is the group's name and carries no figure of its own. A row that opens a record takes `accent` on hover, and any row on focus within and while its menu is open; a row that opens nothing never reacts to hover. A selected row takes `muted`; headers and footers never highlight and carry no fill. On a card narrower than its columns a table of figures keeps every column and scrolls sideways inside its card, as Geist's and shadcn's tables do (owner, 2026-11-08); a document's table, such as a legal page's, takes the `wraps` option on its columns, so their words wrap and the row grows. A bounded page's paging stands in the card's footer strip at its trailing edge, opposite `footer`, which stands at the leading edge: its `status` ("Page 2 of 7") before Previous and Next, which are the product's router links (`previousLink`, `nextLink`) when each page is its own address, and buttons otherwise; the one that leads nowhere stays, disabled. A note about the whole table is `footerNote`, in a strip of its own under that one: one muted line, an optional *Learn more* after it at the left and one secondary action at the right; it is the one place a table says a sentence. A column's `footer` is its total: when a shown column has one, a row of totals closes the table under a rule, in ink, medium text, each total under its own column, a figure trailing in tabular digits like the column's values, the first column's footer naming the row, and a column with no total leaving its cell empty. One total with no column of its own is `summary`, under the table at its trailing edge, where it reads as the last column's; a total of another column is that column's `footer` (nadicode decision). Colour is neutral: headings and cells in the body grey, no hue, except a status badge or a tone the cell itself carries.
|
|
220
220
|
* “When the underlying list is empty (filter cleared, never created), render `Empty State` outside the table rather than an empty `<Table.Body>`.” (https://vercel.com/geist/table)
|
|
221
221
|
* “After an async filter change, wrap the region in `aria-live="polite"` so screen readers announce the new state.” (https://vercel.com/geist/empty-state)
|
|
222
222
|
* Ours: empty sits outside the body, in a polite live region that stays in place so a filter that empties the table is announced.
|
|
@@ -119,7 +119,7 @@ function GroupHeading({ children, span }) {
|
|
|
119
119
|
* @instead “For a row of descriptive content paired with a single action (membership row, integration row), use `Entity` instead.” (https://vercel.com/geist/table)
|
|
120
120
|
* “For a key/value metadata block on a detail page, use `Description`, not a two-column table.” (https://vercel.com/geist/table)
|
|
121
121
|
* Ours: Geist's `Entity` is a `RecordList` row: a row that is one thing with a name a person opens, such as a deployment, a Customer, a Member account or an Agent, is a `RecordList`'s, however many facts it shows (owner, 2026-11-08). Its `Description` is `ObjectFacts`. A list on a page of its own is a `CollectionPage`. A descriptive list is `ItemGroup`.
|
|
122
|
-
* @behaviour Every column has a `header`; a column without one does not compile. The headings are always visible, medium weight in the cells' body grey, 48 px high, with 12 px of room under the labels and then the rule, so the first row starts at the rule like every other; rows are 40 px. Each column is at least its definition's `size`, in pixels, and as wide as its longest value, whose words stay on one line unless the column `wraps`; a column marked `identifier` holds ids or paths and is cut in the middle. The last column trails unless it `wraps` or is `centered`; a `centered` column's heading and values sit in the middle of it. Records are divided by a 1 px rule, none after the last. The first and last columns stand in from the card's edges by the card's spacing, so the first lines up with the title. Records of several kinds stand in one table under `group` headings: a heading row that spans the columns, in ink, medium text, 36 px high with the same rule under it, one per group in the order the groups first appear, never a second table; a heading is the group's name and carries no figure of its own. A row that opens a record takes `accent` on hover, and any row on focus within and while its menu is open; a row that opens nothing never reacts to hover. A selected row takes `muted`; headers and footers never highlight and carry no fill. On a card narrower than its columns a table of figures keeps every column and scrolls sideways inside its card, as Geist's and shadcn's tables do (owner, 2026-11-08); a document's table, such as a legal page's, takes the `wraps` option on its columns, so their words wrap and the row grows. A bounded page's paging stands in the card's footer strip at its trailing edge, opposite `footer`, which stands at the leading edge: its `status` ("Page 2 of 7") before Previous and Next, which are the product's router links (`previousLink`, `nextLink`) when each page is its own address, and buttons otherwise; the one that leads nowhere stays, disabled. A note about the whole table is `footerNote`, in a strip of its own under that one: one muted line, an optional *Learn more* after it at the left and one secondary action at the right; it is the one place a table says a sentence. A column's `footer` is its total: when a shown column has one, a row of totals closes the table under a rule, in ink, medium text, each total under its own column, a figure trailing in tabular digits like the column's values, the first column's footer naming the row, and a column with no total leaving its cell empty. One total with no column of its own is `summary`, under the table at its trailing edge, where it reads as the last column's; a total of another column is that column's `footer` (nadicode decision). Colour is neutral: headings and cells in the body grey, no hue, except a status badge or a tone the cell itself carries.
|
|
122
|
+
* @behaviour Every column has a `header`; a column without one does not compile. The headings are always visible, medium weight in the cells' body grey, 48 px high, with 12 px of room under the labels and then the rule, so the first row starts at the rule like every other; rows are 40 px. Each column is at least its definition's `size`, in pixels, and as wide as its longest value, whose words stay on one line unless the column `wraps`; a column marked `identifier` holds ids or paths and is cut in the middle. A column that wraps (`meta.wraps`) gives way first and shrinks toward its longest word; its definition's `minSize` is the floor it keeps, so a narrow card scrolls the table sideways instead of breaking a sentence one word per line. The last column trails unless it `wraps` or is `centered`; a `centered` column's heading and values sit in the middle of it. Records are divided by a 1 px rule, none after the last. The first and last columns stand in from the card's edges by the card's spacing, so the first lines up with the title. Records of several kinds stand in one table under `group` headings: a heading row that spans the columns, in ink, medium text, 36 px high with the same rule under it, one per group in the order the groups first appear, never a second table; a heading is the group's name and carries no figure of its own. A row that opens a record takes `accent` on hover, and any row on focus within and while its menu is open; a row that opens nothing never reacts to hover. A selected row takes `muted`; headers and footers never highlight and carry no fill. On a card narrower than its columns a table of figures keeps every column and scrolls sideways inside its card, as Geist's and shadcn's tables do (owner, 2026-11-08); a document's table, such as a legal page's, takes the `wraps` option on its columns, so their words wrap and the row grows. A bounded page's paging stands in the card's footer strip at its trailing edge, opposite `footer`, which stands at the leading edge: its `status` ("Page 2 of 7") before Previous and Next, which are the product's router links (`previousLink`, `nextLink`) when each page is its own address, and buttons otherwise; the one that leads nowhere stays, disabled. A note about the whole table is `footerNote`, in a strip of its own under that one: one muted line, an optional *Learn more* after it at the left and one secondary action at the right; it is the one place a table says a sentence. A column's `footer` is its total: when a shown column has one, a row of totals closes the table under a rule, in ink, medium text, each total under its own column, a figure trailing in tabular digits like the column's values, the first column's footer naming the row, and a column with no total leaving its cell empty. One total with no column of its own is `summary`, under the table at its trailing edge, where it reads as the last column's; a total of another column is that column's `footer` (nadicode decision). Colour is neutral: headings and cells in the body grey, no hue, except a status badge or a tone the cell itself carries.
|
|
123
123
|
* “When the underlying list is empty (filter cleared, never created), render `Empty State` outside the table rather than an empty `<Table.Body>`.” (https://vercel.com/geist/table)
|
|
124
124
|
* “After an async filter change, wrap the region in `aria-live="polite"` so screen readers announce the new state.” (https://vercel.com/geist/empty-state)
|
|
125
125
|
* Ours: empty sits outside the body, in a polite live region that stays in place so a filter that empties the table is announced.
|
|
@@ -168,6 +168,7 @@ function RecordsTable({ kind, columns, data, getRowId, filterColumnId, filterPla
|
|
|
168
168
|
const identityColumnId = primaryColumnId ?? definitionId(columns[0]);
|
|
169
169
|
// TanStack gives a column without a size its default one; only the caller's definition says whether it has one.
|
|
170
170
|
const sizeOf = new Map(columns.map((column) => [definitionId(column), column.size]));
|
|
171
|
+
const minSizeOf = new Map(columns.map((column) => [definitionId(column), column.minSize]));
|
|
171
172
|
const tableColumns = React.useMemo(() => columns.map(tableColumn), [columns]);
|
|
172
173
|
// An external pager means `data` is already one bounded server page:
|
|
173
174
|
// `manualPagination` makes the paginated row model a passthrough so every
|
|
@@ -277,7 +278,9 @@ function RecordsTable({ kind, columns, data, getRowId, filterColumnId, filterPla
|
|
|
277
278
|
})), label: tableLabel, children: records })) : (_jsxs(Table, { "aria-label": tableLabel, className: "text-body-sm", children: [_jsx(TableColgroup, { children: visibleColumns.map((column) => {
|
|
278
279
|
const size = sizeOf.get(column.id);
|
|
279
280
|
return (_jsx(TableCol, { style: size === undefined ? undefined : { width: size } }, column.id));
|
|
280
|
-
}) }), _jsx(TableHeader, { children: _jsx(TableRow, { children: headings.map((heading) => (_jsx(TableHead, { "aria-sort": sortOrder(heading.column.getIsSorted()),
|
|
281
|
+
}) }), _jsx(TableHeader, { children: _jsx(TableRow, { children: headings.map((heading) => (_jsx(TableHead, { "aria-sort": sortOrder(heading.column.getIsSorted()),
|
|
282
|
+
// A wrapping column shrinks to its longest word unless its definition gives it a floor.
|
|
283
|
+
style: { minWidth: minSizeOf.get(heading.column.id) }, className: cn(isNumericColumn(heading.column) && "text-right tabular-nums", heading.column.columnDef.meta?.wraps === true && "last:text-left", heading.column.columnDef.meta?.centered === true &&
|
|
281
284
|
"text-center last:text-center"), children: heading.content }, heading.id))) }) }), records, visibleColumns.some((column) => column.columnDef.footer !== undefined) ? (_jsx(TableFooter, { children: _jsx(TableRow, { children: table
|
|
282
285
|
.getFooterGroups()
|
|
283
286
|
.flatMap((footerGroup) => footerGroup.headers)
|
|
@@ -75,7 +75,7 @@ function NativeSelect({ className, size = "default", prefix, suffix, label, desc
|
|
|
75
75
|
option.selected = shown.includes(option.value);
|
|
76
76
|
appliedDefault.current = defaultKey;
|
|
77
77
|
}, [defaultKey]);
|
|
78
|
-
return (_jsx(FieldFrame, { label: label, description: description, error: error, size: size, control: props, children: (aria) => (_jsxs("div", { className: cn("group/native-select relative w-full", className), "data-slot": "native-select-wrapper", "data-size": size, children: [prefix ? (_jsx("span", { "data-slot": "native-select-prefix", "aria-hidden": "true", className: "pointer-events-none absolute top-1/2 left-control-padding-inline flex -translate-y-1/2 items-center text-muted-foreground [&_svg:not([class*='size-'])]:size-4", children: prefix })) : null, _jsx("select", { ref: setRef, "data-slot": "native-select", "data-size": size, "data-field-frame": "", className: cn("h-control-height min-h-touch-target w-full min-w-0 cursor-pointer appearance-none rounded-sm bg-(--nc-field,var(--background)) py-0 pr-9 pl-control-padding-inline text-
|
|
78
|
+
return (_jsx(FieldFrame, { label: label, description: description, error: error, size: size, control: props, children: (aria) => (_jsxs("div", { className: cn("group/native-select relative w-full", className), "data-slot": "native-select-wrapper", "data-size": size, children: [prefix ? (_jsx("span", { "data-slot": "native-select-prefix", "aria-hidden": "true", className: "pointer-events-none absolute top-1/2 left-control-padding-inline flex -translate-y-1/2 items-center text-muted-foreground [&_svg:not([class*='size-'])]:size-4", children: prefix })) : null, _jsx("select", { ref: setRef, "data-slot": "native-select", "data-size": size, "data-field-frame": "", className: cn("h-control-height min-h-touch-target w-full min-w-0 cursor-pointer appearance-none rounded-sm bg-(--nc-field,var(--background)) py-0 pr-9 pl-control-padding-inline text-base select-none md:text-sm selection:bg-primary selection:text-primary-foreground data-[size=lg]:h-nadicode-control-height-lg data-[size=lg]:rounded-md data-[size=lg]:text-base data-[size=sm]:h-nadicode-control-height-sm [@media(hover:hover)_and_(pointer:fine)]:min-h-0", fieldRing, fieldStates, fieldDisabled, prefix ? "pl-10" : undefined), ...props, ...aria }), suffix ? (_jsx("span", { "data-slot": "native-select-suffix", "aria-hidden": "true", className: "pointer-events-none absolute top-1/2 right-3 flex -translate-y-1/2 items-center text-muted-foreground select-none [&_svg:not([class*='size-'])]:size-4", children: suffix })) : (_jsx(ChevronDownIcon, { className: "pointer-events-none absolute top-1/2 right-3 size-3.5 -translate-y-1/2 text-muted-foreground select-none", "aria-hidden": "true", "data-slot": "native-select-icon" }))] })) }));
|
|
79
79
|
}
|
|
80
80
|
function NativeSelectOption({ className, ...props }) {
|
|
81
81
|
return (_jsx("option", { "data-slot": "native-select-option", className: cn("bg-[Canvas] text-[CanvasText]", className), ...props }));
|
|
@@ -63,7 +63,7 @@ function SelectValue({ className, ...props }) {
|
|
|
63
63
|
* `SelectTrigger`, such as `MultiSelectTrigger`, wears the same box.
|
|
64
64
|
*/
|
|
65
65
|
const selectTriggerVariants = cva([
|
|
66
|
-
"flex min-h-touch-target w-full items-center justify-between gap-1.5 py-0 pr-3 pl-control-padding-inline text-
|
|
66
|
+
"flex min-h-touch-target w-full items-center justify-between gap-1.5 py-0 pr-3 pl-control-padding-inline text-base whitespace-nowrap select-none data-placeholder:text-placeholder [@media(hover:hover)_and_(pointer:fine)]:min-h-0 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
67
67
|
], {
|
|
68
68
|
variants: {
|
|
69
69
|
look: {
|
|
@@ -71,8 +71,8 @@ const selectTriggerVariants = cva([
|
|
|
71
71
|
inline: "",
|
|
72
72
|
},
|
|
73
73
|
size: {
|
|
74
|
-
sm: "h-nadicode-control-height-sm rounded-sm",
|
|
75
|
-
default: "h-control-height rounded-sm",
|
|
74
|
+
sm: "h-nadicode-control-height-sm rounded-sm md:text-sm",
|
|
75
|
+
default: "h-control-height rounded-sm md:text-sm",
|
|
76
76
|
lg: "h-nadicode-control-height-lg rounded-md text-base",
|
|
77
77
|
},
|
|
78
78
|
},
|
|
@@ -14,8 +14,8 @@ import { CardActionsRow, PageCommandButton, } from "./page-actions.js";
|
|
|
14
14
|
import { Switch } from "./switch.js";
|
|
15
15
|
import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip.js";
|
|
16
16
|
const toneClassNames = {
|
|
17
|
-
error: "border border-destructive *:data-[slot=card-footer]:border-destructive *:data-[slot=card-footer]:bg-destructive-soft *:data-[slot=card-footer]:*:data-[slot=settings-section-hint]:text-destructive-soft-foreground",
|
|
18
|
-
warning: "border border-warning *:data-[slot=card-footer]:border-warning *:data-[slot=card-footer]:bg-warning-soft *:data-[slot=card-footer]:*:data-[slot=settings-section-hint]:text-warning-soft-foreground",
|
|
17
|
+
error: "relative after:pointer-events-none after:absolute after:inset-0 after:z-10 after:rounded-[inherit] after:border after:border-destructive *:data-[slot=card-footer]:border-destructive *:data-[slot=card-footer]:bg-destructive-soft *:data-[slot=card-footer]:*:data-[slot=settings-section-hint]:text-destructive-soft-foreground",
|
|
18
|
+
warning: "relative after:pointer-events-none after:absolute after:inset-0 after:z-10 after:rounded-[inherit] after:border after:border-warning *:data-[slot=card-footer]:border-warning *:data-[slot=card-footer]:bg-warning-soft *:data-[slot=card-footer]:*:data-[slot=settings-section-hint]:text-warning-soft-foreground",
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
21
|
* A card of one setting that says what changing it does and ends in a footer.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
|
-
const heldNeutral = "disabled:border-border disabled:bg-muted disabled:text-
|
|
3
|
+
const heldNeutral = "disabled:border-border disabled:bg-muted disabled:text-placeholder aria-disabled:border-border aria-disabled:bg-muted aria-disabled:text-placeholder";
|
|
4
4
|
const heldDim = "disabled:opacity-50 aria-disabled:not-aria-busy:opacity-50";
|
|
5
5
|
const variantClasses = {
|
|
6
6
|
default: [
|
|
@@ -1407,7 +1407,7 @@ export const USAGE = [
|
|
|
1407
1407
|
summary: "Lines of figures read and compared: the same figures on every row, read down a column under its heading and across a row, inside their `TableCard`.",
|
|
1408
1408
|
when: "“Use `<Table>` for tabular data where rows share the same shape and at least one column is sortable or comparable across rows.” (https://vercel.com/geist/table) Ours: if each row is a thing you can open, it is a list; if each row is a line of numbers you read, it is a table (owner, 2026-11-08). This is the table: its rows are not things a person opens but lines of figures read and compared, such as usage per product, the amounts in a statement or invoices. It has a visible heading row, because a number means nothing without its label, and at least one column is a figure.",
|
|
1409
1409
|
instead: "“For a row of descriptive content paired with a single action (membership row, integration row), use `Entity` instead.” (https://vercel.com/geist/table) “For a key/value metadata block on a detail page, use `Description`, not a two-column table.” (https://vercel.com/geist/table) Ours: Geist's `Entity` is a `RecordList` row: a row that is one thing with a name a person opens, such as a deployment, a Customer, a Member account or an Agent, is a `RecordList`'s, however many facts it shows (owner, 2026-11-08). Its `Description` is `ObjectFacts`. A list on a page of its own is a `CollectionPage`. A descriptive list is `ItemGroup`.",
|
|
1410
|
-
behaviour: "Every column has a `header`; a column without one does not compile. The headings are always visible, medium weight in the cells' body grey, 48 px high, with 12 px of room under the labels and then the rule, so the first row starts at the rule like every other; rows are 40 px. Each column is at least its definition's `size`, in pixels, and as wide as its longest value, whose words stay on one line unless the column `wraps`; a column marked `identifier` holds ids or paths and is cut in the middle. The last column trails unless it `wraps` or is `centered`; a `centered` column's heading and values sit in the middle of it. Records are divided by a 1 px rule, none after the last. The first and last columns stand in from the card's edges by the card's spacing, so the first lines up with the title. Records of several kinds stand in one table under `group` headings: a heading row that spans the columns, in ink, medium text, 36 px high with the same rule under it, one per group in the order the groups first appear, never a second table; a heading is the group's name and carries no figure of its own. A row that opens a record takes `accent` on hover, and any row on focus within and while its menu is open; a row that opens nothing never reacts to hover. A selected row takes `muted`; headers and footers never highlight and carry no fill. On a card narrower than its columns a table of figures keeps every column and scrolls sideways inside its card, as Geist's and shadcn's tables do (owner, 2026-11-08); a document's table, such as a legal page's, takes the `wraps` option on its columns, so their words wrap and the row grows. A bounded page's paging stands in the card's footer strip at its trailing edge, opposite `footer`, which stands at the leading edge: its `status` (\"Page 2 of 7\") before Previous and Next, which are the product's router links (`previousLink`, `nextLink`) when each page is its own address, and buttons otherwise; the one that leads nowhere stays, disabled. A note about the whole table is `footerNote`, in a strip of its own under that one: one muted line, an optional *Learn more* after it at the left and one secondary action at the right; it is the one place a table says a sentence. A column's `footer` is its total: when a shown column has one, a row of totals closes the table under a rule, in ink, medium text, each total under its own column, a figure trailing in tabular digits like the column's values, the first column's footer naming the row, and a column with no total leaving its cell empty. One total with no column of its own is `summary`, under the table at its trailing edge, where it reads as the last column's; a total of another column is that column's `footer` (nadicode decision). Colour is neutral: headings and cells in the body grey, no hue, except a status badge or a tone the cell itself carries. “When the underlying list is empty (filter cleared, never created), render `Empty State` outside the table rather than an empty `<Table.Body>`.” (https://vercel.com/geist/table) “After an async filter change, wrap the region in `aria-live=\"polite\"` so screen readers announce the new state.” (https://vercel.com/geist/empty-state) Ours: empty sits outside the body, in a polite live region that stays in place so a filter that empties the table is announced. Ours: a table that is the page's job under its title takes the page's `notice`, one `NoticeBanner` above its toolbar, 12 px over it, as a collection page places it under the title: a refresh of the rows that failed, with Try again (nadicode decision). Ours: the table draws its own toolbar, a `FilterToolbar`: from `toolbar` for a registry whose search, filters and sort the product keeps (the URL), or else its own local search; the column menu and `toolbarActions` end it. A product never draws a table's toolbar itself. While the page reads the rows, `DataTableSkeleton` stands in the table's place: the same card, a heading row and the given number of rows at the table's heights, the columns after the second leaving it below 640 px, with no words (nadicode decision). “Sortable column headers are buttons. The visible label stays Title Case; the sort-direction arrow is decorative and the button announces the next sort state to assistive tech.” (https://vercel.com/geist/table) Ours: the order has one owner, the app's `sorting`, which the URL holds and a `CollectionSort` above the list sets, so no heading is a button and every page of a paged list follows one order. “Apply `tabular-nums` (or Geist Mono) to numeric columns so digits align across rows for comparison.” (https://vercel.com/geist/table) Ours: a numeric column trails in tabular figures.",
|
|
1410
|
+
behaviour: "Every column has a `header`; a column without one does not compile. The headings are always visible, medium weight in the cells' body grey, 48 px high, with 12 px of room under the labels and then the rule, so the first row starts at the rule like every other; rows are 40 px. Each column is at least its definition's `size`, in pixels, and as wide as its longest value, whose words stay on one line unless the column `wraps`; a column marked `identifier` holds ids or paths and is cut in the middle. A column that wraps (`meta.wraps`) gives way first and shrinks toward its longest word; its definition's `minSize` is the floor it keeps, so a narrow card scrolls the table sideways instead of breaking a sentence one word per line. The last column trails unless it `wraps` or is `centered`; a `centered` column's heading and values sit in the middle of it. Records are divided by a 1 px rule, none after the last. The first and last columns stand in from the card's edges by the card's spacing, so the first lines up with the title. Records of several kinds stand in one table under `group` headings: a heading row that spans the columns, in ink, medium text, 36 px high with the same rule under it, one per group in the order the groups first appear, never a second table; a heading is the group's name and carries no figure of its own. A row that opens a record takes `accent` on hover, and any row on focus within and while its menu is open; a row that opens nothing never reacts to hover. A selected row takes `muted`; headers and footers never highlight and carry no fill. On a card narrower than its columns a table of figures keeps every column and scrolls sideways inside its card, as Geist's and shadcn's tables do (owner, 2026-11-08); a document's table, such as a legal page's, takes the `wraps` option on its columns, so their words wrap and the row grows. A bounded page's paging stands in the card's footer strip at its trailing edge, opposite `footer`, which stands at the leading edge: its `status` (\"Page 2 of 7\") before Previous and Next, which are the product's router links (`previousLink`, `nextLink`) when each page is its own address, and buttons otherwise; the one that leads nowhere stays, disabled. A note about the whole table is `footerNote`, in a strip of its own under that one: one muted line, an optional *Learn more* after it at the left and one secondary action at the right; it is the one place a table says a sentence. A column's `footer` is its total: when a shown column has one, a row of totals closes the table under a rule, in ink, medium text, each total under its own column, a figure trailing in tabular digits like the column's values, the first column's footer naming the row, and a column with no total leaving its cell empty. One total with no column of its own is `summary`, under the table at its trailing edge, where it reads as the last column's; a total of another column is that column's `footer` (nadicode decision). Colour is neutral: headings and cells in the body grey, no hue, except a status badge or a tone the cell itself carries. “When the underlying list is empty (filter cleared, never created), render `Empty State` outside the table rather than an empty `<Table.Body>`.” (https://vercel.com/geist/table) “After an async filter change, wrap the region in `aria-live=\"polite\"` so screen readers announce the new state.” (https://vercel.com/geist/empty-state) Ours: empty sits outside the body, in a polite live region that stays in place so a filter that empties the table is announced. Ours: a table that is the page's job under its title takes the page's `notice`, one `NoticeBanner` above its toolbar, 12 px over it, as a collection page places it under the title: a refresh of the rows that failed, with Try again (nadicode decision). Ours: the table draws its own toolbar, a `FilterToolbar`: from `toolbar` for a registry whose search, filters and sort the product keeps (the URL), or else its own local search; the column menu and `toolbarActions` end it. A product never draws a table's toolbar itself. While the page reads the rows, `DataTableSkeleton` stands in the table's place: the same card, a heading row and the given number of rows at the table's heights, the columns after the second leaving it below 640 px, with no words (nadicode decision). “Sortable column headers are buttons. The visible label stays Title Case; the sort-direction arrow is decorative and the button announces the next sort state to assistive tech.” (https://vercel.com/geist/table) Ours: the order has one owner, the app's `sorting`, which the URL holds and a `CollectionSort` above the list sets, so no heading is a button and every page of a paged list follows one order. “Apply `tabular-nums` (or Geist Mono) to numeric columns so digits align across rows for comparison.” (https://vercel.com/geist/table) Ours: a numeric column trails in tabular figures.",
|
|
1411
1411
|
words: '“Column headers (`<Table.Head>`) are Title Case nouns or noun phrases: `Last Used`, `Requests (7d)`, `Created`, `Status`. Never sentences.” (https://vercel.com/geist/table) “Render `—` in cells where a value is unknown or not applicable. Don’t substitute `N/A`, `null`, or an empty string.” (https://vercel.com/geist/table) “Use the canonical short relative-time form in cells (`2m ago`, `5h ago`); switch to `Mar 14, 2026` past 7 days. See `Relative Time Card`.” (https://vercel.com/geist/table) “Pagination labels are `Previous` and `Next`. Page-count copy reads `Page 2 of 7` or `21–40 of 142` with an en-dash inside the range.” (https://vercel.com/geist/table) Ours: headings are sentence case nouns with their unit, "Cost (€)", "Tokens", where Geist writes Title Case. The words of a time and of Previous and Next are the product\'s catalogue, in both languages. The footer is a count or the paging, never a help sentence: guidance a step needs lives in that step. Totals and paging each stand in a footer zone of their own, the paging at the trailing edge; the summary row is a labelled total, and the first cell of a row of totals names what it totals ("All files"). Italian headings run a third longer and never wrap.',
|
|
1412
1412
|
access: 'A native table named by `tableLabel`, which is required; `th scope="col"`; the record\'s name is the row\'s one link. A sorted column\'s heading carries `aria-sort`. `DataTableSkeleton` is busy and its placeholder table is hidden from assistive technology. Ours: a missing value is a hidden "—" with screen-reader text, never blank.',
|
|
1413
1413
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadicodeai/ui",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.268",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#jsx": "./src/jsx/index.ts",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"@headless-tree/react": "1.8.0",
|
|
83
83
|
"@iconify-icons/logos": "^2.0.3",
|
|
84
84
|
"@iconify/react": "^6.0.2",
|
|
85
|
-
"@nadicodeai/design-system": "12.1.
|
|
85
|
+
"@nadicodeai/design-system": "12.1.268",
|
|
86
86
|
"@tanstack/react-table": "^9.3.1",
|
|
87
87
|
"@vgpu/wgsl": "0.6.0",
|
|
88
88
|
"class-variance-authority": "^0.7.1",
|