@gem-sdk/components 2.0.0-staging.990 → 2.0.0-staging.992

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,4 +1,4 @@
1
- "use strict";var core=require("@gem-sdk/core");const getButtonWrapperStyles=(e,t)=>({...e,...core.makeStyleResponsive("ta",t?.align)}),getButtonStyles=(e,t)=>{let o={...getSizeStyles(e),...getRadiusStyles(e),...getShadowStyles(e),...getBackgroundStyles(e),...getTypographyStyles(e).textColorStyle};return t?o:core.filterHoverVariables(o)},getButtonIconStyles=(e,t)=>({...getIconSpacingStyle(e,t),"--height-desktop":`${e?.size?.desktop}`,"--height-tablet":`${e?.size?.desktop||e?.size?.tablet}`,"--height-mobile":`${e?.size?.mobile||e?.size?.tablet||e?.size?.desktop}`}),ignoreStateNoneValue=(obj,condition)=>Object.entries(obj).reduce((acc,[key,value])=>((!["hover","focus","normal"].includes(key)||eval(condition))&&(acc[key]=value),acc),{}),getShadowStyles=e=>{let{boxShadowBtn:t,hasBoxShadowBtn:o}=e||{},r=ignoreStateNoneValue(t||{},"value?.enable !== undefined");return{...core.getStyleShadowState(r,"box-shadow",o)}},getRadiusStyles=e=>{let t=ignoreStateNoneValue(e?.roundedBtnV2||{},"value?.radiusType !== undefined");return core.composeRadius(t)},getIconSpacingStyle=(e,t)=>{let o=e?.iconSpacing||{desktop:"8px"};return t?.iconAlign==="left"?core.makeStyleResponsive("mr",o):core.makeStyleResponsive("ml",o)},getSizeStyles=e=>{let t=core.makeGlobalSize(e?.globalSize);return{...t.width,...t.height,...t.padding}},getTypographyStyles=e=>{let t=core.composeTypographyStyle(e?.typo,e?.typography),o={"--c":t?.["--c"]},r={...t};return delete r["--c"],{textColorStyle:{"--hvr-c":core.getColor(e?.textColor?.hover),...o},withoutTextColorStyles:r}},getTypoStyles=e=>({...getTypographyStyles(e).withoutTextColorStyles,...core.getStyleShadow({styleAppliedFor:"text-shadow",value:e?.typo?.custom?.textShadow,isEnableShadow:e?.typo?.custom?.hasShadowText}),"word-break":"break-word"}),getBgImageUrl=(e,t)=>{let{backgroundImage:o,backgroundColorV2:r}=e||{},s=o?.[t],a=r?.[t];if(!s&&!a)return"";let l=`url(${s?.image?.src})`,n=a?`, ${a}`:"";return a?.includes(core.GRADIENT_BGR_KEY)&&s?.image?.src?`${l}${n}`:a?.includes(core.GRADIENT_BGR_KEY)&&!s?.image?.src?a:s?.image?.src?l:""},getBackgroundImageSource=e=>{let t={normal:getBgImageUrl(e,"normal"),hover:getBgImageUrl(e,"hover")};return core.makeStyleState("bgi",t)},getBackgroundStyles=e=>{let{backgroundColorV2:t,backgroundImage:o}=e||{},r={...o,hover:o?.hover||o?.normal},s={...t,hover:t?.hover||t?.normal};return{...core.getStyleBackgroundImage(r,{ignoreBackgroundImage:!0}),...getBackgroundImageSource({backgroundImage:r,backgroundColorV2:s}),...core.getGlobalColorStateStyle("bg",t)}},getCustomCssStyles=({styles:e,uid:t,builderAttrs:o,enableHoverEffect:r})=>{if(!t)return"";let{borderBtnV2:s,roundedBtnV2:a}=e??{},l=ignoreStateNoneValue(s||{},'value?.borderType !== "none"'),n=ignoreStateNoneValue(a||{},"value?.radiusType !== undefined"),g=generateBorderCornerStyles({uid:t,borderBtn:l,roundedBtn:n,builderAttrs:o,enableHoverEffect:r});return`
1
+ "use strict";var core=require("@gem-sdk/core");const getButtonWrapperStyles=(e,t)=>({...e,...core.makeStyleResponsive("ta",t?.align)}),getButtonStyles=(e,t)=>{let o={...getSizeStyles(e),...getRadiusStyles(e),...getShadowStyles(e),...getBackgroundStyles(e),...getTypographyStyles(e).textColorStyle};return t?o:core.filterHoverVariables(o)},getButtonIconStyles=(e,t)=>({...getIconSpacingStyle(e,t),"--height-desktop":`${e?.size?.desktop}`,"--height-tablet":`${e?.size?.desktop||e?.size?.tablet}`,"--height-mobile":`${e?.size?.mobile||e?.size?.tablet||e?.size?.desktop}`}),ignoreStateNoneValue=(obj,condition)=>Object.entries(obj).reduce((acc,[key,value])=>((!["hover","focus","normal"].includes(key)||eval(condition))&&(acc[key]=value),acc),{}),getShadowStyles=e=>{let{boxShadowBtn:t,hasBoxShadowBtn:o}=e||{},r=ignoreStateNoneValue(t||{},"value?.enable !== undefined");return{...core.getStyleShadowState(r,"box-shadow",o)}},getRadiusStyles=e=>{let t=ignoreStateNoneValue(e?.roundedBtnV2||{},"value?.radiusType !== undefined");return core.composeRadius(t)},getIconSpacingStyle=(e,t)=>{let o=e?.iconSpacing||{desktop:"8px"};return t?.iconAlign==="left"?core.makeStyleResponsive("mr",o):core.makeStyleResponsive("ml",o)},getSizeStyles=e=>{let t=core.makeGlobalSize(e?.globalSize);return{...t.width,...t.height,...t.padding}},getTypographyStyles=e=>{let t=core.composeTypographyStyle(e?.typo,e?.typography),o={"--c":t?.["--c"]},r={...t};return delete r["--c"],{textColorStyle:{"--hvr-c":core.getColor(e?.textColor?.hover),...o},withoutTextColorStyles:r}},getTypoStyles=e=>({...getTypographyStyles(e).withoutTextColorStyles,...core.getStyleShadow({styleAppliedFor:"text-shadow",value:e?.typo?.custom?.textShadow,isEnableShadow:e?.typo?.custom?.hasShadowText}),"word-break":"break-word"}),getBgImageUrl=(e,t)=>{let{backgroundImage:o,backgroundColorV2:r}=e||{},s=o?.[t],a=r?.[t];if(!s&&!a)return"";let l=`url(${s?.image?.src})`,n=a?`, ${a}`:"";return a?.includes(core.GRADIENT_BGR_KEY)&&s?.image?.src?`${l}${n}`:a?.includes(core.GRADIENT_BGR_KEY)&&!s?.image?.src?a:s?.image?.src?l:""},getBackgroundImageSource=e=>{let t={normal:getBgImageUrl(e,"normal"),hover:getBgImageUrl(e,"hover")};return core.makeStyleState("bgi",t)},getBackgroundStyles=e=>{let{backgroundColorV2:t,backgroundImage:o}=e||{},r={...o,hover:o?.hover||o?.normal},s={...t,hover:t?.hover||t?.normal};return{...core.getStyleBackgroundImage(r,{ignoreBackgroundImage:!0}),...getBackgroundImageSource({backgroundImage:r,backgroundColorV2:s}),...core.getGlobalColorStateStyle("bg",s)}},getCustomCssStyles=({styles:e,uid:t,builderAttrs:o,enableHoverEffect:r})=>{if(!t)return"";let{borderBtnV2:s,roundedBtnV2:a}=e??{},l=ignoreStateNoneValue(s||{},'value?.borderType !== "none"'),n=ignoreStateNoneValue(a||{},"value?.radiusType !== undefined"),g=generateBorderCornerStyles({uid:t,borderBtn:l,roundedBtn:n,builderAttrs:o,enableHoverEffect:r});return`
2
2
  ${g.normalStyles}
3
3
  ${g.hoverStyles}
4
4
  `.trim()},generateBorderCornerStyles=({uid:e,borderBtn:t,roundedBtn:o,builderAttrs:r,enableHoverEffect:s})=>{let a=r?.["data-component-tag"],l=({styleObj:e,state:t})=>{if(e)return e?.[t]},n=l({styleObj:t,state:"normal"}),g=l({styleObj:s?t:void 0,state:"hover"}),d=l({styleObj:o,state:"normal"}),i=l({styleObj:o,state:"hover"}),u=`
@@ -1 +1 @@
1
- "use strict";var core=require("@gem-sdk/core");const getSizeSettings=e=>core.makeGlobalSize(e?.size),getItemWrapStyles=(e,o)=>({...getSizeSettings(e).width,...getSizeSettings(e).padding,...o?core.makeStyleState("bg",{...e?.backgroundColor,hover:e?.backgroundColor?.active??e?.backgroundColor?.hover}):core.makeStyleState("bg",e?.backgroundColor),...core.makeStyle({bg:o?e?.backgroundColor?.active:e?.backgroundColor?.normal}),...core.composeRadius(e?.roundedBundle),...core.getStyleShadowState(e?.boxShadowBundle,"box-shadow",e?.hasBoxShadowBundle),...o?core.getStyleShadow({value:e?.boxShadowBundle?.active,styleAppliedFor:"box-shadow",isEnableShadow:e?.boxShadowBundle?.active?.enable}):{...core.getStyleShadow({value:e?.boxShadowBundle?.normal,styleAppliedFor:"box-shadow",isEnableShadow:e?.boxShadowBundle?.normal?.enable})},...o?core.getBorderStyle(e?.borderBundle?.active):{...core.handleConvertBorderWidth(e?.borderBundle),...core.handleConvertBorderStyle(e?.borderBundle),...core.handleConvertBorderColor(e?.borderBundle)},...o?core.getRadiusStyleActiveState({...e?.roundedBundle,active:{...e?.roundedBundle?.active?e?.roundedBundle?.active:e?.roundedBundle?.normal,radiusType:"custom"}}):{}}),getIconStyles=e=>({...e?.layout!=="horizontal-layout"?core.makeStyle({mr:e?.iconSpacing}):core.makeStyle({mb:e.iconSpacing}),...core.makeStyleResponsive("w",e?.iconSize,"px"),...core.makeStyleResponsive("h",e?.iconSize,"px")}),getSvgActiveStyles=e=>({...core.getGlobalColorStateStyle("c",e?.iconColor),...core.makeStyle({c:e?.iconColor?.active})}),getSvgStyles=e=>({...core.getGlobalColorStateStyle("c",{...e?.iconColor,normal:e?.iconColor?.normal})}),getAlignStyle=e=>{let o=e?.align==="left"?"start":e?.align==="right"?"end":"center";return{...core.makeStyle({ai:o})}},getFlexChildren=core.composeClasses("gp-flex-1"),getContainerStyles=(e,o,t)=>({...e,...getAlignStyle(o),...t});exports.getAlignStyle=getAlignStyle,exports.getContainerStyles=getContainerStyles,exports.getFlexChildren=getFlexChildren,exports.getIconStyles=getIconStyles,exports.getItemWrapStyles=getItemWrapStyles,exports.getSizeSettings=getSizeSettings,exports.getSvgActiveStyles=getSvgActiveStyles,exports.getSvgStyles=getSvgStyles;
1
+ "use strict";var core=require("@gem-sdk/core");const getSizeSettings=e=>core.makeGlobalSize(e?.size),getItemWrapStyles=(e,o)=>({...getSizeSettings(e).width,...getSizeSettings(e).padding,...o?core.makeStyleState("bg",{...e?.backgroundColor,hover:e?.backgroundColor?.active??e?.backgroundColor?.hover}):core.makeStyleState("bg",e?.backgroundColor),...core.makeStyle({bg:o?e?.backgroundColor?.active:e?.backgroundColor?.normal}),...core.composeRadius(e?.roundedBundle),...core.getStyleShadowState(e?.boxShadowBundle,"box-shadow",e?.hasBoxShadowBundle),...o?core.getStyleShadow({value:e?.boxShadowBundle?.active,styleAppliedFor:"box-shadow",isEnableShadow:e?.boxShadowBundle?.active?.enable||e?.hasBoxShadowBundle?.active}):{...core.getStyleShadow({value:e?.boxShadowBundle?.normal,styleAppliedFor:"box-shadow",isEnableShadow:e?.boxShadowBundle?.normal?.enable||e?.hasBoxShadowBundle?.normal})},...o?core.getBorderStyle(e?.borderBundle?.active):{...core.handleConvertBorderWidth(e?.borderBundle),...core.handleConvertBorderStyle(e?.borderBundle),...core.handleConvertBorderColor(e?.borderBundle)},...o?core.getRadiusStyleActiveState({...e?.roundedBundle,active:{...e?.roundedBundle?.active?e?.roundedBundle?.active:e?.roundedBundle?.normal,radiusType:"custom"}}):{}}),getIconStyles=e=>({...e?.layout!=="horizontal-layout"?core.makeStyle({mr:e?.iconSpacing}):core.makeStyle({mb:e.iconSpacing}),...core.makeStyleResponsive("w",e?.iconSize,"px"),...core.makeStyleResponsive("h",e?.iconSize,"px")}),getSvgActiveStyles=e=>({...core.getGlobalColorStateStyle("c",e?.iconColor),...core.makeStyle({c:e?.iconColor?.active})}),getSvgStyles=e=>({...core.getGlobalColorStateStyle("c",{...e?.iconColor,normal:e?.iconColor?.normal})}),getAlignStyle=e=>{let o=e?.align==="left"?"start":e?.align==="right"?"end":"center";return{...core.makeStyle({ai:o})}},getFlexChildren=core.composeClasses("gp-flex-1"),getContainerStyles=(e,o,t)=>({...e,...getAlignStyle(o),...t});exports.getAlignStyle=getAlignStyle,exports.getContainerStyles=getContainerStyles,exports.getFlexChildren=getFlexChildren,exports.getIconStyles=getIconStyles,exports.getItemWrapStyles=getItemWrapStyles,exports.getSizeSettings=getSizeSettings,exports.getSvgActiveStyles=getSvgActiveStyles,exports.getSvgStyles=getSvgStyles;
@@ -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,4 +1,4 @@
1
- import{makeStyleResponsive,filterHoverVariables,getStyleShadowState,composeRadius,makeGlobalSize,composeTypographyStyle,getColor,getStyleShadow,getStyleBackgroundImage,getGlobalColorStateStyle,makeStyleState,composeBorderCss,composeCornerCss,GRADIENT_BGR_KEY}from"@gem-sdk/core";let getButtonWrapperStyles=(e,t)=>({...e,...makeStyleResponsive("ta",t?.align)}),getButtonStyles=(e,t)=>{let o={...getSizeStyles(e),...getRadiusStyles(e),...getShadowStyles(e),...getBackgroundStyles(e),...getTypographyStyles(e).textColorStyle};return t?o:filterHoverVariables(o)},getButtonIconStyles=(e,t)=>({...getIconSpacingStyle(e,t),"--height-desktop":`${e?.size?.desktop}`,"--height-tablet":`${e?.size?.desktop||e?.size?.tablet}`,"--height-mobile":`${e?.size?.mobile||e?.size?.tablet||e?.size?.desktop}`}),ignoreStateNoneValue=(obj,condition)=>Object.entries(obj).reduce((acc,[key,value])=>((!["hover","focus","normal"].includes(key)||eval(condition))&&(acc[key]=value),acc),{}),getShadowStyles=e=>{let{boxShadowBtn:t,hasBoxShadowBtn:o}=e||{},r=ignoreStateNoneValue(t||{},"value?.enable !== undefined");return{...getStyleShadowState(r,"box-shadow",o)}},getRadiusStyles=e=>{let t=ignoreStateNoneValue(e?.roundedBtnV2||{},"value?.radiusType !== undefined");return composeRadius(t)},getIconSpacingStyle=(e,t)=>{let o=e?.iconSpacing||{desktop:"8px"};return t?.iconAlign==="left"?makeStyleResponsive("mr",o):makeStyleResponsive("ml",o)},getSizeStyles=e=>{let t=makeGlobalSize(e?.globalSize);return{...t.width,...t.height,...t.padding}},getTypographyStyles=e=>{let t=composeTypographyStyle(e?.typo,e?.typography),o={"--c":t?.["--c"]},r={...t};return delete r["--c"],{textColorStyle:{"--hvr-c":getColor(e?.textColor?.hover),...o},withoutTextColorStyles:r}},getTypoStyles=e=>({...getTypographyStyles(e).withoutTextColorStyles,...getStyleShadow({styleAppliedFor:"text-shadow",value:e?.typo?.custom?.textShadow,isEnableShadow:e?.typo?.custom?.hasShadowText}),"word-break":"break-word"}),getBgImageUrl=(e,t)=>{let{backgroundImage:o,backgroundColorV2:r}=e||{},a=o?.[t],n=r?.[t];if(!a&&!n)return"";let l=`url(${a?.image?.src})`,s=n?`, ${n}`:"";return n?.includes(GRADIENT_BGR_KEY)&&a?.image?.src?`${l}${s}`:n?.includes(GRADIENT_BGR_KEY)&&!a?.image?.src?n:a?.image?.src?l:""},getBackgroundImageSource=e=>{let t={normal:getBgImageUrl(e,"normal"),hover:getBgImageUrl(e,"hover")};return makeStyleState("bgi",t)},getBackgroundStyles=e=>{let{backgroundColorV2:t,backgroundImage:o}=e||{},r={...o,hover:o?.hover||o?.normal},a={...t,hover:t?.hover||t?.normal};return{...getStyleBackgroundImage(r,{ignoreBackgroundImage:!0}),...getBackgroundImageSource({backgroundImage:r,backgroundColorV2:a}),...getGlobalColorStateStyle("bg",t)}},getCustomCssStyles=({styles:e,uid:t,builderAttrs:o,enableHoverEffect:r})=>{if(!t)return"";let{borderBtnV2:a,roundedBtnV2:n}=e??{},l=ignoreStateNoneValue(a||{},'value?.borderType !== "none"'),s=ignoreStateNoneValue(n||{},"value?.radiusType !== undefined"),g=generateBorderCornerStyles({uid:t,borderBtn:l,roundedBtn:s,builderAttrs:o,enableHoverEffect:r});return`
1
+ import{makeStyleResponsive,filterHoverVariables,getStyleShadowState,composeRadius,makeGlobalSize,composeTypographyStyle,getColor,getStyleShadow,getStyleBackgroundImage,getGlobalColorStateStyle,makeStyleState,composeBorderCss,composeCornerCss,GRADIENT_BGR_KEY}from"@gem-sdk/core";let getButtonWrapperStyles=(e,t)=>({...e,...makeStyleResponsive("ta",t?.align)}),getButtonStyles=(e,t)=>{let o={...getSizeStyles(e),...getRadiusStyles(e),...getShadowStyles(e),...getBackgroundStyles(e),...getTypographyStyles(e).textColorStyle};return t?o:filterHoverVariables(o)},getButtonIconStyles=(e,t)=>({...getIconSpacingStyle(e,t),"--height-desktop":`${e?.size?.desktop}`,"--height-tablet":`${e?.size?.desktop||e?.size?.tablet}`,"--height-mobile":`${e?.size?.mobile||e?.size?.tablet||e?.size?.desktop}`}),ignoreStateNoneValue=(obj,condition)=>Object.entries(obj).reduce((acc,[key,value])=>((!["hover","focus","normal"].includes(key)||eval(condition))&&(acc[key]=value),acc),{}),getShadowStyles=e=>{let{boxShadowBtn:t,hasBoxShadowBtn:o}=e||{},r=ignoreStateNoneValue(t||{},"value?.enable !== undefined");return{...getStyleShadowState(r,"box-shadow",o)}},getRadiusStyles=e=>{let t=ignoreStateNoneValue(e?.roundedBtnV2||{},"value?.radiusType !== undefined");return composeRadius(t)},getIconSpacingStyle=(e,t)=>{let o=e?.iconSpacing||{desktop:"8px"};return t?.iconAlign==="left"?makeStyleResponsive("mr",o):makeStyleResponsive("ml",o)},getSizeStyles=e=>{let t=makeGlobalSize(e?.globalSize);return{...t.width,...t.height,...t.padding}},getTypographyStyles=e=>{let t=composeTypographyStyle(e?.typo,e?.typography),o={"--c":t?.["--c"]},r={...t};return delete r["--c"],{textColorStyle:{"--hvr-c":getColor(e?.textColor?.hover),...o},withoutTextColorStyles:r}},getTypoStyles=e=>({...getTypographyStyles(e).withoutTextColorStyles,...getStyleShadow({styleAppliedFor:"text-shadow",value:e?.typo?.custom?.textShadow,isEnableShadow:e?.typo?.custom?.hasShadowText}),"word-break":"break-word"}),getBgImageUrl=(e,t)=>{let{backgroundImage:o,backgroundColorV2:r}=e||{},a=o?.[t],n=r?.[t];if(!a&&!n)return"";let l=`url(${a?.image?.src})`,s=n?`, ${n}`:"";return n?.includes(GRADIENT_BGR_KEY)&&a?.image?.src?`${l}${s}`:n?.includes(GRADIENT_BGR_KEY)&&!a?.image?.src?n:a?.image?.src?l:""},getBackgroundImageSource=e=>{let t={normal:getBgImageUrl(e,"normal"),hover:getBgImageUrl(e,"hover")};return makeStyleState("bgi",t)},getBackgroundStyles=e=>{let{backgroundColorV2:t,backgroundImage:o}=e||{},r={...o,hover:o?.hover||o?.normal},a={...t,hover:t?.hover||t?.normal};return{...getStyleBackgroundImage(r,{ignoreBackgroundImage:!0}),...getBackgroundImageSource({backgroundImage:r,backgroundColorV2:a}),...getGlobalColorStateStyle("bg",a)}},getCustomCssStyles=({styles:e,uid:t,builderAttrs:o,enableHoverEffect:r})=>{if(!t)return"";let{borderBtnV2:a,roundedBtnV2:n}=e??{},l=ignoreStateNoneValue(a||{},'value?.borderType !== "none"'),s=ignoreStateNoneValue(n||{},"value?.radiusType !== undefined"),g=generateBorderCornerStyles({uid:t,borderBtn:l,roundedBtn:s,builderAttrs:o,enableHoverEffect:r});return`
2
2
  ${g.normalStyles}
3
3
  ${g.hoverStyles}
4
4
  `.trim()},generateBorderCornerStyles=({uid:e,borderBtn:t,roundedBtn:o,builderAttrs:r,enableHoverEffect:a})=>{let n=r?.["data-component-tag"],l=({styleObj:e,state:t})=>{if(e)return e?.[t]},s=l({styleObj:t,state:"normal"}),g=l({styleObj:a?t:void 0,state:"hover"}),d=l({styleObj:o,state:"normal"}),i=l({styleObj:o,state:"hover"}),u=`
@@ -1 +1 @@
1
- import{composeClasses as e,makeGlobalSize as o,makeStyle as t,makeStyleState as l,composeRadius as n,getStyleShadowState as r,getStyleShadow as d,getBorderStyle as a,handleConvertBorderWidth as i,handleConvertBorderStyle as g,handleConvertBorderColor as S,getRadiusStyleActiveState as c,makeStyleResponsive as u,getGlobalColorStateStyle as s}from"@gem-sdk/core";let getSizeSettings=e=>o(e?.size),getItemWrapStyles=(e,o)=>({...getSizeSettings(e).width,...getSizeSettings(e).padding,...o?l("bg",{...e?.backgroundColor,hover:e?.backgroundColor?.active??e?.backgroundColor?.hover}):l("bg",e?.backgroundColor),...t({bg:o?e?.backgroundColor?.active:e?.backgroundColor?.normal}),...n(e?.roundedBundle),...r(e?.boxShadowBundle,"box-shadow",e?.hasBoxShadowBundle),...o?d({value:e?.boxShadowBundle?.active,styleAppliedFor:"box-shadow",isEnableShadow:e?.boxShadowBundle?.active?.enable}):{...d({value:e?.boxShadowBundle?.normal,styleAppliedFor:"box-shadow",isEnableShadow:e?.boxShadowBundle?.normal?.enable})},...o?a(e?.borderBundle?.active):{...i(e?.borderBundle),...g(e?.borderBundle),...S(e?.borderBundle)},...o?c({...e?.roundedBundle,active:{...e?.roundedBundle?.active?e?.roundedBundle?.active:e?.roundedBundle?.normal,radiusType:"custom"}}):{}}),getIconStyles=e=>({...e?.layout!=="horizontal-layout"?t({mr:e?.iconSpacing}):t({mb:e.iconSpacing}),...u("w",e?.iconSize,"px"),...u("h",e?.iconSize,"px")}),getSvgActiveStyles=e=>({...s("c",e?.iconColor),...t({c:e?.iconColor?.active})}),getSvgStyles=e=>({...s("c",{...e?.iconColor,normal:e?.iconColor?.normal})}),getAlignStyle=e=>{let o=e?.align==="left"?"start":e?.align==="right"?"end":"center";return{...t({ai:o})}},getFlexChildren=e("gp-flex-1"),getContainerStyles=(e,o,t)=>({...e,...getAlignStyle(o),...t});export{getAlignStyle,getContainerStyles,getFlexChildren,getIconStyles,getItemWrapStyles,getSizeSettings,getSvgActiveStyles,getSvgStyles};
1
+ import{composeClasses as e,makeGlobalSize as o,makeStyle as l,makeStyleState as t,composeRadius as n,getStyleShadowState as a,getStyleShadow as d,getBorderStyle as r,handleConvertBorderWidth as i,handleConvertBorderStyle as g,handleConvertBorderColor as S,getRadiusStyleActiveState as c,makeStyleResponsive as u,getGlobalColorStateStyle as s}from"@gem-sdk/core";let getSizeSettings=e=>o(e?.size),getItemWrapStyles=(e,o)=>({...getSizeSettings(e).width,...getSizeSettings(e).padding,...o?t("bg",{...e?.backgroundColor,hover:e?.backgroundColor?.active??e?.backgroundColor?.hover}):t("bg",e?.backgroundColor),...l({bg:o?e?.backgroundColor?.active:e?.backgroundColor?.normal}),...n(e?.roundedBundle),...a(e?.boxShadowBundle,"box-shadow",e?.hasBoxShadowBundle),...o?d({value:e?.boxShadowBundle?.active,styleAppliedFor:"box-shadow",isEnableShadow:e?.boxShadowBundle?.active?.enable||e?.hasBoxShadowBundle?.active}):{...d({value:e?.boxShadowBundle?.normal,styleAppliedFor:"box-shadow",isEnableShadow:e?.boxShadowBundle?.normal?.enable||e?.hasBoxShadowBundle?.normal})},...o?r(e?.borderBundle?.active):{...i(e?.borderBundle),...g(e?.borderBundle),...S(e?.borderBundle)},...o?c({...e?.roundedBundle,active:{...e?.roundedBundle?.active?e?.roundedBundle?.active:e?.roundedBundle?.normal,radiusType:"custom"}}):{}}),getIconStyles=e=>({...e?.layout!=="horizontal-layout"?l({mr:e?.iconSpacing}):l({mb:e.iconSpacing}),...u("w",e?.iconSize,"px"),...u("h",e?.iconSize,"px")}),getSvgActiveStyles=e=>({...s("c",e?.iconColor),...l({c:e?.iconColor?.active})}),getSvgStyles=e=>({...s("c",{...e?.iconColor,normal:e?.iconColor?.normal})}),getAlignStyle=e=>{let o=e?.align==="left"?"start":e?.align==="right"?"end":"center";return{...l({ai:o})}},getFlexChildren=e("gp-flex-1"),getContainerStyles=(e,o,l)=>({...e,...getAlignStyle(o),...l});export{getAlignStyle,getContainerStyles,getFlexChildren,getIconStyles,getItemWrapStyles,getSizeSettings,getSvgActiveStyles,getSvgStyles};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-staging.990",
3
+ "version": "2.0.0-staging.992",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",