hazo_ui 3.0.1 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGE_LOG.md +46 -0
- package/dist/index.cjs +483 -511
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +104 -2
- package/dist/index.d.ts +104 -2
- package/dist/index.js +402 -435
- package/dist/index.js.map +1 -1
- package/dist/test-harness/index.cjs +7 -17034
- package/dist/test-harness/index.cjs.map +1 -1
- package/dist/test-harness/index.js +7 -17032
- package/dist/test-harness/index.js.map +1 -1
- package/package.json +6 -4
package/dist/index.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import * as React25 from 'react';
|
|
3
|
-
import React25__default, { useRef, useState, useCallback, useEffect, useMemo, Fragment } from 'react';
|
|
4
|
-
import { Slot } from '@radix-ui/react-slot';
|
|
5
|
-
import { cva } from 'class-variance-authority';
|
|
6
2
|
import { clsx } from 'clsx';
|
|
7
3
|
import { twMerge } from 'tailwind-merge';
|
|
4
|
+
import * as React26 from 'react';
|
|
5
|
+
import React26__default, { useRef, useState, useCallback, useEffect, useMemo, Fragment } from 'react';
|
|
6
|
+
import * as hazoCore from 'hazo_core';
|
|
7
|
+
import { generateRequestId } from 'hazo_core';
|
|
8
|
+
import { withContext, setBrowserCorrelationId } from 'hazo_core/client';
|
|
8
9
|
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
10
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
11
|
+
import { cva } from 'class-variance-authority';
|
|
9
12
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
10
13
|
import { X, ChevronDown, ChevronUp, Check, Circle, ChevronRight, ChevronLeft, Filter, Plus, ArrowUpDown, Loader2, AlertTriangle, OctagonAlert, CheckCircle2, ChevronsUpDown, Download, Share2, Copy, GripVertical, ArrowUp, ArrowDown, Pencil, Calendar as Calendar$1 } from 'lucide-react';
|
|
11
14
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
@@ -127,6 +130,56 @@ var require_objectWithoutPropertiesLoose = __commonJS({
|
|
|
127
130
|
module.exports = _objectWithoutPropertiesLoose10, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
128
131
|
}
|
|
129
132
|
});
|
|
133
|
+
function cn(...inputs) {
|
|
134
|
+
return twMerge(clsx(inputs));
|
|
135
|
+
}
|
|
136
|
+
function HazoContextProvider({
|
|
137
|
+
correlationId,
|
|
138
|
+
userId,
|
|
139
|
+
children
|
|
140
|
+
}) {
|
|
141
|
+
const id = React26.useMemo(
|
|
142
|
+
() => correlationId ?? generateRequestId(),
|
|
143
|
+
[correlationId]
|
|
144
|
+
);
|
|
145
|
+
React26.useEffect(() => {
|
|
146
|
+
withContext({ correlationId: id, userId }, () => {
|
|
147
|
+
setBrowserCorrelationId(id);
|
|
148
|
+
});
|
|
149
|
+
return () => {
|
|
150
|
+
setBrowserCorrelationId(void 0);
|
|
151
|
+
};
|
|
152
|
+
}, [id, userId]);
|
|
153
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children });
|
|
154
|
+
}
|
|
155
|
+
var console_logger = {
|
|
156
|
+
info: (m, d) => d ? console.log(`[hazo_ui] ${m}`, d) : console.log(`[hazo_ui] ${m}`),
|
|
157
|
+
debug: (m, d) => d ? console.debug(`[hazo_ui] ${m}`, d) : console.debug(`[hazo_ui] ${m}`),
|
|
158
|
+
warn: (m, d) => d ? console.warn(`[hazo_ui] ${m}`, d) : console.warn(`[hazo_ui] ${m}`),
|
|
159
|
+
error: (m, d) => d ? console.error(`[hazo_ui] ${m}`, d) : console.error(`[hazo_ui] ${m}`)
|
|
160
|
+
};
|
|
161
|
+
function build_default_logger() {
|
|
162
|
+
const factory = hazoCore.createLogger;
|
|
163
|
+
if (typeof factory !== "function") return console_logger;
|
|
164
|
+
try {
|
|
165
|
+
return factory("hazo_ui");
|
|
166
|
+
} catch {
|
|
167
|
+
return console_logger;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
var current_logger = null;
|
|
171
|
+
function set_logger(logger) {
|
|
172
|
+
current_logger = logger ?? null;
|
|
173
|
+
}
|
|
174
|
+
function get_logger() {
|
|
175
|
+
if (!current_logger) {
|
|
176
|
+
current_logger = build_default_logger();
|
|
177
|
+
}
|
|
178
|
+
return current_logger;
|
|
179
|
+
}
|
|
180
|
+
function generateUUID() {
|
|
181
|
+
return generateRequestId().slice(4);
|
|
182
|
+
}
|
|
130
183
|
|
|
131
184
|
// src/lib/hazo_ui_config.ts
|
|
132
185
|
var default_config = {
|
|
@@ -158,9 +211,6 @@ function set_hazo_ui_config(config) {
|
|
|
158
211
|
function reset_hazo_ui_config() {
|
|
159
212
|
global_config = { ...default_config };
|
|
160
213
|
}
|
|
161
|
-
function cn(...inputs) {
|
|
162
|
-
return twMerge(clsx(inputs));
|
|
163
|
-
}
|
|
164
214
|
var buttonVariants = cva(
|
|
165
215
|
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
166
216
|
{
|
|
@@ -207,7 +257,7 @@ var variant_styles = {
|
|
|
207
257
|
color: "hsl(var(--secondary-foreground))"
|
|
208
258
|
}
|
|
209
259
|
};
|
|
210
|
-
var Button =
|
|
260
|
+
var Button = React26.forwardRef(
|
|
211
261
|
({ className, variant, size, asChild = false, style, ...props }, ref) => {
|
|
212
262
|
const Comp = asChild ? Slot : "button";
|
|
213
263
|
const fallback_styles = variant_styles[variant ?? "default"] ?? {};
|
|
@@ -227,7 +277,7 @@ var Dialog = DialogPrimitive.Root;
|
|
|
227
277
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
228
278
|
var DialogPortal = DialogPrimitive.Portal;
|
|
229
279
|
var DialogClose = DialogPrimitive.Close;
|
|
230
|
-
var DialogOverlay =
|
|
280
|
+
var DialogOverlay = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
231
281
|
DialogPrimitive.Overlay,
|
|
232
282
|
{
|
|
233
283
|
ref,
|
|
@@ -239,7 +289,7 @@ var DialogOverlay = React25.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
239
289
|
}
|
|
240
290
|
));
|
|
241
291
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
242
|
-
var DialogContent =
|
|
292
|
+
var DialogContent = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
243
293
|
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
244
294
|
/* @__PURE__ */ jsxs(
|
|
245
295
|
DialogPrimitive.Content,
|
|
@@ -289,7 +339,7 @@ var DialogFooter = ({
|
|
|
289
339
|
}
|
|
290
340
|
);
|
|
291
341
|
DialogFooter.displayName = "DialogFooter";
|
|
292
|
-
var DialogTitle =
|
|
342
|
+
var DialogTitle = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
293
343
|
DialogPrimitive.Title,
|
|
294
344
|
{
|
|
295
345
|
ref,
|
|
@@ -302,7 +352,7 @@ var DialogTitle = React25.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
302
352
|
}
|
|
303
353
|
));
|
|
304
354
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
305
|
-
var DialogDescription =
|
|
355
|
+
var DialogDescription = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
306
356
|
DialogPrimitive.Description,
|
|
307
357
|
{
|
|
308
358
|
ref,
|
|
@@ -311,7 +361,7 @@ var DialogDescription = React25.forwardRef(({ className, ...props }, ref) => /*
|
|
|
311
361
|
}
|
|
312
362
|
));
|
|
313
363
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
314
|
-
var Command =
|
|
364
|
+
var Command = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
315
365
|
"div",
|
|
316
366
|
{
|
|
317
367
|
ref,
|
|
@@ -323,7 +373,7 @@ var Command = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
323
373
|
}
|
|
324
374
|
));
|
|
325
375
|
Command.displayName = "Command";
|
|
326
|
-
var CommandInput =
|
|
376
|
+
var CommandInput = React26.forwardRef(({ className, onValueChange, onChange, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
327
377
|
"input",
|
|
328
378
|
{
|
|
329
379
|
ref,
|
|
@@ -339,7 +389,7 @@ var CommandInput = React25.forwardRef(({ className, onValueChange, onChange, ...
|
|
|
339
389
|
}
|
|
340
390
|
));
|
|
341
391
|
CommandInput.displayName = "CommandInput";
|
|
342
|
-
var CommandList =
|
|
392
|
+
var CommandList = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
343
393
|
"div",
|
|
344
394
|
{
|
|
345
395
|
ref,
|
|
@@ -348,7 +398,7 @@ var CommandList = React25.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
348
398
|
}
|
|
349
399
|
));
|
|
350
400
|
CommandList.displayName = "CommandList";
|
|
351
|
-
var CommandEmpty =
|
|
401
|
+
var CommandEmpty = React26.forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
352
402
|
"div",
|
|
353
403
|
{
|
|
354
404
|
ref,
|
|
@@ -357,7 +407,7 @@ var CommandEmpty = React25.forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
|
357
407
|
}
|
|
358
408
|
));
|
|
359
409
|
CommandEmpty.displayName = "CommandEmpty";
|
|
360
|
-
var CommandGroup =
|
|
410
|
+
var CommandGroup = React26.forwardRef(({ className, heading, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
361
411
|
"div",
|
|
362
412
|
{
|
|
363
413
|
ref,
|
|
@@ -373,7 +423,7 @@ var CommandGroup = React25.forwardRef(({ className, heading, children, ...props
|
|
|
373
423
|
}
|
|
374
424
|
));
|
|
375
425
|
CommandGroup.displayName = "CommandGroup";
|
|
376
|
-
var CommandItem =
|
|
426
|
+
var CommandItem = React26.forwardRef(({ className, onSelect, value, selected, style, ...props }, ref) => {
|
|
377
427
|
const handleClick = () => {
|
|
378
428
|
if (onSelect && value) {
|
|
379
429
|
onSelect(value);
|
|
@@ -404,7 +454,7 @@ var CommandItem = React25.forwardRef(({ className, onSelect, value, selected, st
|
|
|
404
454
|
CommandItem.displayName = "CommandItem";
|
|
405
455
|
var Popover = PopoverPrimitive.Root;
|
|
406
456
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
407
|
-
var PopoverContent =
|
|
457
|
+
var PopoverContent = React26.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
408
458
|
PopoverPrimitive.Content,
|
|
409
459
|
{
|
|
410
460
|
ref,
|
|
@@ -418,7 +468,7 @@ var PopoverContent = React25.forwardRef(({ className, align = "center", sideOffs
|
|
|
418
468
|
}
|
|
419
469
|
) }));
|
|
420
470
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
421
|
-
var Input =
|
|
471
|
+
var Input = React26.forwardRef(
|
|
422
472
|
({ className, type, ...props }, ref) => {
|
|
423
473
|
return /* @__PURE__ */ jsx(
|
|
424
474
|
"input",
|
|
@@ -438,7 +488,7 @@ Input.displayName = "Input";
|
|
|
438
488
|
var Select = SelectPrimitive.Root;
|
|
439
489
|
var SelectGroup = SelectPrimitive.Group;
|
|
440
490
|
var SelectValue = SelectPrimitive.Value;
|
|
441
|
-
var SelectTrigger =
|
|
491
|
+
var SelectTrigger = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
442
492
|
SelectPrimitive.Trigger,
|
|
443
493
|
{
|
|
444
494
|
ref,
|
|
@@ -454,7 +504,7 @@ var SelectTrigger = React25.forwardRef(({ className, children, ...props }, ref)
|
|
|
454
504
|
}
|
|
455
505
|
));
|
|
456
506
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
457
|
-
var SelectScrollUpButton =
|
|
507
|
+
var SelectScrollUpButton = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
458
508
|
SelectPrimitive.ScrollUpButton,
|
|
459
509
|
{
|
|
460
510
|
ref,
|
|
@@ -467,7 +517,7 @@ var SelectScrollUpButton = React25.forwardRef(({ className, ...props }, ref) =>
|
|
|
467
517
|
}
|
|
468
518
|
));
|
|
469
519
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
470
|
-
var SelectScrollDownButton =
|
|
520
|
+
var SelectScrollDownButton = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
471
521
|
SelectPrimitive.ScrollDownButton,
|
|
472
522
|
{
|
|
473
523
|
ref,
|
|
@@ -480,7 +530,7 @@ var SelectScrollDownButton = React25.forwardRef(({ className, ...props }, ref) =
|
|
|
480
530
|
}
|
|
481
531
|
));
|
|
482
532
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
483
|
-
var SelectContent =
|
|
533
|
+
var SelectContent = React26.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
484
534
|
SelectPrimitive.Content,
|
|
485
535
|
{
|
|
486
536
|
ref,
|
|
@@ -508,7 +558,7 @@ var SelectContent = React25.forwardRef(({ className, children, position = "poppe
|
|
|
508
558
|
}
|
|
509
559
|
) }));
|
|
510
560
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
511
|
-
var SelectLabel =
|
|
561
|
+
var SelectLabel = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
512
562
|
SelectPrimitive.Label,
|
|
513
563
|
{
|
|
514
564
|
ref,
|
|
@@ -517,7 +567,7 @@ var SelectLabel = React25.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
517
567
|
}
|
|
518
568
|
));
|
|
519
569
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
520
|
-
var SelectItem =
|
|
570
|
+
var SelectItem = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
521
571
|
SelectPrimitive.Item,
|
|
522
572
|
{
|
|
523
573
|
ref,
|
|
@@ -533,7 +583,7 @@ var SelectItem = React25.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
533
583
|
}
|
|
534
584
|
));
|
|
535
585
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
536
|
-
var SelectSeparator =
|
|
586
|
+
var SelectSeparator = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
537
587
|
SelectPrimitive.Separator,
|
|
538
588
|
{
|
|
539
589
|
ref,
|
|
@@ -545,7 +595,7 @@ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
|
545
595
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
546
596
|
var Tooltip = TooltipPrimitive.Root;
|
|
547
597
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
548
|
-
var TooltipContent =
|
|
598
|
+
var TooltipContent = React26.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
549
599
|
TooltipPrimitive.Content,
|
|
550
600
|
{
|
|
551
601
|
ref,
|
|
@@ -1407,7 +1457,7 @@ function HazoUiMultiSortDialog({
|
|
|
1407
1457
|
] })
|
|
1408
1458
|
] });
|
|
1409
1459
|
}
|
|
1410
|
-
var RadioGroup =
|
|
1460
|
+
var RadioGroup = React26.forwardRef(({ className, ...props }, ref) => {
|
|
1411
1461
|
return /* @__PURE__ */ jsx(
|
|
1412
1462
|
RadioGroupPrimitive.Root,
|
|
1413
1463
|
{
|
|
@@ -1418,7 +1468,7 @@ var RadioGroup = React25.forwardRef(({ className, ...props }, ref) => {
|
|
|
1418
1468
|
);
|
|
1419
1469
|
});
|
|
1420
1470
|
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
1421
|
-
var RadioGroupItem =
|
|
1471
|
+
var RadioGroupItem = React26.forwardRef(({ className, ...props }, ref) => {
|
|
1422
1472
|
return /* @__PURE__ */ jsx(
|
|
1423
1473
|
RadioGroupPrimitive.Item,
|
|
1424
1474
|
{
|
|
@@ -1875,7 +1925,7 @@ function filterInputValue(value, input_type, num_decimals) {
|
|
|
1875
1925
|
}
|
|
1876
1926
|
}
|
|
1877
1927
|
}
|
|
1878
|
-
var HazoUiFlexInput =
|
|
1928
|
+
var HazoUiFlexInput = React26.forwardRef(
|
|
1879
1929
|
({
|
|
1880
1930
|
className,
|
|
1881
1931
|
input_type = "mixed",
|
|
@@ -1892,13 +1942,13 @@ var HazoUiFlexInput = React25.forwardRef(
|
|
|
1892
1942
|
onBlur,
|
|
1893
1943
|
...props
|
|
1894
1944
|
}, ref) => {
|
|
1895
|
-
const [internalValue, setInternalValue] =
|
|
1945
|
+
const [internalValue, setInternalValue] = React26.useState(
|
|
1896
1946
|
typeof controlledValue === "string" ? controlledValue : typeof controlledValue === "number" ? String(controlledValue) : ""
|
|
1897
1947
|
);
|
|
1898
|
-
const [errorMessage, setErrorMessage] =
|
|
1948
|
+
const [errorMessage, setErrorMessage] = React26.useState();
|
|
1899
1949
|
const isControlled = controlledValue !== void 0;
|
|
1900
1950
|
const currentValue = isControlled ? typeof controlledValue === "string" ? controlledValue : String(controlledValue || "") : internalValue;
|
|
1901
|
-
|
|
1951
|
+
React26.useEffect(() => {
|
|
1902
1952
|
if (isControlled) {
|
|
1903
1953
|
const newValue = typeof controlledValue === "string" ? controlledValue : String(controlledValue || "");
|
|
1904
1954
|
if (newValue !== internalValue) {
|
|
@@ -1978,7 +2028,7 @@ var HazoUiFlexInput = React25.forwardRef(
|
|
|
1978
2028
|
}
|
|
1979
2029
|
);
|
|
1980
2030
|
HazoUiFlexInput.displayName = "HazoUiFlexInput";
|
|
1981
|
-
var ToolbarButton =
|
|
2031
|
+
var ToolbarButton = React26.forwardRef(
|
|
1982
2032
|
({ onClick, is_active = false, disabled = false, tooltip, className, children }, ref) => {
|
|
1983
2033
|
const button = /* @__PURE__ */ jsx(
|
|
1984
2034
|
"button",
|
|
@@ -2016,25 +2066,20 @@ var ToolbarButton = React25.forwardRef(
|
|
|
2016
2066
|
);
|
|
2017
2067
|
ToolbarButton.displayName = "ToolbarButton";
|
|
2018
2068
|
|
|
2019
|
-
// node_modules/@uiw/react-color-sketch/esm/index.js
|
|
2069
|
+
// ../node_modules/@uiw/react-color-sketch/esm/index.js
|
|
2020
2070
|
var import_extends10 = __toESM(require_extends());
|
|
2021
2071
|
var import_objectWithoutPropertiesLoose9 = __toESM(require_objectWithoutPropertiesLoose());
|
|
2022
2072
|
|
|
2023
|
-
// node_modules/@uiw/react-color-saturation/esm/index.js
|
|
2073
|
+
// ../node_modules/@uiw/react-color-saturation/esm/index.js
|
|
2024
2074
|
var import_extends3 = __toESM(require_extends());
|
|
2025
2075
|
var import_objectWithoutPropertiesLoose2 = __toESM(require_objectWithoutPropertiesLoose());
|
|
2026
2076
|
|
|
2027
|
-
// node_modules/@uiw/color-convert/esm/index.js
|
|
2077
|
+
// ../node_modules/@uiw/color-convert/esm/index.js
|
|
2028
2078
|
var import_extends = __toESM(require_extends());
|
|
2029
2079
|
var RGB_MAX = 255;
|
|
2030
2080
|
var SV_MAX = 100;
|
|
2031
2081
|
var rgbaToHsva = (_ref) => {
|
|
2032
|
-
var
|
|
2033
|
-
r,
|
|
2034
|
-
g,
|
|
2035
|
-
b,
|
|
2036
|
-
a
|
|
2037
|
-
} = _ref;
|
|
2082
|
+
var r = _ref.r, g = _ref.g, b = _ref.b, a = _ref.a;
|
|
2038
2083
|
var max = Math.max(r, g, b);
|
|
2039
2084
|
var delta = max - Math.min(r, g, b);
|
|
2040
2085
|
var hh = delta ? max === r ? (g - b) / delta : max === g ? 2 + (b - r) / delta : 4 + (r - g) / delta : 0;
|
|
@@ -2046,21 +2091,11 @@ var rgbaToHsva = (_ref) => {
|
|
|
2046
2091
|
};
|
|
2047
2092
|
};
|
|
2048
2093
|
var hsvaToHslaString = (hsva) => {
|
|
2049
|
-
var
|
|
2050
|
-
h,
|
|
2051
|
-
s,
|
|
2052
|
-
l,
|
|
2053
|
-
a
|
|
2054
|
-
} = hsvaToHsla(hsva);
|
|
2094
|
+
var _hsvaToHsla2 = hsvaToHsla(hsva), h = _hsvaToHsla2.h, s = _hsvaToHsla2.s, l = _hsvaToHsla2.l, a = _hsvaToHsla2.a;
|
|
2055
2095
|
return "hsla(" + h + ", " + s + "%, " + l + "%, " + a + ")";
|
|
2056
2096
|
};
|
|
2057
2097
|
var hsvaToHsla = (_ref5) => {
|
|
2058
|
-
var
|
|
2059
|
-
h,
|
|
2060
|
-
s,
|
|
2061
|
-
v,
|
|
2062
|
-
a
|
|
2063
|
-
} = _ref5;
|
|
2098
|
+
var h = _ref5.h, s = _ref5.s, v = _ref5.v, a = _ref5.a;
|
|
2064
2099
|
var hh = (200 - s) * v / SV_MAX;
|
|
2065
2100
|
return {
|
|
2066
2101
|
h,
|
|
@@ -2070,21 +2105,12 @@ var hsvaToHsla = (_ref5) => {
|
|
|
2070
2105
|
};
|
|
2071
2106
|
};
|
|
2072
2107
|
var rgbToHex = (_ref7) => {
|
|
2073
|
-
var
|
|
2074
|
-
r,
|
|
2075
|
-
g,
|
|
2076
|
-
b
|
|
2077
|
-
} = _ref7;
|
|
2108
|
+
var r = _ref7.r, g = _ref7.g, b = _ref7.b;
|
|
2078
2109
|
var bin = r << 16 | g << 8 | b;
|
|
2079
2110
|
return "#" + ((h) => new Array(7 - h.length).join("0") + h)(bin.toString(16));
|
|
2080
2111
|
};
|
|
2081
2112
|
var rgbaToHexa = (_ref8) => {
|
|
2082
|
-
var
|
|
2083
|
-
r,
|
|
2084
|
-
g,
|
|
2085
|
-
b,
|
|
2086
|
-
a
|
|
2087
|
-
} = _ref8;
|
|
2113
|
+
var r = _ref8.r, g = _ref8.g, b = _ref8.b, a = _ref8.a;
|
|
2088
2114
|
var alpha = typeof a === "number" && (a * 255 | 1 << 8).toString(16).slice(1);
|
|
2089
2115
|
return "" + rgbToHex({
|
|
2090
2116
|
r,
|
|
@@ -2099,7 +2125,7 @@ var hexToRgba = (hex) => {
|
|
|
2099
2125
|
hex = "#" + htemp.charAt(0) + htemp.charAt(0) + htemp.charAt(1) + htemp.charAt(1) + htemp.charAt(2) + htemp.charAt(2);
|
|
2100
2126
|
}
|
|
2101
2127
|
var reg = new RegExp("[A-Za-z0-9]{2}", "g");
|
|
2102
|
-
var
|
|
2128
|
+
var _map2 = hex.match(reg).map((v) => parseInt(v, 16)), r = _map2[0], g = _map2[1], _map2$ = _map2[2], b = _map2$ === void 0 ? 0 : _map2$, a = _map2[3];
|
|
2103
2129
|
return {
|
|
2104
2130
|
r,
|
|
2105
2131
|
g,
|
|
@@ -2108,12 +2134,7 @@ var hexToRgba = (hex) => {
|
|
|
2108
2134
|
};
|
|
2109
2135
|
};
|
|
2110
2136
|
var hsvaToRgba = (_ref9) => {
|
|
2111
|
-
var
|
|
2112
|
-
h,
|
|
2113
|
-
s,
|
|
2114
|
-
v,
|
|
2115
|
-
a
|
|
2116
|
-
} = _ref9;
|
|
2137
|
+
var h = _ref9.h, s = _ref9.s, v = _ref9.v, a = _ref9.a;
|
|
2117
2138
|
var _h = h / 60, _s = s / SV_MAX, _v = v / SV_MAX, hi = Math.floor(_h) % 6;
|
|
2118
2139
|
var f = _h - Math.floor(_h), _p = RGB_MAX * _v * (1 - _s), _q = RGB_MAX * _v * (1 - _s * f), _t = RGB_MAX * _v * (1 - _s * (1 - f));
|
|
2119
2140
|
_v *= RGB_MAX;
|
|
@@ -2158,20 +2179,11 @@ var hsvaToRgba = (_ref9) => {
|
|
|
2158
2179
|
});
|
|
2159
2180
|
};
|
|
2160
2181
|
var hsvaToRgbaString = (hsva) => {
|
|
2161
|
-
var
|
|
2162
|
-
r,
|
|
2163
|
-
g,
|
|
2164
|
-
b,
|
|
2165
|
-
a
|
|
2166
|
-
} = hsvaToRgba(hsva);
|
|
2182
|
+
var _hsvaToRgba2 = hsvaToRgba(hsva), r = _hsvaToRgba2.r, g = _hsvaToRgba2.g, b = _hsvaToRgba2.b, a = _hsvaToRgba2.a;
|
|
2167
2183
|
return "rgba(" + r + ", " + g + ", " + b + ", " + a + ")";
|
|
2168
2184
|
};
|
|
2169
2185
|
var rgbaToRgb = (_ref0) => {
|
|
2170
|
-
var
|
|
2171
|
-
r,
|
|
2172
|
-
g,
|
|
2173
|
-
b
|
|
2174
|
-
} = _ref0;
|
|
2186
|
+
var r = _ref0.r, g = _ref0.g, b = _ref0.b;
|
|
2175
2187
|
return {
|
|
2176
2188
|
r,
|
|
2177
2189
|
g,
|
|
@@ -2179,11 +2191,7 @@ var rgbaToRgb = (_ref0) => {
|
|
|
2179
2191
|
};
|
|
2180
2192
|
};
|
|
2181
2193
|
var hslaToHsl = (_ref1) => {
|
|
2182
|
-
var
|
|
2183
|
-
h,
|
|
2184
|
-
s,
|
|
2185
|
-
l
|
|
2186
|
-
} = _ref1;
|
|
2194
|
+
var h = _ref1.h, s = _ref1.s, l = _ref1.l;
|
|
2187
2195
|
return {
|
|
2188
2196
|
h,
|
|
2189
2197
|
s,
|
|
@@ -2192,11 +2200,7 @@ var hslaToHsl = (_ref1) => {
|
|
|
2192
2200
|
};
|
|
2193
2201
|
var hsvaToHex = (hsva) => rgbToHex(hsvaToRgba(hsva));
|
|
2194
2202
|
var hsvaToHsv = (_ref10) => {
|
|
2195
|
-
var
|
|
2196
|
-
h,
|
|
2197
|
-
s,
|
|
2198
|
-
v
|
|
2199
|
-
} = _ref10;
|
|
2203
|
+
var h = _ref10.h, s = _ref10.s, v = _ref10.v;
|
|
2200
2204
|
return {
|
|
2201
2205
|
h,
|
|
2202
2206
|
s,
|
|
@@ -2204,11 +2208,7 @@ var hsvaToHsv = (_ref10) => {
|
|
|
2204
2208
|
};
|
|
2205
2209
|
};
|
|
2206
2210
|
var rgbToXY = (_ref12) => {
|
|
2207
|
-
var
|
|
2208
|
-
r,
|
|
2209
|
-
g,
|
|
2210
|
-
b
|
|
2211
|
-
} = _ref12;
|
|
2211
|
+
var r = _ref12.r, g = _ref12.g, b = _ref12.b;
|
|
2212
2212
|
var translateColor = function translateColor2(color2) {
|
|
2213
2213
|
return color2 <= 0.04045 ? color2 / 12.92 : Math.pow((color2 + 0.055) / 1.055, 2.4);
|
|
2214
2214
|
};
|
|
@@ -2261,7 +2261,7 @@ var color = (str) => {
|
|
|
2261
2261
|
};
|
|
2262
2262
|
var validHex = (hex) => /^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);
|
|
2263
2263
|
|
|
2264
|
-
// node_modules/@uiw/react-drag-event-interactive/esm/index.js
|
|
2264
|
+
// ../node_modules/@uiw/react-drag-event-interactive/esm/index.js
|
|
2265
2265
|
var import_extends2 = __toESM(require_extends());
|
|
2266
2266
|
var import_objectWithoutPropertiesLoose = __toESM(require_objectWithoutPropertiesLoose());
|
|
2267
2267
|
function useEventCallback(handler) {
|
|
@@ -2297,16 +2297,11 @@ var getRelativePosition = (node, event) => {
|
|
|
2297
2297
|
};
|
|
2298
2298
|
};
|
|
2299
2299
|
var _excluded = ["prefixCls", "className", "onMove", "onDown"];
|
|
2300
|
-
var Interactive = /* @__PURE__ */
|
|
2301
|
-
var
|
|
2302
|
-
prefixCls = "w-color-interactive",
|
|
2303
|
-
className,
|
|
2304
|
-
onMove,
|
|
2305
|
-
onDown
|
|
2306
|
-
} = props, reset = (0, import_objectWithoutPropertiesLoose.default)(props, _excluded);
|
|
2300
|
+
var Interactive = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
|
|
2301
|
+
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);
|
|
2307
2302
|
var container = useRef(null);
|
|
2308
2303
|
var hasTouched = useRef(false);
|
|
2309
|
-
var [
|
|
2304
|
+
var _useState = useState(false), isDragging = _useState[0], setDragging = _useState[1];
|
|
2310
2305
|
var onMoveCallback = useEventCallback(onMove);
|
|
2311
2306
|
var onKeyCallback = useEventCallback(onDown);
|
|
2312
2307
|
var isValid = (event) => {
|
|
@@ -2365,13 +2360,7 @@ var Interactive = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
|
|
|
2365
2360
|
Interactive.displayName = "Interactive";
|
|
2366
2361
|
var esm_default = Interactive;
|
|
2367
2362
|
var Pointer = (_ref) => {
|
|
2368
|
-
var
|
|
2369
|
-
className,
|
|
2370
|
-
color: color2,
|
|
2371
|
-
left,
|
|
2372
|
-
top,
|
|
2373
|
-
prefixCls
|
|
2374
|
-
} = _ref;
|
|
2363
|
+
var className = _ref.className, color2 = _ref.color, left = _ref.left, top = _ref.top, prefixCls = _ref.prefixCls;
|
|
2375
2364
|
var style = {
|
|
2376
2365
|
position: "absolute",
|
|
2377
2366
|
top,
|
|
@@ -2396,18 +2385,9 @@ var Pointer = (_ref) => {
|
|
|
2396
2385
|
}), [top, left, color2, className, prefixCls]);
|
|
2397
2386
|
};
|
|
2398
2387
|
var _excluded2 = ["prefixCls", "radius", "pointer", "className", "hue", "style", "hsva", "onChange"];
|
|
2399
|
-
var Saturation = /* @__PURE__ */
|
|
2388
|
+
var Saturation = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
|
|
2400
2389
|
var _hsva$h;
|
|
2401
|
-
var
|
|
2402
|
-
prefixCls = "w-color-saturation",
|
|
2403
|
-
radius = 0,
|
|
2404
|
-
pointer,
|
|
2405
|
-
className,
|
|
2406
|
-
hue = 0,
|
|
2407
|
-
style,
|
|
2408
|
-
hsva,
|
|
2409
|
-
onChange
|
|
2410
|
-
} = props, other = (0, import_objectWithoutPropertiesLoose2.default)(props, _excluded2);
|
|
2390
|
+
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);
|
|
2411
2391
|
var containerStyle = (0, import_extends3.default)({
|
|
2412
2392
|
width: 200,
|
|
2413
2393
|
height: 200,
|
|
@@ -2415,7 +2395,16 @@ var Saturation = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
|
|
|
2415
2395
|
}, style, {
|
|
2416
2396
|
position: "relative"
|
|
2417
2397
|
});
|
|
2418
|
-
var
|
|
2398
|
+
var containerRef = useRef(null);
|
|
2399
|
+
var combinedRef = useCallback((node) => {
|
|
2400
|
+
containerRef.current = node;
|
|
2401
|
+
if (typeof ref === "function") {
|
|
2402
|
+
ref(node);
|
|
2403
|
+
} else if (ref && "current" in ref) {
|
|
2404
|
+
ref.current = node;
|
|
2405
|
+
}
|
|
2406
|
+
}, [ref]);
|
|
2407
|
+
var handleChange = useCallback((interaction, event) => {
|
|
2419
2408
|
onChange && hsva && onChange({
|
|
2420
2409
|
h: hsva.h,
|
|
2421
2410
|
s: interaction.left * 100,
|
|
@@ -2423,7 +2412,11 @@ var Saturation = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
|
|
|
2423
2412
|
a: hsva.a
|
|
2424
2413
|
// source: 'hsv',
|
|
2425
2414
|
});
|
|
2426
|
-
|
|
2415
|
+
var element = containerRef.current;
|
|
2416
|
+
if (element) {
|
|
2417
|
+
element.focus();
|
|
2418
|
+
}
|
|
2419
|
+
}, [hsva, onChange]);
|
|
2427
2420
|
var handleKeyDown = useCallback((event) => {
|
|
2428
2421
|
if (!hsva || !onChange) return;
|
|
2429
2422
|
var step = 1;
|
|
@@ -2493,7 +2486,7 @@ var Saturation = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
|
|
|
2493
2486
|
}, containerStyle, {
|
|
2494
2487
|
outline: "none"
|
|
2495
2488
|
}),
|
|
2496
|
-
ref,
|
|
2489
|
+
ref: combinedRef,
|
|
2497
2490
|
onMove: handleChange,
|
|
2498
2491
|
onDown: handleChange,
|
|
2499
2492
|
onKeyDown: handleKeyDown,
|
|
@@ -2504,23 +2497,16 @@ var Saturation = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
|
|
|
2504
2497
|
Saturation.displayName = "Saturation";
|
|
2505
2498
|
var esm_default2 = Saturation;
|
|
2506
2499
|
|
|
2507
|
-
// node_modules/@uiw/react-color-alpha/esm/index.js
|
|
2500
|
+
// ../node_modules/@uiw/react-color-alpha/esm/index.js
|
|
2508
2501
|
var import_extends5 = __toESM(require_extends());
|
|
2509
2502
|
var import_objectWithoutPropertiesLoose4 = __toESM(require_objectWithoutPropertiesLoose());
|
|
2510
2503
|
|
|
2511
|
-
// node_modules/@uiw/react-color-alpha/esm/Pointer.js
|
|
2504
|
+
// ../node_modules/@uiw/react-color-alpha/esm/Pointer.js
|
|
2512
2505
|
var import_extends4 = __toESM(require_extends());
|
|
2513
2506
|
var import_objectWithoutPropertiesLoose3 = __toESM(require_objectWithoutPropertiesLoose());
|
|
2514
2507
|
var _excluded3 = ["className", "prefixCls", "left", "top", "style", "fillProps"];
|
|
2515
2508
|
var Pointer2 = (_ref) => {
|
|
2516
|
-
var
|
|
2517
|
-
className,
|
|
2518
|
-
prefixCls,
|
|
2519
|
-
left,
|
|
2520
|
-
top,
|
|
2521
|
-
style,
|
|
2522
|
-
fillProps
|
|
2523
|
-
} = _ref, reset = (0, import_objectWithoutPropertiesLoose3.default)(_ref, _excluded3);
|
|
2509
|
+
var className = _ref.className, prefixCls = _ref.prefixCls, left = _ref.left, top = _ref.top, style = _ref.style, fillProps = _ref.fillProps, reset = (0, import_objectWithoutPropertiesLoose3.default)(_ref, _excluded3);
|
|
2524
2510
|
var styleWrapper = (0, import_extends4.default)({}, style, {
|
|
2525
2511
|
position: "absolute",
|
|
2526
2512
|
left,
|
|
@@ -2546,39 +2532,40 @@ var Pointer2 = (_ref) => {
|
|
|
2546
2532
|
}))
|
|
2547
2533
|
}));
|
|
2548
2534
|
};
|
|
2549
|
-
var _excluded4 = ["prefixCls", "className", "hsva", "background", "bgProps", "innerProps", "pointerProps", "radius", "width", "height", "direction", "style", "onChange", "pointer"];
|
|
2535
|
+
var _excluded4 = ["prefixCls", "className", "hsva", "background", "bgProps", "innerProps", "pointerProps", "radius", "width", "height", "direction", "reverse", "style", "onChange", "pointer"];
|
|
2550
2536
|
var BACKGROUND_IMG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==";
|
|
2551
|
-
var Alpha = /* @__PURE__ */
|
|
2552
|
-
var {
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
pointer
|
|
2567
|
-
} = props, other = (0, import_objectWithoutPropertiesLoose4.default)(props, _excluded4);
|
|
2537
|
+
var Alpha = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
|
|
2538
|
+
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);
|
|
2539
|
+
var offsetToAlpha = useCallback((offset) => {
|
|
2540
|
+
var value = direction === "horizontal" ? offset.left : offset.top;
|
|
2541
|
+
if (direction === "horizontal") {
|
|
2542
|
+
return reverse ? 1 - value : value;
|
|
2543
|
+
}
|
|
2544
|
+
return reverse ? value : 1 - value;
|
|
2545
|
+
}, [direction, reverse]);
|
|
2546
|
+
var alphaToOffset = useCallback((alpha) => {
|
|
2547
|
+
if (direction === "horizontal") {
|
|
2548
|
+
return reverse ? 1 - alpha : alpha;
|
|
2549
|
+
}
|
|
2550
|
+
return reverse ? alpha : 1 - alpha;
|
|
2551
|
+
}, [direction, reverse]);
|
|
2568
2552
|
var handleChange = (offset) => {
|
|
2553
|
+
var alpha = offsetToAlpha(offset);
|
|
2569
2554
|
onChange && onChange((0, import_extends5.default)({}, hsva, {
|
|
2570
|
-
a:
|
|
2555
|
+
a: alpha
|
|
2571
2556
|
}), offset);
|
|
2572
2557
|
};
|
|
2573
2558
|
var colorTo = hsvaToHslaString(Object.assign({}, hsva, {
|
|
2574
2559
|
a: 1
|
|
2575
2560
|
}));
|
|
2576
|
-
var
|
|
2561
|
+
var horizontalGradient = reverse ? "linear-gradient(to right, " + colorTo + " 0%, rgba(244, 67, 54, 0) 100%)" : "linear-gradient(to right, rgba(244, 67, 54, 0) 0%, " + colorTo + " 100%)";
|
|
2562
|
+
var verticalGradient = reverse ? "linear-gradient(to bottom, rgba(244, 67, 54, 0) 0%, " + colorTo + " 100%)" : "linear-gradient(to bottom, " + colorTo + " 0%, rgba(244, 67, 54, 0) 100%)";
|
|
2563
|
+
var innerBackground = direction === "horizontal" ? horizontalGradient : verticalGradient;
|
|
2577
2564
|
var comProps = {};
|
|
2578
2565
|
if (direction === "horizontal") {
|
|
2579
|
-
comProps.left = hsva.a * 100 + "%";
|
|
2566
|
+
comProps.left = alphaToOffset(hsva.a) * 100 + "%";
|
|
2580
2567
|
} else {
|
|
2581
|
-
comProps.top = hsva.a * 100 + "%";
|
|
2568
|
+
comProps.top = alphaToOffset(hsva.a) * 100 + "%";
|
|
2582
2569
|
}
|
|
2583
2570
|
var styleWrapper = (0, import_extends5.default)({
|
|
2584
2571
|
"--alpha-background-color": "#fff",
|
|
@@ -2600,25 +2587,25 @@ var Alpha = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
|
|
|
2600
2587
|
switch (event.key) {
|
|
2601
2588
|
case "ArrowLeft":
|
|
2602
2589
|
if (direction === "horizontal") {
|
|
2603
|
-
newAlpha = Math.max(0, currentAlpha - step);
|
|
2590
|
+
newAlpha = reverse ? Math.min(1, currentAlpha + step) : Math.max(0, currentAlpha - step);
|
|
2604
2591
|
event.preventDefault();
|
|
2605
2592
|
}
|
|
2606
2593
|
break;
|
|
2607
2594
|
case "ArrowRight":
|
|
2608
2595
|
if (direction === "horizontal") {
|
|
2609
|
-
newAlpha = Math.min(1, currentAlpha + step);
|
|
2596
|
+
newAlpha = reverse ? Math.max(0, currentAlpha - step) : Math.min(1, currentAlpha + step);
|
|
2610
2597
|
event.preventDefault();
|
|
2611
2598
|
}
|
|
2612
2599
|
break;
|
|
2613
2600
|
case "ArrowUp":
|
|
2614
2601
|
if (direction === "vertical") {
|
|
2615
|
-
newAlpha = Math.max(0, currentAlpha - step);
|
|
2602
|
+
newAlpha = reverse ? Math.max(0, currentAlpha - step) : Math.min(1, currentAlpha + step);
|
|
2616
2603
|
event.preventDefault();
|
|
2617
2604
|
}
|
|
2618
2605
|
break;
|
|
2619
2606
|
case "ArrowDown":
|
|
2620
2607
|
if (direction === "vertical") {
|
|
2621
|
-
newAlpha = Math.min(1, currentAlpha + step);
|
|
2608
|
+
newAlpha = reverse ? Math.min(1, currentAlpha + step) : Math.max(0, currentAlpha - step);
|
|
2622
2609
|
event.preventDefault();
|
|
2623
2610
|
}
|
|
2624
2611
|
break;
|
|
@@ -2626,9 +2613,10 @@ var Alpha = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
|
|
|
2626
2613
|
return;
|
|
2627
2614
|
}
|
|
2628
2615
|
if (newAlpha !== currentAlpha) {
|
|
2616
|
+
var syntheticAxisOffset = alphaToOffset(newAlpha);
|
|
2629
2617
|
var syntheticOffset = {
|
|
2630
|
-
left: direction === "horizontal" ?
|
|
2631
|
-
top: direction === "vertical" ?
|
|
2618
|
+
left: direction === "horizontal" ? syntheticAxisOffset : hsva.a,
|
|
2619
|
+
top: direction === "vertical" ? syntheticAxisOffset : hsva.a,
|
|
2632
2620
|
width: 0,
|
|
2633
2621
|
height: 0,
|
|
2634
2622
|
x: 0,
|
|
@@ -2638,7 +2626,7 @@ var Alpha = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
|
|
|
2638
2626
|
a: newAlpha
|
|
2639
2627
|
}), syntheticOffset);
|
|
2640
2628
|
}
|
|
2641
|
-
}, [hsva, direction, onChange]);
|
|
2629
|
+
}, [alphaToOffset, hsva, direction, onChange, reverse]);
|
|
2642
2630
|
var handleClick = useCallback((event) => {
|
|
2643
2631
|
event.target.focus();
|
|
2644
2632
|
}, []);
|
|
@@ -2676,28 +2664,18 @@ var Alpha = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
|
|
|
2676
2664
|
Alpha.displayName = "Alpha";
|
|
2677
2665
|
var esm_default3 = Alpha;
|
|
2678
2666
|
|
|
2679
|
-
// node_modules/@uiw/react-color-editable-input/esm/index.js
|
|
2667
|
+
// ../node_modules/@uiw/react-color-editable-input/esm/index.js
|
|
2680
2668
|
var import_extends6 = __toESM(require_extends());
|
|
2681
2669
|
var import_objectWithoutPropertiesLoose5 = __toESM(require_objectWithoutPropertiesLoose());
|
|
2682
2670
|
var _excluded5 = ["prefixCls", "placement", "label", "value", "className", "style", "labelStyle", "inputStyle", "onChange", "onBlur", "renderInput"];
|
|
2683
2671
|
var validHex2 = (hex) => /^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);
|
|
2684
2672
|
var getNumberValue = (value) => Number(String(value).replace(/%/g, ""));
|
|
2685
|
-
var EditableInput = /* @__PURE__ */
|
|
2686
|
-
var
|
|
2687
|
-
|
|
2688
|
-
placement = "bottom",
|
|
2689
|
-
label,
|
|
2690
|
-
value: initValue,
|
|
2691
|
-
className,
|
|
2692
|
-
style,
|
|
2693
|
-
labelStyle,
|
|
2694
|
-
inputStyle,
|
|
2695
|
-
onChange,
|
|
2696
|
-
onBlur,
|
|
2697
|
-
renderInput
|
|
2698
|
-
} = props, other = (0, import_objectWithoutPropertiesLoose5.default)(props, _excluded5);
|
|
2699
|
-
var [value, setValue] = useState(initValue);
|
|
2673
|
+
var EditableInput = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
|
|
2674
|
+
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);
|
|
2675
|
+
var _useState = useState(initValue), value = _useState[0], setValue = _useState[1];
|
|
2700
2676
|
var isFocus = useRef(false);
|
|
2677
|
+
var inputIdRef = useRef(other.id || prefixCls + "-" + Math.random().toString(36).slice(2, 11));
|
|
2678
|
+
var inputId = other.id || inputIdRef.current;
|
|
2701
2679
|
useEffect(() => {
|
|
2702
2680
|
if (props.value !== value) {
|
|
2703
2681
|
if (!isFocus.current) {
|
|
@@ -2760,6 +2738,7 @@ var EditableInput = /* @__PURE__ */ React25__default.forwardRef((props, ref) =>
|
|
|
2760
2738
|
autoComplete: "off",
|
|
2761
2739
|
onFocus: () => isFocus.current = true
|
|
2762
2740
|
}, other, {
|
|
2741
|
+
id: inputId,
|
|
2763
2742
|
style: editableStyle,
|
|
2764
2743
|
onFocusCapture: (e) => {
|
|
2765
2744
|
var elm = e.target;
|
|
@@ -2771,7 +2750,8 @@ var EditableInput = /* @__PURE__ */ React25__default.forwardRef((props, ref) =>
|
|
|
2771
2750
|
style: wrapperStyle,
|
|
2772
2751
|
children: [renderInput ? renderInput(inputProps, ref) : /* @__PURE__ */ jsx("input", (0, import_extends6.default)({
|
|
2773
2752
|
ref
|
|
2774
|
-
}, inputProps)), label && /* @__PURE__ */ jsx("
|
|
2753
|
+
}, inputProps)), label && /* @__PURE__ */ jsx("label", {
|
|
2754
|
+
htmlFor: inputId,
|
|
2775
2755
|
style: (0, import_extends6.default)({
|
|
2776
2756
|
color: "var(--editable-input-label-color)",
|
|
2777
2757
|
textTransform: "capitalize"
|
|
@@ -2783,23 +2763,12 @@ var EditableInput = /* @__PURE__ */ React25__default.forwardRef((props, ref) =>
|
|
|
2783
2763
|
EditableInput.displayName = "EditableInput";
|
|
2784
2764
|
var esm_default4 = EditableInput;
|
|
2785
2765
|
|
|
2786
|
-
// node_modules/@uiw/react-color-editable-input-rgba/esm/index.js
|
|
2766
|
+
// ../node_modules/@uiw/react-color-editable-input-rgba/esm/index.js
|
|
2787
2767
|
var import_extends7 = __toESM(require_extends());
|
|
2788
2768
|
var import_objectWithoutPropertiesLoose6 = __toESM(require_objectWithoutPropertiesLoose());
|
|
2789
2769
|
var _excluded6 = ["prefixCls", "hsva", "placement", "rProps", "gProps", "bProps", "aProps", "className", "style", "onChange"];
|
|
2790
|
-
var EditableInputRGBA = /* @__PURE__ */
|
|
2791
|
-
var {
|
|
2792
|
-
prefixCls = "w-color-editable-input-rgba",
|
|
2793
|
-
hsva,
|
|
2794
|
-
placement = "bottom",
|
|
2795
|
-
rProps = {},
|
|
2796
|
-
gProps = {},
|
|
2797
|
-
bProps = {},
|
|
2798
|
-
aProps = {},
|
|
2799
|
-
className,
|
|
2800
|
-
style,
|
|
2801
|
-
onChange
|
|
2802
|
-
} = props, other = (0, import_objectWithoutPropertiesLoose6.default)(props, _excluded6);
|
|
2770
|
+
var EditableInputRGBA = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
|
|
2771
|
+
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);
|
|
2803
2772
|
var rgba = hsva ? hsvaToRgba(hsva) : {};
|
|
2804
2773
|
function handleBlur(evn) {
|
|
2805
2774
|
var value = Number(evn.target.value);
|
|
@@ -2879,7 +2848,7 @@ var EditableInputRGBA = /* @__PURE__ */ React25__default.forwardRef((props, ref)
|
|
|
2879
2848
|
}, gProps, {
|
|
2880
2849
|
style: (0, import_extends7.default)({
|
|
2881
2850
|
marginLeft: 5
|
|
2882
|
-
},
|
|
2851
|
+
}, gProps.style)
|
|
2883
2852
|
})), /* @__PURE__ */ jsx(esm_default4, (0, import_extends7.default)({
|
|
2884
2853
|
label: "B",
|
|
2885
2854
|
value: rgba.b || 0,
|
|
@@ -2906,24 +2875,43 @@ var EditableInputRGBA = /* @__PURE__ */ React25__default.forwardRef((props, ref)
|
|
|
2906
2875
|
EditableInputRGBA.displayName = "EditableInputRGBA";
|
|
2907
2876
|
var esm_default5 = EditableInputRGBA;
|
|
2908
2877
|
|
|
2909
|
-
// node_modules/@uiw/react-color-hue/esm/index.js
|
|
2878
|
+
// ../node_modules/@uiw/react-color-hue/esm/index.js
|
|
2910
2879
|
var import_extends8 = __toESM(require_extends());
|
|
2911
2880
|
var import_objectWithoutPropertiesLoose7 = __toESM(require_objectWithoutPropertiesLoose());
|
|
2912
|
-
var _excluded7 = ["prefixCls", "className", "hue", "onChange", "direction"];
|
|
2913
|
-
var
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2881
|
+
var _excluded7 = ["prefixCls", "className", "hue", "onChange", "direction", "reverse"];
|
|
2882
|
+
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%";
|
|
2883
|
+
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%";
|
|
2884
|
+
var Hue = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
|
|
2885
|
+
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);
|
|
2886
|
+
var getGradientBackground = useCallback(() => {
|
|
2887
|
+
if (direction === "horizontal") {
|
|
2888
|
+
var colors = reverse ? REVERSED_COLORS : NORMAL_COLORS;
|
|
2889
|
+
var gradientDirection = "right";
|
|
2890
|
+
return "linear-gradient(to " + gradientDirection + ", " + colors + ")";
|
|
2891
|
+
} else {
|
|
2892
|
+
var _colors = reverse ? NORMAL_COLORS : REVERSED_COLORS;
|
|
2893
|
+
var _gradientDirection = "bottom";
|
|
2894
|
+
return "linear-gradient(to " + _gradientDirection + ", " + _colors + ")";
|
|
2895
|
+
}
|
|
2896
|
+
}, [direction, reverse]);
|
|
2897
|
+
var getHueFromInteraction = useCallback((interaction) => {
|
|
2898
|
+
var value = direction === "horizontal" ? interaction.left : interaction.top;
|
|
2899
|
+
var normalizedValue;
|
|
2900
|
+
if (direction === "horizontal") {
|
|
2901
|
+
normalizedValue = reverse ? 1 - value : value;
|
|
2902
|
+
} else {
|
|
2903
|
+
normalizedValue = reverse ? value : 1 - value;
|
|
2904
|
+
}
|
|
2905
|
+
return 360 * normalizedValue;
|
|
2906
|
+
}, [direction, reverse]);
|
|
2907
|
+
var gradientBackground = useMemo(() => getGradientBackground(), [getGradientBackground]);
|
|
2921
2908
|
return /* @__PURE__ */ jsx(esm_default3, (0, import_extends8.default)({
|
|
2922
2909
|
ref,
|
|
2923
2910
|
className: prefixCls + " " + (className || "")
|
|
2924
2911
|
}, other, {
|
|
2925
2912
|
direction,
|
|
2926
|
-
|
|
2913
|
+
reverse,
|
|
2914
|
+
background: gradientBackground,
|
|
2927
2915
|
hsva: {
|
|
2928
2916
|
h: hue,
|
|
2929
2917
|
s: 100,
|
|
@@ -2932,7 +2920,7 @@ var Hue = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
|
|
|
2932
2920
|
},
|
|
2933
2921
|
onChange: (_, interaction) => {
|
|
2934
2922
|
_onChange && _onChange({
|
|
2935
|
-
h:
|
|
2923
|
+
h: getHueFromInteraction(interaction)
|
|
2936
2924
|
});
|
|
2937
2925
|
}
|
|
2938
2926
|
}));
|
|
@@ -2940,23 +2928,12 @@ var Hue = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
|
|
|
2940
2928
|
Hue.displayName = "Hue";
|
|
2941
2929
|
var esm_default6 = Hue;
|
|
2942
2930
|
|
|
2943
|
-
// node_modules/@uiw/react-color-swatch/esm/index.js
|
|
2931
|
+
// ../node_modules/@uiw/react-color-swatch/esm/index.js
|
|
2944
2932
|
var import_extends9 = __toESM(require_extends());
|
|
2945
2933
|
var import_objectWithoutPropertiesLoose8 = __toESM(require_objectWithoutPropertiesLoose());
|
|
2946
2934
|
var _excluded8 = ["prefixCls", "className", "color", "colors", "style", "rectProps", "onChange", "addonAfter", "addonBefore", "rectRender"];
|
|
2947
|
-
var Swatch = /* @__PURE__ */
|
|
2948
|
-
var {
|
|
2949
|
-
prefixCls = "w-color-swatch",
|
|
2950
|
-
className,
|
|
2951
|
-
color: color2,
|
|
2952
|
-
colors = [],
|
|
2953
|
-
style,
|
|
2954
|
-
rectProps = {},
|
|
2955
|
-
onChange,
|
|
2956
|
-
addonAfter,
|
|
2957
|
-
addonBefore,
|
|
2958
|
-
rectRender
|
|
2959
|
-
} = props, other = (0, import_objectWithoutPropertiesLoose8.default)(props, _excluded8);
|
|
2935
|
+
var Swatch = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
|
|
2936
|
+
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);
|
|
2960
2937
|
var rectStyle = (0, import_extends9.default)({
|
|
2961
2938
|
"--swatch-background-color": "rgb(144, 19, 254)",
|
|
2962
2939
|
background: "var(--swatch-background-color)",
|
|
@@ -2981,7 +2958,7 @@ var Swatch = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
|
|
|
2981
2958
|
flexWrap: "wrap",
|
|
2982
2959
|
position: "relative"
|
|
2983
2960
|
}, style),
|
|
2984
|
-
children: [addonBefore && /* @__PURE__ */
|
|
2961
|
+
children: [addonBefore && /* @__PURE__ */ React26__default.isValidElement(addonBefore) && addonBefore, colors && Array.isArray(colors) && colors.map((item, idx) => {
|
|
2985
2962
|
var title = "";
|
|
2986
2963
|
var background = "";
|
|
2987
2964
|
if (typeof item === "string") {
|
|
@@ -3007,7 +2984,7 @@ var Swatch = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
|
|
|
3007
2984
|
children: render
|
|
3008
2985
|
}, idx);
|
|
3009
2986
|
}
|
|
3010
|
-
var child = rectProps.children && /* @__PURE__ */
|
|
2987
|
+
var child = rectProps.children && /* @__PURE__ */ React26__default.isValidElement(rectProps.children) ? /* @__PURE__ */ React26__default.cloneElement(rectProps.children, {
|
|
3011
2988
|
color: background,
|
|
3012
2989
|
checked
|
|
3013
2990
|
}) : null;
|
|
@@ -3021,7 +2998,7 @@ var Swatch = /* @__PURE__ */ React25__default.forwardRef((props, ref) => {
|
|
|
3021
2998
|
background
|
|
3022
2999
|
})
|
|
3023
3000
|
}), idx);
|
|
3024
|
-
}), addonAfter && /* @__PURE__ */
|
|
3001
|
+
}), addonAfter && /* @__PURE__ */ React26__default.isValidElement(addonAfter) && addonAfter]
|
|
3025
3002
|
}));
|
|
3026
3003
|
});
|
|
3027
3004
|
Swatch.displayName = "Swatch";
|
|
@@ -3040,24 +3017,14 @@ var Bar = (props) => /* @__PURE__ */ jsx("div", {
|
|
|
3040
3017
|
backgroundColor: "#fff"
|
|
3041
3018
|
}
|
|
3042
3019
|
});
|
|
3043
|
-
var Sketch = /* @__PURE__ */
|
|
3044
|
-
var
|
|
3045
|
-
|
|
3046
|
-
className,
|
|
3047
|
-
onChange,
|
|
3048
|
-
width = 218,
|
|
3049
|
-
presetColors = PRESET_COLORS,
|
|
3050
|
-
color: color2,
|
|
3051
|
-
editableDisable = true,
|
|
3052
|
-
disableAlpha = false,
|
|
3053
|
-
style
|
|
3054
|
-
} = props, other = (0, import_objectWithoutPropertiesLoose9.default)(props, _excluded9);
|
|
3055
|
-
var [hsva, setHsva] = useState({
|
|
3020
|
+
var Sketch = /* @__PURE__ */ React26__default.forwardRef((props, ref) => {
|
|
3021
|
+
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);
|
|
3022
|
+
var _useState = useState({
|
|
3056
3023
|
h: 209,
|
|
3057
3024
|
s: 36,
|
|
3058
3025
|
v: 90,
|
|
3059
3026
|
a: 1
|
|
3060
|
-
});
|
|
3027
|
+
}), hsva = _useState[0], setHsva = _useState[1];
|
|
3061
3028
|
useEffect(() => {
|
|
3062
3029
|
if (typeof color2 === "string" && validHex(color2)) {
|
|
3063
3030
|
setHsva(hexToHsva(color2));
|
|
@@ -3291,19 +3258,19 @@ var Toolbar = ({
|
|
|
3291
3258
|
on_attachments_change,
|
|
3292
3259
|
disabled = false
|
|
3293
3260
|
}) => {
|
|
3294
|
-
const [link_url, set_link_url] =
|
|
3295
|
-
const [link_popover_open, set_link_popover_open] =
|
|
3296
|
-
const [text_color_open, set_text_color_open] =
|
|
3297
|
-
const [highlight_color_open, set_highlight_color_open] =
|
|
3298
|
-
const [variables_menu_open, set_variables_menu_open] =
|
|
3299
|
-
const [table_menu_open, set_table_menu_open] =
|
|
3300
|
-
const [text_color, set_text_color] =
|
|
3301
|
-
const [highlight_color, set_highlight_color] =
|
|
3302
|
-
const [table_rows, set_table_rows] =
|
|
3303
|
-
const [table_cols, set_table_cols] =
|
|
3304
|
-
const [hovered_cell, set_hovered_cell] =
|
|
3305
|
-
const file_input_ref =
|
|
3306
|
-
const image_input_ref =
|
|
3261
|
+
const [link_url, set_link_url] = React26.useState("https://");
|
|
3262
|
+
const [link_popover_open, set_link_popover_open] = React26.useState(false);
|
|
3263
|
+
const [text_color_open, set_text_color_open] = React26.useState(false);
|
|
3264
|
+
const [highlight_color_open, set_highlight_color_open] = React26.useState(false);
|
|
3265
|
+
const [variables_menu_open, set_variables_menu_open] = React26.useState(false);
|
|
3266
|
+
const [table_menu_open, set_table_menu_open] = React26.useState(false);
|
|
3267
|
+
const [text_color, set_text_color] = React26.useState("#000000");
|
|
3268
|
+
const [highlight_color, set_highlight_color] = React26.useState("#ffff00");
|
|
3269
|
+
const [table_rows, set_table_rows] = React26.useState(3);
|
|
3270
|
+
const [table_cols, set_table_cols] = React26.useState(3);
|
|
3271
|
+
const [hovered_cell, set_hovered_cell] = React26.useState(null);
|
|
3272
|
+
const file_input_ref = React26.useRef(null);
|
|
3273
|
+
const image_input_ref = React26.useRef(null);
|
|
3307
3274
|
if (!editor) {
|
|
3308
3275
|
return null;
|
|
3309
3276
|
}
|
|
@@ -4236,7 +4203,7 @@ var VariableExtension = Node.create({
|
|
|
4236
4203
|
}
|
|
4237
4204
|
});
|
|
4238
4205
|
var Tabs = TabsPrimitive.Root;
|
|
4239
|
-
var TabsList =
|
|
4206
|
+
var TabsList = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4240
4207
|
TabsPrimitive.List,
|
|
4241
4208
|
{
|
|
4242
4209
|
ref,
|
|
@@ -4248,7 +4215,7 @@ var TabsList = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
4248
4215
|
}
|
|
4249
4216
|
));
|
|
4250
4217
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
4251
|
-
var TabsTrigger =
|
|
4218
|
+
var TabsTrigger = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4252
4219
|
TabsPrimitive.Trigger,
|
|
4253
4220
|
{
|
|
4254
4221
|
ref,
|
|
@@ -4260,7 +4227,7 @@ var TabsTrigger = React25.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4260
4227
|
}
|
|
4261
4228
|
));
|
|
4262
4229
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
4263
|
-
var TabsContent =
|
|
4230
|
+
var TabsContent = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4264
4231
|
TabsPrimitive.Content,
|
|
4265
4232
|
{
|
|
4266
4233
|
ref,
|
|
@@ -4295,14 +4262,14 @@ var HazoUiRte = ({
|
|
|
4295
4262
|
className,
|
|
4296
4263
|
show_output_viewer = false
|
|
4297
4264
|
}) => {
|
|
4298
|
-
const [attachments, set_attachments] =
|
|
4265
|
+
const [attachments, set_attachments] = React26.useState(
|
|
4299
4266
|
initial_attachments
|
|
4300
4267
|
);
|
|
4301
|
-
const [active_tab, set_active_tab] =
|
|
4268
|
+
const [active_tab, set_active_tab] = React26.useState("html");
|
|
4302
4269
|
const is_view_only = active_tab !== "html";
|
|
4303
|
-
const attachments_ref =
|
|
4270
|
+
const attachments_ref = React26.useRef(attachments);
|
|
4304
4271
|
attachments_ref.current = attachments;
|
|
4305
|
-
const debounced_on_change =
|
|
4272
|
+
const debounced_on_change = React26.useMemo(
|
|
4306
4273
|
() => debounce_fn((output) => {
|
|
4307
4274
|
if (on_change) {
|
|
4308
4275
|
on_change(output);
|
|
@@ -4401,7 +4368,7 @@ var HazoUiRte = ({
|
|
|
4401
4368
|
debounced_on_change(output);
|
|
4402
4369
|
}
|
|
4403
4370
|
});
|
|
4404
|
-
|
|
4371
|
+
React26.useEffect(() => {
|
|
4405
4372
|
if (editor && html !== void 0) {
|
|
4406
4373
|
const current_html = editor.getHTML();
|
|
4407
4374
|
if (html !== current_html && !editor.isFocused) {
|
|
@@ -4409,21 +4376,21 @@ var HazoUiRte = ({
|
|
|
4409
4376
|
}
|
|
4410
4377
|
}
|
|
4411
4378
|
}, [html, editor]);
|
|
4412
|
-
|
|
4379
|
+
React26.useEffect(() => {
|
|
4413
4380
|
if (editor) {
|
|
4414
4381
|
editor.setEditable(!disabled);
|
|
4415
4382
|
}
|
|
4416
4383
|
}, [disabled, editor]);
|
|
4417
|
-
const attachments_from_props_ref =
|
|
4418
|
-
const prev_initial_attachments_ref =
|
|
4419
|
-
|
|
4384
|
+
const attachments_from_props_ref = React26.useRef(false);
|
|
4385
|
+
const prev_initial_attachments_ref = React26.useRef(initial_attachments);
|
|
4386
|
+
React26.useEffect(() => {
|
|
4420
4387
|
if (JSON.stringify(initial_attachments) !== JSON.stringify(prev_initial_attachments_ref.current)) {
|
|
4421
4388
|
prev_initial_attachments_ref.current = initial_attachments;
|
|
4422
4389
|
attachments_from_props_ref.current = true;
|
|
4423
4390
|
set_attachments(initial_attachments);
|
|
4424
4391
|
}
|
|
4425
4392
|
}, [initial_attachments]);
|
|
4426
|
-
|
|
4393
|
+
React26.useEffect(() => {
|
|
4427
4394
|
if (attachments_from_props_ref.current) {
|
|
4428
4395
|
attachments_from_props_ref.current = false;
|
|
4429
4396
|
return;
|
|
@@ -4925,12 +4892,12 @@ var CommandPopover = ({
|
|
|
4925
4892
|
on_selection_change: _on_selection_change,
|
|
4926
4893
|
prefix_color
|
|
4927
4894
|
}) => {
|
|
4928
|
-
const container_ref =
|
|
4929
|
-
const grouped_commands =
|
|
4895
|
+
const container_ref = React26.useRef(null);
|
|
4896
|
+
const grouped_commands = React26.useMemo(
|
|
4930
4897
|
() => group_commands(commands),
|
|
4931
4898
|
[commands]
|
|
4932
4899
|
);
|
|
4933
|
-
|
|
4900
|
+
React26.useEffect(() => {
|
|
4934
4901
|
const handle_click_outside = (e) => {
|
|
4935
4902
|
if (container_ref.current && !container_ref.current.contains(e.target)) {
|
|
4936
4903
|
on_close();
|
|
@@ -4943,8 +4910,8 @@ var CommandPopover = ({
|
|
|
4943
4910
|
};
|
|
4944
4911
|
}
|
|
4945
4912
|
}, [is_open, on_close]);
|
|
4946
|
-
const [mounted, set_mounted] =
|
|
4947
|
-
|
|
4913
|
+
const [mounted, set_mounted] = React26.useState(false);
|
|
4914
|
+
React26.useEffect(() => {
|
|
4948
4915
|
set_mounted(true);
|
|
4949
4916
|
}, []);
|
|
4950
4917
|
if (!is_open || !mounted) return null;
|
|
@@ -5254,21 +5221,21 @@ var HazoUiTextbox = ({
|
|
|
5254
5221
|
on_command_change,
|
|
5255
5222
|
on_command_remove
|
|
5256
5223
|
}) => {
|
|
5257
|
-
const generated_instance_id =
|
|
5224
|
+
const generated_instance_id = React26.useId();
|
|
5258
5225
|
const instance_id = provided_instance_id || generated_instance_id;
|
|
5259
|
-
const [suggestion_state, set_suggestion_state] =
|
|
5260
|
-
const [selected_index, set_selected_index] =
|
|
5261
|
-
const [popover_position, set_popover_position] =
|
|
5262
|
-
const [edit_context, set_edit_context] =
|
|
5263
|
-
const [edit_selected_index, set_edit_selected_index] =
|
|
5226
|
+
const [suggestion_state, set_suggestion_state] = React26.useState(null);
|
|
5227
|
+
const [selected_index, set_selected_index] = React26.useState(0);
|
|
5228
|
+
const [popover_position, set_popover_position] = React26.useState({ top: 0, left: 0 });
|
|
5229
|
+
const [edit_context, set_edit_context] = React26.useState(null);
|
|
5230
|
+
const [edit_selected_index, set_edit_selected_index] = React26.useState(0);
|
|
5264
5231
|
const is_controlled = value !== void 0;
|
|
5265
|
-
const editor_container_ref =
|
|
5266
|
-
const edit_popover_ref =
|
|
5267
|
-
const [mounted, set_mounted] =
|
|
5268
|
-
|
|
5232
|
+
const editor_container_ref = React26.useRef(null);
|
|
5233
|
+
const edit_popover_ref = React26.useRef(null);
|
|
5234
|
+
const [mounted, set_mounted] = React26.useState(false);
|
|
5235
|
+
React26.useEffect(() => {
|
|
5269
5236
|
set_mounted(true);
|
|
5270
5237
|
}, []);
|
|
5271
|
-
const suggestion_extensions =
|
|
5238
|
+
const suggestion_extensions = React26.useMemo(() => {
|
|
5272
5239
|
return create_command_suggestion_extension({
|
|
5273
5240
|
prefixes,
|
|
5274
5241
|
instance_id,
|
|
@@ -5319,7 +5286,7 @@ var HazoUiTextbox = ({
|
|
|
5319
5286
|
}
|
|
5320
5287
|
}
|
|
5321
5288
|
});
|
|
5322
|
-
|
|
5289
|
+
React26.useEffect(() => {
|
|
5323
5290
|
if (suggestion_state?.is_active && editor) {
|
|
5324
5291
|
requestAnimationFrame(() => {
|
|
5325
5292
|
const { from } = suggestion_state.range;
|
|
@@ -5343,7 +5310,7 @@ var HazoUiTextbox = ({
|
|
|
5343
5310
|
});
|
|
5344
5311
|
}
|
|
5345
5312
|
}, [suggestion_state, editor]);
|
|
5346
|
-
|
|
5313
|
+
React26.useEffect(() => {
|
|
5347
5314
|
if (is_controlled && editor && !editor.isFocused) {
|
|
5348
5315
|
const current_text = editor.getText();
|
|
5349
5316
|
if (value !== current_text) {
|
|
@@ -5352,12 +5319,12 @@ var HazoUiTextbox = ({
|
|
|
5352
5319
|
}
|
|
5353
5320
|
}
|
|
5354
5321
|
}, [value, editor, is_controlled, prefixes, pill_variant]);
|
|
5355
|
-
|
|
5322
|
+
React26.useEffect(() => {
|
|
5356
5323
|
if (editor) {
|
|
5357
5324
|
editor.setEditable(!disabled);
|
|
5358
5325
|
}
|
|
5359
5326
|
}, [disabled, editor]);
|
|
5360
|
-
const handle_command_select =
|
|
5327
|
+
const handle_command_select = React26.useCallback(
|
|
5361
5328
|
(command) => {
|
|
5362
5329
|
if (!editor || !suggestion_state) return;
|
|
5363
5330
|
const prefix_config = prefixes.find((p) => p.char === suggestion_state.prefix);
|
|
@@ -5377,15 +5344,15 @@ var HazoUiTextbox = ({
|
|
|
5377
5344
|
},
|
|
5378
5345
|
[editor, suggestion_state, pill_variant, on_command_insert, prefixes]
|
|
5379
5346
|
);
|
|
5380
|
-
const handle_popover_close =
|
|
5347
|
+
const handle_popover_close = React26.useCallback(() => {
|
|
5381
5348
|
set_suggestion_state(null);
|
|
5382
5349
|
editor?.commands.focus();
|
|
5383
5350
|
}, [editor]);
|
|
5384
|
-
const handle_edit_close =
|
|
5351
|
+
const handle_edit_close = React26.useCallback(() => {
|
|
5385
5352
|
set_edit_context(null);
|
|
5386
5353
|
editor?.commands.focus();
|
|
5387
5354
|
}, [editor]);
|
|
5388
|
-
const handle_command_update =
|
|
5355
|
+
const handle_command_update = React26.useCallback(
|
|
5389
5356
|
(new_command) => {
|
|
5390
5357
|
if (!editor || !edit_context) return;
|
|
5391
5358
|
const old_command = edit_context.command;
|
|
@@ -5401,7 +5368,7 @@ var HazoUiTextbox = ({
|
|
|
5401
5368
|
},
|
|
5402
5369
|
[editor, edit_context, on_command_change]
|
|
5403
5370
|
);
|
|
5404
|
-
const handle_command_remove =
|
|
5371
|
+
const handle_command_remove = React26.useCallback(() => {
|
|
5405
5372
|
if (!editor || !edit_context) return;
|
|
5406
5373
|
const command = edit_context.command;
|
|
5407
5374
|
editor.state.doc.descendants((node, pos) => {
|
|
@@ -5415,7 +5382,7 @@ var HazoUiTextbox = ({
|
|
|
5415
5382
|
}
|
|
5416
5383
|
set_edit_context(null);
|
|
5417
5384
|
}, [editor, edit_context, on_command_remove]);
|
|
5418
|
-
const filtered_commands =
|
|
5385
|
+
const filtered_commands = React26.useMemo(() => {
|
|
5419
5386
|
if (!suggestion_state) return [];
|
|
5420
5387
|
const query = suggestion_state.query.toLowerCase();
|
|
5421
5388
|
if (!query) return suggestion_state.commands;
|
|
@@ -5423,7 +5390,7 @@ var HazoUiTextbox = ({
|
|
|
5423
5390
|
(cmd) => cmd.action_label.toLowerCase().includes(query) || cmd.action.toLowerCase().includes(query) || cmd.action_description?.toLowerCase().includes(query)
|
|
5424
5391
|
);
|
|
5425
5392
|
}, [suggestion_state]);
|
|
5426
|
-
|
|
5393
|
+
React26.useEffect(() => {
|
|
5427
5394
|
if (!suggestion_state?.is_active) return;
|
|
5428
5395
|
const handle_keydown = (e) => {
|
|
5429
5396
|
switch (e.key) {
|
|
@@ -5458,7 +5425,7 @@ var HazoUiTextbox = ({
|
|
|
5458
5425
|
handle_command_select,
|
|
5459
5426
|
handle_popover_close
|
|
5460
5427
|
]);
|
|
5461
|
-
|
|
5428
|
+
React26.useEffect(() => {
|
|
5462
5429
|
if (!edit_context) return;
|
|
5463
5430
|
const handle_click_outside = (e) => {
|
|
5464
5431
|
if (edit_popover_ref.current && !edit_popover_ref.current.contains(e.target)) {
|
|
@@ -5473,12 +5440,12 @@ var HazoUiTextbox = ({
|
|
|
5473
5440
|
document.removeEventListener("mousedown", handle_click_outside);
|
|
5474
5441
|
};
|
|
5475
5442
|
}, [edit_context]);
|
|
5476
|
-
const edit_commands =
|
|
5443
|
+
const edit_commands = React26.useMemo(() => {
|
|
5477
5444
|
if (!edit_context) return [];
|
|
5478
5445
|
const prefix_config = prefixes.find((p) => p.char === edit_context.command.prefix);
|
|
5479
5446
|
return prefix_config?.commands || [];
|
|
5480
5447
|
}, [edit_context, prefixes]);
|
|
5481
|
-
|
|
5448
|
+
React26.useEffect(() => {
|
|
5482
5449
|
if (!edit_context) return;
|
|
5483
5450
|
const handle_keydown = (e) => {
|
|
5484
5451
|
switch (e.key) {
|
|
@@ -5516,7 +5483,7 @@ var HazoUiTextbox = ({
|
|
|
5516
5483
|
handle_command_remove,
|
|
5517
5484
|
handle_edit_close
|
|
5518
5485
|
]);
|
|
5519
|
-
|
|
5486
|
+
React26.useEffect(() => {
|
|
5520
5487
|
const handle_pill_click = (e) => {
|
|
5521
5488
|
const detail = e.detail;
|
|
5522
5489
|
const { id, prefix, action, action_label, node_pos } = detail;
|
|
@@ -5799,22 +5766,22 @@ var HazoUiTextarea = ({
|
|
|
5799
5766
|
on_command_change,
|
|
5800
5767
|
on_command_remove
|
|
5801
5768
|
}) => {
|
|
5802
|
-
const generated_instance_id =
|
|
5769
|
+
const generated_instance_id = React26.useId();
|
|
5803
5770
|
const instance_id = provided_instance_id || generated_instance_id;
|
|
5804
|
-
const [suggestion_state, set_suggestion_state] =
|
|
5805
|
-
const [selected_index, set_selected_index] =
|
|
5806
|
-
const [popover_position, set_popover_position] =
|
|
5807
|
-
const [edit_context, set_edit_context] =
|
|
5808
|
-
const [edit_selected_index, set_edit_selected_index] =
|
|
5771
|
+
const [suggestion_state, set_suggestion_state] = React26.useState(null);
|
|
5772
|
+
const [selected_index, set_selected_index] = React26.useState(0);
|
|
5773
|
+
const [popover_position, set_popover_position] = React26.useState({ top: 0, left: 0 });
|
|
5774
|
+
const [edit_context, set_edit_context] = React26.useState(null);
|
|
5775
|
+
const [edit_selected_index, set_edit_selected_index] = React26.useState(0);
|
|
5809
5776
|
const is_controlled = value !== void 0;
|
|
5810
|
-
const editor_container_ref =
|
|
5811
|
-
const edit_popover_ref =
|
|
5812
|
-
const [mounted, set_mounted] =
|
|
5813
|
-
|
|
5777
|
+
const editor_container_ref = React26.useRef(null);
|
|
5778
|
+
const edit_popover_ref = React26.useRef(null);
|
|
5779
|
+
const [mounted, set_mounted] = React26.useState(false);
|
|
5780
|
+
React26.useEffect(() => {
|
|
5814
5781
|
set_mounted(true);
|
|
5815
5782
|
}, []);
|
|
5816
5783
|
const calculated_min_height = rows ? `${rows * 1.5}em` : min_height;
|
|
5817
|
-
const suggestion_extensions =
|
|
5784
|
+
const suggestion_extensions = React26.useMemo(() => {
|
|
5818
5785
|
return create_command_suggestion_extension({
|
|
5819
5786
|
prefixes,
|
|
5820
5787
|
instance_id,
|
|
@@ -5863,7 +5830,7 @@ var HazoUiTextarea = ({
|
|
|
5863
5830
|
}
|
|
5864
5831
|
}
|
|
5865
5832
|
});
|
|
5866
|
-
|
|
5833
|
+
React26.useEffect(() => {
|
|
5867
5834
|
if (suggestion_state?.is_active && editor) {
|
|
5868
5835
|
requestAnimationFrame(() => {
|
|
5869
5836
|
const { from } = suggestion_state.range;
|
|
@@ -5887,7 +5854,7 @@ var HazoUiTextarea = ({
|
|
|
5887
5854
|
});
|
|
5888
5855
|
}
|
|
5889
5856
|
}, [suggestion_state, editor]);
|
|
5890
|
-
|
|
5857
|
+
React26.useEffect(() => {
|
|
5891
5858
|
if (is_controlled && editor && !editor.isFocused) {
|
|
5892
5859
|
const current_text = editor.getText();
|
|
5893
5860
|
if (value !== current_text) {
|
|
@@ -5900,12 +5867,12 @@ var HazoUiTextarea = ({
|
|
|
5900
5867
|
}
|
|
5901
5868
|
}
|
|
5902
5869
|
}, [value, editor, is_controlled, prefixes, pill_variant]);
|
|
5903
|
-
|
|
5870
|
+
React26.useEffect(() => {
|
|
5904
5871
|
if (editor) {
|
|
5905
5872
|
editor.setEditable(!disabled);
|
|
5906
5873
|
}
|
|
5907
5874
|
}, [disabled, editor]);
|
|
5908
|
-
const handle_command_select =
|
|
5875
|
+
const handle_command_select = React26.useCallback(
|
|
5909
5876
|
(command) => {
|
|
5910
5877
|
if (!editor || !suggestion_state) return;
|
|
5911
5878
|
const prefix_config = prefixes.find((p) => p.char === suggestion_state.prefix);
|
|
@@ -5925,15 +5892,15 @@ var HazoUiTextarea = ({
|
|
|
5925
5892
|
},
|
|
5926
5893
|
[editor, suggestion_state, pill_variant, on_command_insert, prefixes]
|
|
5927
5894
|
);
|
|
5928
|
-
const handle_popover_close =
|
|
5895
|
+
const handle_popover_close = React26.useCallback(() => {
|
|
5929
5896
|
set_suggestion_state(null);
|
|
5930
5897
|
editor?.commands.focus();
|
|
5931
5898
|
}, [editor]);
|
|
5932
|
-
const handle_edit_close =
|
|
5899
|
+
const handle_edit_close = React26.useCallback(() => {
|
|
5933
5900
|
set_edit_context(null);
|
|
5934
5901
|
editor?.commands.focus();
|
|
5935
5902
|
}, [editor]);
|
|
5936
|
-
const handle_command_update =
|
|
5903
|
+
const handle_command_update = React26.useCallback(
|
|
5937
5904
|
(new_command) => {
|
|
5938
5905
|
if (!editor || !edit_context) return;
|
|
5939
5906
|
const old_command = edit_context.command;
|
|
@@ -5949,7 +5916,7 @@ var HazoUiTextarea = ({
|
|
|
5949
5916
|
},
|
|
5950
5917
|
[editor, edit_context, on_command_change]
|
|
5951
5918
|
);
|
|
5952
|
-
const handle_command_remove =
|
|
5919
|
+
const handle_command_remove = React26.useCallback(() => {
|
|
5953
5920
|
if (!editor || !edit_context) return;
|
|
5954
5921
|
const command = edit_context.command;
|
|
5955
5922
|
editor.state.doc.descendants((node, pos) => {
|
|
@@ -5963,7 +5930,7 @@ var HazoUiTextarea = ({
|
|
|
5963
5930
|
}
|
|
5964
5931
|
set_edit_context(null);
|
|
5965
5932
|
}, [editor, edit_context, on_command_remove]);
|
|
5966
|
-
const filtered_commands =
|
|
5933
|
+
const filtered_commands = React26.useMemo(() => {
|
|
5967
5934
|
if (!suggestion_state) return [];
|
|
5968
5935
|
const query = suggestion_state.query.toLowerCase();
|
|
5969
5936
|
if (!query) return suggestion_state.commands;
|
|
@@ -5971,7 +5938,7 @@ var HazoUiTextarea = ({
|
|
|
5971
5938
|
(cmd) => cmd.action_label.toLowerCase().includes(query) || cmd.action.toLowerCase().includes(query) || cmd.action_description?.toLowerCase().includes(query)
|
|
5972
5939
|
);
|
|
5973
5940
|
}, [suggestion_state]);
|
|
5974
|
-
|
|
5941
|
+
React26.useEffect(() => {
|
|
5975
5942
|
if (!suggestion_state?.is_active) return;
|
|
5976
5943
|
const handle_keydown = (e) => {
|
|
5977
5944
|
switch (e.key) {
|
|
@@ -6006,7 +5973,7 @@ var HazoUiTextarea = ({
|
|
|
6006
5973
|
handle_command_select,
|
|
6007
5974
|
handle_popover_close
|
|
6008
5975
|
]);
|
|
6009
|
-
|
|
5976
|
+
React26.useEffect(() => {
|
|
6010
5977
|
if (!edit_context) return;
|
|
6011
5978
|
const handle_click_outside = (e) => {
|
|
6012
5979
|
if (edit_popover_ref.current && !edit_popover_ref.current.contains(e.target)) {
|
|
@@ -6021,12 +5988,12 @@ var HazoUiTextarea = ({
|
|
|
6021
5988
|
document.removeEventListener("mousedown", handle_click_outside);
|
|
6022
5989
|
};
|
|
6023
5990
|
}, [edit_context]);
|
|
6024
|
-
const edit_commands =
|
|
5991
|
+
const edit_commands = React26.useMemo(() => {
|
|
6025
5992
|
if (!edit_context) return [];
|
|
6026
5993
|
const prefix_config = prefixes.find((p) => p.char === edit_context.command.prefix);
|
|
6027
5994
|
return prefix_config?.commands || [];
|
|
6028
5995
|
}, [edit_context, prefixes]);
|
|
6029
|
-
|
|
5996
|
+
React26.useEffect(() => {
|
|
6030
5997
|
if (!edit_context) return;
|
|
6031
5998
|
const handle_keydown = (e) => {
|
|
6032
5999
|
switch (e.key) {
|
|
@@ -6064,7 +6031,7 @@ var HazoUiTextarea = ({
|
|
|
6064
6031
|
handle_command_remove,
|
|
6065
6032
|
handle_edit_close
|
|
6066
6033
|
]);
|
|
6067
|
-
|
|
6034
|
+
React26.useEffect(() => {
|
|
6068
6035
|
const handle_pill_click = (e) => {
|
|
6069
6036
|
const detail = e.detail;
|
|
6070
6037
|
const { id, prefix, action, action_label, node_pos } = detail;
|
|
@@ -6611,7 +6578,7 @@ function HazoUiConfirmDialog({
|
|
|
6611
6578
|
openAnimation = "zoom",
|
|
6612
6579
|
closeAnimation = "zoom"
|
|
6613
6580
|
}) {
|
|
6614
|
-
const [internal_loading, set_internal_loading] =
|
|
6581
|
+
const [internal_loading, set_internal_loading] = React26.useState(false);
|
|
6615
6582
|
const config = get_hazo_ui_config();
|
|
6616
6583
|
const variant_preset = variant !== "default" ? CONFIRM_VARIANT_PRESETS[variant] : void 0;
|
|
6617
6584
|
const is_loading = external_loading ?? internal_loading;
|
|
@@ -6648,7 +6615,7 @@ function HazoUiConfirmDialog({
|
|
|
6648
6615
|
onCancel?.();
|
|
6649
6616
|
onOpenChange(false);
|
|
6650
6617
|
};
|
|
6651
|
-
const cancel_ref =
|
|
6618
|
+
const cancel_ref = React26.useRef(null);
|
|
6652
6619
|
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
6653
6620
|
/* @__PURE__ */ jsx(
|
|
6654
6621
|
DialogOverlay,
|
|
@@ -6733,7 +6700,7 @@ Drawer.displayName = "Drawer";
|
|
|
6733
6700
|
var DrawerTrigger = Drawer$1.Trigger;
|
|
6734
6701
|
var DrawerPortal = Drawer$1.Portal;
|
|
6735
6702
|
var DrawerClose = Drawer$1.Close;
|
|
6736
|
-
var DrawerOverlay =
|
|
6703
|
+
var DrawerOverlay = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6737
6704
|
Drawer$1.Overlay,
|
|
6738
6705
|
{
|
|
6739
6706
|
ref,
|
|
@@ -6745,7 +6712,7 @@ var DrawerOverlay = React25.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
6745
6712
|
}
|
|
6746
6713
|
));
|
|
6747
6714
|
DrawerOverlay.displayName = "DrawerOverlay";
|
|
6748
|
-
var DrawerContent =
|
|
6715
|
+
var DrawerContent = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DrawerPortal, { children: [
|
|
6749
6716
|
/* @__PURE__ */ jsx(DrawerOverlay, {}),
|
|
6750
6717
|
/* @__PURE__ */ jsxs(
|
|
6751
6718
|
Drawer$1.Content,
|
|
@@ -6786,7 +6753,7 @@ var DrawerFooter = ({
|
|
|
6786
6753
|
}
|
|
6787
6754
|
);
|
|
6788
6755
|
DrawerFooter.displayName = "DrawerFooter";
|
|
6789
|
-
var DrawerTitle =
|
|
6756
|
+
var DrawerTitle = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6790
6757
|
Drawer$1.Title,
|
|
6791
6758
|
{
|
|
6792
6759
|
ref,
|
|
@@ -6798,7 +6765,7 @@ var DrawerTitle = React25.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
6798
6765
|
}
|
|
6799
6766
|
));
|
|
6800
6767
|
DrawerTitle.displayName = "DrawerTitle";
|
|
6801
|
-
var DrawerDescription =
|
|
6768
|
+
var DrawerDescription = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6802
6769
|
Drawer$1.Description,
|
|
6803
6770
|
{
|
|
6804
6771
|
ref,
|
|
@@ -6808,14 +6775,14 @@ var DrawerDescription = React25.forwardRef(({ className, ...props }, ref) => /*
|
|
|
6808
6775
|
));
|
|
6809
6776
|
DrawerDescription.displayName = "DrawerDescription";
|
|
6810
6777
|
function useMediaQuery(query) {
|
|
6811
|
-
const get_match =
|
|
6778
|
+
const get_match = React26.useCallback(() => {
|
|
6812
6779
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
|
|
6813
6780
|
return false;
|
|
6814
6781
|
}
|
|
6815
6782
|
return window.matchMedia(query).matches;
|
|
6816
6783
|
}, [query]);
|
|
6817
|
-
const [matches, set_matches] =
|
|
6818
|
-
|
|
6784
|
+
const [matches, set_matches] = React26.useState(false);
|
|
6785
|
+
React26.useEffect(() => {
|
|
6819
6786
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
|
|
6820
6787
|
return;
|
|
6821
6788
|
}
|
|
@@ -6832,7 +6799,7 @@ function useMediaQuery(query) {
|
|
|
6832
6799
|
return matches;
|
|
6833
6800
|
}
|
|
6834
6801
|
var Accordion = AccordionPrimitive.Root;
|
|
6835
|
-
var AccordionItem =
|
|
6802
|
+
var AccordionItem = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6836
6803
|
AccordionPrimitive.Item,
|
|
6837
6804
|
{
|
|
6838
6805
|
ref,
|
|
@@ -6841,7 +6808,7 @@ var AccordionItem = React25.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
6841
6808
|
}
|
|
6842
6809
|
));
|
|
6843
6810
|
AccordionItem.displayName = "AccordionItem";
|
|
6844
|
-
var AccordionTrigger =
|
|
6811
|
+
var AccordionTrigger = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
6845
6812
|
AccordionPrimitive.Trigger,
|
|
6846
6813
|
{
|
|
6847
6814
|
ref,
|
|
@@ -6857,7 +6824,7 @@ var AccordionTrigger = React25.forwardRef(({ className, children, ...props }, re
|
|
|
6857
6824
|
}
|
|
6858
6825
|
) }));
|
|
6859
6826
|
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
6860
|
-
var AccordionContent =
|
|
6827
|
+
var AccordionContent = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6861
6828
|
AccordionPrimitive.Content,
|
|
6862
6829
|
{
|
|
6863
6830
|
ref,
|
|
@@ -6867,7 +6834,7 @@ var AccordionContent = React25.forwardRef(({ className, children, ...props }, re
|
|
|
6867
6834
|
}
|
|
6868
6835
|
));
|
|
6869
6836
|
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
6870
|
-
var Checkbox =
|
|
6837
|
+
var Checkbox = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6871
6838
|
CheckboxPrimitive.Root,
|
|
6872
6839
|
{
|
|
6873
6840
|
ref,
|
|
@@ -6892,7 +6859,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
|
6892
6859
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
6893
6860
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
6894
6861
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
6895
|
-
var DropdownMenuSubTrigger =
|
|
6862
|
+
var DropdownMenuSubTrigger = React26.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
6896
6863
|
DropdownMenuPrimitive.SubTrigger,
|
|
6897
6864
|
{
|
|
6898
6865
|
ref,
|
|
@@ -6909,7 +6876,7 @@ var DropdownMenuSubTrigger = React25.forwardRef(({ className, inset, children, .
|
|
|
6909
6876
|
}
|
|
6910
6877
|
));
|
|
6911
6878
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
6912
|
-
var DropdownMenuSubContent =
|
|
6879
|
+
var DropdownMenuSubContent = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6913
6880
|
DropdownMenuPrimitive.SubContent,
|
|
6914
6881
|
{
|
|
6915
6882
|
ref,
|
|
@@ -6921,7 +6888,7 @@ var DropdownMenuSubContent = React25.forwardRef(({ className, ...props }, ref) =
|
|
|
6921
6888
|
}
|
|
6922
6889
|
));
|
|
6923
6890
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
6924
|
-
var DropdownMenuContent =
|
|
6891
|
+
var DropdownMenuContent = React26.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
6925
6892
|
DropdownMenuPrimitive.Content,
|
|
6926
6893
|
{
|
|
6927
6894
|
ref,
|
|
@@ -6934,7 +6901,7 @@ var DropdownMenuContent = React25.forwardRef(({ className, sideOffset = 4, ...pr
|
|
|
6934
6901
|
}
|
|
6935
6902
|
) }));
|
|
6936
6903
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
6937
|
-
var DropdownMenuItem =
|
|
6904
|
+
var DropdownMenuItem = React26.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6938
6905
|
DropdownMenuPrimitive.Item,
|
|
6939
6906
|
{
|
|
6940
6907
|
ref,
|
|
@@ -6947,7 +6914,7 @@ var DropdownMenuItem = React25.forwardRef(({ className, inset, ...props }, ref)
|
|
|
6947
6914
|
}
|
|
6948
6915
|
));
|
|
6949
6916
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
6950
|
-
var DropdownMenuCheckboxItem =
|
|
6917
|
+
var DropdownMenuCheckboxItem = React26.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
6951
6918
|
DropdownMenuPrimitive.CheckboxItem,
|
|
6952
6919
|
{
|
|
6953
6920
|
ref,
|
|
@@ -6964,7 +6931,7 @@ var DropdownMenuCheckboxItem = React25.forwardRef(({ className, children, checke
|
|
|
6964
6931
|
}
|
|
6965
6932
|
));
|
|
6966
6933
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
6967
|
-
var DropdownMenuRadioItem =
|
|
6934
|
+
var DropdownMenuRadioItem = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
6968
6935
|
DropdownMenuPrimitive.RadioItem,
|
|
6969
6936
|
{
|
|
6970
6937
|
ref,
|
|
@@ -6980,7 +6947,7 @@ var DropdownMenuRadioItem = React25.forwardRef(({ className, children, ...props
|
|
|
6980
6947
|
}
|
|
6981
6948
|
));
|
|
6982
6949
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
6983
|
-
var DropdownMenuLabel =
|
|
6950
|
+
var DropdownMenuLabel = React26.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6984
6951
|
DropdownMenuPrimitive.Label,
|
|
6985
6952
|
{
|
|
6986
6953
|
ref,
|
|
@@ -6993,7 +6960,7 @@ var DropdownMenuLabel = React25.forwardRef(({ className, inset, ...props }, ref)
|
|
|
6993
6960
|
}
|
|
6994
6961
|
));
|
|
6995
6962
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
6996
|
-
var DropdownMenuSeparator =
|
|
6963
|
+
var DropdownMenuSeparator = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6997
6964
|
DropdownMenuPrimitive.Separator,
|
|
6998
6965
|
{
|
|
6999
6966
|
ref,
|
|
@@ -7017,7 +6984,7 @@ var DropdownMenuShortcut = ({
|
|
|
7017
6984
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
7018
6985
|
var HoverCard = HoverCardPrimitive.Root;
|
|
7019
6986
|
var HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
7020
|
-
var HoverCardContent =
|
|
6987
|
+
var HoverCardContent = React26.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7021
6988
|
HoverCardPrimitive.Content,
|
|
7022
6989
|
{
|
|
7023
6990
|
ref,
|
|
@@ -7031,7 +6998,7 @@ var HoverCardContent = React25.forwardRef(({ className, align = "center", sideOf
|
|
|
7031
6998
|
}
|
|
7032
6999
|
));
|
|
7033
7000
|
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
7034
|
-
var Label3 =
|
|
7001
|
+
var Label3 = React26.forwardRef(
|
|
7035
7002
|
({ className, ...props }, ref) => {
|
|
7036
7003
|
return /* @__PURE__ */ jsx(
|
|
7037
7004
|
"label",
|
|
@@ -7047,7 +7014,7 @@ var Label3 = React25.forwardRef(
|
|
|
7047
7014
|
}
|
|
7048
7015
|
);
|
|
7049
7016
|
Label3.displayName = "Label";
|
|
7050
|
-
var Switch =
|
|
7017
|
+
var Switch = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7051
7018
|
SwitchPrimitives.Root,
|
|
7052
7019
|
{
|
|
7053
7020
|
className: cn(
|
|
@@ -7067,7 +7034,7 @@ var Switch = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
7067
7034
|
}
|
|
7068
7035
|
));
|
|
7069
7036
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
7070
|
-
var Textarea =
|
|
7037
|
+
var Textarea = React26.forwardRef(
|
|
7071
7038
|
({ className, ...props }, ref) => {
|
|
7072
7039
|
return /* @__PURE__ */ jsx(
|
|
7073
7040
|
"textarea",
|
|
@@ -7087,7 +7054,7 @@ var Textarea = React25.forwardRef(
|
|
|
7087
7054
|
}
|
|
7088
7055
|
);
|
|
7089
7056
|
Textarea.displayName = "Textarea";
|
|
7090
|
-
var Separator3 =
|
|
7057
|
+
var Separator3 = React26.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7091
7058
|
SeparatorPrimitive.Root,
|
|
7092
7059
|
{
|
|
7093
7060
|
ref,
|
|
@@ -7105,7 +7072,7 @@ Separator3.displayName = SeparatorPrimitive.Root.displayName;
|
|
|
7105
7072
|
var Collapsible = CollapsiblePrimitive.Root;
|
|
7106
7073
|
var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
|
|
7107
7074
|
var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
|
|
7108
|
-
var ScrollArea =
|
|
7075
|
+
var ScrollArea = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
7109
7076
|
ScrollAreaPrimitive.Root,
|
|
7110
7077
|
{
|
|
7111
7078
|
ref,
|
|
@@ -7119,7 +7086,7 @@ var ScrollArea = React25.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
7119
7086
|
}
|
|
7120
7087
|
));
|
|
7121
7088
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
7122
|
-
var ScrollBar =
|
|
7089
|
+
var ScrollBar = React26.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7123
7090
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
7124
7091
|
{
|
|
7125
7092
|
ref,
|
|
@@ -7135,27 +7102,27 @@ var ScrollBar = React25.forwardRef(({ className, orientation = "vertical", ...pr
|
|
|
7135
7102
|
}
|
|
7136
7103
|
));
|
|
7137
7104
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
7138
|
-
var Card =
|
|
7105
|
+
var Card = React26.forwardRef(
|
|
7139
7106
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("rounded-lg border bg-card text-card-foreground shadow-sm", className), ...props })
|
|
7140
7107
|
);
|
|
7141
7108
|
Card.displayName = "Card";
|
|
7142
|
-
var CardHeader =
|
|
7109
|
+
var CardHeader = React26.forwardRef(
|
|
7143
7110
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
|
|
7144
7111
|
);
|
|
7145
7112
|
CardHeader.displayName = "CardHeader";
|
|
7146
|
-
var CardTitle =
|
|
7113
|
+
var CardTitle = React26.forwardRef(
|
|
7147
7114
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("h3", { ref, className: cn("text-2xl font-semibold leading-none tracking-tight", className), ...props })
|
|
7148
7115
|
);
|
|
7149
7116
|
CardTitle.displayName = "CardTitle";
|
|
7150
|
-
var CardDescription =
|
|
7117
|
+
var CardDescription = React26.forwardRef(
|
|
7151
7118
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
|
|
7152
7119
|
);
|
|
7153
7120
|
CardDescription.displayName = "CardDescription";
|
|
7154
|
-
var CardContent =
|
|
7121
|
+
var CardContent = React26.forwardRef(
|
|
7155
7122
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-6 pt-0", className), ...props })
|
|
7156
7123
|
);
|
|
7157
7124
|
CardContent.displayName = "CardContent";
|
|
7158
|
-
var CardFooter =
|
|
7125
|
+
var CardFooter = React26.forwardRef(
|
|
7159
7126
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
|
|
7160
7127
|
);
|
|
7161
7128
|
CardFooter.displayName = "CardFooter";
|
|
@@ -7188,16 +7155,16 @@ var toggleVariants = cva(
|
|
|
7188
7155
|
defaultVariants: { variant: "default", size: "default" }
|
|
7189
7156
|
}
|
|
7190
7157
|
);
|
|
7191
|
-
var Toggle =
|
|
7158
|
+
var Toggle = React26.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(TogglePrimitive.Root, { ref, className: cn(toggleVariants({ variant, size, className })), ...props }));
|
|
7192
7159
|
Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
7193
|
-
var ToggleGroupContext =
|
|
7160
|
+
var ToggleGroupContext = React26.createContext({
|
|
7194
7161
|
size: "default",
|
|
7195
7162
|
variant: "default"
|
|
7196
7163
|
});
|
|
7197
|
-
var ToggleGroup =
|
|
7164
|
+
var ToggleGroup = React26.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx(ToggleGroupPrimitive.Root, { ref, className: cn("flex items-center justify-center gap-1", className), ...props, children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant, size }, children }) }));
|
|
7198
7165
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
7199
|
-
var ToggleGroupItem =
|
|
7200
|
-
const context =
|
|
7166
|
+
var ToggleGroupItem = React26.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
7167
|
+
const context = React26.useContext(ToggleGroupContext);
|
|
7201
7168
|
return /* @__PURE__ */ jsx(
|
|
7202
7169
|
ToggleGroupPrimitive.Item,
|
|
7203
7170
|
{
|
|
@@ -7212,7 +7179,7 @@ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
|
7212
7179
|
var AlertDialog = AlertDialogPrimitive.Root;
|
|
7213
7180
|
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
7214
7181
|
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
7215
|
-
var AlertDialogOverlay =
|
|
7182
|
+
var AlertDialogOverlay = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7216
7183
|
AlertDialogPrimitive.Overlay,
|
|
7217
7184
|
{
|
|
7218
7185
|
ref,
|
|
@@ -7221,7 +7188,7 @@ var AlertDialogOverlay = React25.forwardRef(({ className, ...props }, ref) => /*
|
|
|
7221
7188
|
}
|
|
7222
7189
|
));
|
|
7223
7190
|
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
7224
|
-
var AlertDialogContent =
|
|
7191
|
+
var AlertDialogContent = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
|
|
7225
7192
|
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
7226
7193
|
/* @__PURE__ */ jsx(
|
|
7227
7194
|
AlertDialogPrimitive.Content,
|
|
@@ -7237,13 +7204,13 @@ var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div",
|
|
|
7237
7204
|
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
7238
7205
|
var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
|
|
7239
7206
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
7240
|
-
var AlertDialogTitle =
|
|
7207
|
+
var AlertDialogTitle = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Title, { ref, className: cn("text-lg font-semibold", className), ...props }));
|
|
7241
7208
|
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
7242
|
-
var AlertDialogDescription =
|
|
7209
|
+
var AlertDialogDescription = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
7243
7210
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
7244
|
-
var AlertDialogAction =
|
|
7211
|
+
var AlertDialogAction = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Action, { ref, className: cn(buttonVariants(), className), ...props }));
|
|
7245
7212
|
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
7246
|
-
var AlertDialogCancel =
|
|
7213
|
+
var AlertDialogCancel = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Cancel, { ref, className: cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className), ...props }));
|
|
7247
7214
|
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
7248
7215
|
var buttonGroupVariants = cva(
|
|
7249
7216
|
"flex w-fit items-stretch [&>*]:focus-visible:relative [&>*]:focus-visible:z-10",
|
|
@@ -7271,7 +7238,7 @@ function ButtonGroupText({ className, asChild = false, ...props }) {
|
|
|
7271
7238
|
function ButtonGroupSeparator({ className, orientation = "vertical", ...props }) {
|
|
7272
7239
|
return /* @__PURE__ */ jsx(Separator3, { orientation, className: cn("bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto", className), ...props });
|
|
7273
7240
|
}
|
|
7274
|
-
var SkeletonBase =
|
|
7241
|
+
var SkeletonBase = React26.forwardRef(
|
|
7275
7242
|
({ className, ...rest }, ref) => /* @__PURE__ */ jsx(
|
|
7276
7243
|
"div",
|
|
7277
7244
|
{
|
|
@@ -7447,8 +7414,8 @@ function LoadingTimeout({
|
|
|
7447
7414
|
firm: thresholds?.firm ?? 15e3,
|
|
7448
7415
|
expired: thresholds?.expired ?? 3e4
|
|
7449
7416
|
};
|
|
7450
|
-
const [phase, setPhase] =
|
|
7451
|
-
|
|
7417
|
+
const [phase, setPhase] = React26.useState(active ? "silent" : "idle");
|
|
7418
|
+
React26.useEffect(() => {
|
|
7452
7419
|
if (!active) {
|
|
7453
7420
|
setPhase("idle");
|
|
7454
7421
|
return;
|
|
@@ -7507,7 +7474,7 @@ function ProgressiveImage({
|
|
|
7507
7474
|
onLoad,
|
|
7508
7475
|
onError
|
|
7509
7476
|
}) {
|
|
7510
|
-
const [loaded, setLoaded] =
|
|
7477
|
+
const [loaded, setLoaded] = React26.useState(false);
|
|
7511
7478
|
return /* @__PURE__ */ jsxs(
|
|
7512
7479
|
"div",
|
|
7513
7480
|
{
|
|
@@ -7962,29 +7929,29 @@ function KanbanEditor({
|
|
|
7962
7929
|
onSave,
|
|
7963
7930
|
onClose
|
|
7964
7931
|
}) {
|
|
7965
|
-
const [draft, set_draft] =
|
|
7966
|
-
const [saving, set_saving] =
|
|
7967
|
-
const [error, set_error] =
|
|
7932
|
+
const [draft, set_draft] = React26.useState(item);
|
|
7933
|
+
const [saving, set_saving] = React26.useState(false);
|
|
7934
|
+
const [error, set_error] = React26.useState(null);
|
|
7968
7935
|
const item_id = item?.id ?? null;
|
|
7969
|
-
|
|
7936
|
+
React26.useEffect(() => {
|
|
7970
7937
|
set_draft(item);
|
|
7971
7938
|
set_error(null);
|
|
7972
7939
|
set_saving(false);
|
|
7973
7940
|
}, [item_id]);
|
|
7974
7941
|
const resolved_columns = columns ?? [];
|
|
7975
7942
|
const resolved_priorities = priorities ?? DEFAULT_PRIORITIES;
|
|
7976
|
-
const resolved_fields =
|
|
7943
|
+
const resolved_fields = React26.useMemo(() => {
|
|
7977
7944
|
if (fields) return fields;
|
|
7978
7945
|
if (!item) return [];
|
|
7979
7946
|
return auto_detect_fields(item, resolved_columns);
|
|
7980
7947
|
}, [fields, item, resolved_columns]);
|
|
7981
|
-
const required_keys =
|
|
7948
|
+
const required_keys = React26.useMemo(
|
|
7982
7949
|
() => resolved_fields.filter(
|
|
7983
7950
|
(f) => f.required && (f.type === "text" || f.type === "textarea" || f.type === "number")
|
|
7984
7951
|
).map((f) => f.key),
|
|
7985
7952
|
[resolved_fields]
|
|
7986
7953
|
);
|
|
7987
|
-
const all_required_filled =
|
|
7954
|
+
const all_required_filled = React26.useMemo(() => {
|
|
7988
7955
|
if (!draft) return false;
|
|
7989
7956
|
for (const key of required_keys) {
|
|
7990
7957
|
const v = draft[key];
|
|
@@ -7993,7 +7960,7 @@ function KanbanEditor({
|
|
|
7993
7960
|
}
|
|
7994
7961
|
return true;
|
|
7995
7962
|
}, [draft, required_keys]);
|
|
7996
|
-
const is_dirty =
|
|
7963
|
+
const is_dirty = React26.useMemo(() => {
|
|
7997
7964
|
if (!draft || !item) return false;
|
|
7998
7965
|
try {
|
|
7999
7966
|
return JSON.stringify(draft) !== JSON.stringify(item);
|
|
@@ -8001,7 +7968,7 @@ function KanbanEditor({
|
|
|
8001
7968
|
return draft !== item;
|
|
8002
7969
|
}
|
|
8003
7970
|
}, [draft, item]);
|
|
8004
|
-
const handle_save =
|
|
7971
|
+
const handle_save = React26.useCallback(async () => {
|
|
8005
7972
|
if (!draft || !item) return;
|
|
8006
7973
|
if (saving) return;
|
|
8007
7974
|
set_error(null);
|
|
@@ -8220,11 +8187,11 @@ function HazoUiKanbanFilter({
|
|
|
8220
8187
|
className
|
|
8221
8188
|
}) {
|
|
8222
8189
|
const is_controlled = value !== void 0;
|
|
8223
|
-
const [internal, set_internal] =
|
|
8190
|
+
const [internal, set_internal] = React26.useState(
|
|
8224
8191
|
defaultValue ?? EMPTY_FILTER
|
|
8225
8192
|
);
|
|
8226
8193
|
const current = is_controlled ? value : internal;
|
|
8227
|
-
const update =
|
|
8194
|
+
const update = React26.useCallback(
|
|
8228
8195
|
(next) => {
|
|
8229
8196
|
if (!is_controlled) set_internal(next);
|
|
8230
8197
|
onChange?.(next);
|
|
@@ -8387,29 +8354,29 @@ function HazoUiKanban({
|
|
|
8387
8354
|
onCardSave,
|
|
8388
8355
|
disableEdit = false
|
|
8389
8356
|
}) {
|
|
8390
|
-
const label_fn =
|
|
8357
|
+
const label_fn = React26.useCallback(
|
|
8391
8358
|
(item) => itemLabel ? itemLabel(item) : item.id,
|
|
8392
8359
|
[itemLabel]
|
|
8393
8360
|
);
|
|
8394
|
-
const dnd_context_id =
|
|
8395
|
-
const [overlay, set_overlay] =
|
|
8361
|
+
const dnd_context_id = React26.useId();
|
|
8362
|
+
const [overlay, set_overlay] = React26.useState(
|
|
8396
8363
|
/* @__PURE__ */ new Map()
|
|
8397
8364
|
);
|
|
8398
|
-
const [active_id, set_active_id] =
|
|
8399
|
-
const [active_tab, set_active_tab] =
|
|
8400
|
-
const [editing_item, set_editing_item] =
|
|
8365
|
+
const [active_id, set_active_id] = React26.useState(null);
|
|
8366
|
+
const [active_tab, set_active_tab] = React26.useState(columns[0]?.key ?? "");
|
|
8367
|
+
const [editing_item, set_editing_item] = React26.useState(null);
|
|
8401
8368
|
const show_edit = !disableEdit && typeof onCardSave === "function";
|
|
8402
|
-
const handle_edit_request =
|
|
8369
|
+
const handle_edit_request = React26.useCallback(
|
|
8403
8370
|
(it) => {
|
|
8404
8371
|
const typed = items.find((x) => x.id === it.id);
|
|
8405
8372
|
if (typed) set_editing_item(typed);
|
|
8406
8373
|
},
|
|
8407
8374
|
[items]
|
|
8408
8375
|
);
|
|
8409
|
-
const handle_editor_close =
|
|
8376
|
+
const handle_editor_close = React26.useCallback(() => {
|
|
8410
8377
|
set_editing_item(null);
|
|
8411
8378
|
}, []);
|
|
8412
|
-
|
|
8379
|
+
React26.useEffect(() => {
|
|
8413
8380
|
if (overlay.size === 0) return;
|
|
8414
8381
|
set_overlay((prev) => {
|
|
8415
8382
|
let changed = false;
|
|
@@ -8424,11 +8391,11 @@ function HazoUiKanban({
|
|
|
8424
8391
|
return changed ? next : prev;
|
|
8425
8392
|
});
|
|
8426
8393
|
}, [items, overlay]);
|
|
8427
|
-
const grouped =
|
|
8394
|
+
const grouped = React26.useMemo(
|
|
8428
8395
|
() => group_items_by_column(items, overlay, columns),
|
|
8429
8396
|
[items, overlay, columns]
|
|
8430
8397
|
);
|
|
8431
|
-
const find_item =
|
|
8398
|
+
const find_item = React26.useCallback(
|
|
8432
8399
|
(id) => items.find((i) => i.id === id),
|
|
8433
8400
|
[items]
|
|
8434
8401
|
);
|
|
@@ -8436,7 +8403,7 @@ function HazoUiKanban({
|
|
|
8436
8403
|
useSensor(PointerSensor, { activationConstraint: { distance: 5 } }),
|
|
8437
8404
|
useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates })
|
|
8438
8405
|
);
|
|
8439
|
-
const merged_announcements =
|
|
8406
|
+
const merged_announcements = React26.useMemo(() => {
|
|
8440
8407
|
const defaults = default_announcements(label_fn);
|
|
8441
8408
|
return {
|
|
8442
8409
|
onDragStart: announcements?.onDragStart ?? defaults.onDragStart,
|
|
@@ -8445,7 +8412,7 @@ function HazoUiKanban({
|
|
|
8445
8412
|
onDragCancel: announcements?.onDragCancel ?? defaults.onDragCancel
|
|
8446
8413
|
};
|
|
8447
8414
|
}, [announcements, label_fn]);
|
|
8448
|
-
const dnd_announcements =
|
|
8415
|
+
const dnd_announcements = React26.useMemo(
|
|
8449
8416
|
() => ({
|
|
8450
8417
|
onDragStart({ active }) {
|
|
8451
8418
|
const id = String(active.id);
|
|
@@ -8503,10 +8470,10 @@ function HazoUiKanban({
|
|
|
8503
8470
|
}),
|
|
8504
8471
|
[find_item, columns, grouped, merged_announcements]
|
|
8505
8472
|
);
|
|
8506
|
-
const handle_drag_start =
|
|
8473
|
+
const handle_drag_start = React26.useCallback((event) => {
|
|
8507
8474
|
set_active_id(String(event.active.id));
|
|
8508
8475
|
}, []);
|
|
8509
|
-
const make_revert_handle =
|
|
8476
|
+
const make_revert_handle = React26.useCallback(
|
|
8510
8477
|
(item_id) => ({
|
|
8511
8478
|
revert: () => {
|
|
8512
8479
|
set_overlay((prev) => {
|
|
@@ -8519,7 +8486,7 @@ function HazoUiKanban({
|
|
|
8519
8486
|
}),
|
|
8520
8487
|
[]
|
|
8521
8488
|
);
|
|
8522
|
-
const handle_drag_end =
|
|
8489
|
+
const handle_drag_end = React26.useCallback(
|
|
8523
8490
|
(event) => {
|
|
8524
8491
|
const active_id_str = String(event.active.id);
|
|
8525
8492
|
set_active_id(null);
|
|
@@ -8581,7 +8548,7 @@ function HazoUiKanban({
|
|
|
8581
8548
|
},
|
|
8582
8549
|
[find_item, columns, grouped, onMove, onReorder, make_revert_handle]
|
|
8583
8550
|
);
|
|
8584
|
-
const handle_drag_cancel =
|
|
8551
|
+
const handle_drag_cancel = React26.useCallback(() => {
|
|
8585
8552
|
set_active_id(null);
|
|
8586
8553
|
}, []);
|
|
8587
8554
|
const active_item = active_id ? find_item(active_id) : null;
|
|
@@ -8672,7 +8639,7 @@ function HazoUiKanban({
|
|
|
8672
8639
|
}
|
|
8673
8640
|
);
|
|
8674
8641
|
}
|
|
8675
|
-
var Table2 =
|
|
8642
|
+
var Table2 = React26.forwardRef(
|
|
8676
8643
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "cls_table_wrap relative w-full overflow-auto", children: /* @__PURE__ */ jsx(
|
|
8677
8644
|
"table",
|
|
8678
8645
|
{
|
|
@@ -8683,11 +8650,11 @@ var Table2 = React25.forwardRef(
|
|
|
8683
8650
|
) })
|
|
8684
8651
|
);
|
|
8685
8652
|
Table2.displayName = "Table";
|
|
8686
|
-
var TableHeader2 =
|
|
8653
|
+
var TableHeader2 = React26.forwardRef(
|
|
8687
8654
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props })
|
|
8688
8655
|
);
|
|
8689
8656
|
TableHeader2.displayName = "TableHeader";
|
|
8690
|
-
var TableBody =
|
|
8657
|
+
var TableBody = React26.forwardRef(
|
|
8691
8658
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8692
8659
|
"tbody",
|
|
8693
8660
|
{
|
|
@@ -8698,7 +8665,7 @@ var TableBody = React25.forwardRef(
|
|
|
8698
8665
|
)
|
|
8699
8666
|
);
|
|
8700
8667
|
TableBody.displayName = "TableBody";
|
|
8701
|
-
var TableFooter =
|
|
8668
|
+
var TableFooter = React26.forwardRef(
|
|
8702
8669
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8703
8670
|
"tfoot",
|
|
8704
8671
|
{
|
|
@@ -8709,7 +8676,7 @@ var TableFooter = React25.forwardRef(
|
|
|
8709
8676
|
)
|
|
8710
8677
|
);
|
|
8711
8678
|
TableFooter.displayName = "TableFooter";
|
|
8712
|
-
var TableRow2 =
|
|
8679
|
+
var TableRow2 = React26.forwardRef(
|
|
8713
8680
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8714
8681
|
"tr",
|
|
8715
8682
|
{
|
|
@@ -8723,7 +8690,7 @@ var TableRow2 = React25.forwardRef(
|
|
|
8723
8690
|
)
|
|
8724
8691
|
);
|
|
8725
8692
|
TableRow2.displayName = "TableRow";
|
|
8726
|
-
var TableHead =
|
|
8693
|
+
var TableHead = React26.forwardRef(
|
|
8727
8694
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8728
8695
|
"th",
|
|
8729
8696
|
{
|
|
@@ -8737,7 +8704,7 @@ var TableHead = React25.forwardRef(
|
|
|
8737
8704
|
)
|
|
8738
8705
|
);
|
|
8739
8706
|
TableHead.displayName = "TableHead";
|
|
8740
|
-
var TableCell2 =
|
|
8707
|
+
var TableCell2 = React26.forwardRef(
|
|
8741
8708
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8742
8709
|
"td",
|
|
8743
8710
|
{
|
|
@@ -8748,7 +8715,7 @@ var TableCell2 = React25.forwardRef(
|
|
|
8748
8715
|
)
|
|
8749
8716
|
);
|
|
8750
8717
|
TableCell2.displayName = "TableCell";
|
|
8751
|
-
var TableCaption =
|
|
8718
|
+
var TableCaption = React26.forwardRef(
|
|
8752
8719
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8753
8720
|
"caption",
|
|
8754
8721
|
{
|
|
@@ -9320,18 +9287,18 @@ function Toolbar2(props) {
|
|
|
9320
9287
|
enableFilterDialog,
|
|
9321
9288
|
searchPlaceholder
|
|
9322
9289
|
} = props;
|
|
9323
|
-
const sortFields =
|
|
9290
|
+
const sortFields = React26.useMemo(
|
|
9324
9291
|
() => deriveSortFields(columns),
|
|
9325
9292
|
[columns]
|
|
9326
9293
|
);
|
|
9327
|
-
const filterFields =
|
|
9294
|
+
const filterFields = React26.useMemo(
|
|
9328
9295
|
() => deriveFilterFields(columns),
|
|
9329
9296
|
[columns]
|
|
9330
9297
|
);
|
|
9331
|
-
const [searchValue, setSearchValue] =
|
|
9298
|
+
const [searchValue, setSearchValue] = React26.useState(
|
|
9332
9299
|
filter.search ?? ""
|
|
9333
9300
|
);
|
|
9334
|
-
|
|
9301
|
+
React26.useEffect(() => {
|
|
9335
9302
|
setSearchValue(filter.search ?? "");
|
|
9336
9303
|
}, [filter.search]);
|
|
9337
9304
|
return /* @__PURE__ */ jsxs("div", { className: "cls_hazo_ui_table_toolbar flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between", children: [
|
|
@@ -9587,9 +9554,9 @@ function LineChart({
|
|
|
9587
9554
|
className
|
|
9588
9555
|
}) {
|
|
9589
9556
|
const geo = compute_geometry(data, width, height);
|
|
9590
|
-
const svg_ref =
|
|
9591
|
-
const [hover_idx, set_hover_idx] =
|
|
9592
|
-
const handle_mouse_move =
|
|
9557
|
+
const svg_ref = React26.useRef(null);
|
|
9558
|
+
const [hover_idx, set_hover_idx] = React26.useState(null);
|
|
9559
|
+
const handle_mouse_move = React26.useCallback(
|
|
9593
9560
|
(e) => {
|
|
9594
9561
|
if (!geo) return;
|
|
9595
9562
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
@@ -9622,7 +9589,7 @@ function LineChart({
|
|
|
9622
9589
|
},
|
|
9623
9590
|
[geo, data]
|
|
9624
9591
|
);
|
|
9625
|
-
const handle_mouse_leave =
|
|
9592
|
+
const handle_mouse_leave = React26.useCallback(() => set_hover_idx(null), []);
|
|
9626
9593
|
if (!geo) {
|
|
9627
9594
|
return /* @__PURE__ */ jsx(
|
|
9628
9595
|
"svg",
|
|
@@ -9849,8 +9816,8 @@ function MultiLineChart({
|
|
|
9849
9816
|
className
|
|
9850
9817
|
}) {
|
|
9851
9818
|
const geo = compute_geometry2(series, width, height);
|
|
9852
|
-
const [hover_idx, set_hover_idx] =
|
|
9853
|
-
const handle_mouse_move =
|
|
9819
|
+
const [hover_idx, set_hover_idx] = React26.useState(null);
|
|
9820
|
+
const handle_mouse_move = React26.useCallback(
|
|
9854
9821
|
(e) => {
|
|
9855
9822
|
if (!geo) return;
|
|
9856
9823
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
@@ -9867,7 +9834,7 @@ function MultiLineChart({
|
|
|
9867
9834
|
},
|
|
9868
9835
|
[geo]
|
|
9869
9836
|
);
|
|
9870
|
-
const handle_mouse_leave =
|
|
9837
|
+
const handle_mouse_leave = React26.useCallback(() => set_hover_idx(null), []);
|
|
9871
9838
|
if (!geo) {
|
|
9872
9839
|
return /* @__PURE__ */ jsx(
|
|
9873
9840
|
"svg",
|
|
@@ -10249,21 +10216,21 @@ function celebrate(payload) {
|
|
|
10249
10216
|
_enqueue(payload);
|
|
10250
10217
|
}
|
|
10251
10218
|
function CelebrationProvider({ children }) {
|
|
10252
|
-
const [queue, set_queue] =
|
|
10253
|
-
const enqueue =
|
|
10219
|
+
const [queue, set_queue] = React26.useState([]);
|
|
10220
|
+
const enqueue = React26.useCallback((payload) => {
|
|
10254
10221
|
const storage_key = `hazo_ui_celebration_${payload.id}`;
|
|
10255
10222
|
if (typeof window !== "undefined" && sessionStorage.getItem(storage_key)) {
|
|
10256
10223
|
return;
|
|
10257
10224
|
}
|
|
10258
10225
|
set_queue((q) => [...q, payload]);
|
|
10259
10226
|
}, []);
|
|
10260
|
-
|
|
10227
|
+
React26.useEffect(() => {
|
|
10261
10228
|
_enqueue = enqueue;
|
|
10262
10229
|
return () => {
|
|
10263
10230
|
_enqueue = null;
|
|
10264
10231
|
};
|
|
10265
10232
|
}, [enqueue]);
|
|
10266
|
-
const handle_close =
|
|
10233
|
+
const handle_close = React26.useCallback(() => {
|
|
10267
10234
|
set_queue((q) => q.slice(1));
|
|
10268
10235
|
}, []);
|
|
10269
10236
|
const current = queue[0] ?? null;
|
|
@@ -10292,14 +10259,14 @@ function CelebrationModalInner({
|
|
|
10292
10259
|
autoDismissDelay = 8e3,
|
|
10293
10260
|
audioChime = false
|
|
10294
10261
|
} = payload;
|
|
10295
|
-
const [visible, set_visible] =
|
|
10296
|
-
const [is_downloading, set_is_downloading] =
|
|
10297
|
-
const canvas_ref =
|
|
10298
|
-
const card_ref =
|
|
10299
|
-
|
|
10262
|
+
const [visible, set_visible] = React26.useState(true);
|
|
10263
|
+
const [is_downloading, set_is_downloading] = React26.useState(false);
|
|
10264
|
+
const canvas_ref = React26.useRef(null);
|
|
10265
|
+
const card_ref = React26.useRef(null);
|
|
10266
|
+
React26.useEffect(() => {
|
|
10300
10267
|
sessionStorage.setItem(`hazo_ui_celebration_${id}`, "1");
|
|
10301
10268
|
}, [id]);
|
|
10302
|
-
|
|
10269
|
+
React26.useEffect(() => {
|
|
10303
10270
|
if (!canvas_ref.current) return;
|
|
10304
10271
|
let confetti_instance = null;
|
|
10305
10272
|
import('canvas-confetti').then(({ default: confetti }) => {
|
|
@@ -10316,18 +10283,18 @@ function CelebrationModalInner({
|
|
|
10316
10283
|
confetti_instance?.reset();
|
|
10317
10284
|
};
|
|
10318
10285
|
}, []);
|
|
10319
|
-
|
|
10286
|
+
React26.useEffect(() => {
|
|
10320
10287
|
if (!audioChime) return;
|
|
10321
10288
|
const audio = new Audio(celebration_chime_default);
|
|
10322
10289
|
audio.play().catch(() => {
|
|
10323
10290
|
});
|
|
10324
10291
|
}, [audioChime]);
|
|
10325
|
-
|
|
10292
|
+
React26.useEffect(() => {
|
|
10326
10293
|
if (!autoDismiss) return;
|
|
10327
10294
|
const timer = window.setTimeout(close_modal, autoDismissDelay);
|
|
10328
10295
|
return () => window.clearTimeout(timer);
|
|
10329
10296
|
}, [autoDismiss, autoDismissDelay]);
|
|
10330
|
-
|
|
10297
|
+
React26.useEffect(() => {
|
|
10331
10298
|
const on_key = (e) => {
|
|
10332
10299
|
if (e.key === "Escape") close_modal();
|
|
10333
10300
|
};
|
|
@@ -10515,6 +10482,6 @@ function CelebrationModalInner({
|
|
|
10515
10482
|
);
|
|
10516
10483
|
}
|
|
10517
10484
|
|
|
10518
|
-
export { ANIMATION_PRESETS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CELEBRATION_GRADIENT, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CelebrationProvider, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, CommandNodeExtension, CommandPill, CommandPopover, DateRangeSelector, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ErrorBanner, ErrorPage, HazoUiConfirmDialog, HazoUiDialog, DialogClose as HazoUiDialogClose, DialogContent as HazoUiDialogContent, DialogDescription as HazoUiDialogDescription, DialogFooter as HazoUiDialogFooter, DialogHeader as HazoUiDialogHeader, DialogOverlay as HazoUiDialogOverlay, DialogPortal as HazoUiDialogPortal, Dialog as HazoUiDialogRoot, DialogTitle as HazoUiDialogTitle, DialogTrigger as HazoUiDialogTrigger, HazoUiFlexInput, HazoUiFlexRadio, HazoUiKanban, HazoUiKanbanFilter, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, HazoUiPillRadio, HazoUiRte, HazoUiTable, HazoUiTextarea, HazoUiTextbox, HazoUiToaster, HoverCard, HoverCardContent, HoverCardTrigger, Input, InverseSparkline, Label3 as Label, LineChart, LoadingTimeout, MultiLineChart, Popover, PopoverContent, PopoverTrigger, ProgressiveImage, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Command as ShadcnCommand, CommandEmpty as ShadcnCommandEmpty, CommandGroup as ShadcnCommandGroup, CommandInput as ShadcnCommandInput, CommandItem as ShadcnCommandItem, CommandList as ShadcnCommandList, Skeleton, SkeletonBar, SkeletonCircle, SkeletonGroup, SkeletonRect, Sparkline, Spinner, StackedBars, Switch, Table2 as Table, TableBody, TableCaption, TableCell2 as TableCell, TableFooter, TableHead, TableHeader2 as TableHeader, TableRow2 as TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, applyKanbanFilter, buttonGroupVariants, celebrate, create_command_suggestion_extension, errorToast, format_num, get_hazo_ui_config, parse_commands_from_text, pick_x_label_indices, reset_hazo_ui_config, resolve_animation_classes, set_hazo_ui_config, successToast, text_to_tiptap_content, toggleVariants, useClickOutside, useCopyToClipboard, useDebounce, useErrorDisplay, useFullscreen, useIsMobile, useLoadingState, useLocalStorage, useMediaQuery, useSessionStorage, useViewport, useWakeLock };
|
|
10485
|
+
export { ANIMATION_PRESETS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CELEBRATION_GRADIENT, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CelebrationProvider, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, CommandNodeExtension, CommandPill, CommandPopover, DateRangeSelector, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ErrorBanner, ErrorPage, HazoContextProvider, HazoUiConfirmDialog, HazoUiDialog, DialogClose as HazoUiDialogClose, DialogContent as HazoUiDialogContent, DialogDescription as HazoUiDialogDescription, DialogFooter as HazoUiDialogFooter, DialogHeader as HazoUiDialogHeader, DialogOverlay as HazoUiDialogOverlay, DialogPortal as HazoUiDialogPortal, Dialog as HazoUiDialogRoot, DialogTitle as HazoUiDialogTitle, DialogTrigger as HazoUiDialogTrigger, HazoUiFlexInput, HazoUiFlexRadio, HazoUiKanban, HazoUiKanbanFilter, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, HazoUiPillRadio, HazoUiRte, HazoUiTable, HazoUiTextarea, HazoUiTextbox, HazoUiToaster, HoverCard, HoverCardContent, HoverCardTrigger, Input, InverseSparkline, Label3 as Label, LineChart, LoadingTimeout, MultiLineChart, Popover, PopoverContent, PopoverTrigger, ProgressiveImage, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Command as ShadcnCommand, CommandEmpty as ShadcnCommandEmpty, CommandGroup as ShadcnCommandGroup, CommandInput as ShadcnCommandInput, CommandItem as ShadcnCommandItem, CommandList as ShadcnCommandList, Skeleton, SkeletonBar, SkeletonCircle, SkeletonGroup, SkeletonRect, Sparkline, Spinner, StackedBars, Switch, Table2 as Table, TableBody, TableCaption, TableCell2 as TableCell, TableFooter, TableHead, TableHeader2 as TableHeader, TableRow2 as TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, applyKanbanFilter, buttonGroupVariants, celebrate, cn, create_command_suggestion_extension, errorToast, format_num, generateUUID, get_hazo_ui_config, get_logger, parse_commands_from_text, pick_x_label_indices, reset_hazo_ui_config, resolve_animation_classes, set_hazo_ui_config, set_logger, successToast, text_to_tiptap_content, toggleVariants, useClickOutside, useCopyToClipboard, useDebounce, useErrorDisplay, useFullscreen, useIsMobile, useLoadingState, useLocalStorage, useMediaQuery, useSessionStorage, useViewport, useWakeLock };
|
|
10519
10486
|
//# sourceMappingURL=index.js.map
|
|
10520
10487
|
//# sourceMappingURL=index.js.map
|