@gem-sdk/components 2.0.0-staging.755 → 2.0.0-staging.757

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.
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";var core=require("@gem-sdk/core"),getInnerRadius=require("./getInnerRadius.js"),system=require("@gem-sdk/system"),helpers=require("./helpers.js"),helper=require("../../../post-purchase/utils/helper.js");const getRowStyle=e=>{let{children:t,setting:r,builderProps:o,styles:s,style:i,advanced:p,isNotFullWidth:l,parentStyle:a}=e,{isSection:n,layout:c,horizontalAlign:d,responsive:m,inlineAlignment:y}=r??{},{width:g,columnGap:u,rowGap:v,fullWidth:S,background:k,verticalGutter:h,verticalGutterMobile:R,enablePagePadding:b,height:x}=s??{},f=getInnerRadius.getInnerRadiusExcludeBorder(p?.border,p?.rounded),w=e=>{let t=e?.normal;if(!t||"square"===t.radiusType||"none"===t.radiusType)return!1;for(let e in t)if(Object.hasOwn(t,e)&&"0px"!==t[e])return!0;return!1},j=core.makeStyleResponsive("of",{desktop:w(f.desktop)?"hidden":void 0,tablet:w(f.tablet)?"hidden":void 0,mobile:w(f.mobile)?"hidden":void 0}),q=o?.builderData?.childrens?.length,B={...core.makeStyleResponsive("aspect",{desktop:"16/9"})},I=core.isEmptyChildren(t)||!q,D=helpers.createStyleObject(g,S),[O,C]=core.splitStyle(["pos","top","left","bottom","right","z"],i),E=()=>({...n?C:i,...core.makeStyleResponsive("cg",h),...core.makeStyleResponsive("rg",R),...c?core.composeGridLayout(c):core.makeStyleResponsive("gtc",m),...core.makeStyleResponsive("w",D.content),...core.makeStyleResponsive("h",x),...n?{}:j}),G=()=>({"--mb":"0px","--mt":"0px",...core.makeStyleResponsive("cg",u),...core.makeStyle({pc:y,rg:v?helper.postPurchaseViewSpacing[v]:"0px"})}),L=e=>({...core.getStyleBackgroundByDevice(k,e),...core.getGradientBgrStyleByDevice(k,{desktop:!0,tablet:!0,mobile:!0}),...core.makeStyleResponsive("pc",d)}),T=()=>{let e=l&&!I;return e?{marginLeft:"0px",marginRight:"0px"}:{}},z=()=>({...core.composeRadius(f)}),H=(e=!1)=>system.createStyle({...E(),...L(),...T(),...e?G():{},...r?.sameHeightSubgridContainer&&a}),P=system.createStyle({...z()}),V=system.createStyle({...B,"pointer-events":"none",transform:"translateY(-50%)",height:"100%","object-fit":"cover",top:"50%"}),Y={desktop:b?.desktop?"var(--g-ct-p, 15px)":void 0,tablet:b?.tablet?"var(--g-ct-p, 15px)":void 0,mobile:b?.mobile?"var(--g-ct-p, 15px)":void 0},A=system.createStyle({...O,...core.makeStyleResponsive("w",D.wrapper),...core.makeStyleResponsive("pl",Y),...core.makeStyleResponsive("pr",Y)});return{embedVideoStyle:V,backgroundBoxStyle:P,rowStyle:H,sectionStyle:A}};exports.getRowStyle=getRowStyle;
2
+ "use strict";var core=require("@gem-sdk/core"),getInnerRadius=require("./getInnerRadius.js"),system=require("@gem-sdk/system"),helpers=require("./helpers.js"),helper=require("../../../post-purchase/utils/helper.js");const getRowStyle=e=>{let{children:t,setting:r,builderProps:o,styles:s,style:i,advanced:n,isNotFullWidth:l,parentStyle:p}=e,{isSection:a,layout:c,horizontalAlign:d,responsive:m,inlineAlignment:y}=r??{},{width:u,columnGap:g,rowGap:S,fullWidth:k,background:v,verticalGutter:h,verticalGutterMobile:R,enablePagePadding:b,height:f}=s??{},x=getInnerRadius.getInnerRadiusExcludeBorder(n?.border,n?.rounded),w=e=>{let t=e?.normal;if(!t||"square"===t.radiusType||"none"===t.radiusType)return!1;for(let e in t)if(Object.hasOwn(t,e)&&"0px"!==t[e])return!0;return!1},j=core.makeStyleResponsive("of",{desktop:w(x.desktop)?"hidden":void 0,tablet:w(x.tablet)?"hidden":void 0,mobile:w(x.mobile)?"hidden":void 0}),q=o?.builderData?.childrens?.length,B={...core.makeStyleResponsive("aspect",{desktop:"16/9"})},I=core.isEmptyChildren(t)||!q,D=helpers.createStyleObject(u,k),[O,C]=core.splitStyle(["pos","top","left","bottom","right","z"],i),E=()=>({...a?C:i,...core.makeStyleResponsive("cg",h),...core.makeStyleResponsive("rg",R),...c?core.composeGridLayout(c):core.makeStyleResponsive("gtc",m),...core.makeStyleResponsive("w",D.content),...core.makeStyleResponsive("h",f),...a?{}:j}),G=()=>({"--mb":"0px","--mt":"0px",...core.makeStyleResponsive("cg",g),...core.makeStyle({pc:y,rg:S?helper.postPurchaseViewSpacing[S]:"0px"})}),L=e=>({...core.getStyleBackgroundByDevice(v,e),...core.getGradientBgrStyleByDevice(v,{desktop:!0,tablet:!0,mobile:!0}),...core.makeStyleResponsive("pc",d)}),T=()=>{let e=l&&!I;return e?{marginLeft:"0px",marginRight:"0px"}:{}},z=()=>({...core.composeRadius(x)}),H=(e=!1)=>system.createStyle({...E(),...L(),...T(),...e?G():{},...r?.sameHeightSubgridContainer&&p}),P=system.createStyle({...z()}),V=system.createStyle({...B,"pointer-events":"none",transform:"translateY(-50%)",height:"100%","object-fit":"cover",top:"50%"}),Y=e=>{if(void 0!==e)return e?"var(--g-ct-p, 15px)":"none"},A={desktop:Y(b?.desktop),tablet:Y(b?.tablet),mobile:Y(b?.mobile)},F=system.createStyle({...O,...core.makeStyleResponsive("w",D.wrapper),...core.makeStyleResponsive("pl",A),...core.makeStyleResponsive("pr",A)});return{embedVideoStyle:V,backgroundBoxStyle:P,rowStyle:H,sectionStyle:F}};exports.getRowStyle=getRowStyle;
@@ -1 +1 @@
1
- "use strict";var core=require("@gem-sdk/core");const addPxToValues=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,t?Object.fromEntries(Object.entries(t).map(([e,t])=>[e,`${t}px`])):{}])),getDividerWidth=e=>{if(!e)return{};let t=addPxToValues(e);return{...core.makeStyleResponsiveState("brw",t),...core.makeStyleResponsiveState("blw",t)}},getDividerColorStyle=e=>e?{...core.makeStyleResponsiveState("brc",e),...core.makeStyleResponsiveState("blc",e)}:{},getInputBorderRadius=({qtyStyle:e,corner:t})=>"minimalist"!==e?{}:{...core.composeRadius({...getDeviceRadius("desktop","mixed",t),...getDeviceRadius("tablet","mixed",t),...getDeviceRadius("mobile","mixed",t)})},getInputStyle=e=>{let{styles:t,setting:o}=e,{borderBtn:r,inputBackgroundColor:l,textColor:a,dividerColor:s,dividerStroke:d,corner:i,inputBoxShadow:b}=t??{},{qtyStyle:p}=o??{},n=core.composeTypographyStyle(t?.typo,t?.typography),c=getDividerWidth(d),S=getDividerColorStyle(s),y=core.getResponsiveStyleShadow(b,"box-shadow",{desktop:b?.desktop??{},tablet:b?.tablet??b?.desktop??{},mobile:b?.mobile??b?.tablet??b?.desktop??{}});return{...core.makeStyle({}),...n,...core.getGlobalColorStateStyle("bg",l),...core.getGlobalColorStateStyle("c",a),...core.handleConvertBorderStyle(r),...core.handleConvertInputBorderWidth(r,p),...core.handleConvertInputBorderColor(r),..."standard"===p?c:{},...S,...core.getStyleShadow({value:t?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:t?.typo?.custom?.hasShadowText}),...getInputBorderRadius({qtyStyle:p,corner:i}),...y}},getDeviceRadius=(e,t,o)=>{let r="left"===t||"mixed"===t,l="right"===t||"mixed"===t;return{[e]:{normal:{btlr:r?o?.[e]?.normal?.btlr:void 0,bblr:r?o?.[e]?.normal?.bblr:void 0,btrr:l?o?.[e]?.normal?.btrr:void 0,bbrr:l?o?.[e]?.normal?.bbrr:void 0,radiusType:o?.[e]?.normal?.radiusType??"custom"},hover:{btlr:r?o?.[e]?.hover?.btlr:void 0,bblr:r?o?.[e]?.hover?.bblr:void 0,btrr:l?o?.[e]?.hover?.btrr:void 0,bbrr:l?o?.[e]?.hover?.bbrr:void 0,radiusType:o?.[e]?.hover?.radiusType??"custom"}}}},getButtonStyle=({borderBtn:e,buttonWidth:t,buttonBackgroundColor:o,iconColor:r,corner:l,buttonSide:a,buttonBoxShadow:s})=>{let d=core.getResponsiveStyleShadow(s,"box-shadow",{desktop:s?.desktop??{},tablet:s?.tablet??s?.desktop??{},mobile:s?.mobile??s?.tablet??s?.desktop??{}});return{...core.makeStyleResponsive("w",t),...core.getGlobalColorStateStyle("bg",o),...core.getGlobalColorStateStyle("c",r),...core.handleConvertBorderStyle(e),...core.handleConvertBorderWidth(e),...core.handleConvertBorderColor(e),...core.composeRadius({...getDeviceRadius("desktop",a,l),...getDeviceRadius("tablet",a,l),...getDeviceRadius("mobile",a,l)}),...d}},getContainerStyles=({inputHeight:e,align:t})=>({...core.makeStyleResponsive("h",e),...core.makeStyleResponsive("jc",t)}),getWrapperStyles=({backgroundColor:e,styles:t})=>{let o=t?.shapeShadow,r=core.getResponsiveStyleShadow(o,"box-shadow",{desktop:o?.desktop??{},tablet:o?.tablet??o?.desktop??{},mobile:o?.mobile??o?.tablet??o?.desktop??{}});return{...core.getGlobalColorStateStyle("bg",e),...core.makeStyleResponsive("maxw",t?.quantityWidth),...r}};exports.getButtonStyle=getButtonStyle,exports.getContainerStyles=getContainerStyles,exports.getInputStyle=getInputStyle,exports.getWrapperStyles=getWrapperStyles;
1
+ "use strict";var core=require("@gem-sdk/core");const addPxToValues=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,t?Object.fromEntries(Object.entries(t).map(([e,t])=>[e,`${t}px`])):{}])),getDividerWidth=e=>{if(!e)return{};let t=addPxToValues(e);return{...core.makeStyleResponsiveState("brw",t),...core.makeStyleResponsiveState("blw",t)}},getDividerColorStyle=e=>{if(!e)return{};let t={...core.makeStyleResponsiveState("brc",e),...core.makeStyleResponsiveState("blc",e)},o=Object.fromEntries(Object.entries(t).filter(([e,t])=>void 0!==t));return o},getInputBorderRadius=({qtyStyle:e,corner:t})=>"minimalist"!==e?{}:{...core.composeRadius({...getDeviceRadius("desktop","mixed",t),...getDeviceRadius("tablet","mixed",t),...getDeviceRadius("mobile","mixed",t)})},getInputStyle=e=>{let{styles:t,setting:o}=e,{borderBtn:r,inputBackgroundColor:l,textColor:a,dividerColor:s,dividerStroke:i,corner:d,inputBoxShadow:b}=t??{},{qtyStyle:n}=o??{},p=core.composeTypographyStyle(t?.typo,t?.typography),c=getDividerWidth(i),S=getDividerColorStyle(s),y=core.getResponsiveStyleShadow(b,"box-shadow",{desktop:b?.desktop??{},tablet:b?.tablet??b?.desktop??{},mobile:b?.mobile??b?.tablet??b?.desktop??{}});return{...core.makeStyle({}),...p,...core.getGlobalColorStateStyle("bg",l),...core.getGlobalColorStateStyle("c",a),...core.handleConvertBorderStyle(r),...core.handleConvertInputBorderWidth(r,n),...core.handleConvertInputBorderColor(r),..."standard"===n?c:{},...S,...core.getStyleShadow({value:t?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:t?.typo?.custom?.hasShadowText}),...getInputBorderRadius({qtyStyle:n,corner:d}),...y}},getDeviceRadius=(e,t,o)=>{let r="left"===t||"mixed"===t,l="right"===t||"mixed"===t;return{[e]:{normal:{btlr:r?o?.[e]?.normal?.btlr:void 0,bblr:r?o?.[e]?.normal?.bblr:void 0,btrr:l?o?.[e]?.normal?.btrr:void 0,bbrr:l?o?.[e]?.normal?.bbrr:void 0,radiusType:o?.[e]?.normal?.radiusType??"custom"},hover:{btlr:r?o?.[e]?.hover?.btlr:void 0,bblr:r?o?.[e]?.hover?.bblr:void 0,btrr:l?o?.[e]?.hover?.btrr:void 0,bbrr:l?o?.[e]?.hover?.bbrr:void 0,radiusType:o?.[e]?.hover?.radiusType??"custom"}}}},getButtonStyle=({borderBtn:e,buttonWidth:t,buttonBackgroundColor:o,iconColor:r,corner:l,buttonSide:a,buttonBoxShadow:s})=>{let i=core.getResponsiveStyleShadow(s,"box-shadow",{desktop:s?.desktop??{},tablet:s?.tablet??s?.desktop??{},mobile:s?.mobile??s?.tablet??s?.desktop??{}});return{...core.makeStyleResponsive("w",t),...core.getGlobalColorStateStyle("bg",o),...core.getGlobalColorStateStyle("c",r),...core.handleConvertBorderStyle(e),...core.handleConvertBorderWidth(e),...core.handleConvertBorderColor(e),...core.composeRadius({...getDeviceRadius("desktop",a,l),...getDeviceRadius("tablet",a,l),...getDeviceRadius("mobile",a,l)}),...i}},getContainerStyles=({inputHeight:e,align:t})=>({...core.makeStyleResponsive("h",e),...core.makeStyleResponsive("jc",t)}),getWrapperStyles=({backgroundColor:e,styles:t})=>{let o=t?.shapeShadow,r=core.getResponsiveStyleShadow(o,"box-shadow",{desktop:o?.desktop??{},tablet:o?.tablet??o?.desktop??{},mobile:o?.mobile??o?.tablet??o?.desktop??{}});return{...core.getGlobalColorStateStyle("bg",e),...core.makeStyleResponsive("maxw",t?.quantityWidth),...r}};exports.getButtonStyle=getButtonStyle,exports.getContainerStyles=getContainerStyles,exports.getInputStyle=getInputStyle,exports.getWrapperStyles=getWrapperStyles;
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{makeStyleResponsive as e,isEmptyChildren as t,splitStyle as r,composeRadius as o,composeGridLayout as p,makeStyle as i,getStyleBackgroundByDevice as n,getGradientBgrStyleByDevice as d}from"@gem-sdk/core";import{getInnerRadiusExcludeBorder as s}from"./getInnerRadius.js";import{createStyle as l}from"@gem-sdk/system";import{createStyleObject as a}from"./helpers.js";import{postPurchaseViewSpacing as m}from"../../../post-purchase/utils/helper.js";let getRowStyle=g=>{let{children:b,setting:c,builderProps:h,styles:u,style:f,advanced:v,isNotFullWidth:x,parentStyle:k}=g,{isSection:w,layout:j,horizontalAlign:y,responsive:R,inlineAlignment:S}=c??{},{width:O,columnGap:T,rowGap:q,fullWidth:z,background:C,verticalGutter:D,verticalGutterMobile:H,enablePagePadding:I,height:L}=u??{},Y=s(v?.border,v?.rounded),A=e=>{let t=e?.normal;if(!t||"square"===t.radiusType||"none"===t.radiusType)return!1;for(let e in t)if(Object.hasOwn(t,e)&&"0px"!==t[e])return!0;return!1},B=e("of",{desktop:A(Y.desktop)?"hidden":void 0,tablet:A(Y.tablet)?"hidden":void 0,mobile:A(Y.mobile)?"hidden":void 0}),E=h?.builderData?.childrens?.length,F={...e("aspect",{desktop:"16/9"})},G=t(b)||!E,J=a(O,z),[K,M]=r(["pos","top","left","bottom","right","z"],f),N=()=>({...w?M:f,...e("cg",D),...e("rg",H),...j?p(j):e("gtc",R),...e("w",J.content),...e("h",L),...w?{}:B}),P=()=>({"--mb":"0px","--mt":"0px",...e("cg",T),...i({pc:S,rg:q?m[q]:"0px"})}),Q=t=>({...n(C,t),...d(C,{desktop:!0,tablet:!0,mobile:!0}),...e("pc",y)}),U=()=>{let e=x&&!G;return e?{marginLeft:"0px",marginRight:"0px"}:{}},V=()=>({...o(Y)}),W=(e=!1)=>l({...N(),...Q(),...U(),...e?P():{},...c?.sameHeightSubgridContainer&&k}),X=l({...V()}),Z=l({...F,"pointer-events":"none",transform:"translateY(-50%)",height:"100%","object-fit":"cover",top:"50%"}),$={desktop:I?.desktop?"var(--g-ct-p, 15px)":void 0,tablet:I?.tablet?"var(--g-ct-p, 15px)":void 0,mobile:I?.mobile?"var(--g-ct-p, 15px)":void 0},_=l({...K,...e("w",J.wrapper),...e("pl",$),...e("pr",$)});return{embedVideoStyle:Z,backgroundBoxStyle:X,rowStyle:W,sectionStyle:_}};export{getRowStyle};
2
+ import{makeStyleResponsive as e,isEmptyChildren as t,splitStyle as r,composeRadius as o,composeGridLayout as i,makeStyle as p,getStyleBackgroundByDevice as n,getGradientBgrStyleByDevice as s}from"@gem-sdk/core";import{getInnerRadiusExcludeBorder as d}from"./getInnerRadius.js";import{createStyle as l}from"@gem-sdk/system";import{createStyleObject as m}from"./helpers.js";import{postPurchaseViewSpacing as a}from"../../../post-purchase/utils/helper.js";let getRowStyle=g=>{let{children:b,setting:h,builderProps:u,styles:c,style:f,advanced:k,isNotFullWidth:x,parentStyle:v}=g,{isSection:w,layout:j,horizontalAlign:y,responsive:R,inlineAlignment:S}=h??{},{width:O,columnGap:T,rowGap:q,fullWidth:z,background:C,verticalGutter:D,verticalGutterMobile:H,enablePagePadding:I,height:L}=c??{},Y=d(k?.border,k?.rounded),A=e=>{let t=e?.normal;if(!t||"square"===t.radiusType||"none"===t.radiusType)return!1;for(let e in t)if(Object.hasOwn(t,e)&&"0px"!==t[e])return!0;return!1},B=e("of",{desktop:A(Y.desktop)?"hidden":void 0,tablet:A(Y.tablet)?"hidden":void 0,mobile:A(Y.mobile)?"hidden":void 0}),E=u?.builderData?.childrens?.length,F={...e("aspect",{desktop:"16/9"})},G=t(b)||!E,J=m(O,z),[K,M]=r(["pos","top","left","bottom","right","z"],f),N=()=>({...w?M:f,...e("cg",D),...e("rg",H),...j?i(j):e("gtc",R),...e("w",J.content),...e("h",L),...w?{}:B}),P=()=>({"--mb":"0px","--mt":"0px",...e("cg",T),...p({pc:S,rg:q?a[q]:"0px"})}),Q=t=>({...n(C,t),...s(C,{desktop:!0,tablet:!0,mobile:!0}),...e("pc",y)}),U=()=>{let e=x&&!G;return e?{marginLeft:"0px",marginRight:"0px"}:{}},V=()=>({...o(Y)}),W=(e=!1)=>l({...N(),...Q(),...U(),...e?P():{},...h?.sameHeightSubgridContainer&&v}),X=l({...V()}),Z=l({...F,"pointer-events":"none",transform:"translateY(-50%)",height:"100%","object-fit":"cover",top:"50%"}),$=e=>{if(void 0!==e)return e?"var(--g-ct-p, 15px)":"none"},_={desktop:$(I?.desktop),tablet:$(I?.tablet),mobile:$(I?.mobile)},ee=l({...K,...e("w",J.wrapper),...e("pl",_),...e("pr",_)});return{embedVideoStyle:Z,backgroundBoxStyle:X,rowStyle:W,sectionStyle:ee}};export{getRowStyle};
@@ -1 +1 @@
1
- import{composeTypographyStyle as e,getResponsiveStyleShadow as t,makeStyle as r,getGlobalColorStateStyle as o,handleConvertBorderStyle as i,handleConvertInputBorderWidth as d,handleConvertInputBorderColor as l,getStyleShadow as a,makeStyleResponsive as b,handleConvertBorderWidth as s,handleConvertBorderColor as p,composeRadius as m,makeStyleResponsiveState as u}from"@gem-sdk/core";let addPxToValues=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,t?Object.fromEntries(Object.entries(t).map(([e,t])=>[e,`${t}px`])):{}])),getDividerWidth=e=>{if(!e)return{};let t=addPxToValues(e);return{...u("brw",t),...u("blw",t)}},getDividerColorStyle=e=>e?{...u("brc",e),...u("blc",e)}:{},getInputBorderRadius=({qtyStyle:e,corner:t})=>"minimalist"!==e?{}:{...m({...getDeviceRadius("desktop","mixed",t),...getDeviceRadius("tablet","mixed",t),...getDeviceRadius("mobile","mixed",t)})},getInputStyle=b=>{let{styles:s,setting:p}=b,{borderBtn:m,inputBackgroundColor:u,textColor:n,dividerColor:g,dividerStroke:v,corner:h,inputBoxShadow:c}=s??{},{qtyStyle:y}=p??{},x=e(s?.typo,s?.typography),k=getDividerWidth(v),S=getDividerColorStyle(g),w=t(c,"box-shadow",{desktop:c?.desktop??{},tablet:c?.tablet??c?.desktop??{},mobile:c?.mobile??c?.tablet??c?.desktop??{}});return{...r({}),...x,...o("bg",u),...o("c",n),...i(m),...d(m,y),...l(m),..."standard"===y?k:{},...S,...a({value:s?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:s?.typo?.custom?.hasShadowText}),...getInputBorderRadius({qtyStyle:y,corner:h}),...w}},getDeviceRadius=(e,t,r)=>{let o="left"===t||"mixed"===t,i="right"===t||"mixed"===t;return{[e]:{normal:{btlr:o?r?.[e]?.normal?.btlr:void 0,bblr:o?r?.[e]?.normal?.bblr:void 0,btrr:i?r?.[e]?.normal?.btrr:void 0,bbrr:i?r?.[e]?.normal?.bbrr:void 0,radiusType:r?.[e]?.normal?.radiusType??"custom"},hover:{btlr:o?r?.[e]?.hover?.btlr:void 0,bblr:o?r?.[e]?.hover?.bblr:void 0,btrr:i?r?.[e]?.hover?.btrr:void 0,bbrr:i?r?.[e]?.hover?.bbrr:void 0,radiusType:r?.[e]?.hover?.radiusType??"custom"}}}},getButtonStyle=({borderBtn:e,buttonWidth:r,buttonBackgroundColor:d,iconColor:l,corner:a,buttonSide:u,buttonBoxShadow:n})=>{let g=t(n,"box-shadow",{desktop:n?.desktop??{},tablet:n?.tablet??n?.desktop??{},mobile:n?.mobile??n?.tablet??n?.desktop??{}});return{...b("w",r),...o("bg",d),...o("c",l),...i(e),...s(e),...p(e),...m({...getDeviceRadius("desktop",u,a),...getDeviceRadius("tablet",u,a),...getDeviceRadius("mobile",u,a)}),...g}},getContainerStyles=({inputHeight:e,align:t})=>({...b("h",e),...b("jc",t)}),getWrapperStyles=({backgroundColor:e,styles:r})=>{let i=r?.shapeShadow,d=t(i,"box-shadow",{desktop:i?.desktop??{},tablet:i?.tablet??i?.desktop??{},mobile:i?.mobile??i?.tablet??i?.desktop??{}});return{...o("bg",e),...b("maxw",r?.quantityWidth),...d}};export{getButtonStyle,getContainerStyles,getInputStyle,getWrapperStyles};
1
+ import{composeTypographyStyle as e,getResponsiveStyleShadow as t,makeStyle as r,getGlobalColorStateStyle as o,handleConvertBorderStyle as i,handleConvertInputBorderWidth as d,handleConvertInputBorderColor as l,getStyleShadow as b,makeStyleResponsive as a,handleConvertBorderWidth as s,handleConvertBorderColor as p,composeRadius as u,makeStyleResponsiveState as m}from"@gem-sdk/core";let addPxToValues=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,t?Object.fromEntries(Object.entries(t).map(([e,t])=>[e,`${t}px`])):{}])),getDividerWidth=e=>{if(!e)return{};let t=addPxToValues(e);return{...m("brw",t),...m("blw",t)}},getDividerColorStyle=e=>{if(!e)return{};let t={...m("brc",e),...m("blc",e)},r=Object.fromEntries(Object.entries(t).filter(([e,t])=>void 0!==t));return r},getInputBorderRadius=({qtyStyle:e,corner:t})=>"minimalist"!==e?{}:{...u({...getDeviceRadius("desktop","mixed",t),...getDeviceRadius("tablet","mixed",t),...getDeviceRadius("mobile","mixed",t)})},getInputStyle=a=>{let{styles:s,setting:p}=a,{borderBtn:u,inputBackgroundColor:m,textColor:n,dividerColor:g,dividerStroke:v,corner:c,inputBoxShadow:h}=s??{},{qtyStyle:y}=p??{},x=e(s?.typo,s?.typography),k=getDividerWidth(v),S=getDividerColorStyle(g),w=t(h,"box-shadow",{desktop:h?.desktop??{},tablet:h?.tablet??h?.desktop??{},mobile:h?.mobile??h?.tablet??h?.desktop??{}});return{...r({}),...x,...o("bg",m),...o("c",n),...i(u),...d(u,y),...l(u),..."standard"===y?k:{},...S,...b({value:s?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:s?.typo?.custom?.hasShadowText}),...getInputBorderRadius({qtyStyle:y,corner:c}),...w}},getDeviceRadius=(e,t,r)=>{let o="left"===t||"mixed"===t,i="right"===t||"mixed"===t;return{[e]:{normal:{btlr:o?r?.[e]?.normal?.btlr:void 0,bblr:o?r?.[e]?.normal?.bblr:void 0,btrr:i?r?.[e]?.normal?.btrr:void 0,bbrr:i?r?.[e]?.normal?.bbrr:void 0,radiusType:r?.[e]?.normal?.radiusType??"custom"},hover:{btlr:o?r?.[e]?.hover?.btlr:void 0,bblr:o?r?.[e]?.hover?.bblr:void 0,btrr:i?r?.[e]?.hover?.btrr:void 0,bbrr:i?r?.[e]?.hover?.bbrr:void 0,radiusType:r?.[e]?.hover?.radiusType??"custom"}}}},getButtonStyle=({borderBtn:e,buttonWidth:r,buttonBackgroundColor:d,iconColor:l,corner:b,buttonSide:m,buttonBoxShadow:n})=>{let g=t(n,"box-shadow",{desktop:n?.desktop??{},tablet:n?.tablet??n?.desktop??{},mobile:n?.mobile??n?.tablet??n?.desktop??{}});return{...a("w",r),...o("bg",d),...o("c",l),...i(e),...s(e),...p(e),...u({...getDeviceRadius("desktop",m,b),...getDeviceRadius("tablet",m,b),...getDeviceRadius("mobile",m,b)}),...g}},getContainerStyles=({inputHeight:e,align:t})=>({...a("h",e),...a("jc",t)}),getWrapperStyles=({backgroundColor:e,styles:r})=>{let i=r?.shapeShadow,d=t(i,"box-shadow",{desktop:i?.desktop??{},tablet:i?.tablet??i?.desktop??{},mobile:i?.mobile??i?.tablet??i?.desktop??{}});return{...o("bg",e),...a("maxw",r?.quantityWidth),...d}};export{getButtonStyle,getContainerStyles,getInputStyle,getWrapperStyles};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-staging.755",
3
+ "version": "2.0.0-staging.757",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -25,7 +25,7 @@
25
25
  "scan-all-text": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/scan-all-text && node ./scripts/scan-all-text"
26
26
  },
27
27
  "devDependencies": {
28
- "@gem-sdk/core": "2.0.0-staging.754",
28
+ "@gem-sdk/core": "2.0.0-staging.757",
29
29
  "@gem-sdk/styles": "2.0.0-staging.711",
30
30
  "@gem-sdk/system": "2.0.0-staging.711",
31
31
  "@types/react-transition-group": "^4.4.5",