@gem-sdk/components 2.0.0-staging.1001 → 2.0.0-staging.1003
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/coupon/common/styles.js +8 -10
- package/dist/cjs/coupon/components/Coupon.js +1 -1
- package/dist/cjs/coupon/components/Coupon.liquid.js +3 -3
- package/dist/cjs/coupon/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/post-purchase/callout-banner/settings/config/callout-box/setting.js +1 -1
- package/dist/cjs/post-purchase/callout-banner/settings/config/callout-text/setting.js +1 -1
- package/dist/cjs/post-purchase/product/common/helpers.js +1 -1
- package/dist/cjs/post-purchase/product/settings/product-discount-tag/configs/setting-v2.js +1 -1
- package/dist/cjs/post-purchase/text/settings/heading/Heading.js +1 -1
- package/dist/cjs/post-purchase/text/settings/text/Text.js +1 -1
- package/dist/cjs/post-purchase/text/settings/text/configs/setting-v2.js +1 -1
- package/dist/cjs/product/components/product-properties/property-input/common/styles.js +1 -1
- package/dist/cjs/product/components/product-quantity/common/styles.js +1 -1
- package/dist/cjs/product/settings/product-quantity/configs/settings.js +1 -1
- package/dist/esm/coupon/common/styles.js +9 -11
- package/dist/esm/coupon/components/Coupon.js +1 -1
- package/dist/esm/coupon/components/Coupon.liquid.js +5 -5
- package/dist/esm/coupon/settings/configs/ui-v2.js +1 -1
- package/dist/esm/post-purchase/callout-banner/settings/config/callout-box/setting.js +1 -1
- package/dist/esm/post-purchase/callout-banner/settings/config/callout-text/setting.js +1 -1
- package/dist/esm/post-purchase/product/common/helpers.js +1 -1
- package/dist/esm/post-purchase/product/settings/product-discount-tag/configs/setting-v2.js +1 -1
- package/dist/esm/post-purchase/text/settings/heading/Heading.js +1 -1
- package/dist/esm/post-purchase/text/settings/text/Text.js +1 -1
- package/dist/esm/post-purchase/text/settings/text/configs/setting-v2.js +1 -1
- package/dist/esm/product/components/product-properties/property-input/common/styles.js +1 -1
- package/dist/esm/product/components/product-quantity/common/styles.js +1 -1
- package/dist/esm/product/settings/product-quantity/configs/settings.js +1 -1
- package/dist/types/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");const getButtonStyles=
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");const getButtonStyles=e=>{let t=JSON.parse(JSON.stringify(e||{}));return delete t?.borderBtnV2?.normal?.borderType,delete t?.borderBtnV2?.hover?.borderType,delete t?.borderBtnV2?.active?.borderType,{...t,enableTextStyle:!0}},getButtonStyle=(e,t)=>({...e,...core.makeStyleResponsive("ta",t?.align)}),getInnerBorderCornerCss=e=>{let{uid:t,styles:r}=e;if(!t||!r)return"";let{borderBtnV2:o,roundedBtnV2:n,boxShadowBtn:a}=r,s=e=>e?core.getStyleShadow({value:e,state:"active",styleAppliedFor:"box-shadow",isEnableShadow:!0})["--shadow"]:"none",i=a?.active?.enable!==void 0?s(a?.active??{}):"",c={desktop:"",tablet:"@media only screen and (max-width: 1024px) and (min-width: 768px)",mobile:"@media only screen and (max-width: 768px)"},d=e=>{let r=c[e],a=!!r,s=`
|
|
2
2
|
.gp-coupon[data-active="true"] .${t}::before {
|
|
3
|
-
${core.composeBorderCss(
|
|
3
|
+
${core.composeBorderCss(o?.active,{important:!0})};
|
|
4
4
|
${core.composeCornerCss(n?.active,!0)};
|
|
5
|
-
box-shadow: ${
|
|
5
|
+
box-shadow: ${i} !important;
|
|
6
6
|
}
|
|
7
7
|
.gp-coupon[data-active="true"] .${t} {
|
|
8
8
|
${core.composeCornerCss(n?.active,!0)};
|
|
9
9
|
}
|
|
10
|
-
`.trim();return a?`${
|
|
10
|
+
`.trim();return a?`${r} {
|
|
11
11
|
${s}
|
|
12
|
-
}`:s};return
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
`;exports.getButtonStyle=getButtonStyle,exports.getButtonStyles=getButtonStyles,exports.getInnerActiveStyles=getInnerActiveStyles,exports.getInnerBorderCornerCss=getInnerBorderCornerCss;
|
|
12
|
+
}`:s};return d("desktop")},getInnerActiveStyles=e=>{let t=e?.backgroundColorV2?.active,r=e?.textColor?.active;if(!t&&!r)return"";let o=`.gp-coupon[data-active="true"] button {
|
|
13
|
+
`;return t&&(o+=` background-color: ${t} !important;
|
|
14
|
+
`),r&&(o+=` color: ${r} !important;
|
|
15
|
+
`),o+="}"};exports.getButtonStyle=getButtonStyle,exports.getButtonStyles=getButtonStyles,exports.getInnerActiveStyles=getInnerActiveStyles,exports.getInnerBorderCornerCss=getInnerBorderCornerCss;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),system=require("@gem-sdk/system"),Button=require("../../button/components/Button.js"),useCoupon=require("../hooks/useCoupon.js"),helpers=require("../common/helpers.js"),styles=require("../common/styles.js"),classes=require("../common/classes.js");const Coupon=({setting:e,builderProps:s,builderAttrs:t,style:r,styles:u,advanced:l,children:n})=>{let{backgroundColorV2:o,textColor:i}=u??{},{mode:
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),system=require("@gem-sdk/system"),Button=require("../../button/components/Button.js"),useCoupon=require("../hooks/useCoupon.js"),helpers=require("../common/helpers.js"),styles=require("../common/styles.js"),classes=require("../common/classes.js");const Coupon=({setting:e,builderProps:s,builderAttrs:t,style:r,styles:u,advanced:l,children:n})=>{let{backgroundColorV2:o,textColor:i}=u??{},{mode:a,changeStateILP:d,defaultLabelState:c,dataActive:y}=useCoupon.default(e),m=system.createClass(classes.getActiveClasses(o,i)),j=styles.getInnerBorderCornerCss({uid:s?.uid,styles:u}),p=styles.getInnerActiveStyles(u);return jsxRuntime.jsxs("div",{className:m,"data-active":y,"data-id":s?.uid,children:[jsxRuntime.jsx("style",{children:`${j}${p}`}),jsxRuntime.jsx(Button.default,{builderProps:s,builderAttrs:t,advanced:l,onClick:()=>{"edit"!==a&&d()},setting:{...helpers.getButtonSetting({setting:e,label:c,htmlType:"button",styles:u})},style:{...styles.getButtonStyle(r,u)},styles:{...styles.getButtonStyles(u)},children:n})]})};exports.default=Coupon;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),Button_liquid=require("../../button/components/Button.liquid.js"),helpers$1=require("../../helpers.js"),system=require("@gem-sdk/system"),classes=require("../common/classes.js"),styles=require("../common/styles.js"),helpers=require("../common/helpers.js");const Coupon=({setting:e,builderProps:s,builderAttrs:t,style:r,styles:l,advanced:o,pageContext:i})=>{let{backgroundColorV2:n,textColor:u,enableTextStyle:a}=l??{},{defaultLabel:c,clickedLabel:p,copyContent:d}=e??{},y=system.createStateOrContext({defaultLabel:c,clickedLabel:p,copyContent:d,uid:s?.uid,enableTextStyle:a}),g=system.createClass(classes.getActiveClasses(n,u)),m=styles.getInnerBorderCornerCss({uid:s?.uid,styles:l}),$=()=>core.RenderIf(core.isLocalEnv,`<script ${helpers$1.getSettingPreloadData('class="gps-link" delay',"src")}="{{ 'gp-coupon.js' | asset_url }}" defer="defer"></script>`,`<script ${helpers$1.getSettingPreloadData('class="gps-link" delay',"src")}="${core.baseAssetURL}/assets-v2/gp-coupon.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);return core.template`
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),Button_liquid=require("../../button/components/Button.liquid.js"),helpers$1=require("../../helpers.js"),system=require("@gem-sdk/system"),classes=require("../common/classes.js"),styles=require("../common/styles.js"),helpers=require("../common/helpers.js");const Coupon=({setting:e,builderProps:s,builderAttrs:t,style:r,styles:l,advanced:o,pageContext:i})=>{let{backgroundColorV2:n,textColor:u,enableTextStyle:a}=l??{},{defaultLabel:c,clickedLabel:p,copyContent:d}=e??{},y=system.createStateOrContext({defaultLabel:c,clickedLabel:p,copyContent:d,uid:s?.uid,enableTextStyle:a}),g=system.createClass(classes.getActiveClasses(n,u)),m=styles.getInnerBorderCornerCss({uid:s?.uid,styles:l}),$=styles.getInnerActiveStyles(l),S=()=>core.RenderIf(core.isLocalEnv,`<script ${helpers$1.getSettingPreloadData('class="gps-link" delay',"src")}="{{ 'gp-coupon.js' | asset_url }}" defer="defer"></script>`,`<script ${helpers$1.getSettingPreloadData('class="gps-link" delay',"src")}="${core.baseAssetURL}/assets-v2/gp-coupon.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);return core.template`
|
|
2
2
|
<gp-coupon data-id="${s?.uid}" data-active="false" gp-setting='${JSON.stringify(y).replaceAll("'","'")}' class="${g}">
|
|
3
|
-
<style>${m}</style>
|
|
3
|
+
<style>${`${m}${$}`}</style>
|
|
4
4
|
${Button_liquid.default({builderProps:{...s,uidInteraction:`${s?.uid}-interaction`},builderAttrs:t,setting:{...helpers.getButtonSetting({setting:e,label:c,htmlType:"button",styles:l})},style:{...styles.getButtonStyle(r,l)},styles:{...styles.getButtonStyles(l)},advanced:o,pageContext:i})}
|
|
5
5
|
</gp-coupon>
|
|
6
|
-
${
|
|
6
|
+
${S()}
|
|
7
7
|
`};exports.default=Coupon;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const SettingUIV2=[{label:{en:"Layout"},controls:[{type:"control",setting:{id:"couponLayout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"couponLayout === 'icon'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!0}},{condition:"couponLayout === 'none'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Coupon code"},controls:[{type:"combo",label:{en:"Code"},iconName:"polaris-text-block",getValueFromSettingID:"copyContent",isHideClear:!0,compoDefaultValue:"GEMPAGES30",popoverLabel:{en:"Code"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"copyContent"}}]}]},{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{id:"Height",label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",label:"height",inputType:"number",units:["px"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"custom",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"normal"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"normal"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadowBtn",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.normal.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!0}},{condition:"boxShadowBtn.normal.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"Icon"},setting:{id:"iconVisible"},options:{labelVariant:"primary",toggleStyle:"switch"}},{conditionDisplay:"iconVisible == true",type:"control",setting:{id:"iconSvg"},label:{en:"Icon"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Position"},setting:{id:"iconAlign"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Gap"},setting:{id:"iconSpacing"}}]},{controls:[{label:{en:"Text"},setting:{id:"enableTextStyle"},options:{labelVariant:"primary",toggleStyle:"switch"}},{type:"combo",label:{en:"Content"},iconName:"polaris-text-block",getValueFromSettingID:"defaultLabel",isHideClear:!0,conditionDisplay:"enableTextStyle == true",compoDefaultValue:"Copy",popoverLabel:{en:"Content"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"defaultLabel"}}]},{type:"control",layout:"vertical",setting:{id:"typo"},conditionDisplay:"enableTextStyle == true",options:{updateFields:[{field:"attrs.color",settingId:"textColor",state:"normal"}]},controlChangeTrigger:{settings:[{action:{controlId:"textColor",valueFromField:"attrs.color",groupType:"style",controlType:"style",removeDevice:!0,state:"normal"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{label:{en:"Hover"},type:"combo",iconName:"polaris-check-hover",fixedValue:"Styled",setting:{id:"enableHoverEffect"},popoverLabel:{en:"Hover"},state:"hover",controls:[{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"hover"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColor",state:"hover"},compoDefaultValue:{desktop:{default:{normal:"#121212"}}}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"hover"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"hover"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"hover"},options:{updateFields:[{field:"hover.enable",settingId:"hasBoxShadowBtn",state:"hover"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.hover.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!0}},{condition:"boxShadowBtn.hover.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!1}}],options:{noRecordHistory:!0}}}]}]},{label:{en:"Clicked"},type:"combo",iconName:"polaris-check-clicked",fixedValue:"Styled",setting:{id:"enableActiveEffect"},popoverLabel:{en:"Clicked"},state:"active",controls:[{type:"group",label:{en:"Content"},controls:[{label:{en:"After click"},setting:{id:"clickedLabel"}}]},{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"active"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColor",state:"active"}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"active"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"active"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"
|
|
1
|
+
"use strict";const SettingUIV2=[{label:{en:"Layout"},controls:[{type:"control",setting:{id:"couponLayout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"couponLayout === 'icon'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!0}},{condition:"couponLayout === 'none'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Coupon code"},controls:[{type:"combo",label:{en:"Code"},iconName:"polaris-text-block",getValueFromSettingID:"copyContent",isHideClear:!0,compoDefaultValue:"GEMPAGES30",popoverLabel:{en:"Code"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"copyContent"}}]}]},{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{id:"Height",label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",label:"height",inputType:"number",units:["px"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"custom",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"normal"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"normal"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadowBtn",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.normal.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!0}},{condition:"boxShadowBtn.normal.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"Icon"},setting:{id:"iconVisible"},options:{labelVariant:"primary",toggleStyle:"switch"}},{conditionDisplay:"iconVisible == true",type:"control",setting:{id:"iconSvg"},label:{en:"Icon"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Position"},setting:{id:"iconAlign"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Gap"},setting:{id:"iconSpacing"}}]},{controls:[{label:{en:"Text"},setting:{id:"enableTextStyle"},options:{labelVariant:"primary",toggleStyle:"switch"}},{type:"combo",label:{en:"Content"},iconName:"polaris-text-block",getValueFromSettingID:"defaultLabel",isHideClear:!0,conditionDisplay:"enableTextStyle == true",compoDefaultValue:"Copy",popoverLabel:{en:"Content"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"defaultLabel"}}]},{type:"control",layout:"vertical",setting:{id:"typo"},conditionDisplay:"enableTextStyle == true",options:{updateFields:[{field:"attrs.color",settingId:"textColor",state:"normal"}]},controlChangeTrigger:{settings:[{action:{controlId:"textColor",valueFromField:"attrs.color",groupType:"style",controlType:"style",removeDevice:!0,state:"normal"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{label:{en:"Hover"},type:"combo",iconName:"polaris-check-hover",fixedValue:"Styled",setting:{id:"enableHoverEffect"},popoverLabel:{en:"Hover"},state:"hover",controls:[{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"hover"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColor",state:"hover"},compoDefaultValue:{desktop:{default:{normal:"#121212"}}}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"hover"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"hover"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"hover"},options:{updateFields:[{field:"hover.enable",settingId:"hasBoxShadowBtn",state:"hover"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.hover.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!0}},{condition:"boxShadowBtn.hover.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!1}}],options:{noRecordHistory:!0}}}]}]},{label:{en:"Clicked"},type:"combo",iconName:"polaris-check-clicked",fixedValue:"Styled",setting:{id:"enableActiveEffect"},popoverLabel:{en:"Clicked"},state:"active",controls:[{type:"group",label:{en:"Content"},controls:[{label:{en:"After click"},setting:{id:"clickedLabel"}}]},{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"active"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColor",state:"active"}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"active"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"active"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"active"},options:{updateFields:[{field:"active.enable",settingId:"hasBoxShadowBtn",state:"active"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.active.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"active",newValue:!0}},{condition:"boxShadowBtn.active.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"active",newValue:!1}}],options:{noRecordHistory:!0}}}]}]}]},{conditionDisplay:"globalSize.width !== '100%'",controls:[{label:{en:"Align"},type:"control",setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0}}]}];exports.SettingUIV2=SettingUIV2;
|
|
@@ -43,4 +43,4 @@
|
|
|
43
43
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.5 13.5C4.67157 13.5 4 12.8284 4 12L4 7C4 6.17157 4.67157 5.5 5.5 5.5L6.5 5.5C7.32843 5.5 8 6.17157 8 7L8 12C8 12.8284 7.32843 13.5 6.5 13.5L5.5 13.5ZM5 12C5 12.2761 5.22386 12.5 5.5 12.5L6.5 12.5C6.77614 12.5 7 12.2761 7 12L7 7C7 6.72386 6.77614 6.5 6.5 6.5L5.5 6.5C5.22386 6.5 5 6.72386 5 7L5 12Z" fill="currentColor"/>
|
|
44
44
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M9 12C9 12.8284 9.67157 13.5 10.5 13.5L11.5 13.5C12.3284 13.5 13 12.8284 13 12L13 4C13 3.17157 12.3284 2.5 11.5 2.5L10.5 2.5C9.67157 2.5 9 3.17157 9 4L9 12ZM10.5 12.5C10.2239 12.5 10 12.2761 10 12L10 4C10 3.72386 10.2239 3.5 10.5 3.5L11.5 3.5C11.7761 3.5 12 3.72386 12 4L12 12C12 12.2761 11.7761 12.5 11.5 12.5L10.5 12.5Z" fill="currentColor"/>
|
|
45
45
|
</svg>
|
|
46
|
-
`}],default:"start"}]},{id:"style",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1},tablet:{default:!1},mobile:{default:!1}}},{id:"backgroundColor",type:"select",label:"Background Color",options:[{label:"Transparent",value:"none",icon:"gp-bg-transparent"},{label:"Red",value:"critical",icon:"gp-bg-color-red"},{label:"Blue",value:"info",icon:"gp-bg-color-blue"},{label:"Green",value:"success",icon:"gp-bg-color-green"},{label:"Yellow",value:"warning",icon:"gp-bg-color-yellow"}],default:"none"},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"default"}},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}
|
|
46
|
+
`}],default:"start"}]},{id:"style",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1},tablet:{default:!1},mobile:{default:!1}}},{id:"backgroundColor",type:"select",label:"Background Color",options:[{label:"Transparent",value:"none",icon:"gp-bg-transparent"},{label:"Red",value:"critical",icon:"gp-bg-color-red"},{label:"Blue",value:"info",icon:"gp-bg-color-blue"},{label:"Green",value:"success",icon:"gp-bg-color-green"},{label:"Yellow",value:"warning",icon:"gp-bg-color-yellow"}],default:"none"},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"default"}},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},{id:"verticalGutter",type:"input:unit-spacing",units:["px"],min:0,devices:{desktop:{default:"8px"}}},{id:"columnGap",type:"input:slider",min:0,showDefaultUnit:!0,max:100,step:1,units:["%"],devices:{desktop:{default:"1%"}}}]}];exports.CalloutBoxSettings=CalloutBoxSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const CalloutTextSettings=[{id:"setting",controls:[{id:"message",label:"",type:"textarea",defaultRows:4,showPlusBtn:!0,autoHeight:!0,default:"We couldn’t just let you leave with only one offer! Grab another for {
|
|
1
|
+
"use strict";const CalloutTextSettings=[{id:"setting",controls:[{id:"message",label:"",type:"textarea",defaultRows:4,showPlusBtn:!0,autoHeight:!0,default:"We couldn’t just let you leave with only one offer! Grab another for {Discount} OFF",suggestContents:[{message:"{Product_Name}",eg:"E.g: Desk Lamp"},{message:"{Discount}",eg:"E.g: 50%"},{message:"{Current_Price}",eg:"E.g: $500.00"},{message:"{Compared_At_Price}",eg:"E.g: $400.00"}]}]},{id:"style",controls:[{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"large",textColor:"default",fontWeight:"bold",textTransform:"none"},configLabel:{fontSize:"Font size",textColor:"Text color",fontWeight:"Font weight",textTransform:"Text transform"}},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},{id:"direction",label:"Direction",type:"segment",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"left"}]}];exports.CalloutTextSettings=CalloutTextSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const getTextSettings=({hasDiscount:t,message:e})=>({text:t?e:e?.replace(RegExp(/\{
|
|
1
|
+
"use strict";const getTextSettings=({hasDiscount:t,message:e})=>({text:t?e:e?.replace(RegExp(/\{Discount\}/,"gi"),"0%")});exports.getTextSettings=getTextSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const settingV2=[{id:"setting",controls:[{id:"discountAndShippingFee",type:"discount-and-shipping-fee-product-offer",multiple:!1},{id:"message",label:"",type:"textarea",defaultRows:4,showPlusBtn:!0,autoHeight:!0,minHeight:72,default:"(Save {
|
|
1
|
+
"use strict";const settingV2=[{id:"setting",controls:[{id:"discountAndShippingFee",type:"discount-and-shipping-fee-product-offer",multiple:!1},{id:"message",label:"",type:"textarea",defaultRows:4,showPlusBtn:!0,autoHeight:!0,minHeight:72,default:"(Save {Discount})",suggestContents:[{message:"{Discount}",eg:"E.g: 50%"}]}]},{id:"style",controls:[{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"default",textColor:"critical",fontWeight:"bold",textTransform:"none"}},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"left"}]}];exports.settingV2=settingV2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var presetsV2=require("./configs/presets-v2.js"),Text=require("../text/Text.js");const headingConfig={...Text.default,tag:"PostPurchaseHeading",label:"Heading",presets:presetsV2.presetsV2
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var presetsV2=require("./configs/presets-v2.js"),Text=require("../text/Text.js");const headingConfig={...Text.default,tag:"PostPurchaseHeading",label:"Heading",presets:presetsV2.presetsV2};exports.default=headingConfig;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
</svg>
|
|
5
5
|
`,settings:settingV2.settingV2,ui:uiV1.uiV1,uiV2:uiV2.uiV2,advanced:{},presets:[{id:"PostPurchaseText",name:{en:"Text block"},icon:{desktop:`<svg width="13" height="15" viewBox="0 0 13 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
6
6
|
<path d="M0.728516 15V13.4961L2.28125 13.2031V2.58789L0.728516 2.29492V0.78125H2.28125H7.39844C8.45964 0.78125 9.36784 0.966797 10.123 1.33789C10.8848 1.70898 11.4674 2.22656 11.8711 2.89062C12.2747 3.54818 12.4766 4.31966 12.4766 5.20508C12.4766 6.09049 12.2747 6.86523 11.8711 7.5293C11.4674 8.18685 10.8848 8.69792 10.123 9.0625C9.36784 9.42708 8.45964 9.60938 7.39844 9.60938H4.74219V13.2031L6.29492 13.4961V15H0.728516ZM4.74219 7.70508H7.39844C8.27083 7.70508 8.92513 7.4707 9.36133 7.00195C9.79753 6.5332 10.0156 5.94076 10.0156 5.22461C10.0156 4.49544 9.79753 3.88997 9.36133 3.4082C8.92513 2.92643 8.27083 2.68555 7.39844 2.68555H4.74219V7.70508Z" fill="#D6D6D6"/>
|
|
7
|
-
</svg>`},components:[{tag:"PostPurchaseText",advanced:{blockPadding:"none",inlinePadding:"none"}}]}],rootOverride:{styles:{align:"center"}}};exports.default=config;
|
|
7
|
+
</svg>`},components:[{tag:"PostPurchaseText",advanced:{blockPadding:"none",inlinePadding:"none"}}]}],rootOverride:{styles:{align:"center",width:{desktop:"1200px"}}}};exports.default=config;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const settingV2=[{id:"setting",controls:[{id:"textGroup",type:"group",label:"Text",controls:[{id:"text",label:"Content",type:"textarea",default:"
|
|
1
|
+
"use strict";const settingV2=[{id:"setting",controls:[{id:"textGroup",type:"group",label:"Text",controls:[{id:"text",label:"Content",type:"textarea",default:"Replace this text with your content"}]}]},{id:"style",controls:[{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"medium",textColor:"default",fontWeight:"normal",textTransform:"none"}},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"left"},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"}]}];exports.settingV2=settingV2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");const getStyles=e=>{let{valueBgColor:o,valueTextColor:t,fullWidth:r,width:
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");const getStyles=e=>{let{valueBgColor:o,valueTextColor:t,fullWidth:r,width:c,height:l,borderInput:s,borderRadius:a,hasShadowInput:S,shadowInput:d}=e??{},g=core.makeStyleResponsive("w",core.makeWidth(c,r)),n=l?core.makeStyleResponsive("h",l):{},y=core.getGlobalColorStateResponsiveStyle("bg",o);y["--focus-bg"]||(y["--focus-bg"]=y["--bg"]);let h=core.getGlobalColorStateStyle("c",t);return h["--focus-c"]||(h["--focus-c"]=h["--c"]),{...g,...core.handleConvertBorderStyle(s),...core.handleConvertBorderWidth(s),...core.handleConvertBorderColor(s),...y,...h,...n,...core.composeRadius(a),...core.getStyleShadowState(d,"box-shadow",S)}};exports.getStyles=getStyles;
|
|
@@ -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
|
|
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,3 +1,3 @@
|
|
|
1
1
|
"use strict";const ProductQuantitySettings=[{id:"setting",controls:[{id:"updatePrice",label:"Update price",type:"toggle",default:!0},{id:"qtyStyle",type:"option:value",label:"Style",options:[{label:"Default",value:"standard"},{label:"Simple",value:"minimalist"}],default:"standard"},{id:"hasButton",label:"Button",type:"toggle",default:!0},{id:"defaultQtyValue",label:"Text",type:"input:stepper",min:1,default:1},{id:"plusIcon",type:"icon",isHideClear:!0,customLabel:"Plus",info:"Choose from list or paste any SVG icon",default:`<svg height="20px" width="20px" data-name="plus-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817698760687976">
|
|
2
2
|
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"></path></svg>`},{id:"minusIcon",type:"icon",isHideClear:!0,customLabel:"Minus",info:"Choose from list or paste any SVG icon",default:`<svg height="20px" width="20px" data-name="minus-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817690725712232">
|
|
3
|
-
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z"></path></svg>`},{id:"enableHoverInput",label:"Enable hover input",type:"toggle",default:!1},{id:"enableHoverButton",label:"Enable hover input",type:"toggle",default:!1}]},{id:"style",controls:[{id:"quantityLayout",label:"Style",type:"layout-selector",popoverLabel:{en:"Style"},iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",options:[{label:"Square",value:"product-quantity-square",type:"p-quantity-layout",iconName:"gp-product-quantity-square"},{label:"Square with divider",value:"product-quantity-square-divider",type:"p-quantity-layout",iconName:"gp-product-quantity-square-divider"},{label:"Rounded",value:"product-quantity-rounded",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded"},{label:"Rounded with divider",value:"product-quantity-rounded-divider",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded-divider"},{label:"Square input only",value:"product-quantity-square-input-only",type:"p-quantity-layout",iconName:"gp-product-quantity-square-input-only"},{label:"Rounded input only",value:"product-quantity-rounded-input-only",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded-input-only"}],default:"product-quantity-square"},{id:"dimensions",type:"group",label:"Dimensions",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"quantityWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"160px"}}},{id:"inputHeight",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"45px"}}},{id:"buttonWidth",type:"dropdown:input",label:"Button Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"45px"}}},{id:"iconSizeCustom",type:"input:stepper",includeUnit:"px",min:1,devices:{desktop:{default:"16px"}}}]},{id:"inputStyle",type:"group",label:"Input Style",controls:[{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"#121212"},custom:{fontSize:{desktop:"16px",tablet:"16px",mobile:"14px"},lineHeight:{desktop:"120%",tablet:"180%",mobile:"180%"},fontWeight:"400",fontFamily:{value:"Assistant",type:"google"},hasShadowText:!1,textShadow:{enable:!1}}},ignoreReRender:!0,hiddenSetting:{transform:!0,textAlign:!0}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}}]},{id:"button-behavior-state",type:"behavior-state",label:"Button Style",hide:!0,controls:[{id:"textColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},compoDefaultValue:{hover:"text-2"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"inputBackgroundColor",type:"color-picker-v2",label:"Background Color",state:{hover:!0,normal:!0},compoDefaultValue:{normal:"highlight",hover:"highlight"},enableGradient:!0},{id:"buttonBackgroundColor",type:"color-picker-v2",label:"Button Background Color",state:{hover:!0,normal:!0},enableGradient:!0,compoDefaultValue:{normal:"brand",hover:"highlight"}},{id:"iconColor",type:"color-picker-v2",label:"Icon Color",default:{normal:"#121212"},compoDefaultValue:{hover:"text-2"},state:{hover:!0,normal:!0},enableGradient:!0}]},{id:"borderBtn",label:"Border",type:"border-v2",devices:{desktop:{default:{normal:{borderType:"style-1",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-1",isCustom:!0}}}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"}}}},state:{hover:!0,normal:!0}},{id:"corner",label:"Corner",type:"corner-v2",devices:{desktop:{default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}}}},{id:"shapeShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.20)",angle:45}}}}},{id:"buttonBoxShadow",type:"shadow-v2",
|
|
3
|
+
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z"></path></svg>`},{id:"enableHoverInput",label:"Enable hover input",type:"toggle",default:!1},{id:"enableHoverButton",label:"Enable hover input",type:"toggle",default:!1}]},{id:"style",controls:[{id:"quantityLayout",label:"Style",type:"layout-selector",popoverLabel:{en:"Style"},iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",options:[{label:"Square",value:"product-quantity-square",type:"p-quantity-layout",iconName:"gp-product-quantity-square"},{label:"Square with divider",value:"product-quantity-square-divider",type:"p-quantity-layout",iconName:"gp-product-quantity-square-divider"},{label:"Rounded",value:"product-quantity-rounded",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded"},{label:"Rounded with divider",value:"product-quantity-rounded-divider",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded-divider"},{label:"Square input only",value:"product-quantity-square-input-only",type:"p-quantity-layout",iconName:"gp-product-quantity-square-input-only"},{label:"Rounded input only",value:"product-quantity-rounded-input-only",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded-input-only"}],default:"product-quantity-square"},{id:"dimensions",type:"group",label:"Dimensions",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"quantityWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"160px"}}},{id:"inputHeight",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"45px"}}},{id:"buttonWidth",type:"dropdown:input",label:"Button Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"45px"}}},{id:"iconSizeCustom",type:"input:stepper",includeUnit:"px",min:1,devices:{desktop:{default:"16px"}}}]},{id:"inputStyle",type:"group",label:"Input Style",controls:[{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"#121212"},custom:{fontSize:{desktop:"16px",tablet:"16px",mobile:"14px"},lineHeight:{desktop:"120%",tablet:"180%",mobile:"180%"},fontWeight:"400",fontFamily:{value:"Assistant",type:"google"},hasShadowText:!1,textShadow:{enable:!1}}},ignoreReRender:!0,hiddenSetting:{transform:!0,textAlign:!0}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}}]},{id:"button-behavior-state",type:"behavior-state",label:"Button Style",hide:!0,controls:[{id:"textColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},compoDefaultValue:{hover:"text-2"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"inputBackgroundColor",type:"color-picker-v2",label:"Background Color",state:{hover:!0,normal:!0},compoDefaultValue:{normal:"highlight",hover:"highlight"},enableGradient:!0},{id:"buttonBackgroundColor",type:"color-picker-v2",label:"Button Background Color",state:{hover:!0,normal:!0},enableGradient:!0,compoDefaultValue:{normal:"brand",hover:"highlight"}},{id:"iconColor",type:"color-picker-v2",label:"Icon Color",default:{normal:"#121212"},compoDefaultValue:{hover:"text-2"},state:{hover:!0,normal:!0},enableGradient:!0}]},{id:"borderBtn",label:"Border",type:"border-v2",devices:{desktop:{default:{normal:{borderType:"style-1",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-1",isCustom:!0}}}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"}}}},state:{hover:!0,normal:!0}},{id:"corner",label:"Corner",type:"corner-v2",devices:{desktop:{default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}}}},{id:"shapeShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.20)",angle:45}}}}},{id:"buttonBoxShadow",type:"shadow-v2",default:{normal:{}},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:90}}},{id:"inputBoxShadow",type:"shadow-v2",default:{normal:{}},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:90}}},{id:"backgroundColor",type:"color-picker-v2",label:"Background Color",default:{normal:"#FFFFFF",hover:"#FFFFFF"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"dividerColor",type:"color-picker-v2",label:"Divider Color",default:{normal:void 0},compoDefaultValue:{normal:"line-3"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"dividerStroke",label:"Text",type:"input:stepper",min:1,default:{normal:0,hover:0},state:{hover:!0,normal:!0}}]}];exports.ProductQuantitySettings=ProductQuantitySettings;
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,getStyleShadow as t,composeBorderCss as
|
|
1
|
+
import{makeStyleResponsive as e,getStyleShadow as t,composeBorderCss as r,composeCornerCss as o}from"@gem-sdk/core";let getButtonStyles=e=>{let t=JSON.parse(JSON.stringify(e||{}));return delete t?.borderBtnV2?.normal?.borderType,delete t?.borderBtnV2?.hover?.borderType,delete t?.borderBtnV2?.active?.borderType,{...t,enableTextStyle:!0}},getButtonStyle=(t,r)=>({...t,...e("ta",r?.align)}),getInnerBorderCornerCss=e=>{let{uid:n,styles:a}=e;if(!n||!a)return"";let{borderBtnV2:i,roundedBtnV2:d,boxShadowBtn:l}=a,c=e=>e?t({value:e,state:"active",styleAppliedFor:"box-shadow",isEnableShadow:!0})["--shadow"]:"none",p=l?.active?.enable!==void 0?c(l?.active??{}):"",s={desktop:"",tablet:"@media only screen and (max-width: 1024px) and (min-width: 768px)",mobile:"@media only screen and (max-width: 768px)"},u=e=>{let t=s[e],a=!!t,l=`
|
|
2
2
|
.gp-coupon[data-active="true"] .${n}::before {
|
|
3
|
-
${
|
|
4
|
-
${
|
|
5
|
-
box-shadow: ${
|
|
3
|
+
${r(i?.active,{important:!0})};
|
|
4
|
+
${o(d?.active,!0)};
|
|
5
|
+
box-shadow: ${p} !important;
|
|
6
6
|
}
|
|
7
7
|
.gp-coupon[data-active="true"] .${n} {
|
|
8
|
-
${
|
|
8
|
+
${o(d?.active,!0)};
|
|
9
9
|
}
|
|
10
10
|
`.trim();return a?`${t} {
|
|
11
11
|
${l}
|
|
12
|
-
}`:l};return
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
`;export{getButtonStyle,getButtonStyles,getInnerActiveStyles,getInnerBorderCornerCss};
|
|
12
|
+
}`:l};return u("desktop")},getInnerActiveStyles=e=>{let t=e?.backgroundColorV2?.active,r=e?.textColor?.active;if(!t&&!r)return"";let o=`.gp-coupon[data-active="true"] button {
|
|
13
|
+
`;return t&&(o+=` background-color: ${t} !important;
|
|
14
|
+
`),r&&(o+=` color: ${r} !important;
|
|
15
|
+
`),o+="}"};export{getButtonStyle,getButtonStyles,getInnerActiveStyles,getInnerBorderCornerCss};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as o,jsx as t}from"react/jsx-runtime";import{createClass as e}from"@gem-sdk/system";import s from"../../button/components/Button.js";import r from"../hooks/useCoupon.js";import{getButtonSetting as m}from"../common/helpers.js";import{getInnerBorderCornerCss as i,getButtonStyle as l,getButtonStyles as n,getInnerActiveStyles as d}from"../common/styles.js";import{getActiveClasses as p}from"../common/classes.js";let Coupon=({setting:u,builderProps:a,builderAttrs:c,style:f,styles:h,advanced:j,children:y})=>{let{backgroundColorV2:b,textColor:C}=h??{},{mode:k,changeStateILP:v,defaultLabelState:g,dataActive:x}=r(u),$=e(p(b,C)),A=i({uid:a?.uid,styles:h}),B=d(h);return o("div",{className:$,"data-active":x,"data-id":a?.uid,children:[t("style",{children:`${A}${B}`}),t(s,{builderProps:a,builderAttrs:c,advanced:j,onClick:()=>{"edit"!==k&&v()},setting:{...m({setting:u,label:g,htmlType:"button",styles:h})},style:{...l(f,h)},styles:{...n(h
|
|
2
|
+
import{jsxs as o,jsx as t}from"react/jsx-runtime";import{createClass as e}from"@gem-sdk/system";import s from"../../button/components/Button.js";import r from"../hooks/useCoupon.js";import{getButtonSetting as m}from"../common/helpers.js";import{getInnerBorderCornerCss as i,getButtonStyle as l,getButtonStyles as n,getInnerActiveStyles as d}from"../common/styles.js";import{getActiveClasses as p}from"../common/classes.js";let Coupon=({setting:u,builderProps:a,builderAttrs:c,style:f,styles:h,advanced:j,children:y})=>{let{backgroundColorV2:b,textColor:C}=h??{},{mode:k,changeStateILP:v,defaultLabelState:g,dataActive:x}=r(u),$=e(p(b,C)),A=i({uid:a?.uid,styles:h}),B=d(h);return o("div",{className:$,"data-active":x,"data-id":a?.uid,children:[t("style",{children:`${A}${B}`}),t(s,{builderProps:a,builderAttrs:c,advanced:j,onClick:()=>{"edit"!==k&&v()},setting:{...m({setting:u,label:g,htmlType:"button",styles:h})},style:{...l(f,h)},styles:{...n(h)},children:y})]})};export{Coupon as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{template as s,RenderIf as t,isLocalEnv as e,baseAssetURL as o}from"@gem-sdk/core";import r from"../../button/components/Button.liquid.js";import{getSettingPreloadData as i}from"../../helpers.js";import{createStateOrContext as p,createClass as l}from"@gem-sdk/system";import{getActiveClasses as m}from"../common/classes.js";import{getInnerBorderCornerCss as n,getButtonStyle as c,getButtonStyles as d}from"../common/styles.js";import{getButtonSetting as
|
|
2
|
-
<gp-coupon data-id="${
|
|
3
|
-
<style>${
|
|
4
|
-
${r({builderProps:{...
|
|
1
|
+
import{template as s,RenderIf as t,isLocalEnv as e,baseAssetURL as o}from"@gem-sdk/core";import r from"../../button/components/Button.liquid.js";import{getSettingPreloadData as i}from"../../helpers.js";import{createStateOrContext as p,createClass as l}from"@gem-sdk/system";import{getActiveClasses as m}from"../common/classes.js";import{getInnerBorderCornerCss as n,getButtonStyle as c,getButtonStyles as d,getInnerActiveStyles as u}from"../common/styles.js";import{getButtonSetting as a}from"../common/helpers.js";let Coupon=({setting:f,builderProps:g,builderAttrs:$,style:y,styles:j,advanced:S,pageContext:b})=>{let{backgroundColorV2:h,textColor:k,enableTextStyle:A}=j??{},{defaultLabel:E,clickedLabel:v,copyContent:C}=f??{},G=p({defaultLabel:E,clickedLabel:v,copyContent:C,uid:g?.uid,enableTextStyle:A}),I=l(m(h,k)),N=n({uid:g?.uid,styles:j}),O=u(j),P=()=>t(e,`<script ${i('class="gps-link" delay',"src")}="{{ 'gp-coupon.js' | asset_url }}" defer="defer"></script>`,`<script ${i('class="gps-link" delay',"src")}="${o}/assets-v2/gp-coupon.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);return s`
|
|
2
|
+
<gp-coupon data-id="${g?.uid}" data-active="false" gp-setting='${JSON.stringify(G).replaceAll("'","'")}' class="${I}">
|
|
3
|
+
<style>${`${N}${O}`}</style>
|
|
4
|
+
${r({builderProps:{...g,uidInteraction:`${g?.uid}-interaction`},builderAttrs:$,setting:{...a({setting:f,label:E,htmlType:"button",styles:j})},style:{...c(y,j)},styles:{...d(j)},advanced:S,pageContext:b})}
|
|
5
5
|
</gp-coupon>
|
|
6
|
-
${
|
|
6
|
+
${P()}
|
|
7
7
|
`};export{Coupon as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let SettingUIV2=[{label:{en:"Layout"},controls:[{type:"control",setting:{id:"couponLayout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"couponLayout === 'icon'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!0}},{condition:"couponLayout === 'none'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Coupon code"},controls:[{type:"combo",label:{en:"Code"},iconName:"polaris-text-block",getValueFromSettingID:"copyContent",isHideClear:!0,compoDefaultValue:"GEMPAGES30",popoverLabel:{en:"Code"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"copyContent"}}]}]},{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{id:"Height",label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",label:"height",inputType:"number",units:["px"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"custom",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"normal"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"normal"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadowBtn",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.normal.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!0}},{condition:"boxShadowBtn.normal.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"Icon"},setting:{id:"iconVisible"},options:{labelVariant:"primary",toggleStyle:"switch"}},{conditionDisplay:"iconVisible == true",type:"control",setting:{id:"iconSvg"},label:{en:"Icon"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Position"},setting:{id:"iconAlign"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Gap"},setting:{id:"iconSpacing"}}]},{controls:[{label:{en:"Text"},setting:{id:"enableTextStyle"},options:{labelVariant:"primary",toggleStyle:"switch"}},{type:"combo",label:{en:"Content"},iconName:"polaris-text-block",getValueFromSettingID:"defaultLabel",isHideClear:!0,conditionDisplay:"enableTextStyle == true",compoDefaultValue:"Copy",popoverLabel:{en:"Content"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"defaultLabel"}}]},{type:"control",layout:"vertical",setting:{id:"typo"},conditionDisplay:"enableTextStyle == true",options:{updateFields:[{field:"attrs.color",settingId:"textColor",state:"normal"}]},controlChangeTrigger:{settings:[{action:{controlId:"textColor",valueFromField:"attrs.color",groupType:"style",controlType:"style",removeDevice:!0,state:"normal"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{label:{en:"Hover"},type:"combo",iconName:"polaris-check-hover",fixedValue:"Styled",setting:{id:"enableHoverEffect"},popoverLabel:{en:"Hover"},state:"hover",controls:[{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"hover"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColor",state:"hover"},compoDefaultValue:{desktop:{default:{normal:"#121212"}}}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"hover"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"hover"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"hover"},options:{updateFields:[{field:"hover.enable",settingId:"hasBoxShadowBtn",state:"hover"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.hover.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!0}},{condition:"boxShadowBtn.hover.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!1}}],options:{noRecordHistory:!0}}}]}]},{label:{en:"Clicked"},type:"combo",iconName:"polaris-check-clicked",fixedValue:"Styled",setting:{id:"enableActiveEffect"},popoverLabel:{en:"Clicked"},state:"active",controls:[{type:"group",label:{en:"Content"},controls:[{label:{en:"After click"},setting:{id:"clickedLabel"}}]},{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"active"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColor",state:"active"}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"active"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"active"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"
|
|
1
|
+
let SettingUIV2=[{label:{en:"Layout"},controls:[{type:"control",setting:{id:"couponLayout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"couponLayout === 'icon'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!0}},{condition:"couponLayout === 'none'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Coupon code"},controls:[{type:"combo",label:{en:"Code"},iconName:"polaris-text-block",getValueFromSettingID:"copyContent",isHideClear:!0,compoDefaultValue:"GEMPAGES30",popoverLabel:{en:"Code"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"copyContent"}}]}]},{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{id:"Height",label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",label:"height",inputType:"number",units:["px"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"custom",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"normal"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"normal"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadowBtn",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.normal.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!0}},{condition:"boxShadowBtn.normal.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"Icon"},setting:{id:"iconVisible"},options:{labelVariant:"primary",toggleStyle:"switch"}},{conditionDisplay:"iconVisible == true",type:"control",setting:{id:"iconSvg"},label:{en:"Icon"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Position"},setting:{id:"iconAlign"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Gap"},setting:{id:"iconSpacing"}}]},{controls:[{label:{en:"Text"},setting:{id:"enableTextStyle"},options:{labelVariant:"primary",toggleStyle:"switch"}},{type:"combo",label:{en:"Content"},iconName:"polaris-text-block",getValueFromSettingID:"defaultLabel",isHideClear:!0,conditionDisplay:"enableTextStyle == true",compoDefaultValue:"Copy",popoverLabel:{en:"Content"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"defaultLabel"}}]},{type:"control",layout:"vertical",setting:{id:"typo"},conditionDisplay:"enableTextStyle == true",options:{updateFields:[{field:"attrs.color",settingId:"textColor",state:"normal"}]},controlChangeTrigger:{settings:[{action:{controlId:"textColor",valueFromField:"attrs.color",groupType:"style",controlType:"style",removeDevice:!0,state:"normal"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{label:{en:"Hover"},type:"combo",iconName:"polaris-check-hover",fixedValue:"Styled",setting:{id:"enableHoverEffect"},popoverLabel:{en:"Hover"},state:"hover",controls:[{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"hover"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColor",state:"hover"},compoDefaultValue:{desktop:{default:{normal:"#121212"}}}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"hover"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"hover"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"hover"},options:{updateFields:[{field:"hover.enable",settingId:"hasBoxShadowBtn",state:"hover"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.hover.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!0}},{condition:"boxShadowBtn.hover.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!1}}],options:{noRecordHistory:!0}}}]}]},{label:{en:"Clicked"},type:"combo",iconName:"polaris-check-clicked",fixedValue:"Styled",setting:{id:"enableActiveEffect"},popoverLabel:{en:"Clicked"},state:"active",controls:[{type:"group",label:{en:"Content"},controls:[{label:{en:"After click"},setting:{id:"clickedLabel"}}]},{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"active"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColor",state:"active"}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"active"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"active"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"active"},options:{updateFields:[{field:"active.enable",settingId:"hasBoxShadowBtn",state:"active"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.active.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"active",newValue:!0}},{condition:"boxShadowBtn.active.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"active",newValue:!1}}],options:{noRecordHistory:!0}}}]}]}]},{conditionDisplay:"globalSize.width !== '100%'",controls:[{label:{en:"Align"},type:"control",setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0}}]}];export{SettingUIV2};
|
|
@@ -43,4 +43,4 @@ let CalloutBoxSettings=[{id:"setting",controls:[{id:"layout",type:"layout",devic
|
|
|
43
43
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.5 13.5C4.67157 13.5 4 12.8284 4 12L4 7C4 6.17157 4.67157 5.5 5.5 5.5L6.5 5.5C7.32843 5.5 8 6.17157 8 7L8 12C8 12.8284 7.32843 13.5 6.5 13.5L5.5 13.5ZM5 12C5 12.2761 5.22386 12.5 5.5 12.5L6.5 12.5C6.77614 12.5 7 12.2761 7 12L7 7C7 6.72386 6.77614 6.5 6.5 6.5L5.5 6.5C5.22386 6.5 5 6.72386 5 7L5 12Z" fill="currentColor"/>
|
|
44
44
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M9 12C9 12.8284 9.67157 13.5 10.5 13.5L11.5 13.5C12.3284 13.5 13 12.8284 13 12L13 4C13 3.17157 12.3284 2.5 11.5 2.5L10.5 2.5C9.67157 2.5 9 3.17157 9 4L9 12ZM10.5 12.5C10.2239 12.5 10 12.2761 10 12L10 4C10 3.72386 10.2239 3.5 10.5 3.5L11.5 3.5C11.7761 3.5 12 3.72386 12 4L12 12C12 12.2761 11.7761 12.5 11.5 12.5L10.5 12.5Z" fill="currentColor"/>
|
|
45
45
|
</svg>
|
|
46
|
-
`}],default:"start"}]},{id:"style",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1},tablet:{default:!1},mobile:{default:!1}}},{id:"backgroundColor",type:"select",label:"Background Color",options:[{label:"Transparent",value:"none",icon:"gp-bg-transparent"},{label:"Red",value:"critical",icon:"gp-bg-color-red"},{label:"Blue",value:"info",icon:"gp-bg-color-blue"},{label:"Green",value:"success",icon:"gp-bg-color-green"},{label:"Yellow",value:"warning",icon:"gp-bg-color-yellow"}],default:"none"},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"default"}},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}
|
|
46
|
+
`}],default:"start"}]},{id:"style",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1},tablet:{default:!1},mobile:{default:!1}}},{id:"backgroundColor",type:"select",label:"Background Color",options:[{label:"Transparent",value:"none",icon:"gp-bg-transparent"},{label:"Red",value:"critical",icon:"gp-bg-color-red"},{label:"Blue",value:"info",icon:"gp-bg-color-blue"},{label:"Green",value:"success",icon:"gp-bg-color-green"},{label:"Yellow",value:"warning",icon:"gp-bg-color-yellow"}],default:"none"},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"default"}},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},{id:"verticalGutter",type:"input:unit-spacing",units:["px"],min:0,devices:{desktop:{default:"8px"}}},{id:"columnGap",type:"input:slider",min:0,showDefaultUnit:!0,max:100,step:1,units:["%"],devices:{desktop:{default:"1%"}}}]}];export{CalloutBoxSettings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let CalloutTextSettings=[{id:"setting",controls:[{id:"message",label:"",type:"textarea",defaultRows:4,showPlusBtn:!0,autoHeight:!0,default:"We couldn’t just let you leave with only one offer! Grab another for {
|
|
1
|
+
let CalloutTextSettings=[{id:"setting",controls:[{id:"message",label:"",type:"textarea",defaultRows:4,showPlusBtn:!0,autoHeight:!0,default:"We couldn’t just let you leave with only one offer! Grab another for {Discount} OFF",suggestContents:[{message:"{Product_Name}",eg:"E.g: Desk Lamp"},{message:"{Discount}",eg:"E.g: 50%"},{message:"{Current_Price}",eg:"E.g: $500.00"},{message:"{Compared_At_Price}",eg:"E.g: $400.00"}]}]},{id:"style",controls:[{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"large",textColor:"default",fontWeight:"bold",textTransform:"none"},configLabel:{fontSize:"Font size",textColor:"Text color",fontWeight:"Font weight",textTransform:"Text transform"}},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},{id:"direction",label:"Direction",type:"segment",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"left"}]}];export{CalloutTextSettings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let getTextSettings=({hasDiscount:t,message:e})=>({text:t?e:e?.replace(RegExp(/\{
|
|
1
|
+
let getTextSettings=({hasDiscount:t,message:e})=>({text:t?e:e?.replace(RegExp(/\{Discount\}/,"gi"),"0%")});export{getTextSettings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let settingV2=[{id:"setting",controls:[{id:"discountAndShippingFee",type:"discount-and-shipping-fee-product-offer",multiple:!1},{id:"message",label:"",type:"textarea",defaultRows:4,showPlusBtn:!0,autoHeight:!0,minHeight:72,default:"(Save {
|
|
1
|
+
let settingV2=[{id:"setting",controls:[{id:"discountAndShippingFee",type:"discount-and-shipping-fee-product-offer",multiple:!1},{id:"message",label:"",type:"textarea",defaultRows:4,showPlusBtn:!0,autoHeight:!0,minHeight:72,default:"(Save {Discount})",suggestContents:[{message:"{Discount}",eg:"E.g: 50%"}]}]},{id:"style",controls:[{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"default",textColor:"critical",fontWeight:"bold",textTransform:"none"}},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"left"}]}];export{settingV2};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{presetsV2 as e}from"./configs/presets-v2.js";import t from"../text/Text.js";let headingConfig={...t,tag:"PostPurchaseHeading",label:"Heading",presets:e
|
|
1
|
+
import{presetsV2 as e}from"./configs/presets-v2.js";import t from"../text/Text.js";let headingConfig={...t,tag:"PostPurchaseHeading",label:"Heading",presets:e};export{headingConfig as default};
|
|
@@ -4,4 +4,4 @@ import{settingV2 as e}from"./configs/setting-v2.js";import{uiV1 as C}from"./conf
|
|
|
4
4
|
</svg>
|
|
5
5
|
`,settings:e,ui:C,uiV2:t,advanced:{},presets:[{id:"PostPurchaseText",name:{en:"Text block"},icon:{desktop:`<svg width="13" height="15" viewBox="0 0 13 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
6
6
|
<path d="M0.728516 15V13.4961L2.28125 13.2031V2.58789L0.728516 2.29492V0.78125H2.28125H7.39844C8.45964 0.78125 9.36784 0.966797 10.123 1.33789C10.8848 1.70898 11.4674 2.22656 11.8711 2.89062C12.2747 3.54818 12.4766 4.31966 12.4766 5.20508C12.4766 6.09049 12.2747 6.86523 11.8711 7.5293C11.4674 8.18685 10.8848 8.69792 10.123 9.0625C9.36784 9.42708 8.45964 9.60938 7.39844 9.60938H4.74219V13.2031L6.29492 13.4961V15H0.728516ZM4.74219 7.70508H7.39844C8.27083 7.70508 8.92513 7.4707 9.36133 7.00195C9.79753 6.5332 10.0156 5.94076 10.0156 5.22461C10.0156 4.49544 9.79753 3.88997 9.36133 3.4082C8.92513 2.92643 8.27083 2.68555 7.39844 2.68555H4.74219V7.70508Z" fill="#D6D6D6"/>
|
|
7
|
-
</svg>`},components:[{tag:"PostPurchaseText",advanced:{blockPadding:"none",inlinePadding:"none"}}]}],rootOverride:{styles:{align:"center"}}};export{config as default};
|
|
7
|
+
</svg>`},components:[{tag:"PostPurchaseText",advanced:{blockPadding:"none",inlinePadding:"none"}}]}],rootOverride:{styles:{align:"center",width:{desktop:"1200px"}}}};export{config as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let settingV2=[{id:"setting",controls:[{id:"textGroup",type:"group",label:"Text",controls:[{id:"text",label:"Content",type:"textarea",default:"
|
|
1
|
+
let settingV2=[{id:"setting",controls:[{id:"textGroup",type:"group",label:"Text",controls:[{id:"text",label:"Content",type:"textarea",default:"Replace this text with your content"}]}]},{id:"style",controls:[{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"medium",textColor:"default",fontWeight:"normal",textTransform:"none"}},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"left"},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"}]}];export{settingV2};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,makeWidth as
|
|
1
|
+
import{makeStyleResponsive as e,makeWidth as o,getGlobalColorStateResponsiveStyle as t,getGlobalColorStateStyle as c,handleConvertBorderStyle as s,handleConvertBorderWidth as g,handleConvertBorderColor as r,composeRadius as b,getStyleShadowState as f}from"@gem-sdk/core";let getStyles=l=>{let{valueBgColor:u,valueTextColor:m,fullWidth:d,width:h,height:p,borderInput:w,borderRadius:x,hasShadowInput:y,shadowInput:S}=l??{},a=e("w",o(h,d)),i=p?e("h",p):{},k=t("bg",u);k["--focus-bg"]||(k["--focus-bg"]=k["--bg"]);let n=c("c",m);return n["--focus-c"]||(n["--focus-c"]=n["--c"]),{...a,...s(w),...g(w),...r(w),...k,...n,...i,...b(x),...f(S,"box-shadow",y)}};export{getStyles};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{composeTypographyStyle as e,
|
|
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,3 +1,3 @@
|
|
|
1
1
|
let ProductQuantitySettings=[{id:"setting",controls:[{id:"updatePrice",label:"Update price",type:"toggle",default:!0},{id:"qtyStyle",type:"option:value",label:"Style",options:[{label:"Default",value:"standard"},{label:"Simple",value:"minimalist"}],default:"standard"},{id:"hasButton",label:"Button",type:"toggle",default:!0},{id:"defaultQtyValue",label:"Text",type:"input:stepper",min:1,default:1},{id:"plusIcon",type:"icon",isHideClear:!0,customLabel:"Plus",info:"Choose from list or paste any SVG icon",default:`<svg height="20px" width="20px" data-name="plus-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817698760687976">
|
|
2
2
|
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"></path></svg>`},{id:"minusIcon",type:"icon",isHideClear:!0,customLabel:"Minus",info:"Choose from list or paste any SVG icon",default:`<svg height="20px" width="20px" data-name="minus-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817690725712232">
|
|
3
|
-
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z"></path></svg>`},{id:"enableHoverInput",label:"Enable hover input",type:"toggle",default:!1},{id:"enableHoverButton",label:"Enable hover input",type:"toggle",default:!1}]},{id:"style",controls:[{id:"quantityLayout",label:"Style",type:"layout-selector",popoverLabel:{en:"Style"},iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",options:[{label:"Square",value:"product-quantity-square",type:"p-quantity-layout",iconName:"gp-product-quantity-square"},{label:"Square with divider",value:"product-quantity-square-divider",type:"p-quantity-layout",iconName:"gp-product-quantity-square-divider"},{label:"Rounded",value:"product-quantity-rounded",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded"},{label:"Rounded with divider",value:"product-quantity-rounded-divider",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded-divider"},{label:"Square input only",value:"product-quantity-square-input-only",type:"p-quantity-layout",iconName:"gp-product-quantity-square-input-only"},{label:"Rounded input only",value:"product-quantity-rounded-input-only",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded-input-only"}],default:"product-quantity-square"},{id:"dimensions",type:"group",label:"Dimensions",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"quantityWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"160px"}}},{id:"inputHeight",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"45px"}}},{id:"buttonWidth",type:"dropdown:input",label:"Button Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"45px"}}},{id:"iconSizeCustom",type:"input:stepper",includeUnit:"px",min:1,devices:{desktop:{default:"16px"}}}]},{id:"inputStyle",type:"group",label:"Input Style",controls:[{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"#121212"},custom:{fontSize:{desktop:"16px",tablet:"16px",mobile:"14px"},lineHeight:{desktop:"120%",tablet:"180%",mobile:"180%"},fontWeight:"400",fontFamily:{value:"Assistant",type:"google"},hasShadowText:!1,textShadow:{enable:!1}}},ignoreReRender:!0,hiddenSetting:{transform:!0,textAlign:!0}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}}]},{id:"button-behavior-state",type:"behavior-state",label:"Button Style",hide:!0,controls:[{id:"textColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},compoDefaultValue:{hover:"text-2"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"inputBackgroundColor",type:"color-picker-v2",label:"Background Color",state:{hover:!0,normal:!0},compoDefaultValue:{normal:"highlight",hover:"highlight"},enableGradient:!0},{id:"buttonBackgroundColor",type:"color-picker-v2",label:"Button Background Color",state:{hover:!0,normal:!0},enableGradient:!0,compoDefaultValue:{normal:"brand",hover:"highlight"}},{id:"iconColor",type:"color-picker-v2",label:"Icon Color",default:{normal:"#121212"},compoDefaultValue:{hover:"text-2"},state:{hover:!0,normal:!0},enableGradient:!0}]},{id:"borderBtn",label:"Border",type:"border-v2",devices:{desktop:{default:{normal:{borderType:"style-1",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-1",isCustom:!0}}}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"}}}},state:{hover:!0,normal:!0}},{id:"corner",label:"Corner",type:"corner-v2",devices:{desktop:{default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}}}},{id:"shapeShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.20)",angle:45}}}}},{id:"buttonBoxShadow",type:"shadow-v2",
|
|
3
|
+
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z"></path></svg>`},{id:"enableHoverInput",label:"Enable hover input",type:"toggle",default:!1},{id:"enableHoverButton",label:"Enable hover input",type:"toggle",default:!1}]},{id:"style",controls:[{id:"quantityLayout",label:"Style",type:"layout-selector",popoverLabel:{en:"Style"},iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",options:[{label:"Square",value:"product-quantity-square",type:"p-quantity-layout",iconName:"gp-product-quantity-square"},{label:"Square with divider",value:"product-quantity-square-divider",type:"p-quantity-layout",iconName:"gp-product-quantity-square-divider"},{label:"Rounded",value:"product-quantity-rounded",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded"},{label:"Rounded with divider",value:"product-quantity-rounded-divider",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded-divider"},{label:"Square input only",value:"product-quantity-square-input-only",type:"p-quantity-layout",iconName:"gp-product-quantity-square-input-only"},{label:"Rounded input only",value:"product-quantity-rounded-input-only",type:"p-quantity-layout",iconName:"gp-product-quantity-rounded-input-only"}],default:"product-quantity-square"},{id:"dimensions",type:"group",label:"Dimensions",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"quantityWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"160px"}}},{id:"inputHeight",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"45px"}}},{id:"buttonWidth",type:"dropdown:input",label:"Button Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"45px"}}},{id:"iconSizeCustom",type:"input:stepper",includeUnit:"px",min:1,devices:{desktop:{default:"16px"}}}]},{id:"inputStyle",type:"group",label:"Input Style",controls:[{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"#121212"},custom:{fontSize:{desktop:"16px",tablet:"16px",mobile:"14px"},lineHeight:{desktop:"120%",tablet:"180%",mobile:"180%"},fontWeight:"400",fontFamily:{value:"Assistant",type:"google"},hasShadowText:!1,textShadow:{enable:!1}}},ignoreReRender:!0,hiddenSetting:{transform:!0,textAlign:!0}},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}}]},{id:"button-behavior-state",type:"behavior-state",label:"Button Style",hide:!0,controls:[{id:"textColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},compoDefaultValue:{hover:"text-2"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"inputBackgroundColor",type:"color-picker-v2",label:"Background Color",state:{hover:!0,normal:!0},compoDefaultValue:{normal:"highlight",hover:"highlight"},enableGradient:!0},{id:"buttonBackgroundColor",type:"color-picker-v2",label:"Button Background Color",state:{hover:!0,normal:!0},enableGradient:!0,compoDefaultValue:{normal:"brand",hover:"highlight"}},{id:"iconColor",type:"color-picker-v2",label:"Icon Color",default:{normal:"#121212"},compoDefaultValue:{hover:"text-2"},state:{hover:!0,normal:!0},enableGradient:!0}]},{id:"borderBtn",label:"Border",type:"border-v2",devices:{desktop:{default:{normal:{borderType:"style-1",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-1",isCustom:!0}}}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"}}}},state:{hover:!0,normal:!0}},{id:"corner",label:"Corner",type:"corner-v2",devices:{desktop:{default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}}}},{id:"shapeShadow",type:"shadow-v2",devices:{desktop:{default:{normal:{}}}},compoDefaultValue:{desktop:{default:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.20)",angle:45}}}}},{id:"buttonBoxShadow",type:"shadow-v2",default:{normal:{}},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:90}}},{id:"inputBoxShadow",type:"shadow-v2",default:{normal:{}},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:90}}},{id:"backgroundColor",type:"color-picker-v2",label:"Background Color",default:{normal:"#FFFFFF",hover:"#FFFFFF"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"dividerColor",type:"color-picker-v2",label:"Divider Color",default:{normal:void 0},compoDefaultValue:{normal:"line-3"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"dividerStroke",label:"Text",type:"input:stepper",min:1,default:{normal:0,hover:0},state:{hover:!0,normal:!0}}]}];export{ProductQuantitySettings};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3998,8 +3998,8 @@ type ProductQuantityStyleProps = {
|
|
|
3998
3998
|
iconSizeCustom?: ObjectDevices<string>;
|
|
3999
3999
|
corner?: ObjectDevices<StateProp<CornerRadius>>;
|
|
4000
4000
|
shapeShadow?: ObjectDevices<StateProp<ShadowProps>>;
|
|
4001
|
-
buttonBoxShadow?:
|
|
4002
|
-
inputBoxShadow?:
|
|
4001
|
+
buttonBoxShadow?: StateProp<ShadowProps>;
|
|
4002
|
+
inputBoxShadow?: StateProp<ShadowProps>;
|
|
4003
4003
|
backgroundColor?: StateProp<ColorValueType>;
|
|
4004
4004
|
dividerColor?: StateProp<ColorValueType>;
|
|
4005
4005
|
dividerStroke?: StateProp<number>;
|