@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.esm.js
CHANGED
|
@@ -6,8 +6,8 @@ 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, forwardRef, useImperativeHandle } from 'react';
|
|
8
8
|
import { ResponsiveContainer, AreaChart, CartesianGrid, XAxis, Tooltip, Area, LineChart, YAxis, Line } from 'recharts';
|
|
9
|
-
import { LazyMotion, domAnimation, m, motion, AnimatePresence } from 'framer-motion';
|
|
10
9
|
import { createPortal } from 'react-dom';
|
|
10
|
+
import { motion, AnimatePresence } from 'framer-motion';
|
|
11
11
|
import { useTheme } from '@heroui/use-theme';
|
|
12
12
|
|
|
13
13
|
/******************************************************************************
|
|
@@ -616,7 +616,7 @@ var AuraAutocomplete = function (_a) {
|
|
|
616
616
|
var resolvedIcon = icon === undefined ? DEFAULT_ICON : icon;
|
|
617
617
|
var hasIcon = resolvedIcon != null;
|
|
618
618
|
var endContent = hasIcon ? (jsx("span", { className: ICON_WRAPPER_CLASSNAME, children: resolvedIcon })) : null;
|
|
619
|
-
return (jsxs("div", { children: [label && (jsx("label", { htmlFor: autoId, className: "block mb-2 text-tiny text-default-600", children: label })), jsx(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" })) }))] }));
|
|
619
|
+
return (jsxs("div", { children: [label && (jsx("label", { htmlFor: autoId, className: "block mb-2 text-tiny text-default-600", children: label })), jsx(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" })) }))] }));
|
|
620
620
|
};
|
|
621
621
|
|
|
622
622
|
/**
|
|
@@ -2491,37 +2491,58 @@ function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange
|
|
|
2491
2491
|
];
|
|
2492
2492
|
}
|
|
2493
2493
|
|
|
2494
|
+
var VALID_STEP_COLORS$1 = [
|
|
2495
|
+
"primary",
|
|
2496
|
+
"secondary",
|
|
2497
|
+
"success",
|
|
2498
|
+
"warning",
|
|
2499
|
+
"danger",
|
|
2500
|
+
"default",
|
|
2501
|
+
];
|
|
2494
2502
|
var defaultTranslations$7 = {
|
|
2495
2503
|
checkIconTitle: "Check",
|
|
2496
2504
|
};
|
|
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
|
-
|
|
2522
|
-
|
|
2505
|
+
function getContainerCSSVars$1(color) {
|
|
2506
|
+
var baseColor = "hsl(var(--heroui-".concat(color, "))");
|
|
2507
|
+
var fgColor = "hsl(var(--heroui-".concat(color, "-foreground))");
|
|
2508
|
+
var inactiveColor = "hsl(var(--heroui-default-300))";
|
|
2509
|
+
return {
|
|
2510
|
+
"--step-color": baseColor,
|
|
2511
|
+
"--step-fg-color": fgColor,
|
|
2512
|
+
"--active-fg-color": fgColor,
|
|
2513
|
+
"--active-border-color": baseColor,
|
|
2514
|
+
"--active-color": baseColor,
|
|
2515
|
+
"--complete-background-color": baseColor,
|
|
2516
|
+
"--complete-border-color": baseColor,
|
|
2517
|
+
"--inactive-border-color": inactiveColor,
|
|
2518
|
+
"--inactive-color": inactiveColor,
|
|
2519
|
+
"--inactive-bar-color": inactiveColor,
|
|
2520
|
+
};
|
|
2521
|
+
}
|
|
2522
|
+
function getCircleStyle$1(status) {
|
|
2523
|
+
switch (status) {
|
|
2524
|
+
case "complete":
|
|
2525
|
+
return {
|
|
2526
|
+
backgroundColor: "var(--complete-background-color)",
|
|
2527
|
+
borderColor: "var(--complete-border-color)",
|
|
2528
|
+
color: "var(--active-fg-color)",
|
|
2529
|
+
};
|
|
2530
|
+
case "active":
|
|
2531
|
+
return {
|
|
2532
|
+
backgroundColor: "transparent",
|
|
2533
|
+
borderColor: "var(--active-border-color)",
|
|
2534
|
+
color: "var(--active-color)",
|
|
2535
|
+
};
|
|
2536
|
+
default:
|
|
2537
|
+
return {
|
|
2538
|
+
backgroundColor: "transparent",
|
|
2539
|
+
borderColor: "var(--inactive-border-color)",
|
|
2540
|
+
color: "var(--inactive-color)",
|
|
2541
|
+
};
|
|
2542
|
+
}
|
|
2543
|
+
}
|
|
2523
2544
|
var VerticalSteps = React.forwardRef(function (_a, ref) {
|
|
2524
|
-
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,
|
|
2545
|
+
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"]);
|
|
2525
2546
|
var _g = $458b0a5536c1a7cf$export$40bfa8c7b0832715(currentStepProp, defaultStep, onStepChange), currentStep = _g[0], setCurrentStep = _g[1];
|
|
2526
2547
|
var t = __assign(__assign({}, defaultTranslations$7), translations);
|
|
2527
2548
|
var steps = React.useMemo(function () {
|
|
@@ -2530,26 +2551,14 @@ var VerticalSteps = React.forwardRef(function (_a, ref) {
|
|
|
2530
2551
|
}
|
|
2531
2552
|
return stepsProp;
|
|
2532
2553
|
}, [stepsProp]);
|
|
2533
|
-
var
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
"--step-fg-color": (_c = colorVars === null || colorVars === void 0 ? void 0 : colorVars.stepFgColor) !== null && _c !== void 0 ? _c : defaults.stepFgColor,
|
|
2539
|
-
"--active-fg-color": (_d = colorVars === null || colorVars === void 0 ? void 0 : colorVars.activeFgColor) !== null && _d !== void 0 ? _d : "var(--step-fg-color)",
|
|
2540
|
-
"--active-border-color": (_e = colorVars === null || colorVars === void 0 ? void 0 : colorVars.activeBorderColor) !== null && _e !== void 0 ? _e : "var(--step-color)",
|
|
2541
|
-
"--active-color": (_f = colorVars === null || colorVars === void 0 ? void 0 : colorVars.activeColor) !== null && _f !== void 0 ? _f : "var(--step-color)",
|
|
2542
|
-
"--complete-background-color": (_g = colorVars === null || colorVars === void 0 ? void 0 : colorVars.completeBackgroundColor) !== null && _g !== void 0 ? _g : "var(--step-color)",
|
|
2543
|
-
"--complete-border-color": (_h = colorVars === null || colorVars === void 0 ? void 0 : colorVars.completeBorderColor) !== null && _h !== void 0 ? _h : "var(--step-color)",
|
|
2544
|
-
"--inactive-border-color": (_j = colorVars === null || colorVars === void 0 ? void 0 : colorVars.inactiveBorderColor) !== null && _j !== void 0 ? _j : "hsl(var(--heroui-default-300))",
|
|
2545
|
-
"--inactive-color": (_k = colorVars === null || colorVars === void 0 ? void 0 : colorVars.inactiveColor) !== null && _k !== void 0 ? _k : "hsl(var(--heroui-default-300))",
|
|
2546
|
-
"--inactive-bar-color": (_l = colorVars === null || colorVars === void 0 ? void 0 : colorVars.inactiveBarColor) !== null && _l !== void 0 ? _l : "hsl(var(--heroui-default-300))",
|
|
2547
|
-
};
|
|
2548
|
-
}, [color, colorVars]);
|
|
2549
|
-
return (jsx("nav", { "aria-label": "Progress", className: "max-w-fit", children: jsx("ol", { className: cn("flex flex-col gap-y-3", className), style: colorStyle, children: steps === null || steps === void 0 ? void 0 : steps.map(function (step, stepIdx) {
|
|
2554
|
+
var stepColor = VALID_STEP_COLORS$1.includes(color)
|
|
2555
|
+
? color
|
|
2556
|
+
: "primary";
|
|
2557
|
+
var containerVars = React.useMemo(function () { return getContainerCSSVars$1(stepColor); }, [stepColor]);
|
|
2558
|
+
return (jsx("nav", { "aria-label": "Progress", className: "max-w-fit", children: jsx("ol", { "data-step-color": stepColor, className: cn("flex flex-col gap-y-3", className), style: containerVars, children: steps === null || steps === void 0 ? void 0 : steps.map(function (step, stepIdx) {
|
|
2550
2559
|
var status = currentStep === stepIdx
|
|
2551
2560
|
? "active"
|
|
2552
|
-
: step.isCompleted
|
|
2561
|
+
: stepIdx < currentStep || step.isCompleted
|
|
2553
2562
|
? "complete"
|
|
2554
2563
|
: "inactive";
|
|
2555
2564
|
var isDisabled = status === "inactive";
|
|
@@ -2557,85 +2566,38 @@ var VerticalSteps = React.forwardRef(function (_a, ref) {
|
|
|
2557
2566
|
// biome-ignore lint/suspicious/noArrayIndexKey: <explanation>
|
|
2558
2567
|
jsxs("li", { className: "relative", children: [jsx("div", { className: "flex w-full max-w-full items-center", children: jsxs("button", __assign({ type: "button", ref: ref, "aria-current": status === "active" ? "step" : undefined, className: cn("group rounded-large flex w-full cursor-pointer items-center justify-center gap-4 px-3 py-2.5", stepClassName, {
|
|
2559
2568
|
"cursor-not-allowed": isDisabled,
|
|
2560
|
-
}), onClick: function () { return setCurrentStep(stepIdx); }, disabled: isDisabled }, props, { children: [jsx("div", { className: "flex h-full items-center", children: jsx(
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
},
|
|
2568
|
-
active: {
|
|
2569
|
-
backgroundColor: "transparent",
|
|
2570
|
-
borderColor: "var(--active-border-color)",
|
|
2571
|
-
color: "var(--active-color)",
|
|
2572
|
-
},
|
|
2573
|
-
complete: {
|
|
2574
|
-
backgroundColor: "var(--complete-background-color)",
|
|
2575
|
-
borderColor: "var(--complete-border-color)",
|
|
2576
|
-
},
|
|
2577
|
-
}, children: jsx("div", { className: "flex items-center justify-center", children: status === "complete" ? (jsx(IconComponent, { style: { color: "var(--active-fg-color)" }, className: "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", {
|
|
2578
|
-
"text-default-300": status === "inactive",
|
|
2569
|
+
}), onClick: function () { return setCurrentStep(stepIdx); }, disabled: isDisabled }, props, { children: [jsx("div", { className: "flex h-full items-center", children: jsx("div", { className: "relative", children: jsx("div", { className: 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", {
|
|
2570
|
+
"shadow-lg": status === "complete",
|
|
2571
|
+
}), "data-status": status, style: getCircleStyle$1(status), children: jsx("div", { className: "flex items-center justify-center", children: status === "complete" ? (jsx(IconComponent, { className: "font-bold", style: {
|
|
2572
|
+
color: "var(--active-fg-color)",
|
|
2573
|
+
}, 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", {
|
|
2574
|
+
"text-default-300": status ===
|
|
2575
|
+
"inactive",
|
|
2579
2576
|
}), children: step.title }), (!hideInactiveDescriptions ||
|
|
2580
2577
|
status === "active") && (jsx("div", { className: cn("text-tiny text-default-600 lg:text-small transition-[color,opacity] duration-300 group-active:opacity-70", {
|
|
2581
|
-
"text-default-300": status ===
|
|
2582
|
-
|
|
2578
|
+
"text-default-300": status ===
|
|
2579
|
+
"inactive",
|
|
2580
|
+
}), children: step.description }))] }) })] }), stepIdx) }), stepIdx < steps.length - 1 &&
|
|
2581
|
+
!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", {
|
|
2583
2582
|
"h-1/4": stepIdx === currentStep,
|
|
2584
2583
|
}), style: {
|
|
2585
|
-
|
|
2586
|
-
}, children: jsx("div", { className: "relative h-full w-0.5 transition-colors duration-300",
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
height: stepIdx < currentStep ? "100%" : "0",
|
|
2591
|
-
} }) }) }))] }, stepIdx));
|
|
2584
|
+
"--idx": stepIdx,
|
|
2585
|
+
}, 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-['']", {
|
|
2586
|
+
"after:h-full": stepIdx <
|
|
2587
|
+
currentStep,
|
|
2588
|
+
}) }) }))] }, stepIdx));
|
|
2592
2589
|
}) }) }));
|
|
2593
2590
|
});
|
|
2594
2591
|
VerticalSteps.displayName = "VerticalSteps";
|
|
2595
2592
|
|
|
2596
|
-
var LIGHT_COLOR_VARS = {
|
|
2597
|
-
stepColor: "hsl(var(--heroui-primary-400))",
|
|
2598
|
-
activeColor: "hsl(var(--heroui-primary-400))",
|
|
2599
|
-
inactiveBorderColor: "hsl(var(--heroui-primary-200))",
|
|
2600
|
-
inactiveBarColor: "hsl(var(--heroui-primary-200))",
|
|
2601
|
-
inactiveColor: "hsl(var(--heroui-primary-300))",
|
|
2602
|
-
};
|
|
2603
|
-
var DARK_COLOR_VARS = {
|
|
2604
|
-
stepColor: "rgba(255,255,255,0.1)",
|
|
2605
|
-
stepFgColor: "hsl(var(--heroui-foreground-600))",
|
|
2606
|
-
activeColor: "hsl(var(--heroui-foreground-600))",
|
|
2607
|
-
activeBorderColor: "rgba(255,255,255,0.5)",
|
|
2608
|
-
inactiveBorderColor: "rgba(255,255,255,0.1)",
|
|
2609
|
-
inactiveBarColor: "rgba(255,255,255,0.1)",
|
|
2610
|
-
inactiveColor: "rgba(255,255,255,0.2)",
|
|
2611
|
-
};
|
|
2612
|
-
var useIsDarkMode = function () {
|
|
2613
|
-
var _a = React.useState(function () {
|
|
2614
|
-
if (typeof document !== "undefined") {
|
|
2615
|
-
return document.documentElement.classList.contains("dark");
|
|
2616
|
-
}
|
|
2617
|
-
return false;
|
|
2618
|
-
}), isDark = _a[0], setIsDark = _a[1];
|
|
2619
|
-
React.useEffect(function () {
|
|
2620
|
-
var el = document.documentElement;
|
|
2621
|
-
var update = function () { return setIsDark(el.classList.contains("dark")); };
|
|
2622
|
-
var observer = new MutationObserver(update);
|
|
2623
|
-
observer.observe(el, { attributes: true, attributeFilter: ["class"] });
|
|
2624
|
-
update();
|
|
2625
|
-
return function () { return observer.disconnect(); };
|
|
2626
|
-
}, []);
|
|
2627
|
-
return isDark;
|
|
2628
|
-
};
|
|
2629
2593
|
var MultiStepSidebar = React.forwardRef(function (_a, ref) {
|
|
2630
2594
|
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"]);
|
|
2631
|
-
var isDark = useIsDarkMode();
|
|
2632
|
-
var stepperColorVars = isDark ? DARK_COLOR_VARS : LIGHT_COLOR_VARS;
|
|
2633
2595
|
var handleOverlayClick = function (e) {
|
|
2634
2596
|
if (e.target === e.currentTarget) {
|
|
2635
2597
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
2636
2598
|
}
|
|
2637
2599
|
};
|
|
2638
|
-
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("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: [jsx("div", { className: 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: jsx(VerticalSteps, {
|
|
2600
|
+
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("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: [jsx("div", { className: 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: jsx(VerticalSteps, { className: "aura-stepper-theme", color: "primary", currentStep: currentPage, steps: steps, onStepChange: onChangePage, hideInactiveDescriptions: hideInactiveDescriptions }) }), 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: [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: "aura-stepper-theme", currentStep: currentPage + 1, totalSteps: steps.length }) }) }), 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 })] })] })) }));
|
|
2639
2601
|
});
|
|
2640
2602
|
MultiStepSidebar.displayName = "MultiStepSidebar";
|
|
2641
2603
|
|
|
@@ -3298,6 +3260,53 @@ var PromotionalBanner = function (_a) {
|
|
|
3298
3260
|
}, variant: "bordered", onClick: handleButtonClick }, buttonProps, { children: finalButtonText })), showCloseButton && (jsx("div", { className: "flex flex-1 justify-end", children: jsx(Button$1, { isIconOnly: true, "aria-label": t.closeButtonLabel, className: "-m-1", size: "lg", variant: "bordered", onClick: handleClose, children: jsx(IconComponent, { "aria-hidden": "true", className: "text-default-500", icon: "lucide:x", size: "md" }) }) }))] }));
|
|
3299
3261
|
};
|
|
3300
3262
|
|
|
3263
|
+
var VALID_STEP_COLORS = [
|
|
3264
|
+
"primary",
|
|
3265
|
+
"secondary",
|
|
3266
|
+
"success",
|
|
3267
|
+
"warning",
|
|
3268
|
+
"danger",
|
|
3269
|
+
"default",
|
|
3270
|
+
];
|
|
3271
|
+
function getContainerCSSVars(color) {
|
|
3272
|
+
var baseColor = "hsl(var(--heroui-".concat(color, "))");
|
|
3273
|
+
var fgColor = "hsl(var(--heroui-".concat(color, "-foreground))");
|
|
3274
|
+
var inactiveColor = "hsl(var(--heroui-default-300))";
|
|
3275
|
+
return {
|
|
3276
|
+
"--step-color": baseColor,
|
|
3277
|
+
"--step-fg-color": fgColor,
|
|
3278
|
+
"--active-fg-color": fgColor,
|
|
3279
|
+
"--active-border-color": baseColor,
|
|
3280
|
+
"--active-color": baseColor,
|
|
3281
|
+
"--complete-background-color": baseColor,
|
|
3282
|
+
"--complete-border-color": baseColor,
|
|
3283
|
+
"--inactive-border-color": inactiveColor,
|
|
3284
|
+
"--inactive-color": inactiveColor,
|
|
3285
|
+
"--inactive-bar-color": inactiveColor,
|
|
3286
|
+
};
|
|
3287
|
+
}
|
|
3288
|
+
function getCircleStyle(status) {
|
|
3289
|
+
switch (status) {
|
|
3290
|
+
case "complete":
|
|
3291
|
+
return {
|
|
3292
|
+
backgroundColor: "var(--complete-background-color)",
|
|
3293
|
+
borderColor: "var(--complete-border-color)",
|
|
3294
|
+
color: "var(--active-fg-color)",
|
|
3295
|
+
};
|
|
3296
|
+
case "active":
|
|
3297
|
+
return {
|
|
3298
|
+
backgroundColor: "transparent",
|
|
3299
|
+
borderColor: "var(--active-border-color)",
|
|
3300
|
+
color: "var(--active-color)",
|
|
3301
|
+
};
|
|
3302
|
+
default:
|
|
3303
|
+
return {
|
|
3304
|
+
backgroundColor: "transparent",
|
|
3305
|
+
borderColor: "var(--inactive-border-color)",
|
|
3306
|
+
color: "var(--inactive-color)",
|
|
3307
|
+
};
|
|
3308
|
+
}
|
|
3309
|
+
}
|
|
3301
3310
|
var RowSteps = React.forwardRef(function (_a, ref) {
|
|
3302
3311
|
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"]);
|
|
3303
3312
|
var _f = $458b0a5536c1a7cf$export$40bfa8c7b0832715(currentStepProp, defaultStep, onStepChange), currentStep = _f[0], setCurrentStep = _f[1];
|
|
@@ -3307,85 +3316,30 @@ var RowSteps = React.forwardRef(function (_a, ref) {
|
|
|
3307
3316
|
}
|
|
3308
3317
|
return stepsProp;
|
|
3309
3318
|
}, [stepsProp]);
|
|
3310
|
-
var
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
"[--step-fg-color:hsl(var(--heroui-primary-foreground))]",
|
|
3316
|
-
],
|
|
3317
|
-
secondary: [
|
|
3318
|
-
"[--step-color:hsl(var(--heroui-secondary))]",
|
|
3319
|
-
"[--step-fg-color:hsl(var(--heroui-secondary-foreground))]",
|
|
3320
|
-
],
|
|
3321
|
-
success: [
|
|
3322
|
-
"[--step-color:hsl(var(--heroui-success))]",
|
|
3323
|
-
"[--step-fg-color:hsl(var(--heroui-success-foreground))]",
|
|
3324
|
-
],
|
|
3325
|
-
warning: [
|
|
3326
|
-
"[--step-color:hsl(var(--heroui-warning))]",
|
|
3327
|
-
"[--step-fg-color:hsl(var(--heroui-warning-foreground))]",
|
|
3328
|
-
],
|
|
3329
|
-
danger: [
|
|
3330
|
-
"[--step-color:hsl(var(--heroui-danger))]",
|
|
3331
|
-
"[--step-fg-color:hsl(var(--heroui-danger-foreground))]",
|
|
3332
|
-
],
|
|
3333
|
-
default: [
|
|
3334
|
-
"[--step-color:hsl(var(--heroui-default))]",
|
|
3335
|
-
"[--step-fg-color:hsl(var(--heroui-default-foreground))]",
|
|
3336
|
-
],
|
|
3337
|
-
};
|
|
3338
|
-
var _b = (_a = colorMappings[color]) !== null && _a !== void 0 ? _a : colorMappings.primary, userColor = _b[0], fgColor = _b[1];
|
|
3339
|
-
var colorsVars = [
|
|
3340
|
-
"[--active-fg-color:var(--step-fg-color)]",
|
|
3341
|
-
"[--active-border-color:var(--step-color)]",
|
|
3342
|
-
"[--active-color:var(--step-color)]",
|
|
3343
|
-
"[--complete-background-color:var(--step-color)]",
|
|
3344
|
-
"[--complete-border-color:var(--step-color)]",
|
|
3345
|
-
"[--inactive-border-color:hsl(var(--heroui-default-300))]",
|
|
3346
|
-
"[--inactive-color:hsl(var(--heroui-default-300))]",
|
|
3347
|
-
];
|
|
3348
|
-
if (!(className === null || className === void 0 ? void 0 : className.includes("--step-fg-color"))) {
|
|
3349
|
-
colorsVars.unshift(fgColor);
|
|
3350
|
-
}
|
|
3351
|
-
if (!(className === null || className === void 0 ? void 0 : className.includes("--step-color"))) {
|
|
3352
|
-
colorsVars.unshift(userColor);
|
|
3353
|
-
}
|
|
3354
|
-
if (!(className === null || className === void 0 ? void 0 : className.includes("--inactive-bar-color"))) {
|
|
3355
|
-
colorsVars.push("[--inactive-bar-color:hsl(var(--heroui-default-300))]");
|
|
3356
|
-
}
|
|
3357
|
-
return colorsVars;
|
|
3358
|
-
}, [color, className]);
|
|
3359
|
-
return (jsx("nav", { "aria-label": "Progress", className: "-my-4 max-w-fit overflow-x-auto py-4", children: jsx("ol", { className: cn("flex flex-row flex-nowrap gap-x-3", colors, className), children: steps === null || steps === void 0 ? void 0 : steps.map(function (step, stepIdx) {
|
|
3319
|
+
var stepColor = VALID_STEP_COLORS.includes(color)
|
|
3320
|
+
? color
|
|
3321
|
+
: "primary";
|
|
3322
|
+
var containerVars = React.useMemo(function () { return getContainerCSSVars(stepColor); }, [stepColor]);
|
|
3323
|
+
return (jsx("nav", { "aria-label": "Progress", className: "-my-4 max-w-fit overflow-x-auto py-4", children: jsx("ol", { "data-step-color": stepColor, className: 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) {
|
|
3360
3324
|
var status = currentStep === stepIdx
|
|
3361
3325
|
? "active"
|
|
3362
3326
|
: currentStep < stepIdx
|
|
3363
3327
|
? "inactive"
|
|
3364
3328
|
: "complete";
|
|
3365
|
-
return (jsx("li", { className: "relative flex w-full items-center pr-12 last:pr-0", children: jsxs("button", __assign({ type: "button", ref: ref, "aria-current": status === "active" ? "step" : undefined, className: 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: [jsx("div", { className: "h-ful relative flex items-center", children: jsx(
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
borderColor: "var(--active-border-color)",
|
|
3376
|
-
color: "var(--active-color)",
|
|
3377
|
-
},
|
|
3378
|
-
complete: {
|
|
3379
|
-
backgroundColor: "var(--complete-background-color)",
|
|
3380
|
-
borderColor: "var(--complete-border-color)",
|
|
3381
|
-
},
|
|
3382
|
-
}, 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" })) : (jsx("span", { children: stepIdx + 1 })) }) }) }) }) }), step.title && (jsx("div", { className: "max-w-full flex-1 text-start", children: jsx("div", { className: cn("text-small text-default-600 lg:text-medium font-medium transition-[color,opacity] duration-300 group-active:opacity-80", {
|
|
3383
|
-
"text-default-300": status === "inactive",
|
|
3384
|
-
}), children: step.title }) })), stepIdx < steps.length - 1 && !hideProgressBars && (jsx("div", { "aria-hidden": "true", className: "pointer-events-none absolute right-0 w-10 flex-none items-center", style: {
|
|
3385
|
-
// @ts-ignore
|
|
3329
|
+
return (jsx("li", { className: "relative flex w-full items-center pr-12 last:pr-0", children: jsxs("button", __assign({ type: "button", ref: ref, "aria-current": status === "active" ? "step" : undefined, className: 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: [jsx("div", { className: "h-ful relative flex items-center", children: jsx("div", { className: "relative", children: jsx("div", { className: 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", {
|
|
3330
|
+
"shadow-lg": status ===
|
|
3331
|
+
"complete",
|
|
3332
|
+
}), "data-status": status, style: getCircleStyle(status), children: jsx("div", { className: "flex items-center justify-center", children: status === "complete" ? (jsx(IconComponent, { className: "font-bold", style: {
|
|
3333
|
+
color: "var(--active-fg-color)",
|
|
3334
|
+
}, icon: "material-symbols:check-rounded" })) : (jsx("span", { children: stepIdx + 1 })) }) }) }) }), step.title && (jsx("div", { className: "max-w-full flex-1 text-start", children: jsx("div", { className: cn("text-small text-default-600 lg:text-medium font-medium transition-[color,opacity] duration-300 group-active:opacity-80", {
|
|
3335
|
+
"text-default-300": status ===
|
|
3336
|
+
"inactive",
|
|
3337
|
+
}), children: step.title }) })), stepIdx < steps.length - 1 &&
|
|
3338
|
+
!hideProgressBars && (jsx("div", { "aria-hidden": "true", className: "pointer-events-none absolute right-0 w-10 flex-none items-center", style: {
|
|
3386
3339
|
"--idx": stepIdx,
|
|
3387
3340
|
}, children: jsx("div", { className: 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-['']", {
|
|
3388
|
-
"after:w-full": stepIdx <
|
|
3341
|
+
"after:w-full": stepIdx <
|
|
3342
|
+
currentStep,
|
|
3389
3343
|
}) }) }))] }), stepIdx) }, stepIdx));
|
|
3390
3344
|
}) }) }));
|
|
3391
3345
|
});
|
|
@@ -3809,7 +3763,7 @@ var Select = function (_a) {
|
|
|
3809
3763
|
return (jsx("div", { className: "group", children: jsx(Select$1, __assign({}, props, { id: selectId, label: label, labelPlacement: "outside", placeholder: placeholder, variant: variant, size: size, radius: radius, classNames: {
|
|
3810
3764
|
label: "text-default-600 text-tiny group-data-[filled=true]:text-default-600",
|
|
3811
3765
|
trigger: "data-[open=true]:!border-primary-500 data-[focus=true]:!border-primary-500 data-[disabled=true]:bg-default-100",
|
|
3812
|
-
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",
|
|
3766
|
+
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",
|
|
3813
3767
|
} })) }));
|
|
3814
3768
|
};
|
|
3815
3769
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoComplete.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete/AutoComplete.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAelE;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"AutoComplete.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete/AutoComplete.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAelE;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA8C5D,CAAC"}
|
|
@@ -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;
|
|
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;AAEtE,eAAO,MAAM,gBAAgB,8FAyF5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RowSteps.d.ts","sourceRoot":"","sources":["../../../../src/components/row-steps/RowSteps.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RowSteps.d.ts","sourceRoot":"","sources":["../../../../src/components/row-steps/RowSteps.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAgB,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAwDpE,eAAO,MAAM,QAAQ,yFAkKpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerticalSteps.d.ts","sourceRoot":"","sources":["../../../../src/components/vertical-steps/VerticalSteps.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VerticalSteps.d.ts","sourceRoot":"","sources":["../../../../src/components/vertical-steps/VerticalSteps.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAEX,kBAAkB,EAElB,MAAM,uBAAuB,CAAC;AA4D/B,eAAO,MAAM,aAAa,8FA8LzB,CAAC"}
|
|
@@ -10,18 +10,6 @@ export type Step = {
|
|
|
10
10
|
isStepValid?: boolean;
|
|
11
11
|
isCompleted?: boolean;
|
|
12
12
|
};
|
|
13
|
-
export interface VerticalStepColorVars {
|
|
14
|
-
stepColor?: string;
|
|
15
|
-
stepFgColor?: string;
|
|
16
|
-
activeColor?: string;
|
|
17
|
-
activeFgColor?: string;
|
|
18
|
-
activeBorderColor?: string;
|
|
19
|
-
completeBackgroundColor?: string;
|
|
20
|
-
completeBorderColor?: string;
|
|
21
|
-
inactiveBorderColor?: string;
|
|
22
|
-
inactiveColor?: string;
|
|
23
|
-
inactiveBarColor?: string;
|
|
24
|
-
}
|
|
25
13
|
export interface VerticalStepsProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
26
14
|
/**
|
|
27
15
|
* The steps to display. It can be a number or an array of steps.
|
|
@@ -74,10 +62,5 @@ export interface VerticalStepsProps extends React.HTMLAttributes<HTMLButtonEleme
|
|
|
74
62
|
* The translations for the component.
|
|
75
63
|
*/
|
|
76
64
|
translations?: VerticalStepsTranslations;
|
|
77
|
-
/**
|
|
78
|
-
* CSS variable overrides for step colors.
|
|
79
|
-
* Applied as inline styles to avoid Tailwind purging in production builds.
|
|
80
|
-
*/
|
|
81
|
-
colorVars?: VerticalStepColorVars;
|
|
82
65
|
}
|
|
83
66
|
//# sourceMappingURL=VerticalSteps.types.d.ts.map
|
|
@@ -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,
|
|
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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/vertical-steps/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/vertical-steps/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC"}
|