@gem-sdk/components 2.0.0-staging.1061 → 2.0.0-staging.1063
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 +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?.normal}):core.makeStyleState("bg",e?.backgroundColor),...core.makeStyle({bg:o?e?.backgroundColor?.active:e?.backgroundColor?.normal}),...o?core.composeRadius({...e?.roundedBundle,hover:e?.roundedBundle?.active??e?.roundedBundle?.normal}):core.composeRadius(e?.roundedBundle),...o?core.getStyleShadow({value:e?.boxShadowBundle?.active,styleAppliedFor:"box-shadow",isEnableShadow:e?.boxShadowBundle?.active?.enable||e?.hasBoxShadowBundle?.active}):{...core.
|
|
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?.normal}):core.makeStyleState("bg",e?.backgroundColor),...core.makeStyle({bg:o?e?.backgroundColor?.active:e?.backgroundColor?.normal}),...o?core.composeRadius({...e?.roundedBundle,hover:e?.roundedBundle?.active??e?.roundedBundle?.normal}):core.composeRadius(e?.roundedBundle),...o?core.getStyleShadow({value:e?.boxShadowBundle?.active,styleAppliedFor:"box-shadow",isEnableShadow:e?.boxShadowBundle?.active?.enable||e?.hasBoxShadowBundle?.active}):{...core.getStyleShadowState(e?.boxShadowBundle,"box-shadow",e?.hasBoxShadowBundle)},...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 +1 @@
|
|
|
1
|
-
"use strict";var helpers=require("../../helpers.js");require("@gem-sdk/core");const formatThickness=e=>"number"==typeof e?e+"px":"string"!=typeof e||e.includes("px")?e:e+"px",getDisplayText=({type:e,styles:t,setting:r,builderProps:a,pageContext:s})=>{let{text:i,isForceValue:
|
|
1
|
+
"use strict";var helpers=require("../../helpers.js");require("@gem-sdk/core");const formatThickness=e=>e?"number"==typeof e?e+"px":"string"!=typeof e||e.includes("px")?e:e+"px":"auto",getDisplayText=({type:e,styles:t,setting:r,builderProps:a,pageContext:s})=>{let{text:i,isForceValue:o}=r??{},n="",l=["Heading","Text"].includes(a?.builderData?.tag??"")&&!s?.isPreviewing,c=helpers.replaceLinkData(i?.toString()),p=t?.typo?.attrs?.transform==="capitalize";return"React"===e?n=p?i?.toString().toLocaleLowerCase():i?.toString():o?n=c:r?.translate?(n=helpers.getDynamicSourceLocales({val:i,uid:a?.uid,settingId:r?.translate,pageContext:s,isCapitalize:p,translate:r.translate,isReplaceLocationOrigin:l}))==i&&(n=c):n=p?c?.toString().toLocaleLowerCase():c,n};exports.formatThickness=formatThickness,exports.getDisplayText=getDisplayText;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{composeClasses as e,makeGlobalSize as o,makeStyle as
|
|
1
|
+
import{composeClasses as e,makeGlobalSize as o,makeStyle as t,makeStyleState as n,composeRadius as l,getStyleShadow as d,getStyleShadowState as r,getBorderStyle as i,handleConvertBorderWidth as a,handleConvertBorderStyle as g,handleConvertBorderColor as c,getRadiusStyleActiveState as u,makeStyleResponsive as S,getGlobalColorStateStyle as s}from"@gem-sdk/core";let getSizeSettings=e=>o(e?.size),getItemWrapStyles=(e,o)=>({...getSizeSettings(e).width,...getSizeSettings(e).padding,...o?n("bg",{...e?.backgroundColor,hover:e?.backgroundColor?.active??e?.backgroundColor?.normal}):n("bg",e?.backgroundColor),...t({bg:o?e?.backgroundColor?.active:e?.backgroundColor?.normal}),...o?l({...e?.roundedBundle,hover:e?.roundedBundle?.active??e?.roundedBundle?.normal}):l(e?.roundedBundle),...o?d({value:e?.boxShadowBundle?.active,styleAppliedFor:"box-shadow",isEnableShadow:e?.boxShadowBundle?.active?.enable||e?.hasBoxShadowBundle?.active}):{...r(e?.boxShadowBundle,"box-shadow",e?.hasBoxShadowBundle)},...o?i(e?.borderBundle?.active):{...a(e?.borderBundle),...g(e?.borderBundle),...c(e?.borderBundle)},...o?u({...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}),...S("w",e?.iconSize,"px"),...S("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 +1 @@
|
|
|
1
|
-
import{replaceLinkData as t,getDynamicSourceLocales as e}from"../../helpers.js";import"@gem-sdk/core";let formatThickness=t=>"number"==typeof t?t+"px":"string"!=typeof t||t.includes("px")?t:t+"px",getDisplayText=({type:a,styles:r,setting:i,builderProps:o,pageContext:s})=>{let{text:n,isForceValue:l}=i??{},p="",g=["Heading","Text"].includes(o?.builderData?.tag??"")&&!s?.isPreviewing,c=t(n?.toString()),d=r?.typo?.attrs?.transform==="capitalize";return"React"===a?p=d?n?.toString().toLocaleLowerCase():n?.toString():l?p=c:i?.translate?(p=e({val:n,uid:o?.uid,settingId:i?.translate,pageContext:s,isCapitalize:d,translate:i.translate,isReplaceLocationOrigin:g}))==n&&(p=c):p=d?c?.toString().toLocaleLowerCase():c,p};export{formatThickness,getDisplayText};
|
|
1
|
+
import{replaceLinkData as t,getDynamicSourceLocales as e}from"../../helpers.js";import"@gem-sdk/core";let formatThickness=t=>t?"number"==typeof t?t+"px":"string"!=typeof t||t.includes("px")?t:t+"px":"auto",getDisplayText=({type:a,styles:r,setting:i,builderProps:o,pageContext:s})=>{let{text:n,isForceValue:l}=i??{},p="",g=["Heading","Text"].includes(o?.builderData?.tag??"")&&!s?.isPreviewing,c=t(n?.toString()),d=r?.typo?.attrs?.transform==="capitalize";return"React"===a?p=d?n?.toString().toLocaleLowerCase():n?.toString():l?p=c:i?.translate?(p=e({val:n,uid:o?.uid,settingId:i?.translate,pageContext:s,isCapitalize:d,translate:i.translate,isReplaceLocationOrigin:g}))==n&&(p=c):p=d?c?.toString().toLocaleLowerCase():c,p};export{formatThickness,getDisplayText};
|