fui-fancyui
Version:
FancyUI Libary
56 lines (55 loc) • 1.55 kB
JavaScript
"use client";
import { jsx as o, jsxs as h } from "react/jsx-runtime";
import u from "react";
import S from "../ActionItem/ActionItem.js";
import { globalElementSizes as y } from "../../../design/theme/globalSizes.js";
import { StepperContainer as k, ModifiedLine as T } from "./Stepper.style.js";
import { FlexToDirectionMapper as z } from "./TStepper.model.js";
import { StepperButton as A } from "./utils/StepperButton.js";
function M(p) {
const {
size: r = "md",
steps: l,
flexDirection: n = "row",
layer: a = 3,
lineLength: s,
activeStep: t = 1,
labelAlign: d = "bottom",
gap: b = "md",
thinkness: f = "2px",
themeType: m = "primary",
...g
} = p, c = y[r];
return /* @__PURE__ */ o(k, { direction: n, align: "center", gap: b, children: l.map((i, e) => /* @__PURE__ */ h(u.Fragment, { children: [
/* @__PURE__ */ o(A, { onClick: i.onClick, disabled: i.disabled, children: /* @__PURE__ */ o(
S,
{
size: r,
themeType: m,
outlined: e > t - 1,
layer: e === t - 1 ? 0 : a,
labelAlign: d,
icon: i.icon,
label: i.label,
isActive: e === t - 1,
disabled: e < t - 1 || i.disabled,
...g
}
) }),
e < l.length - 1 && /* @__PURE__ */ o(
T,
{
direction: z[n],
thickness: f,
themeType: t - 1 > e ? "accent" : m,
layer: a,
$disabled: e < t - 1,
length: s ?? c,
$marginTop: c
}
)
] }, e)) });
}
export {
M as default
};