@gem-sdk/components 2.0.0-staging.1002 → 2.0.0-staging.1004
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/accordion/common/styles.js +1 -1
- package/dist/cjs/accordion/components/AccordionItem.liquid.js +22 -22
- 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/product/components/product-quantity/common/styles.js +1 -1
- package/dist/cjs/product/settings/product-quantity/configs/settings.js +1 -1
- package/dist/esm/accordion/common/styles.js +1 -1
- package/dist/esm/accordion/components/AccordionItem.liquid.js +22 -22
- 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/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 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");const filterStyles=e=>{let o=["--mb","--mb-mobile","--mb-tablet","--d","--d-mobile","--d-tablet"];return o.forEach(o=>{delete e?.[o]}),e},contentSizePaddingSize=e=>core.makeGlobalSize(e?.contentSizePadding),getContainerStyles=(e,o)=>({...filterStyles(e),...contentSizePaddingSize(o).gap,...core.getStyleBackgroundByDevice(e?.backgroundContent),"border-radius":"inherit"}),widthHeightSizeControl=e=>core.makeGlobalSize(e),widthStyle=(e,o,t)=>widthHeightSizeControl(t).width["--w"]?widthHeightSizeControl(t).width:core.makeStyleResponsive("w",core.makeWidth(e,o)),getItemContainerStyles=(e,o)=>{let{borderContent:t,backgroundContent:r,roundedContent:l,accordionShadow:a,width:i,fullWidth:n,widthHeightSize:c,iconColor:g,color:S,textColor:d,hasActiveShadow:s}=e??{};return{"--text-hover-color":o?core.getSingleColorVariable(d?.active??d?.normal):core.getSingleColorVariable(d?.hover??d?.normal),"--icon-expand-hover-color":o?core.getSingleColorVariable(S?.active??S?.normal):core.getSingleColorVariable(S?.hover??S?.normal),"--icon-expand-active-color":core.getSingleColorVariable(S?.active??S?.normal),"--icon-active-color":core.getSingleColorVariable(g?.active??g?.normal),"--icon-hover-color":o?core.getSingleColorVariable(g?.active??g?.normal):core.getSingleColorVariable(g?.hover??g?.normal),...widthStyle(i,n,c),...core.makeStyle({bs:t?.border??t?.border,bw:t?.width??t?.width,bc:core.getSingleColorVariable(t?.color??t?.color)}),...core.makeStyleResponsive("bg",r),...core.getStyleShadow({value:a,styleAppliedFor:"box-shadow",isEnableShadow:a?.enable||s}),...core.getRadiusStyleActiveState({...l,active:{...l||{},radiusType:"custom"}})}},headerContentPaddingSize=e=>core.makeGlobalSize(e),composePosition=e=>core.makeStyle({fd:"left"===e?"row":"row-reverse",jc:"right"===e?"space-between":""}),getDropdownStyles=(e,o)=>{let{headerContentPadding:t,widthHeightSize:r,itemHeaderSpacing:l,bgColor:a,headerBorder:i}=e??{},{isShow:n,iconPosition:c}=o??{};return{...t&&headerContentPaddingSize(t).padding,...l?.type||t?{}:core.composeSize(l?.custom),...widthHeightSizeControl(r).height,...composePosition(c),...n?core.makeStyle({bgc:core.getSingleColorVariable(a?.active??a?.normal),bs:i?.active?.border??i?.normal?.border,bw:i?.active?.width??i?.normal?.width,bc:core.getSingleColorVariable(i?.active?.color??i?.normal?.color)}):{...core.getGlobalColorStateStyle("bgc",a),...core.handleConvertBorderStyle(i),...core.handleConvertBorderWidth(i),...core.handleConvertBorderColor(i),...core.getGlobalColorStateStyle("bgc",a)}}},getDropdownTextStyles=(e,o)=>({...o?core.makeStyle({c:core.getSingleColorVariable(e?.active??e?.normal)}):{
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");const filterStyles=e=>{let o=["--mb","--mb-mobile","--mb-tablet","--d","--d-mobile","--d-tablet"];return o.forEach(o=>{delete e?.[o]}),e},contentSizePaddingSize=e=>core.makeGlobalSize(e?.contentSizePadding),getContainerStyles=(e,o)=>({...filterStyles(e),...contentSizePaddingSize(o).gap,...core.getStyleBackgroundByDevice(e?.backgroundContent),"border-radius":"inherit"}),widthHeightSizeControl=e=>core.makeGlobalSize(e),widthStyle=(e,o,t)=>widthHeightSizeControl(t).width["--w"]?widthHeightSizeControl(t).width:core.makeStyleResponsive("w",core.makeWidth(e,o)),getItemContainerStyles=(e,o)=>{let{borderContent:t,backgroundContent:r,roundedContent:l,accordionShadow:a,width:i,fullWidth:n,widthHeightSize:c,iconColor:g,color:S,textColor:d,hasActiveShadow:s}=e??{};return{"--text-hover-color":o?core.getSingleColorVariable(d?.active??d?.normal):core.getSingleColorVariable(d?.hover??d?.normal),"--icon-expand-hover-color":o?core.getSingleColorVariable(S?.active??S?.normal):core.getSingleColorVariable(S?.hover??S?.normal),"--icon-expand-active-color":core.getSingleColorVariable(S?.active??S?.normal),"--icon-active-color":core.getSingleColorVariable(g?.active??g?.normal),"--icon-hover-color":o?core.getSingleColorVariable(g?.active??g?.normal):core.getSingleColorVariable(g?.hover??g?.normal),...widthStyle(i,n,c),...core.makeStyle({bs:t?.border??t?.border,bw:t?.width??t?.width,bc:core.getSingleColorVariable(t?.color??t?.color)}),...core.makeStyleResponsive("bg",r),...core.getStyleShadow({value:a,styleAppliedFor:"box-shadow",isEnableShadow:a?.enable||s}),...core.getRadiusStyleActiveState({...l,active:{...l||{},radiusType:"custom"}})}},headerContentPaddingSize=e=>core.makeGlobalSize(e),composePosition=e=>core.makeStyle({fd:"left"===e?"row":"row-reverse",jc:"right"===e?"space-between":""}),getDropdownStyles=(e,o)=>{let{headerContentPadding:t,widthHeightSize:r,itemHeaderSpacing:l,bgColor:a,headerBorder:i}=e??{},{isShow:n,iconPosition:c}=o??{};return{...t&&headerContentPaddingSize(t).padding,...l?.type||t?{}:core.composeSize(l?.custom),...widthHeightSizeControl(r).height,...composePosition(c),...n?core.makeStyle({bgc:core.getSingleColorVariable(a?.active??a?.normal),bs:i?.active?.border??i?.normal?.border,bw:i?.active?.width??i?.normal?.width,bc:core.getSingleColorVariable(i?.active?.color??i?.normal?.color)}):{...core.getGlobalColorStateStyle("bgc",a),...core.handleConvertBorderStyle(i),...core.handleConvertBorderWidth(i),...core.handleConvertBorderColor(i),...core.getGlobalColorStateStyle("bgc",a)}}},getDropdownTextStyles=(e,o)=>({...o?core.makeStyle({c:core.getSingleColorVariable(e?.active??e?.normal)}):core.makeStyle({c:core.getSingleColorVariable(e?.normal)})}),getIconRotateStyles=(e,o,t)=>{let{color:r}=e??{};return{...core.makeStyle({c:core.getSingleColorVariable(o?r?.active??r?.normal??"transparent":r?.normal??"transparent")}),width:`${t??16}px`,height:`${t??16}px`}},composeIconGlobalSize=e=>core.makeGlobalSize(e),getGapStyles=(e,o)=>({...composeIconGlobalSize(e).gap,...core.makeStyleResponsive("jc",o)}),getIconStyles=(e,o)=>{let t=o?`${o}px`:"16px";return{...e,width:t,height:t,"--height":t}},getTemplateRow=e=>({"grid-template-rows":`${+!!e}fr`}),getRenderChildrenStyles=()=>({"grid-template-columns":"minmax(auto, 100%)"}),getIconGlobalSize=e=>core.makeGlobalSize(e)?.padding;exports.getContainerStyles=getContainerStyles,exports.getDropdownStyles=getDropdownStyles,exports.getDropdownTextStyles=getDropdownTextStyles,exports.getGapStyles=getGapStyles,exports.getIconGlobalSize=getIconGlobalSize,exports.getIconRotateStyles=getIconRotateStyles,exports.getIconStyles=getIconStyles,exports.getItemContainerStyles=getItemContainerStyles,exports.getRenderChildrenStyles=getRenderChildrenStyles,exports.getTemplateRow=getTemplateRow;
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),Text_liquid=require("../../text/components/Text.liquid.js"),helpers=require("../common/helpers.js"),system=require("@gem-sdk/system"),classes=require("../common/classes.js"),styles=require("../common/styles.js");const AccordionItem=e=>{let{parentUid:s,childrenIcon:t,rawChildren:
|
|
2
|
-
<div class="${h}" style="${
|
|
3
|
-
<div data-index="${
|
|
4
|
-
<div aria-hidden uid="${r?.uid}" id="${r?.uid}" data-index="${
|
|
5
|
-
class="${q}" style="${
|
|
6
|
-
${system.If(!!
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),Text_liquid=require("../../text/components/Text.liquid.js"),helpers=require("../common/helpers.js"),system=require("@gem-sdk/system"),classes=require("../common/classes.js"),styles=require("../common/styles.js");const AccordionItem=e=>{let{parentUid:s,childrenIcon:t,rawChildren:l,index:a,builderProps:r,title:o}=e,{iconSvg:c,titleTypo:n,layoutHeader:i,iconGlobalSize:y,iconCollapseSize:d,iconCollapse:m,iconExpand:p,alignment:g,configIconSize:$,iconPosition:C}=helpers.getParentSettings(e.parentSetting)??{},{isShow:u,composeContentSizeStyle:S,collapsibleIcon:v,composeIconColor:I,makeIcon:x}=helpers.getSettingItemLiquid(e),h=system.createClass(classes.getItemContainerClasses),q=system.createClass(classes.getDropdownClasses(e.parentStyle,{isShow:u,uniqueId:s,makeIcon:x(),index:a})),f=system.createStyle(styles.getIconGlobalSize(y)),_=system.createClass(classes.getIconClasses),D=system.createClass(classes.getIconRotateClasses(e.parentStyle,{isShow:u,iconExpand:p,iconSvg:c,iconCollapse:m})),T=system.createClass(classes.getContentClasses(s)),w=system.createClass(classes.getGapClasses),R=system.createStyle(styles.getItemContainerStyles(e.parentStyle,!1)),j=system.createStyle(styles.getDropdownStyles(e.parentStyle,{isShow:u,iconPosition:C})),L=system.createStyle(styles.getDropdownTextStyles(e.parentStyle?.textColor,u)),M=system.createStyle(styles.getIconRotateStyles(e.parentStyle,u,d)),b=system.createStyle(styles.getGapStyles(y,g)),k=system.createClass(core.composeClasses("gp-inline-flex")),G=system.createClass(u?{...core.composeClasses("!gp-text-[var(--icon-active-color)]"),...classes.getLayoutIconClasses}:classes.getLayoutIconClasses),N=system.createStyle(styles.getIconStyles(I,$)),A=system.createClass(classes.getRenderChildrenClasses(e.parentStyle,{isShow:u,hasTransitionedIn:!1,isMounted:!1})),F=system.createStyle({...styles.getTemplateRow(u),...styles.getRenderChildrenStyles()}),H=system.createClass(core.composeClasses("gp-accordion-item_body-inner gp-transition-all gp-duration-500 gp-min-h-0")),O=()=>l&&l.length>=helpers.MINIMUM_CHILD?core.RenderChildren({...l[helpers.BODY_CHILD_INDEX]}):"";return core.template`
|
|
2
|
+
<div class="${h}" style="${R}">
|
|
3
|
+
<div data-index="${a?.toString()}" class="${T}">
|
|
4
|
+
<div aria-hidden uid="${r?.uid}" id="${r?.uid}" data-index="${a?.toString()}"
|
|
5
|
+
class="${q}" style="${j}">
|
|
6
|
+
${system.If(!!v,core.template`
|
|
7
7
|
<div class="${_}">
|
|
8
|
-
<span style="${
|
|
9
|
-
data-index="${
|
|
8
|
+
<span style="${M}"
|
|
9
|
+
data-index="${a}"
|
|
10
10
|
class="${D}">
|
|
11
|
-
${
|
|
11
|
+
${v}
|
|
12
12
|
</span>
|
|
13
13
|
</div>
|
|
14
14
|
`)}
|
|
15
|
-
<div class="${
|
|
16
|
-
${system.If("before-text"===
|
|
17
|
-
<div class="${
|
|
15
|
+
<div class="${w}" style="${b}">
|
|
16
|
+
${system.If("before-text"===i,core.template`
|
|
17
|
+
<div class="${k}" style="${{...f}}">
|
|
18
18
|
<span
|
|
19
|
-
class="${
|
|
20
|
-
style="${
|
|
19
|
+
class="${G}"
|
|
20
|
+
style="${N}">
|
|
21
21
|
${t??""}</span>
|
|
22
22
|
</div>
|
|
23
23
|
`)}
|
|
24
|
-
${Text_liquid.default({styles:{typo:
|
|
25
|
-
${system.If("after-text"===
|
|
26
|
-
<div class="${
|
|
24
|
+
${Text_liquid.default({style:{...L},styles:{typo:n},setting:{htmlTag:"div",text:o,excludeFlex:!0,isForceValue:!0},className:"gp-overflow-hidden gp-accordion-text-content group-hover:[color:var(--text-hover-color)!important]"})}
|
|
25
|
+
${system.If("after-text"===i,core.template`
|
|
26
|
+
<div class="${k}" style="${{...f}}">
|
|
27
27
|
<span
|
|
28
|
-
class="${
|
|
29
|
-
style="${
|
|
28
|
+
class="${G}"
|
|
29
|
+
style="${N}">
|
|
30
30
|
${t??""}</span>
|
|
31
31
|
</div>
|
|
32
32
|
`)}
|
|
33
33
|
</div>
|
|
34
34
|
</div>
|
|
35
|
-
<div data-index="${
|
|
36
|
-
<div data-index="${
|
|
37
|
-
${
|
|
35
|
+
<div data-index="${a}" data-show="${u}" class="${A}" style="${F}">
|
|
36
|
+
<div data-index="${a}" class="${H}" style="${S()}">
|
|
37
|
+
${O()}
|
|
38
38
|
</div>
|
|
39
39
|
</div>
|
|
40
40
|
</div>
|
|
@@ -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";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 +1 @@
|
|
|
1
|
-
import{getStyleBackgroundByDevice as e,getSingleColorVariable as t,makeStyle as o,makeStyleResponsive as r,getStyleShadow as i,getRadiusStyleActiveState as n,composeSize as l,getGlobalColorStateStyle as a,handleConvertBorderStyle as c,handleConvertBorderWidth as d,handleConvertBorderColor as g,makeGlobalSize as h,makeWidth as s}from"@gem-sdk/core";let filterStyles=e=>{let t=["--mb","--mb-mobile","--mb-tablet","--d","--d-mobile","--d-tablet"];return t.forEach(t=>{delete e?.[t]}),e},contentSizePaddingSize=e=>h(e?.contentSizePadding),getContainerStyles=(t,o)=>({...filterStyles(t),...contentSizePaddingSize(o).gap,...e(t?.backgroundContent),"border-radius":"inherit"}),widthHeightSizeControl=e=>h(e),widthStyle=(e,t,o)=>widthHeightSizeControl(o).width["--w"]?widthHeightSizeControl(o).width:r("w",s(e,t)),getItemContainerStyles=(e,l)=>{let{borderContent:a,backgroundContent:c,roundedContent:d,accordionShadow:g,width:h,fullWidth:s,widthHeightSize:m,iconColor:S,color:p,textColor:b,hasActiveShadow:w}=e??{};return{"--text-hover-color":l?t(b?.active??b?.normal):t(b?.hover??b?.normal),"--icon-expand-hover-color":l?t(p?.active??p?.normal):t(p?.hover??p?.normal),"--icon-expand-active-color":t(p?.active??p?.normal),"--icon-active-color":t(S?.active??S?.normal),"--icon-hover-color":l?t(S?.active??S?.normal):t(S?.hover??S?.normal),...widthStyle(h,s,m),...o({bs:a?.border??a?.border,bw:a?.width??a?.width,bc:t(a?.color??a?.color)}),...r("bg",c),...i({value:g,styleAppliedFor:"box-shadow",isEnableShadow:g?.enable||w}),...n({...d,active:{...d||{},radiusType:"custom"}})}},headerContentPaddingSize=e=>h(e),composePosition=e=>o({fd:"left"===e?"row":"row-reverse",jc:"right"===e?"space-between":""}),getDropdownStyles=(e,r)=>{let{headerContentPadding:i,widthHeightSize:n,itemHeaderSpacing:h,bgColor:s,headerBorder:m}=e??{},{isShow:S,iconPosition:p}=r??{};return{...i&&headerContentPaddingSize(i).padding,...h?.type||i?{}:l(h?.custom),...widthHeightSizeControl(n).height,...composePosition(p),...S?o({bgc:t(s?.active??s?.normal),bs:m?.active?.border??m?.normal?.border,bw:m?.active?.width??m?.normal?.width,bc:t(m?.active?.color??m?.normal?.color)}):{...a("bgc",s),...c(m),...d(m),...g(m),...a("bgc",s)}}},getDropdownTextStyles=(e,r)=>({...r?o({c:t(e?.active??e?.normal)}):{
|
|
1
|
+
import{getStyleBackgroundByDevice as e,getSingleColorVariable as t,makeStyle as o,makeStyleResponsive as r,getStyleShadow as i,getRadiusStyleActiveState as n,composeSize as l,getGlobalColorStateStyle as a,handleConvertBorderStyle as c,handleConvertBorderWidth as d,handleConvertBorderColor as g,makeGlobalSize as h,makeWidth as s}from"@gem-sdk/core";let filterStyles=e=>{let t=["--mb","--mb-mobile","--mb-tablet","--d","--d-mobile","--d-tablet"];return t.forEach(t=>{delete e?.[t]}),e},contentSizePaddingSize=e=>h(e?.contentSizePadding),getContainerStyles=(t,o)=>({...filterStyles(t),...contentSizePaddingSize(o).gap,...e(t?.backgroundContent),"border-radius":"inherit"}),widthHeightSizeControl=e=>h(e),widthStyle=(e,t,o)=>widthHeightSizeControl(o).width["--w"]?widthHeightSizeControl(o).width:r("w",s(e,t)),getItemContainerStyles=(e,l)=>{let{borderContent:a,backgroundContent:c,roundedContent:d,accordionShadow:g,width:h,fullWidth:s,widthHeightSize:m,iconColor:S,color:p,textColor:b,hasActiveShadow:w}=e??{};return{"--text-hover-color":l?t(b?.active??b?.normal):t(b?.hover??b?.normal),"--icon-expand-hover-color":l?t(p?.active??p?.normal):t(p?.hover??p?.normal),"--icon-expand-active-color":t(p?.active??p?.normal),"--icon-active-color":t(S?.active??S?.normal),"--icon-hover-color":l?t(S?.active??S?.normal):t(S?.hover??S?.normal),...widthStyle(h,s,m),...o({bs:a?.border??a?.border,bw:a?.width??a?.width,bc:t(a?.color??a?.color)}),...r("bg",c),...i({value:g,styleAppliedFor:"box-shadow",isEnableShadow:g?.enable||w}),...n({...d,active:{...d||{},radiusType:"custom"}})}},headerContentPaddingSize=e=>h(e),composePosition=e=>o({fd:"left"===e?"row":"row-reverse",jc:"right"===e?"space-between":""}),getDropdownStyles=(e,r)=>{let{headerContentPadding:i,widthHeightSize:n,itemHeaderSpacing:h,bgColor:s,headerBorder:m}=e??{},{isShow:S,iconPosition:p}=r??{};return{...i&&headerContentPaddingSize(i).padding,...h?.type||i?{}:l(h?.custom),...widthHeightSizeControl(n).height,...composePosition(p),...S?o({bgc:t(s?.active??s?.normal),bs:m?.active?.border??m?.normal?.border,bw:m?.active?.width??m?.normal?.width,bc:t(m?.active?.color??m?.normal?.color)}):{...a("bgc",s),...c(m),...d(m),...g(m),...a("bgc",s)}}},getDropdownTextStyles=(e,r)=>({...r?o({c:t(e?.active??e?.normal)}):o({c:t(e?.normal)})}),getIconRotateStyles=(e,r,i)=>{let{color:n}=e??{};return{...o({c:t(r?n?.active??n?.normal??"transparent":n?.normal??"transparent")}),width:`${i??16}px`,height:`${i??16}px`}},composeIconGlobalSize=e=>h(e),getGapStyles=(e,t)=>({...composeIconGlobalSize(e).gap,...r("jc",t)}),getIconStyles=(e,t)=>{let o=t?`${t}px`:"16px";return{...e,width:o,height:o,"--height":o}},getTemplateRow=e=>({"grid-template-rows":`${+!!e}fr`}),getRenderChildrenStyles=()=>({"grid-template-columns":"minmax(auto, 100%)"}),getIconGlobalSize=e=>h(e)?.padding;export{getContainerStyles,getDropdownStyles,getDropdownTextStyles,getGapStyles,getIconGlobalSize,getIconRotateStyles,getIconStyles,getItemContainerStyles,getRenderChildrenStyles,getTemplateRow};
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import{composeClasses as t,template as e,RenderChildren as s}from"@gem-sdk/core";import i from"../../text/components/Text.liquid.js";import{getParentSettings as a,getSettingItemLiquid as o,MINIMUM_CHILD as n,BODY_CHILD_INDEX as
|
|
2
|
-
<div class="${
|
|
3
|
-
<div data-index="${M?.toString()}" class="${
|
|
1
|
+
import{composeClasses as t,template as e,RenderChildren as s}from"@gem-sdk/core";import i from"../../text/components/Text.liquid.js";import{getParentSettings as a,getSettingItemLiquid as o,MINIMUM_CHILD as n,BODY_CHILD_INDEX as l}from"../common/helpers.js";import{createClass as d,createStyle as r,If as $}from"@gem-sdk/system";import{getItemContainerClasses as c,getDropdownClasses as p,getIconClasses as m,getIconRotateClasses as v,getContentClasses as y,getGapClasses as x,getLayoutIconClasses as g,getRenderChildrenClasses as u}from"../common/classes.js";import{getIconGlobalSize as f,getItemContainerStyles as h,getDropdownStyles as S,getDropdownTextStyles as I,getIconRotateStyles as j,getGapStyles as k,getIconStyles as T,getTemplateRow as b,getRenderChildrenStyles as q}from"../common/styles.js";let AccordionItem=w=>{let{parentUid:A,childrenIcon:F,rawChildren:C,index:M,builderProps:N,title:V}=w,{iconSvg:_,titleTypo:z,layoutHeader:B,iconGlobalSize:D,iconCollapseSize:E,iconCollapse:G,iconExpand:H,alignment:J,configIconSize:K,iconPosition:L}=a(w.parentSetting)??{},{isShow:O,composeContentSizeStyle:P,collapsibleIcon:Q,composeIconColor:R,makeIcon:U}=o(w),W=d(c),X=d(p(w.parentStyle,{isShow:O,uniqueId:A,makeIcon:U(),index:M})),Y=r(f(D)),Z=d(m),tt=d(v(w.parentStyle,{isShow:O,iconExpand:H,iconSvg:_,iconCollapse:G})),te=d(y(A)),ts=d(x),ti=r(h(w.parentStyle,!1)),ta=r(S(w.parentStyle,{isShow:O,iconPosition:L})),to=r(I(w.parentStyle?.textColor,O)),tn=r(j(w.parentStyle,O,E)),tl=r(k(D,J)),td=d(t("gp-inline-flex")),tr=d(O?{...t("!gp-text-[var(--icon-active-color)]"),...g}:g),t$=r(T(R,K)),tc=d(u(w.parentStyle,{isShow:O,hasTransitionedIn:!1,isMounted:!1})),tp=r({...b(O),...q()}),tm=d(t("gp-accordion-item_body-inner gp-transition-all gp-duration-500 gp-min-h-0")),tv=()=>C&&C.length>=n?s({...C[l]}):"";return e`
|
|
2
|
+
<div class="${W}" style="${ti}">
|
|
3
|
+
<div data-index="${M?.toString()}" class="${te}">
|
|
4
4
|
<div aria-hidden uid="${N?.uid}" id="${N?.uid}" data-index="${M?.toString()}"
|
|
5
|
-
class="${
|
|
6
|
-
${$(!!
|
|
7
|
-
<div class="${
|
|
8
|
-
<span style="${
|
|
5
|
+
class="${X}" style="${ta}">
|
|
6
|
+
${$(!!Q,e`
|
|
7
|
+
<div class="${Z}">
|
|
8
|
+
<span style="${tn}"
|
|
9
9
|
data-index="${M}"
|
|
10
|
-
class="${
|
|
11
|
-
${
|
|
10
|
+
class="${tt}">
|
|
11
|
+
${Q}
|
|
12
12
|
</span>
|
|
13
13
|
</div>
|
|
14
14
|
`)}
|
|
15
|
-
<div class="${
|
|
15
|
+
<div class="${ts}" style="${tl}">
|
|
16
16
|
${$("before-text"===B,e`
|
|
17
|
-
<div class="${
|
|
17
|
+
<div class="${td}" style="${{...Y}}">
|
|
18
18
|
<span
|
|
19
|
-
class="${
|
|
20
|
-
style="${
|
|
21
|
-
${
|
|
19
|
+
class="${tr}"
|
|
20
|
+
style="${t$}">
|
|
21
|
+
${F??""}</span>
|
|
22
22
|
</div>
|
|
23
23
|
`)}
|
|
24
|
-
${i({styles:{typo:z},setting:{htmlTag:"div",text:V,excludeFlex:!0,isForceValue:!0},className:"gp-overflow-hidden gp-accordion-text-content group-hover:[color:var(--text-hover-color)!important]"})}
|
|
24
|
+
${i({style:{...to},styles:{typo:z},setting:{htmlTag:"div",text:V,excludeFlex:!0,isForceValue:!0},className:"gp-overflow-hidden gp-accordion-text-content group-hover:[color:var(--text-hover-color)!important]"})}
|
|
25
25
|
${$("after-text"===B,e`
|
|
26
|
-
<div class="${
|
|
26
|
+
<div class="${td}" style="${{...Y}}">
|
|
27
27
|
<span
|
|
28
|
-
class="${
|
|
29
|
-
style="${
|
|
30
|
-
${
|
|
28
|
+
class="${tr}"
|
|
29
|
+
style="${t$}">
|
|
30
|
+
${F??""}</span>
|
|
31
31
|
</div>
|
|
32
32
|
`)}
|
|
33
33
|
</div>
|
|
34
34
|
</div>
|
|
35
|
-
<div data-index="${M}" data-show="${
|
|
36
|
-
<div data-index="${M}" class="${
|
|
37
|
-
${
|
|
35
|
+
<div data-index="${M}" data-show="${O}" class="${tc}" style="${tp}">
|
|
36
|
+
<div data-index="${M}" class="${tm}" style="${P()}">
|
|
37
|
+
${tv()}
|
|
38
38
|
</div>
|
|
39
39
|
</div>
|
|
40
40
|
</div>
|
|
@@ -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{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>;
|