@beweco/aurora-ui 0.6.0 → 0.6.2
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 +138 -184
- package/dist/index.esm.js +138 -184
- package/dist/types/components/autocomplete/AutoComplete.d.ts.map +1 -1
- package/dist/types/components/multi-step-wizard/_internal/MultiStepSidebar.d.ts.map +1 -1
- package/dist/types/components/row-steps/RowSteps.d.ts.map +1 -1
- package/dist/types/components/vertical-steps/VerticalSteps.d.ts.map +1 -1
- package/dist/types/components/vertical-steps/VerticalSteps.types.d.ts +0 -17
- package/dist/types/components/vertical-steps/VerticalSteps.types.d.ts.map +1 -1
- package/dist/types/components/vertical-steps/index.d.ts +1 -1
- package/dist/types/components/vertical-steps/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -5,8 +5,8 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
5
5
|
var react$1 = require('@iconify/react');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var recharts = require('recharts');
|
|
8
|
-
var framerMotion = require('framer-motion');
|
|
9
8
|
var reactDom = require('react-dom');
|
|
9
|
+
var framerMotion = require('framer-motion');
|
|
10
10
|
var useTheme = require('@heroui/use-theme');
|
|
11
11
|
|
|
12
12
|
/******************************************************************************
|
|
@@ -615,7 +615,7 @@ var AuraAutocomplete = function (_a) {
|
|
|
615
615
|
var resolvedIcon = icon === undefined ? DEFAULT_ICON : icon;
|
|
616
616
|
var hasIcon = resolvedIcon != null;
|
|
617
617
|
var endContent = hasIcon ? (jsxRuntime.jsx("span", { className: ICON_WRAPPER_CLASSNAME, children: resolvedIcon })) : null;
|
|
618
|
-
return (jsxRuntime.jsxs("div", { children: [label && (jsxRuntime.jsx("label", { htmlFor: autoId, className: "block mb-2 text-tiny text-default-600", children: label })), jsxRuntime.jsx(react.Autocomplete, __assign({}, props, { id: autoId, label: undefined, labelPlacement: "outside", variant: variant, size: size, radius: radius, endContent: endContent, classNames: __assign({ base: "[&_[data-slot=input-wrapper][data-focus=true]]:!border-primary-500", popoverContent: "[&_li[data-hover=true]]:!bg-primary-50 [&_li[data-hover=true]]:!text-default-600 [&_li]:!text-default-500" }, (hasIcon && { selectorButton: "!hidden" })) }))] }));
|
|
618
|
+
return (jsxRuntime.jsxs("div", { children: [label && (jsxRuntime.jsx("label", { htmlFor: autoId, className: "block mb-2 text-tiny text-default-600", children: label })), jsxRuntime.jsx(react.Autocomplete, __assign({}, props, { id: autoId, label: undefined, labelPlacement: "outside", variant: variant, size: size, radius: radius, endContent: endContent, classNames: __assign({ base: "[&_[data-slot=input-wrapper][data-focus=true]]:!border-primary-500", popoverContent: "aura-popover-content [&_li[data-hover=true]]:!bg-primary-50 [&_li[data-hover=true]]:!text-default-600 [&_li]:!text-default-500" }, (hasIcon && { selectorButton: "!hidden" })) }))] }));
|
|
619
619
|
};
|
|
620
620
|
|
|
621
621
|
/**
|
|
@@ -2490,37 +2490,58 @@ function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange
|
|
|
2490
2490
|
];
|
|
2491
2491
|
}
|
|
2492
2492
|
|
|
2493
|
+
var VALID_STEP_COLORS$1 = [
|
|
2494
|
+
"primary",
|
|
2495
|
+
"secondary",
|
|
2496
|
+
"success",
|
|
2497
|
+
"warning",
|
|
2498
|
+
"danger",
|
|
2499
|
+
"default",
|
|
2500
|
+
];
|
|
2493
2501
|
var defaultTranslations$7 = {
|
|
2494
2502
|
checkIconTitle: "Check",
|
|
2495
2503
|
};
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2504
|
+
function getContainerCSSVars$1(color) {
|
|
2505
|
+
var baseColor = "hsl(var(--heroui-".concat(color, "))");
|
|
2506
|
+
var fgColor = "hsl(var(--heroui-".concat(color, "-foreground))");
|
|
2507
|
+
var inactiveColor = "hsl(var(--heroui-default-300))";
|
|
2508
|
+
return {
|
|
2509
|
+
"--step-color": baseColor,
|
|
2510
|
+
"--step-fg-color": fgColor,
|
|
2511
|
+
"--active-fg-color": fgColor,
|
|
2512
|
+
"--active-border-color": baseColor,
|
|
2513
|
+
"--active-color": baseColor,
|
|
2514
|
+
"--complete-background-color": baseColor,
|
|
2515
|
+
"--complete-border-color": baseColor,
|
|
2516
|
+
"--inactive-border-color": inactiveColor,
|
|
2517
|
+
"--inactive-color": inactiveColor,
|
|
2518
|
+
"--inactive-bar-color": inactiveColor,
|
|
2519
|
+
};
|
|
2520
|
+
}
|
|
2521
|
+
function getCircleStyle$1(status) {
|
|
2522
|
+
switch (status) {
|
|
2523
|
+
case "complete":
|
|
2524
|
+
return {
|
|
2525
|
+
backgroundColor: "var(--complete-background-color)",
|
|
2526
|
+
borderColor: "var(--complete-border-color)",
|
|
2527
|
+
color: "var(--active-fg-color)",
|
|
2528
|
+
};
|
|
2529
|
+
case "active":
|
|
2530
|
+
return {
|
|
2531
|
+
backgroundColor: "transparent",
|
|
2532
|
+
borderColor: "var(--active-border-color)",
|
|
2533
|
+
color: "var(--active-color)",
|
|
2534
|
+
};
|
|
2535
|
+
default:
|
|
2536
|
+
return {
|
|
2537
|
+
backgroundColor: "transparent",
|
|
2538
|
+
borderColor: "var(--inactive-border-color)",
|
|
2539
|
+
color: "var(--inactive-color)",
|
|
2540
|
+
};
|
|
2541
|
+
}
|
|
2542
|
+
}
|
|
2522
2543
|
var VerticalSteps = React.forwardRef(function (_a, ref) {
|
|
2523
|
-
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,
|
|
2544
|
+
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"]);
|
|
2524
2545
|
var _g = $458b0a5536c1a7cf$export$40bfa8c7b0832715(currentStepProp, defaultStep, onStepChange), currentStep = _g[0], setCurrentStep = _g[1];
|
|
2525
2546
|
var t = __assign(__assign({}, defaultTranslations$7), translations);
|
|
2526
2547
|
var steps = React.useMemo(function () {
|
|
@@ -2529,26 +2550,14 @@ var VerticalSteps = React.forwardRef(function (_a, ref) {
|
|
|
2529
2550
|
}
|
|
2530
2551
|
return stepsProp;
|
|
2531
2552
|
}, [stepsProp]);
|
|
2532
|
-
var
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
"--step-fg-color": (_c = colorVars === null || colorVars === void 0 ? void 0 : colorVars.stepFgColor) !== null && _c !== void 0 ? _c : defaults.stepFgColor,
|
|
2538
|
-
"--active-fg-color": (_d = colorVars === null || colorVars === void 0 ? void 0 : colorVars.activeFgColor) !== null && _d !== void 0 ? _d : "var(--step-fg-color)",
|
|
2539
|
-
"--active-border-color": (_e = colorVars === null || colorVars === void 0 ? void 0 : colorVars.activeBorderColor) !== null && _e !== void 0 ? _e : "var(--step-color)",
|
|
2540
|
-
"--active-color": (_f = colorVars === null || colorVars === void 0 ? void 0 : colorVars.activeColor) !== null && _f !== void 0 ? _f : "var(--step-color)",
|
|
2541
|
-
"--complete-background-color": (_g = colorVars === null || colorVars === void 0 ? void 0 : colorVars.completeBackgroundColor) !== null && _g !== void 0 ? _g : "var(--step-color)",
|
|
2542
|
-
"--complete-border-color": (_h = colorVars === null || colorVars === void 0 ? void 0 : colorVars.completeBorderColor) !== null && _h !== void 0 ? _h : "var(--step-color)",
|
|
2543
|
-
"--inactive-border-color": (_j = colorVars === null || colorVars === void 0 ? void 0 : colorVars.inactiveBorderColor) !== null && _j !== void 0 ? _j : "hsl(var(--heroui-default-300))",
|
|
2544
|
-
"--inactive-color": (_k = colorVars === null || colorVars === void 0 ? void 0 : colorVars.inactiveColor) !== null && _k !== void 0 ? _k : "hsl(var(--heroui-default-300))",
|
|
2545
|
-
"--inactive-bar-color": (_l = colorVars === null || colorVars === void 0 ? void 0 : colorVars.inactiveBarColor) !== null && _l !== void 0 ? _l : "hsl(var(--heroui-default-300))",
|
|
2546
|
-
};
|
|
2547
|
-
}, [color, colorVars]);
|
|
2548
|
-
return (jsxRuntime.jsx("nav", { "aria-label": "Progress", className: "max-w-fit", children: jsxRuntime.jsx("ol", { className: react.cn("flex flex-col gap-y-3", className), style: colorStyle, children: steps === null || steps === void 0 ? void 0 : steps.map(function (step, stepIdx) {
|
|
2553
|
+
var stepColor = VALID_STEP_COLORS$1.includes(color)
|
|
2554
|
+
? color
|
|
2555
|
+
: "primary";
|
|
2556
|
+
var containerVars = React.useMemo(function () { return getContainerCSSVars$1(stepColor); }, [stepColor]);
|
|
2557
|
+
return (jsxRuntime.jsx("nav", { "aria-label": "Progress", className: "max-w-fit", children: jsxRuntime.jsx("ol", { "data-step-color": stepColor, className: react.cn("flex flex-col gap-y-3", className), style: containerVars, children: steps === null || steps === void 0 ? void 0 : steps.map(function (step, stepIdx) {
|
|
2549
2558
|
var status = currentStep === stepIdx
|
|
2550
2559
|
? "active"
|
|
2551
|
-
: step.isCompleted
|
|
2560
|
+
: stepIdx < currentStep || step.isCompleted
|
|
2552
2561
|
? "complete"
|
|
2553
2562
|
: "inactive";
|
|
2554
2563
|
var isDisabled = status === "inactive";
|
|
@@ -2556,85 +2565,38 @@ var VerticalSteps = React.forwardRef(function (_a, ref) {
|
|
|
2556
2565
|
// biome-ignore lint/suspicious/noArrayIndexKey: <explanation>
|
|
2557
2566
|
jsxRuntime.jsxs("li", { className: "relative", children: [jsxRuntime.jsx("div", { className: "flex w-full max-w-full items-center", children: jsxRuntime.jsxs("button", __assign({ type: "button", ref: ref, "aria-current": status === "active" ? "step" : undefined, className: react.cn("group rounded-large flex w-full cursor-pointer items-center justify-center gap-4 px-3 py-2.5", stepClassName, {
|
|
2558
2567
|
"cursor-not-allowed": isDisabled,
|
|
2559
|
-
}), onClick: function () { return setCurrentStep(stepIdx); }, disabled: isDisabled }, props, { children: [jsxRuntime.jsx("div", { className: "flex h-full items-center", children: jsxRuntime.jsx(
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
},
|
|
2567
|
-
active: {
|
|
2568
|
-
backgroundColor: "transparent",
|
|
2569
|
-
borderColor: "var(--active-border-color)",
|
|
2570
|
-
color: "var(--active-color)",
|
|
2571
|
-
},
|
|
2572
|
-
complete: {
|
|
2573
|
-
backgroundColor: "var(--complete-background-color)",
|
|
2574
|
-
borderColor: "var(--complete-border-color)",
|
|
2575
|
-
},
|
|
2576
|
-
}, children: jsxRuntime.jsx("div", { className: "flex items-center justify-center", children: status === "complete" ? (jsxRuntime.jsx(IconComponent, { style: { color: "var(--active-fg-color)" }, className: "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", {
|
|
2577
|
-
"text-default-300": status === "inactive",
|
|
2568
|
+
}), onClick: function () { return setCurrentStep(stepIdx); }, disabled: isDisabled }, props, { children: [jsxRuntime.jsx("div", { className: "flex h-full items-center", children: jsxRuntime.jsx("div", { className: "relative", children: jsxRuntime.jsx("div", { className: react.cn("border-medium text-large relative flex h-[34px] w-[34px] items-center justify-center rounded-full font-semibold", "transition-[background-color,border-color,color,box-shadow] duration-300", {
|
|
2569
|
+
"shadow-lg": status === "complete",
|
|
2570
|
+
}), "data-status": status, style: getCircleStyle$1(status), children: jsxRuntime.jsx("div", { className: "flex items-center justify-center", children: status === "complete" ? (jsxRuntime.jsx(IconComponent, { className: "font-bold", style: {
|
|
2571
|
+
color: "var(--active-fg-color)",
|
|
2572
|
+
}, 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", {
|
|
2573
|
+
"text-default-300": status ===
|
|
2574
|
+
"inactive",
|
|
2578
2575
|
}), children: step.title }), (!hideInactiveDescriptions ||
|
|
2579
2576
|
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", {
|
|
2580
|
-
"text-default-300": status ===
|
|
2581
|
-
|
|
2577
|
+
"text-default-300": status ===
|
|
2578
|
+
"inactive",
|
|
2579
|
+
}), children: step.description }))] }) })] }), stepIdx) }), stepIdx < steps.length - 1 &&
|
|
2580
|
+
!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", {
|
|
2582
2581
|
"h-1/4": stepIdx === currentStep,
|
|
2583
2582
|
}), style: {
|
|
2584
|
-
|
|
2585
|
-
}, children: jsxRuntime.jsx("div", { className: "relative h-full w-0.5 transition-colors duration-300",
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
height: stepIdx < currentStep ? "100%" : "0",
|
|
2590
|
-
} }) }) }))] }, stepIdx));
|
|
2583
|
+
"--idx": stepIdx,
|
|
2584
|
+
}, 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-['']", {
|
|
2585
|
+
"after:h-full": stepIdx <
|
|
2586
|
+
currentStep,
|
|
2587
|
+
}) }) }))] }, stepIdx));
|
|
2591
2588
|
}) }) }));
|
|
2592
2589
|
});
|
|
2593
2590
|
VerticalSteps.displayName = "VerticalSteps";
|
|
2594
2591
|
|
|
2595
|
-
var LIGHT_COLOR_VARS = {
|
|
2596
|
-
stepColor: "hsl(var(--heroui-primary-400))",
|
|
2597
|
-
activeColor: "hsl(var(--heroui-primary-400))",
|
|
2598
|
-
inactiveBorderColor: "hsl(var(--heroui-primary-200))",
|
|
2599
|
-
inactiveBarColor: "hsl(var(--heroui-primary-200))",
|
|
2600
|
-
inactiveColor: "hsl(var(--heroui-primary-300))",
|
|
2601
|
-
};
|
|
2602
|
-
var DARK_COLOR_VARS = {
|
|
2603
|
-
stepColor: "rgba(255,255,255,0.1)",
|
|
2604
|
-
stepFgColor: "hsl(var(--heroui-foreground-600))",
|
|
2605
|
-
activeColor: "hsl(var(--heroui-foreground-600))",
|
|
2606
|
-
activeBorderColor: "rgba(255,255,255,0.5)",
|
|
2607
|
-
inactiveBorderColor: "rgba(255,255,255,0.1)",
|
|
2608
|
-
inactiveBarColor: "rgba(255,255,255,0.1)",
|
|
2609
|
-
inactiveColor: "rgba(255,255,255,0.2)",
|
|
2610
|
-
};
|
|
2611
|
-
var useIsDarkMode = function () {
|
|
2612
|
-
var _a = React.useState(function () {
|
|
2613
|
-
if (typeof document !== "undefined") {
|
|
2614
|
-
return document.documentElement.classList.contains("dark");
|
|
2615
|
-
}
|
|
2616
|
-
return false;
|
|
2617
|
-
}), isDark = _a[0], setIsDark = _a[1];
|
|
2618
|
-
React.useEffect(function () {
|
|
2619
|
-
var el = document.documentElement;
|
|
2620
|
-
var update = function () { return setIsDark(el.classList.contains("dark")); };
|
|
2621
|
-
var observer = new MutationObserver(update);
|
|
2622
|
-
observer.observe(el, { attributes: true, attributeFilter: ["class"] });
|
|
2623
|
-
update();
|
|
2624
|
-
return function () { return observer.disconnect(); };
|
|
2625
|
-
}, []);
|
|
2626
|
-
return isDark;
|
|
2627
|
-
};
|
|
2628
2592
|
var MultiStepSidebar = React.forwardRef(function (_a, ref) {
|
|
2629
2593
|
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"]);
|
|
2630
|
-
var isDark = useIsDarkMode();
|
|
2631
|
-
var stepperColorVars = isDark ? DARK_COLOR_VARS : LIGHT_COLOR_VARS;
|
|
2632
2594
|
var handleOverlayClick = function (e) {
|
|
2633
2595
|
if (e.target === e.currentTarget) {
|
|
2634
2596
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
2635
2597
|
}
|
|
2636
2598
|
};
|
|
2637
|
-
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("relative flex h-full w-full max-w-4xl overflow-hidden rounded-lg bg-background shadow-lg lg:h-auto lg:max-h-[85vh] lg:min-h-[512px]", className) }, props, { children: [jsxRuntime.jsx("div", { className: react.cn("absolute inset-y-0 left-0 hidden w-1/3 flex-col justify-start gap-y-8 overflow-y-auto p-8 md:flex [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]"), children: jsxRuntime.jsx(VerticalSteps, {
|
|
2599
|
+
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("relative flex h-full w-full max-w-4xl overflow-hidden rounded-lg bg-background shadow-lg lg:h-auto lg:max-h-[85vh] lg:min-h-[512px]", className) }, props, { children: [jsxRuntime.jsx("div", { className: react.cn("absolute inset-y-0 left-0 hidden w-1/3 flex-col justify-start gap-y-8 overflow-y-auto p-8 md:flex [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]"), children: jsxRuntime.jsx(VerticalSteps, { className: "aura-stepper-theme", color: "primary", currentStep: currentPage, steps: steps, onStepChange: onChangePage, hideInactiveDescriptions: hideInactiveDescriptions }) }), jsxRuntime.jsxs("div", { className: "relative flex w-full flex-col items-center justify-between gap-4 md:ml-[33.333333%] md:w-2/3 md:p-4 min-h-0", 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: "aura-stepper-theme", currentStep: currentPage + 1, totalSteps: steps.length }) }) }), jsxRuntime.jsx("div", { className: "flex flex-col flex-1 w-full justify-between p-4 sm:max-w-md md:max-w-lg overflow-y-auto min-h-0 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: children })] })] })) }));
|
|
2638
2600
|
});
|
|
2639
2601
|
MultiStepSidebar.displayName = "MultiStepSidebar";
|
|
2640
2602
|
|
|
@@ -3297,6 +3259,53 @@ var PromotionalBanner = function (_a) {
|
|
|
3297
3259
|
}, variant: "bordered", onClick: handleButtonClick }, buttonProps, { children: finalButtonText })), showCloseButton && (jsxRuntime.jsx("div", { className: "flex flex-1 justify-end", children: jsxRuntime.jsx(react.Button, { isIconOnly: true, "aria-label": t.closeButtonLabel, className: "-m-1", size: "lg", variant: "bordered", onClick: handleClose, children: jsxRuntime.jsx(IconComponent, { "aria-hidden": "true", className: "text-default-500", icon: "lucide:x", size: "md" }) }) }))] }));
|
|
3298
3260
|
};
|
|
3299
3261
|
|
|
3262
|
+
var VALID_STEP_COLORS = [
|
|
3263
|
+
"primary",
|
|
3264
|
+
"secondary",
|
|
3265
|
+
"success",
|
|
3266
|
+
"warning",
|
|
3267
|
+
"danger",
|
|
3268
|
+
"default",
|
|
3269
|
+
];
|
|
3270
|
+
function getContainerCSSVars(color) {
|
|
3271
|
+
var baseColor = "hsl(var(--heroui-".concat(color, "))");
|
|
3272
|
+
var fgColor = "hsl(var(--heroui-".concat(color, "-foreground))");
|
|
3273
|
+
var inactiveColor = "hsl(var(--heroui-default-300))";
|
|
3274
|
+
return {
|
|
3275
|
+
"--step-color": baseColor,
|
|
3276
|
+
"--step-fg-color": fgColor,
|
|
3277
|
+
"--active-fg-color": fgColor,
|
|
3278
|
+
"--active-border-color": baseColor,
|
|
3279
|
+
"--active-color": baseColor,
|
|
3280
|
+
"--complete-background-color": baseColor,
|
|
3281
|
+
"--complete-border-color": baseColor,
|
|
3282
|
+
"--inactive-border-color": inactiveColor,
|
|
3283
|
+
"--inactive-color": inactiveColor,
|
|
3284
|
+
"--inactive-bar-color": inactiveColor,
|
|
3285
|
+
};
|
|
3286
|
+
}
|
|
3287
|
+
function getCircleStyle(status) {
|
|
3288
|
+
switch (status) {
|
|
3289
|
+
case "complete":
|
|
3290
|
+
return {
|
|
3291
|
+
backgroundColor: "var(--complete-background-color)",
|
|
3292
|
+
borderColor: "var(--complete-border-color)",
|
|
3293
|
+
color: "var(--active-fg-color)",
|
|
3294
|
+
};
|
|
3295
|
+
case "active":
|
|
3296
|
+
return {
|
|
3297
|
+
backgroundColor: "transparent",
|
|
3298
|
+
borderColor: "var(--active-border-color)",
|
|
3299
|
+
color: "var(--active-color)",
|
|
3300
|
+
};
|
|
3301
|
+
default:
|
|
3302
|
+
return {
|
|
3303
|
+
backgroundColor: "transparent",
|
|
3304
|
+
borderColor: "var(--inactive-border-color)",
|
|
3305
|
+
color: "var(--inactive-color)",
|
|
3306
|
+
};
|
|
3307
|
+
}
|
|
3308
|
+
}
|
|
3300
3309
|
var RowSteps = React.forwardRef(function (_a, ref) {
|
|
3301
3310
|
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; _a.translations; var props = __rest(_a, ["color", "steps", "defaultStep", "onStepChange", "currentStep", "hideProgressBars", "stepClassName", "className", "translations"]);
|
|
3302
3311
|
var _f = $458b0a5536c1a7cf$export$40bfa8c7b0832715(currentStepProp, defaultStep, onStepChange), currentStep = _f[0], setCurrentStep = _f[1];
|
|
@@ -3306,85 +3315,30 @@ var RowSteps = React.forwardRef(function (_a, ref) {
|
|
|
3306
3315
|
}
|
|
3307
3316
|
return stepsProp;
|
|
3308
3317
|
}, [stepsProp]);
|
|
3309
|
-
var
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
"[--step-fg-color:hsl(var(--heroui-primary-foreground))]",
|
|
3315
|
-
],
|
|
3316
|
-
secondary: [
|
|
3317
|
-
"[--step-color:hsl(var(--heroui-secondary))]",
|
|
3318
|
-
"[--step-fg-color:hsl(var(--heroui-secondary-foreground))]",
|
|
3319
|
-
],
|
|
3320
|
-
success: [
|
|
3321
|
-
"[--step-color:hsl(var(--heroui-success))]",
|
|
3322
|
-
"[--step-fg-color:hsl(var(--heroui-success-foreground))]",
|
|
3323
|
-
],
|
|
3324
|
-
warning: [
|
|
3325
|
-
"[--step-color:hsl(var(--heroui-warning))]",
|
|
3326
|
-
"[--step-fg-color:hsl(var(--heroui-warning-foreground))]",
|
|
3327
|
-
],
|
|
3328
|
-
danger: [
|
|
3329
|
-
"[--step-color:hsl(var(--heroui-danger))]",
|
|
3330
|
-
"[--step-fg-color:hsl(var(--heroui-danger-foreground))]",
|
|
3331
|
-
],
|
|
3332
|
-
default: [
|
|
3333
|
-
"[--step-color:hsl(var(--heroui-default))]",
|
|
3334
|
-
"[--step-fg-color:hsl(var(--heroui-default-foreground))]",
|
|
3335
|
-
],
|
|
3336
|
-
};
|
|
3337
|
-
var _b = (_a = colorMappings[color]) !== null && _a !== void 0 ? _a : colorMappings.primary, userColor = _b[0], fgColor = _b[1];
|
|
3338
|
-
var colorsVars = [
|
|
3339
|
-
"[--active-fg-color:var(--step-fg-color)]",
|
|
3340
|
-
"[--active-border-color:var(--step-color)]",
|
|
3341
|
-
"[--active-color:var(--step-color)]",
|
|
3342
|
-
"[--complete-background-color:var(--step-color)]",
|
|
3343
|
-
"[--complete-border-color:var(--step-color)]",
|
|
3344
|
-
"[--inactive-border-color:hsl(var(--heroui-default-300))]",
|
|
3345
|
-
"[--inactive-color:hsl(var(--heroui-default-300))]",
|
|
3346
|
-
];
|
|
3347
|
-
if (!(className === null || className === void 0 ? void 0 : className.includes("--step-fg-color"))) {
|
|
3348
|
-
colorsVars.unshift(fgColor);
|
|
3349
|
-
}
|
|
3350
|
-
if (!(className === null || className === void 0 ? void 0 : className.includes("--step-color"))) {
|
|
3351
|
-
colorsVars.unshift(userColor);
|
|
3352
|
-
}
|
|
3353
|
-
if (!(className === null || className === void 0 ? void 0 : className.includes("--inactive-bar-color"))) {
|
|
3354
|
-
colorsVars.push("[--inactive-bar-color:hsl(var(--heroui-default-300))]");
|
|
3355
|
-
}
|
|
3356
|
-
return colorsVars;
|
|
3357
|
-
}, [color, className]);
|
|
3358
|
-
return (jsxRuntime.jsx("nav", { "aria-label": "Progress", className: "-my-4 max-w-fit overflow-x-auto py-4", children: jsxRuntime.jsx("ol", { className: react.cn("flex flex-row flex-nowrap gap-x-3", colors, className), children: steps === null || steps === void 0 ? void 0 : steps.map(function (step, stepIdx) {
|
|
3318
|
+
var stepColor = VALID_STEP_COLORS.includes(color)
|
|
3319
|
+
? color
|
|
3320
|
+
: "primary";
|
|
3321
|
+
var containerVars = React.useMemo(function () { return getContainerCSSVars(stepColor); }, [stepColor]);
|
|
3322
|
+
return (jsxRuntime.jsx("nav", { "aria-label": "Progress", className: "-my-4 max-w-fit overflow-x-auto py-4", children: jsxRuntime.jsx("ol", { "data-step-color": stepColor, className: react.cn("flex flex-row flex-nowrap gap-x-3", className), style: containerVars, children: steps === null || steps === void 0 ? void 0 : steps.map(function (step, stepIdx) {
|
|
3359
3323
|
var status = currentStep === stepIdx
|
|
3360
3324
|
? "active"
|
|
3361
3325
|
: currentStep < stepIdx
|
|
3362
3326
|
? "inactive"
|
|
3363
3327
|
: "complete";
|
|
3364
|
-
return (jsxRuntime.jsx("li", { className: "relative flex w-full items-center pr-12 last:pr-0", children: jsxRuntime.jsxs("button", __assign({ type: "button", ref: ref, "aria-current": status === "active" ? "step" : undefined, className: react.cn("group rounded-large flex w-full cursor-pointer flex-row items-center justify-center gap-x-3 py-2.5", stepClassName), onClick: function () { return setCurrentStep(stepIdx); } }, props, { children: [jsxRuntime.jsx("div", { className: "h-ful relative flex items-center", children: jsxRuntime.jsx(
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
borderColor: "var(--active-border-color)",
|
|
3375
|
-
color: "var(--active-color)",
|
|
3376
|
-
},
|
|
3377
|
-
complete: {
|
|
3378
|
-
backgroundColor: "var(--complete-background-color)",
|
|
3379
|
-
borderColor: "var(--complete-border-color)",
|
|
3380
|
-
},
|
|
3381
|
-
}, 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" })) : (jsxRuntime.jsx("span", { children: stepIdx + 1 })) }) }) }) }) }), step.title && (jsxRuntime.jsx("div", { className: "max-w-full flex-1 text-start", children: jsxRuntime.jsx("div", { className: react.cn("text-small text-default-600 lg:text-medium font-medium transition-[color,opacity] duration-300 group-active:opacity-80", {
|
|
3382
|
-
"text-default-300": status === "inactive",
|
|
3383
|
-
}), children: step.title }) })), stepIdx < steps.length - 1 && !hideProgressBars && (jsxRuntime.jsx("div", { "aria-hidden": "true", className: "pointer-events-none absolute right-0 w-10 flex-none items-center", style: {
|
|
3384
|
-
// @ts-ignore
|
|
3328
|
+
return (jsxRuntime.jsx("li", { className: "relative flex w-full items-center pr-12 last:pr-0", children: jsxRuntime.jsxs("button", __assign({ type: "button", ref: ref, "aria-current": status === "active" ? "step" : undefined, className: react.cn("group rounded-large flex w-full cursor-pointer flex-row items-center justify-center gap-x-3 py-2.5", stepClassName), onClick: function () { return setCurrentStep(stepIdx); } }, props, { children: [jsxRuntime.jsx("div", { className: "h-ful relative flex items-center", children: jsxRuntime.jsx("div", { className: "relative", children: jsxRuntime.jsx("div", { className: react.cn("border-medium text-large relative flex h-[34px] w-[34px] items-center justify-center rounded-full font-semibold", "transition-[background-color,border-color,color,box-shadow] duration-300", {
|
|
3329
|
+
"shadow-lg": status ===
|
|
3330
|
+
"complete",
|
|
3331
|
+
}), "data-status": status, style: getCircleStyle(status), children: jsxRuntime.jsx("div", { className: "flex items-center justify-center", children: status === "complete" ? (jsxRuntime.jsx(IconComponent, { className: "font-bold", style: {
|
|
3332
|
+
color: "var(--active-fg-color)",
|
|
3333
|
+
}, icon: "material-symbols:check-rounded" })) : (jsxRuntime.jsx("span", { children: stepIdx + 1 })) }) }) }) }), step.title && (jsxRuntime.jsx("div", { className: "max-w-full flex-1 text-start", children: jsxRuntime.jsx("div", { className: react.cn("text-small text-default-600 lg:text-medium font-medium transition-[color,opacity] duration-300 group-active:opacity-80", {
|
|
3334
|
+
"text-default-300": status ===
|
|
3335
|
+
"inactive",
|
|
3336
|
+
}), children: step.title }) })), stepIdx < steps.length - 1 &&
|
|
3337
|
+
!hideProgressBars && (jsxRuntime.jsx("div", { "aria-hidden": "true", className: "pointer-events-none absolute right-0 w-10 flex-none items-center", style: {
|
|
3385
3338
|
"--idx": stepIdx,
|
|
3386
3339
|
}, children: jsxRuntime.jsx("div", { className: react.cn("relative h-0.5 w-full bg-[var(--inactive-bar-color)] transition-colors duration-300", "after:absolute after:block after:h-full after:w-0 after:bg-[var(--active-border-color)] after:transition-[width] after:duration-300 after:content-['']", {
|
|
3387
|
-
"after:w-full": stepIdx <
|
|
3340
|
+
"after:w-full": stepIdx <
|
|
3341
|
+
currentStep,
|
|
3388
3342
|
}) }) }))] }), stepIdx) }, stepIdx));
|
|
3389
3343
|
}) }) }));
|
|
3390
3344
|
});
|
|
@@ -3808,7 +3762,7 @@ var Select = function (_a) {
|
|
|
3808
3762
|
return (jsxRuntime.jsx("div", { className: "group", children: jsxRuntime.jsx(react.Select, __assign({}, props, { id: selectId, label: label, labelPlacement: "outside", placeholder: placeholder, variant: variant, size: size, radius: radius, classNames: {
|
|
3809
3763
|
label: "text-default-600 text-tiny group-data-[filled=true]:text-default-600",
|
|
3810
3764
|
trigger: "data-[open=true]:!border-primary-500 data-[focus=true]:!border-primary-500 data-[disabled=true]:bg-default-100",
|
|
3811
|
-
popoverContent: "[&_[data-focus-visible=true]]:!outline-none [&_[data-selectable=true]:focus]:!bg-primary-50 [&_li]:!text-default-500 [&_li[data-hover=true]]:!text-default-600",
|
|
3765
|
+
popoverContent: "aura-popover-content [&_[data-focus-visible=true]]:!outline-none [&_[data-selectable=true]:focus]:!bg-primary-50 [&_li]:!text-default-500 [&_li[data-hover=true]]:!text-default-600",
|
|
3812
3766
|
} })) }));
|
|
3813
3767
|
};
|
|
3814
3768
|
|