@mailstep/design-system 0.6.63-beta.3 → 0.6.63

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.63-beta.3",
3
+ "version": "0.6.63",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "main": "./ui/index.js",
@@ -8,10 +8,9 @@ export var Stepper = function (_a) {
8
8
  return null;
9
9
  var Component = useMemo(function () { return items[activeStep].component; }, [items, activeStep]);
10
10
  useEffect(function () {
11
- var _a, _b;
12
- console.log(!!activeStep, activeStep - 1, !((_a = items[activeStep - 1]) === null || _a === void 0 ? void 0 : _a.completed));
13
- if (!!activeStep && !((_b = items[activeStep - 1]) === null || _b === void 0 ? void 0 : _b.completed)) {
14
- handleChangeStep(0);
11
+ var _a;
12
+ if (!!activeStep && !((_a = items[activeStep - 1]) === null || _a === void 0 ? void 0 : _a.completed)) {
13
+ handleChangeStep(0)();
15
14
  }
16
15
  }, [items]);
17
16
  return (_jsxs(Container, { children: [_jsx(ItemsWrapper, { children: items.map(function (_a, index) {
package/ui/index.es.js CHANGED
@@ -52083,8 +52083,8 @@ const USe = /* @__PURE__ */ Ra(_Se), ZSe = q.div`
52083
52083
  return null;
52084
52084
  const o = Xe(() => e[t].component, [e, t]);
52085
52085
  return vt(() => {
52086
- var l, c;
52087
- console.log(!!t, t - 1, !((l = e[t - 1]) != null && l.completed)), t && !((c = e[t - 1]) != null && c.completed) && r(0);
52086
+ var l;
52087
+ t && !((l = e[t - 1]) != null && l.completed) && r(0)();
52088
52088
  }, [e]), /* @__PURE__ */ g.jsxs(KSe, { children: [
52089
52089
  /* @__PURE__ */ g.jsx(qSe, { children: e.map(({
52090
52090
  title: l,
package/ui/index.umd.js CHANGED
@@ -3933,7 +3933,7 @@ ${ee.current.stack}
3933
3933
  `,ZEe=q.div`
3934
3934
  display: flex;
3935
3935
  margin-bottom: 36px;
3936
- `,YEe=({items:e,activeStep:t,handleChangeStep:r,handleGoToNextStep:n,isLoading:i})=>{if(!(e!=null&&e.length))return null;const o=I.useMemo(()=>e[t].component,[e,t]);return I.useEffect(()=>{var l,u;console.log(!!t,t-1,!((l=e[t-1])!=null&&l.completed)),t&&!((u=e[t-1])!=null&&u.completed)&&r(0)},[e]),g.jsxs(UEe,{children:[g.jsx(ZEe,{children:e.map(({title:l,disabled:u,completed:c},f)=>g.jsx(_Ee,{onClick:r(f),title:l,index:f,activeStep:t,disabled:u,completed:c},l))}),g.jsx(o,{handleGoToNextStep:n,isLoading:i})]})},XEe=({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}},JEe=q(rt.div)`
3936
+ `,YEe=({items:e,activeStep:t,handleChangeStep:r,handleGoToNextStep:n,isLoading:i})=>{if(!(e!=null&&e.length))return null;const o=I.useMemo(()=>e[t].component,[e,t]);return I.useEffect(()=>{var l;t&&!((l=e[t-1])!=null&&l.completed)&&r(0)()},[e]),g.jsxs(UEe,{children:[g.jsx(ZEe,{children:e.map(({title:l,disabled:u,completed:c},f)=>g.jsx(_Ee,{onClick:r(f),title:l,index:f,activeStep:t,disabled:u,completed:c},l))}),g.jsx(o,{handleGoToNextStep:n,isLoading:i})]})},XEe=({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}},JEe=q(rt.div)`
3937
3937
  margin-right: 1em;
3938
3938
  `,QEe=q.div`
3939
3939
  display: flex;