@nadicodeai/ui 12.1.251 → 12.1.253
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.
|
@@ -29,7 +29,7 @@ export type PageFrameProps = PageFrameTitle & {
|
|
|
29
29
|
* @family Compositions
|
|
30
30
|
* @when Every page of Nadia's window, whose `ProductShell` stands in Hermes's window with `host` while Hermes renders each page in its own page area: Settings, the company's places, an Agent's Edit sections and her landing, Scheduled tasks, a past conversation and New Agent.
|
|
31
31
|
* @instead A product whose `ProductShell` draws the page area itself (its `main`) gives the shell its page composition and never draws this. A page whose composition titles it (the `title` of `CollectionPage` or `OverviewPage`, `ObjectPage`'s `headingProps`) gives the frame a `label` and no `title`, so the page has one h1. A board whose lanes the host draws is `BoardHeader` above them and `BoardEmpty` in their place. A page never draws `PageHeader` or `ReadingColumn` itself, which `nadicodeai/page-composition` refuses.
|
|
32
|
-
* @behaviour The product passes its own `<main />`, as `ProductShell` takes it, and the frame fills it: the page's scroller at the full height of the host's page area, 24 px in from every edge, with the scrollbar's gutter kept on both edges, so the column stands at the same place whether the page scrolls or not. Inside stands one column: `full` (1280 px) for collections, objects, boards and an Agent's Edit sections, `settings` (960 px) for a page of settings, `reading` (768 px) for a conversation or a form a person fills in. Given a `title`, the frame draws the title row at the top of that column, `PageHeader` with the `description` under it and the page's `PageActions` on its row; without one it draws no row and tells the page so (`PageActionsHostProvider`'s `titled`), and the composition that titles the page holds its actions, as `CollectionPage` ends its search row with them. The page keeps its place in the tree whether the frame draws a title or not, so a page that opens one of its records and comes back keeps what the person chose there.
|
|
32
|
+
* @behaviour The product passes its own `<main />`, as `ProductShell` takes it, and the frame fills it: the page's scroller at the full height of the host's page area, 24 px in from every edge, with the scrollbar's gutter kept on both edges, so the column stands at the same place whether the page scrolls or not. Inside stands one column: `full` (1280 px) for collections, objects, boards and an Agent's Edit sections, `settings` (960 px) for a page of settings, `reading` (768 px) for a conversation or a form a person fills in. Given a `title`, the frame draws the title row at the top of that column, `PageHeader` with the `description` under it and the page's `PageActions` on its row; without one it draws no row and tells the page so (`PageActionsHostProvider`'s `titled`), and the composition that titles the page holds its actions, as `CollectionPage` ends its search row with them. The page keeps its place in the tree whether the frame draws a title or not, so a page that opens one of its records and comes back keeps what the person chose there. The page's words can be selected and copied, a path or an error included, though Hermes's window turns selection off for the whole window; its buttons and controls stay unselectable.
|
|
33
33
|
* @words The product's: the title is the page's name as the product's column writes it ("Skills", "Mail"); the description is one sentence saying what the page's concept does; the label names the record the page belongs to ("Sofia") or the page whose composition draws the title ("Scheduled tasks").
|
|
34
34
|
* @access The product's element is the page's `main` landmark, named by `label`, or by the title. The title is the page's h1, and `headingProps` gives it a fuller name where the title alone does not say whose page it is. DOM order is visual order.
|
|
35
35
|
*/
|
|
@@ -11,7 +11,7 @@ import { ReadingColumn } from "./reading-column.js";
|
|
|
11
11
|
* @family Compositions
|
|
12
12
|
* @when Every page of Nadia's window, whose `ProductShell` stands in Hermes's window with `host` while Hermes renders each page in its own page area: Settings, the company's places, an Agent's Edit sections and her landing, Scheduled tasks, a past conversation and New Agent.
|
|
13
13
|
* @instead A product whose `ProductShell` draws the page area itself (its `main`) gives the shell its page composition and never draws this. A page whose composition titles it (the `title` of `CollectionPage` or `OverviewPage`, `ObjectPage`'s `headingProps`) gives the frame a `label` and no `title`, so the page has one h1. A board whose lanes the host draws is `BoardHeader` above them and `BoardEmpty` in their place. A page never draws `PageHeader` or `ReadingColumn` itself, which `nadicodeai/page-composition` refuses.
|
|
14
|
-
* @behaviour The product passes its own `<main />`, as `ProductShell` takes it, and the frame fills it: the page's scroller at the full height of the host's page area, 24 px in from every edge, with the scrollbar's gutter kept on both edges, so the column stands at the same place whether the page scrolls or not. Inside stands one column: `full` (1280 px) for collections, objects, boards and an Agent's Edit sections, `settings` (960 px) for a page of settings, `reading` (768 px) for a conversation or a form a person fills in. Given a `title`, the frame draws the title row at the top of that column, `PageHeader` with the `description` under it and the page's `PageActions` on its row; without one it draws no row and tells the page so (`PageActionsHostProvider`'s `titled`), and the composition that titles the page holds its actions, as `CollectionPage` ends its search row with them. The page keeps its place in the tree whether the frame draws a title or not, so a page that opens one of its records and comes back keeps what the person chose there.
|
|
14
|
+
* @behaviour The product passes its own `<main />`, as `ProductShell` takes it, and the frame fills it: the page's scroller at the full height of the host's page area, 24 px in from every edge, with the scrollbar's gutter kept on both edges, so the column stands at the same place whether the page scrolls or not. Inside stands one column: `full` (1280 px) for collections, objects, boards and an Agent's Edit sections, `settings` (960 px) for a page of settings, `reading` (768 px) for a conversation or a form a person fills in. Given a `title`, the frame draws the title row at the top of that column, `PageHeader` with the `description` under it and the page's `PageActions` on its row; without one it draws no row and tells the page so (`PageActionsHostProvider`'s `titled`), and the composition that titles the page holds its actions, as `CollectionPage` ends its search row with them. The page keeps its place in the tree whether the frame draws a title or not, so a page that opens one of its records and comes back keeps what the person chose there. The page's words can be selected and copied, a path or an error included, though Hermes's window turns selection off for the whole window; its buttons and controls stay unselectable.
|
|
15
15
|
* @words The product's: the title is the page's name as the product's column writes it ("Skills", "Mail"); the description is one sentence saying what the page's concept does; the label names the record the page belongs to ("Sofia") or the page whose composition draws the title ("Scheduled tasks").
|
|
16
16
|
* @access The product's element is the page's `main` landmark, named by `label`, or by the title. The title is the page's h1, and `headingProps` gives it a fuller name where the title alone does not say whose page it is. DOM order is visual order.
|
|
17
17
|
*/
|
|
@@ -21,7 +21,7 @@ export function PageFrame({ main, label, title, description, headingProps, colum
|
|
|
21
21
|
render: main,
|
|
22
22
|
props: {
|
|
23
23
|
"aria-label": label ?? title,
|
|
24
|
-
className: "h-full min-h-0 overflow-y-auto p-nadicode-lg [scrollbar-gutter:stable_both-edges]",
|
|
24
|
+
className: "h-full min-h-0 overflow-y-auto p-nadicode-lg select-text [scrollbar-gutter:stable_both-edges]",
|
|
25
25
|
children: (_jsx(PageActionsHostProvider, { titled: Boolean(title), children: _jsxs(ReadingColumn, { width: column, children: [title ? (_jsx(PageHeader, { description: description, headingProps: headingProps, title: title })) : null, children] }) })),
|
|
26
26
|
},
|
|
27
27
|
state: { slot: "page-frame" },
|
|
@@ -157,7 +157,7 @@ type SettingsFieldProps = SettingsFieldBase & ({
|
|
|
157
157
|
* @instead A field of a drawer's or a dialog's form is a Field from the form's own owner; a read-only fact is a SettingsFactsSection; several switches and selects in one card are SettingsRows.
|
|
158
158
|
* @behaviour "Helper text is sentence case, one sentence with a trailing period, on a sibling element wired through `aria-describedby`." (https://vercel.com/geist/input) Ours: label required, no help line: the card's description helps, and the (i) `info` is for a part of a value that needs a sentence. The control is 20rem wide under its label (`controlWidth`: `full` for a textarea, `natural` for a segmented control). `control="choice"` puts a checkbox or radio before its sentence; `control="switch"` puts the word for the switch's state after it and requires `stateLabel`. "Validate on blur, not on every keystroke; surface the message by passing a string to `error`." (https://vercel.com/geist/input) Ours: a validation `error` updates as the value is corrected, and it or a failed save about this field shows under the control and marks it invalid; colour sits on the control's edge and the message, never the label.
|
|
159
159
|
* @words "Labels are short Title Case nouns: `Project Name`, `Domain`, `Environment Variable Name`." (https://vercel.com/geist/input) Ours: sentence case, a noun for the value ("Display name"). "Validation names the field and the constraint, ends in a period, and skips `please` (`Project name is required.`, `Code must be 6 digits.`)." (https://vercel.com/geist/input) Ours: an error says what to do next; `info.text` is one sentence and `info.label` names its button ("About display name"); a switch shows its state word ("Enabled", "Disabled") beside it.
|
|
160
|
-
* @access "Don’t wrap a labelled `<Input>` in a `Tooltip`; put the explainer on a sibling icon button so the label stays announced." (https://vercel.com/geist/input) Ours: that sibling button is the (i) `info
|
|
160
|
+
* @access "Don’t wrap a labelled `<Input>` in a `Tooltip`; put the explainer on a sibling icon button so the label stays announced." (https://vercel.com/geist/input) Ours: that sibling button is the (i) `info`, whose sentence opens under it, so it covers neither the label nor the card's description above. The control receives its id, `aria-invalid` and `aria-describedby` through `controlProps`, so the label, the info and the error are read with it. The info button has its own name and opens on focus.
|
|
161
161
|
*/
|
|
162
162
|
declare function SettingsField({ id, label, info, error, invalid, disabled, required, control, controlWidth, stateLabel, children, className, ...props }: SettingsFieldProps): React.JSX.Element;
|
|
163
163
|
type SettingsRowBase = {
|
|
@@ -61,7 +61,7 @@ function SettingsFieldLabel({ id, label, info, beside = false, }) {
|
|
|
61
61
|
const fieldLabel = (_jsx(FieldLabel, { htmlFor: id, id: `${id}-label`, className: beside ? "text-xs font-medium text-foreground" : undefined, children: label }));
|
|
62
62
|
if (!info)
|
|
63
63
|
return fieldLabel;
|
|
64
|
-
return (_jsxs("div", { className: "flex items-center gap-1", children: [fieldLabel, _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { render: _jsx(Button, { "aria-label": info.label, size: "icon-xs", variant: "ghost" }), children: _jsx(Info, { "aria-hidden": "true" }) }), _jsx(TooltipContent, { children: info.text })] }), _jsx("span", { hidden: true, id: `${id}-info`, children: info.text })] }));
|
|
64
|
+
return (_jsxs("div", { className: "flex items-center gap-1", children: [fieldLabel, _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { render: _jsx(Button, { "aria-label": info.label, size: "icon-xs", variant: "ghost" }), children: _jsx(Info, { "aria-hidden": "true" }) }), _jsx(TooltipContent, { side: "bottom", children: info.text })] }), _jsx("span", { hidden: true, id: `${id}-info`, children: info.text })] }));
|
|
65
65
|
}
|
|
66
66
|
function SettingsFieldErrors({ id, error }) {
|
|
67
67
|
return (_jsxs(_Fragment, { children: [error ? _jsx(FieldError, { id: `${id}-error`, children: error }) : null, _jsx(SettingsFieldFailure, { id: id })] }));
|
|
@@ -86,7 +86,7 @@ function controlCellClassName(control, controlWidth) {
|
|
|
86
86
|
* @instead A field of a drawer's or a dialog's form is a Field from the form's own owner; a read-only fact is a SettingsFactsSection; several switches and selects in one card are SettingsRows.
|
|
87
87
|
* @behaviour "Helper text is sentence case, one sentence with a trailing period, on a sibling element wired through `aria-describedby`." (https://vercel.com/geist/input) Ours: label required, no help line: the card's description helps, and the (i) `info` is for a part of a value that needs a sentence. The control is 20rem wide under its label (`controlWidth`: `full` for a textarea, `natural` for a segmented control). `control="choice"` puts a checkbox or radio before its sentence; `control="switch"` puts the word for the switch's state after it and requires `stateLabel`. "Validate on blur, not on every keystroke; surface the message by passing a string to `error`." (https://vercel.com/geist/input) Ours: a validation `error` updates as the value is corrected, and it or a failed save about this field shows under the control and marks it invalid; colour sits on the control's edge and the message, never the label.
|
|
88
88
|
* @words "Labels are short Title Case nouns: `Project Name`, `Domain`, `Environment Variable Name`." (https://vercel.com/geist/input) Ours: sentence case, a noun for the value ("Display name"). "Validation names the field and the constraint, ends in a period, and skips `please` (`Project name is required.`, `Code must be 6 digits.`)." (https://vercel.com/geist/input) Ours: an error says what to do next; `info.text` is one sentence and `info.label` names its button ("About display name"); a switch shows its state word ("Enabled", "Disabled") beside it.
|
|
89
|
-
* @access "Don’t wrap a labelled `<Input>` in a `Tooltip`; put the explainer on a sibling icon button so the label stays announced." (https://vercel.com/geist/input) Ours: that sibling button is the (i) `info
|
|
89
|
+
* @access "Don’t wrap a labelled `<Input>` in a `Tooltip`; put the explainer on a sibling icon button so the label stays announced." (https://vercel.com/geist/input) Ours: that sibling button is the (i) `info`, whose sentence opens under it, so it covers neither the label nor the card's description above. The control receives its id, `aria-invalid` and `aria-describedby` through `controlProps`, so the label, the info and the error are read with it. The info button has its own name and opens on focus.
|
|
90
90
|
*/
|
|
91
91
|
function SettingsField({ id, label, info, error, invalid = Boolean(error), disabled, required, control = "box", controlWidth = "standard", stateLabel, children, className, ...props }) {
|
|
92
92
|
const controlProps = controlPropsOf({ id, info, error, invalid, disabled, required });
|
|
@@ -274,7 +274,7 @@ export const USAGE = [
|
|
|
274
274
|
summary: "The page area of a product whose host app draws the window around its pages: the page's `main` landmark, its scrolling and gutter, its column, and its title row when its composition draws none.",
|
|
275
275
|
when: "Every page of Nadia's window, whose `ProductShell` stands in Hermes's window with `host` while Hermes renders each page in its own page area: Settings, the company's places, an Agent's Edit sections and her landing, Scheduled tasks, a past conversation and New Agent.",
|
|
276
276
|
instead: "A product whose `ProductShell` draws the page area itself (its `main`) gives the shell its page composition and never draws this. A page whose composition titles it (the `title` of `CollectionPage` or `OverviewPage`, `ObjectPage`'s `headingProps`) gives the frame a `label` and no `title`, so the page has one h1. A board whose lanes the host draws is `BoardHeader` above them and `BoardEmpty` in their place. A page never draws `PageHeader` or `ReadingColumn` itself, which `nadicodeai/page-composition` refuses.",
|
|
277
|
-
behaviour: "The product passes its own `<main />`, as `ProductShell` takes it, and the frame fills it: the page's scroller at the full height of the host's page area, 24 px in from every edge, with the scrollbar's gutter kept on both edges, so the column stands at the same place whether the page scrolls or not. Inside stands one column: `full` (1280 px) for collections, objects, boards and an Agent's Edit sections, `settings` (960 px) for a page of settings, `reading` (768 px) for a conversation or a form a person fills in. Given a `title`, the frame draws the title row at the top of that column, `PageHeader` with the `description` under it and the page's `PageActions` on its row; without one it draws no row and tells the page so (`PageActionsHostProvider`'s `titled`), and the composition that titles the page holds its actions, as `CollectionPage` ends its search row with them. The page keeps its place in the tree whether the frame draws a title or not, so a page that opens one of its records and comes back keeps what the person chose there.",
|
|
277
|
+
behaviour: "The product passes its own `<main />`, as `ProductShell` takes it, and the frame fills it: the page's scroller at the full height of the host's page area, 24 px in from every edge, with the scrollbar's gutter kept on both edges, so the column stands at the same place whether the page scrolls or not. Inside stands one column: `full` (1280 px) for collections, objects, boards and an Agent's Edit sections, `settings` (960 px) for a page of settings, `reading` (768 px) for a conversation or a form a person fills in. Given a `title`, the frame draws the title row at the top of that column, `PageHeader` with the `description` under it and the page's `PageActions` on its row; without one it draws no row and tells the page so (`PageActionsHostProvider`'s `titled`), and the composition that titles the page holds its actions, as `CollectionPage` ends its search row with them. The page keeps its place in the tree whether the frame draws a title or not, so a page that opens one of its records and comes back keeps what the person chose there. The page's words can be selected and copied, a path or an error included, though Hermes's window turns selection off for the whole window; its buttons and controls stay unselectable.",
|
|
278
278
|
words: 'The product\'s: the title is the page\'s name as the product\'s column writes it ("Skills", "Mail"); the description is one sentence saying what the page\'s concept does; the label names the record the page belongs to ("Sofia") or the page whose composition draws the title ("Scheduled tasks").',
|
|
279
279
|
access: "The product's element is the page's `main` landmark, named by `label`, or by the title. The title is the page's h1, and `headingProps` gives it a fuller name where the title alone does not say whose page it is. DOM order is visual order.",
|
|
280
280
|
},
|
|
@@ -628,7 +628,7 @@ export const USAGE = [
|
|
|
628
628
|
instead: "A field of a drawer's or a dialog's form is a Field from the form's own owner; a read-only fact is a SettingsFactsSection; several switches and selects in one card are SettingsRows.",
|
|
629
629
|
behaviour: '"Helper text is sentence case, one sentence with a trailing period, on a sibling element wired through `aria-describedby`." (https://vercel.com/geist/input) Ours: label required, no help line: the card\'s description helps, and the (i) `info` is for a part of a value that needs a sentence. The control is 20rem wide under its label (`controlWidth`: `full` for a textarea, `natural` for a segmented control). `control="choice"` puts a checkbox or radio before its sentence; `control="switch"` puts the word for the switch\'s state after it and requires `stateLabel`. "Validate on blur, not on every keystroke; surface the message by passing a string to `error`." (https://vercel.com/geist/input) Ours: a validation `error` updates as the value is corrected, and it or a failed save about this field shows under the control and marks it invalid; colour sits on the control\'s edge and the message, never the label.',
|
|
630
630
|
words: '"Labels are short Title Case nouns: `Project Name`, `Domain`, `Environment Variable Name`." (https://vercel.com/geist/input) Ours: sentence case, a noun for the value ("Display name"). "Validation names the field and the constraint, ends in a period, and skips `please` (`Project name is required.`, `Code must be 6 digits.`)." (https://vercel.com/geist/input) Ours: an error says what to do next; `info.text` is one sentence and `info.label` names its button ("About display name"); a switch shows its state word ("Enabled", "Disabled") beside it.',
|
|
631
|
-
access: '"Don’t wrap a labelled `<Input>` in a `Tooltip`; put the explainer on a sibling icon button so the label stays announced." (https://vercel.com/geist/input) Ours: that sibling button is the (i) `info
|
|
631
|
+
access: '"Don’t wrap a labelled `<Input>` in a `Tooltip`; put the explainer on a sibling icon button so the label stays announced." (https://vercel.com/geist/input) Ours: that sibling button is the (i) `info`, whose sentence opens under it, so it covers neither the label nor the card\'s description above. The control receives its id, `aria-invalid` and `aria-describedby` through `controlProps`, so the label, the info and the error are read with it. The info button has its own name and opens on focus.',
|
|
632
632
|
},
|
|
633
633
|
{
|
|
634
634
|
name: "SettingsRows",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadicodeai/ui",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.253",
|
|
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.253",
|
|
86
86
|
"@tanstack/react-table": "^9.3.1",
|
|
87
87
|
"@vgpu/wgsl": "0.6.0",
|
|
88
88
|
"class-variance-authority": "^0.7.1",
|