@gem-sdk/components 2.0.0-staging.756 → 2.0.0-staging.757
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?Object.fromEntries(Object.entries(t).map(([e,t])=>[e,`${t}px`])):{}])),getDividerWidth=e=>{if(!e)return{};let t=addPxToValues(e);return{...core.makeStyleResponsiveState("brw",t),...core.makeStyleResponsiveState("blw",t)}},getDividerColorStyle=e=>e
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");const addPxToValues=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,t?Object.fromEntries(Object.entries(t).map(([e,t])=>[e,`${t}px`])):{}])),getDividerWidth=e=>{if(!e)return{};let t=addPxToValues(e);return{...core.makeStyleResponsiveState("brw",t),...core.makeStyleResponsiveState("blw",t)}},getDividerColorStyle=e=>{if(!e)return{};let t={...core.makeStyleResponsiveState("brc",e),...core.makeStyleResponsiveState("blc",e)},o=Object.fromEntries(Object.entries(t).filter(([e,t])=>void 0!==t));return 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:o}=e,{borderBtn:r,inputBackgroundColor:l,textColor:a,dividerColor:s,dividerStroke:i,corner:d,inputBoxShadow:b}=t??{},{qtyStyle:n}=o??{},p=core.composeTypographyStyle(t?.typo,t?.typography),c=getDividerWidth(i),S=getDividerColorStyle(s),y=core.getResponsiveStyleShadow(b,"box-shadow",{desktop:b?.desktop??{},tablet:b?.tablet??b?.desktop??{},mobile:b?.mobile??b?.tablet??b?.desktop??{}});return{...core.makeStyle({}),...p,...core.getGlobalColorStateStyle("bg",l),...core.getGlobalColorStateStyle("c",a),...core.handleConvertBorderStyle(r),...core.handleConvertInputBorderWidth(r,n),...core.handleConvertInputBorderColor(r),..."standard"===n?c:{},...S,...core.getStyleShadow({value:t?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:t?.typo?.custom?.hasShadowText}),...getInputBorderRadius({qtyStyle:n,corner:d}),...y}},getDeviceRadius=(e,t,o)=>{let r="left"===t||"mixed"===t,l="right"===t||"mixed"===t;return{[e]:{normal:{btlr:r?o?.[e]?.normal?.btlr:void 0,bblr:r?o?.[e]?.normal?.bblr:void 0,btrr:l?o?.[e]?.normal?.btrr:void 0,bbrr:l?o?.[e]?.normal?.bbrr:void 0,radiusType:o?.[e]?.normal?.radiusType??"custom"},hover:{btlr:r?o?.[e]?.hover?.btlr:void 0,bblr:r?o?.[e]?.hover?.bblr:void 0,btrr:l?o?.[e]?.hover?.btrr:void 0,bbrr:l?o?.[e]?.hover?.bbrr:void 0,radiusType:o?.[e]?.hover?.radiusType??"custom"}}}},getButtonStyle=({borderBtn:e,buttonWidth:t,buttonBackgroundColor:o,iconColor:r,corner:l,buttonSide:a,buttonBoxShadow:s})=>{let i=core.getResponsiveStyleShadow(s,"box-shadow",{desktop:s?.desktop??{},tablet:s?.tablet??s?.desktop??{},mobile:s?.mobile??s?.tablet??s?.desktop??{}});return{...core.makeStyleResponsive("w",t),...core.getGlobalColorStateStyle("bg",o),...core.getGlobalColorStateStyle("c",r),...core.handleConvertBorderStyle(e),...core.handleConvertBorderWidth(e),...core.handleConvertBorderColor(e),...core.composeRadius({...getDeviceRadius("desktop",a,l),...getDeviceRadius("tablet",a,l),...getDeviceRadius("mobile",a,l)}),...i}},getContainerStyles=({inputHeight:e,align:t})=>({...core.makeStyleResponsive("h",e),...core.makeStyleResponsive("jc",t)}),getWrapperStyles=({backgroundColor:e,styles:t})=>{let o=t?.shapeShadow,r=core.getResponsiveStyleShadow(o,"box-shadow",{desktop:o?.desktop??{},tablet:o?.tablet??o?.desktop??{},mobile:o?.mobile??o?.tablet??o?.desktop??{}});return{...core.getGlobalColorStateStyle("bg",e),...core.makeStyleResponsive("maxw",t?.quantityWidth),...r}};exports.getButtonStyle=getButtonStyle,exports.getContainerStyles=getContainerStyles,exports.getInputStyle=getInputStyle,exports.getWrapperStyles=getWrapperStyles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{composeTypographyStyle as e,getResponsiveStyleShadow as t,makeStyle as r,getGlobalColorStateStyle as o,handleConvertBorderStyle as i,handleConvertInputBorderWidth as d,handleConvertInputBorderColor as l,getStyleShadow as
|
|
1
|
+
import{composeTypographyStyle as e,getResponsiveStyleShadow as t,makeStyle as r,getGlobalColorStateStyle as o,handleConvertBorderStyle as i,handleConvertInputBorderWidth as d,handleConvertInputBorderColor as l,getStyleShadow as b,makeStyleResponsive as a,handleConvertBorderWidth as s,handleConvertBorderColor as p,composeRadius as u,makeStyleResponsiveState as m}from"@gem-sdk/core";let addPxToValues=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,t?Object.fromEntries(Object.entries(t).map(([e,t])=>[e,`${t}px`])):{}])),getDividerWidth=e=>{if(!e)return{};let t=addPxToValues(e);return{...m("brw",t),...m("blw",t)}},getDividerColorStyle=e=>{if(!e)return{};let t={...m("brc",e),...m("blc",e)},r=Object.fromEntries(Object.entries(t).filter(([e,t])=>void 0!==t));return r},getInputBorderRadius=({qtyStyle:e,corner:t})=>"minimalist"!==e?{}:{...u({...getDeviceRadius("desktop","mixed",t),...getDeviceRadius("tablet","mixed",t),...getDeviceRadius("mobile","mixed",t)})},getInputStyle=a=>{let{styles:s,setting:p}=a,{borderBtn:u,inputBackgroundColor:m,textColor:n,dividerColor:g,dividerStroke:v,corner:c,inputBoxShadow:h}=s??{},{qtyStyle:y}=p??{},x=e(s?.typo,s?.typography),k=getDividerWidth(v),S=getDividerColorStyle(g),w=t(h,"box-shadow",{desktop:h?.desktop??{},tablet:h?.tablet??h?.desktop??{},mobile:h?.mobile??h?.tablet??h?.desktop??{}});return{...r({}),...x,...o("bg",m),...o("c",n),...i(u),...d(u,y),...l(u),..."standard"===y?k:{},...S,...b({value:s?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:s?.typo?.custom?.hasShadowText}),...getInputBorderRadius({qtyStyle:y,corner:c}),...w}},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:r,buttonBackgroundColor:d,iconColor:l,corner:b,buttonSide:m,buttonBoxShadow:n})=>{let g=t(n,"box-shadow",{desktop:n?.desktop??{},tablet:n?.tablet??n?.desktop??{},mobile:n?.mobile??n?.tablet??n?.desktop??{}});return{...a("w",r),...o("bg",d),...o("c",l),...i(e),...s(e),...p(e),...u({...getDeviceRadius("desktop",m,b),...getDeviceRadius("tablet",m,b),...getDeviceRadius("mobile",m,b)}),...g}},getContainerStyles=({inputHeight:e,align:t})=>({...a("h",e),...a("jc",t)}),getWrapperStyles=({backgroundColor:e,styles:r})=>{let i=r?.shapeShadow,d=t(i,"box-shadow",{desktop:i?.desktop??{},tablet:i?.tablet??i?.desktop??{},mobile:i?.mobile??i?.tablet??i?.desktop??{}});return{...o("bg",e),...a("maxw",r?.quantityWidth),...d}};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.
|
|
3
|
+
"version": "2.0.0-staging.757",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"scan-all-text": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/scan-all-text && node ./scripts/scan-all-text"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@gem-sdk/core": "2.0.0-staging.
|
|
28
|
+
"@gem-sdk/core": "2.0.0-staging.757",
|
|
29
29
|
"@gem-sdk/styles": "2.0.0-staging.711",
|
|
30
30
|
"@gem-sdk/system": "2.0.0-staging.711",
|
|
31
31
|
"@types/react-transition-group": "^4.4.5",
|