@mailstep/design-system 0.6.75-beta.2 → 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
|
@@ -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;
|
|
@@ -39,7 +39,7 @@ var StyledSpaceAroundWrap = styled(SpaceAroundWrap)(templateObject_1 || (templat
|
|
|
39
39
|
var labelPosition = _a.labelPosition;
|
|
40
40
|
return (isHorizontal(labelPosition) ? 'margin-top: 1rem' : '');
|
|
41
41
|
});
|
|
42
|
-
var StyledFieldLabel = styled(FieldLabel)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n ", "\n"], ["\n ", "\n ", "\n"])), function (_a) {
|
|
42
|
+
var StyledFieldLabel = styled(FieldLabel)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n cursor: pointer;\n ", "\n ", "\n"], ["\n cursor: pointer;\n ", "\n ", "\n"])), function (_a) {
|
|
43
43
|
var labelPosition = _a.labelPosition;
|
|
44
44
|
return (isHorizontal(labelPosition) ? 'margin-bottom: 0;' : '');
|
|
45
45
|
}, function (_a) {
|
package/ui/index.es.js
CHANGED
|
@@ -24263,6 +24263,7 @@ const sie = $.div`
|
|
|
24263
24263
|
labelPosition: e
|
|
24264
24264
|
}) => iR(e) ? "margin-top: 1rem" : ""}
|
|
24265
24265
|
`, hie = $(Vg)`
|
|
24266
|
+
cursor: pointer;
|
|
24266
24267
|
${({
|
|
24267
24268
|
labelPosition: e
|
|
24268
24269
|
}) => iR(e) ? "margin-bottom: 0;" : ""}
|
|
@@ -51738,8 +51739,8 @@ const vke = /* @__PURE__ */ Da(gke), mke = st`
|
|
|
51738
51739
|
const [t, r] = Fe(0), [n, i] = Fe(!1), o = Ce(() => {
|
|
51739
51740
|
r(0), i(!1);
|
|
51740
51741
|
}, []), l = Ce(() => {
|
|
51741
|
-
if (t + 1 === e) {
|
|
51742
|
-
o(), i(!0);
|
|
51742
|
+
if (console.log("handleGoToNextStep"), t + 1 === e) {
|
|
51743
|
+
console.log("success, reset"), o(), i(!0);
|
|
51743
51744
|
return;
|
|
51744
51745
|
}
|
|
51745
51746
|
r(t + 1);
|
package/ui/index.umd.js
CHANGED
|
@@ -1689,6 +1689,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1689
1689
|
justify-content: ${({labelPosition:e})=>e==="right"?"flex-end":"flex-start"};
|
|
1690
1690
|
${({labelPosition:e})=>MM(e)?"margin-top: 1rem":""}
|
|
1691
1691
|
`,uae=ee(E0)`
|
|
1692
|
+
cursor: pointer;
|
|
1692
1693
|
${({labelPosition:e})=>MM(e)?"margin-bottom: 0;":""}
|
|
1693
1694
|
${({labelPosition:e})=>e==="left"?"margin-right: 1rem;":e==="right"?"margin-left: 1rem;":""}
|
|
1694
1695
|
`,cae=nt`
|
|
@@ -3952,7 +3953,7 @@ ${$.current.stack}
|
|
|
3952
3953
|
flex-direction: row;
|
|
3953
3954
|
width: auto;
|
|
3954
3955
|
}
|
|
3955
|
-
`,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)`
|
|
3956
3957
|
margin-right: 1em;
|
|
3957
3958
|
`,SOe=ee.div`
|
|
3958
3959
|
display: flex;
|