@cloudgrid-io/ui 0.31.3 → 0.31.4

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.
@@ -0,0 +1,81 @@
1
+ import * as React from "react";
2
+ /**
3
+ * Type-to-confirm delete (Shelf spec 2026-10-07, Part B).
4
+ *
5
+ * The library's one destructive confirmation. The Console built its own,
6
+ * `components/entity/DeleteEntityModal.tsx`, which this replaces: same gate (the
7
+ * button stays disabled until the typed text matches), same refusal to close
8
+ * while the request is in flight, same error slot under the field. What changed
9
+ * is the copy, because Delete is now a real delete (Part D): the old modal said
10
+ * the record is retained, and that stops being true.
11
+ *
12
+ * ```
13
+ * Delete Top 10 Mobile? [x]
14
+ * This removes it from CloudGrid for good. Its link stops
15
+ * working and it can't be brought back.
16
+ * Type top-10-mobile to confirm
17
+ * [ top-10-mobile ]
18
+ * [Cancel] [Delete]
19
+ * ```
20
+ *
21
+ * ## Generic on purpose
22
+ *
23
+ * Nothing here knows about the Shelf. `name` is what the title says, and
24
+ * `confirmText` is what the reader types: the Figma frame types the SLUG
25
+ * (`top-10-mobile`) under a title that shows the display name, which is the
26
+ * right split, because a slug is unambiguous and has no capitals or spaces to
27
+ * get wrong. `confirmText` falls back to `name` for a caller with no slug.
28
+ *
29
+ * ## The gate
30
+ *
31
+ * The typed text is trimmed and compared exactly. Not case-folded: a slug is
32
+ * lower case by construction, and a display name typed with the wrong case is
33
+ * the reader not looking, which is what the gate is for. Enter submits through
34
+ * a real `<form>`, so the keyboard path is the same gate as the button.
35
+ *
36
+ * ## While pending
37
+ *
38
+ * `pending` disables the field and both buttons and swallows every close
39
+ * (Escape, the scrim, the close glyph): a dialog that closes on a request still
40
+ * running leaves the reader no place to see it fail. The caller closes it
41
+ * (`onOpenChange(false)`) when the request resolves, and passes `error` when it
42
+ * rejects.
43
+ *
44
+ * ## The red
45
+ *
46
+ * The filled Delete is `--cg-danger-strong` under `--cg-text-on-primary`: the
47
+ * Figma frame's red is the Console's "Failed" status, which the library already
48
+ * carries as `danger-strong` (5.70:1 on white; white on it measures above 5:1).
49
+ * `--cg-danger` itself is still a placeholder in `tokens.css`, which is the
50
+ * known gap CLAUDE.md records; this reads the strong rung so the button does not
51
+ * move if the placeholder is retuned.
52
+ */
53
+ /** The consequence line under the title, when the caller does not pass one. */
54
+ export declare const CONFIRM_DELETE_DESCRIPTION = "This removes it from CloudGrid for good. Its link stops working and it can't be brought back.";
55
+ export type ConfirmDeleteDialogProps = {
56
+ open: boolean;
57
+ onOpenChange: (open: boolean) => void;
58
+ /** What the title names: "Delete {name}?". */
59
+ name: string;
60
+ /** What the reader types to arm the button. Defaults to `name`. */
61
+ confirmText?: string;
62
+ /** Runs when the armed button is pressed or Enter is hit in the field. */
63
+ onConfirm: () => void | Promise<void>;
64
+ /** The request is in flight: everything is disabled and the dialog will not close. */
65
+ pending?: boolean;
66
+ /** Shown under the field, announced as an alert. */
67
+ error?: React.ReactNode;
68
+ /** Overrides the title. */
69
+ title?: React.ReactNode;
70
+ /** Overrides the consequence line. */
71
+ description?: React.ReactNode;
72
+ /** The armed button's word. */
73
+ confirmLabel?: string;
74
+ /** The button's word while `pending`. */
75
+ pendingLabel?: string;
76
+ cancelLabel?: string;
77
+ className?: string;
78
+ };
79
+ declare function ConfirmDeleteDialog({ open, onOpenChange, name, confirmText, onConfirm, pending, error, title, description, confirmLabel, pendingLabel, cancelLabel, className, }: ConfirmDeleteDialogProps): React.JSX.Element;
80
+ export { ConfirmDeleteDialog };
81
+ //# sourceMappingURL=confirm-delete-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm-delete-dialog.d.ts","sourceRoot":"","sources":["../../src/blocks/confirm-delete-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAa9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,+EAA+E;AAC/E,eAAO,MAAM,0BAA0B,kGAC0D,CAAA;AAEjG,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAA;IACZ,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,0EAA0E;IAC1E,SAAS,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACrC,sFAAsF;IACtF,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,oDAAoD;IACpD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,sCAAsC;IACtC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,+BAA+B;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,yCAAyC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,iBAAS,mBAAmB,CAAC,EAC3B,IAAI,EACJ,YAAY,EACZ,IAAI,EACJ,WAAW,EACX,SAAS,EACT,OAAe,EACf,KAAK,EACL,KAAK,EACL,WAAwC,EACxC,YAAuB,EACvB,YAAyB,EACzB,WAAsB,EACtB,SAAS,GACV,EAAE,wBAAwB,qBAsF1B;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAA"}
@@ -0,0 +1,89 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { cn } from "../lib/cloudgrid-cn.js";
5
+ import { Button } from "../ui/button.js";
6
+ import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from "../ui/dialog.js";
7
+ import { Input } from "../ui/input.js";
8
+ /**
9
+ * Type-to-confirm delete (Shelf spec 2026-10-07, Part B).
10
+ *
11
+ * The library's one destructive confirmation. The Console built its own,
12
+ * `components/entity/DeleteEntityModal.tsx`, which this replaces: same gate (the
13
+ * button stays disabled until the typed text matches), same refusal to close
14
+ * while the request is in flight, same error slot under the field. What changed
15
+ * is the copy, because Delete is now a real delete (Part D): the old modal said
16
+ * the record is retained, and that stops being true.
17
+ *
18
+ * ```
19
+ * Delete Top 10 Mobile? [x]
20
+ * This removes it from CloudGrid for good. Its link stops
21
+ * working and it can't be brought back.
22
+ * Type top-10-mobile to confirm
23
+ * [ top-10-mobile ]
24
+ * [Cancel] [Delete]
25
+ * ```
26
+ *
27
+ * ## Generic on purpose
28
+ *
29
+ * Nothing here knows about the Shelf. `name` is what the title says, and
30
+ * `confirmText` is what the reader types: the Figma frame types the SLUG
31
+ * (`top-10-mobile`) under a title that shows the display name, which is the
32
+ * right split, because a slug is unambiguous and has no capitals or spaces to
33
+ * get wrong. `confirmText` falls back to `name` for a caller with no slug.
34
+ *
35
+ * ## The gate
36
+ *
37
+ * The typed text is trimmed and compared exactly. Not case-folded: a slug is
38
+ * lower case by construction, and a display name typed with the wrong case is
39
+ * the reader not looking, which is what the gate is for. Enter submits through
40
+ * a real `<form>`, so the keyboard path is the same gate as the button.
41
+ *
42
+ * ## While pending
43
+ *
44
+ * `pending` disables the field and both buttons and swallows every close
45
+ * (Escape, the scrim, the close glyph): a dialog that closes on a request still
46
+ * running leaves the reader no place to see it fail. The caller closes it
47
+ * (`onOpenChange(false)`) when the request resolves, and passes `error` when it
48
+ * rejects.
49
+ *
50
+ * ## The red
51
+ *
52
+ * The filled Delete is `--cg-danger-strong` under `--cg-text-on-primary`: the
53
+ * Figma frame's red is the Console's "Failed" status, which the library already
54
+ * carries as `danger-strong` (5.70:1 on white; white on it measures above 5:1).
55
+ * `--cg-danger` itself is still a placeholder in `tokens.css`, which is the
56
+ * known gap CLAUDE.md records; this reads the strong rung so the button does not
57
+ * move if the placeholder is retuned.
58
+ */
59
+ /** The consequence line under the title, when the caller does not pass one. */
60
+ export const CONFIRM_DELETE_DESCRIPTION = "This removes it from CloudGrid for good. Its link stops working and it can't be brought back.";
61
+ function ConfirmDeleteDialog({ open, onOpenChange, name, confirmText, onConfirm, pending = false, error, title, description = CONFIRM_DELETE_DESCRIPTION, confirmLabel = "Delete", pendingLabel = "Deleting", cancelLabel = "Cancel", className, }) {
62
+ const target = confirmText ?? name;
63
+ const [typed, setTyped] = React.useState("");
64
+ const fieldId = React.useId();
65
+ const errorId = React.useId();
66
+ const field = React.useRef(null);
67
+ const matches = typed.trim() === target;
68
+ // A fresh field every time the dialog opens. Clearing on close instead would
69
+ // empty the field during the closing animation, which reads as the dialog
70
+ // undoing what the reader typed.
71
+ React.useEffect(() => {
72
+ if (open)
73
+ setTyped("");
74
+ }, [open]);
75
+ function changeOpen(next) {
76
+ if (!next && pending)
77
+ return;
78
+ onOpenChange(next);
79
+ }
80
+ function submit(event) {
81
+ event.preventDefault();
82
+ if (!matches || pending)
83
+ return;
84
+ void onConfirm();
85
+ }
86
+ return (_jsx(Dialog, { open: open, onOpenChange: changeOpen, children: _jsxs(DialogContent, { "data-slot": "confirm-delete-dialog", initialFocus: field, className: cn("gap-5 p-6 sm:max-w-md", className), children: [_jsxs(DialogHeader, { className: "gap-3 pr-8", children: [_jsx(DialogTitle, { className: "text-heading-sm leading-tight", children: title ?? `Delete ${name}?` }), _jsx(DialogDescription, { className: "text-body-sm text-body", children: description })] }), _jsxs("form", { className: "grid gap-5", onSubmit: submit, noValidate: true, children: [_jsxs("div", { className: "grid gap-2", children: [_jsxs("label", { htmlFor: fieldId, className: "text-body-sm font-medium text-ink", children: ["Type ", _jsx("span", { className: "font-mono text-mono", children: target }), " to confirm"] }), _jsx(Input, { ref: field, id: fieldId, value: typed, onChange: (event) => setTyped(event.target.value), disabled: pending, autoComplete: "off", autoCapitalize: "off", spellCheck: false, "aria-describedby": error ? errorId : undefined, "data-slot": "confirm-delete-field" }), error ? (_jsx("p", { id: errorId, role: "alert", className: "m-0 text-caption text-danger-strong", children: error })) : null] }), _jsxs("div", { className: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", children: [_jsx(Button, { type: "button", variant: "outline", disabled: pending, onClick: () => changeOpen(false), children: cancelLabel }), _jsx(Button, { type: "submit", disabled: !matches || pending, "data-slot": "confirm-delete-submit", className: "bg-danger-strong text-on-primary hover:bg-danger-strong/90 focus-visible:border-danger-strong focus-visible:ring-danger-border", children: pending ? pendingLabel : confirmLabel })] })] })] }) }));
87
+ }
88
+ export { ConfirmDeleteDialog };
89
+ //# sourceMappingURL=confirm-delete-dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm-delete-dialog.js","sourceRoot":"","sources":["../../src/blocks/confirm-delete-dialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EACL,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,WAAW,GACZ,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,+EAA+E;AAC/E,MAAM,CAAC,MAAM,0BAA0B,GACrC,+FAA+F,CAAA;AA2BjG,SAAS,mBAAmB,CAAC,EAC3B,IAAI,EACJ,YAAY,EACZ,IAAI,EACJ,WAAW,EACX,SAAS,EACT,OAAO,GAAG,KAAK,EACf,KAAK,EACL,KAAK,EACL,WAAW,GAAG,0BAA0B,EACxC,YAAY,GAAG,QAAQ,EACvB,YAAY,GAAG,UAAU,EACzB,WAAW,GAAG,QAAQ,EACtB,SAAS,GACgB;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,CAAA"}
@@ -0,0 +1,384 @@
1
+ import * as React from "react";
2
+ import { DrawerContent } from "../ui/drawer.js";
3
+ import { type EntityKind } from "./entity-card.js";
4
+ /**
5
+ * The Shelf (Shelf spec 2026-10-07, Part B): where things that expired or were
6
+ * never published go on their own, and where they are moved back from.
7
+ *
8
+ * Figma `5ouhISIL0mwYGHurvCGoEO`, section "Shelf v2 - 2026-10-07" (9834:7965),
9
+ * frames 01 to 09b. The frames are the LAYOUT. The sizes are the Console's: the
10
+ * founder's instruction was that the Shelf look like the app page and the grid
11
+ * settings page do as they render, so every height and type size below is the
12
+ * one measured off those pages (audit log `2026-10-07-shelf-blocks.md`, step 0)
13
+ * and expressed with the library primitive that already produces it:
14
+ *
15
+ * table head 40, 15/500 `TableHead` as is
16
+ * row 57 (two lines) `TableCell` as is, 8 padding
17
+ * reason pill 20, 13/500 `Badge variant="secondary"`, the Versions table's grey pill
18
+ * row buttons 28, 13/500 `Button size="sm"` / `size="icon-sm"`, the app header's rung
19
+ * toolbar 32 `InputGroup`, `Button`, `Tabs` default, all h-8
20
+ * drawer 448 `DrawerContent size="md"`, every Console drawer
21
+ *
22
+ * ## What is in here
23
+ *
24
+ * The parts, each usable alone, and `Shelf`, which composes them the way the
25
+ * frames do and owns the transient state between them: which row's drawer is
26
+ * open, which item the delete dialog is about, which rows are mid-request.
27
+ *
28
+ * ShelfToolbar reason tabs with counts, search, sort menu, List/Compact
29
+ * ShelfTable the List view: a real <table>
30
+ * ShelfCardList the Compact view, and every view under 768px of shelf
31
+ * ShelfItemDetails the drawer (right) or bottom sheet (phone)
32
+ * ShelfEmpty "Your shelf is empty"
33
+ * ShelfFooter "Showing 6 of 24 creations" and Show more
34
+ * toastMovedToGrid the confirmation toast, no Undo
35
+ *
36
+ * The type-to-confirm dialog is its own module, `confirm-delete-dialog`,
37
+ * because nothing about it is Shelf-specific.
38
+ *
39
+ * ## Data-agnostic
40
+ *
41
+ * Nothing here fetches, filters, sorts or counts. The spec is explicit that the
42
+ * counts, search and sort come from the server (Part D) and that the Console must
43
+ * not filter a truncated list in the browser, so the blocks only REPORT what the
44
+ * reader asked for (`onTabChange`, `onSearch`, `onSort`) and render the `items`
45
+ * they are handed. Counts are optional: until the server sends them, a tab is
46
+ * its word alone.
47
+ *
48
+ * ## Narrow
49
+ *
50
+ * By container query on the block, not the window: under 48rem of shelf the
51
+ * table becomes the stacked cards, the cards go to one column with a full-width
52
+ * Move to grid, and the sort menu and view toggle leave (frame 09 draws neither).
53
+ * The reason tabs are the library's `pill` chips at every width, which is what
54
+ * frame 09 draws and what scrolls rather than wraps on a phone. The drawer is
55
+ * the one thing that asks the WINDOW, because a sheet is a property of the
56
+ * screen: `detailsSide="auto"` is a bottom sheet under 768px, the Console's own
57
+ * phone breakpoint.
58
+ */
59
+ /**
60
+ * Why something is on the shelf. The reason follows the kind (spec, "The
61
+ * model"): a page only ever expires, an app or agent is only ever never
62
+ * published. The Console derives it from `realm`; the block takes it as given.
63
+ */
64
+ export declare const SHELF_REASON_ORDER: readonly ["expired", "never_published"];
65
+ export type ShelfReason = (typeof SHELF_REASON_ORDER)[number];
66
+ /** The pill's word. */
67
+ export declare const SHELF_REASON_LABEL: Record<ShelfReason, string>;
68
+ /** The line beside the pill. Library copy, from the frames' annotation. */
69
+ export declare const SHELF_REASON_DETAIL: Record<ShelfReason, string>;
70
+ /** The reason tabs. `all` first, then the reasons in their own order. */
71
+ export declare const SHELF_TAB_ORDER: readonly ["all", "expired", "never_published"];
72
+ export type ShelfTab = (typeof SHELF_TAB_ORDER)[number];
73
+ export declare const SHELF_TAB_LABEL: Record<ShelfTab, string>;
74
+ /** The sort menu, in the order frame 08 lists it. The first is the default. */
75
+ export declare const SHELF_SORT_ORDER: readonly ["recent", "oldest", "name"];
76
+ export type ShelfSort = (typeof SHELF_SORT_ORDER)[number];
77
+ export declare const SHELF_SORT_LABEL: Record<ShelfSort, string>;
78
+ export declare const SHELF_VIEW_ORDER: readonly ["list", "compact"];
79
+ export type ShelfView = (typeof SHELF_VIEW_ORDER)[number];
80
+ export declare const SHELF_VIEW_LABEL: Record<ShelfView, string>;
81
+ export declare const SHELF_EMPTY_TITLE = "Your shelf is empty";
82
+ export declare const SHELF_EMPTY_DESCRIPTION = "Things that expire or are never published will show up here on their own.";
83
+ export declare const SHELF_NO_MATCHES = "Nothing on your shelf matches that.";
84
+ export declare const SHELF_SEARCH_PLACEHOLDER = "Search your shelf";
85
+ export declare const SHELF_AVAILABILITY_NOTE = "Move it to your grid to bring it back.";
86
+ export declare const SHELF_MOVE_LABEL = "Move to grid";
87
+ /** The toast after a move. No Undo: the move is the undo. */
88
+ export declare function shelfMovedMessage(name: string): string;
89
+ /** One thing on the shelf. */
90
+ export type ShelfItem = {
91
+ id: string;
92
+ /** The display name. */
93
+ name: string;
94
+ /** What the reader types to confirm a delete. Falls back to `name`. */
95
+ slug?: string;
96
+ /** Drives the fallback mark and, without `kindLabel`, the word under the name. */
97
+ kind: EntityKind;
98
+ /** The word under the name, when the kind's own word is not specific enough ("Presentation"). */
99
+ kindLabel?: string;
100
+ reason: ShelfReason;
101
+ /** When it moved to the shelf. An ISO string, a Date or epoch milliseconds. */
102
+ movedAt: string | number | Date;
103
+ /** A preview picture. Without one, or if it fails to load, the kind's mark. */
104
+ thumbnailSrc?: string;
105
+ };
106
+ /** Per-tab counts. Any that are missing render as the tab's word alone. */
107
+ export type ShelfCounts = Partial<Record<ShelfTab, number>>;
108
+ /**
109
+ * "Sep 14" in a row, "Sep 12, 2026" in the drawer. English months, the
110
+ * reader's own time zone, which is how the Console prints every other date.
111
+ */
112
+ export declare function formatShelfDate(value: ShelfItem["movedAt"], style?: "short" | "long"): string;
113
+ declare const THUMB_SIZE: {
114
+ readonly row: "h-10 w-16 rounded-2xs";
115
+ readonly card: "h-[70px] w-28 rounded-xs";
116
+ readonly sheet: "h-[70px] w-28 rounded-xs";
117
+ readonly preview: "aspect-[16/9] w-full rounded-lg";
118
+ };
119
+ /**
120
+ * The picture, or the kind's mark on the kind's tint when there is none.
121
+ *
122
+ * Decorative in both forms (`alt=""`, `aria-hidden` mark): the name is always
123
+ * beside it, and a screenshot of an app has nothing a screen reader needs. A
124
+ * picture that fails to load falls back to the mark rather than a broken box.
125
+ */
126
+ declare function ShelfThumbnail({ item, size, className, }: {
127
+ item: Pick<ShelfItem, "kind" | "thumbnailSrc">;
128
+ size?: keyof typeof THUMB_SIZE;
129
+ className?: string;
130
+ }): React.JSX.Element;
131
+ /** The grey pill and its detail line. */
132
+ declare function ShelfReasonTag({ reason, className }: {
133
+ reason: ShelfReason;
134
+ className?: string;
135
+ }): React.JSX.Element;
136
+ /** The row's "..." menu. Delete is its only item (frame 06). */
137
+ declare function ShelfRowMenu({ item, onRequestDelete, }: {
138
+ item: ShelfItem;
139
+ onRequestDelete: (item: ShelfItem) => void;
140
+ }): React.JSX.Element;
141
+ type RowActions = {
142
+ /** The reader asked to see an item: its name was pressed, or its row clicked. */
143
+ onOpenDetails?: (item: ShelfItem) => void;
144
+ onMoveToGrid?: (item: ShelfItem) => void;
145
+ /** The reader picked Delete in a row's menu. Absent, the menu is not drawn. */
146
+ onRequestDelete?: (item: ShelfItem) => void;
147
+ /** The item whose details are open; its row is drawn selected. */
148
+ selectedId?: string | null;
149
+ /** Items with a Move to grid in flight. */
150
+ movingIds?: ReadonlySet<string>;
151
+ };
152
+ /**
153
+ * The List view (frame 01): Creation, Why it's here, Moved here, actions.
154
+ *
155
+ * A real `<table>` with a header row, because it is one: four facts per item in
156
+ * columns a reader compares down the page. The name is a button that opens the
157
+ * details, which is the keyboard path; a click anywhere else on the row does the
158
+ * same for a mouse, and ignores clicks that land on the row's own buttons.
159
+ */
160
+ declare function ShelfTable({ items, onOpenDetails, onMoveToGrid, onRequestDelete, selectedId, movingIds, caption, className, }: RowActions & {
161
+ items: readonly ShelfItem[];
162
+ /** The table's accessible name. Rendered for screen readers only. */
163
+ caption?: string;
164
+ className?: string;
165
+ }): React.JSX.Element;
166
+ /**
167
+ * One item as a card (frames 02 and 09).
168
+ *
169
+ * Two arrangements by container query on the card itself. Wide (a Compact
170
+ * column on a desktop): picture, three lines, Move to grid and the menu in a
171
+ * row. Narrow (a phone): a smaller picture and two lines with the menu top
172
+ * right, and Move to grid full width underneath, which is frame 09 exactly,
173
+ * detail line and all left out.
174
+ */
175
+ declare function ShelfCard({ item, onOpenDetails, onMoveToGrid, onRequestDelete, selected, moving, }: Omit<RowActions, "selectedId" | "movingIds"> & {
176
+ item: ShelfItem;
177
+ selected?: boolean;
178
+ moving?: boolean;
179
+ }): React.JSX.Element;
180
+ /**
181
+ * The cards as a list. `columns="auto"` is two columns from 48rem of shelf and
182
+ * one below, which is the Compact view; `columns={1}` is one at every width,
183
+ * which is the List view on a phone.
184
+ */
185
+ declare function ShelfCardList({ items, columns, label, onOpenDetails, onMoveToGrid, onRequestDelete, selectedId, movingIds, className, }: RowActions & {
186
+ items: readonly ShelfItem[];
187
+ columns?: "auto" | 1;
188
+ /** The list's accessible name. */
189
+ label?: string;
190
+ className?: string;
191
+ }): React.JSX.Element;
192
+ /** What the reason tabs, search and sort do: work, go, or show and refuse. */
193
+ export declare const SHELF_QUERY_CONTROLS_ORDER: readonly ["enabled", "hidden", "disabled"];
194
+ export type ShelfQueryControls = (typeof SHELF_QUERY_CONTROLS_ORDER)[number];
195
+ /**
196
+ * Reason tabs, then search, sort and the view toggle (frames 01, 08 and 09).
197
+ *
198
+ * Every control is controlled: the toolbar reports and the caller decides,
199
+ * because what a tab or a sort MEANS is a server query (spec, Part D).
200
+ *
201
+ * - The reason tabs are `Tabs` with the `pill` list: the chips frame 09 draws,
202
+ * scrolling rather than wrapping on a phone. A count renders only when the
203
+ * caller has one; "All" alone is honest, "All 0" while loading is not.
204
+ * - The view toggle is `Tabs` with the default list, the library's segmented
205
+ * control. Hidden under 48rem of shelf, where there is one view.
206
+ * - Sort is a `DropdownMenu` radio group, so the current order carries the tick
207
+ * frame 08 draws and a screen reader hears which one is checked.
208
+ *
209
+ * ## `queryControls`, for a caller whose server cannot filter yet
210
+ *
211
+ * The tabs, the search and the sort are QUERIES. Until the server answers them
212
+ * (spec, Part D), a caller holding a paged list must not offer them, because
213
+ * answering them in the browser over the rows it happens to have loaded is the
214
+ * silent data loss the spec forbids. So:
215
+ *
216
+ * "enabled" the default: all of it works
217
+ * "hidden" the three are not rendered at all; the List/Compact toggle
218
+ * stays, because the view is presentation, not a query
219
+ * "disabled" the three render, dimmed and refusing: the tabs and the sort
220
+ * are disabled, the search field is a real `disabled` input so
221
+ * Tab skips it (no focusable dead box), each group carries
222
+ * `aria-disabled`, and none of them calls back. One tab stop
223
+ * is left on purpose: Base UI keeps the selected tab focusable
224
+ * while disabled (the ARIA pattern for a disabled tab), and that
225
+ * is where a screen reader hears `queryHint`.
226
+ *
227
+ * `queryHint` is the one line saying why, where the controls are or would be.
228
+ * When the controls are disabled it also describes them (`aria-describedby`), so
229
+ * a screen reader that lands on a dimmed tab hears the reason.
230
+ */
231
+ declare function ShelfToolbar({ tab, onTabChange, counts, query, onSearch, sort, onSort, view, onViewChange, showControls, queryControls, queryHint, className, }: {
232
+ tab: ShelfTab;
233
+ onTabChange?: (tab: ShelfTab) => void;
234
+ counts?: ShelfCounts;
235
+ query: string;
236
+ onSearch?: (query: string) => void;
237
+ sort: ShelfSort;
238
+ onSort?: (sort: ShelfSort) => void;
239
+ view: ShelfView;
240
+ onViewChange?: (view: ShelfView) => void;
241
+ /** False draws the tabs alone: the empty shelf (frame 05) has nothing to search. */
242
+ showControls?: boolean;
243
+ /** Whether the reason tabs, search and sort work, are left out, or show disabled. */
244
+ queryControls?: ShelfQueryControls;
245
+ /**
246
+ * One quiet line where the query controls are or would be, saying why they are
247
+ * off. Shown with `"hidden"` and `"disabled"` only: beside working controls it
248
+ * would be a reason for nothing.
249
+ */
250
+ queryHint?: React.ReactNode;
251
+ className?: string;
252
+ }): React.JSX.Element | null;
253
+ /**
254
+ * "Showing 6 of 24 creations" and Show more. The count line needs `total`; a
255
+ * caller without one (no server count yet, spec Part C) gets Show more alone.
256
+ */
257
+ declare function ShelfFooter({ shown, total, hasMore, onShowMore, loadingMore, className, }: {
258
+ shown: number;
259
+ total?: number;
260
+ hasMore?: boolean;
261
+ onShowMore?: () => void;
262
+ loadingMore?: boolean;
263
+ className?: string;
264
+ }): React.JSX.Element | null;
265
+ /**
266
+ * The empty shelf (frame 05). The way out is a link when `backHref` is given,
267
+ * rendered through `linkComponent` (Next's `Link`, say), or a button for
268
+ * `onBack` alone.
269
+ */
270
+ declare function ShelfEmpty({ backHref, onBack, backLabel, linkComponent, title, description, headingLevel, className, }: {
271
+ backHref?: string;
272
+ onBack?: () => void;
273
+ backLabel?: string;
274
+ linkComponent?: React.ElementType;
275
+ title?: React.ReactNode;
276
+ description?: React.ReactNode;
277
+ headingLevel?: 2 | 3;
278
+ className?: string;
279
+ }): React.JSX.Element;
280
+ /**
281
+ * The details drawer (frame 03), or the bottom sheet on a phone (frame 09b).
282
+ *
283
+ * The library `Drawer` at its `md` rung, 448, which is every Console drawer.
284
+ * What it says is the frames' list and nothing more: no Open app, because
285
+ * nothing on the shelf is live, and no Last opened, because the platform does
286
+ * not record it (annotation 9837:8842).
287
+ *
288
+ * Move to grid is the page's primary action, so it takes the Console's primary
289
+ * variant (`cta`, the teal, `PrimaryAction`). Delete is a quiet red link under
290
+ * it and opens the confirm dialog; the caller decides what that means.
291
+ */
292
+ declare function ShelfItemDetails({ item, open, onOpenChange, side, onMoveToGrid, onRequestDelete, moving, container, }: {
293
+ item: ShelfItem | null;
294
+ open: boolean;
295
+ onOpenChange: (open: boolean) => void;
296
+ side?: "right" | "bottom";
297
+ onMoveToGrid?: (item: ShelfItem) => void;
298
+ onRequestDelete?: (item: ShelfItem) => void;
299
+ moving?: boolean;
300
+ /** Forwarded to the portal, for a drawer that must stay inside a surface scope. */
301
+ container?: React.ComponentProps<typeof DrawerContent>["container"];
302
+ }): React.JSX.Element;
303
+ /**
304
+ * "{name} moved to your grid", with View grid when the caller can take the
305
+ * reader there (frame 04). No Undo: moving it back is what the Shelf is for.
306
+ *
307
+ * Fires through the library `Toaster` (`sonner`), which the Console already
308
+ * mounts once at its root. Returns the toast's id.
309
+ */
310
+ export declare function toastMovedToGrid(name: string, { onViewGrid, viewGridLabel }?: {
311
+ onViewGrid?: () => void;
312
+ viewGridLabel?: string;
313
+ }): string | number;
314
+ export type ShelfProps = {
315
+ /** What to show: the server's page for the current tab, search and sort. */
316
+ items: readonly ShelfItem[];
317
+ /** Per-tab counts from the server. Missing ones render as the word alone. */
318
+ counts?: ShelfCounts;
319
+ /** The total for the current tab and search, for "Showing 6 of 24". */
320
+ total?: number;
321
+ /** More pages exist; draws Show more when `onShowMore` is given. */
322
+ hasMore?: boolean;
323
+ onShowMore?: () => void;
324
+ loadingMore?: boolean;
325
+ tab?: ShelfTab;
326
+ defaultTab?: ShelfTab;
327
+ onTabChange?: (tab: ShelfTab) => void;
328
+ query?: string;
329
+ defaultQuery?: string;
330
+ /** Every keystroke. Debounce on the caller's side if the server needs it. */
331
+ onSearch?: (query: string) => void;
332
+ sort?: ShelfSort;
333
+ defaultSort?: ShelfSort;
334
+ onSort?: (sort: ShelfSort) => void;
335
+ view?: ShelfView;
336
+ defaultView?: ShelfView;
337
+ onViewChange?: (view: ShelfView) => void;
338
+ /** Move to grid, from a row or the drawer. A returned promise disables the button until it settles. */
339
+ onMoveToGrid?: (item: ShelfItem) => void | Promise<void>;
340
+ /**
341
+ * The CONFIRMED delete, after the reader has typed the slug. A returned promise
342
+ * keeps the dialog open and pending until it settles; a rejection shows
343
+ * `deleteErrorMessage` and keeps it open. Absent, no Delete is offered anywhere.
344
+ */
345
+ onDelete?: (item: ShelfItem) => void | Promise<void>;
346
+ deleteErrorMessage?: string;
347
+ /** A row or card was opened; the drawer opens either way. */
348
+ onOpenDetails?: (item: ShelfItem) => void;
349
+ /**
350
+ * Whether the reason tabs, search and sort work (`"enabled"`, the default), are
351
+ * left out (`"hidden"`), or show disabled (`"disabled"`). For a caller whose
352
+ * server cannot answer them yet: answering them over a partly loaded list is
353
+ * silent data loss. The List/Compact toggle is unaffected.
354
+ */
355
+ queryControls?: ShelfQueryControls;
356
+ /** Why the query controls are off, in one line where they are or would be. Not shown on an empty shelf. */
357
+ queryHint?: React.ReactNode;
358
+ /** The empty state's way out. */
359
+ emptyBackHref?: string;
360
+ onEmptyBack?: () => void;
361
+ linkComponent?: React.ElementType;
362
+ /**
363
+ * Where the details open. `auto` is a bottom sheet under 768px of window and
364
+ * a right-hand drawer above.
365
+ */
366
+ detailsSide?: "auto" | "right" | "bottom";
367
+ className?: string;
368
+ };
369
+ /**
370
+ * The whole Shelf body, as frames 01 to 09b compose it: toolbar, then the
371
+ * table, the cards or the empty state, then the footer, plus the drawer and the
372
+ * delete dialog it opens.
373
+ *
374
+ * NOT in it: the page around it. The breadcrumb, the "Shelf" title and its
375
+ * subtitle, the white box and the Back pill are the Console's page frame, and the
376
+ * gallery's full-page frame draws them at the Console's measured sizes.
377
+ *
378
+ * Empty means the server says the whole shelf is empty: `counts.all === 0`, or
379
+ * no counts, no items, the All tab and no search. A tab or a search with no
380
+ * results is not an empty shelf, and says so in one line instead.
381
+ */
382
+ declare function Shelf({ items, counts, total, hasMore, onShowMore, loadingMore, tab: tabProp, defaultTab, onTabChange, query: queryProp, defaultQuery, onSearch, sort: sortProp, defaultSort, onSort, view: viewProp, defaultView, onViewChange, onMoveToGrid, onDelete, deleteErrorMessage, onOpenDetails, emptyBackHref, onEmptyBack, linkComponent, detailsSide, queryControls, queryHint, className, }: ShelfProps): React.JSX.Element;
383
+ export { Shelf, ShelfCard, ShelfCardList, ShelfEmpty, ShelfFooter, ShelfItemDetails, ShelfReasonTag, ShelfRowMenu, ShelfTable, ShelfThumbnail, ShelfToolbar, };
384
+ //# sourceMappingURL=shelf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shelf.d.ts","sourceRoot":"","sources":["../../src/blocks/shelf.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAA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AS,EAChB,YAAiB,EACjB,QAAQ,EACR,IAAI,EAAE,QAAQ,EACd,WAAsB,EACtB,MAAM,EACN,IAAI,EAAE,QAAQ,EACd,WAAoB,EACpB,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,kBAA4D,EAC5D,aAAa,EACb,aAAa,EACb,WAAW,EACX,aAAa,EACb,WAAoB,EACpB,aAAyB,EACzB,SAAS,EACT,SAAS,GACV,EAAE,UAAU,qBA4JZ;AAED,OAAO,EACL,KAAK,EACL,SAAS,EACT,aAAa,EACb,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,UAAU,EACV,cAAc,EACd,YAAY,GACb,CAAA"}
@@ -0,0 +1,489 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { toast } from "sonner";
5
+ import { cn } from "../lib/cloudgrid-cn.js";
6
+ import { Badge } from "../ui/badge.js";
7
+ import { Button } from "../ui/button.js";
8
+ import { ConfirmDeleteDialog } from "./confirm-delete-dialog.js";
9
+ import { Drawer, DrawerBody, DrawerContent, DrawerHeader, } from "../ui/drawer.js";
10
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuTrigger, } from "../ui/dropdown-menu.js";
11
+ import { ENTITY_KIND_ICON, ENTITY_KIND_LABEL, ENTITY_KIND_TINT, } from "./entity-card.js";
12
+ import { EntityStatus } from "./entity-status.js";
13
+ import { ChevronDownIcon, MoreActionsIcon, SearchIcon } from "./icons.js";
14
+ import { InputGroup, InputGroupAddon, InputGroupInput } from "../ui/input-group.js";
15
+ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "../ui/table.js";
16
+ import { Tabs, TabsList, TabsTrigger } from "../ui/tabs.js";
17
+ /**
18
+ * The Shelf (Shelf spec 2026-10-07, Part B): where things that expired or were
19
+ * never published go on their own, and where they are moved back from.
20
+ *
21
+ * Figma `5ouhISIL0mwYGHurvCGoEO`, section "Shelf v2 - 2026-10-07" (9834:7965),
22
+ * frames 01 to 09b. The frames are the LAYOUT. The sizes are the Console's: the
23
+ * founder's instruction was that the Shelf look like the app page and the grid
24
+ * settings page do as they render, so every height and type size below is the
25
+ * one measured off those pages (audit log `2026-10-07-shelf-blocks.md`, step 0)
26
+ * and expressed with the library primitive that already produces it:
27
+ *
28
+ * table head 40, 15/500 `TableHead` as is
29
+ * row 57 (two lines) `TableCell` as is, 8 padding
30
+ * reason pill 20, 13/500 `Badge variant="secondary"`, the Versions table's grey pill
31
+ * row buttons 28, 13/500 `Button size="sm"` / `size="icon-sm"`, the app header's rung
32
+ * toolbar 32 `InputGroup`, `Button`, `Tabs` default, all h-8
33
+ * drawer 448 `DrawerContent size="md"`, every Console drawer
34
+ *
35
+ * ## What is in here
36
+ *
37
+ * The parts, each usable alone, and `Shelf`, which composes them the way the
38
+ * frames do and owns the transient state between them: which row's drawer is
39
+ * open, which item the delete dialog is about, which rows are mid-request.
40
+ *
41
+ * ShelfToolbar reason tabs with counts, search, sort menu, List/Compact
42
+ * ShelfTable the List view: a real <table>
43
+ * ShelfCardList the Compact view, and every view under 768px of shelf
44
+ * ShelfItemDetails the drawer (right) or bottom sheet (phone)
45
+ * ShelfEmpty "Your shelf is empty"
46
+ * ShelfFooter "Showing 6 of 24 creations" and Show more
47
+ * toastMovedToGrid the confirmation toast, no Undo
48
+ *
49
+ * The type-to-confirm dialog is its own module, `confirm-delete-dialog`,
50
+ * because nothing about it is Shelf-specific.
51
+ *
52
+ * ## Data-agnostic
53
+ *
54
+ * Nothing here fetches, filters, sorts or counts. The spec is explicit that the
55
+ * counts, search and sort come from the server (Part D) and that the Console must
56
+ * not filter a truncated list in the browser, so the blocks only REPORT what the
57
+ * reader asked for (`onTabChange`, `onSearch`, `onSort`) and render the `items`
58
+ * they are handed. Counts are optional: until the server sends them, a tab is
59
+ * its word alone.
60
+ *
61
+ * ## Narrow
62
+ *
63
+ * By container query on the block, not the window: under 48rem of shelf the
64
+ * table becomes the stacked cards, the cards go to one column with a full-width
65
+ * Move to grid, and the sort menu and view toggle leave (frame 09 draws neither).
66
+ * The reason tabs are the library's `pill` chips at every width, which is what
67
+ * frame 09 draws and what scrolls rather than wraps on a phone. The drawer is
68
+ * the one thing that asks the WINDOW, because a sheet is a property of the
69
+ * screen: `detailsSide="auto"` is a bottom sheet under 768px, the Console's own
70
+ * phone breakpoint.
71
+ */
72
+ /* ------------------------------------------------------------------ */
73
+ /* Model and copy */
74
+ /* ------------------------------------------------------------------ */
75
+ /**
76
+ * Why something is on the shelf. The reason follows the kind (spec, "The
77
+ * model"): a page only ever expires, an app or agent is only ever never
78
+ * published. The Console derives it from `realm`; the block takes it as given.
79
+ */
80
+ export const SHELF_REASON_ORDER = ["expired", "never_published"];
81
+ /** The pill's word. */
82
+ export const SHELF_REASON_LABEL = {
83
+ expired: "Expired",
84
+ never_published: "Never published",
85
+ };
86
+ /** The line beside the pill. Library copy, from the frames' annotation. */
87
+ export const SHELF_REASON_DETAIL = {
88
+ expired: "Its end date passed",
89
+ never_published: "Not published for 14 days",
90
+ };
91
+ /** The reason tabs. `all` first, then the reasons in their own order. */
92
+ export const SHELF_TAB_ORDER = ["all", ...SHELF_REASON_ORDER];
93
+ export const SHELF_TAB_LABEL = {
94
+ all: "All",
95
+ ...SHELF_REASON_LABEL,
96
+ };
97
+ /** The sort menu, in the order frame 08 lists it. The first is the default. */
98
+ export const SHELF_SORT_ORDER = ["recent", "oldest", "name"];
99
+ export const SHELF_SORT_LABEL = {
100
+ recent: "Recently moved here",
101
+ oldest: "Oldest first",
102
+ name: "Name A–Z",
103
+ };
104
+ export const SHELF_VIEW_ORDER = ["list", "compact"];
105
+ export const SHELF_VIEW_LABEL = {
106
+ list: "List",
107
+ compact: "Compact",
108
+ };
109
+ export const SHELF_EMPTY_TITLE = "Your shelf is empty";
110
+ export const SHELF_EMPTY_DESCRIPTION = "Things that expire or are never published will show up here on their own.";
111
+ export const SHELF_NO_MATCHES = "Nothing on your shelf matches that.";
112
+ export const SHELF_SEARCH_PLACEHOLDER = "Search your shelf";
113
+ export const SHELF_AVAILABILITY_NOTE = "Move it to your grid to bring it back.";
114
+ export const SHELF_MOVE_LABEL = "Move to grid";
115
+ /** The toast after a move. No Undo: the move is the undo. */
116
+ export function shelfMovedMessage(name) {
117
+ return `${name} moved to your grid`;
118
+ }
119
+ /**
120
+ * "Sep 14" in a row, "Sep 12, 2026" in the drawer. English months, the
121
+ * reader's own time zone, which is how the Console prints every other date.
122
+ */
123
+ export function formatShelfDate(value, style = "short") {
124
+ const date = value instanceof Date ? value : new Date(value);
125
+ if (Number.isNaN(date.getTime()))
126
+ return "";
127
+ return new Intl.DateTimeFormat("en-US", {
128
+ month: "short",
129
+ day: "numeric",
130
+ ...(style === "long" ? { year: "numeric" } : {}),
131
+ }).format(date);
132
+ }
133
+ function kindWord(item) {
134
+ return item.kindLabel ?? ENTITY_KIND_LABEL[item.kind];
135
+ }
136
+ /* ------------------------------------------------------------------ */
137
+ /* Small parts */
138
+ /* ------------------------------------------------------------------ */
139
+ const THUMB_SIZE = {
140
+ row: "h-10 w-16 rounded-2xs",
141
+ card: "h-[70px] w-28 rounded-xs",
142
+ sheet: "h-[70px] w-28 rounded-xs",
143
+ preview: "aspect-[16/9] w-full rounded-lg",
144
+ };
145
+ const THUMB_MARK = {
146
+ row: "size-5",
147
+ card: "size-7",
148
+ sheet: "size-7",
149
+ preview: "size-12",
150
+ };
151
+ /**
152
+ * The picture, or the kind's mark on the kind's tint when there is none.
153
+ *
154
+ * Decorative in both forms (`alt=""`, `aria-hidden` mark): the name is always
155
+ * beside it, and a screenshot of an app has nothing a screen reader needs. A
156
+ * picture that fails to load falls back to the mark rather than a broken box.
157
+ */
158
+ function ShelfThumbnail({ item, size = "row", className, }) {
159
+ const [failed, setFailed] = React.useState(false);
160
+ const Mark = ENTITY_KIND_ICON[item.kind];
161
+ const src = failed ? undefined : item.thumbnailSrc;
162
+ // A new picture gets a fresh chance.
163
+ React.useEffect(() => setFailed(false), [item.thumbnailSrc]);
164
+ return (_jsx("span", { "data-slot": "shelf-thumbnail", "data-fallback": src ? undefined : "", className: cn("relative flex shrink-0 items-center justify-center overflow-hidden border border-hairline", THUMB_SIZE[size], src ? "bg-raised" : cn(ENTITY_KIND_TINT[item.kind], "text-on-accent"), className), children: src ? (_jsx("img", { src: src, alt: "", loading: "lazy", decoding: "async", onError: () => setFailed(true), className: "size-full object-cover object-top" })) : (_jsx(Mark, { className: THUMB_MARK[size] })) }));
165
+ }
166
+ /** The grey pill and its detail line. */
167
+ function ShelfReasonTag({ reason, className }) {
168
+ return (_jsxs("span", { "data-slot": "shelf-reason", "data-reason": reason, className: cn("flex min-w-0 items-center gap-2", className), children: [_jsx(Badge, { variant: "secondary", children: SHELF_REASON_LABEL[reason] }), _jsx("span", { className: "truncate text-caption text-faint", children: SHELF_REASON_DETAIL[reason] })] }));
169
+ }
170
+ /** The row's "..." menu. Delete is its only item (frame 06). */
171
+ function ShelfRowMenu({ item, onRequestDelete, }) {
172
+ return (_jsxs(DropdownMenu, { children: [_jsxs(DropdownMenuTrigger, { "data-slot": "shelf-row-menu", render: _jsx(Button, { variant: "ghost", size: "icon-sm", className: "text-body" }), children: [_jsx(MoreActionsIcon, {}), _jsxs("span", { className: "sr-only", children: ["More actions for ", item.name] })] }), _jsx(DropdownMenuContent, { align: "end", className: "w-44", children: _jsx(DropdownMenuItem, { variant: "destructive", className: "px-2.5 py-2 text-danger-strong data-[variant=destructive]:text-danger-strong", onClick: () => onRequestDelete(item), children: "Delete" }) })] }));
173
+ }
174
+ function MoveButton({ item, moving, onMoveToGrid, className, }) {
175
+ return (_jsx(Button, { variant: "outline", size: "sm", "data-slot": "shelf-move", disabled: moving, "aria-label": `${SHELF_MOVE_LABEL}: ${item.name}`, onClick: () => onMoveToGrid?.(item), className: className, children: moving ? "Moving" : SHELF_MOVE_LABEL }));
176
+ }
177
+ /** True when a click landed on something that acts on its own. */
178
+ function fromControl(event) {
179
+ return Boolean(event.target.closest("button, a, input, [role=menuitem]"));
180
+ }
181
+ /**
182
+ * The List view (frame 01): Creation, Why it's here, Moved here, actions.
183
+ *
184
+ * A real `<table>` with a header row, because it is one: four facts per item in
185
+ * columns a reader compares down the page. The name is a button that opens the
186
+ * details, which is the keyboard path; a click anywhere else on the row does the
187
+ * same for a mouse, and ignores clicks that land on the row's own buttons.
188
+ */
189
+ function ShelfTable({ items, onOpenDetails, onMoveToGrid, onRequestDelete, selectedId, movingIds, caption = "Your shelf", className, }) {
190
+ return (_jsx("div", { "data-slot": "shelf-table", className: cn("overflow-hidden rounded-xl border border-hairline bg-card", className), children: _jsxs(Table, { className: "table-fixed", children: [_jsx("caption", { className: "sr-only", children: caption }), _jsx(TableHeader, { children: _jsxs(TableRow, { className: "hover:bg-transparent", children: [_jsx(TableHead, { className: "w-auto pl-4", children: "Creation" }), _jsx(TableHead, { className: "w-[34%]", children: "Why it's here" }), _jsx(TableHead, { className: "w-[13%]", children: "Moved here" }), _jsx(TableHead, { className: "w-[168px] pr-4", children: _jsx("span", { className: "sr-only", children: "Actions" }) })] }) }), _jsx(TableBody, { children: items.map((item) => {
191
+ const selected = selectedId === item.id;
192
+ return (_jsxs(TableRow, { "data-slot": "shelf-row", "data-id": item.id, "data-state": selected ? "selected" : undefined, onClick: (event) => {
193
+ if (!onOpenDetails || fromControl(event))
194
+ return;
195
+ onOpenDetails(item);
196
+ }, className: cn(onOpenDetails && "cursor-pointer"), children: [_jsx(TableCell, { className: "pl-4", children: _jsxs("span", { className: "flex min-w-0 items-center gap-3", children: [_jsx(ShelfThumbnail, { item: item }), _jsxs("span", { className: "flex min-w-0 flex-col", children: [onOpenDetails ? (_jsx("button", { type: "button", "aria-haspopup": "dialog", onClick: () => onOpenDetails(item), className: "w-fit max-w-full cursor-pointer truncate rounded-xs text-left text-body-sm font-medium text-ink outline-none hover:underline focus-visible:ring-3 focus-visible:ring-ring", children: item.name })) : (_jsx("span", { className: "truncate text-body-sm font-medium text-ink", children: item.name })), _jsx("span", { className: "truncate text-caption text-faint", children: kindWord(item) })] })] }) }), _jsx(TableCell, { children: _jsx(ShelfReasonTag, { reason: item.reason }) }), _jsx(TableCell, { className: "tabular-nums text-ink", children: _jsx("time", { dateTime: new Date(item.movedAt).toISOString(), children: formatShelfDate(item.movedAt) }) }), _jsx(TableCell, { className: "pr-4", children: _jsxs("span", { className: "flex items-center justify-end gap-1", children: [_jsx(MoveButton, { item: item, moving: movingIds?.has(item.id), onMoveToGrid: onMoveToGrid }), onRequestDelete ? _jsx(ShelfRowMenu, { item: item, onRequestDelete: onRequestDelete }) : null] }) })] }, item.id));
197
+ }) })] }) }));
198
+ }
199
+ /* ------------------------------------------------------------------ */
200
+ /* Compact view, and every view on a phone: the cards */
201
+ /* ------------------------------------------------------------------ */
202
+ /**
203
+ * One item as a card (frames 02 and 09).
204
+ *
205
+ * Two arrangements by container query on the card itself. Wide (a Compact
206
+ * column on a desktop): picture, three lines, Move to grid and the menu in a
207
+ * row. Narrow (a phone): a smaller picture and two lines with the menu top
208
+ * right, and Move to grid full width underneath, which is frame 09 exactly,
209
+ * detail line and all left out.
210
+ */
211
+ function ShelfCard({ item, onOpenDetails, onMoveToGrid, onRequestDelete, selected, moving, }) {
212
+ const identity = (_jsxs(_Fragment, { children: [_jsx(ShelfThumbnail, { item: item, size: "card", className: "@max-md/shelf-card:h-10 @max-md/shelf-card:w-16 @max-md/shelf-card:rounded-2xs" }), _jsxs("span", { className: "flex min-w-0 flex-col gap-0.5", children: [_jsx("span", { className: "line-clamp-2 text-body-sm font-medium text-ink", children: item.name }), _jsxs("span", { className: "truncate text-caption text-body", children: [SHELF_REASON_LABEL[item.reason], " \u00B7 ", formatShelfDate(item.movedAt)] }), _jsx("span", { className: "truncate text-caption text-faint @max-md/shelf-card:hidden", children: SHELF_REASON_DETAIL[item.reason] })] })] }));
213
+ return (_jsx("li", { "data-slot": "shelf-card", "data-id": item.id, "data-state": selected ? "selected" : undefined, className: "@container/shelf-card list-none", children: _jsxs("div", { className: cn("flex items-center gap-3 rounded-xl border border-hairline bg-card p-4 transition-colors", "@max-md/shelf-card:flex-wrap @max-md/shelf-card:gap-y-3", selected && "border-line bg-muted/50"), children: [onOpenDetails ? (_jsx("button", { type: "button", "aria-haspopup": "dialog", "aria-label": `${item.name}, ${kindWord(item)}. Open details`, onClick: () => onOpenDetails(item), className: "flex min-w-0 flex-1 cursor-pointer items-center gap-4 rounded-md text-left outline-none focus-visible:ring-3 focus-visible:ring-ring @max-md/shelf-card:gap-3", children: identity })) : (_jsx("span", { className: "flex min-w-0 flex-1 items-center gap-4 @max-md/shelf-card:gap-3", children: identity })), _jsx(MoveButton, { item: item, moving: moving, onMoveToGrid: onMoveToGrid, className: "@max-md/shelf-card:order-last @max-md/shelf-card:h-8 @max-md/shelf-card:w-full" }), onRequestDelete ? _jsx(ShelfRowMenu, { item: item, onRequestDelete: onRequestDelete }) : null] }) }));
214
+ }
215
+ /**
216
+ * The cards as a list. `columns="auto"` is two columns from 48rem of shelf and
217
+ * one below, which is the Compact view; `columns={1}` is one at every width,
218
+ * which is the List view on a phone.
219
+ */
220
+ function ShelfCardList({ items, columns = "auto", label = "Your shelf", onOpenDetails, onMoveToGrid, onRequestDelete, selectedId, movingIds, className, }) {
221
+ return (_jsx("div", { className: cn("@container/shelf-cards", className), children: _jsx("ul", { "data-slot": "shelf-cards", "aria-label": label, className: cn("m-0 grid list-none gap-3 p-0", columns === "auto" && "@3xl/shelf-cards:grid-cols-2 @3xl/shelf-cards:gap-4"), children: items.map((item) => (_jsx(ShelfCard, { item: item, onOpenDetails: onOpenDetails, onMoveToGrid: onMoveToGrid, onRequestDelete: onRequestDelete, selected: selectedId === item.id, moving: movingIds?.has(item.id) }, item.id))) }) }));
222
+ }
223
+ /* ------------------------------------------------------------------ */
224
+ /* Toolbar */
225
+ /* ------------------------------------------------------------------ */
226
+ /** What the reason tabs, search and sort do: work, go, or show and refuse. */
227
+ export const SHELF_QUERY_CONTROLS_ORDER = ["enabled", "hidden", "disabled"];
228
+ /**
229
+ * Reason tabs, then search, sort and the view toggle (frames 01, 08 and 09).
230
+ *
231
+ * Every control is controlled: the toolbar reports and the caller decides,
232
+ * because what a tab or a sort MEANS is a server query (spec, Part D).
233
+ *
234
+ * - The reason tabs are `Tabs` with the `pill` list: the chips frame 09 draws,
235
+ * scrolling rather than wrapping on a phone. A count renders only when the
236
+ * caller has one; "All" alone is honest, "All 0" while loading is not.
237
+ * - The view toggle is `Tabs` with the default list, the library's segmented
238
+ * control. Hidden under 48rem of shelf, where there is one view.
239
+ * - Sort is a `DropdownMenu` radio group, so the current order carries the tick
240
+ * frame 08 draws and a screen reader hears which one is checked.
241
+ *
242
+ * ## `queryControls`, for a caller whose server cannot filter yet
243
+ *
244
+ * The tabs, the search and the sort are QUERIES. Until the server answers them
245
+ * (spec, Part D), a caller holding a paged list must not offer them, because
246
+ * answering them in the browser over the rows it happens to have loaded is the
247
+ * silent data loss the spec forbids. So:
248
+ *
249
+ * "enabled" the default: all of it works
250
+ * "hidden" the three are not rendered at all; the List/Compact toggle
251
+ * stays, because the view is presentation, not a query
252
+ * "disabled" the three render, dimmed and refusing: the tabs and the sort
253
+ * are disabled, the search field is a real `disabled` input so
254
+ * Tab skips it (no focusable dead box), each group carries
255
+ * `aria-disabled`, and none of them calls back. One tab stop
256
+ * is left on purpose: Base UI keeps the selected tab focusable
257
+ * while disabled (the ARIA pattern for a disabled tab), and that
258
+ * is where a screen reader hears `queryHint`.
259
+ *
260
+ * `queryHint` is the one line saying why, where the controls are or would be.
261
+ * When the controls are disabled it also describes them (`aria-describedby`), so
262
+ * a screen reader that lands on a dimmed tab hears the reason.
263
+ */
264
+ function ShelfToolbar({ tab, onTabChange, counts, query, onSearch, sort, onSort, view, onViewChange, showControls = true, queryControls = "enabled", queryHint, className, }) {
265
+ const hintId = React.useId();
266
+ const hidden = queryControls === "hidden";
267
+ const disabled = queryControls === "disabled";
268
+ const describedBy = disabled && queryHint ? hintId : undefined;
269
+ const hint = queryHint && queryControls !== "enabled" ? (_jsx("p", { id: hintId, "data-slot": "shelf-query-hint", className: "m-0 min-w-0 flex-1 text-caption text-body", children: queryHint })) : null;
270
+ const viewToggle = (_jsx(Tabs, { value: view, onValueChange: (value) => onViewChange?.(value), className: "ml-auto hidden @3xl/shelf-toolbar:flex", children: _jsx(TabsList, { "aria-label": "View", "data-slot": "shelf-view", children: SHELF_VIEW_ORDER.map((value) => (_jsx(TabsTrigger, { value: value, className: "px-3", children: SHELF_VIEW_LABEL[value] }, value))) }) }));
271
+ if (hidden && !showControls && !hint)
272
+ return null;
273
+ return (_jsxs("div", { "data-slot": "shelf-toolbar", "data-query-controls": queryControls, className: cn("@container/shelf-toolbar flex flex-col gap-4", className), children: [hidden ? null : (_jsx(Tabs, { value: tab, onValueChange: (value) => {
274
+ if (!disabled)
275
+ onTabChange?.(value);
276
+ }, children: _jsx(TabsList, { variant: "pill", "aria-label": "Filter by reason", "aria-disabled": disabled || undefined, "aria-describedby": describedBy, "data-slot": "shelf-tabs", children: SHELF_TAB_ORDER.map((value) => (_jsxs(TabsTrigger, { value: value, "data-tab": value, disabled: disabled, "aria-describedby": describedBy, children: [SHELF_TAB_LABEL[value], counts?.[value] !== undefined ? " " : null, counts?.[value] !== undefined ? (_jsx("span", { className: "tabular-nums", "data-slot": "shelf-tab-count", children: counts[value] })) : null] }, value))) }) })), showControls ? (_jsxs("div", { className: "flex items-center gap-3", children: [hidden ? (hint) : (_jsxs(_Fragment, { children: [_jsxs(InputGroup, { className: "min-w-0 flex-1", "data-slot": "shelf-search", "aria-disabled": disabled || undefined, "aria-describedby": describedBy, children: [_jsx(InputGroupAddon, { children: _jsx(SearchIcon, {}) }), _jsx(InputGroupInput, { type: "search", value: query, disabled: disabled, onChange: (event) => {
277
+ if (!disabled)
278
+ onSearch?.(event.target.value);
279
+ }, placeholder: SHELF_SEARCH_PLACEHOLDER, "aria-label": SHELF_SEARCH_PLACEHOLDER })] }), _jsx("div", { className: "hidden @3xl/shelf-toolbar:block", children: _jsxs(DropdownMenu, { children: [_jsxs(DropdownMenuTrigger, { "data-slot": "shelf-sort", disabled: disabled, "aria-disabled": disabled || undefined, "aria-describedby": describedBy, render: _jsx(Button, { variant: "outline", className: "min-w-52 justify-between gap-3 px-3" }), children: [_jsxs("span", { children: [_jsx("span", { className: "sr-only", children: "Sort: " }), SHELF_SORT_LABEL[sort]] }), _jsx(ChevronDownIcon, { className: "text-faint" })] }), _jsx(DropdownMenuContent, { align: "start", children: _jsx(DropdownMenuRadioGroup, { value: sort, onValueChange: (value) => {
280
+ if (!disabled)
281
+ onSort?.(value);
282
+ }, children: SHELF_SORT_ORDER.map((value) => (_jsx(DropdownMenuRadioItem, { value: value,
283
+ // Base UI keeps a radio menu open after a pick by default,
284
+ // which suits a settings menu. A sort is one choice: pick
285
+ // it and the menu goes, as frame 08 implies.
286
+ closeOnClick: true, className: "py-2 pl-2.5 data-checked:text-brand", children: SHELF_SORT_LABEL[value] }, value))) }) })] }) })] })), viewToggle] })) : hidden ? (hint) : null, !hidden && showControls ? (disabled ? hint : null) : null] }));
287
+ }
288
+ /* ------------------------------------------------------------------ */
289
+ /* Footer, empty */
290
+ /* ------------------------------------------------------------------ */
291
+ /**
292
+ * "Showing 6 of 24 creations" and Show more. The count line needs `total`; a
293
+ * caller without one (no server count yet, spec Part C) gets Show more alone.
294
+ */
295
+ function ShelfFooter({ shown, total, hasMore, onShowMore, loadingMore, className, }) {
296
+ if (total === undefined && !hasMore)
297
+ return null;
298
+ return (_jsxs("div", { "data-slot": "shelf-footer", className: cn("flex min-h-8 items-center justify-between gap-4", className), children: [_jsx("span", { className: "text-caption text-faint", "aria-live": "polite", children: total !== undefined ? `Showing ${shown} of ${total} ${total === 1 ? "creation" : "creations"}` : null }), hasMore && onShowMore ? (_jsx(Button, { variant: "ghost", size: "sm", disabled: loadingMore, onClick: onShowMore, className: "text-body-sm text-azure hover:text-azure-press", children: loadingMore ? "Loading" : "Show more" })) : null] }));
299
+ }
300
+ /**
301
+ * The empty shelf (frame 05). The way out is a link when `backHref` is given,
302
+ * rendered through `linkComponent` (Next's `Link`, say), or a button for
303
+ * `onBack` alone.
304
+ */
305
+ function ShelfEmpty({ backHref, onBack, backLabel = "Back to My stuff", linkComponent, title = SHELF_EMPTY_TITLE, description = SHELF_EMPTY_DESCRIPTION, headingLevel = 2, className, }) {
306
+ const Heading = headingLevel === 3 ? "h3" : "h2";
307
+ const Link = linkComponent ?? "a";
308
+ const linkClass = "rounded-xs text-body-sm font-medium text-azure underline-offset-4 outline-none hover:underline focus-visible:ring-3 focus-visible:ring-ring";
309
+ return (_jsxs("div", { "data-slot": "shelf-empty", className: cn("flex flex-col items-center gap-2 rounded-xl border border-hairline bg-card px-6 py-24 text-center", "max-md:py-16", className), children: [_jsx(Heading, { className: "m-0 text-heading-sm font-medium text-ink", children: title }), _jsx("p", { className: "m-0 max-w-xl text-body-sm text-body", children: description }), backHref !== undefined ? (_jsx(Link, { href: backHref, onClick: onBack, className: cn("mt-3", linkClass), children: backLabel })) : onBack ? (_jsx("button", { type: "button", onClick: onBack, className: cn("mt-3 cursor-pointer", linkClass), children: backLabel })) : null] }));
310
+ }
311
+ /* ------------------------------------------------------------------ */
312
+ /* Item details */
313
+ /* ------------------------------------------------------------------ */
314
+ /**
315
+ * The details drawer (frame 03), or the bottom sheet on a phone (frame 09b).
316
+ *
317
+ * The library `Drawer` at its `md` rung, 448, which is every Console drawer.
318
+ * What it says is the frames' list and nothing more: no Open app, because
319
+ * nothing on the shelf is live, and no Last opened, because the platform does
320
+ * not record it (annotation 9837:8842).
321
+ *
322
+ * Move to grid is the page's primary action, so it takes the Console's primary
323
+ * variant (`cta`, the teal, `PrimaryAction`). Delete is a quiet red link under
324
+ * it and opens the confirm dialog; the caller decides what that means.
325
+ */
326
+ function ShelfItemDetails({ item, open, onOpenChange, side = "right", onMoveToGrid, onRequestDelete, moving, container, }) {
327
+ // Hold the last item through the closing animation, so the sheet does not
328
+ // empty itself on the way out.
329
+ const [shown, setShown] = React.useState(item);
330
+ React.useEffect(() => {
331
+ if (item)
332
+ setShown(item);
333
+ }, [item]);
334
+ const current = item ?? shown;
335
+ return (_jsx(Drawer, { open: open && current !== null, onOpenChange: onOpenChange, children: _jsxs(DrawerContent, { side: side, size: "md", container: container, "data-slot": "shelf-details", children: [_jsx(DrawerHeader, { title: "Item details", closeLabel: "Close item details", className: "pt-6 pb-5" }), current ? (_jsxs(DrawerBody, { className: "flex flex-col gap-5 pb-6", children: [side === "bottom" ? (_jsxs("div", { className: "flex items-center gap-4", children: [_jsx(ShelfThumbnail, { item: current, size: "sheet" }), _jsx(NameAndKind, { item: current })] })) : (_jsxs(_Fragment, { children: [_jsx(ShelfThumbnail, { item: current, size: "preview" }), _jsx(NameAndKind, { item: current })] })), _jsxs("dl", { className: "m-0 grid gap-4", children: [_jsxs("div", { className: "grid gap-1", children: [_jsx("dt", { className: "text-caption text-faint", children: "On your shelf" }), _jsxs("dd", { className: "m-0 grid text-body-sm text-ink", children: [_jsx("span", { children: SHELF_REASON_LABEL[current.reason] }), _jsx("span", { children: SHELF_REASON_DETAIL[current.reason] })] })] }), _jsxs("div", { className: "grid gap-1", children: [_jsx("dt", { className: "text-caption text-faint", children: "Moved here" }), _jsx("dd", { className: "m-0 text-body-sm text-ink", children: _jsx("time", { dateTime: new Date(current.movedAt).toISOString(), children: formatShelfDate(current.movedAt, "long") }) })] }), _jsxs("div", { className: "flex items-center justify-between gap-4", children: [_jsx("dt", { className: "text-caption text-faint", children: "Availability" }), _jsx("dd", { className: "m-0", children: _jsx(EntityStatus, { status: "stopped", label: "Not live" }) })] })] }), _jsx("p", { className: "m-0 text-caption text-body", children: SHELF_AVAILABILITY_NOTE }), _jsxs("div", { className: "grid gap-2", children: [_jsx(Button, { variant: "cta", "data-slot": "shelf-details-move", disabled: moving, onClick: () => onMoveToGrid?.(current), className: "w-full", children: moving ? "Moving" : SHELF_MOVE_LABEL }), onRequestDelete ? (_jsx(Button, { variant: "ghost", "data-slot": "shelf-details-delete", onClick: () => onRequestDelete(current), className: "w-full text-danger-strong hover:bg-danger-fill hover:text-danger-strong", children: "Delete" })) : null] })] })) : null] }) }));
336
+ }
337
+ function NameAndKind({ item }) {
338
+ return (_jsxs("div", { className: "flex min-w-0 flex-col gap-0.5", children: [_jsx("span", { className: "text-body-md font-medium break-words text-ink", children: item.name }), _jsx("span", { className: "text-caption text-faint", children: kindWord(item) })] }));
339
+ }
340
+ /* ------------------------------------------------------------------ */
341
+ /* The toast */
342
+ /* ------------------------------------------------------------------ */
343
+ /**
344
+ * "{name} moved to your grid", with View grid when the caller can take the
345
+ * reader there (frame 04). No Undo: moving it back is what the Shelf is for.
346
+ *
347
+ * Fires through the library `Toaster` (`sonner`), which the Console already
348
+ * mounts once at its root. Returns the toast's id.
349
+ */
350
+ export function toastMovedToGrid(name, { onViewGrid, viewGridLabel = "View grid" } = {}) {
351
+ return toast.success(shelfMovedMessage(name), {
352
+ closeButton: true,
353
+ ...(onViewGrid ? { action: { label: viewGridLabel, onClick: onViewGrid } } : {}),
354
+ });
355
+ }
356
+ /* ------------------------------------------------------------------ */
357
+ /* The composition */
358
+ /* ------------------------------------------------------------------ */
359
+ /** Controlled when `value` is defined, otherwise its own state from `initial`. */
360
+ function useControllable(value, initial, onChange) {
361
+ const [own, setOwn] = React.useState(initial);
362
+ const current = value !== undefined ? value : own;
363
+ const set = React.useCallback((next) => {
364
+ if (value === undefined)
365
+ setOwn(next);
366
+ onChange?.(next);
367
+ }, [value, onChange]);
368
+ return [current, set];
369
+ }
370
+ /** True under the Console's phone breakpoint. False on the server and the first paint. */
371
+ function useNarrowWindow(query = "(max-width: 767px)") {
372
+ const [narrow, setNarrow] = React.useState(false);
373
+ React.useEffect(() => {
374
+ if (typeof window === "undefined" || typeof window.matchMedia !== "function")
375
+ return;
376
+ const list = window.matchMedia(query);
377
+ const update = () => setNarrow(list.matches);
378
+ update();
379
+ list.addEventListener?.("change", update);
380
+ return () => list.removeEventListener?.("change", update);
381
+ }, [query]);
382
+ return narrow;
383
+ }
384
+ /** Runs a callback that may return a promise; resolves true when it did not throw. */
385
+ async function settle(run) {
386
+ try {
387
+ await run();
388
+ return true;
389
+ }
390
+ catch {
391
+ return false;
392
+ }
393
+ }
394
+ /**
395
+ * The whole Shelf body, as frames 01 to 09b compose it: toolbar, then the
396
+ * table, the cards or the empty state, then the footer, plus the drawer and the
397
+ * delete dialog it opens.
398
+ *
399
+ * NOT in it: the page around it. The breadcrumb, the "Shelf" title and its
400
+ * subtitle, the white box and the Back pill are the Console's page frame, and the
401
+ * gallery's full-page frame draws them at the Console's measured sizes.
402
+ *
403
+ * Empty means the server says the whole shelf is empty: `counts.all === 0`, or
404
+ * no counts, no items, the All tab and no search. A tab or a search with no
405
+ * results is not an empty shelf, and says so in one line instead.
406
+ */
407
+ function Shelf({ items, counts, total, hasMore, onShowMore, loadingMore, tab: tabProp, defaultTab = "all", onTabChange, query: queryProp, defaultQuery = "", onSearch, sort: sortProp, defaultSort = "recent", onSort, view: viewProp, defaultView = "list", onViewChange, onMoveToGrid, onDelete, deleteErrorMessage = "That could not be deleted. Try again.", onOpenDetails, emptyBackHref, onEmptyBack, linkComponent, detailsSide = "auto", queryControls = "enabled", queryHint, className, }) {
408
+ const [tab, setTab] = useControllable(tabProp, defaultTab, onTabChange);
409
+ const [query, setQuery] = useControllable(queryProp, defaultQuery, onSearch);
410
+ const [sort, setSort] = useControllable(sortProp, defaultSort, onSort);
411
+ const [view, setView] = useControllable(viewProp, defaultView, onViewChange);
412
+ const narrow = useNarrowWindow();
413
+ const side = detailsSide === "auto" ? (narrow ? "bottom" : "right") : detailsSide;
414
+ const [detailsId, setDetailsId] = React.useState(null);
415
+ const [deleting, setDeleting] = React.useState(null);
416
+ const [deleteOpen, setDeleteOpen] = React.useState(false);
417
+ const [deletePending, setDeletePending] = React.useState(false);
418
+ const [deleteError, setDeleteError] = React.useState(null);
419
+ const [movingIds, setMovingIds] = React.useState(() => new Set());
420
+ const detailsItem = detailsId ? (items.find((i) => i.id === detailsId) ?? null) : null;
421
+ // An item that left the list (moved, deleted, filtered out) takes its drawer with it.
422
+ React.useEffect(() => {
423
+ if (detailsId && !items.some((i) => i.id === detailsId))
424
+ setDetailsId(null);
425
+ }, [items, detailsId]);
426
+ const openDetails = React.useCallback((item) => {
427
+ setDetailsId(item.id);
428
+ onOpenDetails?.(item);
429
+ }, [onOpenDetails]);
430
+ const moveToGrid = React.useCallback(async (item) => {
431
+ if (!onMoveToGrid)
432
+ return;
433
+ setMovingIds((prev) => new Set(prev).add(item.id));
434
+ const ok = await settle(() => onMoveToGrid(item));
435
+ setMovingIds((prev) => {
436
+ const next = new Set(prev);
437
+ next.delete(item.id);
438
+ return next;
439
+ });
440
+ if (ok)
441
+ setDetailsId((id) => (id === item.id ? null : id));
442
+ }, [onMoveToGrid]);
443
+ const requestDelete = React.useCallback((item) => {
444
+ setDeleting(item);
445
+ setDeleteError(null);
446
+ setDeleteOpen(true);
447
+ }, []);
448
+ async function confirmDelete() {
449
+ if (!deleting || !onDelete)
450
+ return;
451
+ setDeletePending(true);
452
+ setDeleteError(null);
453
+ const target = deleting;
454
+ const ok = await settle(() => onDelete(target));
455
+ setDeletePending(false);
456
+ if (ok) {
457
+ setDeleteOpen(false);
458
+ setDetailsId((id) => (id === target.id ? null : id));
459
+ }
460
+ else {
461
+ setDeleteError(deleteErrorMessage);
462
+ }
463
+ }
464
+ const shelfEmpty = counts?.all === 0 ||
465
+ (counts?.all === undefined && items.length === 0 && tab === "all" && query.trim() === "");
466
+ // One dialog, at the top level, whether Delete came from a row or the drawer.
467
+ // Opened over the drawer it is a sibling, not a child, and that is enough:
468
+ // Base UI 1.7 gives Escape to the topmost modal only and returns focus to the
469
+ // drawer's Delete (both pinned in registry/e2e/shelf.spec.ts, and measured with
470
+ // the dialog nested inside the drawer too: no difference, so no nesting).
471
+ const deleteDialog = onDelete ? (_jsx(ConfirmDeleteDialog, { open: deleteOpen, onOpenChange: (open) => {
472
+ setDeleteOpen(open);
473
+ if (!open)
474
+ setDeleteError(null);
475
+ }, name: deleting?.name ?? "", confirmText: deleting ? (deleting.slug ?? deleting.name) : "", onConfirm: confirmDelete, pending: deletePending, error: deleteError })) : null;
476
+ const actions = {
477
+ onOpenDetails: openDetails,
478
+ onMoveToGrid: onMoveToGrid ? moveToGrid : undefined,
479
+ onRequestDelete: onDelete ? requestDelete : undefined,
480
+ selectedId: detailsId,
481
+ movingIds,
482
+ };
483
+ return (_jsxs("div", { "data-slot": "shelf", "data-view": view, className: cn("@container/shelf flex flex-col gap-4", className), children: [_jsx(ShelfToolbar, { tab: tab, onTabChange: setTab, counts: counts, query: query, onSearch: setQuery, sort: sort, onSort: setSort, view: view, onViewChange: setView, showControls: !shelfEmpty, queryControls: queryControls, queryHint: shelfEmpty ? undefined : queryHint }), shelfEmpty ? (_jsx(ShelfEmpty, { backHref: emptyBackHref, onBack: onEmptyBack, linkComponent: linkComponent })) : items.length === 0 ? (_jsx("p", { "data-slot": "shelf-no-matches", className: "m-0 rounded-xl border border-hairline px-6 py-10 text-center text-body-sm text-body", children: SHELF_NO_MATCHES })) : view === "list" ? (_jsxs(_Fragment, { children: [_jsx(ShelfTable, { items: items, ...actions, className: "hidden @3xl/shelf:block" }), _jsx(ShelfCardList, { items: items, columns: 1, ...actions, className: "@3xl/shelf:hidden" })] })) : (_jsx(ShelfCardList, { items: items, ...actions })), !shelfEmpty && items.length > 0 ? (_jsx(ShelfFooter, { shown: items.length, total: total, hasMore: hasMore, onShowMore: onShowMore, loadingMore: loadingMore })) : null, _jsx(ShelfItemDetails, { item: detailsItem, open: detailsItem !== null, onOpenChange: (open) => {
484
+ if (!open)
485
+ setDetailsId(null);
486
+ }, side: side, onMoveToGrid: onMoveToGrid ? moveToGrid : undefined, onRequestDelete: onDelete ? requestDelete : undefined, moving: detailsItem ? movingIds.has(detailsItem.id) : false }), deleteDialog] }));
487
+ }
488
+ export { Shelf, ShelfCard, ShelfCardList, ShelfEmpty, ShelfFooter, ShelfItemDetails, ShelfReasonTag, ShelfRowMenu, ShelfTable, ShelfThumbnail, ShelfToolbar, };
489
+ //# sourceMappingURL=shelf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shelf.js","sourceRoot":"","sources":["../../src/blocks/shelf.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAE9B,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AACzE,OAAO,EACL,MAAM,EACN,UAAU,EACV,aAAa,EACb,YAAY,GACb,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GAEjB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAClF,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AACxF,OAAO,EACL,KAAK,EACL,SAAS,EACT,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,GACT,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAEhE;;;;;;;;;;;;;;;;;;;;;;;;;;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AAC,CAAC,CAAC,KAAK,GAC3D,EAED,YAAY,IACT,CACP,CAAA;AACH,CAAC;AAED,OAAO,EACL,KAAK,EACL,SAAS,EACT,aAAa,EACb,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,UAAU,EACV,cAAc,EACd,YAAY,GACb,CAAA"}
package/dist/index.d.ts CHANGED
@@ -31,6 +31,7 @@ export * from "./blocks/celebration.js";
31
31
  export * from "./blocks/cloudgrid-install.js";
32
32
  export * from "./blocks/command-field.js";
33
33
  export * from "./blocks/compare-table.js";
34
+ export * from "./blocks/confirm-delete-dialog.js";
34
35
  export * from "./blocks/creation-tile.js";
35
36
  export * from "./blocks/cta-banner.js";
36
37
  export * from "./blocks/drop-zone.js";
@@ -54,6 +55,7 @@ export * from "./blocks/pricing-tiers.js";
54
55
  export * from "./blocks/prompt-block.js";
55
56
  export * from "./blocks/quote.js";
56
57
  export * from "./blocks/rich-text.js";
58
+ export * from "./blocks/shelf.js";
57
59
  export * from "./blocks/showcase-scroll.js";
58
60
  export * from "./blocks/side-nav.js";
59
61
  export * from "./blocks/sign-in-options.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiBA,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,sBAAsB,CAAA;AACpC,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA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B,CAAA;AACvC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,2BAA2B,CAAA;AACzC,cAAc,0BAA0B,CAAA;AACxC,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,mBAAmB,CAAA;AACjC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,sBAAsB,CAAA;AACpC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AAGtC,cAAc,uBAAuB,CAAA"}
package/dist/index.js CHANGED
@@ -48,6 +48,7 @@ export * from "./blocks/celebration.js";
48
48
  export * from "./blocks/cloudgrid-install.js";
49
49
  export * from "./blocks/command-field.js";
50
50
  export * from "./blocks/compare-table.js";
51
+ export * from "./blocks/confirm-delete-dialog.js";
51
52
  export * from "./blocks/creation-tile.js";
52
53
  export * from "./blocks/cta-banner.js";
53
54
  export * from "./blocks/drop-zone.js";
@@ -71,6 +72,7 @@ export * from "./blocks/pricing-tiers.js";
71
72
  export * from "./blocks/prompt-block.js";
72
73
  export * from "./blocks/quote.js";
73
74
  export * from "./blocks/rich-text.js";
75
+ export * from "./blocks/shelf.js";
74
76
  export * from "./blocks/showcase-scroll.js";
75
77
  export * from "./blocks/side-nav.js";
76
78
  export * from "./blocks/sign-in-options.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,EAAE;AACF,gFAAgF;AAChF,8EAA8E;AAC9E,oEAAoE;AACpE,EAAE;AACF,gFAAgF;AAChF,+EAA+E;AAC/E,yEAAyE;AACzE,gFAAgF;AAChF,4EAA4E;AAC5E,EAAE;AACF,kEAAkE;AAClE,8EAA8E;AAC9E,uEAAuE;AAEvE,cAAc;AACd,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,sBAAsB,CAAA;AACpC,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAE/B,mBAAmB;AACnB,cAAc,0BAA0B,CAAA;AACxC,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cA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B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,2BAA2B,CAAA;AACzC,cAAc,0BAA0B,CAAA;AACxC,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,mBAAmB,CAAA;AACjC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,sBAAsB,CAAA;AACpC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AAEtC,0EAA0E;AAC1E,cAAc,uBAAuB,CAAA"}
package/dist/shadcn.css CHANGED
@@ -204,3 +204,44 @@
204
204
  --accent: var(--cg-surface-page-alt);
205
205
  --secondary: var(--cg-surface-page-alt);
206
206
  }
207
+
208
+
209
+ /*
210
+ The default border colour: the hairline, on every element, on every surface.
211
+
212
+ Tailwind v4 dropped v3's `border-color: theme(borderColor.DEFAULT)` from
213
+ preflight. Its reset is `border: 0 solid`, which leaves border-color at its
214
+ initial value, `currentColor`. So any element with `border` or `border-b` and no
215
+ colour utility draws its rule in the TEXT colour: the library `Table`'s row
216
+ rules (`border-b` on every `tr`), the Console's App controls dividers, the Shelf
217
+ table, all near-black on white. shadcn's own template fixes this in the app's
218
+ globals with `* { @apply border-border }`; this registry's globals did the same,
219
+ which is why nothing looked wrong here while the Console showed black rules.
220
+ It belongs in the library, once, for every consumer.
221
+
222
+ Why it flips with no per-scope copy (rule 2 is about a custom property declared
223
+ in terms of another; this is a plain property):
224
+ - border-color does NOT inherit, so `var(--border)` is evaluated on EACH
225
+ element, against the --border that element inherits;
226
+ - --border is declared in all three scopes above, so inside
227
+ [data-cg-surface="panel"] or "ink" it is already that scope's hairline.
228
+ Measured in registry/e2e/border-default.spec.ts on white, panel and ink.
229
+
230
+ `@layer base`, so every colour utility (`border-line`, `border-brand`,
231
+ `border-danger-border`, ...) still wins: utilities is a later layer. It must
232
+ come after Tailwind's preflight in the same layer, which the documented import
233
+ order (this file after `@import "tailwindcss"`) guarantees; preflight's
234
+ `border: 0 solid` would otherwise reset it to currentColor.
235
+
236
+ No new name: `--border` is shadcn's own and is only READ here (rule 4).
237
+ The selector list is preflight's, so nothing it resets is left uncovered.
238
+ */
239
+ @layer base {
240
+ *,
241
+ ::before,
242
+ ::after,
243
+ ::backdrop,
244
+ ::file-selector-button {
245
+ border-color: var(--border);
246
+ }
247
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudgrid-io/ui",
3
- "version": "0.31.3",
3
+ "version": "0.31.4",
4
4
  "description": "CloudGrid design system: React components, brand design tokens, Tailwind theme, self-hosted fonts.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",