@glasshome/ui 1.10.0 → 1.10.1
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/package.json +5 -2
- package/scripts/check-pack.ts +32 -0
- package/src/index.ts +111 -0
- package/src/solid/accordion.tsx +60 -0
- package/src/solid/alert-dialog.tsx +148 -0
- package/src/solid/alert.tsx +118 -0
- package/src/solid/area-picker.tsx +225 -0
- package/src/solid/aspect-ratio.tsx +21 -0
- package/src/solid/avatar.tsx +41 -0
- package/src/solid/badge.tsx +74 -0
- package/src/solid/bottom-sheet/arbitration.ts +40 -0
- package/src/solid/bottom-sheet/bottom-sheet.tsx +457 -0
- package/src/solid/bottom-sheet/constants.ts +8 -0
- package/src/solid/bottom-sheet/drag-controller.ts +221 -0
- package/src/solid/bottom-sheet/focus-trap.ts +56 -0
- package/src/solid/bottom-sheet/index.ts +14 -0
- package/src/solid/bottom-sheet/keyboard.ts +35 -0
- package/src/solid/bottom-sheet/scroll-lock.ts +64 -0
- package/src/solid/bottom-sheet/state-machine.ts +40 -0
- package/src/solid/bottom-sheet/velocity.ts +42 -0
- package/src/solid/breadcrumb.tsx +105 -0
- package/src/solid/button-group.tsx +66 -0
- package/src/solid/button.tsx +20 -0
- package/src/solid/card.tsx +101 -0
- package/src/solid/carousel.tsx +302 -0
- package/src/solid/charts.tsx +338 -0
- package/src/solid/checkbox.tsx +70 -0
- package/src/solid/collapsible.tsx +38 -0
- package/src/solid/color-slider.tsx +98 -0
- package/src/solid/color-wheel.tsx +77 -0
- package/src/solid/context-menu.tsx +109 -0
- package/src/solid/copy-button.tsx +46 -0
- package/src/solid/count-pill.tsx +24 -0
- package/src/solid/data-table.tsx +248 -0
- package/src/solid/dialog-parts.tsx +242 -0
- package/src/solid/dialog.tsx +121 -0
- package/src/solid/dock.tsx +186 -0
- package/src/solid/dropdown-menu.tsx +130 -0
- package/src/solid/empty.tsx +99 -0
- package/src/solid/entity-data.ts +78 -0
- package/src/solid/entity-selector.tsx +697 -0
- package/src/solid/field.tsx +253 -0
- package/src/solid/form.tsx +231 -0
- package/src/solid/hero-action.tsx +117 -0
- package/src/solid/hover-card.tsx +26 -0
- package/src/solid/icon-picker.tsx +432 -0
- package/src/solid/icon.tsx +20 -0
- package/src/solid/image-picker.tsx +380 -0
- package/src/solid/index.ts +417 -0
- package/src/solid/input-group.tsx +170 -0
- package/src/solid/input-otp.tsx +175 -0
- package/src/solid/input.tsx +12 -0
- package/src/solid/item.tsx +179 -0
- package/src/solid/kbd.tsx +30 -0
- package/src/solid/label.tsx +19 -0
- package/src/solid/list-reorder.ts +148 -0
- package/src/solid/logo.tsx +79 -0
- package/src/solid/media-copy.ts +37 -0
- package/src/solid/media-store.ts +110 -0
- package/src/solid/media-tile.tsx +100 -0
- package/src/solid/menu-parts.tsx +248 -0
- package/src/solid/number-field.tsx +72 -0
- package/src/solid/option-card.tsx +218 -0
- package/src/solid/ornament.tsx +53 -0
- package/src/solid/overlay.tsx +16 -0
- package/src/solid/page-header.tsx +102 -0
- package/src/solid/pagination.tsx +111 -0
- package/src/solid/password-input.tsx +69 -0
- package/src/solid/picker-row.tsx +102 -0
- package/src/solid/picker-search.tsx +78 -0
- package/src/solid/popover.tsx +103 -0
- package/src/solid/progress.tsx +31 -0
- package/src/solid/radio-group.tsx +60 -0
- package/src/solid/resizable.tsx +149 -0
- package/src/solid/responsive-dialog.tsx +180 -0
- package/src/solid/schema-form.tsx +830 -0
- package/src/solid/scope-indicator.tsx +13 -0
- package/src/solid/scroll-area.tsx +27 -0
- package/src/solid/section-card.tsx +358 -0
- package/src/solid/select.tsx +139 -0
- package/src/solid/separator.tsx +35 -0
- package/src/solid/settings-row.tsx +159 -0
- package/src/solid/sheet.tsx +157 -0
- package/src/solid/skeleton.tsx +15 -0
- package/src/solid/slider.tsx +148 -0
- package/src/solid/sliding-indicator.tsx +294 -0
- package/src/solid/sonner.tsx +219 -0
- package/src/solid/spinner.tsx +20 -0
- package/src/solid/step-indicator.tsx +30 -0
- package/src/solid/switch.tsx +62 -0
- package/src/solid/table.tsx +98 -0
- package/src/solid/tabs.tsx +86 -0
- package/src/solid/textarea.tsx +16 -0
- package/src/solid/toggle-group.tsx +102 -0
- package/src/solid/toggle.tsx +57 -0
- package/src/solid/tooltip.tsx +38 -0
- package/src/solid/widget-card.tsx +117 -0
- package/src/solid/widget-identity.tsx +135 -0
- package/src/solid/widget-trust-badge.tsx +37 -0
- package/src/tokens/hex.ts +50 -0
- package/src/tokens/index.ts +8 -0
- package/src/tokens/presets.ts +192 -0
- package/src/tokens/theme-colors.ts +147 -0
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createEffect,
|
|
3
|
+
createMemo,
|
|
4
|
+
createResource,
|
|
5
|
+
createSignal,
|
|
6
|
+
For,
|
|
7
|
+
Match,
|
|
8
|
+
Show,
|
|
9
|
+
Switch,
|
|
10
|
+
} from "solid-js";
|
|
11
|
+
import { PICKER_LIST, PICKER_TRIGGER } from "../lib/picker-classes.js";
|
|
12
|
+
import { cn } from "../lib/utils.js";
|
|
13
|
+
import { Alert } from "./alert.js";
|
|
14
|
+
import {
|
|
15
|
+
AlertDialog,
|
|
16
|
+
AlertDialogAction,
|
|
17
|
+
AlertDialogCancel,
|
|
18
|
+
AlertDialogContent,
|
|
19
|
+
AlertDialogDescription,
|
|
20
|
+
AlertDialogFooter,
|
|
21
|
+
AlertDialogHeader,
|
|
22
|
+
AlertDialogTitle,
|
|
23
|
+
} from "./alert-dialog.js";
|
|
24
|
+
import { Button } from "./button.js";
|
|
25
|
+
import { formatBytes } from "./charts.js";
|
|
26
|
+
import {
|
|
27
|
+
Empty,
|
|
28
|
+
EmptyContent,
|
|
29
|
+
EmptyDescription,
|
|
30
|
+
EmptyHeader,
|
|
31
|
+
EmptyMedia,
|
|
32
|
+
EmptyTitle,
|
|
33
|
+
} from "./empty.js";
|
|
34
|
+
import { Icon } from "./icon.js";
|
|
35
|
+
import { mediaIndexErrorCopy, mediaStoreErrorCopy, toMediaStoreError } from "./media-copy.js";
|
|
36
|
+
import {
|
|
37
|
+
createBrokenMedia,
|
|
38
|
+
MEDIA_PAGE_SIZE,
|
|
39
|
+
type MediaStoreError,
|
|
40
|
+
type StoredMedia,
|
|
41
|
+
sortMediaForClearing,
|
|
42
|
+
useMediaStore,
|
|
43
|
+
} from "./media-store.js";
|
|
44
|
+
import { MediaTile } from "./media-tile.js";
|
|
45
|
+
import {
|
|
46
|
+
Pagination,
|
|
47
|
+
PaginationContent,
|
|
48
|
+
PaginationItem,
|
|
49
|
+
PaginationNext,
|
|
50
|
+
PaginationPrevious,
|
|
51
|
+
} from "./pagination.js";
|
|
52
|
+
import { Popover, PopoverAnchor, PopoverContent } from "./popover.js";
|
|
53
|
+
import { SectionMeta } from "./section-card.js";
|
|
54
|
+
import { Skeleton } from "./skeleton.js";
|
|
55
|
+
|
|
56
|
+
export interface ImagePickerProps {
|
|
57
|
+
/** Sits on the trigger so a LabeledField's <Label for> points at a real control. */
|
|
58
|
+
id?: string;
|
|
59
|
+
value: string;
|
|
60
|
+
onChange: (id: string) => void;
|
|
61
|
+
class?: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function ImagePicker(props: ImagePickerProps) {
|
|
65
|
+
const store = useMediaStore();
|
|
66
|
+
|
|
67
|
+
if (!store) {
|
|
68
|
+
return (
|
|
69
|
+
<div data-slot="image-picker" class={cn(props.class)}>
|
|
70
|
+
<Alert tone="info">This dashboard cannot store images.</Alert>
|
|
71
|
+
</div>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const [open, setOpen] = createSignal(false);
|
|
76
|
+
const [everOpened, setEverOpened] = createSignal(false);
|
|
77
|
+
const [error, setError] = createSignal<MediaStoreError>();
|
|
78
|
+
const [pendingDelete, setPendingDelete] = createSignal<StoredMedia>();
|
|
79
|
+
const [thumbBroken, setThumbBroken] = createSignal(false);
|
|
80
|
+
const [uploading, setUploading] = createSignal(false);
|
|
81
|
+
const [page, setPage] = createSignal(0);
|
|
82
|
+
const thumbUrl = (id: string) => store.url(id, "thumb");
|
|
83
|
+
const brokenTiles = createBrokenMedia(thumbUrl);
|
|
84
|
+
let fileInput: HTMLInputElement | undefined;
|
|
85
|
+
|
|
86
|
+
const [index, { refetch }] = createResource(everOpened, () => store.index());
|
|
87
|
+
// Reading index() on a rejected resource rethrows, which crashes the popover's
|
|
88
|
+
// portal and leaves its overlay swallowing clicks. Every read goes through this.
|
|
89
|
+
const indexError = createMemo(() =>
|
|
90
|
+
index.error === undefined ? undefined : toMediaStoreError(index.error),
|
|
91
|
+
);
|
|
92
|
+
const loaded = () => (index.error === undefined ? index() : undefined);
|
|
93
|
+
const sorted = createMemo(() => sortMediaForClearing(loaded()?.media ?? []));
|
|
94
|
+
const pageCount = createMemo(() => Math.max(1, Math.ceil(sorted().length / MEDIA_PAGE_SIZE)));
|
|
95
|
+
const current = createMemo(() => Math.min(page(), pageCount() - 1));
|
|
96
|
+
const pageImages = createMemo(() =>
|
|
97
|
+
sorted().slice(current() * MEDIA_PAGE_SIZE, current() * MEDIA_PAGE_SIZE + MEDIA_PAGE_SIZE),
|
|
98
|
+
);
|
|
99
|
+
const deleteDescription = createMemo(() => {
|
|
100
|
+
const used = pendingDelete()?.usedBy ?? 0;
|
|
101
|
+
return used === 0
|
|
102
|
+
? "This image isn't used by any widget."
|
|
103
|
+
: `This image is used in ${used} widget${used === 1 ? "" : "s"}. Deleting it will leave those widgets without an image.`;
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
const openGallery = (next: boolean) => {
|
|
107
|
+
if (next) setEverOpened(true);
|
|
108
|
+
setOpen(next);
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
// A gallery reopened after a failed upload starts clean; a stale banner reads as a fresh failure.
|
|
112
|
+
createEffect(() => {
|
|
113
|
+
if (open()) {
|
|
114
|
+
setError(undefined);
|
|
115
|
+
setPage(0);
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
const step = (delta: number) =>
|
|
120
|
+
setPage(Math.min(Math.max(current() + delta, 0), pageCount() - 1));
|
|
121
|
+
|
|
122
|
+
// A store rejection is picker state, never an unhandled rejection escaping the tree.
|
|
123
|
+
const fail = (cause: unknown) => setError(toMediaStoreError(cause));
|
|
124
|
+
|
|
125
|
+
const handleUpload = async (file: File) => {
|
|
126
|
+
setError(undefined);
|
|
127
|
+
setUploading(true);
|
|
128
|
+
try {
|
|
129
|
+
const uploaded = await store.upload(file);
|
|
130
|
+
await refetch();
|
|
131
|
+
props.onChange(uploaded.id);
|
|
132
|
+
} catch (cause) {
|
|
133
|
+
fail(cause);
|
|
134
|
+
} finally {
|
|
135
|
+
setUploading(false);
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
const confirmDelete = async () => {
|
|
140
|
+
const target = pendingDelete();
|
|
141
|
+
if (!target) return;
|
|
142
|
+
setError(undefined);
|
|
143
|
+
try {
|
|
144
|
+
await store.remove(target.id);
|
|
145
|
+
await refetch();
|
|
146
|
+
} catch (cause) {
|
|
147
|
+
fail(cause);
|
|
148
|
+
} finally {
|
|
149
|
+
setPendingDelete(undefined);
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
return (
|
|
154
|
+
<div data-slot="image-picker" class={cn(props.class)}>
|
|
155
|
+
<Popover surface="field" open={open()} onOpenChange={openGallery} modal>
|
|
156
|
+
<PopoverAnchor as="div">
|
|
157
|
+
<button
|
|
158
|
+
type="button"
|
|
159
|
+
id={props.id}
|
|
160
|
+
data-slot="image-picker-trigger"
|
|
161
|
+
data-expanded={open() || undefined}
|
|
162
|
+
class={PICKER_TRIGGER}
|
|
163
|
+
onClick={() => openGallery(!open())}
|
|
164
|
+
>
|
|
165
|
+
<Show
|
|
166
|
+
when={!thumbBroken() && props.value}
|
|
167
|
+
fallback={
|
|
168
|
+
<>
|
|
169
|
+
<Icon
|
|
170
|
+
icon={thumbBroken() ? "lucide:image-off" : "lucide:image"}
|
|
171
|
+
width={18}
|
|
172
|
+
height={18}
|
|
173
|
+
class="shrink-0 text-muted-foreground"
|
|
174
|
+
/>
|
|
175
|
+
<span class="flex-1 truncate text-left text-muted-foreground">
|
|
176
|
+
{thumbBroken() ? "Image unavailable" : "Choose image"}
|
|
177
|
+
</span>
|
|
178
|
+
</>
|
|
179
|
+
}
|
|
180
|
+
>
|
|
181
|
+
<img
|
|
182
|
+
src={store.url(props.value)}
|
|
183
|
+
alt=""
|
|
184
|
+
width={24}
|
|
185
|
+
height={24}
|
|
186
|
+
decoding="async"
|
|
187
|
+
class="size-6 shrink-0 rounded-sm object-cover"
|
|
188
|
+
onError={() => setThumbBroken(true)}
|
|
189
|
+
/>
|
|
190
|
+
<span class="flex-1 truncate text-left">Image selected</span>
|
|
191
|
+
</Show>
|
|
192
|
+
<Icon
|
|
193
|
+
icon="lucide:chevron-down"
|
|
194
|
+
width={16}
|
|
195
|
+
height={16}
|
|
196
|
+
class="shrink-0 text-muted-foreground"
|
|
197
|
+
/>
|
|
198
|
+
</button>
|
|
199
|
+
</PopoverAnchor>
|
|
200
|
+
<PopoverContent class="min-w-72" onInteractOutside={() => setOpen(false)}>
|
|
201
|
+
{/* The panel owns no padding: the gallery body owns its own inset. */}
|
|
202
|
+
<div data-slot="image-picker-body" class="flex flex-col gap-3 p-3">
|
|
203
|
+
<Show when={error()}>
|
|
204
|
+
{(err) => (
|
|
205
|
+
<Alert tone="destructive" role="alert">
|
|
206
|
+
{mediaStoreErrorCopy(err())}
|
|
207
|
+
</Alert>
|
|
208
|
+
)}
|
|
209
|
+
</Show>
|
|
210
|
+
<Switch
|
|
211
|
+
fallback={
|
|
212
|
+
<div data-slot="image-picker-loading" class="grid grid-cols-3 gap-2">
|
|
213
|
+
<For each={[0, 1, 2, 3, 4, 5]}>{() => <Skeleton class="aspect-square" />}</For>
|
|
214
|
+
</div>
|
|
215
|
+
}
|
|
216
|
+
>
|
|
217
|
+
<Match when={indexError()}>
|
|
218
|
+
{(failure) => (
|
|
219
|
+
// role="status": the gallery is explaining itself, not raising an alarm.
|
|
220
|
+
<Empty role="status">
|
|
221
|
+
<EmptyHeader>
|
|
222
|
+
<EmptyMedia variant="icon">
|
|
223
|
+
<Icon icon="lucide:image-off" width={24} height={24} />
|
|
224
|
+
</EmptyMedia>
|
|
225
|
+
<EmptyTitle>Images unavailable</EmptyTitle>
|
|
226
|
+
<EmptyDescription>{mediaIndexErrorCopy(failure())}</EmptyDescription>
|
|
227
|
+
</EmptyHeader>
|
|
228
|
+
<EmptyContent>
|
|
229
|
+
<Button
|
|
230
|
+
type="button"
|
|
231
|
+
variant="outline"
|
|
232
|
+
size="sm"
|
|
233
|
+
data-slot="image-picker-retry"
|
|
234
|
+
onClick={() => void refetch()}
|
|
235
|
+
>
|
|
236
|
+
Try again
|
|
237
|
+
</Button>
|
|
238
|
+
</EmptyContent>
|
|
239
|
+
</Empty>
|
|
240
|
+
)}
|
|
241
|
+
</Match>
|
|
242
|
+
<Match when={loaded()}>
|
|
243
|
+
<Show
|
|
244
|
+
when={sorted().length > 0}
|
|
245
|
+
fallback={
|
|
246
|
+
<Empty>
|
|
247
|
+
<EmptyHeader>
|
|
248
|
+
<EmptyMedia variant="icon">
|
|
249
|
+
<Icon icon="lucide:image" width={24} height={24} />
|
|
250
|
+
</EmptyMedia>
|
|
251
|
+
<EmptyTitle>No images yet</EmptyTitle>
|
|
252
|
+
<EmptyDescription>Upload one to use it here.</EmptyDescription>
|
|
253
|
+
</EmptyHeader>
|
|
254
|
+
</Empty>
|
|
255
|
+
}
|
|
256
|
+
>
|
|
257
|
+
<div
|
|
258
|
+
data-slot="image-picker-gallery"
|
|
259
|
+
class={cn("grid grid-cols-3 gap-2", PICKER_LIST)}
|
|
260
|
+
>
|
|
261
|
+
<For each={pageImages()}>
|
|
262
|
+
{(image) => (
|
|
263
|
+
<MediaTile
|
|
264
|
+
item={image}
|
|
265
|
+
thumbUrl={thumbUrl(image.id)}
|
|
266
|
+
label={`Use ${image.id}`}
|
|
267
|
+
broken={brokenTiles.isBroken(image)}
|
|
268
|
+
markUnused
|
|
269
|
+
selected={props.value === image.id}
|
|
270
|
+
onSelect={() => {
|
|
271
|
+
props.onChange(image.id);
|
|
272
|
+
setThumbBroken(false);
|
|
273
|
+
setOpen(false);
|
|
274
|
+
}}
|
|
275
|
+
onBroken={() => brokenTiles.markBroken(image)}
|
|
276
|
+
onDelete={() => setPendingDelete(image)}
|
|
277
|
+
/>
|
|
278
|
+
)}
|
|
279
|
+
</For>
|
|
280
|
+
</div>
|
|
281
|
+
<Show when={pageCount() > 1}>
|
|
282
|
+
<Pagination>
|
|
283
|
+
<PaginationContent class="w-full justify-between">
|
|
284
|
+
<PaginationItem>
|
|
285
|
+
<PaginationPrevious
|
|
286
|
+
href="#"
|
|
287
|
+
aria-disabled={current() === 0}
|
|
288
|
+
class={current() === 0 ? "pointer-events-none opacity-50" : undefined}
|
|
289
|
+
onClick={(event) => {
|
|
290
|
+
event.preventDefault();
|
|
291
|
+
step(-1);
|
|
292
|
+
}}
|
|
293
|
+
/>
|
|
294
|
+
</PaginationItem>
|
|
295
|
+
<PaginationItem data-testid="image-picker-page-label">
|
|
296
|
+
<SectionMeta>
|
|
297
|
+
Page {current() + 1} of {pageCount()}
|
|
298
|
+
</SectionMeta>
|
|
299
|
+
</PaginationItem>
|
|
300
|
+
<PaginationItem>
|
|
301
|
+
<PaginationNext
|
|
302
|
+
href="#"
|
|
303
|
+
aria-disabled={current() === pageCount() - 1}
|
|
304
|
+
class={
|
|
305
|
+
current() === pageCount() - 1
|
|
306
|
+
? "pointer-events-none opacity-50"
|
|
307
|
+
: undefined
|
|
308
|
+
}
|
|
309
|
+
onClick={(event) => {
|
|
310
|
+
event.preventDefault();
|
|
311
|
+
step(1);
|
|
312
|
+
}}
|
|
313
|
+
/>
|
|
314
|
+
</PaginationItem>
|
|
315
|
+
</PaginationContent>
|
|
316
|
+
</Pagination>
|
|
317
|
+
</Show>
|
|
318
|
+
</Show>
|
|
319
|
+
<Show when={loaded()?.usage}>
|
|
320
|
+
{(u) => (
|
|
321
|
+
<SectionMeta>
|
|
322
|
+
{formatBytes(u().bytes)} of {formatBytes(u().limitBytes)} · {u().files} of{" "}
|
|
323
|
+
{u().limitFiles} images
|
|
324
|
+
</SectionMeta>
|
|
325
|
+
)}
|
|
326
|
+
</Show>
|
|
327
|
+
</Match>
|
|
328
|
+
</Switch>
|
|
329
|
+
<input
|
|
330
|
+
ref={fileInput}
|
|
331
|
+
type="file"
|
|
332
|
+
accept="image/*"
|
|
333
|
+
data-testid="image-upload-input"
|
|
334
|
+
class="hidden"
|
|
335
|
+
onChange={(e) => {
|
|
336
|
+
const file = e.currentTarget.files?.[0];
|
|
337
|
+
e.currentTarget.value = "";
|
|
338
|
+
if (file) void handleUpload(file);
|
|
339
|
+
}}
|
|
340
|
+
/>
|
|
341
|
+
<Button
|
|
342
|
+
type="button"
|
|
343
|
+
variant="outline"
|
|
344
|
+
size="sm"
|
|
345
|
+
data-slot="image-picker-upload"
|
|
346
|
+
disabled={uploading()}
|
|
347
|
+
onClick={() => fileInput?.click()}
|
|
348
|
+
>
|
|
349
|
+
<Icon icon="lucide:upload" width={14} height={14} />
|
|
350
|
+
{uploading() ? "Uploading..." : "Upload"}
|
|
351
|
+
</Button>
|
|
352
|
+
</div>
|
|
353
|
+
</PopoverContent>
|
|
354
|
+
</Popover>
|
|
355
|
+
<AlertDialog
|
|
356
|
+
open={pendingDelete() !== undefined}
|
|
357
|
+
onOpenChange={(next) => {
|
|
358
|
+
if (!next) setPendingDelete(undefined);
|
|
359
|
+
}}
|
|
360
|
+
>
|
|
361
|
+
<AlertDialogContent>
|
|
362
|
+
<AlertDialogHeader>
|
|
363
|
+
<AlertDialogTitle>Delete image?</AlertDialogTitle>
|
|
364
|
+
<AlertDialogDescription>{deleteDescription()}</AlertDialogDescription>
|
|
365
|
+
</AlertDialogHeader>
|
|
366
|
+
<AlertDialogFooter>
|
|
367
|
+
<AlertDialogCancel aria-label="Cancel">Cancel</AlertDialogCancel>
|
|
368
|
+
<AlertDialogAction
|
|
369
|
+
variant="destructive"
|
|
370
|
+
aria-label="Delete"
|
|
371
|
+
onClick={() => void confirmDelete()}
|
|
372
|
+
>
|
|
373
|
+
Delete
|
|
374
|
+
</AlertDialogAction>
|
|
375
|
+
</AlertDialogFooter>
|
|
376
|
+
</AlertDialogContent>
|
|
377
|
+
</AlertDialog>
|
|
378
|
+
</div>
|
|
379
|
+
);
|
|
380
|
+
}
|