@gem-sdk/components 2.0.0-staging.1005 → 2.0.0-staging.1006

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 addPxToValues=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,`${t}px`])),getDividerWidth=(e,t)=>{if(!e)return{};let r=addPxToValues(e),o={...core.makeStyleState("brw",r),...core.makeStyleState("blw",r)};return t?o:{...core.filterHoverVariables(o)}},getDividerColorStyle=(e,t)=>{if(!e)return{};let r={...core.getGlobalColorStateStyle("brc",e),...core.getGlobalColorStateStyle("blc",e)},o=Object.fromEntries(Object.entries(r).filter(([e,t])=>void 0!==t));return t?o:core.filterHoverVariables(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:r}=e,{borderBtn:o,inputBackgroundColor:l,textColor:a,dividerColor:i,dividerStroke:d,corner:s,inputBoxShadow:b}=t??{},{qtyStyle:n}=r??{},c=core.composeTypographyStyle(t?.typo,t?.typography),S=getDividerWidth(d,r?.enableHoverInput),v=getDividerColorStyle(i,r?.enableHoverInput),p=core.getStyleShadowState(b,"box-shadow",{hover:!!b?.hover}),y={...core.handleConvertBorderStyle(o),...core.handleConvertInputBorderWidth(o,n),...core.handleConvertInputBorderColor(o),...core.getGlobalColorStateStyle("bg",l),...p??{},...core.getGlobalColorStateStyle("c",{...a,hover:a?.hover??a?.normal})};return{...core.makeStyle({}),...c,...r?.enableHoverInput?y:core.filterHoverVariables(y),..."standard"===n?S:{},...v,...core.getStyleShadow({value:t?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:t?.typo?.custom?.hasShadowText}),...getInputBorderRadius({qtyStyle:n,corner:s})}},getDeviceRadius=(e,t,r)=>{let o="left"===t||"mixed"===t,l="right"===t||"mixed"===t;return{[e]:{normal:{btlr:o?r?.[e]?.normal?.btlr:void 0,bblr:o?r?.[e]?.normal?.bblr:void 0,btrr:l?r?.[e]?.normal?.btrr:void 0,bbrr:l?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:l?r?.[e]?.hover?.btrr:void 0,bbrr:l?r?.[e]?.hover?.bbrr:void 0,radiusType:r?.[e]?.hover?.radiusType??"custom"}}}},getButtonStyle=({borderBtn:e,buttonWidth:t,buttonBackgroundColor:r,iconColor:o,corner:l,buttonSide:a,buttonBoxShadow:i,enableHoverButton:d})=>{let s=core.getStyleShadowState(i,"box-shadow",{hover:!!i?.hover}),b={...core.handleConvertBorderStyle(e),...core.handleConvertBorderWidth(e),...core.handleConvertBorderColor(e),...core.getGlobalColorStateStyle("bg",r),...core.getGlobalColorStateStyle("c",o)};return{...core.makeStyleResponsive("w",t),...d?b:core.filterHoverVariables(b),...core.composeRadius({...getDeviceRadius("desktop",a,l),...getDeviceRadius("tablet",a,l),...getDeviceRadius("mobile",a,l)}),...d?s:core.filterHoverVariables(s??{})}},getContainerStyles=({inputHeight:e,align:t})=>({...core.makeStyleResponsive("h",e),...core.makeStyleResponsive("jc",t)}),getWrapperStyles=({backgroundColor:e,styles:t})=>{let r=t?.shapeShadow,o=core.getResponsiveStyleShadow(r,"box-shadow",{desktop:r?.desktop??{},tablet:r?.tablet??r?.desktop??{},mobile:r?.mobile??r?.tablet??r?.desktop??{}});return{...core.getGlobalColorStateStyle("bg",e),...core.makeStyleResponsive("maxw",t?.quantityWidth),...o}};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}px`])),getDividerWidth=(e,t)=>{if(!e)return{};let r=addPxToValues(e),o={...core.makeStyleState("brw",r),...core.makeStyleState("blw",r)};return t?o:{...core.filterHoverVariables(o)}},getDividerColorStyle=(e,t)=>{if(!e)return{};let r={...core.getGlobalColorStateStyle("brc",e),...core.getGlobalColorStateStyle("blc",e)},o=Object.fromEntries(Object.entries(r).filter(([e,t])=>void 0!==t));return t?o:core.filterHoverVariables(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:r}=e,{borderBtn:o,inputBackgroundColor:l,textColor:a,dividerColor:i,dividerStroke:d,corner:s,inputBoxShadow:b}=t??{},{qtyStyle:n}=r??{},c=core.composeTypographyStyle(t?.typo,t?.typography),S=getDividerWidth(d,r?.enableHoverInput),v=getDividerColorStyle(i,r?.enableHoverInput),p=core.getStyleShadowState(b,"box-shadow",{hover:!!b?.hover}),y={...core.handleConvertBorderStyle(o),...core.handleConvertInputBorderWidth(o,n),...core.handleConvertInputBorderColor(o),...core.getGlobalColorStateStyle("bg",l),...p??{},...core.getGlobalColorStateStyle("c",{...a,hover:a?.hover??a?.normal})};return{...core.makeStyle({}),...c,...r?.enableHoverInput?y:core.filterHoverVariables(y),..."standard"===n?{...S,...v}:{},...core.getStyleShadow({value:t?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:t?.typo?.custom?.hasShadowText}),...getInputBorderRadius({qtyStyle:n,corner:s})}},getDeviceRadius=(e,t,r)=>{let o="left"===t||"mixed"===t,l="right"===t||"mixed"===t;return{[e]:{normal:{btlr:o?r?.[e]?.normal?.btlr:void 0,bblr:o?r?.[e]?.normal?.bblr:void 0,btrr:l?r?.[e]?.normal?.btrr:void 0,bbrr:l?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:l?r?.[e]?.hover?.btrr:void 0,bbrr:l?r?.[e]?.hover?.bbrr:void 0,radiusType:r?.[e]?.hover?.radiusType??"custom"}}}},getButtonStyle=({borderBtn:e,buttonWidth:t,buttonBackgroundColor:r,iconColor:o,corner:l,buttonSide:a,buttonBoxShadow:i,enableHoverButton:d})=>{let s=core.getStyleShadowState(i,"box-shadow",{hover:!!i?.hover}),b={...core.handleConvertBorderStyle(e),...core.handleConvertBorderWidth(e),...core.handleConvertBorderColor(e),...core.getGlobalColorStateStyle("bg",r),...core.getGlobalColorStateStyle("c",o)};return{...core.makeStyleResponsive("w",t),...d?b:core.filterHoverVariables(b),...core.composeRadius({...getDeviceRadius("desktop",a,l),...getDeviceRadius("tablet",a,l),...getDeviceRadius("mobile",a,l)}),...d?s:core.filterHoverVariables(s??{})}},getContainerStyles=({inputHeight:e,align:t})=>({...core.makeStyleResponsive("h",e),...core.makeStyleResponsive("jc",t)}),getWrapperStyles=({backgroundColor:e,styles:t})=>{let r=t?.shapeShadow,o=core.getResponsiveStyleShadow(r,"box-shadow",{desktop:r?.desktop??{},tablet:r?.tablet??r?.desktop??{},mobile:r?.mobile??r?.tablet??r?.desktop??{}});return{...core.getGlobalColorStateStyle("bg",e),...core.makeStyleResponsive("maxw",t?.quantityWidth),...o}};exports.getButtonStyle=getButtonStyle,exports.getContainerStyles=getContainerStyles,exports.getInputStyle=getInputStyle,exports.getWrapperStyles=getWrapperStyles;
@@ -1 +1 @@
1
- import{composeTypographyStyle as e,getStyleShadowState as t,handleConvertBorderStyle as r,handleConvertInputBorderWidth as o,handleConvertInputBorderColor as i,getGlobalColorStateStyle as d,makeStyle as l,filterHoverVariables as a,getStyleShadow as b,handleConvertBorderWidth as s,handleConvertBorderColor as n,makeStyleResponsive as u,composeRadius as v,getResponsiveStyleShadow as p,makeStyleState as m}from"@gem-sdk/core";let addPxToValues=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,`${t}px`])),getDividerWidth=(e,t)=>{if(!e)return{};let r=addPxToValues(e),o={...m("brw",r),...m("blw",r)};return t?o:{...a(o)}},getDividerColorStyle=(e,t)=>{if(!e)return{};let r={...d("brc",e),...d("blc",e)},o=Object.fromEntries(Object.entries(r).filter(([e,t])=>void 0!==t));return t?o:a(o)},getInputBorderRadius=({qtyStyle:e,corner:t})=>"minimalist"!==e?{}:{...v({...getDeviceRadius("desktop","mixed",t),...getDeviceRadius("tablet","mixed",t),...getDeviceRadius("mobile","mixed",t)})},getInputStyle=s=>{let{styles:n,setting:u}=s,{borderBtn:v,inputBackgroundColor:p,textColor:m,dividerColor:h,dividerStroke:g,corner:c,inputBoxShadow:y}=n??{},{qtyStyle:x}=u??{},S=e(n?.typo,n?.typography),w=getDividerWidth(g,u?.enableHoverInput),D=getDividerColorStyle(h,u?.enableHoverInput),R=t(y,"box-shadow",{hover:!!y?.hover}),f={...r(v),...o(v,x),...i(v),...d("bg",p),...R??{},...d("c",{...m,hover:m?.hover??m?.normal})};return{...l({}),...S,...u?.enableHoverInput?f:a(f),..."standard"===x?w:{},...D,...b({value:n?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:n?.typo?.custom?.hasShadowText}),...getInputBorderRadius({qtyStyle:x,corner:c})}},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:o,buttonBackgroundColor:i,iconColor:l,corner:b,buttonSide:p,buttonBoxShadow:m,enableHoverButton:h})=>{let g=t(m,"box-shadow",{hover:!!m?.hover}),c={...r(e),...s(e),...n(e),...d("bg",i),...d("c",l)};return{...u("w",o),...h?c:a(c),...v({...getDeviceRadius("desktop",p,b),...getDeviceRadius("tablet",p,b),...getDeviceRadius("mobile",p,b)}),...h?g:a(g??{})}},getContainerStyles=({inputHeight:e,align:t})=>({...u("h",e),...u("jc",t)}),getWrapperStyles=({backgroundColor:e,styles:t})=>{let r=t?.shapeShadow,o=p(r,"box-shadow",{desktop:r?.desktop??{},tablet:r?.tablet??r?.desktop??{},mobile:r?.mobile??r?.tablet??r?.desktop??{}});return{...d("bg",e),...u("maxw",t?.quantityWidth),...o}};export{getButtonStyle,getContainerStyles,getInputStyle,getWrapperStyles};
1
+ import{composeTypographyStyle as e,getStyleShadowState as t,handleConvertBorderStyle as r,handleConvertInputBorderWidth as o,handleConvertInputBorderColor as i,getGlobalColorStateStyle as d,makeStyle as l,filterHoverVariables as a,getStyleShadow as b,handleConvertBorderWidth as s,handleConvertBorderColor as n,makeStyleResponsive as u,composeRadius as v,getResponsiveStyleShadow as p,makeStyleState as m}from"@gem-sdk/core";let addPxToValues=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,`${t}px`])),getDividerWidth=(e,t)=>{if(!e)return{};let r=addPxToValues(e),o={...m("brw",r),...m("blw",r)};return t?o:{...a(o)}},getDividerColorStyle=(e,t)=>{if(!e)return{};let r={...d("brc",e),...d("blc",e)},o=Object.fromEntries(Object.entries(r).filter(([e,t])=>void 0!==t));return t?o:a(o)},getInputBorderRadius=({qtyStyle:e,corner:t})=>"minimalist"!==e?{}:{...v({...getDeviceRadius("desktop","mixed",t),...getDeviceRadius("tablet","mixed",t),...getDeviceRadius("mobile","mixed",t)})},getInputStyle=s=>{let{styles:n,setting:u}=s,{borderBtn:v,inputBackgroundColor:p,textColor:m,dividerColor:h,dividerStroke:g,corner:c,inputBoxShadow:y}=n??{},{qtyStyle:x}=u??{},S=e(n?.typo,n?.typography),w=getDividerWidth(g,u?.enableHoverInput),D=getDividerColorStyle(h,u?.enableHoverInput),R=t(y,"box-shadow",{hover:!!y?.hover}),f={...r(v),...o(v,x),...i(v),...d("bg",p),...R??{},...d("c",{...m,hover:m?.hover??m?.normal})};return{...l({}),...S,...u?.enableHoverInput?f:a(f),..."standard"===x?{...w,...D}:{},...b({value:n?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:n?.typo?.custom?.hasShadowText}),...getInputBorderRadius({qtyStyle:x,corner:c})}},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:o,buttonBackgroundColor:i,iconColor:l,corner:b,buttonSide:p,buttonBoxShadow:m,enableHoverButton:h})=>{let g=t(m,"box-shadow",{hover:!!m?.hover}),c={...r(e),...s(e),...n(e),...d("bg",i),...d("c",l)};return{...u("w",o),...h?c:a(c),...v({...getDeviceRadius("desktop",p,b),...getDeviceRadius("tablet",p,b),...getDeviceRadius("mobile",p,b)}),...h?g:a(g??{})}},getContainerStyles=({inputHeight:e,align:t})=>({...u("h",e),...u("jc",t)}),getWrapperStyles=({backgroundColor:e,styles:t})=>{let r=t?.shapeShadow,o=p(r,"box-shadow",{desktop:r?.desktop??{},tablet:r?.tablet??r?.desktop??{},mobile:r?.mobile??r?.tablet??r?.desktop??{}});return{...d("bg",e),...u("maxw",t?.quantityWidth),...o}};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.1005",
3
+ "version": "2.0.0-staging.1006",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",