@nadicodeai/ui 12.1.239 → 12.1.241
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/action-menu.d.ts +5 -1
- package/dist/components/action-menu.d.ts.map +1 -1
- package/dist/components/assistant-panel-header.d.ts +25 -0
- package/dist/components/assistant-panel-header.d.ts.map +1 -0
- package/dist/components/assistant-panel-header.js +18 -0
- package/dist/components/assistant-welcome.d.ts +26 -0
- package/dist/components/assistant-welcome.d.ts.map +1 -0
- package/dist/components/assistant-welcome.js +16 -0
- package/dist/components/button.d.ts +6 -1
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +6 -1
- package/dist/components/collection-filters.d.ts +6 -3
- package/dist/components/collection-filters.d.ts.map +1 -1
- package/dist/components/collection-filters.js +5 -4
- package/dist/components/column-foot.d.ts +3 -2
- package/dist/components/column-foot.d.ts.map +1 -1
- package/dist/components/column-foot.js +2 -1
- package/dist/components/company-card-actions.d.ts +19 -0
- package/dist/components/company-card-actions.d.ts.map +1 -0
- package/dist/components/company-card-actions.js +16 -0
- package/dist/components/confirm-dialog.d.ts +6 -1
- package/dist/components/confirm-dialog.d.ts.map +1 -1
- package/dist/components/confirm-dialog.js +17 -3
- package/dist/components/drawer-steps.d.ts +8 -7
- package/dist/components/drawer-steps.d.ts.map +1 -1
- package/dist/components/drawer-steps.js +7 -6
- package/dist/components/figure-row.d.ts +2 -4
- package/dist/components/figure-row.d.ts.map +1 -1
- package/dist/components/figure-row.js +3 -3
- package/dist/components/filter-toolbar.d.ts +2 -4
- package/dist/components/filter-toolbar.d.ts.map +1 -1
- package/dist/components/filter-toolbar.js +2 -2
- package/dist/components/form-dialog.d.ts +11 -2
- package/dist/components/form-dialog.d.ts.map +1 -1
- package/dist/components/form-dialog.js +18 -3
- package/dist/components/item.d.ts +5 -9
- package/dist/components/item.d.ts.map +1 -1
- package/dist/components/item.js +5 -9
- package/dist/components/numbered-steps.d.ts +8 -5
- package/dist/components/numbered-steps.d.ts.map +1 -1
- package/dist/components/numbered-steps.js +5 -4
- package/dist/components/object-workspace.d.ts +2 -2
- package/dist/components/object-workspace.d.ts.map +1 -1
- package/dist/components/object-workspace.js +2 -2
- package/dist/components/page-actions.d.ts +5 -5
- package/dist/components/page-actions.d.ts.map +1 -1
- package/dist/components/page-actions.js +9 -4
- package/dist/components/plan-card.d.ts +14 -2
- package/dist/components/plan-card.d.ts.map +1 -1
- package/dist/components/plan-card.js +3 -2
- package/dist/components/product-band.d.ts +19 -7
- package/dist/components/product-band.d.ts.map +1 -1
- package/dist/components/product-band.js +12 -6
- package/dist/components/product-shell-bell.d.ts +71 -0
- package/dist/components/product-shell-bell.d.ts.map +1 -0
- package/dist/components/product-shell-bell.js +36 -0
- package/dist/components/product-shell.d.ts +21 -4
- package/dist/components/product-shell.d.ts.map +1 -1
- package/dist/components/product-shell.js +23 -2
- package/dist/components/record-list.d.ts +4 -2
- package/dist/components/record-list.d.ts.map +1 -1
- package/dist/components/record-list.js +10 -7
- package/dist/components/settings-facts.d.ts +5 -4
- package/dist/components/settings-facts.d.ts.map +1 -1
- package/dist/components/settings-facts.js +4 -3
- package/dist/components/settings-section.d.ts +11 -9
- package/dist/components/settings-section.d.ts.map +1 -1
- package/dist/components/settings-section.js +8 -7
- package/dist/internal/clear-filters.d.ts +7 -0
- package/dist/internal/clear-filters.d.ts.map +1 -0
- package/dist/internal/clear-filters.js +6 -0
- package/dist/internal/command-runner.d.ts +30 -5
- package/dist/internal/command-runner.d.ts.map +1 -1
- package/dist/internal/command-runner.js +61 -14
- package/dist/internal/footer-commands.d.ts +33 -0
- package/dist/internal/footer-commands.d.ts.map +1 -0
- package/dist/internal/footer-commands.js +27 -0
- package/dist/internal/footer-strip.d.ts.map +1 -1
- package/dist/internal/footer-strip.js +2 -4
- package/dist/internal/form-submit.d.ts +3 -2
- package/dist/internal/form-submit.d.ts.map +1 -1
- package/dist/internal/form-submit.js +2 -2
- package/dist/internal/page-command-button.d.ts +11 -1
- package/dist/internal/page-command-button.d.ts.map +1 -1
- package/dist/internal/page-command-button.js +3 -0
- package/dist/showcase/specimens/actions.d.ts +1 -0
- package/dist/showcase/specimens/actions.d.ts.map +1 -1
- package/dist/showcase/specimens/actions.js +12 -1
- package/dist/showcase/specimens/compositions.d.ts +2 -0
- package/dist/showcase/specimens/compositions.d.ts.map +1 -1
- package/dist/showcase/specimens/compositions.js +16 -7
- package/dist/showcase/specimens/data.d.ts.map +1 -1
- package/dist/showcase/specimens/data.js +1 -1
- package/dist/showcase/specimens/index.d.ts +4 -0
- package/dist/showcase/specimens/index.d.ts.map +1 -1
- package/dist/showcase/specimens/navigation.d.ts +2 -0
- package/dist/showcase/specimens/navigation.d.ts.map +1 -1
- package/dist/showcase/specimens/navigation.js +28 -0
- package/dist/showcase/usage.generated.d.ts +1 -1
- package/dist/showcase/usage.generated.d.ts.map +1 -1
- package/dist/showcase/usage.generated.js +74 -30
- package/package.json +2 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ComponentProps, type ReactElement, type ReactNode } from "react";
|
|
2
|
+
import { type PageCommand } from "../internal/page-command-button.js";
|
|
2
3
|
export type PlanCardAllowance = {
|
|
3
4
|
/** The use the plan includes against the smallest one, as a figure: "3×". Left out when the plan includes none. */
|
|
4
5
|
figure?: string | undefined;
|
|
@@ -10,6 +11,17 @@ export type PlanCardInclusions = {
|
|
|
10
11
|
label: string;
|
|
11
12
|
items: readonly string[];
|
|
12
13
|
};
|
|
14
|
+
/** What stands at the card's foot: the command that chooses the plan, or the line that says why none does. */
|
|
15
|
+
export type PlanCardAction = {
|
|
16
|
+
command: PageCommand;
|
|
17
|
+
/** The plan the catalogue recommends to a person choosing their first: its command is the row's one filled button. */
|
|
18
|
+
recommended?: boolean | undefined;
|
|
19
|
+
note?: never;
|
|
20
|
+
} | {
|
|
21
|
+
note: string;
|
|
22
|
+
command?: never;
|
|
23
|
+
recommended?: never;
|
|
24
|
+
};
|
|
13
25
|
export type PlanCardProps = Omit<ComponentProps<"section">, "title" | "children"> & {
|
|
14
26
|
/** The plan's name: "Business". */
|
|
15
27
|
name: string;
|
|
@@ -32,7 +44,7 @@ export type PlanCardProps = Omit<ComponentProps<"section">, "title" | "children"
|
|
|
32
44
|
note?: string | undefined;
|
|
33
45
|
};
|
|
34
46
|
/** At the card's foot under a divider: the command that chooses the plan, or the line that says why it cannot be chosen. */
|
|
35
|
-
action:
|
|
47
|
+
action: PlanCardAction;
|
|
36
48
|
};
|
|
37
49
|
/**
|
|
38
50
|
* One plan a person can choose, in a row of plans: its emblem, name, use, what comes with it, its
|
|
@@ -41,7 +53,7 @@ export type PlanCardProps = Omit<ComponentProps<"section">, "title" | "children"
|
|
|
41
53
|
* @family Compositions
|
|
42
54
|
* @when The plans a person compares and chooses from: the Portal's plan catalogue in Billing, a Partner's plans above its Customers' (nadicode decision).
|
|
43
55
|
* @instead The plan an account holds now is a fact of its billing, in an `ObjectSection` or a `SettingsFactsSection`. A thing added from a catalogue with no price is a `CatalogCard` or a `CatalogEntry`. A row of these cards is a `CardRow`.
|
|
44
|
-
* @behaviour A resting card. The `picture` fills its width at the top, square, the card's corner clipping it; then the name, with the `status` badges at its trailing edge; then the `description`, the allowance's `figure` large over its `label`, the `inclusions` as a list under their label, each item after a muted check mark, and the price with its period beside it and its `note` under it. The `action` stands at the card's foot under a divider, so the actions of a row of cards line up whatever each plan holds. Neutral throughout: a plan is told apart by its emblem and its badges, never a coloured card (nadicode decision).
|
|
56
|
+
* @behaviour A resting card. The `picture` fills its width at the top, square, the card's corner clipping it; then the name, with the `status` badges at its trailing edge; then the `description`, the allowance's `figure` large over its `label`, the `inclusions` as a list under their label, each item after a muted check mark, and the price with its period beside it and its `note` under it. The `action` stands at the card's foot under a divider, so the actions of a row of cards line up whatever each plan holds: its `command` as an outline button, filled when `recommended`, for the plan the catalogue recommends to a person choosing their first, or its `note` as one muted line. The card draws the command itself, a link staying a link and a submit of the product's form staying its submit; one that cannot run now stays, disabled (nadicode decision). Neutral throughout: a plan is told apart by its emblem and its badges, never a coloured card (nadicode decision).
|
|
45
57
|
* @words The name as the plan is called everywhere. A badge is one word: "Current", "Next", "Recommended". The allowance's label says the use in words ("Three times the usage of Pro", "Usage included"); the price is the amount, the period "/month", the note what the price leaves out ("VAT excluded"). The action is a verb on the plan ("Subscribe", "Change plan"), or the line that says why there is none ("Your current plan").
|
|
46
58
|
* @access A `section` labelled by the plan's name, a heading at `headingLevel`. The picture and the allowance's figure are hidden from assistive technology, which reads the name and the label instead. The inclusions are a list.
|
|
47
59
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-card.d.ts","sourceRoot":"","sources":["../../src/components/plan-card.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"plan-card.d.ts","sourceRoot":"","sources":["../../src/components/plan-card.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAGtF,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,gCAAgC,CAAC;AAGrF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,mHAAmH;IACnH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,sFAAsF;IACtF,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1B,CAAC;AAEF,8GAA8G;AAC9G,MAAM,MAAM,cAAc,GACtB;IACE,OAAO,EAAE,WAAW,CAAC;IACrB,sHAAsH;IACtH,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAClC,IAAI,CAAC,EAAE,KAAK,CAAC;CACd,GACD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,KAAK,CAAC;IAAC,WAAW,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAE3D,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,GAAG;IAClF,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,uGAAuG;IACvG,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACrB,6HAA6H;IAC7H,OAAO,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IACnC,mHAAmH;IACnH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,2GAA2G;IAC3G,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,sCAAsC;IACtC,SAAS,EAAE,iBAAiB,CAAC;IAC7B,6EAA6E;IAC7E,UAAU,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAC5C,2GAA2G;IAC3G,KAAK,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IACrE,4HAA4H;IAC5H,MAAM,EAAE,cAAc,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,YAAgB,EAChB,OAAO,EACP,MAAM,EACN,WAAW,EACX,SAAS,EACT,UAAU,EACV,KAAK,EACL,MAAM,EACN,SAAS,EACT,GAAG,KAAK,EACT,EAAE,aAAa,+BA0Ef"}
|
|
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Check } from "lucide-react";
|
|
3
3
|
import { useId } from "react";
|
|
4
4
|
import { cn } from "../lib/utils.js";
|
|
5
|
+
import { PageCommandButton } from "../internal/page-command-button.js";
|
|
5
6
|
import { Card, CardContent, CardHeader, CardTitle } from "./card.js";
|
|
6
7
|
/**
|
|
7
8
|
* One plan a person can choose, in a row of plans: its emblem, name, use, what comes with it, its
|
|
@@ -10,7 +11,7 @@ import { Card, CardContent, CardHeader, CardTitle } from "./card.js";
|
|
|
10
11
|
* @family Compositions
|
|
11
12
|
* @when The plans a person compares and chooses from: the Portal's plan catalogue in Billing, a Partner's plans above its Customers' (nadicode decision).
|
|
12
13
|
* @instead The plan an account holds now is a fact of its billing, in an `ObjectSection` or a `SettingsFactsSection`. A thing added from a catalogue with no price is a `CatalogCard` or a `CatalogEntry`. A row of these cards is a `CardRow`.
|
|
13
|
-
* @behaviour A resting card. The `picture` fills its width at the top, square, the card's corner clipping it; then the name, with the `status` badges at its trailing edge; then the `description`, the allowance's `figure` large over its `label`, the `inclusions` as a list under their label, each item after a muted check mark, and the price with its period beside it and its `note` under it. The `action` stands at the card's foot under a divider, so the actions of a row of cards line up whatever each plan holds. Neutral throughout: a plan is told apart by its emblem and its badges, never a coloured card (nadicode decision).
|
|
14
|
+
* @behaviour A resting card. The `picture` fills its width at the top, square, the card's corner clipping it; then the name, with the `status` badges at its trailing edge; then the `description`, the allowance's `figure` large over its `label`, the `inclusions` as a list under their label, each item after a muted check mark, and the price with its period beside it and its `note` under it. The `action` stands at the card's foot under a divider, so the actions of a row of cards line up whatever each plan holds: its `command` as an outline button, filled when `recommended`, for the plan the catalogue recommends to a person choosing their first, or its `note` as one muted line. The card draws the command itself, a link staying a link and a submit of the product's form staying its submit; one that cannot run now stays, disabled (nadicode decision). Neutral throughout: a plan is told apart by its emblem and its badges, never a coloured card (nadicode decision).
|
|
14
15
|
* @words The name as the plan is called everywhere. A badge is one word: "Current", "Next", "Recommended". The allowance's label says the use in words ("Three times the usage of Pro", "Usage included"); the price is the amount, the period "/month", the note what the price leaves out ("VAT excluded"). The action is a verb on the plan ("Subscribe", "Change plan"), or the line that says why there is none ("Your current plan").
|
|
15
16
|
* @access A `section` labelled by the plan's name, a heading at `headingLevel`. The picture and the allowance's figure are hidden from assistive technology, which reads the name and the label instead. The inclusions are a list.
|
|
16
17
|
*/
|
|
@@ -18,5 +19,5 @@ export function PlanCard({ name, headingLevel = 3, picture, status, description,
|
|
|
18
19
|
const headingId = useId();
|
|
19
20
|
const inclusionsId = useId();
|
|
20
21
|
const Heading = headingLevel === 2 ? "h2" : "h3";
|
|
21
|
-
return (_jsxs(Card, { className: cn("h-full", picture && "pt-0", className), render: _jsx("section", { ...props, "aria-labelledby": headingId, "data-slot": "plan-card" }), children: [picture ? (_jsx("div", { "aria-hidden": "true", className: "*:aspect-square *:h-auto *:w-full *:object-contain", "data-slot": "plan-card-picture", children: picture })) : null, _jsxs(CardHeader, { className: "flex flex-row items-start justify-between gap-3", children: [_jsx(CardTitle, { children: _jsx(Heading, { id: headingId, children: name }) }), status ? _jsx("div", { className: "flex flex-wrap justify-end gap-2", children: status }) : null] }), _jsxs(CardContent, { className: "flex flex-1 flex-col gap-4", children: [description ? _jsx("p", { className: "text-body-sm", children: description }) : null, _jsxs("div", { className: "flex flex-col gap-2", "data-slot": "plan-card-allowance", children: [allowance.figure ? (_jsx("p", { "aria-hidden": "true", className: "text-display-lg tabular-nums", children: allowance.figure })) : null, _jsx("p", { className: "text-body-sm text-muted-foreground", children: allowance.label })] }), inclusions && inclusions.items.length > 0 ? (_jsxs("div", { className: "flex flex-col gap-2", "data-slot": "plan-card-inclusions", children: [_jsx("p", { className: "text-caption text-muted-foreground", id: inclusionsId, children: inclusions.label }), _jsx("ul", { "aria-labelledby": inclusionsId, className: "flex flex-col gap-1.5 text-body-sm", children: inclusions.items.map((item) => (_jsxs("li", { className: "flex items-start gap-2", children: [_jsx(Check, { "aria-hidden": "true", className: "mt-0.5 size-4 shrink-0 text-muted-foreground" }), item] }, item))) })] })) : null, _jsxs("div", { className: "flex flex-col gap-1", "data-slot": "plan-card-price", children: [_jsxs("p", { className: "text-body-lg font-medium tabular-nums", children: [price.amount, _jsx("span", { className: "text-body-sm text-muted-foreground", children: price.period })] }), price.note ? _jsx("p", { className: "text-caption text-muted-foreground", children: price.note }) : null] }), _jsx("div", { className: "mt-auto border-t pt-4", "data-slot": "plan-card-action", children: _jsx("div", { className: "flex min-h-control-height items-center", children: action }) })] })] }));
|
|
22
|
+
return (_jsxs(Card, { className: cn("h-full", picture && "pt-0", className), render: _jsx("section", { ...props, "aria-labelledby": headingId, "data-slot": "plan-card" }), children: [picture ? (_jsx("div", { "aria-hidden": "true", className: "*:aspect-square *:h-auto *:w-full *:object-contain", "data-slot": "plan-card-picture", children: picture })) : null, _jsxs(CardHeader, { className: "flex flex-row items-start justify-between gap-3", children: [_jsx(CardTitle, { children: _jsx(Heading, { id: headingId, children: name }) }), status ? _jsx("div", { className: "flex flex-wrap justify-end gap-2", children: status }) : null] }), _jsxs(CardContent, { className: "flex flex-1 flex-col gap-4", children: [description ? _jsx("p", { className: "text-body-sm", children: description }) : null, _jsxs("div", { className: "flex flex-col gap-2", "data-slot": "plan-card-allowance", children: [allowance.figure ? (_jsx("p", { "aria-hidden": "true", className: "text-display-lg tabular-nums", children: allowance.figure })) : null, _jsx("p", { className: "text-body-sm text-muted-foreground", children: allowance.label })] }), inclusions && inclusions.items.length > 0 ? (_jsxs("div", { className: "flex flex-col gap-2", "data-slot": "plan-card-inclusions", children: [_jsx("p", { className: "text-caption text-muted-foreground", id: inclusionsId, children: inclusions.label }), _jsx("ul", { "aria-labelledby": inclusionsId, className: "flex flex-col gap-1.5 text-body-sm", children: inclusions.items.map((item) => (_jsxs("li", { className: "flex items-start gap-2", children: [_jsx(Check, { "aria-hidden": "true", className: "mt-0.5 size-4 shrink-0 text-muted-foreground" }), item] }, item))) })] })) : null, _jsxs("div", { className: "flex flex-col gap-1", "data-slot": "plan-card-price", children: [_jsxs("p", { className: "text-body-lg font-medium tabular-nums", children: [price.amount, _jsx("span", { className: "text-body-sm text-muted-foreground", children: price.period })] }), price.note ? _jsx("p", { className: "text-caption text-muted-foreground", children: price.note }) : null] }), _jsx("div", { className: "mt-auto border-t pt-4", "data-slot": "plan-card-action", children: _jsx("div", { className: "flex min-h-control-height items-center", children: action.command ? (_jsx(PageCommandButton, { command: action.command, variant: action.recommended ? "default" : "outline" })) : (_jsx("p", { className: "text-caption text-muted-foreground", children: action.note })) }) })] })] }));
|
|
22
23
|
}
|
|
@@ -1,19 +1,31 @@
|
|
|
1
|
-
import type { ReactElement, ReactNode } from "react";
|
|
1
|
+
import type { ComponentProps, ReactElement, ReactNode } from "react";
|
|
2
|
+
import { type PageCommand } from "../internal/page-command-button.js";
|
|
3
|
+
/** A product's downloads, as data: the band draws each one. */
|
|
4
|
+
export type ProductDownloads = {
|
|
5
|
+
/** The file for the reader's computer, the band's one filled button: "Download for macOS". */
|
|
6
|
+
main?: PageCommand | undefined;
|
|
7
|
+
/** The product's other systems, each a way to its file: "Windows", "Linux". */
|
|
8
|
+
others?: readonly PageCommand[] | undefined;
|
|
9
|
+
/** One muted line under them: the main file's chip, size and needs, and the version. */
|
|
10
|
+
note?: string | undefined;
|
|
11
|
+
};
|
|
2
12
|
/**
|
|
3
13
|
* One product a person downloads, as a band: its name, its line and its downloads, beside its picture.
|
|
4
14
|
*
|
|
5
15
|
* @family Compositions
|
|
6
16
|
* @when The Downloads page, one band per product: Nadia, Alveare, Alveare Server, NadiaOS.
|
|
7
|
-
* @instead
|
|
8
|
-
* @behaviour One resting card. The content stands centred in its height, 24 px in from the card's edges and 24 px between its parts. From a card 57 rem wide the picture stands at the right, a quarter of the card and at most 288 px, its foot on the card's bottom edge; on a narrower card it stands centred under the content, 224 px square. The product's picture fills its square, so the band never jumps when it loads. While the page reads the releases, `ProductBandSkeleton` stands in its place: the same band, the mark's square and the name's and line's bars, the download button's bar, and the picture's square, with no words (nadicode decision).
|
|
9
|
-
* @words None of its own: the product's name, its line and its download labels are the product's, from its catalogue.
|
|
10
|
-
* @access The picture is decorative: hidden from assistive technology and never a target.
|
|
17
|
+
* @instead A product whose files are each chosen by what they need, such as NadiaOS's images for each hypervisor, lists them as a `RecordList` in the band's `children`, each file's Download its row's `main` command; an entry a person adds from a catalogue is a `CatalogCard`; the steps after a download are `NumberedSteps`.
|
|
18
|
+
* @behaviour One resting card. The product gives its `downloads` as data and the band draws them under its `children`, never a button of the product's own: the file for the reader's computer (`main`) filled at the large size, full width on a phone; the product's other systems (`others`) after it, quiet (ghost) beside a `main` and outline when the reader's computer has no file of its own, so every system stays offered; and the `note`, one muted line, under them (nadicode decision). The content stands centred in its height, 24 px in from the card's edges and 24 px between its parts. From a card 57 rem wide the picture stands at the right, a quarter of the card and at most 288 px, its foot on the card's bottom edge; on a narrower card it stands centred under the content, 224 px square. The product's picture fills its square, so the band never jumps when it loads. While the page reads the releases, `ProductBandSkeleton` stands in its place: the same band, the mark's square and the name's and line's bars, the download button's bar, and the picture's square, with no words (nadicode decision).
|
|
19
|
+
* @words None of its own: the product's name, its line and its download labels are the product's, from its catalogue: the main one "Download for {system}", another system its name alone ("Windows").
|
|
20
|
+
* @access The band is a `section`, which the product names with its heading through `aria-labelledby`. The picture is decorative: hidden from assistive technology and never a target. Each download is a link named by its label, or by its `accessibleName` where several bands on a page carry the same label ("Windows · Nadia"); its icon is hidden. `ProductBandSkeleton` is busy and its bars are hidden from assistive technology.
|
|
11
21
|
*/
|
|
12
|
-
export declare function ProductBand({ picture, children, }: {
|
|
22
|
+
export declare function ProductBand({ picture, children, downloads, className, ...section }: Omit<ComponentProps<"section">, "children"> & {
|
|
13
23
|
/** The product's picture, an image that fills the square it is given: the product's router image with `fill`. */
|
|
14
24
|
picture: ReactElement;
|
|
15
|
-
/** The product's mark, heading
|
|
25
|
+
/** The product's mark, heading and line, and a list of its files when each is chosen by what it needs. */
|
|
16
26
|
children: ReactNode;
|
|
27
|
+
/** The downloads the band draws under `children`. */
|
|
28
|
+
downloads?: ProductDownloads | undefined;
|
|
17
29
|
}): import("react").JSX.Element;
|
|
18
30
|
/** What stands in a ProductBand's place while its page reads the releases, with no words. */
|
|
19
31
|
export declare function ProductBandSkeleton(): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-band.d.ts","sourceRoot":"","sources":["../../src/components/product-band.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"product-band.d.ts","sourceRoot":"","sources":["../../src/components/product-band.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIrE,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,gCAAgC,CAAC;AAGrF,+DAA+D;AAC/D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,8FAA8F;IAC9F,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAC/B,+EAA+E;IAC/E,MAAM,CAAC,EAAE,SAAS,WAAW,EAAE,GAAG,SAAS,CAAC;IAC5C,wFAAwF;IACxF,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,CAAC;AA8CF;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,QAAQ,EACR,SAAS,EACT,SAAS,EACT,GAAG,OAAO,EACX,EAAE,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,GAAG;IAC/C,iHAAiH;IACjH,OAAO,EAAE,YAAY,CAAC;IACtB,0GAA0G;IAC1G,QAAQ,EAAE,SAAS,CAAC;IACpB,qDAAqD;IACrD,SAAS,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;CAC1C,+BAcA;AAED,6FAA6F;AAC7F,wBAAgB,mBAAmB,gCAsBlC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Card } from "./card.js";
|
|
3
3
|
import { Skeleton, SkeletonRegion } from "./skeleton.js";
|
|
4
|
+
import { PageCommandButton } from "../internal/page-command-button.js";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
const NO_OTHERS = [];
|
|
7
|
+
function Downloads({ main, others = NO_OTHERS, note }) {
|
|
8
|
+
return (_jsxs("div", { className: "flex flex-col gap-3", "data-slot": "product-band-downloads", children: [_jsxs("div", { className: "flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center", children: [main ? _jsx(PageCommandButton, { command: main, size: "lg", variant: "default" }) : null, others.length ? (_jsx("div", { className: "flex flex-wrap items-center gap-1", children: others.map((command) => (_jsx(PageCommandButton, { command: command, variant: main ? "ghost" : "outline" }, command.label))) })) : null] }), note ? _jsx("p", { className: "text-xs text-muted-foreground", children: note }) : null] }));
|
|
9
|
+
}
|
|
4
10
|
function Band({ content, picture }) {
|
|
5
11
|
return (_jsxs("div", { className: "flex flex-col @[57rem]:flex-row @[57rem]:items-stretch", "data-slot": "product-band", children: [_jsx("div", { className: "flex min-w-0 flex-1 flex-col justify-center gap-6 p-6 @[57rem]:pr-4", children: content }), _jsx("div", { "aria-hidden": "true", className: "pointer-events-none flex justify-center px-6 pt-2 @[57rem]:w-1/4 @[57rem]:max-w-72 @[57rem]:shrink-0 @[57rem]:items-end @[57rem]:px-0 @[57rem]:pt-6", "data-slot": "product-band-picture", children: _jsx("div", { className: "relative aspect-square w-56 @[57rem]:w-full", children: picture }) })] }));
|
|
6
12
|
}
|
|
@@ -9,13 +15,13 @@ function Band({ content, picture }) {
|
|
|
9
15
|
*
|
|
10
16
|
* @family Compositions
|
|
11
17
|
* @when The Downloads page, one band per product: Nadia, Alveare, Alveare Server, NadiaOS.
|
|
12
|
-
* @instead
|
|
13
|
-
* @behaviour One resting card. The content stands centred in its height, 24 px in from the card's edges and 24 px between its parts. From a card 57 rem wide the picture stands at the right, a quarter of the card and at most 288 px, its foot on the card's bottom edge; on a narrower card it stands centred under the content, 224 px square. The product's picture fills its square, so the band never jumps when it loads. While the page reads the releases, `ProductBandSkeleton` stands in its place: the same band, the mark's square and the name's and line's bars, the download button's bar, and the picture's square, with no words (nadicode decision).
|
|
14
|
-
* @words None of its own: the product's name, its line and its download labels are the product's, from its catalogue.
|
|
15
|
-
* @access The picture is decorative: hidden from assistive technology and never a target.
|
|
18
|
+
* @instead A product whose files are each chosen by what they need, such as NadiaOS's images for each hypervisor, lists them as a `RecordList` in the band's `children`, each file's Download its row's `main` command; an entry a person adds from a catalogue is a `CatalogCard`; the steps after a download are `NumberedSteps`.
|
|
19
|
+
* @behaviour One resting card. The product gives its `downloads` as data and the band draws them under its `children`, never a button of the product's own: the file for the reader's computer (`main`) filled at the large size, full width on a phone; the product's other systems (`others`) after it, quiet (ghost) beside a `main` and outline when the reader's computer has no file of its own, so every system stays offered; and the `note`, one muted line, under them (nadicode decision). The content stands centred in its height, 24 px in from the card's edges and 24 px between its parts. From a card 57 rem wide the picture stands at the right, a quarter of the card and at most 288 px, its foot on the card's bottom edge; on a narrower card it stands centred under the content, 224 px square. The product's picture fills its square, so the band never jumps when it loads. While the page reads the releases, `ProductBandSkeleton` stands in its place: the same band, the mark's square and the name's and line's bars, the download button's bar, and the picture's square, with no words (nadicode decision).
|
|
20
|
+
* @words None of its own: the product's name, its line and its download labels are the product's, from its catalogue: the main one "Download for {system}", another system its name alone ("Windows").
|
|
21
|
+
* @access The band is a `section`, which the product names with its heading through `aria-labelledby`. The picture is decorative: hidden from assistive technology and never a target. Each download is a link named by its label, or by its `accessibleName` where several bands on a page carry the same label ("Windows · Nadia"); its icon is hidden. `ProductBandSkeleton` is busy and its bars are hidden from assistive technology.
|
|
16
22
|
*/
|
|
17
|
-
export function ProductBand({ picture, children, }) {
|
|
18
|
-
return (_jsx(Card, { className: "@container gap-0 py-0", children: _jsx(Band, { content: children, picture: picture }) }));
|
|
23
|
+
export function ProductBand({ picture, children, downloads, className, ...section }) {
|
|
24
|
+
return (_jsx(Card, { className: cn("@container gap-0 py-0", className), render: _jsx("section", { ...section }), children: _jsx(Band, { content: _jsxs(_Fragment, { children: [children, downloads ? _jsx(Downloads, { ...downloads }) : null] }), picture: picture }) }));
|
|
19
25
|
}
|
|
20
26
|
/** What stands in a ProductBand's place while its page reads the releases, with no words. */
|
|
21
27
|
export function ProductBandSkeleton() {
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type PageCommandFace } from "../internal/page-command-button.js";
|
|
3
|
+
import type { CommandRun, CommandUndo } from "./action-menu.js";
|
|
4
|
+
import type { ResolvedMessage } from "./product-message.js";
|
|
5
|
+
/** One view of the inbox, a tab across its head: "To read", "Archive". */
|
|
6
|
+
export type ProductShellInboxView = {
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
content: ReactNode;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* The one command over the open view, at the inbox's foot: it runs at once, or, as Archive all,
|
|
13
|
+
* runs at once and says so in a toast whose one action is Undo.
|
|
14
|
+
*/
|
|
15
|
+
export type ProductShellInboxCommand = PageCommandFace & ({
|
|
16
|
+
onClick: () => void;
|
|
17
|
+
undo?: never;
|
|
18
|
+
link?: never;
|
|
19
|
+
render?: never;
|
|
20
|
+
} | {
|
|
21
|
+
onClick: CommandRun;
|
|
22
|
+
undo: CommandUndo;
|
|
23
|
+
link?: never;
|
|
24
|
+
render?: never;
|
|
25
|
+
});
|
|
26
|
+
export type ProductShellBellData = {
|
|
27
|
+
/** The bell's name, with what waits unread and how urgent: "Notifications: 3 unread, needs attention". */
|
|
28
|
+
label: string;
|
|
29
|
+
/** Something waits unread: the dot on the bell, and the kind of the most urgent, which the dot carries as `data-severity`. */
|
|
30
|
+
unread?: {
|
|
31
|
+
severity: string;
|
|
32
|
+
} | undefined;
|
|
33
|
+
/** The inbox's unseen title, which names its popup: "Notifications". */
|
|
34
|
+
title: string;
|
|
35
|
+
open: boolean;
|
|
36
|
+
onOpenChange: (open: boolean) => void;
|
|
37
|
+
/** The inbox's views, as tabs across its head, and the one shown. */
|
|
38
|
+
views: {
|
|
39
|
+
/** What the tabs are: "Notification views". */
|
|
40
|
+
label: string;
|
|
41
|
+
items: readonly [ProductShellInboxView, ...ProductShellInboxView[]];
|
|
42
|
+
current: string;
|
|
43
|
+
onChange: (id: string) => void;
|
|
44
|
+
};
|
|
45
|
+
/** A message over the views about the last thing the person did here, as a failed archive. */
|
|
46
|
+
notice?: ResolvedMessage | undefined;
|
|
47
|
+
/** The command over the open view, at the inbox's foot; left out while the view has nothing it acts on. */
|
|
48
|
+
foot?: ProductShellInboxCommand | undefined;
|
|
49
|
+
/** The inbox's preferences, behind the gear at the end of its head. */
|
|
50
|
+
preferences?: {
|
|
51
|
+
/** The gear's name: "Preferences". */
|
|
52
|
+
label: string;
|
|
53
|
+
/** The view's heading: "Notification preferences". */
|
|
54
|
+
title: string;
|
|
55
|
+
/** The way back to the views: "Back". */
|
|
56
|
+
back: string;
|
|
57
|
+
content: ReactNode;
|
|
58
|
+
} | undefined;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* The product's notifications inbox: the bell beside the account, and the popup it opens.
|
|
62
|
+
*
|
|
63
|
+
* @family Navigation
|
|
64
|
+
* @when The bell `ProductShell` draws from its `bell`, beside the account at the column's foot, as the Portal's notifications. A product whose bell waits for who is signed in streams it as a region and draws this inside it. A product gives the bell its words, its views and their commands, and never draws the bell, its popup or their buttons.
|
|
65
|
+
* @instead A record's own commands stand in its row (`RecordList`), as each notification's Archive. A condition of the page's object is `NoticeBanner`. A message about one action elsewhere is a toast.
|
|
66
|
+
* @behaviour The bell is a ghost icon button; a 6 px dot at its top right says something waits unread, and only the name says how many and how urgent. It opens a popup over the column's foot, 352 px wide and at most 512 px tall, never past the window. Its head holds the views as tabs and, at its end, the gear that opens the preferences, which take the whole popup under a head of their own: Back, then their title; Back returns to the views. Focus follows: the gear hands it to Back, and Back hands it back to the gear. A `notice` stands under the head. Each view scrolls inside the popup. The `foot` command stands at the popup's foot under a 1 px rule, full width and without chrome; one with `undo` runs at once and says so in a toast whose one action is Undo. The popup closes on Escape or a press outside and keeps the view it was on.
|
|
67
|
+
* @words The product's catalogue: the bell's name says what waits ("Notifications: 3 unread, needs attention"); the views are short nouns ("To read", "Archive"); the foot command names its result ("Archive all").
|
|
68
|
+
* @access The bell is a button named by `label`, with `aria-expanded`; the popup is a dialog named by `title`, and opening it moves focus to the current tab. The tabs are a tablist named by `views.label`; the gear and Back are icon buttons named by their words. Escape closes the popup and returns focus to the bell.
|
|
69
|
+
*/
|
|
70
|
+
export declare function ProductShellBell({ label, unread, title, open, onOpenChange, views, notice, foot, preferences, }: ProductShellBellData): import("react").JSX.Element;
|
|
71
|
+
//# sourceMappingURL=product-shell-bell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-shell-bell.d.ts","sourceRoot":"","sources":["../../src/components/product-shell-bell.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAoB,MAAM,OAAO,CAAC;AAGzD,OAAO,EAAE,KAAK,eAAe,EAAqB,MAAM,gCAAgC,CAAC;AAEzF,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD,0EAA0E;AAC1E,MAAM,MAAM,qBAAqB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,SAAS,CAAA;CAAE,CAAC;AAEtF;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,eAAe,GACpD,CACI;IAAE,OAAO,EAAE,MAAM,IAAI,CAAC;IAAC,IAAI,CAAC,EAAE,KAAK,CAAC;IAAC,IAAI,CAAC,EAAE,KAAK,CAAC;IAAC,MAAM,CAAC,EAAE,KAAK,CAAA;CAAE,GACnE;IAAE,OAAO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oB,+BAsGtB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ArrowLeft, Bell, Settings } from "lucide-react";
|
|
4
|
+
import { useRef, useState } from "react";
|
|
5
|
+
import { useCommandRunner } from "../internal/command-runner.js";
|
|
6
|
+
import { PageCommandButton } from "../internal/page-command-button.js";
|
|
7
|
+
import { Button } from "./button.js";
|
|
8
|
+
import { MessageNotice } from "./message-notice.js";
|
|
9
|
+
import { Popover, PopoverContent, PopoverTitle, PopoverTrigger } from "./popover.js";
|
|
10
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./tabs.js";
|
|
11
|
+
/**
|
|
12
|
+
* The product's notifications inbox: the bell beside the account, and the popup it opens.
|
|
13
|
+
*
|
|
14
|
+
* @family Navigation
|
|
15
|
+
* @when The bell `ProductShell` draws from its `bell`, beside the account at the column's foot, as the Portal's notifications. A product whose bell waits for who is signed in streams it as a region and draws this inside it. A product gives the bell its words, its views and their commands, and never draws the bell, its popup or their buttons.
|
|
16
|
+
* @instead A record's own commands stand in its row (`RecordList`), as each notification's Archive. A condition of the page's object is `NoticeBanner`. A message about one action elsewhere is a toast.
|
|
17
|
+
* @behaviour The bell is a ghost icon button; a 6 px dot at its top right says something waits unread, and only the name says how many and how urgent. It opens a popup over the column's foot, 352 px wide and at most 512 px tall, never past the window. Its head holds the views as tabs and, at its end, the gear that opens the preferences, which take the whole popup under a head of their own: Back, then their title; Back returns to the views. Focus follows: the gear hands it to Back, and Back hands it back to the gear. A `notice` stands under the head. Each view scrolls inside the popup. The `foot` command stands at the popup's foot under a 1 px rule, full width and without chrome; one with `undo` runs at once and says so in a toast whose one action is Undo. The popup closes on Escape or a press outside and keeps the view it was on.
|
|
18
|
+
* @words The product's catalogue: the bell's name says what waits ("Notifications: 3 unread, needs attention"); the views are short nouns ("To read", "Archive"); the foot command names its result ("Archive all").
|
|
19
|
+
* @access The bell is a button named by `label`, with `aria-expanded`; the popup is a dialog named by `title`, and opening it moves focus to the current tab. The tabs are a tablist named by `views.label`; the gear and Back are icon buttons named by their words. Escape closes the popup and returns focus to the bell.
|
|
20
|
+
*/
|
|
21
|
+
export function ProductShellBell({ label, unread, title, open, onOpenChange, views, notice, foot, preferences, }) {
|
|
22
|
+
const [showsPreferences, setShowsPreferences] = useState(false);
|
|
23
|
+
const handsFocus = useRef(false);
|
|
24
|
+
const takeFocus = (button) => {
|
|
25
|
+
if (!button || !handsFocus.current)
|
|
26
|
+
return;
|
|
27
|
+
handsFocus.current = false;
|
|
28
|
+
button.focus();
|
|
29
|
+
};
|
|
30
|
+
const showPreferences = (shows) => {
|
|
31
|
+
handsFocus.current = true;
|
|
32
|
+
setShowsPreferences(shows);
|
|
33
|
+
};
|
|
34
|
+
const { arm } = useCommandRunner();
|
|
35
|
+
return (_jsxs(Popover, { open: open, onOpenChange: (next) => onOpenChange(next), children: [_jsx(PopoverTrigger, { render: _jsxs(Button, { "aria-label": label, className: "relative shrink-0 column-collapsed:mx-auto", "data-slot": "product-shell-bell", size: "icon", type: "button", variant: "ghost", children: [_jsx(Bell, { "aria-hidden": "true" }), unread ? (_jsx("span", { "aria-hidden": "true", className: "absolute top-1 right-1 size-1.5 rounded-full bg-foreground", "data-severity": unread.severity, "data-slot": "product-shell-bell-dot" })) : null] }) }), _jsxs(PopoverContent, { align: "end", className: "max-h-[min(32rem,calc(100dvh-8rem))] w-88 max-w-[calc(100vw-1.5rem)] overflow-hidden p-0", side: "top", sideOffset: 8, children: [_jsx(PopoverTitle, { className: "sr-only", children: title }), preferences && showsPreferences ? (_jsxs("div", { className: "flex min-h-0 flex-col overflow-hidden", children: [_jsxs("div", { className: "flex items-center gap-1 border-b p-2", children: [_jsx(Button, { "aria-label": preferences.back, onClick: () => showPreferences(false), ref: takeFocus, size: "icon", type: "button", variant: "ghost", children: _jsx(ArrowLeft, { "aria-hidden": "true" }) }), _jsx("span", { className: "min-w-0 truncate text-sm font-medium", children: preferences.title })] }), _jsx("div", { className: "min-h-0 overflow-auto", children: preferences.content })] })) : (_jsxs(Tabs, { className: "min-h-0 gap-0", onValueChange: views.onChange, value: views.current, children: [_jsxs("div", { className: "flex items-center gap-1 px-2 pt-2", children: [_jsx(TabsList, { "aria-label": views.label, className: "min-w-0 flex-1", variant: "line", children: views.items.map((view) => (_jsx(TabsTrigger, { value: view.id, children: view.label }, view.id))) }), preferences ? (_jsx(Button, { "aria-label": preferences.label, onClick: () => showPreferences(true), ref: takeFocus, size: "icon", type: "button", variant: "ghost", children: _jsx(Settings, { "aria-hidden": "true" }) })) : null] }), notice ? (_jsx(MessageNotice, { className: "mx-3 my-1", message: notice, placement: "action" })) : null, views.items.map((view) => (_jsx(TabsContent, { className: "min-h-0 overflow-auto", value: view.id, children: view.content }, view.id))), foot ? (_jsx("div", { className: "border-t p-2 *:w-full", "data-slot": "product-shell-bell-foot", children: _jsx(PageCommandButton, { command: arm(foot), variant: "ghost" }) })) : null] }))] })] }));
|
|
36
|
+
}
|
|
@@ -8,6 +8,7 @@ import { type RecordContextMenuProps } from "./record-commands.js";
|
|
|
8
8
|
import { type ScopeSwitcherProps } from "./scope-switcher.js";
|
|
9
9
|
import { type SidebarSectionsProps } from "./sidebar-sections.js";
|
|
10
10
|
import { type StatusBadgeTone } from "./status-badge.js";
|
|
11
|
+
import { type ProductShellBellData } from "./product-shell-bell.js";
|
|
11
12
|
/** What leads a place's row: an icon for its kind, or the place's own mark. */
|
|
12
13
|
type PlaceFigure = {
|
|
13
14
|
icon: IconComponent;
|
|
@@ -164,6 +165,18 @@ export type ProductShellHost = {
|
|
|
164
165
|
};
|
|
165
166
|
/** The one band above the account: the update offer, or the way out of the product. */
|
|
166
167
|
export type ProductShellBandData = ColumnFootBand;
|
|
168
|
+
/** The assistant's toggle at the top bar's end, which opens and closes its panel beside the page (`aside`). */
|
|
169
|
+
export type ProductShellAssistantData = {
|
|
170
|
+
/** The assistant's name, the toggle's label: "Sofia". */
|
|
171
|
+
label: string;
|
|
172
|
+
/** Her mark before the name: an Agent's orb at 24 px. */
|
|
173
|
+
mark: ReactElement;
|
|
174
|
+
/** Whether her panel is open. */
|
|
175
|
+
open: boolean;
|
|
176
|
+
/** The id of the panel it opens. */
|
|
177
|
+
panel: string;
|
|
178
|
+
onToggle: () => void;
|
|
179
|
+
};
|
|
167
180
|
/** The column's width, as the product keeps it with its preferences. */
|
|
168
181
|
export type ProductShellWidth = {
|
|
169
182
|
/** The expanded width in px it opens at, 224 to 384; 256 until the person drags it. */
|
|
@@ -230,8 +243,8 @@ export type ProductShellProps = {
|
|
|
230
243
|
foot?: readonly ProductShellPlace[];
|
|
231
244
|
/** The account menu at the column's foot, or the region that draws it; the shell decides its trigger's size and side. */
|
|
232
245
|
account: ColumnFootAccount | ProductShellRegion;
|
|
233
|
-
/** The bell beside the account, the product's notifications inbox. */
|
|
234
|
-
bell?:
|
|
246
|
+
/** The bell beside the account, the product's notifications inbox (`ProductShellBell`), or the region that draws it. */
|
|
247
|
+
bell?: ProductShellBellData | ProductShellRegion;
|
|
235
248
|
/** The path to the page, drawn in the top bar, or the region that draws it. */
|
|
236
249
|
path: readonly ProductShellCrumb[] | ProductShellRegion;
|
|
237
250
|
/** The page's unseen title and the row of its actions above the page, or the region that draws them; a page whose composition draws its own title passes none. */
|
|
@@ -240,8 +253,8 @@ export type ProductShellProps = {
|
|
|
240
253
|
tabs?: ProductShellTabsData | ProductShellRegion;
|
|
241
254
|
/** The open page's address, or the region that tells it, for a product whose path is a region: a new one opens the page at its top. */
|
|
242
255
|
address?: string | ProductShellRegion;
|
|
243
|
-
/** The top bar's end: the product's assistant, as the Portal's Sofia. */
|
|
244
|
-
assistant?:
|
|
256
|
+
/** The top bar's end: the toggle of the product's assistant, as the Portal's Sofia (`ProductShellAssistant`), or the region that draws it. */
|
|
257
|
+
assistant?: ProductShellAssistantData | ProductShellRegion;
|
|
245
258
|
/** The shell's one persistent strip under the top bar, as the Portal's impersonation, or the region that draws it. */
|
|
246
259
|
strip?: NoticeBannerProps | ProductShellRegion;
|
|
247
260
|
/** A panel beside the page, as Nadia's side panel. */
|
|
@@ -340,6 +353,10 @@ export type ProductShellAccountProps = ColumnFootAccount | {
|
|
|
340
353
|
export declare function ProductShellAccount(props: ProductShellAccountProps): import("react").JSX.Element;
|
|
341
354
|
/** The strip under the top bar: `ProductShell` draws it from its `strip`, and a product renders it in that region. */
|
|
342
355
|
export declare function ProductShellStrip(props: NoticeBannerProps): import("react").JSX.Element;
|
|
356
|
+
/**
|
|
357
|
+
* The assistant's toggle at the top bar's end: `ProductShell` draws it from its `assistant`, and a product renders it in that region. A 40 px outline button with her mark and name, secondary while her panel is open; it says whether the panel is open (`aria-expanded`) and which it is (`aria-controls`). When the panel closes from inside, by its Close or its sheet's, focus returns to the toggle, unless it has already moved elsewhere on the page.
|
|
358
|
+
*/
|
|
359
|
+
export declare function ProductShellAssistant({ label, mark, open, panel, onToggle, }: ProductShellAssistantData): import("react").JSX.Element;
|
|
343
360
|
export type ProductShellPathProps = {
|
|
344
361
|
crumbs: readonly ProductShellCrumb[];
|
|
345
362
|
/** The path's name, when the region drawn beside the page names it itself; otherwise the shell's `labels.path` names it. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-shell.d.ts","sourceRoot":"","sources":["../../src/components/product-shell.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,aAAa,EAGlB,KAAK,YAAY,EACjB,KAAK,SAAS,EAWf,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAY,MAAM,0BAA0B,CAAC;AAYjG,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,iBAAiB,EACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAO,KAAK,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAGlF,OAAO,KAA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absLink, TabsNav } from "./tabs-nav.js";
|
|
25
25
|
import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip.js";
|
|
26
26
|
import { PlaceCount } from "./place-count.js";
|
|
27
|
+
import { ProductShellBell } from "./product-shell-bell.js";
|
|
27
28
|
import { CommandRunnerHost } from "../internal/command-runner.js";
|
|
28
29
|
import { cssVariables } from "../lib/css-variables.js";
|
|
29
30
|
import { PRODUCT_SHELL_HEADING_ID, PRODUCT_SHELL_KEPT_COLLAPSED_ATTRIBUTE, PRODUCT_SHELL_KEPT_WIDTH_ATTRIBUTE, PRODUCT_SHELL_KEPT_WIDTH_PROPERTY, } from "../lib/product-shell.js";
|
|
@@ -331,9 +332,9 @@ function Frame({ home, create, find, band, foot, account, bell, path, title, tab
|
|
|
331
332
|
"--product-shell-start-room": sideRoom.start ? `${sideRoom.start}px` : undefined,
|
|
332
333
|
// The window's own buttons count in the end's room.
|
|
333
334
|
"--product-shell-end-room": sideRoom.end ? `${sideRoom.end}px` : undefined,
|
|
334
|
-
}), children: [_jsx("div", { className: "flex items-center self-stretch justify-self-start ps-[max(0px,calc(var(--product-shell-start-inset,0px)-0.75rem))] md:hidden", ref: startCluster, children: _jsx(SidebarTrigger, { "aria-labelledby": ids.openNavigation, attention: waiting, className: "-ml-1 self-center" }) }), Mover ? (_jsx("div", { className: "hidden self-stretch md:flex md:col-start-1 md:row-start-1", children: _jsx(Mover, {}) })) : null, _jsx("div", { className: "col-start-2 row-start-1 flex h-full min-w-0 items-center justify-center", ref: pathRoom, children: isRegion(path) ? (_jsx(Fragment, { children: path.region }, "path-region")) : (_jsx(ProductShellPath, { crumbs: path })) }), _jsxs("div", { className: "col-start-3 row-start-1 flex min-w-0 items-center justify-end gap-1 self-stretch", children: [Mover ? (_jsx("div", { className: "flex min-w-0 flex-1 self-stretch", children: _jsx(Mover, {}) })) : null, _jsxs("div", { className: "flex shrink-0 items-center gap-1 pe-(--product-shell-end-inset)", ref: endCluster, children: [host?.controls ? (_jsx("div", { className: "flex shrink-0 items-center gap-1", "data-compact": compact && host.compactControls ? "" : undefined, "data-slot": "product-shell-controls", children: compact && host.compactControls ? host.compactControls : host.controls })) : null, assistant ? _jsx(Fragment, { children: assistant }, "assistant") :
|
|
335
|
+
}), children: [_jsx("div", { className: "flex items-center self-stretch justify-self-start ps-[max(0px,calc(var(--product-shell-start-inset,0px)-0.75rem))] md:hidden", ref: startCluster, children: _jsx(SidebarTrigger, { "aria-labelledby": ids.openNavigation, attention: waiting, className: "-ml-1 self-center" }) }), Mover ? (_jsx("div", { className: "hidden self-stretch md:flex md:col-start-1 md:row-start-1", children: _jsx(Mover, {}) })) : null, _jsx("div", { className: "col-start-2 row-start-1 flex h-full min-w-0 items-center justify-center", ref: pathRoom, children: isRegion(path) ? (_jsx(Fragment, { children: path.region }, "path-region")) : (_jsx(ProductShellPath, { crumbs: path })) }), _jsxs("div", { className: "col-start-3 row-start-1 flex min-w-0 items-center justify-end gap-1 self-stretch", children: [Mover ? (_jsx("div", { className: "flex min-w-0 flex-1 self-stretch", children: _jsx(Mover, {}) })) : null, _jsxs("div", { className: "flex shrink-0 items-center gap-1 pe-(--product-shell-end-inset)", ref: endCluster, children: [host?.controls ? (_jsx("div", { className: "flex shrink-0 items-center gap-1", "data-compact": compact && host.compactControls ? "" : undefined, "data-slot": "product-shell-controls", children: compact && host.compactControls ? host.compactControls : host.controls })) : null, assistant === undefined ? null : isRegion(assistant) ? (_jsx(Fragment, { children: assistant.region }, "assistant-region")) : (_jsx(ProductShellAssistant, { ...assistant }))] })] })] }));
|
|
335
336
|
const stripRegion = strip ? (isRegion(strip) ? (_jsx(Fragment, { children: strip.region }, "strip-region")) : (_jsx(ProductShellStrip, { ...strip }))) : null;
|
|
336
|
-
return (_jsx(ProductShellContext, { value: context, children: _jsxs(CommandRunnerHost, { onAsk: closeSheet, children: [_jsx(ProductShellWordsContext, { value: wordsContext, children: isRegion(labels) ? (_jsx(Fragment, { children: labels.region }, "words-region")) : (_jsx(ProductShellWords, { ...labels })) }), _jsx(ProductShellColumnContext, { value: column, children: _jsxs(Sidebar, { mobileCloseLabel: words?.closeNavigation ?? "", mobileDescription: words?.navigationDescription, mobileFinalFocus: sheetFinalFocus, mobileTitle: words?.navigation, resize: narrow ? undefined : { "aria-labelledby": ids.resize }, children: [isMobile ? null : titleBar, _jsxs(SidebarFrame, { account: isRegion(account) ? (_jsx(Fragment, { children: account.region }, "account-region")) : (_jsx(ProductShellAccount, { ...account })), actions: bell ? _jsx(Fragment, { children: bell }, "bell") :
|
|
337
|
+
return (_jsx(ProductShellContext, { value: context, children: _jsxs(CommandRunnerHost, { onAsk: closeSheet, children: [_jsx(ProductShellWordsContext, { value: wordsContext, children: isRegion(labels) ? (_jsx(Fragment, { children: labels.region }, "words-region")) : (_jsx(ProductShellWords, { ...labels })) }), _jsx(ProductShellColumnContext, { value: column, children: _jsxs(Sidebar, { mobileCloseLabel: words?.closeNavigation ?? "", mobileDescription: words?.navigationDescription, mobileFinalFocus: sheetFinalFocus, mobileTitle: words?.navigation, resize: narrow ? undefined : { "aria-labelledby": ids.resize }, children: [isMobile ? null : titleBar, _jsxs(SidebarFrame, { account: isRegion(account) ? (_jsx(Fragment, { children: account.region }, "account-region")) : (_jsx(ProductShellAccount, { ...account })), actions: bell === undefined ? undefined : isRegion(bell) ? (_jsx(Fragment, { children: bell.region }, "bell-region")) : (_jsx(ProductShellBell, { ...bell })), band: band === undefined ? undefined : isRegion(band) ? (_jsx(Fragment, { children: band.region }, "band-region")) : (_jsx(ProductShellBand, { band: band })), find: find === undefined ? null : isRegion(find) ? (_jsx(Fragment, { children: find.region }, "find-region")) : find.form === "button" ? null : (_jsx(ProductShellFindField, { find: find })), foot: foot && foot.length > 0 ? (_jsx(SidebarMenu, { children: foot.map((place) => (_jsx(PlaceRow, { collapsed: collapsed, onChosen: isMobile ? choose : closeSheet, place: place }, place.id))) })) : undefined, header: !home ? (Mover ? (_jsx("div", { className: "flex h-14 min-w-0", children: _jsx(Mover, {}) })) : null) : isRegion(home) ? (_jsx(Fragment, { children: home.region }, "home-region")) : (_jsx(ProductShellHome, { ...home })), toggle: _jsxs(_Fragment, { children: [collapsed
|
|
337
338
|
? null
|
|
338
339
|
: topCommands.map((command) => (_jsx(TopCommand, { command: command, onChosen: closeSheet }, command.label))), collapsed && (narrow || expandBelowButtons) ? (Mover ? (_jsx("div", { className: "flex h-14 w-full self-stretch", children: _jsx(Mover, {}) })) : null) : narrow ? null : (_jsx(SidebarTrigger, { "aria-labelledby": ids.collapse, className: "hidden shrink-0 md:inline-flex" }))] }), children: [collapsed &&
|
|
339
340
|
((places && topCommands.length > 0) || (expandBelowButtons && !narrow)) ? (_jsx(SidebarGroup, { children: _jsx(SidebarGroupContent, { children: _jsxs(SidebarMenu, { children: [expandBelowButtons && !narrow ? (_jsx(SidebarMenuItem, { children: _jsx(SidebarMenuButton, { "aria-expanded": false, "aria-labelledby": ids.collapse, onClick: toggleSidebar, tooltip: words?.collapse, children: _jsx(PanelLeftIcon, { "aria-hidden": "true" }) }) })) : null, (places ? topCommands : []).map((command) => (_jsx(SidebarMenuItem, { children: _jsxs(SidebarMenuButton, { "aria-keyshortcuts": command.keyshortcuts, onClick: command.onClick, tooltip: command.label, children: [_jsx(command.icon, { "aria-hidden": "true" }), _jsx("span", { className: "sr-only", children: command.label })] }) }, command.label)))] }) }) })) : null, places ? (isRegion(places) ? (_jsx(Fragment, { children: places.region }, "places-region")) : (_jsx(ProductShellPlaces, { places: places }))) : sections ? (_jsx(ProductShellSections, { ...sections })) : null] })] }) }), isMobile && isRegion(places) ? (_jsx(ProductShellColumnContext, { value: waitingCounter, children: _jsx(Fragment, { children: places.region }, "places-count") })) : null, _jsxs(SidebarInset, { className: cn("h-full min-h-0 min-w-0", !host && "overflow-clip"), children: [isMobile ? titleBar : null, host ? (_jsxs("div", { className: "relative flex min-h-0 min-w-0 flex-1 flex-col", children: [topBar, stripRegion, _jsx("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", "data-slot": "product-shell-page", children: children })] })) : (_jsxs("div", { className: "grid min-h-0 min-w-0 flex-1 grid-rows-[auto_minmax(0,1fr)] gap-(--nc-guide) overflow-clip bg-border has-[>[data-slot=product-shell-strip]]:grid-rows-[auto_auto_minmax(0,1fr)]", "data-slot": "product-shell-inset", children: [topBar, stripRegion, _jsxs("div", { className: "group/product-shell-workspace flex min-h-0 min-w-0 flex-col overflow-clip bg-(--nc-material-workspace) has-[>[data-slot=product-shell-tabs-region]_[data-slot=tabs-nav-band]]:-mt-(--nc-guide)", "data-slot": "product-shell-workspace", children: [tabs ? (_jsx("div", { className: "min-w-0 shrink-0", "data-slot": "product-shell-tabs-region", children: isRegion(tabs) ? (_jsx(Fragment, { children: tabs.region }, "tabs-region")) : (_jsx(ProductShellTabs, { ...tabs })) })) : null, pageRegion] })] }))] }), aside ? _jsx(Fragment, { children: aside }, "aside") : null, isRegion(address) ? (_jsx(Fragment, { children: address.region }, "address-region")) : (_jsx(ProductShellAddress, { address: address ?? (isRegion(path) ? "" : path.map(crumbKey).join("\u0000")) }))] }) }));
|
|
@@ -433,6 +434,26 @@ export function ProductShellStrip(props) {
|
|
|
433
434
|
return _jsx(NoticeBanner, { ...props });
|
|
434
435
|
return (_jsx("div", { className: "min-w-0 bg-background p-3 md:px-4", "data-slot": "product-shell-strip", children: _jsx(NoticeBanner, { ...props }) }));
|
|
435
436
|
}
|
|
437
|
+
/**
|
|
438
|
+
* The assistant's toggle at the top bar's end: `ProductShell` draws it from its `assistant`, and a product renders it in that region. A 40 px outline button with her mark and name, secondary while her panel is open; it says whether the panel is open (`aria-expanded`) and which it is (`aria-controls`). When the panel closes from inside, by its Close or its sheet's, focus returns to the toggle, unless it has already moved elsewhere on the page.
|
|
439
|
+
*/
|
|
440
|
+
export function ProductShellAssistant({ label, mark, open, panel, onToggle, }) {
|
|
441
|
+
const toggle = useRef(null);
|
|
442
|
+
const wasOpen = useRef(open);
|
|
443
|
+
useEffect(() => {
|
|
444
|
+
const closed = wasOpen.current && !open;
|
|
445
|
+
wasOpen.current = open;
|
|
446
|
+
if (!closed)
|
|
447
|
+
return;
|
|
448
|
+
const focused = document.activeElement;
|
|
449
|
+
const lost = focused === null ||
|
|
450
|
+
focused === document.body ||
|
|
451
|
+
document.getElementById(panel)?.contains(focused) === true;
|
|
452
|
+
if (lost)
|
|
453
|
+
toggle.current?.focus();
|
|
454
|
+
}, [open, panel]);
|
|
455
|
+
return (_jsxs(Button, { "aria-controls": panel, "aria-expanded": open, className: "gap-2", "data-slot": "product-shell-assistant", onClick: onToggle, ref: toggle, size: "lg", type: "button", variant: open ? "secondary" : "outline", children: [mark, label] }));
|
|
456
|
+
}
|
|
436
457
|
function PlaceGroup({ group, headed, navigationId, collapsed, onChosen, }) {
|
|
437
458
|
const rows = group.loading ? (_jsx(PlaceSkeletons, { collapsed: collapsed })) : group.failed ? (_jsx(PlacesFailed, { collapsed: collapsed, message: group.failed })) : group.places.length === 0 && group.empty !== undefined ? (collapsed ? null : (_jsx(EmptyState, { kind: "nothingYet", message: group.empty, scope: "card" }))) : (_jsx(SidebarMenu, { children: group.places.map((place) => (_jsx(PlaceRow, { collapsed: collapsed, onChosen: onChosen, place: place }, place.id))) }));
|
|
438
459
|
return (_jsxs(SidebarGroup, { children: [group.label && headed ? _jsx(SidebarGroupLabel, { render: _jsx("h2", { children: group.label }) }) : null, _jsx("nav", { "aria-busy": group.loading === true, "aria-label": group.label, "aria-labelledby": group.label === undefined ? navigationId : undefined, children: _jsx(SidebarGroupContent, { children: rows }) })] }));
|
|
@@ -205,6 +205,8 @@ export type RecordListProps<TRecord extends RowData> = RecordCommandsOf<TRecord>
|
|
|
205
205
|
*/
|
|
206
206
|
heading?: {
|
|
207
207
|
title: string;
|
|
208
|
+
/** The section's id, so a link to it lands on it: "ssh-keys" for `#ssh-keys`. */
|
|
209
|
+
id?: string | undefined;
|
|
208
210
|
/** The list's state right after the title: a `CheckCounts`. */
|
|
209
211
|
status?: ReactElement;
|
|
210
212
|
description?: ReactNode;
|
|
@@ -242,7 +244,7 @@ export declare function RecordListSkeleton({ rows, notice, }: {
|
|
|
242
244
|
* @instead “For tabular data with sortable columns and shared row shape, use `Table` instead.” (https://vercel.com/geist/entity)
|
|
243
245
|
* “For a static key/value metadata block on a detail page, use `Description`.” (https://vercel.com/geist/entity)
|
|
244
246
|
* Ours: Geist's `Table` is a `DataTable`, for rows that are not things a person opens but lines of figures read and compared under a visible heading row: usage per product, the amounts in a statement, invoices (owner, 2026-11-08). 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` (nadicode decision).
|
|
245
|
-
* @behaviour One bordered card, a 1 px rule between records and none after the last. No list draws a heading row a person sees: its column names are read by screen readers only, so every value on a row names itself (owner, 2026-11-08). From 48rem of card, one width whatever the columns, the records stand in aligned columns, and on a narrower card each record is a card of its own: its first line holds the mark and the name with the controls beside them (the `select` box before, the `checklist` ring and the commands after), the ring and the commands moving under the name when beside it the name would have less than 10rem, and its facts, state and time wrap under it, each whole, a fact the record lacks left out. The columns stand left to right: the `select` box, the identity (the rest of the row, never less than 10rem), the facts (each its `size`), the status (`status.size`), the time (`time.size`, tabular), the `checklist` ring and the commands; the browser lays them out, the sized ones at their `size` while the row has room and narrower, each value ending in an ellipsis, when it has not, and the ring and the commands as wide as their widest row, never narrower than a `commandsSize` the caller gives. A row is 72 px. A `checklist` puts the record's `ProgressChecklist` ring just before its commands; the ring opens its own drawer, never the row. Every row has its 32 px mark, its name (600) and, under it, one muted 14 px line, which `wraps="detail"` lets wrap in full where the person must read it whole; `name` and the mark are required; a record with nothing to say under its name leaves the line out and is the name alone, never a dash. With `layout="line"`, the facts and the status share one muted line, joined by a middle dot, in one column. The product gives each record's `commands`, everything it can do now, and the list draws them: every command in the three dots, the record's name heading them and a destructive one last, after a divider, in the error colour; the one marked `main`, which the row is waiting on (a request to approve, a connection to finish), stands as a 32 px outline button before the three dots (owner, 2026-11-08); one whose label follows the record's state, such as Turn off and Turn on, names its other labels in `sameWidthAs`, so its button keeps one width on every row and in every state (owner, 2026-11-12). A command a record cannot run now stays, disabled, with a lock at its end and its reason read by a screen reader, never a line of text (owner, 2026-11-09); only permission leaves one out (nadicode decision). More than ten commands for a record, or two marked `main`, throws in development and tests (nadicode decision). Every column of the records' attributes stands on every row, so the values line up: a record with no value for a fact draws `TableValue`'s muted dash, with the fact's `missing` read in its place; the record's state stands on every row too, *Ready* included (owner, 2026-11-08); the commands column, which holds no attribute, stands only while a record has a command, a menu or a message, or the list gives `commandsSize`. 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. With `open` the whole row is one target and takes the `accent` hover, with no chevron; 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`, drawn above the box and never inside it: its title, the one sentence under it, and at the title row's trailing edge its `actions`, such as its Add command and a muted count; the box holds the rows alone (owner, 2026-11-09). The heading's actions act on the list as a whole, adding a record; a command on one record is that record's, in its own row, never in the heading's menu (owner, 2026-11-09). 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. A long list a person reads in part, such as their signed-in sessions, takes `footer.more`: its first `shows` records, then an outline button at the footer's end that shows the rest and, once they show, fewer again, its `aria-expanded` saying which; the page never draws that button under the list itself (nadicode decision). 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"); the record's own commands stay on its row, 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, a `Tag` and a failed action's message.
|
|
247
|
+
* @behaviour One bordered card, a 1 px rule between records and none after the last. No list draws a heading row a person sees: its column names are read by screen readers only, so every value on a row names itself (owner, 2026-11-08). From 48rem of card, one width whatever the columns, the records stand in aligned columns, and on a narrower card each record is a card of its own: its first line holds the mark and the name with the controls beside them (the `select` box before, the `checklist` ring and the commands after), the ring and the commands moving under the name when beside it the name would have less than 10rem, and its facts, state and time wrap under it, each whole, a fact the record lacks left out. The columns stand left to right: the `select` box, the identity (the rest of the row, never less than 10rem), the facts (each its `size`), the status (`status.size`), the time (`time.size`, tabular), the `checklist` ring and the commands; the browser lays them out, the sized ones at their `size` while the row has room and narrower, each value ending in an ellipsis, when it has not, and the ring and the commands as wide as their widest row, never narrower than a `commandsSize` the caller gives. A row is 72 px. A `checklist` puts the record's `ProgressChecklist` ring just before its commands; the ring opens its own drawer, never the row. Every row has its 32 px mark, its name (600) and, under it, one muted 14 px line, which `wraps="detail"` lets wrap in full where the person must read it whole; `name` and the mark are required; a record with nothing to say under its name leaves the line out and is the name alone, never a dash. With `layout="line"`, the facts and the status share one muted line, joined by a middle dot, in one column. The product gives each record's `commands`, everything it can do now, and the list draws them: every command in the three dots, the record's name heading them and a destructive one last, after a divider, in the error colour; the one marked `main`, which the row is waiting on (a request to approve, a connection to finish), stands as a 32 px outline button before the three dots (owner, 2026-11-08); one whose label follows the record's state, such as Turn off and Turn on, names its other labels in `sameWidthAs`, so its button keeps one width on every row and in every state (owner, 2026-11-12). A command a record cannot run now stays, disabled, with a lock at its end and its reason read by a screen reader, never a line of text (owner, 2026-11-09); only permission leaves one out (nadicode decision). More than ten commands for a record, or two marked `main`, throws in development and tests (nadicode decision). Every column of the records' attributes stands on every row, so the values line up: a record with no value for a fact draws `TableValue`'s muted dash, with the fact's `missing` read in its place; the record's state stands on every row too, *Ready* included (owner, 2026-11-08); the commands column, which holds no attribute, stands only while a record has a command, a menu or a message, or the list gives `commandsSize`. 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. With `open` the whole row is one target and takes the `accent` hover, with no chevron; 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`, drawn above the box and never inside it: its title, the one sentence under it, and at the title row's trailing edge its `actions`, such as its Add command and a muted count; the box holds the rows alone (owner, 2026-11-09). The heading's `id` names the section that holds the heading and the rows together, so a link to it lands on the list. The heading's actions act on the list as a whole, adding a record; a command on one record is that record's, in its own row, never in the heading's menu (owner, 2026-11-09). 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. A long list a person reads in part, such as their signed-in sessions, takes `footer.more`: its first `shows` records, then an outline button at the footer's end that shows the rest and, once they show, fewer again, its `aria-expanded` saying which; the page never draws that button under the list itself (nadicode decision). 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"); the record's own commands stay on its row, 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, a `Tag` and a failed action's message.
|
|
246
248
|
* “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)
|
|
247
249
|
* Ours: `failed`, `noMatch` and `empty` are those variants, drawn inside the card (nadicode decision).
|
|
248
250
|
* “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)
|
|
@@ -257,7 +259,7 @@ export declare function RecordListSkeleton({ rows, notice, }: {
|
|
|
257
259
|
* “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)
|
|
258
260
|
* Ours: a list is the records' attributes shown as data, not written as text. Its columns are the 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, and says what it is with no heading over it: a kind ("Customer"), a count with its unit ("3 keys"), a time or a date in its sentence ("Updated 3h ago", "Auto-renews Aug 3"), a figure after the word that names it, with its meter where it has one ("Included 92% of $200.00", "Extra €15.00"), a state as its badge, or a name after the mark of its kind (`icon`, a `Tag`'s `mark`, a plan's emblem). 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 `TableValue` 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 name their columns for assistive technology ("Partner", "State", "Asked"). A condition of the record that waits on someone, outside its state, is the `badge` beside its name. 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, `moreLabel` reads "More for {record}". A row command names its result in sentence case ("Edit domain"). A status is the record's state in `StatusBadge`'s words, never the state a row's own command already says: a row that ends in "Resend link" carries no "Link sent". The footer holds the paging, never how many records the list holds or a help sentence: the rows end at the last record, and guidance a step needs lives in that step (owner, 2026-11-09).
|
|
259
261
|
* @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)
|
|
260
|
-
* 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 `moreLabel`, and the menu's first line names the record; a right-click on a row opens every command of the record in one menu. The loading rows are a status named by `loadingLabel`, inside the one live region that announces what replaces them (nadicode decision). `RecordListSkeleton`, which a page shows while it reads the records, is busy and carries no words.
|
|
262
|
+
* 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 `moreLabel`, and the menu's first line names the record; a right-click on a row opens every command of the record in one menu. Once a confirmed command takes its row away, focus goes to the list's heading, or to the list itself when it has none (nadicode decision). The loading rows are a status named by `loadingLabel`, inside the one live region that announces what replaces them (nadicode decision). `RecordListSkeleton`, which a page shows while it reads the records, is busy and carries no words.
|
|
261
263
|
* “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)
|
|
262
264
|
* Ours: each box is named by `select.label`, which reads "Select {record}" (nadicode decision).
|
|
263
265
|
*/
|
|
@@ -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;AAGrD,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,SAAS,
|
|
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;AAGrD,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAKf,OAAO,EAEL,KAAK,qBAAqB,EAE3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAClF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EACL,KAAK,WAAW,EAEhB,KAA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