hazo_ui 4.9.0 → 5.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -3,9 +3,9 @@
3
3
 
4
4
  var clsx = require('clsx');
5
5
  var tailwindMerge = require('tailwind-merge');
6
- var React26 = require('react');
6
+ var React27 = require('react');
7
7
  var hazo_core = require('hazo_core');
8
- var client = require('hazo_core/client');
8
+ var client$1 = require('hazo_core/client');
9
9
  var jsxRuntime = require('react/jsx-runtime');
10
10
  var reactSlot = require('@radix-ui/react-slot');
11
11
  var classVarianceAuthority = require('class-variance-authority');
@@ -31,6 +31,7 @@ var IoIcons = require('react-icons/io5');
31
31
  var RiIcons = require('react-icons/ri');
32
32
  var TbIcons = require('react-icons/tb');
33
33
  var CiIcons = require('react-icons/ci');
34
+ var TabsPrimitive = require('@radix-ui/react-tabs');
34
35
  var react = require('@tiptap/react');
35
36
  var StarterKit = require('@tiptap/starter-kit');
36
37
  var extensionTextStyle = require('@tiptap/extension-text-style');
@@ -54,7 +55,6 @@ var TaskItem = require('@tiptap/extension-task-item');
54
55
  var lu = require('react-icons/lu');
55
56
  var rx = require('react-icons/rx');
56
57
  var core = require('@tiptap/core');
57
- var TabsPrimitive = require('@radix-ui/react-tabs');
58
58
  var reactMdEditor = require('@uiw/react-md-editor');
59
59
  require('@uiw/react-md-editor/markdown-editor.css');
60
60
  require('@uiw/react-markdown-preview/markdown.css');
@@ -76,7 +76,8 @@ var TogglePrimitive = require('@radix-ui/react-toggle');
76
76
  var ToggleGroupPrimitive = require('@radix-ui/react-toggle-group');
77
77
  var AlertDialogPrimitive = require('@radix-ui/react-alert-dialog');
78
78
  var sonner = require('sonner');
79
- var client$1 = require('hazo_state/client');
79
+ var client$2 = require('hazo_state/client');
80
+ var client = require('hazo_theme/client');
80
81
 
81
82
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
82
83
 
@@ -98,7 +99,7 @@ function _interopNamespace(e) {
98
99
  return Object.freeze(n);
99
100
  }
100
101
 
101
- var React26__namespace = /*#__PURE__*/_interopNamespace(React26);
102
+ var React27__namespace = /*#__PURE__*/_interopNamespace(React27);
102
103
  var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
103
104
  var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
104
105
  var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
@@ -115,6 +116,7 @@ var IoIcons__namespace = /*#__PURE__*/_interopNamespace(IoIcons);
115
116
  var RiIcons__namespace = /*#__PURE__*/_interopNamespace(RiIcons);
116
117
  var TbIcons__namespace = /*#__PURE__*/_interopNamespace(TbIcons);
117
118
  var CiIcons__namespace = /*#__PURE__*/_interopNamespace(CiIcons);
119
+ var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
118
120
  var StarterKit__default = /*#__PURE__*/_interopDefault(StarterKit);
119
121
  var FontFamily__default = /*#__PURE__*/_interopDefault(FontFamily);
120
122
  var Underline__default = /*#__PURE__*/_interopDefault(Underline);
@@ -132,7 +134,6 @@ var TableCell__default = /*#__PURE__*/_interopDefault(TableCell);
132
134
  var TableHeader__default = /*#__PURE__*/_interopDefault(TableHeader);
133
135
  var TaskList__default = /*#__PURE__*/_interopDefault(TaskList);
134
136
  var TaskItem__default = /*#__PURE__*/_interopDefault(TaskItem);
135
- var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
136
137
  var Suggestion__default = /*#__PURE__*/_interopDefault(Suggestion);
137
138
  var Cropper__default = /*#__PURE__*/_interopDefault(Cropper);
138
139
  var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
@@ -208,21 +209,33 @@ var require_objectWithoutPropertiesLoose = __commonJS({
208
209
  function cn(...inputs) {
209
210
  return tailwindMerge.twMerge(clsx.clsx(inputs));
210
211
  }
212
+ function safeHref(url) {
213
+ if (!url) return void 0;
214
+ const trimmed = url.trim();
215
+ const lower = trimmed.toLowerCase();
216
+ if (lower.startsWith("http://") || lower.startsWith("https://") || lower.startsWith("mailto:")) {
217
+ return trimmed;
218
+ }
219
+ if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
220
+ return trimmed;
221
+ }
222
+ return void 0;
223
+ }
211
224
  function HazoContextProvider({
212
225
  correlationId,
213
226
  userId,
214
227
  children
215
228
  }) {
216
- const id = React26__namespace.useMemo(
229
+ const id = React27__namespace.useMemo(
217
230
  () => correlationId ?? hazo_core.generateRequestId(),
218
231
  [correlationId]
219
232
  );
220
- React26__namespace.useEffect(() => {
221
- client.withContext({ correlationId: id, userId }, () => {
222
- client.setBrowserCorrelationId(id);
233
+ React27__namespace.useEffect(() => {
234
+ client$1.withContext({ correlationId: id, userId }, () => {
235
+ client$1.setBrowserCorrelationId(id);
223
236
  });
224
237
  return () => {
225
- client.setBrowserCorrelationId(void 0);
238
+ client$1.setBrowserCorrelationId(void 0);
226
239
  };
227
240
  }, [id, userId]);
228
241
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
@@ -301,7 +314,7 @@ var buttonVariants = classVarianceAuthority.cva(
301
314
  }
302
315
  }
303
316
  );
304
- var Button = React26__namespace.forwardRef(
317
+ var Button = React27__namespace.forwardRef(
305
318
  ({ className, variant, size, asChild = false, style, ...props }, ref) => {
306
319
  const Comp = asChild ? reactSlot.Slot : "button";
307
320
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -320,7 +333,7 @@ var Dialog = DialogPrimitive__namespace.Root;
320
333
  var DialogTrigger = DialogPrimitive__namespace.Trigger;
321
334
  var DialogPortal = DialogPrimitive__namespace.Portal;
322
335
  var DialogClose = DialogPrimitive__namespace.Close;
323
- var DialogOverlay = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
336
+ var DialogOverlay = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
324
337
  DialogPrimitive__namespace.Overlay,
325
338
  {
326
339
  ref,
@@ -332,7 +345,7 @@ var DialogOverlay = React26__namespace.forwardRef(({ className, ...props }, ref)
332
345
  }
333
346
  ));
334
347
  DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
335
- var DialogContent = React26__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
348
+ var DialogContent = React27__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
336
349
  /* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
337
350
  /* @__PURE__ */ jsxRuntime.jsxs(
338
351
  DialogPrimitive__namespace.Content,
@@ -382,7 +395,7 @@ var DialogFooter = ({
382
395
  }
383
396
  );
384
397
  DialogFooter.displayName = "DialogFooter";
385
- var DialogTitle = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
398
+ var DialogTitle = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
386
399
  DialogPrimitive__namespace.Title,
387
400
  {
388
401
  ref,
@@ -395,7 +408,7 @@ var DialogTitle = React26__namespace.forwardRef(({ className, ...props }, ref) =
395
408
  }
396
409
  ));
397
410
  DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
398
- var DialogDescription = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
411
+ var DialogDescription = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
399
412
  DialogPrimitive__namespace.Description,
400
413
  {
401
414
  ref,
@@ -404,7 +417,7 @@ var DialogDescription = React26__namespace.forwardRef(({ className, ...props },
404
417
  }
405
418
  ));
406
419
  DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
407
- var Command = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
420
+ var Command = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
408
421
  "div",
409
422
  {
410
423
  ref,
@@ -416,7 +429,7 @@ var Command = React26__namespace.forwardRef(({ className, ...props }, ref) => /*
416
429
  }
417
430
  ));
418
431
  Command.displayName = "Command";
419
- var CommandInput = React26__namespace.forwardRef(({ className, onValueChange, onChange, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
432
+ var CommandInput = React27__namespace.forwardRef(({ className, onValueChange, onChange, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
420
433
  "input",
421
434
  {
422
435
  ref,
@@ -432,7 +445,7 @@ var CommandInput = React26__namespace.forwardRef(({ className, onValueChange, on
432
445
  }
433
446
  ));
434
447
  CommandInput.displayName = "CommandInput";
435
- var CommandList = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
448
+ var CommandList = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
436
449
  "div",
437
450
  {
438
451
  ref,
@@ -441,7 +454,7 @@ var CommandList = React26__namespace.forwardRef(({ className, ...props }, ref) =
441
454
  }
442
455
  ));
443
456
  CommandList.displayName = "CommandList";
444
- var CommandEmpty = React26__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
457
+ var CommandEmpty = React27__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
445
458
  "div",
446
459
  {
447
460
  ref,
@@ -450,7 +463,7 @@ var CommandEmpty = React26__namespace.forwardRef((props, ref) => /* @__PURE__ */
450
463
  }
451
464
  ));
452
465
  CommandEmpty.displayName = "CommandEmpty";
453
- var CommandGroup = React26__namespace.forwardRef(({ className, heading, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
466
+ var CommandGroup = React27__namespace.forwardRef(({ className, heading, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
454
467
  "div",
455
468
  {
456
469
  ref,
@@ -466,7 +479,7 @@ var CommandGroup = React26__namespace.forwardRef(({ className, heading, children
466
479
  }
467
480
  ));
468
481
  CommandGroup.displayName = "CommandGroup";
469
- var CommandItem = React26__namespace.forwardRef(({ className, onSelect, value, selected, style, ...props }, ref) => {
482
+ var CommandItem = React27__namespace.forwardRef(({ className, onSelect, value, selected, style, ...props }, ref) => {
470
483
  const handleClick = () => {
471
484
  if (onSelect && value) {
472
485
  onSelect(value);
@@ -497,7 +510,7 @@ var CommandItem = React26__namespace.forwardRef(({ className, onSelect, value, s
497
510
  CommandItem.displayName = "CommandItem";
498
511
  var Popover = PopoverPrimitive__namespace.Root;
499
512
  var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
500
- var PopoverContent = React26__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
513
+ var PopoverContent = React27__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
501
514
  PopoverPrimitive__namespace.Content,
502
515
  {
503
516
  ref,
@@ -511,7 +524,7 @@ var PopoverContent = React26__namespace.forwardRef(({ className, align = "center
511
524
  }
512
525
  ) }));
513
526
  PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
514
- var Input = React26__namespace.forwardRef(
527
+ var Input = React27__namespace.forwardRef(
515
528
  ({ className, type, ...props }, ref) => {
516
529
  return /* @__PURE__ */ jsxRuntime.jsx(
517
530
  "input",
@@ -531,7 +544,7 @@ Input.displayName = "Input";
531
544
  var Select = SelectPrimitive__namespace.Root;
532
545
  var SelectGroup = SelectPrimitive__namespace.Group;
533
546
  var SelectValue = SelectPrimitive__namespace.Value;
534
- var SelectTrigger = React26__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
547
+ var SelectTrigger = React27__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
535
548
  SelectPrimitive__namespace.Trigger,
536
549
  {
537
550
  ref,
@@ -547,7 +560,7 @@ var SelectTrigger = React26__namespace.forwardRef(({ className, children, ...pro
547
560
  }
548
561
  ));
549
562
  SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
550
- var SelectScrollUpButton = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
563
+ var SelectScrollUpButton = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
551
564
  SelectPrimitive__namespace.ScrollUpButton,
552
565
  {
553
566
  ref,
@@ -560,7 +573,7 @@ var SelectScrollUpButton = React26__namespace.forwardRef(({ className, ...props
560
573
  }
561
574
  ));
562
575
  SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
563
- var SelectScrollDownButton = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
576
+ var SelectScrollDownButton = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
564
577
  SelectPrimitive__namespace.ScrollDownButton,
565
578
  {
566
579
  ref,
@@ -573,7 +586,7 @@ var SelectScrollDownButton = React26__namespace.forwardRef(({ className, ...prop
573
586
  }
574
587
  ));
575
588
  SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
576
- var SelectContent = React26__namespace.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
589
+ var SelectContent = React27__namespace.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
577
590
  SelectPrimitive__namespace.Content,
578
591
  {
579
592
  ref,
@@ -601,7 +614,7 @@ var SelectContent = React26__namespace.forwardRef(({ className, children, positi
601
614
  }
602
615
  ) }));
603
616
  SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
604
- var SelectLabel = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
617
+ var SelectLabel = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
605
618
  SelectPrimitive__namespace.Label,
606
619
  {
607
620
  ref,
@@ -610,7 +623,7 @@ var SelectLabel = React26__namespace.forwardRef(({ className, ...props }, ref) =
610
623
  }
611
624
  ));
612
625
  SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
613
- var SelectItem = React26__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
626
+ var SelectItem = React27__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
614
627
  SelectPrimitive__namespace.Item,
615
628
  {
616
629
  ref,
@@ -626,7 +639,7 @@ var SelectItem = React26__namespace.forwardRef(({ className, children, ...props
626
639
  }
627
640
  ));
628
641
  SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
629
- var SelectSeparator = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
642
+ var SelectSeparator = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
630
643
  SelectPrimitive__namespace.Separator,
631
644
  {
632
645
  ref,
@@ -638,7 +651,7 @@ SelectSeparator.displayName = SelectPrimitive__namespace.Separator.displayName;
638
651
  var TooltipProvider = TooltipPrimitive__namespace.Provider;
639
652
  var Tooltip = TooltipPrimitive__namespace.Root;
640
653
  var TooltipTrigger = TooltipPrimitive__namespace.Trigger;
641
- var TooltipContent = React26__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
654
+ var TooltipContent = React27__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
642
655
  TooltipPrimitive__namespace.Content,
643
656
  {
644
657
  ref,
@@ -706,7 +719,7 @@ function FilterFieldItem({
706
719
  onOperatorChange,
707
720
  onDelete
708
721
  }) {
709
- const [isCalendarOpen, setIsCalendarOpen] = React26.useState(false);
722
+ const [isCalendarOpen, setIsCalendarOpen] = React27.useState(false);
710
723
  const renderInput = () => {
711
724
  switch (fieldConfig.type) {
712
725
  case "text":
@@ -933,10 +946,10 @@ function HazoUiMultiFilterDialog({
933
946
  ...finalHeaderBgColor && { backgroundColor: finalHeaderBgColor },
934
947
  ...finalHeaderTextColor && { color: finalHeaderTextColor }
935
948
  };
936
- const [isOpen, setIsOpen] = React26.useState(false);
937
- const [filterFields, setFilterFields] = React26.useState(initialFilters);
938
- const [isComboboxOpen, setIsComboboxOpen] = React26.useState(false);
939
- React26.useEffect(() => {
949
+ const [isOpen, setIsOpen] = React27.useState(false);
950
+ const [filterFields, setFilterFields] = React27.useState(initialFilters);
951
+ const [isComboboxOpen, setIsComboboxOpen] = React27.useState(false);
952
+ React27.useEffect(() => {
940
953
  if (isOpen) {
941
954
  setFilterFields(initialFilters);
942
955
  }
@@ -1297,16 +1310,16 @@ function HazoUiMultiSortDialog({
1297
1310
  ...finalHeaderBgColor && { backgroundColor: finalHeaderBgColor },
1298
1311
  ...finalHeaderTextColor && { color: finalHeaderTextColor }
1299
1312
  };
1300
- const [isOpen, setIsOpen] = React26.useState(false);
1301
- const [sortFields, setSortFields] = React26.useState(initialSortFields);
1302
- const [isComboboxOpen, setIsComboboxOpen] = React26.useState(false);
1313
+ const [isOpen, setIsOpen] = React27.useState(false);
1314
+ const [sortFields, setSortFields] = React27.useState(initialSortFields);
1315
+ const [isComboboxOpen, setIsComboboxOpen] = React27.useState(false);
1303
1316
  const sensors = core$1.useSensors(
1304
1317
  core$1.useSensor(core$1.PointerSensor, { activationConstraint: { distance: 4 } }),
1305
1318
  core$1.useSensor(core$1.KeyboardSensor, {
1306
1319
  coordinateGetter: sortable.sortableKeyboardCoordinates
1307
1320
  })
1308
1321
  );
1309
- React26.useEffect(() => {
1322
+ React27.useEffect(() => {
1310
1323
  if (isOpen) {
1311
1324
  setSortFields(initialSortFields);
1312
1325
  }
@@ -1500,7 +1513,7 @@ function HazoUiMultiSortDialog({
1500
1513
  ] })
1501
1514
  ] });
1502
1515
  }
1503
- var RadioGroup = React26__namespace.forwardRef(({ className, ...props }, ref) => {
1516
+ var RadioGroup = React27__namespace.forwardRef(({ className, ...props }, ref) => {
1504
1517
  return /* @__PURE__ */ jsxRuntime.jsx(
1505
1518
  RadioGroupPrimitive__namespace.Root,
1506
1519
  {
@@ -1511,7 +1524,7 @@ var RadioGroup = React26__namespace.forwardRef(({ className, ...props }, ref) =>
1511
1524
  );
1512
1525
  });
1513
1526
  RadioGroup.displayName = RadioGroupPrimitive__namespace.Root.displayName;
1514
- var RadioGroupItem = React26__namespace.forwardRef(({ className, ...props }, ref) => {
1527
+ var RadioGroupItem = React27__namespace.forwardRef(({ className, ...props }, ref) => {
1515
1528
  return /* @__PURE__ */ jsxRuntime.jsx(
1516
1529
  RadioGroupPrimitive__namespace.Item,
1517
1530
  {
@@ -1874,6 +1887,368 @@ function HazoUiPillRadio({
1874
1887
  }
1875
1888
  ) });
1876
1889
  }
1890
+ var Tabs = TabsPrimitive__namespace.Root;
1891
+ var TabsList = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1892
+ TabsPrimitive__namespace.List,
1893
+ {
1894
+ ref,
1895
+ className: cn(
1896
+ "inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
1897
+ className
1898
+ ),
1899
+ ...props
1900
+ }
1901
+ ));
1902
+ TabsList.displayName = TabsPrimitive__namespace.List.displayName;
1903
+ var TabsTrigger = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1904
+ TabsPrimitive__namespace.Trigger,
1905
+ {
1906
+ ref,
1907
+ className: cn(
1908
+ "inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
1909
+ className
1910
+ ),
1911
+ ...props
1912
+ }
1913
+ ));
1914
+ TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
1915
+ var TabsContent = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1916
+ TabsPrimitive__namespace.Content,
1917
+ {
1918
+ ref,
1919
+ className: cn(
1920
+ "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
1921
+ className
1922
+ ),
1923
+ ...props
1924
+ }
1925
+ ));
1926
+ TabsContent.displayName = TabsPrimitive__namespace.Content.displayName;
1927
+ function isLucideValue(value) {
1928
+ return value.startsWith("lucide:");
1929
+ }
1930
+ function get_lucide_component(name) {
1931
+ return lucideReact.icons[name] || null;
1932
+ }
1933
+ function HazoUiIcon({ value, size = 18, className }) {
1934
+ if (isLucideValue(value)) {
1935
+ const name = value.slice("lucide:".length);
1936
+ const Cmp = get_lucide_component(name);
1937
+ if (!Cmp) return null;
1938
+ return /* @__PURE__ */ jsxRuntime.jsx(Cmp, { size, className });
1939
+ }
1940
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("cls_hazo_ui_icon_emoji", className), style: { fontSize: size }, children: value });
1941
+ }
1942
+ var TOOLS_ICONS = [
1943
+ "Wrench",
1944
+ "Hammer",
1945
+ "Drill",
1946
+ "ToolCase",
1947
+ "PaintRoller",
1948
+ "PaintBucket",
1949
+ "Ruler",
1950
+ "Cog",
1951
+ "Bolt",
1952
+ "Pipette",
1953
+ "Wind",
1954
+ "Plug",
1955
+ "Lightbulb",
1956
+ "Axe",
1957
+ "Shovel"
1958
+ ];
1959
+ var HOME_ICONS = [
1960
+ "House",
1961
+ "DoorOpen",
1962
+ "Bath",
1963
+ "ShowerHead",
1964
+ "Sofa",
1965
+ "Bed",
1966
+ "Refrigerator",
1967
+ "WashingMachine",
1968
+ "Fence",
1969
+ "Key",
1970
+ "Lock",
1971
+ "Warehouse"
1972
+ ];
1973
+ var WEATHER_ICONS = [
1974
+ "Sun",
1975
+ "CloudRain",
1976
+ "Snowflake",
1977
+ "Thermometer",
1978
+ "Wind",
1979
+ "Droplet",
1980
+ "Flame",
1981
+ "CloudSnow",
1982
+ "Zap"
1983
+ ];
1984
+ var NATURE_ICONS = ["Leaf", "TreePine", "Trees", "Flower", "Sprout", "Bug", "Sun", "Droplets"];
1985
+ var SYMBOLS_ICONS = [
1986
+ "Star",
1987
+ "Heart",
1988
+ "Check",
1989
+ "Circle",
1990
+ "Square",
1991
+ "Triangle",
1992
+ "Hexagon",
1993
+ "Tag",
1994
+ "Bell",
1995
+ "Settings",
1996
+ "Wrench"
1997
+ ];
1998
+ var LUCIDE_GROUPS = [
1999
+ { key: "tools", label: "Tools", icons: TOOLS_ICONS },
2000
+ { key: "home", label: "Home", icons: HOME_ICONS },
2001
+ { key: "weather", label: "Weather", icons: WEATHER_ICONS },
2002
+ { key: "nature", label: "Nature", icons: NATURE_ICONS },
2003
+ { key: "symbols", label: "Symbols", icons: SYMBOLS_ICONS }
2004
+ ];
2005
+ var EMOJI_ITEMS = [
2006
+ // Faces
2007
+ "\u{1F600}",
2008
+ "\u{1F603}",
2009
+ "\u{1F604}",
2010
+ "\u{1F601}",
2011
+ "\u{1F606}",
2012
+ "\u{1F605}",
2013
+ "\u{1F642}",
2014
+ "\u{1F609}",
2015
+ "\u{1F60A}",
2016
+ "\u{1F60D}",
2017
+ "\u{1F914}",
2018
+ "\u{1F610}",
2019
+ "\u{1F634}",
2020
+ "\u{1F60E}",
2021
+ "\u{1F917}",
2022
+ "\u{1F973}",
2023
+ "\u{1F607}",
2024
+ "\u{1F643}",
2025
+ "\u{1F62C}",
2026
+ "\u{1F929}",
2027
+ // People / hands
2028
+ "\u{1F44D}",
2029
+ "\u{1F44E}",
2030
+ "\u{1F44F}",
2031
+ "\u{1F64C}",
2032
+ "\u{1F91D}",
2033
+ "\u{1F44B}",
2034
+ "\u{1F4AA}",
2035
+ "\u{1F64F}",
2036
+ "\u{1F440}",
2037
+ "\u{1F9D1}\u200D\u{1F527}",
2038
+ // Objects / tools
2039
+ "\u{1F527}",
2040
+ "\u{1F528}",
2041
+ "\u{1F6E0}\uFE0F",
2042
+ "\u2699\uFE0F",
2043
+ "\u{1FA9B}",
2044
+ "\u{1FA9A}",
2045
+ "\u{1F9F0}",
2046
+ "\u{1F529}",
2047
+ "\u26CF\uFE0F",
2048
+ "\u{1F9F1}",
2049
+ "\u{1F511}",
2050
+ "\u{1F512}",
2051
+ "\u{1F50B}",
2052
+ "\u{1F4A1}",
2053
+ "\u{1F50C}",
2054
+ "\u{1F9EF}",
2055
+ "\u{1FA9C}",
2056
+ "\u{1F9F2}",
2057
+ "\u{1F4CF}",
2058
+ "\u{1F4D0}",
2059
+ // Home
2060
+ "\u{1F3E0}",
2061
+ "\u{1F3E1}",
2062
+ "\u{1F3E2}",
2063
+ "\u{1F3ED}",
2064
+ "\u{1F6AA}",
2065
+ "\u{1F6CB}\uFE0F",
2066
+ "\u{1F6C1}",
2067
+ "\u{1F6BF}",
2068
+ "\u{1F6CF}\uFE0F",
2069
+ "\u{1FA9F}",
2070
+ // Weather / nature
2071
+ "\u2600\uFE0F",
2072
+ "\u{1F324}\uFE0F",
2073
+ "\u26C5",
2074
+ "\u{1F327}\uFE0F",
2075
+ "\u26C8\uFE0F",
2076
+ "\u{1F329}\uFE0F",
2077
+ "\u2744\uFE0F",
2078
+ "\u{1F32C}\uFE0F",
2079
+ "\u{1F4A7}",
2080
+ "\u{1F525}",
2081
+ "\u{1F308}",
2082
+ "\u{1F30A}",
2083
+ "\u{1F331}",
2084
+ "\u{1F333}",
2085
+ "\u{1F332}",
2086
+ "\u{1F343}",
2087
+ "\u{1F338}",
2088
+ "\u{1F33B}",
2089
+ "\u{1F342}",
2090
+ "\u{1F335}",
2091
+ // Transport
2092
+ "\u{1F697}",
2093
+ "\u{1F69A}",
2094
+ "\u{1F69B}",
2095
+ "\u{1F69C}",
2096
+ "\u{1F6B2}",
2097
+ "\u2708\uFE0F",
2098
+ "\u{1F680}",
2099
+ "\u26F5",
2100
+ // Symbols
2101
+ "\u2B50",
2102
+ "\u2764\uFE0F",
2103
+ "\u2705",
2104
+ "\u274C",
2105
+ "\u26A0\uFE0F",
2106
+ "\u{1F534}",
2107
+ "\u{1F7E2}",
2108
+ "\u{1F535}",
2109
+ "\u{1F7E1}",
2110
+ "\u2B1B",
2111
+ "\u2B1C",
2112
+ "\u{1F53A}",
2113
+ "\u{1F536}",
2114
+ "\u{1F537}",
2115
+ "\u{1F4AF}",
2116
+ "\u{1F514}",
2117
+ "\u{1F4CC}",
2118
+ "\u{1F4CD}",
2119
+ "\u{1F3F7}\uFE0F",
2120
+ "\u{1F3AF}",
2121
+ // Misc
2122
+ "\u{1F4E6}",
2123
+ "\u{1F4C5}",
2124
+ "\u{1F4C8}",
2125
+ "\u{1F4DD}",
2126
+ "\u{1F4B0}",
2127
+ "\u{1F4B3}",
2128
+ "\u{1F389}",
2129
+ "\u{1F381}",
2130
+ "\u2615",
2131
+ "\u{1F37D}\uFE0F",
2132
+ "\u{1F9FE}",
2133
+ "\u{1F4DE}",
2134
+ "\u2709\uFE0F",
2135
+ "\u{1F310}"
2136
+ ];
2137
+ function HazoUiIconPicker({
2138
+ value,
2139
+ onChange,
2140
+ disabled,
2141
+ className,
2142
+ triggerClassName,
2143
+ align = "start"
2144
+ }) {
2145
+ const [open, set_open] = React27__namespace.useState(false);
2146
+ const [search, set_search] = React27__namespace.useState("");
2147
+ const handle_select = React27__namespace.useCallback(
2148
+ (next_value) => {
2149
+ onChange(next_value);
2150
+ set_open(false);
2151
+ },
2152
+ [onChange]
2153
+ );
2154
+ const filtered_search_results = React27__namespace.useMemo(() => {
2155
+ const query = search.trim().toLowerCase();
2156
+ if (!query) return [];
2157
+ return Object.keys(lucideReact.icons).filter((name) => name.toLowerCase().includes(query)).slice(0, 60);
2158
+ }, [search]);
2159
+ const has_search = search.trim().length > 0;
2160
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("cls_hazo_ui_icon_picker", className), children: /* @__PURE__ */ jsxRuntime.jsxs(
2161
+ Popover,
2162
+ {
2163
+ open,
2164
+ onOpenChange: (next_open) => {
2165
+ set_open(next_open);
2166
+ if (!next_open) set_search("");
2167
+ },
2168
+ children: [
2169
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
2170
+ "button",
2171
+ {
2172
+ type: "button",
2173
+ disabled,
2174
+ className: cn(
2175
+ "cls_hazo_ui_icon_picker_trigger",
2176
+ "flex h-9 w-9 items-center justify-center rounded-md border border-input bg-card",
2177
+ "text-foreground transition-colors hover:bg-accent/50",
2178
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
2179
+ "disabled:cursor-not-allowed disabled:opacity-50",
2180
+ triggerClassName
2181
+ ),
2182
+ children: /* @__PURE__ */ jsxRuntime.jsx(HazoUiIcon, { value })
2183
+ }
2184
+ ) }),
2185
+ /* @__PURE__ */ jsxRuntime.jsxs(PopoverContent, { align, className: "w-72 p-2", children: [
2186
+ /* @__PURE__ */ jsxRuntime.jsx(
2187
+ "input",
2188
+ {
2189
+ type: "text",
2190
+ value: search,
2191
+ onChange: (e) => set_search(e.target.value),
2192
+ placeholder: "Search icons...",
2193
+ className: cn(
2194
+ "cls_hazo_ui_icon_picker_search",
2195
+ "mb-2 flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm",
2196
+ "placeholder:text-muted-foreground",
2197
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
2198
+ )
2199
+ }
2200
+ ),
2201
+ has_search ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cls_hazo_ui_icon_picker_search_results grid max-h-56 grid-cols-8 gap-1 overflow-y-auto", children: [
2202
+ filtered_search_results.map((name) => {
2203
+ const Cmp = lucideReact.icons[name];
2204
+ return /* @__PURE__ */ jsxRuntime.jsx(
2205
+ "button",
2206
+ {
2207
+ type: "button",
2208
+ title: name,
2209
+ onClick: () => handle_select(`lucide:${name}`),
2210
+ className: "flex h-8 w-8 items-center justify-center rounded-md hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
2211
+ children: /* @__PURE__ */ jsxRuntime.jsx(Cmp, { size: 16 })
2212
+ },
2213
+ name
2214
+ );
2215
+ }),
2216
+ filtered_search_results.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "col-span-8 py-4 text-center text-sm text-muted-foreground", children: "No icons found" })
2217
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(Tabs, { defaultValue: "emoji", children: [
2218
+ /* @__PURE__ */ jsxRuntime.jsxs(TabsList, { className: "grid w-full grid-cols-6", children: [
2219
+ /* @__PURE__ */ jsxRuntime.jsx(TabsTrigger, { value: "emoji", children: "Emoji" }),
2220
+ LUCIDE_GROUPS.map((group) => /* @__PURE__ */ jsxRuntime.jsx(TabsTrigger, { value: group.key, children: group.label }, group.key))
2221
+ ] }),
2222
+ /* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "emoji", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid max-h-56 grid-cols-8 gap-1 overflow-y-auto", children: EMOJI_ITEMS.map((emoji, index) => /* @__PURE__ */ jsxRuntime.jsx(
2223
+ "button",
2224
+ {
2225
+ type: "button",
2226
+ onClick: () => handle_select(emoji),
2227
+ className: "flex h-8 w-8 items-center justify-center rounded-md text-lg hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
2228
+ children: emoji
2229
+ },
2230
+ `${emoji}-${index}`
2231
+ )) }) }),
2232
+ LUCIDE_GROUPS.map((group) => /* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: group.key, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid max-h-56 grid-cols-8 gap-1 overflow-y-auto", children: group.icons.map((name) => {
2233
+ const Cmp = lucideReact.icons[name];
2234
+ return /* @__PURE__ */ jsxRuntime.jsx(
2235
+ "button",
2236
+ {
2237
+ type: "button",
2238
+ title: name,
2239
+ onClick: () => handle_select(`lucide:${name}`),
2240
+ className: "flex h-8 w-8 items-center justify-center rounded-md hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
2241
+ children: /* @__PURE__ */ jsxRuntime.jsx(Cmp, { size: 16 })
2242
+ },
2243
+ name
2244
+ );
2245
+ }) }) }, group.key))
2246
+ ] })
2247
+ ] })
2248
+ ]
2249
+ }
2250
+ ) });
2251
+ }
1877
2252
  function validateInput(value, input_type, text_len_min, text_len_max, num_min, num_max, regex, num_decimals) {
1878
2253
  if (value === "") {
1879
2254
  return { isValid: true };
@@ -1968,7 +2343,7 @@ function filterInputValue(value, input_type, num_decimals) {
1968
2343
  }
1969
2344
  }
1970
2345
  }
1971
- var HazoUiFlexInput = React26__namespace.forwardRef(
2346
+ var HazoUiFlexInput = React27__namespace.forwardRef(
1972
2347
  ({
1973
2348
  className,
1974
2349
  input_type = "mixed",
@@ -1985,13 +2360,13 @@ var HazoUiFlexInput = React26__namespace.forwardRef(
1985
2360
  onBlur,
1986
2361
  ...props
1987
2362
  }, ref) => {
1988
- const [internalValue, setInternalValue] = React26__namespace.useState(
2363
+ const [internalValue, setInternalValue] = React27__namespace.useState(
1989
2364
  typeof controlledValue === "string" ? controlledValue : typeof controlledValue === "number" ? String(controlledValue) : ""
1990
2365
  );
1991
- const [errorMessage, setErrorMessage] = React26__namespace.useState();
2366
+ const [errorMessage, setErrorMessage] = React27__namespace.useState();
1992
2367
  const isControlled = controlledValue !== void 0;
1993
2368
  const currentValue = isControlled ? typeof controlledValue === "string" ? controlledValue : String(controlledValue || "") : internalValue;
1994
- React26__namespace.useEffect(() => {
2369
+ React27__namespace.useEffect(() => {
1995
2370
  if (isControlled) {
1996
2371
  const newValue = typeof controlledValue === "string" ? controlledValue : String(controlledValue || "");
1997
2372
  if (newValue !== internalValue) {
@@ -2071,7 +2446,7 @@ var HazoUiFlexInput = React26__namespace.forwardRef(
2071
2446
  }
2072
2447
  );
2073
2448
  HazoUiFlexInput.displayName = "HazoUiFlexInput";
2074
- var ToolbarButton = React26__namespace.forwardRef(
2449
+ var ToolbarButton = React27__namespace.forwardRef(
2075
2450
  ({ onClick, is_active = false, disabled = false, tooltip, className, children }, ref) => {
2076
2451
  const button = /* @__PURE__ */ jsxRuntime.jsx(
2077
2452
  "button",
@@ -2308,11 +2683,11 @@ var validHex = (hex) => /^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);
2308
2683
  var import_extends2 = __toESM(require_extends());
2309
2684
  var import_objectWithoutPropertiesLoose = __toESM(require_objectWithoutPropertiesLoose());
2310
2685
  function useEventCallback(handler) {
2311
- var callbackRef = React26.useRef(handler);
2312
- React26.useEffect(() => {
2686
+ var callbackRef = React27.useRef(handler);
2687
+ React27.useEffect(() => {
2313
2688
  callbackRef.current = handler;
2314
2689
  });
2315
- return React26.useCallback((value, event) => callbackRef.current && callbackRef.current(value, event), []);
2690
+ return React27.useCallback((value, event) => callbackRef.current && callbackRef.current(value, event), []);
2316
2691
  }
2317
2692
  var isTouch = (event) => "touches" in event;
2318
2693
  var preventDefaultMove = (event) => {
@@ -2340,11 +2715,11 @@ var getRelativePosition = (node, event) => {
2340
2715
  };
2341
2716
  };
2342
2717
  var _excluded = ["prefixCls", "className", "onMove", "onDown"];
2343
- var Interactive = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref) => {
2718
+ var Interactive = /* @__PURE__ */ React27__namespace.default.forwardRef((props, ref) => {
2344
2719
  var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-interactive" : _props$prefixCls, className = props.className, onMove = props.onMove, onDown = props.onDown, reset = (0, import_objectWithoutPropertiesLoose.default)(props, _excluded);
2345
- var container = React26.useRef(null);
2346
- var hasTouched = React26.useRef(false);
2347
- var _useState = React26.useState(false), isDragging = _useState[0], setDragging = _useState[1];
2720
+ var container = React27.useRef(null);
2721
+ var hasTouched = React27.useRef(false);
2722
+ var _useState = React27.useState(false), isDragging = _useState[0], setDragging = _useState[1];
2348
2723
  var onMoveCallback = useEventCallback(onMove);
2349
2724
  var onKeyCallback = useEventCallback(onDown);
2350
2725
  var isValid = (event) => {
@@ -2352,7 +2727,7 @@ var Interactive = /* @__PURE__ */ React26__namespace.default.forwardRef((props,
2352
2727
  hasTouched.current = isTouch(event);
2353
2728
  return true;
2354
2729
  };
2355
- var handleMove = React26.useCallback((event) => {
2730
+ var handleMove = React27.useCallback((event) => {
2356
2731
  preventDefaultMove(event);
2357
2732
  if (!container.current) return;
2358
2733
  var isDown = isTouch(event) ? event.touches.length > 0 : event.buttons > 0;
@@ -2362,8 +2737,8 @@ var Interactive = /* @__PURE__ */ React26__namespace.default.forwardRef((props,
2362
2737
  }
2363
2738
  onMoveCallback == null || onMoveCallback(getRelativePosition(container.current, event), event);
2364
2739
  }, [onMoveCallback]);
2365
- var handleMoveEnd = React26.useCallback(() => setDragging(false), []);
2366
- var toggleDocumentEvents = React26.useCallback((state) => {
2740
+ var handleMoveEnd = React27.useCallback(() => setDragging(false), []);
2741
+ var toggleDocumentEvents = React27.useCallback((state) => {
2367
2742
  if (state) {
2368
2743
  window.addEventListener(hasTouched.current ? "touchmove" : "mousemove", handleMove);
2369
2744
  window.addEventListener(hasTouched.current ? "touchend" : "mouseup", handleMoveEnd);
@@ -2374,13 +2749,13 @@ var Interactive = /* @__PURE__ */ React26__namespace.default.forwardRef((props,
2374
2749
  window.removeEventListener("touchend", handleMoveEnd);
2375
2750
  }
2376
2751
  }, [handleMove, handleMoveEnd]);
2377
- React26.useEffect(() => {
2752
+ React27.useEffect(() => {
2378
2753
  toggleDocumentEvents(isDragging);
2379
2754
  return () => {
2380
2755
  toggleDocumentEvents(false);
2381
2756
  };
2382
2757
  }, [isDragging, handleMove, handleMoveEnd, toggleDocumentEvents]);
2383
- var handleMoveStart = React26.useCallback((event) => {
2758
+ var handleMoveStart = React27.useCallback((event) => {
2384
2759
  var activeEl = document.activeElement;
2385
2760
  activeEl == null || activeEl.blur();
2386
2761
  preventDefaultMove(event.nativeEvent);
@@ -2418,7 +2793,7 @@ var Pointer = (_ref) => {
2418
2793
  borderRadius: "50%",
2419
2794
  backgroundColor: color2
2420
2795
  };
2421
- return React26.useMemo(() => /* @__PURE__ */ jsxRuntime.jsx("div", {
2796
+ return React27.useMemo(() => /* @__PURE__ */ jsxRuntime.jsx("div", {
2422
2797
  className: prefixCls + "-pointer " + (className || ""),
2423
2798
  style,
2424
2799
  children: /* @__PURE__ */ jsxRuntime.jsx("div", {
@@ -2428,7 +2803,7 @@ var Pointer = (_ref) => {
2428
2803
  }), [top, left, color2, className, prefixCls]);
2429
2804
  };
2430
2805
  var _excluded2 = ["prefixCls", "radius", "pointer", "className", "hue", "style", "hsva", "onChange"];
2431
- var Saturation = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref) => {
2806
+ var Saturation = /* @__PURE__ */ React27__namespace.default.forwardRef((props, ref) => {
2432
2807
  var _hsva$h;
2433
2808
  var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-saturation" : _props$prefixCls, _props$radius = props.radius, radius = _props$radius === void 0 ? 0 : _props$radius, pointer = props.pointer, className = props.className, _props$hue = props.hue, hue = _props$hue === void 0 ? 0 : _props$hue, style = props.style, hsva = props.hsva, onChange = props.onChange, other = (0, import_objectWithoutPropertiesLoose2.default)(props, _excluded2);
2434
2809
  var containerStyle = (0, import_extends3.default)({
@@ -2438,8 +2813,8 @@ var Saturation = /* @__PURE__ */ React26__namespace.default.forwardRef((props, r
2438
2813
  }, style, {
2439
2814
  position: "relative"
2440
2815
  });
2441
- var containerRef = React26.useRef(null);
2442
- var combinedRef = React26.useCallback((node) => {
2816
+ var containerRef = React27.useRef(null);
2817
+ var combinedRef = React27.useCallback((node) => {
2443
2818
  containerRef.current = node;
2444
2819
  if (typeof ref === "function") {
2445
2820
  ref(node);
@@ -2447,7 +2822,7 @@ var Saturation = /* @__PURE__ */ React26__namespace.default.forwardRef((props, r
2447
2822
  ref.current = node;
2448
2823
  }
2449
2824
  }, [ref]);
2450
- var handleChange = React26.useCallback((interaction, event) => {
2825
+ var handleChange = React27.useCallback((interaction, event) => {
2451
2826
  onChange && hsva && onChange({
2452
2827
  h: hsva.h,
2453
2828
  s: interaction.left * 100,
@@ -2460,7 +2835,7 @@ var Saturation = /* @__PURE__ */ React26__namespace.default.forwardRef((props, r
2460
2835
  element.focus();
2461
2836
  }
2462
2837
  }, [hsva, onChange]);
2463
- var handleKeyDown = React26.useCallback((event) => {
2838
+ var handleKeyDown = React27.useCallback((event) => {
2464
2839
  if (!hsva || !onChange) return;
2465
2840
  var step = 1;
2466
2841
  var newS = hsva.s;
@@ -2499,7 +2874,7 @@ var Saturation = /* @__PURE__ */ React26__namespace.default.forwardRef((props, r
2499
2874
  });
2500
2875
  }
2501
2876
  }, [hsva, onChange]);
2502
- var pointerElement = React26.useMemo(() => {
2877
+ var pointerElement = React27.useMemo(() => {
2503
2878
  if (!hsva) return null;
2504
2879
  var comProps = {
2505
2880
  top: 100 - hsva.v + "%",
@@ -2515,7 +2890,7 @@ var Saturation = /* @__PURE__ */ React26__namespace.default.forwardRef((props, r
2515
2890
  prefixCls
2516
2891
  }, comProps));
2517
2892
  }, [hsva, pointer, prefixCls]);
2518
- var handleClick = React26.useCallback((event) => {
2893
+ var handleClick = React27.useCallback((event) => {
2519
2894
  event.target.focus();
2520
2895
  }, []);
2521
2896
  return /* @__PURE__ */ jsxRuntime.jsx(esm_default, (0, import_extends3.default)({
@@ -2577,16 +2952,16 @@ var Pointer2 = (_ref) => {
2577
2952
  };
2578
2953
  var _excluded4 = ["prefixCls", "className", "hsva", "background", "bgProps", "innerProps", "pointerProps", "radius", "width", "height", "direction", "reverse", "style", "onChange", "pointer"];
2579
2954
  var BACKGROUND_IMG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==";
2580
- var Alpha = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref) => {
2955
+ var Alpha = /* @__PURE__ */ React27__namespace.default.forwardRef((props, ref) => {
2581
2956
  var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-alpha" : _props$prefixCls, className = props.className, hsva = props.hsva, background = props.background, _props$bgProps = props.bgProps, bgProps = _props$bgProps === void 0 ? {} : _props$bgProps, _props$innerProps = props.innerProps, innerProps = _props$innerProps === void 0 ? {} : _props$innerProps, _props$pointerProps = props.pointerProps, pointerProps = _props$pointerProps === void 0 ? {} : _props$pointerProps, _props$radius = props.radius, radius = _props$radius === void 0 ? 0 : _props$radius, width = props.width, _props$height = props.height, height = _props$height === void 0 ? 16 : _props$height, _props$direction = props.direction, direction = _props$direction === void 0 ? "horizontal" : _props$direction, _props$reverse = props.reverse, reverse = _props$reverse === void 0 ? false : _props$reverse, style = props.style, onChange = props.onChange, pointer = props.pointer, other = (0, import_objectWithoutPropertiesLoose4.default)(props, _excluded4);
2582
- var offsetToAlpha = React26.useCallback((offset) => {
2957
+ var offsetToAlpha = React27.useCallback((offset) => {
2583
2958
  var value = direction === "horizontal" ? offset.left : offset.top;
2584
2959
  if (direction === "horizontal") {
2585
2960
  return reverse ? 1 - value : value;
2586
2961
  }
2587
2962
  return reverse ? value : 1 - value;
2588
2963
  }, [direction, reverse]);
2589
- var alphaToOffset = React26.useCallback((alpha) => {
2964
+ var alphaToOffset = React27.useCallback((alpha) => {
2590
2965
  if (direction === "horizontal") {
2591
2966
  return reverse ? 1 - alpha : alpha;
2592
2967
  }
@@ -2623,7 +2998,7 @@ var Alpha = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref) =
2623
2998
  }, style, {
2624
2999
  position: "relative"
2625
3000
  });
2626
- var handleKeyDown = React26.useCallback((event) => {
3001
+ var handleKeyDown = React27.useCallback((event) => {
2627
3002
  var step = 0.01;
2628
3003
  var currentAlpha = hsva.a;
2629
3004
  var newAlpha = currentAlpha;
@@ -2670,7 +3045,7 @@ var Alpha = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref) =
2670
3045
  }), syntheticOffset);
2671
3046
  }
2672
3047
  }, [alphaToOffset, hsva, direction, onChange, reverse]);
2673
- var handleClick = React26.useCallback((event) => {
3048
+ var handleClick = React27.useCallback((event) => {
2674
3049
  event.target.focus();
2675
3050
  }, []);
2676
3051
  var pointerElement = pointer && typeof pointer === "function" ? pointer((0, import_extends5.default)({
@@ -2713,13 +3088,13 @@ var import_objectWithoutPropertiesLoose5 = __toESM(require_objectWithoutProperti
2713
3088
  var _excluded5 = ["prefixCls", "placement", "label", "value", "className", "style", "labelStyle", "inputStyle", "onChange", "onBlur", "renderInput"];
2714
3089
  var validHex2 = (hex) => /^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);
2715
3090
  var getNumberValue = (value) => Number(String(value).replace(/%/g, ""));
2716
- var EditableInput = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref) => {
3091
+ var EditableInput = /* @__PURE__ */ React27__namespace.default.forwardRef((props, ref) => {
2717
3092
  var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-editable-input" : _props$prefixCls, _props$placement = props.placement, placement = _props$placement === void 0 ? "bottom" : _props$placement, label = props.label, initValue = props.value, className = props.className, style = props.style, labelStyle = props.labelStyle, inputStyle = props.inputStyle, onChange = props.onChange, onBlur = props.onBlur, renderInput = props.renderInput, other = (0, import_objectWithoutPropertiesLoose5.default)(props, _excluded5);
2718
- var _useState = React26.useState(initValue), value = _useState[0], setValue = _useState[1];
2719
- var isFocus = React26.useRef(false);
2720
- var inputIdRef = React26.useRef(other.id || prefixCls + "-" + Math.random().toString(36).slice(2, 11));
3093
+ var _useState = React27.useState(initValue), value = _useState[0], setValue = _useState[1];
3094
+ var isFocus = React27.useRef(false);
3095
+ var inputIdRef = React27.useRef(other.id || prefixCls + "-" + Math.random().toString(36).slice(2, 11));
2721
3096
  var inputId = other.id || inputIdRef.current;
2722
- React26.useEffect(() => {
3097
+ React27.useEffect(() => {
2723
3098
  if (props.value !== value) {
2724
3099
  if (!isFocus.current) {
2725
3100
  setValue(props.value);
@@ -2810,7 +3185,7 @@ var esm_default4 = EditableInput;
2810
3185
  var import_extends7 = __toESM(require_extends());
2811
3186
  var import_objectWithoutPropertiesLoose6 = __toESM(require_objectWithoutPropertiesLoose());
2812
3187
  var _excluded6 = ["prefixCls", "hsva", "placement", "rProps", "gProps", "bProps", "aProps", "className", "style", "onChange"];
2813
- var EditableInputRGBA = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref) => {
3188
+ var EditableInputRGBA = /* @__PURE__ */ React27__namespace.default.forwardRef((props, ref) => {
2814
3189
  var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-editable-input-rgba" : _props$prefixCls, hsva = props.hsva, _props$placement = props.placement, placement = _props$placement === void 0 ? "bottom" : _props$placement, _props$rProps = props.rProps, rProps = _props$rProps === void 0 ? {} : _props$rProps, _props$gProps = props.gProps, gProps = _props$gProps === void 0 ? {} : _props$gProps, _props$bProps = props.bProps, bProps = _props$bProps === void 0 ? {} : _props$bProps, _props$aProps = props.aProps, aProps = _props$aProps === void 0 ? {} : _props$aProps, className = props.className, style = props.style, onChange = props.onChange, other = (0, import_objectWithoutPropertiesLoose6.default)(props, _excluded6);
2815
3190
  var rgba = hsva ? hsvaToRgba(hsva) : {};
2816
3191
  function handleBlur(evn) {
@@ -2924,9 +3299,9 @@ var import_objectWithoutPropertiesLoose7 = __toESM(require_objectWithoutProperti
2924
3299
  var _excluded7 = ["prefixCls", "className", "hue", "onChange", "direction", "reverse"];
2925
3300
  var NORMAL_COLORS = "rgb(255, 0, 0) 0%, rgb(255, 255, 0) 17%, rgb(0, 255, 0) 33%, rgb(0, 255, 255) 50%, rgb(0, 0, 255) 67%, rgb(255, 0, 255) 83%, rgb(255, 0, 0) 100%";
2926
3301
  var REVERSED_COLORS = "rgb(255, 0, 0) 0%, rgb(255, 0, 255) 17%, rgb(0, 0, 255) 33%, rgb(0, 255, 255) 50%, rgb(0, 255, 0) 67%, rgb(255, 255, 0) 83%, rgb(255, 0, 0) 100%";
2927
- var Hue = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref) => {
3302
+ var Hue = /* @__PURE__ */ React27__namespace.default.forwardRef((props, ref) => {
2928
3303
  var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-hue" : _props$prefixCls, className = props.className, _props$hue = props.hue, hue = _props$hue === void 0 ? 0 : _props$hue, _onChange = props.onChange, _props$direction = props.direction, direction = _props$direction === void 0 ? "horizontal" : _props$direction, _props$reverse = props.reverse, reverse = _props$reverse === void 0 ? false : _props$reverse, other = (0, import_objectWithoutPropertiesLoose7.default)(props, _excluded7);
2929
- var getGradientBackground = React26.useCallback(() => {
3304
+ var getGradientBackground = React27.useCallback(() => {
2930
3305
  if (direction === "horizontal") {
2931
3306
  var colors = reverse ? REVERSED_COLORS : NORMAL_COLORS;
2932
3307
  var gradientDirection = "right";
@@ -2937,7 +3312,7 @@ var Hue = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref) =>
2937
3312
  return "linear-gradient(to " + _gradientDirection + ", " + _colors + ")";
2938
3313
  }
2939
3314
  }, [direction, reverse]);
2940
- var getHueFromInteraction = React26.useCallback((interaction) => {
3315
+ var getHueFromInteraction = React27.useCallback((interaction) => {
2941
3316
  var value = direction === "horizontal" ? interaction.left : interaction.top;
2942
3317
  var normalizedValue;
2943
3318
  if (direction === "horizontal") {
@@ -2947,7 +3322,7 @@ var Hue = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref) =>
2947
3322
  }
2948
3323
  return 360 * normalizedValue;
2949
3324
  }, [direction, reverse]);
2950
- var gradientBackground = React26.useMemo(() => getGradientBackground(), [getGradientBackground]);
3325
+ var gradientBackground = React27.useMemo(() => getGradientBackground(), [getGradientBackground]);
2951
3326
  return /* @__PURE__ */ jsxRuntime.jsx(esm_default3, (0, import_extends8.default)({
2952
3327
  ref,
2953
3328
  className: prefixCls + " " + (className || "")
@@ -2975,7 +3350,7 @@ var esm_default6 = Hue;
2975
3350
  var import_extends9 = __toESM(require_extends());
2976
3351
  var import_objectWithoutPropertiesLoose8 = __toESM(require_objectWithoutPropertiesLoose());
2977
3352
  var _excluded8 = ["prefixCls", "className", "color", "colors", "style", "rectProps", "onChange", "addonAfter", "addonBefore", "rectRender"];
2978
- var Swatch = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref) => {
3353
+ var Swatch = /* @__PURE__ */ React27__namespace.default.forwardRef((props, ref) => {
2979
3354
  var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-swatch" : _props$prefixCls, className = props.className, color2 = props.color, _props$colors = props.colors, colors = _props$colors === void 0 ? [] : _props$colors, style = props.style, _props$rectProps = props.rectProps, rectProps = _props$rectProps === void 0 ? {} : _props$rectProps, onChange = props.onChange, addonAfter = props.addonAfter, addonBefore = props.addonBefore, rectRender = props.rectRender, other = (0, import_objectWithoutPropertiesLoose8.default)(props, _excluded8);
2980
3355
  var rectStyle = (0, import_extends9.default)({
2981
3356
  "--swatch-background-color": "rgb(144, 19, 254)",
@@ -3001,7 +3376,7 @@ var Swatch = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref)
3001
3376
  flexWrap: "wrap",
3002
3377
  position: "relative"
3003
3378
  }, style),
3004
- children: [addonBefore && /* @__PURE__ */ React26__namespace.default.isValidElement(addonBefore) && addonBefore, colors && Array.isArray(colors) && colors.map((item, idx) => {
3379
+ children: [addonBefore && /* @__PURE__ */ React27__namespace.default.isValidElement(addonBefore) && addonBefore, colors && Array.isArray(colors) && colors.map((item, idx) => {
3005
3380
  var title = "";
3006
3381
  var background = "";
3007
3382
  if (typeof item === "string") {
@@ -3023,11 +3398,11 @@ var Swatch = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref)
3023
3398
  onClick: (evn) => handleClick(background, evn)
3024
3399
  });
3025
3400
  if (render) {
3026
- return /* @__PURE__ */ jsxRuntime.jsx(React26.Fragment, {
3401
+ return /* @__PURE__ */ jsxRuntime.jsx(React27.Fragment, {
3027
3402
  children: render
3028
3403
  }, idx);
3029
3404
  }
3030
- var child = rectProps.children && /* @__PURE__ */ React26__namespace.default.isValidElement(rectProps.children) ? /* @__PURE__ */ React26__namespace.default.cloneElement(rectProps.children, {
3405
+ var child = rectProps.children && /* @__PURE__ */ React27__namespace.default.isValidElement(rectProps.children) ? /* @__PURE__ */ React27__namespace.default.cloneElement(rectProps.children, {
3031
3406
  color: background,
3032
3407
  checked
3033
3408
  }) : null;
@@ -3041,7 +3416,7 @@ var Swatch = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref)
3041
3416
  background
3042
3417
  })
3043
3418
  }), idx);
3044
- }), addonAfter && /* @__PURE__ */ React26__namespace.default.isValidElement(addonAfter) && addonAfter]
3419
+ }), addonAfter && /* @__PURE__ */ React27__namespace.default.isValidElement(addonAfter) && addonAfter]
3045
3420
  }));
3046
3421
  });
3047
3422
  Swatch.displayName = "Swatch";
@@ -3060,15 +3435,15 @@ var Bar = (props) => /* @__PURE__ */ jsxRuntime.jsx("div", {
3060
3435
  backgroundColor: "#fff"
3061
3436
  }
3062
3437
  });
3063
- var Sketch = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref) => {
3438
+ var Sketch = /* @__PURE__ */ React27__namespace.default.forwardRef((props, ref) => {
3064
3439
  var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-sketch" : _props$prefixCls, className = props.className, onChange = props.onChange, _props$width = props.width, width = _props$width === void 0 ? 218 : _props$width, _props$presetColors = props.presetColors, presetColors = _props$presetColors === void 0 ? PRESET_COLORS : _props$presetColors, color2 = props.color, _props$editableDisabl = props.editableDisable, editableDisable = _props$editableDisabl === void 0 ? true : _props$editableDisabl, _props$disableAlpha = props.disableAlpha, disableAlpha = _props$disableAlpha === void 0 ? false : _props$disableAlpha, style = props.style, other = (0, import_objectWithoutPropertiesLoose9.default)(props, _excluded9);
3065
- var _useState = React26.useState({
3440
+ var _useState = React27.useState({
3066
3441
  h: 209,
3067
3442
  s: 36,
3068
3443
  v: 90,
3069
3444
  a: 1
3070
3445
  }), hsva = _useState[0], setHsva = _useState[1];
3071
- React26.useEffect(() => {
3446
+ React27.useEffect(() => {
3072
3447
  if (typeof color2 === "string" && validHex(color2)) {
3073
3448
  setHsva(hexToHsva(color2));
3074
3449
  }
@@ -3186,7 +3561,7 @@ var Sketch = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref)
3186
3561
  innerProps: {
3187
3562
  style: styleAlpha
3188
3563
  },
3189
- pointer: () => /* @__PURE__ */ jsxRuntime.jsx(React26.Fragment, {})
3564
+ pointer: () => /* @__PURE__ */ jsxRuntime.jsx(React27.Fragment, {})
3190
3565
  })]
3191
3566
  })]
3192
3567
  }), editableDisable && /* @__PURE__ */ jsxRuntime.jsxs("div", {
@@ -3329,19 +3704,19 @@ var Toolbar = ({
3329
3704
  toolbar,
3330
3705
  font_families
3331
3706
  }) => {
3332
- const [link_url, set_link_url] = React26__namespace.useState("https://");
3333
- const [link_popover_open, set_link_popover_open] = React26__namespace.useState(false);
3334
- const [text_color_open, set_text_color_open] = React26__namespace.useState(false);
3335
- const [highlight_color_open, set_highlight_color_open] = React26__namespace.useState(false);
3336
- const [variables_menu_open, set_variables_menu_open] = React26__namespace.useState(false);
3337
- const [table_menu_open, set_table_menu_open] = React26__namespace.useState(false);
3338
- const [text_color, set_text_color] = React26__namespace.useState("#000000");
3339
- const [highlight_color, set_highlight_color] = React26__namespace.useState("#ffff00");
3340
- const [table_rows, set_table_rows] = React26__namespace.useState(3);
3341
- const [table_cols, set_table_cols] = React26__namespace.useState(3);
3342
- const [hovered_cell, set_hovered_cell] = React26__namespace.useState(null);
3343
- const file_input_ref = React26__namespace.useRef(null);
3344
- const image_input_ref = React26__namespace.useRef(null);
3707
+ const [link_url, set_link_url] = React27__namespace.useState("https://");
3708
+ const [link_popover_open, set_link_popover_open] = React27__namespace.useState(false);
3709
+ const [text_color_open, set_text_color_open] = React27__namespace.useState(false);
3710
+ const [highlight_color_open, set_highlight_color_open] = React27__namespace.useState(false);
3711
+ const [variables_menu_open, set_variables_menu_open] = React27__namespace.useState(false);
3712
+ const [table_menu_open, set_table_menu_open] = React27__namespace.useState(false);
3713
+ const [text_color, set_text_color] = React27__namespace.useState("#000000");
3714
+ const [highlight_color, set_highlight_color] = React27__namespace.useState("#ffff00");
3715
+ const [table_rows, set_table_rows] = React27__namespace.useState(3);
3716
+ const [table_cols, set_table_cols] = React27__namespace.useState(3);
3717
+ const [hovered_cell, set_hovered_cell] = React27__namespace.useState(null);
3718
+ const file_input_ref = React27__namespace.useRef(null);
3719
+ const image_input_ref = React27__namespace.useRef(null);
3345
3720
  if (!editor) {
3346
3721
  return null;
3347
3722
  }
@@ -4155,7 +4530,7 @@ var Toolbar = ({
4155
4530
  disabled && "opacity-50 pointer-events-none"
4156
4531
  ),
4157
4532
  children: [
4158
- sections.map((items, i) => /* @__PURE__ */ jsxRuntime.jsxs(React26__namespace.Fragment, { children: [
4533
+ sections.map((items, i) => /* @__PURE__ */ jsxRuntime.jsxs(React27__namespace.Fragment, { children: [
4159
4534
  i > 0 && /* @__PURE__ */ jsxRuntime.jsx(ToolbarSeparator, {}),
4160
4535
  items
4161
4536
  ] }, i)),
@@ -4407,43 +4782,6 @@ var VariableExtension = core.Node.create({
4407
4782
  };
4408
4783
  }
4409
4784
  });
4410
- var Tabs = TabsPrimitive__namespace.Root;
4411
- var TabsList = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
4412
- TabsPrimitive__namespace.List,
4413
- {
4414
- ref,
4415
- className: cn(
4416
- "inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
4417
- className
4418
- ),
4419
- ...props
4420
- }
4421
- ));
4422
- TabsList.displayName = TabsPrimitive__namespace.List.displayName;
4423
- var TabsTrigger = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
4424
- TabsPrimitive__namespace.Trigger,
4425
- {
4426
- ref,
4427
- className: cn(
4428
- "inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
4429
- className
4430
- ),
4431
- ...props
4432
- }
4433
- ));
4434
- TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
4435
- var TabsContent = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
4436
- TabsPrimitive__namespace.Content,
4437
- {
4438
- ref,
4439
- className: cn(
4440
- "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
4441
- className
4442
- ),
4443
- ...props
4444
- }
4445
- ));
4446
- TabsContent.displayName = TabsPrimitive__namespace.Content.displayName;
4447
4785
  function debounce_fn(func, wait) {
4448
4786
  let timeout_id = null;
4449
4787
  return (output) => {
@@ -4469,14 +4807,14 @@ var HazoUiRte = ({
4469
4807
  toolbar,
4470
4808
  font_families
4471
4809
  }) => {
4472
- const [attachments, set_attachments] = React26__namespace.useState(
4810
+ const [attachments, set_attachments] = React27__namespace.useState(
4473
4811
  initial_attachments
4474
4812
  );
4475
- const [active_tab, set_active_tab] = React26__namespace.useState("html");
4813
+ const [active_tab, set_active_tab] = React27__namespace.useState("html");
4476
4814
  const is_view_only = active_tab !== "html";
4477
- const attachments_ref = React26__namespace.useRef(attachments);
4815
+ const attachments_ref = React27__namespace.useRef(attachments);
4478
4816
  attachments_ref.current = attachments;
4479
- const debounced_on_change = React26__namespace.useMemo(
4817
+ const debounced_on_change = React27__namespace.useMemo(
4480
4818
  () => debounce_fn((output) => {
4481
4819
  if (on_change) {
4482
4820
  on_change(output);
@@ -4575,7 +4913,7 @@ var HazoUiRte = ({
4575
4913
  debounced_on_change(output);
4576
4914
  }
4577
4915
  });
4578
- React26__namespace.useEffect(() => {
4916
+ React27__namespace.useEffect(() => {
4579
4917
  if (editor && html !== void 0) {
4580
4918
  const current_html = editor.getHTML();
4581
4919
  if (html !== current_html && !editor.isFocused) {
@@ -4583,21 +4921,21 @@ var HazoUiRte = ({
4583
4921
  }
4584
4922
  }
4585
4923
  }, [html, editor]);
4586
- React26__namespace.useEffect(() => {
4924
+ React27__namespace.useEffect(() => {
4587
4925
  if (editor) {
4588
4926
  editor.setEditable(!disabled);
4589
4927
  }
4590
4928
  }, [disabled, editor]);
4591
- const attachments_from_props_ref = React26__namespace.useRef(false);
4592
- const prev_initial_attachments_ref = React26__namespace.useRef(initial_attachments);
4593
- React26__namespace.useEffect(() => {
4929
+ const attachments_from_props_ref = React27__namespace.useRef(false);
4930
+ const prev_initial_attachments_ref = React27__namespace.useRef(initial_attachments);
4931
+ React27__namespace.useEffect(() => {
4594
4932
  if (JSON.stringify(initial_attachments) !== JSON.stringify(prev_initial_attachments_ref.current)) {
4595
4933
  prev_initial_attachments_ref.current = initial_attachments;
4596
4934
  attachments_from_props_ref.current = true;
4597
4935
  set_attachments(initial_attachments);
4598
4936
  }
4599
4937
  }, [initial_attachments]);
4600
- React26__namespace.useEffect(() => {
4938
+ React27__namespace.useEffect(() => {
4601
4939
  if (attachments_from_props_ref.current) {
4602
4940
  attachments_from_props_ref.current = false;
4603
4941
  return;
@@ -4843,7 +5181,7 @@ function CanvasTextToolbar({
4843
5181
  }
4844
5182
  ) });
4845
5183
  }
4846
- var MdEditorLazy = React26.lazy(() => import('@uiw/react-md-editor'));
5184
+ var MdEditorLazy = React27.lazy(() => import('@uiw/react-md-editor'));
4847
5185
  var EDITOR_TEXTAREA_SELECTOR = ".w-md-editor-text-input";
4848
5186
  function MarkdownEditor({
4849
5187
  value,
@@ -4859,13 +5197,13 @@ function MarkdownEditor({
4859
5197
  renderPreview,
4860
5198
  showPreview = true
4861
5199
  }) {
4862
- const [mounted, setMounted] = React26.useState(false);
4863
- React26.useEffect(() => setMounted(true), []);
4864
- const valueRef = React26.useRef(value);
5200
+ const [mounted, setMounted] = React27.useState(false);
5201
+ React27.useEffect(() => setMounted(true), []);
5202
+ const valueRef = React27.useRef(value);
4865
5203
  valueRef.current = value;
4866
- const wrapperRef = React26.useRef(null);
4867
- const [uploading, setUploading] = React26.useState(false);
4868
- const [error, setError] = React26.useState("");
5204
+ const wrapperRef = React27.useRef(null);
5205
+ const [uploading, setUploading] = React27.useState(false);
5206
+ const [error, setError] = React27.useState("");
4869
5207
  function insertAtCursor(text) {
4870
5208
  const textarea = wrapperRef.current?.querySelector(
4871
5209
  EDITOR_TEXTAREA_SELECTOR
@@ -4880,7 +5218,7 @@ function MarkdownEditor({
4880
5218
  const end = textarea.selectionEnd ?? start;
4881
5219
  onChange(current.slice(0, start) + text + current.slice(end));
4882
5220
  }
4883
- const embedCommands = React26.useMemo(() => {
5221
+ const embedCommands = React27.useMemo(() => {
4884
5222
  return (embeds ?? []).map((embed) => ({
4885
5223
  name: embed.name,
4886
5224
  keyCommand: embed.name,
@@ -4899,7 +5237,7 @@ function MarkdownEditor({
4899
5237
  }
4900
5238
  }));
4901
5239
  }, [embeds]);
4902
- const editorCommands = React26.useMemo(() => {
5240
+ const editorCommands = React27.useMemo(() => {
4903
5241
  const defaults = reactMdEditor.commands.getCommands();
4904
5242
  const extras = [...embedCommands, ...extraCommands ?? []];
4905
5243
  if (extras.length === 0) return defaults;
@@ -4955,7 +5293,7 @@ function MarkdownEditor({
4955
5293
  ref: wrapperRef,
4956
5294
  children: [
4957
5295
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: useCustomPreview && showPreview ? "flex-1 min-w-0" : "w-full", children: mounted ? /* @__PURE__ */ jsxRuntime.jsx(
4958
- React26.Suspense,
5296
+ React27.Suspense,
4959
5297
  {
4960
5298
  fallback: /* @__PURE__ */ jsxRuntime.jsx(
4961
5299
  "div",
@@ -5410,12 +5748,12 @@ var CommandPopover = ({
5410
5748
  on_selection_change: _on_selection_change,
5411
5749
  prefix_color
5412
5750
  }) => {
5413
- const container_ref = React26__namespace.useRef(null);
5414
- const grouped_commands = React26__namespace.useMemo(
5751
+ const container_ref = React27__namespace.useRef(null);
5752
+ const grouped_commands = React27__namespace.useMemo(
5415
5753
  () => group_commands(commands),
5416
5754
  [commands]
5417
5755
  );
5418
- React26__namespace.useEffect(() => {
5756
+ React27__namespace.useEffect(() => {
5419
5757
  const handle_click_outside = (e) => {
5420
5758
  if (container_ref.current && !container_ref.current.contains(e.target)) {
5421
5759
  on_close();
@@ -5428,8 +5766,8 @@ var CommandPopover = ({
5428
5766
  };
5429
5767
  }
5430
5768
  }, [is_open, on_close]);
5431
- const [mounted, set_mounted] = React26__namespace.useState(false);
5432
- React26__namespace.useEffect(() => {
5769
+ const [mounted, set_mounted] = React27__namespace.useState(false);
5770
+ React27__namespace.useEffect(() => {
5433
5771
  set_mounted(true);
5434
5772
  }, []);
5435
5773
  if (!is_open || !mounted) return null;
@@ -5739,21 +6077,21 @@ var HazoUiTextbox = ({
5739
6077
  on_command_change,
5740
6078
  on_command_remove
5741
6079
  }) => {
5742
- const generated_instance_id = React26__namespace.useId();
6080
+ const generated_instance_id = React27__namespace.useId();
5743
6081
  const instance_id = provided_instance_id || generated_instance_id;
5744
- const [suggestion_state, set_suggestion_state] = React26__namespace.useState(null);
5745
- const [selected_index, set_selected_index] = React26__namespace.useState(0);
5746
- const [popover_position, set_popover_position] = React26__namespace.useState({ top: 0, left: 0 });
5747
- const [edit_context, set_edit_context] = React26__namespace.useState(null);
5748
- const [edit_selected_index, set_edit_selected_index] = React26__namespace.useState(0);
6082
+ const [suggestion_state, set_suggestion_state] = React27__namespace.useState(null);
6083
+ const [selected_index, set_selected_index] = React27__namespace.useState(0);
6084
+ const [popover_position, set_popover_position] = React27__namespace.useState({ top: 0, left: 0 });
6085
+ const [edit_context, set_edit_context] = React27__namespace.useState(null);
6086
+ const [edit_selected_index, set_edit_selected_index] = React27__namespace.useState(0);
5749
6087
  const is_controlled = value !== void 0;
5750
- const editor_container_ref = React26__namespace.useRef(null);
5751
- const edit_popover_ref = React26__namespace.useRef(null);
5752
- const [mounted, set_mounted] = React26__namespace.useState(false);
5753
- React26__namespace.useEffect(() => {
6088
+ const editor_container_ref = React27__namespace.useRef(null);
6089
+ const edit_popover_ref = React27__namespace.useRef(null);
6090
+ const [mounted, set_mounted] = React27__namespace.useState(false);
6091
+ React27__namespace.useEffect(() => {
5754
6092
  set_mounted(true);
5755
6093
  }, []);
5756
- const suggestion_extensions = React26__namespace.useMemo(() => {
6094
+ const suggestion_extensions = React27__namespace.useMemo(() => {
5757
6095
  return create_command_suggestion_extension({
5758
6096
  prefixes,
5759
6097
  instance_id,
@@ -5804,7 +6142,7 @@ var HazoUiTextbox = ({
5804
6142
  }
5805
6143
  }
5806
6144
  });
5807
- React26__namespace.useEffect(() => {
6145
+ React27__namespace.useEffect(() => {
5808
6146
  if (suggestion_state?.is_active && editor) {
5809
6147
  requestAnimationFrame(() => {
5810
6148
  const { from } = suggestion_state.range;
@@ -5828,7 +6166,7 @@ var HazoUiTextbox = ({
5828
6166
  });
5829
6167
  }
5830
6168
  }, [suggestion_state, editor]);
5831
- React26__namespace.useEffect(() => {
6169
+ React27__namespace.useEffect(() => {
5832
6170
  if (is_controlled && editor && !editor.isFocused) {
5833
6171
  const current_text = editor.getText();
5834
6172
  if (value !== current_text) {
@@ -5837,12 +6175,12 @@ var HazoUiTextbox = ({
5837
6175
  }
5838
6176
  }
5839
6177
  }, [value, editor, is_controlled, prefixes, pill_variant]);
5840
- React26__namespace.useEffect(() => {
6178
+ React27__namespace.useEffect(() => {
5841
6179
  if (editor) {
5842
6180
  editor.setEditable(!disabled);
5843
6181
  }
5844
6182
  }, [disabled, editor]);
5845
- const handle_command_select = React26__namespace.useCallback(
6183
+ const handle_command_select = React27__namespace.useCallback(
5846
6184
  (command) => {
5847
6185
  if (!editor || !suggestion_state) return;
5848
6186
  const prefix_config = prefixes.find((p) => p.char === suggestion_state.prefix);
@@ -5862,15 +6200,15 @@ var HazoUiTextbox = ({
5862
6200
  },
5863
6201
  [editor, suggestion_state, pill_variant, on_command_insert, prefixes]
5864
6202
  );
5865
- const handle_popover_close = React26__namespace.useCallback(() => {
6203
+ const handle_popover_close = React27__namespace.useCallback(() => {
5866
6204
  set_suggestion_state(null);
5867
6205
  editor?.commands.focus();
5868
6206
  }, [editor]);
5869
- const handle_edit_close = React26__namespace.useCallback(() => {
6207
+ const handle_edit_close = React27__namespace.useCallback(() => {
5870
6208
  set_edit_context(null);
5871
6209
  editor?.commands.focus();
5872
6210
  }, [editor]);
5873
- const handle_command_update = React26__namespace.useCallback(
6211
+ const handle_command_update = React27__namespace.useCallback(
5874
6212
  (new_command) => {
5875
6213
  if (!editor || !edit_context) return;
5876
6214
  const old_command = edit_context.command;
@@ -5886,7 +6224,7 @@ var HazoUiTextbox = ({
5886
6224
  },
5887
6225
  [editor, edit_context, on_command_change]
5888
6226
  );
5889
- const handle_command_remove = React26__namespace.useCallback(() => {
6227
+ const handle_command_remove = React27__namespace.useCallback(() => {
5890
6228
  if (!editor || !edit_context) return;
5891
6229
  const command = edit_context.command;
5892
6230
  editor.state.doc.descendants((node, pos) => {
@@ -5900,7 +6238,7 @@ var HazoUiTextbox = ({
5900
6238
  }
5901
6239
  set_edit_context(null);
5902
6240
  }, [editor, edit_context, on_command_remove]);
5903
- const filtered_commands = React26__namespace.useMemo(() => {
6241
+ const filtered_commands = React27__namespace.useMemo(() => {
5904
6242
  if (!suggestion_state) return [];
5905
6243
  const query = suggestion_state.query.toLowerCase();
5906
6244
  if (!query) return suggestion_state.commands;
@@ -5908,7 +6246,7 @@ var HazoUiTextbox = ({
5908
6246
  (cmd) => cmd.action_label.toLowerCase().includes(query) || cmd.action.toLowerCase().includes(query) || cmd.action_description?.toLowerCase().includes(query)
5909
6247
  );
5910
6248
  }, [suggestion_state]);
5911
- React26__namespace.useEffect(() => {
6249
+ React27__namespace.useEffect(() => {
5912
6250
  if (!suggestion_state?.is_active) return;
5913
6251
  const handle_keydown = (e) => {
5914
6252
  switch (e.key) {
@@ -5943,7 +6281,7 @@ var HazoUiTextbox = ({
5943
6281
  handle_command_select,
5944
6282
  handle_popover_close
5945
6283
  ]);
5946
- React26__namespace.useEffect(() => {
6284
+ React27__namespace.useEffect(() => {
5947
6285
  if (!edit_context) return;
5948
6286
  const handle_click_outside = (e) => {
5949
6287
  if (edit_popover_ref.current && !edit_popover_ref.current.contains(e.target)) {
@@ -5958,12 +6296,12 @@ var HazoUiTextbox = ({
5958
6296
  document.removeEventListener("mousedown", handle_click_outside);
5959
6297
  };
5960
6298
  }, [edit_context]);
5961
- const edit_commands = React26__namespace.useMemo(() => {
6299
+ const edit_commands = React27__namespace.useMemo(() => {
5962
6300
  if (!edit_context) return [];
5963
6301
  const prefix_config = prefixes.find((p) => p.char === edit_context.command.prefix);
5964
6302
  return prefix_config?.commands || [];
5965
6303
  }, [edit_context, prefixes]);
5966
- React26__namespace.useEffect(() => {
6304
+ React27__namespace.useEffect(() => {
5967
6305
  if (!edit_context) return;
5968
6306
  const handle_keydown = (e) => {
5969
6307
  switch (e.key) {
@@ -6001,7 +6339,7 @@ var HazoUiTextbox = ({
6001
6339
  handle_command_remove,
6002
6340
  handle_edit_close
6003
6341
  ]);
6004
- React26__namespace.useEffect(() => {
6342
+ React27__namespace.useEffect(() => {
6005
6343
  const handle_pill_click = (e) => {
6006
6344
  const detail = e.detail;
6007
6345
  const { id, prefix, action, action_label, node_pos } = detail;
@@ -6286,22 +6624,22 @@ var HazoUiTextarea = ({
6286
6624
  on_command_change,
6287
6625
  on_command_remove
6288
6626
  }) => {
6289
- const generated_instance_id = React26__namespace.useId();
6627
+ const generated_instance_id = React27__namespace.useId();
6290
6628
  const instance_id = provided_instance_id || generated_instance_id;
6291
- const [suggestion_state, set_suggestion_state] = React26__namespace.useState(null);
6292
- const [selected_index, set_selected_index] = React26__namespace.useState(0);
6293
- const [popover_position, set_popover_position] = React26__namespace.useState({ top: 0, left: 0 });
6294
- const [edit_context, set_edit_context] = React26__namespace.useState(null);
6295
- const [edit_selected_index, set_edit_selected_index] = React26__namespace.useState(0);
6629
+ const [suggestion_state, set_suggestion_state] = React27__namespace.useState(null);
6630
+ const [selected_index, set_selected_index] = React27__namespace.useState(0);
6631
+ const [popover_position, set_popover_position] = React27__namespace.useState({ top: 0, left: 0 });
6632
+ const [edit_context, set_edit_context] = React27__namespace.useState(null);
6633
+ const [edit_selected_index, set_edit_selected_index] = React27__namespace.useState(0);
6296
6634
  const is_controlled = value !== void 0;
6297
- const editor_container_ref = React26__namespace.useRef(null);
6298
- const edit_popover_ref = React26__namespace.useRef(null);
6299
- const [mounted, set_mounted] = React26__namespace.useState(false);
6300
- React26__namespace.useEffect(() => {
6635
+ const editor_container_ref = React27__namespace.useRef(null);
6636
+ const edit_popover_ref = React27__namespace.useRef(null);
6637
+ const [mounted, set_mounted] = React27__namespace.useState(false);
6638
+ React27__namespace.useEffect(() => {
6301
6639
  set_mounted(true);
6302
6640
  }, []);
6303
6641
  const calculated_min_height = rows ? `${rows * 1.5}em` : min_height;
6304
- const suggestion_extensions = React26__namespace.useMemo(() => {
6642
+ const suggestion_extensions = React27__namespace.useMemo(() => {
6305
6643
  return create_command_suggestion_extension({
6306
6644
  prefixes,
6307
6645
  instance_id,
@@ -6350,7 +6688,7 @@ var HazoUiTextarea = ({
6350
6688
  }
6351
6689
  }
6352
6690
  });
6353
- React26__namespace.useEffect(() => {
6691
+ React27__namespace.useEffect(() => {
6354
6692
  if (suggestion_state?.is_active && editor) {
6355
6693
  requestAnimationFrame(() => {
6356
6694
  const { from } = suggestion_state.range;
@@ -6374,7 +6712,7 @@ var HazoUiTextarea = ({
6374
6712
  });
6375
6713
  }
6376
6714
  }, [suggestion_state, editor]);
6377
- React26__namespace.useEffect(() => {
6715
+ React27__namespace.useEffect(() => {
6378
6716
  if (is_controlled && editor && !editor.isFocused) {
6379
6717
  const current_text = editor.getText();
6380
6718
  if (value !== current_text) {
@@ -6387,12 +6725,12 @@ var HazoUiTextarea = ({
6387
6725
  }
6388
6726
  }
6389
6727
  }, [value, editor, is_controlled, prefixes, pill_variant]);
6390
- React26__namespace.useEffect(() => {
6728
+ React27__namespace.useEffect(() => {
6391
6729
  if (editor) {
6392
6730
  editor.setEditable(!disabled);
6393
6731
  }
6394
6732
  }, [disabled, editor]);
6395
- const handle_command_select = React26__namespace.useCallback(
6733
+ const handle_command_select = React27__namespace.useCallback(
6396
6734
  (command) => {
6397
6735
  if (!editor || !suggestion_state) return;
6398
6736
  const prefix_config = prefixes.find((p) => p.char === suggestion_state.prefix);
@@ -6412,15 +6750,15 @@ var HazoUiTextarea = ({
6412
6750
  },
6413
6751
  [editor, suggestion_state, pill_variant, on_command_insert, prefixes]
6414
6752
  );
6415
- const handle_popover_close = React26__namespace.useCallback(() => {
6753
+ const handle_popover_close = React27__namespace.useCallback(() => {
6416
6754
  set_suggestion_state(null);
6417
6755
  editor?.commands.focus();
6418
6756
  }, [editor]);
6419
- const handle_edit_close = React26__namespace.useCallback(() => {
6757
+ const handle_edit_close = React27__namespace.useCallback(() => {
6420
6758
  set_edit_context(null);
6421
6759
  editor?.commands.focus();
6422
6760
  }, [editor]);
6423
- const handle_command_update = React26__namespace.useCallback(
6761
+ const handle_command_update = React27__namespace.useCallback(
6424
6762
  (new_command) => {
6425
6763
  if (!editor || !edit_context) return;
6426
6764
  const old_command = edit_context.command;
@@ -6436,7 +6774,7 @@ var HazoUiTextarea = ({
6436
6774
  },
6437
6775
  [editor, edit_context, on_command_change]
6438
6776
  );
6439
- const handle_command_remove = React26__namespace.useCallback(() => {
6777
+ const handle_command_remove = React27__namespace.useCallback(() => {
6440
6778
  if (!editor || !edit_context) return;
6441
6779
  const command = edit_context.command;
6442
6780
  editor.state.doc.descendants((node, pos) => {
@@ -6450,7 +6788,7 @@ var HazoUiTextarea = ({
6450
6788
  }
6451
6789
  set_edit_context(null);
6452
6790
  }, [editor, edit_context, on_command_remove]);
6453
- const filtered_commands = React26__namespace.useMemo(() => {
6791
+ const filtered_commands = React27__namespace.useMemo(() => {
6454
6792
  if (!suggestion_state) return [];
6455
6793
  const query = suggestion_state.query.toLowerCase();
6456
6794
  if (!query) return suggestion_state.commands;
@@ -6458,7 +6796,7 @@ var HazoUiTextarea = ({
6458
6796
  (cmd) => cmd.action_label.toLowerCase().includes(query) || cmd.action.toLowerCase().includes(query) || cmd.action_description?.toLowerCase().includes(query)
6459
6797
  );
6460
6798
  }, [suggestion_state]);
6461
- React26__namespace.useEffect(() => {
6799
+ React27__namespace.useEffect(() => {
6462
6800
  if (!suggestion_state?.is_active) return;
6463
6801
  const handle_keydown = (e) => {
6464
6802
  switch (e.key) {
@@ -6493,7 +6831,7 @@ var HazoUiTextarea = ({
6493
6831
  handle_command_select,
6494
6832
  handle_popover_close
6495
6833
  ]);
6496
- React26__namespace.useEffect(() => {
6834
+ React27__namespace.useEffect(() => {
6497
6835
  if (!edit_context) return;
6498
6836
  const handle_click_outside = (e) => {
6499
6837
  if (edit_popover_ref.current && !edit_popover_ref.current.contains(e.target)) {
@@ -6508,12 +6846,12 @@ var HazoUiTextarea = ({
6508
6846
  document.removeEventListener("mousedown", handle_click_outside);
6509
6847
  };
6510
6848
  }, [edit_context]);
6511
- const edit_commands = React26__namespace.useMemo(() => {
6849
+ const edit_commands = React27__namespace.useMemo(() => {
6512
6850
  if (!edit_context) return [];
6513
6851
  const prefix_config = prefixes.find((p) => p.char === edit_context.command.prefix);
6514
6852
  return prefix_config?.commands || [];
6515
6853
  }, [edit_context, prefixes]);
6516
- React26__namespace.useEffect(() => {
6854
+ React27__namespace.useEffect(() => {
6517
6855
  if (!edit_context) return;
6518
6856
  const handle_keydown = (e) => {
6519
6857
  switch (e.key) {
@@ -6551,7 +6889,7 @@ var HazoUiTextarea = ({
6551
6889
  handle_command_remove,
6552
6890
  handle_edit_close
6553
6891
  ]);
6554
- React26__namespace.useEffect(() => {
6892
+ React27__namespace.useEffect(() => {
6555
6893
  const handle_pill_click = (e) => {
6556
6894
  const detail = e.detail;
6557
6895
  const { id, prefix, action, action_label, node_pos } = detail;
@@ -6767,39 +7105,47 @@ function resolve_animation_classes(open_anim = "zoom", close_anim = "zoom") {
6767
7105
  }
6768
7106
  var VARIANT_PRESETS = {
6769
7107
  info: {
6770
- header_background_color: "rgb(191, 219, 254)",
6771
- description_background_color: "rgb(219, 234, 254)",
6772
- header_text_color: "rgb(30, 58, 138)",
6773
- border_color: "rgb(59, 130, 246)",
6774
- accent_color: "rgb(59, 130, 246)",
7108
+ header_background_color: "var(--dialog-info-bg)",
7109
+ description_background_color: "var(--dialog-info-bg)",
7110
+ header_text_color: "var(--dialog-info-fg)",
7111
+ border_color: "var(--dialog-info-fg)",
7112
+ accent_color: "var(--dialog-info-fg)",
6775
7113
  overlay_class_name: "bg-blue-950/50"
6776
7114
  },
6777
7115
  success: {
6778
- header_background_color: "rgb(187, 247, 208)",
6779
- description_background_color: "rgb(220, 252, 231)",
6780
- header_text_color: "rgb(22, 101, 52)",
6781
- border_color: "rgb(34, 197, 94)",
6782
- accent_color: "rgb(34, 197, 94)",
7116
+ header_background_color: "var(--dialog-success-bg)",
7117
+ description_background_color: "var(--dialog-success-bg)",
7118
+ header_text_color: "var(--dialog-success-fg)",
7119
+ border_color: "var(--dialog-success-fg)",
7120
+ accent_color: "var(--dialog-success-fg)",
6783
7121
  overlay_class_name: "bg-green-950/50"
6784
7122
  },
6785
7123
  warning: {
6786
- header_background_color: "rgb(253, 230, 138)",
6787
- description_background_color: "rgb(254, 249, 195)",
6788
- header_text_color: "rgb(113, 63, 18)",
6789
- border_color: "rgb(234, 179, 8)",
6790
- accent_color: "rgb(234, 179, 8)",
7124
+ header_background_color: "var(--dialog-warning-bg)",
7125
+ description_background_color: "var(--dialog-warning-bg)",
7126
+ header_text_color: "var(--dialog-warning-fg)",
7127
+ border_color: "var(--dialog-warning-fg)",
7128
+ accent_color: "var(--dialog-warning-fg)",
6791
7129
  overlay_class_name: "bg-yellow-950/50"
6792
7130
  },
6793
7131
  destructive: {
6794
- header_background_color: "rgb(254, 202, 202)",
6795
- description_background_color: "rgb(254, 226, 226)",
6796
- header_text_color: "rgb(127, 29, 29)",
6797
- border_color: "rgb(239, 68, 68)",
6798
- accent_color: "rgb(239, 68, 68)",
7132
+ header_background_color: "var(--dialog-destructive-bg)",
7133
+ description_background_color: "var(--dialog-destructive-bg)",
7134
+ header_text_color: "var(--dialog-destructive-fg)",
7135
+ border_color: "var(--dialog-destructive-fg)",
7136
+ accent_color: "var(--dialog-destructive-fg)",
6799
7137
  overlay_class_name: "bg-red-950/50",
6800
7138
  action_button_variant: "destructive"
6801
7139
  }
6802
7140
  };
7141
+ var NEUTRAL_VARIANT_PRESET = {
7142
+ header_background_color: "hsl(var(--dialog-border) / 0.12)",
7143
+ description_background_color: "hsl(var(--dialog-border) / 0.12)",
7144
+ header_text_color: "hsl(var(--dialog-fg))",
7145
+ border_color: "hsl(var(--dialog-border))",
7146
+ accent_color: "hsl(var(--dialog-border))",
7147
+ overlay_class_name: "bg-black/50"
7148
+ };
6803
7149
  function HazoUiDialog({
6804
7150
  open,
6805
7151
  onOpenChange,
@@ -6808,13 +7154,13 @@ function HazoUiDialog({
6808
7154
  onCancel,
6809
7155
  title = "Action required",
6810
7156
  description,
6811
- actionButtonText = "Confirm",
7157
+ actionButtonText: actionButtonTextProp,
6812
7158
  actionButtonVariant,
6813
7159
  cancelButtonText = "Cancel",
6814
- showCancelButton = true,
7160
+ showCancelButton: showCancelButtonProp,
6815
7161
  showActionButton = true,
6816
- closeOnConfirm = false,
6817
- actionButtonLoading = false,
7162
+ closeOnConfirm: closeOnConfirmProp,
7163
+ actionButtonLoading: actionButtonLoadingProp,
6818
7164
  actionButtonDisabled = false,
6819
7165
  actionButtonIcon,
6820
7166
  footerContent,
@@ -6834,18 +7180,46 @@ function HazoUiDialog({
6834
7180
  borderColor,
6835
7181
  accentColor,
6836
7182
  headerBar = false,
6837
- headerBarColor = "#1e293b",
7183
+ headerBarColor,
6838
7184
  className,
6839
7185
  contentClassName,
6840
7186
  overlayClassName,
6841
7187
  headerClassName,
6842
7188
  footerClassName,
6843
- showCloseButton = true
7189
+ showCloseButton = true,
7190
+ kind
6844
7191
  }) {
6845
7192
  const config = get_hazo_ui_config();
6846
- const variant_preset = variant !== "default" ? VARIANT_PRESETS[variant] : void 0;
7193
+ const is_confirm_kind = kind === "confirm";
7194
+ const is_status_kind = kind === "status";
7195
+ const [internal_confirm_loading, set_internal_confirm_loading] = React27__namespace.useState(false);
7196
+ const cancel_ref = React27__namespace.useRef(null);
7197
+ const variant_preset = variant !== "default" ? VARIANT_PRESETS[variant] : is_status_kind || is_confirm_kind ? NEUTRAL_VARIANT_PRESET : void 0;
6847
7198
  const resolved_action_button_variant = actionButtonVariant ?? variant_preset?.action_button_variant ?? "default";
7199
+ const showCancelButton = showCancelButtonProp ?? (is_status_kind ? false : true);
7200
+ const closeOnConfirm = closeOnConfirmProp ?? (is_status_kind || is_confirm_kind ? true : false);
7201
+ const actionButtonText = actionButtonTextProp ?? (is_status_kind ? "OK" : is_confirm_kind ? showCancelButton ? "Confirm" : "OK" : "Confirm");
7202
+ const actionButtonLoading = actionButtonLoadingProp ?? (is_confirm_kind ? internal_confirm_loading : false);
6848
7203
  const handleConfirm = () => {
7204
+ if (is_confirm_kind) {
7205
+ try {
7206
+ const result = onConfirm?.();
7207
+ if (result instanceof Promise) {
7208
+ if (actionButtonLoadingProp === void 0) set_internal_confirm_loading(true);
7209
+ result.then(() => {
7210
+ if (closeOnConfirm) onOpenChange?.(false);
7211
+ }).catch(() => {
7212
+ }).finally(() => {
7213
+ if (actionButtonLoadingProp === void 0) set_internal_confirm_loading(false);
7214
+ });
7215
+ return;
7216
+ }
7217
+ } catch {
7218
+ return;
7219
+ }
7220
+ if (closeOnConfirm) onOpenChange?.(false);
7221
+ return;
7222
+ }
6849
7223
  onConfirm?.();
6850
7224
  if (closeOnConfirm) {
6851
7225
  onOpenChange?.(false);
@@ -6865,12 +7239,14 @@ function HazoUiDialog({
6865
7239
  const finalHeaderBackgroundColor = headerBackgroundColor ?? variant_preset?.header_background_color ?? config.header_background_color;
6866
7240
  const finalDescriptionBgColor = descriptionBackgroundColor ?? variant_preset?.description_background_color;
6867
7241
  const finalHeaderTextColor = headerTextColor ?? variant_preset?.header_text_color ?? config.header_text_color;
6868
- const is_variant_active = variant !== "default";
7242
+ const is_variant_active = variant !== "default" || is_status_kind;
6869
7243
  const has_split_header = splitHeader && !headerBar && !!finalDescriptionBgColor && !!description;
6870
7244
  const has_merged_variant_header = !splitHeader && is_variant_active && !headerBar && !!description;
7245
+ const resolvedHeaderBarColor = headerBarColor ?? (variant !== "default" && variant_preset ? variant_preset.header_text_color : "var(--dialog-header-bar-bg)");
6871
7246
  const headerStyles = {
6872
7247
  ...headerBar && {
6873
- backgroundColor: headerBarColor,
7248
+ backgroundColor: resolvedHeaderBarColor,
7249
+ color: "var(--dialog-header-bar-fg)",
6874
7250
  paddingTop: compact ? "0.625rem" : "1.5rem",
6875
7251
  paddingBottom: compact ? "0.625rem" : "1.5rem",
6876
7252
  paddingLeft: "1.5rem",
@@ -6880,15 +7256,19 @@ function HazoUiDialog({
6880
7256
  ...!has_split_header && finalHeaderTextColor && { color: finalHeaderTextColor }
6881
7257
  };
6882
7258
  const titleClassName = cn(
6883
- "cls_dialog_title",
6884
- headerBar && "!text-white"
7259
+ "cls_dialog_title"
6885
7260
  );
6886
7261
  const descriptionClassName = cn(
6887
- "cls_dialog_description",
6888
- headerBar && "!text-white/80"
7262
+ "cls_dialog_description"
6889
7263
  );
6890
7264
  const bodyStyles = {
6891
- ...bodyBackgroundColor && { backgroundColor: bodyBackgroundColor }
7265
+ ...bodyBackgroundColor && { backgroundColor: bodyBackgroundColor },
7266
+ // kind="form" gets a comfortable body/label typography scale via the
7267
+ // hazo_theme --dialog-body-size token. --dialog-label-size is intentionally
7268
+ // not re-applied here: CSS custom properties inherit, so a consumer's own
7269
+ // <label> elements inside `children` can reference var(--dialog-label-size)
7270
+ // directly without any extra plumbing from this component.
7271
+ ...kind === "form" && { fontSize: "var(--dialog-body-size)" }
6892
7272
  };
6893
7273
  const footerStyles = {
6894
7274
  ...footerBackgroundColor && { backgroundColor: footerBackgroundColor }
@@ -6912,6 +7292,86 @@ function HazoUiDialog({
6912
7292
  ...finalCancelTextColor && { color: finalCancelTextColor },
6913
7293
  ...finalCancelBorderColor && { borderColor: finalCancelBorderColor }
6914
7294
  };
7295
+ if (is_confirm_kind) {
7296
+ const top_border_color = resolved_border_color ?? "hsl(var(--dialog-border))";
7297
+ return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
7298
+ /* @__PURE__ */ jsxRuntime.jsx(
7299
+ DialogOverlay,
7300
+ {
7301
+ className: cn(
7302
+ "cls_confirm_dialog_overlay",
7303
+ overlayClassName ?? variant_preset?.overlay_class_name
7304
+ ),
7305
+ style: { backdropFilter: "blur(4px)" }
7306
+ }
7307
+ ),
7308
+ /* @__PURE__ */ jsxRuntime.jsxs(
7309
+ DialogPrimitive__namespace.Content,
7310
+ {
7311
+ className: cn(
7312
+ "cls_confirm_dialog_content",
7313
+ "fixed left-[50%] top-[50%] z-50",
7314
+ "translate-x-[-50%] translate-y-[-50%]",
7315
+ "bg-background shadow-lg",
7316
+ "duration-200",
7317
+ animationClasses,
7318
+ "overflow-hidden",
7319
+ className
7320
+ ),
7321
+ style: {
7322
+ width: "min(90vw, 420px)",
7323
+ borderRadius: "12px",
7324
+ borderTop: `4px solid ${top_border_color}`,
7325
+ boxShadow: "0 20px 60px rgba(0,0,0,0.15)",
7326
+ outline: "none"
7327
+ },
7328
+ onOpenAutoFocus: (e) => {
7329
+ if ((variant === "destructive" || variant === "warning") && showCancelButton && cancel_ref.current) {
7330
+ e.preventDefault();
7331
+ cancel_ref.current.focus();
7332
+ }
7333
+ },
7334
+ children: [
7335
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cls_confirm_dialog_body px-6 pt-7 pb-5", children: [
7336
+ /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Title, { className: "cls_confirm_dialog_title text-[17px] font-semibold text-foreground mb-2.5", children: title }),
7337
+ children ? /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cls_confirm_dialog_children text-sm text-muted-foreground leading-relaxed", children }) }) : description ? /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Description, { className: "cls_confirm_dialog_description text-sm text-muted-foreground leading-relaxed", children: description }) : null
7338
+ ] }),
7339
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cls_confirm_dialog_separator border-t border-border" }),
7340
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cls_confirm_dialog_actions px-6 py-4 flex justify-end gap-3", children: [
7341
+ showCancelButton && /* @__PURE__ */ jsxRuntime.jsx(
7342
+ Button,
7343
+ {
7344
+ ref: cancel_ref,
7345
+ type: "button",
7346
+ className: "cls_confirm_cancel_button focus-visible:ring-0 focus-visible:ring-offset-0",
7347
+ variant: "outline",
7348
+ onClick: handleCancel,
7349
+ disabled: actionButtonLoading,
7350
+ style: cancelButtonStyles,
7351
+ children: cancelButtonText
7352
+ }
7353
+ ),
7354
+ showActionButton && /* @__PURE__ */ jsxRuntime.jsxs(
7355
+ Button,
7356
+ {
7357
+ type: "button",
7358
+ className: "cls_confirm_action_button",
7359
+ variant: resolved_action_button_variant,
7360
+ onClick: handleConfirm,
7361
+ disabled: actionButtonLoading || actionButtonDisabled,
7362
+ style: actionButtonStyles,
7363
+ children: [
7364
+ actionButtonLoading && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-4 w-4 mr-2 animate-spin" }),
7365
+ actionButtonText
7366
+ ]
7367
+ }
7368
+ )
7369
+ ] })
7370
+ ]
7371
+ }
7372
+ )
7373
+ ] }) });
7374
+ }
6915
7375
  return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
6916
7376
  /* @__PURE__ */ jsxRuntime.jsx(
6917
7377
  DialogOverlay,
@@ -6986,10 +7446,17 @@ function HazoUiDialog({
6986
7446
  style: headerStyles,
6987
7447
  children: [
6988
7448
  /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: titleClassName, children: title }),
6989
- description && /* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { className: cn(
6990
- descriptionClassName,
6991
- has_merged_variant_header && "italic text-xs mt-1"
6992
- ), children: description })
7449
+ description && /* @__PURE__ */ jsxRuntime.jsx(
7450
+ DialogDescription,
7451
+ {
7452
+ className: cn(
7453
+ descriptionClassName,
7454
+ has_merged_variant_header && "italic text-xs mt-1"
7455
+ ),
7456
+ style: headerBar ? { opacity: 0.8 } : void 0,
7457
+ children: description
7458
+ }
7459
+ )
6993
7460
  ]
6994
7461
  }
6995
7462
  )
@@ -7055,7 +7522,7 @@ function HazoUiDialog({
7055
7522
  DialogPrimitive__namespace.Close,
7056
7523
  {
7057
7524
  className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
7058
- style: headerBar ? { color: "white" } : finalHeaderTextColor ? { color: finalHeaderTextColor } : void 0,
7525
+ style: headerBar ? { color: "var(--dialog-header-bar-fg)" } : finalHeaderTextColor ? { color: finalHeaderTextColor } : void 0,
7059
7526
  children: [
7060
7527
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
7061
7528
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
@@ -7067,28 +7534,6 @@ function HazoUiDialog({
7067
7534
  )
7068
7535
  ] }) });
7069
7536
  }
7070
- var CONFIRM_VARIANT_PRESETS = {
7071
- destructive: {
7072
- accent_color: "rgb(220, 38, 38)",
7073
- confirm_button_color: "rgb(220, 38, 38)",
7074
- overlay_class_name: "bg-red-950/50"
7075
- },
7076
- warning: {
7077
- accent_color: "rgb(245, 158, 11)",
7078
- confirm_button_color: "rgb(245, 158, 11)",
7079
- overlay_class_name: "bg-yellow-950/50"
7080
- },
7081
- info: {
7082
- accent_color: "rgb(37, 99, 235)",
7083
- confirm_button_color: "rgb(37, 99, 235)",
7084
- overlay_class_name: "bg-blue-950/50"
7085
- },
7086
- success: {
7087
- accent_color: "rgb(22, 163, 74)",
7088
- confirm_button_color: "rgb(22, 163, 74)",
7089
- overlay_class_name: "bg-green-950/50"
7090
- }
7091
- };
7092
7537
  function HazoUiConfirmDialog({
7093
7538
  open,
7094
7539
  onOpenChange,
@@ -7101,128 +7546,39 @@ function HazoUiConfirmDialog({
7101
7546
  showCancelButton = true,
7102
7547
  onConfirm,
7103
7548
  onCancel,
7104
- loading: external_loading,
7549
+ loading,
7105
7550
  disabled = false,
7106
7551
  accentColor,
7107
7552
  confirmButtonColor,
7108
7553
  openAnimation = "zoom",
7109
7554
  closeAnimation = "zoom"
7110
7555
  }) {
7111
- const [internal_loading, set_internal_loading] = React26__namespace.useState(false);
7112
- const config = get_hazo_ui_config();
7113
- const variant_preset = variant !== "default" ? CONFIRM_VARIANT_PRESETS[variant] : void 0;
7114
- const is_loading = external_loading ?? internal_loading;
7115
- const resolved_confirm_label = confirmLabel ?? (showCancelButton ? "Confirm" : "OK");
7116
- const resolved_accent_color = accentColor ?? variant_preset?.accent_color ?? "rgb(148, 163, 184)";
7117
- const resolved_confirm_button_color = confirmButtonColor ?? variant_preset?.confirm_button_color ?? config.submit_button_background_color;
7118
- const cancel_button_styles = {
7119
- ...config.cancel_button_background_color && { backgroundColor: config.cancel_button_background_color },
7120
- ...config.cancel_button_text_color && { color: config.cancel_button_text_color },
7121
- ...config.cancel_button_border_color && { borderColor: config.cancel_button_border_color }
7122
- };
7123
- const confirm_button_styles = {
7124
- ...resolved_confirm_button_color && {
7125
- backgroundColor: resolved_confirm_button_color,
7126
- borderColor: resolved_confirm_button_color,
7127
- color: "white"
7128
- }
7129
- };
7130
- const animation_classes = resolve_animation_classes(openAnimation, closeAnimation);
7131
- const handle_confirm = async () => {
7132
- try {
7133
- const result = onConfirm();
7134
- if (result instanceof Promise) {
7135
- set_internal_loading(true);
7136
- await result;
7137
- }
7138
- onOpenChange(false);
7139
- } catch {
7140
- } finally {
7141
- set_internal_loading(false);
7556
+ const resolved_accent_color = confirmButtonColor ?? accentColor;
7557
+ return /* @__PURE__ */ jsxRuntime.jsx(
7558
+ HazoUiDialog,
7559
+ {
7560
+ kind: "confirm",
7561
+ open,
7562
+ onOpenChange,
7563
+ title,
7564
+ description,
7565
+ variant,
7566
+ actionButtonText: confirmLabel,
7567
+ cancelButtonText: cancelLabel,
7568
+ showCancelButton,
7569
+ onConfirm,
7570
+ onCancel,
7571
+ actionButtonLoading: loading,
7572
+ actionButtonDisabled: disabled,
7573
+ accentColor: resolved_accent_color,
7574
+ openAnimation,
7575
+ closeAnimation,
7576
+ closeOnConfirm: true,
7577
+ children
7142
7578
  }
7143
- };
7144
- const handle_cancel = () => {
7145
- onCancel?.();
7146
- onOpenChange(false);
7147
- };
7148
- const cancel_ref = React26__namespace.useRef(null);
7149
- return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
7150
- /* @__PURE__ */ jsxRuntime.jsx(
7151
- DialogOverlay,
7152
- {
7153
- className: cn(
7154
- "cls_confirm_dialog_overlay",
7155
- variant_preset?.overlay_class_name
7156
- ),
7157
- style: { backdropFilter: "blur(4px)" }
7158
- }
7159
- ),
7160
- /* @__PURE__ */ jsxRuntime.jsxs(
7161
- DialogPrimitive__namespace.Content,
7162
- {
7163
- className: cn(
7164
- "cls_confirm_dialog_content",
7165
- "fixed left-[50%] top-[50%] z-50",
7166
- "translate-x-[-50%] translate-y-[-50%]",
7167
- "bg-background shadow-lg",
7168
- "duration-200",
7169
- animation_classes,
7170
- "overflow-hidden"
7171
- ),
7172
- style: {
7173
- width: "min(90vw, 420px)",
7174
- borderRadius: "12px",
7175
- borderTop: `4px solid ${resolved_accent_color}`,
7176
- boxShadow: "0 20px 60px rgba(0,0,0,0.15)",
7177
- outline: "none"
7178
- },
7179
- onOpenAutoFocus: (e) => {
7180
- if ((variant === "destructive" || variant === "warning") && showCancelButton && cancel_ref.current) {
7181
- e.preventDefault();
7182
- cancel_ref.current.focus();
7183
- }
7184
- },
7185
- children: [
7186
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cls_confirm_dialog_body px-6 pt-7 pb-5", children: [
7187
- /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Title, { className: "cls_confirm_dialog_title text-[17px] font-semibold text-foreground mb-2.5", children: title }),
7188
- children ? /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cls_confirm_dialog_children text-sm text-muted-foreground leading-relaxed", children }) }) : description ? /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Description, { className: "cls_confirm_dialog_description text-sm text-muted-foreground leading-relaxed", children: description }) : null
7189
- ] }),
7190
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cls_confirm_dialog_separator border-t border-border" }),
7191
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cls_confirm_dialog_actions px-6 py-4 flex justify-end gap-3", children: [
7192
- showCancelButton && /* @__PURE__ */ jsxRuntime.jsx(
7193
- Button,
7194
- {
7195
- ref: cancel_ref,
7196
- type: "button",
7197
- className: "cls_confirm_cancel_button focus-visible:ring-0 focus-visible:ring-offset-0",
7198
- variant: "outline",
7199
- onClick: handle_cancel,
7200
- disabled: is_loading,
7201
- style: cancel_button_styles,
7202
- children: cancelLabel
7203
- }
7204
- ),
7205
- /* @__PURE__ */ jsxRuntime.jsxs(
7206
- Button,
7207
- {
7208
- type: "button",
7209
- className: "cls_confirm_action_button",
7210
- onClick: handle_confirm,
7211
- disabled: is_loading || disabled,
7212
- style: confirm_button_styles,
7213
- children: [
7214
- is_loading && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-4 w-4 mr-2 animate-spin" }),
7215
- resolved_confirm_label
7216
- ]
7217
- }
7218
- )
7219
- ] })
7220
- ]
7221
- }
7222
- )
7223
- ] }) });
7579
+ );
7224
7580
  }
7225
- var Slider = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
7581
+ var Slider = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
7226
7582
  SliderPrimitive__namespace.Root,
7227
7583
  {
7228
7584
  ref,
@@ -7275,7 +7631,7 @@ async function getCroppedImg(imageSrc, areaPixels, outputSize, quality) {
7275
7631
  );
7276
7632
  });
7277
7633
  }
7278
- var HazoUiImageCropper = React26__namespace.forwardRef(function HazoUiImageCropper2({
7634
+ var HazoUiImageCropper = React27__namespace.forwardRef(function HazoUiImageCropper2({
7279
7635
  imageSrc,
7280
7636
  onCropped,
7281
7637
  outputSize = 512,
@@ -7283,19 +7639,19 @@ var HazoUiImageCropper = React26__namespace.forwardRef(function HazoUiImageCropp
7283
7639
  zoomLabel = "Zoom",
7284
7640
  className
7285
7641
  }, ref) {
7286
- const [crop, set_crop] = React26__namespace.useState({
7642
+ const [crop, set_crop] = React27__namespace.useState({
7287
7643
  x: 0,
7288
7644
  y: 0
7289
7645
  });
7290
- const [zoom, set_zoom] = React26__namespace.useState(1);
7291
- const cropped_area_pixels_ref = React26__namespace.useRef(null);
7292
- const handle_crop_complete = React26__namespace.useCallback(
7646
+ const [zoom, set_zoom] = React27__namespace.useState(1);
7647
+ const cropped_area_pixels_ref = React27__namespace.useRef(null);
7648
+ const handle_crop_complete = React27__namespace.useCallback(
7293
7649
  (_croppedArea, croppedAreaPixels) => {
7294
7650
  cropped_area_pixels_ref.current = croppedAreaPixels;
7295
7651
  },
7296
7652
  []
7297
7653
  );
7298
- React26__namespace.useImperativeHandle(
7654
+ React27__namespace.useImperativeHandle(
7299
7655
  ref,
7300
7656
  () => ({
7301
7657
  getCroppedBlob: async () => {
@@ -7375,10 +7731,10 @@ function HazoUiImageCropperDialog({
7375
7731
  outputSize = 512,
7376
7732
  quality = 0.9
7377
7733
  }) {
7378
- const cropper_ref = React26__namespace.useRef(null);
7379
- const [image_src, set_image_src] = React26__namespace.useState(null);
7380
- const [is_confirming, set_is_confirming] = React26__namespace.useState(false);
7381
- React26__namespace.useEffect(() => {
7734
+ const cropper_ref = React27__namespace.useRef(null);
7735
+ const [image_src, set_image_src] = React27__namespace.useState(null);
7736
+ const [is_confirming, set_is_confirming] = React27__namespace.useState(false);
7737
+ React27__namespace.useEffect(() => {
7382
7738
  if (!file) {
7383
7739
  set_image_src(null);
7384
7740
  return;
@@ -7434,7 +7790,7 @@ Drawer.displayName = "Drawer";
7434
7790
  var DrawerTrigger = vaul.Drawer.Trigger;
7435
7791
  var DrawerPortal = vaul.Drawer.Portal;
7436
7792
  var DrawerClose = vaul.Drawer.Close;
7437
- var DrawerOverlay = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7793
+ var DrawerOverlay = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7438
7794
  vaul.Drawer.Overlay,
7439
7795
  {
7440
7796
  ref,
@@ -7446,7 +7802,7 @@ var DrawerOverlay = React26__namespace.forwardRef(({ className, ...props }, ref)
7446
7802
  }
7447
7803
  ));
7448
7804
  DrawerOverlay.displayName = "DrawerOverlay";
7449
- var DrawerContent = React26__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DrawerPortal, { children: [
7805
+ var DrawerContent = React27__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DrawerPortal, { children: [
7450
7806
  /* @__PURE__ */ jsxRuntime.jsx(DrawerOverlay, {}),
7451
7807
  /* @__PURE__ */ jsxRuntime.jsxs(
7452
7808
  vaul.Drawer.Content,
@@ -7487,7 +7843,7 @@ var DrawerFooter = ({
7487
7843
  }
7488
7844
  );
7489
7845
  DrawerFooter.displayName = "DrawerFooter";
7490
- var DrawerTitle = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7846
+ var DrawerTitle = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7491
7847
  vaul.Drawer.Title,
7492
7848
  {
7493
7849
  ref,
@@ -7499,7 +7855,7 @@ var DrawerTitle = React26__namespace.forwardRef(({ className, ...props }, ref) =
7499
7855
  }
7500
7856
  ));
7501
7857
  DrawerTitle.displayName = "DrawerTitle";
7502
- var DrawerDescription = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7858
+ var DrawerDescription = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7503
7859
  vaul.Drawer.Description,
7504
7860
  {
7505
7861
  ref,
@@ -7509,14 +7865,14 @@ var DrawerDescription = React26__namespace.forwardRef(({ className, ...props },
7509
7865
  ));
7510
7866
  DrawerDescription.displayName = "DrawerDescription";
7511
7867
  function useMediaQuery(query) {
7512
- const get_match = React26__namespace.useCallback(() => {
7868
+ const get_match = React27__namespace.useCallback(() => {
7513
7869
  if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
7514
7870
  return false;
7515
7871
  }
7516
7872
  return window.matchMedia(query).matches;
7517
7873
  }, [query]);
7518
- const [matches, set_matches] = React26__namespace.useState(false);
7519
- React26__namespace.useEffect(() => {
7874
+ const [matches, set_matches] = React27__namespace.useState(false);
7875
+ React27__namespace.useEffect(() => {
7520
7876
  if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
7521
7877
  return;
7522
7878
  }
@@ -7533,7 +7889,7 @@ function useMediaQuery(query) {
7533
7889
  return matches;
7534
7890
  }
7535
7891
  var Accordion = AccordionPrimitive__namespace.Root;
7536
- var AccordionItem = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7892
+ var AccordionItem = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7537
7893
  AccordionPrimitive__namespace.Item,
7538
7894
  {
7539
7895
  ref,
@@ -7542,7 +7898,7 @@ var AccordionItem = React26__namespace.forwardRef(({ className, ...props }, ref)
7542
7898
  }
7543
7899
  ));
7544
7900
  AccordionItem.displayName = "AccordionItem";
7545
- var AccordionTrigger = React26__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
7901
+ var AccordionTrigger = React27__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
7546
7902
  AccordionPrimitive__namespace.Trigger,
7547
7903
  {
7548
7904
  ref,
@@ -7558,7 +7914,7 @@ var AccordionTrigger = React26__namespace.forwardRef(({ className, children, ...
7558
7914
  }
7559
7915
  ) }));
7560
7916
  AccordionTrigger.displayName = AccordionPrimitive__namespace.Trigger.displayName;
7561
- var AccordionContent = React26__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7917
+ var AccordionContent = React27__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7562
7918
  AccordionPrimitive__namespace.Content,
7563
7919
  {
7564
7920
  ref,
@@ -7568,7 +7924,7 @@ var AccordionContent = React26__namespace.forwardRef(({ className, children, ...
7568
7924
  }
7569
7925
  ));
7570
7926
  AccordionContent.displayName = AccordionPrimitive__namespace.Content.displayName;
7571
- var Checkbox = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7927
+ var Checkbox = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7572
7928
  CheckboxPrimitive__namespace.Root,
7573
7929
  {
7574
7930
  ref,
@@ -7593,7 +7949,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
7593
7949
  var DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
7594
7950
  var DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
7595
7951
  var DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
7596
- var DropdownMenuSubTrigger = React26__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
7952
+ var DropdownMenuSubTrigger = React27__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
7597
7953
  DropdownMenuPrimitive__namespace.SubTrigger,
7598
7954
  {
7599
7955
  ref,
@@ -7610,7 +7966,7 @@ var DropdownMenuSubTrigger = React26__namespace.forwardRef(({ className, inset,
7610
7966
  }
7611
7967
  ));
7612
7968
  DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
7613
- var DropdownMenuSubContent = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7969
+ var DropdownMenuSubContent = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7614
7970
  DropdownMenuPrimitive__namespace.SubContent,
7615
7971
  {
7616
7972
  ref,
@@ -7622,7 +7978,7 @@ var DropdownMenuSubContent = React26__namespace.forwardRef(({ className, ...prop
7622
7978
  }
7623
7979
  ));
7624
7980
  DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
7625
- var DropdownMenuContent = React26__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
7981
+ var DropdownMenuContent = React27__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
7626
7982
  DropdownMenuPrimitive__namespace.Content,
7627
7983
  {
7628
7984
  ref,
@@ -7635,7 +7991,7 @@ var DropdownMenuContent = React26__namespace.forwardRef(({ className, sideOffset
7635
7991
  }
7636
7992
  ) }));
7637
7993
  DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
7638
- var DropdownMenuItem = React26__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7994
+ var DropdownMenuItem = React27__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7639
7995
  DropdownMenuPrimitive__namespace.Item,
7640
7996
  {
7641
7997
  ref,
@@ -7648,7 +8004,7 @@ var DropdownMenuItem = React26__namespace.forwardRef(({ className, inset, ...pro
7648
8004
  }
7649
8005
  ));
7650
8006
  DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
7651
- var DropdownMenuCheckboxItem = React26__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
8007
+ var DropdownMenuCheckboxItem = React27__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
7652
8008
  DropdownMenuPrimitive__namespace.CheckboxItem,
7653
8009
  {
7654
8010
  ref,
@@ -7665,7 +8021,7 @@ var DropdownMenuCheckboxItem = React26__namespace.forwardRef(({ className, child
7665
8021
  }
7666
8022
  ));
7667
8023
  DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
7668
- var DropdownMenuRadioItem = React26__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
8024
+ var DropdownMenuRadioItem = React27__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
7669
8025
  DropdownMenuPrimitive__namespace.RadioItem,
7670
8026
  {
7671
8027
  ref,
@@ -7681,7 +8037,7 @@ var DropdownMenuRadioItem = React26__namespace.forwardRef(({ className, children
7681
8037
  }
7682
8038
  ));
7683
8039
  DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
7684
- var DropdownMenuLabel = React26__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
8040
+ var DropdownMenuLabel = React27__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7685
8041
  DropdownMenuPrimitive__namespace.Label,
7686
8042
  {
7687
8043
  ref,
@@ -7694,7 +8050,7 @@ var DropdownMenuLabel = React26__namespace.forwardRef(({ className, inset, ...pr
7694
8050
  }
7695
8051
  ));
7696
8052
  DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
7697
- var DropdownMenuSeparator = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
8053
+ var DropdownMenuSeparator = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7698
8054
  DropdownMenuPrimitive__namespace.Separator,
7699
8055
  {
7700
8056
  ref,
@@ -7718,7 +8074,7 @@ var DropdownMenuShortcut = ({
7718
8074
  DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
7719
8075
  var HoverCard = HoverCardPrimitive__namespace.Root;
7720
8076
  var HoverCardTrigger = HoverCardPrimitive__namespace.Trigger;
7721
- var HoverCardContent = React26__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
8077
+ var HoverCardContent = React27__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7722
8078
  HoverCardPrimitive__namespace.Content,
7723
8079
  {
7724
8080
  ref,
@@ -7732,7 +8088,7 @@ var HoverCardContent = React26__namespace.forwardRef(({ className, align = "cent
7732
8088
  }
7733
8089
  ));
7734
8090
  HoverCardContent.displayName = HoverCardPrimitive__namespace.Content.displayName;
7735
- var Label3 = React26__namespace.forwardRef(
8091
+ var Label3 = React27__namespace.forwardRef(
7736
8092
  ({ className, ...props }, ref) => {
7737
8093
  return /* @__PURE__ */ jsxRuntime.jsx(
7738
8094
  "label",
@@ -7748,7 +8104,7 @@ var Label3 = React26__namespace.forwardRef(
7748
8104
  }
7749
8105
  );
7750
8106
  Label3.displayName = "Label";
7751
- var Switch = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
8107
+ var Switch = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7752
8108
  SwitchPrimitives__namespace.Root,
7753
8109
  {
7754
8110
  className: cn(
@@ -7768,7 +8124,7 @@ var Switch = React26__namespace.forwardRef(({ className, ...props }, ref) => /*
7768
8124
  }
7769
8125
  ));
7770
8126
  Switch.displayName = SwitchPrimitives__namespace.Root.displayName;
7771
- var Textarea = React26__namespace.forwardRef(
8127
+ var Textarea = React27__namespace.forwardRef(
7772
8128
  ({ className, ...props }, ref) => {
7773
8129
  return /* @__PURE__ */ jsxRuntime.jsx(
7774
8130
  "textarea",
@@ -7788,7 +8144,7 @@ var Textarea = React26__namespace.forwardRef(
7788
8144
  }
7789
8145
  );
7790
8146
  Textarea.displayName = "Textarea";
7791
- var Separator3 = React26__namespace.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
8147
+ var Separator3 = React27__namespace.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7792
8148
  SeparatorPrimitive__namespace.Root,
7793
8149
  {
7794
8150
  ref,
@@ -7806,7 +8162,7 @@ Separator3.displayName = SeparatorPrimitive__namespace.Root.displayName;
7806
8162
  var Collapsible = CollapsiblePrimitive__namespace.Root;
7807
8163
  var CollapsibleTrigger2 = CollapsiblePrimitive__namespace.CollapsibleTrigger;
7808
8164
  var CollapsibleContent2 = CollapsiblePrimitive__namespace.CollapsibleContent;
7809
- var ScrollArea = React26__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
8165
+ var ScrollArea = React27__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
7810
8166
  ScrollAreaPrimitive__namespace.Root,
7811
8167
  {
7812
8168
  ref,
@@ -7820,7 +8176,7 @@ var ScrollArea = React26__namespace.forwardRef(({ className, children, ...props
7820
8176
  }
7821
8177
  ));
7822
8178
  ScrollArea.displayName = ScrollAreaPrimitive__namespace.Root.displayName;
7823
- var ScrollBar = React26__namespace.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
8179
+ var ScrollBar = React27__namespace.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7824
8180
  ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
7825
8181
  {
7826
8182
  ref,
@@ -7836,27 +8192,27 @@ var ScrollBar = React26__namespace.forwardRef(({ className, orientation = "verti
7836
8192
  }
7837
8193
  ));
7838
8194
  ScrollBar.displayName = ScrollAreaPrimitive__namespace.ScrollAreaScrollbar.displayName;
7839
- var Card = React26__namespace.forwardRef(
8195
+ var Card = React27__namespace.forwardRef(
7840
8196
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("rounded-lg border bg-card text-card-foreground shadow-sm", className), ...props })
7841
8197
  );
7842
8198
  Card.displayName = "Card";
7843
- var CardHeader = React26__namespace.forwardRef(
8199
+ var CardHeader = React27__namespace.forwardRef(
7844
8200
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
7845
8201
  );
7846
8202
  CardHeader.displayName = "CardHeader";
7847
- var CardTitle = React26__namespace.forwardRef(
8203
+ var CardTitle = React27__namespace.forwardRef(
7848
8204
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("h3", { ref, className: cn("text-2xl font-semibold leading-none tracking-tight", className), ...props })
7849
8205
  );
7850
8206
  CardTitle.displayName = "CardTitle";
7851
- var CardDescription = React26__namespace.forwardRef(
8207
+ var CardDescription = React27__namespace.forwardRef(
7852
8208
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("p", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
7853
8209
  );
7854
8210
  CardDescription.displayName = "CardDescription";
7855
- var CardContent = React26__namespace.forwardRef(
8211
+ var CardContent = React27__namespace.forwardRef(
7856
8212
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("p-6 pt-0", className), ...props })
7857
8213
  );
7858
8214
  CardContent.displayName = "CardContent";
7859
- var CardFooter = React26__namespace.forwardRef(
8215
+ var CardFooter = React27__namespace.forwardRef(
7860
8216
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
7861
8217
  );
7862
8218
  CardFooter.displayName = "CardFooter";
@@ -7889,16 +8245,16 @@ var toggleVariants = classVarianceAuthority.cva(
7889
8245
  defaultVariants: { variant: "default", size: "default" }
7890
8246
  }
7891
8247
  );
7892
- var Toggle = React26__namespace.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TogglePrimitive__namespace.Root, { ref, className: cn(toggleVariants({ variant, size, className })), ...props }));
8248
+ var Toggle = React27__namespace.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TogglePrimitive__namespace.Root, { ref, className: cn(toggleVariants({ variant, size, className })), ...props }));
7893
8249
  Toggle.displayName = TogglePrimitive__namespace.Root.displayName;
7894
- var ToggleGroupContext = React26__namespace.createContext({
8250
+ var ToggleGroupContext = React27__namespace.createContext({
7895
8251
  size: "default",
7896
8252
  variant: "default"
7897
8253
  });
7898
- var ToggleGroup = React26__namespace.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupPrimitive__namespace.Root, { ref, className: cn("flex items-center justify-center gap-1", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupContext.Provider, { value: { variant, size }, children }) }));
8254
+ var ToggleGroup = React27__namespace.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupPrimitive__namespace.Root, { ref, className: cn("flex items-center justify-center gap-1", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupContext.Provider, { value: { variant, size }, children }) }));
7899
8255
  ToggleGroup.displayName = ToggleGroupPrimitive__namespace.Root.displayName;
7900
- var ToggleGroupItem = React26__namespace.forwardRef(({ className, children, variant, size, ...props }, ref) => {
7901
- const context = React26__namespace.useContext(ToggleGroupContext);
8256
+ var ToggleGroupItem = React27__namespace.forwardRef(({ className, children, variant, size, ...props }, ref) => {
8257
+ const context = React27__namespace.useContext(ToggleGroupContext);
7902
8258
  return /* @__PURE__ */ jsxRuntime.jsx(
7903
8259
  ToggleGroupPrimitive__namespace.Item,
7904
8260
  {
@@ -7913,7 +8269,7 @@ ToggleGroupItem.displayName = ToggleGroupPrimitive__namespace.Item.displayName;
7913
8269
  var AlertDialog = AlertDialogPrimitive__namespace.Root;
7914
8270
  var AlertDialogTrigger = AlertDialogPrimitive__namespace.Trigger;
7915
8271
  var AlertDialogPortal = AlertDialogPrimitive__namespace.Portal;
7916
- var AlertDialogOverlay = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
8272
+ var AlertDialogOverlay = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7917
8273
  AlertDialogPrimitive__namespace.Overlay,
7918
8274
  {
7919
8275
  ref,
@@ -7922,7 +8278,7 @@ var AlertDialogOverlay = React26__namespace.forwardRef(({ className, ...props },
7922
8278
  }
7923
8279
  ));
7924
8280
  AlertDialogOverlay.displayName = AlertDialogPrimitive__namespace.Overlay.displayName;
7925
- var AlertDialogContent = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogPortal, { children: [
8281
+ var AlertDialogContent = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogPortal, { children: [
7926
8282
  /* @__PURE__ */ jsxRuntime.jsx(AlertDialogOverlay, {}),
7927
8283
  /* @__PURE__ */ jsxRuntime.jsx(
7928
8284
  AlertDialogPrimitive__namespace.Content,
@@ -7938,13 +8294,13 @@ var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.
7938
8294
  AlertDialogHeader.displayName = "AlertDialogHeader";
7939
8295
  var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
7940
8296
  AlertDialogFooter.displayName = "AlertDialogFooter";
7941
- var AlertDialogTitle = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Title, { ref, className: cn("text-lg font-semibold", className), ...props }));
8297
+ var AlertDialogTitle = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Title, { ref, className: cn("text-lg font-semibold", className), ...props }));
7942
8298
  AlertDialogTitle.displayName = AlertDialogPrimitive__namespace.Title.displayName;
7943
- var AlertDialogDescription = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
8299
+ var AlertDialogDescription = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
7944
8300
  AlertDialogDescription.displayName = AlertDialogPrimitive__namespace.Description.displayName;
7945
- var AlertDialogAction = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Action, { ref, className: cn(buttonVariants(), className), ...props }));
8301
+ var AlertDialogAction = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Action, { ref, className: cn(buttonVariants(), className), ...props }));
7946
8302
  AlertDialogAction.displayName = AlertDialogPrimitive__namespace.Action.displayName;
7947
- var AlertDialogCancel = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Cancel, { ref, className: cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className), ...props }));
8303
+ var AlertDialogCancel = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Cancel, { ref, className: cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className), ...props }));
7948
8304
  AlertDialogCancel.displayName = AlertDialogPrimitive__namespace.Cancel.displayName;
7949
8305
  var buttonGroupVariants = classVarianceAuthority.cva(
7950
8306
  "flex w-fit items-stretch [&>*]:focus-visible:relative [&>*]:focus-visible:z-10",
@@ -7972,7 +8328,7 @@ function ButtonGroupText({ className, asChild = false, ...props }) {
7972
8328
  function ButtonGroupSeparator({ className, orientation = "vertical", ...props }) {
7973
8329
  return /* @__PURE__ */ jsxRuntime.jsx(Separator3, { orientation, className: cn("bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto", className), ...props });
7974
8330
  }
7975
- var InputAffix = React26__namespace.forwardRef(
8331
+ var InputAffix = React27__namespace.forwardRef(
7976
8332
  ({ className, containerClassName, prefix, suffix, type = "text", ...props }, ref) => {
7977
8333
  return /* @__PURE__ */ jsxRuntime.jsxs(
7978
8334
  "div",
@@ -8004,7 +8360,7 @@ var InputAffix = React26__namespace.forwardRef(
8004
8360
  }
8005
8361
  );
8006
8362
  InputAffix.displayName = "InputAffix";
8007
- var SkeletonBase = React26__namespace.forwardRef(
8363
+ var SkeletonBase = React27__namespace.forwardRef(
8008
8364
  ({ className, ...rest }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
8009
8365
  "div",
8010
8366
  {
@@ -8180,8 +8536,8 @@ function LoadingTimeout({
8180
8536
  firm: thresholds?.firm ?? 15e3,
8181
8537
  expired: thresholds?.expired ?? 3e4
8182
8538
  };
8183
- const [phase, setPhase] = React26__namespace.useState(active ? "silent" : "idle");
8184
- React26__namespace.useEffect(() => {
8539
+ const [phase, setPhase] = React27__namespace.useState(active ? "silent" : "idle");
8540
+ React27__namespace.useEffect(() => {
8185
8541
  if (!active) {
8186
8542
  setPhase("idle");
8187
8543
  return;
@@ -8240,7 +8596,7 @@ function ProgressiveImage({
8240
8596
  onLoad,
8241
8597
  onError
8242
8598
  }) {
8243
- const [loaded, setLoaded] = React26__namespace.useState(false);
8599
+ const [loaded, setLoaded] = React27__namespace.useState(false);
8244
8600
  return /* @__PURE__ */ jsxRuntime.jsxs(
8245
8601
  "div",
8246
8602
  {
@@ -8393,7 +8749,7 @@ function NotificationPanel({
8393
8749
  loading = false,
8394
8750
  className
8395
8751
  }) {
8396
- const hasChildren = React26__namespace.Children.count(children) > 0 && children !== null && children !== void 0;
8752
+ const hasChildren = React27__namespace.Children.count(children) > 0 && children !== null && children !== void 0;
8397
8753
  return /* @__PURE__ */ jsxRuntime.jsxs(
8398
8754
  "div",
8399
8755
  {
@@ -8464,8 +8820,8 @@ function errorToast({ title, description, duration = 5e3, action }) {
8464
8820
  });
8465
8821
  }
8466
8822
  function useLoadingState(initial = false) {
8467
- const [isLoading, setLoading] = React26.useState(initial);
8468
- const withLoading = React26.useCallback(async (fn) => {
8823
+ const [isLoading, setLoading] = React27.useState(initial);
8824
+ const withLoading = React27.useCallback(async (fn) => {
8469
8825
  setLoading(true);
8470
8826
  try {
8471
8827
  return await fn();
@@ -8476,8 +8832,8 @@ function useLoadingState(initial = false) {
8476
8832
  return { isLoading, setLoading, withLoading };
8477
8833
  }
8478
8834
  function useErrorDisplay() {
8479
- const [error, setRaw] = React26.useState(null);
8480
- const setError = React26.useCallback((value) => {
8835
+ const [error, setRaw] = React27.useState(null);
8836
+ const setError = React27.useCallback((value) => {
8481
8837
  if (value == null) {
8482
8838
  setRaw(null);
8483
8839
  return;
@@ -8492,12 +8848,12 @@ function useErrorDisplay() {
8492
8848
  }
8493
8849
  setRaw(String(value));
8494
8850
  }, []);
8495
- const clearError = React26.useCallback(() => setRaw(null), []);
8851
+ const clearError = React27.useCallback(() => setRaw(null), []);
8496
8852
  return { error, setError, clearError };
8497
8853
  }
8498
8854
  function useDebounce(value, delayMs) {
8499
- const [debounced_value, set_debounced_value] = React26.useState(value);
8500
- React26.useEffect(() => {
8855
+ const [debounced_value, set_debounced_value] = React27.useState(value);
8856
+ React27.useEffect(() => {
8501
8857
  const timer = setTimeout(() => {
8502
8858
  set_debounced_value(value);
8503
8859
  }, delayMs);
@@ -8506,8 +8862,8 @@ function useDebounce(value, delayMs) {
8506
8862
  return debounced_value;
8507
8863
  }
8508
8864
  function useCopyToClipboard() {
8509
- const [copied, set_copied] = React26.useState(false);
8510
- const copy = React26.useCallback(async (text) => {
8865
+ const [copied, set_copied] = React27.useState(false);
8866
+ const copy = React27.useCallback(async (text) => {
8511
8867
  if (typeof navigator === "undefined" || !navigator.clipboard) {
8512
8868
  return;
8513
8869
  }
@@ -8539,8 +8895,8 @@ function useLocalStorage(key, initialValue) {
8539
8895
  return initialValue;
8540
8896
  }
8541
8897
  };
8542
- const [stored_value, set_stored_value] = React26.useState(read_stored);
8543
- const set_value = React26.useCallback(
8898
+ const [stored_value, set_stored_value] = React27.useState(read_stored);
8899
+ const set_value = React27.useCallback(
8544
8900
  (value) => {
8545
8901
  set_stored_value((prev) => {
8546
8902
  const next = typeof value === "function" ? value(prev) : value;
@@ -8567,8 +8923,8 @@ function useSessionStorage(key, initialValue) {
8567
8923
  return initialValue;
8568
8924
  }
8569
8925
  };
8570
- const [stored_value, set_stored_value] = React26.useState(read_stored);
8571
- const set_value = React26.useCallback(
8926
+ const [stored_value, set_stored_value] = React27.useState(read_stored);
8927
+ const set_value = React27.useCallback(
8572
8928
  (value) => {
8573
8929
  set_stored_value((prev) => {
8574
8930
  const next = typeof value === "function" ? value(prev) : value;
@@ -8586,7 +8942,7 @@ function useSessionStorage(key, initialValue) {
8586
8942
  return [stored_value, set_value];
8587
8943
  }
8588
8944
  function useClickOutside(ref, handler) {
8589
- React26.useEffect(() => {
8945
+ React27.useEffect(() => {
8590
8946
  if (typeof document === "undefined") return;
8591
8947
  const handle_event = (event) => {
8592
8948
  const target = event.target;
@@ -8605,9 +8961,9 @@ function useClickOutside(ref, handler) {
8605
8961
  }
8606
8962
  function useWakeLock() {
8607
8963
  const supported = typeof navigator !== "undefined" && "wakeLock" in navigator;
8608
- const sentinel_ref = React26.useRef(null);
8609
- const [acquired, set_acquired] = React26.useState(false);
8610
- const request = React26.useCallback(async () => {
8964
+ const sentinel_ref = React27.useRef(null);
8965
+ const [acquired, set_acquired] = React27.useState(false);
8966
+ const request = React27.useCallback(async () => {
8611
8967
  if (!supported || sentinel_ref.current) return;
8612
8968
  try {
8613
8969
  const sentinel = await navigator.wakeLock.request("screen");
@@ -8620,7 +8976,7 @@ function useWakeLock() {
8620
8976
  } catch {
8621
8977
  }
8622
8978
  }, [supported]);
8623
- const release = React26.useCallback(async () => {
8979
+ const release = React27.useCallback(async () => {
8624
8980
  if (!sentinel_ref.current) return;
8625
8981
  try {
8626
8982
  await sentinel_ref.current.release();
@@ -8630,7 +8986,7 @@ function useWakeLock() {
8630
8986
  set_acquired(false);
8631
8987
  }
8632
8988
  }, []);
8633
- React26.useEffect(() => {
8989
+ React27.useEffect(() => {
8634
8990
  if (typeof document === "undefined") return;
8635
8991
  const handle_visibility = () => {
8636
8992
  if (document.visibilityState === "visible" && acquired && !sentinel_ref.current) {
@@ -8640,7 +8996,7 @@ function useWakeLock() {
8640
8996
  document.addEventListener("visibilitychange", handle_visibility);
8641
8997
  return () => document.removeEventListener("visibilitychange", handle_visibility);
8642
8998
  }, [acquired, request]);
8643
- React26.useEffect(() => {
8999
+ React27.useEffect(() => {
8644
9000
  return () => {
8645
9001
  if (sentinel_ref.current) {
8646
9002
  void sentinel_ref.current.release().catch(() => void 0);
@@ -8651,8 +9007,8 @@ function useWakeLock() {
8651
9007
  return { supported, acquired, request, release };
8652
9008
  }
8653
9009
  function useFullscreen(elementRef) {
8654
- const [is_fullscreen, set_is_fullscreen] = React26.useState(false);
8655
- React26.useEffect(() => {
9010
+ const [is_fullscreen, set_is_fullscreen] = React27.useState(false);
9011
+ React27.useEffect(() => {
8656
9012
  if (typeof document === "undefined") return;
8657
9013
  const handle_change = () => {
8658
9014
  set_is_fullscreen(!!document.fullscreenElement);
@@ -8661,10 +9017,10 @@ function useFullscreen(elementRef) {
8661
9017
  set_is_fullscreen(!!document.fullscreenElement);
8662
9018
  return () => document.removeEventListener("fullscreenchange", handle_change);
8663
9019
  }, []);
8664
- const get_target = React26.useCallback(() => {
9020
+ const get_target = React27.useCallback(() => {
8665
9021
  return elementRef?.current ?? document.documentElement;
8666
9022
  }, [elementRef]);
8667
- const enter = React26.useCallback(async () => {
9023
+ const enter = React27.useCallback(async () => {
8668
9024
  if (typeof document === "undefined" || !document.documentElement.requestFullscreen) return;
8669
9025
  if (document.fullscreenElement) return;
8670
9026
  try {
@@ -8672,7 +9028,7 @@ function useFullscreen(elementRef) {
8672
9028
  } catch {
8673
9029
  }
8674
9030
  }, [get_target]);
8675
- const exit = React26.useCallback(async () => {
9031
+ const exit = React27.useCallback(async () => {
8676
9032
  if (typeof document === "undefined") return;
8677
9033
  if (!document.fullscreenElement) return;
8678
9034
  try {
@@ -8680,7 +9036,7 @@ function useFullscreen(elementRef) {
8680
9036
  } catch {
8681
9037
  }
8682
9038
  }, []);
8683
- const toggle = React26.useCallback(async () => {
9039
+ const toggle = React27.useCallback(async () => {
8684
9040
  if (document.fullscreenElement) {
8685
9041
  await exit();
8686
9042
  } else {
@@ -8691,13 +9047,13 @@ function useFullscreen(elementRef) {
8691
9047
  }
8692
9048
  function use_wake_lock(active) {
8693
9049
  const { acquired, request, release } = useWakeLock();
8694
- React26.useEffect(() => {
9050
+ React27.useEffect(() => {
8695
9051
  if (active && !acquired) void request();
8696
9052
  if (!active && acquired) void release();
8697
9053
  }, [active, acquired, request, release]);
8698
9054
  }
8699
9055
  function use_fullscreen() {
8700
- const ref = React26.useRef(null);
9056
+ const ref = React27.useRef(null);
8701
9057
  const { isFullscreen, toggle } = useFullscreen(ref);
8702
9058
  return { is_fullscreen: isFullscreen, toggle, ref };
8703
9059
  }
@@ -8744,6 +9100,9 @@ function KanbanCard({
8744
9100
  tabIndex: 0,
8745
9101
  "aria-roledescription": "draggable card",
8746
9102
  "aria-grabbed": isDragging,
9103
+ onDoubleClick: () => {
9104
+ if (showEdit && onEditRequest && !dragging) onEditRequest(item);
9105
+ },
8747
9106
  children: [
8748
9107
  showEdit && onEditRequest && !dragging && /* @__PURE__ */ jsxRuntime.jsx(
8749
9108
  "button",
@@ -8850,29 +9209,29 @@ function KanbanEditor({
8850
9209
  onSave,
8851
9210
  onClose
8852
9211
  }) {
8853
- const [draft, set_draft] = React26__namespace.useState(item);
8854
- const [saving, set_saving] = React26__namespace.useState(false);
8855
- const [error, set_error] = React26__namespace.useState(null);
9212
+ const [draft, set_draft] = React27__namespace.useState(item);
9213
+ const [saving, set_saving] = React27__namespace.useState(false);
9214
+ const [error, set_error] = React27__namespace.useState(null);
8856
9215
  const item_id = item?.id ?? null;
8857
- React26__namespace.useEffect(() => {
9216
+ React27__namespace.useEffect(() => {
8858
9217
  set_draft(item);
8859
9218
  set_error(null);
8860
9219
  set_saving(false);
8861
9220
  }, [item_id]);
8862
9221
  const resolved_columns = columns ?? [];
8863
9222
  const resolved_priorities = priorities ?? DEFAULT_PRIORITIES;
8864
- const resolved_fields = React26__namespace.useMemo(() => {
9223
+ const resolved_fields = React27__namespace.useMemo(() => {
8865
9224
  if (fields) return fields;
8866
9225
  if (!item) return [];
8867
9226
  return auto_detect_fields(item, resolved_columns);
8868
9227
  }, [fields, item, resolved_columns]);
8869
- const required_keys = React26__namespace.useMemo(
9228
+ const required_keys = React27__namespace.useMemo(
8870
9229
  () => resolved_fields.filter(
8871
9230
  (f) => f.required && (f.type === "text" || f.type === "textarea" || f.type === "number")
8872
9231
  ).map((f) => f.key),
8873
9232
  [resolved_fields]
8874
9233
  );
8875
- const all_required_filled = React26__namespace.useMemo(() => {
9234
+ const all_required_filled = React27__namespace.useMemo(() => {
8876
9235
  if (!draft) return false;
8877
9236
  for (const key of required_keys) {
8878
9237
  const v = draft[key];
@@ -8881,7 +9240,7 @@ function KanbanEditor({
8881
9240
  }
8882
9241
  return true;
8883
9242
  }, [draft, required_keys]);
8884
- const is_dirty = React26__namespace.useMemo(() => {
9243
+ const is_dirty = React27__namespace.useMemo(() => {
8885
9244
  if (!draft || !item) return false;
8886
9245
  try {
8887
9246
  return JSON.stringify(draft) !== JSON.stringify(item);
@@ -8889,7 +9248,7 @@ function KanbanEditor({
8889
9248
  return draft !== item;
8890
9249
  }
8891
9250
  }, [draft, item]);
8892
- const handle_save = React26__namespace.useCallback(async () => {
9251
+ const handle_save = React27__namespace.useCallback(async () => {
8893
9252
  if (!draft || !item) return;
8894
9253
  if (saving) return;
8895
9254
  set_error(null);
@@ -9014,6 +9373,15 @@ function KanbanEditorFieldRow({
9014
9373
  onChange: (e) => set_value(e.target.value)
9015
9374
  }
9016
9375
  ),
9376
+ field.type === "richtext" && /* @__PURE__ */ jsxRuntime.jsx(
9377
+ HazoUiRte,
9378
+ {
9379
+ html: typeof value === "string" ? value : "",
9380
+ min_height: "180px",
9381
+ placeholder: field.placeholder,
9382
+ on_change: (out) => set_value(out.html)
9383
+ }
9384
+ ),
9017
9385
  field.type === "textarea" && /* @__PURE__ */ jsxRuntime.jsx(
9018
9386
  Textarea,
9019
9387
  {
@@ -9108,11 +9476,11 @@ function HazoUiKanbanFilter({
9108
9476
  className
9109
9477
  }) {
9110
9478
  const is_controlled = value !== void 0;
9111
- const [internal, set_internal] = React26__namespace.useState(
9479
+ const [internal, set_internal] = React27__namespace.useState(
9112
9480
  defaultValue ?? EMPTY_FILTER
9113
9481
  );
9114
9482
  const current = is_controlled ? value : internal;
9115
- const update = React26__namespace.useCallback(
9483
+ const update = React27__namespace.useCallback(
9116
9484
  (next) => {
9117
9485
  if (!is_controlled) set_internal(next);
9118
9486
  onChange?.(next);
@@ -9275,29 +9643,29 @@ function HazoUiKanban({
9275
9643
  onCardSave,
9276
9644
  disableEdit = false
9277
9645
  }) {
9278
- const label_fn = React26__namespace.useCallback(
9646
+ const label_fn = React27__namespace.useCallback(
9279
9647
  (item) => itemLabel ? itemLabel(item) : item.id,
9280
9648
  [itemLabel]
9281
9649
  );
9282
- const dnd_context_id = React26__namespace.useId();
9283
- const [overlay, set_overlay] = React26__namespace.useState(
9650
+ const dnd_context_id = React27__namespace.useId();
9651
+ const [overlay, set_overlay] = React27__namespace.useState(
9284
9652
  /* @__PURE__ */ new Map()
9285
9653
  );
9286
- const [active_id, set_active_id] = React26__namespace.useState(null);
9287
- const [active_tab, set_active_tab] = React26__namespace.useState(columns[0]?.key ?? "");
9288
- const [editing_item, set_editing_item] = React26__namespace.useState(null);
9654
+ const [active_id, set_active_id] = React27__namespace.useState(null);
9655
+ const [active_tab, set_active_tab] = React27__namespace.useState(columns[0]?.key ?? "");
9656
+ const [editing_item, set_editing_item] = React27__namespace.useState(null);
9289
9657
  const show_edit = !disableEdit && typeof onCardSave === "function";
9290
- const handle_edit_request = React26__namespace.useCallback(
9658
+ const handle_edit_request = React27__namespace.useCallback(
9291
9659
  (it) => {
9292
9660
  const typed = items.find((x) => x.id === it.id);
9293
9661
  if (typed) set_editing_item(typed);
9294
9662
  },
9295
9663
  [items]
9296
9664
  );
9297
- const handle_editor_close = React26__namespace.useCallback(() => {
9665
+ const handle_editor_close = React27__namespace.useCallback(() => {
9298
9666
  set_editing_item(null);
9299
9667
  }, []);
9300
- React26__namespace.useEffect(() => {
9668
+ React27__namespace.useEffect(() => {
9301
9669
  if (overlay.size === 0) return;
9302
9670
  set_overlay((prev) => {
9303
9671
  let changed = false;
@@ -9312,11 +9680,11 @@ function HazoUiKanban({
9312
9680
  return changed ? next : prev;
9313
9681
  });
9314
9682
  }, [items, overlay]);
9315
- const grouped = React26__namespace.useMemo(
9683
+ const grouped = React27__namespace.useMemo(
9316
9684
  () => group_items_by_column(items, overlay, columns),
9317
9685
  [items, overlay, columns]
9318
9686
  );
9319
- const find_item = React26__namespace.useCallback(
9687
+ const find_item = React27__namespace.useCallback(
9320
9688
  (id) => items.find((i) => i.id === id),
9321
9689
  [items]
9322
9690
  );
@@ -9324,7 +9692,7 @@ function HazoUiKanban({
9324
9692
  core$1.useSensor(core$1.PointerSensor, { activationConstraint: { distance: 5 } }),
9325
9693
  core$1.useSensor(core$1.KeyboardSensor, { coordinateGetter: sortable.sortableKeyboardCoordinates })
9326
9694
  );
9327
- const merged_announcements = React26__namespace.useMemo(() => {
9695
+ const merged_announcements = React27__namespace.useMemo(() => {
9328
9696
  const defaults = default_announcements(label_fn);
9329
9697
  return {
9330
9698
  onDragStart: announcements?.onDragStart ?? defaults.onDragStart,
@@ -9333,7 +9701,7 @@ function HazoUiKanban({
9333
9701
  onDragCancel: announcements?.onDragCancel ?? defaults.onDragCancel
9334
9702
  };
9335
9703
  }, [announcements, label_fn]);
9336
- const dnd_announcements = React26__namespace.useMemo(
9704
+ const dnd_announcements = React27__namespace.useMemo(
9337
9705
  () => ({
9338
9706
  onDragStart({ active }) {
9339
9707
  const id = String(active.id);
@@ -9391,10 +9759,10 @@ function HazoUiKanban({
9391
9759
  }),
9392
9760
  [find_item, columns, grouped, merged_announcements]
9393
9761
  );
9394
- const handle_drag_start = React26__namespace.useCallback((event) => {
9762
+ const handle_drag_start = React27__namespace.useCallback((event) => {
9395
9763
  set_active_id(String(event.active.id));
9396
9764
  }, []);
9397
- const make_revert_handle = React26__namespace.useCallback(
9765
+ const make_revert_handle = React27__namespace.useCallback(
9398
9766
  (item_id) => ({
9399
9767
  revert: () => {
9400
9768
  set_overlay((prev) => {
@@ -9407,7 +9775,7 @@ function HazoUiKanban({
9407
9775
  }),
9408
9776
  []
9409
9777
  );
9410
- const handle_drag_end = React26__namespace.useCallback(
9778
+ const handle_drag_end = React27__namespace.useCallback(
9411
9779
  (event) => {
9412
9780
  const active_id_str = String(event.active.id);
9413
9781
  set_active_id(null);
@@ -9469,7 +9837,7 @@ function HazoUiKanban({
9469
9837
  },
9470
9838
  [find_item, columns, grouped, onMove, onReorder, make_revert_handle]
9471
9839
  );
9472
- const handle_drag_cancel = React26__namespace.useCallback(() => {
9840
+ const handle_drag_cancel = React27__namespace.useCallback(() => {
9473
9841
  set_active_id(null);
9474
9842
  }, []);
9475
9843
  const active_item = active_id ? find_item(active_id) : null;
@@ -9560,7 +9928,7 @@ function HazoUiKanban({
9560
9928
  }
9561
9929
  );
9562
9930
  }
9563
- var Table2 = React26__namespace.forwardRef(
9931
+ var Table2 = React27__namespace.forwardRef(
9564
9932
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cls_table_wrap relative w-full overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
9565
9933
  "table",
9566
9934
  {
@@ -9571,11 +9939,11 @@ var Table2 = React26__namespace.forwardRef(
9571
9939
  ) })
9572
9940
  );
9573
9941
  Table2.displayName = "Table";
9574
- var TableHeader2 = React26__namespace.forwardRef(
9942
+ var TableHeader2 = React27__namespace.forwardRef(
9575
9943
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props })
9576
9944
  );
9577
9945
  TableHeader2.displayName = "TableHeader";
9578
- var TableBody = React26__namespace.forwardRef(
9946
+ var TableBody = React27__namespace.forwardRef(
9579
9947
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
9580
9948
  "tbody",
9581
9949
  {
@@ -9586,7 +9954,7 @@ var TableBody = React26__namespace.forwardRef(
9586
9954
  )
9587
9955
  );
9588
9956
  TableBody.displayName = "TableBody";
9589
- var TableFooter = React26__namespace.forwardRef(
9957
+ var TableFooter = React27__namespace.forwardRef(
9590
9958
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
9591
9959
  "tfoot",
9592
9960
  {
@@ -9597,7 +9965,7 @@ var TableFooter = React26__namespace.forwardRef(
9597
9965
  )
9598
9966
  );
9599
9967
  TableFooter.displayName = "TableFooter";
9600
- var TableRow2 = React26__namespace.forwardRef(
9968
+ var TableRow2 = React27__namespace.forwardRef(
9601
9969
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
9602
9970
  "tr",
9603
9971
  {
@@ -9611,7 +9979,7 @@ var TableRow2 = React26__namespace.forwardRef(
9611
9979
  )
9612
9980
  );
9613
9981
  TableRow2.displayName = "TableRow";
9614
- var TableHead = React26__namespace.forwardRef(
9982
+ var TableHead = React27__namespace.forwardRef(
9615
9983
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
9616
9984
  "th",
9617
9985
  {
@@ -9625,7 +9993,7 @@ var TableHead = React26__namespace.forwardRef(
9625
9993
  )
9626
9994
  );
9627
9995
  TableHead.displayName = "TableHead";
9628
- var TableCell2 = React26__namespace.forwardRef(
9996
+ var TableCell2 = React27__namespace.forwardRef(
9629
9997
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
9630
9998
  "td",
9631
9999
  {
@@ -9636,7 +10004,7 @@ var TableCell2 = React26__namespace.forwardRef(
9636
10004
  )
9637
10005
  );
9638
10006
  TableCell2.displayName = "TableCell";
9639
- var TableCaption = React26__namespace.forwardRef(
10007
+ var TableCaption = React27__namespace.forwardRef(
9640
10008
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
9641
10009
  "caption",
9642
10010
  {
@@ -9691,64 +10059,64 @@ function TableMobileCards(props) {
9691
10059
  }
9692
10060
  var DEFAULT_DEBOUNCE_MS = 200;
9693
10061
  function useTableState(props) {
9694
- const [sortInternal, setSortInternal] = React26.useState(
10062
+ const [sortInternal, setSortInternal] = React27.useState(
9695
10063
  () => normalizeSortProp(props.defaultSort)
9696
10064
  );
9697
10065
  const isSortControlled = props.sort !== void 0;
9698
10066
  const sort = isSortControlled ? normalizeSortProp(props.sort) : sortInternal;
9699
- const setSort = React26.useCallback(
10067
+ const setSort = React27.useCallback(
9700
10068
  (next) => {
9701
10069
  if (!isSortControlled) setSortInternal(next);
9702
10070
  props.onSortChange?.(next);
9703
10071
  },
9704
10072
  [isSortControlled, props.onSortChange]
9705
10073
  );
9706
- const cycleHeaderSort = React26.useCallback(
10074
+ const cycleHeaderSort = React27.useCallback(
9707
10075
  (key, append) => {
9708
10076
  const next = append ? cycleAppendColumn(sort, key) : cycleSingleColumn(sort, key);
9709
10077
  setSort(next);
9710
10078
  },
9711
10079
  [sort, setSort]
9712
10080
  );
9713
- const [filterInternal, setFilterInternal] = React26.useState(
10081
+ const [filterInternal, setFilterInternal] = React27.useState(
9714
10082
  () => props.defaultFilter ?? {}
9715
10083
  );
9716
10084
  const isFilterControlled = props.filter !== void 0;
9717
10085
  const filter = isFilterControlled ? props.filter : filterInternal;
9718
- const setFilter = React26.useCallback(
10086
+ const setFilter = React27.useCallback(
9719
10087
  (next) => {
9720
10088
  if (!isFilterControlled) setFilterInternal(next);
9721
10089
  props.onFilterChange?.(next);
9722
10090
  },
9723
10091
  [isFilterControlled, props.onFilterChange]
9724
10092
  );
9725
- const [searchDraft, setSearchDraft] = React26.useState(
10093
+ const [searchDraft, setSearchDraft] = React27.useState(
9726
10094
  filter.search ?? ""
9727
10095
  );
9728
10096
  const debounceMs = props.searchDebounceMs ?? DEFAULT_DEBOUNCE_MS;
9729
- React26.useEffect(() => {
10097
+ React27.useEffect(() => {
9730
10098
  const handle = setTimeout(() => {
9731
10099
  if (searchDraft === (filter.search ?? "")) return;
9732
10100
  setFilter({ ...filter, search: searchDraft || void 0 });
9733
10101
  }, debounceMs);
9734
10102
  return () => clearTimeout(handle);
9735
10103
  }, [searchDraft, debounceMs]);
9736
- const setSearch = React26.useCallback((s) => setSearchDraft(s), []);
9737
- const [pageInternal, setPageInternal] = React26.useState(
10104
+ const setSearch = React27.useCallback((s) => setSearchDraft(s), []);
10105
+ const [pageInternal, setPageInternal] = React27.useState(
9738
10106
  () => props.defaultPage ?? 0
9739
10107
  );
9740
10108
  const isPageControlled = props.page !== void 0;
9741
10109
  const page = isPageControlled ? props.page : pageInternal;
9742
- const setPage = React26.useCallback(
10110
+ const setPage = React27.useCallback(
9743
10111
  (next) => {
9744
10112
  if (!isPageControlled) setPageInternal(next);
9745
10113
  props.onPageChange?.(next);
9746
10114
  },
9747
10115
  [isPageControlled, props.onPageChange]
9748
10116
  );
9749
- const prevSortKey = React26.useRef(serializeSort(sort));
9750
- const prevFilterKey = React26.useRef(serializeFilter(filter));
9751
- React26.useEffect(() => {
10117
+ const prevSortKey = React27.useRef(serializeSort(sort));
10118
+ const prevFilterKey = React27.useRef(serializeFilter(filter));
10119
+ React27.useEffect(() => {
9752
10120
  const sk = serializeSort(sort);
9753
10121
  const fk = serializeFilter(filter);
9754
10122
  if (sk !== prevSortKey.current || fk !== prevFilterKey.current) {
@@ -9759,24 +10127,24 @@ function useTableState(props) {
9759
10127
  }, [sort, filter, isPageControlled]);
9760
10128
  const pageSize = props.pagination && typeof props.pagination === "object" ? props.pagination.pageSize : 0;
9761
10129
  const isServerMode = typeof props.onLoad === "function";
9762
- const filtered = React26.useMemo(
10130
+ const filtered = React27.useMemo(
9763
10131
  () => isServerMode ? props.rows : applyFilter(props.rows, filter, props.columns),
9764
10132
  [props.rows, filter, props.columns, isServerMode]
9765
10133
  );
9766
- const sorted = React26.useMemo(
10134
+ const sorted = React27.useMemo(
9767
10135
  () => isServerMode ? filtered : applySort(filtered, sort),
9768
10136
  [filtered, sort, isServerMode]
9769
10137
  );
9770
- const pagedInMemory = React26.useMemo(() => {
10138
+ const pagedInMemory = React27.useMemo(() => {
9771
10139
  if (isServerMode || pageSize <= 0) return sorted;
9772
10140
  const start = page * pageSize;
9773
10141
  return sorted.slice(start, start + pageSize);
9774
10142
  }, [sorted, page, pageSize, isServerMode]);
9775
- const [serverRows, setServerRows] = React26.useState([]);
9776
- const [serverTotal, setServerTotal] = React26.useState(0);
9777
- const [serverError, setServerError] = React26.useState(null);
9778
- const reqIdRef = React26.useRef(0);
9779
- React26.useEffect(() => {
10143
+ const [serverRows, setServerRows] = React27.useState([]);
10144
+ const [serverTotal, setServerTotal] = React27.useState(0);
10145
+ const [serverError, setServerError] = React27.useState(null);
10146
+ const reqIdRef = React27.useRef(0);
10147
+ React27.useEffect(() => {
9780
10148
  if (!isServerMode) return;
9781
10149
  const myId = ++reqIdRef.current;
9782
10150
  let cancelled = false;
@@ -10208,18 +10576,18 @@ function Toolbar2(props) {
10208
10576
  enableFilterDialog,
10209
10577
  searchPlaceholder
10210
10578
  } = props;
10211
- const sortFields = React26__namespace.useMemo(
10579
+ const sortFields = React27__namespace.useMemo(
10212
10580
  () => deriveSortFields(columns),
10213
10581
  [columns]
10214
10582
  );
10215
- const filterFields = React26__namespace.useMemo(
10583
+ const filterFields = React27__namespace.useMemo(
10216
10584
  () => deriveFilterFields(columns),
10217
10585
  [columns]
10218
10586
  );
10219
- const [searchValue, setSearchValue] = React26__namespace.useState(
10587
+ const [searchValue, setSearchValue] = React27__namespace.useState(
10220
10588
  filter.search ?? ""
10221
10589
  );
10222
- React26__namespace.useEffect(() => {
10590
+ React27__namespace.useEffect(() => {
10223
10591
  setSearchValue(filter.search ?? "");
10224
10592
  }, [filter.search]);
10225
10593
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cls_hazo_ui_table_toolbar flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between", children: [
@@ -10580,13 +10948,13 @@ function FunnelChart({
10580
10948
  showTooltip = true,
10581
10949
  className
10582
10950
  }) {
10583
- const [hover_idx, set_hover_idx] = React26__namespace.useState(null);
10951
+ const [hover_idx, set_hover_idx] = React27__namespace.useState(null);
10584
10952
  const fmt = valueFormat ?? format_num;
10585
10953
  const totals = steps.map(step_total);
10586
10954
  const value_max = Math.max(1, ...totals);
10587
10955
  const plot_w = width - PAD_LEFT2 - PAD_RIGHT2;
10588
10956
  const vbox_h = height ?? PAD_TOP2 + steps.length * ROW_H + PAD_BOTTOM2;
10589
- const handle_mouse_move = React26__namespace.useCallback(
10957
+ const handle_mouse_move = React27__namespace.useCallback(
10590
10958
  (e) => {
10591
10959
  if (steps.length === 0) return;
10592
10960
  const rect = e.currentTarget.getBoundingClientRect();
@@ -10601,7 +10969,7 @@ function FunnelChart({
10601
10969
  },
10602
10970
  [steps.length, vbox_h]
10603
10971
  );
10604
- const handle_mouse_leave = React26__namespace.useCallback(() => set_hover_idx(null), []);
10972
+ const handle_mouse_leave = React27__namespace.useCallback(() => set_hover_idx(null), []);
10605
10973
  return /* @__PURE__ */ jsxRuntime.jsxs(
10606
10974
  "svg",
10607
10975
  {
@@ -10789,21 +11157,21 @@ function celebrate(payload) {
10789
11157
  _enqueue(payload);
10790
11158
  }
10791
11159
  function CelebrationProvider({ children }) {
10792
- const [queue, set_queue] = React26__namespace.useState([]);
10793
- const enqueue = React26__namespace.useCallback((payload) => {
11160
+ const [queue, set_queue] = React27__namespace.useState([]);
11161
+ const enqueue = React27__namespace.useCallback((payload) => {
10794
11162
  const storage_key = `hazo_ui_celebration_${payload.id}`;
10795
11163
  if (typeof window !== "undefined" && sessionStorage.getItem(storage_key)) {
10796
11164
  return;
10797
11165
  }
10798
11166
  set_queue((q) => [...q, payload]);
10799
11167
  }, []);
10800
- React26__namespace.useEffect(() => {
11168
+ React27__namespace.useEffect(() => {
10801
11169
  _enqueue = enqueue;
10802
11170
  return () => {
10803
11171
  _enqueue = null;
10804
11172
  };
10805
11173
  }, [enqueue]);
10806
- const handle_close = React26__namespace.useCallback(() => {
11174
+ const handle_close = React27__namespace.useCallback(() => {
10807
11175
  set_queue((q) => q.slice(1));
10808
11176
  }, []);
10809
11177
  const current = queue[0] ?? null;
@@ -10832,14 +11200,14 @@ function CelebrationModalInner({
10832
11200
  autoDismissDelay = 8e3,
10833
11201
  audioChime = false
10834
11202
  } = payload;
10835
- const [visible, set_visible] = React26__namespace.useState(true);
10836
- const [is_downloading, set_is_downloading] = React26__namespace.useState(false);
10837
- const canvas_ref = React26__namespace.useRef(null);
10838
- const card_ref = React26__namespace.useRef(null);
10839
- React26__namespace.useEffect(() => {
11203
+ const [visible, set_visible] = React27__namespace.useState(true);
11204
+ const [is_downloading, set_is_downloading] = React27__namespace.useState(false);
11205
+ const canvas_ref = React27__namespace.useRef(null);
11206
+ const card_ref = React27__namespace.useRef(null);
11207
+ React27__namespace.useEffect(() => {
10840
11208
  sessionStorage.setItem(`hazo_ui_celebration_${id}`, "1");
10841
11209
  }, [id]);
10842
- React26__namespace.useEffect(() => {
11210
+ React27__namespace.useEffect(() => {
10843
11211
  if (!canvas_ref.current) return;
10844
11212
  let confetti_instance = null;
10845
11213
  import('canvas-confetti').then(({ default: confetti }) => {
@@ -10856,18 +11224,18 @@ function CelebrationModalInner({
10856
11224
  confetti_instance?.reset();
10857
11225
  };
10858
11226
  }, []);
10859
- React26__namespace.useEffect(() => {
11227
+ React27__namespace.useEffect(() => {
10860
11228
  if (!audioChime) return;
10861
11229
  const audio = new Audio(celebration_chime_default);
10862
11230
  audio.play().catch(() => {
10863
11231
  });
10864
11232
  }, [audioChime]);
10865
- React26__namespace.useEffect(() => {
11233
+ React27__namespace.useEffect(() => {
10866
11234
  if (!autoDismiss) return;
10867
11235
  const timer = window.setTimeout(close_modal, autoDismissDelay);
10868
11236
  return () => window.clearTimeout(timer);
10869
11237
  }, [autoDismiss, autoDismissDelay]);
10870
- React26__namespace.useEffect(() => {
11238
+ React27__namespace.useEffect(() => {
10871
11239
  const on_key = (e) => {
10872
11240
  if (e.key === "Escape") close_modal();
10873
11241
  };
@@ -11116,8 +11484,8 @@ function useEtaProgress(opts) {
11116
11484
  loadDurations,
11117
11485
  appendDuration
11118
11486
  } = opts;
11119
- const [value, setValue] = React26__namespace.useState(0);
11120
- const stateRef = React26__namespace.useRef({
11487
+ const [value, setValue] = React27__namespace.useState(0);
11488
+ const stateRef = React27__namespace.useRef({
11121
11489
  started: false,
11122
11490
  finished: false,
11123
11491
  startTime: 0,
@@ -11127,14 +11495,14 @@ function useEtaProgress(opts) {
11127
11495
  eta: 0,
11128
11496
  rafId: 0
11129
11497
  });
11130
- const stop = React26__namespace.useCallback(() => {
11498
+ const stop = React27__namespace.useCallback(() => {
11131
11499
  if (stateRef.current.rafId) {
11132
11500
  cancelAnimationFrame(stateRef.current.rafId);
11133
11501
  stateRef.current.rafId = 0;
11134
11502
  }
11135
11503
  }, []);
11136
- React26__namespace.useEffect(() => stop, [stop]);
11137
- const tick = React26__namespace.useCallback(() => {
11504
+ React27__namespace.useEffect(() => stop, [stop]);
11505
+ const tick = React27__namespace.useCallback(() => {
11138
11506
  const s = stateRef.current;
11139
11507
  if (s.finished || !s.started) return;
11140
11508
  const elapsed = Date.now() - s.startTime;
@@ -11143,7 +11511,7 @@ function useEtaProgress(opts) {
11143
11511
  setValue(Math.max(timeValue, unitValue));
11144
11512
  s.rafId = requestAnimationFrame(tick);
11145
11513
  }, [unitCount]);
11146
- const start = React26__namespace.useCallback(() => {
11514
+ const start = React27__namespace.useCallback(() => {
11147
11515
  const s = stateRef.current;
11148
11516
  if (s.started) return;
11149
11517
  const window2 = loadDurations();
@@ -11157,13 +11525,13 @@ function useEtaProgress(opts) {
11157
11525
  stop();
11158
11526
  s.rafId = requestAnimationFrame(tick);
11159
11527
  }, [loadDurations, unitCount, concurrency, fallbackUnitMs, stop, tick]);
11160
- const unitDone = React26__namespace.useCallback(() => {
11528
+ const unitDone = React27__namespace.useCallback(() => {
11161
11529
  const s = stateRef.current;
11162
11530
  if (!s.started || s.finished) return;
11163
11531
  s.unitsDone = Math.min(s.unitsDone + 1, unitCount);
11164
11532
  s.unitTimestamps.push(Date.now());
11165
11533
  }, [unitCount]);
11166
- const finish = React26__namespace.useCallback(() => {
11534
+ const finish = React27__namespace.useCallback(() => {
11167
11535
  const s = stateRef.current;
11168
11536
  if (s.finished) return;
11169
11537
  s.finished = true;
@@ -11191,14 +11559,14 @@ function HazoUiEtaProgress({
11191
11559
  handleRef,
11192
11560
  className
11193
11561
  }) {
11194
- const { value: stored, append } = client$1.useHazoState(estimateKey, {
11562
+ const { value: stored, append } = client$2.useHazoState(estimateKey, {
11195
11563
  level,
11196
11564
  fallback: [],
11197
11565
  ...endpoint ? { endpoint } : {}
11198
11566
  });
11199
11567
  const durationWindow = Array.isArray(stored) ? stored : [];
11200
- const loadDurations = React26__namespace.useCallback(() => durationWindow, [durationWindow]);
11201
- const appendDuration = React26__namespace.useCallback(
11568
+ const loadDurations = React27__namespace.useCallback(() => durationWindow, [durationWindow]);
11569
+ const appendDuration = React27__namespace.useCallback(
11202
11570
  (ms) => {
11203
11571
  append(ms, windowSize);
11204
11572
  },
@@ -11211,7 +11579,7 @@ function HazoUiEtaProgress({
11211
11579
  loadDurations,
11212
11580
  appendDuration
11213
11581
  });
11214
- React26__namespace.useEffect(() => {
11582
+ React27__namespace.useEffect(() => {
11215
11583
  if (handleRef) {
11216
11584
  handleRef.current = handle;
11217
11585
  }
@@ -11248,13 +11616,13 @@ function HazoUiMemoryDropdown({
11248
11616
  add_entry,
11249
11617
  empty_label = "No history yet"
11250
11618
  }) {
11251
- const { value: stored, setValue } = client$1.useHazoState(history_key, {
11619
+ const { value: stored, setValue } = client$2.useHazoState(history_key, {
11252
11620
  level: "scope",
11253
11621
  fallback: []
11254
11622
  });
11255
11623
  const storedEntries = Array.isArray(stored) ? stored : [];
11256
- const [query, setQuery] = React26__namespace.useState("");
11257
- React26__namespace.useEffect(() => {
11624
+ const [query, setQuery] = React27__namespace.useState("");
11625
+ React27__namespace.useEffect(() => {
11258
11626
  if (!add_entry) return;
11259
11627
  const updated = upsertEntry(storedEntries, add_entry);
11260
11628
  setValue(updated);
@@ -11333,8 +11701,8 @@ function HazoUiMemoryDropdown({
11333
11701
  );
11334
11702
  }
11335
11703
  function EntryRow({ entry, on_select, onDelete }) {
11336
- const [deleteHovered, setDeleteHovered] = React26__namespace.useState(false);
11337
- const [rowHovered, setRowHovered] = React26__namespace.useState(false);
11704
+ const [deleteHovered, setDeleteHovered] = React27__namespace.useState(false);
11705
+ const [rowHovered, setRowHovered] = React27__namespace.useState(false);
11338
11706
  return /* @__PURE__ */ jsxRuntime.jsxs(
11339
11707
  "div",
11340
11708
  {
@@ -11391,72 +11759,198 @@ function EntryRow({ entry, on_select, onDelete }) {
11391
11759
  }
11392
11760
  );
11393
11761
  }
11394
- var ThemeContext = React26__namespace.createContext(void 0);
11395
- function HazoThemeProvider({
11396
- children,
11397
- defaultTheme = "system",
11398
- storageKey = "theme"
11762
+ function Logo({
11763
+ logoUrl,
11764
+ logoUrlDark,
11765
+ appTitle,
11766
+ href,
11767
+ height = 28,
11768
+ className,
11769
+ imgClassName
11399
11770
  }) {
11400
- const [theme, setTheme] = useLocalStorage(storageKey, defaultTheme);
11401
- const prefersDark = useMediaQuery("(prefers-color-scheme: dark)");
11402
- const resolvedTheme = theme === "system" ? prefersDark ? "dark" : "light" : theme;
11403
- React26__namespace.useEffect(() => {
11404
- document.documentElement.classList.toggle("dark", resolvedTheme === "dark");
11405
- }, [resolvedTheme]);
11406
- const toggleTheme = React26__namespace.useCallback(() => {
11407
- setTheme(resolvedTheme === "dark" ? "light" : "dark");
11408
- }, [resolvedTheme, setTheme]);
11409
- const value = React26__namespace.useMemo(
11410
- () => ({ theme, setTheme, resolvedTheme, toggleTheme }),
11411
- [theme, setTheme, resolvedTheme, toggleTheme]
11412
- );
11413
- return /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value, children });
11414
- }
11415
- function useTheme() {
11416
- const context = React26__namespace.useContext(ThemeContext);
11417
- if (context === void 0) {
11418
- throw new Error("useTheme must be used within a <HazoThemeProvider>");
11771
+ const alt = appTitle ?? "Logo";
11772
+ let content = null;
11773
+ if (logoUrl) {
11774
+ content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
11775
+ /* @__PURE__ */ jsxRuntime.jsx(
11776
+ "img",
11777
+ {
11778
+ src: logoUrl,
11779
+ alt,
11780
+ height,
11781
+ style: { height },
11782
+ className: cn("object-contain", logoUrlDark && "dark:hidden", imgClassName)
11783
+ }
11784
+ ),
11785
+ logoUrlDark ? /* @__PURE__ */ jsxRuntime.jsx(
11786
+ "img",
11787
+ {
11788
+ src: logoUrlDark,
11789
+ alt,
11790
+ height,
11791
+ style: { height },
11792
+ className: cn("hidden object-contain dark:block", imgClassName)
11793
+ }
11794
+ ) : null
11795
+ ] });
11796
+ } else if (appTitle) {
11797
+ content = /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-navbar-fg", children: appTitle });
11419
11798
  }
11420
- return context;
11799
+ if (content === null) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
11800
+ const resolvedHref = safeHref(href);
11801
+ if (resolvedHref) {
11802
+ return /* @__PURE__ */ jsxRuntime.jsx("a", { href: resolvedHref, className: cn("inline-flex items-center gap-2", className), children: content });
11803
+ }
11804
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("inline-flex items-center gap-2", className), children: content });
11421
11805
  }
11422
- function ThemeScript({ storageKey = "theme" }) {
11423
- const script = `(function(){try{var k=${JSON.stringify(
11424
- storageKey
11425
- )};var raw=localStorage.getItem(k);var t="system";if(raw){try{t=JSON.parse(raw);}catch(e){t=String(raw).replace(/^"|"$/g,"");}}var m=window.matchMedia("(prefers-color-scheme: dark)").matches;var isDark=t==="dark"||((t==="system"||!t)&&m);var c=document.documentElement.classList;if(isDark){c.add("dark");}else{c.remove("dark");}}catch(e){}})();`;
11426
- return /* @__PURE__ */ jsxRuntime.jsx("script", { dangerouslySetInnerHTML: { __html: script } });
11806
+ function AppHeader({ identity, homeHref, navItems, actions, className }) {
11807
+ return /* @__PURE__ */ jsxRuntime.jsxs(
11808
+ "header",
11809
+ {
11810
+ "aria-label": "Application header",
11811
+ className: cn(
11812
+ "flex w-full items-center justify-between gap-4 border-b bg-navbar text-navbar-fg border-navbar-border px-4 py-2.5",
11813
+ className
11814
+ ),
11815
+ children: [
11816
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [
11817
+ /* @__PURE__ */ jsxRuntime.jsx(
11818
+ Logo,
11819
+ {
11820
+ logoUrl: identity?.logoUrl,
11821
+ logoUrlDark: identity?.logoUrlDark,
11822
+ appTitle: identity?.appTitle,
11823
+ href: homeHref
11824
+ }
11825
+ ),
11826
+ navItems
11827
+ ] }),
11828
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-4", children: actions })
11829
+ ]
11830
+ }
11831
+ );
11427
11832
  }
11428
- var ThemeToggle = React26__namespace.forwardRef(
11429
- ({ className, ...props }, ref) => {
11430
- const { resolvedTheme, toggleTheme } = useTheme();
11431
- const [mounted, setMounted] = React26__namespace.useState(false);
11432
- React26__namespace.useEffect(() => {
11433
- setMounted(true);
11434
- }, []);
11435
- const isDark = mounted && resolvedTheme === "dark";
11436
- const label = isDark ? "Switch to light theme" : "Switch to dark theme";
11437
- return /* @__PURE__ */ jsxRuntime.jsx(
11438
- "button",
11833
+ function AppFooter({ variant, footer, identity, className }) {
11834
+ const cfg = footer ?? identity?.footer?.[variant];
11835
+ if (variant === "app") {
11836
+ const links = cfg?.columns?.[0]?.links;
11837
+ return /* @__PURE__ */ jsxRuntime.jsxs(
11838
+ "footer",
11439
11839
  {
11440
- type: "button",
11441
- ref,
11442
- onClick: toggleTheme,
11443
- "aria-label": label,
11444
11840
  className: cn(
11445
- "inline-flex h-9 w-9 items-center justify-center rounded-full text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",
11841
+ "flex w-full items-center justify-between gap-4 border-t bg-footer-app text-footer-app-fg border-footer-app-border px-4 py-2 text-sm",
11446
11842
  className
11447
11843
  ),
11448
- ...props,
11449
- children: isDark ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sun, { className: "h-4 w-4" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Moon, { className: "h-4 w-4" })
11844
+ children: [
11845
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-footer-app-fg-muted", children: cfg?.copyright }),
11846
+ links && links.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-4", children: links.map((link, i) => /* @__PURE__ */ jsxRuntime.jsx(
11847
+ "a",
11848
+ {
11849
+ href: safeHref(link.href),
11850
+ className: "text-footer-app-fg-muted hover:text-footer-app-fg",
11851
+ children: link.label
11852
+ },
11853
+ `${link.href}-${i}`
11854
+ )) }) : null
11855
+ ]
11450
11856
  }
11451
11857
  );
11452
11858
  }
11453
- );
11454
- ThemeToggle.displayName = "ThemeToggle";
11859
+ const showBrandRow = Boolean(identity?.logoUrl || identity?.appTitle);
11860
+ return /* @__PURE__ */ jsxRuntime.jsxs(
11861
+ "footer",
11862
+ {
11863
+ className: cn(
11864
+ "w-full border-t bg-footer-public text-footer-public-fg border-footer-public-border px-6 py-10",
11865
+ className
11866
+ ),
11867
+ children: [
11868
+ showBrandRow ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-8", children: /* @__PURE__ */ jsxRuntime.jsx(
11869
+ Logo,
11870
+ {
11871
+ logoUrl: identity?.logoUrl,
11872
+ logoUrlDark: identity?.logoUrlDark,
11873
+ appTitle: identity?.appTitle
11874
+ }
11875
+ ) }) : null,
11876
+ cfg?.columns && cfg.columns.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-8 md:grid-cols-4", children: cfg.columns.map((column, idx) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
11877
+ column.heading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium text-footer-public-fg", children: column.heading }) : null,
11878
+ column.links.map((link, i) => /* @__PURE__ */ jsxRuntime.jsx(
11879
+ "a",
11880
+ {
11881
+ href: safeHref(link.href),
11882
+ className: "text-footer-public-fg-muted hover:text-footer-public-fg",
11883
+ children: link.label
11884
+ },
11885
+ `${link.href}-${i}`
11886
+ ))
11887
+ ] }, column.heading ?? idx)) }) : null,
11888
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-8 flex flex-wrap items-center justify-between gap-4", children: [
11889
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-footer-public-fg-muted", children: cfg?.copyright }),
11890
+ cfg?.social ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [
11891
+ cfg.social.github ? /* @__PURE__ */ jsxRuntime.jsx(
11892
+ "a",
11893
+ {
11894
+ href: safeHref(cfg.social.github),
11895
+ className: "text-footer-public-fg-muted hover:text-footer-public-fg",
11896
+ children: "GitHub"
11897
+ }
11898
+ ) : null,
11899
+ cfg.social.twitter ? /* @__PURE__ */ jsxRuntime.jsx(
11900
+ "a",
11901
+ {
11902
+ href: safeHref(cfg.social.twitter),
11903
+ className: "text-footer-public-fg-muted hover:text-footer-public-fg",
11904
+ children: "Twitter"
11905
+ }
11906
+ ) : null,
11907
+ cfg.social.linkedin ? /* @__PURE__ */ jsxRuntime.jsx(
11908
+ "a",
11909
+ {
11910
+ href: safeHref(cfg.social.linkedin),
11911
+ className: "text-footer-public-fg-muted hover:text-footer-public-fg",
11912
+ children: "LinkedIn"
11913
+ }
11914
+ ) : null,
11915
+ cfg.social.website ? /* @__PURE__ */ jsxRuntime.jsx(
11916
+ "a",
11917
+ {
11918
+ href: safeHref(cfg.social.website),
11919
+ className: "text-footer-public-fg-muted hover:text-footer-public-fg",
11920
+ children: "Website"
11921
+ }
11922
+ ) : null
11923
+ ] }) : null
11924
+ ] })
11925
+ ]
11926
+ }
11927
+ );
11928
+ }
11455
11929
 
11456
11930
  Object.defineProperty(exports, "rawToast", {
11457
11931
  enumerable: true,
11458
11932
  get: function () { return sonner.toast; }
11459
11933
  });
11934
+ Object.defineProperty(exports, "HazoThemeProvider", {
11935
+ enumerable: true,
11936
+ get: function () { return client.HazoThemeProvider; }
11937
+ });
11938
+ Object.defineProperty(exports, "ThemeScript", {
11939
+ enumerable: true,
11940
+ get: function () { return client.ThemeScript; }
11941
+ });
11942
+ Object.defineProperty(exports, "ThemeSetPicker", {
11943
+ enumerable: true,
11944
+ get: function () { return client.ThemeSetPicker; }
11945
+ });
11946
+ Object.defineProperty(exports, "ThemeToggle", {
11947
+ enumerable: true,
11948
+ get: function () { return client.ThemeToggle; }
11949
+ });
11950
+ Object.defineProperty(exports, "useTheme", {
11951
+ enumerable: true,
11952
+ get: function () { return client.useTheme; }
11953
+ });
11460
11954
  exports.ANIMATION_PRESETS = ANIMATION_PRESETS;
11461
11955
  exports.Accordion = Accordion;
11462
11956
  exports.AccordionContent = AccordionContent;
@@ -11473,6 +11967,8 @@ exports.AlertDialogOverlay = AlertDialogOverlay;
11473
11967
  exports.AlertDialogPortal = AlertDialogPortal;
11474
11968
  exports.AlertDialogTitle = AlertDialogTitle;
11475
11969
  exports.AlertDialogTrigger = AlertDialogTrigger;
11970
+ exports.AppFooter = AppFooter;
11971
+ exports.AppHeader = AppHeader;
11476
11972
  exports.Button = Button;
11477
11973
  exports.ButtonGroup = ButtonGroup;
11478
11974
  exports.ButtonGroupSeparator = ButtonGroupSeparator;
@@ -11525,7 +12021,6 @@ exports.ErrorBanner = ErrorBanner;
11525
12021
  exports.ErrorPage = ErrorPage;
11526
12022
  exports.FunnelChart = FunnelChart;
11527
12023
  exports.HazoContextProvider = HazoContextProvider;
11528
- exports.HazoThemeProvider = HazoThemeProvider;
11529
12024
  exports.HazoUiConfirmDialog = HazoUiConfirmDialog;
11530
12025
  exports.HazoUiDialog = HazoUiDialog;
11531
12026
  exports.HazoUiDialogClose = DialogClose;
@@ -11541,6 +12036,8 @@ exports.HazoUiDialogTrigger = DialogTrigger;
11541
12036
  exports.HazoUiEtaProgress = HazoUiEtaProgress;
11542
12037
  exports.HazoUiFlexInput = HazoUiFlexInput;
11543
12038
  exports.HazoUiFlexRadio = HazoUiFlexRadio;
12039
+ exports.HazoUiIcon = HazoUiIcon;
12040
+ exports.HazoUiIconPicker = HazoUiIconPicker;
11544
12041
  exports.HazoUiImageCropper = HazoUiImageCropper;
11545
12042
  exports.HazoUiImageCropperDialog = HazoUiImageCropperDialog;
11546
12043
  exports.HazoUiKanban = HazoUiKanban;
@@ -11563,6 +12060,7 @@ exports.InputAffix = InputAffix;
11563
12060
  exports.InverseSparkline = InverseSparkline;
11564
12061
  exports.Label = Label3;
11565
12062
  exports.LoadingTimeout = LoadingTimeout;
12063
+ exports.Logo = Logo;
11566
12064
  exports.MarkdownEditor = MarkdownEditor;
11567
12065
  exports.NotificationCountBadge = NotificationCountBadge;
11568
12066
  exports.NotificationItem = NotificationItem;
@@ -11615,8 +12113,6 @@ exports.TabsContent = TabsContent;
11615
12113
  exports.TabsList = TabsList;
11616
12114
  exports.TabsTrigger = TabsTrigger;
11617
12115
  exports.Textarea = Textarea;
11618
- exports.ThemeScript = ThemeScript;
11619
- exports.ThemeToggle = ThemeToggle;
11620
12116
  exports.Toggle = Toggle;
11621
12117
  exports.ToggleGroup = ToggleGroup;
11622
12118
  exports.ToggleGroupItem = ToggleGroupItem;
@@ -11636,11 +12132,13 @@ exports.format_num = format_num;
11636
12132
  exports.generateUUID = generateUUID;
11637
12133
  exports.get_hazo_ui_config = get_hazo_ui_config;
11638
12134
  exports.get_logger = get_logger;
12135
+ exports.isLucideValue = isLucideValue;
11639
12136
  exports.median = median;
11640
12137
  exports.parse_commands_from_text = parse_commands_from_text;
11641
12138
  exports.pick_x_label_indices = pick_x_label_indices;
11642
12139
  exports.reset_hazo_ui_config = reset_hazo_ui_config;
11643
12140
  exports.resolve_animation_classes = resolve_animation_classes;
12141
+ exports.safeHref = safeHref;
11644
12142
  exports.set_hazo_ui_config = set_hazo_ui_config;
11645
12143
  exports.set_logger = set_logger;
11646
12144
  exports.successToast = successToast;
@@ -11658,7 +12156,6 @@ exports.useLoadingState = useLoadingState;
11658
12156
  exports.useLocalStorage = useLocalStorage;
11659
12157
  exports.useMediaQuery = useMediaQuery;
11660
12158
  exports.useSessionStorage = useSessionStorage;
11661
- exports.useTheme = useTheme;
11662
12159
  exports.useViewport = useViewport;
11663
12160
  exports.useWakeLock = useWakeLock;
11664
12161
  exports.use_fullscreen = use_fullscreen;