@cloudgrid-io/ui 0.31.3 → 0.31.5
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/README.md +32 -0
- package/dist/badge/brand.d.ts +8 -0
- package/dist/badge/brand.d.ts.map +1 -0
- package/dist/badge/brand.js +22 -0
- package/dist/badge/brand.js.map +1 -0
- package/dist/badge/css-base.d.ts +25 -0
- package/dist/badge/css-base.d.ts.map +1 -0
- package/dist/badge/css-base.js +103 -0
- package/dist/badge/css-base.js.map +1 -0
- package/dist/badge/css-owner.d.ts +7 -0
- package/dist/badge/css-owner.d.ts.map +1 -0
- package/dist/badge/css-owner.js +128 -0
- package/dist/badge/css-owner.js.map +1 -0
- package/dist/badge/css-visitor.d.ts +7 -0
- package/dist/badge/css-visitor.d.ts.map +1 -0
- package/dist/badge/css-visitor.js +75 -0
- package/dist/badge/css-visitor.js.map +1 -0
- package/dist/badge/html.d.ts +26 -0
- package/dist/badge/html.d.ts.map +1 -0
- package/dist/badge/html.js +55 -0
- package/dist/badge/html.js.map +1 -0
- package/dist/badge/index.d.ts +43 -0
- package/dist/badge/index.d.ts.map +1 -0
- package/dist/badge/index.js +46 -0
- package/dist/badge/index.js.map +1 -0
- package/dist/badge/marks.d.ts +45 -0
- package/dist/badge/marks.d.ts.map +1 -0
- package/dist/badge/marks.js +126 -0
- package/dist/badge/marks.js.map +1 -0
- package/dist/badge/owner.d.ts +213 -0
- package/dist/badge/owner.d.ts.map +1 -0
- package/dist/badge/owner.js +309 -0
- package/dist/badge/owner.js.map +1 -0
- package/dist/badge/palette.d.ts +23 -0
- package/dist/badge/palette.d.ts.map +1 -0
- package/dist/badge/palette.js +86 -0
- package/dist/badge/palette.js.map +1 -0
- package/dist/badge/root.d.ts +24 -0
- package/dist/badge/root.d.ts.map +1 -0
- package/dist/badge/root.js +11 -0
- package/dist/badge/root.js.map +1 -0
- package/dist/badge/shared.d.ts +56 -0
- package/dist/badge/shared.d.ts.map +1 -0
- package/dist/badge/shared.js +53 -0
- package/dist/badge/shared.js.map +1 -0
- package/dist/badge/visitor.d.ts +96 -0
- package/dist/badge/visitor.d.ts.map +1 -0
- package/dist/badge/visitor.js +119 -0
- package/dist/badge/visitor.js.map +1 -0
- package/dist/blocks/confirm-delete-dialog.d.ts +81 -0
- package/dist/blocks/confirm-delete-dialog.d.ts.map +1 -0
- package/dist/blocks/confirm-delete-dialog.js +89 -0
- package/dist/blocks/confirm-delete-dialog.js.map +1 -0
- package/dist/blocks/entity-status.d.ts +44 -1
- package/dist/blocks/entity-status.d.ts.map +1 -1
- package/dist/blocks/entity-status.js +26 -1
- package/dist/blocks/entity-status.js.map +1 -1
- package/dist/blocks/expiry-notice.d.ts +86 -0
- package/dist/blocks/expiry-notice.d.ts.map +1 -0
- package/dist/blocks/expiry-notice.js +81 -0
- package/dist/blocks/expiry-notice.js.map +1 -0
- package/dist/blocks/icons.d.ts +22 -0
- package/dist/blocks/icons.d.ts.map +1 -1
- package/dist/blocks/icons.js +22 -0
- package/dist/blocks/icons.js.map +1 -1
- package/dist/blocks/notification-row.d.ts +88 -0
- package/dist/blocks/notification-row.d.ts.map +1 -0
- package/dist/blocks/notification-row.js +32 -0
- package/dist/blocks/notification-row.js.map +1 -0
- package/dist/blocks/phosphor-marks.d.ts +10 -0
- package/dist/blocks/phosphor-marks.d.ts.map +1 -1
- package/dist/blocks/phosphor-marks.js +15 -0
- package/dist/blocks/phosphor-marks.js.map +1 -1
- package/dist/blocks/shelf.d.ts +384 -0
- package/dist/blocks/shelf.d.ts.map +1 -0
- package/dist/blocks/shelf.js +489 -0
- package/dist/blocks/shelf.js.map +1 -0
- package/dist/brand/badge/manrope-latin-wght-normal.woff2 +0 -0
- package/dist/brand/badge/space-grotesk-latin-wght-normal.woff2 +0 -0
- package/dist/brand/email/headline-activity.png +0 -0
- package/dist/brand/email/headline-expired.png +0 -0
- package/dist/brand/email/headline-expires-tomorrow.png +0 -0
- package/dist/brand/email/headline-expiring-soon.png +0 -0
- package/dist/brand/email/headline-invited.png +0 -0
- package/dist/brand/email/headline-sign-in-code.png +0 -0
- package/dist/brand/email/mesh.png +0 -0
- package/dist/brand/email/wordmark.png +0 -0
- package/dist/email/assets.d.ts +50 -0
- package/dist/email/assets.d.ts.map +1 -0
- package/dist/email/assets.js +16 -0
- package/dist/email/assets.js.map +1 -0
- package/dist/email/index.d.ts +204 -0
- package/dist/email/index.d.ts.map +1 -0
- package/dist/email/index.js +429 -0
- package/dist/email/index.js.map +1 -0
- package/dist/email/palette.d.ts +40 -0
- package/dist/email/palette.d.ts.map +1 -0
- package/dist/email/palette.js +44 -0
- package/dist/email/palette.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/shadcn.css +41 -0
- package/dist/ui/dropdown-menu.d.ts +8 -1
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.js +9 -2
- package/dist/ui/dropdown-menu.js.map +1 -1
- package/package.json +17 -1
|
@@ -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,I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S,EACrD,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,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"}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare const EMAIL_WORDMARK: {
|
|
2
|
+
readonly file: "wordmark.png";
|
|
3
|
+
readonly width: 110;
|
|
4
|
+
readonly height: 26;
|
|
5
|
+
readonly alt: "CloudGrid";
|
|
6
|
+
};
|
|
7
|
+
export declare const EMAIL_MESH: {
|
|
8
|
+
readonly file: "mesh.png";
|
|
9
|
+
readonly size: 22;
|
|
10
|
+
};
|
|
11
|
+
export declare const EMAIL_HEADLINES: {
|
|
12
|
+
readonly "expiring-soon": {
|
|
13
|
+
readonly text: "EXPIRING SOON";
|
|
14
|
+
readonly file: "headline-expiring-soon.png";
|
|
15
|
+
readonly width: 236;
|
|
16
|
+
readonly height: 47;
|
|
17
|
+
};
|
|
18
|
+
readonly "expires-tomorrow": {
|
|
19
|
+
readonly text: "EXPIRES TOMORROW";
|
|
20
|
+
readonly file: "headline-expires-tomorrow.png";
|
|
21
|
+
readonly width: 314;
|
|
22
|
+
readonly height: 47;
|
|
23
|
+
};
|
|
24
|
+
readonly expired: {
|
|
25
|
+
readonly text: "IT EXPIRED";
|
|
26
|
+
readonly file: "headline-expired.png";
|
|
27
|
+
readonly width: 165;
|
|
28
|
+
readonly height: 47;
|
|
29
|
+
};
|
|
30
|
+
readonly "sign-in-code": {
|
|
31
|
+
readonly text: "YOUR SIGN-IN CODE";
|
|
32
|
+
readonly file: "headline-sign-in-code.png";
|
|
33
|
+
readonly width: 297;
|
|
34
|
+
readonly height: 47;
|
|
35
|
+
};
|
|
36
|
+
readonly invited: {
|
|
37
|
+
readonly text: "YOU'RE INVITED";
|
|
38
|
+
readonly file: "headline-invited.png";
|
|
39
|
+
readonly width: 236;
|
|
40
|
+
readonly height: 47;
|
|
41
|
+
};
|
|
42
|
+
readonly activity: {
|
|
43
|
+
readonly text: "WHAT'S HAPPENING";
|
|
44
|
+
readonly file: "headline-activity.png";
|
|
45
|
+
readonly width: 301;
|
|
46
|
+
readonly height: 47;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export type EmailHeadline = keyof typeof EMAIL_HEADLINES;
|
|
50
|
+
//# sourceMappingURL=assets.d.ts.map
|