@gem-sdk/components 2.0.0-staging.1072 → 2.0.0-staging.1074
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.
- package/dist/cjs/product/components/product-bundle/common/styles.js +1 -1
- package/dist/cjs/product/components/product-bundle/setting/ProductBundleDiscount.js +2 -2
- package/dist/esm/product/components/product-bundle/common/styles.js +1 -1
- package/dist/esm/product/components/product-bundle/setting/ProductBundleDiscount.js +4 -4
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");const getSizeSettings=e=>core.makeGlobalSize(e?.size),getItemWrapStyles=(e,
|
|
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:Object.keys(e?.boxShadowBundle?.active??{})?.length<=0?e?.boxShadowBundle?.normal:e?.boxShadowBundle?.active,styleAppliedFor:"box-shadow",isEnableShadow:e?.hasBoxShadowBundle?.active??e?.hasBoxShadowBundle?.normal}):{...core.getStyleShadowState({...e?.boxShadowBundle,active:{}},"box-shadow",{...e?.hasBoxShadowBundle,active:!1})},...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;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<rect x="8" y="36" width="12" height="4" rx="2" fill="#F9F9F9"/>
|
|
16
16
|
<rect x="24" y="36" width="40" height="4" rx="2" fill="#AAAAAA"/>
|
|
17
17
|
</svg>
|
|
18
|
-
`},components:[{tag:"ProductBundleDiscount",
|
|
18
|
+
`},components:[{tag:"ProductBundleDiscount",settings:{childItem:[],layout:"vertical-layout"},childrens:[]}]},{id:"product-bundle-horizontal-discount",name:{en:"Product Bundle Discount"},icon:{desktop:`<svg width="72" height="52" viewBox="0 0 72 52" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
19
19
|
<path d="M0 11C0 9.34315 1.34315 8 3 8H31C32.6569 8 34 9.34315 34 11V41C34 42.6569 32.6569 44 31 44H3C1.34315 44 0 42.6569 0 41V11Z" fill="#424242"/>
|
|
20
20
|
<rect x="11" y="16" width="12" height="4" rx="2" fill="#F9F9F9"/>
|
|
21
21
|
<rect x="5" y="24" width="24" height="4" rx="2" fill="#AAAAAA"/>
|
|
@@ -25,4 +25,4 @@
|
|
|
25
25
|
<rect x="43" y="24" width="24" height="4" rx="2" fill="#AAAAAA"/>
|
|
26
26
|
<rect x="49" y="32" width="12" height="4" rx="2" fill="#AAAAAA"/>
|
|
27
27
|
</svg>
|
|
28
|
-
`},components:[{tag:"ProductBundleDiscount",
|
|
28
|
+
`},components:[{tag:"ProductBundleDiscount",settings:{childItem:[],layout:"horizontal-layout",enableIcon:!1},childrens:[]}]}]};exports.default=config;
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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 a,handleConvertBorderWidth as i,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:Object.keys(e?.boxShadowBundle?.active??{})?.length<=0?e?.boxShadowBundle?.normal:e?.boxShadowBundle?.active,styleAppliedFor:"box-shadow",isEnableShadow:e?.hasBoxShadowBundle?.active??e?.hasBoxShadowBundle?.normal}):{...r({...e?.boxShadowBundle,active:{}},"box-shadow",{...e?.hasBoxShadowBundle,active:!1})},...o?a(e?.borderBundle?.active):{...i(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,4 +1,4 @@
|
|
|
1
|
-
import t from"./configs/ui-v2.js";import i from"./configs/ui-v1.js";import{ProductBundleDiscountSettings as
|
|
1
|
+
import t from"./configs/ui-v2.js";import i from"./configs/ui-v1.js";import{ProductBundleDiscountSettings as l}from"./configs/settings.js";let config={tag:"ProductBundleDiscount",label:"Product Bundle Discount",icon:`<svg width="72" height="52" viewBox="0 0 72 52" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<path d="M0 7C0 5.34315 1.34315 4 3 4H69C70.6569 4 72 5.34315 72 7V21C72 22.6569 70.6569 24 69 24H3C1.34315 24 0 22.6569 0 21V7Z" fill="#424242"/>
|
|
3
3
|
<rect x="8" y="12" width="12" height="4" rx="2" fill="#F9F9F9"/>
|
|
4
4
|
<rect x="24" y="12" width="40" height="4" rx="2" fill="#AAAAAA"/>
|
|
@@ -6,7 +6,7 @@ import t from"./configs/ui-v2.js";import i from"./configs/ui-v1.js";import{Produ
|
|
|
6
6
|
<rect x="8" y="36" width="12" height="4" rx="2" fill="#F9F9F9"/>
|
|
7
7
|
<rect x="24" y="36" width="40" height="4" rx="2" fill="#AAAAAA"/>
|
|
8
8
|
</svg>
|
|
9
|
-
`,settings:
|
|
9
|
+
`,settings:l,ui:i,uiV2:t,editorConfigs:{placeholder:{flowTag:["Product"],notAppendTags:["ProductList","ProductBundleDiscount"]}},presets:[{id:"product-bundle-discount",name:{en:"Product Bundle Discount"},icon:{desktop:`
|
|
10
10
|
<svg width="72" height="52" viewBox="0 0 72 52" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
11
11
|
<path d="M0 7C0 5.34315 1.34315 4 3 4H69C70.6569 4 72 5.34315 72 7V21C72 22.6569 70.6569 24 69 24H3C1.34315 24 0 22.6569 0 21V7Z" fill="#424242"/>
|
|
12
12
|
<rect x="8" y="12" width="12" height="4" rx="2" fill="#F9F9F9"/>
|
|
@@ -15,7 +15,7 @@ import t from"./configs/ui-v2.js";import i from"./configs/ui-v1.js";import{Produ
|
|
|
15
15
|
<rect x="8" y="36" width="12" height="4" rx="2" fill="#F9F9F9"/>
|
|
16
16
|
<rect x="24" y="36" width="40" height="4" rx="2" fill="#AAAAAA"/>
|
|
17
17
|
</svg>
|
|
18
|
-
`},components:[{tag:"ProductBundleDiscount",
|
|
18
|
+
`},components:[{tag:"ProductBundleDiscount",settings:{childItem:[],layout:"vertical-layout"},childrens:[]}]},{id:"product-bundle-horizontal-discount",name:{en:"Product Bundle Discount"},icon:{desktop:`<svg width="72" height="52" viewBox="0 0 72 52" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
19
19
|
<path d="M0 11C0 9.34315 1.34315 8 3 8H31C32.6569 8 34 9.34315 34 11V41C34 42.6569 32.6569 44 31 44H3C1.34315 44 0 42.6569 0 41V11Z" fill="#424242"/>
|
|
20
20
|
<rect x="11" y="16" width="12" height="4" rx="2" fill="#F9F9F9"/>
|
|
21
21
|
<rect x="5" y="24" width="24" height="4" rx="2" fill="#AAAAAA"/>
|
|
@@ -25,4 +25,4 @@ import t from"./configs/ui-v2.js";import i from"./configs/ui-v1.js";import{Produ
|
|
|
25
25
|
<rect x="43" y="24" width="24" height="4" rx="2" fill="#AAAAAA"/>
|
|
26
26
|
<rect x="49" y="32" width="12" height="4" rx="2" fill="#AAAAAA"/>
|
|
27
27
|
</svg>
|
|
28
|
-
`},components:[{tag:"ProductBundleDiscount",
|
|
28
|
+
`},components:[{tag:"ProductBundleDiscount",settings:{childItem:[],layout:"horizontal-layout",enableIcon:!1},childrens:[]}]}]};export{config as default};
|