@nadicodeai/ui 12.1.200 → 12.1.202
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/catalog-card.d.ts +27 -0
- package/dist/components/catalog-card.d.ts.map +1 -0
- package/dist/components/catalog-card.js +19 -0
- package/dist/components/library-shelf.d.ts +8 -2
- package/dist/components/library-shelf.d.ts.map +1 -1
- package/dist/components/library-shelf.js +16 -4
- package/dist/components/record-sheet.d.ts +19 -6
- package/dist/components/record-sheet.d.ts.map +1 -1
- package/dist/components/record-sheet.js +11 -6
- package/dist/components/sheet.d.ts +4 -2
- package/dist/components/sheet.d.ts.map +1 -1
- package/dist/components/sheet.js +5 -3
- package/dist/components/sidebar-sections.d.ts +3 -1
- package/dist/components/sidebar-sections.d.ts.map +1 -1
- package/dist/components/sidebar-sections.js +3 -3
- package/dist/components/step-cards.d.ts +28 -0
- package/dist/components/step-cards.d.ts.map +1 -0
- package/dist/components/step-cards.js +21 -0
- package/dist/showcase/specimens/compositions.d.ts +4 -0
- package/dist/showcase/specimens/compositions.d.ts.map +1 -1
- package/dist/showcase/specimens/compositions.js +19 -0
- package/dist/showcase/specimens/index.d.ts +2 -0
- package/dist/showcase/specimens/index.d.ts.map +1 -1
- 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 +30 -8
- package/package.json +2 -2
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type IdentityMarkProps } from "./identity-mark.js";
|
|
3
|
+
export type CatalogCardProps = {
|
|
4
|
+
mark: IdentityMarkProps;
|
|
5
|
+
name: string;
|
|
6
|
+
/** One line on what it does; a longer one is cut after two lines. */
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
/** The card's tags at its foot: its category, how many accounts it holds. */
|
|
9
|
+
tags?: ReactNode;
|
|
10
|
+
/** The whole card opens the thing, in the drawer that sets it up. */
|
|
11
|
+
onOpen: () => void;
|
|
12
|
+
/** The name read aloud, when the name alone does not say what opening does. */
|
|
13
|
+
accessibleName?: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* One thing a person can connect, as a card in a catalogue that opens its drawer, as Vercel's
|
|
17
|
+
* Browse Connectors draws a connector.
|
|
18
|
+
*
|
|
19
|
+
* @family Data
|
|
20
|
+
* @when A catalogue a person browses by picture and name, where opening one sets it up in a drawer: Nadia's Browse apps. On a `LibraryShelf` through its `cards`.
|
|
21
|
+
* @instead A thing added with one press, with no setup, is a `CatalogEntry`. An Agent or template chosen by its preview is an `AgentCard`. What a person already holds is a row of its `CollectionPage`.
|
|
22
|
+
* @behaviour A hairline card with the mark at 40 at its top, and at its foot the name, the line cut after two lines and the tags, so names line up along a row of cards. The whole card is one target and takes the `accent` hover, with no button of its own: the drawer holds the commands. On hover or focus an app's own logo fades in behind the card's top right corner, 112 px, blurred 40 px and more saturated, so the card glows in the app's colours; a mark with no logo has no glow.
|
|
23
|
+
* @words The name as the catalogue gives it. The line says what it does. Tags are short facts: a category, "2 accounts".
|
|
24
|
+
* @access The name is a real button whose target covers the card, so the tab order holds one stop a card. The mark is decorative beside it.
|
|
25
|
+
*/
|
|
26
|
+
export declare function CatalogCard({ mark, name, description, tags, onOpen, accessibleName, }: CatalogCardProps): import("react").JSX.Element;
|
|
27
|
+
//# sourceMappingURL=catalog-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-card.d.ts","sourceRoot":"","sources":["../../src/components/catalog-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAElF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,iBAAiB,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,6EAA6E;IAC7E,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,qEAAqE;IACrE,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,+EAA+E;IAC/E,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,IAAI,EACJ,MAAM,EACN,cAAc,GACf,EAAE,gBAAgB,+BAuClB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Card } from "./card.js";
|
|
4
|
+
import { IdentityMark } from "./identity-mark.js";
|
|
5
|
+
/**
|
|
6
|
+
* One thing a person can connect, as a card in a catalogue that opens its drawer, as Vercel's
|
|
7
|
+
* Browse Connectors draws a connector.
|
|
8
|
+
*
|
|
9
|
+
* @family Data
|
|
10
|
+
* @when A catalogue a person browses by picture and name, where opening one sets it up in a drawer: Nadia's Browse apps. On a `LibraryShelf` through its `cards`.
|
|
11
|
+
* @instead A thing added with one press, with no setup, is a `CatalogEntry`. An Agent or template chosen by its preview is an `AgentCard`. What a person already holds is a row of its `CollectionPage`.
|
|
12
|
+
* @behaviour A hairline card with the mark at 40 at its top, and at its foot the name, the line cut after two lines and the tags, so names line up along a row of cards. The whole card is one target and takes the `accent` hover, with no button of its own: the drawer holds the commands. On hover or focus an app's own logo fades in behind the card's top right corner, 112 px, blurred 40 px and more saturated, so the card glows in the app's colours; a mark with no logo has no glow.
|
|
13
|
+
* @words The name as the catalogue gives it. The line says what it does. Tags are short facts: a category, "2 accounts".
|
|
14
|
+
* @access The name is a real button whose target covers the card, so the tab order holds one stop a card. The mark is decorative beside it.
|
|
15
|
+
*/
|
|
16
|
+
export function CatalogCard({ mark, name, description, tags, onOpen, accessibleName, }) {
|
|
17
|
+
const glow = mark.kind === "app" ? mark.logo?.light : undefined;
|
|
18
|
+
return (_jsxs(Card, { className: "relative isolate h-full min-h-48 gap-0 px-(--card-spacing) nc-transition-paint hover:bg-accent focus-within:nc-focus-outline focus-within:outline-ring", surface: "outlined", variant: "interactive", children: [glow ? (_jsx("div", { "aria-hidden": "true", className: "pointer-events-none absolute -top-6 -right-6 -z-10 size-28 opacity-0 blur-2xl saturate-150 transition-opacity duration-500 group-focus-within/card:opacity-70 group-hover/card:opacity-70 motion-reduce:transition-none", "data-slot": "catalog-card-glow", children: _jsx("img", { alt: "", className: "size-full", src: glow }) })) : null, _jsx("div", { className: "w-fit", children: _jsx(IdentityMark, { ...mark, size: 40 }) }), _jsxs("div", { className: "mt-auto grid min-w-0 gap-1 pt-nadicode-md", children: [_jsx("button", { "aria-label": accessibleName, className: "w-fit max-w-full cursor-pointer text-left text-body-lg font-medium text-foreground outline-none after:absolute after:inset-0 after:content-['']", onClick: onOpen, type: "button", children: name }), description ? (_jsx("p", { className: "line-clamp-2 text-body-sm text-muted-foreground", children: description })) : null, tags ? (_jsx("div", { className: "flex flex-wrap items-center gap-nadicode-xxs pt-nadicode-xxs", children: tags })) : null] })] }));
|
|
19
|
+
}
|
|
@@ -24,15 +24,21 @@ export type LibraryShelfProps = {
|
|
|
24
24
|
/** Cards to a row from md: three by default. */
|
|
25
25
|
columns?: 2 | 3;
|
|
26
26
|
view?: "cards" | "rows";
|
|
27
|
+
}
|
|
28
|
+
/** A shelf of cards, three to a row: `CatalogCard` elements. */
|
|
29
|
+
| {
|
|
30
|
+
cards: readonly ReactElement[] | undefined;
|
|
31
|
+
/** Under the cards, for a shelf that shows only its first ones: a `LoadMoreButton`. */
|
|
32
|
+
more?: ReactNode;
|
|
27
33
|
});
|
|
28
34
|
/**
|
|
29
35
|
* A Library shelf: the one line saying what it holds, the search, then the
|
|
30
36
|
* reusable things a person adds, as two-column entries, or Agent template cards or rows.
|
|
31
37
|
*
|
|
32
38
|
* @family Compositions
|
|
33
|
-
* @when A gallery of reusable things a person adds, as Vercel's Templates gallery: the Portal's Agent templates, Nadia's New Agent gallery.
|
|
39
|
+
* @when A gallery of reusable things a person adds, as Vercel's Templates gallery: the Portal's Agent templates, Nadia's New Agent gallery; or a catalogue of cards, as Vercel's Browse Connectors: Nadia's Browse apps (`cards`).
|
|
34
40
|
* @instead The Portal's Skills and Plugins are entity rows a person finds, opens and adds, a CollectionPage; records a person already has and acts on are a CollectionPage too; choosing from a catalogue without leaving the page is a CatalogDrawer.
|
|
35
|
-
* @behaviour The definition line only where the page has no title row to stand under (a titled page follows the title with the search, as every collection does). Shows, the first that holds: the failure; still entries while the shelf loads; noMatch while the search finds nothing; empty when the shelf holds nothing; then each section's title over its entries, two to a row from md, or the templates as cards, three to a row or as `columns` says, or as one list of rows with `view="rows"
|
|
41
|
+
* @behaviour The definition line only where the page has no title row to stand under (a titled page follows the title with the search, as every collection does). Shows, the first that holds: the failure; still entries while the shelf loads; noMatch while the search finds nothing; empty when the shelf holds nothing; then each section's title over its entries, two to a row from md, or the templates as cards, three to a row or as `columns` says, or as one list of rows with `view="rows"`, or the cards, three to a row, with `more` under them. Each entry has its kind's tile, its name (the link to its page), one line, one fact, one Add control or the word saying it is already added, then its menu. A failed add puts its message in the entry's line and its next steps beside its controls. The search shows unless the shelf is empty, with `searchEnd` at the end of its row.
|
|
36
42
|
* @words The product words every string: the optional definition (one sentence on what the shelf holds), the search's label ("Search skills"), the loading label, each entry's name, line, Add label and added word, the empty, noMatch and failed messages.
|
|
37
43
|
* @access Each section is a region named by its h2; entries are list items; loading is a status named by loadingLabel and aria-busy; a failed add is announced as an alert; each entry's menu is named by its label.
|
|
38
44
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library-shelf.d.ts","sourceRoot":"","sources":["../../src/components/library-shelf.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGjE,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC9F,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG3E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,iIAAiI;IACjI,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,8EAA8E;IAC9E,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IACjE,iGAAiG;IACjG,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;IACpD,MAAM,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;CACnC,GAAG,CACA;IAAE,QAAQ,EAAE,SAAS,cAAc,EAAE,GAAG,SAAS,CAAA;CAAE;AACrD,8FAA8F;GAC5F;IACE,SAAS,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,CAAC;IAC/C,gDAAgD;IAChD,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CACzB,CACJ,CAAC;
|
|
1
|
+
{"version":3,"file":"library-shelf.d.ts","sourceRoot":"","sources":["../../src/components/library-shelf.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGjE,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC9F,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG3E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,iIAAiI;IACjI,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,8EAA8E;IAC9E,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IACjE,iGAAiG;IACjG,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;IACpD,MAAM,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;CACnC,GAAG,CACA;IAAE,QAAQ,EAAE,SAAS,cAAc,EAAE,GAAG,SAAS,CAAA;CAAE;AACrD,8FAA8F;GAC5F;IACE,SAAS,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,CAAC;IAC/C,gDAAgD;IAChD,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CACzB;AACH,gEAAgE;GAC9D;IACE,KAAK,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,CAAC;IAC3C,uFAAuF;IACvF,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CACJ,CAAC;AA6DF;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,+BAgCpD"}
|
|
@@ -8,6 +8,8 @@ import { CatalogList, CatalogSkeleton, catalogIsEmpty } from "../internal/catalo
|
|
|
8
8
|
function loadedShelf(props) {
|
|
9
9
|
if ("sections" in props)
|
|
10
10
|
return props.sections && { sections: props.sections };
|
|
11
|
+
if ("cards" in props)
|
|
12
|
+
return props.cards && { cards: props.cards, more: props.more };
|
|
11
13
|
return (props.templates && {
|
|
12
14
|
templates: props.templates,
|
|
13
15
|
columns: props.columns ?? 3,
|
|
@@ -15,25 +17,35 @@ function loadedShelf(props) {
|
|
|
15
17
|
});
|
|
16
18
|
}
|
|
17
19
|
function holdsNothing(shelf) {
|
|
18
|
-
|
|
20
|
+
if ("sections" in shelf)
|
|
21
|
+
return catalogIsEmpty(shelf.sections);
|
|
22
|
+
if ("cards" in shelf)
|
|
23
|
+
return shelf.cards.length === 0;
|
|
24
|
+
return shelf.templates.length === 0;
|
|
25
|
+
}
|
|
26
|
+
function ShelfCards({ cards, columns }) {
|
|
27
|
+
return (_jsx(CardRow, { className: "gap-4", columns: columns, render: _jsx("ul", {}), children: cards.map((card, index) => (_jsx("li", { children: card }, card.key ?? index))) }));
|
|
19
28
|
}
|
|
20
29
|
function ShelfContents({ shelf }) {
|
|
21
30
|
if ("sections" in shelf) {
|
|
22
31
|
return _jsx(CatalogList, { columns: 2, headingLevel: 2, sections: shelf.sections });
|
|
23
32
|
}
|
|
33
|
+
if ("cards" in shelf) {
|
|
34
|
+
return (_jsxs("div", { className: "grid min-w-0 gap-3", children: [_jsx(ShelfCards, { cards: shelf.cards, columns: 3 }), shelf.more] }));
|
|
35
|
+
}
|
|
24
36
|
if (shelf.view === "rows") {
|
|
25
37
|
return (_jsx(Card, { className: "gap-0 overflow-hidden py-0", render: _jsx("ul", {}), children: shelf.templates.map((template, index) => (_jsx("li", { className: "not-last:border-b not-last:border-border", children: template }, template.key ?? index))) }));
|
|
26
38
|
}
|
|
27
|
-
return
|
|
39
|
+
return _jsx(ShelfCards, { cards: shelf.templates, columns: shelf.columns });
|
|
28
40
|
}
|
|
29
41
|
/**
|
|
30
42
|
* A Library shelf: the one line saying what it holds, the search, then the
|
|
31
43
|
* reusable things a person adds, as two-column entries, or Agent template cards or rows.
|
|
32
44
|
*
|
|
33
45
|
* @family Compositions
|
|
34
|
-
* @when A gallery of reusable things a person adds, as Vercel's Templates gallery: the Portal's Agent templates, Nadia's New Agent gallery.
|
|
46
|
+
* @when A gallery of reusable things a person adds, as Vercel's Templates gallery: the Portal's Agent templates, Nadia's New Agent gallery; or a catalogue of cards, as Vercel's Browse Connectors: Nadia's Browse apps (`cards`).
|
|
35
47
|
* @instead The Portal's Skills and Plugins are entity rows a person finds, opens and adds, a CollectionPage; records a person already has and acts on are a CollectionPage too; choosing from a catalogue without leaving the page is a CatalogDrawer.
|
|
36
|
-
* @behaviour The definition line only where the page has no title row to stand under (a titled page follows the title with the search, as every collection does). Shows, the first that holds: the failure; still entries while the shelf loads; noMatch while the search finds nothing; empty when the shelf holds nothing; then each section's title over its entries, two to a row from md, or the templates as cards, three to a row or as `columns` says, or as one list of rows with `view="rows"
|
|
48
|
+
* @behaviour The definition line only where the page has no title row to stand under (a titled page follows the title with the search, as every collection does). Shows, the first that holds: the failure; still entries while the shelf loads; noMatch while the search finds nothing; empty when the shelf holds nothing; then each section's title over its entries, two to a row from md, or the templates as cards, three to a row or as `columns` says, or as one list of rows with `view="rows"`, or the cards, three to a row, with `more` under them. Each entry has its kind's tile, its name (the link to its page), one line, one fact, one Add control or the word saying it is already added, then its menu. A failed add puts its message in the entry's line and its next steps beside its controls. The search shows unless the shelf is empty, with `searchEnd` at the end of its row.
|
|
37
49
|
* @words The product words every string: the optional definition (one sentence on what the shelf holds), the search's label ("Search skills"), the loading label, each entry's name, line, Add label and added word, the empty, noMatch and failed messages.
|
|
38
50
|
* @access Each section is a region named by its h2; entries are list items; loading is a status named by loadingLabel and aria-busy; a failed add is announced as an alert; each entry's menu is named by its label.
|
|
39
51
|
*/
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
+
import type { RowData } from "@tanstack/react-table";
|
|
1
2
|
import type { ComponentProps, ReactNode } from "react";
|
|
3
|
+
import { type IdentityMarkProps } from "./identity-mark.js";
|
|
2
4
|
import type { CopyButtonProps } from "./copy-button.js";
|
|
3
5
|
import { type ObjectFact } from "./object-workspace.js";
|
|
4
6
|
import { type PageCommand } from "./page-actions.js";
|
|
7
|
+
import { type RecordListProps } from "./record-list.js";
|
|
8
|
+
import { type StepCardsProps } from "./step-cards.js";
|
|
5
9
|
import { SheetContent } from "./sheet.js";
|
|
6
|
-
export type RecordSheetProps = {
|
|
10
|
+
export type RecordSheetProps<THeld extends RowData = never, THeldCommand extends string = never> = {
|
|
7
11
|
open: boolean;
|
|
8
12
|
onOpenChange: (open: boolean) => void;
|
|
9
13
|
/** Names the record: "invoice.payment_failed". */
|
|
10
14
|
title: string;
|
|
15
|
+
/** The record's mark beside its name, as its row draws it. */
|
|
16
|
+
mark?: IdentityMarkProps;
|
|
11
17
|
/** One muted line: "Beta Studio · Oct 13, 14:02". */
|
|
12
18
|
description?: ReactNode;
|
|
13
19
|
closeLabel: string;
|
|
@@ -17,6 +23,13 @@ export type RecordSheetProps = {
|
|
|
17
23
|
label: string;
|
|
18
24
|
value: string;
|
|
19
25
|
} & Pick<CopyButtonProps, "copyLabel" | "copiedLabel" | "copyFailedLabel">;
|
|
26
|
+
/**
|
|
27
|
+
* The few records this record holds, each managed on its own: an app's accounts. A `RecordList`
|
|
28
|
+
* with its `heading`, whose actions add one, and each row's commands.
|
|
29
|
+
*/
|
|
30
|
+
held?: RecordListProps<THeld, THeldCommand>;
|
|
31
|
+
/** The record's setup in numbered steps, in the body, in place of its facts: connecting an app. */
|
|
32
|
+
steps?: StepCardsProps;
|
|
20
33
|
/** The way to the record's owner: "Open Beta Studio". */
|
|
21
34
|
footer?: PageCommand;
|
|
22
35
|
/** The row it opened from, which takes focus back on Close. */
|
|
@@ -26,11 +39,11 @@ export type RecordSheetProps = {
|
|
|
26
39
|
* One record from a list, looked at in a sheet at the right edge, then back to the list.
|
|
27
40
|
*
|
|
28
41
|
* @family Compositions
|
|
29
|
-
* @when A list's record holds more than its row shows and is only read, not changed: a Stripe event in Billing, a usage row.
|
|
30
|
-
* @instead A record changed from its list edits in its row with `RowEditForm`; a record with sections and commands of its own has its own page, an `ObjectPage`; a choice from a catalogue is a `CatalogDrawer`.
|
|
31
|
-
* @behaviour Opens from the right as an inset card 12 px from the window's edges with 16 px corners, the list still behind it and usable. It is 420 px wide from 640 px, 512 px from 1024 px (the sheet's own width), and the window less its margins below 640 px. The header holds the record's name, one muted line and Close; the body scrolls through its facts as labelled values, then the read-only payload with its copy button; the footer holds one command to the record's owner. A press outside does not close it. It has no states of its own: it opens only on a record.
|
|
42
|
+
* @when A list's record holds more than its row shows and is only read, not changed: a Stripe event in Billing, a usage row. Or it holds a few records of its own that a person manages one by one, beside the list: an app's accounts in Nadia's Apps, each connected, renamed, reconnected or disconnected from its row in the sheet (`held`).
|
|
43
|
+
* @instead A record changed from its list edits in its row with `RowEditForm`; a record with sections and commands of its own beyond the records it holds has its own page, an `ObjectPage`; a choice from a catalogue is a `CatalogDrawer`.
|
|
44
|
+
* @behaviour Opens from the right as an inset card 12 px from the window's edges with 16 px corners, the list still behind it and, while it is only read, usable. It is 420 px wide from 640 px, 512 px from 1024 px (the sheet's own width), and the window less its margins below 640 px; one that holds records or a setup is 640 px from 1024 px, as Vercel's Add Connection is about that wide, so each held record's row stands on one line with its status and its commands, and it dims the page behind it and owns the screen while it is open. The header holds the record's mark at 40 beside its name, one muted line and Close; the body scrolls through its facts as labelled values, then the read-only payload with its copy button, then its setup as `StepCards`, then the records it holds as a `RecordList` under its heading, whose actions add one and whose rows carry their own status and commands; the footer holds one command to the record's owner. A press outside does not close it. It has no states of its own: it opens only on a record.
|
|
32
45
|
* @words The title is the record's own name, as its row shows it. The footer's command names where it goes: "Open Beta Studio".
|
|
33
|
-
* @access A dialog named by its title, not `modal
|
|
46
|
+
* @access A dialog named by its title, not `modal` while it is only read: no scrim, and focus stays inside it; `modal`, with the scrim, while it holds records or a setup. Escape and Close close it. Focus returns to the row it opened from (`finalFocus`) after every close but a mouse, touch or pen one, as `Sheet` does by default; a caller that passes its own `finalFocus` decides. The payload is a read-only text area named by its label.
|
|
34
47
|
*/
|
|
35
|
-
export declare function RecordSheet({ open, onOpenChange, title, description, closeLabel, facts, code, footer, finalFocus, }: RecordSheetProps): import("react").JSX.Element;
|
|
48
|
+
export declare function RecordSheet<THeld extends RowData = never, THeldCommand extends string = never>({ open, onOpenChange, title, mark, description, closeLabel, facts, code, held, steps, footer, finalFocus, }: RecordSheetProps<THeld, THeldCommand>): import("react").JSX.Element;
|
|
36
49
|
//# sourceMappingURL=record-sheet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-sheet.d.ts","sourceRoot":"","sources":["../../src/components/record-sheet.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"record-sheet.d.ts","sourceRoot":"","sources":["../../src/components/record-sheet.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvD,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAClF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,2BAA2B,CAAC;AAChF,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAEL,YAAY,EAKb,MAAM,oBAAoB,CAAC;AAE5B,MAAM,MAAM,gBAAgB,CAAC,KAAK,SAAS,OAAO,GAAG,KAAK,EAAE,YAAY,SAAS,MAAM,GAAG,KAAK,IAAI;IACjG,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,qDAAqD;IACrD,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;IAC7B,kFAAkF;IAClF,IAAI,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAC5C,eAAe,EACf,WAAW,GAAG,aAAa,GAAG,iBAAiB,CAChD,CAAC;IACF;;;OAGG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;IAC5C,mGAAmG;IACnG,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,yDAAyD;IACzD,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,+DAA+D;IAC/D,UAAU,CAAC,EAAE,cAAc,CAAC,OAAO,YAAY,CAAC,CAAC,YAAY,CAAC,CAAC;CAChE,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,KAAK,SAAS,OAAO,GAAG,KAAK,EAAE,YAAY,SAAS,MAAM,GAAG,KAAK,EAAE,EAC9F,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,IAAI,EACJ,WAAW,EACX,UAAU,EACV,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,MAAM,EACN,UAAU,GACX,EAAE,gBAAgB,CAAC,KAAK,EAAE,YAAY,CAAC,+BA8CvC"}
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { CodeBlock } from "./code-block.js";
|
|
4
|
+
import { cn } from "../lib/utils.js";
|
|
5
|
+
import { IdentityMark } from "./identity-mark.js";
|
|
4
6
|
import { ObjectFacts } from "./object-workspace.js";
|
|
5
7
|
import { PageCommandButton } from "./page-actions.js";
|
|
8
|
+
import { RecordList } from "./record-list.js";
|
|
9
|
+
import { StepCards } from "./step-cards.js";
|
|
6
10
|
import { Sheet, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, } from "./sheet.js";
|
|
7
11
|
/**
|
|
8
12
|
* One record from a list, looked at in a sheet at the right edge, then back to the list.
|
|
9
13
|
*
|
|
10
14
|
* @family Compositions
|
|
11
|
-
* @when A list's record holds more than its row shows and is only read, not changed: a Stripe event in Billing, a usage row.
|
|
12
|
-
* @instead A record changed from its list edits in its row with `RowEditForm`; a record with sections and commands of its own has its own page, an `ObjectPage`; a choice from a catalogue is a `CatalogDrawer`.
|
|
13
|
-
* @behaviour Opens from the right as an inset card 12 px from the window's edges with 16 px corners, the list still behind it and usable. It is 420 px wide from 640 px, 512 px from 1024 px (the sheet's own width), and the window less its margins below 640 px. The header holds the record's name, one muted line and Close; the body scrolls through its facts as labelled values, then the read-only payload with its copy button; the footer holds one command to the record's owner. A press outside does not close it. It has no states of its own: it opens only on a record.
|
|
15
|
+
* @when A list's record holds more than its row shows and is only read, not changed: a Stripe event in Billing, a usage row. Or it holds a few records of its own that a person manages one by one, beside the list: an app's accounts in Nadia's Apps, each connected, renamed, reconnected or disconnected from its row in the sheet (`held`).
|
|
16
|
+
* @instead A record changed from its list edits in its row with `RowEditForm`; a record with sections and commands of its own beyond the records it holds has its own page, an `ObjectPage`; a choice from a catalogue is a `CatalogDrawer`.
|
|
17
|
+
* @behaviour Opens from the right as an inset card 12 px from the window's edges with 16 px corners, the list still behind it and, while it is only read, usable. It is 420 px wide from 640 px, 512 px from 1024 px (the sheet's own width), and the window less its margins below 640 px; one that holds records or a setup is 640 px from 1024 px, as Vercel's Add Connection is about that wide, so each held record's row stands on one line with its status and its commands, and it dims the page behind it and owns the screen while it is open. The header holds the record's mark at 40 beside its name, one muted line and Close; the body scrolls through its facts as labelled values, then the read-only payload with its copy button, then its setup as `StepCards`, then the records it holds as a `RecordList` under its heading, whose actions add one and whose rows carry their own status and commands; the footer holds one command to the record's owner. A press outside does not close it. It has no states of its own: it opens only on a record.
|
|
14
18
|
* @words The title is the record's own name, as its row shows it. The footer's command names where it goes: "Open Beta Studio".
|
|
15
|
-
* @access A dialog named by its title, not `modal
|
|
19
|
+
* @access A dialog named by its title, not `modal` while it is only read: no scrim, and focus stays inside it; `modal`, with the scrim, while it holds records or a setup. Escape and Close close it. Focus returns to the row it opened from (`finalFocus`) after every close but a mouse, touch or pen one, as `Sheet` does by default; a caller that passes its own `finalFocus` decides. The payload is a read-only text area named by its label.
|
|
16
20
|
*/
|
|
17
|
-
export function RecordSheet({ open, onOpenChange, title, description, closeLabel, facts, code, footer, finalFocus, }) {
|
|
18
|
-
|
|
21
|
+
export function RecordSheet({ open, onOpenChange, title, mark, description, closeLabel, facts, code, held, steps, footer, finalFocus, }) {
|
|
22
|
+
const managed = held !== undefined || steps !== undefined;
|
|
23
|
+
return (_jsx(Sheet, { modal: managed, onOpenChange: onOpenChange, open: open, children: _jsxs(SheetContent, { className: cn("max-sm:data-[side=right]:left-nadicode-sm max-sm:data-[side=right]:w-auto data-[side=right]:sm:w-[420px] data-[side=right]:sm:max-w-[calc(100%-var(--nc-lg))]", managed && "data-[side=right]:lg:w-[640px]"), closeLabel: closeLabel, finalFocus: finalFocus, side: "right", children: [_jsxs(SheetHeader, { className: "flex-row items-center gap-nadicode-sm pr-12", children: [mark ? _jsx(IdentityMark, { ...mark, size: 40 }) : null, _jsxs("div", { className: "grid min-w-0 gap-1", children: [_jsx(SheetTitle, { className: "wrap-break-word", children: title }), description ? _jsx(SheetDescription, { children: description }) : null] })] }), _jsxs("div", { className: "grid min-h-0 flex-1 grid-cols-[minmax(0,1fr)] content-start gap-nadicode-md overflow-y-auto px-nadicode-lg pb-nadicode-lg", "data-slot": "record-sheet-body", children: [facts.length > 0 ? _jsx(ObjectFacts, { facts: facts }) : null, steps ? _jsx(StepCards, { ...steps }) : null, code ? (_jsx(CodeBlock, { code: code.value, copiedLabel: code.copiedLabel, copyFailedLabel: code.copyFailedLabel, copyLabel: code.copyLabel, label: code.label })) : null, held ? _jsx(RecordList, { ...held }) : null] }), footer ? (_jsx(SheetFooter, { className: "flex-row justify-end", "data-slot": "record-sheet-footer", children: _jsx(PageCommandButton, { command: footer, variant: "outline" }) })) : null] }) }));
|
|
19
24
|
}
|
|
@@ -29,8 +29,10 @@ type SheetProps = Omit<SheetPrimitive.Root.Props, "modal" | "disablePointerDismi
|
|
|
29
29
|
* "Outside-click does not auto-close, so always render an explicit close affordance and honor Escape." (https://vercel.com/geist/sheet)
|
|
30
30
|
* Ours: `modal` dims the page and blocks it, for a sheet that owns the screen, and `noOverlay` on
|
|
31
31
|
* its content drops the scrim again. An inset card with 16 px corners, 12 px from the window's
|
|
32
|
-
* edges
|
|
33
|
-
*
|
|
32
|
+
* edges and 12 px below the band where a desktop window draws its own controls over the page
|
|
33
|
+
* (`env(titlebar-area-height)`), so its Close never stands under the window's; a side panel owns its width, 512 px from 1024 px and the window less its margins
|
|
34
|
+
* below it, and only `RecordSheet` changes it: 420 px between 640 and 1024 px, and 640 px from 1024 px while it
|
|
35
|
+
* holds records of its own or a setup. A given kind of sheet always opens on the
|
|
34
36
|
* same side. A press outside never closes it, Escape does, except the phone navigation, which
|
|
35
37
|
* `closesOnScrimPress` closes on a press on its scrim. The body scrolls between a header and a
|
|
36
38
|
* footer with its actions at the trailing edge, as Vercel's drawers (Production Checklist): the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../src/components/sheet.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAUjE,KAAK,UAAU,GAAG,IAAI,CACpB,cAAc,CAAC,IAAI,CAAC,KAAK,EACzB,OAAO,GAAG,yBAAyB,GAAG,aAAa,CACpD,GAAG;IACF;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../src/components/sheet.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAUjE,KAAK,UAAU,GAAG,IAAI,CACpB,cAAc,CAAC,IAAI,CAAC,KAAK,EACzB,OAAO,GAAG,yBAAyB,GAAG,aAAa,CACpD,GAAG;IACF;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,iBAAS,KAAK,CAAC,EAAE,KAAa,EAAE,kBAA0B,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,qBAWjF;AAED,iBAAS,YAAY,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,OAAO,CAAC,KAAK,qBAE/D;AAED,iBAAS,UAAU,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,KAAK,qBAE3D;AAsBD,KAAK,iBAAiB,GAAG,cAAc,CAAC,KAAK,CAAC,KAAK,GAAG;IACpD,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C,mDAAmD;IACnD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,yEAAyE;IACzE,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,QAAQ,EACR,IAAc,EACd,SAAiB,EACjB,UAAU,EACV,UAAqC,EACrC,GAAG,KAAK,EACT,EAAE,iBAAiB,qBAkCnB;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBASxE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAYxE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,KAAK,qBAStE;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,WAAW,CAAC,KAAK,qBASlF;AAED,OAAO,EACL,KAAK,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,WAAW,EACX,WAAW,EACX,UAAU,EACV,gBAAgB,GACjB,CAAC"}
|
package/dist/components/sheet.js
CHANGED
|
@@ -25,8 +25,10 @@ const SheetModalContext = React.createContext(false);
|
|
|
25
25
|
* "Outside-click does not auto-close, so always render an explicit close affordance and honor Escape." (https://vercel.com/geist/sheet)
|
|
26
26
|
* Ours: `modal` dims the page and blocks it, for a sheet that owns the screen, and `noOverlay` on
|
|
27
27
|
* its content drops the scrim again. An inset card with 16 px corners, 12 px from the window's
|
|
28
|
-
* edges
|
|
29
|
-
*
|
|
28
|
+
* edges and 12 px below the band where a desktop window draws its own controls over the page
|
|
29
|
+
* (`env(titlebar-area-height)`), so its Close never stands under the window's; a side panel owns its width, 512 px from 1024 px and the window less its margins
|
|
30
|
+
* below it, and only `RecordSheet` changes it: 420 px between 640 and 1024 px, and 640 px from 1024 px while it
|
|
31
|
+
* holds records of its own or a setup. A given kind of sheet always opens on the
|
|
30
32
|
* same side. A press outside never closes it, Escape does, except the phone navigation, which
|
|
31
33
|
* `closesOnScrimPress` closes on a press on its scrim. The body scrolls between a header and a
|
|
32
34
|
* footer with its actions at the trailing edge, as Vercel's drawers (Production Checklist): the
|
|
@@ -61,7 +63,7 @@ function SheetOverlay({ className, ...props }) {
|
|
|
61
63
|
}
|
|
62
64
|
function SheetContent({ className, children, side = "right", noOverlay = false, closeLabel, finalFocus = returnFocusUnlessPointer, ...props }) {
|
|
63
65
|
const modal = React.useContext(SheetModalContext);
|
|
64
|
-
return (_jsxs(SheetPortal, { children: [modal && !noOverlay ? _jsx(SheetOverlay, {}) : null, _jsxs(SheetPrimitive.Popup, { "data-slot": "sheet-content", "data-nc-ui": "", finalFocus: finalFocus, "data-side": side, className: cn("pointer-events-auto", "fixed z-50 flex max-h-[calc(100%-var(--nc-lg))] flex-col gap-nadicode-md rounded-xl border-0 bg-popover bg-clip-padding text-sm text-popover-foreground nc-elevation-modal transition-[opacity,translate] duration-(--nc-duration-close) ease-(--nc-ease-out-strong) data-open:duration-(--nc-duration-open) data-ending-style:opacity-0 data-starting-style:opacity-0 motion-reduce:transition-opacity data-[side=bottom]:inset-x-nadicode-sm data-[side=bottom]:bottom-nadicode-sm data-[side=bottom]:h-auto data-[side=bottom]:data-ending-style:translate-y-nadicode-md data-[side=bottom]:data-starting-style:translate-y-nadicode-md motion-reduce:data-[side=bottom]:data-ending-style:translate-none motion-reduce:data-[side=bottom]:data-starting-style:translate-none data-[side=left]:
|
|
66
|
+
return (_jsxs(SheetPortal, { children: [modal && !noOverlay ? _jsx(SheetOverlay, {}) : null, _jsxs(SheetPrimitive.Popup, { "data-slot": "sheet-content", "data-nc-ui": "", finalFocus: finalFocus, "data-side": side, className: cn("pointer-events-auto", "fixed z-50 flex max-h-[calc(100%-var(--nc-lg)-env(titlebar-area-height,0px))] flex-col gap-nadicode-md rounded-xl border-0 bg-popover bg-clip-padding text-sm text-popover-foreground nc-elevation-modal transition-[opacity,translate] duration-(--nc-duration-close) ease-(--nc-ease-out-strong) data-open:duration-(--nc-duration-open) data-ending-style:opacity-0 data-starting-style:opacity-0 motion-reduce:transition-opacity data-[side=bottom]:inset-x-nadicode-sm data-[side=bottom]:bottom-nadicode-sm data-[side=bottom]:h-auto data-[side=bottom]:data-ending-style:translate-y-nadicode-md data-[side=bottom]:data-starting-style:translate-y-nadicode-md motion-reduce:data-[side=bottom]:data-ending-style:translate-none motion-reduce:data-[side=bottom]:data-starting-style:translate-none data-[side=left]:top-[calc(env(titlebar-area-height,0px)+var(--nc-sm))] data-[side=left]:bottom-nadicode-sm data-[side=left]:left-nadicode-sm data-[side=left]:w-[calc(100%-var(--nc-lg))] data-[side=left]:data-ending-style:-translate-x-nadicode-md data-[side=left]:data-starting-style:-translate-x-nadicode-md motion-reduce:data-[side=left]:data-ending-style:translate-none motion-reduce:data-[side=left]:data-starting-style:translate-none data-[side=right]:top-[calc(env(titlebar-area-height,0px)+var(--nc-sm))] data-[side=right]:bottom-nadicode-sm data-[side=right]:right-nadicode-sm data-[side=right]:w-[calc(100%-var(--nc-lg))] data-[side=right]:data-ending-style:translate-x-nadicode-md data-[side=right]:data-starting-style:translate-x-nadicode-md motion-reduce:data-[side=right]:data-ending-style:translate-none motion-reduce:data-[side=right]:data-starting-style:translate-none data-[side=top]:inset-x-nadicode-sm data-[side=top]:top-[calc(env(titlebar-area-height,0px)+var(--nc-sm))] data-[side=top]:h-auto data-[side=top]:data-ending-style:-translate-y-nadicode-md data-[side=top]:data-starting-style:-translate-y-nadicode-md motion-reduce:data-[side=top]:data-ending-style:translate-none motion-reduce:data-[side=top]:data-starting-style:translate-none data-[side=left]:lg:w-[512px] data-[side=right]:lg:w-[512px]", className), ...props, children: [children, _jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", render: _jsx(Button, { "aria-label": closeLabel, variant: "ghost", className: "absolute top-nadicode-md right-nadicode-md", size: "icon-sm" }), children: _jsx(XIcon, {}) })] })] }));
|
|
65
67
|
}
|
|
66
68
|
function SheetHeader({ className, ...props }) {
|
|
67
69
|
return (_jsx("div", { "data-slot": "sheet-header", "data-nc-ui": "", className: cn("flex flex-col gap-1 p-nadicode-lg", className), ...props }));
|
|
@@ -6,6 +6,8 @@ export type SidebarSection<Id extends string> = PageCommandAction & {
|
|
|
6
6
|
icon: IconComponent;
|
|
7
7
|
/** The heading over this section and the ones after it, until another section names its own: "Account", "Platform settings". */
|
|
8
8
|
group?: string;
|
|
9
|
+
/** How many things the section holds, at the row's end, as Vercel's Browse Connectors counts each category. */
|
|
10
|
+
count?: number;
|
|
9
11
|
};
|
|
10
12
|
export type SidebarSectionsProps<Id extends string> = {
|
|
11
13
|
/** The way back: "Agents", "Customers", "Back to workspace". */
|
|
@@ -34,7 +36,7 @@ export type SidebarSectionsProps<Id extends string> = {
|
|
|
34
36
|
* The sidebar swapped to one object or one area: the way back, what you are in, and its sections.
|
|
35
37
|
*
|
|
36
38
|
* @family Navigation
|
|
37
|
-
* @when Inside an object, the same sidebar column shows these instead of the places: an Installation's sections in the Portal, Nadia's Edit and Settings sections. Inside an area whose pages are siblings a person moves between, the area's sub-menu without `identity`, as Vercel's Settings: the Portal's Settings, Company, Library and Account. The row that opens an area ends in `SidebarMenuChevron`; a row that only opens a page has none. Required: the way back and the nav's `label`; every section has an icon.
|
|
39
|
+
* @when Inside an object, the same sidebar column shows these instead of the places: an Installation's sections in the Portal, Nadia's Edit and Settings sections. Inside an area whose pages are siblings a person moves between, the area's sub-menu without `identity`, as Vercel's Settings: the Portal's Settings, Company, Library and Account. A catalogue long enough to be browsed by category takes this sub-menu too, one section a category with its `count`, as Vercel's Browse Connectors does: Nadia's Browse apps. The row that opens an area ends in `SidebarMenuChevron`; a row that only opens a page has none. Required: the way back and the nav's `label`; every section has an icon.
|
|
38
40
|
* @instead The places a person can go are the sidebar's own groups; a settings page that does not swap the column is a SettingsPage. Never a second column beside the first. “Tabs imply the views share scope, URL parent, and data model” (https://vercel.com/geist/tabs) Ours: an area whose pages hold different objects, with different lists and different ways to add, is this sub-menu, as Vercel's AI Gateway is; a destination whose pages are views of one reading keeps its Tabs, as Vercel's Analytics and OpenRouter's Activity do (the Portal's Analytics). An object's sections under the top bar are a `TabsNav` band.
|
|
39
41
|
* @behaviour With `identity`: a back arrow row, then what you are in, then the sections. Without it, as Vercel's sub-menu: one row with a ‹ at its start and the area's name centred, then the sections as words alone. The back row returns to where the person came from and is disabled while leaving is blocked. One section is current and takes the selection fill; the rest stay neutral. A section that sets `group` opens a labelled group that holds the sections after it until another names its own; the label and the gap tell groups apart, never a rule. Narrow, the identity, the area's name and the labels leave, and each row keeps its icon with its name in a tooltip.
|
|
40
42
|
* @words The back row names where it goes ("Agents", "Back to workspace"); the identity is the object's own name; an area's `label` is its sidebar row's word ("Settings", "Company"); a group heading names the kind of settings ("Account"), in sentence case; sections are nouns ("Skills", "Members").
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar-sections.d.ts","sourceRoot":"","sources":["../../src/components/sidebar-sections.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,iBAAiB,EACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"sidebar-sections.d.ts","sourceRoot":"","sources":["../../src/components/sidebar-sections.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,iBAAiB,EACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAUnE,MAAM,MAAM,cAAc,CAAC,EAAE,SAAS,MAAM,IAAI,iBAAiB,GAAG;IAClE,EAAE,EAAE,EAAE,CAAC;IACP,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,aAAa,CAAC;IACpB,gIAAgI;IAChI,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+GAA+G;IAC/G,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,oBAAoB,CAAC,EAAE,SAAS,MAAM,IAAI;IACpD,gEAAgE;IAChE,IAAI,EAAE,iBAAiB,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAChE;;;;OAIG;IACH,QAAQ,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACvE,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,cAAc,CAAC,EAAE,CAAC,EAAE,CAAC;IACxC,OAAO,EAAE,EAAE,CAAC;IACZ,kEAAkE;IAClE,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AA2BF;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,EACjD,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,KAAK,EACL,MAAc,EACd,QAAQ,GACT,EAAE,oBAAoB,CAAC,EAAE,CAAC,+BA2E1B"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ArrowLeft, ChevronLeft } from "lucide-react";
|
|
4
4
|
import { IdentityMark, } from "./identity-mark.js";
|
|
5
|
-
import { SidebarGroupLabel, SidebarMenu, SidebarMenuButton, SidebarMenuItem, } from "./sidebar.js";
|
|
5
|
+
import { SidebarGroupLabel, SidebarMenu, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, } from "./sidebar.js";
|
|
6
6
|
import { cn } from "../lib/utils.js";
|
|
7
7
|
function groupSections(sections) {
|
|
8
8
|
const groups = [];
|
|
@@ -32,7 +32,7 @@ function actionProps(action, disabled = false) {
|
|
|
32
32
|
* The sidebar swapped to one object or one area: the way back, what you are in, and its sections.
|
|
33
33
|
*
|
|
34
34
|
* @family Navigation
|
|
35
|
-
* @when Inside an object, the same sidebar column shows these instead of the places: an Installation's sections in the Portal, Nadia's Edit and Settings sections. Inside an area whose pages are siblings a person moves between, the area's sub-menu without `identity`, as Vercel's Settings: the Portal's Settings, Company, Library and Account. The row that opens an area ends in `SidebarMenuChevron`; a row that only opens a page has none. Required: the way back and the nav's `label`; every section has an icon.
|
|
35
|
+
* @when Inside an object, the same sidebar column shows these instead of the places: an Installation's sections in the Portal, Nadia's Edit and Settings sections. Inside an area whose pages are siblings a person moves between, the area's sub-menu without `identity`, as Vercel's Settings: the Portal's Settings, Company, Library and Account. A catalogue long enough to be browsed by category takes this sub-menu too, one section a category with its `count`, as Vercel's Browse Connectors does: Nadia's Browse apps. The row that opens an area ends in `SidebarMenuChevron`; a row that only opens a page has none. Required: the way back and the nav's `label`; every section has an icon.
|
|
36
36
|
* @instead The places a person can go are the sidebar's own groups; a settings page that does not swap the column is a SettingsPage. Never a second column beside the first. “Tabs imply the views share scope, URL parent, and data model” (https://vercel.com/geist/tabs) Ours: an area whose pages hold different objects, with different lists and different ways to add, is this sub-menu, as Vercel's AI Gateway is; a destination whose pages are views of one reading keeps its Tabs, as Vercel's Analytics and OpenRouter's Activity do (the Portal's Analytics). An object's sections under the top bar are a `TabsNav` band.
|
|
37
37
|
* @behaviour With `identity`: a back arrow row, then what you are in, then the sections. Without it, as Vercel's sub-menu: one row with a ‹ at its start and the area's name centred, then the sections as words alone. The back row returns to where the person came from and is disabled while leaving is blocked. One section is current and takes the selection fill; the rest stay neutral. A section that sets `group` opens a labelled group that holds the sections after it until another names its own; the label and the gap tell groups apart, never a rule. Narrow, the identity, the area's name and the labels leave, and each row keeps its icon with its name in a tooltip.
|
|
38
38
|
* @words The back row names where it goes ("Agents", "Back to workspace"); the identity is the object's own name; an area's `label` is its sidebar row's word ("Settings", "Company"); a group heading names the kind of settings ("Account"), in sentence case; sections are nouns ("Skills", "Members").
|
|
@@ -45,6 +45,6 @@ export function SidebarSections({ back, current, identity, label, narrow = false
|
|
|
45
45
|
return (_jsxs("div", { className: "grid w-full gap-2", "data-slot": "sidebar-sections", children: [_jsx(SidebarMenu, { children: _jsxs(SidebarMenuItem, { children: [_jsxs(SidebarMenuButton, { className: row, tooltip: back.label, ...actionProps(back, back.disabled), children: [submenu ? _jsx(ChevronLeft, { "aria-hidden": "true" }) : _jsx(ArrowLeft, { "aria-hidden": "true" }), _jsx("span", { className: submenu ? "sr-only" : words, children: back.label })] }), submenu && !narrow ? (_jsx("span", { className: "pointer-events-none absolute inset-x-8 top-1/2 -translate-y-1/2 truncate text-center text-sm font-medium text-sidebar-foreground", "data-slot": "sidebar-sections-title", children: label })) : null] }) }), narrow || !identity ? null : (_jsxs("div", { className: "flex min-w-0 items-center gap-2 px-2 pt-2 text-sm", "data-slot": "sidebar-sections-identity", children: [identity.mark ? _jsx(IdentityMark, { ...identity.mark, size: 24 }) : null, _jsxs("span", { className: "grid min-w-0", children: [_jsx("span", { className: "truncate font-medium text-sidebar-foreground", children: identity.name }), identity.detail ? (_jsx("span", { className: "truncate text-xs text-muted-foreground", children: identity.detail })) : null] })] })), _jsx("nav", { "aria-label": label, className: "grid gap-2", children: groupSections(sections).map((group) => (_jsxs("div", { className: "grid gap-1", "data-slot": "sidebar-sections-group", children: [group.label && !narrow ? _jsx(SidebarGroupLabel, { children: group.label }) : null, _jsx(SidebarMenu, { children: group.sections.map((section) => {
|
|
46
46
|
const Icon = section.icon;
|
|
47
47
|
const isCurrent = section.id === current;
|
|
48
|
-
return (
|
|
48
|
+
return (_jsxs(SidebarMenuItem, { children: [_jsxs(SidebarMenuButton, { "aria-current": isCurrent ? "page" : undefined, className: row, isActive: isCurrent, tooltip: section.label, ...actionProps(section), children: [submenu && !narrow ? null : _jsx(Icon, { "aria-hidden": "true" }), _jsx("span", { className: words, children: section.label })] }), section.count === undefined || narrow ? null : (_jsx(SidebarMenuBadge, { className: "text-muted-foreground", children: section.count }))] }, section.id));
|
|
49
49
|
}) })] }, group.id))) })] }));
|
|
50
50
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type StepCard = {
|
|
3
|
+
id: string;
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
state: "done" | "current" | "upcoming";
|
|
6
|
+
/** What a done step settled, in its title's place: the app's mark and name. */
|
|
7
|
+
settled?: ReactNode;
|
|
8
|
+
/** The current step's own content; only the current step shows it. */
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
};
|
|
11
|
+
export type StepCardsProps = {
|
|
12
|
+
/** Names the list of steps: "Steps to connect Gmail". */
|
|
13
|
+
label: string;
|
|
14
|
+
steps: readonly StepCard[];
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* The steps of one setup, one numbered card each, inside its drawer, as Vercel's Add Connection
|
|
18
|
+
* draws them.
|
|
19
|
+
*
|
|
20
|
+
* @family Compositions
|
|
21
|
+
* @when A setup in a drawer whose steps a person should see ahead of them, with what each settled: connecting an app in Nadia, through `RecordSheet`'s `steps`.
|
|
22
|
+
* @instead A setup told as "Step 2 of 3" over the drawer's title is `FormDrawer` with `job="steps"`. Steps a person does in any order, each done elsewhere, are a `ProgressChecklist`.
|
|
23
|
+
* @behaviour One hairline card a step, in order, 12 px apart. The current one has a filled number and opens its content under its title. A done one shows what it settled in its title's place, or a check beside its title; one still to come is its muted number and title, with nothing under it. Only the current step ever holds controls.
|
|
24
|
+
* @words Each title names the step in a word or two: "Name", "Sign in". A done step says what was settled: the app, the account's name.
|
|
25
|
+
* @access An ordered list named by `label`, the current step marked `aria-current="step"`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function StepCards({ label, steps }: StepCardsProps): import("react").JSX.Element;
|
|
28
|
+
//# sourceMappingURL=step-cards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-cards.d.ts","sourceRoot":"","sources":["../../src/components/step-cards.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC;IACvC,+EAA+E;IAC/E,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,QAAQ,EAAE,CAAC;CAC5B,CAAC;AAgBF;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,cAAc,+BAgCzD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { CheckIcon } from "lucide-react";
|
|
4
|
+
import { cn } from "../lib/utils.js";
|
|
5
|
+
function StepNumber({ number, state }) {
|
|
6
|
+
return (_jsx("span", { "aria-hidden": "true", className: cn("grid size-5 shrink-0 place-items-center rounded-full text-xs font-medium tabular-nums", state === "current" ? "bg-foreground text-background" : "bg-muted text-muted-foreground"), children: state === "done" ? _jsx(CheckIcon, { className: "size-3" }) : number }));
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The steps of one setup, one numbered card each, inside its drawer, as Vercel's Add Connection
|
|
10
|
+
* draws them.
|
|
11
|
+
*
|
|
12
|
+
* @family Compositions
|
|
13
|
+
* @when A setup in a drawer whose steps a person should see ahead of them, with what each settled: connecting an app in Nadia, through `RecordSheet`'s `steps`.
|
|
14
|
+
* @instead A setup told as "Step 2 of 3" over the drawer's title is `FormDrawer` with `job="steps"`. Steps a person does in any order, each done elsewhere, are a `ProgressChecklist`.
|
|
15
|
+
* @behaviour One hairline card a step, in order, 12 px apart. The current one has a filled number and opens its content under its title. A done one shows what it settled in its title's place, or a check beside its title; one still to come is its muted number and title, with nothing under it. Only the current step ever holds controls.
|
|
16
|
+
* @words Each title names the step in a word or two: "Name", "Sign in". A done step says what was settled: the app, the account's name.
|
|
17
|
+
* @access An ordered list named by `label`, the current step marked `aria-current="step"`.
|
|
18
|
+
*/
|
|
19
|
+
export function StepCards({ label, steps }) {
|
|
20
|
+
return (_jsx("ol", { "aria-label": label, className: "grid gap-nadicode-sm", "data-slot": "step-cards", children: steps.map((step, index) => (_jsxs("li", { "aria-current": step.state === "current" ? "step" : undefined, className: "rounded-sm border border-border", "data-slot": "step-card", "data-state": step.state, children: [_jsx("div", { className: "flex min-h-14 items-center gap-nadicode-sm px-nadicode-md py-nadicode-sm text-body-md font-medium", children: step.state === "done" && step.settled ? (step.settled) : (_jsxs(_Fragment, { children: [_jsx(StepNumber, { number: index + 1, state: step.state }), _jsx("span", { className: cn(step.state === "upcoming" && "text-muted-foreground"), children: step.title })] })) }), step.state === "current" && step.children ? (_jsx("div", { className: "grid gap-nadicode-md px-nadicode-md pb-nadicode-md", children: step.children })) : null] }, step.id))) }));
|
|
21
|
+
}
|
|
@@ -17,7 +17,11 @@ declare function OverviewPageSpecimen(): import("react").JSX.Element;
|
|
|
17
17
|
declare function RecordSheetSpecimen(): import("react").JSX.Element;
|
|
18
18
|
declare function RowEditFormSpecimen(): import("react").JSX.Element;
|
|
19
19
|
declare function SettingsSectionSpecimen(): import("react").JSX.Element;
|
|
20
|
+
declare function CatalogCardSpecimen(): import("react").JSX.Element;
|
|
21
|
+
declare function StepCardsSpecimen(): import("react").JSX.Element;
|
|
20
22
|
export declare const COMPOSITIONS: {
|
|
23
|
+
CatalogCard: typeof CatalogCardSpecimen;
|
|
24
|
+
StepCards: typeof StepCardsSpecimen;
|
|
21
25
|
ActivityFeed: typeof ActivityFeedSpecimen;
|
|
22
26
|
AgentProfileCard: typeof AgentProfileCardSpecimen;
|
|
23
27
|
CatalogDrawer: typeof CatalogDrawerSpecimen;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compositions.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/compositions.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compositions.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/compositions.tsx"],"names":[],"mappings":"AA0IA,iBAAS,oBAAoB,gCA+B5B;AAMD,iBAAS,wBAAwB,gCAahC;AAED,iBAAS,qBAAqB,gCA0B7B;AAED,iBAAS,yBAAyB,gCAGjC;AAwBD,iBAAS,mBAAmB,gCAoC3B;AAED,iBAAS,sBAAsB,gCAyD9B;AAED,iBAAS,yBAAyB,gCAUjC;AAED,iBAAS,qBAAqB,gCAwC7B;AAED,iBAAS,kBAAkB,gCAiB1B;AAED,iBAAS,oBAAoB,gCAS5B;AAED,iBAAS,kBAAkB,gCA0B1B;AAED,iBAAS,kBAAkB,gCAuE1B;AAED,iBAAS,kBAAkB,gCAwB1B;AAED,iBAAS,mBAAmB,gCA6B3B;AAED,iBAAS,oBAAoB,gCAkD5B;AAED,iBAAS,oBAAoB,gCAqC5B;AAED,iBAAS,mBAAmB,gCA2B3B;AAED,iBAAS,mBAAmB,gCAoB3B;AAwBD,iBAAS,uBAAuB,gCAkD/B;AAmCD,iBAAS,mBAAmB,gCAW3B;AAED,iBAAS,iBAAiB,gCAkBzB;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkGE,CAAC"}
|
|
@@ -9,6 +9,7 @@ import { AgentOrb } from "../../components/agent-orb.js";
|
|
|
9
9
|
import { AgentProfileCard } from "../../components/agent-profile.js";
|
|
10
10
|
import { BrandWordmark } from "../../components/brand.js";
|
|
11
11
|
import { Button } from "../../components/button.js";
|
|
12
|
+
import { CatalogCard } from "../../components/catalog-card.js";
|
|
12
13
|
import { CatalogDrawer } from "../../components/catalog-drawer.js";
|
|
13
14
|
import { useCatalogRows } from "../../components/catalog-row.js";
|
|
14
15
|
import { CollectionFilters } from "../../components/collection-filters.js";
|
|
@@ -31,6 +32,7 @@ import { PageActions, PageActionsHostProvider } from "../../components/page-acti
|
|
|
31
32
|
import { PageHeader } from "../../components/page-header.js";
|
|
32
33
|
import { RecordList } from "../../components/record-list.js";
|
|
33
34
|
import { RecordSheet } from "../../components/record-sheet.js";
|
|
35
|
+
import { StepCards } from "../../components/step-cards.js";
|
|
34
36
|
import { RowEditForm } from "../../components/row-edit-form.js";
|
|
35
37
|
import { SettingsField, SettingsSection } from "../../components/settings-section.js";
|
|
36
38
|
import { SettingsPage } from "../../components/settings-page.js";
|
|
@@ -446,7 +448,24 @@ const reconnectMenu = (mailbox) => ({
|
|
|
446
448
|
label: `More for ${mailbox.address}`,
|
|
447
449
|
commands: [{ label: "Reconnect", icon: _jsx(RefreshCw, {}), onClick: nothing }],
|
|
448
450
|
});
|
|
451
|
+
function CatalogCardSpecimen() {
|
|
452
|
+
return (_jsx("div", { className: "max-w-sm", children: _jsx(CatalogCard, { description: "Send, read and sort email from your Gmail accounts.", mark: { kind: "record", icon: Mail }, name: "Gmail", onOpen: () => { } }) }));
|
|
453
|
+
}
|
|
454
|
+
function StepCardsSpecimen() {
|
|
455
|
+
return (_jsx(StepCards, { label: "Steps to connect Gmail", steps: [
|
|
456
|
+
{ id: "app", state: "done", title: "Gmail" },
|
|
457
|
+
{
|
|
458
|
+
children: (_jsx("p", { className: "text-body-sm text-muted-foreground", children: "Sign in to Gmail in your browser." })),
|
|
459
|
+
id: "sign-in",
|
|
460
|
+
state: "current",
|
|
461
|
+
title: "Sign in",
|
|
462
|
+
},
|
|
463
|
+
{ id: "done", state: "upcoming", title: "Done" },
|
|
464
|
+
] }));
|
|
465
|
+
}
|
|
449
466
|
export const COMPOSITIONS = {
|
|
467
|
+
CatalogCard: CatalogCardSpecimen,
|
|
468
|
+
StepCards: StepCardsSpecimen,
|
|
450
469
|
ActivityFeed: ActivityFeedSpecimen,
|
|
451
470
|
AgentProfileCard: AgentProfileCardSpecimen,
|
|
452
471
|
CatalogDrawer: CatalogDrawerSpecimen,
|
|
@@ -156,6 +156,8 @@ export declare const SPECIMENS: {
|
|
|
156
156
|
CopyButton: () => import("react").JSX.Element;
|
|
157
157
|
CardActionsRow: () => import("react").JSX.Element;
|
|
158
158
|
PageActions: () => import("react").JSX.Element;
|
|
159
|
+
CatalogCard: () => import("react").JSX.Element;
|
|
160
|
+
StepCards: () => import("react").JSX.Element;
|
|
159
161
|
ActivityFeed: () => import("react").JSX.Element;
|
|
160
162
|
AgentProfileCard: () => import("react").JSX.Element;
|
|
161
163
|
CatalogDrawer: () => import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/index.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/index.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYiB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type UsageName = "ActivityFeed" | "AgentProfileCard" | "CatalogDrawer" | "CollectionFilters" | "CollectionPage" | "CollectionToolbar" | "ConfirmDialog" | "DrawerSteps" | "EntryPicture" | "EntryScene" | "FormDialog" | "FormDrawer" | "InviteCard" | "LibraryShelf" | "ObjectPage" | "ObjectSection" | "OverviewPage" | "PageHeader" | "RecordList" | "RecordSheet" | "RowEditForm" | "SettingsPage" | "SettingsSection" | "useCatalogRows" | "Button" | "ButtonGroup" | "ButtonLink" | "CardActionsRow" | "CopyButton" | "LoadMoreButton" | "PageActions" | "Calendar" | "ClearableInput" | "CollectionSearch" | "Field" | "Form" | "Input" | "InputGroup" | "InputOTP" | "Label" | "NativeSelect" | "SettingsField" | "SettingsRows" | "Slider" | "Textarea" | "Checkbox" | "ChoiceboxGroup" | "CollectionSort" | "Combobox" | "ModelSelect" | "MultiSelect" | "RadioGroup" | "SegmentedChoice" | "SegmentedControl" | "Select" | "Switch" | "ThemeModeSegments" | "ThemeModeSwitcher" | "Toggle" | "ToggleGroup" | "ActionStatus" | "AgentOrb" | "AppIcon" | "AppMark" | "ArchIcon" | "Avatar" | "Badge" | "BrandWordmark" | "CategoryTag" | "CheckCounts" | "FileTypeIcon" | "IdentityMark" | "ModelIdentity" | "ModelMark" | "ObjectFactValue" | "PlatformMark" | "ProductWordmark" | "ProgressChecklist" | "RecordIdentity" | "StatusBadge" | "Tag" | "AgentListRow" | "Breadcrumb" | "CommandDialog" | "DocumentTabs" | "FileTree" | "Footer" | "PortalSidebarFrame" | "ScopeSwitcher" | "Sidebar" | "SidebarBrand" | "SidebarEntryCard" | "SidebarFind" | "SidebarFrame" | "SidebarMenuChevron" | "SidebarSections" | "Tabs" | "TabsNav" | "textLinkVariants" | "AgentCard" | "AgentRow" | "Card" | "CardRow" | "CodeBlock" | "DataTable" | "DiffCount" | "DisclosureRow" | "FileDiff" | "Gauge" | "Item" | "Kbd" | "MiddleTruncate" | "ObjectFacts" | "PairingCode" | "Progress" | "QrCode" | "RecordTime" | "RunTimeline" | "SettingsFactsSection" | "Snippet" | "Table" | "TableCard" | "TableValue" | "TextWithCopyButton" | "UsageMeter" | "Alert" | "EmptyState" | "EntryProgress" | "EntryStageList" | "HoverCard" | "MessageNotice" | "NoticeBanner" | "PendingLabel" | "Skeleton" | "SkeletonRegion" | "Toaster" | "Tooltip" | "UpdateCard" | "WaitingLine" | "AccountMenu" | "ActionContextMenu" | "ActionMenu" | "AlertDialog" | "ContextMenu" | "Dialog" | "Drawer" | "DropdownMenu" | "GlassControl" | "MenuChoiceRow" | "Popover" | "Sheet" | "SiteMenu" | "ThemeModeMenu" | "ActivityCalendar" | "ChartAreaStacked" | "ChartBarHorizontal" | "ChartBarMultiple" | "ChartBarStacked" | "ChartCard" | "ChartContainer" | "ChartRanking" | "ChartSparkline" | "DateRangeControl" | "KpiCard" | "TrendBadge" | "createEntityColorMap" | "Accordion" | "AspectRatio" | "BrandField" | "Collapsible" | "CompanyCard" | "Disclosure" | "HiveScene" | "NadiaPresence" | "NumberedSteps" | "Prose" | "ReadingColumn" | "ResizablePanelGroup" | "ScrollArea" | "Separator" | "ToolIcon";
|
|
1
|
+
export type UsageName = "ActivityFeed" | "AgentProfileCard" | "CatalogDrawer" | "CollectionFilters" | "CollectionPage" | "CollectionToolbar" | "ConfirmDialog" | "DrawerSteps" | "EntryPicture" | "EntryScene" | "FormDialog" | "FormDrawer" | "InviteCard" | "LibraryShelf" | "ObjectPage" | "ObjectSection" | "OverviewPage" | "PageHeader" | "RecordList" | "RecordSheet" | "RowEditForm" | "SettingsPage" | "SettingsSection" | "StepCards" | "useCatalogRows" | "Button" | "ButtonGroup" | "ButtonLink" | "CardActionsRow" | "CopyButton" | "LoadMoreButton" | "PageActions" | "Calendar" | "ClearableInput" | "CollectionSearch" | "Field" | "Form" | "Input" | "InputGroup" | "InputOTP" | "Label" | "NativeSelect" | "SettingsField" | "SettingsRows" | "Slider" | "Textarea" | "Checkbox" | "ChoiceboxGroup" | "CollectionSort" | "Combobox" | "ModelSelect" | "MultiSelect" | "RadioGroup" | "SegmentedChoice" | "SegmentedControl" | "Select" | "Switch" | "ThemeModeSegments" | "ThemeModeSwitcher" | "Toggle" | "ToggleGroup" | "ActionStatus" | "AgentOrb" | "AppIcon" | "AppMark" | "ArchIcon" | "Avatar" | "Badge" | "BrandWordmark" | "CategoryTag" | "CheckCounts" | "FileTypeIcon" | "IdentityMark" | "ModelIdentity" | "ModelMark" | "ObjectFactValue" | "PlatformMark" | "ProductWordmark" | "ProgressChecklist" | "RecordIdentity" | "StatusBadge" | "Tag" | "AgentListRow" | "Breadcrumb" | "CommandDialog" | "DocumentTabs" | "FileTree" | "Footer" | "PortalSidebarFrame" | "ScopeSwitcher" | "Sidebar" | "SidebarBrand" | "SidebarEntryCard" | "SidebarFind" | "SidebarFrame" | "SidebarMenuChevron" | "SidebarSections" | "Tabs" | "TabsNav" | "textLinkVariants" | "AgentCard" | "AgentRow" | "Card" | "CardRow" | "CatalogCard" | "CodeBlock" | "DataTable" | "DiffCount" | "DisclosureRow" | "FileDiff" | "Gauge" | "Item" | "Kbd" | "MiddleTruncate" | "ObjectFacts" | "PairingCode" | "Progress" | "QrCode" | "RecordTime" | "RunTimeline" | "SettingsFactsSection" | "Snippet" | "Table" | "TableCard" | "TableValue" | "TextWithCopyButton" | "UsageMeter" | "Alert" | "EmptyState" | "EntryProgress" | "EntryStageList" | "HoverCard" | "MessageNotice" | "NoticeBanner" | "PendingLabel" | "Skeleton" | "SkeletonRegion" | "Toaster" | "Tooltip" | "UpdateCard" | "WaitingLine" | "AccountMenu" | "ActionContextMenu" | "ActionMenu" | "AlertDialog" | "ContextMenu" | "Dialog" | "Drawer" | "DropdownMenu" | "GlassControl" | "MenuChoiceRow" | "Popover" | "Sheet" | "SiteMenu" | "ThemeModeMenu" | "ActivityCalendar" | "ChartAreaStacked" | "ChartBarHorizontal" | "ChartBarMultiple" | "ChartBarStacked" | "ChartCard" | "ChartContainer" | "ChartRanking" | "ChartSparkline" | "DateRangeControl" | "KpiCard" | "TrendBadge" | "createEntityColorMap" | "Accordion" | "AspectRatio" | "BrandField" | "Collapsible" | "CompanyCard" | "Disclosure" | "HiveScene" | "NadiaPresence" | "NumberedSteps" | "Prose" | "ReadingColumn" | "ResizablePanelGroup" | "ScrollArea" | "Separator" | "ToolIcon";
|
|
2
2
|
export type UsageFamily = "Compositions" | "Actions" | "Inputs" | "Choices" | "Status" | "Navigation" | "Data" | "Feedback" | "Menus" | "Charts" | "Other";
|
|
3
3
|
export type ComponentUsage = {
|
|
4
4
|
name: UsageName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usage.generated.d.ts","sourceRoot":"","sources":["../../src/showcase/usage.generated.ts"],"names":[],"mappings":"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
|
|
1
|
+
{"version":3,"file":"usage.generated.d.ts","sourceRoot":"","sources":["../../src/showcase/usage.generated.ts"],"names":[],"mappings":"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"}
|
|
@@ -162,9 +162,9 @@ export const USAGE = [
|
|
|
162
162
|
module: "library-shelf",
|
|
163
163
|
family: "Compositions",
|
|
164
164
|
summary: "A Library shelf: the one line saying what it holds, the search, then the reusable things a person adds, as two-column entries, or Agent template cards or rows.",
|
|
165
|
-
when: "A gallery of reusable things a person adds, as Vercel's Templates gallery: the Portal's Agent templates, Nadia's New Agent gallery.",
|
|
165
|
+
when: "A gallery of reusable things a person adds, as Vercel's Templates gallery: the Portal's Agent templates, Nadia's New Agent gallery; or a catalogue of cards, as Vercel's Browse Connectors: Nadia's Browse apps (`cards`).",
|
|
166
166
|
instead: "The Portal's Skills and Plugins are entity rows a person finds, opens and adds, a CollectionPage; records a person already has and acts on are a CollectionPage too; choosing from a catalogue without leaving the page is a CatalogDrawer.",
|
|
167
|
-
behaviour: "The definition line only where the page has no title row to stand under (a titled page follows the title with the search, as every collection does). Shows, the first that holds: the failure; still entries while the shelf loads; noMatch while the search finds nothing; empty when the shelf holds nothing; then each section's title over its entries, two to a row from md, or the templates as cards, three to a row or as `columns` says, or as one list of rows with `view=\"rows\"
|
|
167
|
+
behaviour: "The definition line only where the page has no title row to stand under (a titled page follows the title with the search, as every collection does). Shows, the first that holds: the failure; still entries while the shelf loads; noMatch while the search finds nothing; empty when the shelf holds nothing; then each section's title over its entries, two to a row from md, or the templates as cards, three to a row or as `columns` says, or as one list of rows with `view=\"rows\"`, or the cards, three to a row, with `more` under them. Each entry has its kind's tile, its name (the link to its page), one line, one fact, one Add control or the word saying it is already added, then its menu. A failed add puts its message in the entry's line and its next steps beside its controls. The search shows unless the shelf is empty, with `searchEnd` at the end of its row.",
|
|
168
168
|
words: "The product words every string: the optional definition (one sentence on what the shelf holds), the search's label (\"Search skills\"), the loading label, each entry's name, line, Add label and added word, the empty, noMatch and failed messages.",
|
|
169
169
|
access: "Each section is a region named by its h2; entries are list items; loading is a status named by loadingLabel and aria-busy; a failed add is announced as an alert; each entry's menu is named by its label.",
|
|
170
170
|
},
|
|
@@ -228,11 +228,11 @@ export const USAGE = [
|
|
|
228
228
|
module: "record-sheet",
|
|
229
229
|
family: "Compositions",
|
|
230
230
|
summary: "One record from a list, looked at in a sheet at the right edge, then back to the list.",
|
|
231
|
-
when: "A list's record holds more than its row shows and is only read, not changed: a Stripe event in Billing, a usage row.",
|
|
232
|
-
instead: "A record changed from its list edits in its row with `RowEditForm`; a record with sections and commands of its own has its own page, an `ObjectPage`; a choice from a catalogue is a `CatalogDrawer`.",
|
|
233
|
-
behaviour: "Opens from the right as an inset card 12 px from the window's edges with 16 px corners, the list still behind it and usable. It is 420 px wide from 640 px, 512 px from 1024 px (the sheet's own width), and the window less its margins below 640 px. The header holds the record's name, one muted line and Close; the body scrolls through its facts as labelled values, then the read-only payload with its copy button; the footer holds one command to the record's owner. A press outside does not close it. It has no states of its own: it opens only on a record.",
|
|
231
|
+
when: "A list's record holds more than its row shows and is only read, not changed: a Stripe event in Billing, a usage row. Or it holds a few records of its own that a person manages one by one, beside the list: an app's accounts in Nadia's Apps, each connected, renamed, reconnected or disconnected from its row in the sheet (`held`).",
|
|
232
|
+
instead: "A record changed from its list edits in its row with `RowEditForm`; a record with sections and commands of its own beyond the records it holds has its own page, an `ObjectPage`; a choice from a catalogue is a `CatalogDrawer`.",
|
|
233
|
+
behaviour: "Opens from the right as an inset card 12 px from the window's edges with 16 px corners, the list still behind it and, while it is only read, usable. It is 420 px wide from 640 px, 512 px from 1024 px (the sheet's own width), and the window less its margins below 640 px; one that holds records or a setup is 640 px from 1024 px, as Vercel's Add Connection is about that wide, so each held record's row stands on one line with its status and its commands, and it dims the page behind it and owns the screen while it is open. The header holds the record's mark at 40 beside its name, one muted line and Close; the body scrolls through its facts as labelled values, then the read-only payload with its copy button, then its setup as `StepCards`, then the records it holds as a `RecordList` under its heading, whose actions add one and whose rows carry their own status and commands; the footer holds one command to the record's owner. A press outside does not close it. It has no states of its own: it opens only on a record.",
|
|
234
234
|
words: "The title is the record's own name, as its row shows it. The footer's command names where it goes: \"Open Beta Studio\".",
|
|
235
|
-
access: "A dialog named by its title, not `modal
|
|
235
|
+
access: "A dialog named by its title, not `modal` while it is only read: no scrim, and focus stays inside it; `modal`, with the scrim, while it holds records or a setup. Escape and Close close it. Focus returns to the row it opened from (`finalFocus`) after every close but a mouse, touch or pen one, as `Sheet` does by default; a caller that passes its own `finalFocus` decides. The payload is a read-only text area named by its label.",
|
|
236
236
|
},
|
|
237
237
|
{
|
|
238
238
|
name: "RowEditForm",
|
|
@@ -267,6 +267,17 @@ export const USAGE = [
|
|
|
267
267
|
words: '"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: the description is that helper text for the whole card, and no field has its own. "Render an optional one-sentence description as a sibling under the label that explains ON only. Don’t describe OFF; it’s the negation." (https://vercel.com/geist/toggle) Ours: a card of one switch says in its description what turning it on does. The title names the values ("Personal details"); the description says what changing them does, in one line; the footer line is a Learn more link, a limit ("Use 32 characters at most."), what stays unaffected, or what is blocked and why ("Ask an owner to change this."); Save and Saving come from the product\'s catalogue, and so does the toast a `saved` callback raises; a delete card\'s description opens "Permanently delete".',
|
|
268
268
|
access: "\"Provide an accessible name through `children`, `aria-label`, or `aria-labelledby`.\" (https://vercel.com/geist/toggle) Ours: the title is the section's h2, or an h3 with `headingLevel` inside an ObjectPage's row, and names the form that saves it. The footer's line is one status, announced politely; a failure under a field marks the control invalid and describes it. Locked fields are inert, so the section's title, description and reason are what a screen reader meets.",
|
|
269
269
|
},
|
|
270
|
+
{
|
|
271
|
+
name: "StepCards",
|
|
272
|
+
module: "step-cards",
|
|
273
|
+
family: "Compositions",
|
|
274
|
+
summary: "The steps of one setup, one numbered card each, inside its drawer, as Vercel's Add Connection draws them.",
|
|
275
|
+
when: "A setup in a drawer whose steps a person should see ahead of them, with what each settled: connecting an app in Nadia, through `RecordSheet`'s `steps`.",
|
|
276
|
+
instead: 'A setup told as "Step 2 of 3" over the drawer\'s title is `FormDrawer` with `job="steps"`. Steps a person does in any order, each done elsewhere, are a `ProgressChecklist`.',
|
|
277
|
+
behaviour: "One hairline card a step, in order, 12 px apart. The current one has a filled number and opens its content under its title. A done one shows what it settled in its title's place, or a check beside its title; one still to come is its muted number and title, with nothing under it. Only the current step ever holds controls.",
|
|
278
|
+
words: 'Each title names the step in a word or two: "Name", "Sign in". A done step says what was settled: the app, the account\'s name.',
|
|
279
|
+
access: 'An ordered list named by `label`, the current step marked `aria-current="step"`.',
|
|
280
|
+
},
|
|
270
281
|
{
|
|
271
282
|
name: "useCatalogRows",
|
|
272
283
|
module: "catalog-row",
|
|
@@ -1064,7 +1075,7 @@ export const USAGE = [
|
|
|
1064
1075
|
module: "sidebar-sections",
|
|
1065
1076
|
family: "Navigation",
|
|
1066
1077
|
summary: "The sidebar swapped to one object or one area: the way back, what you are in, and its sections.",
|
|
1067
|
-
when: "Inside an object, the same sidebar column shows these instead of the places: an Installation's sections in the Portal, Nadia's Edit and Settings sections. Inside an area whose pages are siblings a person moves between, the area's sub-menu without `identity`, as Vercel's Settings: the Portal's Settings, Company, Library and Account. The row that opens an area ends in `SidebarMenuChevron`; a row that only opens a page has none. Required: the way back and the nav's `label`; every section has an icon.",
|
|
1078
|
+
when: "Inside an object, the same sidebar column shows these instead of the places: an Installation's sections in the Portal, Nadia's Edit and Settings sections. Inside an area whose pages are siblings a person moves between, the area's sub-menu without `identity`, as Vercel's Settings: the Portal's Settings, Company, Library and Account. A catalogue long enough to be browsed by category takes this sub-menu too, one section a category with its `count`, as Vercel's Browse Connectors does: Nadia's Browse apps. The row that opens an area ends in `SidebarMenuChevron`; a row that only opens a page has none. Required: the way back and the nav's `label`; every section has an icon.",
|
|
1068
1079
|
instead: "The places a person can go are the sidebar's own groups; a settings page that does not swap the column is a SettingsPage. Never a second column beside the first. “Tabs imply the views share scope, URL parent, and data model” (https://vercel.com/geist/tabs) Ours: an area whose pages hold different objects, with different lists and different ways to add, is this sub-menu, as Vercel's AI Gateway is; a destination whose pages are views of one reading keeps its Tabs, as Vercel's Analytics and OpenRouter's Activity do (the Portal's Analytics). An object's sections under the top bar are a `TabsNav` band.",
|
|
1069
1080
|
behaviour: "With `identity`: a back arrow row, then what you are in, then the sections. Without it, as Vercel's sub-menu: one row with a ‹ at its start and the area's name centred, then the sections as words alone. The back row returns to where the person came from and is disabled while leaving is blocked. One section is current and takes the selection fill; the rest stay neutral. A section that sets `group` opens a labelled group that holds the sections after it until another names its own; the label and the gap tell groups apart, never a rule. Narrow, the identity, the area's name and the labels leave, and each row keeps its icon with its name in a tooltip.",
|
|
1070
1081
|
words: 'The back row names where it goes ("Agents", "Back to workspace"); the identity is the object\'s own name; an area\'s `label` is its sidebar row\'s word ("Settings", "Company"); a group heading names the kind of settings ("Account"), in sentence case; sections are nouns ("Skills", "Members").',
|
|
@@ -1147,6 +1158,17 @@ export const USAGE = [
|
|
|
1147
1158
|
words: "None of its own.",
|
|
1148
1159
|
access: "A layout container; reading order is source order.",
|
|
1149
1160
|
},
|
|
1161
|
+
{
|
|
1162
|
+
name: "CatalogCard",
|
|
1163
|
+
module: "catalog-card",
|
|
1164
|
+
family: "Data",
|
|
1165
|
+
summary: "One thing a person can connect, as a card in a catalogue that opens its drawer, as Vercel's Browse Connectors draws a connector.",
|
|
1166
|
+
when: "A catalogue a person browses by picture and name, where opening one sets it up in a drawer: Nadia's Browse apps. On a `LibraryShelf` through its `cards`.",
|
|
1167
|
+
instead: "A thing added with one press, with no setup, is a `CatalogEntry`. An Agent or template chosen by its preview is an `AgentCard`. What a person already holds is a row of its `CollectionPage`.",
|
|
1168
|
+
behaviour: "A hairline card with the mark at 40 at its top, and at its foot the name, the line cut after two lines and the tags, so names line up along a row of cards. The whole card is one target and takes the `accent` hover, with no button of its own: the drawer holds the commands. On hover or focus an app's own logo fades in behind the card's top right corner, 112 px, blurred 40 px and more saturated, so the card glows in the app's colours; a mark with no logo has no glow.",
|
|
1169
|
+
words: 'The name as the catalogue gives it. The line says what it does. Tags are short facts: a category, "2 accounts".',
|
|
1170
|
+
access: "The name is a real button whose target covers the card, so the tab order holds one stop a card. The mark is decorative beside it.",
|
|
1171
|
+
},
|
|
1150
1172
|
{
|
|
1151
1173
|
name: "CodeBlock",
|
|
1152
1174
|
module: "code-block",
|
|
@@ -1671,7 +1693,7 @@ export const USAGE = [
|
|
|
1671
1693
|
summary: "A panel from the edge of the window, beside what it describes.",
|
|
1672
1694
|
when: '"Use Sheet for persistent associated context like deployment details, log row inspection, or a member profile, where the underlying page stays useful." (https://vercel.com/geist/sheet) Ours: also the product\'s navigation when the window is too narrow for the sidebar.',
|
|
1673
1695
|
instead: '"For a blocking decision, use `Modal`. For a mobile-only bottom sheet, use `Drawer`." (https://vercel.com/geist/sheet) "Don’t use Sheet to confirm destructive actions. The default `modal=false` keeps the page interactive, which weakens severity for a delete or revoke." (https://vercel.com/geist/sheet) Ours: a blocking decision is `ConfirmDialog` or `Dialog`. A catalogue is `CatalogDrawer` and a setup in steps is `FormDrawer` with `job="steps"`, the modal sheets built on this; one record looked at from a list is `RecordSheet`, which leaves the page usable. A sheet is never chosen because an action takes input. For editing use the row or the record\'s page.',
|
|
1674
|
-
behaviour: '"Sheet defaults to `modal=false` so toasts and other high-z elements stay reachable. Keep that default unless the sheet owns the screen." (https://vercel.com/geist/sheet) "Pick `side` from the trigger location: a row inspector slides from `right`, a global filter from `left`. Don’t change sides mid-session." (https://vercel.com/geist/sheet) "Outside-click does not auto-close, so always render an explicit close affordance and honor Escape." (https://vercel.com/geist/sheet) Ours: `modal` dims the page and blocks it, for a sheet that owns the screen, and `noOverlay` on its content drops the scrim again. An inset card with 16 px corners, 12 px from the window\'s edges; a side panel owns its width, 512 px from 1024 px and the window less its margins below it, and only `RecordSheet`
|
|
1696
|
+
behaviour: '"Sheet defaults to `modal=false` so toasts and other high-z elements stay reachable. Keep that default unless the sheet owns the screen." (https://vercel.com/geist/sheet) "Pick `side` from the trigger location: a row inspector slides from `right`, a global filter from `left`. Don’t change sides mid-session." (https://vercel.com/geist/sheet) "Outside-click does not auto-close, so always render an explicit close affordance and honor Escape." (https://vercel.com/geist/sheet) Ours: `modal` dims the page and blocks it, for a sheet that owns the screen, and `noOverlay` on its content drops the scrim again. An inset card with 16 px corners, 12 px from the window\'s edges and 12 px below the band where a desktop window draws its own controls over the page (`env(titlebar-area-height)`), so its Close never stands under the window\'s; a side panel owns its width, 512 px from 1024 px and the window less its margins below it, and only `RecordSheet` changes it: 420 px between 640 and 1024 px, and 640 px from 1024 px while it holds records of its own or a setup. A given kind of sheet always opens on the same side. A press outside never closes it, Escape does, except the phone navigation, which `closesOnScrimPress` closes on a press on its scrim. The body scrolls between a header and a footer with its actions at the trailing edge, as Vercel\'s drawers (Production Checklist): the footer keeps the sheet\'s fill and stands under a 1 px rule, so its actions stay put while the body scrolls. Neutral only, with no hue but the focus ring; the primary is the only filled control. `closeLabel` is required.',
|
|
1675
1697
|
words: '"Title is Title Case and names the entity (`Deployment Details`, `Member Profile`), not the page action." (https://vercel.com/geist/sheet) "Body is read-mostly: sentence case prose with Title Case sub-headings. Action buttons are optional; when present, follow `Verb + Noun`." (https://vercel.com/geist/sheet) "Don’t duplicate the page header inside the sheet; the sheet is the detail layer." (https://vercel.com/geist/sheet) Ours: titles and sub-headings are sentence case where Geist writes Title Case. A footer link names where it goes: *Open Rossi Ottica*.',
|
|
1676
1698
|
access: '"Trap focus inside the sheet while it’s open and return focus to the trigger row on close so keyboard users keep their place in the list." (https://vercel.com/geist/sheet) "Provide a visible close button labeled `Close` (or an icon button with `aria-label="Close"`) since clicking outside doesn’t dismiss." (https://vercel.com/geist/sheet) "Announce the sheet with `aria-labelledby` pointing at the title; pair it with `aria-describedby` only when the body is short and load-bearing." (https://vercel.com/geist/sheet) Ours: a dialog named by its title, with a Close named in the product\'s words by `closeLabel`. Focus returns to the row or the navigation button that opened it.',
|
|
1677
1699
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadicodeai/ui",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.202",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#jsx": "./src/jsx/index.ts",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@headless-tree/react": "1.8.0",
|
|
79
79
|
"@iconify-icons/logos": "^2.0.3",
|
|
80
80
|
"@iconify/react": "^6.0.2",
|
|
81
|
-
"@nadicodeai/design-system": "12.1.
|
|
81
|
+
"@nadicodeai/design-system": "12.1.202",
|
|
82
82
|
"@tanstack/react-table": "^9.3.1",
|
|
83
83
|
"@vgpu/wgsl": "0.6.0",
|
|
84
84
|
"class-variance-authority": "^0.7.1",
|