hazo_ui 4.10.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.js CHANGED
@@ -1,15 +1,15 @@
1
1
  "use client";
2
2
  import { clsx } from 'clsx';
3
3
  import { twMerge } from 'tailwind-merge';
4
- import * as React26 from 'react';
5
- import React26__default, { lazy, useRef, useState, useCallback, useEffect, useMemo, Fragment, Suspense } from 'react';
4
+ import * as React27 from 'react';
5
+ import React27__default, { lazy, useRef, useState, useCallback, useEffect, useMemo, Fragment, Suspense } from 'react';
6
6
  import { generateRequestId } from 'hazo_core';
7
7
  import { withContext, setBrowserCorrelationId } from 'hazo_core/client';
8
8
  import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
9
9
  import { Slot } from '@radix-ui/react-slot';
10
10
  import { cva } from 'class-variance-authority';
11
11
  import * as DialogPrimitive from '@radix-ui/react-dialog';
12
- import { X, ChevronDown, ChevronUp, Check, Circle, ChevronRight, Sun, Moon, ChevronLeft, Filter, Plus, ArrowUpDown, Loader2, AlertTriangle, OctagonAlert, CheckCircle2, ChevronsUpDown, Download, Share2, Copy, GripVertical, ArrowUp, ArrowDown, Pencil, Calendar as Calendar$1 } from 'lucide-react';
12
+ import { X, ChevronDown, ChevronUp, Check, Circle, ChevronRight, ChevronLeft, Filter, Plus, ArrowUpDown, icons, Loader2, AlertTriangle, OctagonAlert, CheckCircle2, ChevronsUpDown, Download, Share2, Copy, GripVertical, ArrowUp, ArrowDown, Pencil, Calendar as Calendar$1 } from 'lucide-react';
13
13
  import * as PopoverPrimitive from '@radix-ui/react-popover';
14
14
  import * as SelectPrimitive from '@radix-ui/react-select';
15
15
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
@@ -30,6 +30,7 @@ import * as IoIcons from 'react-icons/io5';
30
30
  import * as RiIcons from 'react-icons/ri';
31
31
  import * as TbIcons from 'react-icons/tb';
32
32
  import * as CiIcons from 'react-icons/ci';
33
+ import * as TabsPrimitive from '@radix-ui/react-tabs';
33
34
  import { ReactNodeViewRenderer, NodeViewWrapper, useEditor, EditorContent } from '@tiptap/react';
34
35
  import StarterKit from '@tiptap/starter-kit';
35
36
  import { TextStyle } from '@tiptap/extension-text-style';
@@ -53,7 +54,6 @@ import TaskItem from '@tiptap/extension-task-item';
53
54
  import { LuBold, LuItalic, LuUnderline, LuAlignLeft, LuAlignCenter, LuAlignRight, LuAlignVerticalJustifyStart, LuAlignVerticalJustifyCenter, LuAlignVerticalJustifyEnd, LuList, LuUndo2, LuRedo2, LuMinus, LuPlus, LuStrikethrough, LuSubscript, LuSuperscript, LuLink, LuRemoveFormatting, LuPalette, LuHighlighter, LuAlignJustify, LuListOrdered, LuListChecks, LuIndentDecrease, LuIndentIncrease, LuTable, LuTableRowsSplit, LuTableColumnsSplit, LuTrash2, LuGrid3X3, LuVariable, LuPaperclip, LuX, LuImage, LuFileText, LuFileCode, LuFile } from 'react-icons/lu';
54
55
  import { RxDividerHorizontal } from 'react-icons/rx';
55
56
  import { Extension, Node, mergeAttributes } from '@tiptap/core';
56
- import * as TabsPrimitive from '@radix-ui/react-tabs';
57
57
  import { commands } from '@uiw/react-md-editor';
58
58
  import '@uiw/react-md-editor/markdown-editor.css';
59
59
  import '@uiw/react-markdown-preview/markdown.css';
@@ -77,6 +77,7 @@ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
77
77
  import { Toaster, toast } from 'sonner';
78
78
  export { toast as rawToast } from 'sonner';
79
79
  import { useHazoState } from 'hazo_state/client';
80
+ export { HazoThemeProvider, ThemeScript, ThemeSetPicker, ThemeToggle, useTheme } from 'hazo_theme/client';
80
81
 
81
82
  var __create = Object.create;
82
83
  var __defProp = Object.defineProperty;
@@ -155,11 +156,11 @@ function HazoContextProvider({
155
156
  userId,
156
157
  children
157
158
  }) {
158
- const id = React26.useMemo(
159
+ const id = React27.useMemo(
159
160
  () => correlationId ?? generateRequestId(),
160
161
  [correlationId]
161
162
  );
162
- React26.useEffect(() => {
163
+ React27.useEffect(() => {
163
164
  withContext({ correlationId: id, userId }, () => {
164
165
  setBrowserCorrelationId(id);
165
166
  });
@@ -243,7 +244,7 @@ var buttonVariants = cva(
243
244
  }
244
245
  }
245
246
  );
246
- var Button = React26.forwardRef(
247
+ var Button = React27.forwardRef(
247
248
  ({ className, variant, size, asChild = false, style, ...props }, ref) => {
248
249
  const Comp = asChild ? Slot : "button";
249
250
  return /* @__PURE__ */ jsx(
@@ -262,7 +263,7 @@ var Dialog = DialogPrimitive.Root;
262
263
  var DialogTrigger = DialogPrimitive.Trigger;
263
264
  var DialogPortal = DialogPrimitive.Portal;
264
265
  var DialogClose = DialogPrimitive.Close;
265
- var DialogOverlay = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
266
+ var DialogOverlay = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
266
267
  DialogPrimitive.Overlay,
267
268
  {
268
269
  ref,
@@ -274,7 +275,7 @@ var DialogOverlay = React26.forwardRef(({ className, ...props }, ref) => /* @__P
274
275
  }
275
276
  ));
276
277
  DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
277
- var DialogContent = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
278
+ var DialogContent = React27.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
278
279
  /* @__PURE__ */ jsx(DialogOverlay, {}),
279
280
  /* @__PURE__ */ jsxs(
280
281
  DialogPrimitive.Content,
@@ -324,7 +325,7 @@ var DialogFooter = ({
324
325
  }
325
326
  );
326
327
  DialogFooter.displayName = "DialogFooter";
327
- var DialogTitle = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
328
+ var DialogTitle = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
328
329
  DialogPrimitive.Title,
329
330
  {
330
331
  ref,
@@ -337,7 +338,7 @@ var DialogTitle = React26.forwardRef(({ className, ...props }, ref) => /* @__PUR
337
338
  }
338
339
  ));
339
340
  DialogTitle.displayName = DialogPrimitive.Title.displayName;
340
- var DialogDescription = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
341
+ var DialogDescription = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
341
342
  DialogPrimitive.Description,
342
343
  {
343
344
  ref,
@@ -346,7 +347,7 @@ var DialogDescription = React26.forwardRef(({ className, ...props }, ref) => /*
346
347
  }
347
348
  ));
348
349
  DialogDescription.displayName = DialogPrimitive.Description.displayName;
349
- var Command = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
350
+ var Command = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
350
351
  "div",
351
352
  {
352
353
  ref,
@@ -358,7 +359,7 @@ var Command = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__
358
359
  }
359
360
  ));
360
361
  Command.displayName = "Command";
361
- var CommandInput = React26.forwardRef(({ className, onValueChange, onChange, ...props }, ref) => /* @__PURE__ */ jsx(
362
+ var CommandInput = React27.forwardRef(({ className, onValueChange, onChange, ...props }, ref) => /* @__PURE__ */ jsx(
362
363
  "input",
363
364
  {
364
365
  ref,
@@ -374,7 +375,7 @@ var CommandInput = React26.forwardRef(({ className, onValueChange, onChange, ...
374
375
  }
375
376
  ));
376
377
  CommandInput.displayName = "CommandInput";
377
- var CommandList = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
378
+ var CommandList = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
378
379
  "div",
379
380
  {
380
381
  ref,
@@ -383,7 +384,7 @@ var CommandList = React26.forwardRef(({ className, ...props }, ref) => /* @__PUR
383
384
  }
384
385
  ));
385
386
  CommandList.displayName = "CommandList";
386
- var CommandEmpty = React26.forwardRef((props, ref) => /* @__PURE__ */ jsx(
387
+ var CommandEmpty = React27.forwardRef((props, ref) => /* @__PURE__ */ jsx(
387
388
  "div",
388
389
  {
389
390
  ref,
@@ -392,7 +393,7 @@ var CommandEmpty = React26.forwardRef((props, ref) => /* @__PURE__ */ jsx(
392
393
  }
393
394
  ));
394
395
  CommandEmpty.displayName = "CommandEmpty";
395
- var CommandGroup = React26.forwardRef(({ className, heading, children, ...props }, ref) => /* @__PURE__ */ jsxs(
396
+ var CommandGroup = React27.forwardRef(({ className, heading, children, ...props }, ref) => /* @__PURE__ */ jsxs(
396
397
  "div",
397
398
  {
398
399
  ref,
@@ -408,7 +409,7 @@ var CommandGroup = React26.forwardRef(({ className, heading, children, ...props
408
409
  }
409
410
  ));
410
411
  CommandGroup.displayName = "CommandGroup";
411
- var CommandItem = React26.forwardRef(({ className, onSelect, value, selected, style, ...props }, ref) => {
412
+ var CommandItem = React27.forwardRef(({ className, onSelect, value, selected, style, ...props }, ref) => {
412
413
  const handleClick = () => {
413
414
  if (onSelect && value) {
414
415
  onSelect(value);
@@ -439,7 +440,7 @@ var CommandItem = React26.forwardRef(({ className, onSelect, value, selected, st
439
440
  CommandItem.displayName = "CommandItem";
440
441
  var Popover = PopoverPrimitive.Root;
441
442
  var PopoverTrigger = PopoverPrimitive.Trigger;
442
- var PopoverContent = React26.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
443
+ var PopoverContent = React27.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
443
444
  PopoverPrimitive.Content,
444
445
  {
445
446
  ref,
@@ -453,7 +454,7 @@ var PopoverContent = React26.forwardRef(({ className, align = "center", sideOffs
453
454
  }
454
455
  ) }));
455
456
  PopoverContent.displayName = PopoverPrimitive.Content.displayName;
456
- var Input = React26.forwardRef(
457
+ var Input = React27.forwardRef(
457
458
  ({ className, type, ...props }, ref) => {
458
459
  return /* @__PURE__ */ jsx(
459
460
  "input",
@@ -473,7 +474,7 @@ Input.displayName = "Input";
473
474
  var Select = SelectPrimitive.Root;
474
475
  var SelectGroup = SelectPrimitive.Group;
475
476
  var SelectValue = SelectPrimitive.Value;
476
- var SelectTrigger = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
477
+ var SelectTrigger = React27.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
477
478
  SelectPrimitive.Trigger,
478
479
  {
479
480
  ref,
@@ -489,7 +490,7 @@ var SelectTrigger = React26.forwardRef(({ className, children, ...props }, ref)
489
490
  }
490
491
  ));
491
492
  SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
492
- var SelectScrollUpButton = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
493
+ var SelectScrollUpButton = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
493
494
  SelectPrimitive.ScrollUpButton,
494
495
  {
495
496
  ref,
@@ -502,7 +503,7 @@ var SelectScrollUpButton = React26.forwardRef(({ className, ...props }, ref) =>
502
503
  }
503
504
  ));
504
505
  SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
505
- var SelectScrollDownButton = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
506
+ var SelectScrollDownButton = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
506
507
  SelectPrimitive.ScrollDownButton,
507
508
  {
508
509
  ref,
@@ -515,7 +516,7 @@ var SelectScrollDownButton = React26.forwardRef(({ className, ...props }, ref) =
515
516
  }
516
517
  ));
517
518
  SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
518
- var SelectContent = React26.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
519
+ var SelectContent = React27.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
519
520
  SelectPrimitive.Content,
520
521
  {
521
522
  ref,
@@ -543,7 +544,7 @@ var SelectContent = React26.forwardRef(({ className, children, position = "poppe
543
544
  }
544
545
  ) }));
545
546
  SelectContent.displayName = SelectPrimitive.Content.displayName;
546
- var SelectLabel = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
547
+ var SelectLabel = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
547
548
  SelectPrimitive.Label,
548
549
  {
549
550
  ref,
@@ -552,7 +553,7 @@ var SelectLabel = React26.forwardRef(({ className, ...props }, ref) => /* @__PUR
552
553
  }
553
554
  ));
554
555
  SelectLabel.displayName = SelectPrimitive.Label.displayName;
555
- var SelectItem = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
556
+ var SelectItem = React27.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
556
557
  SelectPrimitive.Item,
557
558
  {
558
559
  ref,
@@ -568,7 +569,7 @@ var SelectItem = React26.forwardRef(({ className, children, ...props }, ref) =>
568
569
  }
569
570
  ));
570
571
  SelectItem.displayName = SelectPrimitive.Item.displayName;
571
- var SelectSeparator = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
572
+ var SelectSeparator = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
572
573
  SelectPrimitive.Separator,
573
574
  {
574
575
  ref,
@@ -580,7 +581,7 @@ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
580
581
  var TooltipProvider = TooltipPrimitive.Provider;
581
582
  var Tooltip = TooltipPrimitive.Root;
582
583
  var TooltipTrigger = TooltipPrimitive.Trigger;
583
- var TooltipContent = React26.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
584
+ var TooltipContent = React27.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
584
585
  TooltipPrimitive.Content,
585
586
  {
586
587
  ref,
@@ -1442,7 +1443,7 @@ function HazoUiMultiSortDialog({
1442
1443
  ] })
1443
1444
  ] });
1444
1445
  }
1445
- var RadioGroup = React26.forwardRef(({ className, ...props }, ref) => {
1446
+ var RadioGroup = React27.forwardRef(({ className, ...props }, ref) => {
1446
1447
  return /* @__PURE__ */ jsx(
1447
1448
  RadioGroupPrimitive.Root,
1448
1449
  {
@@ -1453,7 +1454,7 @@ var RadioGroup = React26.forwardRef(({ className, ...props }, ref) => {
1453
1454
  );
1454
1455
  });
1455
1456
  RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
1456
- var RadioGroupItem = React26.forwardRef(({ className, ...props }, ref) => {
1457
+ var RadioGroupItem = React27.forwardRef(({ className, ...props }, ref) => {
1457
1458
  return /* @__PURE__ */ jsx(
1458
1459
  RadioGroupPrimitive.Item,
1459
1460
  {
@@ -1816,6 +1817,368 @@ function HazoUiPillRadio({
1816
1817
  }
1817
1818
  ) });
1818
1819
  }
1820
+ var Tabs = TabsPrimitive.Root;
1821
+ var TabsList = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1822
+ TabsPrimitive.List,
1823
+ {
1824
+ ref,
1825
+ className: cn(
1826
+ "inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
1827
+ className
1828
+ ),
1829
+ ...props
1830
+ }
1831
+ ));
1832
+ TabsList.displayName = TabsPrimitive.List.displayName;
1833
+ var TabsTrigger = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1834
+ TabsPrimitive.Trigger,
1835
+ {
1836
+ ref,
1837
+ className: cn(
1838
+ "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",
1839
+ className
1840
+ ),
1841
+ ...props
1842
+ }
1843
+ ));
1844
+ TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
1845
+ var TabsContent = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1846
+ TabsPrimitive.Content,
1847
+ {
1848
+ ref,
1849
+ className: cn(
1850
+ "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
1851
+ className
1852
+ ),
1853
+ ...props
1854
+ }
1855
+ ));
1856
+ TabsContent.displayName = TabsPrimitive.Content.displayName;
1857
+ function isLucideValue(value) {
1858
+ return value.startsWith("lucide:");
1859
+ }
1860
+ function get_lucide_component(name) {
1861
+ return icons[name] || null;
1862
+ }
1863
+ function HazoUiIcon({ value, size = 18, className }) {
1864
+ if (isLucideValue(value)) {
1865
+ const name = value.slice("lucide:".length);
1866
+ const Cmp = get_lucide_component(name);
1867
+ if (!Cmp) return null;
1868
+ return /* @__PURE__ */ jsx(Cmp, { size, className });
1869
+ }
1870
+ return /* @__PURE__ */ jsx("span", { className: cn("cls_hazo_ui_icon_emoji", className), style: { fontSize: size }, children: value });
1871
+ }
1872
+ var TOOLS_ICONS = [
1873
+ "Wrench",
1874
+ "Hammer",
1875
+ "Drill",
1876
+ "ToolCase",
1877
+ "PaintRoller",
1878
+ "PaintBucket",
1879
+ "Ruler",
1880
+ "Cog",
1881
+ "Bolt",
1882
+ "Pipette",
1883
+ "Wind",
1884
+ "Plug",
1885
+ "Lightbulb",
1886
+ "Axe",
1887
+ "Shovel"
1888
+ ];
1889
+ var HOME_ICONS = [
1890
+ "House",
1891
+ "DoorOpen",
1892
+ "Bath",
1893
+ "ShowerHead",
1894
+ "Sofa",
1895
+ "Bed",
1896
+ "Refrigerator",
1897
+ "WashingMachine",
1898
+ "Fence",
1899
+ "Key",
1900
+ "Lock",
1901
+ "Warehouse"
1902
+ ];
1903
+ var WEATHER_ICONS = [
1904
+ "Sun",
1905
+ "CloudRain",
1906
+ "Snowflake",
1907
+ "Thermometer",
1908
+ "Wind",
1909
+ "Droplet",
1910
+ "Flame",
1911
+ "CloudSnow",
1912
+ "Zap"
1913
+ ];
1914
+ var NATURE_ICONS = ["Leaf", "TreePine", "Trees", "Flower", "Sprout", "Bug", "Sun", "Droplets"];
1915
+ var SYMBOLS_ICONS = [
1916
+ "Star",
1917
+ "Heart",
1918
+ "Check",
1919
+ "Circle",
1920
+ "Square",
1921
+ "Triangle",
1922
+ "Hexagon",
1923
+ "Tag",
1924
+ "Bell",
1925
+ "Settings",
1926
+ "Wrench"
1927
+ ];
1928
+ var LUCIDE_GROUPS = [
1929
+ { key: "tools", label: "Tools", icons: TOOLS_ICONS },
1930
+ { key: "home", label: "Home", icons: HOME_ICONS },
1931
+ { key: "weather", label: "Weather", icons: WEATHER_ICONS },
1932
+ { key: "nature", label: "Nature", icons: NATURE_ICONS },
1933
+ { key: "symbols", label: "Symbols", icons: SYMBOLS_ICONS }
1934
+ ];
1935
+ var EMOJI_ITEMS = [
1936
+ // Faces
1937
+ "\u{1F600}",
1938
+ "\u{1F603}",
1939
+ "\u{1F604}",
1940
+ "\u{1F601}",
1941
+ "\u{1F606}",
1942
+ "\u{1F605}",
1943
+ "\u{1F642}",
1944
+ "\u{1F609}",
1945
+ "\u{1F60A}",
1946
+ "\u{1F60D}",
1947
+ "\u{1F914}",
1948
+ "\u{1F610}",
1949
+ "\u{1F634}",
1950
+ "\u{1F60E}",
1951
+ "\u{1F917}",
1952
+ "\u{1F973}",
1953
+ "\u{1F607}",
1954
+ "\u{1F643}",
1955
+ "\u{1F62C}",
1956
+ "\u{1F929}",
1957
+ // People / hands
1958
+ "\u{1F44D}",
1959
+ "\u{1F44E}",
1960
+ "\u{1F44F}",
1961
+ "\u{1F64C}",
1962
+ "\u{1F91D}",
1963
+ "\u{1F44B}",
1964
+ "\u{1F4AA}",
1965
+ "\u{1F64F}",
1966
+ "\u{1F440}",
1967
+ "\u{1F9D1}\u200D\u{1F527}",
1968
+ // Objects / tools
1969
+ "\u{1F527}",
1970
+ "\u{1F528}",
1971
+ "\u{1F6E0}\uFE0F",
1972
+ "\u2699\uFE0F",
1973
+ "\u{1FA9B}",
1974
+ "\u{1FA9A}",
1975
+ "\u{1F9F0}",
1976
+ "\u{1F529}",
1977
+ "\u26CF\uFE0F",
1978
+ "\u{1F9F1}",
1979
+ "\u{1F511}",
1980
+ "\u{1F512}",
1981
+ "\u{1F50B}",
1982
+ "\u{1F4A1}",
1983
+ "\u{1F50C}",
1984
+ "\u{1F9EF}",
1985
+ "\u{1FA9C}",
1986
+ "\u{1F9F2}",
1987
+ "\u{1F4CF}",
1988
+ "\u{1F4D0}",
1989
+ // Home
1990
+ "\u{1F3E0}",
1991
+ "\u{1F3E1}",
1992
+ "\u{1F3E2}",
1993
+ "\u{1F3ED}",
1994
+ "\u{1F6AA}",
1995
+ "\u{1F6CB}\uFE0F",
1996
+ "\u{1F6C1}",
1997
+ "\u{1F6BF}",
1998
+ "\u{1F6CF}\uFE0F",
1999
+ "\u{1FA9F}",
2000
+ // Weather / nature
2001
+ "\u2600\uFE0F",
2002
+ "\u{1F324}\uFE0F",
2003
+ "\u26C5",
2004
+ "\u{1F327}\uFE0F",
2005
+ "\u26C8\uFE0F",
2006
+ "\u{1F329}\uFE0F",
2007
+ "\u2744\uFE0F",
2008
+ "\u{1F32C}\uFE0F",
2009
+ "\u{1F4A7}",
2010
+ "\u{1F525}",
2011
+ "\u{1F308}",
2012
+ "\u{1F30A}",
2013
+ "\u{1F331}",
2014
+ "\u{1F333}",
2015
+ "\u{1F332}",
2016
+ "\u{1F343}",
2017
+ "\u{1F338}",
2018
+ "\u{1F33B}",
2019
+ "\u{1F342}",
2020
+ "\u{1F335}",
2021
+ // Transport
2022
+ "\u{1F697}",
2023
+ "\u{1F69A}",
2024
+ "\u{1F69B}",
2025
+ "\u{1F69C}",
2026
+ "\u{1F6B2}",
2027
+ "\u2708\uFE0F",
2028
+ "\u{1F680}",
2029
+ "\u26F5",
2030
+ // Symbols
2031
+ "\u2B50",
2032
+ "\u2764\uFE0F",
2033
+ "\u2705",
2034
+ "\u274C",
2035
+ "\u26A0\uFE0F",
2036
+ "\u{1F534}",
2037
+ "\u{1F7E2}",
2038
+ "\u{1F535}",
2039
+ "\u{1F7E1}",
2040
+ "\u2B1B",
2041
+ "\u2B1C",
2042
+ "\u{1F53A}",
2043
+ "\u{1F536}",
2044
+ "\u{1F537}",
2045
+ "\u{1F4AF}",
2046
+ "\u{1F514}",
2047
+ "\u{1F4CC}",
2048
+ "\u{1F4CD}",
2049
+ "\u{1F3F7}\uFE0F",
2050
+ "\u{1F3AF}",
2051
+ // Misc
2052
+ "\u{1F4E6}",
2053
+ "\u{1F4C5}",
2054
+ "\u{1F4C8}",
2055
+ "\u{1F4DD}",
2056
+ "\u{1F4B0}",
2057
+ "\u{1F4B3}",
2058
+ "\u{1F389}",
2059
+ "\u{1F381}",
2060
+ "\u2615",
2061
+ "\u{1F37D}\uFE0F",
2062
+ "\u{1F9FE}",
2063
+ "\u{1F4DE}",
2064
+ "\u2709\uFE0F",
2065
+ "\u{1F310}"
2066
+ ];
2067
+ function HazoUiIconPicker({
2068
+ value,
2069
+ onChange,
2070
+ disabled,
2071
+ className,
2072
+ triggerClassName,
2073
+ align = "start"
2074
+ }) {
2075
+ const [open, set_open] = React27.useState(false);
2076
+ const [search, set_search] = React27.useState("");
2077
+ const handle_select = React27.useCallback(
2078
+ (next_value) => {
2079
+ onChange(next_value);
2080
+ set_open(false);
2081
+ },
2082
+ [onChange]
2083
+ );
2084
+ const filtered_search_results = React27.useMemo(() => {
2085
+ const query = search.trim().toLowerCase();
2086
+ if (!query) return [];
2087
+ return Object.keys(icons).filter((name) => name.toLowerCase().includes(query)).slice(0, 60);
2088
+ }, [search]);
2089
+ const has_search = search.trim().length > 0;
2090
+ return /* @__PURE__ */ jsx("div", { className: cn("cls_hazo_ui_icon_picker", className), children: /* @__PURE__ */ jsxs(
2091
+ Popover,
2092
+ {
2093
+ open,
2094
+ onOpenChange: (next_open) => {
2095
+ set_open(next_open);
2096
+ if (!next_open) set_search("");
2097
+ },
2098
+ children: [
2099
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
2100
+ "button",
2101
+ {
2102
+ type: "button",
2103
+ disabled,
2104
+ className: cn(
2105
+ "cls_hazo_ui_icon_picker_trigger",
2106
+ "flex h-9 w-9 items-center justify-center rounded-md border border-input bg-card",
2107
+ "text-foreground transition-colors hover:bg-accent/50",
2108
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
2109
+ "disabled:cursor-not-allowed disabled:opacity-50",
2110
+ triggerClassName
2111
+ ),
2112
+ children: /* @__PURE__ */ jsx(HazoUiIcon, { value })
2113
+ }
2114
+ ) }),
2115
+ /* @__PURE__ */ jsxs(PopoverContent, { align, className: "w-72 p-2", children: [
2116
+ /* @__PURE__ */ jsx(
2117
+ "input",
2118
+ {
2119
+ type: "text",
2120
+ value: search,
2121
+ onChange: (e) => set_search(e.target.value),
2122
+ placeholder: "Search icons...",
2123
+ className: cn(
2124
+ "cls_hazo_ui_icon_picker_search",
2125
+ "mb-2 flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm",
2126
+ "placeholder:text-muted-foreground",
2127
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
2128
+ )
2129
+ }
2130
+ ),
2131
+ has_search ? /* @__PURE__ */ jsxs("div", { className: "cls_hazo_ui_icon_picker_search_results grid max-h-56 grid-cols-8 gap-1 overflow-y-auto", children: [
2132
+ filtered_search_results.map((name) => {
2133
+ const Cmp = icons[name];
2134
+ return /* @__PURE__ */ jsx(
2135
+ "button",
2136
+ {
2137
+ type: "button",
2138
+ title: name,
2139
+ onClick: () => handle_select(`lucide:${name}`),
2140
+ 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",
2141
+ children: /* @__PURE__ */ jsx(Cmp, { size: 16 })
2142
+ },
2143
+ name
2144
+ );
2145
+ }),
2146
+ filtered_search_results.length === 0 && /* @__PURE__ */ jsx("p", { className: "col-span-8 py-4 text-center text-sm text-muted-foreground", children: "No icons found" })
2147
+ ] }) : /* @__PURE__ */ jsxs(Tabs, { defaultValue: "emoji", children: [
2148
+ /* @__PURE__ */ jsxs(TabsList, { className: "grid w-full grid-cols-6", children: [
2149
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "emoji", children: "Emoji" }),
2150
+ LUCIDE_GROUPS.map((group) => /* @__PURE__ */ jsx(TabsTrigger, { value: group.key, children: group.label }, group.key))
2151
+ ] }),
2152
+ /* @__PURE__ */ jsx(TabsContent, { value: "emoji", children: /* @__PURE__ */ jsx("div", { className: "grid max-h-56 grid-cols-8 gap-1 overflow-y-auto", children: EMOJI_ITEMS.map((emoji, index) => /* @__PURE__ */ jsx(
2153
+ "button",
2154
+ {
2155
+ type: "button",
2156
+ onClick: () => handle_select(emoji),
2157
+ 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",
2158
+ children: emoji
2159
+ },
2160
+ `${emoji}-${index}`
2161
+ )) }) }),
2162
+ LUCIDE_GROUPS.map((group) => /* @__PURE__ */ jsx(TabsContent, { value: group.key, children: /* @__PURE__ */ jsx("div", { className: "grid max-h-56 grid-cols-8 gap-1 overflow-y-auto", children: group.icons.map((name) => {
2163
+ const Cmp = icons[name];
2164
+ return /* @__PURE__ */ jsx(
2165
+ "button",
2166
+ {
2167
+ type: "button",
2168
+ title: name,
2169
+ onClick: () => handle_select(`lucide:${name}`),
2170
+ 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",
2171
+ children: /* @__PURE__ */ jsx(Cmp, { size: 16 })
2172
+ },
2173
+ name
2174
+ );
2175
+ }) }) }, group.key))
2176
+ ] })
2177
+ ] })
2178
+ ]
2179
+ }
2180
+ ) });
2181
+ }
1819
2182
  function validateInput(value, input_type, text_len_min, text_len_max, num_min, num_max, regex, num_decimals) {
1820
2183
  if (value === "") {
1821
2184
  return { isValid: true };
@@ -1910,7 +2273,7 @@ function filterInputValue(value, input_type, num_decimals) {
1910
2273
  }
1911
2274
  }
1912
2275
  }
1913
- var HazoUiFlexInput = React26.forwardRef(
2276
+ var HazoUiFlexInput = React27.forwardRef(
1914
2277
  ({
1915
2278
  className,
1916
2279
  input_type = "mixed",
@@ -1927,13 +2290,13 @@ var HazoUiFlexInput = React26.forwardRef(
1927
2290
  onBlur,
1928
2291
  ...props
1929
2292
  }, ref) => {
1930
- const [internalValue, setInternalValue] = React26.useState(
2293
+ const [internalValue, setInternalValue] = React27.useState(
1931
2294
  typeof controlledValue === "string" ? controlledValue : typeof controlledValue === "number" ? String(controlledValue) : ""
1932
2295
  );
1933
- const [errorMessage, setErrorMessage] = React26.useState();
2296
+ const [errorMessage, setErrorMessage] = React27.useState();
1934
2297
  const isControlled = controlledValue !== void 0;
1935
2298
  const currentValue = isControlled ? typeof controlledValue === "string" ? controlledValue : String(controlledValue || "") : internalValue;
1936
- React26.useEffect(() => {
2299
+ React27.useEffect(() => {
1937
2300
  if (isControlled) {
1938
2301
  const newValue = typeof controlledValue === "string" ? controlledValue : String(controlledValue || "");
1939
2302
  if (newValue !== internalValue) {
@@ -2013,7 +2376,7 @@ var HazoUiFlexInput = React26.forwardRef(
2013
2376
  }
2014
2377
  );
2015
2378
  HazoUiFlexInput.displayName = "HazoUiFlexInput";
2016
- var ToolbarButton = React26.forwardRef(
2379
+ var ToolbarButton = React27.forwardRef(
2017
2380
  ({ onClick, is_active = false, disabled = false, tooltip, className, children }, ref) => {
2018
2381
  const button = /* @__PURE__ */ jsx(
2019
2382
  "button",
@@ -2282,7 +2645,7 @@ var getRelativePosition = (node, event) => {
2282
2645
  };
2283
2646
  };
2284
2647
  var _excluded = ["prefixCls", "className", "onMove", "onDown"];
2285
- var Interactive = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
2648
+ var Interactive = /* @__PURE__ */ React27__default.forwardRef((props, ref) => {
2286
2649
  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);
2287
2650
  var container = useRef(null);
2288
2651
  var hasTouched = useRef(false);
@@ -2370,7 +2733,7 @@ var Pointer = (_ref) => {
2370
2733
  }), [top, left, color2, className, prefixCls]);
2371
2734
  };
2372
2735
  var _excluded2 = ["prefixCls", "radius", "pointer", "className", "hue", "style", "hsva", "onChange"];
2373
- var Saturation = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
2736
+ var Saturation = /* @__PURE__ */ React27__default.forwardRef((props, ref) => {
2374
2737
  var _hsva$h;
2375
2738
  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);
2376
2739
  var containerStyle = (0, import_extends3.default)({
@@ -2519,7 +2882,7 @@ var Pointer2 = (_ref) => {
2519
2882
  };
2520
2883
  var _excluded4 = ["prefixCls", "className", "hsva", "background", "bgProps", "innerProps", "pointerProps", "radius", "width", "height", "direction", "reverse", "style", "onChange", "pointer"];
2521
2884
  var BACKGROUND_IMG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==";
2522
- var Alpha = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
2885
+ var Alpha = /* @__PURE__ */ React27__default.forwardRef((props, ref) => {
2523
2886
  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);
2524
2887
  var offsetToAlpha = useCallback((offset) => {
2525
2888
  var value = direction === "horizontal" ? offset.left : offset.top;
@@ -2655,7 +3018,7 @@ var import_objectWithoutPropertiesLoose5 = __toESM(require_objectWithoutProperti
2655
3018
  var _excluded5 = ["prefixCls", "placement", "label", "value", "className", "style", "labelStyle", "inputStyle", "onChange", "onBlur", "renderInput"];
2656
3019
  var validHex2 = (hex) => /^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);
2657
3020
  var getNumberValue = (value) => Number(String(value).replace(/%/g, ""));
2658
- var EditableInput = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
3021
+ var EditableInput = /* @__PURE__ */ React27__default.forwardRef((props, ref) => {
2659
3022
  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);
2660
3023
  var _useState = useState(initValue), value = _useState[0], setValue = _useState[1];
2661
3024
  var isFocus = useRef(false);
@@ -2752,7 +3115,7 @@ var esm_default4 = EditableInput;
2752
3115
  var import_extends7 = __toESM(require_extends());
2753
3116
  var import_objectWithoutPropertiesLoose6 = __toESM(require_objectWithoutPropertiesLoose());
2754
3117
  var _excluded6 = ["prefixCls", "hsva", "placement", "rProps", "gProps", "bProps", "aProps", "className", "style", "onChange"];
2755
- var EditableInputRGBA = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
3118
+ var EditableInputRGBA = /* @__PURE__ */ React27__default.forwardRef((props, ref) => {
2756
3119
  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);
2757
3120
  var rgba = hsva ? hsvaToRgba(hsva) : {};
2758
3121
  function handleBlur(evn) {
@@ -2866,7 +3229,7 @@ var import_objectWithoutPropertiesLoose7 = __toESM(require_objectWithoutProperti
2866
3229
  var _excluded7 = ["prefixCls", "className", "hue", "onChange", "direction", "reverse"];
2867
3230
  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%";
2868
3231
  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%";
2869
- var Hue = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
3232
+ var Hue = /* @__PURE__ */ React27__default.forwardRef((props, ref) => {
2870
3233
  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);
2871
3234
  var getGradientBackground = useCallback(() => {
2872
3235
  if (direction === "horizontal") {
@@ -2917,7 +3280,7 @@ var esm_default6 = Hue;
2917
3280
  var import_extends9 = __toESM(require_extends());
2918
3281
  var import_objectWithoutPropertiesLoose8 = __toESM(require_objectWithoutPropertiesLoose());
2919
3282
  var _excluded8 = ["prefixCls", "className", "color", "colors", "style", "rectProps", "onChange", "addonAfter", "addonBefore", "rectRender"];
2920
- var Swatch = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
3283
+ var Swatch = /* @__PURE__ */ React27__default.forwardRef((props, ref) => {
2921
3284
  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);
2922
3285
  var rectStyle = (0, import_extends9.default)({
2923
3286
  "--swatch-background-color": "rgb(144, 19, 254)",
@@ -2943,7 +3306,7 @@ var Swatch = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
2943
3306
  flexWrap: "wrap",
2944
3307
  position: "relative"
2945
3308
  }, style),
2946
- children: [addonBefore && /* @__PURE__ */ React26__default.isValidElement(addonBefore) && addonBefore, colors && Array.isArray(colors) && colors.map((item, idx) => {
3309
+ children: [addonBefore && /* @__PURE__ */ React27__default.isValidElement(addonBefore) && addonBefore, colors && Array.isArray(colors) && colors.map((item, idx) => {
2947
3310
  var title = "";
2948
3311
  var background = "";
2949
3312
  if (typeof item === "string") {
@@ -2969,7 +3332,7 @@ var Swatch = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
2969
3332
  children: render
2970
3333
  }, idx);
2971
3334
  }
2972
- var child = rectProps.children && /* @__PURE__ */ React26__default.isValidElement(rectProps.children) ? /* @__PURE__ */ React26__default.cloneElement(rectProps.children, {
3335
+ var child = rectProps.children && /* @__PURE__ */ React27__default.isValidElement(rectProps.children) ? /* @__PURE__ */ React27__default.cloneElement(rectProps.children, {
2973
3336
  color: background,
2974
3337
  checked
2975
3338
  }) : null;
@@ -2983,7 +3346,7 @@ var Swatch = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
2983
3346
  background
2984
3347
  })
2985
3348
  }), idx);
2986
- }), addonAfter && /* @__PURE__ */ React26__default.isValidElement(addonAfter) && addonAfter]
3349
+ }), addonAfter && /* @__PURE__ */ React27__default.isValidElement(addonAfter) && addonAfter]
2987
3350
  }));
2988
3351
  });
2989
3352
  Swatch.displayName = "Swatch";
@@ -3002,7 +3365,7 @@ var Bar = (props) => /* @__PURE__ */ jsx("div", {
3002
3365
  backgroundColor: "#fff"
3003
3366
  }
3004
3367
  });
3005
- var Sketch = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
3368
+ var Sketch = /* @__PURE__ */ React27__default.forwardRef((props, ref) => {
3006
3369
  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);
3007
3370
  var _useState = useState({
3008
3371
  h: 209,
@@ -3271,19 +3634,19 @@ var Toolbar = ({
3271
3634
  toolbar,
3272
3635
  font_families
3273
3636
  }) => {
3274
- const [link_url, set_link_url] = React26.useState("https://");
3275
- const [link_popover_open, set_link_popover_open] = React26.useState(false);
3276
- const [text_color_open, set_text_color_open] = React26.useState(false);
3277
- const [highlight_color_open, set_highlight_color_open] = React26.useState(false);
3278
- const [variables_menu_open, set_variables_menu_open] = React26.useState(false);
3279
- const [table_menu_open, set_table_menu_open] = React26.useState(false);
3280
- const [text_color, set_text_color] = React26.useState("#000000");
3281
- const [highlight_color, set_highlight_color] = React26.useState("#ffff00");
3282
- const [table_rows, set_table_rows] = React26.useState(3);
3283
- const [table_cols, set_table_cols] = React26.useState(3);
3284
- const [hovered_cell, set_hovered_cell] = React26.useState(null);
3285
- const file_input_ref = React26.useRef(null);
3286
- const image_input_ref = React26.useRef(null);
3637
+ const [link_url, set_link_url] = React27.useState("https://");
3638
+ const [link_popover_open, set_link_popover_open] = React27.useState(false);
3639
+ const [text_color_open, set_text_color_open] = React27.useState(false);
3640
+ const [highlight_color_open, set_highlight_color_open] = React27.useState(false);
3641
+ const [variables_menu_open, set_variables_menu_open] = React27.useState(false);
3642
+ const [table_menu_open, set_table_menu_open] = React27.useState(false);
3643
+ const [text_color, set_text_color] = React27.useState("#000000");
3644
+ const [highlight_color, set_highlight_color] = React27.useState("#ffff00");
3645
+ const [table_rows, set_table_rows] = React27.useState(3);
3646
+ const [table_cols, set_table_cols] = React27.useState(3);
3647
+ const [hovered_cell, set_hovered_cell] = React27.useState(null);
3648
+ const file_input_ref = React27.useRef(null);
3649
+ const image_input_ref = React27.useRef(null);
3287
3650
  if (!editor) {
3288
3651
  return null;
3289
3652
  }
@@ -4097,7 +4460,7 @@ var Toolbar = ({
4097
4460
  disabled && "opacity-50 pointer-events-none"
4098
4461
  ),
4099
4462
  children: [
4100
- sections.map((items, i) => /* @__PURE__ */ jsxs(React26.Fragment, { children: [
4463
+ sections.map((items, i) => /* @__PURE__ */ jsxs(React27.Fragment, { children: [
4101
4464
  i > 0 && /* @__PURE__ */ jsx(ToolbarSeparator, {}),
4102
4465
  items
4103
4466
  ] }, i)),
@@ -4349,43 +4712,6 @@ var VariableExtension = Node.create({
4349
4712
  };
4350
4713
  }
4351
4714
  });
4352
- var Tabs = TabsPrimitive.Root;
4353
- var TabsList = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4354
- TabsPrimitive.List,
4355
- {
4356
- ref,
4357
- className: cn(
4358
- "inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
4359
- className
4360
- ),
4361
- ...props
4362
- }
4363
- ));
4364
- TabsList.displayName = TabsPrimitive.List.displayName;
4365
- var TabsTrigger = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4366
- TabsPrimitive.Trigger,
4367
- {
4368
- ref,
4369
- className: cn(
4370
- "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",
4371
- className
4372
- ),
4373
- ...props
4374
- }
4375
- ));
4376
- TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
4377
- var TabsContent = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4378
- TabsPrimitive.Content,
4379
- {
4380
- ref,
4381
- className: cn(
4382
- "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
4383
- className
4384
- ),
4385
- ...props
4386
- }
4387
- ));
4388
- TabsContent.displayName = TabsPrimitive.Content.displayName;
4389
4715
  function debounce_fn(func, wait) {
4390
4716
  let timeout_id = null;
4391
4717
  return (output) => {
@@ -4411,14 +4737,14 @@ var HazoUiRte = ({
4411
4737
  toolbar,
4412
4738
  font_families
4413
4739
  }) => {
4414
- const [attachments, set_attachments] = React26.useState(
4740
+ const [attachments, set_attachments] = React27.useState(
4415
4741
  initial_attachments
4416
4742
  );
4417
- const [active_tab, set_active_tab] = React26.useState("html");
4743
+ const [active_tab, set_active_tab] = React27.useState("html");
4418
4744
  const is_view_only = active_tab !== "html";
4419
- const attachments_ref = React26.useRef(attachments);
4745
+ const attachments_ref = React27.useRef(attachments);
4420
4746
  attachments_ref.current = attachments;
4421
- const debounced_on_change = React26.useMemo(
4747
+ const debounced_on_change = React27.useMemo(
4422
4748
  () => debounce_fn((output) => {
4423
4749
  if (on_change) {
4424
4750
  on_change(output);
@@ -4517,7 +4843,7 @@ var HazoUiRte = ({
4517
4843
  debounced_on_change(output);
4518
4844
  }
4519
4845
  });
4520
- React26.useEffect(() => {
4846
+ React27.useEffect(() => {
4521
4847
  if (editor && html !== void 0) {
4522
4848
  const current_html = editor.getHTML();
4523
4849
  if (html !== current_html && !editor.isFocused) {
@@ -4525,21 +4851,21 @@ var HazoUiRte = ({
4525
4851
  }
4526
4852
  }
4527
4853
  }, [html, editor]);
4528
- React26.useEffect(() => {
4854
+ React27.useEffect(() => {
4529
4855
  if (editor) {
4530
4856
  editor.setEditable(!disabled);
4531
4857
  }
4532
4858
  }, [disabled, editor]);
4533
- const attachments_from_props_ref = React26.useRef(false);
4534
- const prev_initial_attachments_ref = React26.useRef(initial_attachments);
4535
- React26.useEffect(() => {
4859
+ const attachments_from_props_ref = React27.useRef(false);
4860
+ const prev_initial_attachments_ref = React27.useRef(initial_attachments);
4861
+ React27.useEffect(() => {
4536
4862
  if (JSON.stringify(initial_attachments) !== JSON.stringify(prev_initial_attachments_ref.current)) {
4537
4863
  prev_initial_attachments_ref.current = initial_attachments;
4538
4864
  attachments_from_props_ref.current = true;
4539
4865
  set_attachments(initial_attachments);
4540
4866
  }
4541
4867
  }, [initial_attachments]);
4542
- React26.useEffect(() => {
4868
+ React27.useEffect(() => {
4543
4869
  if (attachments_from_props_ref.current) {
4544
4870
  attachments_from_props_ref.current = false;
4545
4871
  return;
@@ -5352,12 +5678,12 @@ var CommandPopover = ({
5352
5678
  on_selection_change: _on_selection_change,
5353
5679
  prefix_color
5354
5680
  }) => {
5355
- const container_ref = React26.useRef(null);
5356
- const grouped_commands = React26.useMemo(
5681
+ const container_ref = React27.useRef(null);
5682
+ const grouped_commands = React27.useMemo(
5357
5683
  () => group_commands(commands),
5358
5684
  [commands]
5359
5685
  );
5360
- React26.useEffect(() => {
5686
+ React27.useEffect(() => {
5361
5687
  const handle_click_outside = (e) => {
5362
5688
  if (container_ref.current && !container_ref.current.contains(e.target)) {
5363
5689
  on_close();
@@ -5370,8 +5696,8 @@ var CommandPopover = ({
5370
5696
  };
5371
5697
  }
5372
5698
  }, [is_open, on_close]);
5373
- const [mounted, set_mounted] = React26.useState(false);
5374
- React26.useEffect(() => {
5699
+ const [mounted, set_mounted] = React27.useState(false);
5700
+ React27.useEffect(() => {
5375
5701
  set_mounted(true);
5376
5702
  }, []);
5377
5703
  if (!is_open || !mounted) return null;
@@ -5681,21 +6007,21 @@ var HazoUiTextbox = ({
5681
6007
  on_command_change,
5682
6008
  on_command_remove
5683
6009
  }) => {
5684
- const generated_instance_id = React26.useId();
6010
+ const generated_instance_id = React27.useId();
5685
6011
  const instance_id = provided_instance_id || generated_instance_id;
5686
- const [suggestion_state, set_suggestion_state] = React26.useState(null);
5687
- const [selected_index, set_selected_index] = React26.useState(0);
5688
- const [popover_position, set_popover_position] = React26.useState({ top: 0, left: 0 });
5689
- const [edit_context, set_edit_context] = React26.useState(null);
5690
- const [edit_selected_index, set_edit_selected_index] = React26.useState(0);
6012
+ const [suggestion_state, set_suggestion_state] = React27.useState(null);
6013
+ const [selected_index, set_selected_index] = React27.useState(0);
6014
+ const [popover_position, set_popover_position] = React27.useState({ top: 0, left: 0 });
6015
+ const [edit_context, set_edit_context] = React27.useState(null);
6016
+ const [edit_selected_index, set_edit_selected_index] = React27.useState(0);
5691
6017
  const is_controlled = value !== void 0;
5692
- const editor_container_ref = React26.useRef(null);
5693
- const edit_popover_ref = React26.useRef(null);
5694
- const [mounted, set_mounted] = React26.useState(false);
5695
- React26.useEffect(() => {
6018
+ const editor_container_ref = React27.useRef(null);
6019
+ const edit_popover_ref = React27.useRef(null);
6020
+ const [mounted, set_mounted] = React27.useState(false);
6021
+ React27.useEffect(() => {
5696
6022
  set_mounted(true);
5697
6023
  }, []);
5698
- const suggestion_extensions = React26.useMemo(() => {
6024
+ const suggestion_extensions = React27.useMemo(() => {
5699
6025
  return create_command_suggestion_extension({
5700
6026
  prefixes,
5701
6027
  instance_id,
@@ -5746,7 +6072,7 @@ var HazoUiTextbox = ({
5746
6072
  }
5747
6073
  }
5748
6074
  });
5749
- React26.useEffect(() => {
6075
+ React27.useEffect(() => {
5750
6076
  if (suggestion_state?.is_active && editor) {
5751
6077
  requestAnimationFrame(() => {
5752
6078
  const { from } = suggestion_state.range;
@@ -5770,7 +6096,7 @@ var HazoUiTextbox = ({
5770
6096
  });
5771
6097
  }
5772
6098
  }, [suggestion_state, editor]);
5773
- React26.useEffect(() => {
6099
+ React27.useEffect(() => {
5774
6100
  if (is_controlled && editor && !editor.isFocused) {
5775
6101
  const current_text = editor.getText();
5776
6102
  if (value !== current_text) {
@@ -5779,12 +6105,12 @@ var HazoUiTextbox = ({
5779
6105
  }
5780
6106
  }
5781
6107
  }, [value, editor, is_controlled, prefixes, pill_variant]);
5782
- React26.useEffect(() => {
6108
+ React27.useEffect(() => {
5783
6109
  if (editor) {
5784
6110
  editor.setEditable(!disabled);
5785
6111
  }
5786
6112
  }, [disabled, editor]);
5787
- const handle_command_select = React26.useCallback(
6113
+ const handle_command_select = React27.useCallback(
5788
6114
  (command) => {
5789
6115
  if (!editor || !suggestion_state) return;
5790
6116
  const prefix_config = prefixes.find((p) => p.char === suggestion_state.prefix);
@@ -5804,15 +6130,15 @@ var HazoUiTextbox = ({
5804
6130
  },
5805
6131
  [editor, suggestion_state, pill_variant, on_command_insert, prefixes]
5806
6132
  );
5807
- const handle_popover_close = React26.useCallback(() => {
6133
+ const handle_popover_close = React27.useCallback(() => {
5808
6134
  set_suggestion_state(null);
5809
6135
  editor?.commands.focus();
5810
6136
  }, [editor]);
5811
- const handle_edit_close = React26.useCallback(() => {
6137
+ const handle_edit_close = React27.useCallback(() => {
5812
6138
  set_edit_context(null);
5813
6139
  editor?.commands.focus();
5814
6140
  }, [editor]);
5815
- const handle_command_update = React26.useCallback(
6141
+ const handle_command_update = React27.useCallback(
5816
6142
  (new_command) => {
5817
6143
  if (!editor || !edit_context) return;
5818
6144
  const old_command = edit_context.command;
@@ -5828,7 +6154,7 @@ var HazoUiTextbox = ({
5828
6154
  },
5829
6155
  [editor, edit_context, on_command_change]
5830
6156
  );
5831
- const handle_command_remove = React26.useCallback(() => {
6157
+ const handle_command_remove = React27.useCallback(() => {
5832
6158
  if (!editor || !edit_context) return;
5833
6159
  const command = edit_context.command;
5834
6160
  editor.state.doc.descendants((node, pos) => {
@@ -5842,7 +6168,7 @@ var HazoUiTextbox = ({
5842
6168
  }
5843
6169
  set_edit_context(null);
5844
6170
  }, [editor, edit_context, on_command_remove]);
5845
- const filtered_commands = React26.useMemo(() => {
6171
+ const filtered_commands = React27.useMemo(() => {
5846
6172
  if (!suggestion_state) return [];
5847
6173
  const query = suggestion_state.query.toLowerCase();
5848
6174
  if (!query) return suggestion_state.commands;
@@ -5850,7 +6176,7 @@ var HazoUiTextbox = ({
5850
6176
  (cmd) => cmd.action_label.toLowerCase().includes(query) || cmd.action.toLowerCase().includes(query) || cmd.action_description?.toLowerCase().includes(query)
5851
6177
  );
5852
6178
  }, [suggestion_state]);
5853
- React26.useEffect(() => {
6179
+ React27.useEffect(() => {
5854
6180
  if (!suggestion_state?.is_active) return;
5855
6181
  const handle_keydown = (e) => {
5856
6182
  switch (e.key) {
@@ -5885,7 +6211,7 @@ var HazoUiTextbox = ({
5885
6211
  handle_command_select,
5886
6212
  handle_popover_close
5887
6213
  ]);
5888
- React26.useEffect(() => {
6214
+ React27.useEffect(() => {
5889
6215
  if (!edit_context) return;
5890
6216
  const handle_click_outside = (e) => {
5891
6217
  if (edit_popover_ref.current && !edit_popover_ref.current.contains(e.target)) {
@@ -5900,12 +6226,12 @@ var HazoUiTextbox = ({
5900
6226
  document.removeEventListener("mousedown", handle_click_outside);
5901
6227
  };
5902
6228
  }, [edit_context]);
5903
- const edit_commands = React26.useMemo(() => {
6229
+ const edit_commands = React27.useMemo(() => {
5904
6230
  if (!edit_context) return [];
5905
6231
  const prefix_config = prefixes.find((p) => p.char === edit_context.command.prefix);
5906
6232
  return prefix_config?.commands || [];
5907
6233
  }, [edit_context, prefixes]);
5908
- React26.useEffect(() => {
6234
+ React27.useEffect(() => {
5909
6235
  if (!edit_context) return;
5910
6236
  const handle_keydown = (e) => {
5911
6237
  switch (e.key) {
@@ -5943,7 +6269,7 @@ var HazoUiTextbox = ({
5943
6269
  handle_command_remove,
5944
6270
  handle_edit_close
5945
6271
  ]);
5946
- React26.useEffect(() => {
6272
+ React27.useEffect(() => {
5947
6273
  const handle_pill_click = (e) => {
5948
6274
  const detail = e.detail;
5949
6275
  const { id, prefix, action, action_label, node_pos } = detail;
@@ -6228,22 +6554,22 @@ var HazoUiTextarea = ({
6228
6554
  on_command_change,
6229
6555
  on_command_remove
6230
6556
  }) => {
6231
- const generated_instance_id = React26.useId();
6557
+ const generated_instance_id = React27.useId();
6232
6558
  const instance_id = provided_instance_id || generated_instance_id;
6233
- const [suggestion_state, set_suggestion_state] = React26.useState(null);
6234
- const [selected_index, set_selected_index] = React26.useState(0);
6235
- const [popover_position, set_popover_position] = React26.useState({ top: 0, left: 0 });
6236
- const [edit_context, set_edit_context] = React26.useState(null);
6237
- const [edit_selected_index, set_edit_selected_index] = React26.useState(0);
6559
+ const [suggestion_state, set_suggestion_state] = React27.useState(null);
6560
+ const [selected_index, set_selected_index] = React27.useState(0);
6561
+ const [popover_position, set_popover_position] = React27.useState({ top: 0, left: 0 });
6562
+ const [edit_context, set_edit_context] = React27.useState(null);
6563
+ const [edit_selected_index, set_edit_selected_index] = React27.useState(0);
6238
6564
  const is_controlled = value !== void 0;
6239
- const editor_container_ref = React26.useRef(null);
6240
- const edit_popover_ref = React26.useRef(null);
6241
- const [mounted, set_mounted] = React26.useState(false);
6242
- React26.useEffect(() => {
6565
+ const editor_container_ref = React27.useRef(null);
6566
+ const edit_popover_ref = React27.useRef(null);
6567
+ const [mounted, set_mounted] = React27.useState(false);
6568
+ React27.useEffect(() => {
6243
6569
  set_mounted(true);
6244
6570
  }, []);
6245
6571
  const calculated_min_height = rows ? `${rows * 1.5}em` : min_height;
6246
- const suggestion_extensions = React26.useMemo(() => {
6572
+ const suggestion_extensions = React27.useMemo(() => {
6247
6573
  return create_command_suggestion_extension({
6248
6574
  prefixes,
6249
6575
  instance_id,
@@ -6292,7 +6618,7 @@ var HazoUiTextarea = ({
6292
6618
  }
6293
6619
  }
6294
6620
  });
6295
- React26.useEffect(() => {
6621
+ React27.useEffect(() => {
6296
6622
  if (suggestion_state?.is_active && editor) {
6297
6623
  requestAnimationFrame(() => {
6298
6624
  const { from } = suggestion_state.range;
@@ -6316,7 +6642,7 @@ var HazoUiTextarea = ({
6316
6642
  });
6317
6643
  }
6318
6644
  }, [suggestion_state, editor]);
6319
- React26.useEffect(() => {
6645
+ React27.useEffect(() => {
6320
6646
  if (is_controlled && editor && !editor.isFocused) {
6321
6647
  const current_text = editor.getText();
6322
6648
  if (value !== current_text) {
@@ -6329,12 +6655,12 @@ var HazoUiTextarea = ({
6329
6655
  }
6330
6656
  }
6331
6657
  }, [value, editor, is_controlled, prefixes, pill_variant]);
6332
- React26.useEffect(() => {
6658
+ React27.useEffect(() => {
6333
6659
  if (editor) {
6334
6660
  editor.setEditable(!disabled);
6335
6661
  }
6336
6662
  }, [disabled, editor]);
6337
- const handle_command_select = React26.useCallback(
6663
+ const handle_command_select = React27.useCallback(
6338
6664
  (command) => {
6339
6665
  if (!editor || !suggestion_state) return;
6340
6666
  const prefix_config = prefixes.find((p) => p.char === suggestion_state.prefix);
@@ -6354,15 +6680,15 @@ var HazoUiTextarea = ({
6354
6680
  },
6355
6681
  [editor, suggestion_state, pill_variant, on_command_insert, prefixes]
6356
6682
  );
6357
- const handle_popover_close = React26.useCallback(() => {
6683
+ const handle_popover_close = React27.useCallback(() => {
6358
6684
  set_suggestion_state(null);
6359
6685
  editor?.commands.focus();
6360
6686
  }, [editor]);
6361
- const handle_edit_close = React26.useCallback(() => {
6687
+ const handle_edit_close = React27.useCallback(() => {
6362
6688
  set_edit_context(null);
6363
6689
  editor?.commands.focus();
6364
6690
  }, [editor]);
6365
- const handle_command_update = React26.useCallback(
6691
+ const handle_command_update = React27.useCallback(
6366
6692
  (new_command) => {
6367
6693
  if (!editor || !edit_context) return;
6368
6694
  const old_command = edit_context.command;
@@ -6378,7 +6704,7 @@ var HazoUiTextarea = ({
6378
6704
  },
6379
6705
  [editor, edit_context, on_command_change]
6380
6706
  );
6381
- const handle_command_remove = React26.useCallback(() => {
6707
+ const handle_command_remove = React27.useCallback(() => {
6382
6708
  if (!editor || !edit_context) return;
6383
6709
  const command = edit_context.command;
6384
6710
  editor.state.doc.descendants((node, pos) => {
@@ -6392,7 +6718,7 @@ var HazoUiTextarea = ({
6392
6718
  }
6393
6719
  set_edit_context(null);
6394
6720
  }, [editor, edit_context, on_command_remove]);
6395
- const filtered_commands = React26.useMemo(() => {
6721
+ const filtered_commands = React27.useMemo(() => {
6396
6722
  if (!suggestion_state) return [];
6397
6723
  const query = suggestion_state.query.toLowerCase();
6398
6724
  if (!query) return suggestion_state.commands;
@@ -6400,7 +6726,7 @@ var HazoUiTextarea = ({
6400
6726
  (cmd) => cmd.action_label.toLowerCase().includes(query) || cmd.action.toLowerCase().includes(query) || cmd.action_description?.toLowerCase().includes(query)
6401
6727
  );
6402
6728
  }, [suggestion_state]);
6403
- React26.useEffect(() => {
6729
+ React27.useEffect(() => {
6404
6730
  if (!suggestion_state?.is_active) return;
6405
6731
  const handle_keydown = (e) => {
6406
6732
  switch (e.key) {
@@ -6435,7 +6761,7 @@ var HazoUiTextarea = ({
6435
6761
  handle_command_select,
6436
6762
  handle_popover_close
6437
6763
  ]);
6438
- React26.useEffect(() => {
6764
+ React27.useEffect(() => {
6439
6765
  if (!edit_context) return;
6440
6766
  const handle_click_outside = (e) => {
6441
6767
  if (edit_popover_ref.current && !edit_popover_ref.current.contains(e.target)) {
@@ -6450,12 +6776,12 @@ var HazoUiTextarea = ({
6450
6776
  document.removeEventListener("mousedown", handle_click_outside);
6451
6777
  };
6452
6778
  }, [edit_context]);
6453
- const edit_commands = React26.useMemo(() => {
6779
+ const edit_commands = React27.useMemo(() => {
6454
6780
  if (!edit_context) return [];
6455
6781
  const prefix_config = prefixes.find((p) => p.char === edit_context.command.prefix);
6456
6782
  return prefix_config?.commands || [];
6457
6783
  }, [edit_context, prefixes]);
6458
- React26.useEffect(() => {
6784
+ React27.useEffect(() => {
6459
6785
  if (!edit_context) return;
6460
6786
  const handle_keydown = (e) => {
6461
6787
  switch (e.key) {
@@ -6493,7 +6819,7 @@ var HazoUiTextarea = ({
6493
6819
  handle_command_remove,
6494
6820
  handle_edit_close
6495
6821
  ]);
6496
- React26.useEffect(() => {
6822
+ React27.useEffect(() => {
6497
6823
  const handle_pill_click = (e) => {
6498
6824
  const detail = e.detail;
6499
6825
  const { id, prefix, action, action_label, node_pos } = detail;
@@ -6796,8 +7122,8 @@ function HazoUiDialog({
6796
7122
  const config = get_hazo_ui_config();
6797
7123
  const is_confirm_kind = kind === "confirm";
6798
7124
  const is_status_kind = kind === "status";
6799
- const [internal_confirm_loading, set_internal_confirm_loading] = React26.useState(false);
6800
- const cancel_ref = React26.useRef(null);
7125
+ const [internal_confirm_loading, set_internal_confirm_loading] = React27.useState(false);
7126
+ const cancel_ref = React27.useRef(null);
6801
7127
  const variant_preset = variant !== "default" ? VARIANT_PRESETS[variant] : is_status_kind || is_confirm_kind ? NEUTRAL_VARIANT_PRESET : void 0;
6802
7128
  const resolved_action_button_variant = actionButtonVariant ?? variant_preset?.action_button_variant ?? "default";
6803
7129
  const showCancelButton = showCancelButtonProp ?? (is_status_kind ? false : true);
@@ -7182,7 +7508,7 @@ function HazoUiConfirmDialog({
7182
7508
  }
7183
7509
  );
7184
7510
  }
7185
- var Slider = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(
7511
+ var Slider = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(
7186
7512
  SliderPrimitive.Root,
7187
7513
  {
7188
7514
  ref,
@@ -7235,7 +7561,7 @@ async function getCroppedImg(imageSrc, areaPixels, outputSize, quality) {
7235
7561
  );
7236
7562
  });
7237
7563
  }
7238
- var HazoUiImageCropper = React26.forwardRef(function HazoUiImageCropper2({
7564
+ var HazoUiImageCropper = React27.forwardRef(function HazoUiImageCropper2({
7239
7565
  imageSrc,
7240
7566
  onCropped,
7241
7567
  outputSize = 512,
@@ -7243,19 +7569,19 @@ var HazoUiImageCropper = React26.forwardRef(function HazoUiImageCropper2({
7243
7569
  zoomLabel = "Zoom",
7244
7570
  className
7245
7571
  }, ref) {
7246
- const [crop, set_crop] = React26.useState({
7572
+ const [crop, set_crop] = React27.useState({
7247
7573
  x: 0,
7248
7574
  y: 0
7249
7575
  });
7250
- const [zoom, set_zoom] = React26.useState(1);
7251
- const cropped_area_pixels_ref = React26.useRef(null);
7252
- const handle_crop_complete = React26.useCallback(
7576
+ const [zoom, set_zoom] = React27.useState(1);
7577
+ const cropped_area_pixels_ref = React27.useRef(null);
7578
+ const handle_crop_complete = React27.useCallback(
7253
7579
  (_croppedArea, croppedAreaPixels) => {
7254
7580
  cropped_area_pixels_ref.current = croppedAreaPixels;
7255
7581
  },
7256
7582
  []
7257
7583
  );
7258
- React26.useImperativeHandle(
7584
+ React27.useImperativeHandle(
7259
7585
  ref,
7260
7586
  () => ({
7261
7587
  getCroppedBlob: async () => {
@@ -7335,10 +7661,10 @@ function HazoUiImageCropperDialog({
7335
7661
  outputSize = 512,
7336
7662
  quality = 0.9
7337
7663
  }) {
7338
- const cropper_ref = React26.useRef(null);
7339
- const [image_src, set_image_src] = React26.useState(null);
7340
- const [is_confirming, set_is_confirming] = React26.useState(false);
7341
- React26.useEffect(() => {
7664
+ const cropper_ref = React27.useRef(null);
7665
+ const [image_src, set_image_src] = React27.useState(null);
7666
+ const [is_confirming, set_is_confirming] = React27.useState(false);
7667
+ React27.useEffect(() => {
7342
7668
  if (!file) {
7343
7669
  set_image_src(null);
7344
7670
  return;
@@ -7394,7 +7720,7 @@ Drawer.displayName = "Drawer";
7394
7720
  var DrawerTrigger = Drawer$1.Trigger;
7395
7721
  var DrawerPortal = Drawer$1.Portal;
7396
7722
  var DrawerClose = Drawer$1.Close;
7397
- var DrawerOverlay = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7723
+ var DrawerOverlay = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7398
7724
  Drawer$1.Overlay,
7399
7725
  {
7400
7726
  ref,
@@ -7406,7 +7732,7 @@ var DrawerOverlay = React26.forwardRef(({ className, ...props }, ref) => /* @__P
7406
7732
  }
7407
7733
  ));
7408
7734
  DrawerOverlay.displayName = "DrawerOverlay";
7409
- var DrawerContent = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DrawerPortal, { children: [
7735
+ var DrawerContent = React27.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DrawerPortal, { children: [
7410
7736
  /* @__PURE__ */ jsx(DrawerOverlay, {}),
7411
7737
  /* @__PURE__ */ jsxs(
7412
7738
  Drawer$1.Content,
@@ -7447,7 +7773,7 @@ var DrawerFooter = ({
7447
7773
  }
7448
7774
  );
7449
7775
  DrawerFooter.displayName = "DrawerFooter";
7450
- var DrawerTitle = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7776
+ var DrawerTitle = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7451
7777
  Drawer$1.Title,
7452
7778
  {
7453
7779
  ref,
@@ -7459,7 +7785,7 @@ var DrawerTitle = React26.forwardRef(({ className, ...props }, ref) => /* @__PUR
7459
7785
  }
7460
7786
  ));
7461
7787
  DrawerTitle.displayName = "DrawerTitle";
7462
- var DrawerDescription = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7788
+ var DrawerDescription = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7463
7789
  Drawer$1.Description,
7464
7790
  {
7465
7791
  ref,
@@ -7469,14 +7795,14 @@ var DrawerDescription = React26.forwardRef(({ className, ...props }, ref) => /*
7469
7795
  ));
7470
7796
  DrawerDescription.displayName = "DrawerDescription";
7471
7797
  function useMediaQuery(query) {
7472
- const get_match = React26.useCallback(() => {
7798
+ const get_match = React27.useCallback(() => {
7473
7799
  if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
7474
7800
  return false;
7475
7801
  }
7476
7802
  return window.matchMedia(query).matches;
7477
7803
  }, [query]);
7478
- const [matches, set_matches] = React26.useState(false);
7479
- React26.useEffect(() => {
7804
+ const [matches, set_matches] = React27.useState(false);
7805
+ React27.useEffect(() => {
7480
7806
  if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
7481
7807
  return;
7482
7808
  }
@@ -7493,7 +7819,7 @@ function useMediaQuery(query) {
7493
7819
  return matches;
7494
7820
  }
7495
7821
  var Accordion = AccordionPrimitive.Root;
7496
- var AccordionItem = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7822
+ var AccordionItem = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7497
7823
  AccordionPrimitive.Item,
7498
7824
  {
7499
7825
  ref,
@@ -7502,7 +7828,7 @@ var AccordionItem = React26.forwardRef(({ className, ...props }, ref) => /* @__P
7502
7828
  }
7503
7829
  ));
7504
7830
  AccordionItem.displayName = "AccordionItem";
7505
- var AccordionTrigger = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
7831
+ var AccordionTrigger = React27.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
7506
7832
  AccordionPrimitive.Trigger,
7507
7833
  {
7508
7834
  ref,
@@ -7518,7 +7844,7 @@ var AccordionTrigger = React26.forwardRef(({ className, children, ...props }, re
7518
7844
  }
7519
7845
  ) }));
7520
7846
  AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
7521
- var AccordionContent = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
7847
+ var AccordionContent = React27.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
7522
7848
  AccordionPrimitive.Content,
7523
7849
  {
7524
7850
  ref,
@@ -7528,7 +7854,7 @@ var AccordionContent = React26.forwardRef(({ className, children, ...props }, re
7528
7854
  }
7529
7855
  ));
7530
7856
  AccordionContent.displayName = AccordionPrimitive.Content.displayName;
7531
- var Checkbox = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7857
+ var Checkbox = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7532
7858
  CheckboxPrimitive.Root,
7533
7859
  {
7534
7860
  ref,
@@ -7553,7 +7879,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
7553
7879
  var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
7554
7880
  var DropdownMenuSub = DropdownMenuPrimitive.Sub;
7555
7881
  var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
7556
- var DropdownMenuSubTrigger = React26.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
7882
+ var DropdownMenuSubTrigger = React27.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
7557
7883
  DropdownMenuPrimitive.SubTrigger,
7558
7884
  {
7559
7885
  ref,
@@ -7570,7 +7896,7 @@ var DropdownMenuSubTrigger = React26.forwardRef(({ className, inset, children, .
7570
7896
  }
7571
7897
  ));
7572
7898
  DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
7573
- var DropdownMenuSubContent = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7899
+ var DropdownMenuSubContent = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7574
7900
  DropdownMenuPrimitive.SubContent,
7575
7901
  {
7576
7902
  ref,
@@ -7582,7 +7908,7 @@ var DropdownMenuSubContent = React26.forwardRef(({ className, ...props }, ref) =
7582
7908
  }
7583
7909
  ));
7584
7910
  DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
7585
- var DropdownMenuContent = React26.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
7911
+ var DropdownMenuContent = React27.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
7586
7912
  DropdownMenuPrimitive.Content,
7587
7913
  {
7588
7914
  ref,
@@ -7595,7 +7921,7 @@ var DropdownMenuContent = React26.forwardRef(({ className, sideOffset = 4, ...pr
7595
7921
  }
7596
7922
  ) }));
7597
7923
  DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
7598
- var DropdownMenuItem = React26.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
7924
+ var DropdownMenuItem = React27.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
7599
7925
  DropdownMenuPrimitive.Item,
7600
7926
  {
7601
7927
  ref,
@@ -7608,7 +7934,7 @@ var DropdownMenuItem = React26.forwardRef(({ className, inset, ...props }, ref)
7608
7934
  }
7609
7935
  ));
7610
7936
  DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
7611
- var DropdownMenuCheckboxItem = React26.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
7937
+ var DropdownMenuCheckboxItem = React27.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
7612
7938
  DropdownMenuPrimitive.CheckboxItem,
7613
7939
  {
7614
7940
  ref,
@@ -7625,7 +7951,7 @@ var DropdownMenuCheckboxItem = React26.forwardRef(({ className, children, checke
7625
7951
  }
7626
7952
  ));
7627
7953
  DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
7628
- var DropdownMenuRadioItem = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
7954
+ var DropdownMenuRadioItem = React27.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
7629
7955
  DropdownMenuPrimitive.RadioItem,
7630
7956
  {
7631
7957
  ref,
@@ -7641,7 +7967,7 @@ var DropdownMenuRadioItem = React26.forwardRef(({ className, children, ...props
7641
7967
  }
7642
7968
  ));
7643
7969
  DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
7644
- var DropdownMenuLabel = React26.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
7970
+ var DropdownMenuLabel = React27.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
7645
7971
  DropdownMenuPrimitive.Label,
7646
7972
  {
7647
7973
  ref,
@@ -7654,7 +7980,7 @@ var DropdownMenuLabel = React26.forwardRef(({ className, inset, ...props }, ref)
7654
7980
  }
7655
7981
  ));
7656
7982
  DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
7657
- var DropdownMenuSeparator = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7983
+ var DropdownMenuSeparator = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7658
7984
  DropdownMenuPrimitive.Separator,
7659
7985
  {
7660
7986
  ref,
@@ -7678,7 +8004,7 @@ var DropdownMenuShortcut = ({
7678
8004
  DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
7679
8005
  var HoverCard = HoverCardPrimitive.Root;
7680
8006
  var HoverCardTrigger = HoverCardPrimitive.Trigger;
7681
- var HoverCardContent = React26.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
8007
+ var HoverCardContent = React27.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
7682
8008
  HoverCardPrimitive.Content,
7683
8009
  {
7684
8010
  ref,
@@ -7692,7 +8018,7 @@ var HoverCardContent = React26.forwardRef(({ className, align = "center", sideOf
7692
8018
  }
7693
8019
  ));
7694
8020
  HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
7695
- var Label3 = React26.forwardRef(
8021
+ var Label3 = React27.forwardRef(
7696
8022
  ({ className, ...props }, ref) => {
7697
8023
  return /* @__PURE__ */ jsx(
7698
8024
  "label",
@@ -7708,7 +8034,7 @@ var Label3 = React26.forwardRef(
7708
8034
  }
7709
8035
  );
7710
8036
  Label3.displayName = "Label";
7711
- var Switch = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
8037
+ var Switch = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7712
8038
  SwitchPrimitives.Root,
7713
8039
  {
7714
8040
  className: cn(
@@ -7728,7 +8054,7 @@ var Switch = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
7728
8054
  }
7729
8055
  ));
7730
8056
  Switch.displayName = SwitchPrimitives.Root.displayName;
7731
- var Textarea = React26.forwardRef(
8057
+ var Textarea = React27.forwardRef(
7732
8058
  ({ className, ...props }, ref) => {
7733
8059
  return /* @__PURE__ */ jsx(
7734
8060
  "textarea",
@@ -7748,7 +8074,7 @@ var Textarea = React26.forwardRef(
7748
8074
  }
7749
8075
  );
7750
8076
  Textarea.displayName = "Textarea";
7751
- var Separator3 = React26.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
8077
+ var Separator3 = React27.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
7752
8078
  SeparatorPrimitive.Root,
7753
8079
  {
7754
8080
  ref,
@@ -7766,7 +8092,7 @@ Separator3.displayName = SeparatorPrimitive.Root.displayName;
7766
8092
  var Collapsible = CollapsiblePrimitive.Root;
7767
8093
  var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
7768
8094
  var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
7769
- var ScrollArea = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
8095
+ var ScrollArea = React27.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
7770
8096
  ScrollAreaPrimitive.Root,
7771
8097
  {
7772
8098
  ref,
@@ -7780,7 +8106,7 @@ var ScrollArea = React26.forwardRef(({ className, children, ...props }, ref) =>
7780
8106
  }
7781
8107
  ));
7782
8108
  ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
7783
- var ScrollBar = React26.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
8109
+ var ScrollBar = React27.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
7784
8110
  ScrollAreaPrimitive.ScrollAreaScrollbar,
7785
8111
  {
7786
8112
  ref,
@@ -7796,27 +8122,27 @@ var ScrollBar = React26.forwardRef(({ className, orientation = "vertical", ...pr
7796
8122
  }
7797
8123
  ));
7798
8124
  ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
7799
- var Card = React26.forwardRef(
8125
+ var Card = React27.forwardRef(
7800
8126
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("rounded-lg border bg-card text-card-foreground shadow-sm", className), ...props })
7801
8127
  );
7802
8128
  Card.displayName = "Card";
7803
- var CardHeader = React26.forwardRef(
8129
+ var CardHeader = React27.forwardRef(
7804
8130
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
7805
8131
  );
7806
8132
  CardHeader.displayName = "CardHeader";
7807
- var CardTitle = React26.forwardRef(
8133
+ var CardTitle = React27.forwardRef(
7808
8134
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx("h3", { ref, className: cn("text-2xl font-semibold leading-none tracking-tight", className), ...props })
7809
8135
  );
7810
8136
  CardTitle.displayName = "CardTitle";
7811
- var CardDescription = React26.forwardRef(
8137
+ var CardDescription = React27.forwardRef(
7812
8138
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
7813
8139
  );
7814
8140
  CardDescription.displayName = "CardDescription";
7815
- var CardContent = React26.forwardRef(
8141
+ var CardContent = React27.forwardRef(
7816
8142
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-6 pt-0", className), ...props })
7817
8143
  );
7818
8144
  CardContent.displayName = "CardContent";
7819
- var CardFooter = React26.forwardRef(
8145
+ var CardFooter = React27.forwardRef(
7820
8146
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
7821
8147
  );
7822
8148
  CardFooter.displayName = "CardFooter";
@@ -7849,16 +8175,16 @@ var toggleVariants = cva(
7849
8175
  defaultVariants: { variant: "default", size: "default" }
7850
8176
  }
7851
8177
  );
7852
- var Toggle = React26.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(TogglePrimitive.Root, { ref, className: cn(toggleVariants({ variant, size, className })), ...props }));
8178
+ var Toggle = React27.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(TogglePrimitive.Root, { ref, className: cn(toggleVariants({ variant, size, className })), ...props }));
7853
8179
  Toggle.displayName = TogglePrimitive.Root.displayName;
7854
- var ToggleGroupContext = React26.createContext({
8180
+ var ToggleGroupContext = React27.createContext({
7855
8181
  size: "default",
7856
8182
  variant: "default"
7857
8183
  });
7858
- var ToggleGroup = React26.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx(ToggleGroupPrimitive.Root, { ref, className: cn("flex items-center justify-center gap-1", className), ...props, children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant, size }, children }) }));
8184
+ var ToggleGroup = React27.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx(ToggleGroupPrimitive.Root, { ref, className: cn("flex items-center justify-center gap-1", className), ...props, children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant, size }, children }) }));
7859
8185
  ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
7860
- var ToggleGroupItem = React26.forwardRef(({ className, children, variant, size, ...props }, ref) => {
7861
- const context = React26.useContext(ToggleGroupContext);
8186
+ var ToggleGroupItem = React27.forwardRef(({ className, children, variant, size, ...props }, ref) => {
8187
+ const context = React27.useContext(ToggleGroupContext);
7862
8188
  return /* @__PURE__ */ jsx(
7863
8189
  ToggleGroupPrimitive.Item,
7864
8190
  {
@@ -7873,7 +8199,7 @@ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
7873
8199
  var AlertDialog = AlertDialogPrimitive.Root;
7874
8200
  var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
7875
8201
  var AlertDialogPortal = AlertDialogPrimitive.Portal;
7876
- var AlertDialogOverlay = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
8202
+ var AlertDialogOverlay = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7877
8203
  AlertDialogPrimitive.Overlay,
7878
8204
  {
7879
8205
  ref,
@@ -7882,7 +8208,7 @@ var AlertDialogOverlay = React26.forwardRef(({ className, ...props }, ref) => /*
7882
8208
  }
7883
8209
  ));
7884
8210
  AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
7885
- var AlertDialogContent = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
8211
+ var AlertDialogContent = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
7886
8212
  /* @__PURE__ */ jsx(AlertDialogOverlay, {}),
7887
8213
  /* @__PURE__ */ jsx(
7888
8214
  AlertDialogPrimitive.Content,
@@ -7898,13 +8224,13 @@ var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div",
7898
8224
  AlertDialogHeader.displayName = "AlertDialogHeader";
7899
8225
  var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
7900
8226
  AlertDialogFooter.displayName = "AlertDialogFooter";
7901
- var AlertDialogTitle = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Title, { ref, className: cn("text-lg font-semibold", className), ...props }));
8227
+ var AlertDialogTitle = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Title, { ref, className: cn("text-lg font-semibold", className), ...props }));
7902
8228
  AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
7903
- var AlertDialogDescription = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
8229
+ var AlertDialogDescription = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
7904
8230
  AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
7905
- var AlertDialogAction = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Action, { ref, className: cn(buttonVariants(), className), ...props }));
8231
+ var AlertDialogAction = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Action, { ref, className: cn(buttonVariants(), className), ...props }));
7906
8232
  AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
7907
- var AlertDialogCancel = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Cancel, { ref, className: cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className), ...props }));
8233
+ var AlertDialogCancel = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Cancel, { ref, className: cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className), ...props }));
7908
8234
  AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
7909
8235
  var buttonGroupVariants = cva(
7910
8236
  "flex w-fit items-stretch [&>*]:focus-visible:relative [&>*]:focus-visible:z-10",
@@ -7932,7 +8258,7 @@ function ButtonGroupText({ className, asChild = false, ...props }) {
7932
8258
  function ButtonGroupSeparator({ className, orientation = "vertical", ...props }) {
7933
8259
  return /* @__PURE__ */ jsx(Separator3, { orientation, className: cn("bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto", className), ...props });
7934
8260
  }
7935
- var InputAffix = React26.forwardRef(
8261
+ var InputAffix = React27.forwardRef(
7936
8262
  ({ className, containerClassName, prefix, suffix, type = "text", ...props }, ref) => {
7937
8263
  return /* @__PURE__ */ jsxs(
7938
8264
  "div",
@@ -7964,7 +8290,7 @@ var InputAffix = React26.forwardRef(
7964
8290
  }
7965
8291
  );
7966
8292
  InputAffix.displayName = "InputAffix";
7967
- var SkeletonBase = React26.forwardRef(
8293
+ var SkeletonBase = React27.forwardRef(
7968
8294
  ({ className, ...rest }, ref) => /* @__PURE__ */ jsx(
7969
8295
  "div",
7970
8296
  {
@@ -8140,8 +8466,8 @@ function LoadingTimeout({
8140
8466
  firm: thresholds?.firm ?? 15e3,
8141
8467
  expired: thresholds?.expired ?? 3e4
8142
8468
  };
8143
- const [phase, setPhase] = React26.useState(active ? "silent" : "idle");
8144
- React26.useEffect(() => {
8469
+ const [phase, setPhase] = React27.useState(active ? "silent" : "idle");
8470
+ React27.useEffect(() => {
8145
8471
  if (!active) {
8146
8472
  setPhase("idle");
8147
8473
  return;
@@ -8200,7 +8526,7 @@ function ProgressiveImage({
8200
8526
  onLoad,
8201
8527
  onError
8202
8528
  }) {
8203
- const [loaded, setLoaded] = React26.useState(false);
8529
+ const [loaded, setLoaded] = React27.useState(false);
8204
8530
  return /* @__PURE__ */ jsxs(
8205
8531
  "div",
8206
8532
  {
@@ -8353,7 +8679,7 @@ function NotificationPanel({
8353
8679
  loading = false,
8354
8680
  className
8355
8681
  }) {
8356
- const hasChildren = React26.Children.count(children) > 0 && children !== null && children !== void 0;
8682
+ const hasChildren = React27.Children.count(children) > 0 && children !== null && children !== void 0;
8357
8683
  return /* @__PURE__ */ jsxs(
8358
8684
  "div",
8359
8685
  {
@@ -8704,6 +9030,9 @@ function KanbanCard({
8704
9030
  tabIndex: 0,
8705
9031
  "aria-roledescription": "draggable card",
8706
9032
  "aria-grabbed": isDragging,
9033
+ onDoubleClick: () => {
9034
+ if (showEdit && onEditRequest && !dragging) onEditRequest(item);
9035
+ },
8707
9036
  children: [
8708
9037
  showEdit && onEditRequest && !dragging && /* @__PURE__ */ jsx(
8709
9038
  "button",
@@ -8810,29 +9139,29 @@ function KanbanEditor({
8810
9139
  onSave,
8811
9140
  onClose
8812
9141
  }) {
8813
- const [draft, set_draft] = React26.useState(item);
8814
- const [saving, set_saving] = React26.useState(false);
8815
- const [error, set_error] = React26.useState(null);
9142
+ const [draft, set_draft] = React27.useState(item);
9143
+ const [saving, set_saving] = React27.useState(false);
9144
+ const [error, set_error] = React27.useState(null);
8816
9145
  const item_id = item?.id ?? null;
8817
- React26.useEffect(() => {
9146
+ React27.useEffect(() => {
8818
9147
  set_draft(item);
8819
9148
  set_error(null);
8820
9149
  set_saving(false);
8821
9150
  }, [item_id]);
8822
9151
  const resolved_columns = columns ?? [];
8823
9152
  const resolved_priorities = priorities ?? DEFAULT_PRIORITIES;
8824
- const resolved_fields = React26.useMemo(() => {
9153
+ const resolved_fields = React27.useMemo(() => {
8825
9154
  if (fields) return fields;
8826
9155
  if (!item) return [];
8827
9156
  return auto_detect_fields(item, resolved_columns);
8828
9157
  }, [fields, item, resolved_columns]);
8829
- const required_keys = React26.useMemo(
9158
+ const required_keys = React27.useMemo(
8830
9159
  () => resolved_fields.filter(
8831
9160
  (f) => f.required && (f.type === "text" || f.type === "textarea" || f.type === "number")
8832
9161
  ).map((f) => f.key),
8833
9162
  [resolved_fields]
8834
9163
  );
8835
- const all_required_filled = React26.useMemo(() => {
9164
+ const all_required_filled = React27.useMemo(() => {
8836
9165
  if (!draft) return false;
8837
9166
  for (const key of required_keys) {
8838
9167
  const v = draft[key];
@@ -8841,7 +9170,7 @@ function KanbanEditor({
8841
9170
  }
8842
9171
  return true;
8843
9172
  }, [draft, required_keys]);
8844
- const is_dirty = React26.useMemo(() => {
9173
+ const is_dirty = React27.useMemo(() => {
8845
9174
  if (!draft || !item) return false;
8846
9175
  try {
8847
9176
  return JSON.stringify(draft) !== JSON.stringify(item);
@@ -8849,7 +9178,7 @@ function KanbanEditor({
8849
9178
  return draft !== item;
8850
9179
  }
8851
9180
  }, [draft, item]);
8852
- const handle_save = React26.useCallback(async () => {
9181
+ const handle_save = React27.useCallback(async () => {
8853
9182
  if (!draft || !item) return;
8854
9183
  if (saving) return;
8855
9184
  set_error(null);
@@ -8974,6 +9303,15 @@ function KanbanEditorFieldRow({
8974
9303
  onChange: (e) => set_value(e.target.value)
8975
9304
  }
8976
9305
  ),
9306
+ field.type === "richtext" && /* @__PURE__ */ jsx(
9307
+ HazoUiRte,
9308
+ {
9309
+ html: typeof value === "string" ? value : "",
9310
+ min_height: "180px",
9311
+ placeholder: field.placeholder,
9312
+ on_change: (out) => set_value(out.html)
9313
+ }
9314
+ ),
8977
9315
  field.type === "textarea" && /* @__PURE__ */ jsx(
8978
9316
  Textarea,
8979
9317
  {
@@ -9068,11 +9406,11 @@ function HazoUiKanbanFilter({
9068
9406
  className
9069
9407
  }) {
9070
9408
  const is_controlled = value !== void 0;
9071
- const [internal, set_internal] = React26.useState(
9409
+ const [internal, set_internal] = React27.useState(
9072
9410
  defaultValue ?? EMPTY_FILTER
9073
9411
  );
9074
9412
  const current = is_controlled ? value : internal;
9075
- const update = React26.useCallback(
9413
+ const update = React27.useCallback(
9076
9414
  (next) => {
9077
9415
  if (!is_controlled) set_internal(next);
9078
9416
  onChange?.(next);
@@ -9235,29 +9573,29 @@ function HazoUiKanban({
9235
9573
  onCardSave,
9236
9574
  disableEdit = false
9237
9575
  }) {
9238
- const label_fn = React26.useCallback(
9576
+ const label_fn = React27.useCallback(
9239
9577
  (item) => itemLabel ? itemLabel(item) : item.id,
9240
9578
  [itemLabel]
9241
9579
  );
9242
- const dnd_context_id = React26.useId();
9243
- const [overlay, set_overlay] = React26.useState(
9580
+ const dnd_context_id = React27.useId();
9581
+ const [overlay, set_overlay] = React27.useState(
9244
9582
  /* @__PURE__ */ new Map()
9245
9583
  );
9246
- const [active_id, set_active_id] = React26.useState(null);
9247
- const [active_tab, set_active_tab] = React26.useState(columns[0]?.key ?? "");
9248
- const [editing_item, set_editing_item] = React26.useState(null);
9584
+ const [active_id, set_active_id] = React27.useState(null);
9585
+ const [active_tab, set_active_tab] = React27.useState(columns[0]?.key ?? "");
9586
+ const [editing_item, set_editing_item] = React27.useState(null);
9249
9587
  const show_edit = !disableEdit && typeof onCardSave === "function";
9250
- const handle_edit_request = React26.useCallback(
9588
+ const handle_edit_request = React27.useCallback(
9251
9589
  (it) => {
9252
9590
  const typed = items.find((x) => x.id === it.id);
9253
9591
  if (typed) set_editing_item(typed);
9254
9592
  },
9255
9593
  [items]
9256
9594
  );
9257
- const handle_editor_close = React26.useCallback(() => {
9595
+ const handle_editor_close = React27.useCallback(() => {
9258
9596
  set_editing_item(null);
9259
9597
  }, []);
9260
- React26.useEffect(() => {
9598
+ React27.useEffect(() => {
9261
9599
  if (overlay.size === 0) return;
9262
9600
  set_overlay((prev) => {
9263
9601
  let changed = false;
@@ -9272,11 +9610,11 @@ function HazoUiKanban({
9272
9610
  return changed ? next : prev;
9273
9611
  });
9274
9612
  }, [items, overlay]);
9275
- const grouped = React26.useMemo(
9613
+ const grouped = React27.useMemo(
9276
9614
  () => group_items_by_column(items, overlay, columns),
9277
9615
  [items, overlay, columns]
9278
9616
  );
9279
- const find_item = React26.useCallback(
9617
+ const find_item = React27.useCallback(
9280
9618
  (id) => items.find((i) => i.id === id),
9281
9619
  [items]
9282
9620
  );
@@ -9284,7 +9622,7 @@ function HazoUiKanban({
9284
9622
  useSensor(PointerSensor, { activationConstraint: { distance: 5 } }),
9285
9623
  useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates })
9286
9624
  );
9287
- const merged_announcements = React26.useMemo(() => {
9625
+ const merged_announcements = React27.useMemo(() => {
9288
9626
  const defaults = default_announcements(label_fn);
9289
9627
  return {
9290
9628
  onDragStart: announcements?.onDragStart ?? defaults.onDragStart,
@@ -9293,7 +9631,7 @@ function HazoUiKanban({
9293
9631
  onDragCancel: announcements?.onDragCancel ?? defaults.onDragCancel
9294
9632
  };
9295
9633
  }, [announcements, label_fn]);
9296
- const dnd_announcements = React26.useMemo(
9634
+ const dnd_announcements = React27.useMemo(
9297
9635
  () => ({
9298
9636
  onDragStart({ active }) {
9299
9637
  const id = String(active.id);
@@ -9351,10 +9689,10 @@ function HazoUiKanban({
9351
9689
  }),
9352
9690
  [find_item, columns, grouped, merged_announcements]
9353
9691
  );
9354
- const handle_drag_start = React26.useCallback((event) => {
9692
+ const handle_drag_start = React27.useCallback((event) => {
9355
9693
  set_active_id(String(event.active.id));
9356
9694
  }, []);
9357
- const make_revert_handle = React26.useCallback(
9695
+ const make_revert_handle = React27.useCallback(
9358
9696
  (item_id) => ({
9359
9697
  revert: () => {
9360
9698
  set_overlay((prev) => {
@@ -9367,7 +9705,7 @@ function HazoUiKanban({
9367
9705
  }),
9368
9706
  []
9369
9707
  );
9370
- const handle_drag_end = React26.useCallback(
9708
+ const handle_drag_end = React27.useCallback(
9371
9709
  (event) => {
9372
9710
  const active_id_str = String(event.active.id);
9373
9711
  set_active_id(null);
@@ -9429,7 +9767,7 @@ function HazoUiKanban({
9429
9767
  },
9430
9768
  [find_item, columns, grouped, onMove, onReorder, make_revert_handle]
9431
9769
  );
9432
- const handle_drag_cancel = React26.useCallback(() => {
9770
+ const handle_drag_cancel = React27.useCallback(() => {
9433
9771
  set_active_id(null);
9434
9772
  }, []);
9435
9773
  const active_item = active_id ? find_item(active_id) : null;
@@ -9520,7 +9858,7 @@ function HazoUiKanban({
9520
9858
  }
9521
9859
  );
9522
9860
  }
9523
- var Table2 = React26.forwardRef(
9861
+ var Table2 = React27.forwardRef(
9524
9862
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "cls_table_wrap relative w-full overflow-auto", children: /* @__PURE__ */ jsx(
9525
9863
  "table",
9526
9864
  {
@@ -9531,11 +9869,11 @@ var Table2 = React26.forwardRef(
9531
9869
  ) })
9532
9870
  );
9533
9871
  Table2.displayName = "Table";
9534
- var TableHeader2 = React26.forwardRef(
9872
+ var TableHeader2 = React27.forwardRef(
9535
9873
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props })
9536
9874
  );
9537
9875
  TableHeader2.displayName = "TableHeader";
9538
- var TableBody = React26.forwardRef(
9876
+ var TableBody = React27.forwardRef(
9539
9877
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
9540
9878
  "tbody",
9541
9879
  {
@@ -9546,7 +9884,7 @@ var TableBody = React26.forwardRef(
9546
9884
  )
9547
9885
  );
9548
9886
  TableBody.displayName = "TableBody";
9549
- var TableFooter = React26.forwardRef(
9887
+ var TableFooter = React27.forwardRef(
9550
9888
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
9551
9889
  "tfoot",
9552
9890
  {
@@ -9557,7 +9895,7 @@ var TableFooter = React26.forwardRef(
9557
9895
  )
9558
9896
  );
9559
9897
  TableFooter.displayName = "TableFooter";
9560
- var TableRow2 = React26.forwardRef(
9898
+ var TableRow2 = React27.forwardRef(
9561
9899
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
9562
9900
  "tr",
9563
9901
  {
@@ -9571,7 +9909,7 @@ var TableRow2 = React26.forwardRef(
9571
9909
  )
9572
9910
  );
9573
9911
  TableRow2.displayName = "TableRow";
9574
- var TableHead = React26.forwardRef(
9912
+ var TableHead = React27.forwardRef(
9575
9913
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
9576
9914
  "th",
9577
9915
  {
@@ -9585,7 +9923,7 @@ var TableHead = React26.forwardRef(
9585
9923
  )
9586
9924
  );
9587
9925
  TableHead.displayName = "TableHead";
9588
- var TableCell2 = React26.forwardRef(
9926
+ var TableCell2 = React27.forwardRef(
9589
9927
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
9590
9928
  "td",
9591
9929
  {
@@ -9596,7 +9934,7 @@ var TableCell2 = React26.forwardRef(
9596
9934
  )
9597
9935
  );
9598
9936
  TableCell2.displayName = "TableCell";
9599
- var TableCaption = React26.forwardRef(
9937
+ var TableCaption = React27.forwardRef(
9600
9938
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
9601
9939
  "caption",
9602
9940
  {
@@ -10168,18 +10506,18 @@ function Toolbar2(props) {
10168
10506
  enableFilterDialog,
10169
10507
  searchPlaceholder
10170
10508
  } = props;
10171
- const sortFields = React26.useMemo(
10509
+ const sortFields = React27.useMemo(
10172
10510
  () => deriveSortFields(columns),
10173
10511
  [columns]
10174
10512
  );
10175
- const filterFields = React26.useMemo(
10513
+ const filterFields = React27.useMemo(
10176
10514
  () => deriveFilterFields(columns),
10177
10515
  [columns]
10178
10516
  );
10179
- const [searchValue, setSearchValue] = React26.useState(
10517
+ const [searchValue, setSearchValue] = React27.useState(
10180
10518
  filter.search ?? ""
10181
10519
  );
10182
- React26.useEffect(() => {
10520
+ React27.useEffect(() => {
10183
10521
  setSearchValue(filter.search ?? "");
10184
10522
  }, [filter.search]);
10185
10523
  return /* @__PURE__ */ jsxs("div", { className: "cls_hazo_ui_table_toolbar flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between", children: [
@@ -10540,13 +10878,13 @@ function FunnelChart({
10540
10878
  showTooltip = true,
10541
10879
  className
10542
10880
  }) {
10543
- const [hover_idx, set_hover_idx] = React26.useState(null);
10881
+ const [hover_idx, set_hover_idx] = React27.useState(null);
10544
10882
  const fmt = valueFormat ?? format_num;
10545
10883
  const totals = steps.map(step_total);
10546
10884
  const value_max = Math.max(1, ...totals);
10547
10885
  const plot_w = width - PAD_LEFT2 - PAD_RIGHT2;
10548
10886
  const vbox_h = height ?? PAD_TOP2 + steps.length * ROW_H + PAD_BOTTOM2;
10549
- const handle_mouse_move = React26.useCallback(
10887
+ const handle_mouse_move = React27.useCallback(
10550
10888
  (e) => {
10551
10889
  if (steps.length === 0) return;
10552
10890
  const rect = e.currentTarget.getBoundingClientRect();
@@ -10561,7 +10899,7 @@ function FunnelChart({
10561
10899
  },
10562
10900
  [steps.length, vbox_h]
10563
10901
  );
10564
- const handle_mouse_leave = React26.useCallback(() => set_hover_idx(null), []);
10902
+ const handle_mouse_leave = React27.useCallback(() => set_hover_idx(null), []);
10565
10903
  return /* @__PURE__ */ jsxs(
10566
10904
  "svg",
10567
10905
  {
@@ -10749,21 +11087,21 @@ function celebrate(payload) {
10749
11087
  _enqueue(payload);
10750
11088
  }
10751
11089
  function CelebrationProvider({ children }) {
10752
- const [queue, set_queue] = React26.useState([]);
10753
- const enqueue = React26.useCallback((payload) => {
11090
+ const [queue, set_queue] = React27.useState([]);
11091
+ const enqueue = React27.useCallback((payload) => {
10754
11092
  const storage_key = `hazo_ui_celebration_${payload.id}`;
10755
11093
  if (typeof window !== "undefined" && sessionStorage.getItem(storage_key)) {
10756
11094
  return;
10757
11095
  }
10758
11096
  set_queue((q) => [...q, payload]);
10759
11097
  }, []);
10760
- React26.useEffect(() => {
11098
+ React27.useEffect(() => {
10761
11099
  _enqueue = enqueue;
10762
11100
  return () => {
10763
11101
  _enqueue = null;
10764
11102
  };
10765
11103
  }, [enqueue]);
10766
- const handle_close = React26.useCallback(() => {
11104
+ const handle_close = React27.useCallback(() => {
10767
11105
  set_queue((q) => q.slice(1));
10768
11106
  }, []);
10769
11107
  const current = queue[0] ?? null;
@@ -10792,14 +11130,14 @@ function CelebrationModalInner({
10792
11130
  autoDismissDelay = 8e3,
10793
11131
  audioChime = false
10794
11132
  } = payload;
10795
- const [visible, set_visible] = React26.useState(true);
10796
- const [is_downloading, set_is_downloading] = React26.useState(false);
10797
- const canvas_ref = React26.useRef(null);
10798
- const card_ref = React26.useRef(null);
10799
- React26.useEffect(() => {
11133
+ const [visible, set_visible] = React27.useState(true);
11134
+ const [is_downloading, set_is_downloading] = React27.useState(false);
11135
+ const canvas_ref = React27.useRef(null);
11136
+ const card_ref = React27.useRef(null);
11137
+ React27.useEffect(() => {
10800
11138
  sessionStorage.setItem(`hazo_ui_celebration_${id}`, "1");
10801
11139
  }, [id]);
10802
- React26.useEffect(() => {
11140
+ React27.useEffect(() => {
10803
11141
  if (!canvas_ref.current) return;
10804
11142
  let confetti_instance = null;
10805
11143
  import('canvas-confetti').then(({ default: confetti }) => {
@@ -10816,18 +11154,18 @@ function CelebrationModalInner({
10816
11154
  confetti_instance?.reset();
10817
11155
  };
10818
11156
  }, []);
10819
- React26.useEffect(() => {
11157
+ React27.useEffect(() => {
10820
11158
  if (!audioChime) return;
10821
11159
  const audio = new Audio(celebration_chime_default);
10822
11160
  audio.play().catch(() => {
10823
11161
  });
10824
11162
  }, [audioChime]);
10825
- React26.useEffect(() => {
11163
+ React27.useEffect(() => {
10826
11164
  if (!autoDismiss) return;
10827
11165
  const timer = window.setTimeout(close_modal, autoDismissDelay);
10828
11166
  return () => window.clearTimeout(timer);
10829
11167
  }, [autoDismiss, autoDismissDelay]);
10830
- React26.useEffect(() => {
11168
+ React27.useEffect(() => {
10831
11169
  const on_key = (e) => {
10832
11170
  if (e.key === "Escape") close_modal();
10833
11171
  };
@@ -11076,8 +11414,8 @@ function useEtaProgress(opts) {
11076
11414
  loadDurations,
11077
11415
  appendDuration
11078
11416
  } = opts;
11079
- const [value, setValue] = React26.useState(0);
11080
- const stateRef = React26.useRef({
11417
+ const [value, setValue] = React27.useState(0);
11418
+ const stateRef = React27.useRef({
11081
11419
  started: false,
11082
11420
  finished: false,
11083
11421
  startTime: 0,
@@ -11087,14 +11425,14 @@ function useEtaProgress(opts) {
11087
11425
  eta: 0,
11088
11426
  rafId: 0
11089
11427
  });
11090
- const stop = React26.useCallback(() => {
11428
+ const stop = React27.useCallback(() => {
11091
11429
  if (stateRef.current.rafId) {
11092
11430
  cancelAnimationFrame(stateRef.current.rafId);
11093
11431
  stateRef.current.rafId = 0;
11094
11432
  }
11095
11433
  }, []);
11096
- React26.useEffect(() => stop, [stop]);
11097
- const tick = React26.useCallback(() => {
11434
+ React27.useEffect(() => stop, [stop]);
11435
+ const tick = React27.useCallback(() => {
11098
11436
  const s = stateRef.current;
11099
11437
  if (s.finished || !s.started) return;
11100
11438
  const elapsed = Date.now() - s.startTime;
@@ -11103,7 +11441,7 @@ function useEtaProgress(opts) {
11103
11441
  setValue(Math.max(timeValue, unitValue));
11104
11442
  s.rafId = requestAnimationFrame(tick);
11105
11443
  }, [unitCount]);
11106
- const start = React26.useCallback(() => {
11444
+ const start = React27.useCallback(() => {
11107
11445
  const s = stateRef.current;
11108
11446
  if (s.started) return;
11109
11447
  const window2 = loadDurations();
@@ -11117,13 +11455,13 @@ function useEtaProgress(opts) {
11117
11455
  stop();
11118
11456
  s.rafId = requestAnimationFrame(tick);
11119
11457
  }, [loadDurations, unitCount, concurrency, fallbackUnitMs, stop, tick]);
11120
- const unitDone = React26.useCallback(() => {
11458
+ const unitDone = React27.useCallback(() => {
11121
11459
  const s = stateRef.current;
11122
11460
  if (!s.started || s.finished) return;
11123
11461
  s.unitsDone = Math.min(s.unitsDone + 1, unitCount);
11124
11462
  s.unitTimestamps.push(Date.now());
11125
11463
  }, [unitCount]);
11126
- const finish = React26.useCallback(() => {
11464
+ const finish = React27.useCallback(() => {
11127
11465
  const s = stateRef.current;
11128
11466
  if (s.finished) return;
11129
11467
  s.finished = true;
@@ -11157,8 +11495,8 @@ function HazoUiEtaProgress({
11157
11495
  ...endpoint ? { endpoint } : {}
11158
11496
  });
11159
11497
  const durationWindow = Array.isArray(stored) ? stored : [];
11160
- const loadDurations = React26.useCallback(() => durationWindow, [durationWindow]);
11161
- const appendDuration = React26.useCallback(
11498
+ const loadDurations = React27.useCallback(() => durationWindow, [durationWindow]);
11499
+ const appendDuration = React27.useCallback(
11162
11500
  (ms) => {
11163
11501
  append(ms, windowSize);
11164
11502
  },
@@ -11171,7 +11509,7 @@ function HazoUiEtaProgress({
11171
11509
  loadDurations,
11172
11510
  appendDuration
11173
11511
  });
11174
- React26.useEffect(() => {
11512
+ React27.useEffect(() => {
11175
11513
  if (handleRef) {
11176
11514
  handleRef.current = handle;
11177
11515
  }
@@ -11213,8 +11551,8 @@ function HazoUiMemoryDropdown({
11213
11551
  fallback: []
11214
11552
  });
11215
11553
  const storedEntries = Array.isArray(stored) ? stored : [];
11216
- const [query, setQuery] = React26.useState("");
11217
- React26.useEffect(() => {
11554
+ const [query, setQuery] = React27.useState("");
11555
+ React27.useEffect(() => {
11218
11556
  if (!add_entry) return;
11219
11557
  const updated = upsertEntry(storedEntries, add_entry);
11220
11558
  setValue(updated);
@@ -11293,8 +11631,8 @@ function HazoUiMemoryDropdown({
11293
11631
  );
11294
11632
  }
11295
11633
  function EntryRow({ entry, on_select, onDelete }) {
11296
- const [deleteHovered, setDeleteHovered] = React26.useState(false);
11297
- const [rowHovered, setRowHovered] = React26.useState(false);
11634
+ const [deleteHovered, setDeleteHovered] = React27.useState(false);
11635
+ const [rowHovered, setRowHovered] = React27.useState(false);
11298
11636
  return /* @__PURE__ */ jsxs(
11299
11637
  "div",
11300
11638
  {
@@ -11351,67 +11689,6 @@ function EntryRow({ entry, on_select, onDelete }) {
11351
11689
  }
11352
11690
  );
11353
11691
  }
11354
- var ThemeContext = React26.createContext(void 0);
11355
- function HazoThemeProvider({
11356
- children,
11357
- defaultTheme = "system",
11358
- storageKey = "theme"
11359
- }) {
11360
- const [theme, setTheme] = useLocalStorage(storageKey, defaultTheme);
11361
- const prefersDark = useMediaQuery("(prefers-color-scheme: dark)");
11362
- const resolvedTheme = theme === "system" ? prefersDark ? "dark" : "light" : theme;
11363
- React26.useEffect(() => {
11364
- document.documentElement.classList.toggle("dark", resolvedTheme === "dark");
11365
- }, [resolvedTheme]);
11366
- const toggleTheme = React26.useCallback(() => {
11367
- setTheme(resolvedTheme === "dark" ? "light" : "dark");
11368
- }, [resolvedTheme, setTheme]);
11369
- const value = React26.useMemo(
11370
- () => ({ theme, setTheme, resolvedTheme, toggleTheme }),
11371
- [theme, setTheme, resolvedTheme, toggleTheme]
11372
- );
11373
- return /* @__PURE__ */ jsx(ThemeContext.Provider, { value, children });
11374
- }
11375
- function useTheme() {
11376
- const context = React26.useContext(ThemeContext);
11377
- if (context === void 0) {
11378
- throw new Error("useTheme must be used within a <HazoThemeProvider>");
11379
- }
11380
- return context;
11381
- }
11382
- function ThemeScript({ storageKey = "theme" }) {
11383
- const script = `(function(){try{var k=${JSON.stringify(
11384
- storageKey
11385
- )};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){}})();`;
11386
- return /* @__PURE__ */ jsx("script", { dangerouslySetInnerHTML: { __html: script } });
11387
- }
11388
- var ThemeToggle = React26.forwardRef(
11389
- ({ className, ...props }, ref) => {
11390
- const { resolvedTheme, toggleTheme } = useTheme();
11391
- const [mounted, setMounted] = React26.useState(false);
11392
- React26.useEffect(() => {
11393
- setMounted(true);
11394
- }, []);
11395
- const isDark = mounted && resolvedTheme === "dark";
11396
- const label = isDark ? "Switch to light theme" : "Switch to dark theme";
11397
- return /* @__PURE__ */ jsx(
11398
- "button",
11399
- {
11400
- type: "button",
11401
- ref,
11402
- onClick: toggleTheme,
11403
- "aria-label": label,
11404
- className: cn(
11405
- "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",
11406
- className
11407
- ),
11408
- ...props,
11409
- children: isDark ? /* @__PURE__ */ jsx(Sun, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(Moon, { className: "h-4 w-4" })
11410
- }
11411
- );
11412
- }
11413
- );
11414
- ThemeToggle.displayName = "ThemeToggle";
11415
11692
  function Logo({
11416
11693
  logoUrl,
11417
11694
  logoUrlDark,
@@ -11580,6 +11857,6 @@ function AppFooter({ variant, footer, identity, className }) {
11580
11857
  );
11581
11858
  }
11582
11859
 
11583
- export { ANIMATION_PRESETS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AppFooter, AppHeader, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CELEBRATION_GRADIENT, Calendar, CanvasTextToolbar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CelebrationProvider, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, CommandNodeExtension, CommandPill, CommandPopover, DateRangeSelector, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ErrorBanner, ErrorPage, FunnelChart, HazoContextProvider, HazoThemeProvider, HazoUiConfirmDialog, HazoUiDialog, DialogClose as HazoUiDialogClose, DialogContent as HazoUiDialogContent, DialogDescription as HazoUiDialogDescription, DialogFooter as HazoUiDialogFooter, DialogHeader as HazoUiDialogHeader, DialogOverlay as HazoUiDialogOverlay, DialogPortal as HazoUiDialogPortal, Dialog as HazoUiDialogRoot, DialogTitle as HazoUiDialogTitle, DialogTrigger as HazoUiDialogTrigger, HazoUiEtaProgress, HazoUiFlexInput, HazoUiFlexRadio, HazoUiImageCropper, HazoUiImageCropperDialog, HazoUiKanban, HazoUiKanbanFilter, HazoUiMemoryDropdown, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, HazoUiPillRadio, HazoUiProgressBar, HazoUiRte, HazoUiTable, HazoUiTextarea, HazoUiTextbox, HazoUiToaster, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputAffix, InverseSparkline, Label3 as Label, LoadingTimeout, Logo, MarkdownEditor, NotificationCountBadge, NotificationItem, NotificationPanel, Popover, PopoverContent, PopoverTrigger, ProgressiveImage, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Command as ShadcnCommand, CommandEmpty as ShadcnCommandEmpty, CommandGroup as ShadcnCommandGroup, CommandInput as ShadcnCommandInput, CommandItem as ShadcnCommandItem, CommandList as ShadcnCommandList, Skeleton, SkeletonBar, SkeletonCircle, SkeletonGroup, SkeletonRect, Slider, Sparkline, Spinner, StackedBars, Switch, Table2 as Table, TableBody, TableCaption, TableCell2 as TableCell, TableFooter, TableHead, TableHeader2 as TableHeader, TableRow2 as TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeScript, ThemeToggle, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, applyKanbanFilter, buttonGroupVariants, celebrate, cn, computeEta, create_command_suggestion_extension, easeToward, errorToast, format_num, generateUUID, get_hazo_ui_config, get_logger, median, parse_commands_from_text, pick_x_label_indices, reset_hazo_ui_config, resolve_animation_classes, safeHref, set_hazo_ui_config, set_logger, successToast, text_to_tiptap_content, toggleVariants, upsertEntry as upsertMemoryEntry, useClickOutside, useCopyToClipboard, useDebounce, useErrorDisplay, useEtaProgress, useFullscreen, useIsMobile, useLoadingState, useLocalStorage, useMediaQuery, useSessionStorage, useTheme, useViewport, useWakeLock, use_fullscreen, use_wake_lock };
11860
+ export { ANIMATION_PRESETS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AppFooter, AppHeader, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CELEBRATION_GRADIENT, Calendar, CanvasTextToolbar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CelebrationProvider, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, CommandNodeExtension, CommandPill, CommandPopover, DateRangeSelector, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ErrorBanner, ErrorPage, FunnelChart, HazoContextProvider, HazoUiConfirmDialog, HazoUiDialog, DialogClose as HazoUiDialogClose, DialogContent as HazoUiDialogContent, DialogDescription as HazoUiDialogDescription, DialogFooter as HazoUiDialogFooter, DialogHeader as HazoUiDialogHeader, DialogOverlay as HazoUiDialogOverlay, DialogPortal as HazoUiDialogPortal, Dialog as HazoUiDialogRoot, DialogTitle as HazoUiDialogTitle, DialogTrigger as HazoUiDialogTrigger, HazoUiEtaProgress, HazoUiFlexInput, HazoUiFlexRadio, HazoUiIcon, HazoUiIconPicker, HazoUiImageCropper, HazoUiImageCropperDialog, HazoUiKanban, HazoUiKanbanFilter, HazoUiMemoryDropdown, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, HazoUiPillRadio, HazoUiProgressBar, HazoUiRte, HazoUiTable, HazoUiTextarea, HazoUiTextbox, HazoUiToaster, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputAffix, InverseSparkline, Label3 as Label, LoadingTimeout, Logo, MarkdownEditor, NotificationCountBadge, NotificationItem, NotificationPanel, Popover, PopoverContent, PopoverTrigger, ProgressiveImage, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Command as ShadcnCommand, CommandEmpty as ShadcnCommandEmpty, CommandGroup as ShadcnCommandGroup, CommandInput as ShadcnCommandInput, CommandItem as ShadcnCommandItem, CommandList as ShadcnCommandList, Skeleton, SkeletonBar, SkeletonCircle, SkeletonGroup, SkeletonRect, Slider, Sparkline, Spinner, StackedBars, Switch, Table2 as Table, TableBody, TableCaption, TableCell2 as TableCell, TableFooter, TableHead, TableHeader2 as TableHeader, TableRow2 as TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, applyKanbanFilter, buttonGroupVariants, celebrate, cn, computeEta, create_command_suggestion_extension, easeToward, errorToast, format_num, generateUUID, get_hazo_ui_config, get_logger, isLucideValue, median, parse_commands_from_text, pick_x_label_indices, reset_hazo_ui_config, resolve_animation_classes, safeHref, set_hazo_ui_config, set_logger, successToast, text_to_tiptap_content, toggleVariants, upsertEntry as upsertMemoryEntry, useClickOutside, useCopyToClipboard, useDebounce, useErrorDisplay, useEtaProgress, useFullscreen, useIsMobile, useLoadingState, useLocalStorage, useMediaQuery, useSessionStorage, useViewport, useWakeLock, use_fullscreen, use_wake_lock };
11584
11861
  //# sourceMappingURL=index.js.map
11585
11862
  //# sourceMappingURL=index.js.map