hazo_ui 4.10.0 → 6.0.0
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/CHANGE_LOG.md +79 -1
- package/README.md +8 -43
- package/dist/index.cjs +763 -467
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +46 -59
- package/dist/index.d.ts +46 -59
- package/dist/index.js +633 -356
- package/dist/index.js.map +1 -1
- package/package.json +3 -16
- package/dist/styles.css +0 -156
- package/tailwind.preset.d.ts +0 -8
- package/tailwind.preset.js +0 -91
package/dist/index.cjs
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
var clsx = require('clsx');
|
|
5
5
|
var tailwindMerge = require('tailwind-merge');
|
|
6
|
-
var
|
|
6
|
+
var React27 = require('react');
|
|
7
7
|
var hazo_core = require('hazo_core');
|
|
8
|
-
var client = require('hazo_core/client');
|
|
8
|
+
var client$1 = require('hazo_core/client');
|
|
9
9
|
var jsxRuntime = require('react/jsx-runtime');
|
|
10
10
|
var reactSlot = require('@radix-ui/react-slot');
|
|
11
11
|
var classVarianceAuthority = require('class-variance-authority');
|
|
@@ -31,6 +31,7 @@ var IoIcons = require('react-icons/io5');
|
|
|
31
31
|
var RiIcons = require('react-icons/ri');
|
|
32
32
|
var TbIcons = require('react-icons/tb');
|
|
33
33
|
var CiIcons = require('react-icons/ci');
|
|
34
|
+
var TabsPrimitive = require('@radix-ui/react-tabs');
|
|
34
35
|
var react = require('@tiptap/react');
|
|
35
36
|
var StarterKit = require('@tiptap/starter-kit');
|
|
36
37
|
var extensionTextStyle = require('@tiptap/extension-text-style');
|
|
@@ -54,7 +55,6 @@ var TaskItem = require('@tiptap/extension-task-item');
|
|
|
54
55
|
var lu = require('react-icons/lu');
|
|
55
56
|
var rx = require('react-icons/rx');
|
|
56
57
|
var core = require('@tiptap/core');
|
|
57
|
-
var TabsPrimitive = require('@radix-ui/react-tabs');
|
|
58
58
|
var reactMdEditor = require('@uiw/react-md-editor');
|
|
59
59
|
require('@uiw/react-md-editor/markdown-editor.css');
|
|
60
60
|
require('@uiw/react-markdown-preview/markdown.css');
|
|
@@ -76,7 +76,8 @@ var TogglePrimitive = require('@radix-ui/react-toggle');
|
|
|
76
76
|
var ToggleGroupPrimitive = require('@radix-ui/react-toggle-group');
|
|
77
77
|
var AlertDialogPrimitive = require('@radix-ui/react-alert-dialog');
|
|
78
78
|
var sonner = require('sonner');
|
|
79
|
-
var client$
|
|
79
|
+
var client$2 = require('hazo_state/client');
|
|
80
|
+
var client = require('hazo_theme/client');
|
|
80
81
|
|
|
81
82
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
82
83
|
|
|
@@ -98,7 +99,7 @@ function _interopNamespace(e) {
|
|
|
98
99
|
return Object.freeze(n);
|
|
99
100
|
}
|
|
100
101
|
|
|
101
|
-
var
|
|
102
|
+
var React27__namespace = /*#__PURE__*/_interopNamespace(React27);
|
|
102
103
|
var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
|
|
103
104
|
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
|
|
104
105
|
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
|
|
@@ -115,6 +116,7 @@ var IoIcons__namespace = /*#__PURE__*/_interopNamespace(IoIcons);
|
|
|
115
116
|
var RiIcons__namespace = /*#__PURE__*/_interopNamespace(RiIcons);
|
|
116
117
|
var TbIcons__namespace = /*#__PURE__*/_interopNamespace(TbIcons);
|
|
117
118
|
var CiIcons__namespace = /*#__PURE__*/_interopNamespace(CiIcons);
|
|
119
|
+
var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
|
|
118
120
|
var StarterKit__default = /*#__PURE__*/_interopDefault(StarterKit);
|
|
119
121
|
var FontFamily__default = /*#__PURE__*/_interopDefault(FontFamily);
|
|
120
122
|
var Underline__default = /*#__PURE__*/_interopDefault(Underline);
|
|
@@ -132,7 +134,6 @@ var TableCell__default = /*#__PURE__*/_interopDefault(TableCell);
|
|
|
132
134
|
var TableHeader__default = /*#__PURE__*/_interopDefault(TableHeader);
|
|
133
135
|
var TaskList__default = /*#__PURE__*/_interopDefault(TaskList);
|
|
134
136
|
var TaskItem__default = /*#__PURE__*/_interopDefault(TaskItem);
|
|
135
|
-
var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
|
|
136
137
|
var Suggestion__default = /*#__PURE__*/_interopDefault(Suggestion);
|
|
137
138
|
var Cropper__default = /*#__PURE__*/_interopDefault(Cropper);
|
|
138
139
|
var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
|
|
@@ -225,16 +226,16 @@ function HazoContextProvider({
|
|
|
225
226
|
userId,
|
|
226
227
|
children
|
|
227
228
|
}) {
|
|
228
|
-
const id =
|
|
229
|
+
const id = React27__namespace.useMemo(
|
|
229
230
|
() => correlationId ?? hazo_core.generateRequestId(),
|
|
230
231
|
[correlationId]
|
|
231
232
|
);
|
|
232
|
-
|
|
233
|
-
client.withContext({ correlationId: id, userId }, () => {
|
|
234
|
-
client.setBrowserCorrelationId(id);
|
|
233
|
+
React27__namespace.useEffect(() => {
|
|
234
|
+
client$1.withContext({ correlationId: id, userId }, () => {
|
|
235
|
+
client$1.setBrowserCorrelationId(id);
|
|
235
236
|
});
|
|
236
237
|
return () => {
|
|
237
|
-
client.setBrowserCorrelationId(void 0);
|
|
238
|
+
client$1.setBrowserCorrelationId(void 0);
|
|
238
239
|
};
|
|
239
240
|
}, [id, userId]);
|
|
240
241
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
@@ -313,7 +314,7 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
313
314
|
}
|
|
314
315
|
}
|
|
315
316
|
);
|
|
316
|
-
var Button =
|
|
317
|
+
var Button = React27__namespace.forwardRef(
|
|
317
318
|
({ className, variant, size, asChild = false, style, ...props }, ref) => {
|
|
318
319
|
const Comp = asChild ? reactSlot.Slot : "button";
|
|
319
320
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -332,7 +333,7 @@ var Dialog = DialogPrimitive__namespace.Root;
|
|
|
332
333
|
var DialogTrigger = DialogPrimitive__namespace.Trigger;
|
|
333
334
|
var DialogPortal = DialogPrimitive__namespace.Portal;
|
|
334
335
|
var DialogClose = DialogPrimitive__namespace.Close;
|
|
335
|
-
var DialogOverlay =
|
|
336
|
+
var DialogOverlay = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
336
337
|
DialogPrimitive__namespace.Overlay,
|
|
337
338
|
{
|
|
338
339
|
ref,
|
|
@@ -344,7 +345,7 @@ var DialogOverlay = React26__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
344
345
|
}
|
|
345
346
|
));
|
|
346
347
|
DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
347
|
-
var DialogContent =
|
|
348
|
+
var DialogContent = React27__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
|
|
348
349
|
/* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
|
|
349
350
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
350
351
|
DialogPrimitive__namespace.Content,
|
|
@@ -394,7 +395,7 @@ var DialogFooter = ({
|
|
|
394
395
|
}
|
|
395
396
|
);
|
|
396
397
|
DialogFooter.displayName = "DialogFooter";
|
|
397
|
-
var DialogTitle =
|
|
398
|
+
var DialogTitle = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
398
399
|
DialogPrimitive__namespace.Title,
|
|
399
400
|
{
|
|
400
401
|
ref,
|
|
@@ -407,7 +408,7 @@ var DialogTitle = React26__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
407
408
|
}
|
|
408
409
|
));
|
|
409
410
|
DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
410
|
-
var DialogDescription =
|
|
411
|
+
var DialogDescription = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
411
412
|
DialogPrimitive__namespace.Description,
|
|
412
413
|
{
|
|
413
414
|
ref,
|
|
@@ -416,7 +417,7 @@ var DialogDescription = React26__namespace.forwardRef(({ className, ...props },
|
|
|
416
417
|
}
|
|
417
418
|
));
|
|
418
419
|
DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
|
|
419
|
-
var Command =
|
|
420
|
+
var Command = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
420
421
|
"div",
|
|
421
422
|
{
|
|
422
423
|
ref,
|
|
@@ -428,7 +429,7 @@ var Command = React26__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
428
429
|
}
|
|
429
430
|
));
|
|
430
431
|
Command.displayName = "Command";
|
|
431
|
-
var CommandInput =
|
|
432
|
+
var CommandInput = React27__namespace.forwardRef(({ className, onValueChange, onChange, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
432
433
|
"input",
|
|
433
434
|
{
|
|
434
435
|
ref,
|
|
@@ -444,7 +445,7 @@ var CommandInput = React26__namespace.forwardRef(({ className, onValueChange, on
|
|
|
444
445
|
}
|
|
445
446
|
));
|
|
446
447
|
CommandInput.displayName = "CommandInput";
|
|
447
|
-
var CommandList =
|
|
448
|
+
var CommandList = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
448
449
|
"div",
|
|
449
450
|
{
|
|
450
451
|
ref,
|
|
@@ -453,7 +454,7 @@ var CommandList = React26__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
453
454
|
}
|
|
454
455
|
));
|
|
455
456
|
CommandList.displayName = "CommandList";
|
|
456
|
-
var CommandEmpty =
|
|
457
|
+
var CommandEmpty = React27__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
457
458
|
"div",
|
|
458
459
|
{
|
|
459
460
|
ref,
|
|
@@ -462,7 +463,7 @@ var CommandEmpty = React26__namespace.forwardRef((props, ref) => /* @__PURE__ */
|
|
|
462
463
|
}
|
|
463
464
|
));
|
|
464
465
|
CommandEmpty.displayName = "CommandEmpty";
|
|
465
|
-
var CommandGroup =
|
|
466
|
+
var CommandGroup = React27__namespace.forwardRef(({ className, heading, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
466
467
|
"div",
|
|
467
468
|
{
|
|
468
469
|
ref,
|
|
@@ -478,7 +479,7 @@ var CommandGroup = React26__namespace.forwardRef(({ className, heading, children
|
|
|
478
479
|
}
|
|
479
480
|
));
|
|
480
481
|
CommandGroup.displayName = "CommandGroup";
|
|
481
|
-
var CommandItem =
|
|
482
|
+
var CommandItem = React27__namespace.forwardRef(({ className, onSelect, value, selected, style, ...props }, ref) => {
|
|
482
483
|
const handleClick = () => {
|
|
483
484
|
if (onSelect && value) {
|
|
484
485
|
onSelect(value);
|
|
@@ -509,7 +510,7 @@ var CommandItem = React26__namespace.forwardRef(({ className, onSelect, value, s
|
|
|
509
510
|
CommandItem.displayName = "CommandItem";
|
|
510
511
|
var Popover = PopoverPrimitive__namespace.Root;
|
|
511
512
|
var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
|
|
512
|
-
var PopoverContent =
|
|
513
|
+
var PopoverContent = React27__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
513
514
|
PopoverPrimitive__namespace.Content,
|
|
514
515
|
{
|
|
515
516
|
ref,
|
|
@@ -523,7 +524,7 @@ var PopoverContent = React26__namespace.forwardRef(({ className, align = "center
|
|
|
523
524
|
}
|
|
524
525
|
) }));
|
|
525
526
|
PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
|
|
526
|
-
var Input =
|
|
527
|
+
var Input = React27__namespace.forwardRef(
|
|
527
528
|
({ className, type, ...props }, ref) => {
|
|
528
529
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
529
530
|
"input",
|
|
@@ -543,7 +544,7 @@ Input.displayName = "Input";
|
|
|
543
544
|
var Select = SelectPrimitive__namespace.Root;
|
|
544
545
|
var SelectGroup = SelectPrimitive__namespace.Group;
|
|
545
546
|
var SelectValue = SelectPrimitive__namespace.Value;
|
|
546
|
-
var SelectTrigger =
|
|
547
|
+
var SelectTrigger = React27__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
547
548
|
SelectPrimitive__namespace.Trigger,
|
|
548
549
|
{
|
|
549
550
|
ref,
|
|
@@ -559,7 +560,7 @@ var SelectTrigger = React26__namespace.forwardRef(({ className, children, ...pro
|
|
|
559
560
|
}
|
|
560
561
|
));
|
|
561
562
|
SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
|
|
562
|
-
var SelectScrollUpButton =
|
|
563
|
+
var SelectScrollUpButton = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
563
564
|
SelectPrimitive__namespace.ScrollUpButton,
|
|
564
565
|
{
|
|
565
566
|
ref,
|
|
@@ -572,7 +573,7 @@ var SelectScrollUpButton = React26__namespace.forwardRef(({ className, ...props
|
|
|
572
573
|
}
|
|
573
574
|
));
|
|
574
575
|
SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
|
|
575
|
-
var SelectScrollDownButton =
|
|
576
|
+
var SelectScrollDownButton = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
576
577
|
SelectPrimitive__namespace.ScrollDownButton,
|
|
577
578
|
{
|
|
578
579
|
ref,
|
|
@@ -585,7 +586,7 @@ var SelectScrollDownButton = React26__namespace.forwardRef(({ className, ...prop
|
|
|
585
586
|
}
|
|
586
587
|
));
|
|
587
588
|
SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
|
|
588
|
-
var SelectContent =
|
|
589
|
+
var SelectContent = React27__namespace.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
589
590
|
SelectPrimitive__namespace.Content,
|
|
590
591
|
{
|
|
591
592
|
ref,
|
|
@@ -613,7 +614,7 @@ var SelectContent = React26__namespace.forwardRef(({ className, children, positi
|
|
|
613
614
|
}
|
|
614
615
|
) }));
|
|
615
616
|
SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
|
|
616
|
-
var SelectLabel =
|
|
617
|
+
var SelectLabel = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
617
618
|
SelectPrimitive__namespace.Label,
|
|
618
619
|
{
|
|
619
620
|
ref,
|
|
@@ -622,7 +623,7 @@ var SelectLabel = React26__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
622
623
|
}
|
|
623
624
|
));
|
|
624
625
|
SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
|
|
625
|
-
var SelectItem =
|
|
626
|
+
var SelectItem = React27__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
626
627
|
SelectPrimitive__namespace.Item,
|
|
627
628
|
{
|
|
628
629
|
ref,
|
|
@@ -638,7 +639,7 @@ var SelectItem = React26__namespace.forwardRef(({ className, children, ...props
|
|
|
638
639
|
}
|
|
639
640
|
));
|
|
640
641
|
SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
|
|
641
|
-
var SelectSeparator =
|
|
642
|
+
var SelectSeparator = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
642
643
|
SelectPrimitive__namespace.Separator,
|
|
643
644
|
{
|
|
644
645
|
ref,
|
|
@@ -650,7 +651,7 @@ SelectSeparator.displayName = SelectPrimitive__namespace.Separator.displayName;
|
|
|
650
651
|
var TooltipProvider = TooltipPrimitive__namespace.Provider;
|
|
651
652
|
var Tooltip = TooltipPrimitive__namespace.Root;
|
|
652
653
|
var TooltipTrigger = TooltipPrimitive__namespace.Trigger;
|
|
653
|
-
var TooltipContent =
|
|
654
|
+
var TooltipContent = React27__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
654
655
|
TooltipPrimitive__namespace.Content,
|
|
655
656
|
{
|
|
656
657
|
ref,
|
|
@@ -718,7 +719,7 @@ function FilterFieldItem({
|
|
|
718
719
|
onOperatorChange,
|
|
719
720
|
onDelete
|
|
720
721
|
}) {
|
|
721
|
-
const [isCalendarOpen, setIsCalendarOpen] =
|
|
722
|
+
const [isCalendarOpen, setIsCalendarOpen] = React27.useState(false);
|
|
722
723
|
const renderInput = () => {
|
|
723
724
|
switch (fieldConfig.type) {
|
|
724
725
|
case "text":
|
|
@@ -945,10 +946,10 @@ function HazoUiMultiFilterDialog({
|
|
|
945
946
|
...finalHeaderBgColor && { backgroundColor: finalHeaderBgColor },
|
|
946
947
|
...finalHeaderTextColor && { color: finalHeaderTextColor }
|
|
947
948
|
};
|
|
948
|
-
const [isOpen, setIsOpen] =
|
|
949
|
-
const [filterFields, setFilterFields] =
|
|
950
|
-
const [isComboboxOpen, setIsComboboxOpen] =
|
|
951
|
-
|
|
949
|
+
const [isOpen, setIsOpen] = React27.useState(false);
|
|
950
|
+
const [filterFields, setFilterFields] = React27.useState(initialFilters);
|
|
951
|
+
const [isComboboxOpen, setIsComboboxOpen] = React27.useState(false);
|
|
952
|
+
React27.useEffect(() => {
|
|
952
953
|
if (isOpen) {
|
|
953
954
|
setFilterFields(initialFilters);
|
|
954
955
|
}
|
|
@@ -1309,16 +1310,16 @@ function HazoUiMultiSortDialog({
|
|
|
1309
1310
|
...finalHeaderBgColor && { backgroundColor: finalHeaderBgColor },
|
|
1310
1311
|
...finalHeaderTextColor && { color: finalHeaderTextColor }
|
|
1311
1312
|
};
|
|
1312
|
-
const [isOpen, setIsOpen] =
|
|
1313
|
-
const [sortFields, setSortFields] =
|
|
1314
|
-
const [isComboboxOpen, setIsComboboxOpen] =
|
|
1313
|
+
const [isOpen, setIsOpen] = React27.useState(false);
|
|
1314
|
+
const [sortFields, setSortFields] = React27.useState(initialSortFields);
|
|
1315
|
+
const [isComboboxOpen, setIsComboboxOpen] = React27.useState(false);
|
|
1315
1316
|
const sensors = core$1.useSensors(
|
|
1316
1317
|
core$1.useSensor(core$1.PointerSensor, { activationConstraint: { distance: 4 } }),
|
|
1317
1318
|
core$1.useSensor(core$1.KeyboardSensor, {
|
|
1318
1319
|
coordinateGetter: sortable.sortableKeyboardCoordinates
|
|
1319
1320
|
})
|
|
1320
1321
|
);
|
|
1321
|
-
|
|
1322
|
+
React27.useEffect(() => {
|
|
1322
1323
|
if (isOpen) {
|
|
1323
1324
|
setSortFields(initialSortFields);
|
|
1324
1325
|
}
|
|
@@ -1512,7 +1513,7 @@ function HazoUiMultiSortDialog({
|
|
|
1512
1513
|
] })
|
|
1513
1514
|
] });
|
|
1514
1515
|
}
|
|
1515
|
-
var RadioGroup =
|
|
1516
|
+
var RadioGroup = React27__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1516
1517
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1517
1518
|
RadioGroupPrimitive__namespace.Root,
|
|
1518
1519
|
{
|
|
@@ -1523,7 +1524,7 @@ var RadioGroup = React26__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
1523
1524
|
);
|
|
1524
1525
|
});
|
|
1525
1526
|
RadioGroup.displayName = RadioGroupPrimitive__namespace.Root.displayName;
|
|
1526
|
-
var RadioGroupItem =
|
|
1527
|
+
var RadioGroupItem = React27__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1527
1528
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1528
1529
|
RadioGroupPrimitive__namespace.Item,
|
|
1529
1530
|
{
|
|
@@ -1886,6 +1887,368 @@ function HazoUiPillRadio({
|
|
|
1886
1887
|
}
|
|
1887
1888
|
) });
|
|
1888
1889
|
}
|
|
1890
|
+
var Tabs = TabsPrimitive__namespace.Root;
|
|
1891
|
+
var TabsList = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1892
|
+
TabsPrimitive__namespace.List,
|
|
1893
|
+
{
|
|
1894
|
+
ref,
|
|
1895
|
+
className: cn(
|
|
1896
|
+
"inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
|
|
1897
|
+
className
|
|
1898
|
+
),
|
|
1899
|
+
...props
|
|
1900
|
+
}
|
|
1901
|
+
));
|
|
1902
|
+
TabsList.displayName = TabsPrimitive__namespace.List.displayName;
|
|
1903
|
+
var TabsTrigger = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1904
|
+
TabsPrimitive__namespace.Trigger,
|
|
1905
|
+
{
|
|
1906
|
+
ref,
|
|
1907
|
+
className: cn(
|
|
1908
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
|
|
1909
|
+
className
|
|
1910
|
+
),
|
|
1911
|
+
...props
|
|
1912
|
+
}
|
|
1913
|
+
));
|
|
1914
|
+
TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
|
|
1915
|
+
var TabsContent = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1916
|
+
TabsPrimitive__namespace.Content,
|
|
1917
|
+
{
|
|
1918
|
+
ref,
|
|
1919
|
+
className: cn(
|
|
1920
|
+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
1921
|
+
className
|
|
1922
|
+
),
|
|
1923
|
+
...props
|
|
1924
|
+
}
|
|
1925
|
+
));
|
|
1926
|
+
TabsContent.displayName = TabsPrimitive__namespace.Content.displayName;
|
|
1927
|
+
function isLucideValue(value) {
|
|
1928
|
+
return value.startsWith("lucide:");
|
|
1929
|
+
}
|
|
1930
|
+
function get_lucide_component(name) {
|
|
1931
|
+
return lucideReact.icons[name] || null;
|
|
1932
|
+
}
|
|
1933
|
+
function HazoUiIcon({ value, size = 18, className }) {
|
|
1934
|
+
if (isLucideValue(value)) {
|
|
1935
|
+
const name = value.slice("lucide:".length);
|
|
1936
|
+
const Cmp = get_lucide_component(name);
|
|
1937
|
+
if (!Cmp) return null;
|
|
1938
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Cmp, { size, className });
|
|
1939
|
+
}
|
|
1940
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("cls_hazo_ui_icon_emoji", className), style: { fontSize: size }, children: value });
|
|
1941
|
+
}
|
|
1942
|
+
var TOOLS_ICONS = [
|
|
1943
|
+
"Wrench",
|
|
1944
|
+
"Hammer",
|
|
1945
|
+
"Drill",
|
|
1946
|
+
"ToolCase",
|
|
1947
|
+
"PaintRoller",
|
|
1948
|
+
"PaintBucket",
|
|
1949
|
+
"Ruler",
|
|
1950
|
+
"Cog",
|
|
1951
|
+
"Bolt",
|
|
1952
|
+
"Pipette",
|
|
1953
|
+
"Wind",
|
|
1954
|
+
"Plug",
|
|
1955
|
+
"Lightbulb",
|
|
1956
|
+
"Axe",
|
|
1957
|
+
"Shovel"
|
|
1958
|
+
];
|
|
1959
|
+
var HOME_ICONS = [
|
|
1960
|
+
"House",
|
|
1961
|
+
"DoorOpen",
|
|
1962
|
+
"Bath",
|
|
1963
|
+
"ShowerHead",
|
|
1964
|
+
"Sofa",
|
|
1965
|
+
"Bed",
|
|
1966
|
+
"Refrigerator",
|
|
1967
|
+
"WashingMachine",
|
|
1968
|
+
"Fence",
|
|
1969
|
+
"Key",
|
|
1970
|
+
"Lock",
|
|
1971
|
+
"Warehouse"
|
|
1972
|
+
];
|
|
1973
|
+
var WEATHER_ICONS = [
|
|
1974
|
+
"Sun",
|
|
1975
|
+
"CloudRain",
|
|
1976
|
+
"Snowflake",
|
|
1977
|
+
"Thermometer",
|
|
1978
|
+
"Wind",
|
|
1979
|
+
"Droplet",
|
|
1980
|
+
"Flame",
|
|
1981
|
+
"CloudSnow",
|
|
1982
|
+
"Zap"
|
|
1983
|
+
];
|
|
1984
|
+
var NATURE_ICONS = ["Leaf", "TreePine", "Trees", "Flower", "Sprout", "Bug", "Sun", "Droplets"];
|
|
1985
|
+
var SYMBOLS_ICONS = [
|
|
1986
|
+
"Star",
|
|
1987
|
+
"Heart",
|
|
1988
|
+
"Check",
|
|
1989
|
+
"Circle",
|
|
1990
|
+
"Square",
|
|
1991
|
+
"Triangle",
|
|
1992
|
+
"Hexagon",
|
|
1993
|
+
"Tag",
|
|
1994
|
+
"Bell",
|
|
1995
|
+
"Settings",
|
|
1996
|
+
"Wrench"
|
|
1997
|
+
];
|
|
1998
|
+
var LUCIDE_GROUPS = [
|
|
1999
|
+
{ key: "tools", label: "Tools", icons: TOOLS_ICONS },
|
|
2000
|
+
{ key: "home", label: "Home", icons: HOME_ICONS },
|
|
2001
|
+
{ key: "weather", label: "Weather", icons: WEATHER_ICONS },
|
|
2002
|
+
{ key: "nature", label: "Nature", icons: NATURE_ICONS },
|
|
2003
|
+
{ key: "symbols", label: "Symbols", icons: SYMBOLS_ICONS }
|
|
2004
|
+
];
|
|
2005
|
+
var EMOJI_ITEMS = [
|
|
2006
|
+
// Faces
|
|
2007
|
+
"\u{1F600}",
|
|
2008
|
+
"\u{1F603}",
|
|
2009
|
+
"\u{1F604}",
|
|
2010
|
+
"\u{1F601}",
|
|
2011
|
+
"\u{1F606}",
|
|
2012
|
+
"\u{1F605}",
|
|
2013
|
+
"\u{1F642}",
|
|
2014
|
+
"\u{1F609}",
|
|
2015
|
+
"\u{1F60A}",
|
|
2016
|
+
"\u{1F60D}",
|
|
2017
|
+
"\u{1F914}",
|
|
2018
|
+
"\u{1F610}",
|
|
2019
|
+
"\u{1F634}",
|
|
2020
|
+
"\u{1F60E}",
|
|
2021
|
+
"\u{1F917}",
|
|
2022
|
+
"\u{1F973}",
|
|
2023
|
+
"\u{1F607}",
|
|
2024
|
+
"\u{1F643}",
|
|
2025
|
+
"\u{1F62C}",
|
|
2026
|
+
"\u{1F929}",
|
|
2027
|
+
// People / hands
|
|
2028
|
+
"\u{1F44D}",
|
|
2029
|
+
"\u{1F44E}",
|
|
2030
|
+
"\u{1F44F}",
|
|
2031
|
+
"\u{1F64C}",
|
|
2032
|
+
"\u{1F91D}",
|
|
2033
|
+
"\u{1F44B}",
|
|
2034
|
+
"\u{1F4AA}",
|
|
2035
|
+
"\u{1F64F}",
|
|
2036
|
+
"\u{1F440}",
|
|
2037
|
+
"\u{1F9D1}\u200D\u{1F527}",
|
|
2038
|
+
// Objects / tools
|
|
2039
|
+
"\u{1F527}",
|
|
2040
|
+
"\u{1F528}",
|
|
2041
|
+
"\u{1F6E0}\uFE0F",
|
|
2042
|
+
"\u2699\uFE0F",
|
|
2043
|
+
"\u{1FA9B}",
|
|
2044
|
+
"\u{1FA9A}",
|
|
2045
|
+
"\u{1F9F0}",
|
|
2046
|
+
"\u{1F529}",
|
|
2047
|
+
"\u26CF\uFE0F",
|
|
2048
|
+
"\u{1F9F1}",
|
|
2049
|
+
"\u{1F511}",
|
|
2050
|
+
"\u{1F512}",
|
|
2051
|
+
"\u{1F50B}",
|
|
2052
|
+
"\u{1F4A1}",
|
|
2053
|
+
"\u{1F50C}",
|
|
2054
|
+
"\u{1F9EF}",
|
|
2055
|
+
"\u{1FA9C}",
|
|
2056
|
+
"\u{1F9F2}",
|
|
2057
|
+
"\u{1F4CF}",
|
|
2058
|
+
"\u{1F4D0}",
|
|
2059
|
+
// Home
|
|
2060
|
+
"\u{1F3E0}",
|
|
2061
|
+
"\u{1F3E1}",
|
|
2062
|
+
"\u{1F3E2}",
|
|
2063
|
+
"\u{1F3ED}",
|
|
2064
|
+
"\u{1F6AA}",
|
|
2065
|
+
"\u{1F6CB}\uFE0F",
|
|
2066
|
+
"\u{1F6C1}",
|
|
2067
|
+
"\u{1F6BF}",
|
|
2068
|
+
"\u{1F6CF}\uFE0F",
|
|
2069
|
+
"\u{1FA9F}",
|
|
2070
|
+
// Weather / nature
|
|
2071
|
+
"\u2600\uFE0F",
|
|
2072
|
+
"\u{1F324}\uFE0F",
|
|
2073
|
+
"\u26C5",
|
|
2074
|
+
"\u{1F327}\uFE0F",
|
|
2075
|
+
"\u26C8\uFE0F",
|
|
2076
|
+
"\u{1F329}\uFE0F",
|
|
2077
|
+
"\u2744\uFE0F",
|
|
2078
|
+
"\u{1F32C}\uFE0F",
|
|
2079
|
+
"\u{1F4A7}",
|
|
2080
|
+
"\u{1F525}",
|
|
2081
|
+
"\u{1F308}",
|
|
2082
|
+
"\u{1F30A}",
|
|
2083
|
+
"\u{1F331}",
|
|
2084
|
+
"\u{1F333}",
|
|
2085
|
+
"\u{1F332}",
|
|
2086
|
+
"\u{1F343}",
|
|
2087
|
+
"\u{1F338}",
|
|
2088
|
+
"\u{1F33B}",
|
|
2089
|
+
"\u{1F342}",
|
|
2090
|
+
"\u{1F335}",
|
|
2091
|
+
// Transport
|
|
2092
|
+
"\u{1F697}",
|
|
2093
|
+
"\u{1F69A}",
|
|
2094
|
+
"\u{1F69B}",
|
|
2095
|
+
"\u{1F69C}",
|
|
2096
|
+
"\u{1F6B2}",
|
|
2097
|
+
"\u2708\uFE0F",
|
|
2098
|
+
"\u{1F680}",
|
|
2099
|
+
"\u26F5",
|
|
2100
|
+
// Symbols
|
|
2101
|
+
"\u2B50",
|
|
2102
|
+
"\u2764\uFE0F",
|
|
2103
|
+
"\u2705",
|
|
2104
|
+
"\u274C",
|
|
2105
|
+
"\u26A0\uFE0F",
|
|
2106
|
+
"\u{1F534}",
|
|
2107
|
+
"\u{1F7E2}",
|
|
2108
|
+
"\u{1F535}",
|
|
2109
|
+
"\u{1F7E1}",
|
|
2110
|
+
"\u2B1B",
|
|
2111
|
+
"\u2B1C",
|
|
2112
|
+
"\u{1F53A}",
|
|
2113
|
+
"\u{1F536}",
|
|
2114
|
+
"\u{1F537}",
|
|
2115
|
+
"\u{1F4AF}",
|
|
2116
|
+
"\u{1F514}",
|
|
2117
|
+
"\u{1F4CC}",
|
|
2118
|
+
"\u{1F4CD}",
|
|
2119
|
+
"\u{1F3F7}\uFE0F",
|
|
2120
|
+
"\u{1F3AF}",
|
|
2121
|
+
// Misc
|
|
2122
|
+
"\u{1F4E6}",
|
|
2123
|
+
"\u{1F4C5}",
|
|
2124
|
+
"\u{1F4C8}",
|
|
2125
|
+
"\u{1F4DD}",
|
|
2126
|
+
"\u{1F4B0}",
|
|
2127
|
+
"\u{1F4B3}",
|
|
2128
|
+
"\u{1F389}",
|
|
2129
|
+
"\u{1F381}",
|
|
2130
|
+
"\u2615",
|
|
2131
|
+
"\u{1F37D}\uFE0F",
|
|
2132
|
+
"\u{1F9FE}",
|
|
2133
|
+
"\u{1F4DE}",
|
|
2134
|
+
"\u2709\uFE0F",
|
|
2135
|
+
"\u{1F310}"
|
|
2136
|
+
];
|
|
2137
|
+
function HazoUiIconPicker({
|
|
2138
|
+
value,
|
|
2139
|
+
onChange,
|
|
2140
|
+
disabled,
|
|
2141
|
+
className,
|
|
2142
|
+
triggerClassName,
|
|
2143
|
+
align = "start"
|
|
2144
|
+
}) {
|
|
2145
|
+
const [open, set_open] = React27__namespace.useState(false);
|
|
2146
|
+
const [search, set_search] = React27__namespace.useState("");
|
|
2147
|
+
const handle_select = React27__namespace.useCallback(
|
|
2148
|
+
(next_value) => {
|
|
2149
|
+
onChange(next_value);
|
|
2150
|
+
set_open(false);
|
|
2151
|
+
},
|
|
2152
|
+
[onChange]
|
|
2153
|
+
);
|
|
2154
|
+
const filtered_search_results = React27__namespace.useMemo(() => {
|
|
2155
|
+
const query = search.trim().toLowerCase();
|
|
2156
|
+
if (!query) return [];
|
|
2157
|
+
return Object.keys(lucideReact.icons).filter((name) => name.toLowerCase().includes(query)).slice(0, 60);
|
|
2158
|
+
}, [search]);
|
|
2159
|
+
const has_search = search.trim().length > 0;
|
|
2160
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("cls_hazo_ui_icon_picker", className), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2161
|
+
Popover,
|
|
2162
|
+
{
|
|
2163
|
+
open,
|
|
2164
|
+
onOpenChange: (next_open) => {
|
|
2165
|
+
set_open(next_open);
|
|
2166
|
+
if (!next_open) set_search("");
|
|
2167
|
+
},
|
|
2168
|
+
children: [
|
|
2169
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2170
|
+
"button",
|
|
2171
|
+
{
|
|
2172
|
+
type: "button",
|
|
2173
|
+
disabled,
|
|
2174
|
+
className: cn(
|
|
2175
|
+
"cls_hazo_ui_icon_picker_trigger",
|
|
2176
|
+
"flex h-9 w-9 items-center justify-center rounded-md border border-input bg-card",
|
|
2177
|
+
"text-foreground transition-colors hover:bg-accent/50",
|
|
2178
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
2179
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
2180
|
+
triggerClassName
|
|
2181
|
+
),
|
|
2182
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(HazoUiIcon, { value })
|
|
2183
|
+
}
|
|
2184
|
+
) }),
|
|
2185
|
+
/* @__PURE__ */ jsxRuntime.jsxs(PopoverContent, { align, className: "w-72 p-2", children: [
|
|
2186
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2187
|
+
"input",
|
|
2188
|
+
{
|
|
2189
|
+
type: "text",
|
|
2190
|
+
value: search,
|
|
2191
|
+
onChange: (e) => set_search(e.target.value),
|
|
2192
|
+
placeholder: "Search icons...",
|
|
2193
|
+
className: cn(
|
|
2194
|
+
"cls_hazo_ui_icon_picker_search",
|
|
2195
|
+
"mb-2 flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm",
|
|
2196
|
+
"placeholder:text-muted-foreground",
|
|
2197
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
|
|
2198
|
+
)
|
|
2199
|
+
}
|
|
2200
|
+
),
|
|
2201
|
+
has_search ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cls_hazo_ui_icon_picker_search_results grid max-h-56 grid-cols-8 gap-1 overflow-y-auto", children: [
|
|
2202
|
+
filtered_search_results.map((name) => {
|
|
2203
|
+
const Cmp = lucideReact.icons[name];
|
|
2204
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2205
|
+
"button",
|
|
2206
|
+
{
|
|
2207
|
+
type: "button",
|
|
2208
|
+
title: name,
|
|
2209
|
+
onClick: () => handle_select(`lucide:${name}`),
|
|
2210
|
+
className: "flex h-8 w-8 items-center justify-center rounded-md hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
2211
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Cmp, { size: 16 })
|
|
2212
|
+
},
|
|
2213
|
+
name
|
|
2214
|
+
);
|
|
2215
|
+
}),
|
|
2216
|
+
filtered_search_results.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "col-span-8 py-4 text-center text-sm text-muted-foreground", children: "No icons found" })
|
|
2217
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(Tabs, { defaultValue: "emoji", children: [
|
|
2218
|
+
/* @__PURE__ */ jsxRuntime.jsxs(TabsList, { className: "grid w-full grid-cols-6", children: [
|
|
2219
|
+
/* @__PURE__ */ jsxRuntime.jsx(TabsTrigger, { value: "emoji", children: "Emoji" }),
|
|
2220
|
+
LUCIDE_GROUPS.map((group) => /* @__PURE__ */ jsxRuntime.jsx(TabsTrigger, { value: group.key, children: group.label }, group.key))
|
|
2221
|
+
] }),
|
|
2222
|
+
/* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "emoji", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid max-h-56 grid-cols-8 gap-1 overflow-y-auto", children: EMOJI_ITEMS.map((emoji, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2223
|
+
"button",
|
|
2224
|
+
{
|
|
2225
|
+
type: "button",
|
|
2226
|
+
onClick: () => handle_select(emoji),
|
|
2227
|
+
className: "flex h-8 w-8 items-center justify-center rounded-md text-lg hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
2228
|
+
children: emoji
|
|
2229
|
+
},
|
|
2230
|
+
`${emoji}-${index}`
|
|
2231
|
+
)) }) }),
|
|
2232
|
+
LUCIDE_GROUPS.map((group) => /* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: group.key, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid max-h-56 grid-cols-8 gap-1 overflow-y-auto", children: group.icons.map((name) => {
|
|
2233
|
+
const Cmp = lucideReact.icons[name];
|
|
2234
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2235
|
+
"button",
|
|
2236
|
+
{
|
|
2237
|
+
type: "button",
|
|
2238
|
+
title: name,
|
|
2239
|
+
onClick: () => handle_select(`lucide:${name}`),
|
|
2240
|
+
className: "flex h-8 w-8 items-center justify-center rounded-md hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
2241
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Cmp, { size: 16 })
|
|
2242
|
+
},
|
|
2243
|
+
name
|
|
2244
|
+
);
|
|
2245
|
+
}) }) }, group.key))
|
|
2246
|
+
] })
|
|
2247
|
+
] })
|
|
2248
|
+
]
|
|
2249
|
+
}
|
|
2250
|
+
) });
|
|
2251
|
+
}
|
|
1889
2252
|
function validateInput(value, input_type, text_len_min, text_len_max, num_min, num_max, regex, num_decimals) {
|
|
1890
2253
|
if (value === "") {
|
|
1891
2254
|
return { isValid: true };
|
|
@@ -1980,7 +2343,7 @@ function filterInputValue(value, input_type, num_decimals) {
|
|
|
1980
2343
|
}
|
|
1981
2344
|
}
|
|
1982
2345
|
}
|
|
1983
|
-
var HazoUiFlexInput =
|
|
2346
|
+
var HazoUiFlexInput = React27__namespace.forwardRef(
|
|
1984
2347
|
({
|
|
1985
2348
|
className,
|
|
1986
2349
|
input_type = "mixed",
|
|
@@ -1997,13 +2360,13 @@ var HazoUiFlexInput = React26__namespace.forwardRef(
|
|
|
1997
2360
|
onBlur,
|
|
1998
2361
|
...props
|
|
1999
2362
|
}, ref) => {
|
|
2000
|
-
const [internalValue, setInternalValue] =
|
|
2363
|
+
const [internalValue, setInternalValue] = React27__namespace.useState(
|
|
2001
2364
|
typeof controlledValue === "string" ? controlledValue : typeof controlledValue === "number" ? String(controlledValue) : ""
|
|
2002
2365
|
);
|
|
2003
|
-
const [errorMessage, setErrorMessage] =
|
|
2366
|
+
const [errorMessage, setErrorMessage] = React27__namespace.useState();
|
|
2004
2367
|
const isControlled = controlledValue !== void 0;
|
|
2005
2368
|
const currentValue = isControlled ? typeof controlledValue === "string" ? controlledValue : String(controlledValue || "") : internalValue;
|
|
2006
|
-
|
|
2369
|
+
React27__namespace.useEffect(() => {
|
|
2007
2370
|
if (isControlled) {
|
|
2008
2371
|
const newValue = typeof controlledValue === "string" ? controlledValue : String(controlledValue || "");
|
|
2009
2372
|
if (newValue !== internalValue) {
|
|
@@ -2083,7 +2446,7 @@ var HazoUiFlexInput = React26__namespace.forwardRef(
|
|
|
2083
2446
|
}
|
|
2084
2447
|
);
|
|
2085
2448
|
HazoUiFlexInput.displayName = "HazoUiFlexInput";
|
|
2086
|
-
var ToolbarButton =
|
|
2449
|
+
var ToolbarButton = React27__namespace.forwardRef(
|
|
2087
2450
|
({ onClick, is_active = false, disabled = false, tooltip, className, children }, ref) => {
|
|
2088
2451
|
const button = /* @__PURE__ */ jsxRuntime.jsx(
|
|
2089
2452
|
"button",
|
|
@@ -2320,11 +2683,11 @@ var validHex = (hex) => /^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);
|
|
|
2320
2683
|
var import_extends2 = __toESM(require_extends());
|
|
2321
2684
|
var import_objectWithoutPropertiesLoose = __toESM(require_objectWithoutPropertiesLoose());
|
|
2322
2685
|
function useEventCallback(handler) {
|
|
2323
|
-
var callbackRef =
|
|
2324
|
-
|
|
2686
|
+
var callbackRef = React27.useRef(handler);
|
|
2687
|
+
React27.useEffect(() => {
|
|
2325
2688
|
callbackRef.current = handler;
|
|
2326
2689
|
});
|
|
2327
|
-
return
|
|
2690
|
+
return React27.useCallback((value, event) => callbackRef.current && callbackRef.current(value, event), []);
|
|
2328
2691
|
}
|
|
2329
2692
|
var isTouch = (event) => "touches" in event;
|
|
2330
2693
|
var preventDefaultMove = (event) => {
|
|
@@ -2352,11 +2715,11 @@ var getRelativePosition = (node, event) => {
|
|
|
2352
2715
|
};
|
|
2353
2716
|
};
|
|
2354
2717
|
var _excluded = ["prefixCls", "className", "onMove", "onDown"];
|
|
2355
|
-
var Interactive = /* @__PURE__ */
|
|
2718
|
+
var Interactive = /* @__PURE__ */ React27__namespace.default.forwardRef((props, ref) => {
|
|
2356
2719
|
var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-interactive" : _props$prefixCls, className = props.className, onMove = props.onMove, onDown = props.onDown, reset = (0, import_objectWithoutPropertiesLoose.default)(props, _excluded);
|
|
2357
|
-
var container =
|
|
2358
|
-
var hasTouched =
|
|
2359
|
-
var _useState =
|
|
2720
|
+
var container = React27.useRef(null);
|
|
2721
|
+
var hasTouched = React27.useRef(false);
|
|
2722
|
+
var _useState = React27.useState(false), isDragging = _useState[0], setDragging = _useState[1];
|
|
2360
2723
|
var onMoveCallback = useEventCallback(onMove);
|
|
2361
2724
|
var onKeyCallback = useEventCallback(onDown);
|
|
2362
2725
|
var isValid = (event) => {
|
|
@@ -2364,7 +2727,7 @@ var Interactive = /* @__PURE__ */ React26__namespace.default.forwardRef((props,
|
|
|
2364
2727
|
hasTouched.current = isTouch(event);
|
|
2365
2728
|
return true;
|
|
2366
2729
|
};
|
|
2367
|
-
var handleMove =
|
|
2730
|
+
var handleMove = React27.useCallback((event) => {
|
|
2368
2731
|
preventDefaultMove(event);
|
|
2369
2732
|
if (!container.current) return;
|
|
2370
2733
|
var isDown = isTouch(event) ? event.touches.length > 0 : event.buttons > 0;
|
|
@@ -2374,8 +2737,8 @@ var Interactive = /* @__PURE__ */ React26__namespace.default.forwardRef((props,
|
|
|
2374
2737
|
}
|
|
2375
2738
|
onMoveCallback == null || onMoveCallback(getRelativePosition(container.current, event), event);
|
|
2376
2739
|
}, [onMoveCallback]);
|
|
2377
|
-
var handleMoveEnd =
|
|
2378
|
-
var toggleDocumentEvents =
|
|
2740
|
+
var handleMoveEnd = React27.useCallback(() => setDragging(false), []);
|
|
2741
|
+
var toggleDocumentEvents = React27.useCallback((state) => {
|
|
2379
2742
|
if (state) {
|
|
2380
2743
|
window.addEventListener(hasTouched.current ? "touchmove" : "mousemove", handleMove);
|
|
2381
2744
|
window.addEventListener(hasTouched.current ? "touchend" : "mouseup", handleMoveEnd);
|
|
@@ -2386,13 +2749,13 @@ var Interactive = /* @__PURE__ */ React26__namespace.default.forwardRef((props,
|
|
|
2386
2749
|
window.removeEventListener("touchend", handleMoveEnd);
|
|
2387
2750
|
}
|
|
2388
2751
|
}, [handleMove, handleMoveEnd]);
|
|
2389
|
-
|
|
2752
|
+
React27.useEffect(() => {
|
|
2390
2753
|
toggleDocumentEvents(isDragging);
|
|
2391
2754
|
return () => {
|
|
2392
2755
|
toggleDocumentEvents(false);
|
|
2393
2756
|
};
|
|
2394
2757
|
}, [isDragging, handleMove, handleMoveEnd, toggleDocumentEvents]);
|
|
2395
|
-
var handleMoveStart =
|
|
2758
|
+
var handleMoveStart = React27.useCallback((event) => {
|
|
2396
2759
|
var activeEl = document.activeElement;
|
|
2397
2760
|
activeEl == null || activeEl.blur();
|
|
2398
2761
|
preventDefaultMove(event.nativeEvent);
|
|
@@ -2430,7 +2793,7 @@ var Pointer = (_ref) => {
|
|
|
2430
2793
|
borderRadius: "50%",
|
|
2431
2794
|
backgroundColor: color2
|
|
2432
2795
|
};
|
|
2433
|
-
return
|
|
2796
|
+
return React27.useMemo(() => /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
2434
2797
|
className: prefixCls + "-pointer " + (className || ""),
|
|
2435
2798
|
style,
|
|
2436
2799
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
@@ -2440,7 +2803,7 @@ var Pointer = (_ref) => {
|
|
|
2440
2803
|
}), [top, left, color2, className, prefixCls]);
|
|
2441
2804
|
};
|
|
2442
2805
|
var _excluded2 = ["prefixCls", "radius", "pointer", "className", "hue", "style", "hsva", "onChange"];
|
|
2443
|
-
var Saturation = /* @__PURE__ */
|
|
2806
|
+
var Saturation = /* @__PURE__ */ React27__namespace.default.forwardRef((props, ref) => {
|
|
2444
2807
|
var _hsva$h;
|
|
2445
2808
|
var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-saturation" : _props$prefixCls, _props$radius = props.radius, radius = _props$radius === void 0 ? 0 : _props$radius, pointer = props.pointer, className = props.className, _props$hue = props.hue, hue = _props$hue === void 0 ? 0 : _props$hue, style = props.style, hsva = props.hsva, onChange = props.onChange, other = (0, import_objectWithoutPropertiesLoose2.default)(props, _excluded2);
|
|
2446
2809
|
var containerStyle = (0, import_extends3.default)({
|
|
@@ -2450,8 +2813,8 @@ var Saturation = /* @__PURE__ */ React26__namespace.default.forwardRef((props, r
|
|
|
2450
2813
|
}, style, {
|
|
2451
2814
|
position: "relative"
|
|
2452
2815
|
});
|
|
2453
|
-
var containerRef =
|
|
2454
|
-
var combinedRef =
|
|
2816
|
+
var containerRef = React27.useRef(null);
|
|
2817
|
+
var combinedRef = React27.useCallback((node) => {
|
|
2455
2818
|
containerRef.current = node;
|
|
2456
2819
|
if (typeof ref === "function") {
|
|
2457
2820
|
ref(node);
|
|
@@ -2459,7 +2822,7 @@ var Saturation = /* @__PURE__ */ React26__namespace.default.forwardRef((props, r
|
|
|
2459
2822
|
ref.current = node;
|
|
2460
2823
|
}
|
|
2461
2824
|
}, [ref]);
|
|
2462
|
-
var handleChange =
|
|
2825
|
+
var handleChange = React27.useCallback((interaction, event) => {
|
|
2463
2826
|
onChange && hsva && onChange({
|
|
2464
2827
|
h: hsva.h,
|
|
2465
2828
|
s: interaction.left * 100,
|
|
@@ -2472,7 +2835,7 @@ var Saturation = /* @__PURE__ */ React26__namespace.default.forwardRef((props, r
|
|
|
2472
2835
|
element.focus();
|
|
2473
2836
|
}
|
|
2474
2837
|
}, [hsva, onChange]);
|
|
2475
|
-
var handleKeyDown =
|
|
2838
|
+
var handleKeyDown = React27.useCallback((event) => {
|
|
2476
2839
|
if (!hsva || !onChange) return;
|
|
2477
2840
|
var step = 1;
|
|
2478
2841
|
var newS = hsva.s;
|
|
@@ -2511,7 +2874,7 @@ var Saturation = /* @__PURE__ */ React26__namespace.default.forwardRef((props, r
|
|
|
2511
2874
|
});
|
|
2512
2875
|
}
|
|
2513
2876
|
}, [hsva, onChange]);
|
|
2514
|
-
var pointerElement =
|
|
2877
|
+
var pointerElement = React27.useMemo(() => {
|
|
2515
2878
|
if (!hsva) return null;
|
|
2516
2879
|
var comProps = {
|
|
2517
2880
|
top: 100 - hsva.v + "%",
|
|
@@ -2527,7 +2890,7 @@ var Saturation = /* @__PURE__ */ React26__namespace.default.forwardRef((props, r
|
|
|
2527
2890
|
prefixCls
|
|
2528
2891
|
}, comProps));
|
|
2529
2892
|
}, [hsva, pointer, prefixCls]);
|
|
2530
|
-
var handleClick =
|
|
2893
|
+
var handleClick = React27.useCallback((event) => {
|
|
2531
2894
|
event.target.focus();
|
|
2532
2895
|
}, []);
|
|
2533
2896
|
return /* @__PURE__ */ jsxRuntime.jsx(esm_default, (0, import_extends3.default)({
|
|
@@ -2589,16 +2952,16 @@ var Pointer2 = (_ref) => {
|
|
|
2589
2952
|
};
|
|
2590
2953
|
var _excluded4 = ["prefixCls", "className", "hsva", "background", "bgProps", "innerProps", "pointerProps", "radius", "width", "height", "direction", "reverse", "style", "onChange", "pointer"];
|
|
2591
2954
|
var BACKGROUND_IMG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==";
|
|
2592
|
-
var Alpha = /* @__PURE__ */
|
|
2955
|
+
var Alpha = /* @__PURE__ */ React27__namespace.default.forwardRef((props, ref) => {
|
|
2593
2956
|
var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-alpha" : _props$prefixCls, className = props.className, hsva = props.hsva, background = props.background, _props$bgProps = props.bgProps, bgProps = _props$bgProps === void 0 ? {} : _props$bgProps, _props$innerProps = props.innerProps, innerProps = _props$innerProps === void 0 ? {} : _props$innerProps, _props$pointerProps = props.pointerProps, pointerProps = _props$pointerProps === void 0 ? {} : _props$pointerProps, _props$radius = props.radius, radius = _props$radius === void 0 ? 0 : _props$radius, width = props.width, _props$height = props.height, height = _props$height === void 0 ? 16 : _props$height, _props$direction = props.direction, direction = _props$direction === void 0 ? "horizontal" : _props$direction, _props$reverse = props.reverse, reverse = _props$reverse === void 0 ? false : _props$reverse, style = props.style, onChange = props.onChange, pointer = props.pointer, other = (0, import_objectWithoutPropertiesLoose4.default)(props, _excluded4);
|
|
2594
|
-
var offsetToAlpha =
|
|
2957
|
+
var offsetToAlpha = React27.useCallback((offset) => {
|
|
2595
2958
|
var value = direction === "horizontal" ? offset.left : offset.top;
|
|
2596
2959
|
if (direction === "horizontal") {
|
|
2597
2960
|
return reverse ? 1 - value : value;
|
|
2598
2961
|
}
|
|
2599
2962
|
return reverse ? value : 1 - value;
|
|
2600
2963
|
}, [direction, reverse]);
|
|
2601
|
-
var alphaToOffset =
|
|
2964
|
+
var alphaToOffset = React27.useCallback((alpha) => {
|
|
2602
2965
|
if (direction === "horizontal") {
|
|
2603
2966
|
return reverse ? 1 - alpha : alpha;
|
|
2604
2967
|
}
|
|
@@ -2635,7 +2998,7 @@ var Alpha = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref) =
|
|
|
2635
2998
|
}, style, {
|
|
2636
2999
|
position: "relative"
|
|
2637
3000
|
});
|
|
2638
|
-
var handleKeyDown =
|
|
3001
|
+
var handleKeyDown = React27.useCallback((event) => {
|
|
2639
3002
|
var step = 0.01;
|
|
2640
3003
|
var currentAlpha = hsva.a;
|
|
2641
3004
|
var newAlpha = currentAlpha;
|
|
@@ -2682,7 +3045,7 @@ var Alpha = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref) =
|
|
|
2682
3045
|
}), syntheticOffset);
|
|
2683
3046
|
}
|
|
2684
3047
|
}, [alphaToOffset, hsva, direction, onChange, reverse]);
|
|
2685
|
-
var handleClick =
|
|
3048
|
+
var handleClick = React27.useCallback((event) => {
|
|
2686
3049
|
event.target.focus();
|
|
2687
3050
|
}, []);
|
|
2688
3051
|
var pointerElement = pointer && typeof pointer === "function" ? pointer((0, import_extends5.default)({
|
|
@@ -2725,13 +3088,13 @@ var import_objectWithoutPropertiesLoose5 = __toESM(require_objectWithoutProperti
|
|
|
2725
3088
|
var _excluded5 = ["prefixCls", "placement", "label", "value", "className", "style", "labelStyle", "inputStyle", "onChange", "onBlur", "renderInput"];
|
|
2726
3089
|
var validHex2 = (hex) => /^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);
|
|
2727
3090
|
var getNumberValue = (value) => Number(String(value).replace(/%/g, ""));
|
|
2728
|
-
var EditableInput = /* @__PURE__ */
|
|
3091
|
+
var EditableInput = /* @__PURE__ */ React27__namespace.default.forwardRef((props, ref) => {
|
|
2729
3092
|
var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-editable-input" : _props$prefixCls, _props$placement = props.placement, placement = _props$placement === void 0 ? "bottom" : _props$placement, label = props.label, initValue = props.value, className = props.className, style = props.style, labelStyle = props.labelStyle, inputStyle = props.inputStyle, onChange = props.onChange, onBlur = props.onBlur, renderInput = props.renderInput, other = (0, import_objectWithoutPropertiesLoose5.default)(props, _excluded5);
|
|
2730
|
-
var _useState =
|
|
2731
|
-
var isFocus =
|
|
2732
|
-
var inputIdRef =
|
|
3093
|
+
var _useState = React27.useState(initValue), value = _useState[0], setValue = _useState[1];
|
|
3094
|
+
var isFocus = React27.useRef(false);
|
|
3095
|
+
var inputIdRef = React27.useRef(other.id || prefixCls + "-" + Math.random().toString(36).slice(2, 11));
|
|
2733
3096
|
var inputId = other.id || inputIdRef.current;
|
|
2734
|
-
|
|
3097
|
+
React27.useEffect(() => {
|
|
2735
3098
|
if (props.value !== value) {
|
|
2736
3099
|
if (!isFocus.current) {
|
|
2737
3100
|
setValue(props.value);
|
|
@@ -2822,7 +3185,7 @@ var esm_default4 = EditableInput;
|
|
|
2822
3185
|
var import_extends7 = __toESM(require_extends());
|
|
2823
3186
|
var import_objectWithoutPropertiesLoose6 = __toESM(require_objectWithoutPropertiesLoose());
|
|
2824
3187
|
var _excluded6 = ["prefixCls", "hsva", "placement", "rProps", "gProps", "bProps", "aProps", "className", "style", "onChange"];
|
|
2825
|
-
var EditableInputRGBA = /* @__PURE__ */
|
|
3188
|
+
var EditableInputRGBA = /* @__PURE__ */ React27__namespace.default.forwardRef((props, ref) => {
|
|
2826
3189
|
var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-editable-input-rgba" : _props$prefixCls, hsva = props.hsva, _props$placement = props.placement, placement = _props$placement === void 0 ? "bottom" : _props$placement, _props$rProps = props.rProps, rProps = _props$rProps === void 0 ? {} : _props$rProps, _props$gProps = props.gProps, gProps = _props$gProps === void 0 ? {} : _props$gProps, _props$bProps = props.bProps, bProps = _props$bProps === void 0 ? {} : _props$bProps, _props$aProps = props.aProps, aProps = _props$aProps === void 0 ? {} : _props$aProps, className = props.className, style = props.style, onChange = props.onChange, other = (0, import_objectWithoutPropertiesLoose6.default)(props, _excluded6);
|
|
2827
3190
|
var rgba = hsva ? hsvaToRgba(hsva) : {};
|
|
2828
3191
|
function handleBlur(evn) {
|
|
@@ -2936,9 +3299,9 @@ var import_objectWithoutPropertiesLoose7 = __toESM(require_objectWithoutProperti
|
|
|
2936
3299
|
var _excluded7 = ["prefixCls", "className", "hue", "onChange", "direction", "reverse"];
|
|
2937
3300
|
var NORMAL_COLORS = "rgb(255, 0, 0) 0%, rgb(255, 255, 0) 17%, rgb(0, 255, 0) 33%, rgb(0, 255, 255) 50%, rgb(0, 0, 255) 67%, rgb(255, 0, 255) 83%, rgb(255, 0, 0) 100%";
|
|
2938
3301
|
var REVERSED_COLORS = "rgb(255, 0, 0) 0%, rgb(255, 0, 255) 17%, rgb(0, 0, 255) 33%, rgb(0, 255, 255) 50%, rgb(0, 255, 0) 67%, rgb(255, 255, 0) 83%, rgb(255, 0, 0) 100%";
|
|
2939
|
-
var Hue = /* @__PURE__ */
|
|
3302
|
+
var Hue = /* @__PURE__ */ React27__namespace.default.forwardRef((props, ref) => {
|
|
2940
3303
|
var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-hue" : _props$prefixCls, className = props.className, _props$hue = props.hue, hue = _props$hue === void 0 ? 0 : _props$hue, _onChange = props.onChange, _props$direction = props.direction, direction = _props$direction === void 0 ? "horizontal" : _props$direction, _props$reverse = props.reverse, reverse = _props$reverse === void 0 ? false : _props$reverse, other = (0, import_objectWithoutPropertiesLoose7.default)(props, _excluded7);
|
|
2941
|
-
var getGradientBackground =
|
|
3304
|
+
var getGradientBackground = React27.useCallback(() => {
|
|
2942
3305
|
if (direction === "horizontal") {
|
|
2943
3306
|
var colors = reverse ? REVERSED_COLORS : NORMAL_COLORS;
|
|
2944
3307
|
var gradientDirection = "right";
|
|
@@ -2949,7 +3312,7 @@ var Hue = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref) =>
|
|
|
2949
3312
|
return "linear-gradient(to " + _gradientDirection + ", " + _colors + ")";
|
|
2950
3313
|
}
|
|
2951
3314
|
}, [direction, reverse]);
|
|
2952
|
-
var getHueFromInteraction =
|
|
3315
|
+
var getHueFromInteraction = React27.useCallback((interaction) => {
|
|
2953
3316
|
var value = direction === "horizontal" ? interaction.left : interaction.top;
|
|
2954
3317
|
var normalizedValue;
|
|
2955
3318
|
if (direction === "horizontal") {
|
|
@@ -2959,7 +3322,7 @@ var Hue = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref) =>
|
|
|
2959
3322
|
}
|
|
2960
3323
|
return 360 * normalizedValue;
|
|
2961
3324
|
}, [direction, reverse]);
|
|
2962
|
-
var gradientBackground =
|
|
3325
|
+
var gradientBackground = React27.useMemo(() => getGradientBackground(), [getGradientBackground]);
|
|
2963
3326
|
return /* @__PURE__ */ jsxRuntime.jsx(esm_default3, (0, import_extends8.default)({
|
|
2964
3327
|
ref,
|
|
2965
3328
|
className: prefixCls + " " + (className || "")
|
|
@@ -2987,7 +3350,7 @@ var esm_default6 = Hue;
|
|
|
2987
3350
|
var import_extends9 = __toESM(require_extends());
|
|
2988
3351
|
var import_objectWithoutPropertiesLoose8 = __toESM(require_objectWithoutPropertiesLoose());
|
|
2989
3352
|
var _excluded8 = ["prefixCls", "className", "color", "colors", "style", "rectProps", "onChange", "addonAfter", "addonBefore", "rectRender"];
|
|
2990
|
-
var Swatch = /* @__PURE__ */
|
|
3353
|
+
var Swatch = /* @__PURE__ */ React27__namespace.default.forwardRef((props, ref) => {
|
|
2991
3354
|
var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-swatch" : _props$prefixCls, className = props.className, color2 = props.color, _props$colors = props.colors, colors = _props$colors === void 0 ? [] : _props$colors, style = props.style, _props$rectProps = props.rectProps, rectProps = _props$rectProps === void 0 ? {} : _props$rectProps, onChange = props.onChange, addonAfter = props.addonAfter, addonBefore = props.addonBefore, rectRender = props.rectRender, other = (0, import_objectWithoutPropertiesLoose8.default)(props, _excluded8);
|
|
2992
3355
|
var rectStyle = (0, import_extends9.default)({
|
|
2993
3356
|
"--swatch-background-color": "rgb(144, 19, 254)",
|
|
@@ -3013,7 +3376,7 @@ var Swatch = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref)
|
|
|
3013
3376
|
flexWrap: "wrap",
|
|
3014
3377
|
position: "relative"
|
|
3015
3378
|
}, style),
|
|
3016
|
-
children: [addonBefore && /* @__PURE__ */
|
|
3379
|
+
children: [addonBefore && /* @__PURE__ */ React27__namespace.default.isValidElement(addonBefore) && addonBefore, colors && Array.isArray(colors) && colors.map((item, idx) => {
|
|
3017
3380
|
var title = "";
|
|
3018
3381
|
var background = "";
|
|
3019
3382
|
if (typeof item === "string") {
|
|
@@ -3035,11 +3398,11 @@ var Swatch = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref)
|
|
|
3035
3398
|
onClick: (evn) => handleClick(background, evn)
|
|
3036
3399
|
});
|
|
3037
3400
|
if (render) {
|
|
3038
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3401
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React27.Fragment, {
|
|
3039
3402
|
children: render
|
|
3040
3403
|
}, idx);
|
|
3041
3404
|
}
|
|
3042
|
-
var child = rectProps.children && /* @__PURE__ */
|
|
3405
|
+
var child = rectProps.children && /* @__PURE__ */ React27__namespace.default.isValidElement(rectProps.children) ? /* @__PURE__ */ React27__namespace.default.cloneElement(rectProps.children, {
|
|
3043
3406
|
color: background,
|
|
3044
3407
|
checked
|
|
3045
3408
|
}) : null;
|
|
@@ -3053,7 +3416,7 @@ var Swatch = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref)
|
|
|
3053
3416
|
background
|
|
3054
3417
|
})
|
|
3055
3418
|
}), idx);
|
|
3056
|
-
}), addonAfter && /* @__PURE__ */
|
|
3419
|
+
}), addonAfter && /* @__PURE__ */ React27__namespace.default.isValidElement(addonAfter) && addonAfter]
|
|
3057
3420
|
}));
|
|
3058
3421
|
});
|
|
3059
3422
|
Swatch.displayName = "Swatch";
|
|
@@ -3072,15 +3435,15 @@ var Bar = (props) => /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
|
3072
3435
|
backgroundColor: "#fff"
|
|
3073
3436
|
}
|
|
3074
3437
|
});
|
|
3075
|
-
var Sketch = /* @__PURE__ */
|
|
3438
|
+
var Sketch = /* @__PURE__ */ React27__namespace.default.forwardRef((props, ref) => {
|
|
3076
3439
|
var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "w-color-sketch" : _props$prefixCls, className = props.className, onChange = props.onChange, _props$width = props.width, width = _props$width === void 0 ? 218 : _props$width, _props$presetColors = props.presetColors, presetColors = _props$presetColors === void 0 ? PRESET_COLORS : _props$presetColors, color2 = props.color, _props$editableDisabl = props.editableDisable, editableDisable = _props$editableDisabl === void 0 ? true : _props$editableDisabl, _props$disableAlpha = props.disableAlpha, disableAlpha = _props$disableAlpha === void 0 ? false : _props$disableAlpha, style = props.style, other = (0, import_objectWithoutPropertiesLoose9.default)(props, _excluded9);
|
|
3077
|
-
var _useState =
|
|
3440
|
+
var _useState = React27.useState({
|
|
3078
3441
|
h: 209,
|
|
3079
3442
|
s: 36,
|
|
3080
3443
|
v: 90,
|
|
3081
3444
|
a: 1
|
|
3082
3445
|
}), hsva = _useState[0], setHsva = _useState[1];
|
|
3083
|
-
|
|
3446
|
+
React27.useEffect(() => {
|
|
3084
3447
|
if (typeof color2 === "string" && validHex(color2)) {
|
|
3085
3448
|
setHsva(hexToHsva(color2));
|
|
3086
3449
|
}
|
|
@@ -3198,7 +3561,7 @@ var Sketch = /* @__PURE__ */ React26__namespace.default.forwardRef((props, ref)
|
|
|
3198
3561
|
innerProps: {
|
|
3199
3562
|
style: styleAlpha
|
|
3200
3563
|
},
|
|
3201
|
-
pointer: () => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3564
|
+
pointer: () => /* @__PURE__ */ jsxRuntime.jsx(React27.Fragment, {})
|
|
3202
3565
|
})]
|
|
3203
3566
|
})]
|
|
3204
3567
|
}), editableDisable && /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
@@ -3341,19 +3704,19 @@ var Toolbar = ({
|
|
|
3341
3704
|
toolbar,
|
|
3342
3705
|
font_families
|
|
3343
3706
|
}) => {
|
|
3344
|
-
const [link_url, set_link_url] =
|
|
3345
|
-
const [link_popover_open, set_link_popover_open] =
|
|
3346
|
-
const [text_color_open, set_text_color_open] =
|
|
3347
|
-
const [highlight_color_open, set_highlight_color_open] =
|
|
3348
|
-
const [variables_menu_open, set_variables_menu_open] =
|
|
3349
|
-
const [table_menu_open, set_table_menu_open] =
|
|
3350
|
-
const [text_color, set_text_color] =
|
|
3351
|
-
const [highlight_color, set_highlight_color] =
|
|
3352
|
-
const [table_rows, set_table_rows] =
|
|
3353
|
-
const [table_cols, set_table_cols] =
|
|
3354
|
-
const [hovered_cell, set_hovered_cell] =
|
|
3355
|
-
const file_input_ref =
|
|
3356
|
-
const image_input_ref =
|
|
3707
|
+
const [link_url, set_link_url] = React27__namespace.useState("https://");
|
|
3708
|
+
const [link_popover_open, set_link_popover_open] = React27__namespace.useState(false);
|
|
3709
|
+
const [text_color_open, set_text_color_open] = React27__namespace.useState(false);
|
|
3710
|
+
const [highlight_color_open, set_highlight_color_open] = React27__namespace.useState(false);
|
|
3711
|
+
const [variables_menu_open, set_variables_menu_open] = React27__namespace.useState(false);
|
|
3712
|
+
const [table_menu_open, set_table_menu_open] = React27__namespace.useState(false);
|
|
3713
|
+
const [text_color, set_text_color] = React27__namespace.useState("#000000");
|
|
3714
|
+
const [highlight_color, set_highlight_color] = React27__namespace.useState("#ffff00");
|
|
3715
|
+
const [table_rows, set_table_rows] = React27__namespace.useState(3);
|
|
3716
|
+
const [table_cols, set_table_cols] = React27__namespace.useState(3);
|
|
3717
|
+
const [hovered_cell, set_hovered_cell] = React27__namespace.useState(null);
|
|
3718
|
+
const file_input_ref = React27__namespace.useRef(null);
|
|
3719
|
+
const image_input_ref = React27__namespace.useRef(null);
|
|
3357
3720
|
if (!editor) {
|
|
3358
3721
|
return null;
|
|
3359
3722
|
}
|
|
@@ -4167,7 +4530,7 @@ var Toolbar = ({
|
|
|
4167
4530
|
disabled && "opacity-50 pointer-events-none"
|
|
4168
4531
|
),
|
|
4169
4532
|
children: [
|
|
4170
|
-
sections.map((items, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4533
|
+
sections.map((items, i) => /* @__PURE__ */ jsxRuntime.jsxs(React27__namespace.Fragment, { children: [
|
|
4171
4534
|
i > 0 && /* @__PURE__ */ jsxRuntime.jsx(ToolbarSeparator, {}),
|
|
4172
4535
|
items
|
|
4173
4536
|
] }, i)),
|
|
@@ -4419,43 +4782,6 @@ var VariableExtension = core.Node.create({
|
|
|
4419
4782
|
};
|
|
4420
4783
|
}
|
|
4421
4784
|
});
|
|
4422
|
-
var Tabs = TabsPrimitive__namespace.Root;
|
|
4423
|
-
var TabsList = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4424
|
-
TabsPrimitive__namespace.List,
|
|
4425
|
-
{
|
|
4426
|
-
ref,
|
|
4427
|
-
className: cn(
|
|
4428
|
-
"inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
|
|
4429
|
-
className
|
|
4430
|
-
),
|
|
4431
|
-
...props
|
|
4432
|
-
}
|
|
4433
|
-
));
|
|
4434
|
-
TabsList.displayName = TabsPrimitive__namespace.List.displayName;
|
|
4435
|
-
var TabsTrigger = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4436
|
-
TabsPrimitive__namespace.Trigger,
|
|
4437
|
-
{
|
|
4438
|
-
ref,
|
|
4439
|
-
className: cn(
|
|
4440
|
-
"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",
|
|
4441
|
-
className
|
|
4442
|
-
),
|
|
4443
|
-
...props
|
|
4444
|
-
}
|
|
4445
|
-
));
|
|
4446
|
-
TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
|
|
4447
|
-
var TabsContent = React26__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4448
|
-
TabsPrimitive__namespace.Content,
|
|
4449
|
-
{
|
|
4450
|
-
ref,
|
|
4451
|
-
className: cn(
|
|
4452
|
-
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
4453
|
-
className
|
|
4454
|
-
),
|
|
4455
|
-
...props
|
|
4456
|
-
}
|
|
4457
|
-
));
|
|
4458
|
-
TabsContent.displayName = TabsPrimitive__namespace.Content.displayName;
|
|
4459
4785
|
function debounce_fn(func, wait) {
|
|
4460
4786
|
let timeout_id = null;
|
|
4461
4787
|
return (output) => {
|
|
@@ -4481,14 +4807,14 @@ var HazoUiRte = ({
|
|
|
4481
4807
|
toolbar,
|
|
4482
4808
|
font_families
|
|
4483
4809
|
}) => {
|
|
4484
|
-
const [attachments, set_attachments] =
|
|
4810
|
+
const [attachments, set_attachments] = React27__namespace.useState(
|
|
4485
4811
|
initial_attachments
|
|
4486
4812
|
);
|
|
4487
|
-
const [active_tab, set_active_tab] =
|
|
4813
|
+
const [active_tab, set_active_tab] = React27__namespace.useState("html");
|
|
4488
4814
|
const is_view_only = active_tab !== "html";
|
|
4489
|
-
const attachments_ref =
|
|
4815
|
+
const attachments_ref = React27__namespace.useRef(attachments);
|
|
4490
4816
|
attachments_ref.current = attachments;
|
|
4491
|
-
const debounced_on_change =
|
|
4817
|
+
const debounced_on_change = React27__namespace.useMemo(
|
|
4492
4818
|
() => debounce_fn((output) => {
|
|
4493
4819
|
if (on_change) {
|
|
4494
4820
|
on_change(output);
|
|
@@ -4587,7 +4913,7 @@ var HazoUiRte = ({
|
|
|
4587
4913
|
debounced_on_change(output);
|
|
4588
4914
|
}
|
|
4589
4915
|
});
|
|
4590
|
-
|
|
4916
|
+
React27__namespace.useEffect(() => {
|
|
4591
4917
|
if (editor && html !== void 0) {
|
|
4592
4918
|
const current_html = editor.getHTML();
|
|
4593
4919
|
if (html !== current_html && !editor.isFocused) {
|
|
@@ -4595,21 +4921,21 @@ var HazoUiRte = ({
|
|
|
4595
4921
|
}
|
|
4596
4922
|
}
|
|
4597
4923
|
}, [html, editor]);
|
|
4598
|
-
|
|
4924
|
+
React27__namespace.useEffect(() => {
|
|
4599
4925
|
if (editor) {
|
|
4600
4926
|
editor.setEditable(!disabled);
|
|
4601
4927
|
}
|
|
4602
4928
|
}, [disabled, editor]);
|
|
4603
|
-
const attachments_from_props_ref =
|
|
4604
|
-
const prev_initial_attachments_ref =
|
|
4605
|
-
|
|
4929
|
+
const attachments_from_props_ref = React27__namespace.useRef(false);
|
|
4930
|
+
const prev_initial_attachments_ref = React27__namespace.useRef(initial_attachments);
|
|
4931
|
+
React27__namespace.useEffect(() => {
|
|
4606
4932
|
if (JSON.stringify(initial_attachments) !== JSON.stringify(prev_initial_attachments_ref.current)) {
|
|
4607
4933
|
prev_initial_attachments_ref.current = initial_attachments;
|
|
4608
4934
|
attachments_from_props_ref.current = true;
|
|
4609
4935
|
set_attachments(initial_attachments);
|
|
4610
4936
|
}
|
|
4611
4937
|
}, [initial_attachments]);
|
|
4612
|
-
|
|
4938
|
+
React27__namespace.useEffect(() => {
|
|
4613
4939
|
if (attachments_from_props_ref.current) {
|
|
4614
4940
|
attachments_from_props_ref.current = false;
|
|
4615
4941
|
return;
|
|
@@ -4855,7 +5181,7 @@ function CanvasTextToolbar({
|
|
|
4855
5181
|
}
|
|
4856
5182
|
) });
|
|
4857
5183
|
}
|
|
4858
|
-
var MdEditorLazy =
|
|
5184
|
+
var MdEditorLazy = React27.lazy(() => import('@uiw/react-md-editor'));
|
|
4859
5185
|
var EDITOR_TEXTAREA_SELECTOR = ".w-md-editor-text-input";
|
|
4860
5186
|
function MarkdownEditor({
|
|
4861
5187
|
value,
|
|
@@ -4871,13 +5197,13 @@ function MarkdownEditor({
|
|
|
4871
5197
|
renderPreview,
|
|
4872
5198
|
showPreview = true
|
|
4873
5199
|
}) {
|
|
4874
|
-
const [mounted, setMounted] =
|
|
4875
|
-
|
|
4876
|
-
const valueRef =
|
|
5200
|
+
const [mounted, setMounted] = React27.useState(false);
|
|
5201
|
+
React27.useEffect(() => setMounted(true), []);
|
|
5202
|
+
const valueRef = React27.useRef(value);
|
|
4877
5203
|
valueRef.current = value;
|
|
4878
|
-
const wrapperRef =
|
|
4879
|
-
const [uploading, setUploading] =
|
|
4880
|
-
const [error, setError] =
|
|
5204
|
+
const wrapperRef = React27.useRef(null);
|
|
5205
|
+
const [uploading, setUploading] = React27.useState(false);
|
|
5206
|
+
const [error, setError] = React27.useState("");
|
|
4881
5207
|
function insertAtCursor(text) {
|
|
4882
5208
|
const textarea = wrapperRef.current?.querySelector(
|
|
4883
5209
|
EDITOR_TEXTAREA_SELECTOR
|
|
@@ -4892,7 +5218,7 @@ function MarkdownEditor({
|
|
|
4892
5218
|
const end = textarea.selectionEnd ?? start;
|
|
4893
5219
|
onChange(current.slice(0, start) + text + current.slice(end));
|
|
4894
5220
|
}
|
|
4895
|
-
const embedCommands =
|
|
5221
|
+
const embedCommands = React27.useMemo(() => {
|
|
4896
5222
|
return (embeds ?? []).map((embed) => ({
|
|
4897
5223
|
name: embed.name,
|
|
4898
5224
|
keyCommand: embed.name,
|
|
@@ -4911,7 +5237,7 @@ function MarkdownEditor({
|
|
|
4911
5237
|
}
|
|
4912
5238
|
}));
|
|
4913
5239
|
}, [embeds]);
|
|
4914
|
-
const editorCommands =
|
|
5240
|
+
const editorCommands = React27.useMemo(() => {
|
|
4915
5241
|
const defaults = reactMdEditor.commands.getCommands();
|
|
4916
5242
|
const extras = [...embedCommands, ...extraCommands ?? []];
|
|
4917
5243
|
if (extras.length === 0) return defaults;
|
|
@@ -4967,7 +5293,7 @@ function MarkdownEditor({
|
|
|
4967
5293
|
ref: wrapperRef,
|
|
4968
5294
|
children: [
|
|
4969
5295
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: useCustomPreview && showPreview ? "flex-1 min-w-0" : "w-full", children: mounted ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4970
|
-
|
|
5296
|
+
React27.Suspense,
|
|
4971
5297
|
{
|
|
4972
5298
|
fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4973
5299
|
"div",
|
|
@@ -5422,12 +5748,12 @@ var CommandPopover = ({
|
|
|
5422
5748
|
on_selection_change: _on_selection_change,
|
|
5423
5749
|
prefix_color
|
|
5424
5750
|
}) => {
|
|
5425
|
-
const container_ref =
|
|
5426
|
-
const grouped_commands =
|
|
5751
|
+
const container_ref = React27__namespace.useRef(null);
|
|
5752
|
+
const grouped_commands = React27__namespace.useMemo(
|
|
5427
5753
|
() => group_commands(commands),
|
|
5428
5754
|
[commands]
|
|
5429
5755
|
);
|
|
5430
|
-
|
|
5756
|
+
React27__namespace.useEffect(() => {
|
|
5431
5757
|
const handle_click_outside = (e) => {
|
|
5432
5758
|
if (container_ref.current && !container_ref.current.contains(e.target)) {
|
|
5433
5759
|
on_close();
|
|
@@ -5440,8 +5766,8 @@ var CommandPopover = ({
|
|
|
5440
5766
|
};
|
|
5441
5767
|
}
|
|
5442
5768
|
}, [is_open, on_close]);
|
|
5443
|
-
const [mounted, set_mounted] =
|
|
5444
|
-
|
|
5769
|
+
const [mounted, set_mounted] = React27__namespace.useState(false);
|
|
5770
|
+
React27__namespace.useEffect(() => {
|
|
5445
5771
|
set_mounted(true);
|
|
5446
5772
|
}, []);
|
|
5447
5773
|
if (!is_open || !mounted) return null;
|
|
@@ -5751,21 +6077,21 @@ var HazoUiTextbox = ({
|
|
|
5751
6077
|
on_command_change,
|
|
5752
6078
|
on_command_remove
|
|
5753
6079
|
}) => {
|
|
5754
|
-
const generated_instance_id =
|
|
6080
|
+
const generated_instance_id = React27__namespace.useId();
|
|
5755
6081
|
const instance_id = provided_instance_id || generated_instance_id;
|
|
5756
|
-
const [suggestion_state, set_suggestion_state] =
|
|
5757
|
-
const [selected_index, set_selected_index] =
|
|
5758
|
-
const [popover_position, set_popover_position] =
|
|
5759
|
-
const [edit_context, set_edit_context] =
|
|
5760
|
-
const [edit_selected_index, set_edit_selected_index] =
|
|
6082
|
+
const [suggestion_state, set_suggestion_state] = React27__namespace.useState(null);
|
|
6083
|
+
const [selected_index, set_selected_index] = React27__namespace.useState(0);
|
|
6084
|
+
const [popover_position, set_popover_position] = React27__namespace.useState({ top: 0, left: 0 });
|
|
6085
|
+
const [edit_context, set_edit_context] = React27__namespace.useState(null);
|
|
6086
|
+
const [edit_selected_index, set_edit_selected_index] = React27__namespace.useState(0);
|
|
5761
6087
|
const is_controlled = value !== void 0;
|
|
5762
|
-
const editor_container_ref =
|
|
5763
|
-
const edit_popover_ref =
|
|
5764
|
-
const [mounted, set_mounted] =
|
|
5765
|
-
|
|
6088
|
+
const editor_container_ref = React27__namespace.useRef(null);
|
|
6089
|
+
const edit_popover_ref = React27__namespace.useRef(null);
|
|
6090
|
+
const [mounted, set_mounted] = React27__namespace.useState(false);
|
|
6091
|
+
React27__namespace.useEffect(() => {
|
|
5766
6092
|
set_mounted(true);
|
|
5767
6093
|
}, []);
|
|
5768
|
-
const suggestion_extensions =
|
|
6094
|
+
const suggestion_extensions = React27__namespace.useMemo(() => {
|
|
5769
6095
|
return create_command_suggestion_extension({
|
|
5770
6096
|
prefixes,
|
|
5771
6097
|
instance_id,
|
|
@@ -5816,7 +6142,7 @@ var HazoUiTextbox = ({
|
|
|
5816
6142
|
}
|
|
5817
6143
|
}
|
|
5818
6144
|
});
|
|
5819
|
-
|
|
6145
|
+
React27__namespace.useEffect(() => {
|
|
5820
6146
|
if (suggestion_state?.is_active && editor) {
|
|
5821
6147
|
requestAnimationFrame(() => {
|
|
5822
6148
|
const { from } = suggestion_state.range;
|
|
@@ -5840,7 +6166,7 @@ var HazoUiTextbox = ({
|
|
|
5840
6166
|
});
|
|
5841
6167
|
}
|
|
5842
6168
|
}, [suggestion_state, editor]);
|
|
5843
|
-
|
|
6169
|
+
React27__namespace.useEffect(() => {
|
|
5844
6170
|
if (is_controlled && editor && !editor.isFocused) {
|
|
5845
6171
|
const current_text = editor.getText();
|
|
5846
6172
|
if (value !== current_text) {
|
|
@@ -5849,12 +6175,12 @@ var HazoUiTextbox = ({
|
|
|
5849
6175
|
}
|
|
5850
6176
|
}
|
|
5851
6177
|
}, [value, editor, is_controlled, prefixes, pill_variant]);
|
|
5852
|
-
|
|
6178
|
+
React27__namespace.useEffect(() => {
|
|
5853
6179
|
if (editor) {
|
|
5854
6180
|
editor.setEditable(!disabled);
|
|
5855
6181
|
}
|
|
5856
6182
|
}, [disabled, editor]);
|
|
5857
|
-
const handle_command_select =
|
|
6183
|
+
const handle_command_select = React27__namespace.useCallback(
|
|
5858
6184
|
(command) => {
|
|
5859
6185
|
if (!editor || !suggestion_state) return;
|
|
5860
6186
|
const prefix_config = prefixes.find((p) => p.char === suggestion_state.prefix);
|
|
@@ -5874,15 +6200,15 @@ var HazoUiTextbox = ({
|
|
|
5874
6200
|
},
|
|
5875
6201
|
[editor, suggestion_state, pill_variant, on_command_insert, prefixes]
|
|
5876
6202
|
);
|
|
5877
|
-
const handle_popover_close =
|
|
6203
|
+
const handle_popover_close = React27__namespace.useCallback(() => {
|
|
5878
6204
|
set_suggestion_state(null);
|
|
5879
6205
|
editor?.commands.focus();
|
|
5880
6206
|
}, [editor]);
|
|
5881
|
-
const handle_edit_close =
|
|
6207
|
+
const handle_edit_close = React27__namespace.useCallback(() => {
|
|
5882
6208
|
set_edit_context(null);
|
|
5883
6209
|
editor?.commands.focus();
|
|
5884
6210
|
}, [editor]);
|
|
5885
|
-
const handle_command_update =
|
|
6211
|
+
const handle_command_update = React27__namespace.useCallback(
|
|
5886
6212
|
(new_command) => {
|
|
5887
6213
|
if (!editor || !edit_context) return;
|
|
5888
6214
|
const old_command = edit_context.command;
|
|
@@ -5898,7 +6224,7 @@ var HazoUiTextbox = ({
|
|
|
5898
6224
|
},
|
|
5899
6225
|
[editor, edit_context, on_command_change]
|
|
5900
6226
|
);
|
|
5901
|
-
const handle_command_remove =
|
|
6227
|
+
const handle_command_remove = React27__namespace.useCallback(() => {
|
|
5902
6228
|
if (!editor || !edit_context) return;
|
|
5903
6229
|
const command = edit_context.command;
|
|
5904
6230
|
editor.state.doc.descendants((node, pos) => {
|
|
@@ -5912,7 +6238,7 @@ var HazoUiTextbox = ({
|
|
|
5912
6238
|
}
|
|
5913
6239
|
set_edit_context(null);
|
|
5914
6240
|
}, [editor, edit_context, on_command_remove]);
|
|
5915
|
-
const filtered_commands =
|
|
6241
|
+
const filtered_commands = React27__namespace.useMemo(() => {
|
|
5916
6242
|
if (!suggestion_state) return [];
|
|
5917
6243
|
const query = suggestion_state.query.toLowerCase();
|
|
5918
6244
|
if (!query) return suggestion_state.commands;
|
|
@@ -5920,7 +6246,7 @@ var HazoUiTextbox = ({
|
|
|
5920
6246
|
(cmd) => cmd.action_label.toLowerCase().includes(query) || cmd.action.toLowerCase().includes(query) || cmd.action_description?.toLowerCase().includes(query)
|
|
5921
6247
|
);
|
|
5922
6248
|
}, [suggestion_state]);
|
|
5923
|
-
|
|
6249
|
+
React27__namespace.useEffect(() => {
|
|
5924
6250
|
if (!suggestion_state?.is_active) return;
|
|
5925
6251
|
const handle_keydown = (e) => {
|
|
5926
6252
|
switch (e.key) {
|
|
@@ -5955,7 +6281,7 @@ var HazoUiTextbox = ({
|
|
|
5955
6281
|
handle_command_select,
|
|
5956
6282
|
handle_popover_close
|
|
5957
6283
|
]);
|
|
5958
|
-
|
|
6284
|
+
React27__namespace.useEffect(() => {
|
|
5959
6285
|
if (!edit_context) return;
|
|
5960
6286
|
const handle_click_outside = (e) => {
|
|
5961
6287
|
if (edit_popover_ref.current && !edit_popover_ref.current.contains(e.target)) {
|
|
@@ -5970,12 +6296,12 @@ var HazoUiTextbox = ({
|
|
|
5970
6296
|
document.removeEventListener("mousedown", handle_click_outside);
|
|
5971
6297
|
};
|
|
5972
6298
|
}, [edit_context]);
|
|
5973
|
-
const edit_commands =
|
|
6299
|
+
const edit_commands = React27__namespace.useMemo(() => {
|
|
5974
6300
|
if (!edit_context) return [];
|
|
5975
6301
|
const prefix_config = prefixes.find((p) => p.char === edit_context.command.prefix);
|
|
5976
6302
|
return prefix_config?.commands || [];
|
|
5977
6303
|
}, [edit_context, prefixes]);
|
|
5978
|
-
|
|
6304
|
+
React27__namespace.useEffect(() => {
|
|
5979
6305
|
if (!edit_context) return;
|
|
5980
6306
|
const handle_keydown = (e) => {
|
|
5981
6307
|
switch (e.key) {
|
|
@@ -6013,7 +6339,7 @@ var HazoUiTextbox = ({
|
|
|
6013
6339
|
handle_command_remove,
|
|
6014
6340
|
handle_edit_close
|
|
6015
6341
|
]);
|
|
6016
|
-
|
|
6342
|
+
React27__namespace.useEffect(() => {
|
|
6017
6343
|
const handle_pill_click = (e) => {
|
|
6018
6344
|
const detail = e.detail;
|
|
6019
6345
|
const { id, prefix, action, action_label, node_pos } = detail;
|
|
@@ -6298,22 +6624,22 @@ var HazoUiTextarea = ({
|
|
|
6298
6624
|
on_command_change,
|
|
6299
6625
|
on_command_remove
|
|
6300
6626
|
}) => {
|
|
6301
|
-
const generated_instance_id =
|
|
6627
|
+
const generated_instance_id = React27__namespace.useId();
|
|
6302
6628
|
const instance_id = provided_instance_id || generated_instance_id;
|
|
6303
|
-
const [suggestion_state, set_suggestion_state] =
|
|
6304
|
-
const [selected_index, set_selected_index] =
|
|
6305
|
-
const [popover_position, set_popover_position] =
|
|
6306
|
-
const [edit_context, set_edit_context] =
|
|
6307
|
-
const [edit_selected_index, set_edit_selected_index] =
|
|
6629
|
+
const [suggestion_state, set_suggestion_state] = React27__namespace.useState(null);
|
|
6630
|
+
const [selected_index, set_selected_index] = React27__namespace.useState(0);
|
|
6631
|
+
const [popover_position, set_popover_position] = React27__namespace.useState({ top: 0, left: 0 });
|
|
6632
|
+
const [edit_context, set_edit_context] = React27__namespace.useState(null);
|
|
6633
|
+
const [edit_selected_index, set_edit_selected_index] = React27__namespace.useState(0);
|
|
6308
6634
|
const is_controlled = value !== void 0;
|
|
6309
|
-
const editor_container_ref =
|
|
6310
|
-
const edit_popover_ref =
|
|
6311
|
-
const [mounted, set_mounted] =
|
|
6312
|
-
|
|
6635
|
+
const editor_container_ref = React27__namespace.useRef(null);
|
|
6636
|
+
const edit_popover_ref = React27__namespace.useRef(null);
|
|
6637
|
+
const [mounted, set_mounted] = React27__namespace.useState(false);
|
|
6638
|
+
React27__namespace.useEffect(() => {
|
|
6313
6639
|
set_mounted(true);
|
|
6314
6640
|
}, []);
|
|
6315
6641
|
const calculated_min_height = rows ? `${rows * 1.5}em` : min_height;
|
|
6316
|
-
const suggestion_extensions =
|
|
6642
|
+
const suggestion_extensions = React27__namespace.useMemo(() => {
|
|
6317
6643
|
return create_command_suggestion_extension({
|
|
6318
6644
|
prefixes,
|
|
6319
6645
|
instance_id,
|
|
@@ -6362,7 +6688,7 @@ var HazoUiTextarea = ({
|
|
|
6362
6688
|
}
|
|
6363
6689
|
}
|
|
6364
6690
|
});
|
|
6365
|
-
|
|
6691
|
+
React27__namespace.useEffect(() => {
|
|
6366
6692
|
if (suggestion_state?.is_active && editor) {
|
|
6367
6693
|
requestAnimationFrame(() => {
|
|
6368
6694
|
const { from } = suggestion_state.range;
|
|
@@ -6386,7 +6712,7 @@ var HazoUiTextarea = ({
|
|
|
6386
6712
|
});
|
|
6387
6713
|
}
|
|
6388
6714
|
}, [suggestion_state, editor]);
|
|
6389
|
-
|
|
6715
|
+
React27__namespace.useEffect(() => {
|
|
6390
6716
|
if (is_controlled && editor && !editor.isFocused) {
|
|
6391
6717
|
const current_text = editor.getText();
|
|
6392
6718
|
if (value !== current_text) {
|
|
@@ -6399,12 +6725,12 @@ var HazoUiTextarea = ({
|
|
|
6399
6725
|
}
|
|
6400
6726
|
}
|
|
6401
6727
|
}, [value, editor, is_controlled, prefixes, pill_variant]);
|
|
6402
|
-
|
|
6728
|
+
React27__namespace.useEffect(() => {
|
|
6403
6729
|
if (editor) {
|
|
6404
6730
|
editor.setEditable(!disabled);
|
|
6405
6731
|
}
|
|
6406
6732
|
}, [disabled, editor]);
|
|
6407
|
-
const handle_command_select =
|
|
6733
|
+
const handle_command_select = React27__namespace.useCallback(
|
|
6408
6734
|
(command) => {
|
|
6409
6735
|
if (!editor || !suggestion_state) return;
|
|
6410
6736
|
const prefix_config = prefixes.find((p) => p.char === suggestion_state.prefix);
|
|
@@ -6424,15 +6750,15 @@ var HazoUiTextarea = ({
|
|
|
6424
6750
|
},
|
|
6425
6751
|
[editor, suggestion_state, pill_variant, on_command_insert, prefixes]
|
|
6426
6752
|
);
|
|
6427
|
-
const handle_popover_close =
|
|
6753
|
+
const handle_popover_close = React27__namespace.useCallback(() => {
|
|
6428
6754
|
set_suggestion_state(null);
|
|
6429
6755
|
editor?.commands.focus();
|
|
6430
6756
|
}, [editor]);
|
|
6431
|
-
const handle_edit_close =
|
|
6757
|
+
const handle_edit_close = React27__namespace.useCallback(() => {
|
|
6432
6758
|
set_edit_context(null);
|
|
6433
6759
|
editor?.commands.focus();
|
|
6434
6760
|
}, [editor]);
|
|
6435
|
-
const handle_command_update =
|
|
6761
|
+
const handle_command_update = React27__namespace.useCallback(
|
|
6436
6762
|
(new_command) => {
|
|
6437
6763
|
if (!editor || !edit_context) return;
|
|
6438
6764
|
const old_command = edit_context.command;
|
|
@@ -6448,7 +6774,7 @@ var HazoUiTextarea = ({
|
|
|
6448
6774
|
},
|
|
6449
6775
|
[editor, edit_context, on_command_change]
|
|
6450
6776
|
);
|
|
6451
|
-
const handle_command_remove =
|
|
6777
|
+
const handle_command_remove = React27__namespace.useCallback(() => {
|
|
6452
6778
|
if (!editor || !edit_context) return;
|
|
6453
6779
|
const command = edit_context.command;
|
|
6454
6780
|
editor.state.doc.descendants((node, pos) => {
|
|
@@ -6462,7 +6788,7 @@ var HazoUiTextarea = ({
|
|
|
6462
6788
|
}
|
|
6463
6789
|
set_edit_context(null);
|
|
6464
6790
|
}, [editor, edit_context, on_command_remove]);
|
|
6465
|
-
const filtered_commands =
|
|
6791
|
+
const filtered_commands = React27__namespace.useMemo(() => {
|
|
6466
6792
|
if (!suggestion_state) return [];
|
|
6467
6793
|
const query = suggestion_state.query.toLowerCase();
|
|
6468
6794
|
if (!query) return suggestion_state.commands;
|
|
@@ -6470,7 +6796,7 @@ var HazoUiTextarea = ({
|
|
|
6470
6796
|
(cmd) => cmd.action_label.toLowerCase().includes(query) || cmd.action.toLowerCase().includes(query) || cmd.action_description?.toLowerCase().includes(query)
|
|
6471
6797
|
);
|
|
6472
6798
|
}, [suggestion_state]);
|
|
6473
|
-
|
|
6799
|
+
React27__namespace.useEffect(() => {
|
|
6474
6800
|
if (!suggestion_state?.is_active) return;
|
|
6475
6801
|
const handle_keydown = (e) => {
|
|
6476
6802
|
switch (e.key) {
|
|
@@ -6505,7 +6831,7 @@ var HazoUiTextarea = ({
|
|
|
6505
6831
|
handle_command_select,
|
|
6506
6832
|
handle_popover_close
|
|
6507
6833
|
]);
|
|
6508
|
-
|
|
6834
|
+
React27__namespace.useEffect(() => {
|
|
6509
6835
|
if (!edit_context) return;
|
|
6510
6836
|
const handle_click_outside = (e) => {
|
|
6511
6837
|
if (edit_popover_ref.current && !edit_popover_ref.current.contains(e.target)) {
|
|
@@ -6520,12 +6846,12 @@ var HazoUiTextarea = ({
|
|
|
6520
6846
|
document.removeEventListener("mousedown", handle_click_outside);
|
|
6521
6847
|
};
|
|
6522
6848
|
}, [edit_context]);
|
|
6523
|
-
const edit_commands =
|
|
6849
|
+
const edit_commands = React27__namespace.useMemo(() => {
|
|
6524
6850
|
if (!edit_context) return [];
|
|
6525
6851
|
const prefix_config = prefixes.find((p) => p.char === edit_context.command.prefix);
|
|
6526
6852
|
return prefix_config?.commands || [];
|
|
6527
6853
|
}, [edit_context, prefixes]);
|
|
6528
|
-
|
|
6854
|
+
React27__namespace.useEffect(() => {
|
|
6529
6855
|
if (!edit_context) return;
|
|
6530
6856
|
const handle_keydown = (e) => {
|
|
6531
6857
|
switch (e.key) {
|
|
@@ -6563,7 +6889,7 @@ var HazoUiTextarea = ({
|
|
|
6563
6889
|
handle_command_remove,
|
|
6564
6890
|
handle_edit_close
|
|
6565
6891
|
]);
|
|
6566
|
-
|
|
6892
|
+
React27__namespace.useEffect(() => {
|
|
6567
6893
|
const handle_pill_click = (e) => {
|
|
6568
6894
|
const detail = e.detail;
|
|
6569
6895
|
const { id, prefix, action, action_label, node_pos } = detail;
|
|
@@ -6866,8 +7192,8 @@ function HazoUiDialog({
|
|
|
6866
7192
|
const config = get_hazo_ui_config();
|
|
6867
7193
|
const is_confirm_kind = kind === "confirm";
|
|
6868
7194
|
const is_status_kind = kind === "status";
|
|
6869
|
-
const [internal_confirm_loading, set_internal_confirm_loading] =
|
|
6870
|
-
const cancel_ref =
|
|
7195
|
+
const [internal_confirm_loading, set_internal_confirm_loading] = React27__namespace.useState(false);
|
|
7196
|
+
const cancel_ref = React27__namespace.useRef(null);
|
|
6871
7197
|
const variant_preset = variant !== "default" ? VARIANT_PRESETS[variant] : is_status_kind || is_confirm_kind ? NEUTRAL_VARIANT_PRESET : void 0;
|
|
6872
7198
|
const resolved_action_button_variant = actionButtonVariant ?? variant_preset?.action_button_variant ?? "default";
|
|
6873
7199
|
const showCancelButton = showCancelButtonProp ?? (is_status_kind ? false : true);
|
|
@@ -7252,7 +7578,7 @@ function HazoUiConfirmDialog({
|
|
|
7252
7578
|
}
|
|
7253
7579
|
);
|
|
7254
7580
|
}
|
|
7255
|
-
var Slider =
|
|
7581
|
+
var Slider = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7256
7582
|
SliderPrimitive__namespace.Root,
|
|
7257
7583
|
{
|
|
7258
7584
|
ref,
|
|
@@ -7305,7 +7631,7 @@ async function getCroppedImg(imageSrc, areaPixels, outputSize, quality) {
|
|
|
7305
7631
|
);
|
|
7306
7632
|
});
|
|
7307
7633
|
}
|
|
7308
|
-
var HazoUiImageCropper =
|
|
7634
|
+
var HazoUiImageCropper = React27__namespace.forwardRef(function HazoUiImageCropper2({
|
|
7309
7635
|
imageSrc,
|
|
7310
7636
|
onCropped,
|
|
7311
7637
|
outputSize = 512,
|
|
@@ -7313,19 +7639,19 @@ var HazoUiImageCropper = React26__namespace.forwardRef(function HazoUiImageCropp
|
|
|
7313
7639
|
zoomLabel = "Zoom",
|
|
7314
7640
|
className
|
|
7315
7641
|
}, ref) {
|
|
7316
|
-
const [crop, set_crop] =
|
|
7642
|
+
const [crop, set_crop] = React27__namespace.useState({
|
|
7317
7643
|
x: 0,
|
|
7318
7644
|
y: 0
|
|
7319
7645
|
});
|
|
7320
|
-
const [zoom, set_zoom] =
|
|
7321
|
-
const cropped_area_pixels_ref =
|
|
7322
|
-
const handle_crop_complete =
|
|
7646
|
+
const [zoom, set_zoom] = React27__namespace.useState(1);
|
|
7647
|
+
const cropped_area_pixels_ref = React27__namespace.useRef(null);
|
|
7648
|
+
const handle_crop_complete = React27__namespace.useCallback(
|
|
7323
7649
|
(_croppedArea, croppedAreaPixels) => {
|
|
7324
7650
|
cropped_area_pixels_ref.current = croppedAreaPixels;
|
|
7325
7651
|
},
|
|
7326
7652
|
[]
|
|
7327
7653
|
);
|
|
7328
|
-
|
|
7654
|
+
React27__namespace.useImperativeHandle(
|
|
7329
7655
|
ref,
|
|
7330
7656
|
() => ({
|
|
7331
7657
|
getCroppedBlob: async () => {
|
|
@@ -7405,10 +7731,10 @@ function HazoUiImageCropperDialog({
|
|
|
7405
7731
|
outputSize = 512,
|
|
7406
7732
|
quality = 0.9
|
|
7407
7733
|
}) {
|
|
7408
|
-
const cropper_ref =
|
|
7409
|
-
const [image_src, set_image_src] =
|
|
7410
|
-
const [is_confirming, set_is_confirming] =
|
|
7411
|
-
|
|
7734
|
+
const cropper_ref = React27__namespace.useRef(null);
|
|
7735
|
+
const [image_src, set_image_src] = React27__namespace.useState(null);
|
|
7736
|
+
const [is_confirming, set_is_confirming] = React27__namespace.useState(false);
|
|
7737
|
+
React27__namespace.useEffect(() => {
|
|
7412
7738
|
if (!file) {
|
|
7413
7739
|
set_image_src(null);
|
|
7414
7740
|
return;
|
|
@@ -7464,7 +7790,7 @@ Drawer.displayName = "Drawer";
|
|
|
7464
7790
|
var DrawerTrigger = vaul.Drawer.Trigger;
|
|
7465
7791
|
var DrawerPortal = vaul.Drawer.Portal;
|
|
7466
7792
|
var DrawerClose = vaul.Drawer.Close;
|
|
7467
|
-
var DrawerOverlay =
|
|
7793
|
+
var DrawerOverlay = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7468
7794
|
vaul.Drawer.Overlay,
|
|
7469
7795
|
{
|
|
7470
7796
|
ref,
|
|
@@ -7476,7 +7802,7 @@ var DrawerOverlay = React26__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
7476
7802
|
}
|
|
7477
7803
|
));
|
|
7478
7804
|
DrawerOverlay.displayName = "DrawerOverlay";
|
|
7479
|
-
var DrawerContent =
|
|
7805
|
+
var DrawerContent = React27__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DrawerPortal, { children: [
|
|
7480
7806
|
/* @__PURE__ */ jsxRuntime.jsx(DrawerOverlay, {}),
|
|
7481
7807
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7482
7808
|
vaul.Drawer.Content,
|
|
@@ -7517,7 +7843,7 @@ var DrawerFooter = ({
|
|
|
7517
7843
|
}
|
|
7518
7844
|
);
|
|
7519
7845
|
DrawerFooter.displayName = "DrawerFooter";
|
|
7520
|
-
var DrawerTitle =
|
|
7846
|
+
var DrawerTitle = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7521
7847
|
vaul.Drawer.Title,
|
|
7522
7848
|
{
|
|
7523
7849
|
ref,
|
|
@@ -7529,7 +7855,7 @@ var DrawerTitle = React26__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
7529
7855
|
}
|
|
7530
7856
|
));
|
|
7531
7857
|
DrawerTitle.displayName = "DrawerTitle";
|
|
7532
|
-
var DrawerDescription =
|
|
7858
|
+
var DrawerDescription = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7533
7859
|
vaul.Drawer.Description,
|
|
7534
7860
|
{
|
|
7535
7861
|
ref,
|
|
@@ -7539,14 +7865,14 @@ var DrawerDescription = React26__namespace.forwardRef(({ className, ...props },
|
|
|
7539
7865
|
));
|
|
7540
7866
|
DrawerDescription.displayName = "DrawerDescription";
|
|
7541
7867
|
function useMediaQuery(query) {
|
|
7542
|
-
const get_match =
|
|
7868
|
+
const get_match = React27__namespace.useCallback(() => {
|
|
7543
7869
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
|
|
7544
7870
|
return false;
|
|
7545
7871
|
}
|
|
7546
7872
|
return window.matchMedia(query).matches;
|
|
7547
7873
|
}, [query]);
|
|
7548
|
-
const [matches, set_matches] =
|
|
7549
|
-
|
|
7874
|
+
const [matches, set_matches] = React27__namespace.useState(false);
|
|
7875
|
+
React27__namespace.useEffect(() => {
|
|
7550
7876
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
|
|
7551
7877
|
return;
|
|
7552
7878
|
}
|
|
@@ -7563,7 +7889,7 @@ function useMediaQuery(query) {
|
|
|
7563
7889
|
return matches;
|
|
7564
7890
|
}
|
|
7565
7891
|
var Accordion = AccordionPrimitive__namespace.Root;
|
|
7566
|
-
var AccordionItem =
|
|
7892
|
+
var AccordionItem = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7567
7893
|
AccordionPrimitive__namespace.Item,
|
|
7568
7894
|
{
|
|
7569
7895
|
ref,
|
|
@@ -7572,7 +7898,7 @@ var AccordionItem = React26__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
7572
7898
|
}
|
|
7573
7899
|
));
|
|
7574
7900
|
AccordionItem.displayName = "AccordionItem";
|
|
7575
|
-
var AccordionTrigger =
|
|
7901
|
+
var AccordionTrigger = React27__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7576
7902
|
AccordionPrimitive__namespace.Trigger,
|
|
7577
7903
|
{
|
|
7578
7904
|
ref,
|
|
@@ -7588,7 +7914,7 @@ var AccordionTrigger = React26__namespace.forwardRef(({ className, children, ...
|
|
|
7588
7914
|
}
|
|
7589
7915
|
) }));
|
|
7590
7916
|
AccordionTrigger.displayName = AccordionPrimitive__namespace.Trigger.displayName;
|
|
7591
|
-
var AccordionContent =
|
|
7917
|
+
var AccordionContent = React27__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7592
7918
|
AccordionPrimitive__namespace.Content,
|
|
7593
7919
|
{
|
|
7594
7920
|
ref,
|
|
@@ -7598,7 +7924,7 @@ var AccordionContent = React26__namespace.forwardRef(({ className, children, ...
|
|
|
7598
7924
|
}
|
|
7599
7925
|
));
|
|
7600
7926
|
AccordionContent.displayName = AccordionPrimitive__namespace.Content.displayName;
|
|
7601
|
-
var Checkbox =
|
|
7927
|
+
var Checkbox = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7602
7928
|
CheckboxPrimitive__namespace.Root,
|
|
7603
7929
|
{
|
|
7604
7930
|
ref,
|
|
@@ -7623,7 +7949,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
|
|
|
7623
7949
|
var DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
|
|
7624
7950
|
var DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
|
|
7625
7951
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
|
|
7626
|
-
var DropdownMenuSubTrigger =
|
|
7952
|
+
var DropdownMenuSubTrigger = React27__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7627
7953
|
DropdownMenuPrimitive__namespace.SubTrigger,
|
|
7628
7954
|
{
|
|
7629
7955
|
ref,
|
|
@@ -7640,7 +7966,7 @@ var DropdownMenuSubTrigger = React26__namespace.forwardRef(({ className, inset,
|
|
|
7640
7966
|
}
|
|
7641
7967
|
));
|
|
7642
7968
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
|
|
7643
|
-
var DropdownMenuSubContent =
|
|
7969
|
+
var DropdownMenuSubContent = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7644
7970
|
DropdownMenuPrimitive__namespace.SubContent,
|
|
7645
7971
|
{
|
|
7646
7972
|
ref,
|
|
@@ -7652,7 +7978,7 @@ var DropdownMenuSubContent = React26__namespace.forwardRef(({ className, ...prop
|
|
|
7652
7978
|
}
|
|
7653
7979
|
));
|
|
7654
7980
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
|
|
7655
|
-
var DropdownMenuContent =
|
|
7981
|
+
var DropdownMenuContent = React27__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7656
7982
|
DropdownMenuPrimitive__namespace.Content,
|
|
7657
7983
|
{
|
|
7658
7984
|
ref,
|
|
@@ -7665,7 +7991,7 @@ var DropdownMenuContent = React26__namespace.forwardRef(({ className, sideOffset
|
|
|
7665
7991
|
}
|
|
7666
7992
|
) }));
|
|
7667
7993
|
DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
|
|
7668
|
-
var DropdownMenuItem =
|
|
7994
|
+
var DropdownMenuItem = React27__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7669
7995
|
DropdownMenuPrimitive__namespace.Item,
|
|
7670
7996
|
{
|
|
7671
7997
|
ref,
|
|
@@ -7678,7 +8004,7 @@ var DropdownMenuItem = React26__namespace.forwardRef(({ className, inset, ...pro
|
|
|
7678
8004
|
}
|
|
7679
8005
|
));
|
|
7680
8006
|
DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
|
|
7681
|
-
var DropdownMenuCheckboxItem =
|
|
8007
|
+
var DropdownMenuCheckboxItem = React27__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7682
8008
|
DropdownMenuPrimitive__namespace.CheckboxItem,
|
|
7683
8009
|
{
|
|
7684
8010
|
ref,
|
|
@@ -7695,7 +8021,7 @@ var DropdownMenuCheckboxItem = React26__namespace.forwardRef(({ className, child
|
|
|
7695
8021
|
}
|
|
7696
8022
|
));
|
|
7697
8023
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
|
|
7698
|
-
var DropdownMenuRadioItem =
|
|
8024
|
+
var DropdownMenuRadioItem = React27__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7699
8025
|
DropdownMenuPrimitive__namespace.RadioItem,
|
|
7700
8026
|
{
|
|
7701
8027
|
ref,
|
|
@@ -7711,7 +8037,7 @@ var DropdownMenuRadioItem = React26__namespace.forwardRef(({ className, children
|
|
|
7711
8037
|
}
|
|
7712
8038
|
));
|
|
7713
8039
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
|
|
7714
|
-
var DropdownMenuLabel =
|
|
8040
|
+
var DropdownMenuLabel = React27__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7715
8041
|
DropdownMenuPrimitive__namespace.Label,
|
|
7716
8042
|
{
|
|
7717
8043
|
ref,
|
|
@@ -7724,7 +8050,7 @@ var DropdownMenuLabel = React26__namespace.forwardRef(({ className, inset, ...pr
|
|
|
7724
8050
|
}
|
|
7725
8051
|
));
|
|
7726
8052
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
|
|
7727
|
-
var DropdownMenuSeparator =
|
|
8053
|
+
var DropdownMenuSeparator = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7728
8054
|
DropdownMenuPrimitive__namespace.Separator,
|
|
7729
8055
|
{
|
|
7730
8056
|
ref,
|
|
@@ -7748,7 +8074,7 @@ var DropdownMenuShortcut = ({
|
|
|
7748
8074
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
7749
8075
|
var HoverCard = HoverCardPrimitive__namespace.Root;
|
|
7750
8076
|
var HoverCardTrigger = HoverCardPrimitive__namespace.Trigger;
|
|
7751
|
-
var HoverCardContent =
|
|
8077
|
+
var HoverCardContent = React27__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7752
8078
|
HoverCardPrimitive__namespace.Content,
|
|
7753
8079
|
{
|
|
7754
8080
|
ref,
|
|
@@ -7762,7 +8088,7 @@ var HoverCardContent = React26__namespace.forwardRef(({ className, align = "cent
|
|
|
7762
8088
|
}
|
|
7763
8089
|
));
|
|
7764
8090
|
HoverCardContent.displayName = HoverCardPrimitive__namespace.Content.displayName;
|
|
7765
|
-
var Label3 =
|
|
8091
|
+
var Label3 = React27__namespace.forwardRef(
|
|
7766
8092
|
({ className, ...props }, ref) => {
|
|
7767
8093
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7768
8094
|
"label",
|
|
@@ -7778,7 +8104,7 @@ var Label3 = React26__namespace.forwardRef(
|
|
|
7778
8104
|
}
|
|
7779
8105
|
);
|
|
7780
8106
|
Label3.displayName = "Label";
|
|
7781
|
-
var Switch =
|
|
8107
|
+
var Switch = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7782
8108
|
SwitchPrimitives__namespace.Root,
|
|
7783
8109
|
{
|
|
7784
8110
|
className: cn(
|
|
@@ -7798,7 +8124,7 @@ var Switch = React26__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
7798
8124
|
}
|
|
7799
8125
|
));
|
|
7800
8126
|
Switch.displayName = SwitchPrimitives__namespace.Root.displayName;
|
|
7801
|
-
var Textarea =
|
|
8127
|
+
var Textarea = React27__namespace.forwardRef(
|
|
7802
8128
|
({ className, ...props }, ref) => {
|
|
7803
8129
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7804
8130
|
"textarea",
|
|
@@ -7818,7 +8144,7 @@ var Textarea = React26__namespace.forwardRef(
|
|
|
7818
8144
|
}
|
|
7819
8145
|
);
|
|
7820
8146
|
Textarea.displayName = "Textarea";
|
|
7821
|
-
var Separator3 =
|
|
8147
|
+
var Separator3 = React27__namespace.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7822
8148
|
SeparatorPrimitive__namespace.Root,
|
|
7823
8149
|
{
|
|
7824
8150
|
ref,
|
|
@@ -7836,7 +8162,7 @@ Separator3.displayName = SeparatorPrimitive__namespace.Root.displayName;
|
|
|
7836
8162
|
var Collapsible = CollapsiblePrimitive__namespace.Root;
|
|
7837
8163
|
var CollapsibleTrigger2 = CollapsiblePrimitive__namespace.CollapsibleTrigger;
|
|
7838
8164
|
var CollapsibleContent2 = CollapsiblePrimitive__namespace.CollapsibleContent;
|
|
7839
|
-
var ScrollArea =
|
|
8165
|
+
var ScrollArea = React27__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7840
8166
|
ScrollAreaPrimitive__namespace.Root,
|
|
7841
8167
|
{
|
|
7842
8168
|
ref,
|
|
@@ -7850,7 +8176,7 @@ var ScrollArea = React26__namespace.forwardRef(({ className, children, ...props
|
|
|
7850
8176
|
}
|
|
7851
8177
|
));
|
|
7852
8178
|
ScrollArea.displayName = ScrollAreaPrimitive__namespace.Root.displayName;
|
|
7853
|
-
var ScrollBar =
|
|
8179
|
+
var ScrollBar = React27__namespace.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7854
8180
|
ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
|
|
7855
8181
|
{
|
|
7856
8182
|
ref,
|
|
@@ -7866,27 +8192,27 @@ var ScrollBar = React26__namespace.forwardRef(({ className, orientation = "verti
|
|
|
7866
8192
|
}
|
|
7867
8193
|
));
|
|
7868
8194
|
ScrollBar.displayName = ScrollAreaPrimitive__namespace.ScrollAreaScrollbar.displayName;
|
|
7869
|
-
var Card =
|
|
8195
|
+
var Card = React27__namespace.forwardRef(
|
|
7870
8196
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("rounded-lg border bg-card text-card-foreground shadow-sm", className), ...props })
|
|
7871
8197
|
);
|
|
7872
8198
|
Card.displayName = "Card";
|
|
7873
|
-
var CardHeader =
|
|
8199
|
+
var CardHeader = React27__namespace.forwardRef(
|
|
7874
8200
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
|
|
7875
8201
|
);
|
|
7876
8202
|
CardHeader.displayName = "CardHeader";
|
|
7877
|
-
var CardTitle =
|
|
8203
|
+
var CardTitle = React27__namespace.forwardRef(
|
|
7878
8204
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("h3", { ref, className: cn("text-2xl font-semibold leading-none tracking-tight", className), ...props })
|
|
7879
8205
|
);
|
|
7880
8206
|
CardTitle.displayName = "CardTitle";
|
|
7881
|
-
var CardDescription =
|
|
8207
|
+
var CardDescription = React27__namespace.forwardRef(
|
|
7882
8208
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("p", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
|
|
7883
8209
|
);
|
|
7884
8210
|
CardDescription.displayName = "CardDescription";
|
|
7885
|
-
var CardContent =
|
|
8211
|
+
var CardContent = React27__namespace.forwardRef(
|
|
7886
8212
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("p-6 pt-0", className), ...props })
|
|
7887
8213
|
);
|
|
7888
8214
|
CardContent.displayName = "CardContent";
|
|
7889
|
-
var CardFooter =
|
|
8215
|
+
var CardFooter = React27__namespace.forwardRef(
|
|
7890
8216
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
|
|
7891
8217
|
);
|
|
7892
8218
|
CardFooter.displayName = "CardFooter";
|
|
@@ -7919,16 +8245,16 @@ var toggleVariants = classVarianceAuthority.cva(
|
|
|
7919
8245
|
defaultVariants: { variant: "default", size: "default" }
|
|
7920
8246
|
}
|
|
7921
8247
|
);
|
|
7922
|
-
var Toggle =
|
|
8248
|
+
var Toggle = React27__namespace.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TogglePrimitive__namespace.Root, { ref, className: cn(toggleVariants({ variant, size, className })), ...props }));
|
|
7923
8249
|
Toggle.displayName = TogglePrimitive__namespace.Root.displayName;
|
|
7924
|
-
var ToggleGroupContext =
|
|
8250
|
+
var ToggleGroupContext = React27__namespace.createContext({
|
|
7925
8251
|
size: "default",
|
|
7926
8252
|
variant: "default"
|
|
7927
8253
|
});
|
|
7928
|
-
var ToggleGroup =
|
|
8254
|
+
var ToggleGroup = React27__namespace.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupPrimitive__namespace.Root, { ref, className: cn("flex items-center justify-center gap-1", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupContext.Provider, { value: { variant, size }, children }) }));
|
|
7929
8255
|
ToggleGroup.displayName = ToggleGroupPrimitive__namespace.Root.displayName;
|
|
7930
|
-
var ToggleGroupItem =
|
|
7931
|
-
const context =
|
|
8256
|
+
var ToggleGroupItem = React27__namespace.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
8257
|
+
const context = React27__namespace.useContext(ToggleGroupContext);
|
|
7932
8258
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7933
8259
|
ToggleGroupPrimitive__namespace.Item,
|
|
7934
8260
|
{
|
|
@@ -7943,7 +8269,7 @@ ToggleGroupItem.displayName = ToggleGroupPrimitive__namespace.Item.displayName;
|
|
|
7943
8269
|
var AlertDialog = AlertDialogPrimitive__namespace.Root;
|
|
7944
8270
|
var AlertDialogTrigger = AlertDialogPrimitive__namespace.Trigger;
|
|
7945
8271
|
var AlertDialogPortal = AlertDialogPrimitive__namespace.Portal;
|
|
7946
|
-
var AlertDialogOverlay =
|
|
8272
|
+
var AlertDialogOverlay = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7947
8273
|
AlertDialogPrimitive__namespace.Overlay,
|
|
7948
8274
|
{
|
|
7949
8275
|
ref,
|
|
@@ -7952,7 +8278,7 @@ var AlertDialogOverlay = React26__namespace.forwardRef(({ className, ...props },
|
|
|
7952
8278
|
}
|
|
7953
8279
|
));
|
|
7954
8280
|
AlertDialogOverlay.displayName = AlertDialogPrimitive__namespace.Overlay.displayName;
|
|
7955
|
-
var AlertDialogContent =
|
|
8281
|
+
var AlertDialogContent = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogPortal, { children: [
|
|
7956
8282
|
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogOverlay, {}),
|
|
7957
8283
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7958
8284
|
AlertDialogPrimitive__namespace.Content,
|
|
@@ -7968,13 +8294,13 @@ var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.
|
|
|
7968
8294
|
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
7969
8295
|
var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
|
|
7970
8296
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
7971
|
-
var AlertDialogTitle =
|
|
8297
|
+
var AlertDialogTitle = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Title, { ref, className: cn("text-lg font-semibold", className), ...props }));
|
|
7972
8298
|
AlertDialogTitle.displayName = AlertDialogPrimitive__namespace.Title.displayName;
|
|
7973
|
-
var AlertDialogDescription =
|
|
8299
|
+
var AlertDialogDescription = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
7974
8300
|
AlertDialogDescription.displayName = AlertDialogPrimitive__namespace.Description.displayName;
|
|
7975
|
-
var AlertDialogAction =
|
|
8301
|
+
var AlertDialogAction = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Action, { ref, className: cn(buttonVariants(), className), ...props }));
|
|
7976
8302
|
AlertDialogAction.displayName = AlertDialogPrimitive__namespace.Action.displayName;
|
|
7977
|
-
var AlertDialogCancel =
|
|
8303
|
+
var AlertDialogCancel = React27__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Cancel, { ref, className: cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className), ...props }));
|
|
7978
8304
|
AlertDialogCancel.displayName = AlertDialogPrimitive__namespace.Cancel.displayName;
|
|
7979
8305
|
var buttonGroupVariants = classVarianceAuthority.cva(
|
|
7980
8306
|
"flex w-fit items-stretch [&>*]:focus-visible:relative [&>*]:focus-visible:z-10",
|
|
@@ -8002,7 +8328,7 @@ function ButtonGroupText({ className, asChild = false, ...props }) {
|
|
|
8002
8328
|
function ButtonGroupSeparator({ className, orientation = "vertical", ...props }) {
|
|
8003
8329
|
return /* @__PURE__ */ jsxRuntime.jsx(Separator3, { orientation, className: cn("bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto", className), ...props });
|
|
8004
8330
|
}
|
|
8005
|
-
var InputAffix =
|
|
8331
|
+
var InputAffix = React27__namespace.forwardRef(
|
|
8006
8332
|
({ className, containerClassName, prefix, suffix, type = "text", ...props }, ref) => {
|
|
8007
8333
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8008
8334
|
"div",
|
|
@@ -8034,7 +8360,7 @@ var InputAffix = React26__namespace.forwardRef(
|
|
|
8034
8360
|
}
|
|
8035
8361
|
);
|
|
8036
8362
|
InputAffix.displayName = "InputAffix";
|
|
8037
|
-
var SkeletonBase =
|
|
8363
|
+
var SkeletonBase = React27__namespace.forwardRef(
|
|
8038
8364
|
({ className, ...rest }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8039
8365
|
"div",
|
|
8040
8366
|
{
|
|
@@ -8210,8 +8536,8 @@ function LoadingTimeout({
|
|
|
8210
8536
|
firm: thresholds?.firm ?? 15e3,
|
|
8211
8537
|
expired: thresholds?.expired ?? 3e4
|
|
8212
8538
|
};
|
|
8213
|
-
const [phase, setPhase] =
|
|
8214
|
-
|
|
8539
|
+
const [phase, setPhase] = React27__namespace.useState(active ? "silent" : "idle");
|
|
8540
|
+
React27__namespace.useEffect(() => {
|
|
8215
8541
|
if (!active) {
|
|
8216
8542
|
setPhase("idle");
|
|
8217
8543
|
return;
|
|
@@ -8270,7 +8596,7 @@ function ProgressiveImage({
|
|
|
8270
8596
|
onLoad,
|
|
8271
8597
|
onError
|
|
8272
8598
|
}) {
|
|
8273
|
-
const [loaded, setLoaded] =
|
|
8599
|
+
const [loaded, setLoaded] = React27__namespace.useState(false);
|
|
8274
8600
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8275
8601
|
"div",
|
|
8276
8602
|
{
|
|
@@ -8423,7 +8749,7 @@ function NotificationPanel({
|
|
|
8423
8749
|
loading = false,
|
|
8424
8750
|
className
|
|
8425
8751
|
}) {
|
|
8426
|
-
const hasChildren =
|
|
8752
|
+
const hasChildren = React27__namespace.Children.count(children) > 0 && children !== null && children !== void 0;
|
|
8427
8753
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8428
8754
|
"div",
|
|
8429
8755
|
{
|
|
@@ -8494,8 +8820,8 @@ function errorToast({ title, description, duration = 5e3, action }) {
|
|
|
8494
8820
|
});
|
|
8495
8821
|
}
|
|
8496
8822
|
function useLoadingState(initial = false) {
|
|
8497
|
-
const [isLoading, setLoading] =
|
|
8498
|
-
const withLoading =
|
|
8823
|
+
const [isLoading, setLoading] = React27.useState(initial);
|
|
8824
|
+
const withLoading = React27.useCallback(async (fn) => {
|
|
8499
8825
|
setLoading(true);
|
|
8500
8826
|
try {
|
|
8501
8827
|
return await fn();
|
|
@@ -8506,8 +8832,8 @@ function useLoadingState(initial = false) {
|
|
|
8506
8832
|
return { isLoading, setLoading, withLoading };
|
|
8507
8833
|
}
|
|
8508
8834
|
function useErrorDisplay() {
|
|
8509
|
-
const [error, setRaw] =
|
|
8510
|
-
const setError =
|
|
8835
|
+
const [error, setRaw] = React27.useState(null);
|
|
8836
|
+
const setError = React27.useCallback((value) => {
|
|
8511
8837
|
if (value == null) {
|
|
8512
8838
|
setRaw(null);
|
|
8513
8839
|
return;
|
|
@@ -8522,12 +8848,12 @@ function useErrorDisplay() {
|
|
|
8522
8848
|
}
|
|
8523
8849
|
setRaw(String(value));
|
|
8524
8850
|
}, []);
|
|
8525
|
-
const clearError =
|
|
8851
|
+
const clearError = React27.useCallback(() => setRaw(null), []);
|
|
8526
8852
|
return { error, setError, clearError };
|
|
8527
8853
|
}
|
|
8528
8854
|
function useDebounce(value, delayMs) {
|
|
8529
|
-
const [debounced_value, set_debounced_value] =
|
|
8530
|
-
|
|
8855
|
+
const [debounced_value, set_debounced_value] = React27.useState(value);
|
|
8856
|
+
React27.useEffect(() => {
|
|
8531
8857
|
const timer = setTimeout(() => {
|
|
8532
8858
|
set_debounced_value(value);
|
|
8533
8859
|
}, delayMs);
|
|
@@ -8536,8 +8862,8 @@ function useDebounce(value, delayMs) {
|
|
|
8536
8862
|
return debounced_value;
|
|
8537
8863
|
}
|
|
8538
8864
|
function useCopyToClipboard() {
|
|
8539
|
-
const [copied, set_copied] =
|
|
8540
|
-
const copy =
|
|
8865
|
+
const [copied, set_copied] = React27.useState(false);
|
|
8866
|
+
const copy = React27.useCallback(async (text) => {
|
|
8541
8867
|
if (typeof navigator === "undefined" || !navigator.clipboard) {
|
|
8542
8868
|
return;
|
|
8543
8869
|
}
|
|
@@ -8569,8 +8895,8 @@ function useLocalStorage(key, initialValue) {
|
|
|
8569
8895
|
return initialValue;
|
|
8570
8896
|
}
|
|
8571
8897
|
};
|
|
8572
|
-
const [stored_value, set_stored_value] =
|
|
8573
|
-
const set_value =
|
|
8898
|
+
const [stored_value, set_stored_value] = React27.useState(read_stored);
|
|
8899
|
+
const set_value = React27.useCallback(
|
|
8574
8900
|
(value) => {
|
|
8575
8901
|
set_stored_value((prev) => {
|
|
8576
8902
|
const next = typeof value === "function" ? value(prev) : value;
|
|
@@ -8597,8 +8923,8 @@ function useSessionStorage(key, initialValue) {
|
|
|
8597
8923
|
return initialValue;
|
|
8598
8924
|
}
|
|
8599
8925
|
};
|
|
8600
|
-
const [stored_value, set_stored_value] =
|
|
8601
|
-
const set_value =
|
|
8926
|
+
const [stored_value, set_stored_value] = React27.useState(read_stored);
|
|
8927
|
+
const set_value = React27.useCallback(
|
|
8602
8928
|
(value) => {
|
|
8603
8929
|
set_stored_value((prev) => {
|
|
8604
8930
|
const next = typeof value === "function" ? value(prev) : value;
|
|
@@ -8616,7 +8942,7 @@ function useSessionStorage(key, initialValue) {
|
|
|
8616
8942
|
return [stored_value, set_value];
|
|
8617
8943
|
}
|
|
8618
8944
|
function useClickOutside(ref, handler) {
|
|
8619
|
-
|
|
8945
|
+
React27.useEffect(() => {
|
|
8620
8946
|
if (typeof document === "undefined") return;
|
|
8621
8947
|
const handle_event = (event) => {
|
|
8622
8948
|
const target = event.target;
|
|
@@ -8635,9 +8961,9 @@ function useClickOutside(ref, handler) {
|
|
|
8635
8961
|
}
|
|
8636
8962
|
function useWakeLock() {
|
|
8637
8963
|
const supported = typeof navigator !== "undefined" && "wakeLock" in navigator;
|
|
8638
|
-
const sentinel_ref =
|
|
8639
|
-
const [acquired, set_acquired] =
|
|
8640
|
-
const request =
|
|
8964
|
+
const sentinel_ref = React27.useRef(null);
|
|
8965
|
+
const [acquired, set_acquired] = React27.useState(false);
|
|
8966
|
+
const request = React27.useCallback(async () => {
|
|
8641
8967
|
if (!supported || sentinel_ref.current) return;
|
|
8642
8968
|
try {
|
|
8643
8969
|
const sentinel = await navigator.wakeLock.request("screen");
|
|
@@ -8650,7 +8976,7 @@ function useWakeLock() {
|
|
|
8650
8976
|
} catch {
|
|
8651
8977
|
}
|
|
8652
8978
|
}, [supported]);
|
|
8653
|
-
const release =
|
|
8979
|
+
const release = React27.useCallback(async () => {
|
|
8654
8980
|
if (!sentinel_ref.current) return;
|
|
8655
8981
|
try {
|
|
8656
8982
|
await sentinel_ref.current.release();
|
|
@@ -8660,7 +8986,7 @@ function useWakeLock() {
|
|
|
8660
8986
|
set_acquired(false);
|
|
8661
8987
|
}
|
|
8662
8988
|
}, []);
|
|
8663
|
-
|
|
8989
|
+
React27.useEffect(() => {
|
|
8664
8990
|
if (typeof document === "undefined") return;
|
|
8665
8991
|
const handle_visibility = () => {
|
|
8666
8992
|
if (document.visibilityState === "visible" && acquired && !sentinel_ref.current) {
|
|
@@ -8670,7 +8996,7 @@ function useWakeLock() {
|
|
|
8670
8996
|
document.addEventListener("visibilitychange", handle_visibility);
|
|
8671
8997
|
return () => document.removeEventListener("visibilitychange", handle_visibility);
|
|
8672
8998
|
}, [acquired, request]);
|
|
8673
|
-
|
|
8999
|
+
React27.useEffect(() => {
|
|
8674
9000
|
return () => {
|
|
8675
9001
|
if (sentinel_ref.current) {
|
|
8676
9002
|
void sentinel_ref.current.release().catch(() => void 0);
|
|
@@ -8681,8 +9007,8 @@ function useWakeLock() {
|
|
|
8681
9007
|
return { supported, acquired, request, release };
|
|
8682
9008
|
}
|
|
8683
9009
|
function useFullscreen(elementRef) {
|
|
8684
|
-
const [is_fullscreen, set_is_fullscreen] =
|
|
8685
|
-
|
|
9010
|
+
const [is_fullscreen, set_is_fullscreen] = React27.useState(false);
|
|
9011
|
+
React27.useEffect(() => {
|
|
8686
9012
|
if (typeof document === "undefined") return;
|
|
8687
9013
|
const handle_change = () => {
|
|
8688
9014
|
set_is_fullscreen(!!document.fullscreenElement);
|
|
@@ -8691,10 +9017,10 @@ function useFullscreen(elementRef) {
|
|
|
8691
9017
|
set_is_fullscreen(!!document.fullscreenElement);
|
|
8692
9018
|
return () => document.removeEventListener("fullscreenchange", handle_change);
|
|
8693
9019
|
}, []);
|
|
8694
|
-
const get_target =
|
|
9020
|
+
const get_target = React27.useCallback(() => {
|
|
8695
9021
|
return elementRef?.current ?? document.documentElement;
|
|
8696
9022
|
}, [elementRef]);
|
|
8697
|
-
const enter =
|
|
9023
|
+
const enter = React27.useCallback(async () => {
|
|
8698
9024
|
if (typeof document === "undefined" || !document.documentElement.requestFullscreen) return;
|
|
8699
9025
|
if (document.fullscreenElement) return;
|
|
8700
9026
|
try {
|
|
@@ -8702,7 +9028,7 @@ function useFullscreen(elementRef) {
|
|
|
8702
9028
|
} catch {
|
|
8703
9029
|
}
|
|
8704
9030
|
}, [get_target]);
|
|
8705
|
-
const exit =
|
|
9031
|
+
const exit = React27.useCallback(async () => {
|
|
8706
9032
|
if (typeof document === "undefined") return;
|
|
8707
9033
|
if (!document.fullscreenElement) return;
|
|
8708
9034
|
try {
|
|
@@ -8710,7 +9036,7 @@ function useFullscreen(elementRef) {
|
|
|
8710
9036
|
} catch {
|
|
8711
9037
|
}
|
|
8712
9038
|
}, []);
|
|
8713
|
-
const toggle =
|
|
9039
|
+
const toggle = React27.useCallback(async () => {
|
|
8714
9040
|
if (document.fullscreenElement) {
|
|
8715
9041
|
await exit();
|
|
8716
9042
|
} else {
|
|
@@ -8721,13 +9047,13 @@ function useFullscreen(elementRef) {
|
|
|
8721
9047
|
}
|
|
8722
9048
|
function use_wake_lock(active) {
|
|
8723
9049
|
const { acquired, request, release } = useWakeLock();
|
|
8724
|
-
|
|
9050
|
+
React27.useEffect(() => {
|
|
8725
9051
|
if (active && !acquired) void request();
|
|
8726
9052
|
if (!active && acquired) void release();
|
|
8727
9053
|
}, [active, acquired, request, release]);
|
|
8728
9054
|
}
|
|
8729
9055
|
function use_fullscreen() {
|
|
8730
|
-
const ref =
|
|
9056
|
+
const ref = React27.useRef(null);
|
|
8731
9057
|
const { isFullscreen, toggle } = useFullscreen(ref);
|
|
8732
9058
|
return { is_fullscreen: isFullscreen, toggle, ref };
|
|
8733
9059
|
}
|
|
@@ -8774,6 +9100,9 @@ function KanbanCard({
|
|
|
8774
9100
|
tabIndex: 0,
|
|
8775
9101
|
"aria-roledescription": "draggable card",
|
|
8776
9102
|
"aria-grabbed": isDragging,
|
|
9103
|
+
onDoubleClick: () => {
|
|
9104
|
+
if (showEdit && onEditRequest && !dragging) onEditRequest(item);
|
|
9105
|
+
},
|
|
8777
9106
|
children: [
|
|
8778
9107
|
showEdit && onEditRequest && !dragging && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8779
9108
|
"button",
|
|
@@ -8880,29 +9209,29 @@ function KanbanEditor({
|
|
|
8880
9209
|
onSave,
|
|
8881
9210
|
onClose
|
|
8882
9211
|
}) {
|
|
8883
|
-
const [draft, set_draft] =
|
|
8884
|
-
const [saving, set_saving] =
|
|
8885
|
-
const [error, set_error] =
|
|
9212
|
+
const [draft, set_draft] = React27__namespace.useState(item);
|
|
9213
|
+
const [saving, set_saving] = React27__namespace.useState(false);
|
|
9214
|
+
const [error, set_error] = React27__namespace.useState(null);
|
|
8886
9215
|
const item_id = item?.id ?? null;
|
|
8887
|
-
|
|
9216
|
+
React27__namespace.useEffect(() => {
|
|
8888
9217
|
set_draft(item);
|
|
8889
9218
|
set_error(null);
|
|
8890
9219
|
set_saving(false);
|
|
8891
9220
|
}, [item_id]);
|
|
8892
9221
|
const resolved_columns = columns ?? [];
|
|
8893
9222
|
const resolved_priorities = priorities ?? DEFAULT_PRIORITIES;
|
|
8894
|
-
const resolved_fields =
|
|
9223
|
+
const resolved_fields = React27__namespace.useMemo(() => {
|
|
8895
9224
|
if (fields) return fields;
|
|
8896
9225
|
if (!item) return [];
|
|
8897
9226
|
return auto_detect_fields(item, resolved_columns);
|
|
8898
9227
|
}, [fields, item, resolved_columns]);
|
|
8899
|
-
const required_keys =
|
|
9228
|
+
const required_keys = React27__namespace.useMemo(
|
|
8900
9229
|
() => resolved_fields.filter(
|
|
8901
9230
|
(f) => f.required && (f.type === "text" || f.type === "textarea" || f.type === "number")
|
|
8902
9231
|
).map((f) => f.key),
|
|
8903
9232
|
[resolved_fields]
|
|
8904
9233
|
);
|
|
8905
|
-
const all_required_filled =
|
|
9234
|
+
const all_required_filled = React27__namespace.useMemo(() => {
|
|
8906
9235
|
if (!draft) return false;
|
|
8907
9236
|
for (const key of required_keys) {
|
|
8908
9237
|
const v = draft[key];
|
|
@@ -8911,7 +9240,7 @@ function KanbanEditor({
|
|
|
8911
9240
|
}
|
|
8912
9241
|
return true;
|
|
8913
9242
|
}, [draft, required_keys]);
|
|
8914
|
-
const is_dirty =
|
|
9243
|
+
const is_dirty = React27__namespace.useMemo(() => {
|
|
8915
9244
|
if (!draft || !item) return false;
|
|
8916
9245
|
try {
|
|
8917
9246
|
return JSON.stringify(draft) !== JSON.stringify(item);
|
|
@@ -8919,7 +9248,7 @@ function KanbanEditor({
|
|
|
8919
9248
|
return draft !== item;
|
|
8920
9249
|
}
|
|
8921
9250
|
}, [draft, item]);
|
|
8922
|
-
const handle_save =
|
|
9251
|
+
const handle_save = React27__namespace.useCallback(async () => {
|
|
8923
9252
|
if (!draft || !item) return;
|
|
8924
9253
|
if (saving) return;
|
|
8925
9254
|
set_error(null);
|
|
@@ -9044,6 +9373,15 @@ function KanbanEditorFieldRow({
|
|
|
9044
9373
|
onChange: (e) => set_value(e.target.value)
|
|
9045
9374
|
}
|
|
9046
9375
|
),
|
|
9376
|
+
field.type === "richtext" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9377
|
+
HazoUiRte,
|
|
9378
|
+
{
|
|
9379
|
+
html: typeof value === "string" ? value : "",
|
|
9380
|
+
min_height: "180px",
|
|
9381
|
+
placeholder: field.placeholder,
|
|
9382
|
+
on_change: (out) => set_value(out.html)
|
|
9383
|
+
}
|
|
9384
|
+
),
|
|
9047
9385
|
field.type === "textarea" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9048
9386
|
Textarea,
|
|
9049
9387
|
{
|
|
@@ -9138,11 +9476,11 @@ function HazoUiKanbanFilter({
|
|
|
9138
9476
|
className
|
|
9139
9477
|
}) {
|
|
9140
9478
|
const is_controlled = value !== void 0;
|
|
9141
|
-
const [internal, set_internal] =
|
|
9479
|
+
const [internal, set_internal] = React27__namespace.useState(
|
|
9142
9480
|
defaultValue ?? EMPTY_FILTER
|
|
9143
9481
|
);
|
|
9144
9482
|
const current = is_controlled ? value : internal;
|
|
9145
|
-
const update =
|
|
9483
|
+
const update = React27__namespace.useCallback(
|
|
9146
9484
|
(next) => {
|
|
9147
9485
|
if (!is_controlled) set_internal(next);
|
|
9148
9486
|
onChange?.(next);
|
|
@@ -9305,29 +9643,29 @@ function HazoUiKanban({
|
|
|
9305
9643
|
onCardSave,
|
|
9306
9644
|
disableEdit = false
|
|
9307
9645
|
}) {
|
|
9308
|
-
const label_fn =
|
|
9646
|
+
const label_fn = React27__namespace.useCallback(
|
|
9309
9647
|
(item) => itemLabel ? itemLabel(item) : item.id,
|
|
9310
9648
|
[itemLabel]
|
|
9311
9649
|
);
|
|
9312
|
-
const dnd_context_id =
|
|
9313
|
-
const [overlay, set_overlay] =
|
|
9650
|
+
const dnd_context_id = React27__namespace.useId();
|
|
9651
|
+
const [overlay, set_overlay] = React27__namespace.useState(
|
|
9314
9652
|
/* @__PURE__ */ new Map()
|
|
9315
9653
|
);
|
|
9316
|
-
const [active_id, set_active_id] =
|
|
9317
|
-
const [active_tab, set_active_tab] =
|
|
9318
|
-
const [editing_item, set_editing_item] =
|
|
9654
|
+
const [active_id, set_active_id] = React27__namespace.useState(null);
|
|
9655
|
+
const [active_tab, set_active_tab] = React27__namespace.useState(columns[0]?.key ?? "");
|
|
9656
|
+
const [editing_item, set_editing_item] = React27__namespace.useState(null);
|
|
9319
9657
|
const show_edit = !disableEdit && typeof onCardSave === "function";
|
|
9320
|
-
const handle_edit_request =
|
|
9658
|
+
const handle_edit_request = React27__namespace.useCallback(
|
|
9321
9659
|
(it) => {
|
|
9322
9660
|
const typed = items.find((x) => x.id === it.id);
|
|
9323
9661
|
if (typed) set_editing_item(typed);
|
|
9324
9662
|
},
|
|
9325
9663
|
[items]
|
|
9326
9664
|
);
|
|
9327
|
-
const handle_editor_close =
|
|
9665
|
+
const handle_editor_close = React27__namespace.useCallback(() => {
|
|
9328
9666
|
set_editing_item(null);
|
|
9329
9667
|
}, []);
|
|
9330
|
-
|
|
9668
|
+
React27__namespace.useEffect(() => {
|
|
9331
9669
|
if (overlay.size === 0) return;
|
|
9332
9670
|
set_overlay((prev) => {
|
|
9333
9671
|
let changed = false;
|
|
@@ -9342,11 +9680,11 @@ function HazoUiKanban({
|
|
|
9342
9680
|
return changed ? next : prev;
|
|
9343
9681
|
});
|
|
9344
9682
|
}, [items, overlay]);
|
|
9345
|
-
const grouped =
|
|
9683
|
+
const grouped = React27__namespace.useMemo(
|
|
9346
9684
|
() => group_items_by_column(items, overlay, columns),
|
|
9347
9685
|
[items, overlay, columns]
|
|
9348
9686
|
);
|
|
9349
|
-
const find_item =
|
|
9687
|
+
const find_item = React27__namespace.useCallback(
|
|
9350
9688
|
(id) => items.find((i) => i.id === id),
|
|
9351
9689
|
[items]
|
|
9352
9690
|
);
|
|
@@ -9354,7 +9692,7 @@ function HazoUiKanban({
|
|
|
9354
9692
|
core$1.useSensor(core$1.PointerSensor, { activationConstraint: { distance: 5 } }),
|
|
9355
9693
|
core$1.useSensor(core$1.KeyboardSensor, { coordinateGetter: sortable.sortableKeyboardCoordinates })
|
|
9356
9694
|
);
|
|
9357
|
-
const merged_announcements =
|
|
9695
|
+
const merged_announcements = React27__namespace.useMemo(() => {
|
|
9358
9696
|
const defaults = default_announcements(label_fn);
|
|
9359
9697
|
return {
|
|
9360
9698
|
onDragStart: announcements?.onDragStart ?? defaults.onDragStart,
|
|
@@ -9363,7 +9701,7 @@ function HazoUiKanban({
|
|
|
9363
9701
|
onDragCancel: announcements?.onDragCancel ?? defaults.onDragCancel
|
|
9364
9702
|
};
|
|
9365
9703
|
}, [announcements, label_fn]);
|
|
9366
|
-
const dnd_announcements =
|
|
9704
|
+
const dnd_announcements = React27__namespace.useMemo(
|
|
9367
9705
|
() => ({
|
|
9368
9706
|
onDragStart({ active }) {
|
|
9369
9707
|
const id = String(active.id);
|
|
@@ -9421,10 +9759,10 @@ function HazoUiKanban({
|
|
|
9421
9759
|
}),
|
|
9422
9760
|
[find_item, columns, grouped, merged_announcements]
|
|
9423
9761
|
);
|
|
9424
|
-
const handle_drag_start =
|
|
9762
|
+
const handle_drag_start = React27__namespace.useCallback((event) => {
|
|
9425
9763
|
set_active_id(String(event.active.id));
|
|
9426
9764
|
}, []);
|
|
9427
|
-
const make_revert_handle =
|
|
9765
|
+
const make_revert_handle = React27__namespace.useCallback(
|
|
9428
9766
|
(item_id) => ({
|
|
9429
9767
|
revert: () => {
|
|
9430
9768
|
set_overlay((prev) => {
|
|
@@ -9437,7 +9775,7 @@ function HazoUiKanban({
|
|
|
9437
9775
|
}),
|
|
9438
9776
|
[]
|
|
9439
9777
|
);
|
|
9440
|
-
const handle_drag_end =
|
|
9778
|
+
const handle_drag_end = React27__namespace.useCallback(
|
|
9441
9779
|
(event) => {
|
|
9442
9780
|
const active_id_str = String(event.active.id);
|
|
9443
9781
|
set_active_id(null);
|
|
@@ -9499,7 +9837,7 @@ function HazoUiKanban({
|
|
|
9499
9837
|
},
|
|
9500
9838
|
[find_item, columns, grouped, onMove, onReorder, make_revert_handle]
|
|
9501
9839
|
);
|
|
9502
|
-
const handle_drag_cancel =
|
|
9840
|
+
const handle_drag_cancel = React27__namespace.useCallback(() => {
|
|
9503
9841
|
set_active_id(null);
|
|
9504
9842
|
}, []);
|
|
9505
9843
|
const active_item = active_id ? find_item(active_id) : null;
|
|
@@ -9590,7 +9928,7 @@ function HazoUiKanban({
|
|
|
9590
9928
|
}
|
|
9591
9929
|
);
|
|
9592
9930
|
}
|
|
9593
|
-
var Table2 =
|
|
9931
|
+
var Table2 = React27__namespace.forwardRef(
|
|
9594
9932
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cls_table_wrap relative w-full overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9595
9933
|
"table",
|
|
9596
9934
|
{
|
|
@@ -9601,11 +9939,11 @@ var Table2 = React26__namespace.forwardRef(
|
|
|
9601
9939
|
) })
|
|
9602
9940
|
);
|
|
9603
9941
|
Table2.displayName = "Table";
|
|
9604
|
-
var TableHeader2 =
|
|
9942
|
+
var TableHeader2 = React27__namespace.forwardRef(
|
|
9605
9943
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props })
|
|
9606
9944
|
);
|
|
9607
9945
|
TableHeader2.displayName = "TableHeader";
|
|
9608
|
-
var TableBody =
|
|
9946
|
+
var TableBody = React27__namespace.forwardRef(
|
|
9609
9947
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
9610
9948
|
"tbody",
|
|
9611
9949
|
{
|
|
@@ -9616,7 +9954,7 @@ var TableBody = React26__namespace.forwardRef(
|
|
|
9616
9954
|
)
|
|
9617
9955
|
);
|
|
9618
9956
|
TableBody.displayName = "TableBody";
|
|
9619
|
-
var TableFooter =
|
|
9957
|
+
var TableFooter = React27__namespace.forwardRef(
|
|
9620
9958
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
9621
9959
|
"tfoot",
|
|
9622
9960
|
{
|
|
@@ -9627,7 +9965,7 @@ var TableFooter = React26__namespace.forwardRef(
|
|
|
9627
9965
|
)
|
|
9628
9966
|
);
|
|
9629
9967
|
TableFooter.displayName = "TableFooter";
|
|
9630
|
-
var TableRow2 =
|
|
9968
|
+
var TableRow2 = React27__namespace.forwardRef(
|
|
9631
9969
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
9632
9970
|
"tr",
|
|
9633
9971
|
{
|
|
@@ -9641,7 +9979,7 @@ var TableRow2 = React26__namespace.forwardRef(
|
|
|
9641
9979
|
)
|
|
9642
9980
|
);
|
|
9643
9981
|
TableRow2.displayName = "TableRow";
|
|
9644
|
-
var TableHead =
|
|
9982
|
+
var TableHead = React27__namespace.forwardRef(
|
|
9645
9983
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
9646
9984
|
"th",
|
|
9647
9985
|
{
|
|
@@ -9655,7 +9993,7 @@ var TableHead = React26__namespace.forwardRef(
|
|
|
9655
9993
|
)
|
|
9656
9994
|
);
|
|
9657
9995
|
TableHead.displayName = "TableHead";
|
|
9658
|
-
var TableCell2 =
|
|
9996
|
+
var TableCell2 = React27__namespace.forwardRef(
|
|
9659
9997
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
9660
9998
|
"td",
|
|
9661
9999
|
{
|
|
@@ -9666,7 +10004,7 @@ var TableCell2 = React26__namespace.forwardRef(
|
|
|
9666
10004
|
)
|
|
9667
10005
|
);
|
|
9668
10006
|
TableCell2.displayName = "TableCell";
|
|
9669
|
-
var TableCaption =
|
|
10007
|
+
var TableCaption = React27__namespace.forwardRef(
|
|
9670
10008
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
9671
10009
|
"caption",
|
|
9672
10010
|
{
|
|
@@ -9721,64 +10059,64 @@ function TableMobileCards(props) {
|
|
|
9721
10059
|
}
|
|
9722
10060
|
var DEFAULT_DEBOUNCE_MS = 200;
|
|
9723
10061
|
function useTableState(props) {
|
|
9724
|
-
const [sortInternal, setSortInternal] =
|
|
10062
|
+
const [sortInternal, setSortInternal] = React27.useState(
|
|
9725
10063
|
() => normalizeSortProp(props.defaultSort)
|
|
9726
10064
|
);
|
|
9727
10065
|
const isSortControlled = props.sort !== void 0;
|
|
9728
10066
|
const sort = isSortControlled ? normalizeSortProp(props.sort) : sortInternal;
|
|
9729
|
-
const setSort =
|
|
10067
|
+
const setSort = React27.useCallback(
|
|
9730
10068
|
(next) => {
|
|
9731
10069
|
if (!isSortControlled) setSortInternal(next);
|
|
9732
10070
|
props.onSortChange?.(next);
|
|
9733
10071
|
},
|
|
9734
10072
|
[isSortControlled, props.onSortChange]
|
|
9735
10073
|
);
|
|
9736
|
-
const cycleHeaderSort =
|
|
10074
|
+
const cycleHeaderSort = React27.useCallback(
|
|
9737
10075
|
(key, append) => {
|
|
9738
10076
|
const next = append ? cycleAppendColumn(sort, key) : cycleSingleColumn(sort, key);
|
|
9739
10077
|
setSort(next);
|
|
9740
10078
|
},
|
|
9741
10079
|
[sort, setSort]
|
|
9742
10080
|
);
|
|
9743
|
-
const [filterInternal, setFilterInternal] =
|
|
10081
|
+
const [filterInternal, setFilterInternal] = React27.useState(
|
|
9744
10082
|
() => props.defaultFilter ?? {}
|
|
9745
10083
|
);
|
|
9746
10084
|
const isFilterControlled = props.filter !== void 0;
|
|
9747
10085
|
const filter = isFilterControlled ? props.filter : filterInternal;
|
|
9748
|
-
const setFilter =
|
|
10086
|
+
const setFilter = React27.useCallback(
|
|
9749
10087
|
(next) => {
|
|
9750
10088
|
if (!isFilterControlled) setFilterInternal(next);
|
|
9751
10089
|
props.onFilterChange?.(next);
|
|
9752
10090
|
},
|
|
9753
10091
|
[isFilterControlled, props.onFilterChange]
|
|
9754
10092
|
);
|
|
9755
|
-
const [searchDraft, setSearchDraft] =
|
|
10093
|
+
const [searchDraft, setSearchDraft] = React27.useState(
|
|
9756
10094
|
filter.search ?? ""
|
|
9757
10095
|
);
|
|
9758
10096
|
const debounceMs = props.searchDebounceMs ?? DEFAULT_DEBOUNCE_MS;
|
|
9759
|
-
|
|
10097
|
+
React27.useEffect(() => {
|
|
9760
10098
|
const handle = setTimeout(() => {
|
|
9761
10099
|
if (searchDraft === (filter.search ?? "")) return;
|
|
9762
10100
|
setFilter({ ...filter, search: searchDraft || void 0 });
|
|
9763
10101
|
}, debounceMs);
|
|
9764
10102
|
return () => clearTimeout(handle);
|
|
9765
10103
|
}, [searchDraft, debounceMs]);
|
|
9766
|
-
const setSearch =
|
|
9767
|
-
const [pageInternal, setPageInternal] =
|
|
10104
|
+
const setSearch = React27.useCallback((s) => setSearchDraft(s), []);
|
|
10105
|
+
const [pageInternal, setPageInternal] = React27.useState(
|
|
9768
10106
|
() => props.defaultPage ?? 0
|
|
9769
10107
|
);
|
|
9770
10108
|
const isPageControlled = props.page !== void 0;
|
|
9771
10109
|
const page = isPageControlled ? props.page : pageInternal;
|
|
9772
|
-
const setPage =
|
|
10110
|
+
const setPage = React27.useCallback(
|
|
9773
10111
|
(next) => {
|
|
9774
10112
|
if (!isPageControlled) setPageInternal(next);
|
|
9775
10113
|
props.onPageChange?.(next);
|
|
9776
10114
|
},
|
|
9777
10115
|
[isPageControlled, props.onPageChange]
|
|
9778
10116
|
);
|
|
9779
|
-
const prevSortKey =
|
|
9780
|
-
const prevFilterKey =
|
|
9781
|
-
|
|
10117
|
+
const prevSortKey = React27.useRef(serializeSort(sort));
|
|
10118
|
+
const prevFilterKey = React27.useRef(serializeFilter(filter));
|
|
10119
|
+
React27.useEffect(() => {
|
|
9782
10120
|
const sk = serializeSort(sort);
|
|
9783
10121
|
const fk = serializeFilter(filter);
|
|
9784
10122
|
if (sk !== prevSortKey.current || fk !== prevFilterKey.current) {
|
|
@@ -9789,24 +10127,24 @@ function useTableState(props) {
|
|
|
9789
10127
|
}, [sort, filter, isPageControlled]);
|
|
9790
10128
|
const pageSize = props.pagination && typeof props.pagination === "object" ? props.pagination.pageSize : 0;
|
|
9791
10129
|
const isServerMode = typeof props.onLoad === "function";
|
|
9792
|
-
const filtered =
|
|
10130
|
+
const filtered = React27.useMemo(
|
|
9793
10131
|
() => isServerMode ? props.rows : applyFilter(props.rows, filter, props.columns),
|
|
9794
10132
|
[props.rows, filter, props.columns, isServerMode]
|
|
9795
10133
|
);
|
|
9796
|
-
const sorted =
|
|
10134
|
+
const sorted = React27.useMemo(
|
|
9797
10135
|
() => isServerMode ? filtered : applySort(filtered, sort),
|
|
9798
10136
|
[filtered, sort, isServerMode]
|
|
9799
10137
|
);
|
|
9800
|
-
const pagedInMemory =
|
|
10138
|
+
const pagedInMemory = React27.useMemo(() => {
|
|
9801
10139
|
if (isServerMode || pageSize <= 0) return sorted;
|
|
9802
10140
|
const start = page * pageSize;
|
|
9803
10141
|
return sorted.slice(start, start + pageSize);
|
|
9804
10142
|
}, [sorted, page, pageSize, isServerMode]);
|
|
9805
|
-
const [serverRows, setServerRows] =
|
|
9806
|
-
const [serverTotal, setServerTotal] =
|
|
9807
|
-
const [serverError, setServerError] =
|
|
9808
|
-
const reqIdRef =
|
|
9809
|
-
|
|
10143
|
+
const [serverRows, setServerRows] = React27.useState([]);
|
|
10144
|
+
const [serverTotal, setServerTotal] = React27.useState(0);
|
|
10145
|
+
const [serverError, setServerError] = React27.useState(null);
|
|
10146
|
+
const reqIdRef = React27.useRef(0);
|
|
10147
|
+
React27.useEffect(() => {
|
|
9810
10148
|
if (!isServerMode) return;
|
|
9811
10149
|
const myId = ++reqIdRef.current;
|
|
9812
10150
|
let cancelled = false;
|
|
@@ -10238,18 +10576,18 @@ function Toolbar2(props) {
|
|
|
10238
10576
|
enableFilterDialog,
|
|
10239
10577
|
searchPlaceholder
|
|
10240
10578
|
} = props;
|
|
10241
|
-
const sortFields =
|
|
10579
|
+
const sortFields = React27__namespace.useMemo(
|
|
10242
10580
|
() => deriveSortFields(columns),
|
|
10243
10581
|
[columns]
|
|
10244
10582
|
);
|
|
10245
|
-
const filterFields =
|
|
10583
|
+
const filterFields = React27__namespace.useMemo(
|
|
10246
10584
|
() => deriveFilterFields(columns),
|
|
10247
10585
|
[columns]
|
|
10248
10586
|
);
|
|
10249
|
-
const [searchValue, setSearchValue] =
|
|
10587
|
+
const [searchValue, setSearchValue] = React27__namespace.useState(
|
|
10250
10588
|
filter.search ?? ""
|
|
10251
10589
|
);
|
|
10252
|
-
|
|
10590
|
+
React27__namespace.useEffect(() => {
|
|
10253
10591
|
setSearchValue(filter.search ?? "");
|
|
10254
10592
|
}, [filter.search]);
|
|
10255
10593
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "cls_hazo_ui_table_toolbar flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between", children: [
|
|
@@ -10610,13 +10948,13 @@ function FunnelChart({
|
|
|
10610
10948
|
showTooltip = true,
|
|
10611
10949
|
className
|
|
10612
10950
|
}) {
|
|
10613
|
-
const [hover_idx, set_hover_idx] =
|
|
10951
|
+
const [hover_idx, set_hover_idx] = React27__namespace.useState(null);
|
|
10614
10952
|
const fmt = valueFormat ?? format_num;
|
|
10615
10953
|
const totals = steps.map(step_total);
|
|
10616
10954
|
const value_max = Math.max(1, ...totals);
|
|
10617
10955
|
const plot_w = width - PAD_LEFT2 - PAD_RIGHT2;
|
|
10618
10956
|
const vbox_h = height ?? PAD_TOP2 + steps.length * ROW_H + PAD_BOTTOM2;
|
|
10619
|
-
const handle_mouse_move =
|
|
10957
|
+
const handle_mouse_move = React27__namespace.useCallback(
|
|
10620
10958
|
(e) => {
|
|
10621
10959
|
if (steps.length === 0) return;
|
|
10622
10960
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
@@ -10631,7 +10969,7 @@ function FunnelChart({
|
|
|
10631
10969
|
},
|
|
10632
10970
|
[steps.length, vbox_h]
|
|
10633
10971
|
);
|
|
10634
|
-
const handle_mouse_leave =
|
|
10972
|
+
const handle_mouse_leave = React27__namespace.useCallback(() => set_hover_idx(null), []);
|
|
10635
10973
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10636
10974
|
"svg",
|
|
10637
10975
|
{
|
|
@@ -10819,21 +11157,21 @@ function celebrate(payload) {
|
|
|
10819
11157
|
_enqueue(payload);
|
|
10820
11158
|
}
|
|
10821
11159
|
function CelebrationProvider({ children }) {
|
|
10822
|
-
const [queue, set_queue] =
|
|
10823
|
-
const enqueue =
|
|
11160
|
+
const [queue, set_queue] = React27__namespace.useState([]);
|
|
11161
|
+
const enqueue = React27__namespace.useCallback((payload) => {
|
|
10824
11162
|
const storage_key = `hazo_ui_celebration_${payload.id}`;
|
|
10825
11163
|
if (typeof window !== "undefined" && sessionStorage.getItem(storage_key)) {
|
|
10826
11164
|
return;
|
|
10827
11165
|
}
|
|
10828
11166
|
set_queue((q) => [...q, payload]);
|
|
10829
11167
|
}, []);
|
|
10830
|
-
|
|
11168
|
+
React27__namespace.useEffect(() => {
|
|
10831
11169
|
_enqueue = enqueue;
|
|
10832
11170
|
return () => {
|
|
10833
11171
|
_enqueue = null;
|
|
10834
11172
|
};
|
|
10835
11173
|
}, [enqueue]);
|
|
10836
|
-
const handle_close =
|
|
11174
|
+
const handle_close = React27__namespace.useCallback(() => {
|
|
10837
11175
|
set_queue((q) => q.slice(1));
|
|
10838
11176
|
}, []);
|
|
10839
11177
|
const current = queue[0] ?? null;
|
|
@@ -10862,14 +11200,14 @@ function CelebrationModalInner({
|
|
|
10862
11200
|
autoDismissDelay = 8e3,
|
|
10863
11201
|
audioChime = false
|
|
10864
11202
|
} = payload;
|
|
10865
|
-
const [visible, set_visible] =
|
|
10866
|
-
const [is_downloading, set_is_downloading] =
|
|
10867
|
-
const canvas_ref =
|
|
10868
|
-
const card_ref =
|
|
10869
|
-
|
|
11203
|
+
const [visible, set_visible] = React27__namespace.useState(true);
|
|
11204
|
+
const [is_downloading, set_is_downloading] = React27__namespace.useState(false);
|
|
11205
|
+
const canvas_ref = React27__namespace.useRef(null);
|
|
11206
|
+
const card_ref = React27__namespace.useRef(null);
|
|
11207
|
+
React27__namespace.useEffect(() => {
|
|
10870
11208
|
sessionStorage.setItem(`hazo_ui_celebration_${id}`, "1");
|
|
10871
11209
|
}, [id]);
|
|
10872
|
-
|
|
11210
|
+
React27__namespace.useEffect(() => {
|
|
10873
11211
|
if (!canvas_ref.current) return;
|
|
10874
11212
|
let confetti_instance = null;
|
|
10875
11213
|
import('canvas-confetti').then(({ default: confetti }) => {
|
|
@@ -10886,18 +11224,18 @@ function CelebrationModalInner({
|
|
|
10886
11224
|
confetti_instance?.reset();
|
|
10887
11225
|
};
|
|
10888
11226
|
}, []);
|
|
10889
|
-
|
|
11227
|
+
React27__namespace.useEffect(() => {
|
|
10890
11228
|
if (!audioChime) return;
|
|
10891
11229
|
const audio = new Audio(celebration_chime_default);
|
|
10892
11230
|
audio.play().catch(() => {
|
|
10893
11231
|
});
|
|
10894
11232
|
}, [audioChime]);
|
|
10895
|
-
|
|
11233
|
+
React27__namespace.useEffect(() => {
|
|
10896
11234
|
if (!autoDismiss) return;
|
|
10897
11235
|
const timer = window.setTimeout(close_modal, autoDismissDelay);
|
|
10898
11236
|
return () => window.clearTimeout(timer);
|
|
10899
11237
|
}, [autoDismiss, autoDismissDelay]);
|
|
10900
|
-
|
|
11238
|
+
React27__namespace.useEffect(() => {
|
|
10901
11239
|
const on_key = (e) => {
|
|
10902
11240
|
if (e.key === "Escape") close_modal();
|
|
10903
11241
|
};
|
|
@@ -11146,8 +11484,8 @@ function useEtaProgress(opts) {
|
|
|
11146
11484
|
loadDurations,
|
|
11147
11485
|
appendDuration
|
|
11148
11486
|
} = opts;
|
|
11149
|
-
const [value, setValue] =
|
|
11150
|
-
const stateRef =
|
|
11487
|
+
const [value, setValue] = React27__namespace.useState(0);
|
|
11488
|
+
const stateRef = React27__namespace.useRef({
|
|
11151
11489
|
started: false,
|
|
11152
11490
|
finished: false,
|
|
11153
11491
|
startTime: 0,
|
|
@@ -11157,14 +11495,14 @@ function useEtaProgress(opts) {
|
|
|
11157
11495
|
eta: 0,
|
|
11158
11496
|
rafId: 0
|
|
11159
11497
|
});
|
|
11160
|
-
const stop =
|
|
11498
|
+
const stop = React27__namespace.useCallback(() => {
|
|
11161
11499
|
if (stateRef.current.rafId) {
|
|
11162
11500
|
cancelAnimationFrame(stateRef.current.rafId);
|
|
11163
11501
|
stateRef.current.rafId = 0;
|
|
11164
11502
|
}
|
|
11165
11503
|
}, []);
|
|
11166
|
-
|
|
11167
|
-
const tick =
|
|
11504
|
+
React27__namespace.useEffect(() => stop, [stop]);
|
|
11505
|
+
const tick = React27__namespace.useCallback(() => {
|
|
11168
11506
|
const s = stateRef.current;
|
|
11169
11507
|
if (s.finished || !s.started) return;
|
|
11170
11508
|
const elapsed = Date.now() - s.startTime;
|
|
@@ -11173,7 +11511,7 @@ function useEtaProgress(opts) {
|
|
|
11173
11511
|
setValue(Math.max(timeValue, unitValue));
|
|
11174
11512
|
s.rafId = requestAnimationFrame(tick);
|
|
11175
11513
|
}, [unitCount]);
|
|
11176
|
-
const start =
|
|
11514
|
+
const start = React27__namespace.useCallback(() => {
|
|
11177
11515
|
const s = stateRef.current;
|
|
11178
11516
|
if (s.started) return;
|
|
11179
11517
|
const window2 = loadDurations();
|
|
@@ -11187,13 +11525,13 @@ function useEtaProgress(opts) {
|
|
|
11187
11525
|
stop();
|
|
11188
11526
|
s.rafId = requestAnimationFrame(tick);
|
|
11189
11527
|
}, [loadDurations, unitCount, concurrency, fallbackUnitMs, stop, tick]);
|
|
11190
|
-
const unitDone =
|
|
11528
|
+
const unitDone = React27__namespace.useCallback(() => {
|
|
11191
11529
|
const s = stateRef.current;
|
|
11192
11530
|
if (!s.started || s.finished) return;
|
|
11193
11531
|
s.unitsDone = Math.min(s.unitsDone + 1, unitCount);
|
|
11194
11532
|
s.unitTimestamps.push(Date.now());
|
|
11195
11533
|
}, [unitCount]);
|
|
11196
|
-
const finish =
|
|
11534
|
+
const finish = React27__namespace.useCallback(() => {
|
|
11197
11535
|
const s = stateRef.current;
|
|
11198
11536
|
if (s.finished) return;
|
|
11199
11537
|
s.finished = true;
|
|
@@ -11221,14 +11559,14 @@ function HazoUiEtaProgress({
|
|
|
11221
11559
|
handleRef,
|
|
11222
11560
|
className
|
|
11223
11561
|
}) {
|
|
11224
|
-
const { value: stored, append } = client$
|
|
11562
|
+
const { value: stored, append } = client$2.useHazoState(estimateKey, {
|
|
11225
11563
|
level,
|
|
11226
11564
|
fallback: [],
|
|
11227
11565
|
...endpoint ? { endpoint } : {}
|
|
11228
11566
|
});
|
|
11229
11567
|
const durationWindow = Array.isArray(stored) ? stored : [];
|
|
11230
|
-
const loadDurations =
|
|
11231
|
-
const appendDuration =
|
|
11568
|
+
const loadDurations = React27__namespace.useCallback(() => durationWindow, [durationWindow]);
|
|
11569
|
+
const appendDuration = React27__namespace.useCallback(
|
|
11232
11570
|
(ms) => {
|
|
11233
11571
|
append(ms, windowSize);
|
|
11234
11572
|
},
|
|
@@ -11241,7 +11579,7 @@ function HazoUiEtaProgress({
|
|
|
11241
11579
|
loadDurations,
|
|
11242
11580
|
appendDuration
|
|
11243
11581
|
});
|
|
11244
|
-
|
|
11582
|
+
React27__namespace.useEffect(() => {
|
|
11245
11583
|
if (handleRef) {
|
|
11246
11584
|
handleRef.current = handle;
|
|
11247
11585
|
}
|
|
@@ -11278,13 +11616,13 @@ function HazoUiMemoryDropdown({
|
|
|
11278
11616
|
add_entry,
|
|
11279
11617
|
empty_label = "No history yet"
|
|
11280
11618
|
}) {
|
|
11281
|
-
const { value: stored, setValue } = client$
|
|
11619
|
+
const { value: stored, setValue } = client$2.useHazoState(history_key, {
|
|
11282
11620
|
level: "scope",
|
|
11283
11621
|
fallback: []
|
|
11284
11622
|
});
|
|
11285
11623
|
const storedEntries = Array.isArray(stored) ? stored : [];
|
|
11286
|
-
const [query, setQuery] =
|
|
11287
|
-
|
|
11624
|
+
const [query, setQuery] = React27__namespace.useState("");
|
|
11625
|
+
React27__namespace.useEffect(() => {
|
|
11288
11626
|
if (!add_entry) return;
|
|
11289
11627
|
const updated = upsertEntry(storedEntries, add_entry);
|
|
11290
11628
|
setValue(updated);
|
|
@@ -11363,8 +11701,8 @@ function HazoUiMemoryDropdown({
|
|
|
11363
11701
|
);
|
|
11364
11702
|
}
|
|
11365
11703
|
function EntryRow({ entry, on_select, onDelete }) {
|
|
11366
|
-
const [deleteHovered, setDeleteHovered] =
|
|
11367
|
-
const [rowHovered, setRowHovered] =
|
|
11704
|
+
const [deleteHovered, setDeleteHovered] = React27__namespace.useState(false);
|
|
11705
|
+
const [rowHovered, setRowHovered] = React27__namespace.useState(false);
|
|
11368
11706
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11369
11707
|
"div",
|
|
11370
11708
|
{
|
|
@@ -11421,67 +11759,6 @@ function EntryRow({ entry, on_select, onDelete }) {
|
|
|
11421
11759
|
}
|
|
11422
11760
|
);
|
|
11423
11761
|
}
|
|
11424
|
-
var ThemeContext = React26__namespace.createContext(void 0);
|
|
11425
|
-
function HazoThemeProvider({
|
|
11426
|
-
children,
|
|
11427
|
-
defaultTheme = "system",
|
|
11428
|
-
storageKey = "theme"
|
|
11429
|
-
}) {
|
|
11430
|
-
const [theme, setTheme] = useLocalStorage(storageKey, defaultTheme);
|
|
11431
|
-
const prefersDark = useMediaQuery("(prefers-color-scheme: dark)");
|
|
11432
|
-
const resolvedTheme = theme === "system" ? prefersDark ? "dark" : "light" : theme;
|
|
11433
|
-
React26__namespace.useEffect(() => {
|
|
11434
|
-
document.documentElement.classList.toggle("dark", resolvedTheme === "dark");
|
|
11435
|
-
}, [resolvedTheme]);
|
|
11436
|
-
const toggleTheme = React26__namespace.useCallback(() => {
|
|
11437
|
-
setTheme(resolvedTheme === "dark" ? "light" : "dark");
|
|
11438
|
-
}, [resolvedTheme, setTheme]);
|
|
11439
|
-
const value = React26__namespace.useMemo(
|
|
11440
|
-
() => ({ theme, setTheme, resolvedTheme, toggleTheme }),
|
|
11441
|
-
[theme, setTheme, resolvedTheme, toggleTheme]
|
|
11442
|
-
);
|
|
11443
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value, children });
|
|
11444
|
-
}
|
|
11445
|
-
function useTheme() {
|
|
11446
|
-
const context = React26__namespace.useContext(ThemeContext);
|
|
11447
|
-
if (context === void 0) {
|
|
11448
|
-
throw new Error("useTheme must be used within a <HazoThemeProvider>");
|
|
11449
|
-
}
|
|
11450
|
-
return context;
|
|
11451
|
-
}
|
|
11452
|
-
function ThemeScript({ storageKey = "theme" }) {
|
|
11453
|
-
const script = `(function(){try{var k=${JSON.stringify(
|
|
11454
|
-
storageKey
|
|
11455
|
-
)};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){}})();`;
|
|
11456
|
-
return /* @__PURE__ */ jsxRuntime.jsx("script", { dangerouslySetInnerHTML: { __html: script } });
|
|
11457
|
-
}
|
|
11458
|
-
var ThemeToggle = React26__namespace.forwardRef(
|
|
11459
|
-
({ className, ...props }, ref) => {
|
|
11460
|
-
const { resolvedTheme, toggleTheme } = useTheme();
|
|
11461
|
-
const [mounted, setMounted] = React26__namespace.useState(false);
|
|
11462
|
-
React26__namespace.useEffect(() => {
|
|
11463
|
-
setMounted(true);
|
|
11464
|
-
}, []);
|
|
11465
|
-
const isDark = mounted && resolvedTheme === "dark";
|
|
11466
|
-
const label = isDark ? "Switch to light theme" : "Switch to dark theme";
|
|
11467
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11468
|
-
"button",
|
|
11469
|
-
{
|
|
11470
|
-
type: "button",
|
|
11471
|
-
ref,
|
|
11472
|
-
onClick: toggleTheme,
|
|
11473
|
-
"aria-label": label,
|
|
11474
|
-
className: cn(
|
|
11475
|
-
"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",
|
|
11476
|
-
className
|
|
11477
|
-
),
|
|
11478
|
-
...props,
|
|
11479
|
-
children: isDark ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sun, { className: "h-4 w-4" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Moon, { className: "h-4 w-4" })
|
|
11480
|
-
}
|
|
11481
|
-
);
|
|
11482
|
-
}
|
|
11483
|
-
);
|
|
11484
|
-
ThemeToggle.displayName = "ThemeToggle";
|
|
11485
11762
|
function Logo({
|
|
11486
11763
|
logoUrl,
|
|
11487
11764
|
logoUrlDark,
|
|
@@ -11654,6 +11931,26 @@ Object.defineProperty(exports, "rawToast", {
|
|
|
11654
11931
|
enumerable: true,
|
|
11655
11932
|
get: function () { return sonner.toast; }
|
|
11656
11933
|
});
|
|
11934
|
+
Object.defineProperty(exports, "HazoThemeProvider", {
|
|
11935
|
+
enumerable: true,
|
|
11936
|
+
get: function () { return client.HazoThemeProvider; }
|
|
11937
|
+
});
|
|
11938
|
+
Object.defineProperty(exports, "ThemeScript", {
|
|
11939
|
+
enumerable: true,
|
|
11940
|
+
get: function () { return client.ThemeScript; }
|
|
11941
|
+
});
|
|
11942
|
+
Object.defineProperty(exports, "ThemeSetPicker", {
|
|
11943
|
+
enumerable: true,
|
|
11944
|
+
get: function () { return client.ThemeSetPicker; }
|
|
11945
|
+
});
|
|
11946
|
+
Object.defineProperty(exports, "ThemeToggle", {
|
|
11947
|
+
enumerable: true,
|
|
11948
|
+
get: function () { return client.ThemeToggle; }
|
|
11949
|
+
});
|
|
11950
|
+
Object.defineProperty(exports, "useTheme", {
|
|
11951
|
+
enumerable: true,
|
|
11952
|
+
get: function () { return client.useTheme; }
|
|
11953
|
+
});
|
|
11657
11954
|
exports.ANIMATION_PRESETS = ANIMATION_PRESETS;
|
|
11658
11955
|
exports.Accordion = Accordion;
|
|
11659
11956
|
exports.AccordionContent = AccordionContent;
|
|
@@ -11724,7 +12021,6 @@ exports.ErrorBanner = ErrorBanner;
|
|
|
11724
12021
|
exports.ErrorPage = ErrorPage;
|
|
11725
12022
|
exports.FunnelChart = FunnelChart;
|
|
11726
12023
|
exports.HazoContextProvider = HazoContextProvider;
|
|
11727
|
-
exports.HazoThemeProvider = HazoThemeProvider;
|
|
11728
12024
|
exports.HazoUiConfirmDialog = HazoUiConfirmDialog;
|
|
11729
12025
|
exports.HazoUiDialog = HazoUiDialog;
|
|
11730
12026
|
exports.HazoUiDialogClose = DialogClose;
|
|
@@ -11740,6 +12036,8 @@ exports.HazoUiDialogTrigger = DialogTrigger;
|
|
|
11740
12036
|
exports.HazoUiEtaProgress = HazoUiEtaProgress;
|
|
11741
12037
|
exports.HazoUiFlexInput = HazoUiFlexInput;
|
|
11742
12038
|
exports.HazoUiFlexRadio = HazoUiFlexRadio;
|
|
12039
|
+
exports.HazoUiIcon = HazoUiIcon;
|
|
12040
|
+
exports.HazoUiIconPicker = HazoUiIconPicker;
|
|
11743
12041
|
exports.HazoUiImageCropper = HazoUiImageCropper;
|
|
11744
12042
|
exports.HazoUiImageCropperDialog = HazoUiImageCropperDialog;
|
|
11745
12043
|
exports.HazoUiKanban = HazoUiKanban;
|
|
@@ -11815,8 +12113,6 @@ exports.TabsContent = TabsContent;
|
|
|
11815
12113
|
exports.TabsList = TabsList;
|
|
11816
12114
|
exports.TabsTrigger = TabsTrigger;
|
|
11817
12115
|
exports.Textarea = Textarea;
|
|
11818
|
-
exports.ThemeScript = ThemeScript;
|
|
11819
|
-
exports.ThemeToggle = ThemeToggle;
|
|
11820
12116
|
exports.Toggle = Toggle;
|
|
11821
12117
|
exports.ToggleGroup = ToggleGroup;
|
|
11822
12118
|
exports.ToggleGroupItem = ToggleGroupItem;
|
|
@@ -11836,6 +12132,7 @@ exports.format_num = format_num;
|
|
|
11836
12132
|
exports.generateUUID = generateUUID;
|
|
11837
12133
|
exports.get_hazo_ui_config = get_hazo_ui_config;
|
|
11838
12134
|
exports.get_logger = get_logger;
|
|
12135
|
+
exports.isLucideValue = isLucideValue;
|
|
11839
12136
|
exports.median = median;
|
|
11840
12137
|
exports.parse_commands_from_text = parse_commands_from_text;
|
|
11841
12138
|
exports.pick_x_label_indices = pick_x_label_indices;
|
|
@@ -11859,7 +12156,6 @@ exports.useLoadingState = useLoadingState;
|
|
|
11859
12156
|
exports.useLocalStorage = useLocalStorage;
|
|
11860
12157
|
exports.useMediaQuery = useMediaQuery;
|
|
11861
12158
|
exports.useSessionStorage = useSessionStorage;
|
|
11862
|
-
exports.useTheme = useTheme;
|
|
11863
12159
|
exports.useViewport = useViewport;
|
|
11864
12160
|
exports.useWakeLock = useWakeLock;
|
|
11865
12161
|
exports.use_fullscreen = use_fullscreen;
|