@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.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React30 = require('react');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
@@ -23,6 +23,10 @@ var reactDayPicker = require('react-day-picker');
|
|
|
23
23
|
var locale = require('date-fns/locale');
|
|
24
24
|
var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
|
|
25
25
|
var cmdk = require('cmdk');
|
|
26
|
+
var FolderCloudIcon = require('@grupor5/raya-icons/icons/FolderCloudIcon');
|
|
27
|
+
var DocumentTextIcon = require('@grupor5/raya-icons/icons/DocumentTextIcon');
|
|
28
|
+
var DocumentDownloadIcon = require('@grupor5/raya-icons/icons/DocumentDownloadIcon');
|
|
29
|
+
var TrashIcon = require('@grupor5/raya-icons/icons/TrashIcon');
|
|
26
30
|
var TabsPrimitive = require('@radix-ui/react-tabs');
|
|
27
31
|
var RightIcon = require('@grupor5/raya-icons/icons/RightIcon');
|
|
28
32
|
var ArrowLeftIcon = require('@grupor5/raya-icons/icons/ArrowLeftIcon');
|
|
@@ -48,7 +52,7 @@ function _interopNamespace(e) {
|
|
|
48
52
|
return Object.freeze(n);
|
|
49
53
|
}
|
|
50
54
|
|
|
51
|
-
var
|
|
55
|
+
var React30__namespace = /*#__PURE__*/_interopNamespace(React30);
|
|
52
56
|
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
|
|
53
57
|
var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
|
|
54
58
|
var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
|
|
@@ -1502,7 +1506,7 @@ var buttonSizeClasses = {
|
|
|
1502
1506
|
iconSize: "w-5 h-5"
|
|
1503
1507
|
},
|
|
1504
1508
|
lg: {
|
|
1505
|
-
base: "
|
|
1509
|
+
base: "px-6 py-3 text-lg rounded-2xl",
|
|
1506
1510
|
icon: "h-12 w-12 rounded-2xl",
|
|
1507
1511
|
iconSize: "w-[22px] h-[22px]"
|
|
1508
1512
|
}
|
|
@@ -1634,13 +1638,13 @@ var loadingSpinnerSVG = `
|
|
|
1634
1638
|
/>
|
|
1635
1639
|
</svg>
|
|
1636
1640
|
`;
|
|
1637
|
-
var ThemeContext =
|
|
1641
|
+
var ThemeContext = React30.createContext(void 0);
|
|
1638
1642
|
function ThemeProvider({ children }) {
|
|
1639
|
-
const [theme, setTheme] =
|
|
1643
|
+
const [theme, setTheme] = React30.useState("light");
|
|
1640
1644
|
return /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value: { theme, setTheme }, children });
|
|
1641
1645
|
}
|
|
1642
1646
|
function useTheme() {
|
|
1643
|
-
const context =
|
|
1647
|
+
const context = React30.useContext(ThemeContext);
|
|
1644
1648
|
if (!context) {
|
|
1645
1649
|
throw new Error("useTheme must be used within a ThemeProvider");
|
|
1646
1650
|
}
|
|
@@ -1661,7 +1665,7 @@ function getInitials(name) {
|
|
|
1661
1665
|
}
|
|
1662
1666
|
return firstName ? `${firstName.substring(0, 2)}`.toUpperCase() : "N/A";
|
|
1663
1667
|
}
|
|
1664
|
-
var Avatar =
|
|
1668
|
+
var Avatar = React30__namespace.forwardRef(
|
|
1665
1669
|
(_a, ref) => {
|
|
1666
1670
|
var _b = _a, { src, name, className } = _b, props = __objRest(_b, ["src", "name", "className"]);
|
|
1667
1671
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1823,7 +1827,7 @@ var LoadingSpinner = ({
|
|
|
1823
1827
|
)
|
|
1824
1828
|
] }) });
|
|
1825
1829
|
};
|
|
1826
|
-
var Button =
|
|
1830
|
+
var Button = React30.forwardRef((_a, ref) => {
|
|
1827
1831
|
var _b = _a, {
|
|
1828
1832
|
variant = defaultButtonConfig.variant,
|
|
1829
1833
|
size = defaultButtonConfig.size,
|
|
@@ -1860,7 +1864,7 @@ var Button = React29.forwardRef((_a, ref) => {
|
|
|
1860
1864
|
"onClick"
|
|
1861
1865
|
]);
|
|
1862
1866
|
const isIconOnly = variant === "icon" || !!(!children && (icon || iconLeft || iconRight));
|
|
1863
|
-
const buttonClasses =
|
|
1867
|
+
const buttonClasses = React30.useMemo(() => {
|
|
1864
1868
|
const sizeClasses = getButtonSizeClasses(size, isIconOnly);
|
|
1865
1869
|
const variantClasses = getButtonVariantClasses(variant, color);
|
|
1866
1870
|
return cn(
|
|
@@ -1870,7 +1874,7 @@ var Button = React29.forwardRef((_a, ref) => {
|
|
|
1870
1874
|
className
|
|
1871
1875
|
);
|
|
1872
1876
|
}, [variant, size, color, isIconOnly, className]);
|
|
1873
|
-
const buttonContent =
|
|
1877
|
+
const buttonContent = React30.useMemo(() => {
|
|
1874
1878
|
if (loading) {
|
|
1875
1879
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: buttonLoadingClasses.container, children: [
|
|
1876
1880
|
/* @__PURE__ */ jsxRuntime.jsx(LoadingSpinner, { size }),
|
|
@@ -1879,8 +1883,8 @@ var Button = React29.forwardRef((_a, ref) => {
|
|
|
1879
1883
|
}
|
|
1880
1884
|
const iconSizeClass = getButtonIconSize(size);
|
|
1881
1885
|
const renderIcon = (iconNode) => {
|
|
1882
|
-
if (
|
|
1883
|
-
return
|
|
1886
|
+
if (React30__namespace.default.isValidElement(iconNode)) {
|
|
1887
|
+
return React30__namespace.default.cloneElement(iconNode, {
|
|
1884
1888
|
className: cn(iconSizeClass, iconNode.props.className),
|
|
1885
1889
|
"aria-hidden": true
|
|
1886
1890
|
});
|
|
@@ -1896,7 +1900,7 @@ var Button = React29.forwardRef((_a, ref) => {
|
|
|
1896
1900
|
iconRight && renderIcon(iconRight)
|
|
1897
1901
|
] });
|
|
1898
1902
|
}, [loading, loadingText, isIconOnly, icon, iconLeft, iconRight, children, size]);
|
|
1899
|
-
const accessibilityProps =
|
|
1903
|
+
const accessibilityProps = React30.useMemo(() => {
|
|
1900
1904
|
const props2 = {};
|
|
1901
1905
|
if (isIconOnly && !ariaLabel) {
|
|
1902
1906
|
console.warn("Icon-only buttons should have an aria-label for accessibility");
|
|
@@ -1979,7 +1983,7 @@ var Button = React29.forwardRef((_a, ref) => {
|
|
|
1979
1983
|
);
|
|
1980
1984
|
});
|
|
1981
1985
|
Button.displayName = "Button";
|
|
1982
|
-
var Checkbox =
|
|
1986
|
+
var Checkbox = React30__namespace.forwardRef((_a, ref) => {
|
|
1983
1987
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1984
1988
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1985
1989
|
CheckboxPrimitive__namespace.Root,
|
|
@@ -2011,10 +2015,10 @@ var Checkbox = React29__namespace.forwardRef((_a, ref) => {
|
|
|
2011
2015
|
);
|
|
2012
2016
|
});
|
|
2013
2017
|
Checkbox.displayName = CheckboxPrimitive__namespace.Root.displayName;
|
|
2014
|
-
var Input =
|
|
2018
|
+
var Input = React30__namespace.forwardRef(
|
|
2015
2019
|
(_a, ref) => {
|
|
2016
2020
|
var _b = _a, { className, type, error, helperText, label, required, id, icon } = _b, props = __objRest(_b, ["className", "type", "error", "helperText", "label", "required", "id", "icon"]);
|
|
2017
|
-
const inputId = id || `input-${
|
|
2021
|
+
const inputId = id || `input-${React30__namespace.useId()}`;
|
|
2018
2022
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
2019
2023
|
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2020
2024
|
"label",
|
|
@@ -2058,7 +2062,7 @@ Input.displayName = "Input";
|
|
|
2058
2062
|
var labelVariants = classVarianceAuthority.cva(
|
|
2059
2063
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
2060
2064
|
);
|
|
2061
|
-
var Label =
|
|
2065
|
+
var Label = React30__namespace.forwardRef((_a, ref) => {
|
|
2062
2066
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2063
2067
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2064
2068
|
LabelPrimitive__namespace.Root,
|
|
@@ -2072,7 +2076,7 @@ Label.displayName = LabelPrimitive__namespace.Root.displayName;
|
|
|
2072
2076
|
|
|
2073
2077
|
// src/atoms/logo/logo.png
|
|
2074
2078
|
var logo_default = "./logo-N622EUTF.png";
|
|
2075
|
-
var Logo =
|
|
2079
|
+
var Logo = React30.forwardRef((_a, ref) => {
|
|
2076
2080
|
var _b = _a, {
|
|
2077
2081
|
size = 120,
|
|
2078
2082
|
variant = "default",
|
|
@@ -2119,7 +2123,7 @@ var Logo = React29.forwardRef((_a, ref) => {
|
|
|
2119
2123
|
);
|
|
2120
2124
|
});
|
|
2121
2125
|
Logo.displayName = "Logo";
|
|
2122
|
-
var RadioGroup =
|
|
2126
|
+
var RadioGroup = React30__namespace.forwardRef((_a, ref) => {
|
|
2123
2127
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2124
2128
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2125
2129
|
RadioGroupPrimitive__namespace.Root,
|
|
@@ -2131,7 +2135,7 @@ var RadioGroup = React29__namespace.forwardRef((_a, ref) => {
|
|
|
2131
2135
|
);
|
|
2132
2136
|
});
|
|
2133
2137
|
RadioGroup.displayName = RadioGroupPrimitive__namespace.Root.displayName;
|
|
2134
|
-
var RadioGroupItem =
|
|
2138
|
+
var RadioGroupItem = React30__namespace.forwardRef((_a, ref) => {
|
|
2135
2139
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2136
2140
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2137
2141
|
RadioGroupPrimitive__namespace.Item,
|
|
@@ -2149,7 +2153,7 @@ var RadioGroupItem = React29__namespace.forwardRef((_a, ref) => {
|
|
|
2149
2153
|
);
|
|
2150
2154
|
});
|
|
2151
2155
|
RadioGroupItem.displayName = RadioGroupPrimitive__namespace.Item.displayName;
|
|
2152
|
-
var Switch =
|
|
2156
|
+
var Switch = React30__namespace.forwardRef((_a, ref) => {
|
|
2153
2157
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2154
2158
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2155
2159
|
SwitchPrimitives__namespace.Root,
|
|
@@ -2226,7 +2230,7 @@ var closeButtonVariants = classVarianceAuthority.cva(
|
|
|
2226
2230
|
}
|
|
2227
2231
|
}
|
|
2228
2232
|
);
|
|
2229
|
-
var Tag =
|
|
2233
|
+
var Tag = React30__namespace.default.forwardRef(
|
|
2230
2234
|
(_a, ref) => {
|
|
2231
2235
|
var _b = _a, { className, children, showBullet = false, onClose, variant } = _b, props = __objRest(_b, ["className", "children", "showBullet", "onClose", "variant"]);
|
|
2232
2236
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2260,11 +2264,11 @@ var Tag = React29__namespace.default.forwardRef(
|
|
|
2260
2264
|
}
|
|
2261
2265
|
);
|
|
2262
2266
|
Tag.displayName = "Tag";
|
|
2263
|
-
var Textarea =
|
|
2267
|
+
var Textarea = React30__namespace.forwardRef(
|
|
2264
2268
|
(_a, ref) => {
|
|
2265
2269
|
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"]);
|
|
2266
|
-
const textareaId = id || `textarea-${
|
|
2267
|
-
const [charCount, setCharCount] =
|
|
2270
|
+
const textareaId = id || `textarea-${React30__namespace.useId()}`;
|
|
2271
|
+
const [charCount, setCharCount] = React30__namespace.useState(String(defaultValue || "").length);
|
|
2268
2272
|
const isControlled = value !== void 0;
|
|
2269
2273
|
const currentLength = isControlled ? String(value).length : charCount;
|
|
2270
2274
|
const handleOnChange = (e) => {
|
|
@@ -2356,7 +2360,7 @@ var typographyVariants = classVarianceAuthority.cva("font-primary", {
|
|
|
2356
2360
|
variant: "body-md"
|
|
2357
2361
|
}
|
|
2358
2362
|
});
|
|
2359
|
-
var Typography =
|
|
2363
|
+
var Typography = React30__namespace.forwardRef(
|
|
2360
2364
|
(_a, ref) => {
|
|
2361
2365
|
var _b = _a, { className, variant, color, as: Component = "p" } = _b, props = __objRest(_b, ["className", "variant", "color", "as"]);
|
|
2362
2366
|
const variantClass = typographyVariants({ variant });
|
|
@@ -2380,7 +2384,7 @@ var levelMapping = {
|
|
|
2380
2384
|
5: { as: "h5", variant: "heading-sm" },
|
|
2381
2385
|
6: { as: "h6", variant: "subheading-lg" }
|
|
2382
2386
|
};
|
|
2383
|
-
var Title =
|
|
2387
|
+
var Title = React30__namespace.forwardRef(
|
|
2384
2388
|
(_a, ref) => {
|
|
2385
2389
|
var _b = _a, { level, variant } = _b, props = __objRest(_b, ["level", "variant"]);
|
|
2386
2390
|
const { as, variant: defaultVariant } = levelMapping[level];
|
|
@@ -2395,7 +2399,7 @@ var Title = React29__namespace.forwardRef(
|
|
|
2395
2399
|
}
|
|
2396
2400
|
);
|
|
2397
2401
|
Title.displayName = "Title";
|
|
2398
|
-
var Paragraph =
|
|
2402
|
+
var Paragraph = React30__namespace.forwardRef(
|
|
2399
2403
|
(_a, ref) => {
|
|
2400
2404
|
var _b = _a, { variant = "body-md" } = _b, props = __objRest(_b, ["variant"]);
|
|
2401
2405
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2409,7 +2413,7 @@ var Paragraph = React29__namespace.forwardRef(
|
|
|
2409
2413
|
}
|
|
2410
2414
|
);
|
|
2411
2415
|
Paragraph.displayName = "Paragraph";
|
|
2412
|
-
var AccordionItemContext =
|
|
2416
|
+
var AccordionItemContext = React30__namespace.createContext({});
|
|
2413
2417
|
var accordionItemVariants = classVarianceAuthority.cva("w-full", {
|
|
2414
2418
|
variants: {
|
|
2415
2419
|
variant: {
|
|
@@ -2421,9 +2425,9 @@ var accordionItemVariants = classVarianceAuthority.cva("w-full", {
|
|
|
2421
2425
|
variant: "default"
|
|
2422
2426
|
}
|
|
2423
2427
|
});
|
|
2424
|
-
var AccordionTrigger =
|
|
2428
|
+
var AccordionTrigger = React30__namespace.forwardRef((_a, ref) => {
|
|
2425
2429
|
var _b = _a, { className, children, icon } = _b, props = __objRest(_b, ["className", "children", "icon"]);
|
|
2426
|
-
const { variant } =
|
|
2430
|
+
const { variant } = React30__namespace.useContext(AccordionItemContext);
|
|
2427
2431
|
return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2428
2432
|
AccordionPrimitive__namespace.Trigger,
|
|
2429
2433
|
__spreadProps(__spreadValues({
|
|
@@ -2455,7 +2459,7 @@ var AccordionTrigger = React29__namespace.forwardRef((_a, ref) => {
|
|
|
2455
2459
|
) });
|
|
2456
2460
|
});
|
|
2457
2461
|
AccordionTrigger.displayName = AccordionPrimitive__namespace.Trigger.displayName;
|
|
2458
|
-
var AccordionContent =
|
|
2462
|
+
var AccordionContent = React30__namespace.forwardRef((_a, ref) => {
|
|
2459
2463
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
2460
2464
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2461
2465
|
AccordionPrimitive__namespace.Content,
|
|
@@ -2468,7 +2472,7 @@ var AccordionContent = React29__namespace.forwardRef((_a, ref) => {
|
|
|
2468
2472
|
);
|
|
2469
2473
|
});
|
|
2470
2474
|
AccordionContent.displayName = AccordionPrimitive__namespace.Content.displayName;
|
|
2471
|
-
var AccordionItem =
|
|
2475
|
+
var AccordionItem = React30__namespace.forwardRef((_a, ref) => {
|
|
2472
2476
|
var _b = _a, { className, variant = "default", children } = _b, props = __objRest(_b, ["className", "variant", "children"]);
|
|
2473
2477
|
const variantValue = variant != null ? variant : "default";
|
|
2474
2478
|
return /* @__PURE__ */ jsxRuntime.jsx(AccordionItemContext.Provider, { value: { variant: variantValue }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2482,7 +2486,7 @@ var AccordionItem = React29__namespace.forwardRef((_a, ref) => {
|
|
|
2482
2486
|
) });
|
|
2483
2487
|
});
|
|
2484
2488
|
AccordionItem.displayName = "AccordionItem";
|
|
2485
|
-
var Accordion =
|
|
2489
|
+
var Accordion = React30__namespace.forwardRef((_a, ref) => {
|
|
2486
2490
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2487
2491
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2488
2492
|
AccordionPrimitive__namespace.Root,
|
|
@@ -2494,7 +2498,7 @@ var Accordion = React29__namespace.forwardRef((_a, ref) => {
|
|
|
2494
2498
|
});
|
|
2495
2499
|
Accordion.displayName = "Accordion";
|
|
2496
2500
|
var alertVariants = classVarianceAuthority.cva(
|
|
2497
|
-
"relative w-full rounded-2xl px-6 py-
|
|
2501
|
+
"relative w-full rounded-2xl px-6 py-4 flex items-center justify-between",
|
|
2498
2502
|
{
|
|
2499
2503
|
variants: {
|
|
2500
2504
|
variant: {
|
|
@@ -2510,17 +2514,17 @@ var alertVariants = classVarianceAuthority.cva(
|
|
|
2510
2514
|
}
|
|
2511
2515
|
}
|
|
2512
2516
|
);
|
|
2513
|
-
var AlertContext =
|
|
2517
|
+
var AlertContext = React30__namespace.createContext(null);
|
|
2514
2518
|
var useAlertContext = () => {
|
|
2515
|
-
const context =
|
|
2519
|
+
const context = React30__namespace.useContext(AlertContext);
|
|
2516
2520
|
if (!context) {
|
|
2517
2521
|
throw new Error("useAlertContext must be used inside an Alert");
|
|
2518
2522
|
}
|
|
2519
2523
|
return context;
|
|
2520
2524
|
};
|
|
2521
|
-
var Alert =
|
|
2525
|
+
var Alert = React30__namespace.forwardRef((_a, ref) => {
|
|
2522
2526
|
var _b = _a, { className, variant, children, isClosable, actions } = _b, props = __objRest(_b, ["className", "variant", "children", "isClosable", "actions"]);
|
|
2523
|
-
const [isVisible, setIsVisible] =
|
|
2527
|
+
const [isVisible, setIsVisible] = React30__namespace.useState(true);
|
|
2524
2528
|
if (!isVisible) {
|
|
2525
2529
|
return null;
|
|
2526
2530
|
}
|
|
@@ -2549,7 +2553,7 @@ var Alert = React29__namespace.forwardRef((_a, ref) => {
|
|
|
2549
2553
|
) });
|
|
2550
2554
|
});
|
|
2551
2555
|
Alert.displayName = "Alert";
|
|
2552
|
-
var AlertTitle =
|
|
2556
|
+
var AlertTitle = React30__namespace.forwardRef((_a, ref) => {
|
|
2553
2557
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2554
2558
|
const { variant } = useAlertContext();
|
|
2555
2559
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2570,7 +2574,7 @@ var AlertTitle = React29__namespace.forwardRef((_a, ref) => {
|
|
|
2570
2574
|
);
|
|
2571
2575
|
});
|
|
2572
2576
|
AlertTitle.displayName = "AlertTitle";
|
|
2573
|
-
var AlertDescription =
|
|
2577
|
+
var AlertDescription = React30__namespace.forwardRef((_a, ref) => {
|
|
2574
2578
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2575
2579
|
const { variant } = useAlertContext();
|
|
2576
2580
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2585,7 +2589,7 @@ var AlertDescription = React29__namespace.forwardRef((_a, ref) => {
|
|
|
2585
2589
|
);
|
|
2586
2590
|
});
|
|
2587
2591
|
AlertDescription.displayName = "AlertDescription";
|
|
2588
|
-
var Card =
|
|
2592
|
+
var Card = React30__namespace.forwardRef((_a, ref) => {
|
|
2589
2593
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2590
2594
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2591
2595
|
"div",
|
|
@@ -2599,7 +2603,7 @@ var Card = React29__namespace.forwardRef((_a, ref) => {
|
|
|
2599
2603
|
);
|
|
2600
2604
|
});
|
|
2601
2605
|
Card.displayName = "Card";
|
|
2602
|
-
var CardHeader =
|
|
2606
|
+
var CardHeader = React30__namespace.forwardRef((_a, ref) => {
|
|
2603
2607
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2604
2608
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2605
2609
|
"div",
|
|
@@ -2610,7 +2614,7 @@ var CardHeader = React29__namespace.forwardRef((_a, ref) => {
|
|
|
2610
2614
|
);
|
|
2611
2615
|
});
|
|
2612
2616
|
CardHeader.displayName = "CardHeader";
|
|
2613
|
-
var CardTitle =
|
|
2617
|
+
var CardTitle = React30__namespace.forwardRef((_a, ref) => {
|
|
2614
2618
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2615
2619
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2616
2620
|
"div",
|
|
@@ -2621,7 +2625,7 @@ var CardTitle = React29__namespace.forwardRef((_a, ref) => {
|
|
|
2621
2625
|
);
|
|
2622
2626
|
});
|
|
2623
2627
|
CardTitle.displayName = "CardTitle";
|
|
2624
|
-
var CardDescription =
|
|
2628
|
+
var CardDescription = React30__namespace.forwardRef((_a, ref) => {
|
|
2625
2629
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2626
2630
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2627
2631
|
"div",
|
|
@@ -2632,12 +2636,12 @@ var CardDescription = React29__namespace.forwardRef((_a, ref) => {
|
|
|
2632
2636
|
);
|
|
2633
2637
|
});
|
|
2634
2638
|
CardDescription.displayName = "CardDescription";
|
|
2635
|
-
var CardContent =
|
|
2639
|
+
var CardContent = React30__namespace.forwardRef((_a, ref) => {
|
|
2636
2640
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2637
2641
|
return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadValues({ ref, className: cn("p-6 pt-0", className) }, props));
|
|
2638
2642
|
});
|
|
2639
2643
|
CardContent.displayName = "CardContent";
|
|
2640
|
-
var CardFooter =
|
|
2644
|
+
var CardFooter = React30__namespace.forwardRef((_a, ref) => {
|
|
2641
2645
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2642
2646
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2643
2647
|
"div",
|
|
@@ -2649,17 +2653,17 @@ var CardFooter = React29__namespace.forwardRef((_a, ref) => {
|
|
|
2649
2653
|
});
|
|
2650
2654
|
CardFooter.displayName = "CardFooter";
|
|
2651
2655
|
var THEMES = { light: "", dark: ".dark" };
|
|
2652
|
-
var ChartContext =
|
|
2656
|
+
var ChartContext = React30__namespace.createContext(null);
|
|
2653
2657
|
function useChart() {
|
|
2654
|
-
const context =
|
|
2658
|
+
const context = React30__namespace.useContext(ChartContext);
|
|
2655
2659
|
if (!context) {
|
|
2656
2660
|
throw new Error("useChart must be used within a <ChartContainer />");
|
|
2657
2661
|
}
|
|
2658
2662
|
return context;
|
|
2659
2663
|
}
|
|
2660
|
-
var ChartContainer =
|
|
2664
|
+
var ChartContainer = React30__namespace.forwardRef((_a, ref) => {
|
|
2661
2665
|
var _b = _a, { id, className, children, config } = _b, props = __objRest(_b, ["id", "className", "children", "config"]);
|
|
2662
|
-
const uniqueId =
|
|
2666
|
+
const uniqueId = React30__namespace.useId();
|
|
2663
2667
|
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
2664
2668
|
return /* @__PURE__ */ jsxRuntime.jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2665
2669
|
"div",
|
|
@@ -2706,7 +2710,7 @@ ${colorConfig.map(([key, itemConfig]) => {
|
|
|
2706
2710
|
);
|
|
2707
2711
|
};
|
|
2708
2712
|
var ChartTooltip = RechartsPrimitive__namespace.Tooltip;
|
|
2709
|
-
var ChartTooltipContent =
|
|
2713
|
+
var ChartTooltipContent = React30__namespace.forwardRef(
|
|
2710
2714
|
({
|
|
2711
2715
|
active,
|
|
2712
2716
|
payload,
|
|
@@ -2723,7 +2727,7 @@ var ChartTooltipContent = React29__namespace.forwardRef(
|
|
|
2723
2727
|
labelKey
|
|
2724
2728
|
}, ref) => {
|
|
2725
2729
|
const { config } = useChart();
|
|
2726
|
-
const tooltipLabel =
|
|
2730
|
+
const tooltipLabel = React30__namespace.useMemo(() => {
|
|
2727
2731
|
var _a;
|
|
2728
2732
|
if (hideLabel || !(payload == null ? void 0 : payload.length)) {
|
|
2729
2733
|
return null;
|
|
@@ -2820,7 +2824,7 @@ var ChartTooltipContent = React29__namespace.forwardRef(
|
|
|
2820
2824
|
);
|
|
2821
2825
|
ChartTooltipContent.displayName = "ChartTooltip";
|
|
2822
2826
|
var ChartLegend = RechartsPrimitive__namespace.Legend;
|
|
2823
|
-
var ChartLegendContent =
|
|
2827
|
+
var ChartLegendContent = React30__namespace.forwardRef(
|
|
2824
2828
|
({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }, ref) => {
|
|
2825
2829
|
const { config } = useChart();
|
|
2826
2830
|
if (!(payload == null ? void 0 : payload.length)) {
|
|
@@ -2878,7 +2882,7 @@ function getPayloadConfigFromPayload(config, payload, key) {
|
|
|
2878
2882
|
}
|
|
2879
2883
|
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
2880
2884
|
}
|
|
2881
|
-
var ScrollArea =
|
|
2885
|
+
var ScrollArea = React30__namespace.forwardRef((_a, ref) => {
|
|
2882
2886
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
2883
2887
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2884
2888
|
ScrollAreaPrimitive__namespace.Root,
|
|
@@ -2895,7 +2899,7 @@ var ScrollArea = React29__namespace.forwardRef((_a, ref) => {
|
|
|
2895
2899
|
);
|
|
2896
2900
|
});
|
|
2897
2901
|
ScrollArea.displayName = ScrollAreaPrimitive__namespace.Root.displayName;
|
|
2898
|
-
var ScrollBar =
|
|
2902
|
+
var ScrollBar = React30__namespace.forwardRef((_a, ref) => {
|
|
2899
2903
|
var _b = _a, { className, orientation = "vertical" } = _b, props = __objRest(_b, ["className", "orientation"]);
|
|
2900
2904
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2901
2905
|
ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
|
|
@@ -2926,7 +2930,7 @@ var ScrollBar = React29__namespace.forwardRef((_a, ref) => {
|
|
|
2926
2930
|
);
|
|
2927
2931
|
});
|
|
2928
2932
|
ScrollBar.displayName = ScrollAreaPrimitive__namespace.ScrollAreaScrollbar.displayName;
|
|
2929
|
-
var Table =
|
|
2933
|
+
var Table = React30__namespace.forwardRef((_a, ref) => {
|
|
2930
2934
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2931
2935
|
return /* @__PURE__ */ jsxRuntime.jsxs(ScrollArea, { className: "relative w-full", children: [
|
|
2932
2936
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2940,12 +2944,12 @@ var Table = React29__namespace.forwardRef((_a, ref) => {
|
|
|
2940
2944
|
] });
|
|
2941
2945
|
});
|
|
2942
2946
|
Table.displayName = "Table";
|
|
2943
|
-
var TableHeader =
|
|
2947
|
+
var TableHeader = React30__namespace.forwardRef((_a, ref) => {
|
|
2944
2948
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2945
2949
|
return /* @__PURE__ */ jsxRuntime.jsx("thead", __spreadValues({ ref, className: cn("[&_tr]:border-b", className) }, props));
|
|
2946
2950
|
});
|
|
2947
2951
|
TableHeader.displayName = "TableHeader";
|
|
2948
|
-
var TableBody =
|
|
2952
|
+
var TableBody = React30__namespace.forwardRef((_a, ref) => {
|
|
2949
2953
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2950
2954
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2951
2955
|
"tbody",
|
|
@@ -2956,7 +2960,7 @@ var TableBody = React29__namespace.forwardRef((_a, ref) => {
|
|
|
2956
2960
|
);
|
|
2957
2961
|
});
|
|
2958
2962
|
TableBody.displayName = "TableBody";
|
|
2959
|
-
var TableFooter =
|
|
2963
|
+
var TableFooter = React30__namespace.forwardRef((_a, ref) => {
|
|
2960
2964
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2961
2965
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2962
2966
|
"tfoot",
|
|
@@ -2970,7 +2974,7 @@ var TableFooter = React29__namespace.forwardRef((_a, ref) => {
|
|
|
2970
2974
|
);
|
|
2971
2975
|
});
|
|
2972
2976
|
TableFooter.displayName = "TableFooter";
|
|
2973
|
-
var TableRow =
|
|
2977
|
+
var TableRow = React30__namespace.forwardRef((_a, ref) => {
|
|
2974
2978
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2975
2979
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2976
2980
|
"tr",
|
|
@@ -2984,7 +2988,7 @@ var TableRow = React29__namespace.forwardRef((_a, ref) => {
|
|
|
2984
2988
|
);
|
|
2985
2989
|
});
|
|
2986
2990
|
TableRow.displayName = "TableRow";
|
|
2987
|
-
var TableHead =
|
|
2991
|
+
var TableHead = React30__namespace.forwardRef((_a, ref) => {
|
|
2988
2992
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2989
2993
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2990
2994
|
"th",
|
|
@@ -2998,7 +3002,7 @@ var TableHead = React29__namespace.forwardRef((_a, ref) => {
|
|
|
2998
3002
|
);
|
|
2999
3003
|
});
|
|
3000
3004
|
TableHead.displayName = "TableHead";
|
|
3001
|
-
var TableCell =
|
|
3005
|
+
var TableCell = React30__namespace.forwardRef((_a, ref) => {
|
|
3002
3006
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3003
3007
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3004
3008
|
"td",
|
|
@@ -3012,7 +3016,7 @@ var TableCell = React29__namespace.forwardRef((_a, ref) => {
|
|
|
3012
3016
|
);
|
|
3013
3017
|
});
|
|
3014
3018
|
TableCell.displayName = "TableCell";
|
|
3015
|
-
var TableCaption =
|
|
3019
|
+
var TableCaption = React30__namespace.forwardRef((_a, ref) => {
|
|
3016
3020
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3017
3021
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3018
3022
|
"caption",
|
|
@@ -3034,7 +3038,7 @@ var usePagination = ({
|
|
|
3034
3038
|
siblingCount = 1,
|
|
3035
3039
|
currentPage
|
|
3036
3040
|
}) => {
|
|
3037
|
-
const paginationRange =
|
|
3041
|
+
const paginationRange = React30.useMemo(() => {
|
|
3038
3042
|
const totalPageCount = Math.ceil(totalCount / pageSize);
|
|
3039
3043
|
if (totalPageCount <= 10) {
|
|
3040
3044
|
return range(1, totalPageCount);
|
|
@@ -3072,7 +3076,7 @@ var usePagination = ({
|
|
|
3072
3076
|
var Select = SelectPrimitive__namespace.Root;
|
|
3073
3077
|
var SelectGroup = SelectPrimitive__namespace.Group;
|
|
3074
3078
|
var SelectValue = SelectPrimitive__namespace.Value;
|
|
3075
|
-
var SelectTrigger =
|
|
3079
|
+
var SelectTrigger = React30__namespace.forwardRef((_a, ref) => {
|
|
3076
3080
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
3077
3081
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3078
3082
|
SelectPrimitive__namespace.Trigger,
|
|
@@ -3091,7 +3095,7 @@ var SelectTrigger = React29__namespace.forwardRef((_a, ref) => {
|
|
|
3091
3095
|
);
|
|
3092
3096
|
});
|
|
3093
3097
|
SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
|
|
3094
|
-
var SelectScrollUpButton =
|
|
3098
|
+
var SelectScrollUpButton = React30__namespace.forwardRef((_a, ref) => {
|
|
3095
3099
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3096
3100
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3097
3101
|
SelectPrimitive__namespace.ScrollUpButton,
|
|
@@ -3107,7 +3111,7 @@ var SelectScrollUpButton = React29__namespace.forwardRef((_a, ref) => {
|
|
|
3107
3111
|
);
|
|
3108
3112
|
});
|
|
3109
3113
|
SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
|
|
3110
|
-
var SelectScrollDownButton =
|
|
3114
|
+
var SelectScrollDownButton = React30__namespace.forwardRef((_a, ref) => {
|
|
3111
3115
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3112
3116
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3113
3117
|
SelectPrimitive__namespace.ScrollDownButton,
|
|
@@ -3123,7 +3127,7 @@ var SelectScrollDownButton = React29__namespace.forwardRef((_a, ref) => {
|
|
|
3123
3127
|
);
|
|
3124
3128
|
});
|
|
3125
3129
|
SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
|
|
3126
|
-
var SelectContent =
|
|
3130
|
+
var SelectContent = React30__namespace.forwardRef((_a, ref) => {
|
|
3127
3131
|
var _b = _a, { className, children, position = "popper" } = _b, props = __objRest(_b, ["className", "children", "position"]);
|
|
3128
3132
|
return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3129
3133
|
SelectPrimitive__namespace.Content,
|
|
@@ -3154,7 +3158,7 @@ var SelectContent = React29__namespace.forwardRef((_a, ref) => {
|
|
|
3154
3158
|
) });
|
|
3155
3159
|
});
|
|
3156
3160
|
SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
|
|
3157
|
-
var SelectLabel =
|
|
3161
|
+
var SelectLabel = React30__namespace.forwardRef((_a, ref) => {
|
|
3158
3162
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3159
3163
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3160
3164
|
SelectPrimitive__namespace.Label,
|
|
@@ -3165,7 +3169,7 @@ var SelectLabel = React29__namespace.forwardRef((_a, ref) => {
|
|
|
3165
3169
|
);
|
|
3166
3170
|
});
|
|
3167
3171
|
SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
|
|
3168
|
-
var SelectItem =
|
|
3172
|
+
var SelectItem = React30__namespace.forwardRef((_a, ref) => {
|
|
3169
3173
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
3170
3174
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3171
3175
|
SelectPrimitive__namespace.Item,
|
|
@@ -3184,7 +3188,7 @@ var SelectItem = React29__namespace.forwardRef((_a, ref) => {
|
|
|
3184
3188
|
);
|
|
3185
3189
|
});
|
|
3186
3190
|
SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
|
|
3187
|
-
var SelectSeparator =
|
|
3191
|
+
var SelectSeparator = React30__namespace.forwardRef((_a, ref) => {
|
|
3188
3192
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3189
3193
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3190
3194
|
SelectPrimitive__namespace.Separator,
|
|
@@ -3361,12 +3365,12 @@ function DataTable(_a) {
|
|
|
3361
3365
|
"stickyLastColumn"
|
|
3362
3366
|
]);
|
|
3363
3367
|
var _a2, _b2;
|
|
3364
|
-
const [sorting, setSorting] =
|
|
3365
|
-
const [columnFilters, setColumnFilters] =
|
|
3368
|
+
const [sorting, setSorting] = React30__namespace.useState([]);
|
|
3369
|
+
const [columnFilters, setColumnFilters] = React30__namespace.useState(
|
|
3366
3370
|
[]
|
|
3367
3371
|
);
|
|
3368
|
-
const [columnVisibility, setColumnVisibility] =
|
|
3369
|
-
const [rowSelection, setRowSelection] =
|
|
3372
|
+
const [columnVisibility, setColumnVisibility] = React30__namespace.useState({});
|
|
3373
|
+
const [rowSelection, setRowSelection] = React30__namespace.useState({});
|
|
3370
3374
|
const table = reactTable.useReactTable({
|
|
3371
3375
|
data,
|
|
3372
3376
|
columns: columns2,
|
|
@@ -3435,7 +3439,7 @@ function DataTable(_a) {
|
|
|
3435
3439
|
"sticky right-0 bg-white shadow-lg z-10": shouldStick,
|
|
3436
3440
|
"border-l border-primary-300": shouldStick
|
|
3437
3441
|
}),
|
|
3438
|
-
children: ((_a3 = column.columnDef.meta) == null ? void 0 : _a3.skeleton) ?
|
|
3442
|
+
children: ((_a3 = column.columnDef.meta) == null ? void 0 : _a3.skeleton) ? React30__namespace.createElement(
|
|
3439
3443
|
column.columnDef.meta.skeleton
|
|
3440
3444
|
) : null
|
|
3441
3445
|
},
|
|
@@ -3859,7 +3863,7 @@ function Calendar(_a) {
|
|
|
3859
3863
|
var DropdownMenu = DropdownMenuPrimitive__namespace.Root;
|
|
3860
3864
|
var DropdownMenuTrigger = DropdownMenuPrimitive__namespace.Trigger;
|
|
3861
3865
|
var DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
|
|
3862
|
-
var DropdownMenuSubTrigger =
|
|
3866
|
+
var DropdownMenuSubTrigger = React30__namespace.forwardRef((_a, ref) => {
|
|
3863
3867
|
var _b = _a, { className, inset, children } = _b, props = __objRest(_b, ["className", "inset", "children"]);
|
|
3864
3868
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3865
3869
|
DropdownMenuPrimitive__namespace.SubTrigger,
|
|
@@ -3879,7 +3883,7 @@ var DropdownMenuSubTrigger = React29__namespace.forwardRef((_a, ref) => {
|
|
|
3879
3883
|
);
|
|
3880
3884
|
});
|
|
3881
3885
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
|
|
3882
|
-
var DropdownMenuSubContent =
|
|
3886
|
+
var DropdownMenuSubContent = React30__namespace.forwardRef((_a, ref) => {
|
|
3883
3887
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3884
3888
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3885
3889
|
DropdownMenuPrimitive__namespace.SubContent,
|
|
@@ -3893,7 +3897,7 @@ var DropdownMenuSubContent = React29__namespace.forwardRef((_a, ref) => {
|
|
|
3893
3897
|
);
|
|
3894
3898
|
});
|
|
3895
3899
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
|
|
3896
|
-
var DropdownMenuContent =
|
|
3900
|
+
var DropdownMenuContent = React30__namespace.forwardRef((_a, ref) => {
|
|
3897
3901
|
var _b = _a, { className, sideOffset = 4 } = _b, props = __objRest(_b, ["className", "sideOffset"]);
|
|
3898
3902
|
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPortal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3899
3903
|
DropdownMenuPrimitive__namespace.Content,
|
|
@@ -3909,7 +3913,7 @@ var DropdownMenuContent = React29__namespace.forwardRef((_a, ref) => {
|
|
|
3909
3913
|
) });
|
|
3910
3914
|
});
|
|
3911
3915
|
DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
|
|
3912
|
-
var DropdownMenuItem =
|
|
3916
|
+
var DropdownMenuItem = React30__namespace.forwardRef((_a, ref) => {
|
|
3913
3917
|
var _b = _a, { className, inset } = _b, props = __objRest(_b, ["className", "inset"]);
|
|
3914
3918
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3915
3919
|
DropdownMenuPrimitive__namespace.Item,
|
|
@@ -3924,7 +3928,7 @@ var DropdownMenuItem = React29__namespace.forwardRef((_a, ref) => {
|
|
|
3924
3928
|
);
|
|
3925
3929
|
});
|
|
3926
3930
|
DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
|
|
3927
|
-
var DropdownMenuCheckboxItem =
|
|
3931
|
+
var DropdownMenuCheckboxItem = React30__namespace.forwardRef((_a, ref) => {
|
|
3928
3932
|
var _b = _a, { className, children, checked } = _b, props = __objRest(_b, ["className", "children", "checked"]);
|
|
3929
3933
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3930
3934
|
DropdownMenuPrimitive__namespace.CheckboxItem,
|
|
@@ -3944,7 +3948,7 @@ var DropdownMenuCheckboxItem = React29__namespace.forwardRef((_a, ref) => {
|
|
|
3944
3948
|
);
|
|
3945
3949
|
});
|
|
3946
3950
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
|
|
3947
|
-
var DropdownMenuRadioItem =
|
|
3951
|
+
var DropdownMenuRadioItem = React30__namespace.forwardRef((_a, ref) => {
|
|
3948
3952
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
3949
3953
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3950
3954
|
DropdownMenuPrimitive__namespace.RadioItem,
|
|
@@ -3963,7 +3967,7 @@ var DropdownMenuRadioItem = React29__namespace.forwardRef((_a, ref) => {
|
|
|
3963
3967
|
);
|
|
3964
3968
|
});
|
|
3965
3969
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
|
|
3966
|
-
var DropdownMenuLabel =
|
|
3970
|
+
var DropdownMenuLabel = React30__namespace.forwardRef((_a, ref) => {
|
|
3967
3971
|
var _b = _a, { className, inset } = _b, props = __objRest(_b, ["className", "inset"]);
|
|
3968
3972
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3969
3973
|
DropdownMenuPrimitive__namespace.Label,
|
|
@@ -3978,7 +3982,7 @@ var DropdownMenuLabel = React29__namespace.forwardRef((_a, ref) => {
|
|
|
3978
3982
|
);
|
|
3979
3983
|
});
|
|
3980
3984
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
|
|
3981
|
-
var DropdownMenuSeparator =
|
|
3985
|
+
var DropdownMenuSeparator = React30__namespace.forwardRef((_a, ref) => {
|
|
3982
3986
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3983
3987
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3984
3988
|
DropdownMenuPrimitive__namespace.Separator,
|
|
@@ -3995,10 +3999,10 @@ function DatePickerWithRange({
|
|
|
3995
3999
|
onDateChange,
|
|
3996
4000
|
label
|
|
3997
4001
|
}) {
|
|
3998
|
-
const [month, setMonth] =
|
|
3999
|
-
const [open, setOpen] =
|
|
4000
|
-
const [inputValue, setInputValue] =
|
|
4001
|
-
|
|
4002
|
+
const [month, setMonth] = React30__namespace.useState((date == null ? void 0 : date.from) || /* @__PURE__ */ new Date());
|
|
4003
|
+
const [open, setOpen] = React30__namespace.useState(false);
|
|
4004
|
+
const [inputValue, setInputValue] = React30__namespace.useState("");
|
|
4005
|
+
React30__namespace.useEffect(() => {
|
|
4002
4006
|
if (date == null ? void 0 : date.from) {
|
|
4003
4007
|
if (date.to) {
|
|
4004
4008
|
setInputValue(
|
|
@@ -4052,7 +4056,7 @@ function DatePickerWithRange({
|
|
|
4052
4056
|
onDateChange(range2);
|
|
4053
4057
|
setMonth(range2.from || /* @__PURE__ */ new Date());
|
|
4054
4058
|
};
|
|
4055
|
-
const isCustomDate =
|
|
4059
|
+
const isCustomDate = React30__namespace.useMemo(() => {
|
|
4056
4060
|
if (!date || !date.from) return false;
|
|
4057
4061
|
return !presets2.some(
|
|
4058
4062
|
(p) => dateFns.isEqual(p.range.from, date.from || /* @__PURE__ */ new Date(0)) && dateFns.isEqual(p.range.to || /* @__PURE__ */ new Date(0), date.to || /* @__PURE__ */ new Date(0))
|
|
@@ -4137,10 +4141,10 @@ function DatePickerSingle({
|
|
|
4137
4141
|
placeholder = "dd/mm/aa",
|
|
4138
4142
|
error
|
|
4139
4143
|
}) {
|
|
4140
|
-
const [month, setMonth] =
|
|
4141
|
-
const [open, setOpen] =
|
|
4142
|
-
const [inputValue, setInputValue] =
|
|
4143
|
-
|
|
4144
|
+
const [month, setMonth] = React30__namespace.useState(date || /* @__PURE__ */ new Date());
|
|
4145
|
+
const [open, setOpen] = React30__namespace.useState(false);
|
|
4146
|
+
const [inputValue, setInputValue] = React30__namespace.useState("");
|
|
4147
|
+
React30__namespace.useEffect(() => {
|
|
4144
4148
|
setInputValue(date ? dateFns.format(date, "dd/MM/yyyy") : "");
|
|
4145
4149
|
}, [date]);
|
|
4146
4150
|
const handleInputChange = (e) => {
|
|
@@ -4207,7 +4211,7 @@ function DatePickerSingle({
|
|
|
4207
4211
|
] });
|
|
4208
4212
|
}
|
|
4209
4213
|
var defaultIncludesFilter = (value, search) => value.toLowerCase().includes(search.toLowerCase()) ? 1 : 0;
|
|
4210
|
-
var Dropdown =
|
|
4214
|
+
var Dropdown = React30__namespace.forwardRef(
|
|
4211
4215
|
({
|
|
4212
4216
|
label,
|
|
4213
4217
|
options,
|
|
@@ -4221,10 +4225,10 @@ var Dropdown = React29__namespace.forwardRef(
|
|
|
4221
4225
|
required,
|
|
4222
4226
|
filter
|
|
4223
4227
|
}, ref) => {
|
|
4224
|
-
const [open, setOpen] =
|
|
4225
|
-
const [inputValue, setInputValue] =
|
|
4226
|
-
const inputId = name || `dropdown-${
|
|
4227
|
-
const popoverRef =
|
|
4228
|
+
const [open, setOpen] = React30__namespace.useState(false);
|
|
4229
|
+
const [inputValue, setInputValue] = React30__namespace.useState("");
|
|
4230
|
+
const inputId = name || `dropdown-${React30__namespace.useId()}`;
|
|
4231
|
+
const popoverRef = React30__namespace.useRef(null);
|
|
4228
4232
|
const handleSelect = (currentValue) => {
|
|
4229
4233
|
if (onChange) {
|
|
4230
4234
|
onChange(currentValue);
|
|
@@ -4233,11 +4237,11 @@ var Dropdown = React29__namespace.forwardRef(
|
|
|
4233
4237
|
setInputValue(selectedOption ? selectedOption.label : "");
|
|
4234
4238
|
setOpen(false);
|
|
4235
4239
|
};
|
|
4236
|
-
|
|
4240
|
+
React30__namespace.useEffect(() => {
|
|
4237
4241
|
const selectedOption = options.find((o) => o.value === value);
|
|
4238
4242
|
setInputValue(selectedOption ? selectedOption.label : "");
|
|
4239
4243
|
}, [value, options]);
|
|
4240
|
-
|
|
4244
|
+
React30__namespace.useEffect(() => {
|
|
4241
4245
|
const handleClickOutside = (event) => {
|
|
4242
4246
|
if (popoverRef.current && !popoverRef.current.contains(event.target)) {
|
|
4243
4247
|
setOpen(false);
|
|
@@ -4351,7 +4355,320 @@ var Dropdown = React29__namespace.forwardRef(
|
|
|
4351
4355
|
}
|
|
4352
4356
|
);
|
|
4353
4357
|
Dropdown.displayName = "Dropdown";
|
|
4354
|
-
var
|
|
4358
|
+
var progressBarContainerVariants = classVarianceAuthority.cva("w-full min-w-[200px]", {
|
|
4359
|
+
variants: {
|
|
4360
|
+
size: {
|
|
4361
|
+
sm: "text-progress-bar-sm",
|
|
4362
|
+
md: "text-progress-bar-md",
|
|
4363
|
+
lg: "text-progress-bar-lg"
|
|
4364
|
+
}
|
|
4365
|
+
},
|
|
4366
|
+
defaultVariants: {
|
|
4367
|
+
size: "md"
|
|
4368
|
+
}
|
|
4369
|
+
});
|
|
4370
|
+
var progressBarTrackVariants = classVarianceAuthority.cva(
|
|
4371
|
+
"overflow-hidden rounded-full bg-progress-bar-track",
|
|
4372
|
+
{
|
|
4373
|
+
variants: {
|
|
4374
|
+
size: {
|
|
4375
|
+
sm: "h-progress-bar-sm",
|
|
4376
|
+
md: "h-progress-bar-md",
|
|
4377
|
+
lg: "h-progress-bar-lg"
|
|
4378
|
+
}
|
|
4379
|
+
},
|
|
4380
|
+
defaultVariants: {
|
|
4381
|
+
size: "md"
|
|
4382
|
+
}
|
|
4383
|
+
}
|
|
4384
|
+
);
|
|
4385
|
+
var progressBarIndicatorVariants = classVarianceAuthority.cva(
|
|
4386
|
+
"h-full rounded-full bg-progress-bar-indicator transition-all duration-300 ease-in-out",
|
|
4387
|
+
{
|
|
4388
|
+
variants: {},
|
|
4389
|
+
defaultVariants: {}
|
|
4390
|
+
}
|
|
4391
|
+
);
|
|
4392
|
+
var ProgressBar = React30__namespace.default.forwardRef(
|
|
4393
|
+
(_a, ref) => {
|
|
4394
|
+
var _b = _a, {
|
|
4395
|
+
className,
|
|
4396
|
+
value,
|
|
4397
|
+
label,
|
|
4398
|
+
size,
|
|
4399
|
+
showPercentage = true
|
|
4400
|
+
} = _b, props = __objRest(_b, [
|
|
4401
|
+
"className",
|
|
4402
|
+
"value",
|
|
4403
|
+
"label",
|
|
4404
|
+
"size",
|
|
4405
|
+
"showPercentage"
|
|
4406
|
+
]);
|
|
4407
|
+
const progress = Math.max(0, Math.min(100, value || 0));
|
|
4408
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4409
|
+
"div",
|
|
4410
|
+
__spreadProps(__spreadValues({
|
|
4411
|
+
ref,
|
|
4412
|
+
className: cn(progressBarContainerVariants({ size }), className)
|
|
4413
|
+
}, props), {
|
|
4414
|
+
children: [
|
|
4415
|
+
(label || showPercentage) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4416
|
+
"div",
|
|
4417
|
+
{
|
|
4418
|
+
className: cn(
|
|
4419
|
+
"flex items-center mb-1",
|
|
4420
|
+
label ? "justify-between" : "justify-end"
|
|
4421
|
+
),
|
|
4422
|
+
children: [
|
|
4423
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(Label, { className: "text-progress-bar-label font-normal", children: label }),
|
|
4424
|
+
showPercentage && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-progress-bar-label font-normal", children: [
|
|
4425
|
+
Math.round(progress),
|
|
4426
|
+
"%"
|
|
4427
|
+
] })
|
|
4428
|
+
]
|
|
4429
|
+
}
|
|
4430
|
+
),
|
|
4431
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(progressBarTrackVariants({ size })), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4432
|
+
"div",
|
|
4433
|
+
{
|
|
4434
|
+
className: cn(progressBarIndicatorVariants()),
|
|
4435
|
+
style: { width: `${progress}%` }
|
|
4436
|
+
}
|
|
4437
|
+
) })
|
|
4438
|
+
]
|
|
4439
|
+
})
|
|
4440
|
+
);
|
|
4441
|
+
}
|
|
4442
|
+
);
|
|
4443
|
+
ProgressBar.displayName = "ProgressBar";
|
|
4444
|
+
var FileUploadDropzone = React30__namespace.forwardRef(
|
|
4445
|
+
(_a, ref) => {
|
|
4446
|
+
var _b = _a, {
|
|
4447
|
+
className,
|
|
4448
|
+
onSelect,
|
|
4449
|
+
accept = ".png,.jpg,.jpeg,.pdf",
|
|
4450
|
+
disabled = false,
|
|
4451
|
+
subtitle = "PNG, JPG, JPEG o PDF",
|
|
4452
|
+
buttonLabel = "Abrir explorador"
|
|
4453
|
+
} = _b, props = __objRest(_b, [
|
|
4454
|
+
"className",
|
|
4455
|
+
"onSelect",
|
|
4456
|
+
"accept",
|
|
4457
|
+
"disabled",
|
|
4458
|
+
"subtitle",
|
|
4459
|
+
"buttonLabel"
|
|
4460
|
+
]);
|
|
4461
|
+
const inputRef = React30__namespace.useRef(null);
|
|
4462
|
+
const handleChange = (e) => {
|
|
4463
|
+
const files = e.target.files;
|
|
4464
|
+
if (files && files.length > 0) {
|
|
4465
|
+
onSelect(Array.from(files));
|
|
4466
|
+
}
|
|
4467
|
+
e.target.value = "";
|
|
4468
|
+
};
|
|
4469
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4470
|
+
"div",
|
|
4471
|
+
__spreadProps(__spreadValues({
|
|
4472
|
+
ref,
|
|
4473
|
+
className: cn(
|
|
4474
|
+
"flex flex-col gap-[26px] rounded-2xl border border-primary-400 bg-white p-6",
|
|
4475
|
+
className
|
|
4476
|
+
)
|
|
4477
|
+
}, props), {
|
|
4478
|
+
children: [
|
|
4479
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
4480
|
+
/* @__PURE__ */ jsxRuntime.jsx(FolderCloudIcon.FolderCloudIcon, { className: "h-6 w-6 text-primary-600", "aria-hidden": "true" }),
|
|
4481
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base text-primary-1200", children: "A\xF1adir archivos" }),
|
|
4482
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-primary-1200", children: subtitle })
|
|
4483
|
+
] }),
|
|
4484
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4485
|
+
Button,
|
|
4486
|
+
{
|
|
4487
|
+
type: "button",
|
|
4488
|
+
variant: "primary",
|
|
4489
|
+
size: "lg",
|
|
4490
|
+
className: "w-full",
|
|
4491
|
+
disabled,
|
|
4492
|
+
iconLeft: /* @__PURE__ */ jsxRuntime.jsx(DocumentDownloadIcon.DocumentDownloadIcon, {}),
|
|
4493
|
+
onClick: () => {
|
|
4494
|
+
var _a2;
|
|
4495
|
+
return (_a2 = inputRef.current) == null ? void 0 : _a2.click();
|
|
4496
|
+
},
|
|
4497
|
+
children: buttonLabel
|
|
4498
|
+
}
|
|
4499
|
+
),
|
|
4500
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4501
|
+
"input",
|
|
4502
|
+
{
|
|
4503
|
+
ref: inputRef,
|
|
4504
|
+
type: "file",
|
|
4505
|
+
hidden: true,
|
|
4506
|
+
accept,
|
|
4507
|
+
disabled,
|
|
4508
|
+
onChange: handleChange
|
|
4509
|
+
}
|
|
4510
|
+
)
|
|
4511
|
+
]
|
|
4512
|
+
})
|
|
4513
|
+
);
|
|
4514
|
+
}
|
|
4515
|
+
);
|
|
4516
|
+
FileUploadDropzone.displayName = "FileUploadDropzone";
|
|
4517
|
+
function formatFileSize(bytes) {
|
|
4518
|
+
if (bytes >= 1048576) return `${Math.round(bytes / 1048576)} MB`;
|
|
4519
|
+
if (bytes >= 1024) return `${Math.round(bytes / 1024)} KB`;
|
|
4520
|
+
return `${bytes} B`;
|
|
4521
|
+
}
|
|
4522
|
+
var FileUploadItem = React30__namespace.forwardRef(
|
|
4523
|
+
(_a, ref) => {
|
|
4524
|
+
var _b = _a, {
|
|
4525
|
+
className,
|
|
4526
|
+
name,
|
|
4527
|
+
size,
|
|
4528
|
+
status,
|
|
4529
|
+
progress = 0,
|
|
4530
|
+
errorMessage,
|
|
4531
|
+
onDelete
|
|
4532
|
+
} = _b, props = __objRest(_b, [
|
|
4533
|
+
"className",
|
|
4534
|
+
"name",
|
|
4535
|
+
"size",
|
|
4536
|
+
"status",
|
|
4537
|
+
"progress",
|
|
4538
|
+
"errorMessage",
|
|
4539
|
+
"onDelete"
|
|
4540
|
+
]);
|
|
4541
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4542
|
+
"div",
|
|
4543
|
+
__spreadProps(__spreadValues({
|
|
4544
|
+
ref,
|
|
4545
|
+
className: cn(
|
|
4546
|
+
"flex items-start gap-4 rounded-2xl border border-primary-300 bg-white p-4",
|
|
4547
|
+
className
|
|
4548
|
+
)
|
|
4549
|
+
}, props), {
|
|
4550
|
+
children: [
|
|
4551
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-6", children: [
|
|
4552
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4553
|
+
"div",
|
|
4554
|
+
{
|
|
4555
|
+
className: cn(
|
|
4556
|
+
"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl",
|
|
4557
|
+
status === "uploaded" ? "bg-secondary-200" : status === "error" ? "bg-red-200" : "bg-primary-100"
|
|
4558
|
+
),
|
|
4559
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4560
|
+
DocumentTextIcon.DocumentTextIcon,
|
|
4561
|
+
{
|
|
4562
|
+
className: cn(
|
|
4563
|
+
"h-5 w-5",
|
|
4564
|
+
status === "uploaded" ? "text-secondary-900" : status === "error" ? "text-red-600" : "text-primary-600"
|
|
4565
|
+
),
|
|
4566
|
+
"aria-hidden": "true"
|
|
4567
|
+
}
|
|
4568
|
+
)
|
|
4569
|
+
}
|
|
4570
|
+
),
|
|
4571
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: status === "uploading" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4572
|
+
/* @__PURE__ */ jsxRuntime.jsx(ProgressBar, { value: progress, label: name, showPercentage: true, size: "sm" }),
|
|
4573
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-primary-600", children: formatFileSize(size) })
|
|
4574
|
+
] }) : status === "error" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4575
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-sm text-primary-1200", children: name }),
|
|
4576
|
+
errorMessage && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-xs text-red-600", children: [
|
|
4577
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Ops!" }),
|
|
4578
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4579
|
+
"span",
|
|
4580
|
+
{
|
|
4581
|
+
className: "h-1 w-1 shrink-0 rounded-full bg-red-600",
|
|
4582
|
+
"aria-hidden": "true"
|
|
4583
|
+
}
|
|
4584
|
+
),
|
|
4585
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: errorMessage })
|
|
4586
|
+
] })
|
|
4587
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4588
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-sm text-primary-1200", children: name }),
|
|
4589
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-primary-600", children: formatFileSize(size) })
|
|
4590
|
+
] }) })
|
|
4591
|
+
] }),
|
|
4592
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4593
|
+
Button,
|
|
4594
|
+
{
|
|
4595
|
+
type: "button",
|
|
4596
|
+
variant: "icon",
|
|
4597
|
+
size: "md",
|
|
4598
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(TrashIcon.TrashIcon, {}),
|
|
4599
|
+
onClick: onDelete,
|
|
4600
|
+
"aria-label": "Eliminar archivo"
|
|
4601
|
+
}
|
|
4602
|
+
)
|
|
4603
|
+
]
|
|
4604
|
+
})
|
|
4605
|
+
);
|
|
4606
|
+
}
|
|
4607
|
+
);
|
|
4608
|
+
FileUploadItem.displayName = "FileUploadItem";
|
|
4609
|
+
var FileUpload = React30__namespace.forwardRef(
|
|
4610
|
+
(_a, ref) => {
|
|
4611
|
+
var _b = _a, {
|
|
4612
|
+
className,
|
|
4613
|
+
files,
|
|
4614
|
+
onSelect,
|
|
4615
|
+
onDelete,
|
|
4616
|
+
maxFiles = 1,
|
|
4617
|
+
accept,
|
|
4618
|
+
subtitle,
|
|
4619
|
+
disabled = false,
|
|
4620
|
+
recommendations
|
|
4621
|
+
} = _b, props = __objRest(_b, [
|
|
4622
|
+
"className",
|
|
4623
|
+
"files",
|
|
4624
|
+
"onSelect",
|
|
4625
|
+
"onDelete",
|
|
4626
|
+
"maxFiles",
|
|
4627
|
+
"accept",
|
|
4628
|
+
"subtitle",
|
|
4629
|
+
"disabled",
|
|
4630
|
+
"recommendations"
|
|
4631
|
+
]);
|
|
4632
|
+
const showDropzone = files.length < maxFiles && !files.some((f) => f.status === "uploading");
|
|
4633
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4634
|
+
"div",
|
|
4635
|
+
__spreadProps(__spreadValues({
|
|
4636
|
+
ref,
|
|
4637
|
+
className: cn("flex flex-col gap-4", className)
|
|
4638
|
+
}, props), {
|
|
4639
|
+
children: [
|
|
4640
|
+
recommendations && recommendations.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Alert, { variant: "neutral", className: "py-4", children: /* @__PURE__ */ jsxRuntime.jsx(AlertDescription, { children: recommendations.map((text, i) => /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
4641
|
+
text,
|
|
4642
|
+
i < recommendations.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("br", {})
|
|
4643
|
+
] }, i)) }) }),
|
|
4644
|
+
showDropzone && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4645
|
+
FileUploadDropzone,
|
|
4646
|
+
{
|
|
4647
|
+
onSelect,
|
|
4648
|
+
accept,
|
|
4649
|
+
subtitle,
|
|
4650
|
+
disabled
|
|
4651
|
+
}
|
|
4652
|
+
),
|
|
4653
|
+
files.map((file) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4654
|
+
FileUploadItem,
|
|
4655
|
+
{
|
|
4656
|
+
name: file.name,
|
|
4657
|
+
size: file.size,
|
|
4658
|
+
status: file.status,
|
|
4659
|
+
progress: file.progress,
|
|
4660
|
+
errorMessage: file.errorMessage,
|
|
4661
|
+
onDelete: () => onDelete(file.id)
|
|
4662
|
+
},
|
|
4663
|
+
file.id
|
|
4664
|
+
))
|
|
4665
|
+
]
|
|
4666
|
+
})
|
|
4667
|
+
);
|
|
4668
|
+
}
|
|
4669
|
+
);
|
|
4670
|
+
FileUpload.displayName = "FileUpload";
|
|
4671
|
+
var Form = React30__namespace.forwardRef(
|
|
4355
4672
|
(_a, ref) => {
|
|
4356
4673
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
4357
4674
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4364,7 +4681,7 @@ var Form = React29__namespace.forwardRef(
|
|
|
4364
4681
|
}
|
|
4365
4682
|
);
|
|
4366
4683
|
Form.displayName = "Form";
|
|
4367
|
-
var FormField =
|
|
4684
|
+
var FormField = React30__namespace.forwardRef(
|
|
4368
4685
|
(_a, ref) => {
|
|
4369
4686
|
var _b = _a, { className, error } = _b, props = __objRest(_b, ["className", "error"]);
|
|
4370
4687
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4382,7 +4699,7 @@ var FormField = React29__namespace.forwardRef(
|
|
|
4382
4699
|
}
|
|
4383
4700
|
);
|
|
4384
4701
|
FormField.displayName = "FormField";
|
|
4385
|
-
var FormLabel =
|
|
4702
|
+
var FormLabel = React30__namespace.forwardRef(
|
|
4386
4703
|
(_a, ref) => {
|
|
4387
4704
|
var _b = _a, { className, required, children } = _b, props = __objRest(_b, ["className", "required", "children"]);
|
|
4388
4705
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -4403,7 +4720,7 @@ var FormLabel = React29__namespace.forwardRef(
|
|
|
4403
4720
|
}
|
|
4404
4721
|
);
|
|
4405
4722
|
FormLabel.displayName = "FormLabel";
|
|
4406
|
-
var FormMessage =
|
|
4723
|
+
var FormMessage = React30__namespace.forwardRef(
|
|
4407
4724
|
(_a, ref) => {
|
|
4408
4725
|
var _b = _a, { className, type = "helper" } = _b, props = __objRest(_b, ["className", "type"]);
|
|
4409
4726
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4544,7 +4861,7 @@ var getColPositionClasses = (colStart, colEnd) => {
|
|
|
4544
4861
|
}
|
|
4545
4862
|
return classes.join(" ");
|
|
4546
4863
|
};
|
|
4547
|
-
var Grid =
|
|
4864
|
+
var Grid = React30__namespace.default.forwardRef(
|
|
4548
4865
|
(_a, ref) => {
|
|
4549
4866
|
var _b = _a, {
|
|
4550
4867
|
container = true,
|
|
@@ -4600,7 +4917,7 @@ var Grid = React29__namespace.default.forwardRef(
|
|
|
4600
4917
|
}
|
|
4601
4918
|
);
|
|
4602
4919
|
Grid.displayName = "Grid";
|
|
4603
|
-
var GridItem =
|
|
4920
|
+
var GridItem = React30__namespace.default.forwardRef(
|
|
4604
4921
|
(_a, ref) => {
|
|
4605
4922
|
var _b = _a, {
|
|
4606
4923
|
span,
|
|
@@ -4642,101 +4959,15 @@ var GridItem = React29__namespace.default.forwardRef(
|
|
|
4642
4959
|
}
|
|
4643
4960
|
);
|
|
4644
4961
|
GridItem.displayName = "GridItem";
|
|
4645
|
-
var
|
|
4646
|
-
variants: {
|
|
4647
|
-
size: {
|
|
4648
|
-
sm: "text-progress-bar-sm",
|
|
4649
|
-
md: "text-progress-bar-md",
|
|
4650
|
-
lg: "text-progress-bar-lg"
|
|
4651
|
-
}
|
|
4652
|
-
},
|
|
4653
|
-
defaultVariants: {
|
|
4654
|
-
size: "md"
|
|
4655
|
-
}
|
|
4656
|
-
});
|
|
4657
|
-
var progressBarTrackVariants = classVarianceAuthority.cva(
|
|
4658
|
-
"overflow-hidden rounded-full bg-progress-bar-track",
|
|
4659
|
-
{
|
|
4660
|
-
variants: {
|
|
4661
|
-
size: {
|
|
4662
|
-
sm: "h-progress-bar-sm",
|
|
4663
|
-
md: "h-progress-bar-md",
|
|
4664
|
-
lg: "h-progress-bar-lg"
|
|
4665
|
-
}
|
|
4666
|
-
},
|
|
4667
|
-
defaultVariants: {
|
|
4668
|
-
size: "md"
|
|
4669
|
-
}
|
|
4670
|
-
}
|
|
4671
|
-
);
|
|
4672
|
-
var progressBarIndicatorVariants = classVarianceAuthority.cva(
|
|
4673
|
-
"h-full rounded-full bg-progress-bar-indicator transition-all duration-300 ease-in-out",
|
|
4674
|
-
{
|
|
4675
|
-
variants: {},
|
|
4676
|
-
defaultVariants: {}
|
|
4677
|
-
}
|
|
4678
|
-
);
|
|
4679
|
-
var ProgressBar = React29__namespace.default.forwardRef(
|
|
4680
|
-
(_a, ref) => {
|
|
4681
|
-
var _b = _a, {
|
|
4682
|
-
className,
|
|
4683
|
-
value,
|
|
4684
|
-
label,
|
|
4685
|
-
size,
|
|
4686
|
-
showPercentage = true
|
|
4687
|
-
} = _b, props = __objRest(_b, [
|
|
4688
|
-
"className",
|
|
4689
|
-
"value",
|
|
4690
|
-
"label",
|
|
4691
|
-
"size",
|
|
4692
|
-
"showPercentage"
|
|
4693
|
-
]);
|
|
4694
|
-
const progress = Math.max(0, Math.min(100, value || 0));
|
|
4695
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4696
|
-
"div",
|
|
4697
|
-
__spreadProps(__spreadValues({
|
|
4698
|
-
ref,
|
|
4699
|
-
className: cn(progressBarContainerVariants({ size }), className)
|
|
4700
|
-
}, props), {
|
|
4701
|
-
children: [
|
|
4702
|
-
(label || showPercentage) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4703
|
-
"div",
|
|
4704
|
-
{
|
|
4705
|
-
className: cn(
|
|
4706
|
-
"flex items-center mb-1",
|
|
4707
|
-
label ? "justify-between" : "justify-end"
|
|
4708
|
-
),
|
|
4709
|
-
children: [
|
|
4710
|
-
label && /* @__PURE__ */ jsxRuntime.jsx(Label, { className: "text-progress-bar-label font-normal", children: label }),
|
|
4711
|
-
showPercentage && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-progress-bar-label font-normal", children: [
|
|
4712
|
-
Math.round(progress),
|
|
4713
|
-
"%"
|
|
4714
|
-
] })
|
|
4715
|
-
]
|
|
4716
|
-
}
|
|
4717
|
-
),
|
|
4718
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(progressBarTrackVariants({ size })), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4719
|
-
"div",
|
|
4720
|
-
{
|
|
4721
|
-
className: cn(progressBarIndicatorVariants()),
|
|
4722
|
-
style: { width: `${progress}%` }
|
|
4723
|
-
}
|
|
4724
|
-
) })
|
|
4725
|
-
]
|
|
4726
|
-
})
|
|
4727
|
-
);
|
|
4728
|
-
}
|
|
4729
|
-
);
|
|
4730
|
-
ProgressBar.displayName = "ProgressBar";
|
|
4731
|
-
var StepperContext = React29__namespace.createContext(null);
|
|
4962
|
+
var StepperContext = React30__namespace.createContext(null);
|
|
4732
4963
|
var useStepper = () => {
|
|
4733
|
-
const context =
|
|
4964
|
+
const context = React30__namespace.useContext(StepperContext);
|
|
4734
4965
|
if (!context) {
|
|
4735
4966
|
throw new Error("useStepper must be used within a Stepper component");
|
|
4736
4967
|
}
|
|
4737
4968
|
return context;
|
|
4738
4969
|
};
|
|
4739
|
-
var Stepper =
|
|
4970
|
+
var Stepper = React30__namespace.forwardRef(
|
|
4740
4971
|
(_a, ref) => {
|
|
4741
4972
|
var _b = _a, {
|
|
4742
4973
|
className,
|
|
@@ -4752,8 +4983,8 @@ var Stepper = React29__namespace.forwardRef(
|
|
|
4752
4983
|
"onStepChange"
|
|
4753
4984
|
]);
|
|
4754
4985
|
var _a2;
|
|
4755
|
-
const [activeStep, setActiveStep] =
|
|
4756
|
-
|
|
4986
|
+
const [activeStep, setActiveStep] = React30__namespace.useState(initialStep);
|
|
4987
|
+
React30__namespace.useImperativeHandle(ref, () => ({
|
|
4757
4988
|
goToNextStep: () => {
|
|
4758
4989
|
setActiveStep((prev) => {
|
|
4759
4990
|
const nextStep = prev < steps.length - 1 ? prev + 1 : prev;
|
|
@@ -4770,14 +5001,14 @@ var Stepper = React29__namespace.forwardRef(
|
|
|
4770
5001
|
},
|
|
4771
5002
|
activeStep
|
|
4772
5003
|
}));
|
|
4773
|
-
const stepStatuses =
|
|
5004
|
+
const stepStatuses = React30__namespace.useMemo(() => {
|
|
4774
5005
|
return steps.map((_, index) => {
|
|
4775
5006
|
if (index < activeStep) return { status: "completed" };
|
|
4776
5007
|
if (index === activeStep) return { status: "current" };
|
|
4777
5008
|
return { status: "upcoming" };
|
|
4778
5009
|
});
|
|
4779
5010
|
}, [activeStep, steps]);
|
|
4780
|
-
const contextValue =
|
|
5011
|
+
const contextValue = React30__namespace.useMemo(
|
|
4781
5012
|
() => ({
|
|
4782
5013
|
activeStep,
|
|
4783
5014
|
orientation,
|
|
@@ -4839,7 +5070,7 @@ var connectorVariants = classVarianceAuthority.cva("", {
|
|
|
4839
5070
|
status: "upcoming"
|
|
4840
5071
|
}
|
|
4841
5072
|
});
|
|
4842
|
-
var Step =
|
|
5073
|
+
var Step = React30__namespace.forwardRef(({ className, children, index }, ref) => {
|
|
4843
5074
|
const { steps, stepCount, orientation } = useStepper();
|
|
4844
5075
|
const status = steps[index].status;
|
|
4845
5076
|
const isFirst = index === 0;
|
|
@@ -4923,12 +5154,12 @@ var Step = React29__namespace.forwardRef(({ className, children, index }, ref) =
|
|
|
4923
5154
|
] });
|
|
4924
5155
|
});
|
|
4925
5156
|
Step.displayName = "Step";
|
|
4926
|
-
var StepLabel =
|
|
5157
|
+
var StepLabel = React30__namespace.forwardRef((_a, ref) => {
|
|
4927
5158
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
4928
5159
|
return /* @__PURE__ */ jsxRuntime.jsx("p", __spreadValues({ ref, className: cn("text-lg font-normal text-primary-1200", className) }, props));
|
|
4929
5160
|
});
|
|
4930
5161
|
StepLabel.displayName = "StepLabel";
|
|
4931
|
-
var StepDescription =
|
|
5162
|
+
var StepDescription = React30__namespace.forwardRef((_a, ref) => {
|
|
4932
5163
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
4933
5164
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4934
5165
|
"p",
|
|
@@ -4939,7 +5170,7 @@ var StepDescription = React29__namespace.forwardRef((_a, ref) => {
|
|
|
4939
5170
|
);
|
|
4940
5171
|
});
|
|
4941
5172
|
StepDescription.displayName = "StepDescription";
|
|
4942
|
-
var StepContent =
|
|
5173
|
+
var StepContent = React30__namespace.forwardRef((_a, ref) => {
|
|
4943
5174
|
var _b = _a, { className, index, children } = _b, props = __objRest(_b, ["className", "index", "children"]);
|
|
4944
5175
|
const { activeStep } = useStepper();
|
|
4945
5176
|
if (activeStep !== index) return null;
|
|
@@ -4947,7 +5178,7 @@ var StepContent = React29__namespace.forwardRef((_a, ref) => {
|
|
|
4947
5178
|
});
|
|
4948
5179
|
StepContent.displayName = "StepContent";
|
|
4949
5180
|
var Tabs = TabsPrimitive__namespace.Root;
|
|
4950
|
-
var TabsList =
|
|
5181
|
+
var TabsList = React30__namespace.forwardRef((_a, ref) => {
|
|
4951
5182
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
4952
5183
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4953
5184
|
TabsPrimitive__namespace.List,
|
|
@@ -4961,7 +5192,7 @@ var TabsList = React29__namespace.forwardRef((_a, ref) => {
|
|
|
4961
5192
|
);
|
|
4962
5193
|
});
|
|
4963
5194
|
TabsList.displayName = TabsPrimitive__namespace.List.displayName;
|
|
4964
|
-
var TabsTrigger =
|
|
5195
|
+
var TabsTrigger = React30__namespace.forwardRef((_a, ref) => {
|
|
4965
5196
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
4966
5197
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4967
5198
|
TabsPrimitive__namespace.Trigger,
|
|
@@ -4979,7 +5210,7 @@ var TabsTrigger = React29__namespace.forwardRef((_a, ref) => {
|
|
|
4979
5210
|
);
|
|
4980
5211
|
});
|
|
4981
5212
|
TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
|
|
4982
|
-
var TabsContent =
|
|
5213
|
+
var TabsContent = React30__namespace.forwardRef((_a, ref) => {
|
|
4983
5214
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
4984
5215
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4985
5216
|
TabsPrimitive__namespace.Content,
|
|
@@ -4999,9 +5230,9 @@ function Modal({ open, onClose, children }) {
|
|
|
4999
5230
|
}
|
|
5000
5231
|
var MainNavigationItemComponent = ({ item, isActive, hasActiveSubItem, onNavigate, collapsed = false, currentPath }) => {
|
|
5001
5232
|
var _a;
|
|
5002
|
-
const [isExpanded, setIsExpanded] =
|
|
5233
|
+
const [isExpanded, setIsExpanded] = React30__namespace.default.useState(hasActiveSubItem);
|
|
5003
5234
|
const hasSubItems = item.subItems && item.subItems.length > 0;
|
|
5004
|
-
|
|
5235
|
+
React30__namespace.default.useEffect(() => {
|
|
5005
5236
|
if (hasActiveSubItem) {
|
|
5006
5237
|
setIsExpanded(true);
|
|
5007
5238
|
}
|
|
@@ -5107,7 +5338,7 @@ var FooterMenuItemComponent = ({ item, isActive, onNavigate, collapsed = false }
|
|
|
5107
5338
|
}
|
|
5108
5339
|
);
|
|
5109
5340
|
};
|
|
5110
|
-
var Sidebar =
|
|
5341
|
+
var Sidebar = React30__namespace.default.forwardRef(
|
|
5111
5342
|
(_a, ref) => {
|
|
5112
5343
|
var _b = _a, {
|
|
5113
5344
|
brand,
|
|
@@ -5288,7 +5519,7 @@ var UserProfileComponent = ({ userProfile, onUserMenuClick }) => {
|
|
|
5288
5519
|
userProfile.role && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs leading-none text-muted-foreground", children: userProfile.role })
|
|
5289
5520
|
] }) }),
|
|
5290
5521
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
|
|
5291
|
-
menuOptions.map((option, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5522
|
+
menuOptions.map((option, index) => /* @__PURE__ */ jsxRuntime.jsxs(React30__namespace.default.Fragment, { children: [
|
|
5292
5523
|
option.separator && index > 0 && /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
|
|
5293
5524
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5294
5525
|
DropdownMenuItem,
|
|
@@ -5305,7 +5536,7 @@ var UserProfileComponent = ({ userProfile, onUserMenuClick }) => {
|
|
|
5305
5536
|
] })
|
|
5306
5537
|
] });
|
|
5307
5538
|
};
|
|
5308
|
-
var TopNavbar =
|
|
5539
|
+
var TopNavbar = React30__namespace.default.forwardRef(
|
|
5309
5540
|
(_a, ref) => {
|
|
5310
5541
|
var _b = _a, {
|
|
5311
5542
|
sidebarCollapsed = false,
|
|
@@ -5375,7 +5606,7 @@ function AuthLayout({ children }) {
|
|
|
5375
5606
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { minHeight: "100vh", display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsxRuntime.jsx("main", { children }) });
|
|
5376
5607
|
}
|
|
5377
5608
|
function useModal(initialOpen = false) {
|
|
5378
|
-
const [open, setOpen] =
|
|
5609
|
+
const [open, setOpen] = React30.useState(initialOpen);
|
|
5379
5610
|
function openModal() {
|
|
5380
5611
|
setOpen(true);
|
|
5381
5612
|
}
|
|
@@ -5419,6 +5650,9 @@ exports.DataTablePagination = DataTablePagination;
|
|
|
5419
5650
|
exports.DatePickerSingle = DatePickerSingle;
|
|
5420
5651
|
exports.DatePickerWithRange = DatePickerWithRange;
|
|
5421
5652
|
exports.Dropdown = Dropdown;
|
|
5653
|
+
exports.FileUpload = FileUpload;
|
|
5654
|
+
exports.FileUploadDropzone = FileUploadDropzone;
|
|
5655
|
+
exports.FileUploadItem = FileUploadItem;
|
|
5422
5656
|
exports.Form = Form;
|
|
5423
5657
|
exports.FormField = FormField;
|
|
5424
5658
|
exports.FormLabel = FormLabel;
|