@mailstep/design-system 0.6.75-beta.5 → 0.6.75-beta.6
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/package.json +1 -1
- package/ui/Blocks/Stepper/Stepper.js +1 -0
- package/ui/index.es.js +1 -1
- package/ui/index.umd.js +1 -1
package/package.json
CHANGED
|
@@ -8,6 +8,7 @@ export var Stepper = function (_a) {
|
|
|
8
8
|
useEffect(function () {
|
|
9
9
|
var _a;
|
|
10
10
|
if (!!activeStep && !((_a = items[activeStep - 1]) === null || _a === void 0 ? void 0 : _a.completed)) {
|
|
11
|
+
console.log('USE EFFECT RESET');
|
|
11
12
|
handleChangeStep === null || handleChangeStep === void 0 ? void 0 : handleChangeStep(0)();
|
|
12
13
|
}
|
|
13
14
|
}, [items]);
|
package/ui/index.es.js
CHANGED
|
@@ -51722,7 +51722,7 @@ const vke = /* @__PURE__ */ Da(gke), mke = st`
|
|
|
51722
51722
|
}, [e, t]);
|
|
51723
51723
|
return At(() => {
|
|
51724
51724
|
var c;
|
|
51725
|
-
t && !((c = e[t - 1]) != null && c.completed) && (n == null || n(0)());
|
|
51725
|
+
t && !((c = e[t - 1]) != null && c.completed) && (console.log("USE EFFECT RESET"), n == null || n(0)());
|
|
51726
51726
|
}, [e]), e != null && e.length ? /* @__PURE__ */ g.jsxs(xke, { children: [
|
|
51727
51727
|
/* @__PURE__ */ g.jsx(Ske, { total: e.length, hasComponent: !!l, children: e.map(({
|
|
51728
51728
|
title: c,
|
package/ui/index.umd.js
CHANGED
|
@@ -3953,7 +3953,7 @@ ${$.current.stack}
|
|
|
3953
3953
|
flex-direction: row;
|
|
3954
3954
|
width: auto;
|
|
3955
3955
|
}
|
|
3956
|
-
`,COe=({items:e,activeStep:t,hasStepNumbering:r,handleChangeStep:n,handleGoToNextStep:i,isLoading:o})=>{const l=I.useMemo(()=>{var u;return(u=e[t])==null?void 0:u.component},[e,t]);return I.useEffect(()=>{var u;t&&!((u=e[t-1])!=null&&u.completed)&&(n==null||n(0)())},[e]),e!=null&&e.length?g.jsxs(bOe,{children:[g.jsx(yOe,{total:e.length,hasComponent:!!l,children:e.map(({title:u,disabled:c,visible:f,completed:A,icon:p},v)=>g.jsx(mOe,{onClick:n==null?void 0:n(v),title:u,index:v,total:e.length,activeStep:t,disabled:c,visible:f,completed:A,hasStepNumbering:r,icon:p},u))}),l&&g.jsx(l,{handleGoToNextStep:i,isLoading:o})]}):null},wOe=({totalSteps:e})=>{const[t,r]=I.useState(0),[n,i]=I.useState(!1),o=I.useCallback(()=>{console.log("RESET"),r(0),i(!1)},[]),l=I.useCallback(()=>{if(console.log("handleGoToNextStep"),t+1===e){console.log("success, reset"),o(),i(!0);return}console.log("SET ACTIVE STEP",t+1),r(t+1)},[t,e,o]),u=I.useCallback(c=>()=>{console.log("handleChangeStep"),r(c)},[]);return{activeStep:t,handleChangeStep:u,handleGoToNextStep:l,isSuccess:n,handleReset:o}},xOe=ee(tt.div)`
|
|
3956
|
+
`,COe=({items:e,activeStep:t,hasStepNumbering:r,handleChangeStep:n,handleGoToNextStep:i,isLoading:o})=>{const l=I.useMemo(()=>{var u;return(u=e[t])==null?void 0:u.component},[e,t]);return I.useEffect(()=>{var u;t&&!((u=e[t-1])!=null&&u.completed)&&(console.log("USE EFFECT RESET"),n==null||n(0)())},[e]),e!=null&&e.length?g.jsxs(bOe,{children:[g.jsx(yOe,{total:e.length,hasComponent:!!l,children:e.map(({title:u,disabled:c,visible:f,completed:A,icon:p},v)=>g.jsx(mOe,{onClick:n==null?void 0:n(v),title:u,index:v,total:e.length,activeStep:t,disabled:c,visible:f,completed:A,hasStepNumbering:r,icon:p},u))}),l&&g.jsx(l,{handleGoToNextStep:i,isLoading:o})]}):null},wOe=({totalSteps:e})=>{const[t,r]=I.useState(0),[n,i]=I.useState(!1),o=I.useCallback(()=>{console.log("RESET"),r(0),i(!1)},[]),l=I.useCallback(()=>{if(console.log("handleGoToNextStep"),t+1===e){console.log("success, reset"),o(),i(!0);return}console.log("SET ACTIVE STEP",t+1),r(t+1)},[t,e,o]),u=I.useCallback(c=>()=>{console.log("handleChangeStep"),r(c)},[]);return{activeStep:t,handleChangeStep:u,handleGoToNextStep:l,isSuccess:n,handleReset:o}},xOe=ee(tt.div)`
|
|
3957
3957
|
margin-right: 1em;
|
|
3958
3958
|
`,SOe=ee.div`
|
|
3959
3959
|
display: flex;
|