greenole-design-system 1.1.89 → 1.1.90

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.
@@ -2206,7 +2206,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Y8]+=1);const p1={h1:B`
2206
2206
  cursor: pointer;
2207
2207
  ${({$direction:e})=>e==="right"&&"right: 16px;"}
2208
2208
  ${({$direction:e})=>e==="left"&&"left: 16px;"}
2209
- `,BC=({show:e,title:t,subtitle:n,children:r,width:s,isMobile:o=!1,showOverlay:a=!1,cancelButtonText:l,confirmButtonText:c,direction:h="right",cancelButton:u,confirmButton:f,steps:C,activeStep:g,timelineShowEdgeSpacing:m=!1,container:v,onStepChange:x,onClose:E,onCancel:L,onConfirm:k,t:w})=>{const[y,b]=d.useState(e),[M,j]=d.useState(1),Z=g!==void 0,$=Z?g:M,{t:P}=n1(),z=w||P,N=l??z("COMMON_TEXTS.CANCEL",{defaultValue:"Cancel"}),A=c??z("COMMON_TEXTS.CONFIRM",{defaultValue:"Confirm"}),{isMobileOrTablet:T}=j0(),I=o||T;d.useEffect(()=>{const F=e&&a;if(!globalThis.location.href.includes("iframe.html"))return F&&(document.body.style.overflow="hidden",document.body.classList.add("modal-open")),()=>{document.body.style.overflow="",document.body.classList.remove("modal-open")}},[e,a]),d.useEffect(()=>{if(e)b(!0);else{const F=setTimeout(()=>b(!1),300);return()=>clearTimeout(F)}},[e]),d.useEffect(()=>{Z||x==null||x(M)},[M,Z,x]),d.useEffect(()=>{g!==void 0&&j(g)},[g]),d.useEffect(()=>{e&&!Z&&j(1)},[e,Z]);const _=F=>{if(Z){x==null||x(F);return}j(F)};return y?t1.createPortal(i.jsxs(i.Fragment,{children:[a&&i.jsx(SC,{$show:e,onClick:E}),i.jsxs(AC,{$show:e,$isMobile:I,$width:s,$direction:h,children:[E&&i.jsx(RC,{onClick:E,type:"button",$direction:h,children:i.jsx(i1,{})}),(t||n)&&i.jsxs(TC,{$direction:h,children:[t&&i.jsx(PC,{children:t}),n&&i.jsx(OC,{children:n})]}),(C==null?void 0:C.length)&&i.jsx(DC,{children:i.jsx(oi,{steps:C,activeStep:$,onStepClick:_,template:"step",showEdgeSpacing:m,disableStepAnimation:!0})}),i.jsx(FC,{$direction:h,children:r}),(L||k)&&i.jsxs($C,{$direction:h,children:[u??i.jsx(G0,{type:"button",color:"danger",variant:"tertiary",onClick:L,children:N}),f??i.jsx(G0,{type:"button",onClick:k,children:A})]})]})]}),v||document.body):null},IC=H.div`
2209
+ `,BC=({show:e,title:t,subtitle:n,children:r,width:s,isMobile:o=!1,showOverlay:a=!1,cancelButtonText:l,confirmButtonText:c,direction:h="right",cancelButton:u,confirmButton:f,steps:C,activeStep:g,timelineShowEdgeSpacing:m=!1,container:v,onStepChange:x,onClose:E,onCancel:L,onConfirm:k,t:w})=>{const[y,b]=d.useState(e),[M,j]=d.useState(1),Z=g!==void 0,$=Z?g:M,{t:P}=n1(),z=w||P,N=l??z("COMMON_TEXTS.CANCEL",{defaultValue:"Cancel"}),A=c??z("COMMON_TEXTS.CONFIRM",{defaultValue:"Confirm"}),{isMobileOrTablet:T}=j0(),I=o||T;d.useEffect(()=>{const F=e&&a;if(!globalThis.location.href.includes("iframe.html"))return F&&(document.body.style.overflow="hidden",document.body.classList.add("modal-open")),()=>{document.body.style.overflow="",document.body.classList.remove("modal-open")}},[e,a]),d.useEffect(()=>{if(e)b(!0);else{const F=setTimeout(()=>b(!1),300);return()=>clearTimeout(F)}},[e]),d.useEffect(()=>{Z||x==null||x(M)},[M,Z,x]),d.useEffect(()=>{g!==void 0&&j(g)},[g]),d.useEffect(()=>{e&&!Z&&j(1)},[e,Z]);const _=F=>{if(Z){x==null||x(F);return}j(F)};return y?t1.createPortal(i.jsxs(i.Fragment,{children:[a&&i.jsx(SC,{$show:e,onClick:E}),i.jsxs(AC,{$show:e,$isMobile:I,$width:s,$direction:h,children:[E&&i.jsx(RC,{onClick:E,type:"button",$direction:h,children:i.jsx(i1,{})}),(t||n)&&i.jsxs(TC,{$direction:h,children:[t&&i.jsx(PC,{children:t}),n&&i.jsx(OC,{children:n})]}),(C==null?void 0:C.length)&&i.jsx(DC,{children:i.jsx(oi,{steps:C,activeStep:$,onStepClick:_,template:"step",showEdgeSpacing:m,centerEdgeLabels:!0,disableStepAnimation:!0})}),i.jsx(FC,{$direction:h,children:r}),(L||k)&&i.jsxs($C,{$direction:h,children:[u??i.jsx(G0,{type:"button",color:"danger",variant:"tertiary",onClick:L,children:N}),f??i.jsx(G0,{type:"button",onClick:k,children:A})]})]})]}),v||document.body):null},IC=H.div`
2210
2210
  display: flex;
2211
2211
  flex-direction: column;
2212
2212
  align-items: center;
@@ -12846,6 +12846,7 @@ const zC = {
12846
12846
  onStepClick: N,
12847
12847
  template: "step",
12848
12848
  showEdgeSpacing: g,
12849
+ centerEdgeLabels: !0,
12849
12850
  disableStepAnimation: !0
12850
12851
  }
12851
12852
  ) }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "greenole-design-system",
3
- "version": "1.1.89",
3
+ "version": "1.1.90",
4
4
  "type": "module",
5
5
  "main": "dist/greenole-design-system.cjs.js",
6
6
  "module": "dist/greenole-design-system.js",