@yenio-pld/blocks 1.0.0-rc.1 → 1.0.0-rc.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.
package/dist/index.cjs CHANGED
@@ -1,144 +1,63 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var React = require('react');
4
+ var react = require('react');
5
+ var skeleton_js = require('./ui/skeleton.js');
6
+ var jsxRuntime = require('react/jsx-runtime');
5
7
  var lucideReact = require('lucide-react');
6
8
  var clsx = require('clsx');
7
9
  var tailwindMerge = require('tailwind-merge');
10
+ var empty_js = require('./ui/empty.js');
8
11
  var classVarianceAuthority = require('class-variance-authority');
9
- var jsxRuntime = require('react/jsx-runtime');
10
- var AlertDialogPrimitive = require('@radix-ui/react-alert-dialog');
11
- var reactSlot = require('@radix-ui/react-slot');
12
- var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
12
+ var alertDialog_js = require('./ui/alert-dialog.js');
13
+ var button_js = require('./ui/button.js');
14
+ var dropdownMenu_js = require('./ui/dropdown-menu.js');
13
15
  var nextThemes = require('next-themes');
14
- var SliderPrimitive = require('@radix-ui/react-slider');
15
- var TogglePrimitive = require('@radix-ui/react-toggle');
16
- var DialogPrimitive = require('@radix-ui/react-dialog');
17
- var vaul = require('vaul');
16
+ var slider_js = require('./ui/slider.js');
17
+ var toggle_js = require('./ui/toggle.js');
18
+ var dialog_js = require('./ui/dialog.js');
19
+ var drawer_js = require('./ui/drawer.js');
18
20
  var framerMotion = require('framer-motion');
19
21
 
20
- function _interopNamespace(e) {
21
- if (e && e.__esModule) return e;
22
- var n = Object.create(null);
23
- if (e) {
24
- Object.keys(e).forEach(function (k) {
25
- if (k !== 'default') {
26
- var d = Object.getOwnPropertyDescriptor(e, k);
27
- Object.defineProperty(n, k, d.get ? d : {
28
- enumerable: true,
29
- get: function () { return e[k]; }
30
- });
31
- }
32
- });
33
- }
34
- n.default = e;
35
- return Object.freeze(n);
36
- }
37
-
38
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
39
- var AlertDialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(AlertDialogPrimitive);
40
- var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
41
- var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
42
- var TogglePrimitive__namespace = /*#__PURE__*/_interopNamespace(TogglePrimitive);
43
- var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
44
-
45
- var LanguageContext = React.createContext(null);
22
+ var LanguageContext = react.createContext(null);
46
23
  function useLanguageContext() {
47
- return React.useContext(LanguageContext);
48
- }
49
- function cn(...inputs) {
50
- return tailwindMerge.twMerge(clsx.clsx(inputs));
51
- }
52
- function Empty({ className, ...props }) {
53
- return /* @__PURE__ */ jsxRuntime.jsx(
54
- "div",
55
- {
56
- "data-slot": "empty",
57
- className: cn(
58
- "flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg p-6 text-center text-balance md:p-12",
59
- className
60
- ),
61
- ...props
62
- }
63
- );
24
+ return react.useContext(LanguageContext);
64
25
  }
65
- function EmptyHeader({ className, ...props }) {
66
- return /* @__PURE__ */ jsxRuntime.jsx(
67
- "div",
68
- {
69
- "data-slot": "empty-header",
70
- className: cn(
71
- "flex max-w-sm flex-col items-center gap-2 text-center",
72
- className
73
- ),
74
- ...props
75
- }
76
- );
26
+ function PageTitle({
27
+ title,
28
+ description
29
+ }) {
30
+ return /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "flex flex-col gap-1", children: [
31
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-2xl font-semibold tracking-tight", children: title }),
32
+ description ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: description }) : null
33
+ ] });
77
34
  }
78
- var emptyMediaVariants = classVarianceAuthority.cva(
79
- "mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
80
- {
81
- variants: {
82
- variant: {
83
- default: "bg-transparent",
84
- icon: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6"
85
- }
86
- },
87
- defaultVariants: {
88
- variant: "default"
89
- }
90
- }
91
- );
92
- function EmptyMedia({
93
- className,
94
- variant = "default",
95
- ...props
35
+ function Field({
36
+ label,
37
+ children
96
38
  }) {
97
- return /* @__PURE__ */ jsxRuntime.jsx(
98
- "div",
99
- {
100
- "data-slot": "empty-icon",
101
- "data-variant": variant,
102
- className: cn(emptyMediaVariants({ variant, className })),
103
- ...props
104
- }
105
- );
39
+ return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1 text-sm", children: [
40
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: label }),
41
+ children
42
+ ] });
106
43
  }
107
- function EmptyTitle({ className, ...props }) {
108
- return /* @__PURE__ */ jsxRuntime.jsx(
109
- "div",
110
- {
111
- "data-slot": "empty-title",
112
- className: cn("text-lg font-medium tracking-tight", className),
113
- ...props
114
- }
115
- );
44
+ function ListSkeleton() {
45
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", "aria-hidden": "true", children: [
46
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton_js.Skeleton, { className: "h-8 w-48" }),
47
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton_js.Skeleton, { className: "h-10 w-full" }),
48
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton_js.Skeleton, { className: "h-16 w-full" }),
49
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton_js.Skeleton, { className: "h-16 w-full" }),
50
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton_js.Skeleton, { className: "h-16 w-full" })
51
+ ] });
116
52
  }
117
- function EmptyDescription({ className, ...props }) {
118
- return /* @__PURE__ */ jsxRuntime.jsx(
119
- "div",
120
- {
121
- "data-slot": "empty-description",
122
- className: cn(
123
- "text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
124
- className
125
- ),
126
- ...props
127
- }
128
- );
53
+ function TableSkeleton({
54
+ columns,
55
+ rows = 5
56
+ }) {
57
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "aria-busy": "true", className: "flex flex-col gap-2", children: Array.from({ length: rows }, (_, row) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-2", children: Array.from({ length: columns }, (_2, column) => /* @__PURE__ */ jsxRuntime.jsx(skeleton_js.Skeleton, { className: "h-8 flex-1" }, column)) }, row)) });
129
58
  }
130
- function EmptyContent({ className, ...props }) {
131
- return /* @__PURE__ */ jsxRuntime.jsx(
132
- "div",
133
- {
134
- "data-slot": "empty-content",
135
- className: cn(
136
- "flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance",
137
- className
138
- ),
139
- ...props
140
- }
141
- );
59
+ function cn(...inputs) {
60
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
142
61
  }
143
62
  function LoadingState({
144
63
  label = "Loading\u2026",
@@ -195,7 +114,7 @@ function EmptyState({
195
114
  }) {
196
115
  const isCompact = variant === "compact";
197
116
  return /* @__PURE__ */ jsxRuntime.jsxs(
198
- Empty,
117
+ empty_js.Empty,
199
118
  {
200
119
  className: cn(
201
120
  "gap-3",
@@ -203,9 +122,9 @@ function EmptyState({
203
122
  className
204
123
  ),
205
124
  children: [
206
- /* @__PURE__ */ jsxRuntime.jsxs(EmptyHeader, { className: "gap-3", children: [
125
+ /* @__PURE__ */ jsxRuntime.jsxs(empty_js.EmptyHeader, { className: "gap-3", children: [
207
126
  /* @__PURE__ */ jsxRuntime.jsx(
208
- EmptyMedia,
127
+ empty_js.EmptyMedia,
209
128
  {
210
129
  variant: "icon",
211
130
  className: cn(
@@ -216,7 +135,7 @@ function EmptyState({
216
135
  }
217
136
  ),
218
137
  /* @__PURE__ */ jsxRuntime.jsx(
219
- EmptyTitle,
138
+ empty_js.EmptyTitle,
220
139
  {
221
140
  className: cn(
222
141
  "font-medium tracking-normal",
@@ -225,194 +144,104 @@ function EmptyState({
225
144
  children: title
226
145
  }
227
146
  ),
228
- description ? /* @__PURE__ */ jsxRuntime.jsx(EmptyDescription, { className: "mt-0", children: description }) : null
147
+ description ? /* @__PURE__ */ jsxRuntime.jsx(empty_js.EmptyDescription, { className: "mt-0", children: description }) : null
229
148
  ] }),
230
- action ? /* @__PURE__ */ jsxRuntime.jsx(EmptyContent, { className: "gap-0", children: action }) : null
149
+ action ? /* @__PURE__ */ jsxRuntime.jsx(empty_js.EmptyContent, { className: "gap-0", children: action }) : null
231
150
  ]
232
151
  }
233
152
  );
234
153
  }
235
- var buttonVariants = classVarianceAuthority.cva(
236
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
154
+ function Empty2({ className, ...props }) {
155
+ return /* @__PURE__ */ jsxRuntime.jsx(
156
+ "div",
157
+ {
158
+ "data-slot": "empty",
159
+ className: cn(
160
+ "flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg p-6 text-center text-balance md:p-12",
161
+ className
162
+ ),
163
+ ...props
164
+ }
165
+ );
166
+ }
167
+ function EmptyHeader2({ className, ...props }) {
168
+ return /* @__PURE__ */ jsxRuntime.jsx(
169
+ "div",
170
+ {
171
+ "data-slot": "empty-header",
172
+ className: cn(
173
+ "flex max-w-sm flex-col items-center gap-2 text-center",
174
+ className
175
+ ),
176
+ ...props
177
+ }
178
+ );
179
+ }
180
+ var emptyMediaVariants = classVarianceAuthority.cva(
181
+ "mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
237
182
  {
238
183
  variants: {
239
184
  variant: {
240
- default: "bg-primary text-primary-foreground hover:bg-primary/90",
241
- destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
242
- outline: "border bg-background text-foreground shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:text-foreground dark:hover:bg-muted dark:hover:text-foreground",
243
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
244
- ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50 dark:hover:text-foreground",
245
- link: "text-primary underline-offset-4 hover:underline"
246
- },
247
- size: {
248
- default: "h-9 px-4 py-2 has-[>svg]:px-3",
249
- sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
250
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
251
- icon: "size-9",
252
- "icon-sm": "size-8",
253
- "icon-lg": "size-10"
185
+ default: "bg-transparent",
186
+ icon: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6"
254
187
  }
255
188
  },
256
189
  defaultVariants: {
257
- variant: "default",
258
- size: "default"
190
+ variant: "default"
259
191
  }
260
192
  }
261
193
  );
262
- function Button({
194
+ function EmptyMedia2({
263
195
  className,
264
196
  variant = "default",
265
- size = "default",
266
- asChild = false,
267
197
  ...props
268
198
  }) {
269
- const Comp = asChild ? reactSlot.Slot : "button";
270
199
  return /* @__PURE__ */ jsxRuntime.jsx(
271
- Comp,
200
+ "div",
272
201
  {
273
- "data-slot": "button",
202
+ "data-slot": "empty-icon",
274
203
  "data-variant": variant,
275
- "data-size": size,
276
- className: cn(buttonVariants({ variant, size, className })),
204
+ className: cn(emptyMediaVariants({ variant, className })),
277
205
  ...props
278
206
  }
279
207
  );
280
208
  }
281
- function AlertDialog({
282
- ...props
283
- }) {
284
- return /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Root, { "data-slot": "alert-dialog", ...props });
285
- }
286
- function AlertDialogPortal({
287
- ...props
288
- }) {
289
- return /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Portal, { "data-slot": "alert-dialog-portal", ...props });
290
- }
291
- function AlertDialogOverlay({
292
- className,
293
- ...props
294
- }) {
209
+ function EmptyTitle2({ className, ...props }) {
295
210
  return /* @__PURE__ */ jsxRuntime.jsx(
296
- AlertDialogPrimitive__namespace.Overlay,
211
+ "div",
297
212
  {
298
- "data-slot": "alert-dialog-overlay",
299
- className: cn(
300
- "fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
301
- className
302
- ),
213
+ "data-slot": "empty-title",
214
+ className: cn("text-lg font-medium tracking-tight", className),
303
215
  ...props
304
216
  }
305
217
  );
306
218
  }
307
- function AlertDialogContent({
308
- className,
309
- size = "default",
310
- ...props
311
- }) {
312
- return /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogPortal, { children: [
313
- /* @__PURE__ */ jsxRuntime.jsx(AlertDialogOverlay, {}),
314
- /* @__PURE__ */ jsxRuntime.jsx(
315
- AlertDialogPrimitive__namespace.Content,
316
- {
317
- "data-slot": "alert-dialog-content",
318
- "data-size": size,
319
- className: cn(
320
- "group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-lg",
321
- className
322
- ),
323
- ...props
324
- }
325
- )
326
- ] });
327
- }
328
- function AlertDialogHeader({
329
- className,
330
- ...props
331
- }) {
219
+ function EmptyDescription2({ className, ...props }) {
332
220
  return /* @__PURE__ */ jsxRuntime.jsx(
333
221
  "div",
334
222
  {
335
- "data-slot": "alert-dialog-header",
223
+ "data-slot": "empty-description",
336
224
  className: cn(
337
- "flex flex-col gap-1.5 text-center sm:text-left",
225
+ "text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
338
226
  className
339
227
  ),
340
228
  ...props
341
229
  }
342
230
  );
343
231
  }
344
- function AlertDialogFooter({
345
- className,
346
- ...props
347
- }) {
232
+ function EmptyContent2({ className, ...props }) {
348
233
  return /* @__PURE__ */ jsxRuntime.jsx(
349
234
  "div",
350
235
  {
351
- "data-slot": "alert-dialog-footer",
236
+ "data-slot": "empty-content",
352
237
  className: cn(
353
- "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
238
+ "flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance",
354
239
  className
355
240
  ),
356
241
  ...props
357
242
  }
358
243
  );
359
244
  }
360
- function AlertDialogTitle({
361
- className,
362
- ...props
363
- }) {
364
- return /* @__PURE__ */ jsxRuntime.jsx(
365
- AlertDialogPrimitive__namespace.Title,
366
- {
367
- "data-slot": "alert-dialog-title",
368
- className: cn("text-lg font-semibold", className),
369
- ...props
370
- }
371
- );
372
- }
373
- function AlertDialogDescription({
374
- className,
375
- ...props
376
- }) {
377
- return /* @__PURE__ */ jsxRuntime.jsx(
378
- AlertDialogPrimitive__namespace.Description,
379
- {
380
- "data-slot": "alert-dialog-description",
381
- className: cn("text-sm text-muted-foreground", className),
382
- ...props
383
- }
384
- );
385
- }
386
- function AlertDialogAction({
387
- className,
388
- variant = "default",
389
- size = "default",
390
- ...props
391
- }) {
392
- return /* @__PURE__ */ jsxRuntime.jsx(Button, { variant, size, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
393
- AlertDialogPrimitive__namespace.Action,
394
- {
395
- "data-slot": "alert-dialog-action",
396
- className: cn(className),
397
- ...props
398
- }
399
- ) });
400
- }
401
- function AlertDialogCancel({
402
- className,
403
- variant = "outline",
404
- size = "default",
405
- ...props
406
- }) {
407
- return /* @__PURE__ */ jsxRuntime.jsx(Button, { variant, size, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
408
- AlertDialogPrimitive__namespace.Cancel,
409
- {
410
- "data-slot": "alert-dialog-cancel",
411
- className: cn(className),
412
- ...props
413
- }
414
- ) });
415
- }
416
245
  function ConfirmDestructiveDialog({
417
246
  open,
418
247
  onOpenChange,
@@ -422,15 +251,15 @@ function ConfirmDestructiveDialog({
422
251
  cancelLabel = "Cancel",
423
252
  onConfirm
424
253
  }) {
425
- return /* @__PURE__ */ jsxRuntime.jsx(AlertDialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogContent, { size: "sm", children: [
426
- /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogHeader, { children: [
427
- /* @__PURE__ */ jsxRuntime.jsx(AlertDialogTitle, { children: title }),
428
- /* @__PURE__ */ jsxRuntime.jsx(AlertDialogDescription, { children: description })
254
+ return /* @__PURE__ */ jsxRuntime.jsx(alertDialog_js.AlertDialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(alertDialog_js.AlertDialogContent, { size: "sm", children: [
255
+ /* @__PURE__ */ jsxRuntime.jsxs(alertDialog_js.AlertDialogHeader, { children: [
256
+ /* @__PURE__ */ jsxRuntime.jsx(alertDialog_js.AlertDialogTitle, { children: title }),
257
+ /* @__PURE__ */ jsxRuntime.jsx(alertDialog_js.AlertDialogDescription, { children: description })
429
258
  ] }),
430
- /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogFooter, { children: [
431
- /* @__PURE__ */ jsxRuntime.jsx(AlertDialogCancel, { children: cancelLabel }),
259
+ /* @__PURE__ */ jsxRuntime.jsxs(alertDialog_js.AlertDialogFooter, { children: [
260
+ /* @__PURE__ */ jsxRuntime.jsx(alertDialog_js.AlertDialogCancel, { children: cancelLabel }),
432
261
  /* @__PURE__ */ jsxRuntime.jsx(
433
- AlertDialogAction,
262
+ alertDialog_js.AlertDialogAction,
434
263
  {
435
264
  variant: "destructive",
436
265
  onClick: () => {
@@ -443,65 +272,6 @@ function ConfirmDestructiveDialog({
443
272
  ] })
444
273
  ] }) });
445
274
  }
446
- var miniMenuContentClassName = "max-h-none overflow-x-visible overflow-y-visible";
447
- var miniMenuContentDefaults = {
448
- sideOffset: 8,
449
- collisionPadding: 12
450
- };
451
- function DropdownMenu({
452
- ...props
453
- }) {
454
- return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Root, { "data-slot": "dropdown-menu", ...props });
455
- }
456
- function DropdownMenuTrigger({
457
- ...props
458
- }) {
459
- return /* @__PURE__ */ jsxRuntime.jsx(
460
- DropdownMenuPrimitive__namespace.Trigger,
461
- {
462
- "data-slot": "dropdown-menu-trigger",
463
- ...props
464
- }
465
- );
466
- }
467
- function DropdownMenuContent({
468
- className,
469
- sideOffset = 4,
470
- ...props
471
- }) {
472
- return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
473
- DropdownMenuPrimitive__namespace.Content,
474
- {
475
- "data-slot": "dropdown-menu-content",
476
- sideOffset,
477
- className: cn(
478
- "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-[200] max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
479
- className
480
- ),
481
- ...props
482
- }
483
- ) });
484
- }
485
- function DropdownMenuItem({
486
- className,
487
- inset,
488
- variant = "default",
489
- ...props
490
- }) {
491
- return /* @__PURE__ */ jsxRuntime.jsx(
492
- DropdownMenuPrimitive__namespace.Item,
493
- {
494
- "data-slot": "dropdown-menu-item",
495
- "data-inset": inset,
496
- "data-variant": variant,
497
- className: cn(
498
- "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[highlighted]:[&_svg:not([class*='text-'])]:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:[&_svg:not([class*='text-'])]:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:data-[highlighted]:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 dark:data-[variant=destructive]:data-[highlighted]:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:data-[highlighted]:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
499
- className
500
- ),
501
- ...props
502
- }
503
- );
504
- }
505
275
  var DEFAULT_NOTIFICATION_BELL_LABELS = {
506
276
  title: "Notifications",
507
277
  empty: "You're all caught up.",
@@ -558,63 +328,76 @@ function NotificationBell({
558
328
  className
559
329
  }) {
560
330
  const labels = { ...DEFAULT_NOTIFICATION_BELL_LABELS, ...labelOverrides };
561
- return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { modal: false, onOpenChange, children: [
562
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
563
- Button,
564
- {
565
- type: "button",
566
- variant: "ghost",
567
- size: "icon",
568
- className: cn("relative size-9", className),
569
- "aria-label": labels.title,
570
- children: [
571
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bell, { className: "size-4" }),
572
- unreadCount > 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-destructive text-destructive-foreground absolute -top-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full text-[10px] leading-none font-medium tabular-nums", children: formatUnreadBadge(unreadCount) }) : null
573
- ]
574
- }
575
- ) }),
576
- /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuContent, { align, className: "w-80 p-0", children: [
577
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-between border-b px-4 py-3", children: /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold", children: labels.title }) }),
578
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-80 overflow-y-auto", children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx(NotificationListSkeleton, {}) : items.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground px-4 py-8 text-center text-sm", children: labels.empty }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col", children: items.map((item, index) => {
579
- const body = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-1", children: [
580
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm leading-none font-medium", children: item.title }),
581
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground line-clamp-2 text-xs", children: item.message }),
582
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground/70 text-xs", children: formatTime(item.createdAt) })
583
- ] });
584
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
585
- item.href ? /* @__PURE__ */ jsxRuntime.jsx(
586
- "a",
587
- {
588
- href: item.href,
589
- className: cn(
590
- "hover:bg-muted/50 flex gap-3 px-4 py-3 motion-safe:transition-colors",
591
- !item.read && "bg-muted/30"
331
+ return /* @__PURE__ */ jsxRuntime.jsxs(
332
+ dropdownMenu_js.DropdownMenu,
333
+ {
334
+ onOpenChange: (open) => {
335
+ onOpenChange?.(open);
336
+ },
337
+ children: [
338
+ /* @__PURE__ */ jsxRuntime.jsxs(
339
+ dropdownMenu_js.DropdownMenuTrigger,
340
+ {
341
+ render: /* @__PURE__ */ jsxRuntime.jsx(
342
+ button_js.Button,
343
+ {
344
+ type: "button",
345
+ variant: "ghost",
346
+ size: "icon",
347
+ className: cn("relative size-9", className),
348
+ "aria-label": labels.title
349
+ }
350
+ ),
351
+ children: [
352
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bell, { className: "size-4" }),
353
+ unreadCount > 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-destructive text-destructive-foreground absolute -top-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full text-[10px] leading-none font-medium tabular-nums", children: formatUnreadBadge(unreadCount) }) : null
354
+ ]
355
+ }
356
+ ),
357
+ /* @__PURE__ */ jsxRuntime.jsxs(dropdownMenu_js.DropdownMenuContent, { align, className: "w-80 p-0", children: [
358
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-between border-b px-4 py-3", children: /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold", children: labels.title }) }),
359
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-80 overflow-y-auto", children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx(NotificationListSkeleton, {}) : items.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground px-4 py-8 text-center text-sm", children: labels.empty }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col", children: items.map((item, index) => {
360
+ const body = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-1", children: [
361
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm leading-none font-medium", children: item.title }),
362
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground line-clamp-2 text-xs", children: item.message }),
363
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground/70 text-xs", children: formatTime(item.createdAt) })
364
+ ] });
365
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
366
+ item.href ? /* @__PURE__ */ jsxRuntime.jsx(
367
+ "a",
368
+ {
369
+ href: item.href,
370
+ className: cn(
371
+ "hover:bg-muted/50 flex gap-3 px-4 py-3 motion-safe:transition-colors",
372
+ !item.read && "bg-muted/30"
373
+ ),
374
+ children: body
375
+ }
376
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
377
+ "div",
378
+ {
379
+ className: cn(
380
+ "flex gap-3 px-4 py-3",
381
+ !item.read && "bg-muted/30"
382
+ ),
383
+ children: body
384
+ }
592
385
  ),
593
- children: body
594
- }
595
- ) : /* @__PURE__ */ jsxRuntime.jsx(
596
- "div",
386
+ index < items.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-border h-px" }) : null
387
+ ] }, item.id);
388
+ }) }) }),
389
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t px-4 py-2", children: /* @__PURE__ */ jsxRuntime.jsx(
390
+ "a",
597
391
  {
598
- className: cn(
599
- "flex gap-3 px-4 py-3",
600
- !item.read && "bg-muted/30"
601
- ),
602
- children: body
392
+ href: viewAllHref,
393
+ className: "text-primary block text-center text-sm font-medium hover:underline",
394
+ children: labels.viewAll
603
395
  }
604
- ),
605
- index < items.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-border h-px" }) : null
606
- ] }, item.id);
607
- }) }) }),
608
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t px-4 py-2", children: /* @__PURE__ */ jsxRuntime.jsx(
609
- "a",
610
- {
611
- href: viewAllHref,
612
- className: "text-primary block text-center text-sm font-medium hover:underline",
613
- children: labels.viewAll
614
- }
615
- ) })
616
- ] })
617
- ] });
396
+ ) })
397
+ ] })
398
+ ]
399
+ }
400
+ );
618
401
  }
619
402
 
620
403
  // src/components/editable/types.ts
@@ -651,20 +434,20 @@ function useEditableSection({
651
434
  ...DEFAULT_EDITABLE_SECTION_LABELS,
652
435
  ...labels
653
436
  };
654
- const [mode, setMode] = React.useState("reading");
655
- const [status, setStatus] = React.useState(null);
656
- const [confirmOpen, setConfirmOpen] = React.useState(false);
657
- const [minHeightPx, setMinHeightPx] = React.useState(void 0);
658
- const contentRef = React.useRef(null);
659
- const editButtonRef = React.useRef(null);
660
- const measuredHeightRef = React.useRef(0);
661
- const shouldFocusEditRef = React.useRef(false);
662
- const shouldFocusFirstFieldRef = React.useRef(false);
663
- const editButtonId = React.useId();
664
- const contentFormId = React.useId();
437
+ const [mode, setMode] = react.useState("reading");
438
+ const [status, setStatus] = react.useState(null);
439
+ const [confirmOpen, setConfirmOpen] = react.useState(false);
440
+ const [minHeightPx, setMinHeightPx] = react.useState(void 0);
441
+ const contentRef = react.useRef(null);
442
+ const editButtonRef = react.useRef(null);
443
+ const measuredHeightRef = react.useRef(0);
444
+ const shouldFocusEditRef = react.useRef(false);
445
+ const shouldFocusFirstFieldRef = react.useRef(false);
446
+ const editButtonId = react.useId();
447
+ const contentFormId = react.useId();
665
448
  const isEditing = mode === "editing" || mode === "saving";
666
449
  const isSaving = mode === "saving";
667
- React.useEffect(() => {
450
+ react.useEffect(() => {
668
451
  if (mode === "reading" && shouldFocusEditRef.current) {
669
452
  shouldFocusEditRef.current = false;
670
453
  editButtonRef.current?.focus();
@@ -682,18 +465,18 @@ function useEditableSection({
682
465
  focusFirstField(contentRef.current);
683
466
  }
684
467
  }, [mode]);
685
- const exitToReading = React.useCallback(() => {
468
+ const exitToReading = react.useCallback(() => {
686
469
  setConfirmOpen(false);
687
470
  shouldFocusEditRef.current = true;
688
471
  setMode("reading");
689
472
  onDiscard?.();
690
473
  }, [onDiscard]);
691
- const startEdit = React.useCallback(() => {
474
+ const startEdit = react.useCallback(() => {
692
475
  setStatus(null);
693
476
  shouldFocusFirstFieldRef.current = true;
694
477
  setMode("editing");
695
478
  }, []);
696
- const requestCancel = React.useCallback(() => {
479
+ const requestCancel = react.useCallback(() => {
697
480
  if (isSaving) return;
698
481
  if (isDirty) {
699
482
  setConfirmOpen(true);
@@ -701,7 +484,7 @@ function useEditableSection({
701
484
  }
702
485
  exitToReading();
703
486
  }, [exitToReading, isDirty, isSaving]);
704
- const handleSubmit = React.useCallback(
487
+ const handleSubmit = react.useCallback(
705
488
  (event) => {
706
489
  event.preventDefault();
707
490
  if (isSaving) return;
@@ -721,7 +504,7 @@ function useEditableSection({
721
504
  },
722
505
  [isSaving, onSave, resolvedLabels.saved]
723
506
  );
724
- const handleFormKeyDown = React.useCallback(
507
+ const handleFormKeyDown = react.useCallback(
725
508
  (event) => {
726
509
  if (event.key !== "Escape") return;
727
510
  event.preventDefault();
@@ -729,7 +512,7 @@ function useEditableSection({
729
512
  },
730
513
  [requestCancel]
731
514
  );
732
- React.useEffect(() => {
515
+ react.useEffect(() => {
733
516
  if (!stableHeight || !isEditing) return;
734
517
  const el = contentRef.current;
735
518
  if (!el) return;
@@ -821,10 +604,10 @@ function EditableSection({
821
604
  actionsClassName,
822
605
  mode
823
606
  } = section;
824
- const actionButtons = !isEditing ? /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", size: "sm", ...editButtonProps, children: resolvedLabels.edit }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
825
- /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", size: "sm", ...cancelButtonProps, children: resolvedLabels.cancel }),
607
+ const actionButtons = !isEditing ? /* @__PURE__ */ jsxRuntime.jsx(button_js.Button, { variant: "outline", size: "sm", ...editButtonProps, children: resolvedLabels.edit }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
608
+ /* @__PURE__ */ jsxRuntime.jsx(button_js.Button, { variant: "outline", size: "sm", ...cancelButtonProps, children: resolvedLabels.cancel }),
826
609
  /* @__PURE__ */ jsxRuntime.jsx(
827
- Button,
610
+ button_js.Button,
828
611
  {
829
612
  size: "sm",
830
613
  type: "submit",
@@ -968,13 +751,13 @@ function SafeImage({
968
751
  onError,
969
752
  ...imgProps
970
753
  }) {
971
- const [failed, setFailed] = React.useState(false);
972
- const imgRef = React.useRef(null);
754
+ const [failed, setFailed] = react.useState(false);
755
+ const imgRef = react.useRef(null);
973
756
  const resolvedSrc = typeof src === "string" && src.length > 0 ? src : null;
974
- React.useLayoutEffect(() => {
757
+ react.useLayoutEffect(() => {
975
758
  setFailed(false);
976
759
  }, [resolvedSrc]);
977
- React.useLayoutEffect(() => {
760
+ react.useLayoutEffect(() => {
978
761
  const img = imgRef.current;
979
762
  if (img && isBrokenImage(img)) {
980
763
  setFailed(true);
@@ -1036,17 +819,17 @@ function ThemeSwitcher({
1036
819
  labels: userLabels
1037
820
  }) {
1038
821
  const { theme, setTheme } = nextThemes.useTheme();
1039
- const [mounted, setMounted] = React.useState(false);
822
+ const [mounted, setMounted] = react.useState(false);
1040
823
  const sizes = sizeClasses[size];
1041
824
  const shapeClass = shapeClasses[shape];
1042
825
  const labels = { ...defaultLabels, ...userLabels };
1043
- const handleThemeClick = React.useCallback(
826
+ const handleThemeClick = react.useCallback(
1044
827
  (themeKey) => {
1045
828
  setTheme(themeKey);
1046
829
  },
1047
830
  [setTheme]
1048
831
  );
1049
- React.useEffect(() => {
832
+ react.useEffect(() => {
1050
833
  setMounted(true);
1051
834
  }, []);
1052
835
  if (!mounted) {
@@ -1065,33 +848,38 @@ function ThemeSwitcher({
1065
848
  }
1066
849
  const currentTheme = storedTheme(theme);
1067
850
  const TriggerIcon = currentTheme ? themeIcons[currentTheme] : lucideReact.Monitor;
1068
- return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { modal: false, children: [
1069
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1070
- Button,
851
+ return /* @__PURE__ */ jsxRuntime.jsxs(dropdownMenu_js.DropdownMenu, { children: [
852
+ /* @__PURE__ */ jsxRuntime.jsx(
853
+ dropdownMenu_js.DropdownMenuTrigger,
1071
854
  {
1072
- "data-testid": "theme-switcher",
1073
- variant: "outline",
1074
- size: "icon",
1075
- "aria-label": labels.theme,
1076
- className: cn(
1077
- sizes.button,
1078
- shapeClass,
1079
- iconTriggerClassName,
1080
- className
855
+ render: /* @__PURE__ */ jsxRuntime.jsx(
856
+ button_js.Button,
857
+ {
858
+ "data-testid": "theme-switcher",
859
+ variant: "outline",
860
+ size: "icon",
861
+ "aria-label": labels.theme,
862
+ className: cn(
863
+ sizes.button,
864
+ shapeClass,
865
+ iconTriggerClassName,
866
+ className
867
+ )
868
+ }
1081
869
  ),
1082
870
  children: /* @__PURE__ */ jsxRuntime.jsx(TriggerIcon, { className: sizes.icon })
1083
871
  }
1084
- ) }),
872
+ ),
1085
873
  /* @__PURE__ */ jsxRuntime.jsx(
1086
- DropdownMenuContent,
874
+ dropdownMenu_js.DropdownMenuContent,
1087
875
  {
1088
876
  side,
1089
877
  align,
1090
- sideOffset: miniMenuContentDefaults.sideOffset,
1091
- collisionPadding: miniMenuContentDefaults.collisionPadding,
1092
- className: miniMenuContentClassName,
878
+ sideOffset: dropdownMenu_js.miniMenuContentDefaults.sideOffset,
879
+ collisionPadding: dropdownMenu_js.miniMenuContentDefaults.collisionPadding,
880
+ className: dropdownMenu_js.miniMenuContentClassName,
1093
881
  children: themes.map(({ key, icon: Icon }) => /* @__PURE__ */ jsxRuntime.jsxs(
1094
- DropdownMenuItem,
882
+ dropdownMenu_js.DropdownMenuItem,
1095
883
  {
1096
884
  onClick: () => handleThemeClick(key),
1097
885
  className: cn(
@@ -1147,32 +935,37 @@ function LanguageSwitcher({
1147
935
  const sizes = sizeClasses2[size];
1148
936
  const shapeClass = shapeClasses2[shape];
1149
937
  const accessibleName = labels.language ?? "Language";
1150
- return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { modal: false, children: [
1151
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1152
- Button,
938
+ return /* @__PURE__ */ jsxRuntime.jsxs(dropdownMenu_js.DropdownMenu, { children: [
939
+ /* @__PURE__ */ jsxRuntime.jsx(
940
+ dropdownMenu_js.DropdownMenuTrigger,
1153
941
  {
1154
- variant: "outline",
1155
- size: "icon",
1156
- "aria-label": accessibleName,
1157
- className: cn(
1158
- sizes.button,
1159
- shapeClass,
1160
- iconTriggerClassName2,
1161
- className
942
+ render: /* @__PURE__ */ jsxRuntime.jsx(
943
+ button_js.Button,
944
+ {
945
+ variant: "outline",
946
+ size: "icon",
947
+ "aria-label": accessibleName,
948
+ className: cn(
949
+ sizes.button,
950
+ shapeClass,
951
+ iconTriggerClassName2,
952
+ className
953
+ )
954
+ }
1162
955
  ),
1163
956
  children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Languages, { className: sizes.icon })
1164
957
  }
1165
- ) }),
958
+ ),
1166
959
  /* @__PURE__ */ jsxRuntime.jsx(
1167
- DropdownMenuContent,
960
+ dropdownMenu_js.DropdownMenuContent,
1168
961
  {
1169
962
  side,
1170
963
  align,
1171
- sideOffset: miniMenuContentDefaults.sideOffset,
1172
- collisionPadding: miniMenuContentDefaults.collisionPadding,
1173
- className: cn(miniMenuContentClassName, "min-w-0 w-auto"),
964
+ sideOffset: dropdownMenu_js.miniMenuContentDefaults.sideOffset,
965
+ collisionPadding: dropdownMenu_js.miniMenuContentDefaults.collisionPadding,
966
+ className: cn(dropdownMenu_js.miniMenuContentClassName, "min-w-0 w-auto"),
1174
967
  children: languages.map(({ key, nativeName }) => /* @__PURE__ */ jsxRuntime.jsx(
1175
- DropdownMenuItem,
968
+ dropdownMenu_js.DropdownMenuItem,
1176
969
  {
1177
970
  onClick: () => onLanguageChange?.(key),
1178
971
  className: cn(
@@ -1187,97 +980,6 @@ function LanguageSwitcher({
1187
980
  )
1188
981
  ] });
1189
982
  }
1190
- function Slider({
1191
- className,
1192
- defaultValue,
1193
- value,
1194
- min = 0,
1195
- max = 100,
1196
- ...props
1197
- }) {
1198
- const _values = React__namespace.useMemo(
1199
- () => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
1200
- [value, defaultValue, min, max]
1201
- );
1202
- return /* @__PURE__ */ jsxRuntime.jsxs(
1203
- SliderPrimitive__namespace.Root,
1204
- {
1205
- "data-slot": "slider",
1206
- defaultValue,
1207
- value,
1208
- min,
1209
- max,
1210
- className: cn(
1211
- "relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
1212
- className
1213
- ),
1214
- ...props,
1215
- children: [
1216
- /* @__PURE__ */ jsxRuntime.jsx(
1217
- SliderPrimitive__namespace.Track,
1218
- {
1219
- "data-slot": "slider-track",
1220
- className: cn(
1221
- "bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
1222
- ),
1223
- children: /* @__PURE__ */ jsxRuntime.jsx(
1224
- SliderPrimitive__namespace.Range,
1225
- {
1226
- "data-slot": "slider-range",
1227
- className: cn(
1228
- "bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
1229
- )
1230
- }
1231
- )
1232
- }
1233
- ),
1234
- Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsxRuntime.jsx(
1235
- SliderPrimitive__namespace.Thumb,
1236
- {
1237
- "data-slot": "slider-thumb",
1238
- className: "border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
1239
- },
1240
- index
1241
- ))
1242
- ]
1243
- }
1244
- );
1245
- }
1246
- var toggleVariants = classVarianceAuthority.cva(
1247
- "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
1248
- {
1249
- variants: {
1250
- variant: {
1251
- default: "bg-transparent",
1252
- outline: "border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"
1253
- },
1254
- size: {
1255
- default: "h-9 px-2 min-w-9",
1256
- sm: "h-8 px-1.5 min-w-8",
1257
- lg: "h-10 px-2.5 min-w-10"
1258
- }
1259
- },
1260
- defaultVariants: {
1261
- variant: "default",
1262
- size: "default"
1263
- }
1264
- }
1265
- );
1266
- function Toggle({
1267
- className,
1268
- variant,
1269
- size,
1270
- ...props
1271
- }) {
1272
- return /* @__PURE__ */ jsxRuntime.jsx(
1273
- TogglePrimitive__namespace.Root,
1274
- {
1275
- "data-slot": "toggle",
1276
- className: cn(toggleVariants({ variant, size, className })),
1277
- ...props
1278
- }
1279
- );
1280
- }
1281
983
  var DEFAULT_LABELS = {
1282
984
  uploadAria: "Upload image",
1283
985
  uploadHint: "Click to upload",
@@ -1306,18 +1008,18 @@ function AvatarEditor({
1306
1008
  labels
1307
1009
  }) {
1308
1010
  const t = { ...DEFAULT_LABELS, ...labels };
1309
- const canvasRef = React.useRef(null);
1310
- const fileInputRef = React.useRef(null);
1311
- const containerRef = React.useRef(null);
1312
- const [image, setImage] = React.useState(null);
1313
- const [imageLoaded, setImageLoaded] = React.useState(false);
1314
- const [zoom, setZoom] = React.useState(1);
1315
- const [rotation, setRotation] = React.useState(0);
1316
- const [position, setPosition] = React.useState({ x: 0, y: 0 });
1317
- const [isDragging, setIsDragging] = React.useState(false);
1318
- const [dragStart, setDragStart] = React.useState({ x: 0, y: 0 });
1319
- const [showGrid, setShowGrid] = React.useState(initialShowGrid);
1320
- const generateOutput = React.useCallback(() => {
1011
+ const canvasRef = react.useRef(null);
1012
+ const fileInputRef = react.useRef(null);
1013
+ const containerRef = react.useRef(null);
1014
+ const [image, setImage] = react.useState(null);
1015
+ const [imageLoaded, setImageLoaded] = react.useState(false);
1016
+ const [zoom, setZoom] = react.useState(1);
1017
+ const [rotation, setRotation] = react.useState(0);
1018
+ const [position, setPosition] = react.useState({ x: 0, y: 0 });
1019
+ const [isDragging, setIsDragging] = react.useState(false);
1020
+ const [dragStart, setDragStart] = react.useState({ x: 0, y: 0 });
1021
+ const [showGrid, setShowGrid] = react.useState(initialShowGrid);
1022
+ const generateOutput = react.useCallback(() => {
1321
1023
  if (!canvasRef.current || !image) return null;
1322
1024
  const outputCanvas = document.createElement("canvas");
1323
1025
  outputCanvas.width = outputSize;
@@ -1328,7 +1030,7 @@ function AvatarEditor({
1328
1030
  const mimeType = `image/${outputFormat}`;
1329
1031
  return outputCanvas.toDataURL(mimeType, outputQuality);
1330
1032
  }, [image, outputSize, outputFormat, outputQuality]);
1331
- React.useEffect(() => {
1033
+ react.useEffect(() => {
1332
1034
  if (!canvasRef.current || !image || !imageLoaded) return;
1333
1035
  const canvas = canvasRef.current;
1334
1036
  const ctx = canvas.getContext("2d");
@@ -1372,12 +1074,12 @@ function AvatarEditor({
1372
1074
  generateOutput,
1373
1075
  onChange
1374
1076
  ]);
1375
- const resetTransforms = React.useCallback(() => {
1077
+ const resetTransforms = react.useCallback(() => {
1376
1078
  setZoom(1);
1377
1079
  setRotation(0);
1378
1080
  setPosition({ x: 0, y: 0 });
1379
1081
  }, []);
1380
- const handleFileSelect = React.useCallback(
1082
+ const handleFileSelect = react.useCallback(
1381
1083
  (e) => {
1382
1084
  const file = e.target.files?.[0];
1383
1085
  if (!file) return;
@@ -1396,7 +1098,7 @@ function AvatarEditor({
1396
1098
  },
1397
1099
  [resetTransforms]
1398
1100
  );
1399
- const handleMouseDown = React.useCallback(
1101
+ const handleMouseDown = react.useCallback(
1400
1102
  (e) => {
1401
1103
  if (!imageLoaded) return;
1402
1104
  setIsDragging(true);
@@ -1404,7 +1106,7 @@ function AvatarEditor({
1404
1106
  },
1405
1107
  [imageLoaded, position]
1406
1108
  );
1407
- const handleMouseMove = React.useCallback(
1109
+ const handleMouseMove = react.useCallback(
1408
1110
  (e) => {
1409
1111
  if (!isDragging) return;
1410
1112
  setPosition({
@@ -1414,10 +1116,10 @@ function AvatarEditor({
1414
1116
  },
1415
1117
  [isDragging, dragStart]
1416
1118
  );
1417
- const handleMouseUp = React.useCallback(() => {
1119
+ const handleMouseUp = react.useCallback(() => {
1418
1120
  setIsDragging(false);
1419
1121
  }, []);
1420
- const handleTouchStart = React.useCallback(
1122
+ const handleTouchStart = react.useCallback(
1421
1123
  (e) => {
1422
1124
  if (!imageLoaded) return;
1423
1125
  const touch = e.touches[0];
@@ -1429,7 +1131,7 @@ function AvatarEditor({
1429
1131
  },
1430
1132
  [imageLoaded, position]
1431
1133
  );
1432
- const handleTouchMove = React.useCallback(
1134
+ const handleTouchMove = react.useCallback(
1433
1135
  (e) => {
1434
1136
  if (!isDragging) return;
1435
1137
  const touch = e.touches[0];
@@ -1440,7 +1142,7 @@ function AvatarEditor({
1440
1142
  },
1441
1143
  [isDragging, dragStart]
1442
1144
  );
1443
- const handleDiscard = React.useCallback(() => {
1145
+ const handleDiscard = react.useCallback(() => {
1444
1146
  setImage(null);
1445
1147
  setImageLoaded(false);
1446
1148
  resetTransforms();
@@ -1652,7 +1354,7 @@ function AvatarEditor({
1652
1354
  imageLoaded && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("space-y-4", isLarge && "space-y-5"), children: [
1653
1355
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center", controlGap), children: [
1654
1356
  /* @__PURE__ */ jsxRuntime.jsx(
1655
- Button,
1357
+ button_js.Button,
1656
1358
  {
1657
1359
  variant: "ghost",
1658
1360
  size: "icon",
@@ -1664,7 +1366,7 @@ function AvatarEditor({
1664
1366
  }
1665
1367
  ),
1666
1368
  /* @__PURE__ */ jsxRuntime.jsx(
1667
- Slider,
1369
+ slider_js.Slider,
1668
1370
  {
1669
1371
  value: [zoom],
1670
1372
  onValueChange: ([v]) => setZoom(v),
@@ -1676,7 +1378,7 @@ function AvatarEditor({
1676
1378
  }
1677
1379
  ),
1678
1380
  /* @__PURE__ */ jsxRuntime.jsx(
1679
- Button,
1381
+ button_js.Button,
1680
1382
  {
1681
1383
  variant: "ghost",
1682
1384
  size: "icon",
@@ -1695,7 +1397,7 @@ function AvatarEditor({
1695
1397
  className: cn("flex items-center", isLarge ? "gap-2" : "gap-1"),
1696
1398
  children: [
1697
1399
  /* @__PURE__ */ jsxRuntime.jsx(
1698
- Button,
1400
+ button_js.Button,
1699
1401
  {
1700
1402
  variant: "ghost",
1701
1403
  size: "icon",
@@ -1721,7 +1423,7 @@ function AvatarEditor({
1721
1423
  }
1722
1424
  ),
1723
1425
  /* @__PURE__ */ jsxRuntime.jsx(
1724
- Button,
1426
+ button_js.Button,
1725
1427
  {
1726
1428
  variant: "ghost",
1727
1429
  size: "icon",
@@ -1741,7 +1443,7 @@ function AvatarEditor({
1741
1443
  className: cn("flex items-center", isLarge ? "gap-2" : "gap-1"),
1742
1444
  children: [
1743
1445
  /* @__PURE__ */ jsxRuntime.jsx(
1744
- Toggle,
1446
+ toggle_js.Toggle,
1745
1447
  {
1746
1448
  pressed: showGrid,
1747
1449
  onPressedChange: setShowGrid,
@@ -1752,7 +1454,7 @@ function AvatarEditor({
1752
1454
  }
1753
1455
  ),
1754
1456
  /* @__PURE__ */ jsxRuntime.jsx(
1755
- Button,
1457
+ button_js.Button,
1756
1458
  {
1757
1459
  variant: "ghost",
1758
1460
  size: "icon",
@@ -1764,7 +1466,7 @@ function AvatarEditor({
1764
1466
  }
1765
1467
  ),
1766
1468
  /* @__PURE__ */ jsxRuntime.jsx(
1767
- Button,
1469
+ button_js.Button,
1768
1470
  {
1769
1471
  variant: "ghost",
1770
1472
  size: "icon",
@@ -1776,7 +1478,7 @@ function AvatarEditor({
1776
1478
  }
1777
1479
  ),
1778
1480
  /* @__PURE__ */ jsxRuntime.jsx(
1779
- Button,
1481
+ button_js.Button,
1780
1482
  {
1781
1483
  variant: "ghost",
1782
1484
  size: "icon",
@@ -1810,206 +1512,9 @@ function AvatarEditor({
1810
1512
  }
1811
1513
  );
1812
1514
  }
1813
- function Dialog({
1814
- ...props
1815
- }) {
1816
- return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Root, { "data-slot": "dialog", ...props });
1817
- }
1818
- function DialogPortal({
1819
- ...props
1820
- }) {
1821
- return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Portal, { "data-slot": "dialog-portal", ...props });
1822
- }
1823
- function DialogClose({
1824
- ...props
1825
- }) {
1826
- return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Close, { "data-slot": "dialog-close", ...props });
1827
- }
1828
- function DialogOverlay({
1829
- className,
1830
- ...props
1831
- }) {
1832
- return /* @__PURE__ */ jsxRuntime.jsx(
1833
- DialogPrimitive__namespace.Overlay,
1834
- {
1835
- "data-slot": "dialog-overlay",
1836
- className: cn(
1837
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
1838
- className
1839
- ),
1840
- ...props
1841
- }
1842
- );
1843
- }
1844
- function DialogContent({
1845
- className,
1846
- children,
1847
- showCloseButton = true,
1848
- ...props
1849
- }) {
1850
- return /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
1851
- /* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
1852
- /* @__PURE__ */ jsxRuntime.jsxs(
1853
- DialogPrimitive__namespace.Content,
1854
- {
1855
- "data-slot": "dialog-content",
1856
- className: cn(
1857
- "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",
1858
- className
1859
- ),
1860
- ...props,
1861
- children: [
1862
- children,
1863
- showCloseButton && /* @__PURE__ */ jsxRuntime.jsxs(
1864
- DialogPrimitive__namespace.Close,
1865
- {
1866
- "data-slot": "dialog-close",
1867
- className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1868
- children: [
1869
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, {}),
1870
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
1871
- ]
1872
- }
1873
- )
1874
- ]
1875
- }
1876
- )
1877
- ] });
1878
- }
1879
- function DialogHeader({ className, ...props }) {
1880
- return /* @__PURE__ */ jsxRuntime.jsx(
1881
- "div",
1882
- {
1883
- "data-slot": "dialog-header",
1884
- className: cn("flex flex-col gap-2 text-center sm:text-left", className),
1885
- ...props
1886
- }
1887
- );
1888
- }
1889
- function DialogFooter({ className, ...props }) {
1890
- return /* @__PURE__ */ jsxRuntime.jsx(
1891
- "div",
1892
- {
1893
- "data-slot": "dialog-footer",
1894
- className: cn(
1895
- "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
1896
- className
1897
- ),
1898
- ...props
1899
- }
1900
- );
1901
- }
1902
- function DialogTitle({
1903
- className,
1904
- ...props
1905
- }) {
1906
- return /* @__PURE__ */ jsxRuntime.jsx(
1907
- DialogPrimitive__namespace.Title,
1908
- {
1909
- "data-slot": "dialog-title",
1910
- className: cn("text-lg leading-none font-semibold", className),
1911
- ...props
1912
- }
1913
- );
1914
- }
1915
- function Drawer({
1916
- ...props
1917
- }) {
1918
- return /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Root, { "data-slot": "drawer", ...props });
1919
- }
1920
- function DrawerPortal({
1921
- ...props
1922
- }) {
1923
- return /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Portal, { "data-slot": "drawer-portal", ...props });
1924
- }
1925
- function DrawerClose({
1926
- ...props
1927
- }) {
1928
- return /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Close, { "data-slot": "drawer-close", ...props });
1929
- }
1930
- function DrawerOverlay({
1931
- className,
1932
- ...props
1933
- }) {
1934
- return /* @__PURE__ */ jsxRuntime.jsx(
1935
- vaul.Drawer.Overlay,
1936
- {
1937
- "data-slot": "drawer-overlay",
1938
- className: cn(
1939
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
1940
- className
1941
- ),
1942
- ...props
1943
- }
1944
- );
1945
- }
1946
- function DrawerContent({
1947
- className,
1948
- children,
1949
- ...props
1950
- }) {
1951
- return /* @__PURE__ */ jsxRuntime.jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [
1952
- /* @__PURE__ */ jsxRuntime.jsx(DrawerOverlay, {}),
1953
- /* @__PURE__ */ jsxRuntime.jsxs(
1954
- vaul.Drawer.Content,
1955
- {
1956
- "data-slot": "drawer-content",
1957
- className: cn(
1958
- "group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
1959
- "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
1960
- "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
1961
- "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
1962
- "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
1963
- className
1964
- ),
1965
- ...props,
1966
- children: [
1967
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
1968
- children
1969
- ]
1970
- }
1971
- )
1972
- ] });
1973
- }
1974
- function DrawerHeader({ className, ...props }) {
1975
- return /* @__PURE__ */ jsxRuntime.jsx(
1976
- "div",
1977
- {
1978
- "data-slot": "drawer-header",
1979
- className: cn(
1980
- "flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",
1981
- className
1982
- ),
1983
- ...props
1984
- }
1985
- );
1986
- }
1987
- function DrawerFooter({ className, ...props }) {
1988
- return /* @__PURE__ */ jsxRuntime.jsx(
1989
- "div",
1990
- {
1991
- "data-slot": "drawer-footer",
1992
- className: cn("mt-auto flex flex-col gap-2 p-4", className),
1993
- ...props
1994
- }
1995
- );
1996
- }
1997
- function DrawerTitle({
1998
- className,
1999
- ...props
2000
- }) {
2001
- return /* @__PURE__ */ jsxRuntime.jsx(
2002
- vaul.Drawer.Title,
2003
- {
2004
- "data-slot": "drawer-title",
2005
- className: cn("text-foreground font-semibold", className),
2006
- ...props
2007
- }
2008
- );
2009
- }
2010
1515
  function useMediaQuery(query) {
2011
- const [matches, setMatches] = React.useState(false);
2012
- React.useEffect(() => {
1516
+ const [matches, setMatches] = react.useState(false);
1517
+ react.useEffect(() => {
2013
1518
  const media = window.matchMedia(query);
2014
1519
  if (media.matches !== matches) {
2015
1520
  setMatches(media.matches);
@@ -2039,17 +1544,17 @@ function AvatarEditorDialog({
2039
1544
  className,
2040
1545
  editorLabels
2041
1546
  }) {
2042
- const [isOpen, setIsOpen] = React.useState(false);
2043
- const [editedValue, setEditedValue] = React.useState(value ?? null);
2044
- const [displaySrc, setDisplaySrc] = React.useState(value ?? null);
2045
- const [isSaving, setIsSaving] = React.useState(false);
2046
- const [feedback, setFeedback] = React.useState(null);
2047
- React.useEffect(() => {
1547
+ const [isOpen, setIsOpen] = react.useState(false);
1548
+ const [editedValue, setEditedValue] = react.useState(value ?? null);
1549
+ const [displaySrc, setDisplaySrc] = react.useState(value ?? null);
1550
+ const [isSaving, setIsSaving] = react.useState(false);
1551
+ const [feedback, setFeedback] = react.useState(null);
1552
+ react.useEffect(() => {
2048
1553
  setDisplaySrc(value ?? null);
2049
1554
  }, [value]);
2050
1555
  const isMobile = useMediaQuery("(max-width: 640px)");
2051
1556
  const caption = (placeholder ?? "").trim();
2052
- const handleOpenChange = React.useCallback(
1557
+ const handleOpenChange = react.useCallback(
2053
1558
  (open) => {
2054
1559
  if (open) {
2055
1560
  setEditedValue(value ?? null);
@@ -2059,7 +1564,7 @@ function AvatarEditorDialog({
2059
1564
  },
2060
1565
  [value]
2061
1566
  );
2062
- const handleAccept = React.useCallback(async () => {
1567
+ const handleAccept = react.useCallback(async () => {
2063
1568
  if (!editedValue) return;
2064
1569
  setIsSaving(true);
2065
1570
  setFeedback(null);
@@ -2177,8 +1682,8 @@ function AvatarEditorDialog({
2177
1682
  ) })
2178
1683
  ] });
2179
1684
  const FooterButtons = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2180
- isMobile ? /* @__PURE__ */ jsxRuntime.jsx(DrawerClose, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
2181
- Button,
1685
+ isMobile ? /* @__PURE__ */ jsxRuntime.jsx(drawer_js.DrawerClose, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1686
+ button_js.Button,
2182
1687
  {
2183
1688
  variant: "outline",
2184
1689
  disabled: isSaving,
@@ -2186,9 +1691,9 @@ function AvatarEditorDialog({
2186
1691
  className: "flex-1 bg-transparent",
2187
1692
  children: cancelText
2188
1693
  }
2189
- ) }) : /* @__PURE__ */ jsxRuntime.jsx(DialogClose, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", disabled: isSaving, children: cancelText }) }),
1694
+ ) }) : /* @__PURE__ */ jsxRuntime.jsx(dialog_js.DialogClose, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(button_js.Button, { variant: "outline", disabled: isSaving, children: cancelText }) }),
2190
1695
  /* @__PURE__ */ jsxRuntime.jsx(
2191
- Button,
1696
+ button_js.Button,
2192
1697
  {
2193
1698
  onClick: handleAccept,
2194
1699
  disabled: !editedValue || isSaving || feedback?.type === "success",
@@ -2215,19 +1720,19 @@ function AvatarEditorDialog({
2215
1720
  if (isMobile) {
2216
1721
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2217
1722
  AvatarDisplay,
2218
- /* @__PURE__ */ jsxRuntime.jsx(Drawer, { open: isOpen, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(DrawerContent, { className: "max-h-[96vh]", children: [
2219
- /* @__PURE__ */ jsxRuntime.jsx(DrawerHeader, { className: "text-center", children: /* @__PURE__ */ jsxRuntime.jsx(DrawerTitle, { className: "text-xl", children: dialogTitle }) }),
1723
+ /* @__PURE__ */ jsxRuntime.jsx(drawer_js.Drawer, { open: isOpen, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(drawer_js.DrawerContent, { className: "max-h-[96vh]", children: [
1724
+ /* @__PURE__ */ jsxRuntime.jsx(drawer_js.DrawerHeader, { className: "text-center", children: /* @__PURE__ */ jsxRuntime.jsx(drawer_js.DrawerTitle, { className: "text-xl", children: dialogTitle }) }),
2220
1725
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-6 pb-6 overflow-y-auto", children: EditorContent }),
2221
- /* @__PURE__ */ jsxRuntime.jsx(DrawerFooter, { className: "flex-row gap-3 px-6 pb-8", children: FooterButtons })
1726
+ /* @__PURE__ */ jsxRuntime.jsx(drawer_js.DrawerFooter, { className: "flex-row gap-3 px-6 pb-8", children: FooterButtons })
2222
1727
  ] }) })
2223
1728
  ] });
2224
1729
  }
2225
1730
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2226
1731
  AvatarDisplay,
2227
- /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: isOpen, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "sm:max-w-md", children: [
2228
- /* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: dialogTitle }) }),
1732
+ /* @__PURE__ */ jsxRuntime.jsx(dialog_js.Dialog, { open: isOpen, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(dialog_js.DialogContent, { className: "sm:max-w-md", children: [
1733
+ /* @__PURE__ */ jsxRuntime.jsx(dialog_js.DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(dialog_js.DialogTitle, { children: dialogTitle }) }),
2229
1734
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center py-4", children: EditorContent }),
2230
- /* @__PURE__ */ jsxRuntime.jsx(DialogFooter, { className: "sm:gap-3", children: FooterButtons })
1735
+ /* @__PURE__ */ jsxRuntime.jsx(dialog_js.DialogFooter, { className: "sm:gap-3", children: FooterButtons })
2231
1736
  ] }) })
2232
1737
  ] });
2233
1738
  }
@@ -2325,10 +1830,10 @@ function FileDropzone({
2325
1830
  className
2326
1831
  }) {
2327
1832
  const labels = { ...DEFAULT_FILE_DROPZONE_LABELS, ...labelOverrides };
2328
- const inputId = React.useId();
2329
- const inputRef = React.useRef(null);
2330
- const [dragging, setDragging] = React.useState(false);
2331
- const [message, setMessage] = React.useState(null);
1833
+ const inputId = react.useId();
1834
+ const inputRef = react.useRef(null);
1835
+ const [dragging, setDragging] = react.useState(false);
1836
+ const [message, setMessage] = react.useState(null);
2332
1837
  function takeFile(file) {
2333
1838
  if (!file || disabled) return;
2334
1839
  if (!fileMatchesAccept(file, accept)) {
@@ -2494,7 +1999,7 @@ function FileUploadTray({
2494
1999
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground shrink-0 text-xs tabular-nums", children: progressLabel(job) }),
2495
2000
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1" }),
2496
2001
  canPause ? /* @__PURE__ */ jsxRuntime.jsx(
2497
- Button,
2002
+ button_js.Button,
2498
2003
  {
2499
2004
  type: "button",
2500
2005
  variant: "ghost",
@@ -2506,7 +2011,7 @@ function FileUploadTray({
2506
2011
  }
2507
2012
  ) : null,
2508
2013
  canResume ? /* @__PURE__ */ jsxRuntime.jsx(
2509
- Button,
2014
+ button_js.Button,
2510
2015
  {
2511
2016
  type: "button",
2512
2017
  variant: "ghost",
@@ -2518,7 +2023,7 @@ function FileUploadTray({
2518
2023
  }
2519
2024
  ) : null,
2520
2025
  canCancel ? /* @__PURE__ */ jsxRuntime.jsx(
2521
- Button,
2026
+ button_js.Button,
2522
2027
  {
2523
2028
  type: "button",
2524
2029
  variant: "ghost",
@@ -2576,7 +2081,7 @@ function FileUploadMenu({
2576
2081
  }) {
2577
2082
  const labels = { ...DEFAULT_FILE_UPLOAD_TRAY_LABELS, ...labelOverrides };
2578
2083
  const visible = jobs.filter((job) => job.status !== "cancelled");
2579
- const [uncontrolledOpen, setUncontrolledOpen] = React.useState(false);
2084
+ const [uncontrolledOpen, setUncontrolledOpen] = react.useState(false);
2580
2085
  const isControlled = open !== void 0;
2581
2086
  const resolvedOpen = isControlled ? open : uncontrolledOpen;
2582
2087
  function setResolvedOpen(next) {
@@ -2587,50 +2092,47 @@ function FileUploadMenu({
2587
2092
  const activeCount = visible.filter(
2588
2093
  (job) => isActiveStatus(job.status)
2589
2094
  ).length;
2590
- return /* @__PURE__ */ jsxRuntime.jsxs(
2591
- DropdownMenu,
2592
- {
2593
- modal: false,
2594
- open: resolvedOpen,
2595
- onOpenChange: setResolvedOpen,
2596
- children: [
2597
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
2598
- Button,
2095
+ return /* @__PURE__ */ jsxRuntime.jsxs(dropdownMenu_js.DropdownMenu, { open: resolvedOpen, onOpenChange: setResolvedOpen, children: [
2096
+ /* @__PURE__ */ jsxRuntime.jsxs(
2097
+ dropdownMenu_js.DropdownMenuTrigger,
2098
+ {
2099
+ render: /* @__PURE__ */ jsxRuntime.jsx(
2100
+ button_js.Button,
2599
2101
  {
2600
2102
  type: "button",
2601
2103
  variant: "ghost",
2602
2104
  size: "icon",
2603
2105
  className: cn("relative size-9", className),
2604
- "aria-label": labels.title,
2605
- children: [
2606
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Upload, { className: "size-4" }),
2607
- activeCount > 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-destructive text-destructive-foreground absolute -top-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full text-[10px] leading-none font-medium tabular-nums", children: formatActiveBadge(activeCount) }) : null
2608
- ]
2609
- }
2610
- ) }),
2611
- /* @__PURE__ */ jsxRuntime.jsxs(
2612
- DropdownMenuContent,
2613
- {
2614
- align,
2615
- className: "w-80 min-w-0 max-w-[calc(100vw-2rem)] overflow-x-hidden p-0",
2616
- children: [
2617
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-between border-b px-4 py-3", children: /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold", children: labels.title }) }),
2618
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-80 min-w-0 overflow-x-hidden overflow-y-auto p-3", children: /* @__PURE__ */ jsxRuntime.jsx(
2619
- FileUploadTray,
2620
- {
2621
- jobs: visible,
2622
- labels,
2623
- onPause,
2624
- onResume,
2625
- onCancel
2626
- }
2627
- ) })
2628
- ]
2106
+ "aria-label": labels.title
2629
2107
  }
2630
- )
2631
- ]
2632
- }
2633
- );
2108
+ ),
2109
+ children: [
2110
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Upload, { className: "size-4" }),
2111
+ activeCount > 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-destructive text-destructive-foreground absolute -top-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full text-[10px] leading-none font-medium tabular-nums", children: formatActiveBadge(activeCount) }) : null
2112
+ ]
2113
+ }
2114
+ ),
2115
+ /* @__PURE__ */ jsxRuntime.jsxs(
2116
+ dropdownMenu_js.DropdownMenuContent,
2117
+ {
2118
+ align,
2119
+ className: "w-80 min-w-0 max-w-[calc(100vw-2rem)] overflow-x-hidden p-0",
2120
+ children: [
2121
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-between border-b px-4 py-3", children: /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold", children: labels.title }) }),
2122
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-80 min-w-0 overflow-x-hidden overflow-y-auto p-3", children: /* @__PURE__ */ jsxRuntime.jsx(
2123
+ FileUploadTray,
2124
+ {
2125
+ jobs: visible,
2126
+ labels,
2127
+ onPause,
2128
+ onResume,
2129
+ onCancel
2130
+ }
2131
+ ) })
2132
+ ]
2133
+ }
2134
+ )
2135
+ ] });
2634
2136
  }
2635
2137
 
2636
2138
  // src/components/upload/createMultipartUploadController.ts
@@ -2836,8 +2338,8 @@ function createMultipartUploadController(options) {
2836
2338
  };
2837
2339
  }
2838
2340
  function useMediaQuery2(query) {
2839
- const [matches, setMatches] = React.useState(false);
2840
- React.useEffect(() => {
2341
+ const [matches, setMatches] = react.useState(false);
2342
+ react.useEffect(() => {
2841
2343
  if (typeof window === "undefined" || !window.matchMedia) return;
2842
2344
  const mql = window.matchMedia(query);
2843
2345
  const onChange = () => setMatches(mql.matches);
@@ -3070,7 +2572,7 @@ function TimeRangePicker({
3070
2572
  children: TIME_RANGE_OPTIONS.map((option) => {
3071
2573
  const selected = option === value;
3072
2574
  return /* @__PURE__ */ jsxRuntime.jsx(
3073
- Button,
2575
+ button_js.Button,
3074
2576
  {
3075
2577
  type: "button",
3076
2578
  size: "sm",
@@ -3283,10 +2785,10 @@ function CookieConsentBanner({
3283
2785
  className
3284
2786
  }) {
3285
2787
  const copy = { ...DEFAULT_COOKIE_CONSENT_BANNER_LABELS, ...labels };
3286
- const [consent, setConsent] = React.useState(
2788
+ const [consent, setConsent] = react.useState(
3287
2789
  "pending"
3288
2790
  );
3289
- React.useEffect(() => {
2791
+ react.useEffect(() => {
3290
2792
  if (variant === "embed" || isEmbeddedWindow()) {
3291
2793
  setConsent("necessary");
3292
2794
  return;
@@ -3327,7 +2829,7 @@ function CookieConsentBanner({
3327
2829
  ] }),
3328
2830
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 flex-wrap gap-2", children: [
3329
2831
  /* @__PURE__ */ jsxRuntime.jsx(
3330
- Button,
2832
+ button_js.Button,
3331
2833
  {
3332
2834
  type: "button",
3333
2835
  variant: "outline",
@@ -3335,7 +2837,7 @@ function CookieConsentBanner({
3335
2837
  children: copy.necessaryOnly
3336
2838
  }
3337
2839
  ),
3338
- /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", onClick: () => choose("all"), children: copy.acceptAll })
2840
+ /* @__PURE__ */ jsxRuntime.jsx(button_js.Button, { type: "button", onClick: () => choose("all"), children: copy.acceptAll })
3339
2841
  ] })
3340
2842
  ] })
3341
2843
  }
@@ -3449,22 +2951,22 @@ function LegalAcceptDialog({
3449
2951
  }) {
3450
2952
  const copy = { ...DEFAULT_LEGAL_ACCEPT_DIALOG_LABELS, ...labels };
3451
2953
  return /* @__PURE__ */ jsxRuntime.jsx(
3452
- AlertDialog,
2954
+ alertDialog_js.AlertDialog,
3453
2955
  {
3454
2956
  open,
3455
2957
  onOpenChange: (next) => {
3456
2958
  if (next) return;
3457
2959
  },
3458
2960
  children: /* @__PURE__ */ jsxRuntime.jsxs(
3459
- AlertDialogContent,
2961
+ alertDialog_js.AlertDialogContent,
3460
2962
  {
3461
2963
  onEscapeKeyDown: (event) => {
3462
2964
  event.preventDefault();
3463
2965
  },
3464
2966
  children: [
3465
- /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogHeader, { children: [
3466
- /* @__PURE__ */ jsxRuntime.jsx(AlertDialogTitle, { children: copy.title }),
3467
- /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogDescription, { children: [
2967
+ /* @__PURE__ */ jsxRuntime.jsxs(alertDialog_js.AlertDialogHeader, { children: [
2968
+ /* @__PURE__ */ jsxRuntime.jsx(alertDialog_js.AlertDialogTitle, { children: copy.title }),
2969
+ /* @__PURE__ */ jsxRuntime.jsxs(alertDialog_js.AlertDialogDescription, { children: [
3468
2970
  renderLegalAcceptLabel(
3469
2971
  copy.description,
3470
2972
  copy.terms,
@@ -3475,7 +2977,7 @@ function LegalAcceptDialog({
3475
2977
  summary ? ` ${summary}` : ""
3476
2978
  ] })
3477
2979
  ] }),
3478
- /* @__PURE__ */ jsxRuntime.jsx(AlertDialogFooter, { children: /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", disabled: accepting, onClick: onAccept, children: copy.accept }) })
2980
+ /* @__PURE__ */ jsxRuntime.jsx(alertDialog_js.AlertDialogFooter, { children: /* @__PURE__ */ jsxRuntime.jsx(button_js.Button, { type: "button", disabled: accepting, onClick: onAccept, children: copy.accept }) })
3479
2981
  ]
3480
2982
  }
3481
2983
  )
@@ -3864,8 +3366,8 @@ function MatchReview({
3864
3366
  className
3865
3367
  }) {
3866
3368
  const copy = { ...DEFAULT_MATCH_REVIEW_LABELS, ...labels };
3867
- const reasonId = React.useId();
3868
- const [reason, setReason] = React.useState("");
3369
+ const reasonId = react.useId();
3370
+ const [reason, setReason] = react.useState("");
3869
3371
  const trimmed = reason.trim();
3870
3372
  if (!hit) {
3871
3373
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -3944,7 +3446,7 @@ function MatchReview({
3944
3446
  ] }),
3945
3447
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap gap-2", children: [
3946
3448
  /* @__PURE__ */ jsxRuntime.jsx(
3947
- Button,
3449
+ button_js.Button,
3948
3450
  {
3949
3451
  type: "button",
3950
3452
  disabled: trimmed.length === 0,
@@ -3953,7 +3455,7 @@ function MatchReview({
3953
3455
  }
3954
3456
  ),
3955
3457
  /* @__PURE__ */ jsxRuntime.jsx(
3956
- Button,
3458
+ button_js.Button,
3957
3459
  {
3958
3460
  type: "button",
3959
3461
  variant: "outline",
@@ -3993,15 +3495,16 @@ exports.DataList = DataList;
3993
3495
  exports.DataListItem = DataListItem;
3994
3496
  exports.DimensionBreakdownTable = DimensionBreakdownTable;
3995
3497
  exports.EditableSection = EditableSection;
3996
- exports.Empty = Empty;
3997
- exports.EmptyContent = EmptyContent;
3998
- exports.EmptyDescription = EmptyDescription;
3999
- exports.EmptyHeader = EmptyHeader;
4000
- exports.EmptyMedia = EmptyMedia;
3498
+ exports.Empty = Empty2;
3499
+ exports.EmptyContent = EmptyContent2;
3500
+ exports.EmptyDescription = EmptyDescription2;
3501
+ exports.EmptyHeader = EmptyHeader2;
3502
+ exports.EmptyMedia = EmptyMedia2;
4001
3503
  exports.EmptyState = EmptyState;
4002
- exports.EmptyTitle = EmptyTitle;
3504
+ exports.EmptyTitle = EmptyTitle2;
4003
3505
  exports.EntityGraph = EntityGraph;
4004
3506
  exports.ErrorState = ErrorState;
3507
+ exports.Field = Field;
4005
3508
  exports.FieldMessage = FieldMessage;
4006
3509
  exports.FileDropzone = FileDropzone;
4007
3510
  exports.FileUploadMenu = FileUploadMenu;
@@ -4011,12 +3514,14 @@ exports.LanguageSwitcher = LanguageSwitcher;
4011
3514
  exports.LegalAcceptCheckbox = LegalAcceptCheckbox;
4012
3515
  exports.LegalAcceptDialog = LegalAcceptDialog;
4013
3516
  exports.LegalMarkdown = LegalMarkdown;
3517
+ exports.ListSkeleton = ListSkeleton;
4014
3518
  exports.LoadingState = LoadingState;
4015
3519
  exports.MatchReview = MatchReview;
4016
3520
  exports.MetricChartCard = MetricChartCard;
4017
3521
  exports.MetricEmptyState = MetricEmptyState;
4018
3522
  exports.MetricSkeleton = MetricSkeleton;
4019
3523
  exports.NotificationBell = NotificationBell;
3524
+ exports.PageTitle = PageTitle;
4020
3525
  exports.RiskBadge = RiskBadge;
4021
3526
  exports.SafeImage = SafeImage;
4022
3527
  exports.SparklineStat = SparklineStat;
@@ -4025,6 +3530,7 @@ exports.THEME_INIT_SCRIPT = THEME_INIT_SCRIPT;
4025
3530
  exports.THEME_INIT_SCRIPT_ID = THEME_INIT_SCRIPT_ID;
4026
3531
  exports.THEME_STORAGE_KEY = THEME_STORAGE_KEY;
4027
3532
  exports.TIME_RANGE_OPTIONS = TIME_RANGE_OPTIONS;
3533
+ exports.TableSkeleton = TableSkeleton;
4028
3534
  exports.ThemeSwitcher = ThemeSwitcher;
4029
3535
  exports.TimeRangePicker = TimeRangePicker;
4030
3536
  exports.avatarFallbackStyle = avatarFallbackStyle;