@gem-sdk/components 2.0.0-staging.989 → 2.0.0-staging.991

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,7 +1,7 @@
1
1
  'use client';
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),Text_liquid=require("../../text/components/Text.liquid.js"),Button_liquid=require("../../button/components/Button.liquid.js");const ArticleReadMore=({setting:e,styles:t,builderAttrs:l,builderProps:r,advanced:o,style:i})=>{let{readMoreType:a,label:n}=e??{},{typoBtn:u,typoText:s,globalSizeText:d,globalSizeBtn:c,textColorTextState:x,alignBtn:p,alignText:f,enableHoverEffectText:g}=t??{};return core.template`
3
- <a href="{{article.url}}" target="_blank">
4
- ${core.RenderIf("text"===a,Text_liquid.default({builderAttrs:l,builderProps:r,advanced:o,styles:{...t,color:x,typo:s,spacing:"0px",align:f,textColor:void 0,enableHoverEffect:g},style:i??{},setting:{...e,text:n,globalSize:d,excludeFlex:!0,translate:void 0}}))}
5
- ${core.RenderIf("text"!==a,Button_liquid.default({builderAttrs:l,builderProps:r,advanced:o,styles:{...t,typo:u,globalSize:c,align:p},style:i??{},setting:{...e,label:n,htmlType:"button",translate:void 0}}))}
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),Text_liquid=require("../../text/components/Text.liquid.js"),Button_liquid=require("../../button/components/Button.liquid.js");const ArticleReadMore=({setting:e,styles:t,builderAttrs:l,builderProps:o,advanced:r,style:i})=>{let{readMoreType:a,label:n}=e??{},{typoBtn:s,typoText:u,globalSizeText:d,globalSizeBtn:c,textColorTextState:p,alignBtn:x,alignText:g,enableHoverEffectText:f}=t??{};return core.template`
3
+ <a href="{{article.url}}" target="_blank" class="gp-pointer-events-auto">
4
+ ${core.RenderIf("text"===a,Text_liquid.default({builderAttrs:l,builderProps:o,advanced:r,styles:{...t,color:p,typo:u,spacing:"0px",align:g,textColor:void 0,enableHoverEffect:f},style:i??{},setting:{...e,text:n,globalSize:d,excludeFlex:!0,translate:void 0}}))}
5
+ ${core.RenderIf("text"!==a,Button_liquid.default({builderAttrs:l,builderProps:o,advanced:r,styles:{...t,typo:s,globalSize:c,align:x},style:i??{},setting:{...e,label:n,htmlType:"button",translate:void 0}}))}
6
6
  </a>
7
7
  `};exports.default=ArticleReadMore;
@@ -1 +1 @@
1
- "use strict";var core=require("@gem-sdk/core"),helpers=require("../../../../../helpers.js");const getWrapperStyleActive=e=>{let{preset:o,optionTypography:t,optionTypo:r,typeOfOption:l}=e,a=o?.optionBgColor,p=o?.optionTextColor,i=o?.optionBorder,c=o?.optionHasShadow,d=o?.optionShadow,n=o?.optionRounded,h="color"===l,s="image"===l||"image_shopify"===l,g=core.composeTypographyStyle(r,t),y=e=>{let o=a?.active??a?.normal,t=i?.active??i?.normal;return core.makeStyle({bg:e&&core.getSingleColorVariable(o),bs:t?.border,bw:t?.width,bc:core.getSingleColorVariable(t?.color)})},S=d?.active??d?.normal,b=c?.active??c?.normal,m=p?.active??p?.normal;return helpers.filterTruthyObject({...y(!h),...core.getRadiusStyleActiveState(n),...core.getStyleShadow({value:S,state:"active",styleAppliedFor:"box-shadow",isEnableShadow:b},!0),...g,...!h&&!s&&core.makeStyle({c:core.getSingleColorVariable(m)}),...core.makeStyle({h:o?.height})})},getWrapperStyleNormalAndHover=e=>{let{preset:o,optionTransform:t,optionTypography:r,optionTypo:l,typeOfOption:a}=e,p=o?.optionBgColor,i=o?.optionTextColor,c=o?.optionBorder,d=o?.optionHasShadow,n=o?.optionShadow,h=o?.optionRounded,s="color"===a,g="image"===a||"image_shopify"===a,y=core.composeTypographyStyle(l,r),S=["normal","hover"].reduce((e,o)=>({...e,...core.getStyleShadow({value:n?.[o],state:o,styleAppliedFor:"box-shadow",isEnableShadow:d?.[o]})}),{});return helpers.filterTruthyObject({...core.composeRadius(h),...S,...!s&&core.getGlobalColorStateStyle("bg",p),...!s&&core.handleConvertBorderStyle(c),...!s&&core.handleConvertBorderWidth(c),...!s&&core.handleConvertBorderColor(c),...!s&&!g&&core.makeStyle({c:t}),...!s&&!g&&core.getGlobalColorStateStyle("c",i),...y,...core.makeStyle({h:o?.height})})},getWrapperTextStyle=e=>{let{preset:o,typeOfOption:t,checked:r}=e,l=o?.optionBorder,a=o?.optionRounded,p="color"===t,i=()=>{let e="16px",t={"--pl":"0px","--pr":"0px","--pl-tablet":"0px","--pr-tablet":"0px","--pl-mobile":"0px","--pr-mobile":"0px","--pt":"0px","--pb":"0px"};return o?.width?.desktop?.toLowerCase()!=="auto"&&o?.width?.desktop||(t["--pl"]=e,t["--pr"]=e),o?.width?.tablet?.toLowerCase()!=="auto"&&o?.width?.tablet||(t["--pl-tablet"]=e,t["--pr-tablet"]=e),o?.width?.mobile?.toLowerCase()!=="auto"&&o?.width?.mobile||(t["--pl-mobile"]=e,t["--pr-mobile"]=e),(o?.height?.toLowerCase()==="auto"||o?.height)&&(t["--pt"]="8px",t["--pb"]="8px"),t},c={...a,active:{...a?.active||{},radiusType:"custom"}},d=r?core.getRadiusStyleActiveState(c):core.composeRadius(a),n=!r&&p?{...core.handleConvertBorderStyle(l),...core.handleConvertBorderWidth(l),...core.handleConvertBorderColor(l)}:{};return helpers.filterTruthyObject({...!p&&i(),...p&&d,...n})},getColorStyle=({optionBorder:e,optionRounded:o,isActive:t,color:r})=>{let l=()=>r?r?.startsWith("linear-gradient")?{backgroundImage:r}:{backgroundColor:r}:{},a=t=>({"--d":"flex","--jc":"center"," --ai":"center","--w":"100%","--h":"100%","--of":"hidden","--bs":t?"none":"solid",...core.handleConvertBorderWidth(e),...core.handleConvertBorderColor(e),...core.composeRadius(o),...l()});return a(!!t)},getTextStyle=({optionTypo:e,optionTypography:o})=>{let t=core.composeTypographyStyle(e,o);return delete t["--c"],helpers.filterTruthyObject({...t})};exports.getColorStyle=getColorStyle,exports.getTextStyle=getTextStyle,exports.getWrapperStyleActive=getWrapperStyleActive,exports.getWrapperStyleNormalAndHover=getWrapperStyleNormalAndHover,exports.getWrapperTextStyle=getWrapperTextStyle;
1
+ "use strict";var core=require("@gem-sdk/core"),helpers=require("../../../../../helpers.js");const getWrapperStyleActive=e=>{let{preset:o,optionTypography:t,optionTypo:r,typeOfOption:l}=e,a=o?.optionBgColor,p=o?.optionTextColor,i=o?.optionBorder,c=o?.optionHasShadow,d=o?.optionShadow,n=o?.optionRounded,h="color"===l,s="image"===l||"image_shopify"===l,g=core.composeTypographyStyle(r,t),y=e=>{let o=a?.active??a?.normal,t=i?.active??i?.normal;return core.makeStyle({bg:e&&core.getSingleColorVariable(o),bs:t?.border,bw:t?.width,bc:core.getSingleColorVariable(t?.color)})},S=d?.active??d?.normal,b=c?.active??c?.normal,m=p?.active??p?.normal;return helpers.filterTruthyObject({...y(!h),...core.getRadiusStyleActiveState(n),...core.getStyleShadow({value:S,state:"active",styleAppliedFor:"box-shadow",isEnableShadow:b},!0),...g,...!h&&!s&&core.makeStyle({c:core.getSingleColorVariable(m)}),...core.makeStyle({h:o?.height})})},getWrapperStyleNormalAndHover=e=>{let{preset:o,optionTransform:t,optionTypography:r,optionTypo:l,typeOfOption:a}=e,p=o?.optionBgColor,i=o?.optionTextColor,c=o?.optionBorder,d=o?.optionHasShadow,n=o?.optionShadow,h=o?.optionRounded,s="color"===a,g="image"===a||"image_shopify"===a,y=core.composeTypographyStyle(l,r),S=["normal","hover"].reduce((e,o)=>({...e,...core.getStyleShadow({value:n?.[o],state:o,styleAppliedFor:"box-shadow",isEnableShadow:d?.[o]})}),{});return helpers.filterTruthyObject({...core.composeRadius(h),...S,...!s&&core.getGlobalColorStateStyle("bg",p),...!s&&core.handleConvertBorderStyle(c),...!s&&core.handleConvertBorderWidth(c),...!s&&core.handleConvertBorderColor(c),...!s&&!g&&core.makeStyle({c:t}),...!s&&!g&&core.getGlobalColorStateStyle("c",i),...y,...core.makeStyle({h:o?.height})})},getWrapperTextStyle=e=>{let{preset:o,typeOfOption:t,checked:r}=e,l=o?.optionBorder,a=o?.optionRounded,p="color"===t,i=()=>{let e="16px",t={"--pl":"0px","--pr":"0px","--pl-tablet":"0px","--pr-tablet":"0px","--pl-mobile":"0px","--pr-mobile":"0px","--pt":"0px","--pb":"0px"};return o?.width?.desktop?.toLowerCase()!=="auto"&&o?.width?.desktop||(t["--pl"]=e,t["--pr"]=e),o?.width?.tablet?.toLowerCase()!=="auto"&&o?.width?.tablet||(t["--pl-tablet"]=e,t["--pr-tablet"]=e),o?.width?.mobile?.toLowerCase()!=="auto"&&o?.width?.mobile||(t["--pl-mobile"]=e,t["--pr-mobile"]=e),(o?.height?.toLowerCase()==="auto"||o?.height)&&(t["--pt"]="8px",t["--pb"]="8px"),t},c={...a,active:{...a?.active||{},radiusType:"custom"}},d=r?core.getRadiusStyleActiveState(c):core.composeRadius(a),n=!r&&p?{...core.handleConvertBorderStyle(l),...core.handleConvertBorderWidth(l),...core.handleConvertBorderColor(l)}:{};return helpers.filterTruthyObject({...!p&&i(),...p&&d,...n})},getColorStyle=({optionBorder:e,optionRounded:o,isActive:t,color:r})=>{let l=()=>r?r?.startsWith("linear-gradient")?{backgroundImage:r}:{backgroundColor:r}:{},a=o=>o?{"--bs":"none"}:core.handleConvertBorderStyle(e),p=t=>({"--d":"flex","--jc":"center"," --ai":"center","--w":"100%","--h":"100%","--of":"hidden",...a(t),...core.handleConvertBorderWidth(e),...core.handleConvertBorderColor(e),...core.composeRadius(o),...l()});return p(!!t)},getTextStyle=({optionTypo:e,optionTypography:o})=>{let t=core.composeTypographyStyle(e,o);return delete t["--c"],helpers.filterTruthyObject({...t})};exports.getColorStyle=getColorStyle,exports.getTextStyle=getTextStyle,exports.getWrapperStyleActive=getWrapperStyleActive,exports.getWrapperStyleNormalAndHover=getWrapperStyleNormalAndHover,exports.getWrapperTextStyle=getWrapperTextStyle;
@@ -1,7 +1,7 @@
1
1
  'use client';
2
- import{template as t,RenderIf as e}from"@gem-sdk/core";import l from"../../text/components/Text.liquid.js";import o from"../../button/components/Button.liquid.js";let ArticleReadMore=({setting:r,styles:a,builderAttrs:i,builderProps:n,advanced:s,style:p})=>{let{readMoreType:c,label:d}=r??{},{typoBtn:m,typoText:x,globalSizeText:g,globalSizeBtn:u,textColorTextState:b,alignBtn:f,alignText:y,enableHoverEffectText:v}=a??{};return t`
3
- <a href="{{article.url}}" target="_blank">
4
- ${e("text"===c,l({builderAttrs:i,builderProps:n,advanced:s,styles:{...a,color:b,typo:x,spacing:"0px",align:y,textColor:void 0,enableHoverEffect:v},style:p??{},setting:{...r,text:d,globalSize:g,excludeFlex:!0,translate:void 0}}))}
5
- ${e("text"!==c,o({builderAttrs:i,builderProps:n,advanced:s,styles:{...a,typo:m,globalSize:u,align:f},style:p??{},setting:{...r,label:d,htmlType:"button",translate:void 0}}))}
2
+ import{template as t,RenderIf as e}from"@gem-sdk/core";import l from"../../text/components/Text.liquid.js";import o from"../../button/components/Button.liquid.js";let ArticleReadMore=({setting:r,styles:a,builderAttrs:i,builderProps:s,advanced:n,style:p})=>{let{readMoreType:c,label:d}=r??{},{typoBtn:g,typoText:m,globalSizeText:u,globalSizeBtn:x,textColorTextState:b,alignBtn:f,alignText:y,enableHoverEffectText:v}=a??{};return t`
3
+ <a href="{{article.url}}" target="_blank" class="gp-pointer-events-auto">
4
+ ${e("text"===c,l({builderAttrs:i,builderProps:s,advanced:n,styles:{...a,color:b,typo:m,spacing:"0px",align:y,textColor:void 0,enableHoverEffect:v},style:p??{},setting:{...r,text:d,globalSize:u,excludeFlex:!0,translate:void 0}}))}
5
+ ${e("text"!==c,o({builderAttrs:i,builderProps:s,advanced:n,styles:{...a,typo:g,globalSize:x,align:f},style:p??{},setting:{...r,label:d,htmlType:"button",translate:void 0}}))}
6
6
  </a>
7
7
  `};export{ArticleReadMore as default};
@@ -1 +1 @@
1
- import{composeTypographyStyle as e,getRadiusStyleActiveState as t,getStyleShadow as o,makeStyle as r,getSingleColorVariable as l,composeRadius as p,getGlobalColorStateStyle as a,handleConvertBorderStyle as i,handleConvertBorderWidth as d,handleConvertBorderColor as n}from"@gem-sdk/core";import{filterTruthyObject as h}from"../../../../../helpers.js";let getWrapperStyleActive=p=>{let{preset:a,optionTypography:i,optionTypo:d,typeOfOption:n}=p,c=a?.optionBgColor,b=a?.optionTextColor,g=a?.optionBorder,s=a?.optionHasShadow,m=a?.optionShadow,u=a?.optionRounded,w="color"===n,x="image"===n||"image_shopify"===n,S=e(d,i),v=e=>{let t=c?.active??c?.normal,o=g?.active??g?.normal;return r({bg:e&&l(t),bs:o?.border,bw:o?.width,bc:l(o?.color)})},y=m?.active??m?.normal,C=s?.active??s?.normal,T=b?.active??b?.normal;return h({...v(!w),...t(u),...o({value:y,state:"active",styleAppliedFor:"box-shadow",isEnableShadow:C},!0),...S,...!w&&!x&&r({c:l(T)}),...r({h:a?.height})})},getWrapperStyleNormalAndHover=t=>{let{preset:l,optionTransform:c,optionTypography:b,optionTypo:g,typeOfOption:s}=t,m=l?.optionBgColor,u=l?.optionTextColor,w=l?.optionBorder,x=l?.optionHasShadow,S=l?.optionShadow,v=l?.optionRounded,y="color"===s,C="image"===s||"image_shopify"===s,T=e(g,b),W=["normal","hover"].reduce((e,t)=>({...e,...o({value:S?.[t],state:t,styleAppliedFor:"box-shadow",isEnableShadow:x?.[t]})}),{});return h({...p(v),...W,...!y&&a("bg",m),...!y&&i(w),...!y&&d(w),...!y&&n(w),...!y&&!C&&r({c:c}),...!y&&!C&&a("c",u),...T,...r({h:l?.height})})},getWrapperTextStyle=e=>{let{preset:o,typeOfOption:r,checked:l}=e,a=o?.optionBorder,c=o?.optionRounded,b="color"===r,g=()=>{let e="16px",t={"--pl":"0px","--pr":"0px","--pl-tablet":"0px","--pr-tablet":"0px","--pl-mobile":"0px","--pr-mobile":"0px","--pt":"0px","--pb":"0px"};return o?.width?.desktop?.toLowerCase()!=="auto"&&o?.width?.desktop||(t["--pl"]=e,t["--pr"]=e),o?.width?.tablet?.toLowerCase()!=="auto"&&o?.width?.tablet||(t["--pl-tablet"]=e,t["--pr-tablet"]=e),o?.width?.mobile?.toLowerCase()!=="auto"&&o?.width?.mobile||(t["--pl-mobile"]=e,t["--pr-mobile"]=e),(o?.height?.toLowerCase()==="auto"||o?.height)&&(t["--pt"]="8px",t["--pb"]="8px"),t},s={...c,active:{...c?.active||{},radiusType:"custom"}},m=l?t(s):p(c),u=!l&&b?{...i(a),...d(a),...n(a)}:{};return h({...!b&&g(),...b&&m,...u})},getColorStyle=({optionBorder:e,optionRounded:t,isActive:o,color:r})=>{let l=()=>r?r?.startsWith("linear-gradient")?{backgroundImage:r}:{backgroundColor:r}:{},a=o=>({"--d":"flex","--jc":"center"," --ai":"center","--w":"100%","--h":"100%","--of":"hidden","--bs":o?"none":"solid",...d(e),...n(e),...p(t),...l()});return a(!!o)},getTextStyle=({optionTypo:t,optionTypography:o})=>{let r=e(t,o);return delete r["--c"],h({...r})};export{getColorStyle,getTextStyle,getWrapperStyleActive,getWrapperStyleNormalAndHover,getWrapperTextStyle};
1
+ import{composeTypographyStyle as e,getRadiusStyleActiveState as t,getStyleShadow as o,makeStyle as r,getSingleColorVariable as l,composeRadius as p,getGlobalColorStateStyle as a,handleConvertBorderStyle as i,handleConvertBorderWidth as n,handleConvertBorderColor as d}from"@gem-sdk/core";import{filterTruthyObject as h}from"../../../../../helpers.js";let getWrapperStyleActive=p=>{let{preset:a,optionTypography:i,optionTypo:n,typeOfOption:d}=p,c=a?.optionBgColor,b=a?.optionTextColor,g=a?.optionBorder,s=a?.optionHasShadow,m=a?.optionShadow,u=a?.optionRounded,w="color"===d,x="image"===d||"image_shopify"===d,S=e(n,i),v=e=>{let t=c?.active??c?.normal,o=g?.active??g?.normal;return r({bg:e&&l(t),bs:o?.border,bw:o?.width,bc:l(o?.color)})},y=m?.active??m?.normal,C=s?.active??s?.normal,T=b?.active??b?.normal;return h({...v(!w),...t(u),...o({value:y,state:"active",styleAppliedFor:"box-shadow",isEnableShadow:C},!0),...S,...!w&&!x&&r({c:l(T)}),...r({h:a?.height})})},getWrapperStyleNormalAndHover=t=>{let{preset:l,optionTransform:c,optionTypography:b,optionTypo:g,typeOfOption:s}=t,m=l?.optionBgColor,u=l?.optionTextColor,w=l?.optionBorder,x=l?.optionHasShadow,S=l?.optionShadow,v=l?.optionRounded,y="color"===s,C="image"===s||"image_shopify"===s,T=e(g,b),W=["normal","hover"].reduce((e,t)=>({...e,...o({value:S?.[t],state:t,styleAppliedFor:"box-shadow",isEnableShadow:x?.[t]})}),{});return h({...p(v),...W,...!y&&a("bg",m),...!y&&i(w),...!y&&n(w),...!y&&d(w),...!y&&!C&&r({c:c}),...!y&&!C&&a("c",u),...T,...r({h:l?.height})})},getWrapperTextStyle=e=>{let{preset:o,typeOfOption:r,checked:l}=e,a=o?.optionBorder,c=o?.optionRounded,b="color"===r,g=()=>{let e="16px",t={"--pl":"0px","--pr":"0px","--pl-tablet":"0px","--pr-tablet":"0px","--pl-mobile":"0px","--pr-mobile":"0px","--pt":"0px","--pb":"0px"};return o?.width?.desktop?.toLowerCase()!=="auto"&&o?.width?.desktop||(t["--pl"]=e,t["--pr"]=e),o?.width?.tablet?.toLowerCase()!=="auto"&&o?.width?.tablet||(t["--pl-tablet"]=e,t["--pr-tablet"]=e),o?.width?.mobile?.toLowerCase()!=="auto"&&o?.width?.mobile||(t["--pl-mobile"]=e,t["--pr-mobile"]=e),(o?.height?.toLowerCase()==="auto"||o?.height)&&(t["--pt"]="8px",t["--pb"]="8px"),t},s={...c,active:{...c?.active||{},radiusType:"custom"}},m=l?t(s):p(c),u=!l&&b?{...i(a),...n(a),...d(a)}:{};return h({...!b&&g(),...b&&m,...u})},getColorStyle=({optionBorder:e,optionRounded:t,isActive:o,color:r})=>{let l=()=>r?r?.startsWith("linear-gradient")?{backgroundImage:r}:{backgroundColor:r}:{},a=t=>t?{"--bs":"none"}:i(e),h=o=>({"--d":"flex","--jc":"center"," --ai":"center","--w":"100%","--h":"100%","--of":"hidden",...a(o),...n(e),...d(e),...p(t),...l()});return h(!!o)},getTextStyle=({optionTypo:t,optionTypography:o})=>{let r=e(t,o);return delete r["--c"],h({...r})};export{getColorStyle,getTextStyle,getWrapperStyleActive,getWrapperStyleNormalAndHover,getWrapperTextStyle};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-staging.989",
3
+ "version": "2.0.0-staging.991",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",