@gem-sdk/components 2.0.0-staging.1008 → 2.0.0-staging.1010
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/header/settings/configs/settings.js +2 -2
- package/dist/cjs/icon-list-v2/common/styles.js +1 -1
- package/dist/cjs/icon-list-v2/components/IconList.js +1 -1
- package/dist/cjs/link/components/CustomLink.js +1 -1
- package/dist/cjs/link/components/Link.js +1 -1
- package/dist/cjs/post-purchase/button/settings/configs/settings.js +1 -1
- package/dist/cjs/post-purchase/image/settings/Image.js +1 -1
- package/dist/cjs/product/components/product-quantity/ProductQuantity.js +1 -1
- package/dist/cjs/product/components/product-quantity/ProductQuantity.liquid.js +20 -20
- package/dist/cjs/product/components/product-quantity/common/attrs.js +1 -1
- package/dist/cjs/product/components/product-quantity/common/classes.js +1 -1
- package/dist/cjs/product/components/product-quantity/common/styles.js +1 -1
- package/dist/cjs/product/settings/product-quantity/configs/presets.js +11 -13
- package/dist/cjs/product/settings/product-quantity/configs/settings.js +2 -2
- package/dist/cjs/product/settings/product-quantity/configs/ui-v2.js +1 -1
- package/dist/cjs/sticky/settings/configs/presets.js +2 -2
- package/dist/cjs/third-party/settings/FeraReviews/uiV2.js +1 -1
- package/dist/cjs/third-party/settings/LaiProductReviews/index.js +1 -1
- package/dist/cjs/third-party/settings/LaiProductReviews/uiV2.js +1 -1
- package/dist/esm/header/settings/configs/settings.js +2 -2
- package/dist/esm/icon-list-v2/common/styles.js +1 -1
- package/dist/esm/icon-list-v2/components/IconList.js +1 -1
- package/dist/esm/link/components/CustomLink.js +1 -1
- package/dist/esm/link/components/Link.js +1 -1
- package/dist/esm/post-purchase/button/settings/configs/settings.js +1 -1
- package/dist/esm/post-purchase/image/settings/Image.js +1 -1
- package/dist/esm/product/components/product-quantity/ProductQuantity.js +1 -1
- package/dist/esm/product/components/product-quantity/ProductQuantity.liquid.js +21 -21
- package/dist/esm/product/components/product-quantity/common/attrs.js +1 -1
- package/dist/esm/product/components/product-quantity/common/classes.js +1 -1
- package/dist/esm/product/components/product-quantity/common/styles.js +1 -1
- package/dist/esm/product/settings/product-quantity/configs/presets.js +11 -13
- package/dist/esm/product/settings/product-quantity/configs/settings.js +2 -2
- package/dist/esm/product/settings/product-quantity/configs/ui-v2.js +1 -1
- package/dist/esm/sticky/settings/configs/presets.js +2 -2
- package/dist/esm/third-party/settings/FeraReviews/uiV2.js +1 -1
- package/dist/esm/third-party/settings/LaiProductReviews/index.js +1 -1
- package/dist/esm/third-party/settings/LaiProductReviews/uiV2.js +1 -1
- package/dist/types/index.d.ts +7 -5
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
let HeaderSettings=[{id:"setting",controls:[{id:"breakpoint",label:"Breakpoint",type:"select",hideOnMode:{mobileOnly:!0},options:[{label:"From desktop and smaller",subTitle:"Display menu icon for desktop, tablet and mobile",value:"desktop"},{label:"From tablet and smaller",subTitle:"Display menu icon for tablet and mobile",value:"tablet"},{label:"Only mobile",subTitle:"Display menu icon for only mobile",value:"mobile"}],default:"mobile"},{id:"itemEnableHoverEffect",type:"toggle",default:!
|
|
1
|
+
let HeaderSettings=[{id:"setting",controls:[{id:"breakpoint",label:"Breakpoint",type:"select",hideOnMode:{mobileOnly:!0},options:[{label:"From desktop and smaller",subTitle:"Display menu icon for desktop, tablet and mobile",value:"desktop"},{label:"From tablet and smaller",subTitle:"Display menu icon for tablet and mobile",value:"tablet"},{label:"Only mobile",subTitle:"Display menu icon for only mobile",value:"mobile"}],default:"mobile"},{id:"itemEnableHoverEffect",type:"toggle",default:!1},{id:"enableDropdownHoverEffect",type:"toggle",default:!1},{id:"cardEnableHoverEffect",type:"toggle",default:!1},{id:"menu",label:"Menu",type:"menu",default:{ROOT:{id:"ROOT",title:"Root",childrens:["1","2","3"]},1:{id:"1",title:"Menu 1",link:"",childrens:["13","14"]},2:{id:"2",title:"Menu 2",link:"",childrens:["6","7","8"]},6:{id:"6",title:"Sub Menu 2.1",childrens:[]},7:{id:"7",title:"Sub Menu 2.2",childrens:["10","11"]},8:{id:"8",title:"Sub Menu 2.3",childrens:["12"]},9:{id:"9",title:"Sub Menu 2.4",childrens:[]},10:{id:"10",title:"Sub Menu 2.2.1",childrens:[]},11:{id:"11",title:"Sub Menu 2.2.2",childrens:[]},12:{id:"12",title:"Sub Menu 2.3.1",childrens:[]},3:{id:"3",title:"Menu 3",link:"",childrens:[]},13:{id:"13",title:"Sub Menu 1.1",link:"",childrens:[]},14:{id:"14",title:"Sub Menu 1.2",link:"",childrens:[]}}},{type:"group",label:"Logo",id:"logo-group",controls:[{id:"logo",label:"Logo",type:"image-select",devices:{desktop:{default:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/image_demo.jpg",width:800,height:533}}}},{id:"logoAspectRatio",type:"select",label:"Aspect Ratio",options:[{label:"Auto",value:"auto"},{label:"1:1",value:"1"},{label:"3:2",value:"3/2"},{label:"4:3",value:"4/3"},{label:"16:9",value:"16/9"},{label:"21:9",value:"21/9"},{label:"2:3",value:"2/3"},{label:"3:4",value:"3/4"},{label:"9:16",value:"9/16"},{label:"Custom",value:"custom"}],devices:{desktop:{default:"auto"}}},{id:"customAspectRadio",type:"ratio",min:1,devices:{desktop:{default:{width:"1",height:"1"}}},hide:!0},{id:"layout",type:"select",label:"Object Fit",options:[{label:"Fill",value:"fill"},{label:"Cover",value:"cover"},{label:"Contain",value:"contain"},{label:"None",value:"none"},{label:"Scale down",value:"scale-down"}],devices:{desktop:{default:"contain"}}},{id:"logoWidth",label:"Width",type:"input:unit",units:["px","%"],devices:{desktop:{default:"80px"}}}]},{id:"arrow",label:"Arrow Icon",type:"icon",default:`<svg data-name="chevron down" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.57576 6.77583C4.81007 6.54152 5.18997 6.54152 5.42429 6.77583L8.20002 9.55157L10.9758 6.77583C11.2101 6.54152 11.59 6.54152 11.8243 6.77583C12.0586 7.01015 12.0586 7.39005 11.8243 7.62436L8.62429 10.8244C8.38997 11.0587 8.01007 11.0587 7.77576 10.8244L4.57576 7.62436C4.34145 7.39005 4.34145 7.01015 4.57576 6.77583Z" fill="currentColor"/>
|
|
3
3
|
</svg>
|
|
4
|
-
`},{id:"cart-setting",type:"group",label:"Cart Setting",controls:[{id:"cartIcon",label:"Cart Icon",type:"icon",default:'<svg data-name="cart" width="16" height="16" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"></path></svg>'}]}]},{id:"style",controls:[{id:"height",label:"Height",type:"input:unit",units:["px"],devices:{desktop:{default:"60px"}}},{id:"typography",label:"Typography",type:"typography",default:{type:"paragraph-1"}},{id:"typo",label:"Text styles",type:"typography-v2",default:{type:"paragraph-1"},hiddenSetting:{textAlign:!0,textShadow:!0},ignoreReRender:!0},{id:"background-group",label:"Background",type:"group",controls:[{id:"headerBg",type:"color-picker-v2",label:"Header",devices:{desktop:{default:"#FFFFFF"}}},{id:"menuBg",type:"color-picker-v2",label:"Menu",info:"Dropdown and collapse menu background color",compoDefaultValue:{desktop:{default:"#FFFFFF"}},devices:{desktop:{default:"#FFFFFF"}}}]},{id:"color-state",type:"behavior-state",controls:[{id:"textColor",label:"Text Color",type:"color-picker-v2",state:{normal:!0,hover:!0},default:{normal:"text-1"},compoDefaultValue:{hover:"text-2"}},{id:"menuTextColor",label:"Menu Text Color",type:"color-picker-v2",state:{normal:!0,hover:!0},compoDefaultValue:{normal:"text-1",hover:"text-2"},default:{normal:"text-1"}},{id:"cartIconColor",type:"color-picker-v2",label:"Cart Icon Color",state:{normal:!0,hover:!0},default:{normal:"text-1"}}]}]}];export{HeaderSettings};
|
|
4
|
+
`},{id:"cart-setting",type:"group",label:"Cart Setting",controls:[{id:"cartIcon",label:"Cart Icon",type:"icon",default:'<svg data-name="cart" width="16" height="16" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"></path></svg>'}]}]},{id:"style",controls:[{id:"height",label:"Height",type:"input:unit",units:["px"],devices:{desktop:{default:"60px"}}},{id:"typography",label:"Typography",type:"typography",default:{type:"paragraph-1"}},{id:"typo",label:"Text styles",type:"typography-v2",default:{type:"paragraph-1"},hiddenSetting:{textAlign:!0,textShadow:!0},ignoreReRender:!0},{id:"background-group",label:"Background",type:"group",controls:[{id:"headerBg",type:"color-picker-v2",label:"Header",devices:{desktop:{default:"#FFFFFF"}}},{id:"menuBg",type:"color-picker-v2",label:"Menu",info:"Dropdown and collapse menu background color",compoDefaultValue:{desktop:{default:"#FFFFFF"}},devices:{desktop:{default:"#FFFFFF"}}}]},{id:"color-state",type:"behavior-state",controls:[{id:"textColor",label:"Text Color",type:"color-picker-v2",state:{normal:!0,hover:!0},default:{normal:"text-1"},compoDefaultValue:{hover:"text-2"}},{id:"menuTextColor",label:"Menu Text Color",type:"color-picker-v2",state:{normal:!0,hover:!0},compoDefaultValue:{normal:"text-1",hover:"text-2"},default:{normal:"text-1"}},{id:"cartIconColor",type:"color-picker-v2",label:"Cart Icon Color",state:{normal:!0,hover:!0},default:{normal:"text-1"},compoDefaultValue:{hover:"text-2"}}]}]}];export{HeaderSettings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyleResponsive as
|
|
1
|
+
import{makeStyleResponsive as e,composeBorderResponsive as t,getResponsiveStyleShadowWithoutState as l,composeRadiusResponsive as o,getStyleBackgroundByDevice as r,getResponsiveStylePadding as b,getGradientBgrStyleByDevice as i,makeGlobalSize as n,makeStyle as a,getSingleColorVariable as p}from"@gem-sdk/core";let filterStyles=e=>{let t=["--mb","--mb-mobile","--mb-tablet"];return t.forEach(t=>{delete e?.[t]}),e},getStyleContainerIconlistMain=({styles:t,style:l,type:o,advanced:r})=>{let{align:b}=t??{};return{...l="react"===o?filterStyles(l):l,...e("jc",b),...e("d",{desktop:r?.d?.desktop?"flex":"none",tablet:r?.d?.tablet?"flex":"none",mobile:r?.d?.mobile?"flex":"none"})}},getStyleWraplistIcon=({styles:n})=>{let{panelAlign:a,contentBoxPadding:p,contentBoxWidth:s,background:c,contentBoxBorder:d,contentBoxRounded:y,contentBoxShadow:g}=n??{};return{...t(d),...l(g,"box-shadow",g),...o(y),...r(c),...b(p),...e("w",s),...e("jc",a),...i(c,{desktop:!0,tablet:!0,mobile:!0})}},getStyleColListIcon=({styles:t})=>{let{verticalSpacing:l}=t??{};return{...e("rg",l)}},getStyleWrapItemIcon=({styles:t})=>{let{horizontalSpacing:l,position:o}=t??{};return{...e("cg",l),...e("ai",o)}},getStyleWrapIcon=({styles:t,setting:l})=>{let{iconBorder:o,backgroundColor:r,iconRounded:b}=t??{},{globalSize:i}=l??{},s=n(i);return{...s.padding,...a({bs:o?.border,bw:o?.width,bc:p(o?.color),bg:r,bblr:b?.bblr,bbrr:b?.bbrr,btlr:b?.btlr,btrr:b?.btrr}),...e("pos",{desktop:"relative",tablet:"relative",mobile:"relative"}),...e("top",{desktop:"inherit",tablet:"inherit",mobile:"inherit"})}},getStyleIcon=({styles:e,setting:t})=>{let{iconColor:l}=e||{},{iconWidth:o}=t??{};return{"--c":p(l),"--w":"100%","--h":"100%","--size-desktop":`${o?.desktop}px`,"--size-tablet":`${o?.tablet||o?.desktop}px`,"--size-mobile":`${o?.mobile||o?.tablet||o?.desktop}px`}},getStyleTypoText=({setting:e})=>({typo:e?.textTypo});export{getStyleColListIcon,getStyleContainerIconlistMain,getStyleIcon,getStyleTypoText,getStyleWrapIcon,getStyleWrapItemIcon,getStyleWraplistIcon};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useGetProductId as s}from"../../hooks/useGetProductId.js";import{useRef as r}from"react";import m from"../../text/components/Text.js";import{createClass as l,createStyle as o,createAttr as a,If as i}from"@gem-sdk/system";import{getClassWraplistIcon as c,getClassColListIcon as n,getClassWrapItemIcon as d,getClassWrapIcon as p,getClassIcon as u,getClassTextItem as f}from"../common/classes.js";import{getStyleContainerIconlistMain as y,getStyleWraplistIcon as h,getStyleColListIcon as g,getStyleWrapIcon as v,getStyleWrapItemIcon as N,getStyleIcon as j,getStyleTypoText as x}from"../common/styles.js";import{getvalueMap as I,getTextIconTranslations as L,getTextIconNotFound as S}from"../common/helpers.js";let IconListV2=T=>{let{builderProps:$,builderAttrs:k,style:w,setting:V,styles:_,pageContext:q}=T,
|
|
2
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useGetProductId as s}from"../../hooks/useGetProductId.js";import{useRef as r}from"react";import m from"../../text/components/Text.js";import{createClass as l,createStyle as o,createAttr as a,If as i}from"@gem-sdk/system";import{getClassWraplistIcon as c,getClassColListIcon as n,getClassWrapItemIcon as d,getClassWrapIcon as p,getClassIcon as u,getClassTextItem as f}from"../common/classes.js";import{getStyleContainerIconlistMain as y,getStyleWraplistIcon as h,getStyleColListIcon as g,getStyleWrapIcon as v,getStyleWrapItemIcon as N,getStyleIcon as j,getStyleTypoText as x}from"../common/styles.js";import{getvalueMap as I,getTextIconTranslations as L,getTextIconNotFound as S}from"../common/helpers.js";let IconListV2=T=>{let{builderProps:$,builderAttrs:k,style:w,setting:V,styles:_,pageContext:q,advanced:C}=T,G=l({[$?.uid??""]:!0}),H=l(c()),M=l(n()),P=l(d({builderProps:$})),b=l(p()),z=l(u()),A=l(f({setting:V})),B=o(y({styles:_,style:w,type:"react",advanced:C})),D=o(h({styles:_})),E=o(g({styles:_})),F=o(v({styles:_,setting:V})),J=o(N({styles:_})),K=o(j({styles:_,setting:V})),O=x({setting:V}),Q=a({...k}),R=S("react"),U=I({setting:V}),W=r(null),{refContainer:X,productID:Y}=s();return e("div",{...Q,...$,"data-id":$?.uid,style:B,className:G,ref:X,children:i(!U||!U.length,e("div",{children:R}),e("div",{className:H,style:D,children:e("div",{className:M,style:E,children:U?.map((s,r)=>{let l=L({setting:V,builderProps:$,pageContext:q,key:r,type:"react"});return t("div",{"data-index":r,className:P,style:J,children:[e("div",{className:b,style:F,children:e("span",{style:K,className:z,dangerouslySetInnerHTML:{__html:s}})}),e(m,{setting:{text:l?.toString(),htmlTag:"div",options:{useState:!0,uniqueId:`${$?.uid}-${r}-${Y}`,productID:Y,customClass:{wrapper:"gp-w-full"}}},styles:O,className:A,ref:W})]},r)})})}))})};export{IconListV2 as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as t}from"react/jsx-runtime";import
|
|
2
|
+
import{jsx as t}from"react/jsx-runtime";import i from"next/link";let CustomLink=({children:e,...r})=>t(i,{title:r?.title,"data-id":r?.dataId,...r,children:e});export{CustomLink as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as t}from"react/jsx-runtime";import{useMemo as r}from"react";import e from"./CustomLink.js";import o from"./ProductLink.js";let Link=({setting:l,className:
|
|
2
|
+
import{jsx as t}from"react/jsx-runtime";import{useMemo as r}from"react";import e from"./CustomLink.js";import o from"./ProductLink.js";let Link=({setting:l,className:a,style:i,children:m,title:n,dataId:f})=>{let p=r(()=>l?.type==="product"?o:e,[l?.type]),s={};return p==e&&(s.title=n,s.dataId=f),t(p,{...s,target:l?.target,rel:l?.noFollow?"nofollow":void 0,"aria-label":l?.label,href:l?.href,className:a,style:i,children:m})};export{Link as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let DeclineButtonSettings=[{id:"setting",controls:[{id:"text",label:"Content",type:"select",options:[{value:"No thanks",label:"No thanks"},{value:"Decline offer",label:"Decline offer"}],default:"No thanks"},{id:"buttonType",type:"layout-selector",label:"Style",popoverLabel:{en:"Style"},iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",default:"secondary",options:[{label:"Outline",value:"secondary",type:"post-purchase-button",iconName:"gp-secondary-button"},{label:"Text link",value:"link",type:"post-purchase-button",iconName:"gp-link-button"}]}]},{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}
|
|
1
|
+
let DeclineButtonSettings=[{id:"setting",controls:[{id:"text",label:"Content",type:"select",options:[{value:"No thanks",label:"No thanks"},{value:"Decline offer",label:"Decline offer"}],default:"No thanks"},{id:"buttonType",type:"layout-selector",label:"Style",popoverLabel:{en:"Style"},iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",default:"secondary",options:[{label:"Outline",value:"secondary",type:"post-purchase-button",iconName:"gp-secondary-button"},{label:"Text link",value:"link",type:"post-purchase-button",iconName:"gp-link-button"}]}]},{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",fontWeight:"bold",textTransform:"none"},hiddenSetting:["textColor","fontWeight"]},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"start",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:"end",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"start"},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"}]}];export{DeclineButtonSettings};
|
|
@@ -8,4 +8,4 @@ import{SettingUIV2 as e}from"./configs/ui-v2.js";import{ImagePostPurchaseSetting
|
|
|
8
8
|
<circle cx="37" cy="17" r="3" fill="#D6D6D6"/>
|
|
9
9
|
<path d="M32.42 30.9518L37.1407 25.1338C37.3005 24.9364 37.498 24.7768 37.7203 24.6653C37.9427 24.5538 38.1848 24.4929 38.431 24.4866C38.6772 24.4803 38.9218 24.5287 39.149 24.6287C39.3762 24.7288 39.5809 24.8781 39.7496 25.0671L41.957 27.5361L50.5857 16.6629C50.7546 16.4499 50.967 16.2797 51.2069 16.165C51.4469 16.0503 51.7083 15.9941 51.9718 16.0005C52.2352 16.0069 52.4939 16.0758 52.7285 16.202C52.9632 16.3283 53.1679 16.5086 53.3273 16.7297L63.6435 31.0236C63.8408 31.2976 63.9615 31.6242 63.9922 31.9666C64.0229 32.3089 63.9623 32.6535 63.8173 32.9616C63.6723 33.2697 63.4485 33.529 63.1712 33.7105C62.8939 33.8919 62.5741 33.9883 62.2476 33.9887L33.7537 34C33.4185 33.9999 33.0904 33.8986 32.8082 33.7082C32.526 33.5177 32.3014 33.2461 32.1611 32.9255C32.0208 32.6048 31.9706 32.2485 32.0165 31.8988C32.0624 31.549 32.2024 31.2204 32.42 30.9518Z" fill="#D6D6D6"/>
|
|
10
10
|
</svg>
|
|
11
|
-
`},components:[{tag:"PostPurchaseImage",advanced:{blockPadding:"none",inlinePadding:"none"}}],rootOverride:{styles:{width:{desktop:"500px"}}}}]};export{config as default};
|
|
11
|
+
`},components:[{tag:"PostPurchaseImage",advanced:{blockPadding:"none",inlinePadding:"none"}}],rootOverride:{styles:{width:{desktop:"500px"},align:"center"}}}]};export{config as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{useCurrentVariant as s,useQuantity as o}from"@gem-sdk/core";import{createAttr as
|
|
2
|
+
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{useCurrentVariant as s,useQuantity as o}from"@gem-sdk/core";import{createAttr as l,createClass as n,createStyle as r,If as a}from"@gem-sdk/system";import{useProductQuantity as i}from"./hooks/useProductQuantity.js";import{getContainerAttrs as m,getInputAttr as u,getButtonAttrs as c}from"./common/attrs.js";import{getContainerClasses as d,getWrapperClasses as y,getInputClasses as b,getButtonClass as f,getIconWrapperClasses as h}from"./common/classes.js";import{getContainerStyles as p,getWrapperStyles as g,getInputStyle as N,getButtonStyle as j}from"./common/styles.js";import{getIconWidth as v,getMinusIcon as B,getPlusIcon as H}from"./common/helpers.js";let ProductQuantity=S=>{let{setting:k={},styles:C={},builderProps:D,advanced:Q}=S,_=s(),{quantity:P}=o(),{isInStock:x,ref:I,onClickIncrement:L,onClickDecrement:M,onChangeInput:T,onFocusInput:F}=i(S),{plusIcon:V,minusIcon:q}=k,w=k.defaultQtyValue||1,{inputHeight:z,buttonBackgroundColor:A,backgroundColor:E,iconColor:G,inputBackgroundColor:J,textColor:K,align:O,borderBtn:R,buttonWidth:U,iconSizeCustom:W,corner:X}=C,Y=k?.hasButton,Z=l({...m({isDisabled:!x,uid:D?.uid||""})}),$=n({...d(Q?.cssClass)}),tt=r({...p({align:O,inputHeight:z})}),te=n({...y()}),ts=r({...g({backgroundColor:E,styles:C,setting:k})}),to=l({...u({hasButton:Y,quantity:P,currentVariant:_,defaultQty:w})}),tl=n({...b({styles:C,borderBtn:R,inputBackgroundColor:J,textColor:K,isDisabled:!x})}),tn=r({...N(S)}),tr=n({...f({borderBtn:R,buttonBackgroundColor:A,iconColor:G,buttonSide:"left",isDisabled:!x})}),ta=r({...j({borderBtn:R,buttonWidth:U,buttonBackgroundColor:A,iconColor:G,corner:X,enableHoverButton:k?.enableHoverButton})}),ti=l({...c({buttonSide:"left"})}),tm=n({...f({borderBtn:R,buttonBackgroundColor:A,iconColor:G,buttonSide:"right",isDisabled:!x})}),tu=r({...j({borderBtn:R,buttonWidth:U,buttonBackgroundColor:A,iconColor:G,corner:X,enableHoverButton:k?.enableHoverButton})}),tc=l({...c({buttonSide:"right"})}),td=n({...h()}),ty=r({...v(W)});return t("div",{ref:I,...Z,className:$,style:tt,children:e("div",{className:te,style:ts,children:[a(Y,t("button",{...ti,onClick:M,className:tr,style:ta,children:t("span",{className:td,style:ty,dangerouslySetInnerHTML:{__html:B(q)}})})),t("input",{...to,className:tl,style:tn,onChange:t=>T(t),onFocus:t=>F(t)}),a(Y,t("button",{...tc,onClick:L,className:tm,style:tu,children:t("span",{className:td,style:ty,dangerouslySetInnerHTML:{__html:H(V)}})}))]})})};export{ProductQuantity as default};
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import{template as t,RenderIf as s,isLocalEnv as e,baseAssetURL as a}from"@gem-sdk/core";import{getSettingPreloadData as i}from"../../../helpers.js";import{createAttr as l,createClass as r,createStyle as o}from"@gem-sdk/system";import{getContainerAttrs as n,getInputAttr as
|
|
1
|
+
import{template as t,RenderIf as s,isLocalEnv as e,baseAssetURL as a}from"@gem-sdk/core";import{getSettingPreloadData as i}from"../../../helpers.js";import{createAttr as l,createClass as r,createStyle as o}from"@gem-sdk/system";import{getContainerAttrs as n,getInputAttr as u,getButtonAttrs as d}from"./common/attrs.js";import{getContainerClasses as c,getWrapperClasses as p,getInputClasses as f,getButtonClass as m,getIconWrapperClasses as $}from"./common/classes.js";import{getContainerStyles as b,getWrapperStyles as y,getInputStyle as v,getButtonStyle as g}from"./common/styles.js";import{getIconWidth as S,getMinusIcon as _,getPlusIcon as h}from"./common/helpers.js";let ProductQuantity=({setting:j={},styles:q={},advanced:B,builderProps:k})=>{let{plusIcon:E,minusIcon:H,updatePrice:P}=j,Q=j.defaultQtyValue??1,{inputHeight:A,buttonBackgroundColor:G,iconColor:L,inputBackgroundColor:M,textColor:V,align:x,borderBtn:C,buttonWidth:D,iconSizeCustom:I,corner:N,backgroundColor:O,dividerColor:R,dividerStroke:T}=q,w=j?.hasButton,z=l({...n({uid:k?.uid||"",isDisableByLiquid:!0})}),F=r({...c(B?.cssClass)}),J=o({...b({align:x,inputHeight:A})}),K=r({...p()}),U=o({...y({backgroundColor:O,styles:q,setting:j})}),W=l({...u({isLiquid:!0,hasButton:w,defaultQty:Q})}),X=r({...f({styles:q,borderBtn:C,inputBackgroundColor:M,textColor:V})}),Y=o({...v({setting:j,styles:{...q,borderBtn:C,inputBackgroundColor:M,textColor:V,dividerColor:R,dividerStroke:T}})}),Z=r({...m({borderBtn:C,buttonBackgroundColor:G,iconColor:L,buttonSide:"left"})}),tt=o({...g({borderBtn:C,buttonWidth:D,buttonBackgroundColor:G,iconColor:L,corner:N,enableHoverButton:j?.enableHoverButton})}),ts=l({...d({buttonSide:"left"})}),te=r({...m({borderBtn:C,buttonBackgroundColor:G,iconColor:L,buttonSide:"right"})}),ta=o({...g({borderBtn:C,buttonWidth:D,buttonBackgroundColor:G,iconColor:L,corner:N,enableHoverButton:j?.enableHoverButton})}),ti=l({...d({buttonSide:"right"})}),tl=r({...$()}),tr=S(I);return t`
|
|
2
2
|
{%- liquid
|
|
3
3
|
assign current_variant = product.selected_or_first_available_variant
|
|
4
4
|
assign available = current_variant.available | default: false
|
|
5
5
|
-%}
|
|
6
6
|
<gp-product-quantity
|
|
7
|
-
${{...
|
|
8
|
-
data-price="${
|
|
9
|
-
class="${
|
|
10
|
-
style="${
|
|
7
|
+
${{...z}}
|
|
8
|
+
data-price="${P}"
|
|
9
|
+
class="${F}"
|
|
10
|
+
style="${J}"
|
|
11
11
|
>
|
|
12
|
-
<div class="${
|
|
13
|
-
${s(
|
|
12
|
+
<div class="${K}" style="${U}">
|
|
13
|
+
${s(w,t`
|
|
14
14
|
<button
|
|
15
15
|
{% if available == false %} disabled {% endif %}
|
|
16
|
-
${{...
|
|
17
|
-
class="${
|
|
18
|
-
style="${
|
|
16
|
+
${{...ts}}
|
|
17
|
+
class="${Z}"
|
|
18
|
+
style="${tt}"
|
|
19
19
|
>
|
|
20
|
-
<span class="${
|
|
20
|
+
<span class="${tl}" style="${tr}"
|
|
21
21
|
>
|
|
22
|
-
${_(
|
|
22
|
+
${_(H)}
|
|
23
23
|
</span>
|
|
24
24
|
</button>
|
|
25
25
|
`)}
|
|
26
26
|
<input
|
|
27
27
|
{% if available == false %} disabled {% endif %}
|
|
28
|
-
${{...
|
|
29
|
-
class="${
|
|
30
|
-
style="${
|
|
28
|
+
${{...W}}
|
|
29
|
+
class="${X}"
|
|
30
|
+
style="${Y}"
|
|
31
31
|
inputMode="numeric"
|
|
32
32
|
/>
|
|
33
33
|
|
|
34
|
-
${s(
|
|
34
|
+
${s(w,t`
|
|
35
35
|
<button
|
|
36
36
|
{% if available == false %} disabled {% endif %}
|
|
37
|
-
${{...
|
|
38
|
-
class="${
|
|
39
|
-
style="${
|
|
37
|
+
${{...ti}}
|
|
38
|
+
class="${te}"
|
|
39
|
+
style="${ta}"
|
|
40
40
|
>
|
|
41
|
-
<span class="${
|
|
42
|
-
${
|
|
41
|
+
<span class="${tl}" style="${tr}">
|
|
42
|
+
${h(E)}
|
|
43
43
|
</span>
|
|
44
44
|
</button>
|
|
45
45
|
`)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let getContainerAttrs=({uid:t,isDisabled:e=!0,isDisableByLiquid:n})=>({"data-id":t,"data-disabled":n?"{%- if available -%} false {%- else -%} true {%- endif -%}":e}),getButtonAttrs=({buttonSide:t})=>({title:"left"===t?"Decrement":"Increment","aria-label":"left"===t?"decrement":"increment",type:"button"}),getInputAttr=({isLiquid:t,
|
|
1
|
+
let getContainerAttrs=({uid:t,isDisabled:e=!0,isDisableByLiquid:n})=>({"data-id":t,"data-disabled":n?"{%- if available -%} false {%- else -%} true {%- endif -%}":e}),getButtonAttrs=({buttonSide:t})=>({title:"left"===t?"Decrement":"Increment","aria-label":"left"===t?"decrement":"increment",type:"button"}),getInputAttr=({isLiquid:t,hasButton:e,quantity:n,currentVariant:a,defaultQty:r})=>{let i={};return a?.manageInventory&&(i.max=t?"{{ current_variant.quantity_rule.max }}":a?.inventoryQuantity??1),{type:e?"text":"number",name:"quantity",step:1,min:1,"aria-label":"quantity",inputMode:"numeric",quantity:t?"current_variant.quantity":n??0,autocomplete:"off",value:n??r??1,...i}};export{getButtonAttrs,getContainerAttrs,getInputAttr};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{composeTypographyClassName as e,handleConvertClassColor as t,getGlobalColorStateClass as p,composeClasses as g}from"@gem-sdk/core";let getInputClasses=({styles:l,borderBtn:
|
|
1
|
+
import{composeTypographyClassName as e,handleConvertClassColor as t,getGlobalColorStateClass as p,composeClasses as g}from"@gem-sdk/core";let getInputClasses=({styles:l,borderBtn:s,inputBackgroundColor:n,textColor:r,isDisabled:a})=>{let o="gp-flex gp-w-full gp-px-1 gp-min-w-[45px] gp-shrink-[99999] gp-appearance-none gp-items-center gp-text-center gp-outline-none gp-transition-all gp-duration-150 hover:gp-text-black disabled:gp-cursor-not-allowed",i=e(l?.typo,l?.typography),u=t(s),c=p("bg",n),d=p("text",r);return u&&(o+=` ${u} `),i&&(o+=` ${i} `),c&&(o+=` ${c} `),d&&(o+=` ${d} `),a&&(o+="gp-cursor-not-allowed"),{...g(o)}},getButtonClass=({borderBtn:e,buttonBackgroundColor:l,iconColor:s,buttonSide:n,isDisabled:r})=>{let a=`gp-flex gp-aspect-square gp-h-full disabled:gp-cursor-not-allowed ${r?"gp-cursor-not-allowed":"gp-cursor-pointer"} gp-items-center gp-justify-center gp-outline-none ${"left"===n?"gp-minus":"gp-plus"} `,o=t(e),i=p("bg",l),u=p("text",s);return o&&(a+=` ${o} `),i&&(a+=` ${i} `),u&&(a+=` ${u} `),{...g(a)}},getContainerClasses=e=>({...g(`quantityClass gp-relative gp-inline-flex gp-h-12 gp-w-full gp-bg-transparent gp-transition-all gp-duration-150 data-[disabled=true]:gp-opacity-60 ${e??""}`)}),getWrapperClasses=()=>({...g("gp-inline-flex gp-w-full gp-overflow-hidden")}),getIconWrapperClasses=()=>({...g("gp-inline-flex gp-items-center gp-justify-center [&>*]:gp-h-full [&>*]:gp-w-full")});export{getButtonClass,getContainerClasses,getIconWrapperClasses,getInputClasses,getWrapperClasses};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{composeTypographyStyle as e,getStyleShadowState as t,
|
|
1
|
+
import{composeTypographyStyle as e,getStyleShadowState as t,getGlobalColorStateStyle as r,makeStyle as o,getStyleShadow as l,filterHoverVariables as a,makeStyleResponsive as n,handleConvertBorderStyle as d,handleConvertBorderWidth as i,handleConvertBorderColor as s,composeRadius as p,getResponsiveStyleShadowWithoutState as h,composeBorderResponsive as b,composeRadiusResponsive as u,makeStyleState as g}from"@gem-sdk/core";let addPxToValues=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,`${t}px`])),getDividerWidth=(e,t)=>{if(!e||!t)return{};let r=addPxToValues(e),o={...g("brw",r),...g("blw",r)};return o},getDividerColorStyle=e=>{if(!e)return{};let t={...e,normal:e?.normal??"transparent"},o={...r("brc",t),...r("blc",t)},l=Object.fromEntries(Object.entries(o).filter(([e,t])=>void 0!==t));return l},getInputStyle=n=>{let{styles:d,setting:i}=n,{inputBackgroundColor:s,textColor:p,dividerColor:h,dividerStroke:b,inputBoxShadow:u}=d??{},{enableHoverInput:g,hasButton:y}=i??{},m=e(d?.typo,d?.typography),S=t(u,"box-shadow",{normal:!!u?.normal,hover:!!u?.hover}),c={...getDividerWidth(b,h),...getDividerColorStyle(h)},w={...r("bg",s),...S,...r("c",{...p,hover:p?.hover??p?.normal}),...y?c:{}},v={...o({}),...m,...w,...l({value:d?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:d?.typo?.custom?.hasShadowText})};return g?v:a(v)},getButtonStyle=({borderBtn:e,buttonWidth:t,buttonBackgroundColor:o,iconColor:l,corner:h,enableHoverButton:b})=>{let u={...n("w",t),...d(e),...i(e),...s(e),...r("bg",o),...r("c",l),...p(h)};return b?u:a(u)},getContainerStyles=({inputHeight:e,align:t})=>({...n("h",e),...n("jc",t)}),getWrapperStyles=({backgroundColor:e,styles:t,setting:o})=>{let{enableHoverInput:l,hasButton:a}=o??{},p=t?.shapeShadow,g=h(p,"box-shadow",{desktop:p?.desktop??{},tablet:p?.tablet??p?.desktop??{},mobile:p?.mobile??p?.tablet??p?.desktop??{}}),y=t?.inputBorder,m=l&&!a,S={...d(y),...i(y),...s(y)};return{...m?S:{},...r("bg",e),...n("maxw",t?.quantityWidth),...b(t?.shapeBorder),...u(t?.shapeRounded),...g}};export{getButtonStyle,getContainerStyles,getInputStyle,getWrapperStyles};
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
let ProductQuantityPresets=[{id:"product-quantity",name:{en:"Product Quantity"},icon:{desktop:`
|
|
2
|
-
<svg width="96" height="
|
|
3
|
-
<
|
|
4
|
-
<path
|
|
2
|
+
<svg width="96" height="36" viewBox="0 0 96 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<rect x="0.5" y="0.5" width="95" height="35" rx="2.5" stroke="#424242"/>
|
|
4
|
+
<g clip-path="url(#clip0_23331_7683)">
|
|
5
|
+
<path d="M10 18C10 17.7239 10.2239 17.5 10.5 17.5H19.5C19.7761 17.5 20 17.7239 20 18C20 18.2761 19.7761 18.5 19.5 18.5H10.5C10.2239 18.5 10 18.2761 10 18Z" fill="#F9F9F9"/>
|
|
5
6
|
</g>
|
|
6
|
-
<
|
|
7
|
-
<path
|
|
8
|
-
<
|
|
9
|
-
<g clip-path="url(#clip1_1631_19448)">
|
|
10
|
-
<path d="M81.45 19.95C81.45 19.7015 81.2485 19.5 81 19.5C80.7515 19.5 80.55 19.7015 80.55 19.95V23.55H76.95C76.7015 23.55 76.5 23.7515 76.5 24C76.5 24.2485 76.7015 24.45 76.95 24.45H80.55V28.05C80.55 28.2985 80.7515 28.5 81 28.5C81.2485 28.5 81.45 28.2985 81.45 28.05V24.45H85.05C85.2985 24.45 85.5 24.2485 85.5 24C85.5 23.7515 85.2985 23.55 85.05 23.55H81.45V19.95Z" fill="#AAAAAA"/>
|
|
7
|
+
<path d="M49.1825 13.2727V22H48.1257V14.3807H48.0746L45.9439 15.7955V14.7216L48.1257 13.2727H49.1825Z" fill="#F9F9F9"/>
|
|
8
|
+
<g clip-path="url(#clip1_23331_7683)">
|
|
9
|
+
<path d="M81.45 13.95C81.45 13.7015 81.2485 13.5 81 13.5C80.7515 13.5 80.55 13.7015 80.55 13.95V17.55H76.95C76.7015 17.55 76.5 17.7515 76.5 18C76.5 18.2485 76.7015 18.45 76.95 18.45H80.55V22.05C80.55 22.2985 80.7515 22.5 81 22.5C81.2485 22.5 81.45 22.2985 81.45 22.05V18.45H85.05C85.2985 18.45 85.5 18.2485 85.5 18C85.5 17.7515 85.2985 17.55 85.05 17.55H81.45V13.95Z" fill="#F9F9F9"/>
|
|
11
10
|
</g>
|
|
12
|
-
<rect x="0.5" y="6.5" width="95" height="35" rx="2.5" stroke="#424242"/>
|
|
13
11
|
<defs>
|
|
14
|
-
<clipPath id="
|
|
15
|
-
<rect x="7" y="
|
|
12
|
+
<clipPath id="clip0_23331_7683">
|
|
13
|
+
<rect x="7" y="10" width="16" height="16" rx="3" fill="white"/>
|
|
16
14
|
</clipPath>
|
|
17
|
-
<clipPath id="
|
|
18
|
-
<rect x="73" y="
|
|
15
|
+
<clipPath id="clip1_23331_7683">
|
|
16
|
+
<rect x="73" y="10" width="16" height="16" rx="3" fill="white"/>
|
|
19
17
|
</clipPath>
|
|
20
18
|
</defs>
|
|
21
19
|
</svg>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
let ProductQuantitySettings=[{id:"setting",controls:[{id:"updatePrice",label:"Update price",type:"toggle",default:!0},{id:"
|
|
1
|
+
let ProductQuantitySettings=[{id:"setting",controls:[{id:"updatePrice",label:"Update price",type:"toggle",default:!0},{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-
|
|
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-combo",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",default:{normal:{}},compoDefaultValue:{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",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},{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:"line-3"},compoDefaultValue:{normal:"line-3"},state:{hover:!0,normal:!0},enableGradient:!0},{id:"dividerStroke",label:"Thickness",type:"input:stepper",min:1,default:{normal:1,hover:1},state:{hover:!0,normal:!0}},{id:"inputBorder",label:"Input Border",type:"border-v2",default:{hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}},state:{hover:!0,normal:!1}},{id:"shapeBorder",type:"border-v2",devices:{desktop:{default:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}}},{id:"shapeRounded",type:"corner-v2",devices:{desktop:{default:{radiusType:"none"}}}},{id:"shapeShadow",type:"shadow-v2",devices:{desktop:{default:{}}},compoDefaultValue:{desktop:{default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.20)",angle:45,enable:!0}}}}]}];export{ProductQuantitySettings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let SettingUIV2=[{label:{en:"
|
|
1
|
+
let SettingUIV2=[{controls:[{label:{en:"Button"},setting:{id:"hasButton"},options:{labelVariant:"primary",toggleStyle:"switch"}},{label:{en:"Width"},setting:{id:"buttonWidth"},conditionDisplay:"hasButton === true"},{label:{en:"Background"},setting:{id:"buttonBackgroundColor",state:"normal"},conditionDisplay:"hasButton === true"},{label:{en:"Plus icon"},setting:{id:"plusIcon"},conditionDisplay:"hasButton === true"},{label:{en:"Minus icon"},setting:{id:"minusIcon"},conditionDisplay:"hasButton === true"},{label:{en:"Icon color"},setting:{id:"iconColor",state:"normal"},conditionDisplay:"hasButton === true"}],moreSettings:{type:"collapse",controls:[{label:{en:"Icon size"},setting:{id:"iconSizeCustom"},conditionDisplay:"hasButton === true"},{label:{en:"Border"},setting:{id:"borderBtn",state:"normal"},conditionDisplay:"hasButton === true"},{label:{en:"Corner"},setting:{id:"corner",state:"normal"},conditionDisplay:"hasButton === true"},{label:{en:"Hover"},type:"combo",iconName:"polaris-check-clicked",fixedValue:"Styled",setting:{id:"enableHoverButton"},popoverLabel:{en:"Hover effect"},state:"hover",conditionDisplay:"hasButton === true",controls:[{label:{en:"Background"},setting:{id:"buttonBackgroundColor",state:"hover"},compoDefaultValue:{default:"highlight"}},{label:{en:"Icon color"},setting:{id:"iconColor",state:"hover"}},{label:{en:"Border"},setting:{id:"borderBtn",state:"hover"}},{label:{en:"Corner"},setting:{id:"corner",state:"hover"}}]}]}},{label:{en:"Input"},controls:[{label:{en:"Background"},setting:{id:"inputBackgroundColor",state:"normal"}},{label:{en:"Text style"},setting:{id:"typo"},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:"Divider"},type:"combo",conditionDisplay:"hasButton === true",comboType:"color",getValueFromSettingID:"dividerColor.normal",compoDefaultValue:"line-3",controls:[{label:{en:"Color"},setting:{id:"dividerColor",state:"normal"}},{label:{en:"Thickness"},setting:{id:"dividerStroke",state:"normal"}}]},{label:{en:"Shadow"},setting:{id:"inputBoxShadow",state:"normal"}},{label:{en:"Hover"},type:"combo",iconName:"polaris-check-clicked",fixedValue:"Styled",popoverLabel:{en:"Hover effect"},setting:{id:"enableHoverInput"},state:"hover",controls:[{label:{en:"Background"},setting:{id:"inputBackgroundColor",state:"hover"}},{label:{en:"Text color"},setting:{id:"textColor",state:"hover"}},{id:"divider-hover",label:{en:"Divider"},type:"combo",iconName:"polaris-edit",getValueFromSettingID:"dividerColor.hover",comboType:"color",compoDefaultValue:"line-3",controls:[{label:{en:"Color"},setting:{id:"dividerColor",state:"hover"}},{label:{en:"Thickness"},setting:{id:"dividerStroke",state:"hover"}}],conditionDisplay:"hasButton === true"},{label:{en:"Border"},setting:{id:"inputBorder",state:"hover"},conditionDisplay:"hasButton === false"},{label:{en:"Shadow"},setting:{id:"inputBoxShadow",state:"hover"}}]}]},{label:{en:"Size"},controls:[{label:{en:"Width"},setting:{id:"quantityWidth"}},{label:{en:"Height"},setting:{id:"inputHeight"}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColor",state:"normal"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"shapeBorder"}},{label:{en:"Corner"},setting:{id:"shapeRounded"}},{label:{en:"Shadow"},setting:{id:"shapeShadow"}}]},{label:{en:"Display condition"},controls:[{label:{en:"Default quantity"},setting:{id:"defaultQtyValue"}},{label:{en:"Update price"},setting:{id:"updatePrice"}}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(quantityWidth) >= 100 && quantityWidth?.includes("%"))',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Align is not supported when width is 100%"}}]}];export{SettingUIV2};
|
|
@@ -9,7 +9,7 @@ let StickyPreset={id:"sticky",name:{en:"Sticky Add to Cart"},icon:{desktop:`
|
|
|
9
9
|
<circle cx="64.2674" cy="46.5138" r="1.15512" fill="white"/>
|
|
10
10
|
<circle cx="69.5565" cy="46.5138" r="1.15512" fill="white"/>
|
|
11
11
|
</svg>
|
|
12
|
-
`},components:[{tag:"Sticky",label:"Sticky",settings:{width:{desktop:"100%"}},advanced:{hasBoxShadow:{desktop:{normal:!0}},boxShadow:{desktop:{normal:{type:"shadow-2",distance:"12px",blur:"12px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45}}}},childrens:[{tag:"Col",label:"Block",childrens:[{tag:"Product",label:"Product",settings:{layout:{desktop:{cols:[4,8],display:"fill"},mobile:{cols:[12]}},horizontalAlign:{desktop:"start"},verticalAlign:{desktop:"center"},isSyncProduct:!0},styles:{verticalGutter:{desktop:"8px"},verticalGutterMobile:{desktop:"0px"},fullWidth:{desktop:!1}},advanced:{"spacing-setting":{desktop:{margin:{},padding:{left:"4px",right:"4px",top:"4px",bottom:"4px"}}}},childrens:[{tag:"Col",label:"Block",childrens:[{tag:"Row",label:"Row",settings:{layout:{desktop:{cols:[6,6],display:"fit"},mobile:{cols:[12],display:"fill"}},horizontalAlign:{desktop:"start"},verticalAlign:{desktop:"center"}},styles:{fullWidth:{desktop:!0,tablet:!0,mobile:!0},verticalGutter:{desktop:"8px",tablet:"8px"},background:{desktop:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}},preloadBgImage:!1},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}},d:{desktop:!0,tablet:!0,mobile:!1},border:{desktop:{normal:{borderType:"none",border:"solid",borderWidth:"0px",width:"0px",color:"#121212",isCustom:!0}}},rounded:{desktop:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},hasBoxShadow:{desktop:{normal:!1}},boxShadow:{desktop:{normal:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90}}},op:{desktop:"100%"}},childrens:[{tag:"Col",label:"Block",childrens:[{tag:"ProductImagesV2",label:"Product Images",settings:{hoverEffect:"none"},styles:{position:{desktop:"only-feature",mobile:"only-feature"},ftShape:{desktop:{shape:"square",shapeValue:"1/1",width:"32px",height:void 0}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}}}}]},{tag:"Col",label:"Block",childrens:[{tag:"ProductTitle",label:"Product Title",settings:{htmlTag:"h1",linkProduct:!1},styles:{typo:{type:"subheading-3",custom:{fontSize:{desktop:"16px"},fontWeight:"400",lineHeight:"24px",letterSpacing:"0.6px",fontStyle:"normal"}},textAlign:{desktop:"left"},hasLineClamp:{desktop:!0},lineClamp:{desktop:1},color:{normal:"text-2"},hasTextShadow:{normal:!1,hover:!1},textShadow:{normal:{type:"shadow-1"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}}}},{tag:"ProductPrice",label:"Product Price",settings:{priceType:"regular"},styles:{typo:{type:"subheading-2",default:{type:"subheading-2"},custom:{fontSize:{desktop:"14px"},fontWeight:"400",lineHeight:"20px",letterSpacing:"0.6px",fontStyle:"normal"}},lineThrough:!0,thickness:1,lineColor:"text-1",color:{normal:"text-2"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},textAlign:{desktop:"left"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}}}}]}]}]},{tag:"Col",label:"Block",childrens:[{tag:"Row",label:"Row",settings:{layout:{desktop:{cols:[6,3,3],display:"fill"},mobile:{cols:[12],display:"fill"}},horizontalAlign:{desktop:"start"},verticalAlign:{desktop:"center"}},styles:{fullWidth:{desktop:!0,tablet:!0,mobile:!0},verticalGutter:{desktop:"8px",tablet:"8px"},background:{desktop:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}},preloadBgImage:!1},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}}},childrens:[{tag:"Col",label:"Block",childrens:[{tag:"ProductVariants",label:"Product Variants & Swatches",settings:{optionType:"groupOption",label:!0,optionAlign:{desktop:"left"},price:!0,showAsSwatches:!0,combineFullWidth:{desktop:!0},combineWidth:{desktop:"400px"},combineHeight:"40px",variantPresets:[{optionName:"base",optionType:"rectangle_list",presets:{color:{width:{desktop:"45px",tablet:"45px",mobile:"45px"},height:"45px",spacing:"16px"},rectangle_list:{width:{desktop:"auto",tablet:"auto",mobile:"auto"},height:"45px",spacing:"16px"},image:{width:{desktop:"64px",tablet:"64px",mobile:"64px"},height:"64px",spacing:"16px"},image_shopify:{width:{desktop:"64px",tablet:"64px",mobile:"64px"},height:"64px",spacing:"16px"},dropdown:{fullWidth:{desktop:!0,tablet:!0,mobile:!0},width:{desktop:"auto",tablet:"auto",mobile:"auto"},height:"45px"}}}],soldOutMark:!0,layout:{desktop:"vertical"},column:{desktop:1},hasPreSelected:!0,blankText:"Please select an option"},styles:{fullWidth:{desktop:!0},width:{desktop:"400px"},optionSpacing:"30px",labelGap:"8px",swatchAutoWidth:{desktop:!0},swatchWidth:{desktop:"80px"},swatchHeight:{desktop:"40px"},swatchSpacing:"var(--g-s-m)",marginBottom:{desktop:"var(--g-s-xl)",mobile:"var(--g-s-xl)"},align:{desktop:"left"},labelTypo:{type:"paragraph-2",attrs:{color:"text-1",bold:!0}},labelColor:"text-2",optionTypo:{type:"paragraph-2"},optionBgColor:{normal:"bg-3",hover:"bg-3",active:"bg-3"},optionTextColor:{normal:"text-2",hover:"text-2",active:"text-2"},optionBorder:{normal:{borderType:"style-2",border:"solid",color:"line-2",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"},active:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"2px 2px 2px 2px",borderWidth:"2px"},hover:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"}},optionRounded:{normal:{btrr:"4px",bblr:"4px",bbrr:"4px",btlr:"4px",radiusType:"custom"},hover:{radiusType:"none"},active:{radiusType:"none"}},optionHasShadow:{normal:!1},optionShadow:{normal:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90}},dropdownItemWidth:{desktop:"fill",mobile:"fill",tablet:"fill"},fixedDropdownWidth:{desktop:"240px"},swatchItemWidth:{desktop:"auto"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}},d:{desktop:!0,tablet:!0,mobile:!1}}}]},{tag:"Col",label:"Block",childrens:[{tag:"ProductQuantity",label:"Product Quantity",settings:{
|
|
12
|
+
`},components:[{tag:"Sticky",label:"Sticky",settings:{width:{desktop:"100%"}},advanced:{hasBoxShadow:{desktop:{normal:!0}},boxShadow:{desktop:{normal:{type:"shadow-2",distance:"12px",blur:"12px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45}}}},childrens:[{tag:"Col",label:"Block",childrens:[{tag:"Product",label:"Product",settings:{layout:{desktop:{cols:[4,8],display:"fill"},mobile:{cols:[12]}},horizontalAlign:{desktop:"start"},verticalAlign:{desktop:"center"},isSyncProduct:!0},styles:{verticalGutter:{desktop:"8px"},verticalGutterMobile:{desktop:"0px"},fullWidth:{desktop:!1}},advanced:{"spacing-setting":{desktop:{margin:{},padding:{left:"4px",right:"4px",top:"4px",bottom:"4px"}}}},childrens:[{tag:"Col",label:"Block",childrens:[{tag:"Row",label:"Row",settings:{layout:{desktop:{cols:[6,6],display:"fit"},mobile:{cols:[12],display:"fill"}},horizontalAlign:{desktop:"start"},verticalAlign:{desktop:"center"}},styles:{fullWidth:{desktop:!0,tablet:!0,mobile:!0},verticalGutter:{desktop:"8px",tablet:"8px"},background:{desktop:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}},preloadBgImage:!1},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}},d:{desktop:!0,tablet:!0,mobile:!1},border:{desktop:{normal:{borderType:"none",border:"solid",borderWidth:"0px",width:"0px",color:"#121212",isCustom:!0}}},rounded:{desktop:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},hasBoxShadow:{desktop:{normal:!1}},boxShadow:{desktop:{normal:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90}}},op:{desktop:"100%"}},childrens:[{tag:"Col",label:"Block",childrens:[{tag:"ProductImagesV2",label:"Product Images",settings:{hoverEffect:"none"},styles:{position:{desktop:"only-feature",mobile:"only-feature"},ftShape:{desktop:{shape:"square",shapeValue:"1/1",width:"32px",height:void 0}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}}}}]},{tag:"Col",label:"Block",childrens:[{tag:"ProductTitle",label:"Product Title",settings:{htmlTag:"h1",linkProduct:!1},styles:{typo:{type:"subheading-3",custom:{fontSize:{desktop:"16px"},fontWeight:"400",lineHeight:"24px",letterSpacing:"0.6px",fontStyle:"normal"}},textAlign:{desktop:"left"},hasLineClamp:{desktop:!0},lineClamp:{desktop:1},color:{normal:"text-2"},hasTextShadow:{normal:!1,hover:!1},textShadow:{normal:{type:"shadow-1"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}}}},{tag:"ProductPrice",label:"Product Price",settings:{priceType:"regular"},styles:{typo:{type:"subheading-2",default:{type:"subheading-2"},custom:{fontSize:{desktop:"14px"},fontWeight:"400",lineHeight:"20px",letterSpacing:"0.6px",fontStyle:"normal"}},lineThrough:!0,thickness:1,lineColor:"text-1",color:{normal:"text-2"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},textAlign:{desktop:"left"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}}}}]}]}]},{tag:"Col",label:"Block",childrens:[{tag:"Row",label:"Row",settings:{layout:{desktop:{cols:[6,3,3],display:"fill"},mobile:{cols:[12],display:"fill"}},horizontalAlign:{desktop:"start"},verticalAlign:{desktop:"center"}},styles:{fullWidth:{desktop:!0,tablet:!0,mobile:!0},verticalGutter:{desktop:"8px",tablet:"8px"},background:{desktop:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}},preloadBgImage:!1},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}}},childrens:[{tag:"Col",label:"Block",childrens:[{tag:"ProductVariants",label:"Product Variants & Swatches",settings:{optionType:"groupOption",label:!0,optionAlign:{desktop:"left"},price:!0,showAsSwatches:!0,combineFullWidth:{desktop:!0},combineWidth:{desktop:"400px"},combineHeight:"40px",variantPresets:[{optionName:"base",optionType:"rectangle_list",presets:{color:{width:{desktop:"45px",tablet:"45px",mobile:"45px"},height:"45px",spacing:"16px"},rectangle_list:{width:{desktop:"auto",tablet:"auto",mobile:"auto"},height:"45px",spacing:"16px"},image:{width:{desktop:"64px",tablet:"64px",mobile:"64px"},height:"64px",spacing:"16px"},image_shopify:{width:{desktop:"64px",tablet:"64px",mobile:"64px"},height:"64px",spacing:"16px"},dropdown:{fullWidth:{desktop:!0,tablet:!0,mobile:!0},width:{desktop:"auto",tablet:"auto",mobile:"auto"},height:"45px"}}}],soldOutMark:!0,layout:{desktop:"vertical"},column:{desktop:1},hasPreSelected:!0,blankText:"Please select an option"},styles:{fullWidth:{desktop:!0},width:{desktop:"400px"},optionSpacing:"30px",labelGap:"8px",swatchAutoWidth:{desktop:!0},swatchWidth:{desktop:"80px"},swatchHeight:{desktop:"40px"},swatchSpacing:"var(--g-s-m)",marginBottom:{desktop:"var(--g-s-xl)",mobile:"var(--g-s-xl)"},align:{desktop:"left"},labelTypo:{type:"paragraph-2",attrs:{color:"text-1",bold:!0}},labelColor:"text-2",optionTypo:{type:"paragraph-2"},optionBgColor:{normal:"bg-3",hover:"bg-3",active:"bg-3"},optionTextColor:{normal:"text-2",hover:"text-2",active:"text-2"},optionBorder:{normal:{borderType:"style-2",border:"solid",color:"line-2",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"},active:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"2px 2px 2px 2px",borderWidth:"2px"},hover:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"}},optionRounded:{normal:{btrr:"4px",bblr:"4px",bbrr:"4px",btlr:"4px",radiusType:"custom"},hover:{radiusType:"none"},active:{radiusType:"none"}},optionHasShadow:{normal:!1},optionShadow:{normal:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90}},dropdownItemWidth:{desktop:"fill",mobile:"fill",tablet:"fill"},fixedDropdownWidth:{desktop:"240px"},swatchItemWidth:{desktop:"auto"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}},d:{desktop:!0,tablet:!0,mobile:!1}}}]},{tag:"Col",label:"Block",childrens:[{tag:"ProductQuantity",label:"Product Quantity",settings:{hasButton:!0,enableHoverButton:!0},styles:{inputHeight:{desktop:"40px"},buttonWidth:{desktop:"40px"},iconSizeCustom:{desktop:"20px"},typo:{type:"paragraph-2",attrs:{color:"text-1"}},align:{desktop:"left"},inputBackgroundColor:"bg-3",textColor:"text-2",buttonBackgroundColor:{normal:"bg-3"},iconColor:{normal:"text-2"},borderBtn:{normal:{},hover:{borderType:"style-3",border:"solid",width:"1px 1px 1px 1px",color:"line-3",isCustom:!1}},corner:{desktop:{normal:{btrr:"4px",bblr:"4px",bbrr:"4px",btlr:"4px",radiusType:"rounded"}}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}},d:{desktop:!0,tablet:!0,mobile:!1}}}]},{tag:"Col",label:"Block",childrens:[{tag:"ProductButton",label:"Product Cart Button",settings:{label:"Add to cart",outOfStockLabel:"Out of stock",actionEffect:"open-cart-drawer",customURL:{link:"/cart",target:"_self"},successMessage:"Add product to cart successfully",errorMessage:"Cannot add product to cart",buttonLayout:"cart-only",iconAlign:"left",errorType:"built-in"},styles:{backgroundColor:{normal:"brand",hover:"highlight"},textColor:{normal:"text-3"},borderBtn:{normal:{border:"solid",color:"#121212",isCustom:!0,position:"all",borderWidth:"0px",width:"0px 0px 0px 0px"},hover:{border:"solid",color:"#4D4D4D",isCustom:!0,position:"all",borderWidth:"0px",width:"0px 0px 0px 0px"}},hasBoxShadowBtn:{normal:!1,hover:!1},boxShadowBtn:{normal:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90}},roundedBtnV2:{normal:{btrr:"4px",bblr:"4px",bbrr:"4px",btlr:"4px",radiusType:"rounded"}},align:{desktop:"left"},typo:{type:"paragraph-1"},transform:"default",btnSpacing:{type:"medium"},fullWidth:{desktop:!0},iconSizeAuto:!0,size:{desktop:"1em"},iconDimension:{desktop:"24px"},spacing:"8px",successTypo:{type:"paragraph-2"},successColor:"success",errorTypo:{type:"paragraph-2"},errorColor:"error",isCustomOutOfStock:!1,oosBackground:"brand",oosTextColor:"text-3",oosBorder:{normal:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,borderWidth:"0px",width:"0px 0px 0px 0px"}},oosEnableShadow:!1,oosShadow:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90},oosRounded:{radiusType:"none"},globalSize:{desktop:{width:"100%"}},enableIcon:!1,enablePrice:!1,enableSeparator:!1},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}}}}]}]}]}]}]}]}]},StickyPresetScrollToTop={id:"sticky-scroll-to-top",name:{en:"Sticky Back to top"},icon:{desktop:`
|
|
13
13
|
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
14
14
|
<rect width="40" height="40" rx="20" fill="#424242"/>
|
|
15
15
|
<path d="M13.6001 14C13.6001 13.5581 13.9583 13.2 14.4001 13.2H25.6001C26.0419 13.2 26.4001 13.5581 26.4001 14C26.4001 14.4418 26.0419 14.8 25.6001 14.8H14.4001C13.9583 14.8 13.6001 14.4418 13.6001 14Z" fill="#F9F9F9"/>
|
|
@@ -28,4 +28,4 @@ let StickyPreset={id:"sticky",name:{en:"Sticky Add to Cart"},icon:{desktop:`
|
|
|
28
28
|
<circle cx="64.2674" cy="46.5138" r="1.15512" fill="white"/>
|
|
29
29
|
<circle cx="69.5565" cy="46.5138" r="1.15512" fill="white"/>
|
|
30
30
|
</svg>
|
|
31
|
-
`},components:[{tag:"Sticky",label:"Sticky",advanced:{hasBoxShadow:{desktop:{normal:!0}},boxShadow:{desktop:{normal:{type:"shadow-1",distance:"0px",blur:"10px",spread:"0px",color:"rgba(0, 0, 0, 0.1)",angle:90}}}},childrens:[{tag:"Col",label:"Block",childrens:[{tag:"Product",label:"Product",settings:{productSetting:{productStatus:"dynamic"},layout:{desktop:{cols:[4,8],display:"fill"},mobile:{cols:[12]}},horizontalAlign:{desktop:"start"},verticalAlign:{desktop:"center"},isSyncProduct:!0},styles:{verticalGutter:{desktop:"8px",tablet:"8px"},verticalGutterMobile:{desktop:"0px"},fullWidth:{desktop:!1}},advanced:{"spacing-setting":{desktop:{margin:{},padding:{left:"4px",right:"4px",top:"4px",bottom:"4px"}}}},childrens:[{tag:"Col",label:"Block",childrens:[{tag:"Row",label:"Row",settings:{layout:{desktop:{cols:[6,6],display:"fit"},mobile:{cols:[12],display:"fill"}},horizontalAlign:{desktop:"start"},verticalAlign:{desktop:"center"}},styles:{fullWidth:{desktop:!0,tablet:!0,mobile:!0},verticalGutter:{desktop:"8px",tablet:"8px"},background:{desktop:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}},preloadBgImage:!1},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}},d:{desktop:!0,tablet:!0,mobile:!1},border:{desktop:{normal:{borderType:"none",border:"solid",borderWidth:"0px",width:"0px",color:"#121212",isCustom:!0}}},rounded:{desktop:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},hasBoxShadow:{desktop:{normal:!1}},boxShadow:{desktop:{normal:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90}}},op:{desktop:"100%"}},childrens:[{tag:"Col",label:"Block",childrens:[{tag:"ProductImagesV2",label:"Product Images",settings:{hoverEffect:"none"},styles:{position:{desktop:"only-feature",mobile:"only-feature"},ftShape:{desktop:{shape:"square",shapeValue:"1/1",width:"32px",height:void 0}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}}}}]},{tag:"Col",label:"Block",childrens:[{tag:"ProductTitle",label:"Product Title",settings:{htmlTag:"h1",linkProduct:!1},styles:{typo:{type:"subheading-3",custom:{fontSize:{desktop:"18px",tablet:"18px",mobile:"18px"},fontWeight:"400",lineHeight:"24px",letterSpacing:"0.6px",fontStyle:"normal"}},textAlign:{desktop:"left"},hasLineClamp:{desktop:!0},lineClamp:{desktop:1},color:{normal:"text-2"},hasTextShadow:{normal:!1,hover:!1},textShadow:{normal:{type:"shadow-1"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}}}},{tag:"ProductPrice",label:"Product Price",settings:{priceType:"regular"},styles:{typo:{type:"subheading-2",default:{type:"subheading-2"},custom:{fontSize:{desktop:"14px"},fontWeight:"400",lineHeight:"20px",letterSpacing:"0.6px",fontStyle:"normal"}},lineThrough:!0,thickness:1,lineColor:"text-1",color:{normal:"text-2"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},textAlign:{desktop:"left"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}}}}]}]}]},{tag:"Col",label:"Block",childrens:[{tag:"Row",label:"Row",settings:{layout:{desktop:{cols:[6,3,3],display:"fill"},mobile:{cols:[12],display:"fill"}},horizontalAlign:{desktop:"start"},verticalAlign:{desktop:"center"}},styles:{fullWidth:{desktop:!0,tablet:!0,mobile:!0},verticalGutter:{desktop:"8px"},background:{desktop:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}},preloadBgImage:!1},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}}},childrens:[{tag:"Col",label:"Block",childrens:[{tag:"ProductVariants",label:"Product Variants & Swatches",settings:{optionType:"groupOption",label:!0,optionAlign:{desktop:"left"},price:!0,showAsSwatches:!0,combineFullWidth:{desktop:!0},combineWidth:{desktop:"400px"},combineHeight:"40px",variantPresets:[{optionName:"base",optionType:"rectangle_list",presets:{color:{width:{desktop:"45px",tablet:"45px",mobile:"45px"},height:"45px",spacing:"16px"},rectangle_list:{width:{desktop:"auto",tablet:"auto",mobile:"auto"},height:"45px",spacing:"16px"},image:{width:{desktop:"64px",tablet:"64px",mobile:"64px"},height:"64px",spacing:"16px"},image_shopify:{width:{desktop:"64px",tablet:"64px",mobile:"64px"},height:"64px",spacing:"16px"},dropdown:{fullWidth:{desktop:!0,tablet:!0,mobile:!0},width:{desktop:"auto",tablet:"auto",mobile:"auto"},height:"45px"}}}],soldOutMark:!0,layout:{desktop:"vertical"},column:{desktop:1},hasPreSelected:!0,blankText:"Please select an option"},styles:{fullWidth:{desktop:!0},width:{desktop:"400px"},optionSpacing:"30px",labelGap:"8px",swatchAutoWidth:{desktop:!0},swatchWidth:{desktop:"80px"},swatchHeight:{desktop:"40px"},swatchSpacing:"var(--g-s-m)",marginBottom:{desktop:"var(--g-s-xl)",mobile:"var(--g-s-xl)"},align:{desktop:"left"},labelTypo:{type:"paragraph-2",attrs:{color:"text-1",bold:!0}},labelColor:"text-2",optionTypo:{type:"paragraph-2"},optionBgColor:{normal:"bg-3",hover:"bg-3",active:"bg-3"},optionTextColor:{normal:"text-2",hover:"text-2",active:"text-2"},optionBorder:{normal:{borderType:"style-2",border:"solid",color:"line-2",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"},active:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"2px 2px 2px 2px",borderWidth:"2px"},hover:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"}},optionRounded:{normal:{btrr:"4px",bblr:"4px",bbrr:"4px",btlr:"4px",radiusType:"custom"},hover:{radiusType:"none"},active:{radiusType:"none"}},optionHasShadow:{normal:!1},optionShadow:{normal:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90}},dropdownItemWidth:{desktop:"fill",mobile:"fill",tablet:"fill"},fixedDropdownWidth:{desktop:"240px"},swatchItemWidth:{desktop:"auto"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}},d:{desktop:!0,tablet:!0,mobile:!1}}}]},{tag:"Col",label:"Block",childrens:[{tag:"ProductQuantity",label:"Product Quantity",settings:{
|
|
31
|
+
`},components:[{tag:"Sticky",label:"Sticky",advanced:{hasBoxShadow:{desktop:{normal:!0}},boxShadow:{desktop:{normal:{type:"shadow-1",distance:"0px",blur:"10px",spread:"0px",color:"rgba(0, 0, 0, 0.1)",angle:90}}}},childrens:[{tag:"Col",label:"Block",childrens:[{tag:"Product",label:"Product",settings:{productSetting:{productStatus:"dynamic"},layout:{desktop:{cols:[4,8],display:"fill"},mobile:{cols:[12]}},horizontalAlign:{desktop:"start"},verticalAlign:{desktop:"center"},isSyncProduct:!0},styles:{verticalGutter:{desktop:"8px",tablet:"8px"},verticalGutterMobile:{desktop:"0px"},fullWidth:{desktop:!1}},advanced:{"spacing-setting":{desktop:{margin:{},padding:{left:"4px",right:"4px",top:"4px",bottom:"4px"}}}},childrens:[{tag:"Col",label:"Block",childrens:[{tag:"Row",label:"Row",settings:{layout:{desktop:{cols:[6,6],display:"fit"},mobile:{cols:[12],display:"fill"}},horizontalAlign:{desktop:"start"},verticalAlign:{desktop:"center"}},styles:{fullWidth:{desktop:!0,tablet:!0,mobile:!0},verticalGutter:{desktop:"8px",tablet:"8px"},background:{desktop:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}},preloadBgImage:!1},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}},d:{desktop:!0,tablet:!0,mobile:!1},border:{desktop:{normal:{borderType:"none",border:"solid",borderWidth:"0px",width:"0px",color:"#121212",isCustom:!0}}},rounded:{desktop:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},hasBoxShadow:{desktop:{normal:!1}},boxShadow:{desktop:{normal:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90}}},op:{desktop:"100%"}},childrens:[{tag:"Col",label:"Block",childrens:[{tag:"ProductImagesV2",label:"Product Images",settings:{hoverEffect:"none"},styles:{position:{desktop:"only-feature",mobile:"only-feature"},ftShape:{desktop:{shape:"square",shapeValue:"1/1",width:"32px",height:void 0}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}}}}]},{tag:"Col",label:"Block",childrens:[{tag:"ProductTitle",label:"Product Title",settings:{htmlTag:"h1",linkProduct:!1},styles:{typo:{type:"subheading-3",custom:{fontSize:{desktop:"18px",tablet:"18px",mobile:"18px"},fontWeight:"400",lineHeight:"24px",letterSpacing:"0.6px",fontStyle:"normal"}},textAlign:{desktop:"left"},hasLineClamp:{desktop:!0},lineClamp:{desktop:1},color:{normal:"text-2"},hasTextShadow:{normal:!1,hover:!1},textShadow:{normal:{type:"shadow-1"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}}}},{tag:"ProductPrice",label:"Product Price",settings:{priceType:"regular"},styles:{typo:{type:"subheading-2",default:{type:"subheading-2"},custom:{fontSize:{desktop:"14px"},fontWeight:"400",lineHeight:"20px",letterSpacing:"0.6px",fontStyle:"normal"}},lineThrough:!0,thickness:1,lineColor:"text-1",color:{normal:"text-2"},hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},textAlign:{desktop:"left"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}}}}]}]}]},{tag:"Col",label:"Block",childrens:[{tag:"Row",label:"Row",settings:{layout:{desktop:{cols:[6,3,3],display:"fill"},mobile:{cols:[12],display:"fill"}},horizontalAlign:{desktop:"start"},verticalAlign:{desktop:"center"}},styles:{fullWidth:{desktop:!0,tablet:!0,mobile:!0},verticalGutter:{desktop:"8px"},background:{desktop:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}},preloadBgImage:!1},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}}},childrens:[{tag:"Col",label:"Block",childrens:[{tag:"ProductVariants",label:"Product Variants & Swatches",settings:{optionType:"groupOption",label:!0,optionAlign:{desktop:"left"},price:!0,showAsSwatches:!0,combineFullWidth:{desktop:!0},combineWidth:{desktop:"400px"},combineHeight:"40px",variantPresets:[{optionName:"base",optionType:"rectangle_list",presets:{color:{width:{desktop:"45px",tablet:"45px",mobile:"45px"},height:"45px",spacing:"16px"},rectangle_list:{width:{desktop:"auto",tablet:"auto",mobile:"auto"},height:"45px",spacing:"16px"},image:{width:{desktop:"64px",tablet:"64px",mobile:"64px"},height:"64px",spacing:"16px"},image_shopify:{width:{desktop:"64px",tablet:"64px",mobile:"64px"},height:"64px",spacing:"16px"},dropdown:{fullWidth:{desktop:!0,tablet:!0,mobile:!0},width:{desktop:"auto",tablet:"auto",mobile:"auto"},height:"45px"}}}],soldOutMark:!0,layout:{desktop:"vertical"},column:{desktop:1},hasPreSelected:!0,blankText:"Please select an option"},styles:{fullWidth:{desktop:!0},width:{desktop:"400px"},optionSpacing:"30px",labelGap:"8px",swatchAutoWidth:{desktop:!0},swatchWidth:{desktop:"80px"},swatchHeight:{desktop:"40px"},swatchSpacing:"var(--g-s-m)",marginBottom:{desktop:"var(--g-s-xl)",mobile:"var(--g-s-xl)"},align:{desktop:"left"},labelTypo:{type:"paragraph-2",attrs:{color:"text-1",bold:!0}},labelColor:"text-2",optionTypo:{type:"paragraph-2"},optionBgColor:{normal:"bg-3",hover:"bg-3",active:"bg-3"},optionTextColor:{normal:"text-2",hover:"text-2",active:"text-2"},optionBorder:{normal:{borderType:"style-2",border:"solid",color:"line-2",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"},active:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"2px 2px 2px 2px",borderWidth:"2px"},hover:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"}},optionRounded:{normal:{btrr:"4px",bblr:"4px",bbrr:"4px",btlr:"4px",radiusType:"custom"},hover:{radiusType:"none"},active:{radiusType:"none"}},optionHasShadow:{normal:!1},optionShadow:{normal:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90}},dropdownItemWidth:{desktop:"fill",mobile:"fill",tablet:"fill"},fixedDropdownWidth:{desktop:"240px"},swatchItemWidth:{desktop:"auto"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}},d:{desktop:!0,tablet:!0,mobile:!1}}}]},{tag:"Col",label:"Block",childrens:[{tag:"ProductQuantity",label:"Product Quantity",settings:{hasButton:!0,enableHoverButton:!0},styles:{inputHeight:{desktop:"40px"},buttonWidth:{desktop:"40px"},iconSizeCustom:{desktop:"20px"},typo:{type:"paragraph-2",attrs:{color:"text-1"}},align:{desktop:"left"},inputBackgroundColor:"bg-3",textColor:"text-2",buttonBackgroundColor:{normal:"bg-3"},iconColor:{normal:"text-2"},borderBtn:{normal:{},hover:{borderType:"style-3",border:"solid",width:"1px 1px 1px 1px",color:"line-3",isCustom:!1}},corner:{desktop:{normal:{btrr:"4px",bblr:"4px",bbrr:"4px",btlr:"4px",radiusType:"rounded"}}}},advanced:{rounded:{desktop:{normal:{btrr:"4px",bblr:"4px",bbrr:"4px",btlr:"4px",radiusType:"none"}}},"spacing-setting":{desktop:{margin:{bottom:"0px"}}},d:{desktop:!0,tablet:!0,mobile:!1}}}]},{tag:"Col",label:"Block",childrens:[{tag:"ProductButton",label:"Product Cart Button",settings:{label:"Add to cart",outOfStockLabel:"Out of stock",actionEffect:"open-cart-drawer",customURL:{link:"/cart",target:"_self"},successMessage:"Add product to cart successfully",errorMessage:"Cannot add product to cart",buttonLayout:"cart-only",iconAlign:"left",errorType:"built-in"},styles:{backgroundColor:{normal:"brand",hover:"highlight"},backgroundColorV2:{normal:"brand",hover:"highlight"},textColor:{normal:"text-3"},borderBtn:{normal:{border:"solid",color:"#121212",isCustom:!0,position:"all",borderWidth:"0px",width:"0px 0px 0px 0px"},hover:{border:"solid",color:"#4D4D4D",isCustom:!0,position:"all",borderWidth:"0px",width:"0px 0px 0px 0px"}},hasBoxShadowBtn:{normal:!1,hover:!1},boxShadowBtn:{normal:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90}},roundedBtnV2:{normal:{btrr:"4px",bblr:"4px",bbrr:"4px",btlr:"4px",radiusType:"rounded"}},align:{desktop:"left"},typo:{type:"paragraph-1"},transform:"default",btnSpacing:{type:"medium"},fullWidth:{desktop:!0},iconSizeAuto:!0,size:{desktop:"1em"},iconDimension:{desktop:"24px"},spacing:"8px",successTypo:{type:"paragraph-2"},successColor:"success",errorTypo:{type:"paragraph-2"},errorColor:"error",isCustomOutOfStock:!1,oosBackground:"brand",oosTextColor:"text-3",oosBorder:{normal:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,borderWidth:"0px",width:"0px 0px 0px 0px"}},oosEnableShadow:!1,oosShadow:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90},oosRounded:{radiusType:"none"},globalSize:{desktop:{width:"100%"}},enableIcon:!1,enablePrice:!1,enableSeparator:!1},advanced:{"spacing-setting":{desktop:{margin:{bottom:"0px"}}}}}]}]}]}]}]}]}]};export{StickyPreset,StickyPresetProduct,StickyPresetScrollToTop};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let SettingUIV2=[{controls:[{setting:{id:"install"}
|
|
1
|
+
let SettingUIV2=[{controls:[{layout:"vertical",setting:{id:"install"}}]},{controls:[{label:{en:"Fera Version"},setting:{id:"feraVersion"}}]},{conditionDisplay:"feraVersion == 'V2'",controls:[{label:{en:"Choose widget"},setting:{id:"widgetType"}}]},{conditionDisplay:"feraVersion == 'V3'",controls:[{label:{en:"Choose widget"},setting:{id:"widgetTypeV3"}}]},{conditionDisplay:"widgetType == 'allReviews' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"allReviewsCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"allReviewsCode"}}]}]},{conditionDisplay:"widgetType == 'productReviews' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"productReviewsCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"productReviewsCode"}}]}]},{conditionDisplay:"widgetType == 'testimonialCarousel' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"testimonialCarouselCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"testimonialCarouselCode"}}]}]},{conditionDisplay:"widgetType == 'averageStoreRatingBadge' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"averageStoreRatingBadgeCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"averageStoreRatingBadgeCode"}}]}]},{conditionDisplay:"widgetType == 'inStoreMedia' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"inStoreMediaCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"inStoreMediaCode"}}]}]},{conditionDisplay:"widgetType == 'averageRatingBadge' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"averageRatingBadgeCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"averageRatingBadgeCode"}}]}]},{conditionDisplay:"widgetType == 'productPageMedia' && feraVersion == 'V2'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"productPageMediaCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"productPageMediaCode"}}]}]},{conditionDisplay:"widgetTypeV3 == 'otherWidget' && feraVersion == 'V3'",controls:[{type:"combo",label:{en:"Container ID"},iconName:"polaris-text-block",getValueFromSettingID:"otherWidgetCode",isHideClear:!0,popoverLabel:{en:"Container ID"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"otherWidgetCode"}}]}]},{controls:[{setting:{id:"openApp"},layout:"vertical"}]},{controls:[{label:{en:"Align"},setting:{id:"align"}}]}];export{SettingUIV2 as default};
|
|
@@ -3,4 +3,4 @@ import e from"../../configs/LaiProductReviews.js";import a from"./uiV1.js";impor
|
|
|
3
3
|
<img class="w-24 border border-dark-200 rounded-medium" src="${e.logoUrl}?width=22&height=22">
|
|
4
4
|
<span class="preset-item-title">${e.label}</span>
|
|
5
5
|
</div>
|
|
6
|
-
`},components:[{tag:e.tag}]}],settings:[{id:"setting",controls:[{id:"install",type:"open-link",target:"_blank",linkType:"install",href:"https://apps.shopify.com/lai-reviews?utm_source=gempages",appName:e.label},{id:"openApp",type:"open-link",target:"_blank",linkType:"openApp",href:"https://admin.shopify.com/?redirect=/apps/smart-aliexpress-reviews",appName:e.label},{id:"widgetType",label:"Choose widget",type:"select",default:"
|
|
6
|
+
`},components:[{tag:e.tag}]}],settings:[{id:"setting",controls:[{id:"install",type:"open-link",target:"_blank",linkType:"install",href:"https://apps.shopify.com/lai-reviews?utm_source=gempages",appName:e.label},{id:"openApp",type:"open-link",target:"_blank",linkType:"openApp",href:"https://admin.shopify.com/?redirect=/apps/smart-aliexpress-reviews",appName:e.label},{id:"widgetType",label:"Choose widget",type:"select",default:"advanced_widget",options:[{label:"Star Ratings",value:"star_ratings",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX"],flowTag:["Product","ProductList"],condition:"or"},{label:"Product Review Sections",value:"reviews_widget",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX"],flowTag:["Product","ProductList"],condition:"or"},{label:"Advanced Widget",value:"advanced_widget"},{label:"Hom Page Reviews",value:"homepage_reviews",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX","GP_COLLECTION","GP_PRODUCT"]},{label:"Happy Customer Reviews",value:"happy_customer_reviews",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX","GP_COLLECTION","GP_PRODUCT"]},{label:"Star Ratings in the List",value:"star_ratings_in_list",hideOnPage:["GP_ARTICLE","GP_BLOG","GP_STATIC","GP_INDEX","GP_COLLECTION","GP_PRODUCT"]}]},{id:"advancedWidgetType",label:"Choose widget",type:"select",default:"mediaGallery",options:[{label:"Media Gallery",value:"mediaGallery"},{label:"Testimonial Garousel",value:"testimonialCarousel"},{label:"Card Carousel",value:"cardCarousel"},{label:"Card Grid",value:"cardGrid"}]},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}],devices:{desktop:{default:"left"}}}]}],ui:a,uiV2:l};export{config as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let SettingUIV2=[{controls:[{setting:{id:"install"},layout:"vertical"}]},{controls:[{label:{en:"Choose widget"},setting:{id:"widgetType"}}]},{
|
|
1
|
+
let SettingUIV2=[{controls:[{setting:{id:"install"},layout:"vertical"}]},{controls:[{label:{en:"Choose widget"},setting:{id:"widgetType"}}]},{controls:[{label:{en:"Widget Type"},setting:{id:"advancedWidgetType"},conditionDisplay:'widgetType === "advanced_widget"'}]},{controls:[{setting:{id:"openApp"},layout:"vertical"}]},{controls:[{label:{en:"Align"},setting:{id:"align"}}]}];export{SettingUIV2 as default};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2091,6 +2091,7 @@ type LinkProps = BaseProps<LinkSettingProps> & {
|
|
|
2091
2091
|
style?: React.CSSProperties;
|
|
2092
2092
|
children?: React.ReactNode;
|
|
2093
2093
|
title?: string;
|
|
2094
|
+
dataId?: string;
|
|
2094
2095
|
};
|
|
2095
2096
|
type MixedNextProps = BaseProps<{
|
|
2096
2097
|
type?: 'auto' | 'product' | 'collection' | 'custom';
|
|
@@ -3972,7 +3973,6 @@ type ProductBundleItemDiscountProps = {
|
|
|
3972
3973
|
|
|
3973
3974
|
type ProductQuantityLayout = 'product-quantity-square' | 'product-quantity-square-divider' | 'product-quantity-rounded' | 'product-quantity-rounded-divider' | 'product-quantity-square-input-only' | 'product-quantity-rounded-input-only';
|
|
3974
3975
|
type ProductQuantitySettingProps = {
|
|
3975
|
-
qtyStyle?: string;
|
|
3976
3976
|
defaultQtyValue?: number;
|
|
3977
3977
|
updatePrice?: boolean;
|
|
3978
3978
|
plusIcon?: string;
|
|
@@ -3994,15 +3994,17 @@ type ProductQuantityStyleProps = {
|
|
|
3994
3994
|
textColor?: StateProp<ColorValueType>;
|
|
3995
3995
|
buttonBackgroundColor?: StateProp<ColorValueType>;
|
|
3996
3996
|
iconColor?: StateProp<ColorValueType>;
|
|
3997
|
-
borderBtn?:
|
|
3997
|
+
borderBtn?: StateProp<Border>;
|
|
3998
3998
|
iconSizeCustom?: ObjectDevices<string>;
|
|
3999
|
-
corner?:
|
|
4000
|
-
shapeShadow?: ObjectDevices<StateProp<ShadowProps>>;
|
|
4001
|
-
buttonBoxShadow?: StateProp<ShadowProps>;
|
|
3999
|
+
corner?: StateProp<CornerRadius>;
|
|
4002
4000
|
inputBoxShadow?: StateProp<ShadowProps>;
|
|
4003
4001
|
backgroundColor?: StateProp<ColorValueType>;
|
|
4004
4002
|
dividerColor?: StateProp<ColorValueType>;
|
|
4005
4003
|
dividerStroke?: StateProp<number>;
|
|
4004
|
+
inputBorder?: StateProp<Border>;
|
|
4005
|
+
shapeBorder?: ObjectDevices<Border>;
|
|
4006
|
+
shapeRounded?: ObjectDevices<CornerRadius>;
|
|
4007
|
+
shapeShadow?: ObjectDevices<ShadowProps>;
|
|
4006
4008
|
};
|
|
4007
4009
|
type ProductQuantityProps = BaseProps<ProductQuantitySettingProps, ProductQuantityStyleProps>;
|
|
4008
4010
|
|