@grupor5/raya 0.2.46 → 0.2.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atoms/button/index.js +1 -1
- package/dist/atoms/button/index.mjs +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +447 -213
- package/dist/index.mjs +435 -204
- package/dist/molecules/alert/index.js +2 -2
- package/dist/molecules/alert/index.mjs +2 -2
- package/dist/molecules/data-table/index.js +1 -1
- package/dist/molecules/data-table/index.mjs +1 -1
- package/dist/molecules/date-picker/index.js +1 -1
- package/dist/molecules/date-picker/index.mjs +1 -1
- package/dist/molecules/file-upload/index.d.mts +40 -0
- package/dist/molecules/file-upload/index.d.ts +40 -0
- package/dist/molecules/file-upload/index.js +752 -0
- package/dist/molecules/file-upload/index.mjs +728 -0
- package/dist/molecules/pagination/index.js +1 -1
- package/dist/molecules/pagination/index.mjs +1 -1
- package/dist/organisms/sidebar/index.js +1 -1
- package/dist/organisms/sidebar/index.mjs +1 -1
- package/dist/organisms/topnavbar/index.js +1 -1
- package/dist/organisms/topnavbar/index.mjs +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/tokens/buttons.d.mts +2 -2
- package/dist/tokens/buttons.d.ts +2 -2
- package/dist/tokens/buttons.js +1 -1
- package/dist/tokens/buttons.mjs +1 -1
- package/dist/tokens/index.js +1 -1
- package/dist/tokens/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React30 from 'react';
|
|
2
|
+
import React30__default, { createContext, forwardRef, useMemo, useState, useContext } from 'react';
|
|
3
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
@@ -22,6 +22,10 @@ import { DayPicker, useDayPicker } from 'react-day-picker';
|
|
|
22
22
|
import { es } from 'date-fns/locale';
|
|
23
23
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
24
24
|
import { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from 'cmdk';
|
|
25
|
+
import { FolderCloudIcon } from '@grupor5/raya-icons/icons/FolderCloudIcon';
|
|
26
|
+
import { DocumentTextIcon } from '@grupor5/raya-icons/icons/DocumentTextIcon';
|
|
27
|
+
import { DocumentDownloadIcon } from '@grupor5/raya-icons/icons/DocumentDownloadIcon';
|
|
28
|
+
import { TrashIcon } from '@grupor5/raya-icons/icons/TrashIcon';
|
|
25
29
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
26
30
|
import { RightIcon } from '@grupor5/raya-icons/icons/RightIcon';
|
|
27
31
|
import { ArrowLeftIcon } from '@grupor5/raya-icons/icons/ArrowLeftIcon';
|
|
@@ -1471,7 +1475,7 @@ var buttonSizeClasses = {
|
|
|
1471
1475
|
iconSize: "w-5 h-5"
|
|
1472
1476
|
},
|
|
1473
1477
|
lg: {
|
|
1474
|
-
base: "
|
|
1478
|
+
base: "px-6 py-3 text-lg rounded-2xl",
|
|
1475
1479
|
icon: "h-12 w-12 rounded-2xl",
|
|
1476
1480
|
iconSize: "w-[22px] h-[22px]"
|
|
1477
1481
|
}
|
|
@@ -1630,7 +1634,7 @@ function getInitials(name) {
|
|
|
1630
1634
|
}
|
|
1631
1635
|
return firstName ? `${firstName.substring(0, 2)}`.toUpperCase() : "N/A";
|
|
1632
1636
|
}
|
|
1633
|
-
var Avatar =
|
|
1637
|
+
var Avatar = React30.forwardRef(
|
|
1634
1638
|
(_a, ref) => {
|
|
1635
1639
|
var _b = _a, { src, name, className } = _b, props = __objRest(_b, ["src", "name", "className"]);
|
|
1636
1640
|
return /* @__PURE__ */ jsx(
|
|
@@ -1848,8 +1852,8 @@ var Button = forwardRef((_a, ref) => {
|
|
|
1848
1852
|
}
|
|
1849
1853
|
const iconSizeClass = getButtonIconSize(size);
|
|
1850
1854
|
const renderIcon = (iconNode) => {
|
|
1851
|
-
if (
|
|
1852
|
-
return
|
|
1855
|
+
if (React30__default.isValidElement(iconNode)) {
|
|
1856
|
+
return React30__default.cloneElement(iconNode, {
|
|
1853
1857
|
className: cn(iconSizeClass, iconNode.props.className),
|
|
1854
1858
|
"aria-hidden": true
|
|
1855
1859
|
});
|
|
@@ -1948,7 +1952,7 @@ var Button = forwardRef((_a, ref) => {
|
|
|
1948
1952
|
);
|
|
1949
1953
|
});
|
|
1950
1954
|
Button.displayName = "Button";
|
|
1951
|
-
var Checkbox =
|
|
1955
|
+
var Checkbox = React30.forwardRef((_a, ref) => {
|
|
1952
1956
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1953
1957
|
return /* @__PURE__ */ jsx(
|
|
1954
1958
|
CheckboxPrimitive.Root,
|
|
@@ -1980,10 +1984,10 @@ var Checkbox = React29.forwardRef((_a, ref) => {
|
|
|
1980
1984
|
);
|
|
1981
1985
|
});
|
|
1982
1986
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
1983
|
-
var Input =
|
|
1987
|
+
var Input = React30.forwardRef(
|
|
1984
1988
|
(_a, ref) => {
|
|
1985
1989
|
var _b = _a, { className, type, error, helperText, label, required, id, icon } = _b, props = __objRest(_b, ["className", "type", "error", "helperText", "label", "required", "id", "icon"]);
|
|
1986
|
-
const inputId = id || `input-${
|
|
1990
|
+
const inputId = id || `input-${React30.useId()}`;
|
|
1987
1991
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
1988
1992
|
label && /* @__PURE__ */ jsx(
|
|
1989
1993
|
"label",
|
|
@@ -2027,7 +2031,7 @@ Input.displayName = "Input";
|
|
|
2027
2031
|
var labelVariants = cva(
|
|
2028
2032
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
2029
2033
|
);
|
|
2030
|
-
var Label =
|
|
2034
|
+
var Label = React30.forwardRef((_a, ref) => {
|
|
2031
2035
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2032
2036
|
return /* @__PURE__ */ jsx(
|
|
2033
2037
|
LabelPrimitive.Root,
|
|
@@ -2088,7 +2092,7 @@ var Logo = forwardRef((_a, ref) => {
|
|
|
2088
2092
|
);
|
|
2089
2093
|
});
|
|
2090
2094
|
Logo.displayName = "Logo";
|
|
2091
|
-
var RadioGroup =
|
|
2095
|
+
var RadioGroup = React30.forwardRef((_a, ref) => {
|
|
2092
2096
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2093
2097
|
return /* @__PURE__ */ jsx(
|
|
2094
2098
|
RadioGroupPrimitive.Root,
|
|
@@ -2100,7 +2104,7 @@ var RadioGroup = React29.forwardRef((_a, ref) => {
|
|
|
2100
2104
|
);
|
|
2101
2105
|
});
|
|
2102
2106
|
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
2103
|
-
var RadioGroupItem =
|
|
2107
|
+
var RadioGroupItem = React30.forwardRef((_a, ref) => {
|
|
2104
2108
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2105
2109
|
return /* @__PURE__ */ jsx(
|
|
2106
2110
|
RadioGroupPrimitive.Item,
|
|
@@ -2118,7 +2122,7 @@ var RadioGroupItem = React29.forwardRef((_a, ref) => {
|
|
|
2118
2122
|
);
|
|
2119
2123
|
});
|
|
2120
2124
|
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
2121
|
-
var Switch =
|
|
2125
|
+
var Switch = React30.forwardRef((_a, ref) => {
|
|
2122
2126
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2123
2127
|
return /* @__PURE__ */ jsx(
|
|
2124
2128
|
SwitchPrimitives.Root,
|
|
@@ -2195,7 +2199,7 @@ var closeButtonVariants = cva(
|
|
|
2195
2199
|
}
|
|
2196
2200
|
}
|
|
2197
2201
|
);
|
|
2198
|
-
var Tag =
|
|
2202
|
+
var Tag = React30__default.forwardRef(
|
|
2199
2203
|
(_a, ref) => {
|
|
2200
2204
|
var _b = _a, { className, children, showBullet = false, onClose, variant } = _b, props = __objRest(_b, ["className", "children", "showBullet", "onClose", "variant"]);
|
|
2201
2205
|
return /* @__PURE__ */ jsxs(
|
|
@@ -2229,11 +2233,11 @@ var Tag = React29__default.forwardRef(
|
|
|
2229
2233
|
}
|
|
2230
2234
|
);
|
|
2231
2235
|
Tag.displayName = "Tag";
|
|
2232
|
-
var Textarea =
|
|
2236
|
+
var Textarea = React30.forwardRef(
|
|
2233
2237
|
(_a, ref) => {
|
|
2234
2238
|
var _b = _a, { className, error, helperText, label, required, id, maxLength, value, onChange, defaultValue } = _b, props = __objRest(_b, ["className", "error", "helperText", "label", "required", "id", "maxLength", "value", "onChange", "defaultValue"]);
|
|
2235
|
-
const textareaId = id || `textarea-${
|
|
2236
|
-
const [charCount, setCharCount] =
|
|
2239
|
+
const textareaId = id || `textarea-${React30.useId()}`;
|
|
2240
|
+
const [charCount, setCharCount] = React30.useState(String(defaultValue || "").length);
|
|
2237
2241
|
const isControlled = value !== void 0;
|
|
2238
2242
|
const currentLength = isControlled ? String(value).length : charCount;
|
|
2239
2243
|
const handleOnChange = (e) => {
|
|
@@ -2325,7 +2329,7 @@ var typographyVariants = cva("font-primary", {
|
|
|
2325
2329
|
variant: "body-md"
|
|
2326
2330
|
}
|
|
2327
2331
|
});
|
|
2328
|
-
var Typography =
|
|
2332
|
+
var Typography = React30.forwardRef(
|
|
2329
2333
|
(_a, ref) => {
|
|
2330
2334
|
var _b = _a, { className, variant, color, as: Component = "p" } = _b, props = __objRest(_b, ["className", "variant", "color", "as"]);
|
|
2331
2335
|
const variantClass = typographyVariants({ variant });
|
|
@@ -2349,7 +2353,7 @@ var levelMapping = {
|
|
|
2349
2353
|
5: { as: "h5", variant: "heading-sm" },
|
|
2350
2354
|
6: { as: "h6", variant: "subheading-lg" }
|
|
2351
2355
|
};
|
|
2352
|
-
var Title =
|
|
2356
|
+
var Title = React30.forwardRef(
|
|
2353
2357
|
(_a, ref) => {
|
|
2354
2358
|
var _b = _a, { level, variant } = _b, props = __objRest(_b, ["level", "variant"]);
|
|
2355
2359
|
const { as, variant: defaultVariant } = levelMapping[level];
|
|
@@ -2364,7 +2368,7 @@ var Title = React29.forwardRef(
|
|
|
2364
2368
|
}
|
|
2365
2369
|
);
|
|
2366
2370
|
Title.displayName = "Title";
|
|
2367
|
-
var Paragraph =
|
|
2371
|
+
var Paragraph = React30.forwardRef(
|
|
2368
2372
|
(_a, ref) => {
|
|
2369
2373
|
var _b = _a, { variant = "body-md" } = _b, props = __objRest(_b, ["variant"]);
|
|
2370
2374
|
return /* @__PURE__ */ jsx(
|
|
@@ -2378,7 +2382,7 @@ var Paragraph = React29.forwardRef(
|
|
|
2378
2382
|
}
|
|
2379
2383
|
);
|
|
2380
2384
|
Paragraph.displayName = "Paragraph";
|
|
2381
|
-
var AccordionItemContext =
|
|
2385
|
+
var AccordionItemContext = React30.createContext({});
|
|
2382
2386
|
var accordionItemVariants = cva("w-full", {
|
|
2383
2387
|
variants: {
|
|
2384
2388
|
variant: {
|
|
@@ -2390,9 +2394,9 @@ var accordionItemVariants = cva("w-full", {
|
|
|
2390
2394
|
variant: "default"
|
|
2391
2395
|
}
|
|
2392
2396
|
});
|
|
2393
|
-
var AccordionTrigger =
|
|
2397
|
+
var AccordionTrigger = React30.forwardRef((_a, ref) => {
|
|
2394
2398
|
var _b = _a, { className, children, icon } = _b, props = __objRest(_b, ["className", "children", "icon"]);
|
|
2395
|
-
const { variant } =
|
|
2399
|
+
const { variant } = React30.useContext(AccordionItemContext);
|
|
2396
2400
|
return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
2397
2401
|
AccordionPrimitive.Trigger,
|
|
2398
2402
|
__spreadProps(__spreadValues({
|
|
@@ -2424,7 +2428,7 @@ var AccordionTrigger = React29.forwardRef((_a, ref) => {
|
|
|
2424
2428
|
) });
|
|
2425
2429
|
});
|
|
2426
2430
|
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
2427
|
-
var AccordionContent =
|
|
2431
|
+
var AccordionContent = React30.forwardRef((_a, ref) => {
|
|
2428
2432
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
2429
2433
|
return /* @__PURE__ */ jsx(
|
|
2430
2434
|
AccordionPrimitive.Content,
|
|
@@ -2437,7 +2441,7 @@ var AccordionContent = React29.forwardRef((_a, ref) => {
|
|
|
2437
2441
|
);
|
|
2438
2442
|
});
|
|
2439
2443
|
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
2440
|
-
var AccordionItem =
|
|
2444
|
+
var AccordionItem = React30.forwardRef((_a, ref) => {
|
|
2441
2445
|
var _b = _a, { className, variant = "default", children } = _b, props = __objRest(_b, ["className", "variant", "children"]);
|
|
2442
2446
|
const variantValue = variant != null ? variant : "default";
|
|
2443
2447
|
return /* @__PURE__ */ jsx(AccordionItemContext.Provider, { value: { variant: variantValue }, children: /* @__PURE__ */ jsx(
|
|
@@ -2451,7 +2455,7 @@ var AccordionItem = React29.forwardRef((_a, ref) => {
|
|
|
2451
2455
|
) });
|
|
2452
2456
|
});
|
|
2453
2457
|
AccordionItem.displayName = "AccordionItem";
|
|
2454
|
-
var Accordion =
|
|
2458
|
+
var Accordion = React30.forwardRef((_a, ref) => {
|
|
2455
2459
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2456
2460
|
return /* @__PURE__ */ jsx(
|
|
2457
2461
|
AccordionPrimitive.Root,
|
|
@@ -2463,7 +2467,7 @@ var Accordion = React29.forwardRef((_a, ref) => {
|
|
|
2463
2467
|
});
|
|
2464
2468
|
Accordion.displayName = "Accordion";
|
|
2465
2469
|
var alertVariants = cva(
|
|
2466
|
-
"relative w-full rounded-2xl px-6 py-
|
|
2470
|
+
"relative w-full rounded-2xl px-6 py-4 flex items-center justify-between",
|
|
2467
2471
|
{
|
|
2468
2472
|
variants: {
|
|
2469
2473
|
variant: {
|
|
@@ -2479,17 +2483,17 @@ var alertVariants = cva(
|
|
|
2479
2483
|
}
|
|
2480
2484
|
}
|
|
2481
2485
|
);
|
|
2482
|
-
var AlertContext =
|
|
2486
|
+
var AlertContext = React30.createContext(null);
|
|
2483
2487
|
var useAlertContext = () => {
|
|
2484
|
-
const context =
|
|
2488
|
+
const context = React30.useContext(AlertContext);
|
|
2485
2489
|
if (!context) {
|
|
2486
2490
|
throw new Error("useAlertContext must be used inside an Alert");
|
|
2487
2491
|
}
|
|
2488
2492
|
return context;
|
|
2489
2493
|
};
|
|
2490
|
-
var Alert =
|
|
2494
|
+
var Alert = React30.forwardRef((_a, ref) => {
|
|
2491
2495
|
var _b = _a, { className, variant, children, isClosable, actions } = _b, props = __objRest(_b, ["className", "variant", "children", "isClosable", "actions"]);
|
|
2492
|
-
const [isVisible, setIsVisible] =
|
|
2496
|
+
const [isVisible, setIsVisible] = React30.useState(true);
|
|
2493
2497
|
if (!isVisible) {
|
|
2494
2498
|
return null;
|
|
2495
2499
|
}
|
|
@@ -2518,7 +2522,7 @@ var Alert = React29.forwardRef((_a, ref) => {
|
|
|
2518
2522
|
) });
|
|
2519
2523
|
});
|
|
2520
2524
|
Alert.displayName = "Alert";
|
|
2521
|
-
var AlertTitle =
|
|
2525
|
+
var AlertTitle = React30.forwardRef((_a, ref) => {
|
|
2522
2526
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2523
2527
|
const { variant } = useAlertContext();
|
|
2524
2528
|
return /* @__PURE__ */ jsx(
|
|
@@ -2539,7 +2543,7 @@ var AlertTitle = React29.forwardRef((_a, ref) => {
|
|
|
2539
2543
|
);
|
|
2540
2544
|
});
|
|
2541
2545
|
AlertTitle.displayName = "AlertTitle";
|
|
2542
|
-
var AlertDescription =
|
|
2546
|
+
var AlertDescription = React30.forwardRef((_a, ref) => {
|
|
2543
2547
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2544
2548
|
const { variant } = useAlertContext();
|
|
2545
2549
|
return /* @__PURE__ */ jsx(
|
|
@@ -2554,7 +2558,7 @@ var AlertDescription = React29.forwardRef((_a, ref) => {
|
|
|
2554
2558
|
);
|
|
2555
2559
|
});
|
|
2556
2560
|
AlertDescription.displayName = "AlertDescription";
|
|
2557
|
-
var Card =
|
|
2561
|
+
var Card = React30.forwardRef((_a, ref) => {
|
|
2558
2562
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2559
2563
|
return /* @__PURE__ */ jsx(
|
|
2560
2564
|
"div",
|
|
@@ -2568,7 +2572,7 @@ var Card = React29.forwardRef((_a, ref) => {
|
|
|
2568
2572
|
);
|
|
2569
2573
|
});
|
|
2570
2574
|
Card.displayName = "Card";
|
|
2571
|
-
var CardHeader =
|
|
2575
|
+
var CardHeader = React30.forwardRef((_a, ref) => {
|
|
2572
2576
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2573
2577
|
return /* @__PURE__ */ jsx(
|
|
2574
2578
|
"div",
|
|
@@ -2579,7 +2583,7 @@ var CardHeader = React29.forwardRef((_a, ref) => {
|
|
|
2579
2583
|
);
|
|
2580
2584
|
});
|
|
2581
2585
|
CardHeader.displayName = "CardHeader";
|
|
2582
|
-
var CardTitle =
|
|
2586
|
+
var CardTitle = React30.forwardRef((_a, ref) => {
|
|
2583
2587
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2584
2588
|
return /* @__PURE__ */ jsx(
|
|
2585
2589
|
"div",
|
|
@@ -2590,7 +2594,7 @@ var CardTitle = React29.forwardRef((_a, ref) => {
|
|
|
2590
2594
|
);
|
|
2591
2595
|
});
|
|
2592
2596
|
CardTitle.displayName = "CardTitle";
|
|
2593
|
-
var CardDescription =
|
|
2597
|
+
var CardDescription = React30.forwardRef((_a, ref) => {
|
|
2594
2598
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2595
2599
|
return /* @__PURE__ */ jsx(
|
|
2596
2600
|
"div",
|
|
@@ -2601,12 +2605,12 @@ var CardDescription = React29.forwardRef((_a, ref) => {
|
|
|
2601
2605
|
);
|
|
2602
2606
|
});
|
|
2603
2607
|
CardDescription.displayName = "CardDescription";
|
|
2604
|
-
var CardContent =
|
|
2608
|
+
var CardContent = React30.forwardRef((_a, ref) => {
|
|
2605
2609
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2606
2610
|
return /* @__PURE__ */ jsx("div", __spreadValues({ ref, className: cn("p-6 pt-0", className) }, props));
|
|
2607
2611
|
});
|
|
2608
2612
|
CardContent.displayName = "CardContent";
|
|
2609
|
-
var CardFooter =
|
|
2613
|
+
var CardFooter = React30.forwardRef((_a, ref) => {
|
|
2610
2614
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2611
2615
|
return /* @__PURE__ */ jsx(
|
|
2612
2616
|
"div",
|
|
@@ -2618,17 +2622,17 @@ var CardFooter = React29.forwardRef((_a, ref) => {
|
|
|
2618
2622
|
});
|
|
2619
2623
|
CardFooter.displayName = "CardFooter";
|
|
2620
2624
|
var THEMES = { light: "", dark: ".dark" };
|
|
2621
|
-
var ChartContext =
|
|
2625
|
+
var ChartContext = React30.createContext(null);
|
|
2622
2626
|
function useChart() {
|
|
2623
|
-
const context =
|
|
2627
|
+
const context = React30.useContext(ChartContext);
|
|
2624
2628
|
if (!context) {
|
|
2625
2629
|
throw new Error("useChart must be used within a <ChartContainer />");
|
|
2626
2630
|
}
|
|
2627
2631
|
return context;
|
|
2628
2632
|
}
|
|
2629
|
-
var ChartContainer =
|
|
2633
|
+
var ChartContainer = React30.forwardRef((_a, ref) => {
|
|
2630
2634
|
var _b = _a, { id, className, children, config } = _b, props = __objRest(_b, ["id", "className", "children", "config"]);
|
|
2631
|
-
const uniqueId =
|
|
2635
|
+
const uniqueId = React30.useId();
|
|
2632
2636
|
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
2633
2637
|
return /* @__PURE__ */ jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs(
|
|
2634
2638
|
"div",
|
|
@@ -2675,7 +2679,7 @@ ${colorConfig.map(([key, itemConfig]) => {
|
|
|
2675
2679
|
);
|
|
2676
2680
|
};
|
|
2677
2681
|
var ChartTooltip = RechartsPrimitive.Tooltip;
|
|
2678
|
-
var ChartTooltipContent =
|
|
2682
|
+
var ChartTooltipContent = React30.forwardRef(
|
|
2679
2683
|
({
|
|
2680
2684
|
active,
|
|
2681
2685
|
payload,
|
|
@@ -2692,7 +2696,7 @@ var ChartTooltipContent = React29.forwardRef(
|
|
|
2692
2696
|
labelKey
|
|
2693
2697
|
}, ref) => {
|
|
2694
2698
|
const { config } = useChart();
|
|
2695
|
-
const tooltipLabel =
|
|
2699
|
+
const tooltipLabel = React30.useMemo(() => {
|
|
2696
2700
|
var _a;
|
|
2697
2701
|
if (hideLabel || !(payload == null ? void 0 : payload.length)) {
|
|
2698
2702
|
return null;
|
|
@@ -2789,7 +2793,7 @@ var ChartTooltipContent = React29.forwardRef(
|
|
|
2789
2793
|
);
|
|
2790
2794
|
ChartTooltipContent.displayName = "ChartTooltip";
|
|
2791
2795
|
var ChartLegend = RechartsPrimitive.Legend;
|
|
2792
|
-
var ChartLegendContent =
|
|
2796
|
+
var ChartLegendContent = React30.forwardRef(
|
|
2793
2797
|
({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }, ref) => {
|
|
2794
2798
|
const { config } = useChart();
|
|
2795
2799
|
if (!(payload == null ? void 0 : payload.length)) {
|
|
@@ -2847,7 +2851,7 @@ function getPayloadConfigFromPayload(config, payload, key) {
|
|
|
2847
2851
|
}
|
|
2848
2852
|
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
2849
2853
|
}
|
|
2850
|
-
var ScrollArea =
|
|
2854
|
+
var ScrollArea = React30.forwardRef((_a, ref) => {
|
|
2851
2855
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
2852
2856
|
return /* @__PURE__ */ jsxs(
|
|
2853
2857
|
ScrollAreaPrimitive.Root,
|
|
@@ -2864,7 +2868,7 @@ var ScrollArea = React29.forwardRef((_a, ref) => {
|
|
|
2864
2868
|
);
|
|
2865
2869
|
});
|
|
2866
2870
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
2867
|
-
var ScrollBar =
|
|
2871
|
+
var ScrollBar = React30.forwardRef((_a, ref) => {
|
|
2868
2872
|
var _b = _a, { className, orientation = "vertical" } = _b, props = __objRest(_b, ["className", "orientation"]);
|
|
2869
2873
|
return /* @__PURE__ */ jsx(
|
|
2870
2874
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
@@ -2895,7 +2899,7 @@ var ScrollBar = React29.forwardRef((_a, ref) => {
|
|
|
2895
2899
|
);
|
|
2896
2900
|
});
|
|
2897
2901
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
2898
|
-
var Table =
|
|
2902
|
+
var Table = React30.forwardRef((_a, ref) => {
|
|
2899
2903
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2900
2904
|
return /* @__PURE__ */ jsxs(ScrollArea, { className: "relative w-full", children: [
|
|
2901
2905
|
/* @__PURE__ */ jsx(
|
|
@@ -2909,12 +2913,12 @@ var Table = React29.forwardRef((_a, ref) => {
|
|
|
2909
2913
|
] });
|
|
2910
2914
|
});
|
|
2911
2915
|
Table.displayName = "Table";
|
|
2912
|
-
var TableHeader =
|
|
2916
|
+
var TableHeader = React30.forwardRef((_a, ref) => {
|
|
2913
2917
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2914
2918
|
return /* @__PURE__ */ jsx("thead", __spreadValues({ ref, className: cn("[&_tr]:border-b", className) }, props));
|
|
2915
2919
|
});
|
|
2916
2920
|
TableHeader.displayName = "TableHeader";
|
|
2917
|
-
var TableBody =
|
|
2921
|
+
var TableBody = React30.forwardRef((_a, ref) => {
|
|
2918
2922
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2919
2923
|
return /* @__PURE__ */ jsx(
|
|
2920
2924
|
"tbody",
|
|
@@ -2925,7 +2929,7 @@ var TableBody = React29.forwardRef((_a, ref) => {
|
|
|
2925
2929
|
);
|
|
2926
2930
|
});
|
|
2927
2931
|
TableBody.displayName = "TableBody";
|
|
2928
|
-
var TableFooter =
|
|
2932
|
+
var TableFooter = React30.forwardRef((_a, ref) => {
|
|
2929
2933
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2930
2934
|
return /* @__PURE__ */ jsx(
|
|
2931
2935
|
"tfoot",
|
|
@@ -2939,7 +2943,7 @@ var TableFooter = React29.forwardRef((_a, ref) => {
|
|
|
2939
2943
|
);
|
|
2940
2944
|
});
|
|
2941
2945
|
TableFooter.displayName = "TableFooter";
|
|
2942
|
-
var TableRow =
|
|
2946
|
+
var TableRow = React30.forwardRef((_a, ref) => {
|
|
2943
2947
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2944
2948
|
return /* @__PURE__ */ jsx(
|
|
2945
2949
|
"tr",
|
|
@@ -2953,7 +2957,7 @@ var TableRow = React29.forwardRef((_a, ref) => {
|
|
|
2953
2957
|
);
|
|
2954
2958
|
});
|
|
2955
2959
|
TableRow.displayName = "TableRow";
|
|
2956
|
-
var TableHead =
|
|
2960
|
+
var TableHead = React30.forwardRef((_a, ref) => {
|
|
2957
2961
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2958
2962
|
return /* @__PURE__ */ jsx(
|
|
2959
2963
|
"th",
|
|
@@ -2967,7 +2971,7 @@ var TableHead = React29.forwardRef((_a, ref) => {
|
|
|
2967
2971
|
);
|
|
2968
2972
|
});
|
|
2969
2973
|
TableHead.displayName = "TableHead";
|
|
2970
|
-
var TableCell =
|
|
2974
|
+
var TableCell = React30.forwardRef((_a, ref) => {
|
|
2971
2975
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2972
2976
|
return /* @__PURE__ */ jsx(
|
|
2973
2977
|
"td",
|
|
@@ -2981,7 +2985,7 @@ var TableCell = React29.forwardRef((_a, ref) => {
|
|
|
2981
2985
|
);
|
|
2982
2986
|
});
|
|
2983
2987
|
TableCell.displayName = "TableCell";
|
|
2984
|
-
var TableCaption =
|
|
2988
|
+
var TableCaption = React30.forwardRef((_a, ref) => {
|
|
2985
2989
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2986
2990
|
return /* @__PURE__ */ jsx(
|
|
2987
2991
|
"caption",
|
|
@@ -3041,7 +3045,7 @@ var usePagination = ({
|
|
|
3041
3045
|
var Select = SelectPrimitive.Root;
|
|
3042
3046
|
var SelectGroup = SelectPrimitive.Group;
|
|
3043
3047
|
var SelectValue = SelectPrimitive.Value;
|
|
3044
|
-
var SelectTrigger =
|
|
3048
|
+
var SelectTrigger = React30.forwardRef((_a, ref) => {
|
|
3045
3049
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
3046
3050
|
return /* @__PURE__ */ jsxs(
|
|
3047
3051
|
SelectPrimitive.Trigger,
|
|
@@ -3060,7 +3064,7 @@ var SelectTrigger = React29.forwardRef((_a, ref) => {
|
|
|
3060
3064
|
);
|
|
3061
3065
|
});
|
|
3062
3066
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
3063
|
-
var SelectScrollUpButton =
|
|
3067
|
+
var SelectScrollUpButton = React30.forwardRef((_a, ref) => {
|
|
3064
3068
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3065
3069
|
return /* @__PURE__ */ jsx(
|
|
3066
3070
|
SelectPrimitive.ScrollUpButton,
|
|
@@ -3076,7 +3080,7 @@ var SelectScrollUpButton = React29.forwardRef((_a, ref) => {
|
|
|
3076
3080
|
);
|
|
3077
3081
|
});
|
|
3078
3082
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
3079
|
-
var SelectScrollDownButton =
|
|
3083
|
+
var SelectScrollDownButton = React30.forwardRef((_a, ref) => {
|
|
3080
3084
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3081
3085
|
return /* @__PURE__ */ jsx(
|
|
3082
3086
|
SelectPrimitive.ScrollDownButton,
|
|
@@ -3092,7 +3096,7 @@ var SelectScrollDownButton = React29.forwardRef((_a, ref) => {
|
|
|
3092
3096
|
);
|
|
3093
3097
|
});
|
|
3094
3098
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
3095
|
-
var SelectContent =
|
|
3099
|
+
var SelectContent = React30.forwardRef((_a, ref) => {
|
|
3096
3100
|
var _b = _a, { className, children, position = "popper" } = _b, props = __objRest(_b, ["className", "children", "position"]);
|
|
3097
3101
|
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
3098
3102
|
SelectPrimitive.Content,
|
|
@@ -3123,7 +3127,7 @@ var SelectContent = React29.forwardRef((_a, ref) => {
|
|
|
3123
3127
|
) });
|
|
3124
3128
|
});
|
|
3125
3129
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
3126
|
-
var SelectLabel =
|
|
3130
|
+
var SelectLabel = React30.forwardRef((_a, ref) => {
|
|
3127
3131
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3128
3132
|
return /* @__PURE__ */ jsx(
|
|
3129
3133
|
SelectPrimitive.Label,
|
|
@@ -3134,7 +3138,7 @@ var SelectLabel = React29.forwardRef((_a, ref) => {
|
|
|
3134
3138
|
);
|
|
3135
3139
|
});
|
|
3136
3140
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
3137
|
-
var SelectItem =
|
|
3141
|
+
var SelectItem = React30.forwardRef((_a, ref) => {
|
|
3138
3142
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
3139
3143
|
return /* @__PURE__ */ jsxs(
|
|
3140
3144
|
SelectPrimitive.Item,
|
|
@@ -3153,7 +3157,7 @@ var SelectItem = React29.forwardRef((_a, ref) => {
|
|
|
3153
3157
|
);
|
|
3154
3158
|
});
|
|
3155
3159
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
3156
|
-
var SelectSeparator =
|
|
3160
|
+
var SelectSeparator = React30.forwardRef((_a, ref) => {
|
|
3157
3161
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3158
3162
|
return /* @__PURE__ */ jsx(
|
|
3159
3163
|
SelectPrimitive.Separator,
|
|
@@ -3330,12 +3334,12 @@ function DataTable(_a) {
|
|
|
3330
3334
|
"stickyLastColumn"
|
|
3331
3335
|
]);
|
|
3332
3336
|
var _a2, _b2;
|
|
3333
|
-
const [sorting, setSorting] =
|
|
3334
|
-
const [columnFilters, setColumnFilters] =
|
|
3337
|
+
const [sorting, setSorting] = React30.useState([]);
|
|
3338
|
+
const [columnFilters, setColumnFilters] = React30.useState(
|
|
3335
3339
|
[]
|
|
3336
3340
|
);
|
|
3337
|
-
const [columnVisibility, setColumnVisibility] =
|
|
3338
|
-
const [rowSelection, setRowSelection] =
|
|
3341
|
+
const [columnVisibility, setColumnVisibility] = React30.useState({});
|
|
3342
|
+
const [rowSelection, setRowSelection] = React30.useState({});
|
|
3339
3343
|
const table = useReactTable({
|
|
3340
3344
|
data,
|
|
3341
3345
|
columns: columns2,
|
|
@@ -3404,7 +3408,7 @@ function DataTable(_a) {
|
|
|
3404
3408
|
"sticky right-0 bg-white shadow-lg z-10": shouldStick,
|
|
3405
3409
|
"border-l border-primary-300": shouldStick
|
|
3406
3410
|
}),
|
|
3407
|
-
children: ((_a3 = column.columnDef.meta) == null ? void 0 : _a3.skeleton) ?
|
|
3411
|
+
children: ((_a3 = column.columnDef.meta) == null ? void 0 : _a3.skeleton) ? React30.createElement(
|
|
3408
3412
|
column.columnDef.meta.skeleton
|
|
3409
3413
|
) : null
|
|
3410
3414
|
},
|
|
@@ -3828,7 +3832,7 @@ function Calendar(_a) {
|
|
|
3828
3832
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
3829
3833
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
3830
3834
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
3831
|
-
var DropdownMenuSubTrigger =
|
|
3835
|
+
var DropdownMenuSubTrigger = React30.forwardRef((_a, ref) => {
|
|
3832
3836
|
var _b = _a, { className, inset, children } = _b, props = __objRest(_b, ["className", "inset", "children"]);
|
|
3833
3837
|
return /* @__PURE__ */ jsxs(
|
|
3834
3838
|
DropdownMenuPrimitive.SubTrigger,
|
|
@@ -3848,7 +3852,7 @@ var DropdownMenuSubTrigger = React29.forwardRef((_a, ref) => {
|
|
|
3848
3852
|
);
|
|
3849
3853
|
});
|
|
3850
3854
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
3851
|
-
var DropdownMenuSubContent =
|
|
3855
|
+
var DropdownMenuSubContent = React30.forwardRef((_a, ref) => {
|
|
3852
3856
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3853
3857
|
return /* @__PURE__ */ jsx(
|
|
3854
3858
|
DropdownMenuPrimitive.SubContent,
|
|
@@ -3862,7 +3866,7 @@ var DropdownMenuSubContent = React29.forwardRef((_a, ref) => {
|
|
|
3862
3866
|
);
|
|
3863
3867
|
});
|
|
3864
3868
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
3865
|
-
var DropdownMenuContent =
|
|
3869
|
+
var DropdownMenuContent = React30.forwardRef((_a, ref) => {
|
|
3866
3870
|
var _b = _a, { className, sideOffset = 4 } = _b, props = __objRest(_b, ["className", "sideOffset"]);
|
|
3867
3871
|
return /* @__PURE__ */ jsx(DropdownMenuPortal, { children: /* @__PURE__ */ jsx(
|
|
3868
3872
|
DropdownMenuPrimitive.Content,
|
|
@@ -3878,7 +3882,7 @@ var DropdownMenuContent = React29.forwardRef((_a, ref) => {
|
|
|
3878
3882
|
) });
|
|
3879
3883
|
});
|
|
3880
3884
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
3881
|
-
var DropdownMenuItem =
|
|
3885
|
+
var DropdownMenuItem = React30.forwardRef((_a, ref) => {
|
|
3882
3886
|
var _b = _a, { className, inset } = _b, props = __objRest(_b, ["className", "inset"]);
|
|
3883
3887
|
return /* @__PURE__ */ jsx(
|
|
3884
3888
|
DropdownMenuPrimitive.Item,
|
|
@@ -3893,7 +3897,7 @@ var DropdownMenuItem = React29.forwardRef((_a, ref) => {
|
|
|
3893
3897
|
);
|
|
3894
3898
|
});
|
|
3895
3899
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
3896
|
-
var DropdownMenuCheckboxItem =
|
|
3900
|
+
var DropdownMenuCheckboxItem = React30.forwardRef((_a, ref) => {
|
|
3897
3901
|
var _b = _a, { className, children, checked } = _b, props = __objRest(_b, ["className", "children", "checked"]);
|
|
3898
3902
|
return /* @__PURE__ */ jsxs(
|
|
3899
3903
|
DropdownMenuPrimitive.CheckboxItem,
|
|
@@ -3913,7 +3917,7 @@ var DropdownMenuCheckboxItem = React29.forwardRef((_a, ref) => {
|
|
|
3913
3917
|
);
|
|
3914
3918
|
});
|
|
3915
3919
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
3916
|
-
var DropdownMenuRadioItem =
|
|
3920
|
+
var DropdownMenuRadioItem = React30.forwardRef((_a, ref) => {
|
|
3917
3921
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
3918
3922
|
return /* @__PURE__ */ jsxs(
|
|
3919
3923
|
DropdownMenuPrimitive.RadioItem,
|
|
@@ -3932,7 +3936,7 @@ var DropdownMenuRadioItem = React29.forwardRef((_a, ref) => {
|
|
|
3932
3936
|
);
|
|
3933
3937
|
});
|
|
3934
3938
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
3935
|
-
var DropdownMenuLabel =
|
|
3939
|
+
var DropdownMenuLabel = React30.forwardRef((_a, ref) => {
|
|
3936
3940
|
var _b = _a, { className, inset } = _b, props = __objRest(_b, ["className", "inset"]);
|
|
3937
3941
|
return /* @__PURE__ */ jsx(
|
|
3938
3942
|
DropdownMenuPrimitive.Label,
|
|
@@ -3947,7 +3951,7 @@ var DropdownMenuLabel = React29.forwardRef((_a, ref) => {
|
|
|
3947
3951
|
);
|
|
3948
3952
|
});
|
|
3949
3953
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
3950
|
-
var DropdownMenuSeparator =
|
|
3954
|
+
var DropdownMenuSeparator = React30.forwardRef((_a, ref) => {
|
|
3951
3955
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3952
3956
|
return /* @__PURE__ */ jsx(
|
|
3953
3957
|
DropdownMenuPrimitive.Separator,
|
|
@@ -3964,10 +3968,10 @@ function DatePickerWithRange({
|
|
|
3964
3968
|
onDateChange,
|
|
3965
3969
|
label
|
|
3966
3970
|
}) {
|
|
3967
|
-
const [month, setMonth] =
|
|
3968
|
-
const [open, setOpen] =
|
|
3969
|
-
const [inputValue, setInputValue] =
|
|
3970
|
-
|
|
3971
|
+
const [month, setMonth] = React30.useState((date == null ? void 0 : date.from) || /* @__PURE__ */ new Date());
|
|
3972
|
+
const [open, setOpen] = React30.useState(false);
|
|
3973
|
+
const [inputValue, setInputValue] = React30.useState("");
|
|
3974
|
+
React30.useEffect(() => {
|
|
3971
3975
|
if (date == null ? void 0 : date.from) {
|
|
3972
3976
|
if (date.to) {
|
|
3973
3977
|
setInputValue(
|
|
@@ -4021,7 +4025,7 @@ function DatePickerWithRange({
|
|
|
4021
4025
|
onDateChange(range2);
|
|
4022
4026
|
setMonth(range2.from || /* @__PURE__ */ new Date());
|
|
4023
4027
|
};
|
|
4024
|
-
const isCustomDate =
|
|
4028
|
+
const isCustomDate = React30.useMemo(() => {
|
|
4025
4029
|
if (!date || !date.from) return false;
|
|
4026
4030
|
return !presets2.some(
|
|
4027
4031
|
(p) => isEqual(p.range.from, date.from || /* @__PURE__ */ new Date(0)) && isEqual(p.range.to || /* @__PURE__ */ new Date(0), date.to || /* @__PURE__ */ new Date(0))
|
|
@@ -4106,10 +4110,10 @@ function DatePickerSingle({
|
|
|
4106
4110
|
placeholder = "dd/mm/aa",
|
|
4107
4111
|
error
|
|
4108
4112
|
}) {
|
|
4109
|
-
const [month, setMonth] =
|
|
4110
|
-
const [open, setOpen] =
|
|
4111
|
-
const [inputValue, setInputValue] =
|
|
4112
|
-
|
|
4113
|
+
const [month, setMonth] = React30.useState(date || /* @__PURE__ */ new Date());
|
|
4114
|
+
const [open, setOpen] = React30.useState(false);
|
|
4115
|
+
const [inputValue, setInputValue] = React30.useState("");
|
|
4116
|
+
React30.useEffect(() => {
|
|
4113
4117
|
setInputValue(date ? format(date, "dd/MM/yyyy") : "");
|
|
4114
4118
|
}, [date]);
|
|
4115
4119
|
const handleInputChange = (e) => {
|
|
@@ -4176,7 +4180,7 @@ function DatePickerSingle({
|
|
|
4176
4180
|
] });
|
|
4177
4181
|
}
|
|
4178
4182
|
var defaultIncludesFilter = (value, search) => value.toLowerCase().includes(search.toLowerCase()) ? 1 : 0;
|
|
4179
|
-
var Dropdown =
|
|
4183
|
+
var Dropdown = React30.forwardRef(
|
|
4180
4184
|
({
|
|
4181
4185
|
label,
|
|
4182
4186
|
options,
|
|
@@ -4190,10 +4194,10 @@ var Dropdown = React29.forwardRef(
|
|
|
4190
4194
|
required,
|
|
4191
4195
|
filter
|
|
4192
4196
|
}, ref) => {
|
|
4193
|
-
const [open, setOpen] =
|
|
4194
|
-
const [inputValue, setInputValue] =
|
|
4195
|
-
const inputId = name || `dropdown-${
|
|
4196
|
-
const popoverRef =
|
|
4197
|
+
const [open, setOpen] = React30.useState(false);
|
|
4198
|
+
const [inputValue, setInputValue] = React30.useState("");
|
|
4199
|
+
const inputId = name || `dropdown-${React30.useId()}`;
|
|
4200
|
+
const popoverRef = React30.useRef(null);
|
|
4197
4201
|
const handleSelect = (currentValue) => {
|
|
4198
4202
|
if (onChange) {
|
|
4199
4203
|
onChange(currentValue);
|
|
@@ -4202,11 +4206,11 @@ var Dropdown = React29.forwardRef(
|
|
|
4202
4206
|
setInputValue(selectedOption ? selectedOption.label : "");
|
|
4203
4207
|
setOpen(false);
|
|
4204
4208
|
};
|
|
4205
|
-
|
|
4209
|
+
React30.useEffect(() => {
|
|
4206
4210
|
const selectedOption = options.find((o) => o.value === value);
|
|
4207
4211
|
setInputValue(selectedOption ? selectedOption.label : "");
|
|
4208
4212
|
}, [value, options]);
|
|
4209
|
-
|
|
4213
|
+
React30.useEffect(() => {
|
|
4210
4214
|
const handleClickOutside = (event) => {
|
|
4211
4215
|
if (popoverRef.current && !popoverRef.current.contains(event.target)) {
|
|
4212
4216
|
setOpen(false);
|
|
@@ -4320,7 +4324,320 @@ var Dropdown = React29.forwardRef(
|
|
|
4320
4324
|
}
|
|
4321
4325
|
);
|
|
4322
4326
|
Dropdown.displayName = "Dropdown";
|
|
4323
|
-
var
|
|
4327
|
+
var progressBarContainerVariants = cva("w-full min-w-[200px]", {
|
|
4328
|
+
variants: {
|
|
4329
|
+
size: {
|
|
4330
|
+
sm: "text-progress-bar-sm",
|
|
4331
|
+
md: "text-progress-bar-md",
|
|
4332
|
+
lg: "text-progress-bar-lg"
|
|
4333
|
+
}
|
|
4334
|
+
},
|
|
4335
|
+
defaultVariants: {
|
|
4336
|
+
size: "md"
|
|
4337
|
+
}
|
|
4338
|
+
});
|
|
4339
|
+
var progressBarTrackVariants = cva(
|
|
4340
|
+
"overflow-hidden rounded-full bg-progress-bar-track",
|
|
4341
|
+
{
|
|
4342
|
+
variants: {
|
|
4343
|
+
size: {
|
|
4344
|
+
sm: "h-progress-bar-sm",
|
|
4345
|
+
md: "h-progress-bar-md",
|
|
4346
|
+
lg: "h-progress-bar-lg"
|
|
4347
|
+
}
|
|
4348
|
+
},
|
|
4349
|
+
defaultVariants: {
|
|
4350
|
+
size: "md"
|
|
4351
|
+
}
|
|
4352
|
+
}
|
|
4353
|
+
);
|
|
4354
|
+
var progressBarIndicatorVariants = cva(
|
|
4355
|
+
"h-full rounded-full bg-progress-bar-indicator transition-all duration-300 ease-in-out",
|
|
4356
|
+
{
|
|
4357
|
+
variants: {},
|
|
4358
|
+
defaultVariants: {}
|
|
4359
|
+
}
|
|
4360
|
+
);
|
|
4361
|
+
var ProgressBar = React30__default.forwardRef(
|
|
4362
|
+
(_a, ref) => {
|
|
4363
|
+
var _b = _a, {
|
|
4364
|
+
className,
|
|
4365
|
+
value,
|
|
4366
|
+
label,
|
|
4367
|
+
size,
|
|
4368
|
+
showPercentage = true
|
|
4369
|
+
} = _b, props = __objRest(_b, [
|
|
4370
|
+
"className",
|
|
4371
|
+
"value",
|
|
4372
|
+
"label",
|
|
4373
|
+
"size",
|
|
4374
|
+
"showPercentage"
|
|
4375
|
+
]);
|
|
4376
|
+
const progress = Math.max(0, Math.min(100, value || 0));
|
|
4377
|
+
return /* @__PURE__ */ jsxs(
|
|
4378
|
+
"div",
|
|
4379
|
+
__spreadProps(__spreadValues({
|
|
4380
|
+
ref,
|
|
4381
|
+
className: cn(progressBarContainerVariants({ size }), className)
|
|
4382
|
+
}, props), {
|
|
4383
|
+
children: [
|
|
4384
|
+
(label || showPercentage) && /* @__PURE__ */ jsxs(
|
|
4385
|
+
"div",
|
|
4386
|
+
{
|
|
4387
|
+
className: cn(
|
|
4388
|
+
"flex items-center mb-1",
|
|
4389
|
+
label ? "justify-between" : "justify-end"
|
|
4390
|
+
),
|
|
4391
|
+
children: [
|
|
4392
|
+
label && /* @__PURE__ */ jsx(Label, { className: "text-progress-bar-label font-normal", children: label }),
|
|
4393
|
+
showPercentage && /* @__PURE__ */ jsxs("span", { className: "text-progress-bar-label font-normal", children: [
|
|
4394
|
+
Math.round(progress),
|
|
4395
|
+
"%"
|
|
4396
|
+
] })
|
|
4397
|
+
]
|
|
4398
|
+
}
|
|
4399
|
+
),
|
|
4400
|
+
/* @__PURE__ */ jsx("div", { className: cn(progressBarTrackVariants({ size })), children: /* @__PURE__ */ jsx(
|
|
4401
|
+
"div",
|
|
4402
|
+
{
|
|
4403
|
+
className: cn(progressBarIndicatorVariants()),
|
|
4404
|
+
style: { width: `${progress}%` }
|
|
4405
|
+
}
|
|
4406
|
+
) })
|
|
4407
|
+
]
|
|
4408
|
+
})
|
|
4409
|
+
);
|
|
4410
|
+
}
|
|
4411
|
+
);
|
|
4412
|
+
ProgressBar.displayName = "ProgressBar";
|
|
4413
|
+
var FileUploadDropzone = React30.forwardRef(
|
|
4414
|
+
(_a, ref) => {
|
|
4415
|
+
var _b = _a, {
|
|
4416
|
+
className,
|
|
4417
|
+
onSelect,
|
|
4418
|
+
accept = ".png,.jpg,.jpeg,.pdf",
|
|
4419
|
+
disabled = false,
|
|
4420
|
+
subtitle = "PNG, JPG, JPEG o PDF",
|
|
4421
|
+
buttonLabel = "Abrir explorador"
|
|
4422
|
+
} = _b, props = __objRest(_b, [
|
|
4423
|
+
"className",
|
|
4424
|
+
"onSelect",
|
|
4425
|
+
"accept",
|
|
4426
|
+
"disabled",
|
|
4427
|
+
"subtitle",
|
|
4428
|
+
"buttonLabel"
|
|
4429
|
+
]);
|
|
4430
|
+
const inputRef = React30.useRef(null);
|
|
4431
|
+
const handleChange = (e) => {
|
|
4432
|
+
const files = e.target.files;
|
|
4433
|
+
if (files && files.length > 0) {
|
|
4434
|
+
onSelect(Array.from(files));
|
|
4435
|
+
}
|
|
4436
|
+
e.target.value = "";
|
|
4437
|
+
};
|
|
4438
|
+
return /* @__PURE__ */ jsxs(
|
|
4439
|
+
"div",
|
|
4440
|
+
__spreadProps(__spreadValues({
|
|
4441
|
+
ref,
|
|
4442
|
+
className: cn(
|
|
4443
|
+
"flex flex-col gap-[26px] rounded-2xl border border-primary-400 bg-white p-6",
|
|
4444
|
+
className
|
|
4445
|
+
)
|
|
4446
|
+
}, props), {
|
|
4447
|
+
children: [
|
|
4448
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
4449
|
+
/* @__PURE__ */ jsx(FolderCloudIcon, { className: "h-6 w-6 text-primary-600", "aria-hidden": "true" }),
|
|
4450
|
+
/* @__PURE__ */ jsx("p", { className: "text-base text-primary-1200", children: "A\xF1adir archivos" }),
|
|
4451
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-primary-1200", children: subtitle })
|
|
4452
|
+
] }),
|
|
4453
|
+
/* @__PURE__ */ jsx(
|
|
4454
|
+
Button,
|
|
4455
|
+
{
|
|
4456
|
+
type: "button",
|
|
4457
|
+
variant: "primary",
|
|
4458
|
+
size: "lg",
|
|
4459
|
+
className: "w-full",
|
|
4460
|
+
disabled,
|
|
4461
|
+
iconLeft: /* @__PURE__ */ jsx(DocumentDownloadIcon, {}),
|
|
4462
|
+
onClick: () => {
|
|
4463
|
+
var _a2;
|
|
4464
|
+
return (_a2 = inputRef.current) == null ? void 0 : _a2.click();
|
|
4465
|
+
},
|
|
4466
|
+
children: buttonLabel
|
|
4467
|
+
}
|
|
4468
|
+
),
|
|
4469
|
+
/* @__PURE__ */ jsx(
|
|
4470
|
+
"input",
|
|
4471
|
+
{
|
|
4472
|
+
ref: inputRef,
|
|
4473
|
+
type: "file",
|
|
4474
|
+
hidden: true,
|
|
4475
|
+
accept,
|
|
4476
|
+
disabled,
|
|
4477
|
+
onChange: handleChange
|
|
4478
|
+
}
|
|
4479
|
+
)
|
|
4480
|
+
]
|
|
4481
|
+
})
|
|
4482
|
+
);
|
|
4483
|
+
}
|
|
4484
|
+
);
|
|
4485
|
+
FileUploadDropzone.displayName = "FileUploadDropzone";
|
|
4486
|
+
function formatFileSize(bytes) {
|
|
4487
|
+
if (bytes >= 1048576) return `${Math.round(bytes / 1048576)} MB`;
|
|
4488
|
+
if (bytes >= 1024) return `${Math.round(bytes / 1024)} KB`;
|
|
4489
|
+
return `${bytes} B`;
|
|
4490
|
+
}
|
|
4491
|
+
var FileUploadItem = React30.forwardRef(
|
|
4492
|
+
(_a, ref) => {
|
|
4493
|
+
var _b = _a, {
|
|
4494
|
+
className,
|
|
4495
|
+
name,
|
|
4496
|
+
size,
|
|
4497
|
+
status,
|
|
4498
|
+
progress = 0,
|
|
4499
|
+
errorMessage,
|
|
4500
|
+
onDelete
|
|
4501
|
+
} = _b, props = __objRest(_b, [
|
|
4502
|
+
"className",
|
|
4503
|
+
"name",
|
|
4504
|
+
"size",
|
|
4505
|
+
"status",
|
|
4506
|
+
"progress",
|
|
4507
|
+
"errorMessage",
|
|
4508
|
+
"onDelete"
|
|
4509
|
+
]);
|
|
4510
|
+
return /* @__PURE__ */ jsxs(
|
|
4511
|
+
"div",
|
|
4512
|
+
__spreadProps(__spreadValues({
|
|
4513
|
+
ref,
|
|
4514
|
+
className: cn(
|
|
4515
|
+
"flex items-start gap-4 rounded-2xl border border-primary-300 bg-white p-4",
|
|
4516
|
+
className
|
|
4517
|
+
)
|
|
4518
|
+
}, props), {
|
|
4519
|
+
children: [
|
|
4520
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-6", children: [
|
|
4521
|
+
/* @__PURE__ */ jsx(
|
|
4522
|
+
"div",
|
|
4523
|
+
{
|
|
4524
|
+
className: cn(
|
|
4525
|
+
"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl",
|
|
4526
|
+
status === "uploaded" ? "bg-secondary-200" : status === "error" ? "bg-red-200" : "bg-primary-100"
|
|
4527
|
+
),
|
|
4528
|
+
children: /* @__PURE__ */ jsx(
|
|
4529
|
+
DocumentTextIcon,
|
|
4530
|
+
{
|
|
4531
|
+
className: cn(
|
|
4532
|
+
"h-5 w-5",
|
|
4533
|
+
status === "uploaded" ? "text-secondary-900" : status === "error" ? "text-red-600" : "text-primary-600"
|
|
4534
|
+
),
|
|
4535
|
+
"aria-hidden": "true"
|
|
4536
|
+
}
|
|
4537
|
+
)
|
|
4538
|
+
}
|
|
4539
|
+
),
|
|
4540
|
+
/* @__PURE__ */ jsx("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: status === "uploading" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4541
|
+
/* @__PURE__ */ jsx(ProgressBar, { value: progress, label: name, showPercentage: true, size: "sm" }),
|
|
4542
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-primary-600", children: formatFileSize(size) })
|
|
4543
|
+
] }) : status === "error" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4544
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-sm text-primary-1200", children: name }),
|
|
4545
|
+
errorMessage && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-xs text-red-600", children: [
|
|
4546
|
+
/* @__PURE__ */ jsx("span", { children: "Ops!" }),
|
|
4547
|
+
/* @__PURE__ */ jsx(
|
|
4548
|
+
"span",
|
|
4549
|
+
{
|
|
4550
|
+
className: "h-1 w-1 shrink-0 rounded-full bg-red-600",
|
|
4551
|
+
"aria-hidden": "true"
|
|
4552
|
+
}
|
|
4553
|
+
),
|
|
4554
|
+
/* @__PURE__ */ jsx("span", { children: errorMessage })
|
|
4555
|
+
] })
|
|
4556
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4557
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-sm text-primary-1200", children: name }),
|
|
4558
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-primary-600", children: formatFileSize(size) })
|
|
4559
|
+
] }) })
|
|
4560
|
+
] }),
|
|
4561
|
+
/* @__PURE__ */ jsx(
|
|
4562
|
+
Button,
|
|
4563
|
+
{
|
|
4564
|
+
type: "button",
|
|
4565
|
+
variant: "icon",
|
|
4566
|
+
size: "md",
|
|
4567
|
+
icon: /* @__PURE__ */ jsx(TrashIcon, {}),
|
|
4568
|
+
onClick: onDelete,
|
|
4569
|
+
"aria-label": "Eliminar archivo"
|
|
4570
|
+
}
|
|
4571
|
+
)
|
|
4572
|
+
]
|
|
4573
|
+
})
|
|
4574
|
+
);
|
|
4575
|
+
}
|
|
4576
|
+
);
|
|
4577
|
+
FileUploadItem.displayName = "FileUploadItem";
|
|
4578
|
+
var FileUpload = React30.forwardRef(
|
|
4579
|
+
(_a, ref) => {
|
|
4580
|
+
var _b = _a, {
|
|
4581
|
+
className,
|
|
4582
|
+
files,
|
|
4583
|
+
onSelect,
|
|
4584
|
+
onDelete,
|
|
4585
|
+
maxFiles = 1,
|
|
4586
|
+
accept,
|
|
4587
|
+
subtitle,
|
|
4588
|
+
disabled = false,
|
|
4589
|
+
recommendations
|
|
4590
|
+
} = _b, props = __objRest(_b, [
|
|
4591
|
+
"className",
|
|
4592
|
+
"files",
|
|
4593
|
+
"onSelect",
|
|
4594
|
+
"onDelete",
|
|
4595
|
+
"maxFiles",
|
|
4596
|
+
"accept",
|
|
4597
|
+
"subtitle",
|
|
4598
|
+
"disabled",
|
|
4599
|
+
"recommendations"
|
|
4600
|
+
]);
|
|
4601
|
+
const showDropzone = files.length < maxFiles && !files.some((f) => f.status === "uploading");
|
|
4602
|
+
return /* @__PURE__ */ jsxs(
|
|
4603
|
+
"div",
|
|
4604
|
+
__spreadProps(__spreadValues({
|
|
4605
|
+
ref,
|
|
4606
|
+
className: cn("flex flex-col gap-4", className)
|
|
4607
|
+
}, props), {
|
|
4608
|
+
children: [
|
|
4609
|
+
recommendations && recommendations.length > 0 && /* @__PURE__ */ jsx(Alert, { variant: "neutral", className: "py-4", children: /* @__PURE__ */ jsx(AlertDescription, { children: recommendations.map((text, i) => /* @__PURE__ */ jsxs("span", { children: [
|
|
4610
|
+
text,
|
|
4611
|
+
i < recommendations.length - 1 && /* @__PURE__ */ jsx("br", {})
|
|
4612
|
+
] }, i)) }) }),
|
|
4613
|
+
showDropzone && /* @__PURE__ */ jsx(
|
|
4614
|
+
FileUploadDropzone,
|
|
4615
|
+
{
|
|
4616
|
+
onSelect,
|
|
4617
|
+
accept,
|
|
4618
|
+
subtitle,
|
|
4619
|
+
disabled
|
|
4620
|
+
}
|
|
4621
|
+
),
|
|
4622
|
+
files.map((file) => /* @__PURE__ */ jsx(
|
|
4623
|
+
FileUploadItem,
|
|
4624
|
+
{
|
|
4625
|
+
name: file.name,
|
|
4626
|
+
size: file.size,
|
|
4627
|
+
status: file.status,
|
|
4628
|
+
progress: file.progress,
|
|
4629
|
+
errorMessage: file.errorMessage,
|
|
4630
|
+
onDelete: () => onDelete(file.id)
|
|
4631
|
+
},
|
|
4632
|
+
file.id
|
|
4633
|
+
))
|
|
4634
|
+
]
|
|
4635
|
+
})
|
|
4636
|
+
);
|
|
4637
|
+
}
|
|
4638
|
+
);
|
|
4639
|
+
FileUpload.displayName = "FileUpload";
|
|
4640
|
+
var Form = React30.forwardRef(
|
|
4324
4641
|
(_a, ref) => {
|
|
4325
4642
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
4326
4643
|
return /* @__PURE__ */ jsx(
|
|
@@ -4333,7 +4650,7 @@ var Form = React29.forwardRef(
|
|
|
4333
4650
|
}
|
|
4334
4651
|
);
|
|
4335
4652
|
Form.displayName = "Form";
|
|
4336
|
-
var FormField =
|
|
4653
|
+
var FormField = React30.forwardRef(
|
|
4337
4654
|
(_a, ref) => {
|
|
4338
4655
|
var _b = _a, { className, error } = _b, props = __objRest(_b, ["className", "error"]);
|
|
4339
4656
|
return /* @__PURE__ */ jsx(
|
|
@@ -4351,7 +4668,7 @@ var FormField = React29.forwardRef(
|
|
|
4351
4668
|
}
|
|
4352
4669
|
);
|
|
4353
4670
|
FormField.displayName = "FormField";
|
|
4354
|
-
var FormLabel =
|
|
4671
|
+
var FormLabel = React30.forwardRef(
|
|
4355
4672
|
(_a, ref) => {
|
|
4356
4673
|
var _b = _a, { className, required, children } = _b, props = __objRest(_b, ["className", "required", "children"]);
|
|
4357
4674
|
return /* @__PURE__ */ jsxs(
|
|
@@ -4372,7 +4689,7 @@ var FormLabel = React29.forwardRef(
|
|
|
4372
4689
|
}
|
|
4373
4690
|
);
|
|
4374
4691
|
FormLabel.displayName = "FormLabel";
|
|
4375
|
-
var FormMessage =
|
|
4692
|
+
var FormMessage = React30.forwardRef(
|
|
4376
4693
|
(_a, ref) => {
|
|
4377
4694
|
var _b = _a, { className, type = "helper" } = _b, props = __objRest(_b, ["className", "type"]);
|
|
4378
4695
|
return /* @__PURE__ */ jsx(
|
|
@@ -4513,7 +4830,7 @@ var getColPositionClasses = (colStart, colEnd) => {
|
|
|
4513
4830
|
}
|
|
4514
4831
|
return classes.join(" ");
|
|
4515
4832
|
};
|
|
4516
|
-
var Grid =
|
|
4833
|
+
var Grid = React30__default.forwardRef(
|
|
4517
4834
|
(_a, ref) => {
|
|
4518
4835
|
var _b = _a, {
|
|
4519
4836
|
container = true,
|
|
@@ -4569,7 +4886,7 @@ var Grid = React29__default.forwardRef(
|
|
|
4569
4886
|
}
|
|
4570
4887
|
);
|
|
4571
4888
|
Grid.displayName = "Grid";
|
|
4572
|
-
var GridItem =
|
|
4889
|
+
var GridItem = React30__default.forwardRef(
|
|
4573
4890
|
(_a, ref) => {
|
|
4574
4891
|
var _b = _a, {
|
|
4575
4892
|
span,
|
|
@@ -4611,101 +4928,15 @@ var GridItem = React29__default.forwardRef(
|
|
|
4611
4928
|
}
|
|
4612
4929
|
);
|
|
4613
4930
|
GridItem.displayName = "GridItem";
|
|
4614
|
-
var
|
|
4615
|
-
variants: {
|
|
4616
|
-
size: {
|
|
4617
|
-
sm: "text-progress-bar-sm",
|
|
4618
|
-
md: "text-progress-bar-md",
|
|
4619
|
-
lg: "text-progress-bar-lg"
|
|
4620
|
-
}
|
|
4621
|
-
},
|
|
4622
|
-
defaultVariants: {
|
|
4623
|
-
size: "md"
|
|
4624
|
-
}
|
|
4625
|
-
});
|
|
4626
|
-
var progressBarTrackVariants = cva(
|
|
4627
|
-
"overflow-hidden rounded-full bg-progress-bar-track",
|
|
4628
|
-
{
|
|
4629
|
-
variants: {
|
|
4630
|
-
size: {
|
|
4631
|
-
sm: "h-progress-bar-sm",
|
|
4632
|
-
md: "h-progress-bar-md",
|
|
4633
|
-
lg: "h-progress-bar-lg"
|
|
4634
|
-
}
|
|
4635
|
-
},
|
|
4636
|
-
defaultVariants: {
|
|
4637
|
-
size: "md"
|
|
4638
|
-
}
|
|
4639
|
-
}
|
|
4640
|
-
);
|
|
4641
|
-
var progressBarIndicatorVariants = cva(
|
|
4642
|
-
"h-full rounded-full bg-progress-bar-indicator transition-all duration-300 ease-in-out",
|
|
4643
|
-
{
|
|
4644
|
-
variants: {},
|
|
4645
|
-
defaultVariants: {}
|
|
4646
|
-
}
|
|
4647
|
-
);
|
|
4648
|
-
var ProgressBar = React29__default.forwardRef(
|
|
4649
|
-
(_a, ref) => {
|
|
4650
|
-
var _b = _a, {
|
|
4651
|
-
className,
|
|
4652
|
-
value,
|
|
4653
|
-
label,
|
|
4654
|
-
size,
|
|
4655
|
-
showPercentage = true
|
|
4656
|
-
} = _b, props = __objRest(_b, [
|
|
4657
|
-
"className",
|
|
4658
|
-
"value",
|
|
4659
|
-
"label",
|
|
4660
|
-
"size",
|
|
4661
|
-
"showPercentage"
|
|
4662
|
-
]);
|
|
4663
|
-
const progress = Math.max(0, Math.min(100, value || 0));
|
|
4664
|
-
return /* @__PURE__ */ jsxs(
|
|
4665
|
-
"div",
|
|
4666
|
-
__spreadProps(__spreadValues({
|
|
4667
|
-
ref,
|
|
4668
|
-
className: cn(progressBarContainerVariants({ size }), className)
|
|
4669
|
-
}, props), {
|
|
4670
|
-
children: [
|
|
4671
|
-
(label || showPercentage) && /* @__PURE__ */ jsxs(
|
|
4672
|
-
"div",
|
|
4673
|
-
{
|
|
4674
|
-
className: cn(
|
|
4675
|
-
"flex items-center mb-1",
|
|
4676
|
-
label ? "justify-between" : "justify-end"
|
|
4677
|
-
),
|
|
4678
|
-
children: [
|
|
4679
|
-
label && /* @__PURE__ */ jsx(Label, { className: "text-progress-bar-label font-normal", children: label }),
|
|
4680
|
-
showPercentage && /* @__PURE__ */ jsxs("span", { className: "text-progress-bar-label font-normal", children: [
|
|
4681
|
-
Math.round(progress),
|
|
4682
|
-
"%"
|
|
4683
|
-
] })
|
|
4684
|
-
]
|
|
4685
|
-
}
|
|
4686
|
-
),
|
|
4687
|
-
/* @__PURE__ */ jsx("div", { className: cn(progressBarTrackVariants({ size })), children: /* @__PURE__ */ jsx(
|
|
4688
|
-
"div",
|
|
4689
|
-
{
|
|
4690
|
-
className: cn(progressBarIndicatorVariants()),
|
|
4691
|
-
style: { width: `${progress}%` }
|
|
4692
|
-
}
|
|
4693
|
-
) })
|
|
4694
|
-
]
|
|
4695
|
-
})
|
|
4696
|
-
);
|
|
4697
|
-
}
|
|
4698
|
-
);
|
|
4699
|
-
ProgressBar.displayName = "ProgressBar";
|
|
4700
|
-
var StepperContext = React29.createContext(null);
|
|
4931
|
+
var StepperContext = React30.createContext(null);
|
|
4701
4932
|
var useStepper = () => {
|
|
4702
|
-
const context =
|
|
4933
|
+
const context = React30.useContext(StepperContext);
|
|
4703
4934
|
if (!context) {
|
|
4704
4935
|
throw new Error("useStepper must be used within a Stepper component");
|
|
4705
4936
|
}
|
|
4706
4937
|
return context;
|
|
4707
4938
|
};
|
|
4708
|
-
var Stepper =
|
|
4939
|
+
var Stepper = React30.forwardRef(
|
|
4709
4940
|
(_a, ref) => {
|
|
4710
4941
|
var _b = _a, {
|
|
4711
4942
|
className,
|
|
@@ -4721,8 +4952,8 @@ var Stepper = React29.forwardRef(
|
|
|
4721
4952
|
"onStepChange"
|
|
4722
4953
|
]);
|
|
4723
4954
|
var _a2;
|
|
4724
|
-
const [activeStep, setActiveStep] =
|
|
4725
|
-
|
|
4955
|
+
const [activeStep, setActiveStep] = React30.useState(initialStep);
|
|
4956
|
+
React30.useImperativeHandle(ref, () => ({
|
|
4726
4957
|
goToNextStep: () => {
|
|
4727
4958
|
setActiveStep((prev) => {
|
|
4728
4959
|
const nextStep = prev < steps.length - 1 ? prev + 1 : prev;
|
|
@@ -4739,14 +4970,14 @@ var Stepper = React29.forwardRef(
|
|
|
4739
4970
|
},
|
|
4740
4971
|
activeStep
|
|
4741
4972
|
}));
|
|
4742
|
-
const stepStatuses =
|
|
4973
|
+
const stepStatuses = React30.useMemo(() => {
|
|
4743
4974
|
return steps.map((_, index) => {
|
|
4744
4975
|
if (index < activeStep) return { status: "completed" };
|
|
4745
4976
|
if (index === activeStep) return { status: "current" };
|
|
4746
4977
|
return { status: "upcoming" };
|
|
4747
4978
|
});
|
|
4748
4979
|
}, [activeStep, steps]);
|
|
4749
|
-
const contextValue =
|
|
4980
|
+
const contextValue = React30.useMemo(
|
|
4750
4981
|
() => ({
|
|
4751
4982
|
activeStep,
|
|
4752
4983
|
orientation,
|
|
@@ -4808,7 +5039,7 @@ var connectorVariants = cva("", {
|
|
|
4808
5039
|
status: "upcoming"
|
|
4809
5040
|
}
|
|
4810
5041
|
});
|
|
4811
|
-
var Step =
|
|
5042
|
+
var Step = React30.forwardRef(({ className, children, index }, ref) => {
|
|
4812
5043
|
const { steps, stepCount, orientation } = useStepper();
|
|
4813
5044
|
const status = steps[index].status;
|
|
4814
5045
|
const isFirst = index === 0;
|
|
@@ -4892,12 +5123,12 @@ var Step = React29.forwardRef(({ className, children, index }, ref) => {
|
|
|
4892
5123
|
] });
|
|
4893
5124
|
});
|
|
4894
5125
|
Step.displayName = "Step";
|
|
4895
|
-
var StepLabel =
|
|
5126
|
+
var StepLabel = React30.forwardRef((_a, ref) => {
|
|
4896
5127
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
4897
5128
|
return /* @__PURE__ */ jsx("p", __spreadValues({ ref, className: cn("text-lg font-normal text-primary-1200", className) }, props));
|
|
4898
5129
|
});
|
|
4899
5130
|
StepLabel.displayName = "StepLabel";
|
|
4900
|
-
var StepDescription =
|
|
5131
|
+
var StepDescription = React30.forwardRef((_a, ref) => {
|
|
4901
5132
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
4902
5133
|
return /* @__PURE__ */ jsx(
|
|
4903
5134
|
"p",
|
|
@@ -4908,7 +5139,7 @@ var StepDescription = React29.forwardRef((_a, ref) => {
|
|
|
4908
5139
|
);
|
|
4909
5140
|
});
|
|
4910
5141
|
StepDescription.displayName = "StepDescription";
|
|
4911
|
-
var StepContent =
|
|
5142
|
+
var StepContent = React30.forwardRef((_a, ref) => {
|
|
4912
5143
|
var _b = _a, { className, index, children } = _b, props = __objRest(_b, ["className", "index", "children"]);
|
|
4913
5144
|
const { activeStep } = useStepper();
|
|
4914
5145
|
if (activeStep !== index) return null;
|
|
@@ -4916,7 +5147,7 @@ var StepContent = React29.forwardRef((_a, ref) => {
|
|
|
4916
5147
|
});
|
|
4917
5148
|
StepContent.displayName = "StepContent";
|
|
4918
5149
|
var Tabs = TabsPrimitive.Root;
|
|
4919
|
-
var TabsList =
|
|
5150
|
+
var TabsList = React30.forwardRef((_a, ref) => {
|
|
4920
5151
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
4921
5152
|
return /* @__PURE__ */ jsx(
|
|
4922
5153
|
TabsPrimitive.List,
|
|
@@ -4930,7 +5161,7 @@ var TabsList = React29.forwardRef((_a, ref) => {
|
|
|
4930
5161
|
);
|
|
4931
5162
|
});
|
|
4932
5163
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
4933
|
-
var TabsTrigger =
|
|
5164
|
+
var TabsTrigger = React30.forwardRef((_a, ref) => {
|
|
4934
5165
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
4935
5166
|
return /* @__PURE__ */ jsx(
|
|
4936
5167
|
TabsPrimitive.Trigger,
|
|
@@ -4948,7 +5179,7 @@ var TabsTrigger = React29.forwardRef((_a, ref) => {
|
|
|
4948
5179
|
);
|
|
4949
5180
|
});
|
|
4950
5181
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
4951
|
-
var TabsContent =
|
|
5182
|
+
var TabsContent = React30.forwardRef((_a, ref) => {
|
|
4952
5183
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
4953
5184
|
return /* @__PURE__ */ jsx(
|
|
4954
5185
|
TabsPrimitive.Content,
|
|
@@ -4968,9 +5199,9 @@ function Modal({ open, onClose, children }) {
|
|
|
4968
5199
|
}
|
|
4969
5200
|
var MainNavigationItemComponent = ({ item, isActive, hasActiveSubItem, onNavigate, collapsed = false, currentPath }) => {
|
|
4970
5201
|
var _a;
|
|
4971
|
-
const [isExpanded, setIsExpanded] =
|
|
5202
|
+
const [isExpanded, setIsExpanded] = React30__default.useState(hasActiveSubItem);
|
|
4972
5203
|
const hasSubItems = item.subItems && item.subItems.length > 0;
|
|
4973
|
-
|
|
5204
|
+
React30__default.useEffect(() => {
|
|
4974
5205
|
if (hasActiveSubItem) {
|
|
4975
5206
|
setIsExpanded(true);
|
|
4976
5207
|
}
|
|
@@ -5076,7 +5307,7 @@ var FooterMenuItemComponent = ({ item, isActive, onNavigate, collapsed = false }
|
|
|
5076
5307
|
}
|
|
5077
5308
|
);
|
|
5078
5309
|
};
|
|
5079
|
-
var Sidebar =
|
|
5310
|
+
var Sidebar = React30__default.forwardRef(
|
|
5080
5311
|
(_a, ref) => {
|
|
5081
5312
|
var _b = _a, {
|
|
5082
5313
|
brand,
|
|
@@ -5257,7 +5488,7 @@ var UserProfileComponent = ({ userProfile, onUserMenuClick }) => {
|
|
|
5257
5488
|
userProfile.role && /* @__PURE__ */ jsx("p", { className: "text-xs leading-none text-muted-foreground", children: userProfile.role })
|
|
5258
5489
|
] }) }),
|
|
5259
5490
|
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
5260
|
-
menuOptions.map((option, index) => /* @__PURE__ */ jsxs(
|
|
5491
|
+
menuOptions.map((option, index) => /* @__PURE__ */ jsxs(React30__default.Fragment, { children: [
|
|
5261
5492
|
option.separator && index > 0 && /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
5262
5493
|
/* @__PURE__ */ jsx(
|
|
5263
5494
|
DropdownMenuItem,
|
|
@@ -5274,7 +5505,7 @@ var UserProfileComponent = ({ userProfile, onUserMenuClick }) => {
|
|
|
5274
5505
|
] })
|
|
5275
5506
|
] });
|
|
5276
5507
|
};
|
|
5277
|
-
var TopNavbar =
|
|
5508
|
+
var TopNavbar = React30__default.forwardRef(
|
|
5278
5509
|
(_a, ref) => {
|
|
5279
5510
|
var _b = _a, {
|
|
5280
5511
|
sidebarCollapsed = false,
|
|
@@ -5354,4 +5585,4 @@ function useModal(initialOpen = false) {
|
|
|
5354
5585
|
return { open, openModal, closeModal };
|
|
5355
5586
|
}
|
|
5356
5587
|
|
|
5357
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionsCell, ActionsCellSkeleton, Alert, AlertDescription, AlertTitle, AuthLayout, Avatar, AvatarSkeleton, Badge, BadgeCell, BadgeCellSkeleton, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, DataTable, DataTablePagination, DatePickerSingle, DatePickerWithRange, Dropdown, Form, FormField, FormLabel, FormMessage, Grid, GridItem, Input, Label, Logo, Modal, Pagination, Paragraph, ProgressBar, RadioGroup, RadioGroupItem, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Sidebar, Step, StepContent, StepDescription, StepLabel, Stepper, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TextCell, TextCellSkeleton, Textarea, ThemeProvider, Title, TopNavbar, Typography, UserCell, UserCellSkeleton, badgeTokens, badgeVariants, breakpoints, buttonAnimations, buttonBaseClasses, buttonColors, buttonIconClasses, buttonLoadingClasses, buttonSizeClasses, buttonSizes, buttonStates, buttonTheme, buttonTokens, buttonVariantClasses, buttonVariants, classNames, cn, colors, columnSpans, columns, componentEffects, componentGrids, componentStrokes, containerSizes, createStroke, defaultButtonConfig, defaultIconConfig, dropShadows, effectColors, effectStyles, effectTransitions, effects, effectsDark, flexboxGrid, fontFamily, fontSize, fontWeight, generateEffectsCSS, generateSpacingCSS, generateStrokesCSS, generateTypographyCSS, getButtonIconSize, getButtonSizeClasses, getButtonVariantClasses, getEffect, getEffectDark, getSpacing, getSpacingPx, getStroke, getStrokeColor, gridCalculations, gridContainer, gridGaps, gridSpecs, gridUtils, iconAnimations, iconCategories, iconColors, iconSizeClasses, iconSizes, iconStates, iconTheme, iconTokens, iconVariants, layoutPatterns, letterSpacing, lineHeight, loadingSpinnerSVG, presets, progressBarTokens, responsiveGrid, responsiveStrokes, spacing, spacingPx, spacingStyles, stroke, strokeColors, strokeDirections, strokeStyles, strokeTransitions, tab, tagTokens, tailwindEffects, tailwindSpacing, tailwindStrokes, typography, typographyVariants, typographyVars, useModal, useStepper, useTheme };
|
|
5588
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionsCell, ActionsCellSkeleton, Alert, AlertDescription, AlertTitle, AuthLayout, Avatar, AvatarSkeleton, Badge, BadgeCell, BadgeCellSkeleton, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, DataTable, DataTablePagination, DatePickerSingle, DatePickerWithRange, Dropdown, FileUpload, FileUploadDropzone, FileUploadItem, Form, FormField, FormLabel, FormMessage, Grid, GridItem, Input, Label, Logo, Modal, Pagination, Paragraph, ProgressBar, RadioGroup, RadioGroupItem, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Sidebar, Step, StepContent, StepDescription, StepLabel, Stepper, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TextCell, TextCellSkeleton, Textarea, ThemeProvider, Title, TopNavbar, Typography, UserCell, UserCellSkeleton, badgeTokens, badgeVariants, breakpoints, buttonAnimations, buttonBaseClasses, buttonColors, buttonIconClasses, buttonLoadingClasses, buttonSizeClasses, buttonSizes, buttonStates, buttonTheme, buttonTokens, buttonVariantClasses, buttonVariants, classNames, cn, colors, columnSpans, columns, componentEffects, componentGrids, componentStrokes, containerSizes, createStroke, defaultButtonConfig, defaultIconConfig, dropShadows, effectColors, effectStyles, effectTransitions, effects, effectsDark, flexboxGrid, fontFamily, fontSize, fontWeight, generateEffectsCSS, generateSpacingCSS, generateStrokesCSS, generateTypographyCSS, getButtonIconSize, getButtonSizeClasses, getButtonVariantClasses, getEffect, getEffectDark, getSpacing, getSpacingPx, getStroke, getStrokeColor, gridCalculations, gridContainer, gridGaps, gridSpecs, gridUtils, iconAnimations, iconCategories, iconColors, iconSizeClasses, iconSizes, iconStates, iconTheme, iconTokens, iconVariants, layoutPatterns, letterSpacing, lineHeight, loadingSpinnerSVG, presets, progressBarTokens, responsiveGrid, responsiveStrokes, spacing, spacingPx, spacingStyles, stroke, strokeColors, strokeDirections, strokeStyles, strokeTransitions, tab, tagTokens, tailwindEffects, tailwindSpacing, tailwindStrokes, typography, typographyVariants, typographyVars, useModal, useStepper, useTheme };
|