@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.js CHANGED
@@ -2,30 +2,395 @@ import { Dialog } from '@base-ui/react/dialog';
2
2
  import { XClose } from '@untitledui/icons';
3
3
  import { clsx } from 'clsx';
4
4
  import { twMerge } from 'tailwind-merge';
5
- import { jsx, jsxs } from 'react/jsx-runtime';
5
+ import { Button as Button$1 } from '@base-ui/react/button';
6
+ import { cva } from 'class-variance-authority';
7
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
8
 
7
9
  function cn(...inputs) {
8
10
  return twMerge(clsx(inputs));
9
11
  }
12
+ var loaderVariants = cva("flex shrink-0 items-center justify-center", {
13
+ variants: {
14
+ theme: {
15
+ default: "[--loader-foreground:var(--foreground)] [--loader-background:var(--foreground)]",
16
+ reversed: "[--loader-foreground:var(--background)] [--loader-background:var(--foreground)]",
17
+ black: "[--loader-foreground:var(--color-brand-midnight-900)] [--loader-background:var(--color-grayscale-300)]",
18
+ white: "[--loader-foreground:var(--color-grayscale-300)] [--loader-background:var(--color-brand-midnight-900)]"
19
+ },
20
+ variant: {
21
+ spinner: "size-5 motion-reduce:animate-none",
22
+ loader: "relative flex h-[13px] w-[23px] motion-reduce:animate-none"
23
+ }
24
+ },
25
+ defaultVariants: {
26
+ theme: "default",
27
+ variant: "spinner"
28
+ }
29
+ });
30
+ var spinnerFgVariants = cva("", {
31
+ variants: {
32
+ theme: {
33
+ default: "fill-foreground opacity-[0.06]",
34
+ reversed: "fill-white opacity-10",
35
+ black: "fill-black opacity-[0.04]",
36
+ white: "fill-white opacity-[0.04]"
37
+ }
38
+ }
39
+ });
40
+ var spinnerBgVariants = cva("", {
41
+ variants: {
42
+ theme: {
43
+ default: "fill-foreground",
44
+ reversed: "fill-background",
45
+ black: "fill-black opacity-[0.98]",
46
+ white: "fill-white opacity-[0.98]"
47
+ }
48
+ }
49
+ });
50
+ function Loader({
51
+ theme = "default",
52
+ variant = "spinner",
53
+ className,
54
+ style,
55
+ ...props
56
+ }) {
57
+ const dotCount = 21;
58
+ return /* @__PURE__ */ jsx(
59
+ "div",
60
+ {
61
+ "data-slot": "loader",
62
+ className: cn(
63
+ loaderVariants({ theme, variant }),
64
+ variant === "spinner" && "animate-spin",
65
+ className
66
+ ),
67
+ ...props,
68
+ children: variant === "spinner" ? /* @__PURE__ */ jsxs(
69
+ "svg",
70
+ {
71
+ width: "20",
72
+ height: "20",
73
+ viewBox: "0 0 20 20",
74
+ fill: "none",
75
+ xmlns: "http://www.w3.org/2000/svg",
76
+ children: [
77
+ /* @__PURE__ */ jsx("title", { children: "Loading spinner" }),
78
+ /* @__PURE__ */ jsxs("g", { clipPath: "url(#pop_loader_clip_path)", children: [
79
+ /* @__PURE__ */ jsx(
80
+ "path",
81
+ {
82
+ className: spinnerFgVariants({ theme }),
83
+ 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"
84
+ }
85
+ ),
86
+ /* @__PURE__ */ jsx(
87
+ "path",
88
+ {
89
+ className: spinnerBgVariants({ theme }),
90
+ 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"
91
+ }
92
+ )
93
+ ] }),
94
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "pop_loader_clip_path", children: /* @__PURE__ */ jsx(
95
+ "rect",
96
+ {
97
+ width: "20",
98
+ height: "20",
99
+ fill: "white",
100
+ transform: "translate(8.74228e-07 20) rotate(-90)"
101
+ }
102
+ ) }) })
103
+ ]
104
+ }
105
+ ) : /* @__PURE__ */ jsx(Fragment, { children: Array.from({ length: dotCount }, (_, index) => {
106
+ const delaySeconds = index * 0.035;
107
+ return (
108
+ // biome-ignore lint/suspicious/noArrayIndexKey: Dots are static and ordered
109
+ /* @__PURE__ */ jsx(
110
+ "div",
111
+ {
112
+ className: "bg-grayscale-200 dark:bg-grayscale-700 animate-loader-wave absolute top-0 size-[3px] rounded-full motion-reduce:animate-none",
113
+ style: {
114
+ left: `${index}px`,
115
+ animationDelay: `${delaySeconds}s`
116
+ }
117
+ },
118
+ index
119
+ )
120
+ );
121
+ }) })
122
+ }
123
+ );
124
+ }
125
+ var buttonVariants = cva(
126
+ "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",
127
+ {
128
+ variants: {
129
+ align: {
130
+ left: "justify-start",
131
+ center: "justify-center",
132
+ right: "justify-end"
133
+ },
134
+ collapsed: {
135
+ false: null,
136
+ true: "min-w-10 max-w-10 justify-center"
137
+ },
138
+ outline: {
139
+ false: null,
140
+ true: ""
141
+ },
142
+ hasLeading: {
143
+ false: null
144
+ },
145
+ theme: {
146
+ base: "bg-foreground text-background",
147
+ brand: "bg-primary-foreground text-primary",
148
+ error: ""
149
+ },
150
+ hasTrailing: {
151
+ false: null
152
+ },
153
+ variant: {
154
+ default: "hover:bg-background/90",
155
+ outline: "backdrop-blur-lg ",
156
+ primary: "bg-primary-foreground/0 backdrop-blur-lg text-primary",
157
+ secondary: "bg-secondary-foreground/0 backdrop-blur-lg text-secondary",
158
+ tertiary: "bg-background/0 backdrop-blur-lg [--foreground:var(--color-text-text-default)]"
159
+ },
160
+ pill: {
161
+ false: "rounded-xs",
162
+ true: "rounded-full"
163
+ },
164
+ size: {
165
+ default: "h-10 min-h-10 px-3 py-2 text-sm [&_svg:not([class*='size-'])]:size-[18px]",
166
+ lg: "h-12 min-h-12 text-base [&_svg:not([class*='size-'])]:size-[20px]"
167
+ }
168
+ },
169
+ defaultVariants: {
170
+ align: "center",
171
+ outline: false,
172
+ pill: false,
173
+ size: "default",
174
+ theme: "brand",
175
+ variant: "default"
176
+ },
177
+ compoundVariants: [
178
+ {
179
+ pill: true,
180
+ size: "default",
181
+ class: "min-w-10 min-h-10 px-4"
182
+ },
183
+ {
184
+ pill: true,
185
+ collapsed: true,
186
+ class: "max-w-10"
187
+ },
188
+ {
189
+ pill: true,
190
+ size: "lg",
191
+ class: "min-w-12 min-h-12 px-4"
192
+ },
193
+ {
194
+ pill: true,
195
+ size: "lg",
196
+ collapsed: true,
197
+ class: "max-w-[54px] max-h-12"
198
+ },
199
+ {
200
+ collapsed: false,
201
+ size: "default",
202
+ align: "left",
203
+ pill: false,
204
+ class: "pr-3 pl-2"
205
+ },
206
+ {
207
+ align: "center",
208
+ collapsed: false,
209
+ size: "default",
210
+ pill: false,
211
+ class: "px-3"
212
+ },
213
+ {
214
+ hasLeading: true,
215
+ pill: false,
216
+ align: "left",
217
+ size: "default",
218
+ class: "pr-3 pl-2"
219
+ },
220
+ {
221
+ collapsed: false,
222
+ size: "default",
223
+ pill: true,
224
+ class: "px-4"
225
+ },
226
+ {
227
+ size: "lg",
228
+ pill: true,
229
+ collapsed: false,
230
+ class: "px-4"
231
+ },
232
+ {
233
+ variant: "primary",
234
+ outline: false,
235
+ theme: "base",
236
+ 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"
237
+ },
238
+ {
239
+ variant: "primary",
240
+ outline: true,
241
+ theme: "base",
242
+ 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"
243
+ },
244
+ {
245
+ variant: "primary",
246
+ outline: true,
247
+ theme: "brand",
248
+ 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"
249
+ },
250
+ {
251
+ variant: "primary",
252
+ theme: "brand",
253
+ outline: false,
254
+ 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"
255
+ },
256
+ {
257
+ variant: "primary",
258
+ theme: "error",
259
+ class: "bg-destructive text-black"
260
+ },
261
+ {
262
+ variant: "secondary",
263
+ outline: false,
264
+ theme: "base",
265
+ class: "bg-background/0 text-foreground backdrop-blur-lg focus-visible:backdrop-blur-md"
266
+ },
267
+ {
268
+ variant: "secondary",
269
+ outline: true,
270
+ theme: "base",
271
+ 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"
272
+ },
273
+ {
274
+ variant: "tertiary",
275
+ outline: false,
276
+ theme: "base",
277
+ class: "bg-background/0 text-foreground backdrop-blur-lg focus-visible:backdrop-blur-md dark:text-white"
278
+ },
279
+ {
280
+ variant: "tertiary",
281
+ theme: "error",
282
+ class: "bg-transparent backdrop-blur-lg text-error-600"
283
+ }
284
+ ]
285
+ }
286
+ );
287
+ var tintVariants = cva(
288
+ "before:content-[''] before:absolute before:inset-0 before:transition-all before:rounded-[inherit] before:pointer-events-none",
289
+ {
290
+ variants: {
291
+ outline: {
292
+ false: null
293
+ },
294
+ variant: {
295
+ default: "",
296
+ outline: "",
297
+ 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",
298
+ 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",
299
+ 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"
300
+ }
301
+ },
302
+ defaultVariants: {
303
+ outline: false,
304
+ variant: "default"
305
+ },
306
+ compoundVariants: [
307
+ {
308
+ outline: true,
309
+ variant: "primary",
310
+ 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"
311
+ },
312
+ {
313
+ outline: true,
314
+ variant: "secondary",
315
+ 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"
316
+ }
317
+ ]
318
+ }
319
+ );
320
+ function Button({
321
+ align = "center",
322
+ children,
323
+ className,
324
+ collapsed = false,
325
+ leading,
326
+ outline = false,
327
+ pill = false,
328
+ loading = false,
329
+ loadingElement,
330
+ size = "default",
331
+ theme = "brand",
332
+ trailing,
333
+ variant = "default",
334
+ ...props
335
+ }) {
336
+ return /* @__PURE__ */ jsx(
337
+ Button$1,
338
+ {
339
+ "data-slot": "button",
340
+ className: cn(
341
+ buttonVariants({
342
+ variant,
343
+ size,
344
+ align,
345
+ outline,
346
+ collapsed,
347
+ pill,
348
+ className,
349
+ hasLeading: !!leading,
350
+ theme,
351
+ hasTrailing: !!trailing
352
+ }),
353
+ tintVariants({ variant, outline })
354
+ ),
355
+ ...props,
356
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
357
+ loading && (loadingElement || /* @__PURE__ */ jsx(Loader, { className: "absolute inset-0 m-auto", variant: "spinner", theme: "reversed" })),
358
+ leading && /* @__PURE__ */ jsx("div", { className: cn("group-aria-busy/button:opacity-0 transition-opacity", { "opacity-0": loading }), children: leading }),
359
+ children && /* @__PURE__ */ jsx("span", { className: cn("min-w-[18px] truncate relative transition-opacity", { "opacity-0": loading }), children }),
360
+ trailing && /* @__PURE__ */ jsx(
361
+ "div",
362
+ {
363
+ className: cn("group-aria-busy/button:opacity-0 transition-opacity", {
364
+ "opacity-0": loading,
365
+ "absolute top-1/2 right-0 translate-x-1/2 -translate-y-1/2": collapsed
366
+ }),
367
+ children: trailing
368
+ }
369
+ )
370
+ ] })
371
+ }
372
+ );
373
+ }
10
374
  function DialogRoot(props) {
11
- return /* @__PURE__ */ jsx(Dialog.Root, { ...props });
375
+ return /* @__PURE__ */ jsx(Dialog.Root, { "data-slot": "dialog", ...props });
12
376
  }
13
377
  function DialogPortal(props) {
14
- return /* @__PURE__ */ jsx(Dialog.Portal, { ...props });
378
+ return /* @__PURE__ */ jsx(Dialog.Portal, { "data-slot": "dialog-portal", ...props });
15
379
  }
16
380
  function DialogTrigger(props) {
17
- return /* @__PURE__ */ jsx(Dialog.Trigger, { ...props });
381
+ return /* @__PURE__ */ jsx(Dialog.Trigger, { "data-slot": "dialog-trigger", ...props });
18
382
  }
19
383
  function DialogClose(props) {
20
- return /* @__PURE__ */ jsx(Dialog.Close, { ...props });
384
+ return /* @__PURE__ */ jsx(Dialog.Close, { "data-slot": "dialog-close", ...props });
21
385
  }
22
- function DialogBackdrop({
386
+ function DialogOverlay({
23
387
  className,
24
388
  ...props
25
389
  }) {
26
390
  return /* @__PURE__ */ jsx(
27
391
  Dialog.Backdrop,
28
392
  {
393
+ "data-slot": "dialog-overlay",
29
394
  className: cn(
30
395
  "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",
31
396
  "data-closed:opacity-0 data-open:opacity-100",
@@ -42,6 +407,7 @@ function DialogViewport({
42
407
  return /* @__PURE__ */ jsx(
43
408
  Dialog.Viewport,
44
409
  {
410
+ "data-slot": "dialog-viewport",
45
411
  className: cn(
46
412
  "fixed inset-0 flex items-center justify-center overflow-hidden py-6 [@media(min-height:600px)]:pt-8 [@media(min-height:600px)]:pb-12",
47
413
  className
@@ -50,55 +416,87 @@ function DialogViewport({
50
416
  }
51
417
  );
52
418
  }
53
- function DialogPopup({
419
+ function DialogContent({
54
420
  className,
55
421
  children,
56
422
  bottom = false,
57
423
  showCloseButton = true,
424
+ closePosition = "top-left",
58
425
  ...props
59
426
  }) {
60
- return /* @__PURE__ */ jsxs(Dialog.Portal, { children: [
61
- /* @__PURE__ */ jsx(DialogBackdrop, {}),
62
- /* @__PURE__ */ jsxs(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: [
63
- showCloseButton && /* @__PURE__ */ jsxs(
64
- DialogClose,
65
- {
66
- className: "pointer-events-auto fixed top-[15px] left-5 z-50",
67
- "aria-label": "Close",
68
- children: [
69
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" }),
70
- /* @__PURE__ */ 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__ */ jsx("span", { className: "bg-primary-foreground text-background relative z-10 flex size-10 items-center justify-center rounded-full", children: /* @__PURE__ */ jsx(XClose, { className: "size-[18px]" }) }) })
71
- ]
72
- }
73
- ),
74
- /* @__PURE__ */ jsx(
75
- "div",
76
- {
77
- className: cn(
78
- "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",
427
+ return /* @__PURE__ */ jsxs(Dialog.Portal, { "data-slot": "dialog-portal", children: [
428
+ /* @__PURE__ */ jsx(DialogOverlay, {}),
429
+ /* @__PURE__ */ jsxs(
430
+ Dialog.Popup,
431
+ {
432
+ "data-slot": "dialog-content",
433
+ 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",
434
+ children: [
435
+ showCloseButton && /* @__PURE__ */ jsxs(
436
+ DialogClose,
79
437
  {
80
- "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,
81
- "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
82
- },
83
- className
438
+ 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 }),
439
+ "aria-label": "Close",
440
+ children: [
441
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" }),
442
+ /* @__PURE__ */ 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__ */ jsx("span", { className: "bg-primary-foreground text-background relative z-10 flex size-10 items-center justify-center rounded-full", children: /* @__PURE__ */ jsx(XClose, { className: "size-[18px]" }) }) })
443
+ ]
444
+ }
84
445
  ),
85
- ...props,
86
- children
87
- }
88
- )
89
- ] })
446
+ /* @__PURE__ */ jsx(
447
+ "div",
448
+ {
449
+ className: cn(
450
+ "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",
451
+ {
452
+ "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,
453
+ "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
454
+ },
455
+ className
456
+ ),
457
+ ...props,
458
+ children
459
+ }
460
+ )
461
+ ]
462
+ }
463
+ )
90
464
  ] });
91
465
  }
92
466
  function DialogHeader({ className, ...props }) {
93
- return /* @__PURE__ */ jsx("div", { className: cn("flex flex-col gap-2 text-center sm:text-left", className), ...props });
467
+ return /* @__PURE__ */ jsx(
468
+ "div",
469
+ {
470
+ "data-slot": "dialog-header",
471
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
472
+ ...props
473
+ }
474
+ );
94
475
  }
95
- function DialogFooter({ className, ...props }) {
96
- return /* @__PURE__ */ jsx("div", { className: cn("flex flex-col-reverse gap-2 sm:flex-row", className), ...props });
476
+ function DialogFooter({
477
+ className,
478
+ showCloseButton = false,
479
+ children,
480
+ ...props
481
+ }) {
482
+ return /* @__PURE__ */ jsxs(
483
+ "div",
484
+ {
485
+ "data-slot": "dialog-footer",
486
+ className: cn("flex flex-col-reverse gap-2 sm:flex-row", className),
487
+ ...props,
488
+ children: [
489
+ children,
490
+ showCloseButton && /* @__PURE__ */ jsx(DialogClose, { render: /* @__PURE__ */ jsx(Button, { variant: "tertiary", theme: "base" }), children: "Close" })
491
+ ]
492
+ }
493
+ );
97
494
  }
98
495
  function DialogTitle({ className, ...props }) {
99
496
  return /* @__PURE__ */ jsx(
100
497
  Dialog.Title,
101
498
  {
499
+ "data-slot": "dialog-title",
102
500
  className: cn("text-lg leading-none font-semibold", className),
103
501
  ...props
104
502
  }
@@ -111,6 +509,7 @@ function DialogDescription({
111
509
  return /* @__PURE__ */ jsx(
112
510
  Dialog.Description,
113
511
  {
512
+ "data-slot": "dialog-description",
114
513
  className: cn("text-muted-foreground text-sm", className),
115
514
  ...props
116
515
  }
@@ -120,6 +519,7 @@ function DialogBody({ className, children, ...props }) {
120
519
  return /* @__PURE__ */ jsx(
121
520
  "div",
122
521
  {
522
+ "data-slot": "dialog-body",
123
523
  className: cn("flex shrink-0 grow basis-0 flex-col items-start self-stretch", className),
124
524
  ...props,
125
525
  children: /* @__PURE__ */ jsx("div", { className: "flex shrink-0 grow basis-0 flex-col items-start gap-10 self-stretch overflow-auto p-4", children })
@@ -127,6 +527,6 @@ function DialogBody({ className, children, ...props }) {
127
527
  );
128
528
  }
129
529
 
130
- export { DialogRoot as Dialog, DialogBackdrop, DialogBody, DialogClose, DialogDescription, DialogFooter, DialogHeader, DialogPopup, DialogPortal, DialogTitle, DialogTrigger, DialogViewport };
530
+ export { DialogRoot as Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DialogViewport };
131
531
  //# sourceMappingURL=dialog.js.map
132
532
  //# sourceMappingURL=dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/lib/utils.ts","../src/components/dialog/dialog.tsx"],"names":["DialogPrimitive"],"mappings":";;;;;;AAGO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACKA,SAAS,WAAW,KAAA,EAA0D;AAC5E,EAAA,uBAAO,GAAA,CAACA,MAAA,CAAgB,IAAA,EAAhB,EAAsB,GAAG,KAAA,EAAO,CAAA;AAC1C;AAMA,SAAS,aAAa,KAAA,EAA4D;AAChF,EAAA,uBAAO,GAAA,CAACA,MAAA,CAAgB,MAAA,EAAhB,EAAwB,GAAG,KAAA,EAAO,CAAA;AAC5C;AAMA,SAAS,cAAc,KAAA,EAA6D;AAClF,EAAA,uBAAO,GAAA,CAACA,MAAA,CAAgB,OAAA,EAAhB,EAAyB,GAAG,KAAA,EAAO,CAAA;AAC7C;AAMA,SAAS,YAAY,KAAA,EAA2D;AAC9E,EAAA,uBAAO,GAAA,CAACA,MAAA,CAAgB,KAAA,EAAhB,EAAuB,GAAG,KAAA,EAAO,CAAA;AAC3C;AAMA,SAAS,cAAA,CAAe;AAAA,EACtB,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAA0D;AACxD,EAAA,uBACE,GAAA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AG,OAAM,EAAgC;AAClF,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA,CAAG,8DAAA,EAAgE,SAAS,CAAA;AAAA,MACtF,GAAG,KAAA;AAAA,MAEJ,QAAA,kBAAA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,uFAAA,EACZ,QAAA,EACH;AAAA;AAAA,GACF;AAEJ","file":"dialog.js","sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport { Dialog as DialogPrimitive } from \"@base-ui/react/dialog\";\nimport { XClose } from \"@untitledui/icons\";\nimport { cn } from \"../../lib/utils\";\n\n/* ---------------------------------------------\n * Root\n * --------------------------------------------- */\n\nfunction DialogRoot(props: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root {...props} />;\n}\n\n/* ---------------------------------------------\n * Portal\n * --------------------------------------------- */\n\nfunction DialogPortal(props: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal {...props} />;\n}\n\n/* ---------------------------------------------\n * Trigger\n * --------------------------------------------- */\n\nfunction DialogTrigger(props: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger {...props} />;\n}\n\n/* ---------------------------------------------\n * Close\n * --------------------------------------------- */\n\nfunction DialogClose(props: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close {...props} />;\n}\n\n/* ---------------------------------------------\n * Overlay (Backdrop)\n * --------------------------------------------- */\n\nfunction DialogBackdrop({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Backdrop>) {\n return (\n <DialogPrimitive.Backdrop\n className={cn(\n \"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\",\n \"data-closed:opacity-0 data-open:opacity-100\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DialogViewport({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Viewport>) {\n return (\n <DialogPrimitive.Viewport\n className={cn(\n \"fixed inset-0 flex items-center justify-center overflow-hidden py-6 [@media(min-height:600px)]:pt-8 [@media(min-height:600px)]:pb-12\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/* ---------------------------------------------\n * Content (Popup)\n * --------------------------------------------- */\n\nfunction DialogPopup({\n className,\n children,\n bottom = false,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Popup> & {\n bottom?: boolean;\n showCloseButton?: boolean;\n}) {\n return (\n <DialogPrimitive.Portal>\n <DialogBackdrop />\n <DialogPrimitive.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\">\n {showCloseButton && (\n <DialogClose\n className=\"pointer-events-auto fixed top-[15px] left-5 z-50\"\n aria-label=\"Close\"\n >\n <span className=\"sr-only\">Close</span>\n <span className=\"before:bg-tint-700-reversed relative block before:absolute before:-inset-1.5 before:rounded-full before:backdrop-blur-sm\">\n <span className=\"bg-primary-foreground text-background relative z-10 flex size-10 items-center justify-center rounded-full\">\n <XClose className=\"size-[18px]\" />\n </span>\n </span>\n </DialogClose>\n )}\n <div\n className={cn(\n \"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\",\n {\n \"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\":\n !bottom,\n \"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\":\n bottom,\n },\n className,\n )}\n {...props}\n >\n {children}\n </div>\n </DialogPrimitive.Popup>\n </DialogPrimitive.Portal>\n );\n}\n\n/* ---------------------------------------------\n * Header / Footer\n * --------------------------------------------- */\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div className={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)} {...props} />\n );\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div className={cn(\"flex flex-col-reverse gap-2 sm:flex-row\", className)} {...props} />;\n}\n\n/* ---------------------------------------------\n * Title / Description\n * --------------------------------------------- */\n\nfunction DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n className={cn(\"text-lg leading-none font-semibold\", className)}\n {...props}\n />\n );\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n );\n}\n\nfunction DialogBody({ className, children, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n className={cn(\"flex shrink-0 grow basis-0 flex-col items-start self-stretch\", className)}\n {...props}\n >\n <div className=\"flex shrink-0 grow basis-0 flex-col items-start gap-10 self-stretch overflow-auto p-4\">\n {children}\n </div>\n </div>\n );\n}\n/* ---------------------------------------------\n * Exports (preserve your public API)\n * --------------------------------------------- */\n\nexport {\n DialogRoot as Dialog,\n DialogBackdrop,\n DialogBody,\n DialogClose,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogPopup,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n DialogViewport\n};\n"]}
1
+ {"version":3,"sources":["../src/lib/utils.ts","../src/components/loader/loader.tsx","../src/components/button/button.tsx","../src/components/dialog/dialog.tsx"],"names":["cva","jsx","ButtonPrimitive","jsxs","Fragment","DialogPrimitive"],"mappings":";;;;;;;;AAGO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACEA,IAAM,cAAA,GAAiB,IAAI,2CAAA,EAA6C;AAAA,EACtE,QAAA,EAAU;AAAA,IACR,KAAA,EAAO;AAAA,MACL,OAAA,EAAS,iFAAA;AAAA,MACT,QAAA,EAAU,iFAAA;AAAA,MACV,KAAA,EACE,wGAAA;AAAA,MACF,KAAA,EACE;AAAA,KACJ;AAAA,IACA,OAAA,EAAS;AAAA,MACP,OAAA,EAAS,mCAAA;AAAA,MACT,MAAA,EAAQ;AAAA;AACV,GACF;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,KAAA,EAAO,SAAA;AAAA,IACP,OAAA,EAAS;AAAA;AAEb,CAAC,CAAA;AAED,IAAM,iBAAA,GAAoB,IAAI,EAAA,EAAI;AAAA,EAChC,QAAA,EAAU;AAAA,IACR,KAAA,EAAO;AAAA,MACL,OAAA,EAAS,gCAAA;AAAA,MACT,QAAA,EAAU,uBAAA;AAAA,MACV,KAAA,EAAO,2BAAA;AAAA,MACP,KAAA,EAAO;AAAA;AACT;AAEJ,CAAC,CAAA;AAED,IAAM,iBAAA,GAAoB,IAAI,EAAA,EAAI;AAAA,EAChC,QAAA,EAAU;AAAA,IACR,KAAA,EAAO;AAAA,M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A,QACA,eAAA,oBACCF,GAAAA,CAAC,WAAA,EAAA,EAAY,MAAA,kBAAQA,GAAAA,CAAC,MAAA,EAAA,EAAO,OAAA,EAAQ,UAAA,EAAW,KAAA,EAAM,MAAA,EAAO,GAAI,QAAA,EAAA,OAAA,EAAK;AAAA;AAAA;AAAA,GAE1E;AAEJ;AAMA,SAAS,WAAA,CAAY,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AACzE,EAAA,uBACEA,GAAAA;AAAA,IAACI,MAAA,CAAgB,KAAA;AAAA,IAAhB;AAAA,MACC,WAAA,EAAU,cAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,oCAAA,EAAsC,SAAS,CAAA;AAAA,MAC5D,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,iBAAA,CAAkB;AAAA,EACzB,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAsC;AACpC,EAAA,uBACEJ,GAAAA;AAAA,IAACI,MAAA,CAAgB,WAAA;AAAA,IAAhB;AAAA,MACC,WAAA,EAAU,oBAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,+BAAA,EAAiC,SAAS,CAAA;AAAA,MACvD,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,WAAW,EAAE,SAAA,EAAW,QAAA,EAAU,GAAG,OAAM,EAAgC;AAClF,EAAA,uBACEJ,GAAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,aAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,8DAAA,EAAgE,SAAS,CAAA;AAAA,MACtF,GAAG,KAAA;AAAA,MAEJ,QAAA,kBAAAA,GAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,yFACZ,QAAA,EACH;AAAA;AAAA,GACF;AAEJ","file":"dialog.js","sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport { cva } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\nimport type { LoaderProps } from \"./types\";\n\nconst loaderVariants = cva(\"flex shrink-0 items-center justify-center\", {\n variants: {\n theme: {\n default: \"[--loader-foreground:var(--foreground)] [--loader-background:var(--foreground)]\",\n reversed: \"[--loader-foreground:var(--background)] [--loader-background:var(--foreground)]\",\n black:\n \"[--loader-foreground:var(--color-brand-midnight-900)] [--loader-background:var(--color-grayscale-300)]\",\n white:\n \"[--loader-foreground:var(--color-grayscale-300)] [--loader-background:var(--color-brand-midnight-900)]\",\n },\n variant: {\n spinner: \"size-5 motion-reduce:animate-none\",\n loader: \"relative flex h-[13px] w-[23px] motion-reduce:animate-none\",\n },\n },\n defaultVariants: {\n theme: \"default\",\n variant: \"spinner\",\n },\n});\n\nconst spinnerFgVariants = cva(\"\", {\n variants: {\n theme: {\n default: \"fill-foreground opacity-[0.06]\",\n reversed: \"fill-white opacity-10\",\n black: \"fill-black opacity-[0.04]\",\n white: \"fill-white opacity-[0.04]\",\n },\n },\n});\n\nconst spinnerBgVariants = cva(\"\", {\n variants: {\n theme: {\n default: \"fill-foreground\",\n reversed: \"fill-background\",\n black: \"fill-black opacity-[0.98]\",\n white: \"fill-white opacity-[0.98]\",\n },\n },\n});\n\nfunction Loader({\n theme = \"default\",\n variant = \"spinner\",\n className,\n style,\n ...props\n}: LoaderProps) {\n const dotCount = 21;\n\n return (\n <div\n data-slot=\"loader\"\n className={cn(\n loaderVariants({ theme, variant }),\n variant === \"spinner\" && \"animate-spin\",\n className,\n )}\n {...props}\n >\n {variant === \"spinner\" ? (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <title>Loading spinner</title>\n <g clipPath=\"url(#pop_loader_clip_path)\">\n <path\n className={spinnerFgVariants({ theme })}\n 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\"\n />\n <path\n className={spinnerBgVariants({ theme })}\n 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\"\n />\n </g>\n <defs>\n <clipPath id=\"pop_loader_clip_path\">\n <rect\n width=\"20\"\n height=\"20\"\n fill=\"white\"\n transform=\"translate(8.74228e-07 20) rotate(-90)\"\n />\n </clipPath>\n </defs>\n </svg>\n ) : (\n <>\n {Array.from({ length: dotCount }, (_, index) => {\n const delaySeconds = index * 0.035;\n return (\n // biome-ignore lint/suspicious/noArrayIndexKey: Dots are static and ordered\n <div\n key={index}\n className=\"bg-grayscale-200 dark:bg-grayscale-700 animate-loader-wave absolute top-0 size-[3px] rounded-full motion-reduce:animate-none\"\n style={{\n left: `${index}px`,\n animationDelay: `${delaySeconds}s`,\n }}\n />\n );\n })}\n </>\n )}\n </div>\n );\n}\n\nexport { Loader };\n","\"use client\";\n\nimport { Button as ButtonPrimitive } from \"@base-ui/react/button\";\nimport { cva } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\nimport { Loader } from \"../loader\";\nimport { ButtonProps } from \"./types\";\n\nconst buttonVariants = cva(\n \"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\",\n {\n variants: {\n align: {\n left: \"justify-start\",\n center: \"justify-center\",\n right: \"justify-end\",\n },\n collapsed: {\n false: null,\n true: \"min-w-10 max-w-10 justify-center\",\n },\n outline: {\n false: null,\n true: \"\",\n },\n hasLeading: {\n false: null,\n },\n theme: {\n base: \"bg-foreground text-background\",\n brand: \"bg-primary-foreground text-primary\",\n error: \"\",\n },\n hasTrailing: {\n false: null,\n },\n variant: {\n default: \"hover:bg-background/90\",\n outline: \"backdrop-blur-lg \",\n primary: \"bg-primary-foreground/0 backdrop-blur-lg text-primary\",\n secondary: \"bg-secondary-foreground/0 backdrop-blur-lg text-secondary\",\n tertiary: \"bg-background/0 backdrop-blur-lg [--foreground:var(--color-text-text-default)]\",\n },\n pill: {\n false: \"rounded-xs\",\n true: \"rounded-full\",\n },\n size: {\n default: \"h-10 min-h-10 px-3 py-2 text-sm [&_svg:not([class*='size-'])]:size-[18px]\",\n lg: \"h-12 min-h-12 text-base [&_svg:not([class*='size-'])]:size-[20px]\",\n },\n },\n defaultVariants: {\n align: \"center\",\n outline: false,\n pill: false,\n size: \"default\",\n theme: \"brand\",\n variant: \"default\",\n },\n compoundVariants: [\n {\n pill: true,\n size: \"default\",\n class: \"min-w-10 min-h-10 px-4\",\n },\n {\n pill: true,\n collapsed: true,\n class: \"max-w-10\",\n },\n {\n pill: true,\n size: \"lg\",\n class: \"min-w-12 min-h-12 px-4\",\n },\n {\n pill: true,\n size: \"lg\",\n collapsed: true,\n class: \"max-w-[54px] max-h-12\",\n },\n {\n collapsed: false,\n size: \"default\",\n align: \"left\",\n pill: false,\n class: \"pr-3 pl-2\",\n },\n {\n align: \"center\",\n collapsed: false,\n size: \"default\",\n pill: false,\n class: \"px-3\",\n },\n {\n hasLeading: true,\n pill: false,\n align: \"left\",\n size: \"default\",\n class: \"pr-3 pl-2\",\n },\n {\n collapsed: false,\n size: \"default\",\n pill: true,\n class: \"px-4\",\n },\n {\n size: \"lg\",\n pill: true,\n collapsed: false,\n class: \"px-4\",\n },\n {\n variant: \"primary\",\n outline: false,\n theme: \"base\",\n class:\n \"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\",\n },\n {\n variant: \"primary\",\n outline: true,\n theme: \"base\",\n class:\n \"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\",\n },\n {\n variant: \"primary\",\n outline: true,\n theme: \"brand\",\n class:\n \"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\",\n },\n {\n variant: \"primary\",\n theme: \"brand\",\n outline: false,\n class:\n \"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\",\n },\n {\n variant: \"primary\",\n theme: \"error\",\n class: \"bg-destructive text-black\",\n },\n {\n variant: \"secondary\",\n outline: false,\n theme: \"base\",\n class: \"bg-background/0 text-foreground backdrop-blur-lg focus-visible:backdrop-blur-md\",\n },\n {\n variant: \"secondary\",\n outline: true,\n theme: \"base\",\n class:\n \"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\",\n },\n {\n variant: \"tertiary\",\n outline: false,\n theme: \"base\",\n class: \"bg-background/0 text-foreground backdrop-blur-lg focus-visible:backdrop-blur-md dark:text-white\",\n },\n {\n variant: \"tertiary\",\n theme: \"error\",\n class: \"bg-transparent backdrop-blur-lg text-error-600\",\n },\n ],\n },\n);\n\nconst tintVariants = cva(\n \"before:content-[''] before:absolute before:inset-0 before:transition-all before:rounded-[inherit] before:pointer-events-none\",\n {\n variants: {\n outline: {\n false: null,\n },\n variant: {\n default: \"\",\n outline: \"\",\n primary:\n \"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\",\n secondary:\n \"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\",\n tertiary:\n \"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\",\n },\n },\n defaultVariants: {\n outline: false,\n variant: \"default\",\n },\n compoundVariants: [\n {\n outline: true,\n variant: \"primary\",\n class:\n \"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\",\n },\n {\n outline: true,\n variant: \"secondary\",\n class:\n \"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\",\n },\n ],\n },\n);\n\nfunction Button({\n align = \"center\",\n children,\n className,\n collapsed = false,\n leading,\n outline = false,\n pill = false,\n loading = false,\n loadingElement,\n size = \"default\",\n theme = \"brand\",\n trailing,\n variant = \"default\",\n ...props\n}: ButtonProps) {\n return (\n <ButtonPrimitive\n data-slot=\"button\"\n className={cn(\n buttonVariants({\n variant,\n size,\n align,\n outline,\n collapsed,\n pill,\n className,\n hasLeading: !!leading,\n theme,\n hasTrailing: !!trailing,\n }),\n tintVariants({ variant, outline }),\n )}\n {...props}\n >\n <>\n {loading && (\n loadingElement || <Loader className=\"absolute inset-0 m-auto\" variant=\"spinner\" theme=\"reversed\" />\n )}\n {leading && <div className={cn(\"group-aria-busy/button:opacity-0 transition-opacity\", { \"opacity-0\": loading })}>{leading}</div>}\n {children && (\n <span className={cn(\"min-w-[18px] truncate relative transition-opacity\", { \"opacity-0\": loading })}>\n {children}\n </span>\n )}\n {trailing && (\n <div\n className={cn(\"group-aria-busy/button:opacity-0 transition-opacity\", {\n \"opacity-0\": loading,\n \"absolute top-1/2 right-0 translate-x-1/2 -translate-y-1/2\": collapsed,\n })}\n >\n {trailing}\n </div>\n )}\n </>\n </ButtonPrimitive>\n );\n}\n\nexport { Button };\n","\"use client\";\n\nimport { Dialog as DialogPrimitive } from \"@base-ui/react/dialog\";\nimport { XClose } from \"@untitledui/icons\";\nimport * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\nimport { Button } from \"../button\";\n\n/* ---------------------------------------------\n * Root\n * --------------------------------------------- */\n\nfunction DialogRoot(props: DialogPrimitive.Root.Props) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\n/* ---------------------------------------------\n * Portal\n * --------------------------------------------- */\n\nfunction DialogPortal(props: DialogPrimitive.Portal.Props) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\n/* ---------------------------------------------\n * Trigger\n * --------------------------------------------- */\n\nfunction DialogTrigger(props: DialogPrimitive.Trigger.Props) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\n/* ---------------------------------------------\n * Close\n * --------------------------------------------- */\n\nfunction DialogClose(props: DialogPrimitive.Close.Props) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\n/* ---------------------------------------------\n * Overlay\n * --------------------------------------------- */\n\nfunction DialogOverlay({\n className,\n ...props\n}: DialogPrimitive.Backdrop.Props) {\n return (\n <DialogPrimitive.Backdrop\n data-slot=\"dialog-overlay\"\n className={cn(\n \"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\",\n \"data-closed:opacity-0 data-open:opacity-100\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DialogViewport({\n className,\n ...props\n}: DialogPrimitive.Viewport.Props) {\n return (\n <DialogPrimitive.Viewport\n data-slot=\"dialog-viewport\"\n className={cn(\n \"fixed inset-0 flex items-center justify-center overflow-hidden py-6 [@media(min-height:600px)]:pt-8 [@media(min-height:600px)]:pb-12\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/* ---------------------------------------------\n * Content (shadcn: Portal + Overlay + Popup)\n * --------------------------------------------- */\n\nfunction DialogContent({\n className,\n children,\n bottom = false,\n showCloseButton = true,\n closePosition = \"top-left\",\n ...props\n}: DialogPrimitive.Popup.Props & {\n bottom?: boolean;\n showCloseButton?: boolean;\n closePosition?: \"top-left\" | \"top-right\";\n}) {\n return (\n <DialogPrimitive.Portal data-slot=\"dialog-portal\">\n <DialogOverlay />\n <DialogPrimitive.Popup\n data-slot=\"dialog-content\"\n 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\"\n >\n {showCloseButton && (\n <DialogClose\n 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 })}\n aria-label=\"Close\"\n >\n <span className=\"sr-only\">Close</span>\n <span className=\"before:bg-tint-700-reversed relative block before:absolute before:-inset-1.5 before:rounded-full before:backdrop-blur-sm\">\n <span className=\"bg-primary-foreground text-background relative z-10 flex size-10 items-center justify-center rounded-full\">\n <XClose className=\"size-[18px]\" />\n </span>\n </span>\n </DialogClose>\n )}\n <div\n className={cn(\n \"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\",\n {\n \"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\":\n !bottom,\n \"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\":\n bottom,\n },\n className,\n )}\n {...props}\n >\n {children}\n </div>\n </DialogPrimitive.Popup>\n </DialogPrimitive.Portal>\n );\n}\n\n/* ---------------------------------------------\n * Header / Footer\n * --------------------------------------------- */\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)}\n {...props}\n />\n );\n}\n\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showCloseButton?: boolean;\n}) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\"flex flex-col-reverse gap-2 sm:flex-row\", className)}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogClose render={<Button variant=\"tertiary\" theme=\"base\" />}>Close</DialogClose>\n )}\n </div>\n );\n}\n\n/* ---------------------------------------------\n * Title / Description\n * --------------------------------------------- */\n\nfunction DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"text-lg leading-none font-semibold\", className)}\n {...props}\n />\n );\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: DialogPrimitive.Description.Props) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n );\n}\n\nfunction DialogBody({ className, children, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-body\"\n className={cn(\"flex shrink-0 grow basis-0 flex-col items-start self-stretch\", className)}\n {...props}\n >\n <div className=\"flex shrink-0 grow basis-0 flex-col items-start gap-10 self-stretch overflow-auto p-4\">\n {children}\n </div>\n </div>\n );\n}\n\n/* ---------------------------------------------\n * Exports (shadcn-compatible API)\n * --------------------------------------------- */\n\nexport {\n DialogRoot as Dialog,\n DialogBody,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n DialogViewport\n};\n"]}