@beweco/aurora-ui 0.1.62 → 0.1.64
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/assets/css/styles.css +1 -1
- package/dist/index.cjs.js +88 -13
- package/dist/index.esm.js +88 -15
- package/dist/types/components/area-line-chart/AreaLineChart.d.ts +3 -0
- package/dist/types/components/area-line-chart/AreaLineChart.d.ts.map +1 -0
- package/dist/types/components/area-line-chart/AreaLineChart.types.d.ts +31 -0
- package/dist/types/components/area-line-chart/AreaLineChart.types.d.ts.map +1 -0
- package/dist/types/components/area-line-chart/index.d.ts +3 -0
- package/dist/types/components/area-line-chart/index.d.ts.map +1 -0
- package/dist/types/components/multi-step-wizard/MultiStepWizard.d.ts +1 -1
- package/dist/types/components/multi-step-wizard/MultiStepWizard.d.ts.map +1 -1
- package/dist/types/components/multi-step-wizard/MultiStepWizard.types.d.ts +2 -0
- package/dist/types/components/multi-step-wizard/MultiStepWizard.types.d.ts.map +1 -1
- package/dist/types/components/multi-step-wizard/_internal/MultiStepSidebar.d.ts.map +1 -1
- package/dist/types/components/multi-step-wizard/_internal/MultiStepSidebar.types.d.ts +1 -0
- package/dist/types/components/multi-step-wizard/_internal/MultiStepSidebar.types.d.ts.map +1 -1
- package/dist/types/components/simple-line-chart/SimpleLineChart.d.ts +4 -0
- package/dist/types/components/simple-line-chart/SimpleLineChart.d.ts.map +1 -0
- package/dist/types/components/simple-line-chart/SimpleLineChart.types.d.ts +22 -0
- package/dist/types/components/simple-line-chart/SimpleLineChart.types.d.ts.map +1 -0
- package/dist/types/components/simple-line-chart/index.d.ts +3 -0
- package/dist/types/components/simple-line-chart/index.d.ts.map +1 -0
- package/dist/types/components/vertical-steps/VerticalSteps.d.ts.map +1 -1
- package/dist/types/components/vertical-steps/VerticalSteps.types.d.ts +7 -0
- package/dist/types/components/vertical-steps/VerticalSteps.types.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -560,6 +560,40 @@ var AnalyticsCard = function (_a) {
|
|
|
560
560
|
}, variant: "bordered", onAction: function (key) { return handleMenuAction(String(key)); }, children: [jsxRuntime.jsx(react.DropdownItem, { children: t.viewDetails }, "view-details"), jsxRuntime.jsx(react.DropdownItem, { children: t.exportData }, "export-data"), jsxRuntime.jsx(react.DropdownItem, { children: t.setAlert }, "set-alert")] })] }))] }) })));
|
|
561
561
|
};
|
|
562
562
|
|
|
563
|
+
var H3 = function (_a) {
|
|
564
|
+
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
565
|
+
return (jsxRuntime.jsx("h3", __assign({ className: react.cn("text-base font-medium", className) }, props, { children: children })));
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
function ChartTooltip(_a) {
|
|
569
|
+
var active = _a.active, payload = _a.payload, label = _a.label, series = _a.series, formatValue = _a.formatValue;
|
|
570
|
+
if (!active || !(payload === null || payload === void 0 ? void 0 : payload.length))
|
|
571
|
+
return null;
|
|
572
|
+
var format = function (value, dataKey) {
|
|
573
|
+
return formatValue ? formatValue(value, dataKey) : String(value);
|
|
574
|
+
};
|
|
575
|
+
return (jsxRuntime.jsxs("div", { className: "bg-gray-900 text-white px-3 py-2 rounded-lg text-sm shadow-lg", children: [label != null && (jsxRuntime.jsx(P, { className: "text-xs text-gray-300 mb-1", children: String(label) })), payload.map(function (entry, index) {
|
|
576
|
+
var _a;
|
|
577
|
+
var config = series.find(function (s) { return s.dataKey === entry.dataKey; });
|
|
578
|
+
var labelText = (_a = config === null || config === void 0 ? void 0 : config.label) !== null && _a !== void 0 ? _a : entry.dataKey;
|
|
579
|
+
return (jsxRuntime.jsxs(P, { className: "font-semibold", style: { color: entry.color }, children: [labelText, ": ", format(Number(entry.value), entry.dataKey)] }, index));
|
|
580
|
+
})] }));
|
|
581
|
+
}
|
|
582
|
+
function AreaLineChart(_a) {
|
|
583
|
+
var data = _a.data, xAxisKey = _a.xAxisKey, series = _a.series, title = _a.title, value = _a.value, trend = _a.trend, _b = _a.height, height = _b === void 0 ? 200 : _b, _c = _a.className, className = _c === void 0 ? "" : _c, _d = _a.wrappedInCard, wrappedInCard = _d === void 0 ? false : _d, formatTooltipValue = _a.formatTooltipValue;
|
|
584
|
+
var hasHeader = title != null || value != null || trend != null || series.length > 0;
|
|
585
|
+
var content = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [hasHeader && (jsxRuntime.jsxs("div", { className: "flex items-start justify-between mb-6", children: [jsxRuntime.jsxs("div", { children: [title != null && (jsxRuntime.jsx(H3, { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-1", children: title })), value != null && (jsxRuntime.jsxs("div", { className: "flex items-baseline gap-2", children: [jsxRuntime.jsx("span", { className: "text-2xl font-bold text-gray-900", children: value }), trend != null && (jsxRuntime.jsx("span", { className: "text-xs font-medium text-yellow-600 bg-yellow-50 px-2 py-1 rounded", children: trend }))] }))] }), series.length > 0 && (jsxRuntime.jsx("div", { className: "flex items-center gap-4", children: series.map(function (s) { return (jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntime.jsx("svg", { width: "16", height: "2", viewBox: "0 0 16 2", fill: "none", children: jsxRuntime.jsx("line", { x1: "0", y1: "1", x2: "16", y2: "1", stroke: s.color, strokeWidth: "2" }) }), jsxRuntime.jsx("span", { className: "text-xs text-gray-600 font-medium", children: s.label })] }, s.dataKey)); }) }))] })), jsxRuntime.jsx("div", { className: "w-full", style: { height: "".concat(height, "px") }, children: jsxRuntime.jsx(recharts.ResponsiveContainer, { width: "100%", height: "100%", children: jsxRuntime.jsxs(recharts.LineChart, { data: data, margin: { top: 5, right: 5, left: 5, bottom: 5 }, children: [jsxRuntime.jsx("defs", { children: series.map(function (s) { return (jsxRuntime.jsxs("linearGradient", { id: "area-line-chart-".concat(s.dataKey), x1: "0", y1: "0", x2: "0", y2: "1", children: [jsxRuntime.jsx("stop", { offset: "0%", stopColor: s.color, stopOpacity: 0.3 }), jsxRuntime.jsx("stop", { offset: "50%", stopColor: s.color, stopOpacity: 0.15 }), jsxRuntime.jsx("stop", { offset: "100%", stopColor: s.color, stopOpacity: 0 })] }, s.dataKey)); }) }), jsxRuntime.jsx(recharts.XAxis, { dataKey: xAxisKey, axisLine: false, tickLine: false, tick: { fill: "#9ca3af", fontSize: 12 }, dy: 10 }), jsxRuntime.jsx(recharts.YAxis, { axisLine: false, tickLine: false, tick: { fill: "transparent", fontSize: 0 }, width: 0, tickCount: 6, domain: [0, "dataMax + 100"], allowDecimals: false }), jsxRuntime.jsx(recharts.CartesianGrid, { strokeDasharray: "3 3", stroke: "#d1d5db", strokeOpacity: 0.5, vertical: false, horizontal: true }), jsxRuntime.jsx(recharts.Tooltip, { content: jsxRuntime.jsx(ChartTooltip, { series: series, formatValue: formatTooltipValue }) }), series.map(function (s) { return (jsxRuntime.jsx(recharts.Area, { type: "natural", dataKey: s.dataKey, stroke: "none", fill: "url(#area-line-chart-".concat(s.dataKey, ")"), animationDuration: 1500, animationEasing: "ease-in-out" }, "area-".concat(s.dataKey))); }), series.map(function (s) { return (jsxRuntime.jsx(recharts.Line, { type: "natural", dataKey: s.dataKey, name: s.dataKey, stroke: s.color, strokeWidth: 3, dot: false, activeDot: {
|
|
586
|
+
r: 6,
|
|
587
|
+
fill: s.color,
|
|
588
|
+
stroke: "#fff",
|
|
589
|
+
strokeWidth: 2,
|
|
590
|
+
}, fill: "transparent", animationDuration: 1500, animationEasing: "ease-in-out" }, "line-".concat(s.dataKey))); })] }) }) })] }));
|
|
591
|
+
if (wrappedInCard) {
|
|
592
|
+
return (jsxRuntime.jsx(react.Card, { className: "p-6 shadow-sm border border-gray-200 ".concat(className), children: content }));
|
|
593
|
+
}
|
|
594
|
+
return jsxRuntime.jsx("div", { className: className, children: content });
|
|
595
|
+
}
|
|
596
|
+
|
|
563
597
|
/** Clases del wrapper del icono: margen derecho y alineación igual para lupa e iconos custom */
|
|
564
598
|
var ICON_WRAPPER_CLASSNAME = "mr-2 flex shrink-0 items-center [&_svg]:shrink-0";
|
|
565
599
|
var DEFAULT_ICON = (jsxRuntime.jsx(IconComponent, { icon: "solar:magnifer-outline", className: "text-default-400 pointer-events-none shrink-0", size: "sm", "aria-hidden": true }));
|
|
@@ -1639,11 +1673,6 @@ var H1 = function (_a) {
|
|
|
1639
1673
|
return (jsxRuntime.jsx("h1", __assign({ className: react.cn("text-xl font-bold", className) }, props, { children: children })));
|
|
1640
1674
|
};
|
|
1641
1675
|
|
|
1642
|
-
var H3 = function (_a) {
|
|
1643
|
-
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
1644
|
-
return (jsxRuntime.jsx("h3", __assign({ className: react.cn("text-base font-medium", className) }, props, { children: children })));
|
|
1645
|
-
};
|
|
1646
|
-
|
|
1647
1676
|
var H4 = function (_a) {
|
|
1648
1677
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
1649
1678
|
return (jsxRuntime.jsx("h4", __assign({ className: react.cn("text-sm font-medium ", className) }, props, { children: children })));
|
|
@@ -2464,8 +2493,8 @@ var defaultTranslations$7 = {
|
|
|
2464
2493
|
checkIconTitle: "Check",
|
|
2465
2494
|
};
|
|
2466
2495
|
var VerticalSteps = React.forwardRef(function (_a, ref) {
|
|
2467
|
-
var _b = _a.color, color = _b === void 0 ? "primary" : _b, _c = _a.steps, stepsProp = _c === void 0 ? [] : _c, _d = _a.defaultStep, defaultStep = _d === void 0 ? 0 : _d, onStepChange = _a.onStepChange, currentStepProp = _a.currentStep, _e = _a.hideProgressBars, hideProgressBars = _e === void 0 ? false : _e, stepClassName = _a.stepClassName, className = _a.className, translations = _a.translations, props = __rest(_a, ["color", "steps", "defaultStep", "onStepChange", "currentStep", "hideProgressBars", "stepClassName", "className", "translations"]);
|
|
2468
|
-
var
|
|
2496
|
+
var _b = _a.color, color = _b === void 0 ? "primary" : _b, _c = _a.steps, stepsProp = _c === void 0 ? [] : _c, _d = _a.defaultStep, defaultStep = _d === void 0 ? 0 : _d, onStepChange = _a.onStepChange, currentStepProp = _a.currentStep, _e = _a.hideProgressBars, hideProgressBars = _e === void 0 ? false : _e, _f = _a.hideInactiveDescriptions, hideInactiveDescriptions = _f === void 0 ? false : _f, stepClassName = _a.stepClassName, className = _a.className, translations = _a.translations, props = __rest(_a, ["color", "steps", "defaultStep", "onStepChange", "currentStep", "hideProgressBars", "hideInactiveDescriptions", "stepClassName", "className", "translations"]);
|
|
2497
|
+
var _g = $458b0a5536c1a7cf$export$40bfa8c7b0832715(currentStepProp, defaultStep, onStepChange), currentStep = _g[0], setCurrentStep = _g[1];
|
|
2469
2498
|
var t = __assign(__assign({}, defaultTranslations$7), translations);
|
|
2470
2499
|
var steps = React.useMemo(function () {
|
|
2471
2500
|
if (typeof stepsProp === "number") {
|
|
@@ -2552,9 +2581,12 @@ var VerticalSteps = React.forwardRef(function (_a, ref) {
|
|
|
2552
2581
|
},
|
|
2553
2582
|
}, children: jsxRuntime.jsx("div", { className: "flex items-center justify-center", children: status === "complete" ? (jsxRuntime.jsx(IconComponent, { className: " text-[var(--active-fg-color)] font-bold", icon: "material-symbols:check-rounded", title: t.checkIconTitle })) : (jsxRuntime.jsx("span", { children: stepIdx + 1 })) }) }) }) }) }), jsxRuntime.jsx("div", { className: "flex-1 text-left", children: jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("div", { className: react.cn("text-medium text-default-600 font-medium transition-[color,opacity] duration-300 group-active:opacity-70", {
|
|
2554
2583
|
"text-default-300": status === "inactive",
|
|
2555
|
-
}), children: step.title }),
|
|
2584
|
+
}), children: step.title }), (!hideInactiveDescriptions ||
|
|
2585
|
+
status === "active") && (jsxRuntime.jsx("div", { className: react.cn("text-tiny text-default-600 lg:text-small transition-[color,opacity] duration-300 group-active:opacity-70", {
|
|
2556
2586
|
"text-default-300": status === "inactive",
|
|
2557
|
-
}), children: step.description })] }) })] }), stepIdx) }), stepIdx < steps.length - 1 && !hideProgressBars && (jsxRuntime.jsx("div", { "aria-hidden": "true", className: react.cn("pointer-events-none absolute top-[calc(64px*var(--idx)+1)] left-3 flex h-1/2 -translate-y-1/3 items-center px-4"
|
|
2587
|
+
}), children: step.description }))] }) })] }), stepIdx) }), stepIdx < steps.length - 1 && !hideProgressBars && (jsxRuntime.jsx("div", { "aria-hidden": "true", className: react.cn("pointer-events-none absolute top-[calc(64px*var(--idx)+1)] left-3 flex h-1/2 -translate-y-1/3 items-center px-4", {
|
|
2588
|
+
"h-1/4": stepIdx === currentStep,
|
|
2589
|
+
}), style: {
|
|
2558
2590
|
// @ts-ignore
|
|
2559
2591
|
"--idx": stepIdx,
|
|
2560
2592
|
}, children: jsxRuntime.jsx("div", { className: react.cn("relative h-full w-0.5 bg-[var(--inactive-bar-color)] transition-colors duration-300", "after:absolute after:block after:h-0 after:w-full after:bg-[var(--active-border-color)] after:transition-[height] after:duration-300 after:content-['']", {
|
|
@@ -2570,13 +2602,13 @@ var stepperClasses = react.cn(
|
|
|
2570
2602
|
// dark
|
|
2571
2603
|
"dark:[--step-color:rgba(255,255,255,0.1)]", "dark:[--active-color:hsl(var(--heroui-foreground-600))]", "dark:[--active-border-color:rgba(255,255,255,0.5)]", "dark:[--inactive-border-color:rgba(255,255,255,0.1)]", "dark:[--inactive-bar-color:rgba(255,255,255,0.1)]", "dark:[--inactive-color:rgba(255,255,255,0.2)]");
|
|
2572
2604
|
var MultiStepSidebar = React.forwardRef(function (_a, ref) {
|
|
2573
|
-
var children = _a.children, className = _a.className, currentPage = _a.currentPage; _a.onBack; _a.onNext; var onChangePage = _a.onChangePage, steps = _a.steps; _a.goBackTranslation; var onClose = _a.onClose, props = __rest(_a, ["children", "className", "currentPage", "onBack", "onNext", "onChangePage", "steps", "goBackTranslation", "onClose"]);
|
|
2605
|
+
var children = _a.children, className = _a.className, currentPage = _a.currentPage; _a.onBack; _a.onNext; var onChangePage = _a.onChangePage, steps = _a.steps; _a.goBackTranslation; var onClose = _a.onClose, _b = _a.hideInactiveDescriptions, hideInactiveDescriptions = _b === void 0 ? false : _b, props = __rest(_a, ["children", "className", "currentPage", "onBack", "onNext", "onChangePage", "steps", "goBackTranslation", "onClose", "hideInactiveDescriptions"]);
|
|
2574
2606
|
var handleOverlayClick = function (e) {
|
|
2575
2607
|
if (e.target === e.currentTarget) {
|
|
2576
2608
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
2577
2609
|
}
|
|
2578
2610
|
};
|
|
2579
|
-
return (jsxRuntime.jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-content3/50 backdrop-blur-sm", onClick: handleOverlayClick, children: jsxRuntime.jsxs("div", __assign({ ref: ref, className: react.cn("flex h-full w-full max-w-4xl rounded-lg bg-background shadow-lg lg:h-
|
|
2611
|
+
return (jsxRuntime.jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-content3/50 backdrop-blur-sm", onClick: handleOverlayClick, children: jsxRuntime.jsxs("div", __assign({ ref: ref, className: react.cn("flex h-full w-full max-w-4xl overflow-hidden rounded-lg bg-background shadow-lg lg:h-[85vh] lg:max-h-[85vh]", className) }, props, { children: [jsxRuntime.jsx("div", { className: react.cn("hidden h-full w-1/3 flex-col gap-y-8 overflow-y-auto p-8 md:flex [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", steps.length < 5 ? "justify-center" : "items-start"), children: jsxRuntime.jsx(VerticalSteps, { className: stepperClasses, color: "primary", currentStep: currentPage, steps: steps, onStepChange: onChangePage, hideInactiveDescriptions: hideInactiveDescriptions }) }), jsxRuntime.jsxs("div", { className: "relative flex h-full w-full flex-col items-center justify-between gap-4 md:p-4 lg:w-2/3", children: [jsxRuntime.jsx(Button, { isIconOnly: true, className: "absolute right-4 top-4", size: "sm", variant: "light", color: "default", onPress: onClose, startContent: jsxRuntime.jsx(IconComponent, { className: "text-foreground", icon: "material-symbols:close-rounded", size: "lg" }) }), jsxRuntime.jsx("div", { className: "pt-9 w-10/12 md:hidden", children: jsxRuntime.jsx("div", { className: "flex w-full justify-center", children: jsxRuntime.jsx(StepIndicator, { className: react.cn(stepperClasses), currentStep: currentPage + 1, totalSteps: steps.length }) }) }), jsxRuntime.jsx("div", { className: "flex flex-col h-full w-full justify-between p-4 sm:max-w-md md:max-w-lg overflow-y-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: children })] })] })) }));
|
|
2580
2612
|
});
|
|
2581
2613
|
MultiStepSidebar.displayName = "MultiStepSidebar";
|
|
2582
2614
|
|
|
@@ -2590,7 +2622,7 @@ var MultistepNavigationButtons = function (_a) {
|
|
|
2590
2622
|
};
|
|
2591
2623
|
|
|
2592
2624
|
var MultiStepWizard = function (_a) {
|
|
2593
|
-
var isOpen = _a.isOpen, steps = _a.steps, translations = _a.translations, onClose = _a.onClose, onComplete = _a.onComplete, completeButtonText = _a.completeButtonText;
|
|
2625
|
+
var isOpen = _a.isOpen, steps = _a.steps, translations = _a.translations, onClose = _a.onClose, onComplete = _a.onComplete, completeButtonText = _a.completeButtonText, hideInactiveDescriptions = _a.hideInactiveDescriptions;
|
|
2594
2626
|
var _b = React.useState(0), page = _b[0], setPage = _b[1];
|
|
2595
2627
|
React.useEffect(function () {
|
|
2596
2628
|
if (isOpen) {
|
|
@@ -2654,7 +2686,7 @@ var MultiStepWizard = function (_a) {
|
|
|
2654
2686
|
if (!isOpen) {
|
|
2655
2687
|
return null;
|
|
2656
2688
|
}
|
|
2657
|
-
return (jsxRuntime.jsxs(MultiStepSidebar, { currentPage: page, goBackTranslation: t.goBack, steps: steps, onBack: onBack, onChangePage: onChangePage, onClose: onClose, onNext: onNext, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(Button, { className: "w-fit text-default-600 mb-6", color: "default", variant: "light", onPress: onBack, isDisabled: page === 0, startContent: jsxRuntime.jsx(IconComponent, { className: "text-default-500", icon: "material-symbols:arrow-back-rounded", size: "sm" }), children: t.goBack || "Back" }), jsxRuntime.jsx("div", { className: "relative flex h-fit w-full flex-col text-center lg:justify-center lg:pt-0", children: content })] }), jsxRuntime.jsx(MultistepNavigationButtons, { backButtonProps: {
|
|
2689
|
+
return (jsxRuntime.jsxs(MultiStepSidebar, { currentPage: page, goBackTranslation: t.goBack, steps: steps, onBack: onBack, onChangePage: onChangePage, onClose: onClose, onNext: onNext, hideInactiveDescriptions: hideInactiveDescriptions, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(Button, { className: "w-fit text-default-600 mb-6", color: "default", variant: "light", onPress: onBack, isDisabled: page === 0, startContent: jsxRuntime.jsx(IconComponent, { className: "text-default-500", icon: "material-symbols:arrow-back-rounded", size: "sm" }), children: t.goBack || "Back" }), jsxRuntime.jsx("div", { className: "relative flex h-fit w-full flex-col text-center lg:justify-center lg:pt-0", children: content })] }), jsxRuntime.jsx(MultistepNavigationButtons, { backButtonProps: {
|
|
2658
2690
|
isDisabled: page === 0,
|
|
2659
2691
|
onPress: onBack,
|
|
2660
2692
|
children: t.goBack,
|
|
@@ -5693,6 +5725,47 @@ var InputPassword = function (_a) {
|
|
|
5693
5725
|
}) }) }))] }));
|
|
5694
5726
|
};
|
|
5695
5727
|
|
|
5728
|
+
var SimpleLineChart = function (_a) {
|
|
5729
|
+
var data = _a.data, title = _a.title, _b = _a.height, height = _b === void 0 ? 200 : _b, _c = _a.color, color = _c === void 0 ? "#3b82f6" : _c, _d = _a.className, className = _d === void 0 ? "" : _d, _e = _a.showTitle, showTitle = _e === void 0 ? true : _e, _f = _a.emptyMessage, emptyMessage = _f === void 0 ? "No hay datos disponibles" : _f, onPointClick = _a.onPointClick;
|
|
5730
|
+
if (data.length === 0) {
|
|
5731
|
+
return (jsxRuntime.jsxs("div", { className: className, children: [showTitle && title && (jsxRuntime.jsx(H3, { className: "text-base font-semibold text-gray-900 mb-4", children: title })), jsxRuntime.jsx("div", { className: "flex items-center justify-center h-48 text-gray-500", children: jsxRuntime.jsx(P, { children: emptyMessage }) })] }));
|
|
5732
|
+
}
|
|
5733
|
+
var dataMaxValue = Math.max.apply(Math, data.map(function (d) { return d.value; }));
|
|
5734
|
+
var minValue = 0;
|
|
5735
|
+
var maxValue = Math.ceil(dataMaxValue / 5) * 5 || 5;
|
|
5736
|
+
var padding = 40;
|
|
5737
|
+
var chartWidth = 600;
|
|
5738
|
+
var chartHeight = height;
|
|
5739
|
+
var innerWidth = chartWidth - padding * 2;
|
|
5740
|
+
var innerHeight = chartHeight - padding * 2;
|
|
5741
|
+
var range = maxValue - minValue || 1;
|
|
5742
|
+
var getX = function (index) {
|
|
5743
|
+
return padding + (index * innerWidth) / Math.max(data.length - 1, 1);
|
|
5744
|
+
};
|
|
5745
|
+
var getY = function (value) {
|
|
5746
|
+
return chartHeight - padding - ((value - minValue) / range) * innerHeight;
|
|
5747
|
+
};
|
|
5748
|
+
var points = data.map(function (item, index) { return "".concat(getX(index), ",").concat(getY(item.value)); }).join(" ");
|
|
5749
|
+
var lastX = data.length > 1 ? getX(data.length - 1) : padding + innerWidth;
|
|
5750
|
+
var areaPath = "M".concat(padding, ",").concat(chartHeight - padding, " L").concat(points.replace(/ /g, " L"), " L").concat(lastX, ",").concat(chartHeight - padding, " Z");
|
|
5751
|
+
return (jsxRuntime.jsxs("div", { className: className, children: [showTitle && title && (jsxRuntime.jsx(H3, { className: "text-base font-semibold text-gray-900 mb-4", children: title })), jsxRuntime.jsx("div", { className: "w-full", children: jsxRuntime.jsxs("svg", { width: "100%", height: chartHeight + 60, viewBox: "0 0 ".concat(chartWidth, " ").concat(chartHeight + 60), preserveAspectRatio: "xMidYMid meet", children: [jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("pattern", { id: "simple-line-chart-grid", width: "40", height: "40", patternUnits: "userSpaceOnUse", children: jsxRuntime.jsx("path", { d: "M 40 0 L 0 0 0 40", fill: "none", stroke: "#f3f4f6", strokeWidth: "1" }) }) }), jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: "url(#simple-line-chart-grid)" }), jsxRuntime.jsx("path", { d: areaPath, fill: color, fillOpacity: "0.1" }), jsxRuntime.jsx("polyline", { points: points, fill: "none", stroke: color, strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round" }), data.map(function (item, index) {
|
|
5752
|
+
var x = getX(index);
|
|
5753
|
+
var y = getY(item.value);
|
|
5754
|
+
return (jsxRuntime.jsxs("g", { children: [jsxRuntime.jsx("circle", { cx: x, cy: y, r: "4", fill: "white", stroke: color, strokeWidth: "2" }), jsxRuntime.jsx("circle", { cx: x, cy: y, r: "6", fill: "transparent", className: onPointClick
|
|
5755
|
+
? "cursor-pointer hover:fill-black hover:fill-opacity-10"
|
|
5756
|
+
: "hover:fill-black hover:fill-opacity-10", onClick: function () { return onPointClick === null || onPointClick === void 0 ? void 0 : onPointClick(index, item); }, onKeyDown: function (e) {
|
|
5757
|
+
if ((e.key === "Enter" || e.key === " ") && onPointClick) {
|
|
5758
|
+
e.preventDefault();
|
|
5759
|
+
onPointClick(index, item);
|
|
5760
|
+
}
|
|
5761
|
+
}, role: onPointClick ? "button" : undefined, tabIndex: onPointClick ? 0 : undefined, "aria-label": "".concat(item.label, ": ").concat(item.value), children: jsxRuntime.jsx("title", { children: "".concat(item.label, ": ").concat(item.value) }) })] }, index));
|
|
5762
|
+
}), data.map(function (item, index) { return (jsxRuntime.jsx("text", { x: getX(index), y: chartHeight + 20, textAnchor: "middle", className: "text-xs fill-gray-500", children: item.label }, index)); }), [0, 0.25, 0.5, 0.75, 1].map(function (ratio, index) {
|
|
5763
|
+
var y = chartHeight - padding - ratio * innerHeight;
|
|
5764
|
+
var value = Math.round(minValue + ratio * (maxValue - minValue));
|
|
5765
|
+
return (jsxRuntime.jsxs("g", { children: [jsxRuntime.jsx("line", { x1: padding, y1: y, x2: chartWidth - padding, y2: y, stroke: "#e5e7eb", strokeWidth: "1", strokeDasharray: "2,2" }), jsxRuntime.jsx("text", { x: padding - 10, y: y + 4, textAnchor: "end", className: "text-xs fill-gray-500", children: value })] }, index));
|
|
5766
|
+
})] }) })] }));
|
|
5767
|
+
};
|
|
5768
|
+
|
|
5696
5769
|
var DEFAULT_TRANSLATIONS = {
|
|
5697
5770
|
placeholder: "Nombre de la etiqueta",
|
|
5698
5771
|
labelSelect: "Selecciona etiqueta",
|
|
@@ -6164,6 +6237,7 @@ Object.defineProperty(exports, "loadIcons", {
|
|
|
6164
6237
|
exports.AccordionList = AccordionList;
|
|
6165
6238
|
exports.AddHolidayForm = AddHolidayForm;
|
|
6166
6239
|
exports.AnalyticsCard = AnalyticsCard;
|
|
6240
|
+
exports.AreaLineChart = AreaLineChart;
|
|
6167
6241
|
exports.AuraAutocomplete = AuraAutocomplete;
|
|
6168
6242
|
exports.AuraTable = AuraTable;
|
|
6169
6243
|
exports.AuraToastProvider = AuraToastProvider;
|
|
@@ -6211,6 +6285,7 @@ exports.RowSteps = RowSteps;
|
|
|
6211
6285
|
exports.ScheduleRow = ScheduleRow;
|
|
6212
6286
|
exports.SearchInput = SearchInput;
|
|
6213
6287
|
exports.Select = Select;
|
|
6288
|
+
exports.SimpleLineChart = SimpleLineChart;
|
|
6214
6289
|
exports.SocialMediaBar = SocialMediaBar;
|
|
6215
6290
|
exports.SocialMediaCarousel = SocialMediaCarousel;
|
|
6216
6291
|
exports.SocialMediaPreview = SocialMediaPreview;
|
package/dist/index.esm.js
CHANGED
|
@@ -5,7 +5,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
5
5
|
import { Icon } from '@iconify/react';
|
|
6
6
|
export { loadIcons } from '@iconify/react';
|
|
7
7
|
import React, { useId, useState, useCallback, useMemo, useEffect, createContext, useContext, memo, useRef, createElement, useLayoutEffect } from 'react';
|
|
8
|
-
import { ResponsiveContainer, AreaChart, CartesianGrid, XAxis, Tooltip, Area } from 'recharts';
|
|
8
|
+
import { ResponsiveContainer, AreaChart, CartesianGrid, XAxis, Tooltip, Area, LineChart, YAxis, Line } from 'recharts';
|
|
9
9
|
import { LazyMotion, domAnimation, m, motion, AnimatePresence } from 'framer-motion';
|
|
10
10
|
import { createPortal } from 'react-dom';
|
|
11
11
|
import { useTheme } from '@heroui/use-theme';
|
|
@@ -561,6 +561,40 @@ var AnalyticsCard = function (_a) {
|
|
|
561
561
|
}, variant: "bordered", onAction: function (key) { return handleMenuAction(String(key)); }, children: [jsx(DropdownItem, { children: t.viewDetails }, "view-details"), jsx(DropdownItem, { children: t.exportData }, "export-data"), jsx(DropdownItem, { children: t.setAlert }, "set-alert")] })] }))] }) })));
|
|
562
562
|
};
|
|
563
563
|
|
|
564
|
+
var H3 = function (_a) {
|
|
565
|
+
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
566
|
+
return (jsx("h3", __assign({ className: cn("text-base font-medium", className) }, props, { children: children })));
|
|
567
|
+
};
|
|
568
|
+
|
|
569
|
+
function ChartTooltip(_a) {
|
|
570
|
+
var active = _a.active, payload = _a.payload, label = _a.label, series = _a.series, formatValue = _a.formatValue;
|
|
571
|
+
if (!active || !(payload === null || payload === void 0 ? void 0 : payload.length))
|
|
572
|
+
return null;
|
|
573
|
+
var format = function (value, dataKey) {
|
|
574
|
+
return formatValue ? formatValue(value, dataKey) : String(value);
|
|
575
|
+
};
|
|
576
|
+
return (jsxs("div", { className: "bg-gray-900 text-white px-3 py-2 rounded-lg text-sm shadow-lg", children: [label != null && (jsx(P, { className: "text-xs text-gray-300 mb-1", children: String(label) })), payload.map(function (entry, index) {
|
|
577
|
+
var _a;
|
|
578
|
+
var config = series.find(function (s) { return s.dataKey === entry.dataKey; });
|
|
579
|
+
var labelText = (_a = config === null || config === void 0 ? void 0 : config.label) !== null && _a !== void 0 ? _a : entry.dataKey;
|
|
580
|
+
return (jsxs(P, { className: "font-semibold", style: { color: entry.color }, children: [labelText, ": ", format(Number(entry.value), entry.dataKey)] }, index));
|
|
581
|
+
})] }));
|
|
582
|
+
}
|
|
583
|
+
function AreaLineChart(_a) {
|
|
584
|
+
var data = _a.data, xAxisKey = _a.xAxisKey, series = _a.series, title = _a.title, value = _a.value, trend = _a.trend, _b = _a.height, height = _b === void 0 ? 200 : _b, _c = _a.className, className = _c === void 0 ? "" : _c, _d = _a.wrappedInCard, wrappedInCard = _d === void 0 ? false : _d, formatTooltipValue = _a.formatTooltipValue;
|
|
585
|
+
var hasHeader = title != null || value != null || trend != null || series.length > 0;
|
|
586
|
+
var content = (jsxs(Fragment, { children: [hasHeader && (jsxs("div", { className: "flex items-start justify-between mb-6", children: [jsxs("div", { children: [title != null && (jsx(H3, { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-1", children: title })), value != null && (jsxs("div", { className: "flex items-baseline gap-2", children: [jsx("span", { className: "text-2xl font-bold text-gray-900", children: value }), trend != null && (jsx("span", { className: "text-xs font-medium text-yellow-600 bg-yellow-50 px-2 py-1 rounded", children: trend }))] }))] }), series.length > 0 && (jsx("div", { className: "flex items-center gap-4", children: series.map(function (s) { return (jsxs("div", { className: "flex items-center gap-2", children: [jsx("svg", { width: "16", height: "2", viewBox: "0 0 16 2", fill: "none", children: jsx("line", { x1: "0", y1: "1", x2: "16", y2: "1", stroke: s.color, strokeWidth: "2" }) }), jsx("span", { className: "text-xs text-gray-600 font-medium", children: s.label })] }, s.dataKey)); }) }))] })), jsx("div", { className: "w-full", style: { height: "".concat(height, "px") }, children: jsx(ResponsiveContainer, { width: "100%", height: "100%", children: jsxs(LineChart, { data: data, margin: { top: 5, right: 5, left: 5, bottom: 5 }, children: [jsx("defs", { children: series.map(function (s) { return (jsxs("linearGradient", { id: "area-line-chart-".concat(s.dataKey), x1: "0", y1: "0", x2: "0", y2: "1", children: [jsx("stop", { offset: "0%", stopColor: s.color, stopOpacity: 0.3 }), jsx("stop", { offset: "50%", stopColor: s.color, stopOpacity: 0.15 }), jsx("stop", { offset: "100%", stopColor: s.color, stopOpacity: 0 })] }, s.dataKey)); }) }), jsx(XAxis, { dataKey: xAxisKey, axisLine: false, tickLine: false, tick: { fill: "#9ca3af", fontSize: 12 }, dy: 10 }), jsx(YAxis, { axisLine: false, tickLine: false, tick: { fill: "transparent", fontSize: 0 }, width: 0, tickCount: 6, domain: [0, "dataMax + 100"], allowDecimals: false }), jsx(CartesianGrid, { strokeDasharray: "3 3", stroke: "#d1d5db", strokeOpacity: 0.5, vertical: false, horizontal: true }), jsx(Tooltip, { content: jsx(ChartTooltip, { series: series, formatValue: formatTooltipValue }) }), series.map(function (s) { return (jsx(Area, { type: "natural", dataKey: s.dataKey, stroke: "none", fill: "url(#area-line-chart-".concat(s.dataKey, ")"), animationDuration: 1500, animationEasing: "ease-in-out" }, "area-".concat(s.dataKey))); }), series.map(function (s) { return (jsx(Line, { type: "natural", dataKey: s.dataKey, name: s.dataKey, stroke: s.color, strokeWidth: 3, dot: false, activeDot: {
|
|
587
|
+
r: 6,
|
|
588
|
+
fill: s.color,
|
|
589
|
+
stroke: "#fff",
|
|
590
|
+
strokeWidth: 2,
|
|
591
|
+
}, fill: "transparent", animationDuration: 1500, animationEasing: "ease-in-out" }, "line-".concat(s.dataKey))); })] }) }) })] }));
|
|
592
|
+
if (wrappedInCard) {
|
|
593
|
+
return (jsx(Card$1, { className: "p-6 shadow-sm border border-gray-200 ".concat(className), children: content }));
|
|
594
|
+
}
|
|
595
|
+
return jsx("div", { className: className, children: content });
|
|
596
|
+
}
|
|
597
|
+
|
|
564
598
|
/** Clases del wrapper del icono: margen derecho y alineación igual para lupa e iconos custom */
|
|
565
599
|
var ICON_WRAPPER_CLASSNAME = "mr-2 flex shrink-0 items-center [&_svg]:shrink-0";
|
|
566
600
|
var DEFAULT_ICON = (jsx(IconComponent, { icon: "solar:magnifer-outline", className: "text-default-400 pointer-events-none shrink-0", size: "sm", "aria-hidden": true }));
|
|
@@ -1640,11 +1674,6 @@ var H1 = function (_a) {
|
|
|
1640
1674
|
return (jsx("h1", __assign({ className: cn("text-xl font-bold", className) }, props, { children: children })));
|
|
1641
1675
|
};
|
|
1642
1676
|
|
|
1643
|
-
var H3 = function (_a) {
|
|
1644
|
-
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
1645
|
-
return (jsx("h3", __assign({ className: cn("text-base font-medium", className) }, props, { children: children })));
|
|
1646
|
-
};
|
|
1647
|
-
|
|
1648
1677
|
var H4 = function (_a) {
|
|
1649
1678
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
1650
1679
|
return (jsx("h4", __assign({ className: cn("text-sm font-medium ", className) }, props, { children: children })));
|
|
@@ -2465,8 +2494,8 @@ var defaultTranslations$7 = {
|
|
|
2465
2494
|
checkIconTitle: "Check",
|
|
2466
2495
|
};
|
|
2467
2496
|
var VerticalSteps = React.forwardRef(function (_a, ref) {
|
|
2468
|
-
var _b = _a.color, color = _b === void 0 ? "primary" : _b, _c = _a.steps, stepsProp = _c === void 0 ? [] : _c, _d = _a.defaultStep, defaultStep = _d === void 0 ? 0 : _d, onStepChange = _a.onStepChange, currentStepProp = _a.currentStep, _e = _a.hideProgressBars, hideProgressBars = _e === void 0 ? false : _e, stepClassName = _a.stepClassName, className = _a.className, translations = _a.translations, props = __rest(_a, ["color", "steps", "defaultStep", "onStepChange", "currentStep", "hideProgressBars", "stepClassName", "className", "translations"]);
|
|
2469
|
-
var
|
|
2497
|
+
var _b = _a.color, color = _b === void 0 ? "primary" : _b, _c = _a.steps, stepsProp = _c === void 0 ? [] : _c, _d = _a.defaultStep, defaultStep = _d === void 0 ? 0 : _d, onStepChange = _a.onStepChange, currentStepProp = _a.currentStep, _e = _a.hideProgressBars, hideProgressBars = _e === void 0 ? false : _e, _f = _a.hideInactiveDescriptions, hideInactiveDescriptions = _f === void 0 ? false : _f, stepClassName = _a.stepClassName, className = _a.className, translations = _a.translations, props = __rest(_a, ["color", "steps", "defaultStep", "onStepChange", "currentStep", "hideProgressBars", "hideInactiveDescriptions", "stepClassName", "className", "translations"]);
|
|
2498
|
+
var _g = $458b0a5536c1a7cf$export$40bfa8c7b0832715(currentStepProp, defaultStep, onStepChange), currentStep = _g[0], setCurrentStep = _g[1];
|
|
2470
2499
|
var t = __assign(__assign({}, defaultTranslations$7), translations);
|
|
2471
2500
|
var steps = React.useMemo(function () {
|
|
2472
2501
|
if (typeof stepsProp === "number") {
|
|
@@ -2553,9 +2582,12 @@ var VerticalSteps = React.forwardRef(function (_a, ref) {
|
|
|
2553
2582
|
},
|
|
2554
2583
|
}, children: jsx("div", { className: "flex items-center justify-center", children: status === "complete" ? (jsx(IconComponent, { className: " text-[var(--active-fg-color)] font-bold", icon: "material-symbols:check-rounded", title: t.checkIconTitle })) : (jsx("span", { children: stepIdx + 1 })) }) }) }) }) }), jsx("div", { className: "flex-1 text-left", children: jsxs("div", { children: [jsx("div", { className: cn("text-medium text-default-600 font-medium transition-[color,opacity] duration-300 group-active:opacity-70", {
|
|
2555
2584
|
"text-default-300": status === "inactive",
|
|
2556
|
-
}), children: step.title }),
|
|
2585
|
+
}), children: step.title }), (!hideInactiveDescriptions ||
|
|
2586
|
+
status === "active") && (jsx("div", { className: cn("text-tiny text-default-600 lg:text-small transition-[color,opacity] duration-300 group-active:opacity-70", {
|
|
2557
2587
|
"text-default-300": status === "inactive",
|
|
2558
|
-
}), children: step.description })] }) })] }), stepIdx) }), stepIdx < steps.length - 1 && !hideProgressBars && (jsx("div", { "aria-hidden": "true", className: cn("pointer-events-none absolute top-[calc(64px*var(--idx)+1)] left-3 flex h-1/2 -translate-y-1/3 items-center px-4"
|
|
2588
|
+
}), children: step.description }))] }) })] }), stepIdx) }), stepIdx < steps.length - 1 && !hideProgressBars && (jsx("div", { "aria-hidden": "true", className: cn("pointer-events-none absolute top-[calc(64px*var(--idx)+1)] left-3 flex h-1/2 -translate-y-1/3 items-center px-4", {
|
|
2589
|
+
"h-1/4": stepIdx === currentStep,
|
|
2590
|
+
}), style: {
|
|
2559
2591
|
// @ts-ignore
|
|
2560
2592
|
"--idx": stepIdx,
|
|
2561
2593
|
}, children: jsx("div", { className: cn("relative h-full w-0.5 bg-[var(--inactive-bar-color)] transition-colors duration-300", "after:absolute after:block after:h-0 after:w-full after:bg-[var(--active-border-color)] after:transition-[height] after:duration-300 after:content-['']", {
|
|
@@ -2571,13 +2603,13 @@ var stepperClasses = cn(
|
|
|
2571
2603
|
// dark
|
|
2572
2604
|
"dark:[--step-color:rgba(255,255,255,0.1)]", "dark:[--active-color:hsl(var(--heroui-foreground-600))]", "dark:[--active-border-color:rgba(255,255,255,0.5)]", "dark:[--inactive-border-color:rgba(255,255,255,0.1)]", "dark:[--inactive-bar-color:rgba(255,255,255,0.1)]", "dark:[--inactive-color:rgba(255,255,255,0.2)]");
|
|
2573
2605
|
var MultiStepSidebar = React.forwardRef(function (_a, ref) {
|
|
2574
|
-
var children = _a.children, className = _a.className, currentPage = _a.currentPage; _a.onBack; _a.onNext; var onChangePage = _a.onChangePage, steps = _a.steps; _a.goBackTranslation; var onClose = _a.onClose, props = __rest(_a, ["children", "className", "currentPage", "onBack", "onNext", "onChangePage", "steps", "goBackTranslation", "onClose"]);
|
|
2606
|
+
var children = _a.children, className = _a.className, currentPage = _a.currentPage; _a.onBack; _a.onNext; var onChangePage = _a.onChangePage, steps = _a.steps; _a.goBackTranslation; var onClose = _a.onClose, _b = _a.hideInactiveDescriptions, hideInactiveDescriptions = _b === void 0 ? false : _b, props = __rest(_a, ["children", "className", "currentPage", "onBack", "onNext", "onChangePage", "steps", "goBackTranslation", "onClose", "hideInactiveDescriptions"]);
|
|
2575
2607
|
var handleOverlayClick = function (e) {
|
|
2576
2608
|
if (e.target === e.currentTarget) {
|
|
2577
2609
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
2578
2610
|
}
|
|
2579
2611
|
};
|
|
2580
|
-
return (jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-content3/50 backdrop-blur-sm", onClick: handleOverlayClick, children: jsxs("div", __assign({ ref: ref, className: cn("flex h-full w-full max-w-4xl rounded-lg bg-background shadow-lg lg:h-
|
|
2612
|
+
return (jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-content3/50 backdrop-blur-sm", onClick: handleOverlayClick, children: jsxs("div", __assign({ ref: ref, className: cn("flex h-full w-full max-w-4xl overflow-hidden rounded-lg bg-background shadow-lg lg:h-[85vh] lg:max-h-[85vh]", className) }, props, { children: [jsx("div", { className: cn("hidden h-full w-1/3 flex-col gap-y-8 overflow-y-auto p-8 md:flex [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", steps.length < 5 ? "justify-center" : "items-start"), children: jsx(VerticalSteps, { className: stepperClasses, color: "primary", currentStep: currentPage, steps: steps, onStepChange: onChangePage, hideInactiveDescriptions: hideInactiveDescriptions }) }), jsxs("div", { className: "relative flex h-full w-full flex-col items-center justify-between gap-4 md:p-4 lg:w-2/3", children: [jsx(Button, { isIconOnly: true, className: "absolute right-4 top-4", size: "sm", variant: "light", color: "default", onPress: onClose, startContent: jsx(IconComponent, { className: "text-foreground", icon: "material-symbols:close-rounded", size: "lg" }) }), jsx("div", { className: "pt-9 w-10/12 md:hidden", children: jsx("div", { className: "flex w-full justify-center", children: jsx(StepIndicator, { className: cn(stepperClasses), currentStep: currentPage + 1, totalSteps: steps.length }) }) }), jsx("div", { className: "flex flex-col h-full w-full justify-between p-4 sm:max-w-md md:max-w-lg overflow-y-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: children })] })] })) }));
|
|
2581
2613
|
});
|
|
2582
2614
|
MultiStepSidebar.displayName = "MultiStepSidebar";
|
|
2583
2615
|
|
|
@@ -2591,7 +2623,7 @@ var MultistepNavigationButtons = function (_a) {
|
|
|
2591
2623
|
};
|
|
2592
2624
|
|
|
2593
2625
|
var MultiStepWizard = function (_a) {
|
|
2594
|
-
var isOpen = _a.isOpen, steps = _a.steps, translations = _a.translations, onClose = _a.onClose, onComplete = _a.onComplete, completeButtonText = _a.completeButtonText;
|
|
2626
|
+
var isOpen = _a.isOpen, steps = _a.steps, translations = _a.translations, onClose = _a.onClose, onComplete = _a.onComplete, completeButtonText = _a.completeButtonText, hideInactiveDescriptions = _a.hideInactiveDescriptions;
|
|
2595
2627
|
var _b = React.useState(0), page = _b[0], setPage = _b[1];
|
|
2596
2628
|
React.useEffect(function () {
|
|
2597
2629
|
if (isOpen) {
|
|
@@ -2655,7 +2687,7 @@ var MultiStepWizard = function (_a) {
|
|
|
2655
2687
|
if (!isOpen) {
|
|
2656
2688
|
return null;
|
|
2657
2689
|
}
|
|
2658
|
-
return (jsxs(MultiStepSidebar, { currentPage: page, goBackTranslation: t.goBack, steps: steps, onBack: onBack, onChangePage: onChangePage, onClose: onClose, onNext: onNext, children: [jsxs("div", { children: [jsx(Button, { className: "w-fit text-default-600 mb-6", color: "default", variant: "light", onPress: onBack, isDisabled: page === 0, startContent: jsx(IconComponent, { className: "text-default-500", icon: "material-symbols:arrow-back-rounded", size: "sm" }), children: t.goBack || "Back" }), jsx("div", { className: "relative flex h-fit w-full flex-col text-center lg:justify-center lg:pt-0", children: content })] }), jsx(MultistepNavigationButtons, { backButtonProps: {
|
|
2690
|
+
return (jsxs(MultiStepSidebar, { currentPage: page, goBackTranslation: t.goBack, steps: steps, onBack: onBack, onChangePage: onChangePage, onClose: onClose, onNext: onNext, hideInactiveDescriptions: hideInactiveDescriptions, children: [jsxs("div", { children: [jsx(Button, { className: "w-fit text-default-600 mb-6", color: "default", variant: "light", onPress: onBack, isDisabled: page === 0, startContent: jsx(IconComponent, { className: "text-default-500", icon: "material-symbols:arrow-back-rounded", size: "sm" }), children: t.goBack || "Back" }), jsx("div", { className: "relative flex h-fit w-full flex-col text-center lg:justify-center lg:pt-0", children: content })] }), jsx(MultistepNavigationButtons, { backButtonProps: {
|
|
2659
2691
|
isDisabled: page === 0,
|
|
2660
2692
|
onPress: onBack,
|
|
2661
2693
|
children: t.goBack,
|
|
@@ -5694,6 +5726,47 @@ var InputPassword = function (_a) {
|
|
|
5694
5726
|
}) }) }))] }));
|
|
5695
5727
|
};
|
|
5696
5728
|
|
|
5729
|
+
var SimpleLineChart = function (_a) {
|
|
5730
|
+
var data = _a.data, title = _a.title, _b = _a.height, height = _b === void 0 ? 200 : _b, _c = _a.color, color = _c === void 0 ? "#3b82f6" : _c, _d = _a.className, className = _d === void 0 ? "" : _d, _e = _a.showTitle, showTitle = _e === void 0 ? true : _e, _f = _a.emptyMessage, emptyMessage = _f === void 0 ? "No hay datos disponibles" : _f, onPointClick = _a.onPointClick;
|
|
5731
|
+
if (data.length === 0) {
|
|
5732
|
+
return (jsxs("div", { className: className, children: [showTitle && title && (jsx(H3, { className: "text-base font-semibold text-gray-900 mb-4", children: title })), jsx("div", { className: "flex items-center justify-center h-48 text-gray-500", children: jsx(P, { children: emptyMessage }) })] }));
|
|
5733
|
+
}
|
|
5734
|
+
var dataMaxValue = Math.max.apply(Math, data.map(function (d) { return d.value; }));
|
|
5735
|
+
var minValue = 0;
|
|
5736
|
+
var maxValue = Math.ceil(dataMaxValue / 5) * 5 || 5;
|
|
5737
|
+
var padding = 40;
|
|
5738
|
+
var chartWidth = 600;
|
|
5739
|
+
var chartHeight = height;
|
|
5740
|
+
var innerWidth = chartWidth - padding * 2;
|
|
5741
|
+
var innerHeight = chartHeight - padding * 2;
|
|
5742
|
+
var range = maxValue - minValue || 1;
|
|
5743
|
+
var getX = function (index) {
|
|
5744
|
+
return padding + (index * innerWidth) / Math.max(data.length - 1, 1);
|
|
5745
|
+
};
|
|
5746
|
+
var getY = function (value) {
|
|
5747
|
+
return chartHeight - padding - ((value - minValue) / range) * innerHeight;
|
|
5748
|
+
};
|
|
5749
|
+
var points = data.map(function (item, index) { return "".concat(getX(index), ",").concat(getY(item.value)); }).join(" ");
|
|
5750
|
+
var lastX = data.length > 1 ? getX(data.length - 1) : padding + innerWidth;
|
|
5751
|
+
var areaPath = "M".concat(padding, ",").concat(chartHeight - padding, " L").concat(points.replace(/ /g, " L"), " L").concat(lastX, ",").concat(chartHeight - padding, " Z");
|
|
5752
|
+
return (jsxs("div", { className: className, children: [showTitle && title && (jsx(H3, { className: "text-base font-semibold text-gray-900 mb-4", children: title })), jsx("div", { className: "w-full", children: jsxs("svg", { width: "100%", height: chartHeight + 60, viewBox: "0 0 ".concat(chartWidth, " ").concat(chartHeight + 60), preserveAspectRatio: "xMidYMid meet", children: [jsx("defs", { children: jsx("pattern", { id: "simple-line-chart-grid", width: "40", height: "40", patternUnits: "userSpaceOnUse", children: jsx("path", { d: "M 40 0 L 0 0 0 40", fill: "none", stroke: "#f3f4f6", strokeWidth: "1" }) }) }), jsx("rect", { width: "100%", height: "100%", fill: "url(#simple-line-chart-grid)" }), jsx("path", { d: areaPath, fill: color, fillOpacity: "0.1" }), jsx("polyline", { points: points, fill: "none", stroke: color, strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round" }), data.map(function (item, index) {
|
|
5753
|
+
var x = getX(index);
|
|
5754
|
+
var y = getY(item.value);
|
|
5755
|
+
return (jsxs("g", { children: [jsx("circle", { cx: x, cy: y, r: "4", fill: "white", stroke: color, strokeWidth: "2" }), jsx("circle", { cx: x, cy: y, r: "6", fill: "transparent", className: onPointClick
|
|
5756
|
+
? "cursor-pointer hover:fill-black hover:fill-opacity-10"
|
|
5757
|
+
: "hover:fill-black hover:fill-opacity-10", onClick: function () { return onPointClick === null || onPointClick === void 0 ? void 0 : onPointClick(index, item); }, onKeyDown: function (e) {
|
|
5758
|
+
if ((e.key === "Enter" || e.key === " ") && onPointClick) {
|
|
5759
|
+
e.preventDefault();
|
|
5760
|
+
onPointClick(index, item);
|
|
5761
|
+
}
|
|
5762
|
+
}, role: onPointClick ? "button" : undefined, tabIndex: onPointClick ? 0 : undefined, "aria-label": "".concat(item.label, ": ").concat(item.value), children: jsx("title", { children: "".concat(item.label, ": ").concat(item.value) }) })] }, index));
|
|
5763
|
+
}), data.map(function (item, index) { return (jsx("text", { x: getX(index), y: chartHeight + 20, textAnchor: "middle", className: "text-xs fill-gray-500", children: item.label }, index)); }), [0, 0.25, 0.5, 0.75, 1].map(function (ratio, index) {
|
|
5764
|
+
var y = chartHeight - padding - ratio * innerHeight;
|
|
5765
|
+
var value = Math.round(minValue + ratio * (maxValue - minValue));
|
|
5766
|
+
return (jsxs("g", { children: [jsx("line", { x1: padding, y1: y, x2: chartWidth - padding, y2: y, stroke: "#e5e7eb", strokeWidth: "1", strokeDasharray: "2,2" }), jsx("text", { x: padding - 10, y: y + 4, textAnchor: "end", className: "text-xs fill-gray-500", children: value })] }, index));
|
|
5767
|
+
})] }) })] }));
|
|
5768
|
+
};
|
|
5769
|
+
|
|
5697
5770
|
var DEFAULT_TRANSLATIONS = {
|
|
5698
5771
|
placeholder: "Nombre de la etiqueta",
|
|
5699
5772
|
labelSelect: "Selecciona etiqueta",
|
|
@@ -6154,4 +6227,4 @@ var NavigationLoadingProvider = function (_a) {
|
|
|
6154
6227
|
return (jsxs(NavigationLoadingContext.Provider, { value: value, children: [children, jsx(NavigationLoadingOverlay, { isVisible: isVisible })] }));
|
|
6155
6228
|
};
|
|
6156
6229
|
|
|
6157
|
-
export { AccordionList, AddHolidayForm, AnalyticsCard, AuraAutocomplete, AuraTable, AuraToastProvider, BreadcrumbsComponent, Button, Card, Chip, ColorPicker, ColorSelector, ContentCarousel, DEFAULT_PREDEFINED_COLORS, DatePicker, DateRangePicker, DateSelector, DrawerFilters, EnumMenuNavListItem, GlobalToast, H1, H2, H3, H4, HeaderComponent, HolidayType, IconComponent, ImagePreview, Input, InputPassword, Kanban, KanbanCard, KanbanColumn, MenuComponent, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, MultiStepWizard, NavigationLoadingContext, NavigationLoadingOverlay, NavigationLoadingProvider, P, Pagination, Phone, PromotionalBanner, RangeFilter, RowSteps, ScheduleRow, SearchInput, Select, SocialMediaBar, SocialMediaCarousel, SocialMediaPreview, StepIndicator, Switch as SwitchComponent, THEME_COLOR_HEX_MAP, TagsFilter, Textarea, ThemeContext, ThemePicker, ThemeProvider, TimeInput as TimeInputComponent, ToastContext, TwoColumnLayoutAgent, UploadFile, VerticalSteps, WhatsAppPreview, Wizard, WizardNavigation, WizardSidebar, applyCustomPrimaryColor, defaultTranslations$4 as defaultTranslations, generateThemeColorScale, getContrastForeground, getSelectedKeyFromPath, hexToThemeColor, hslToCssValue, isExactThemeColor, isHexColor, removeCustomPrimaryColor, sizeMap, themeColors, useAuraToast, useMediaQuery, useNavigationLoading, useThemeContext };
|
|
6230
|
+
export { AccordionList, AddHolidayForm, AnalyticsCard, AreaLineChart, AuraAutocomplete, AuraTable, AuraToastProvider, BreadcrumbsComponent, Button, Card, Chip, ColorPicker, ColorSelector, ContentCarousel, DEFAULT_PREDEFINED_COLORS, DatePicker, DateRangePicker, DateSelector, DrawerFilters, EnumMenuNavListItem, GlobalToast, H1, H2, H3, H4, HeaderComponent, HolidayType, IconComponent, ImagePreview, Input, InputPassword, Kanban, KanbanCard, KanbanColumn, MenuComponent, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, MultiStepWizard, NavigationLoadingContext, NavigationLoadingOverlay, NavigationLoadingProvider, P, Pagination, Phone, PromotionalBanner, RangeFilter, RowSteps, ScheduleRow, SearchInput, Select, SimpleLineChart, SocialMediaBar, SocialMediaCarousel, SocialMediaPreview, StepIndicator, Switch as SwitchComponent, THEME_COLOR_HEX_MAP, TagsFilter, Textarea, ThemeContext, ThemePicker, ThemeProvider, TimeInput as TimeInputComponent, ToastContext, TwoColumnLayoutAgent, UploadFile, VerticalSteps, WhatsAppPreview, Wizard, WizardNavigation, WizardSidebar, applyCustomPrimaryColor, defaultTranslations$4 as defaultTranslations, generateThemeColorScale, getContrastForeground, getSelectedKeyFromPath, hexToThemeColor, hslToCssValue, isExactThemeColor, isHexColor, removeCustomPrimaryColor, sizeMap, themeColors, useAuraToast, useMediaQuery, useNavigationLoading, useThemeContext };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { AreaLineChartProps } from "./AreaLineChart.types";
|
|
2
|
+
export declare function AreaLineChart<T extends Record<string, unknown>>({ data, xAxisKey, series, title, value, trend, height, className, wrappedInCard, formatTooltipValue, }: AreaLineChartProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=AreaLineChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AreaLineChart.d.ts","sourceRoot":"","sources":["../../../../src/components/area-line-chart/AreaLineChart.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,kBAAkB,EAA6B,MAAM,uBAAuB,CAAC;AAgC3F,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAChE,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,KAAK,EACL,KAAK,EACL,KAAK,EACL,MAAY,EACZ,SAAc,EACd,aAAqB,EACrB,kBAAkB,GAClB,EAAE,kBAAkB,CAAC,CAAC,CAAC,2CA+IvB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Configuración de cada serie (línea/área) del gráfico */
|
|
2
|
+
export interface AreaLineChartSeriesConfig {
|
|
3
|
+
/** Clave del dato en cada item de `data` (ej. "email", "whatsapp") */
|
|
4
|
+
dataKey: string;
|
|
5
|
+
/** Color de la línea/área (hex o nombre CSS) */
|
|
6
|
+
color: string;
|
|
7
|
+
/** Etiqueta para leyenda y tooltip */
|
|
8
|
+
label: string;
|
|
9
|
+
}
|
|
10
|
+
export interface AreaLineChartProps<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
11
|
+
/** Datos: array de objetos con la clave del eje X y las claves de cada serie */
|
|
12
|
+
data: T[];
|
|
13
|
+
/** Clave que se usa para el eje X (ej. "name", "date") */
|
|
14
|
+
xAxisKey: keyof T & string;
|
|
15
|
+
/** Configuración de cada serie a pintar */
|
|
16
|
+
series: AreaLineChartSeriesConfig[];
|
|
17
|
+
/** Título del gráfico */
|
|
18
|
+
title?: string;
|
|
19
|
+
/** Valor destacado (ej. total) */
|
|
20
|
+
value?: string;
|
|
21
|
+
/** Texto de tendencia (ej. "+12%") */
|
|
22
|
+
trend?: string;
|
|
23
|
+
/** Altura del gráfico en px */
|
|
24
|
+
height?: number;
|
|
25
|
+
className?: string;
|
|
26
|
+
/** Si se muestra dentro de un Card con padding. Por defecto false = solo el gráfico */
|
|
27
|
+
wrappedInCard?: boolean;
|
|
28
|
+
/** Formatear valor en tooltip (valor, dataKey) */
|
|
29
|
+
formatTooltipValue?: (value: number, dataKey: string) => string;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=AreaLineChart.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AreaLineChart.types.d.ts","sourceRoot":"","sources":["../../../../src/components/area-line-chart/AreaLineChart.types.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,MAAM,WAAW,yBAAyB;IACzC,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC9F,gFAAgF;IAChF,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC;IAC3B,2CAA2C;IAC3C,MAAM,EAAE,yBAAyB,EAAE,CAAC;IACpC,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kDAAkD;IAClD,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CAChE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/area-line-chart/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,YAAY,EACX,kBAAkB,EAClB,yBAAyB,GACzB,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { MultiStepWizardProps } from "./MultiStepWizard.types";
|
|
2
|
-
export declare const MultiStepWizard: ({ isOpen, steps, translations, onClose, onComplete, completeButtonText, }: MultiStepWizardProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
2
|
+
export declare const MultiStepWizard: ({ isOpen, steps, translations, onClose, onComplete, completeButtonText, hideInactiveDescriptions, }: MultiStepWizardProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
3
3
|
//# sourceMappingURL=MultiStepWizard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiStepWizard.d.ts","sourceRoot":"","sources":["../../../../src/components/multi-step-wizard/MultiStepWizard.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAIpE,eAAO,MAAM,eAAe,GAAI,
|
|
1
|
+
{"version":3,"file":"MultiStepWizard.d.ts","sourceRoot":"","sources":["../../../../src/components/multi-step-wizard/MultiStepWizard.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAIpE,eAAO,MAAM,eAAe,GAAI,qGAQ7B,oBAAoB,mDA4ItB,CAAC"}
|
|
@@ -15,6 +15,8 @@ export interface MultiStepWizardProps {
|
|
|
15
15
|
onComplete?: () => void;
|
|
16
16
|
/** Texto del botón en el último paso */
|
|
17
17
|
completeButtonText?: string;
|
|
18
|
+
/** Oculta las descripciones de los pasos no activos en el sidebar */
|
|
19
|
+
hideInactiveDescriptions?: boolean;
|
|
18
20
|
}
|
|
19
21
|
export interface MultiStepWizardTranslations {
|
|
20
22
|
continue?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiStepWizard.types.d.ts","sourceRoot":"","sources":["../../../../src/components/multi-step-wizard/MultiStepWizard.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,IAAI;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,YAAY,CAAC,EAAE,2BAA2B,CAAC;IAC3C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,wCAAwC;IACxC,kBAAkB,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"MultiStepWizard.types.d.ts","sourceRoot":"","sources":["../../../../src/components/multi-step-wizard/MultiStepWizard.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,IAAI;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,YAAY,CAAC,EAAE,2BAA2B,CAAC;IAC3C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,wCAAwC;IACxC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qEAAqE;IACrE,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACnC;AAED,MAAM,WAAW,2BAA2B;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiStepSidebar.d.ts","sourceRoot":"","sources":["../../../../../src/components/multi-step-wizard/_internal/MultiStepSidebar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"MultiStepSidebar.d.ts","sourceRoot":"","sources":["../../../../../src/components/multi-step-wizard/_internal/MultiStepSidebar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAmBtE,eAAO,MAAM,gBAAgB,8FA0F5B,CAAC"}
|
|
@@ -9,5 +9,6 @@ export interface MultiStepSidebarProps extends React.HTMLAttributes<HTMLDivEleme
|
|
|
9
9
|
onChangePage?: (page: number) => void;
|
|
10
10
|
steps: Step[];
|
|
11
11
|
goBackTranslation?: string;
|
|
12
|
+
hideInactiveDescriptions?: boolean;
|
|
12
13
|
}
|
|
13
14
|
//# sourceMappingURL=MultiStepSidebar.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiStepSidebar.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/multi-step-wizard/_internal/MultiStepSidebar.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAErD,MAAM,WAAW,qBAChB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,iBAAiB,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"MultiStepSidebar.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/multi-step-wizard/_internal/MultiStepSidebar.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAErD,MAAM,WAAW,qBAChB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SimpleLineChart.d.ts","sourceRoot":"","sources":["../../../../src/components/simple-line-chart/SimpleLineChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,KAAK,EAA4B,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE9F,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CA8JpD,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface SimpleLineChartDataPoint {
|
|
2
|
+
label: string;
|
|
3
|
+
value: number;
|
|
4
|
+
}
|
|
5
|
+
export interface SimpleLineChartProps {
|
|
6
|
+
/** Datos para pintar la gráfica: etiqueta (eje X) y valor (eje Y) */
|
|
7
|
+
data: SimpleLineChartDataPoint[];
|
|
8
|
+
/** Título opcional encima del gráfico */
|
|
9
|
+
title?: string;
|
|
10
|
+
/** Altura del área del gráfico en píxeles */
|
|
11
|
+
height?: number;
|
|
12
|
+
/** Color de la línea y del área (hex o nombre CSS) */
|
|
13
|
+
color?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
/** Si se muestra el título cuando existe */
|
|
16
|
+
showTitle?: boolean;
|
|
17
|
+
/** Mensaje cuando no hay datos */
|
|
18
|
+
emptyMessage?: string;
|
|
19
|
+
/** Llamado al hacer clic en un punto (índice, punto) */
|
|
20
|
+
onPointClick?: (index: number, point: SimpleLineChartDataPoint) => void;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=SimpleLineChart.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SimpleLineChart.types.d.ts","sourceRoot":"","sources":["../../../../src/components/simple-line-chart/SimpleLineChart.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB;IACpC,qEAAqE;IACrE,IAAI,EAAE,wBAAwB,EAAE,CAAC;IACjC,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kCAAkC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wDAAwD;IACxD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,wBAAwB,KAAK,IAAI,CAAC;CACxE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/simple-line-chart/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,YAAY,EACX,wBAAwB,EACxB,oBAAoB,GACpB,MAAM,yBAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerticalSteps.d.ts","sourceRoot":"","sources":["../../../../src/components/vertical-steps/VerticalSteps.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAEX,kBAAkB,EAElB,MAAM,uBAAuB,CAAC;AAM/B,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"VerticalSteps.d.ts","sourceRoot":"","sources":["../../../../src/components/vertical-steps/VerticalSteps.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAEX,kBAAkB,EAElB,MAAM,uBAAuB,CAAC;AAM/B,eAAO,MAAM,aAAa,8FA0OzB,CAAC"}
|
|
@@ -39,6 +39,13 @@ export interface VerticalStepsProps extends React.HTMLAttributes<HTMLButtonEleme
|
|
|
39
39
|
* @default false
|
|
40
40
|
*/
|
|
41
41
|
hideProgressBars?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Whether to hide descriptions for non-active steps.
|
|
44
|
+
* Useful when there are many steps to save vertical space.
|
|
45
|
+
*
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
hideInactiveDescriptions?: boolean;
|
|
42
49
|
/**
|
|
43
50
|
* The custom class for the steps wrapper.
|
|
44
51
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerticalSteps.types.d.ts","sourceRoot":"","sources":["../../../../src/components/vertical-steps/VerticalSteps.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,yBAAyB;IACzC,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,IAAI,GAAG;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,WAAW,kBAChB,SAAQ,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC;IAC/C;;;;OAIG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,CAAC;IACvB;;;;OAIG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C;;OAEG;IACH,YAAY,CAAC,EAAE,yBAAyB,CAAC;CACzC"}
|
|
1
|
+
{"version":3,"file":"VerticalSteps.types.d.ts","sourceRoot":"","sources":["../../../../src/components/vertical-steps/VerticalSteps.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,yBAAyB;IACzC,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,IAAI,GAAG;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,WAAW,kBAChB,SAAQ,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC;IAC/C;;;;OAIG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,CAAC;IACvB;;;;OAIG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;OAKG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C;;OAEG;IACH,YAAY,CAAC,EAAE,yBAAyB,CAAC;CACzC"}
|