@facter/ds-core 1.3.0 → 1.3.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/index.js +20 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6825,19 +6825,26 @@ function WizardNavigation({
|
|
|
6825
6825
|
const {
|
|
6826
6826
|
isFirstStep,
|
|
6827
6827
|
isLastStep,
|
|
6828
|
+
currentStep,
|
|
6828
6829
|
goToNextStep,
|
|
6829
6830
|
goToPrevStep,
|
|
6830
6831
|
form
|
|
6831
6832
|
} = useWizardContext();
|
|
6832
6833
|
const isSubmitting = form.formState.isSubmitting;
|
|
6833
6834
|
const shouldShowCancel = showCancel ?? isFirstStep;
|
|
6834
|
-
const handleNext = React48.useCallback(async () => {
|
|
6835
|
+
const handleNext = React48.useCallback(async (e) => {
|
|
6836
|
+
e.preventDefault();
|
|
6837
|
+
e.stopPropagation();
|
|
6835
6838
|
await goToNextStep();
|
|
6836
6839
|
}, [goToNextStep]);
|
|
6837
|
-
const handlePrev = React48.useCallback(() => {
|
|
6840
|
+
const handlePrev = React48.useCallback((e) => {
|
|
6841
|
+
e.preventDefault();
|
|
6842
|
+
e.stopPropagation();
|
|
6838
6843
|
goToPrevStep();
|
|
6839
6844
|
}, [goToPrevStep]);
|
|
6840
|
-
const handleCancel = React48.useCallback(() => {
|
|
6845
|
+
const handleCancel = React48.useCallback((e) => {
|
|
6846
|
+
e.preventDefault();
|
|
6847
|
+
e.stopPropagation();
|
|
6841
6848
|
onCancel?.();
|
|
6842
6849
|
}, [onCancel]);
|
|
6843
6850
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -6857,7 +6864,8 @@ function WizardNavigation({
|
|
|
6857
6864
|
disabled: isSubmitting,
|
|
6858
6865
|
className: "w-full sm:w-auto",
|
|
6859
6866
|
children: cancelLabel
|
|
6860
|
-
}
|
|
6867
|
+
},
|
|
6868
|
+
"cancel"
|
|
6861
6869
|
) : !isFirstStep ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6862
6870
|
Button,
|
|
6863
6871
|
{
|
|
@@ -6867,7 +6875,8 @@ function WizardNavigation({
|
|
|
6867
6875
|
disabled: isSubmitting,
|
|
6868
6876
|
className: "w-full sm:w-auto",
|
|
6869
6877
|
children: prevLabel
|
|
6870
|
-
}
|
|
6878
|
+
},
|
|
6879
|
+
"prev-left"
|
|
6871
6880
|
) : /* @__PURE__ */ jsxRuntime.jsx("div", {}) }),
|
|
6872
6881
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
6873
6882
|
!isFirstStep && shouldShowCancel && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6878,7 +6887,8 @@ function WizardNavigation({
|
|
|
6878
6887
|
onClick: handlePrev,
|
|
6879
6888
|
disabled: isSubmitting,
|
|
6880
6889
|
children: prevLabel
|
|
6881
|
-
}
|
|
6890
|
+
},
|
|
6891
|
+
"prev-right"
|
|
6882
6892
|
),
|
|
6883
6893
|
isLastStep ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6884
6894
|
Button,
|
|
@@ -6890,7 +6900,8 @@ function WizardNavigation({
|
|
|
6890
6900
|
/* @__PURE__ */ jsxRuntime.jsx(Loader, { variant: "spinner" }),
|
|
6891
6901
|
loadingLabel
|
|
6892
6902
|
] }) : submitLabel
|
|
6893
|
-
}
|
|
6903
|
+
},
|
|
6904
|
+
`submit-step-${currentStep}`
|
|
6894
6905
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
6895
6906
|
Button,
|
|
6896
6907
|
{
|
|
@@ -6899,7 +6910,8 @@ function WizardNavigation({
|
|
|
6899
6910
|
disabled: isSubmitting,
|
|
6900
6911
|
className: "min-w-[120px]",
|
|
6901
6912
|
children: nextLabel
|
|
6902
|
-
}
|
|
6913
|
+
},
|
|
6914
|
+
`next-step-${currentStep}`
|
|
6903
6915
|
)
|
|
6904
6916
|
] })
|
|
6905
6917
|
]
|