@la-batcave/ui 3.1.2

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.
Files changed (107) hide show
  1. package/README.md +95 -0
  2. package/dist/Alert.d.ts +27 -0
  3. package/dist/Alert.js +56 -0
  4. package/dist/Avatar.d.ts +20 -0
  5. package/dist/Avatar.js +40 -0
  6. package/dist/Badge.d.ts +56 -0
  7. package/dist/Badge.js +74 -0
  8. package/dist/Button.d.ts +53 -0
  9. package/dist/Button.js +66 -0
  10. package/dist/Card.d.ts +18 -0
  11. package/dist/Card.js +98 -0
  12. package/dist/CodeBlock.d.ts +45 -0
  13. package/dist/CodeBlock.js +306 -0
  14. package/dist/Collapse.d.ts +58 -0
  15. package/dist/Collapse.js +89 -0
  16. package/dist/Combobox.d.ts +44 -0
  17. package/dist/Combobox.js +409 -0
  18. package/dist/DarkMode.d.ts +59 -0
  19. package/dist/DarkMode.js +56 -0
  20. package/dist/DatePicker.d.ts +48 -0
  21. package/dist/DatePicker.js +2954 -0
  22. package/dist/Dialog.d.ts +119 -0
  23. package/dist/Dialog.js +337 -0
  24. package/dist/Drawer.d.ts +28 -0
  25. package/dist/Drawer.js +1126 -0
  26. package/dist/Dropdown.d.ts +23 -0
  27. package/dist/Dropdown.js +247 -0
  28. package/dist/EasyForm.d.ts +138 -0
  29. package/dist/EasyForm.js +286 -0
  30. package/dist/HoverCard.d.ts +10 -0
  31. package/dist/HoverCard.js +195 -0
  32. package/dist/Input.d.ts +230 -0
  33. package/dist/Input.js +2216 -0
  34. package/dist/LogViewer.d.ts +57 -0
  35. package/dist/LogViewer.js +120 -0
  36. package/dist/Menubar.d.ts +32 -0
  37. package/dist/Menubar.js +398 -0
  38. package/dist/Navbar.d.ts +20 -0
  39. package/dist/Navbar.js +31 -0
  40. package/dist/Pagination.d.ts +78 -0
  41. package/dist/Pagination.js +106 -0
  42. package/dist/Popover.d.ts +11 -0
  43. package/dist/Popover.js +28 -0
  44. package/dist/ProgressBar.d.ts +35 -0
  45. package/dist/ProgressBar.js +210 -0
  46. package/dist/Resizable.d.ts +23 -0
  47. package/dist/Resizable.js +1532 -0
  48. package/dist/Separator.d.ts +4 -0
  49. package/dist/Separator.js +46 -0
  50. package/dist/Sheet.d.ts +29 -0
  51. package/dist/Sheet.js +104 -0
  52. package/dist/Sidebar.d.ts +117 -0
  53. package/dist/Sidebar.js +237 -0
  54. package/dist/Skeleton.d.ts +57 -0
  55. package/dist/Skeleton.js +47 -0
  56. package/dist/Table.d.ts +71 -0
  57. package/dist/Table.js +94 -0
  58. package/dist/Tabs.d.ts +76 -0
  59. package/dist/Tabs.js +202 -0
  60. package/dist/Toast.d.ts +54 -0
  61. package/dist/Toast.js +827 -0
  62. package/dist/Tooltip.d.ts +29 -0
  63. package/dist/Tooltip.js +352 -0
  64. package/dist/Typography.d.ts +101 -0
  65. package/dist/Typography.js +123 -0
  66. package/dist/Widget.d.ts +133 -0
  67. package/dist/Widget.js +207 -0
  68. package/dist/_shared/Combination-D_l4PLF_.js +676 -0
  69. package/dist/_shared/index-B03TCNO5.js +142 -0
  70. package/dist/_shared/index-B1f-hyuh.js +31 -0
  71. package/dist/_shared/index-BC7vfx-u.js +13 -0
  72. package/dist/_shared/index-BrLJJgkl.js +67 -0
  73. package/dist/_shared/index-C0gNQvxa.js +269 -0
  74. package/dist/_shared/index-C3aZemLI.js +268 -0
  75. package/dist/_shared/index-CXeb1OMI.js +198 -0
  76. package/dist/_shared/index-CukUn3R0.js +626 -0
  77. package/dist/_shared/index-DLcqcWxM.js +29 -0
  78. package/dist/_shared/index-DlSuDb9N.js +283 -0
  79. package/dist/_shared/index-V-Ajw7Ac.js +79 -0
  80. package/dist/_shared/index-uPOYJZpG.js +34 -0
  81. package/dist/_shared/index-uu9PT5Nu.js +1588 -0
  82. package/dist/_shared/utils-eGXXUFl7.js +2935 -0
  83. package/dist/backgrounds/Aurora.d.ts +7 -0
  84. package/dist/backgrounds/Aurora.js +126 -0
  85. package/dist/backgrounds/Iridescence.d.ts +7 -0
  86. package/dist/backgrounds/Iridescence.js +77 -0
  87. package/dist/backgrounds/Lightning.d.ts +8 -0
  88. package/dist/backgrounds/Lightning.js +75 -0
  89. package/dist/backgrounds/LiquidChrome.d.ts +9 -0
  90. package/dist/backgrounds/LiquidChrome.js +89 -0
  91. package/dist/backgrounds/Particles.d.ts +15 -0
  92. package/dist/backgrounds/Particles.js +137 -0
  93. package/dist/backgrounds/PixelSnow.d.ts +9 -0
  94. package/dist/backgrounds/PixelSnow.js +52 -0
  95. package/dist/backgrounds/Silk.d.ts +8 -0
  96. package/dist/backgrounds/Silk.js +92 -0
  97. package/dist/backgrounds/Squares.d.ts +9 -0
  98. package/dist/backgrounds/Squares.js +75 -0
  99. package/dist/backgrounds/Threads.d.ts +7 -0
  100. package/dist/backgrounds/Threads.js +110 -0
  101. package/dist/backgrounds/Waves.d.ts +14 -0
  102. package/dist/backgrounds/Waves.js +139 -0
  103. package/dist/fonts/inter-latin-wght-normal.woff2 +0 -0
  104. package/dist/index.css +1 -0
  105. package/dist/index.d.ts +2 -0
  106. package/dist/index.js +4 -0
  107. package/package.json +318 -0
@@ -0,0 +1,119 @@
1
+ import * as React from "react";
2
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
3
+ declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
4
+ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
6
+ declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
7
+ export interface DialogOverlayProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay> {
8
+ }
9
+ declare const DialogOverlay: React.ForwardRefExoticComponent<DialogOverlayProps & React.RefAttributes<HTMLDivElement>>;
10
+ export interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
11
+ /** Hide the default close (X) button. @default false */
12
+ hideClose?: boolean;
13
+ }
14
+ declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
15
+ export interface DialogHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
16
+ }
17
+ declare function DialogHeader({ className, ...props }: DialogHeaderProps): import("react/jsx-runtime").JSX.Element;
18
+ export interface DialogFooterProps extends React.HTMLAttributes<HTMLDivElement> {
19
+ }
20
+ declare function DialogFooter({ className, ...props }: DialogFooterProps): import("react/jsx-runtime").JSX.Element;
21
+ export interface DialogTitleProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title> {
22
+ }
23
+ declare const DialogTitle: React.ForwardRefExoticComponent<DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
24
+ export interface DialogDescriptionProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description> {
25
+ }
26
+ declare const DialogDescription: React.ForwardRefExoticComponent<DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
27
+ export interface DialogBodyProps extends React.HTMLAttributes<HTMLDivElement> {
28
+ }
29
+ declare function DialogBody({ className, ...props }: DialogBodyProps): import("react/jsx-runtime").JSX.Element;
30
+ export interface AlertDialogOptions {
31
+ /** Dialog title. */
32
+ title: React.ReactNode;
33
+ /** Short description below the title. */
34
+ description?: React.ReactNode;
35
+ /** Body message. */
36
+ message?: React.ReactNode;
37
+ /** Custom button content. @default "OK" */
38
+ button?: React.ReactNode;
39
+ }
40
+ /**
41
+ * Imperative alert dialog with a single button. Returns a Promise that
42
+ * resolves when the user dismisses the dialog.
43
+ *
44
+ * @example
45
+ * await alertDialog({
46
+ * title: "Session expiree",
47
+ * message: "Veuillez vous reconnecter.",
48
+ * });
49
+ */
50
+ declare function alertDialog(options: AlertDialogOptions): Promise<void>;
51
+ export interface ConfirmDialogOptions {
52
+ /** Dialog title. */
53
+ title: React.ReactNode;
54
+ /** Short description below the title. */
55
+ description?: React.ReactNode;
56
+ /** Body message between header and footer. */
57
+ message?: React.ReactNode;
58
+ /** Custom confirm button. Pass a string for default styling, or a <Button> element for full control. @default "Confirmer" */
59
+ confirmButton?: React.ReactNode;
60
+ /** Custom cancel button. Pass a string for default styling, or a <Button> element for full control. @default "Annuler" */
61
+ cancelButton?: React.ReactNode;
62
+ /** Allow closing via overlay click, Escape, or X button. @default true */
63
+ closable?: boolean;
64
+ /** Async callback executed on confirm. Dialog stays open while pending. */
65
+ onSuccess?: () => Promise<void> | void;
66
+ /** Async callback executed on cancel. Dialog stays open while pending. */
67
+ onCancel?: () => Promise<void> | void;
68
+ }
69
+ /**
70
+ * Imperative confirmation dialog. Returns a Promise that resolves to `true`
71
+ * (confirmed) or `false` (cancelled).
72
+ *
73
+ * @example
74
+ * const ok = await confirmDialog({ title: "Delete?" });
75
+ * if (ok) deleteItem();
76
+ */
77
+ declare function confirmDialog(options: ConfirmDialogOptions): Promise<boolean>;
78
+ export interface PromptDialogOptions {
79
+ /** Dialog title. */
80
+ title: React.ReactNode;
81
+ /** Short description below the title. */
82
+ description?: React.ReactNode;
83
+ /** Body message displayed above the form fields. */
84
+ message?: React.ReactNode;
85
+ /** EasyForm field configurations. */
86
+ fields: import("./EasyForm").EasyFormField[];
87
+ /** Default values for the form fields. */
88
+ defaultValues?: import("./EasyForm").FormValues;
89
+ /** Custom confirm button. @default "Confirmer" */
90
+ confirmButton?: React.ReactNode;
91
+ /** Custom cancel button. @default "Annuler" */
92
+ cancelButton?: React.ReactNode;
93
+ /** Allow closing via overlay click, Escape, or X button. @default true */
94
+ closable?: boolean;
95
+ /** Async callback executed on confirm with the form values. Dialog stays open while pending. */
96
+ onSuccess?: (values: import("./EasyForm").FormValues) => Promise<void> | void;
97
+ /** Async callback executed on cancel. Dialog stays open while pending. */
98
+ onCancel?: () => Promise<void> | void;
99
+ }
100
+ /**
101
+ * Imperative prompt dialog with an EasyForm. Returns a Promise that resolves
102
+ * to the form values on confirm, or `null` on cancel.
103
+ *
104
+ * The confirm button triggers EasyForm validation. The dialog only closes
105
+ * when validation passes and the optional `onSuccess` promise resolves.
106
+ *
107
+ * @example
108
+ * const values = await promptDialog({
109
+ * title: "Creer un serveur",
110
+ * fields: [
111
+ * { name: "name", type: "text", label: "Nom", validation: { required: true } },
112
+ * { name: "slots", type: "number", label: "Slots", defaultValue: "20" },
113
+ * ],
114
+ * onSuccess: (v) => api.createServer(v),
115
+ * });
116
+ * if (values) console.log("Created:", values);
117
+ */
118
+ declare function promptDialog(options: PromptDialogOptions): Promise<import("./EasyForm").FormValues | null>;
119
+ export { Dialog, DialogTrigger, DialogClose, DialogPortal, DialogOverlay, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, DialogBody, alertDialog, confirmDialog, promptDialog, };
package/dist/Dialog.js ADDED
@@ -0,0 +1,337 @@
1
+ "use client";
2
+ import { jsx as t, jsxs as f } from "react/jsx-runtime";
3
+ import * as d from "react";
4
+ import { O as K, P as V, C as q, a as z, T as H, D as L, R as X, b as G } from "./_shared/index-DlSuDb9N.js";
5
+ import { X as J } from "lucide-react";
6
+ import { c as h } from "./_shared/utils-eGXXUFl7.js";
7
+ import { Button as M } from "./Button.js";
8
+ import { EasyForm as Q } from "./EasyForm.js";
9
+ const P = X, re = G, ae = z, U = V, I = d.forwardRef(({ className: n, ...e }, o) => /* @__PURE__ */ t(
10
+ K,
11
+ {
12
+ ref: o,
13
+ className: h(
14
+ "fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",
15
+ "data-[state=open]:animate-in data-[state=open]:fade-in-0",
16
+ "data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
17
+ n
18
+ ),
19
+ ...e
20
+ }
21
+ ));
22
+ I.displayName = "DialogOverlay";
23
+ const N = d.forwardRef(({ className: n, children: e, hideClose: o, ...i }, a) => /* @__PURE__ */ f(U, { children: [
24
+ /* @__PURE__ */ t(I, {}),
25
+ /* @__PURE__ */ t("div", { className: "fixed inset-x-0 top-0 z-50 h-[100dvh] flex items-center justify-center overflow-y-auto p-4 pointer-events-none", children: /* @__PURE__ */ f(
26
+ q,
27
+ {
28
+ ref: a,
29
+ className: h(
30
+ "relative pointer-events-auto my-auto",
31
+ "w-[90%] max-w-[480px] max-h-[85dvh]",
32
+ "blurred-bg bg-card/90 backdrop-blur-lg border border-border rounded-xl shadow-lg",
33
+ "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
34
+ "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
35
+ "focus:outline-none",
36
+ "flex flex-col gap-5 py-5",
37
+ n
38
+ ),
39
+ ...i,
40
+ children: [
41
+ e,
42
+ !o && /* @__PURE__ */ t(z, { className: "absolute right-4 top-4 w-7 h-7 rounded-md flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-secondary transition-colors cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-ring", children: /* @__PURE__ */ t(J, { size: 18 }) })
43
+ ]
44
+ }
45
+ ) })
46
+ ] }));
47
+ N.displayName = "DialogContent";
48
+ function E({ className: n, ...e }) {
49
+ return /* @__PURE__ */ t(
50
+ "div",
51
+ {
52
+ className: h("flex flex-col gap-0.5 px-5", n),
53
+ ...e
54
+ }
55
+ );
56
+ }
57
+ function S({ className: n, ...e }) {
58
+ return /* @__PURE__ */ t(
59
+ "div",
60
+ {
61
+ className: h(
62
+ "flex items-center justify-end gap-2 py-4 px-5 -mb-5 border-t border-border",
63
+ n
64
+ ),
65
+ ...e
66
+ }
67
+ );
68
+ }
69
+ const O = d.forwardRef(({ className: n, ...e }, o) => /* @__PURE__ */ t(
70
+ H,
71
+ {
72
+ ref: o,
73
+ className: h("text-base font-semibold text-foreground", n),
74
+ ...e
75
+ }
76
+ ));
77
+ O.displayName = "DialogTitle";
78
+ const R = d.forwardRef(({ className: n, ...e }, o) => /* @__PURE__ */ t(
79
+ L,
80
+ {
81
+ ref: o,
82
+ className: h("text-sm text-muted-foreground", n),
83
+ ...e
84
+ }
85
+ ));
86
+ R.displayName = "DialogDescription";
87
+ function j({ className: n, ...e }) {
88
+ return /* @__PURE__ */ t(
89
+ "div",
90
+ {
91
+ className: h("px-5 text-sm text-foreground", n),
92
+ ...e
93
+ }
94
+ );
95
+ }
96
+ function v(n, e, o, i, a) {
97
+ return d.isValidElement(n) ? d.cloneElement(n, {
98
+ onClick: o,
99
+ loading: i,
100
+ disabled: a
101
+ }) : /* @__PURE__ */ t(M, { variant: e, onClick: o, loading: i, disabled: a, children: n });
102
+ }
103
+ function A(n) {
104
+ return new Promise((e) => {
105
+ const o = document.createElement("div");
106
+ document.body.appendChild(o), import("react-dom/client").then(({ createRoot: i }) => {
107
+ const a = i(o);
108
+ a.render(
109
+ n((c) => {
110
+ a.unmount(), o.remove(), e(c);
111
+ })
112
+ );
113
+ });
114
+ });
115
+ }
116
+ function W({
117
+ title: n,
118
+ description: e,
119
+ message: o,
120
+ button: i = "OK",
121
+ onDone: a
122
+ }) {
123
+ const [c, g] = d.useState(!0), u = () => {
124
+ g(!1), setTimeout(() => a(), 200);
125
+ };
126
+ return /* @__PURE__ */ t(P, { open: c, onOpenChange: (D) => {
127
+ D || u();
128
+ }, children: /* @__PURE__ */ f(N, { children: [
129
+ /* @__PURE__ */ f(E, { children: [
130
+ /* @__PURE__ */ t(O, { children: n }),
131
+ e && /* @__PURE__ */ t(R, { children: e })
132
+ ] }),
133
+ o && /* @__PURE__ */ t(j, { children: o }),
134
+ /* @__PURE__ */ t(S, { children: v(i, "primary", u, !1, !1) })
135
+ ] }) });
136
+ }
137
+ function ie(n) {
138
+ return A((e) => /* @__PURE__ */ t(W, { ...n, onDone: e }));
139
+ }
140
+ function Y({
141
+ title: n,
142
+ description: e,
143
+ message: o,
144
+ confirmButton: i = "Confirmer",
145
+ cancelButton: a = "Annuler",
146
+ closable: c = !0,
147
+ onSuccess: g,
148
+ onCancel: u,
149
+ onDone: D
150
+ }) {
151
+ const [b, T] = d.useState(!0), [p, y] = d.useState(null), s = p !== null, m = (r) => {
152
+ T(!1), setTimeout(() => D(r), 200);
153
+ }, x = async () => {
154
+ if (!s)
155
+ if (g) {
156
+ y("confirm");
157
+ try {
158
+ await g(), m(!0);
159
+ } catch {
160
+ y(null);
161
+ }
162
+ } else
163
+ m(!0);
164
+ }, C = async () => {
165
+ if (!s)
166
+ if (u) {
167
+ y("cancel");
168
+ try {
169
+ await u(), m(!1);
170
+ } catch {
171
+ y(null);
172
+ }
173
+ } else
174
+ m(!1);
175
+ };
176
+ return /* @__PURE__ */ t(
177
+ P,
178
+ {
179
+ open: b,
180
+ onOpenChange: (r) => {
181
+ !r && !s && c && C();
182
+ },
183
+ children: /* @__PURE__ */ f(
184
+ N,
185
+ {
186
+ hideClose: !c || s,
187
+ onEscapeKeyDown: (r) => {
188
+ (!c || s) && r.preventDefault();
189
+ },
190
+ onPointerDownOutside: (r) => {
191
+ (!c || s) && r.preventDefault();
192
+ },
193
+ onInteractOutside: (r) => {
194
+ (!c || s) && r.preventDefault();
195
+ },
196
+ children: [
197
+ /* @__PURE__ */ f(E, { children: [
198
+ /* @__PURE__ */ t(O, { children: n }),
199
+ e && /* @__PURE__ */ t(R, { children: e })
200
+ ] }),
201
+ o && /* @__PURE__ */ t(j, { children: o }),
202
+ /* @__PURE__ */ f(S, { children: [
203
+ v(a, "secondary", C, p === "cancel", p === "confirm"),
204
+ v(i, "primary", x, p === "confirm", p === "cancel")
205
+ ] })
206
+ ]
207
+ }
208
+ )
209
+ }
210
+ );
211
+ }
212
+ function le(n) {
213
+ return A((e) => /* @__PURE__ */ t(Y, { ...n, onDone: e }));
214
+ }
215
+ function Z({
216
+ title: n,
217
+ description: e,
218
+ message: o,
219
+ fields: i,
220
+ defaultValues: a,
221
+ confirmButton: c = "Confirmer",
222
+ cancelButton: g = "Annuler",
223
+ closable: u = !0,
224
+ onSuccess: D,
225
+ onCancel: b,
226
+ onDone: T
227
+ }) {
228
+ const [p, y] = d.useState(!0), [s, m] = d.useState(null), x = d.useRef(null), C = d.useRef(null), r = s !== null, w = (l) => {
229
+ y(!1), setTimeout(() => T(l), 200);
230
+ }, B = async (l) => {
231
+ if (!r)
232
+ if (C.current = l, D) {
233
+ m("confirm");
234
+ try {
235
+ await D(l), w(l);
236
+ } catch {
237
+ m(null);
238
+ }
239
+ } else
240
+ w(l);
241
+ }, F = () => {
242
+ r || x.current && x.current.requestSubmit();
243
+ }, k = async () => {
244
+ if (!r)
245
+ if (b) {
246
+ m("cancel");
247
+ try {
248
+ await b(), w(null);
249
+ } catch {
250
+ m(null);
251
+ }
252
+ } else
253
+ w(null);
254
+ };
255
+ return /* @__PURE__ */ t(
256
+ P,
257
+ {
258
+ open: p,
259
+ onOpenChange: (l) => {
260
+ !l && !r && u && k();
261
+ },
262
+ children: /* @__PURE__ */ f(
263
+ N,
264
+ {
265
+ hideClose: !u || r,
266
+ onEscapeKeyDown: (l) => {
267
+ (!u || r) && l.preventDefault();
268
+ },
269
+ onPointerDownOutside: (l) => {
270
+ (!u || r) && l.preventDefault();
271
+ },
272
+ onInteractOutside: (l) => {
273
+ (!u || r) && l.preventDefault();
274
+ },
275
+ className: "max-h-[85dvh] flex flex-col",
276
+ children: [
277
+ /* @__PURE__ */ f(E, { children: [
278
+ /* @__PURE__ */ t(O, { children: n }),
279
+ e && /* @__PURE__ */ t(R, { children: e })
280
+ ] }),
281
+ /* @__PURE__ */ f(j, { className: "overflow-y-auto flex flex-col gap-4", children: [
282
+ o && /* @__PURE__ */ t("div", { children: o }),
283
+ /* @__PURE__ */ t(
284
+ Q,
285
+ {
286
+ ref: x,
287
+ fields: i,
288
+ defaultValues: a,
289
+ onSubmit: B
290
+ }
291
+ )
292
+ ] }),
293
+ /* @__PURE__ */ f(S, { children: [
294
+ v(g, "secondary", k, s === "cancel", s === "confirm"),
295
+ v(c, "primary", F, s === "confirm", s === "cancel")
296
+ ] })
297
+ ]
298
+ }
299
+ )
300
+ }
301
+ );
302
+ }
303
+ function ce(n) {
304
+ return new Promise((e) => {
305
+ const o = document.createElement("div");
306
+ document.body.appendChild(o), import("react-dom/client").then(({ createRoot: i }) => {
307
+ const a = i(o);
308
+ a.render(
309
+ /* @__PURE__ */ t(
310
+ Z,
311
+ {
312
+ ...n,
313
+ onDone: (c) => {
314
+ a.unmount(), o.remove(), e(c);
315
+ }
316
+ }
317
+ )
318
+ );
319
+ });
320
+ });
321
+ }
322
+ export {
323
+ P as Dialog,
324
+ j as DialogBody,
325
+ ae as DialogClose,
326
+ N as DialogContent,
327
+ R as DialogDescription,
328
+ S as DialogFooter,
329
+ E as DialogHeader,
330
+ I as DialogOverlay,
331
+ U as DialogPortal,
332
+ O as DialogTitle,
333
+ re as DialogTrigger,
334
+ ie as alertDialog,
335
+ le as confirmDialog,
336
+ ce as promptDialog
337
+ };
@@ -0,0 +1,28 @@
1
+ import * as React from "react";
2
+ import { Drawer as DrawerPrimitive } from "vaul";
3
+ declare const Drawer: {
4
+ ({ shouldScaleBackground, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
5
+ displayName: string;
6
+ };
7
+ declare const DrawerTrigger: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
8
+ declare const DrawerClose: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
9
+ declare const DrawerPortal: typeof import("vaul").Portal;
10
+ export interface DrawerOverlayProps extends React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay> {
11
+ }
12
+ declare const DrawerOverlay: React.ForwardRefExoticComponent<DrawerOverlayProps & React.RefAttributes<HTMLDivElement>>;
13
+ export interface DrawerContentProps extends React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content> {
14
+ }
15
+ declare const DrawerContent: React.ForwardRefExoticComponent<DrawerContentProps & React.RefAttributes<HTMLDivElement>>;
16
+ export interface DrawerHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
17
+ }
18
+ declare function DrawerHeader({ className, ...props }: DrawerHeaderProps): import("react/jsx-runtime").JSX.Element;
19
+ export interface DrawerFooterProps extends React.HTMLAttributes<HTMLDivElement> {
20
+ }
21
+ declare function DrawerFooter({ className, ...props }: DrawerFooterProps): import("react/jsx-runtime").JSX.Element;
22
+ export interface DrawerTitleProps extends React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title> {
23
+ }
24
+ declare const DrawerTitle: React.ForwardRefExoticComponent<DrawerTitleProps & React.RefAttributes<HTMLHeadingElement>>;
25
+ export interface DrawerDescriptionProps extends React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description> {
26
+ }
27
+ declare const DrawerDescription: React.ForwardRefExoticComponent<DrawerDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
28
+ export { Drawer, DrawerTrigger, DrawerClose, DrawerPortal, DrawerOverlay, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };