nectiasw 0.0.76 → 0.0.77
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/components/Stepper/styles.d.ts +5 -0
- package/dist/index.es.js +20 -6
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -61058,11 +61058,16 @@ const Dragarea = React__default.memo(
|
|
|
61058
61058
|
const classes = {
|
|
61059
61059
|
container: "flex items-center w-[562px] text-xs text-gray-900 font-medium sm:text-base",
|
|
61060
61060
|
lastItem: "flex w-full relative text-gray-900",
|
|
61061
|
-
stepItem: "
|
|
61062
|
-
stepItemDisabled: "flex w-full relative
|
|
61061
|
+
stepItem: "flex w-full relative text-gray-900 after:content-[''] after:w-full after:h-[6px] after:bg-primary after:inline-block after:absolute lg:after:top-6 after:top-3 after:left-4",
|
|
61062
|
+
stepItemDisabled: "flex w-full relative after:w-full after:h-[6px] after:bg-primary/30 after:inline-block after:absolute lg:after:top-6 after:top-3 after:left-4",
|
|
61063
61063
|
label: "absolute right-8 w-[107px] h-[38px] text-center",
|
|
61064
61064
|
button: {
|
|
61065
|
-
index: "block z-10"
|
|
61065
|
+
index: "block z-10",
|
|
61066
|
+
root: "size-14 text-primary rounded-full flex justify-center items-center mx-auto mb-3 text-sm",
|
|
61067
|
+
selected: "bg-white border-4 border-primary",
|
|
61068
|
+
disabled: "bg-opaque border-4 border-primary/20 text-white/70 hover:bg-white hover:border-primary hover:text-primary pointer-events-none",
|
|
61069
|
+
normal: "bg-primary border-4 border-transparent text-white hover:bg-white hover:border-primary hover:text-primary",
|
|
61070
|
+
position: "font-bold text-2xl"
|
|
61066
61071
|
}
|
|
61067
61072
|
};
|
|
61068
61073
|
const Stepper = React__default.memo(({
|
|
@@ -61071,18 +61076,27 @@ const Stepper = React__default.memo(({
|
|
|
61071
61076
|
currentStep,
|
|
61072
61077
|
onStepChange
|
|
61073
61078
|
}) => {
|
|
61079
|
+
const getButtonClass = (stepId, isStepEnabled) => {
|
|
61080
|
+
if (currentStep === stepId)
|
|
61081
|
+
return `${classes.button.root} ${classes.button.selected}`;
|
|
61082
|
+
return isStepEnabled ? `${classes.button.root} ${classes.button.normal}` : `${classes.button.root} ${classes.button.disabled}`;
|
|
61083
|
+
};
|
|
61084
|
+
const getListItemClass = (index2, isStepEnabled) => {
|
|
61085
|
+
if (index2 === steps2.length - 1) return classes.lastItem;
|
|
61086
|
+
return isStepEnabled ? classes.stepItem : classes.stepItemDisabled;
|
|
61087
|
+
};
|
|
61074
61088
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("ol", { className: classes.container, children: steps2.map((step, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
61075
61089
|
"li",
|
|
61076
61090
|
{
|
|
61077
|
-
className: index2
|
|
61091
|
+
className: getListItemClass(index2, canProceed[index2]),
|
|
61078
61092
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes.button.index, children: [
|
|
61079
61093
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
61080
61094
|
"button",
|
|
61081
61095
|
{
|
|
61082
61096
|
disabled: !canProceed[index2],
|
|
61083
61097
|
onClick: () => onStepChange(step.id),
|
|
61084
|
-
className:
|
|
61085
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className:
|
|
61098
|
+
className: getButtonClass(step.id, canProceed[index2]),
|
|
61099
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: classes.button.position, children: step.id })
|
|
61086
61100
|
}
|
|
61087
61101
|
),
|
|
61088
61102
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|