@mailstep/design-system 0.6.75-beta.3 → 0.6.75-beta.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailstep/design-system",
3
- "version": "0.6.75-beta.3",
3
+ "version": "0.6.75-beta.4",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "main": "./ui/index.js",
@@ -8,7 +8,9 @@ export var useStepper = function (_a) {
8
8
  setSuccess(false);
9
9
  }, []);
10
10
  var handleGoToNextStep = useCallback(function () {
11
+ console.log('handleGoToNextStep');
11
12
  if (activeStep + 1 === totalSteps) {
13
+ console.log('success, reset');
12
14
  handleReset();
13
15
  setSuccess(true);
14
16
  return;
package/ui/index.es.js CHANGED
@@ -51739,8 +51739,8 @@ const vke = /* @__PURE__ */ Da(gke), mke = st`
51739
51739
  const [t, r] = Fe(0), [n, i] = Fe(!1), o = Ce(() => {
51740
51740
  r(0), i(!1);
51741
51741
  }, []), l = Ce(() => {
51742
- if (t + 1 === e) {
51743
- o(), i(!0);
51742
+ if (console.log("handleGoToNextStep"), t + 1 === e) {
51743
+ console.log("success, reset"), o(), i(!0);
51744
51744
  return;
51745
51745
  }
51746
51746
  r(t + 1);
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(()=>{r(0),i(!1)},[]),l=I.useCallback(()=>{if(t+1===e){o(),i(!0);return}r(t+1)},[t,e,o]),u=I.useCallback(c=>()=>{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)&&(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(()=>{r(0),i(!1)},[]),l=I.useCallback(()=>{if(console.log("handleGoToNextStep"),t+1===e){console.log("success, reset"),o(),i(!0);return}r(t+1)},[t,e,o]),u=I.useCallback(c=>()=>{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;