@gem-sdk/components 2.0.0-staging.1061 → 2.0.0-staging.1062
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
|
-
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};
|