@popgrids/ui 0.0.20 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dialog.cjs CHANGED
@@ -4,30 +4,395 @@ var dialog = require('@base-ui/react/dialog');
4
4
  var icons = require('@untitledui/icons');
5
5
  var clsx = require('clsx');
6
6
  var tailwindMerge = require('tailwind-merge');
7
+ var button = require('@base-ui/react/button');
8
+ var classVarianceAuthority = require('class-variance-authority');
7
9
  var jsxRuntime = require('react/jsx-runtime');
8
10
 
9
11
  function cn(...inputs) {
10
12
  return tailwindMerge.twMerge(clsx.clsx(inputs));
11
13
  }
14
+ var loaderVariants = classVarianceAuthority.cva("flex shrink-0 items-center justify-center", {
15
+ variants: {
16
+ theme: {
17
+ default: "[--loader-foreground:var(--foreground)] [--loader-background:var(--foreground)]",
18
+ reversed: "[--loader-foreground:var(--background)] [--loader-background:var(--foreground)]",
19
+ black: "[--loader-foreground:var(--color-brand-midnight-900)] [--loader-background:var(--color-grayscale-300)]",
20
+ white: "[--loader-foreground:var(--color-grayscale-300)] [--loader-background:var(--color-brand-midnight-900)]"
21
+ },
22
+ variant: {
23
+ spinner: "size-5 motion-reduce:animate-none",
24
+ loader: "relative flex h-[13px] w-[23px] motion-reduce:animate-none"
25
+ }
26
+ },
27
+ defaultVariants: {
28
+ theme: "default",
29
+ variant: "spinner"
30
+ }
31
+ });
32
+ var spinnerFgVariants = classVarianceAuthority.cva("", {
33
+ variants: {
34
+ theme: {
35
+ default: "fill-foreground opacity-[0.06]",
36
+ reversed: "fill-white opacity-10",
37
+ black: "fill-black opacity-[0.04]",
38
+ white: "fill-white opacity-[0.04]"
39
+ }
40
+ }
41
+ });
42
+ var spinnerBgVariants = classVarianceAuthority.cva("", {
43
+ variants: {
44
+ theme: {
45
+ default: "fill-foreground",
46
+ reversed: "fill-background",
47
+ black: "fill-black opacity-[0.98]",
48
+ white: "fill-white opacity-[0.98]"
49
+ }
50
+ }
51
+ });
52
+ function Loader({
53
+ theme = "default",
54
+ variant = "spinner",
55
+ className,
56
+ style,
57
+ ...props
58
+ }) {
59
+ const dotCount = 21;
60
+ return /* @__PURE__ */ jsxRuntime.jsx(
61
+ "div",
62
+ {
63
+ "data-slot": "loader",
64
+ className: cn(
65
+ loaderVariants({ theme, variant }),
66
+ variant === "spinner" && "animate-spin",
67
+ className
68
+ ),
69
+ ...props,
70
+ children: variant === "spinner" ? /* @__PURE__ */ jsxRuntime.jsxs(
71
+ "svg",
72
+ {
73
+ width: "20",
74
+ height: "20",
75
+ viewBox: "0 0 20 20",
76
+ fill: "none",
77
+ xmlns: "http://www.w3.org/2000/svg",
78
+ children: [
79
+ /* @__PURE__ */ jsxRuntime.jsx("title", { children: "Loading spinner" }),
80
+ /* @__PURE__ */ jsxRuntime.jsxs("g", { clipPath: "url(#pop_loader_clip_path)", children: [
81
+ /* @__PURE__ */ jsxRuntime.jsx(
82
+ "path",
83
+ {
84
+ className: spinnerFgVariants({ theme }),
85
+ d: "M20 10C20 15.5137 15.5137 20 10 20C4.48628 20 6.78126e-07 15.5137 4.37114e-07 10C1.96101e-07 4.48627 4.48627 3.50301e-07 10 1.09288e-07C15.5137 -1.31724e-07 20 4.48627 20 10ZM2.35294 10C2.35294 14.2196 5.78039 17.6471 10 17.6471C14.2196 17.6471 17.6471 14.2196 17.6471 10C17.6471 5.78039 14.2196 2.35294 10 2.35294C5.78039 2.35294 2.35294 5.78039 2.35294 10Z"
86
+ }
87
+ ),
88
+ /* @__PURE__ */ jsxRuntime.jsx(
89
+ "path",
90
+ {
91
+ className: spinnerBgVariants({ theme }),
92
+ d: "M20 10L17.6471 10C17.6471 5.78039 14.2196 2.35294 10 2.35294L10 7.10315e-07C15.5137 4.69302e-07 20 4.48627 20 10Z"
93
+ }
94
+ )
95
+ ] }),
96
+ /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("clipPath", { id: "pop_loader_clip_path", children: /* @__PURE__ */ jsxRuntime.jsx(
97
+ "rect",
98
+ {
99
+ width: "20",
100
+ height: "20",
101
+ fill: "white",
102
+ transform: "translate(8.74228e-07 20) rotate(-90)"
103
+ }
104
+ ) }) })
105
+ ]
106
+ }
107
+ ) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: Array.from({ length: dotCount }, (_, index) => {
108
+ const delaySeconds = index * 0.035;
109
+ return (
110
+ // biome-ignore lint/suspicious/noArrayIndexKey: Dots are static and ordered
111
+ /* @__PURE__ */ jsxRuntime.jsx(
112
+ "div",
113
+ {
114
+ className: "bg-grayscale-200 dark:bg-grayscale-700 animate-loader-wave absolute top-0 size-[3px] rounded-full motion-reduce:animate-none",
115
+ style: {
116
+ left: `${index}px`,
117
+ animationDelay: `${delaySeconds}s`
118
+ }
119
+ },
120
+ index
121
+ )
122
+ );
123
+ }) })
124
+ }
125
+ );
126
+ }
127
+ var buttonVariants = classVarianceAuthority.cva(
128
+ "inline-flex relative items-center gap-1.5 whitespace-nowrap font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 text-foreground bg-background group/button outline-none focus-visible:border-ring-3 focus-visible:ring-ring/60 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
129
+ {
130
+ variants: {
131
+ align: {
132
+ left: "justify-start",
133
+ center: "justify-center",
134
+ right: "justify-end"
135
+ },
136
+ collapsed: {
137
+ false: null,
138
+ true: "min-w-10 max-w-10 justify-center"
139
+ },
140
+ outline: {
141
+ false: null,
142
+ true: ""
143
+ },
144
+ hasLeading: {
145
+ false: null
146
+ },
147
+ theme: {
148
+ base: "bg-foreground text-background",
149
+ brand: "bg-primary-foreground text-primary",
150
+ error: ""
151
+ },
152
+ hasTrailing: {
153
+ false: null
154
+ },
155
+ variant: {
156
+ default: "hover:bg-background/90",
157
+ outline: "backdrop-blur-lg ",
158
+ primary: "bg-primary-foreground/0 backdrop-blur-lg text-primary",
159
+ secondary: "bg-secondary-foreground/0 backdrop-blur-lg text-secondary",
160
+ tertiary: "bg-background/0 backdrop-blur-lg [--foreground:var(--color-text-text-default)]"
161
+ },
162
+ pill: {
163
+ false: "rounded-xs",
164
+ true: "rounded-full"
165
+ },
166
+ size: {
167
+ default: "h-10 min-h-10 px-3 py-2 text-sm [&_svg:not([class*='size-'])]:size-[18px]",
168
+ lg: "h-12 min-h-12 text-base [&_svg:not([class*='size-'])]:size-[20px]"
169
+ }
170
+ },
171
+ defaultVariants: {
172
+ align: "center",
173
+ outline: false,
174
+ pill: false,
175
+ size: "default",
176
+ theme: "brand",
177
+ variant: "default"
178
+ },
179
+ compoundVariants: [
180
+ {
181
+ pill: true,
182
+ size: "default",
183
+ class: "min-w-10 min-h-10 px-4"
184
+ },
185
+ {
186
+ pill: true,
187
+ collapsed: true,
188
+ class: "max-w-10"
189
+ },
190
+ {
191
+ pill: true,
192
+ size: "lg",
193
+ class: "min-w-12 min-h-12 px-4"
194
+ },
195
+ {
196
+ pill: true,
197
+ size: "lg",
198
+ collapsed: true,
199
+ class: "max-w-[54px] max-h-12"
200
+ },
201
+ {
202
+ collapsed: false,
203
+ size: "default",
204
+ align: "left",
205
+ pill: false,
206
+ class: "pr-3 pl-2"
207
+ },
208
+ {
209
+ align: "center",
210
+ collapsed: false,
211
+ size: "default",
212
+ pill: false,
213
+ class: "px-3"
214
+ },
215
+ {
216
+ hasLeading: true,
217
+ pill: false,
218
+ align: "left",
219
+ size: "default",
220
+ class: "pr-3 pl-2"
221
+ },
222
+ {
223
+ collapsed: false,
224
+ size: "default",
225
+ pill: true,
226
+ class: "px-4"
227
+ },
228
+ {
229
+ size: "lg",
230
+ pill: true,
231
+ collapsed: false,
232
+ class: "px-4"
233
+ },
234
+ {
235
+ variant: "primary",
236
+ outline: false,
237
+ theme: "base",
238
+ class: "bg-foreground text-background hover:ring-2 active:ring active:bg-background disabled:outline-none disabled:bg-black/0 disabled:text-black-alpha-600 focus-visible:ring-3 focus-visible:ring-ring focus-visible:outline-background focus-visible:bg-foreground focus-visible:text-background"
239
+ },
240
+ {
241
+ variant: "primary",
242
+ outline: true,
243
+ theme: "base",
244
+ class: "ring ring-foreground bg-background/0 text-foreground hover:ring-2 active:ring active:bg-background/1 disabled:outline-none disabled:bg-background/0 focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-background focus-visible:bg-background/1"
245
+ },
246
+ {
247
+ variant: "primary",
248
+ outline: true,
249
+ theme: "brand",
250
+ class: "ring ring-primary-foreground bg-background/0 text-primary-foreground hover:ring-2 active:ring active:bg-background/1 disabled:outline-none disabled:bg-background/0 focus-visible:ring focus-visible:ring-ring focus-visible:outline-background focus-visible:bg-background/1"
251
+ },
252
+ {
253
+ variant: "primary",
254
+ theme: "brand",
255
+ outline: false,
256
+ class: "bg-primary-foreground text-primary hover:bg-primary-foreground hover:text-primary active:bg-primary-foreground active:text-primary focus-visible:bg-primary-foreground focus-visible:text-primary"
257
+ },
258
+ {
259
+ variant: "primary",
260
+ theme: "error",
261
+ class: "bg-destructive text-black"
262
+ },
263
+ {
264
+ variant: "secondary",
265
+ outline: false,
266
+ theme: "base",
267
+ class: "bg-background/0 text-foreground backdrop-blur-lg focus-visible:backdrop-blur-md"
268
+ },
269
+ {
270
+ variant: "secondary",
271
+ outline: true,
272
+ theme: "base",
273
+ class: "bg-background/0 text-foreground ring ring-foreground/0 hover:ring-foreground active:ring-foreground/0 disabled:ring-foreground/0 backdrop-blur-lg focus-visible:backdrop-blur-md"
274
+ },
275
+ {
276
+ variant: "tertiary",
277
+ outline: false,
278
+ theme: "base",
279
+ class: "bg-background/0 text-foreground backdrop-blur-lg focus-visible:backdrop-blur-md dark:text-white"
280
+ },
281
+ {
282
+ variant: "tertiary",
283
+ theme: "error",
284
+ class: "bg-transparent backdrop-blur-lg text-error-600"
285
+ }
286
+ ]
287
+ }
288
+ );
289
+ var tintVariants = classVarianceAuthority.cva(
290
+ "before:content-[''] before:absolute before:inset-0 before:transition-all before:rounded-[inherit] before:pointer-events-none",
291
+ {
292
+ variants: {
293
+ outline: {
294
+ false: null
295
+ },
296
+ variant: {
297
+ default: "",
298
+ outline: "",
299
+ primary: "before:bg-tint-700-reversed/0 hover:before:bg-tint-700-reversed active:before:bg-tint-700-reversed/0 disabled:before:bg-tint-900-default focus-visible:before:bg-tint-700-reversed/0",
300
+ secondary: "before:bg-tint-900-default hover:before:bg-tint-800-default active:before:bg-tint-900-default disabled:before:bg-tint-900-default focus-visible:before:bg-tint-800-default",
301
+ tertiary: "before:bg-tint-950-reversed hover:before:bg-tint-900-default active:before:bg-tint-950-reversed disabled:before:bg-tint-950-reversed focus-visible:before:bg-tint-950-reversed"
302
+ }
303
+ },
304
+ defaultVariants: {
305
+ outline: false,
306
+ variant: "default"
307
+ },
308
+ compoundVariants: [
309
+ {
310
+ outline: true,
311
+ variant: "primary",
312
+ class: "before:bg-tint-950-reversed hover:before:bg-tint-950-reversed active:before:bg-tint-950-reversed disabled:before:bg-tint-900-default focus-visible:before:bg-tint-950-reversed"
313
+ },
314
+ {
315
+ outline: true,
316
+ variant: "secondary",
317
+ class: "before:bg-tint-950-reversed hover:before:bg-tint-950-reversed active:before:bg-tint-950-reversed disabled:before:bg-tint-900-default focus-visible:before:bg-tint-950-reversed"
318
+ }
319
+ ]
320
+ }
321
+ );
322
+ function Button({
323
+ align = "center",
324
+ children,
325
+ className,
326
+ collapsed = false,
327
+ leading,
328
+ outline = false,
329
+ pill = false,
330
+ loading = false,
331
+ loadingElement,
332
+ size = "default",
333
+ theme = "brand",
334
+ trailing,
335
+ variant = "default",
336
+ ...props
337
+ }) {
338
+ return /* @__PURE__ */ jsxRuntime.jsx(
339
+ button.Button,
340
+ {
341
+ "data-slot": "button",
342
+ className: cn(
343
+ buttonVariants({
344
+ variant,
345
+ size,
346
+ align,
347
+ outline,
348
+ collapsed,
349
+ pill,
350
+ className,
351
+ hasLeading: !!leading,
352
+ theme,
353
+ hasTrailing: !!trailing
354
+ }),
355
+ tintVariants({ variant, outline })
356
+ ),
357
+ ...props,
358
+ children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
359
+ loading && (loadingElement || /* @__PURE__ */ jsxRuntime.jsx(Loader, { className: "absolute inset-0 m-auto", variant: "spinner", theme: "reversed" })),
360
+ leading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("group-aria-busy/button:opacity-0 transition-opacity", { "opacity-0": loading }), children: leading }),
361
+ children && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("min-w-[18px] truncate relative transition-opacity", { "opacity-0": loading }), children }),
362
+ trailing && /* @__PURE__ */ jsxRuntime.jsx(
363
+ "div",
364
+ {
365
+ className: cn("group-aria-busy/button:opacity-0 transition-opacity", {
366
+ "opacity-0": loading,
367
+ "absolute top-1/2 right-0 translate-x-1/2 -translate-y-1/2": collapsed
368
+ }),
369
+ children: trailing
370
+ }
371
+ )
372
+ ] })
373
+ }
374
+ );
375
+ }
12
376
  function DialogRoot(props) {
13
- return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Root, { ...props });
377
+ return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Root, { "data-slot": "dialog", ...props });
14
378
  }
15
379
  function DialogPortal(props) {
16
- return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Portal, { ...props });
380
+ return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Portal, { "data-slot": "dialog-portal", ...props });
17
381
  }
18
382
  function DialogTrigger(props) {
19
- return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Trigger, { ...props });
383
+ return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Trigger, { "data-slot": "dialog-trigger", ...props });
20
384
  }
21
385
  function DialogClose(props) {
22
- return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Close, { ...props });
386
+ return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Close, { "data-slot": "dialog-close", ...props });
23
387
  }
24
- function DialogBackdrop({
388
+ function DialogOverlay({
25
389
  className,
26
390
  ...props
27
391
  }) {
28
392
  return /* @__PURE__ */ jsxRuntime.jsx(
29
393
  dialog.Dialog.Backdrop,
30
394
  {
395
+ "data-slot": "dialog-overlay",
31
396
  className: cn(
32
397
  "fixed inset-0 min-h-dvh bg-[rgb(0_0_32/0.01)] opacity-0 backdrop-blur-sm transition-[opacity,backdrop-filter] duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-[-webkit-touch-callout:none]:absolute dark:bg-[rgb(255_255_255/0.01)] dark:opacity-70",
33
398
  "data-closed:opacity-0 data-open:opacity-100",
@@ -44,6 +409,7 @@ function DialogViewport({
44
409
  return /* @__PURE__ */ jsxRuntime.jsx(
45
410
  dialog.Dialog.Viewport,
46
411
  {
412
+ "data-slot": "dialog-viewport",
47
413
  className: cn(
48
414
  "fixed inset-0 flex items-center justify-center overflow-hidden py-6 [@media(min-height:600px)]:pt-8 [@media(min-height:600px)]:pb-12",
49
415
  className
@@ -52,55 +418,87 @@ function DialogViewport({
52
418
  }
53
419
  );
54
420
  }
55
- function DialogPopup({
421
+ function DialogContent({
56
422
  className,
57
423
  children,
58
424
  bottom = false,
59
425
  showCloseButton = true,
426
+ closePosition = "top-left",
60
427
  ...props
61
428
  }) {
62
- return /* @__PURE__ */ jsxRuntime.jsxs(dialog.Dialog.Portal, { children: [
63
- /* @__PURE__ */ jsxRuntime.jsx(DialogBackdrop, {}),
64
- /* @__PURE__ */ jsxRuntime.jsxs(dialog.Dialog.Popup, { className: "group/popup pointer-events-none flex h-full max-h-full min-h-0 w-full max-w-full justify-center overflow-hidden transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0", children: [
65
- showCloseButton && /* @__PURE__ */ jsxRuntime.jsxs(
66
- DialogClose,
67
- {
68
- className: "pointer-events-auto fixed top-[15px] left-5 z-50",
69
- "aria-label": "Close",
70
- children: [
71
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" }),
72
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "before:bg-tint-700-reversed relative block before:absolute before:-inset-1.5 before:rounded-full before:backdrop-blur-sm", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-primary-foreground text-background relative z-10 flex size-10 items-center justify-center rounded-full", children: /* @__PURE__ */ jsxRuntime.jsx(icons.XClose, { className: "size-[18px]" }) }) })
73
- ]
74
- }
75
- ),
76
- /* @__PURE__ */ jsxRuntime.jsx(
77
- "div",
78
- {
79
- className: cn(
80
- "bg-background pointer-events-auto fixed top-1/2 left-1/2 flex h-full max-h-[calc(100%-2rem)] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col rounded-xl shadow-2xl transition-all",
429
+ return /* @__PURE__ */ jsxRuntime.jsxs(dialog.Dialog.Portal, { "data-slot": "dialog-portal", children: [
430
+ /* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
431
+ /* @__PURE__ */ jsxRuntime.jsxs(
432
+ dialog.Dialog.Popup,
433
+ {
434
+ "data-slot": "dialog-content",
435
+ className: "group/popup pointer-events-none flex h-full max-h-full min-h-0 w-full max-w-full justify-center overflow-hidden transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0",
436
+ children: [
437
+ showCloseButton && /* @__PURE__ */ jsxRuntime.jsxs(
438
+ DialogClose,
81
439
  {
82
- "group-data-closed/popup:duration-pop-hover group-data-open/popup:duration-pop-hover group-data-open/popup:ease-pop-hover group-data-closed/popup:ease-out group-data-ending-style/popup:scale-[0.96] group-data-ending-style/popup:opacity-0 group-data-starting-style/popup:scale-[0.96] group-data-starting-style/popup:opacity-0": !bottom,
83
- "group-data-open/popup:slide-in-from-bottom group-data-closed/popup:slide-out-to-bottom group-data-starting-style/popup-scale-100 group-data-ending-style/popup-scale-100 group-data-open/popup:animate-in group-data-closed/popup:animate-out top-auto bottom-0 h-full translate-y-0 rounded-b-none group-data-closed/popup:duration-200 group-data-closed/popup:ease-[cubic-bezier(1,0,0.72,0.32)] group-data-ending-style/popup:translate-y-full group-data-open/popup:duration-300 group-data-open/popup:ease-[cubic-bezier(0.32,0.72,0,1)] group-data-starting-style/popup:translate-y-full": bottom
84
- },
85
- className
440
+ className: cn("pointer-events-auto fixed top-[15px] z-50 transition-all", { "left-5": closePosition === "top-left", "right-5": closePosition === "top-right", "group-data-closed/popup:duration-pop-hover group-data-open/popup:duration-pop-hover group-data-open/popup:ease-pop-hover group-data-closed/popup:ease-out group-data-ending-style/popup:scale-[0.96] group-data-ending-style/popup:opacity-0 group-data-starting-style/popup:scale-[0.96] group-data-starting-style/popup:opacity-0": !bottom, " group-data-starting-style/popup-scale-[0.96] group-data-ending-style/popup-scale-100 group-data-open/popup:animate-in group-data-closed/popup:animate-out group-data-closed/popup:duration-200 group-data-closed/popup:ease-[cubic-bezier(1,0,0.72,0.32)] group-data-ending-style/popup:translate-y-1/2 group-data-open/popup:duration-pop-hover group-data-open/popup:ease-[cubic-bezier(0.32,0.72,0,1)] group-data-starting-style/popup:translate-y-1/2": bottom }),
441
+ "aria-label": "Close",
442
+ children: [
443
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" }),
444
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "before:bg-tint-700-reversed relative block before:absolute before:-inset-1.5 before:rounded-full before:backdrop-blur-sm", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-primary-foreground text-background relative z-10 flex size-10 items-center justify-center rounded-full", children: /* @__PURE__ */ jsxRuntime.jsx(icons.XClose, { className: "size-[18px]" }) }) })
445
+ ]
446
+ }
86
447
  ),
87
- ...props,
88
- children
89
- }
90
- )
91
- ] })
448
+ /* @__PURE__ */ jsxRuntime.jsx(
449
+ "div",
450
+ {
451
+ className: cn(
452
+ "bg-background pointer-events-auto fixed top-1/2 left-1/2 flex h-full max-h-[calc(100%-2rem)] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col rounded-xl shadow-2xl transition-all",
453
+ {
454
+ "group-data-closed/popup:duration-pop-hover group-data-open/popup:duration-pop-hover group-data-open/popup:ease-pop-hover group-data-closed/popup:ease-out group-data-ending-style/popup:scale-[0.96] group-data-ending-style/popup:opacity-0 group-data-starting-style/popup:scale-[0.96] group-data-starting-style/popup:opacity-0": !bottom,
455
+ "group-data-open/popup:slide-in-from-bottom group-data-closed/popup:slide-out-to-bottom group-data-starting-style/popup-scale-100 group-data-ending-style/popup-scale-100 group-data-open/popup:animate-in group-data-closed/popup:animate-out top-auto bottom-0 h-full translate-y-0 rounded-b-none group-data-closed/popup:duration-200 group-data-closed/popup:ease-[cubic-bezier(1,0,0.72,0.32)] group-data-ending-style/popup:translate-y-full group-data-open/popup:duration-300 group-data-open/popup:ease-[cubic-bezier(0.32,0.72,0,1)] group-data-starting-style/popup:translate-y-full": bottom
456
+ },
457
+ className
458
+ ),
459
+ ...props,
460
+ children
461
+ }
462
+ )
463
+ ]
464
+ }
465
+ )
92
466
  ] });
93
467
  }
94
468
  function DialogHeader({ className, ...props }) {
95
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col gap-2 text-center sm:text-left", className), ...props });
469
+ return /* @__PURE__ */ jsxRuntime.jsx(
470
+ "div",
471
+ {
472
+ "data-slot": "dialog-header",
473
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
474
+ ...props
475
+ }
476
+ );
96
477
  }
97
- function DialogFooter({ className, ...props }) {
98
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col-reverse gap-2 sm:flex-row", className), ...props });
478
+ function DialogFooter({
479
+ className,
480
+ showCloseButton = false,
481
+ children,
482
+ ...props
483
+ }) {
484
+ return /* @__PURE__ */ jsxRuntime.jsxs(
485
+ "div",
486
+ {
487
+ "data-slot": "dialog-footer",
488
+ className: cn("flex flex-col-reverse gap-2 sm:flex-row", className),
489
+ ...props,
490
+ children: [
491
+ children,
492
+ showCloseButton && /* @__PURE__ */ jsxRuntime.jsx(DialogClose, { render: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "tertiary", theme: "base" }), children: "Close" })
493
+ ]
494
+ }
495
+ );
99
496
  }
100
497
  function DialogTitle({ className, ...props }) {
101
498
  return /* @__PURE__ */ jsxRuntime.jsx(
102
499
  dialog.Dialog.Title,
103
500
  {
501
+ "data-slot": "dialog-title",
104
502
  className: cn("text-lg leading-none font-semibold", className),
105
503
  ...props
106
504
  }
@@ -113,6 +511,7 @@ function DialogDescription({
113
511
  return /* @__PURE__ */ jsxRuntime.jsx(
114
512
  dialog.Dialog.Description,
115
513
  {
514
+ "data-slot": "dialog-description",
116
515
  className: cn("text-muted-foreground text-sm", className),
117
516
  ...props
118
517
  }
@@ -122,6 +521,7 @@ function DialogBody({ className, children, ...props }) {
122
521
  return /* @__PURE__ */ jsxRuntime.jsx(
123
522
  "div",
124
523
  {
524
+ "data-slot": "dialog-body",
125
525
  className: cn("flex shrink-0 grow basis-0 flex-col items-start self-stretch", className),
126
526
  ...props,
127
527
  children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 grow basis-0 flex-col items-start gap-10 self-stretch overflow-auto p-4", children })
@@ -130,13 +530,13 @@ function DialogBody({ className, children, ...props }) {
130
530
  }
131
531
 
132
532
  exports.Dialog = DialogRoot;
133
- exports.DialogBackdrop = DialogBackdrop;
134
533
  exports.DialogBody = DialogBody;
135
534
  exports.DialogClose = DialogClose;
535
+ exports.DialogContent = DialogContent;
136
536
  exports.DialogDescription = DialogDescription;
137
537
  exports.DialogFooter = DialogFooter;
138
538
  exports.DialogHeader = DialogHeader;
139
- exports.DialogPopup = DialogPopup;
539
+ exports.DialogOverlay = DialogOverlay;
140
540
  exports.DialogPortal = DialogPortal;
141
541
  exports.DialogTitle = DialogTitle;
142
542
  exports.DialogTrigger = DialogTrigger;