@gem-sdk/components 2.0.0-staging.791 → 2.0.0-staging.793
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/setting/ProductBundleDiscount.js +2 -2
- package/dist/cjs/product/components/product-variants/common/base/styles.js +1 -1
- package/dist/cjs/product/settings/product-vendor/configs/ui-v2.js +1 -1
- package/dist/esm/product/components/product-bundle/setting/ProductBundleDiscount.js +2 -2
- package/dist/esm/product/components/product-variants/common/base/styles.js +1 -1
- package/dist/esm/product/settings/product-vendor/configs/ui-v2.js +1 -1
- package/package.json +1 -1
|
@@ -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",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">
|
|
18
|
+
`},components:[{tag:"ProductBundleDiscount",advanced:{of:"hidden"},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",settings:{childItem:[],layout:"horizontal-layout",enableIcon:!1},childrens:[]}]}]};exports.default=config;
|
|
28
|
+
`},components:[{tag:"ProductBundleDiscount",advanced:{of:"hidden"},settings:{childItem:[],layout:"horizontal-layout",enableIcon:!1},childrens:[]}]}]};exports.default=config;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core"),helpers=require("../../../../../helpers.js");const getWrapperStyleActive=e=>{let{preset:t,optionTransform:o,optionTypography:r,optionTypo:l,typeOfOption:a}=e,p=t?.optionBgColor,i=t?.optionTextColor,c=t?.optionBorder,d=t?.optionHasShadow,h=t?.optionShadow,n=t?.optionRounded,g="color"===a,s="image"===a||"image_shopify"===a,y=core.composeTypographyStyle(l,r),S=e=>core.makeStyle({bg:e&&core.getSingleColorVariable(p?.active),bs:c?.active?.border,bw:c?.active?.width,bc:core.getSingleColorVariable(c?.active?.color)});return helpers.filterTruthyObject({...S(!g),...core.getRadiusStyleActiveState(n),...core.getStyleShadow({value:h?.active,state:"active",styleAppliedFor:"box-shadow",isEnableShadow:d?.active},!0),...!g&&!s&&core.makeStyle({c:o}),...!g&&!s&&core.makeStyle({c:core.getSingleColorVariable(i?.active)}),...y,...core.makeStyle({h:t?.height})})},getWrapperStyleNormalAndHover=e=>{let{preset:t,optionTransform:o,optionTypography:r,optionTypo:l,typeOfOption:a}=e,p=t?.optionBgColor,i=t?.optionTextColor,c=t?.optionBorder,d=t?.optionHasShadow,h=t?.optionShadow,n=t?.optionRounded,g="color"===a,s="image"===a||"image_shopify"===a,y=core.composeTypographyStyle(l,r),S=["normal","hover"].reduce((e,t)=>({...e,...core.getStyleShadow({value:h?.[t],state:t,styleAppliedFor:"box-shadow",isEnableShadow:d?.[t]})}),{});return helpers.filterTruthyObject({...core.composeRadius(n),...S,...!g&&core.getGlobalColorStateStyle("bg",p),...!g&&core.handleConvertBorderStyle(c),...!g&&core.handleConvertBorderWidth(c),...!g&&core.handleConvertBorderColor(c),...!g&&!s&&core.makeStyle({c:o}),...!g&&!s&&core.getGlobalColorStateStyle("c",i),...y,...core.makeStyle({h:t?.height})})},getWrapperTextStyle=e=>{let{preset:t,typeOfOption:o}=e,r="color"===o,l=()=>{let e="16px",o={"--pl":"0px","--pr":"0px","--pl-tablet":"0px","--pr-tablet":"0px","--pl-mobile":"0px","--pr-mobile":"0px","--pt":"0px","--pb":"0px"};return t?.width?.desktop?.toLowerCase()!=="auto"&&t?.width?.desktop||(o["--pl"]=e,o["--pr"]=e),t?.width?.tablet?.toLowerCase()!=="auto"&&t?.width?.tablet||(o["--pl-tablet"]=e,o["--pr-tablet"]=e),t?.width?.mobile?.toLowerCase()!=="auto"&&t?.width?.mobile||(o["--pl-mobile"]=e,o["--pr-mobile"]=e),(t?.height?.toLowerCase()==="auto"||t?.height)&&(o["--pt"]="8px",o["--pb"]="8px"),o};return helpers.filterTruthyObject({...r?{}:l()})},getColorStyle=({optionBorder:e,optionRounded:t,isActive:o,color:r})=>{let l=()=>r?r?.startsWith("linear-gradient")?{backgroundImage:r}:{backgroundColor:r}:{},a=o=>({"--d":"flex","--jc":"center"," --ai":"center","--w":"100%","--h":"100%","--of":"hidden","--bs":o?"none":"solid",...core.handleConvertBorderWidth(e),...core.handleConvertBorderColor(e),...core.composeRadius(t),...l()});return a(!!o)},getTextStyle=({optionTypo:e,optionTypography:t})=>{let o=core.composeTypographyStyle(e,t);return helpers.filterTruthyObject({...o})};exports.getColorStyle=getColorStyle,exports.getTextStyle=getTextStyle,exports.getWrapperStyleActive=getWrapperStyleActive,exports.getWrapperStyleNormalAndHover=getWrapperStyleNormalAndHover,exports.getWrapperTextStyle=getWrapperTextStyle;
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),helpers=require("../../../../../helpers.js");const getWrapperStyleActive=e=>{let{preset:t,optionTransform:o,optionTypography:r,optionTypo:l,typeOfOption:a}=e,p=t?.optionBgColor,i=t?.optionTextColor,c=t?.optionBorder,d=t?.optionHasShadow,h=t?.optionShadow,n=t?.optionRounded,g="color"===a,s="image"===a||"image_shopify"===a,y=core.composeTypographyStyle(l,r),S=e=>core.makeStyle({bg:e&&core.getSingleColorVariable(p?.active),bs:c?.active?.border,bw:c?.active?.width,bc:core.getSingleColorVariable(c?.active?.color)});return helpers.filterTruthyObject({...S(!g),...core.getRadiusStyleActiveState(n),...core.getStyleShadow({value:h?.active,state:"active",styleAppliedFor:"box-shadow",isEnableShadow:d?.active},!0),...!g&&!s&&core.makeStyle({c:o}),...!g&&!s&&core.makeStyle({c:core.getSingleColorVariable(i?.active)}),...y,...core.makeStyle({h:t?.height})})},getWrapperStyleNormalAndHover=e=>{let{preset:t,optionTransform:o,optionTypography:r,optionTypo:l,typeOfOption:a}=e,p=t?.optionBgColor,i=t?.optionTextColor,c=t?.optionBorder,d=t?.optionHasShadow,h=t?.optionShadow,n=t?.optionRounded,g="color"===a,s="image"===a||"image_shopify"===a,y=core.composeTypographyStyle(l,r),S=["normal","hover"].reduce((e,t)=>({...e,...core.getStyleShadow({value:h?.[t],state:t,styleAppliedFor:"box-shadow",isEnableShadow:d?.[t]})}),{});return helpers.filterTruthyObject({...core.composeRadius(n),...S,...!g&&core.getGlobalColorStateStyle("bg",p),...!g&&core.handleConvertBorderStyle(c),...!g&&core.handleConvertBorderWidth(c),...!g&&core.handleConvertBorderColor(c),...!g&&!s&&core.makeStyle({c:o}),...!g&&!s&&core.getGlobalColorStateStyle("c",i),...g&&getColorStyle({optionBorder:c,optionRounded:n}),...y,...core.makeStyle({h:t?.height})})},getWrapperTextStyle=e=>{let{preset:t,typeOfOption:o}=e,r="color"===o,l=()=>{let e="16px",o={"--pl":"0px","--pr":"0px","--pl-tablet":"0px","--pr-tablet":"0px","--pl-mobile":"0px","--pr-mobile":"0px","--pt":"0px","--pb":"0px"};return t?.width?.desktop?.toLowerCase()!=="auto"&&t?.width?.desktop||(o["--pl"]=e,o["--pr"]=e),t?.width?.tablet?.toLowerCase()!=="auto"&&t?.width?.tablet||(o["--pl-tablet"]=e,o["--pr-tablet"]=e),t?.width?.mobile?.toLowerCase()!=="auto"&&t?.width?.mobile||(o["--pl-mobile"]=e,o["--pr-mobile"]=e),(t?.height?.toLowerCase()==="auto"||t?.height)&&(o["--pt"]="8px",o["--pb"]="8px"),o};return helpers.filterTruthyObject({...r?{}:l()})},getColorStyle=({optionBorder:e,optionRounded:t,isActive:o,color:r})=>{let l=()=>r?r?.startsWith("linear-gradient")?{backgroundImage:r}:{backgroundColor:r}:{},a=o=>({"--d":"flex","--jc":"center"," --ai":"center","--w":"100%","--h":"100%","--of":"hidden","--bs":o?"none":"solid",...core.handleConvertBorderWidth(e),...core.handleConvertBorderColor(e),...core.composeRadius(t),...l()});return a(!!o)},getTextStyle=({optionTypo:e,optionTypography:t})=>{let o=core.composeTypographyStyle(e,t);return helpers.filterTruthyObject({...o})};exports.getColorStyle=getColorStyle,exports.getTextStyle=getTextStyle,exports.getWrapperStyleActive=getWrapperStyleActive,exports.getWrapperStyleNormalAndHover=getWrapperStyleNormalAndHover,exports.getWrapperTextStyle=getWrapperTextStyle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const SettingUIV2=[{label:{en:"Text style"},controls:[{type:"combo",label:{en:"Label"},iconName:"polaris-text-block",getValueFromSettingID:"label",compoDefaultValue:"Vendor: ",popoverLabel:{en:"Vendor label"},controls:[{label:{en:"Prefix"},setting:{id:"label"},options:{labelAlign:"top"}}]},{type:"control",setting:{id:"typo"},layout:"vertical",options:{updateFields:[{field:"attrs.color",settingId:"color",state:"normal"},{field:"attrs.textAlign",settingId:"textAlign"}]},controlChangeTrigger:{settings:[{action:{controlId:"textAlign",valueFromField:"attrs.textAlign",groupType:"style",controlType:"style"}},{action:{controlId:"color",valueFromField:"attrs.color",groupType:"style",controlType:"style",removeDevice:!0,state:"normal"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Hover effect"},controls:[{label:{en:"Text color"},setting:{id:"color",state:"hover"}},{label:{en:"Underline
|
|
1
|
+
"use strict";const SettingUIV2=[{label:{en:"Text style"},controls:[{type:"combo",label:{en:"Label"},iconName:"polaris-text-block",getValueFromSettingID:"label",compoDefaultValue:"Vendor: ",popoverLabel:{en:"Vendor label"},controls:[{label:{en:"Prefix"},setting:{id:"label"},options:{labelAlign:"top"}}]},{type:"control",setting:{id:"typo"},layout:"vertical",options:{updateFields:[{field:"attrs.color",settingId:"color",state:"normal"},{field:"attrs.textAlign",settingId:"textAlign"}]},controlChangeTrigger:{settings:[{action:{controlId:"textAlign",valueFromField:"attrs.textAlign",groupType:"style",controlType:"style"}},{action:{controlId:"color",valueFromField:"attrs.color",groupType:"style",controlType:"style",removeDevice:!0,state:"normal"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Hover effect"},controls:[{label:{en:"Text color"},setting:{id:"color",state:"hover"}},{label:{en:"Underline"},setting:{id:"underlineLink",state:"hover"}}]},{controls:[{label:{en:"Collection link"},setting:{id:"url"},options:{labelVariant:"primary",toggleStyle:"switch"},help:{content:"Click to open a collection page with<br> all products from the same vendor."}},{label:{en:"Open new tab"},setting:{id:"openIn"},conditionDisplay:"url == true"}]},{label:{en:"SEO"},controls:[{type:"control",label:{en:"HTML tag"},setting:{id:"htmlTag"}}]}];exports.SettingUIV2=SettingUIV2;
|
|
@@ -15,7 +15,7 @@ import{verticalOne as e}from"../../../settings/bundle-layout/vertical-one.js";im
|
|
|
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",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">
|
|
18
|
+
`},components:[{tag:"ProductBundleDiscount",advanced:{of:"hidden"},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{verticalOne as e}from"../../../settings/bundle-layout/vertical-one.js";im
|
|
|
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",settings:{childItem:[],layout:"horizontal-layout",enableIcon:!1},childrens:[]}]}]};export{config as default};
|
|
28
|
+
`},components:[{tag:"ProductBundleDiscount",advanced:{of:"hidden"},settings:{childItem:[],layout:"horizontal-layout",enableIcon:!1},childrens:[]}]}]};export{config as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{composeTypographyStyle as e,getRadiusStyleActiveState as t,getStyleShadow as o,makeStyle as r,getSingleColorVariable as
|
|
1
|
+
import{composeTypographyStyle as e,getRadiusStyleActiveState as t,getStyleShadow as o,makeStyle as r,getSingleColorVariable as l,composeRadius as p,getGlobalColorStateStyle as a,handleConvertBorderStyle as i,handleConvertBorderWidth as d,handleConvertBorderColor as n}from"@gem-sdk/core";import{filterTruthyObject as h}from"../../../../../helpers.js";let getWrapperStyleActive=p=>{let{preset:a,optionTransform:i,optionTypography:d,optionTypo:n,typeOfOption:g}=p,b=a?.optionBgColor,c=a?.optionTextColor,s=a?.optionBorder,w=a?.optionHasShadow,x=a?.optionShadow,m=a?.optionRounded,u="color"===g,S="image"===g||"image_shopify"===g,v=e(n,d),y=e=>r({bg:e&&l(b?.active),bs:s?.active?.border,bw:s?.active?.width,bc:l(s?.active?.color)});return h({...y(!u),...t(m),...o({value:x?.active,state:"active",styleAppliedFor:"box-shadow",isEnableShadow:w?.active},!0),...!u&&!S&&r({c:i}),...!u&&!S&&r({c:l(c?.active)}),...v,...r({h:a?.height})})},getWrapperStyleNormalAndHover=t=>{let{preset:l,optionTransform:g,optionTypography:b,optionTypo:c,typeOfOption:s}=t,w=l?.optionBgColor,x=l?.optionTextColor,m=l?.optionBorder,u=l?.optionHasShadow,S=l?.optionShadow,v=l?.optionRounded,y="color"===s,C="image"===s||"image_shopify"===s,W=e(c,b),f=["normal","hover"].reduce((e,t)=>({...e,...o({value:S?.[t],state:t,styleAppliedFor:"box-shadow",isEnableShadow:u?.[t]})}),{});return h({...p(v),...f,...!y&&a("bg",w),...!y&&i(m),...!y&&d(m),...!y&&n(m),...!y&&!C&&r({c:g}),...!y&&!C&&a("c",x),...y&&getColorStyle({optionBorder:m,optionRounded:v}),...W,...r({h:l?.height})})},getWrapperTextStyle=e=>{let{preset:t,typeOfOption:o}=e,r="color"===o,l=()=>{let e="16px",o={"--pl":"0px","--pr":"0px","--pl-tablet":"0px","--pr-tablet":"0px","--pl-mobile":"0px","--pr-mobile":"0px","--pt":"0px","--pb":"0px"};return t?.width?.desktop?.toLowerCase()!=="auto"&&t?.width?.desktop||(o["--pl"]=e,o["--pr"]=e),t?.width?.tablet?.toLowerCase()!=="auto"&&t?.width?.tablet||(o["--pl-tablet"]=e,o["--pr-tablet"]=e),t?.width?.mobile?.toLowerCase()!=="auto"&&t?.width?.mobile||(o["--pl-mobile"]=e,o["--pr-mobile"]=e),(t?.height?.toLowerCase()==="auto"||t?.height)&&(o["--pt"]="8px",o["--pb"]="8px"),o};return h({...r?{}:l()})},getColorStyle=({optionBorder:e,optionRounded:t,isActive:o,color:r})=>{let l=()=>r?r?.startsWith("linear-gradient")?{backgroundImage:r}:{backgroundColor:r}:{},a=o=>({"--d":"flex","--jc":"center"," --ai":"center","--w":"100%","--h":"100%","--of":"hidden","--bs":o?"none":"solid",...d(e),...n(e),...p(t),...l()});return a(!!o)},getTextStyle=({optionTypo:t,optionTypography:o})=>{let r=e(t,o);return h({...r})};export{getColorStyle,getTextStyle,getWrapperStyleActive,getWrapperStyleNormalAndHover,getWrapperTextStyle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let SettingUIV2=[{label:{en:"Text style"},controls:[{type:"combo",label:{en:"Label"},iconName:"polaris-text-block",getValueFromSettingID:"label",compoDefaultValue:"Vendor: ",popoverLabel:{en:"Vendor label"},controls:[{label:{en:"Prefix"},setting:{id:"label"},options:{labelAlign:"top"}}]},{type:"control",setting:{id:"typo"},layout:"vertical",options:{updateFields:[{field:"attrs.color",settingId:"color",state:"normal"},{field:"attrs.textAlign",settingId:"textAlign"}]},controlChangeTrigger:{settings:[{action:{controlId:"textAlign",valueFromField:"attrs.textAlign",groupType:"style",controlType:"style"}},{action:{controlId:"color",valueFromField:"attrs.color",groupType:"style",controlType:"style",removeDevice:!0,state:"normal"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Hover effect"},controls:[{label:{en:"Text color"},setting:{id:"color",state:"hover"}},{label:{en:"Underline
|
|
1
|
+
let SettingUIV2=[{label:{en:"Text style"},controls:[{type:"combo",label:{en:"Label"},iconName:"polaris-text-block",getValueFromSettingID:"label",compoDefaultValue:"Vendor: ",popoverLabel:{en:"Vendor label"},controls:[{label:{en:"Prefix"},setting:{id:"label"},options:{labelAlign:"top"}}]},{type:"control",setting:{id:"typo"},layout:"vertical",options:{updateFields:[{field:"attrs.color",settingId:"color",state:"normal"},{field:"attrs.textAlign",settingId:"textAlign"}]},controlChangeTrigger:{settings:[{action:{controlId:"textAlign",valueFromField:"attrs.textAlign",groupType:"style",controlType:"style"}},{action:{controlId:"color",valueFromField:"attrs.color",groupType:"style",controlType:"style",removeDevice:!0,state:"normal"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Hover effect"},controls:[{label:{en:"Text color"},setting:{id:"color",state:"hover"}},{label:{en:"Underline"},setting:{id:"underlineLink",state:"hover"}}]},{controls:[{label:{en:"Collection link"},setting:{id:"url"},options:{labelVariant:"primary",toggleStyle:"switch"},help:{content:"Click to open a collection page with<br> all products from the same vendor."}},{label:{en:"Open new tab"},setting:{id:"openIn"},conditionDisplay:"url == true"}]},{label:{en:"SEO"},controls:[{type:"control",label:{en:"HTML tag"},setting:{id:"htmlTag"}}]}];export{SettingUIV2};
|