@gem-sdk/components 2.0.0-staging.838 → 2.0.0-staging.840
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/settings/Accordion.js +3 -3
- package/dist/cjs/button/settings/configs/settings.js +1 -1
- package/dist/cjs/marquee/common/classes.js +1 -1
- package/dist/cjs/marquee/settings/configs/settings-v2.js +1 -1
- package/dist/cjs/product/components/product-description/ProductDescription.liquid.js +3 -3
- package/dist/cjs/product/components/product-description/common/styles.js +3 -3
- package/dist/cjs/product/components/product-description/hooks/useGpDescription.js +1 -1
- package/dist/cjs/product/settings/product-badge/configs/settings.js +1 -1
- package/dist/cjs/product/settings/product-badge/configs/ui-v2.js +1 -1
- package/dist/cjs/product/settings/product-image-v2/configs/setting-v2/ProductFeatureImage.js +1 -1
- package/dist/cjs/tab/common/styles.js +1 -1
- package/dist/cjs/tab/components/TabItem.js +1 -1
- package/dist/cjs/tab/components/TabItem.liquid.js +2 -2
- package/dist/cjs/tab/components/Tabs.liquid.js +1 -1
- package/dist/esm/accordion/common/styles.js +1 -1
- package/dist/esm/accordion/settings/Accordion.js +5 -5
- package/dist/esm/button/settings/configs/settings.js +1 -1
- package/dist/esm/marquee/common/classes.js +1 -1
- package/dist/esm/marquee/settings/configs/settings-v2.js +1 -1
- package/dist/esm/product/components/product-description/ProductDescription.liquid.js +9 -9
- package/dist/esm/product/components/product-description/common/styles.js +2 -2
- package/dist/esm/product/components/product-description/hooks/useGpDescription.js +1 -1
- package/dist/esm/product/settings/product-badge/configs/settings.js +1 -1
- package/dist/esm/product/settings/product-badge/configs/ui-v2.js +1 -1
- package/dist/esm/product/settings/product-image-v2/configs/setting-v2/ProductFeatureImage.js +1 -1
- package/dist/esm/tab/common/styles.js +1 -1
- package/dist/esm/tab/components/TabItem.js +1 -1
- package/dist/esm/tab/components/TabItem.liquid.js +3 -3
- package/dist/esm/tab/components/Tabs.liquid.js +5 -5
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");const filterStyles=e=>{let t=["--mb","--mb-mobile","--mb-tablet","--d","--d-mobile","--d-tablet"];return t.forEach(t=>{delete e?.[t]}),e},contentSizePaddingSize=e=>core.makeGlobalSize(e?.contentSizePadding),getContainerStyles=(e,t)=>({...filterStyles(e),...contentSizePaddingSize(t).gap,...core.getStyleBackgroundByDevice(e?.backgroundContent),"border-radius":"inherit"}),widthHeightSizeControl=e=>core.makeGlobalSize(e),widthStyle=(e,t,o)=>widthHeightSizeControl(o).width["--w"]?widthHeightSizeControl(o).width:core.makeStyleResponsive("w",core.makeWidth(e,t)),getItemContainerStyles=(e,t)=>{let{borderContent:o,backgroundContent:r,roundedContent:l,accordionShadow:i,width:a,fullWidth:
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");const filterStyles=e=>{let t=["--mb","--mb-mobile","--mb-tablet","--d","--d-mobile","--d-tablet"];return t.forEach(t=>{delete e?.[t]}),e},contentSizePaddingSize=e=>core.makeGlobalSize(e?.contentSizePadding),getContainerStyles=(e,t)=>({...filterStyles(e),...contentSizePaddingSize(t).gap,...core.getStyleBackgroundByDevice(e?.backgroundContent),"border-radius":"inherit"}),widthHeightSizeControl=e=>core.makeGlobalSize(e),widthStyle=(e,t,o)=>widthHeightSizeControl(o).width["--w"]?widthHeightSizeControl(o).width:core.makeStyleResponsive("w",core.makeWidth(e,t)),getItemContainerStyles=(e,t)=>{let{borderContent:o,backgroundContent:r,roundedContent:l,accordionShadow:i,width:a,fullWidth:n,widthHeightSize:c,iconColor:g,color:S}=e??{};return{"--icon-expand-hover-color":t?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":t?core.getSingleColorVariable(g?.active):core.getSingleColorVariable(g?.hover),...widthStyle(a,n,c),...core.makeStyle({bs:o?.border??o?.border,bw:o?.width??o?.width,bc:core.getSingleColorVariable(o?.color??o?.color)}),...core.makeStyleResponsive("bg",r),...core.getStyleShadow({value:i,styleAppliedFor:"box-shadow",isEnableShadow:i?.enable}),...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,t)=>{let{headerContentPadding:o,widthHeightSize:r,itemHeaderSpacing:l,bgColor:i,textColor:a,headerBorder:n}=e??{},{isShow:c,iconPosition:g}=t??{};return{...o&&headerContentPaddingSize(o).padding,...l?.type||o?{}:core.composeSize(l?.custom),...widthHeightSizeControl(r).height,...composePosition(g),...c?core.makeStyle({bgc:core.getSingleColorVariable(i?.active??i?.normal),bs:n?.active?.border,bw:n?.active?.width,bc:core.getSingleColorVariable(n?.active?.color),c:core.getSingleColorVariable(a?.active??a?.normal)}):{...core.getGlobalColorStateStyle("bgc",i),...core.getGlobalColorStateStyle("c",a),...core.handleConvertBorderStyle(n),...core.handleConvertBorderWidth(n),...core.handleConvertBorderColor(n),...core.getGlobalColorStateStyle("bgc",i)}}},getIconRotateStyles=(e,t,o)=>{let{color:r}=e??{};return{...t?core.makeStyle({c:core.getSingleColorVariable(r?.active??r?.normal)}):{...core.getGlobalColorStateStyle("c",r)},width:`${o??16}px`,height:`${o??16}px`}},composeIconGlobalSize=e=>core.makeGlobalSize(e),getGapStyles=(e,t)=>({...composeIconGlobalSize(e).gap,...core.makeStyleResponsive("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=>core.makeGlobalSize(e)?.padding;exports.getContainerStyles=getContainerStyles,exports.getDropdownStyles=getDropdownStyles,exports.getGapStyles=getGapStyles,exports.getIconGlobalSize=getIconGlobalSize,exports.getIconRotateStyles=getIconRotateStyles,exports.getIconStyles=getIconStyles,exports.getItemContainerStyles=getItemContainerStyles,exports.getRenderChildrenStyles=getRenderChildrenStyles,exports.getTemplateRow=getTemplateRow;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<path d="M96 55H0V57H96V55Z" fill="#424242" mask="url(#path-18-inside-6_1355_357)"/>
|
|
21
21
|
<path d="M98 55H2V57H98V55Z" fill="#424242" mask="url(#path-15-inside-5_1355_357)"/>
|
|
22
22
|
</svg>
|
|
23
|
-
`},components:[{tag:"Accordion",settings:{childItem:["Accordion 1","Accordion 2","Accordion 3"],layoutHeader:"text-only"},styles:{borderContent:{border:"solid",width:"0px 0px 1px 0px",position:"bottom",color:"line-3",isCustom:!0,borderWidth:"Mixed"},headerContentPadding:{desktop:{padding:{type:"medium",top:"8px",left:"0px",bottom:"8px",right:"0px"}}}},advanced:{margin:{bottom:"var(--g-s-l)"}},childrens:[childItems.itemChildrenTemplate,childItems.itemChildrenTemplate,childItems.itemChildrenTemplate]}]},{id:"accordion-3",name:{en:"Accordion"},icon:{desktop:`
|
|
23
|
+
`},components:[{tag:"Accordion",settings:{childItem:["Accordion 1","Accordion 2","Accordion 3"],layoutHeader:"text-only"},styles:{borderContent:{border:"solid",width:"0px 0px 1px 0px",position:"bottom",color:"line-3",isCustom:!0,borderWidth:"Mixed"},headerContentPadding:{desktop:{padding:{type:"medium",top:"8px",left:"0px",bottom:"8px",right:"0px"}}}},advanced:{of:"hidden",margin:{bottom:"var(--g-s-l)"}},childrens:[childItems.itemChildrenTemplate,childItems.itemChildrenTemplate,childItems.itemChildrenTemplate]}]},{id:"accordion-3",name:{en:"Accordion"},icon:{desktop:`
|
|
24
24
|
<svg width="96" height="56" viewBox="0 0 96 56" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
25
25
|
<path d="M8.75 3.75C8.75 3.33579 8.41421 3 8 3C7.58579 3 7.25 3.33579 7.25 3.75L7.25 6.25H4.75C4.33579 6.25 4 6.58579 4 7C4 7.41421 4.33579 7.75 4.75 7.75H7.25L7.25 10.25C7.25 10.6642 7.58579 11 8 11C8.41421 11 8.75 10.6642 8.75 10.25V7.75H11.25C11.6642 7.75 12 7.41421 12 7C12 6.58579 11.6642 6.25 11.25 6.25H8.75V3.75Z" fill="#AAAAAA"/>
|
|
26
26
|
<rect x="35" y="4" width="57" height="6" rx="3" fill="#757575"/>
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
<svg width="16" height="16" data-name="minus-regular" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
41
41
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 7.75C2 7.33579 2.33579 7 2.75 7L13.25 7C13.6642 7 14 7.33579 14 7.75C14 8.16421 13.6642 8.5 13.25 8.5H2.75C2.33579 8.5 2 8.16421 2 7.75Z" fill="currentColor"/>
|
|
42
42
|
</svg>
|
|
43
|
-
`,iconPosition:"left"},styles:{headerContentPadding:{desktop:{padding:{type:"medium",top:"8px",left:"0px",bottom:"8px",right:"0px"}}},borderContent:{border:"solid",width:"0px 0px 1px 0px",position:"bottom",color:"line-3",isCustom:!0,borderWidth:"Mixed"},widthHeightSize:{desktop:{width:"600px"}}},advanced:{margin:{bottom:"var(--g-s-l)"}},childrens:[childItems.itemChildrenTemplate,childItems.itemChildrenTemplate,childItems.itemChildrenTemplate]}]},{id:"accordion-2",name:{en:"Accordion"},icon:{desktop:`
|
|
43
|
+
`,iconPosition:"left"},styles:{headerContentPadding:{desktop:{padding:{type:"medium",top:"8px",left:"0px",bottom:"8px",right:"0px"}}},borderContent:{border:"solid",width:"0px 0px 1px 0px",position:"bottom",color:"line-3",isCustom:!0,borderWidth:"Mixed"},widthHeightSize:{desktop:{width:"600px"}}},advanced:{of:"hidden",margin:{bottom:"var(--g-s-l)"}},childrens:[childItems.itemChildrenTemplate,childItems.itemChildrenTemplate,childItems.itemChildrenTemplate]}]},{id:"accordion-2",name:{en:"Accordion"},icon:{desktop:`
|
|
44
44
|
<svg width="96" height="56" viewBox="0 0 96 56" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
45
45
|
<path d="M0 3C0 1.34315 1.34315 0 3 0H93C94.6569 0 96 1.34315 96 3V10C96 11.6569 94.6569 13 93 13H3C1.34315 13 0 11.6569 0 10V3Z" fill="#333333"/>
|
|
46
46
|
<g clip-path="url(#clip0_1355_8713)">
|
|
@@ -67,4 +67,4 @@
|
|
|
67
67
|
</clipPath>
|
|
68
68
|
</defs>
|
|
69
69
|
</svg>
|
|
70
|
-
`},components:[{tag:"Accordion",settings:{childItem:["Accordion 1","Accordion 2","Accordion 3"],layoutHeader:"before-text"},styles:{backgroundContent:{desktop:"#EAEAEA"},borderContent:{},headerContentPadding:{desktop:{padding:{type:"medium",top:"8px",left:"12px",bottom:"12px",right:"12px"}}},itemGap:"16px",contentSizePadding:{desktop:{padding:{type:"medium",top:"4px",left:"12px",bottom:"12px",right:"12px"}}}},advanced:{margin:{bottom:"var(--g-s-l)"}},childrens:[childItems.itemChildrenTemplate,childItems.itemChildrenTemplate,childItems.itemChildrenTemplate]}]}],editorConfigs:{placeholder:{notAppendTags:["MarqueeItem","Marquee"]}},rootOverride:{settings:{alignment:{desktop:"left"}},styles:{align:{desktop:"center"},widthHeightSize:{desktop:{width:"600px",height:"auto"}}},"spacing-setting":{desktop:{margin:{bottom:0}}}}};exports.default=config;
|
|
70
|
+
`},components:[{tag:"Accordion",settings:{childItem:["Accordion 1","Accordion 2","Accordion 3"],layoutHeader:"before-text"},styles:{backgroundContent:{desktop:"#EAEAEA"},borderContent:{},headerContentPadding:{desktop:{padding:{type:"medium",top:"8px",left:"12px",bottom:"12px",right:"12px"}}},itemGap:"16px",contentSizePadding:{desktop:{padding:{type:"medium",top:"4px",left:"12px",bottom:"12px",right:"12px"}}}},advanced:{of:"hidden",margin:{bottom:"var(--g-s-l)"}},childrens:[childItems.itemChildrenTemplate,childItems.itemChildrenTemplate,childItems.itemChildrenTemplate]}]}],editorConfigs:{placeholder:{notAppendTags:["MarqueeItem","Marquee"]}},rootOverride:{settings:{alignment:{desktop:"left"}},styles:{align:{desktop:"center"},widthHeightSize:{desktop:{width:"600px",height:"auto"}}},"spacing-setting":{desktop:{margin:{bottom:0}}}}};exports.default=config;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";const ButtonSettings=[{id:"setting",controls:[{id:"label",label:"Text",type:"input",default:"<p>Button</p>"},{id:"translate",type:"input",default:"label"},{id:"enableBtnLink",type:"toggle",default:!1},{id:"btnLink",type:"pick-link",pickLinkLabel:"Button link",label:"Pick Link",default:{type:"open-page",link:"",target:"_self"},hiddenOptions:{"stay-on-page":!0}},{id:"iconGroup",type:"group",label:"Icon",controls:[{id:"iconVisible",label:"Icon Visible",type:"toggle",default:!1},{id:"iconSvg",label:"SVG Icon",type:"icon",default:`
|
|
2
2
|
<svg height="20" width="20" data-name="star-filled" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817759863701864">
|
|
3
3
|
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M234.29,114.85l-45,38.83L203,211.75a16.4,16.4,0,0,1-24.5,17.82L128,198.49,77.47,229.57A16.4,16.4,0,0,1,53,211.75l13.76-58.07-45-38.83A16.46,16.46,0,0,1,31.08,86l59-4.76,22.76-55.08a16.36,16.36,0,0,1,30.27,0l22.75,55.08,59,4.76a16.46,16.46,0,0,1,9.37,28.86Z"></path></svg>
|
|
4
|
-
`},{id:"iconAlign",label:"Icon Alignment",type:"option:value",options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],default:"left"}]},{id:"htmlType",label:"HTML Type",type:"select",default:"button",options:[{label:"Open link, popup & scroll to",value:"button"},{label:"Clear form",value:"reset"},{label:"Submit form",value:"submit"}]},{id:"disabled",label:"Disabled",type:"toggle",default:!1},{id:"shouldClearSpace",label:"",type:"toggle",default:!1}]},{id:"style",controls:[{id:"borderBtnV2",type:"border-v2",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!0}},compoDefaultValue:{normal:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}},{id:"borderBtn",type:"border",label:"Border",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1}},state:{hover:!0,normal:!0}},{id:"roundedBtnV2",type:"corner-v2",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}},compoDefaultValue:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}},{id:"roundedBtn",type:"radius-preset",label:"Border Radius",default:{normal:{radiusType:"small"}},state:{hover:!0,normal:!0}},{id:"hasBoxShadowBtn",type:"toggle",label:"Enable Button Shadow",default:{normal:!1,hover:!1},state:{normal:!0,hover:!0}},{id:"boxShadowBtn",type:"shadow-v2",compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}},{id:"backgroundColorV2",type:"color-picker-v2",default:{normal:"brand",hover:"highlight"},compoDefaultValue:{normal:"brand",hover:"highlight"},enableGradient:!0},{id:"backgroundColor",type:"background-color-picker",label:"Background Color",default:{normal:"brand",hover:"highlight"},state:{hover:!0,normal:!0}},{id:"backgroundImage",type:"background-image",compoDefaultValue:{normal:{size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480,hiddenSEO:!0}},hover:{size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480,hiddenSEO:!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:"enableTextStyle",label:"",type:"toggle",default:!0},{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-3"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"textColorHover",type:"color-picker-v2",default:{hover:"text-3"},compoDefaultValue:{hover:"text-3"},enableGradient:!
|
|
4
|
+
`},{id:"iconAlign",label:"Icon Alignment",type:"option:value",options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],default:"left"}]},{id:"htmlType",label:"HTML Type",type:"select",default:"button",options:[{label:"Open link, popup & scroll to",value:"button"},{label:"Clear form",value:"reset"},{label:"Submit form",value:"submit"}]},{id:"disabled",label:"Disabled",type:"toggle",default:!1},{id:"shouldClearSpace",label:"",type:"toggle",default:!1}]},{id:"style",controls:[{id:"borderBtnV2",type:"border-v2",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!0}},compoDefaultValue:{normal:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}},{id:"borderBtn",type:"border",label:"Border",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1}},state:{hover:!0,normal:!0}},{id:"roundedBtnV2",type:"corner-v2",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}},compoDefaultValue:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}},{id:"roundedBtn",type:"radius-preset",label:"Border Radius",default:{normal:{radiusType:"small"}},state:{hover:!0,normal:!0}},{id:"hasBoxShadowBtn",type:"toggle",label:"Enable Button Shadow",default:{normal:!1,hover:!1},state:{normal:!0,hover:!0}},{id:"boxShadowBtn",type:"shadow-v2",compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}},{id:"backgroundColorV2",type:"color-picker-v2",default:{normal:"brand",hover:"highlight"},compoDefaultValue:{normal:"brand",hover:"highlight"},enableGradient:!0},{id:"backgroundColor",type:"background-color-picker",label:"Background Color",default:{normal:"brand",hover:"highlight"},state:{hover:!0,normal:!0}},{id:"backgroundImage",type:"background-image",compoDefaultValue:{normal:{size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480,hiddenSEO:!0}},hover:{size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480,hiddenSEO:!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:"enableTextStyle",label:"",type:"toggle",default:!0},{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-3"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"textColorHover",type:"color-picker-v2",default:{hover:"text-3"},compoDefaultValue:{hover:"text-3"},enableGradient:!1},{id:"transform",label:"Text Transform",type:"select",options:[{value:"default",label:"None"},{value:"capitalize",label:"Capitalize"},{value:"uppercase",label:"Uppercase"},{value:"lowercase",label:"Lowercase"}],default:"default"},{id:"dimensions1",type:"group",label:"Icon Dimension",controls:[{id:"iconSizeAuto",type:"toggle",label:"Icon Auto Size",default:!0},{id:"size",label:"Size Icon",type:"select",options:[{label:"Large",value:"1.2em"},{label:"Medium",value:"1em"},{label:"Small",value:"0.8em"}],devices:{desktop:{default:"1em"}}},{id:"iconDimension",type:"input:slider",label:"Size",hide:!0,min:0,max:100,step:1,units:["px","em","rem"],devices:{desktop:{default:"24px"}}}]},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"Auto",height:"Auto",padding:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}},settingConfig:{width:{displayOptions:["full","auto"],sizeConfig:{small:"100px",medium:"116px",large:"132px"}},height:{displayOptions:["auto"],sizeConfig:{small:"28px",medium:"36px",large:"44px"}}},hiddenSettings:["shape","gap"]},{id:"iconSpacing",type:"input:slider",units:["px"],step:1,max:40,ignoreMax:!0,devices:{desktop:{default:"8px"}}},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"gp-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"gp-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"gp-text-align-right"},{label:"Justify",value:"justify",type:"text",tooltip:"Align justify",iconName:"gp-text-align-justify"}],devices:{desktop:{default:"left"}}}]}];exports.ButtonSettings=ButtonSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");const getAlignClasses=core.composeClasses("gp-flex gp-w-full gp-relative"),getContentClasses=core.composeClasses("!gp-relative"),getWrapperClasses=e=>core.composeClasses(core.cls("gem-marquee gp-overflow-hidden gp-flex gp-items-center gp-w-full gp-h-full",e)),getFastMarqueeClasses=core.composeClasses("gp-overflow-hidden gp-w-full gp-h-full"),getFastMarqueeContentClasses=core.composeClasses("gp-flex gp-items-center gp-marque-child-item gem-child-marquee-item gp-w-full"),getFastMarqueeContentChildrenClasses=e=>core.composeClasses(core.cls("gp-inline-flex gp-items-center gp-relative gp-transition-all",e?"gp-w-full":"")),getFastMarqueeChildrenIconClasses=core.composeClasses("gp-flex gp-items-center gp-justify-center [&>svg]:gp-h-full [&>svg]:gp-w-full"),getItemWrapperClasses=(e,s)=>core.composeClasses(core.cls("gp-relative gp-overflow-hidden gem-marquee-item",s,e,`gem-marquee-item-${e}`)),getPlaceHolderWrapperClasses=core.composeClasses("first-block gp-w-[0.01px]");exports.getAlignClasses=getAlignClasses,exports.getContentClasses=getContentClasses,exports.getFastMarqueeChildrenIconClasses=getFastMarqueeChildrenIconClasses,exports.getFastMarqueeClasses=getFastMarqueeClasses,exports.getFastMarqueeContentChildrenClasses=getFastMarqueeContentChildrenClasses,exports.getFastMarqueeContentClasses=getFastMarqueeContentClasses,exports.getItemWrapperClasses=getItemWrapperClasses,exports.getPlaceHolderWrapperClasses=getPlaceHolderWrapperClasses,exports.getWrapperClasses=getWrapperClasses;
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");const getAlignClasses=core.composeClasses("gp-flex gp-w-full gp-relative"),getContentClasses=core.composeClasses("!gp-relative"),getWrapperClasses=e=>core.composeClasses(core.cls("gem-marquee gp-overflow-hidden gp-flex gp-items-center gp-w-full gp-h-full",e)),getFastMarqueeClasses=core.composeClasses("gp-overflow-hidden gp-w-full gp-h-full"),getFastMarqueeContentClasses=core.composeClasses("gp-flex gp-items-center gp-marque-child-item gem-child-marquee-item gp-w-full"),getFastMarqueeContentChildrenClasses=e=>core.composeClasses(core.cls("gp-inline-flex gp-items-center gp-relative gp-transition-all",e?"gp-w-full":"")),getFastMarqueeChildrenIconClasses=core.composeClasses("gp-flex gp-items-center gp-justify-center [&>svg]:gp-h-full [&>svg]:gp-w-full"),getItemWrapperClasses=(e,s)=>core.composeClasses(core.cls("gp-relative gp-overflow-hidden gem-marquee-item gp-flex-none",s,e,`gem-marquee-item-${e}`)),getPlaceHolderWrapperClasses=core.composeClasses("first-block gp-w-[0.01px]");exports.getAlignClasses=getAlignClasses,exports.getContentClasses=getContentClasses,exports.getFastMarqueeChildrenIconClasses=getFastMarqueeChildrenIconClasses,exports.getFastMarqueeClasses=getFastMarqueeClasses,exports.getFastMarqueeContentChildrenClasses=getFastMarqueeContentChildrenClasses,exports.getFastMarqueeContentClasses=getFastMarqueeContentClasses,exports.getItemWrapperClasses=getItemWrapperClasses,exports.getPlaceHolderWrapperClasses=getPlaceHolderWrapperClasses,exports.getWrapperClasses=getWrapperClasses;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use strict";var childTemplate=require("./child-template.js");const MarqueeSettingsV2=[{id:"setting",controls:[{id:"itemWidthType",type:"select",options:[{label:"Fit to content",value:"FIT_CONTENT",subTitle:"Match the width of the element inside",disableHoverIcon:!0},{label:"Based on the item count",value:"BASE_ON_NUMBER_OF_ITEMS",subTitle:"Max item width is screen width divided by the number of items",disableHoverIcon:!0},{label:"Custom",value:"CUSTOM",subTitle:"Set the max width as you want",disableHoverIcon:!0}],devices:{desktop:{default:"FIT_CONTENT"},tablet:{default:"FIT_CONTENT"},mobile:{default:"FIT_CONTENT"}}},{id:"activeItem",type:"input",default:"0"},{id:"hoverItem",type:"input",default:"0"},{id:"childItem",label:"Item management",type:"child-item",childTemplate:childTemplate.ChildTemplate,default:["Item 1","Item 2","Item 3","Item 4"]},{id:"isShowIconSeparator",label:"isShowIconSeparator",type:"toggle",default:!1},{id:"iconSeparatorSvg",label:"iconSeparatorSvg",type:"icon",default:`<svg height="20px" width="20px" data-name="dot-outline-filled" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817731477569896">
|
|
2
|
-
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M156,128a28,28,0,1,1-28-28A28,28,0,0,1,156,128Z"></path></svg>`},{id:"stopOnHover",label:"stopOnHover",type:"toggle",default:!0},{id:"speed",label:"speed",type:"input:slider",hideInput:!0,useOnlyUnitInit:!0,hideUnit:!0,min:0,max:4,step:.1,default
|
|
2
|
+
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M156,128a28,28,0,1,1-28-28A28,28,0,0,1,156,128Z"></path></svg>`},{id:"stopOnHover",label:"stopOnHover",type:"toggle",default:!0},{id:"speed",label:"speed",type:"input:slider",hideInput:!0,useOnlyUnitInit:!0,hideUnit:!0,min:0,max:4,step:.1,default:1},{id:"direction",label:"direction",type:"segment",options:[{label:"Left",value:"left",type:"direction",tooltip:"Left"},{label:"Right",value:"right",type:"direction",tooltip:"Right"}],default:"left"},{id:"isPreview",type:"play-pause",hideLabel:!0,default:!1},{id:"hasItemShadow",label:"hasItemShadow",type:"toggle",default:!1}]},{id:"style",controls:[{id:"iconSeparatorSize",label:"iconSeparatorSize",type:"input:stepper",devices:{desktop:{default:16}}},{id:"iconSeparatorColor",label:"iconSeparatorColor",type:"color-picker-v2",default:"text-2"},{id:"itemSpacing",label:"Spacing",type:"input:slider",units:["px"],min:0,max:80,step:1,ignoreMax:!0,devices:{desktop:{default:"60px"}}},{id:"itemMaxWidth",label:"itemMaxWidth",type:"input:unit",units:["px"],placeholder:"Auto",min:40,devices:{desktop:{default:"300px"},tablet:{default:"300px"},mobile:{default:"150px"}}},{id:"sizeSetting",type:"size-setting",label:"",devices:{desktop:{default:{shapeLinked:!1,width:"100%",height:"Auto"}}},settingConfig:{width:{name:"Width"},height:{displayOptions:["auto","small","medium","large"],name:"Height",sizeConfig:{small:"32px",medium:"64px",large:"96px"}}},hiddenSettings:["gap","shape","padding"]},{id:"itemBorderStyle",type:"border",label:"Border",default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"#000000"},compoDefaultValue:{borderType:"style-1",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"line-3"}},{id:"itemCorner",type:"radius-preset",label:"Border Radius",default:{radiusType:"none"},compoDefaultValue:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}},{id:"itemBackgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"bg-2"}}},{id:"backgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"#DDDDDD"}}},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left"},{label:"Center",value:"center",type:"align",tooltip:"Align center"},{label:"Right",value:"right",type:"align",tooltip:"Align right"}],devices:{desktop:{default:"center"}}},{id:"itemShadow",type:"shadow-v2",label:"Button Shadow",default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!1},compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}]}];exports.MarqueeSettingsV2=MarqueeSettingsV2;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),helpers=require("../../../helpers.js"),system=require("@gem-sdk/system"),classes=require("./common/classes.js"),styles=require("./common/styles.js"),helpers$1=require("./common/helpers.js");const ProductDescription=e=>{let{setting:s,advanced:t,builderProps:r,pageContext:a}=e,{htmlTag:l,translate:i,viewMoreText:c,viewLessText:o}=s??{},p="html"===l?"div":"p",n=system.createClass({"gp-product-description":!0,[t?.cssClass]:!0}),d=system.createClass(classes.getClasses({setting:s})),m=system.createClass(classes.getButtonClasses({setting:s})),u=system.createClass({"gp-show-more-text":!0}),y=system.createClass({"gp-show-more-icon gp-ml-1":!0}),g=system.createStyle({...styles.getTextStyle({setting:s
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),helpers=require("../../../helpers.js"),system=require("@gem-sdk/system"),classes=require("./common/classes.js"),styles=require("./common/styles.js"),helpers$1=require("./common/helpers.js");const ProductDescription=e=>{let{setting:s,advanced:t,builderProps:r,pageContext:a}=e,{htmlTag:l,translate:i,viewMoreText:c,viewLessText:o}=s??{},p="html"===l?"div":"p",n=system.createClass({"gp-product-description":!0,[t?.cssClass]:!0}),d=system.createClass(classes.getClasses({setting:s})),m=system.createClass(classes.getButtonClasses({setting:s})),u=system.createClass({"gp-show-more-text":!0}),y=system.createClass({"gp-show-more-icon gp-ml-1":!0}),g=system.createStyle({...styles.getTextStyle({setting:s}),...core.makeStyleResponsive("line-clamp",core.makeLineClamp(s?.lineClamp,s?.hasLineClamp))}),$=system.createClass(classes.getClassPreBuilt()),v=system.createStyle(styles.getButtonStyle({setting:s})),C=system.createAttr({"data-id":`${r?.uid}`}),S=system.createAttr({"data-gp-text":""}),{textDescriptionCss:h}=styles.getStaticCss(),L="product.description == blank",x=()=>{let e=core.isLocalEnv?"{{ 'gp-product-description-v2.js' | asset_url }}":`${core.baseAssetURL}/assets-v2/gp-product-description-v2.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${helpers.getSettingPreloadData('class="gps-link" delay',"src")}="${e}" defer="defer"></script>`},w=system.createStateOrContext({setting:{lineClamp:s?.lineClamp,hasLineClamp:s?.hasLineClamp,viewMoreText:s?.viewMoreText,viewLessText:s?.viewLessText,enableViewMoreIcon:s?.enableViewMoreIcon},textStyle:g}),f=helpers.getDynamicSourceLocales({val:c,uid:r?.uid,settingId:"viewMoreText",pageContext:a,translate:i}),q=helpers.getDynamicSourceLocales({val:o,uid:r?.uid,settingId:"viewLessText",pageContext:a,translate:i});return system.LiquidIf(L,"",system.Liquid(core.template`
|
|
2
2
|
<gp-product-description-v2
|
|
3
3
|
${C}
|
|
4
4
|
class="${n}"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
${system.LiquidUnless("product","<p>Product not found</p>",core.template`<${p} ${S} class="${d}" style="${g}">
|
|
12
12
|
{{product.description}}
|
|
13
13
|
</${p}>
|
|
14
|
-
${system.LiquidUnless(
|
|
14
|
+
${system.LiquidUnless(L,core.template`<button type="button" class="${m}" style="${v}">
|
|
15
15
|
<span class="${u}">
|
|
16
16
|
${system.If(!1,q?.toString(),f?.toString())}
|
|
17
17
|
</span>
|
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
</button>`)}`)}
|
|
20
20
|
</gp-product-description-v2>
|
|
21
21
|
|
|
22
|
-
${
|
|
22
|
+
${x()}
|
|
23
23
|
`))};exports.default=ProductDescription;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core")
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");const devices=["desktop","mobile","tablet"],getDisplayStyle=(t,e)=>{let o={};return devices.forEach(r=>{o={...o,[`--d${"desktop"===r?"":`-${r}`}`]:`${t(r)?"none":e}`}}),o},getTextStyle=({setting:t})=>{let e=core.composeTypographyStyle(t?.typo,t?.typography),o={...core.getStyleShadow({value:t?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:t?.typo?.custom?.hasShadowText}),...core.makeStyleResponsive("ta",t?.textAlign),...core.getGlobalColorStyle(t?.color),...core.makeStyle({tt:t?.transform}),...e};return core.filterTruthyStyles(o)},getButtonStyle=({setting:t})=>{let e=core.composeTypographyStyle(t?.typo,t?.typography),o=()=>getDisplayStyle(e=>!!t?.hasLineClamp&&void 0!==t.hasLineClamp[e]&&!t.hasLineClamp[e],"inline-flex"),r={...core.makeStyleResponsive("jc",t?.textAlign),...core.makeStyle({tt:t?.transform}),...e,...core.getGlobalColorStyle(t?.showMoreColor),...o()};return core.filterTruthyStyles(r)},getStaticCss=()=>{let t=`
|
|
2
2
|
.gp-p-description-text > *:not(ol):not(ul):not(table):not(div):not(style):not(script) {
|
|
3
3
|
display: inline !important;
|
|
4
4
|
}
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
.gp-p-description-text > table {
|
|
10
10
|
box-shadow: none;
|
|
11
11
|
}
|
|
12
|
-
`,
|
|
12
|
+
`,e=`
|
|
13
13
|
.p-description-wrapper.gp-p-description-text * {
|
|
14
14
|
color: inherit;
|
|
15
15
|
line-height: inherit !important;
|
|
16
|
-
}`;return{gpDescriptionCss:
|
|
16
|
+
}`;return{gpDescriptionCss:t,textDescriptionCss:e}};exports.getButtonStyle=getButtonStyle,exports.getStaticCss=getStaticCss,exports.getTextStyle=getTextStyle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var React=require("react"),helpers=require("../common/helpers.js"),core=require("@gem-sdk/core");const useGpDescription=e=>{let t=React.useRef(null),[r,c]=React.useState(!1),[s,
|
|
1
|
+
"use strict";var React=require("react"),helpers=require("../common/helpers.js"),core=require("@gem-sdk/core");const useGpDescription=e=>{let t=React.useRef(null),[r,c]=React.useState(!1),[s,i]=React.useState(!1),u=core.useProduct(),o=core.useCurrentDevice(),l=core.getResponsiveValueByScreen(e?.hasLineClamp,o),n=core.getResponsiveValueByScreen(e?.lineClamp,o),{redirectProductShopifyLink:a}=core.useProductShopifyEditLink(),p=core.useEditorMode(),d=React.useCallback(()=>{if(!t.current)return helpers.DESCRIPTION_LINE_HEIGHT_DEFAULT;let e=window.getComputedStyle(t.current).getPropertyValue("line-height");return Math.ceil(parseFloat(e))},[]),h=React.useCallback(e=>l&&n&&e?`${n*e}px`:"auto",[l,n]),R=()=>{c(e=>!e)};return React.useEffect(()=>{let e=t.current;if(c(!1),!e)return;let r=l&&u?.descriptionHtml;r?setTimeout(()=>{let t=e?.scrollHeight??0,r=e?.clientHeight??0,c=d(),s=Math.round((t??0)/c),u=n&&n<s||r<t;n&&u?i(()=>!0):i(()=>!1)},100):e.style.maxHeight="none"},[l,n,u?.description,u?.descriptionHtml,d,h,c,i]),{ref:t,open:r,isShowViewMore:s,handleToggleShowMore:R,mode:p,redirectProductShopifyLink:a}};exports.useGpDescription=useGpDescription;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const triggerBadgeDefault=[{triggerEvent:"inventory_status",type:"in_stock",quantityType:"exact_or_above",from:"1",to:"15",priority:0,conditionType:"exact_or_above"}],ProductBadgeSettings=[{id:"setting",controls:[{id:"displayTrigger",type:"display-trigger-badge",default:triggerBadgeDefault},{id:"content",type:"group",controls:[{id:"image",type:"image",label:"Pick Image",default:{src:"https://cdn.shopify.com/s/files/1/0697/6182/7064/files/gempages_523190969722471488-fc9fecb6-26b8-4836-b417-2dfb9ea43bd5.png?v=1723733677"}},{id:"shape",type:"badge-style",label:"Content",iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",default:"horizontal_rectangle",options:[{value:"image",label:"Image",type:"badge-layout",iconName:"gp-product-badge-image"},{value:"horizontal_rectangle",label:"Text horizontal",type:"badge-layout",iconName:"gp-product-badge-horizontal-rectangle"},{value:"ribbon",label:"Text corner 1",type:"badge-layout",iconName:"gp-product-badge-ribbon"},{value:"ribbon_2",label:"Text ribbon 1",type:"badge-layout",iconName:"gp-product-badge-ribbon-2"},{value:"triangle",label:"Text corner 2",type:"badge-layout",iconName:"gp-product-badge-triangle"},{value:"ribbon_3",label:"Text ribbon 2",type:"badge-layout",iconName:"gp-product-badge-ribbon-3"},{value:"vertical_rectangle",label:"Text vertical",type:"badge-layout",iconName:"gp-product-badge-vertical-rectangle"},{value:"star",label:"Text star",type:"badge-layout",iconName:"gp-product-badge-star"},{value:"square",label:"Text square",type:"badge-layout",iconName:"gp-product-badge-square"}]},{id:"displayContent",type:"textarea",default:"Sale {percent_discount} off",minHeight:72,inputClass:"!pr-36",autoHeight:!0,showPlusBtn:!0,isFocusToBottom:!0,defaultRows:1,suggestContents:[{message:"{percent_discount}",eg:"E.g: Save 20%"},{message:"{amount_discount}",eg:"E.g: Save $20"},{message:"{min_price}",eg:"E.g: Start from $20"},{message:"{inventory_quantity}",eg:"E.g: Only 3 items left",tooltip:`Only work with product enable “Track inventory”`}]},{id:"contentBanner",type:"banner",message:`{inventory_quantity} Only work with product enable “Track inventory”`,closable:!0},{id:"translate",type:"input",default:"displayContent"},{id:"contentType",label:"Shape",type:"input",default:"text"}]},{id:"positionWithImage",type:"input",default:"outside"}]},{id:"style",controls:[{id:"typo",type:"typography-v2",ignoreReRender:!0,default:{type:"paragraph-1",attrs:{color:"#EAEAEA"}},hiddenSetting:{textAlign:!0}},{id:"position",type:"custom-position",ignoreValue:["center"],devices:{desktop:{default:{placement:"top-left",topGap:"0",leftGap:"0",bottomGap:"0",rightGap:"0"}}}},{id:"badgeColor",type:"background-color-picker",label:"Badge color",default:"#C62A33"},{id:"badgeColorV2",type:"color-picker-v2",devices:{desktop:{default:{normal:"#C62A33"}}},enableGradient:!0,compoDefaultValue:{desktop:{default:{normal:"#C62A33"}}}},{id:"textColor",type:"background-color-picker",label:"Text color",mode:"solid",default:"text-3"},{id:"wrapperBorder",type:"border"},{id:"textBadgeBorder",type:"border-v2",devices:{desktop:{default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!0}}}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}}}},{id:"imageBadgeBorder",type:"border-v2",devices:{desktop:{default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-1",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"line-1",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-1",width:"1px",borderWidth:"1px"}}}}},{id:"borderRadius",type:"radius-preset",default:{btrr:"3px",bblr:"3px",bbrr:"3px",btlr:"3px",radiusType:"custom"}},{id:"textBadgeCorner",type:"corner-v2",devices:{desktop:{default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}}},compoDefaultValue:{desktop:{default:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}}},{id:"imageBadgeCorner",type:"corner-v2",devices:{desktop:{default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}}},compoDefaultValue:{desktop:{default:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}}},{id:"hasShadow",type:"toggle",default:!1},{id:"textSizeV2",type:"size-setting",hiddenShowMore:!0,disableShapeLinkedTooltip:"The ratio is locked to ensure the badge shape displays correctly",devices:{desktop:{default:{width:"auto",height:"auto",shapeLinked:!1,disableShapeLinked:!0,hiddenShape:!0,shape:"custom",padding:{top:"8px",bottom:"8px",left:"12px",right:"12px"}}}},settingConfig:{width:{displayOptions:["auto"
|
|
1
|
+
"use strict";const triggerBadgeDefault=[{triggerEvent:"inventory_status",type:"in_stock",quantityType:"exact_or_above",from:"1",to:"15",priority:0,conditionType:"exact_or_above"}],ProductBadgeSettings=[{id:"setting",controls:[{id:"displayTrigger",type:"display-trigger-badge",default:triggerBadgeDefault},{id:"content",type:"group",controls:[{id:"image",type:"image",label:"Pick Image",default:{src:"https://cdn.shopify.com/s/files/1/0697/6182/7064/files/gempages_523190969722471488-fc9fecb6-26b8-4836-b417-2dfb9ea43bd5.png?v=1723733677"}},{id:"shape",type:"badge-style",label:"Content",iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",default:"horizontal_rectangle",options:[{value:"image",label:"Image",type:"badge-layout",iconName:"gp-product-badge-image"},{value:"horizontal_rectangle",label:"Text horizontal",type:"badge-layout",iconName:"gp-product-badge-horizontal-rectangle"},{value:"ribbon",label:"Text corner 1",type:"badge-layout",iconName:"gp-product-badge-ribbon"},{value:"ribbon_2",label:"Text ribbon 1",type:"badge-layout",iconName:"gp-product-badge-ribbon-2"},{value:"triangle",label:"Text corner 2",type:"badge-layout",iconName:"gp-product-badge-triangle"},{value:"ribbon_3",label:"Text ribbon 2",type:"badge-layout",iconName:"gp-product-badge-ribbon-3"},{value:"vertical_rectangle",label:"Text vertical",type:"badge-layout",iconName:"gp-product-badge-vertical-rectangle"},{value:"star",label:"Text star",type:"badge-layout",iconName:"gp-product-badge-star"},{value:"square",label:"Text square",type:"badge-layout",iconName:"gp-product-badge-square"}]},{id:"displayContent",type:"textarea",default:"Sale {percent_discount} off",minHeight:72,inputClass:"!pr-36",autoHeight:!0,showPlusBtn:!0,isFocusToBottom:!0,defaultRows:1,suggestContents:[{message:"{percent_discount}",eg:"E.g: Save 20%"},{message:"{amount_discount}",eg:"E.g: Save $20"},{message:"{min_price}",eg:"E.g: Start from $20"},{message:"{inventory_quantity}",eg:"E.g: Only 3 items left",tooltip:`Only work with product enable “Track inventory”`}]},{id:"contentBanner",type:"banner",message:`{inventory_quantity} Only work with product enable “Track inventory”`,closable:!0},{id:"translate",type:"input",default:"displayContent"},{id:"contentType",label:"Shape",type:"input",default:"text"}]},{id:"positionWithImage",type:"input",default:"outside"}]},{id:"style",controls:[{id:"typo",type:"typography-v2",ignoreReRender:!0,default:{type:"paragraph-1",attrs:{color:"#EAEAEA"}},hiddenSetting:{textAlign:!0}},{id:"position",type:"custom-position",ignoreValue:["center"],devices:{desktop:{default:{placement:"top-left",topGap:"0",leftGap:"0",bottomGap:"0",rightGap:"0"}}}},{id:"badgeColor",type:"background-color-picker",label:"Badge color",default:"#C62A33"},{id:"badgeColorV2",type:"color-picker-v2",devices:{desktop:{default:{normal:"#C62A33"}}},enableGradient:!0,compoDefaultValue:{desktop:{default:{normal:"#C62A33"}}}},{id:"textColor",type:"background-color-picker",label:"Text color",mode:"solid",default:"text-3"},{id:"wrapperBorder",type:"border"},{id:"textBadgeBorder",type:"border-v2",devices:{desktop:{default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!0}}}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}}}},{id:"imageBadgeBorder",type:"border-v2",devices:{desktop:{default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-1",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"line-1",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-1",width:"1px",borderWidth:"1px"}}}}},{id:"borderRadius",type:"radius-preset",default:{btrr:"3px",bblr:"3px",bbrr:"3px",btlr:"3px",radiusType:"custom"}},{id:"textBadgeCorner",type:"corner-v2",devices:{desktop:{default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}}},compoDefaultValue:{desktop:{default:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}}},{id:"imageBadgeCorner",type:"corner-v2",devices:{desktop:{default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}}},compoDefaultValue:{desktop:{default:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}}},{id:"hasShadow",type:"toggle",default:!1},{id:"textSizeV2",type:"size-setting",hiddenShowMore:!0,disableShapeLinkedTooltip:"The ratio is locked to ensure the badge shape displays correctly",devices:{desktop:{default:{width:"auto",height:"auto",shapeLinked:!1,disableShapeLinked:!0,hiddenShape:!0,shape:"custom",padding:{top:"8px",bottom:"8px",left:"12px",right:"12px"}}}},settingConfig:{width:{displayOptions:["auto"]},height:{displayOptions:["auto"]}},hiddenSettings:["gap","proportion","padding"]},{id:"imageSizeV2",type:"size-setting",hiddenShowMore:!0,disableShapeLinkedTooltip:"The ratio is locked to ensure the badge shape displays correctly",devices:{desktop:{default:{width:"20%",height:"auto",shapeLinked:!0,hiddenShape:!1,shape:"original",disableShapeLinked:!0}}},settingConfig:{width:{displayOptions:["full","auto","small","large","medium"],sizeConfig:{small:"100px",medium:"116px",large:"132px"}},height:{displayOptions:["auto","small","large","medium"],sizeConfig:{small:"28px",medium:"36px",large:"44px"}}},hiddenSettings:["gap","padding","proportion"]},{id:"align",label:"Align",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:"shapeShadow",type:"boxShadow",hideOptions:["size"],label:"",default:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"#121212",angle:90}},{id:"textBadgeShadow",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.2)",angle:45}}}}},{id:"imageBadgeShadow",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.2)",angle:45}}}}}]}];exports.ProductBadgeSettings=ProductBadgeSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const SettingUIV2=[{label:{en:"Style"},controls:[{setting:{id:"shape"},layout:"vertical",popoverLabel:{en:"Style"},controlChangeTrigger:{settings:[{condition:"shape.includes('image')",source:["shape"],action:{controlId:"contentType",newValue:"image",groupType:"setting",controlType:"setting"}},{condition:"!shape.includes('image')",source:["shape"],action:{controlId:"contentType",newValue:"text",groupType:"setting",controlType:"setting"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Image"},conditionDisplay:'contentType === "image"',controls:[{id:"image",conditionDisplay:'contentType === "image"',label:{en:"Image"},setting:{id:"image"}}]},{label:{en:"Text"},conditionDisplay:'contentType === "text"',controls:[{id:"content-badge",type:"combo",iconName:"polaris-edit",getValueFromSettingID:"displayContent",isHideClear:!0,popoverLabel:{en:"Content"},label:{en:"Content"},layout:"vertical",conditionDisplay:'contentType == "text"',controls:[{label:{en:"Content"},layout:"vertical",setting:{id:"displayContent"}},{label:{en:""},layout:"vertical",setting:{id:"contentBanner"},conditionDisplay:'displayContent?.includes("{inventory_quantity}")'}]},{id:"typo",label:{en:"Basic"},setting:{id:"typo"},options:{hideLabel:!0,fullWidth:!0,updateFields:[{field:"attrs.textAlign",settingId:"textAlign"}]},layout:"vertical",controlChangeTrigger:{settings:[{action:{controlId:"textAlign",valueFromField:"attrs.textAlign",groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Badge style"},conditionDisplay:'contentType == "text"',controls:[{label:{en:"Color"},setting:{id:"badgeColorV2",state:"normal"},conditionDisplay:'contentType == "text"'},{label:{en:"Border"},setting:{id:"textBadgeBorder",state:"normal"},conditionDisplay:'contentType == "text" && ["square", "vertical_rectangle", "horizontal_rectangle"].includes(shape)'},{label:{en:"Corner"},setting:{id:"textBadgeCorner",state:"normal"},conditionDisplay:'contentType == "text" && ["square", "vertical_rectangle", "horizontal_rectangle"].includes(shape)'},{label:{en:"Shadow"},setting:{id:"textBadgeShadow",state:"normal"},options:{updateFields:[{field:"enable",settingId:"hasShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"shapeShadow.normal.enable === true",source:["shapeShadow","hasShadow"],action:{controlId:"hasShadow",groupType:"style",controlType:"style",newValue:!0}},{condition:"shapeShadow.normal.enable === false",source:["shapeShadow","hasShadow"],action:{controlId:"hasShadow",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}},conditionDisplay:'contentType == "text"'}]},{label:{en:"Image style"},conditionDisplay:'contentType == "image"',controls:[{label:{en:"Border"},setting:{id:"imageBadgeBorder",state:"normal"},conditionDisplay:'contentType == "image"'},{label:{en:"Corner"},setting:{id:"imageBadgeCorner",state:"normal"},conditionDisplay:'contentType == "image"'},{label:{en:"Shadow"},setting:{id:"imageBadgeShadow",state:"normal"},conditionDisplay:'contentType == "image"'}]},{label:{en:"Size"},conditionDisplay:'contentType == "image"',controls:[{setting:{id:"imageSizeV2"},layout:"vertical"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"imageSizeV2",field:"padding"}}}]},{label:{en:"Size"},conditionDisplay:'contentType == "text"',controls:[{setting:{id:"textSizeV2"},layout:"vertical",conditionDisplay:'["square" ,"ribbon" ,"star","triangle"].includes(shape)'},{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"textSizeV2",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}
|
|
1
|
+
"use strict";const SettingUIV2=[{label:{en:"Style"},controls:[{setting:{id:"shape"},layout:"vertical",popoverLabel:{en:"Style"},controlChangeTrigger:{settings:[{condition:"shape.includes('image')",source:["shape"],action:{controlId:"contentType",newValue:"image",groupType:"setting",controlType:"setting"}},{condition:"!shape.includes('image')",source:["shape"],action:{controlId:"contentType",newValue:"text",groupType:"setting",controlType:"setting"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Image"},conditionDisplay:'contentType === "image"',controls:[{id:"image",conditionDisplay:'contentType === "image"',label:{en:"Image"},setting:{id:"image"}}]},{label:{en:"Text"},conditionDisplay:'contentType === "text"',controls:[{id:"content-badge",type:"combo",iconName:"polaris-edit",getValueFromSettingID:"displayContent",isHideClear:!0,popoverLabel:{en:"Content"},label:{en:"Content"},layout:"vertical",conditionDisplay:'contentType == "text"',controls:[{label:{en:"Content"},layout:"vertical",setting:{id:"displayContent"}},{label:{en:""},layout:"vertical",setting:{id:"contentBanner"},conditionDisplay:'displayContent?.includes("{inventory_quantity}")'}]},{id:"typo",label:{en:"Basic"},setting:{id:"typo"},options:{hideLabel:!0,fullWidth:!0,updateFields:[{field:"attrs.textAlign",settingId:"textAlign"}]},layout:"vertical",controlChangeTrigger:{settings:[{action:{controlId:"textAlign",valueFromField:"attrs.textAlign",groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Badge style"},conditionDisplay:'contentType == "text"',controls:[{label:{en:"Color"},setting:{id:"badgeColorV2",state:"normal"},conditionDisplay:'contentType == "text"'},{label:{en:"Border"},setting:{id:"textBadgeBorder",state:"normal"},conditionDisplay:'contentType == "text" && ["square", "vertical_rectangle", "horizontal_rectangle"].includes(shape)'},{label:{en:"Corner"},setting:{id:"textBadgeCorner",state:"normal"},conditionDisplay:'contentType == "text" && ["square", "vertical_rectangle", "horizontal_rectangle"].includes(shape)'},{label:{en:"Shadow"},setting:{id:"textBadgeShadow",state:"normal"},options:{updateFields:[{field:"enable",settingId:"hasShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"shapeShadow.normal.enable === true",source:["shapeShadow","hasShadow"],action:{controlId:"hasShadow",groupType:"style",controlType:"style",newValue:!0}},{condition:"shapeShadow.normal.enable === false",source:["shapeShadow","hasShadow"],action:{controlId:"hasShadow",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}},conditionDisplay:'contentType == "text"'}]},{label:{en:"Image style"},conditionDisplay:'contentType == "image"',controls:[{label:{en:"Border"},setting:{id:"imageBadgeBorder",state:"normal"},conditionDisplay:'contentType == "image"'},{label:{en:"Corner"},setting:{id:"imageBadgeCorner",state:"normal"},conditionDisplay:'contentType == "image"'},{label:{en:"Shadow"},setting:{id:"imageBadgeShadow",state:"normal"},conditionDisplay:'contentType == "image"'}]},{label:{en:"Size"},conditionDisplay:'contentType == "image"',controls:[{setting:{id:"imageSizeV2"},layout:"vertical"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"imageSizeV2",field:"padding"}}}]},{label:{en:"Size"},conditionDisplay:'contentType == "text"',controls:[{setting:{id:"textSizeV2"},layout:"vertical",conditionDisplay:'["square" ,"ribbon" ,"star","triangle"].includes(shape)'},{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"textSizeV2",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal",conditionDisplay:'!["square" ,"ribbon" ,"star","triangle"].includes(shape)'},{id:"Height",label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",label:"height",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"textSizeV2",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal",conditionDisplay:'!["square" ,"ribbon" ,"star","triangle"].includes(shape)'},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"textSizeV2",field:"padding"}}}]},{label:{en:"Position"},controls:[{layout:"vertical",setting:{id:"position"}}],conditionDisplay:'positionWithImage === "inside"'},{controls:[{id:"displayTrigger",setting:{id:"displayTrigger"},layout:"vertical"}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(textSizeV2) >= 100 && textSizeV2?.includes("%"))',conditionDisplay:'positionWithImage === "outside"',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Align is not supported when width is 100%"}}]}];exports.SettingUIV2=SettingUIV2;
|
package/dist/cjs/product/settings/product-image-v2/configs/setting-v2/ProductFeatureImage.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use strict";var animation=require("../../../../../carousel/plugins/animation.js");const getDefaultResponsive=e=>({desktop:{default:e}}),productFeatureImageSetting=[{id:"hoverEffect",label:"Hover Effect",type:"select",hide:!0,hideOnMode:{mobileOnly:!0},options:[{title:"Zoom",value:"zoom"},{title:"Show other image",value:"other"}],default:"none"},{id:"zoomType",type:"option:value",label:"Zoom Type",hide:!0,default:"default",hideOnMode:{mobileOnly:!0},options:[{label:"Default",value:"default"},{label:"Glasses",value:"glasses"}]},{id:"zoom",type:"input:slider",label:"Zoom Value",min:100,max:200,step:10,default:150,units:["%"],showDefaultUnit:!0,useOnlyUnitInit:!0,isNumber:!0},{id:"otherImage",label:"Other image",type:"dropdown:input",isNumber:!0,isIndexValue:!0,displayOptions:[{label:"Image 1",value:1},{label:"Image 2",value:2},{label:"Image 3",value:3},{label:"Image 4",value:4},{label:"Last image",value:"Last image"}],default:0},{id:"ftClickOpenLightBox",label:"Click Effect",type:"select",options:[{title:"Open gallery",value:"popup"},{title:"Open product",value:"product-link"}],devices:getDefaultResponsive("none")},{id:"ftClickOpenNewTab",type:"option:value",options:[{label:"Yes",value:!0},{label:"No",value:!1}],default:!1},{id:"ftNavigationPosition",label:"Navigation",type:"option:illustration",enableTooltip:!0,options:[{label:"No navigation",value:"none",type:"slide-control",hide:!0},{label:"Display outside navigation",value:"outside",type:"slide-control",svgName:"gp-slide-control-outside"},{label:"Display inside navigation",value:"inside",type:"slide-control",svgName:"gp-slide-control-inside"}],devices:getDefaultResponsive("none")},{id:"ftLoop",type:"toggle",devices:getDefaultResponsive(!0)},{id:"ftPauseOnHover",label:"Pause On Hover",type:"toggle",hide:!0,default:!0},{id:"ftAnimationSpeed",label:"Slide speed",type:"input:slider",useOnlyUnitInit:!0,min:100,max:5e3,step:50,units:["ms"],showDefaultUnit:!0,isNumber:!0,default:500},{id:"ftAnimationMode",label:"Animation",type:"select",default:animation.CAROUSEL_ANIMATION.EASE_IN.value,options:[{label:"Ease in",value:animation.CAROUSEL_ANIMATION.EASE_IN.value},{label:"Ease out",value:animation.CAROUSEL_ANIMATION.EASE_OUT.value},{label:"Ease in out",value:animation.CAROUSEL_ANIMATION.EASE_IN_OUT.value}]},{id:"ftArrowIcon",type:"icon",hide:!0,label:"Custom Arrow",info:"Choose from list or paste any SVG icon",default:`<svg height="20" width="20" data-name="caret-right-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508418455613473128">
|
|
2
|
-
<path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z" /></svg>`},{id:"ftArrowIconColor",label:"Icon color",type:"color-picker-v2",default:"#121212"},{id:"ftArrowIconSize",label:"Number per show",type:"input:stepper",min:1,devices:{desktop:{default:16}}},{id:"ftDragToScroll",label:"Drag to scroll",type:"toggle",hide:!0,default:!0},{id:"ftArrowNavColor",label:"Nav. color",type:"color-picker-v2",default:"#FFFFFF"},{id:"ftArrowNavBorder",label:"Nav. border",type:"border",compoDefaultValue:{color:"line-3",borderType:"none",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1}},{id:"ftArrowNavRadius",label:"Nav. corner",type:"radius-preset",default:{btrr:"9999px",bblr:"9999px",bbrr:"9999px",btlr:"9999px",radiusType:"circle"}},{id:"ftArrowNavShadow",type:"shadow-v2"},{id:"ftDotStyle",label:"Dot style",type:"option:illustration",enableTooltip:!0,options:[{label:"None",value:"none",type:"carousel-dot",hide:!0},{label:"Inside",value:"inside",type:"carousel-dot",svgName:"gp-carousel-dot-inside"},{label:"Outside",value:"outside",type:"carousel-dot",svgName:"gp-carousel-dot-outside"}],devices:{desktop:{default:"none"}}},{id:"ftDotSize",label:"Dots size",type:"input:stepper",min:1,devices:{desktop:{default:16}}},{id:"ftDotGapToCarousel",label:"Gap to carousel",type:"input:slider",min:0,max:80,isNumber:!0,ignoreMax:!0,devices:{desktop:{default:16}}},{id:"ftDotColor",label:"Dot color",type:"color-picker-v2",devices:{desktop:{default:"#121212"}}},{id:"ftDotActiveColor",label:"Dot color active",type:"color-picker-v2",devices:{desktop:{default:"#FFFFFF"}}}],productSelectDisplaySetting=[{id:"typeDisplay",type:"select",options:[{title:"All images",value:"all-images"},{title:"Select manually",value:"select-manual"}],default:"all-images"},{id:"preDisplay",type:"select",label:"Pre-display",default:"1st-available-variant",options:[{title:"1st available variant",value:"1st-available-variant"},{title:"1st image",value:"1st-images"},{title:"1st video",value:"1st-video"},{title:"1st 3D model",value:"1st-3d-mode"}]}],productFeatureImageStyle=[{id:"ftShape",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"100%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full"]}},hiddenSettings:["padding","gap"]},{id:"ftLayout",type:"option:illustration",enableTooltip:!0,label:"Image scale",options:[{label:"Fill image",value:"cover",type:"image",svgName:"gp-image-cover"},{label:"Fit image",value:"contain",type:"image",svgName:"gp-image-contain"}],devices:getDefaultResponsive("cover")},{id:"ftCorner",type:"radius-preset",label:"Corner",default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},state:{hover:!0,normal:!0}}];exports.productFeatureImageSetting=productFeatureImageSetting,exports.productFeatureImageStyle=productFeatureImageStyle,exports.productSelectDisplaySetting=productSelectDisplaySetting;
|
|
2
|
+
<path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z" /></svg>`},{id:"ftArrowIconColor",label:"Icon color",type:"color-picker-v2",default:"#121212"},{id:"ftArrowIconSize",label:"Number per show",type:"input:stepper",min:1,devices:{desktop:{default:16}}},{id:"ftDragToScroll",label:"Drag to scroll",type:"toggle",hide:!0,default:!0},{id:"ftArrowNavColor",label:"Nav. color",type:"color-picker-v2",default:"#FFFFFF"},{id:"ftArrowNavBorder",label:"Nav. border",type:"border",compoDefaultValue:{color:"line-3",borderType:"none",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1}},{id:"ftArrowNavRadius",label:"Nav. corner",type:"radius-preset",default:{btrr:"9999px",bblr:"9999px",bbrr:"9999px",btlr:"9999px",radiusType:"circle"}},{id:"ftArrowNavShadow",type:"shadow-v2"},{id:"ftDotStyle",label:"Dot style",type:"option:illustration",enableTooltip:!0,tooltipPosition:"bottom",options:[{label:"None",value:"none",type:"carousel-dot",hide:!0},{label:"Inside",value:"inside",type:"carousel-dot",svgName:"gp-carousel-dot-inside"},{label:"Outside",value:"outside",type:"carousel-dot",svgName:"gp-carousel-dot-outside"}],devices:{desktop:{default:"none"}}},{id:"ftDotSize",label:"Dots size",type:"input:stepper",min:1,devices:{desktop:{default:16}}},{id:"ftDotGapToCarousel",label:"Gap to carousel",type:"input:slider",min:0,max:80,isNumber:!0,ignoreMax:!0,devices:{desktop:{default:16}}},{id:"ftDotColor",label:"Dot color",type:"color-picker-v2",devices:{desktop:{default:"#121212"}}},{id:"ftDotActiveColor",label:"Dot color active",type:"color-picker-v2",devices:{desktop:{default:"#FFFFFF"}}}],productSelectDisplaySetting=[{id:"typeDisplay",type:"select",options:[{title:"All images",value:"all-images"},{title:"Select manually",value:"select-manual"}],default:"all-images"},{id:"preDisplay",type:"select",label:"Pre-display",default:"1st-available-variant",options:[{title:"1st available variant",value:"1st-available-variant"},{title:"1st image",value:"1st-images"},{title:"1st video",value:"1st-video"},{title:"1st 3D model",value:"1st-3d-mode"}]}],productFeatureImageStyle=[{id:"ftShape",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"100%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full"]}},hiddenSettings:["padding","gap"]},{id:"ftLayout",type:"option:illustration",enableTooltip:!0,label:"Image scale",options:[{label:"Fill image",value:"cover",type:"image",svgName:"gp-image-cover"},{label:"Fit image",value:"contain",type:"image",svgName:"gp-image-contain"}],devices:getDefaultResponsive("cover")},{id:"ftCorner",type:"radius-preset",label:"Corner",default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},state:{hover:!0,normal:!0}}];exports.productFeatureImageSetting=productFeatureImageSetting,exports.productFeatureImageStyle=productFeatureImageStyle,exports.productSelectDisplaySetting=productSelectDisplaySetting;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core"),helpers=require("../../helpers.js"),helpers$1=require("./helpers.js");const getStyleWrapper=(e,t)=>{let{background:r,containWidth:l,align:o}=e??{},a={...t,...core.getStyleBackgroundByDevice(r),...core.getGradientBgrStyleByDevice(r,{desktop:!0,tablet:!0,mobile:!0}),...core.makeStyleResponsive("w",core.makeWidth(l)),...core.makeStyleResponsive("as",o)};return helpers.filterTruthyStyles(a)},getTabListStyle=e=>{let{panelAlign:t}=e??{},r={...core.makeStyleResponsive("jc",t),...core.makeStyleResponsive("w",{desktop:"100%",tablet:"100%",mobile:"100%"})};return helpers.filterTruthyStyles(r)},getItemStyle=(e,t)=>{let{labelColor:r,labelBgColor:l,borderTab:o,labelAlign:a,enableActiveEffect:s,panelWidth:i,position:n,panelFullWidth:y,labelWidth:c}=e??{},S={},p=!0===s||void 0===s;return S={...S=t&&p?{...core.makeStyleResponsive("jc",a),...core.makeStyle({c:core.getSingleColorVariable(r?.active??r?.normal),bgc:core.getSingleColorVariable(l?.active??l?.normal),bs:o?.active?.border??o?.normal?.border,bw:o?.active?.width??o?.normal?.width,bc:core.getSingleColorVariable(o?.active?.color??o?.normal?.color)})}:{...core.makeStyleResponsive("jc",a),...core.getGlobalColorStateStyle("c",r),...core.getGlobalColorStateStyle("bgc",l),...core.handleConvertBorderStyle(o),...core.handleConvertBorderWidth(o),...core.handleConvertBorderColor(o)},...core.makeStyleResponsive("w",helpers$1.getStyleWidthByPositionResponsive({position:n,panelFullWidth:y,panelWidth:i,labelWidth:c}))},e?.enableHoverEffect||(S=Object.fromEntries(Object.entries(S).filter(([e])=>!e.startsWith("--hvr")))),helpers.filterTruthyStyles(S)},getTabParentListStyle=e=>{let{panelAlign:t,panelAlignVertical:r}=e??{},l={...core.makeStyleResponsive("jc",t),...core.makeStyleResponsive("ai",r)};return helpers.filterTruthyStyles(l)},getContainContentStyle=()=>{let e={};return core.makeStyle({w:"100%"})&&(e={...core.makeStyle({w:"100%"})}),helpers.filterTruthyStyles(e)},getTabItemStyle=e=>{let
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),helpers=require("../../helpers.js"),helpers$1=require("./helpers.js");const getStyleWrapper=(e,t)=>{let{background:r,containWidth:l,align:o}=e??{},a={...t,...core.getStyleBackgroundByDevice(r),...core.getGradientBgrStyleByDevice(r,{desktop:!0,tablet:!0,mobile:!0}),...core.makeStyleResponsive("w",core.makeWidth(l)),...core.makeStyleResponsive("as",o)};return helpers.filterTruthyStyles(a)},getTabListStyle=e=>{let{panelAlign:t}=e??{},r={...core.makeStyleResponsive("jc",t),...core.makeStyleResponsive("w",{desktop:"100%",tablet:"100%",mobile:"100%"})};return helpers.filterTruthyStyles(r)},getItemStyle=(e,t)=>{let{labelColor:r,labelBgColor:l,borderTab:o,labelAlign:a,enableActiveEffect:s,panelWidth:i,position:n,panelFullWidth:y,labelWidth:c}=e??{},S={},p=!0===s||void 0===s;return S={...S=t&&p?{...core.makeStyleResponsive("jc",a),...core.makeStyle({c:core.getSingleColorVariable(r?.active??r?.normal),bgc:core.getSingleColorVariable(l?.active??l?.normal),bs:o?.active?.border??o?.normal?.border,bw:o?.active?.width??o?.normal?.width,bc:core.getSingleColorVariable(o?.active?.color??o?.normal?.color)})}:{...core.makeStyleResponsive("jc",a),...core.getGlobalColorStateStyle("c",r),...core.getGlobalColorStateStyle("bgc",l),...core.handleConvertBorderStyle(o),...core.handleConvertBorderWidth(o),...core.handleConvertBorderColor(o)},...core.makeStyleResponsive("w",helpers$1.getStyleWidthByPositionResponsive({position:n,panelFullWidth:y,panelWidth:i,labelWidth:c}))},e?.enableHoverEffect||(S=Object.fromEntries(Object.entries(S).filter(([e])=>!e.startsWith("--hvr")))),helpers.filterTruthyStyles(S)},getTabParentListStyle=e=>{let{panelAlign:t,panelAlignVertical:r}=e??{},l={...core.makeStyleResponsive("jc",t),...core.makeStyleResponsive("ai",r)};return helpers.filterTruthyStyles(l)},getContainContentStyle=()=>{let e={};return core.makeStyle({w:"100%"})&&(e={...core.makeStyle({w:"100%"})}),helpers.filterTruthyStyles(e)},getTabItemStyle=(e,t)=>{let r={...e,...core.makeStyle({h:"100%",v:t?"visible":"hidden",pos:t?"relative":"absolute"})};return helpers.filterTruthyStyles(r)};exports.getContainContentStyle=getContainContentStyle,exports.getItemStyle=getItemStyle,exports.getStyleWrapper=getStyleWrapper,exports.getTabItemStyle=getTabItemStyle,exports.getTabListStyle=getTabListStyle,exports.getTabParentListStyle=getTabParentListStyle;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),ChildrenDroppable=require("../../grid/components/ChildrenDroppable.js"),system=require("@gem-sdk/system"),classes=require("../common/classes.js"),styles=require("../common/styles.js");const TabItem=e=>{let{children:s,builderAttrs:t,className:r,parentUid:l,isActive:i,style:a}=e,m=system.createStyle({...styles.getTabItemStyle(a)}),o=system.createClass({...classes.getTabItemClasses({parentUid:l,className:r,isNotLiquid:!0,isActive:i})});return jsxRuntime.jsx("div",{...t,className:o,style:m,children:core.isEmptyChildren(s)?jsxRuntime.jsx(ChildrenDroppable.default,{}):s})};exports.default=TabItem;
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),ChildrenDroppable=require("../../grid/components/ChildrenDroppable.js"),system=require("@gem-sdk/system"),classes=require("../common/classes.js"),styles=require("../common/styles.js");const TabItem=e=>{let{children:s,builderAttrs:t,className:r,parentUid:l,isActive:i,style:a}=e,m=system.createStyle({...styles.getTabItemStyle(a,i)}),o=system.createClass({...classes.getTabItemClasses({parentUid:l,className:r,isNotLiquid:!0,isActive:i})});return jsxRuntime.jsx("div",{...t,className:o,style:m,children:core.isEmptyChildren(s)?jsxRuntime.jsx(ChildrenDroppable.default,{}):s})};exports.default=TabItem;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),system=require("@gem-sdk/system"),classes=require("../common/classes.js"),styles=require("../common/styles.js");const TabItem=e=>{let{children:s,builderAttrs:t,className:r,parentUid:l,style:a}=e,c=system.createStyle({...styles.getTabItemStyle(a)}),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),system=require("@gem-sdk/system"),classes=require("../common/classes.js"),styles=require("../common/styles.js");const TabItem=e=>{let{children:s,builderAttrs:t,className:r,parentUid:l,style:a,isActive:m}=e,c=system.createStyle({...styles.getTabItemStyle(a,m)}),o=system.createClass({...classes.getTabItemClasses({parentUid:l,className:r,isNotLiquid:!1,isActive:m})});return core.template`
|
|
2
2
|
<div
|
|
3
3
|
${{...t}}
|
|
4
|
-
class="${
|
|
4
|
+
class="${o}"
|
|
5
5
|
style="${c}"
|
|
6
6
|
>
|
|
7
7
|
${s}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
>
|
|
9
9
|
${Text_liquid.default({className:P,styles:{typo:n,typography:o,textAlign:y},setting:{text:i,htmlTag:"div",excludeFlex:!0}})}
|
|
10
10
|
</li>
|
|
11
|
-
`}).join(""),k=()=>core.WrapRenderChildren({uid:s?.uid||"",customProps:r?.[0].customProps},r?.map(e=>e?core.template`${core.RenderChildren({...e,parentUid:s?.uid})}`:"")),I=()=>core.RenderIf(core.isLocalEnv,`<script ${helpers.getSettingPreloadData('class="gps-link" delay',"src")}="{{ 'gp-tab.js' | asset_url }}" defer="defer"></script>`,`<script ${helpers.getSettingPreloadData('class="gps-link" delay',"src")}="${core.baseAssetURL}/assets-v2/gp-tab.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);return core.template`
|
|
11
|
+
`}).join(""),k=()=>core.WrapRenderChildren({uid:s?.uid||"",customProps:r?.[0].customProps},r?.map((e,t)=>{let l=t===a?.activeKey;return e?core.template`${core.RenderChildren({...e,parentUid:s?.uid,isActive:l})}`:""})),I=()=>core.RenderIf(core.isLocalEnv,`<script ${helpers.getSettingPreloadData('class="gps-link" delay',"src")}="{{ 'gp-tab.js' | asset_url }}" defer="defer"></script>`,`<script ${helpers.getSettingPreloadData('class="gps-link" delay',"src")}="${core.baseAssetURL}/assets-v2/gp-tab.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);return core.template`
|
|
12
12
|
<gp-tab
|
|
13
13
|
${{...g}}
|
|
14
14
|
style="${u}"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getStyleBackgroundByDevice as e,getSingleColorVariable as t,makeStyle as o,makeStyleResponsive as i,getStyleShadow as r,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:i("w",s(e,t)),getItemContainerStyles=(e,l)=>{let{borderContent:a,backgroundContent:c,roundedContent:d,accordionShadow:g,width:h,fullWidth:s,widthHeightSize:S,iconColor:b,color:
|
|
1
|
+
import{getStyleBackgroundByDevice as e,getSingleColorVariable as t,makeStyle as o,makeStyleResponsive as i,getStyleShadow as r,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:i("w",s(e,t)),getItemContainerStyles=(e,l)=>{let{borderContent:a,backgroundContent:c,roundedContent:d,accordionShadow:g,width:h,fullWidth:s,widthHeightSize:S,iconColor:b,color:m}=e??{};return{"--icon-expand-hover-color":l?t(m?.active??m?.normal):t(m?.hover??m?.normal),"--icon-expand-active-color":t(m?.active??m?.normal),"--icon-active-color":t(b?.active??b?.normal),"--icon-hover-color":l?t(b?.active):t(b?.hover),...widthStyle(h,s,S),...o({bs:a?.border??a?.border,bw:a?.width??a?.width,bc:t(a?.color??a?.color)}),...i("bg",c),...r({value:g,styleAppliedFor:"box-shadow",isEnableShadow:g?.enable}),...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,i)=>{let{headerContentPadding:r,widthHeightSize:n,itemHeaderSpacing:h,bgColor:s,textColor:S,headerBorder:b}=e??{},{isShow:m,iconPosition:p}=i??{};return{...r&&headerContentPaddingSize(r).padding,...h?.type||r?{}:l(h?.custom),...widthHeightSizeControl(n).height,...composePosition(p),...m?o({bgc:t(s?.active??s?.normal),bs:b?.active?.border,bw:b?.active?.width,bc:t(b?.active?.color),c:t(S?.active??S?.normal)}):{...a("bgc",s),...a("c",S),...c(b),...d(b),...g(b),...a("bgc",s)}}},getIconRotateStyles=(e,i,r)=>{let{color:n}=e??{};return{...i?o({c:t(n?.active??n?.normal)}):{...a("c",n)},width:`${r??16}px`,height:`${r??16}px`}},composeIconGlobalSize=e=>h(e),getGapStyles=(e,t)=>({...composeIconGlobalSize(e).gap,...i("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,getGapStyles,getIconGlobalSize,getIconRotateStyles,getIconStyles,getItemContainerStyles,getRenderChildrenStyles,getTemplateRow};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{itemChildrenTemplate as
|
|
1
|
+
import{itemChildrenTemplate as i}from"./configs/child-items.js";import{AccordionSettings as t}from"./configs/settings.js";import{SettingUIV1 as e}from"./configs/ui-v1.js";import{SettingUIV2 as l}from"./configs/ui-v2.js";let config={tag:"Accordion",label:"Accordion",icon:`
|
|
2
2
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
3
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M3 4C2.58579 4 2.25 4.33579 2.25 4.75C2.25 5.16421 2.58579 5.5 3 5.5H21.0025C21.4167 5.5 21.7525 5.16421 21.7525 4.75C21.7525 4.33579 21.4167 4 21.0025 4H3ZM1.5 9.67558C1.5 8.1568 2.73122 6.92558 4.25 6.92558H19.7525C21.2713 6.92558 22.5025 8.1568 22.5025 9.67558V14.3781C22.5025 15.8969 21.2713 17.1281 19.7525 17.1281H4.25C2.73121 17.1281 1.5 15.8969 1.5 14.3781V9.67558ZM4.25 8.42558C3.55964 8.42558 3 8.98523 3 9.67558V14.3781C3 15.0685 3.55964 15.6281 4.25 15.6281H19.7525C20.4428 15.6281 21.0025 15.0685 21.0025 14.3781V9.67558C21.0025 8.98523 20.4428 8.42558 19.7525 8.42558H4.25ZM2.25 19.2542C2.25 18.84 2.58579 18.5042 3 18.5042H21.0025C21.4167 18.5042 21.7525 18.84 21.7525 19.2542C21.7525 19.6684 21.4167 20.0042 21.0025 20.0042H3C2.58579 20.0042 2.25 19.6684 2.25 19.2542Z" fill="white"/>
|
|
4
4
|
</svg>
|
|
5
|
-
`,settings:
|
|
5
|
+
`,settings:t,ui:e,uiV2:l,presets:[{id:"accordion-1",name:{en:"Accordion"},icon:{desktop:`
|
|
6
6
|
<svg width="98" height="56" viewBox="0 0 98 56" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7
7
|
<rect x="4" y="4" width="57" height="6" rx="3" fill="#757575"/>
|
|
8
8
|
<rect x="2" y="4" width="57" height="6" rx="3" fill="#757575"/>
|
|
@@ -20,7 +20,7 @@ import{itemChildrenTemplate as t}from"./configs/child-items.js";import{Accordion
|
|
|
20
20
|
<path d="M96 55H0V57H96V55Z" fill="#424242" mask="url(#path-18-inside-6_1355_357)"/>
|
|
21
21
|
<path d="M98 55H2V57H98V55Z" fill="#424242" mask="url(#path-15-inside-5_1355_357)"/>
|
|
22
22
|
</svg>
|
|
23
|
-
`},components:[{tag:"Accordion",settings:{childItem:["Accordion 1","Accordion 2","Accordion 3"],layoutHeader:"text-only"},styles:{borderContent:{border:"solid",width:"0px 0px 1px 0px",position:"bottom",color:"line-3",isCustom:!0,borderWidth:"Mixed"},headerContentPadding:{desktop:{padding:{type:"medium",top:"8px",left:"0px",bottom:"8px",right:"0px"}}}},advanced:{margin:{bottom:"var(--g-s-l)"}},childrens:[
|
|
23
|
+
`},components:[{tag:"Accordion",settings:{childItem:["Accordion 1","Accordion 2","Accordion 3"],layoutHeader:"text-only"},styles:{borderContent:{border:"solid",width:"0px 0px 1px 0px",position:"bottom",color:"line-3",isCustom:!0,borderWidth:"Mixed"},headerContentPadding:{desktop:{padding:{type:"medium",top:"8px",left:"0px",bottom:"8px",right:"0px"}}}},advanced:{of:"hidden",margin:{bottom:"var(--g-s-l)"}},childrens:[i,i,i]}]},{id:"accordion-3",name:{en:"Accordion"},icon:{desktop:`
|
|
24
24
|
<svg width="96" height="56" viewBox="0 0 96 56" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
25
25
|
<path d="M8.75 3.75C8.75 3.33579 8.41421 3 8 3C7.58579 3 7.25 3.33579 7.25 3.75L7.25 6.25H4.75C4.33579 6.25 4 6.58579 4 7C4 7.41421 4.33579 7.75 4.75 7.75H7.25L7.25 10.25C7.25 10.6642 7.58579 11 8 11C8.41421 11 8.75 10.6642 8.75 10.25V7.75H11.25C11.6642 7.75 12 7.41421 12 7C12 6.58579 11.6642 6.25 11.25 6.25H8.75V3.75Z" fill="#AAAAAA"/>
|
|
26
26
|
<rect x="35" y="4" width="57" height="6" rx="3" fill="#757575"/>
|
|
@@ -40,7 +40,7 @@ import{itemChildrenTemplate as t}from"./configs/child-items.js";import{Accordion
|
|
|
40
40
|
<svg width="16" height="16" data-name="minus-regular" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
41
41
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 7.75C2 7.33579 2.33579 7 2.75 7L13.25 7C13.6642 7 14 7.33579 14 7.75C14 8.16421 13.6642 8.5 13.25 8.5H2.75C2.33579 8.5 2 8.16421 2 7.75Z" fill="currentColor"/>
|
|
42
42
|
</svg>
|
|
43
|
-
`,iconPosition:"left"},styles:{headerContentPadding:{desktop:{padding:{type:"medium",top:"8px",left:"0px",bottom:"8px",right:"0px"}}},borderContent:{border:"solid",width:"0px 0px 1px 0px",position:"bottom",color:"line-3",isCustom:!0,borderWidth:"Mixed"},widthHeightSize:{desktop:{width:"600px"}}},advanced:{margin:{bottom:"var(--g-s-l)"}},childrens:[
|
|
43
|
+
`,iconPosition:"left"},styles:{headerContentPadding:{desktop:{padding:{type:"medium",top:"8px",left:"0px",bottom:"8px",right:"0px"}}},borderContent:{border:"solid",width:"0px 0px 1px 0px",position:"bottom",color:"line-3",isCustom:!0,borderWidth:"Mixed"},widthHeightSize:{desktop:{width:"600px"}}},advanced:{of:"hidden",margin:{bottom:"var(--g-s-l)"}},childrens:[i,i,i]}]},{id:"accordion-2",name:{en:"Accordion"},icon:{desktop:`
|
|
44
44
|
<svg width="96" height="56" viewBox="0 0 96 56" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
45
45
|
<path d="M0 3C0 1.34315 1.34315 0 3 0H93C94.6569 0 96 1.34315 96 3V10C96 11.6569 94.6569 13 93 13H3C1.34315 13 0 11.6569 0 10V3Z" fill="#333333"/>
|
|
46
46
|
<g clip-path="url(#clip0_1355_8713)">
|
|
@@ -67,4 +67,4 @@ import{itemChildrenTemplate as t}from"./configs/child-items.js";import{Accordion
|
|
|
67
67
|
</clipPath>
|
|
68
68
|
</defs>
|
|
69
69
|
</svg>
|
|
70
|
-
`},components:[{tag:"Accordion",settings:{childItem:["Accordion 1","Accordion 2","Accordion 3"],layoutHeader:"before-text"},styles:{backgroundContent:{desktop:"#EAEAEA"},borderContent:{},headerContentPadding:{desktop:{padding:{type:"medium",top:"8px",left:"12px",bottom:"12px",right:"12px"}}},itemGap:"16px",contentSizePadding:{desktop:{padding:{type:"medium",top:"4px",left:"12px",bottom:"12px",right:"12px"}}}},advanced:{margin:{bottom:"var(--g-s-l)"}},childrens:[
|
|
70
|
+
`},components:[{tag:"Accordion",settings:{childItem:["Accordion 1","Accordion 2","Accordion 3"],layoutHeader:"before-text"},styles:{backgroundContent:{desktop:"#EAEAEA"},borderContent:{},headerContentPadding:{desktop:{padding:{type:"medium",top:"8px",left:"12px",bottom:"12px",right:"12px"}}},itemGap:"16px",contentSizePadding:{desktop:{padding:{type:"medium",top:"4px",left:"12px",bottom:"12px",right:"12px"}}}},advanced:{of:"hidden",margin:{bottom:"var(--g-s-l)"}},childrens:[i,i,i]}]}],editorConfigs:{placeholder:{notAppendTags:["MarqueeItem","Marquee"]}},rootOverride:{settings:{alignment:{desktop:"left"}},styles:{align:{desktop:"center"},widthHeightSize:{desktop:{width:"600px",height:"auto"}}},"spacing-setting":{desktop:{margin:{bottom:0}}}}};export{config as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
let ButtonSettings=[{id:"setting",controls:[{id:"label",label:"Text",type:"input",default:"<p>Button</p>"},{id:"translate",type:"input",default:"label"},{id:"enableBtnLink",type:"toggle",default:!1},{id:"btnLink",type:"pick-link",pickLinkLabel:"Button link",label:"Pick Link",default:{type:"open-page",link:"",target:"_self"},hiddenOptions:{"stay-on-page":!0}},{id:"iconGroup",type:"group",label:"Icon",controls:[{id:"iconVisible",label:"Icon Visible",type:"toggle",default:!1},{id:"iconSvg",label:"SVG Icon",type:"icon",default:`
|
|
2
2
|
<svg height="20" width="20" data-name="star-filled" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817759863701864">
|
|
3
3
|
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M234.29,114.85l-45,38.83L203,211.75a16.4,16.4,0,0,1-24.5,17.82L128,198.49,77.47,229.57A16.4,16.4,0,0,1,53,211.75l13.76-58.07-45-38.83A16.46,16.46,0,0,1,31.08,86l59-4.76,22.76-55.08a16.36,16.36,0,0,1,30.27,0l22.75,55.08,59,4.76a16.46,16.46,0,0,1,9.37,28.86Z"></path></svg>
|
|
4
|
-
`},{id:"iconAlign",label:"Icon Alignment",type:"option:value",options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],default:"left"}]},{id:"htmlType",label:"HTML Type",type:"select",default:"button",options:[{label:"Open link, popup & scroll to",value:"button"},{label:"Clear form",value:"reset"},{label:"Submit form",value:"submit"}]},{id:"disabled",label:"Disabled",type:"toggle",default:!1},{id:"shouldClearSpace",label:"",type:"toggle",default:!1}]},{id:"style",controls:[{id:"borderBtnV2",type:"border-v2",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!0}},compoDefaultValue:{normal:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}},{id:"borderBtn",type:"border",label:"Border",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1}},state:{hover:!0,normal:!0}},{id:"roundedBtnV2",type:"corner-v2",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}},compoDefaultValue:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}},{id:"roundedBtn",type:"radius-preset",label:"Border Radius",default:{normal:{radiusType:"small"}},state:{hover:!0,normal:!0}},{id:"hasBoxShadowBtn",type:"toggle",label:"Enable Button Shadow",default:{normal:!1,hover:!1},state:{normal:!0,hover:!0}},{id:"boxShadowBtn",type:"shadow-v2",compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}},{id:"backgroundColorV2",type:"color-picker-v2",default:{normal:"brand",hover:"highlight"},compoDefaultValue:{normal:"brand",hover:"highlight"},enableGradient:!0},{id:"backgroundColor",type:"background-color-picker",label:"Background Color",default:{normal:"brand",hover:"highlight"},state:{hover:!0,normal:!0}},{id:"backgroundImage",type:"background-image",compoDefaultValue:{normal:{size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480,hiddenSEO:!0}},hover:{size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480,hiddenSEO:!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:"enableTextStyle",label:"",type:"toggle",default:!0},{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-3"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"textColorHover",type:"color-picker-v2",default:{hover:"text-3"},compoDefaultValue:{hover:"text-3"},enableGradient:!
|
|
4
|
+
`},{id:"iconAlign",label:"Icon Alignment",type:"option:value",options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],default:"left"}]},{id:"htmlType",label:"HTML Type",type:"select",default:"button",options:[{label:"Open link, popup & scroll to",value:"button"},{label:"Clear form",value:"reset"},{label:"Submit form",value:"submit"}]},{id:"disabled",label:"Disabled",type:"toggle",default:!1},{id:"shouldClearSpace",label:"",type:"toggle",default:!1}]},{id:"style",controls:[{id:"borderBtnV2",type:"border-v2",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!0}},compoDefaultValue:{normal:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}},{id:"borderBtn",type:"border",label:"Border",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1}},state:{hover:!0,normal:!0}},{id:"roundedBtnV2",type:"corner-v2",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}},compoDefaultValue:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}},{id:"roundedBtn",type:"radius-preset",label:"Border Radius",default:{normal:{radiusType:"small"}},state:{hover:!0,normal:!0}},{id:"hasBoxShadowBtn",type:"toggle",label:"Enable Button Shadow",default:{normal:!1,hover:!1},state:{normal:!0,hover:!0}},{id:"boxShadowBtn",type:"shadow-v2",compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}},{id:"backgroundColorV2",type:"color-picker-v2",default:{normal:"brand",hover:"highlight"},compoDefaultValue:{normal:"brand",hover:"highlight"},enableGradient:!0},{id:"backgroundColor",type:"background-color-picker",label:"Background Color",default:{normal:"brand",hover:"highlight"},state:{hover:!0,normal:!0}},{id:"backgroundImage",type:"background-image",compoDefaultValue:{normal:{size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480,hiddenSEO:!0}},hover:{size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480,hiddenSEO:!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:"enableTextStyle",label:"",type:"toggle",default:!0},{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-3"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"textColorHover",type:"color-picker-v2",default:{hover:"text-3"},compoDefaultValue:{hover:"text-3"},enableGradient:!1},{id:"transform",label:"Text Transform",type:"select",options:[{value:"default",label:"None"},{value:"capitalize",label:"Capitalize"},{value:"uppercase",label:"Uppercase"},{value:"lowercase",label:"Lowercase"}],default:"default"},{id:"dimensions1",type:"group",label:"Icon Dimension",controls:[{id:"iconSizeAuto",type:"toggle",label:"Icon Auto Size",default:!0},{id:"size",label:"Size Icon",type:"select",options:[{label:"Large",value:"1.2em"},{label:"Medium",value:"1em"},{label:"Small",value:"0.8em"}],devices:{desktop:{default:"1em"}}},{id:"iconDimension",type:"input:slider",label:"Size",hide:!0,min:0,max:100,step:1,units:["px","em","rem"],devices:{desktop:{default:"24px"}}}]},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"Auto",height:"Auto",padding:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}},settingConfig:{width:{displayOptions:["full","auto"],sizeConfig:{small:"100px",medium:"116px",large:"132px"}},height:{displayOptions:["auto"],sizeConfig:{small:"28px",medium:"36px",large:"44px"}}},hiddenSettings:["shape","gap"]},{id:"iconSpacing",type:"input:slider",units:["px"],step:1,max:40,ignoreMax:!0,devices:{desktop:{default:"8px"}}},{id:"textAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"gp-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"gp-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"gp-text-align-right"},{label:"Justify",value:"justify",type:"text",tooltip:"Align justify",iconName:"gp-text-align-justify"}],devices:{desktop:{default:"left"}}}]}];export{ButtonSettings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{composeClasses as e,cls as s}from"@gem-sdk/core";let getAlignClasses=e("gp-flex gp-w-full gp-relative"),getContentClasses=e("!gp-relative"),getWrapperClasses=l=>e(s("gem-marquee gp-overflow-hidden gp-flex gp-items-center gp-w-full gp-h-full",l)),getFastMarqueeClasses=e("gp-overflow-hidden gp-w-full gp-h-full"),getFastMarqueeContentClasses=e("gp-flex gp-items-center gp-marque-child-item gem-child-marquee-item gp-w-full"),getFastMarqueeContentChildrenClasses=l=>e(s("gp-inline-flex gp-items-center gp-relative gp-transition-all",l?"gp-w-full":"")),getFastMarqueeChildrenIconClasses=e("gp-flex gp-items-center gp-justify-center [&>svg]:gp-h-full [&>svg]:gp-w-full"),getItemWrapperClasses=(l,t)=>e(s("gp-relative gp-overflow-hidden gem-marquee-item",t,l,`gem-marquee-item-${l}`)),getPlaceHolderWrapperClasses=e("first-block gp-w-[0.01px]");export{getAlignClasses,getContentClasses,getFastMarqueeChildrenIconClasses,getFastMarqueeClasses,getFastMarqueeContentChildrenClasses,getFastMarqueeContentClasses,getItemWrapperClasses,getPlaceHolderWrapperClasses,getWrapperClasses};
|
|
1
|
+
import{composeClasses as e,cls as s}from"@gem-sdk/core";let getAlignClasses=e("gp-flex gp-w-full gp-relative"),getContentClasses=e("!gp-relative"),getWrapperClasses=l=>e(s("gem-marquee gp-overflow-hidden gp-flex gp-items-center gp-w-full gp-h-full",l)),getFastMarqueeClasses=e("gp-overflow-hidden gp-w-full gp-h-full"),getFastMarqueeContentClasses=e("gp-flex gp-items-center gp-marque-child-item gem-child-marquee-item gp-w-full"),getFastMarqueeContentChildrenClasses=l=>e(s("gp-inline-flex gp-items-center gp-relative gp-transition-all",l?"gp-w-full":"")),getFastMarqueeChildrenIconClasses=e("gp-flex gp-items-center gp-justify-center [&>svg]:gp-h-full [&>svg]:gp-w-full"),getItemWrapperClasses=(l,t)=>e(s("gp-relative gp-overflow-hidden gem-marquee-item gp-flex-none",t,l,`gem-marquee-item-${l}`)),getPlaceHolderWrapperClasses=e("first-block gp-w-[0.01px]");export{getAlignClasses,getContentClasses,getFastMarqueeChildrenIconClasses,getFastMarqueeClasses,getFastMarqueeContentChildrenClasses,getFastMarqueeContentClasses,getItemWrapperClasses,getPlaceHolderWrapperClasses,getWrapperClasses};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{ChildTemplate as e}from"./child-template.js";let MarqueeSettingsV2=[{id:"setting",controls:[{id:"itemWidthType",type:"select",options:[{label:"Fit to content",value:"FIT_CONTENT",subTitle:"Match the width of the element inside",disableHoverIcon:!0},{label:"Based on the item count",value:"BASE_ON_NUMBER_OF_ITEMS",subTitle:"Max item width is screen width divided by the number of items",disableHoverIcon:!0},{label:"Custom",value:"CUSTOM",subTitle:"Set the max width as you want",disableHoverIcon:!0}],devices:{desktop:{default:"FIT_CONTENT"},tablet:{default:"FIT_CONTENT"},mobile:{default:"FIT_CONTENT"}}},{id:"activeItem",type:"input",default:"0"},{id:"hoverItem",type:"input",default:"0"},{id:"childItem",label:"Item management",type:"child-item",childTemplate:e,default:["Item 1","Item 2","Item 3","Item 4"]},{id:"isShowIconSeparator",label:"isShowIconSeparator",type:"toggle",default:!1},{id:"iconSeparatorSvg",label:"iconSeparatorSvg",type:"icon",default:`<svg height="20px" width="20px" data-name="dot-outline-filled" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817731477569896">
|
|
2
|
-
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M156,128a28,28,0,1,1-28-28A28,28,0,0,1,156,128Z"></path></svg>`},{id:"stopOnHover",label:"stopOnHover",type:"toggle",default:!0},{id:"speed",label:"speed",type:"input:slider",hideInput:!0,useOnlyUnitInit:!0,hideUnit:!0,min:0,max:4,step:.1,default
|
|
2
|
+
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M156,128a28,28,0,1,1-28-28A28,28,0,0,1,156,128Z"></path></svg>`},{id:"stopOnHover",label:"stopOnHover",type:"toggle",default:!0},{id:"speed",label:"speed",type:"input:slider",hideInput:!0,useOnlyUnitInit:!0,hideUnit:!0,min:0,max:4,step:.1,default:1},{id:"direction",label:"direction",type:"segment",options:[{label:"Left",value:"left",type:"direction",tooltip:"Left"},{label:"Right",value:"right",type:"direction",tooltip:"Right"}],default:"left"},{id:"isPreview",type:"play-pause",hideLabel:!0,default:!1},{id:"hasItemShadow",label:"hasItemShadow",type:"toggle",default:!1}]},{id:"style",controls:[{id:"iconSeparatorSize",label:"iconSeparatorSize",type:"input:stepper",devices:{desktop:{default:16}}},{id:"iconSeparatorColor",label:"iconSeparatorColor",type:"color-picker-v2",default:"text-2"},{id:"itemSpacing",label:"Spacing",type:"input:slider",units:["px"],min:0,max:80,step:1,ignoreMax:!0,devices:{desktop:{default:"60px"}}},{id:"itemMaxWidth",label:"itemMaxWidth",type:"input:unit",units:["px"],placeholder:"Auto",min:40,devices:{desktop:{default:"300px"},tablet:{default:"300px"},mobile:{default:"150px"}}},{id:"sizeSetting",type:"size-setting",label:"",devices:{desktop:{default:{shapeLinked:!1,width:"100%",height:"Auto"}}},settingConfig:{width:{name:"Width"},height:{displayOptions:["auto","small","medium","large"],name:"Height",sizeConfig:{small:"32px",medium:"64px",large:"96px"}}},hiddenSettings:["gap","shape","padding"]},{id:"itemBorderStyle",type:"border",label:"Border",default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"#000000"},compoDefaultValue:{borderType:"style-1",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1,color:"line-3"}},{id:"itemCorner",type:"radius-preset",label:"Border Radius",default:{radiusType:"none"},compoDefaultValue:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}},{id:"itemBackgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"bg-2"}}},{id:"backgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"#DDDDDD"}}},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left"},{label:"Center",value:"center",type:"align",tooltip:"Align center"},{label:"Right",value:"right",type:"align",tooltip:"Align right"}],devices:{desktop:{default:"center"}}},{id:"itemShadow",type:"shadow-v2",label:"Button Shadow",default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!1},compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}]}];export{MarqueeSettingsV2};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,makeLineClamp as t,template as s,dataStringify as o,isLocalEnv as i,baseAssetURL as r}from"@gem-sdk/core";import{getDynamicSourceLocales as p,getSettingPreloadData as
|
|
1
|
+
import{makeStyleResponsive as e,makeLineClamp as t,template as s,dataStringify as o,isLocalEnv as i,baseAssetURL as r}from"@gem-sdk/core";import{getDynamicSourceLocales as p,getSettingPreloadData as l}from"../../../helpers.js";import{createClass as a,createStyle as n,createAttr as c,createStateOrContext as d,LiquidIf as m,Liquid as $,LiquidUnless as u,If as v}from"@gem-sdk/system";import{getClasses as g,getButtonClasses as w,getClassPreBuilt as f}from"./common/classes.js";import{getTextStyle as x,getButtonStyle as h,getStaticCss as y}from"./common/styles.js";import{ICON_SVG as b}from"./common/helpers.js";let ProductDescription=C=>{let{setting:M,advanced:S,builderProps:T,pageContext:j}=C,{htmlTag:I,translate:L,viewMoreText:k,viewLessText:E}=M??{},P="html"===I?"div":"p",V=a({"gp-product-description":!0,[S?.cssClass]:!0}),A=a(g({setting:M})),D=a(w({setting:M})),G=a({"gp-show-more-text":!0}),_=a({"gp-show-more-icon gp-ml-1":!0}),N=n({...x({setting:M}),...e("line-clamp",t(M?.lineClamp,M?.hasLineClamp))}),O=a(f()),R=n(h({setting:M})),q=c({"data-id":`${T?.uid}`}),z=c({"data-gp-text":""}),{textDescriptionCss:B}=y(),F="product.description == blank",H=()=>{let e=i?"{{ 'gp-product-description-v2.js' | asset_url }}":`${r}/assets-v2/gp-product-description-v2.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${l('class="gps-link" delay',"src")}="${e}" defer="defer"></script>`},J=d({setting:{lineClamp:M?.lineClamp,hasLineClamp:M?.hasLineClamp,viewMoreText:M?.viewMoreText,viewLessText:M?.viewLessText,enableViewMoreIcon:M?.enableViewMoreIcon},textStyle:N}),K=p({val:k,uid:T?.uid,settingId:"viewMoreText",pageContext:j,translate:L}),Q=p({val:E,uid:T?.uid,settingId:"viewLessText",pageContext:j,translate:L});return m(F,"",$(s`
|
|
2
2
|
<gp-product-description-v2
|
|
3
|
-
${
|
|
3
|
+
${q}
|
|
4
4
|
class="${V}"
|
|
5
5
|
gp-data='${o(J).replaceAll("'","'")}'
|
|
6
6
|
data-view-more-text="${K}"
|
|
7
7
|
data-view-less-text="${Q}"
|
|
8
8
|
>
|
|
9
|
-
<style>${
|
|
10
|
-
<div class="${
|
|
11
|
-
${u("product","<p>Product not found</p>",s`<${P} ${
|
|
9
|
+
<style>${B}</style>
|
|
10
|
+
<div class="${O}" ></div>
|
|
11
|
+
${u("product","<p>Product not found</p>",s`<${P} ${z} class="${A}" style="${N}">
|
|
12
12
|
{{product.description}}
|
|
13
13
|
</${P}>
|
|
14
|
-
${u(
|
|
14
|
+
${u(F,s`<button type="button" class="${D}" style="${R}">
|
|
15
15
|
<span class="${G}">
|
|
16
|
-
${
|
|
16
|
+
${v(!1,Q?.toString(),K?.toString())}
|
|
17
17
|
</span>
|
|
18
|
-
${
|
|
18
|
+
${v(M?.enableViewMoreIcon,s`<span class="${_}">${b}</span>`," ")}
|
|
19
19
|
</button>`)}`)}
|
|
20
20
|
</gp-product-description-v2>
|
|
21
21
|
|
|
22
|
-
${
|
|
22
|
+
${H()}
|
|
23
23
|
`))};export{ProductDescription as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{composeTypographyStyle as t,getStyleShadow as e,makeStyleResponsive as o,getGlobalColorStyle as
|
|
1
|
+
import{composeTypographyStyle as t,getStyleShadow as e,makeStyleResponsive as o,getGlobalColorStyle as n,makeStyle as i,filterTruthyStyles as p}from"@gem-sdk/core";let devices=["desktop","mobile","tablet"],getDisplayStyle=(t,e)=>{let o={};return devices.forEach(n=>{o={...o,[`--d${"desktop"===n?"":`-${n}`}`]:`${t(n)?"none":e}`}}),o},getTextStyle=({setting:l})=>{let r=t(l?.typo,l?.typography),s={...e({value:l?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:l?.typo?.custom?.hasShadowText}),...o("ta",l?.textAlign),...n(l?.color),...i({tt:l?.transform}),...r};return p(s)},getButtonStyle=({setting:e})=>{let l=t(e?.typo,e?.typography),r=()=>getDisplayStyle(t=>!!e?.hasLineClamp&&void 0!==e.hasLineClamp[t]&&!e.hasLineClamp[t],"inline-flex"),s={...o("jc",e?.textAlign),...i({tt:e?.transform}),...l,...n(e?.showMoreColor),...r()};return p(s)},getStaticCss=()=>{let t=`
|
|
2
2
|
.gp-p-description-text > *:not(ol):not(ul):not(table):not(div):not(style):not(script) {
|
|
3
3
|
display: inline !important;
|
|
4
4
|
}
|
|
@@ -13,4 +13,4 @@ import{composeTypographyStyle as t,getStyleShadow as e,makeStyleResponsive as o,
|
|
|
13
13
|
.p-description-wrapper.gp-p-description-text * {
|
|
14
14
|
color: inherit;
|
|
15
15
|
line-height: inherit !important;
|
|
16
|
-
}`;return{gpDescriptionCss:t,textDescriptionCss:e}}
|
|
16
|
+
}`;return{gpDescriptionCss:t,textDescriptionCss:e}};export{getButtonStyle,getStaticCss,getTextStyle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useRef as e,useState as t,useCallback as r,useEffect as i}from"react";import{DESCRIPTION_LINE_HEIGHT_DEFAULT as
|
|
1
|
+
import{useRef as e,useState as t,useCallback as r,useEffect as i}from"react";import{DESCRIPTION_LINE_HEIGHT_DEFAULT as o}from"../common/helpers.js";import{useProduct as l,useCurrentDevice as n,getResponsiveValueByScreen as p,useProductShopifyEditLink as m,useEditorMode as s}from"@gem-sdk/core";let useGpDescription=u=>{let c=e(null),[a,h]=t(!1),[d,g]=t(!1),f=l(),H=n(),x=p(u?.hasLineClamp,H),y=p(u?.lineClamp,H),{redirectProductShopifyLink:C}=m(),w=s(),D=r(()=>{if(!c.current)return o;let e=window.getComputedStyle(c.current).getPropertyValue("line-height");return Math.ceil(parseFloat(e))},[]),G=r(e=>x&&y&&e?`${y*e}px`:"auto",[x,y]),M=()=>{h(e=>!e)};return i(()=>{let e=c.current;if(h(!1),!e)return;let t=x&&f?.descriptionHtml;t?setTimeout(()=>{let t=e?.scrollHeight??0,r=e?.clientHeight??0,i=D(),o=Math.round((t??0)/i),l=y&&y<o||r<t;y&&l?g(()=>!0):g(()=>!1)},100):e.style.maxHeight="none"},[x,y,f?.description,f?.descriptionHtml,D,G,h,g]),{ref:c,open:a,isShowViewMore:d,handleToggleShowMore:M,mode:w,redirectProductShopifyLink:C}};export{useGpDescription};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let triggerBadgeDefault=[{triggerEvent:"inventory_status",type:"in_stock",quantityType:"exact_or_above",from:"1",to:"15",priority:0,conditionType:"exact_or_above"}],ProductBadgeSettings=[{id:"setting",controls:[{id:"displayTrigger",type:"display-trigger-badge",default:triggerBadgeDefault},{id:"content",type:"group",controls:[{id:"image",type:"image",label:"Pick Image",default:{src:"https://cdn.shopify.com/s/files/1/0697/6182/7064/files/gempages_523190969722471488-fc9fecb6-26b8-4836-b417-2dfb9ea43bd5.png?v=1723733677"}},{id:"shape",type:"badge-style",label:"Content",iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",default:"horizontal_rectangle",options:[{value:"image",label:"Image",type:"badge-layout",iconName:"gp-product-badge-image"},{value:"horizontal_rectangle",label:"Text horizontal",type:"badge-layout",iconName:"gp-product-badge-horizontal-rectangle"},{value:"ribbon",label:"Text corner 1",type:"badge-layout",iconName:"gp-product-badge-ribbon"},{value:"ribbon_2",label:"Text ribbon 1",type:"badge-layout",iconName:"gp-product-badge-ribbon-2"},{value:"triangle",label:"Text corner 2",type:"badge-layout",iconName:"gp-product-badge-triangle"},{value:"ribbon_3",label:"Text ribbon 2",type:"badge-layout",iconName:"gp-product-badge-ribbon-3"},{value:"vertical_rectangle",label:"Text vertical",type:"badge-layout",iconName:"gp-product-badge-vertical-rectangle"},{value:"star",label:"Text star",type:"badge-layout",iconName:"gp-product-badge-star"},{value:"square",label:"Text square",type:"badge-layout",iconName:"gp-product-badge-square"}]},{id:"displayContent",type:"textarea",default:"Sale {percent_discount} off",minHeight:72,inputClass:"!pr-36",autoHeight:!0,showPlusBtn:!0,isFocusToBottom:!0,defaultRows:1,suggestContents:[{message:"{percent_discount}",eg:"E.g: Save 20%"},{message:"{amount_discount}",eg:"E.g: Save $20"},{message:"{min_price}",eg:"E.g: Start from $20"},{message:"{inventory_quantity}",eg:"E.g: Only 3 items left",tooltip:`Only work with product enable “Track inventory”`}]},{id:"contentBanner",type:"banner",message:`{inventory_quantity} Only work with product enable “Track inventory”`,closable:!0},{id:"translate",type:"input",default:"displayContent"},{id:"contentType",label:"Shape",type:"input",default:"text"}]},{id:"positionWithImage",type:"input",default:"outside"}]},{id:"style",controls:[{id:"typo",type:"typography-v2",ignoreReRender:!0,default:{type:"paragraph-1",attrs:{color:"#EAEAEA"}},hiddenSetting:{textAlign:!0}},{id:"position",type:"custom-position",ignoreValue:["center"],devices:{desktop:{default:{placement:"top-left",topGap:"0",leftGap:"0",bottomGap:"0",rightGap:"0"}}}},{id:"badgeColor",type:"background-color-picker",label:"Badge color",default:"#C62A33"},{id:"badgeColorV2",type:"color-picker-v2",devices:{desktop:{default:{normal:"#C62A33"}}},enableGradient:!0,compoDefaultValue:{desktop:{default:{normal:"#C62A33"}}}},{id:"textColor",type:"background-color-picker",label:"Text color",mode:"solid",default:"text-3"},{id:"wrapperBorder",type:"border"},{id:"textBadgeBorder",type:"border-v2",devices:{desktop:{default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!0}}}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}}}},{id:"imageBadgeBorder",type:"border-v2",devices:{desktop:{default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-1",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"line-1",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-1",width:"1px",borderWidth:"1px"}}}}},{id:"borderRadius",type:"radius-preset",default:{btrr:"3px",bblr:"3px",bbrr:"3px",btlr:"3px",radiusType:"custom"}},{id:"textBadgeCorner",type:"corner-v2",devices:{desktop:{default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}}},compoDefaultValue:{desktop:{default:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}}},{id:"imageBadgeCorner",type:"corner-v2",devices:{desktop:{default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}}},compoDefaultValue:{desktop:{default:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}}},{id:"hasShadow",type:"toggle",default:!1},{id:"textSizeV2",type:"size-setting",hiddenShowMore:!0,disableShapeLinkedTooltip:"The ratio is locked to ensure the badge shape displays correctly",devices:{desktop:{default:{width:"auto",height:"auto",shapeLinked:!1,disableShapeLinked:!0,hiddenShape:!0,shape:"custom",padding:{top:"8px",bottom:"8px",left:"12px",right:"12px"}}}},settingConfig:{width:{displayOptions:["auto"
|
|
1
|
+
let triggerBadgeDefault=[{triggerEvent:"inventory_status",type:"in_stock",quantityType:"exact_or_above",from:"1",to:"15",priority:0,conditionType:"exact_or_above"}],ProductBadgeSettings=[{id:"setting",controls:[{id:"displayTrigger",type:"display-trigger-badge",default:triggerBadgeDefault},{id:"content",type:"group",controls:[{id:"image",type:"image",label:"Pick Image",default:{src:"https://cdn.shopify.com/s/files/1/0697/6182/7064/files/gempages_523190969722471488-fc9fecb6-26b8-4836-b417-2dfb9ea43bd5.png?v=1723733677"}},{id:"shape",type:"badge-style",label:"Content",iconViewBox:"0 0 80 48",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",default:"horizontal_rectangle",options:[{value:"image",label:"Image",type:"badge-layout",iconName:"gp-product-badge-image"},{value:"horizontal_rectangle",label:"Text horizontal",type:"badge-layout",iconName:"gp-product-badge-horizontal-rectangle"},{value:"ribbon",label:"Text corner 1",type:"badge-layout",iconName:"gp-product-badge-ribbon"},{value:"ribbon_2",label:"Text ribbon 1",type:"badge-layout",iconName:"gp-product-badge-ribbon-2"},{value:"triangle",label:"Text corner 2",type:"badge-layout",iconName:"gp-product-badge-triangle"},{value:"ribbon_3",label:"Text ribbon 2",type:"badge-layout",iconName:"gp-product-badge-ribbon-3"},{value:"vertical_rectangle",label:"Text vertical",type:"badge-layout",iconName:"gp-product-badge-vertical-rectangle"},{value:"star",label:"Text star",type:"badge-layout",iconName:"gp-product-badge-star"},{value:"square",label:"Text square",type:"badge-layout",iconName:"gp-product-badge-square"}]},{id:"displayContent",type:"textarea",default:"Sale {percent_discount} off",minHeight:72,inputClass:"!pr-36",autoHeight:!0,showPlusBtn:!0,isFocusToBottom:!0,defaultRows:1,suggestContents:[{message:"{percent_discount}",eg:"E.g: Save 20%"},{message:"{amount_discount}",eg:"E.g: Save $20"},{message:"{min_price}",eg:"E.g: Start from $20"},{message:"{inventory_quantity}",eg:"E.g: Only 3 items left",tooltip:`Only work with product enable “Track inventory”`}]},{id:"contentBanner",type:"banner",message:`{inventory_quantity} Only work with product enable “Track inventory”`,closable:!0},{id:"translate",type:"input",default:"displayContent"},{id:"contentType",label:"Shape",type:"input",default:"text"}]},{id:"positionWithImage",type:"input",default:"outside"}]},{id:"style",controls:[{id:"typo",type:"typography-v2",ignoreReRender:!0,default:{type:"paragraph-1",attrs:{color:"#EAEAEA"}},hiddenSetting:{textAlign:!0}},{id:"position",type:"custom-position",ignoreValue:["center"],devices:{desktop:{default:{placement:"top-left",topGap:"0",leftGap:"0",bottomGap:"0",rightGap:"0"}}}},{id:"badgeColor",type:"background-color-picker",label:"Badge color",default:"#C62A33"},{id:"badgeColorV2",type:"color-picker-v2",devices:{desktop:{default:{normal:"#C62A33"}}},enableGradient:!0,compoDefaultValue:{desktop:{default:{normal:"#C62A33"}}}},{id:"textColor",type:"background-color-picker",label:"Text color",mode:"solid",default:"text-3"},{id:"wrapperBorder",type:"border"},{id:"textBadgeBorder",type:"border-v2",devices:{desktop:{default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-3",isCustom:!0}}}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}}}},{id:"imageBadgeBorder",type:"border-v2",devices:{desktop:{default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"line-1",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}}},compoDefaultValue:{desktop:{default:{normal:{border:"solid",color:"line-1",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-1",width:"1px",borderWidth:"1px"}}}}},{id:"borderRadius",type:"radius-preset",default:{btrr:"3px",bblr:"3px",bbrr:"3px",btlr:"3px",radiusType:"custom"}},{id:"textBadgeCorner",type:"corner-v2",devices:{desktop:{default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}}},compoDefaultValue:{desktop:{default:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}}},{id:"imageBadgeCorner",type:"corner-v2",devices:{desktop:{default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}}},compoDefaultValue:{desktop:{default:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}}}},{id:"hasShadow",type:"toggle",default:!1},{id:"textSizeV2",type:"size-setting",hiddenShowMore:!0,disableShapeLinkedTooltip:"The ratio is locked to ensure the badge shape displays correctly",devices:{desktop:{default:{width:"auto",height:"auto",shapeLinked:!1,disableShapeLinked:!0,hiddenShape:!0,shape:"custom",padding:{top:"8px",bottom:"8px",left:"12px",right:"12px"}}}},settingConfig:{width:{displayOptions:["auto"]},height:{displayOptions:["auto"]}},hiddenSettings:["gap","proportion","padding"]},{id:"imageSizeV2",type:"size-setting",hiddenShowMore:!0,disableShapeLinkedTooltip:"The ratio is locked to ensure the badge shape displays correctly",devices:{desktop:{default:{width:"20%",height:"auto",shapeLinked:!0,hiddenShape:!1,shape:"original",disableShapeLinked:!0}}},settingConfig:{width:{displayOptions:["full","auto","small","large","medium"],sizeConfig:{small:"100px",medium:"116px",large:"132px"}},height:{displayOptions:["auto","small","large","medium"],sizeConfig:{small:"28px",medium:"36px",large:"44px"}}},hiddenSettings:["gap","padding","proportion"]},{id:"align",label:"Align",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:"shapeShadow",type:"boxShadow",hideOptions:["size"],label:"",default:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"#121212",angle:90}},{id:"textBadgeShadow",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.2)",angle:45}}}}},{id:"imageBadgeShadow",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.2)",angle:45}}}}}]}];export{ProductBadgeSettings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let SettingUIV2=[{label:{en:"Style"},controls:[{setting:{id:"shape"},layout:"vertical",popoverLabel:{en:"Style"},controlChangeTrigger:{settings:[{condition:"shape.includes('image')",source:["shape"],action:{controlId:"contentType",newValue:"image",groupType:"setting",controlType:"setting"}},{condition:"!shape.includes('image')",source:["shape"],action:{controlId:"contentType",newValue:"text",groupType:"setting",controlType:"setting"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Image"},conditionDisplay:'contentType === "image"',controls:[{id:"image",conditionDisplay:'contentType === "image"',label:{en:"Image"},setting:{id:"image"}}]},{label:{en:"Text"},conditionDisplay:'contentType === "text"',controls:[{id:"content-badge",type:"combo",iconName:"polaris-edit",getValueFromSettingID:"displayContent",isHideClear:!0,popoverLabel:{en:"Content"},label:{en:"Content"},layout:"vertical",conditionDisplay:'contentType == "text"',controls:[{label:{en:"Content"},layout:"vertical",setting:{id:"displayContent"}},{label:{en:""},layout:"vertical",setting:{id:"contentBanner"},conditionDisplay:'displayContent?.includes("{inventory_quantity}")'}]},{id:"typo",label:{en:"Basic"},setting:{id:"typo"},options:{hideLabel:!0,fullWidth:!0,updateFields:[{field:"attrs.textAlign",settingId:"textAlign"}]},layout:"vertical",controlChangeTrigger:{settings:[{action:{controlId:"textAlign",valueFromField:"attrs.textAlign",groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Badge style"},conditionDisplay:'contentType == "text"',controls:[{label:{en:"Color"},setting:{id:"badgeColorV2",state:"normal"},conditionDisplay:'contentType == "text"'},{label:{en:"Border"},setting:{id:"textBadgeBorder",state:"normal"},conditionDisplay:'contentType == "text" && ["square", "vertical_rectangle", "horizontal_rectangle"].includes(shape)'},{label:{en:"Corner"},setting:{id:"textBadgeCorner",state:"normal"},conditionDisplay:'contentType == "text" && ["square", "vertical_rectangle", "horizontal_rectangle"].includes(shape)'},{label:{en:"Shadow"},setting:{id:"textBadgeShadow",state:"normal"},options:{updateFields:[{field:"enable",settingId:"hasShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"shapeShadow.normal.enable === true",source:["shapeShadow","hasShadow"],action:{controlId:"hasShadow",groupType:"style",controlType:"style",newValue:!0}},{condition:"shapeShadow.normal.enable === false",source:["shapeShadow","hasShadow"],action:{controlId:"hasShadow",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}},conditionDisplay:'contentType == "text"'}]},{label:{en:"Image style"},conditionDisplay:'contentType == "image"',controls:[{label:{en:"Border"},setting:{id:"imageBadgeBorder",state:"normal"},conditionDisplay:'contentType == "image"'},{label:{en:"Corner"},setting:{id:"imageBadgeCorner",state:"normal"},conditionDisplay:'contentType == "image"'},{label:{en:"Shadow"},setting:{id:"imageBadgeShadow",state:"normal"},conditionDisplay:'contentType == "image"'}]},{label:{en:"Size"},conditionDisplay:'contentType == "image"',controls:[{setting:{id:"imageSizeV2"},layout:"vertical"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"imageSizeV2",field:"padding"}}}]},{label:{en:"Size"},conditionDisplay:'contentType == "text"',controls:[{setting:{id:"textSizeV2"},layout:"vertical",conditionDisplay:'["square" ,"ribbon" ,"star","triangle"].includes(shape)'},{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"textSizeV2",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}
|
|
1
|
+
let SettingUIV2=[{label:{en:"Style"},controls:[{setting:{id:"shape"},layout:"vertical",popoverLabel:{en:"Style"},controlChangeTrigger:{settings:[{condition:"shape.includes('image')",source:["shape"],action:{controlId:"contentType",newValue:"image",groupType:"setting",controlType:"setting"}},{condition:"!shape.includes('image')",source:["shape"],action:{controlId:"contentType",newValue:"text",groupType:"setting",controlType:"setting"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Image"},conditionDisplay:'contentType === "image"',controls:[{id:"image",conditionDisplay:'contentType === "image"',label:{en:"Image"},setting:{id:"image"}}]},{label:{en:"Text"},conditionDisplay:'contentType === "text"',controls:[{id:"content-badge",type:"combo",iconName:"polaris-edit",getValueFromSettingID:"displayContent",isHideClear:!0,popoverLabel:{en:"Content"},label:{en:"Content"},layout:"vertical",conditionDisplay:'contentType == "text"',controls:[{label:{en:"Content"},layout:"vertical",setting:{id:"displayContent"}},{label:{en:""},layout:"vertical",setting:{id:"contentBanner"},conditionDisplay:'displayContent?.includes("{inventory_quantity}")'}]},{id:"typo",label:{en:"Basic"},setting:{id:"typo"},options:{hideLabel:!0,fullWidth:!0,updateFields:[{field:"attrs.textAlign",settingId:"textAlign"}]},layout:"vertical",controlChangeTrigger:{settings:[{action:{controlId:"textAlign",valueFromField:"attrs.textAlign",groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Badge style"},conditionDisplay:'contentType == "text"',controls:[{label:{en:"Color"},setting:{id:"badgeColorV2",state:"normal"},conditionDisplay:'contentType == "text"'},{label:{en:"Border"},setting:{id:"textBadgeBorder",state:"normal"},conditionDisplay:'contentType == "text" && ["square", "vertical_rectangle", "horizontal_rectangle"].includes(shape)'},{label:{en:"Corner"},setting:{id:"textBadgeCorner",state:"normal"},conditionDisplay:'contentType == "text" && ["square", "vertical_rectangle", "horizontal_rectangle"].includes(shape)'},{label:{en:"Shadow"},setting:{id:"textBadgeShadow",state:"normal"},options:{updateFields:[{field:"enable",settingId:"hasShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"shapeShadow.normal.enable === true",source:["shapeShadow","hasShadow"],action:{controlId:"hasShadow",groupType:"style",controlType:"style",newValue:!0}},{condition:"shapeShadow.normal.enable === false",source:["shapeShadow","hasShadow"],action:{controlId:"hasShadow",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}},conditionDisplay:'contentType == "text"'}]},{label:{en:"Image style"},conditionDisplay:'contentType == "image"',controls:[{label:{en:"Border"},setting:{id:"imageBadgeBorder",state:"normal"},conditionDisplay:'contentType == "image"'},{label:{en:"Corner"},setting:{id:"imageBadgeCorner",state:"normal"},conditionDisplay:'contentType == "image"'},{label:{en:"Shadow"},setting:{id:"imageBadgeShadow",state:"normal"},conditionDisplay:'contentType == "image"'}]},{label:{en:"Size"},conditionDisplay:'contentType == "image"',controls:[{setting:{id:"imageSizeV2"},layout:"vertical"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"imageSizeV2",field:"padding"}}}]},{label:{en:"Size"},conditionDisplay:'contentType == "text"',controls:[{setting:{id:"textSizeV2"},layout:"vertical",conditionDisplay:'["square" ,"ribbon" ,"star","triangle"].includes(shape)'},{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"textSizeV2",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal",conditionDisplay:'!["square" ,"ribbon" ,"star","triangle"].includes(shape)'},{id:"Height",label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",label:"height",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"textSizeV2",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal",conditionDisplay:'!["square" ,"ribbon" ,"star","triangle"].includes(shape)'},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"textSizeV2",field:"padding"}}}]},{label:{en:"Position"},controls:[{layout:"vertical",setting:{id:"position"}}],conditionDisplay:'positionWithImage === "inside"'},{controls:[{id:"displayTrigger",setting:{id:"displayTrigger"},layout:"vertical"}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(textSizeV2) >= 100 && textSizeV2?.includes("%"))',conditionDisplay:'positionWithImage === "outside"',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Align is not supported when width is 100%"}}]}];export{SettingUIV2};
|
package/dist/esm/product/settings/product-image-v2/configs/setting-v2/ProductFeatureImage.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{CAROUSEL_ANIMATION as e}from"../../../../../carousel/plugins/animation.js";let getDefaultResponsive=e=>({desktop:{default:e}}),productFeatureImageSetting=[{id:"hoverEffect",label:"Hover Effect",type:"select",hide:!0,hideOnMode:{mobileOnly:!0},options:[{title:"Zoom",value:"zoom"},{title:"Show other image",value:"other"}],default:"none"},{id:"zoomType",type:"option:value",label:"Zoom Type",hide:!0,default:"default",hideOnMode:{mobileOnly:!0},options:[{label:"Default",value:"default"},{label:"Glasses",value:"glasses"}]},{id:"zoom",type:"input:slider",label:"Zoom Value",min:100,max:200,step:10,default:150,units:["%"],showDefaultUnit:!0,useOnlyUnitInit:!0,isNumber:!0},{id:"otherImage",label:"Other image",type:"dropdown:input",isNumber:!0,isIndexValue:!0,displayOptions:[{label:"Image 1",value:1},{label:"Image 2",value:2},{label:"Image 3",value:3},{label:"Image 4",value:4},{label:"Last image",value:"Last image"}],default:0},{id:"ftClickOpenLightBox",label:"Click Effect",type:"select",options:[{title:"Open gallery",value:"popup"},{title:"Open product",value:"product-link"}],devices:getDefaultResponsive("none")},{id:"ftClickOpenNewTab",type:"option:value",options:[{label:"Yes",value:!0},{label:"No",value:!1}],default:!1},{id:"ftNavigationPosition",label:"Navigation",type:"option:illustration",enableTooltip:!0,options:[{label:"No navigation",value:"none",type:"slide-control",hide:!0},{label:"Display outside navigation",value:"outside",type:"slide-control",svgName:"gp-slide-control-outside"},{label:"Display inside navigation",value:"inside",type:"slide-control",svgName:"gp-slide-control-inside"}],devices:getDefaultResponsive("none")},{id:"ftLoop",type:"toggle",devices:getDefaultResponsive(!0)},{id:"ftPauseOnHover",label:"Pause On Hover",type:"toggle",hide:!0,default:!0},{id:"ftAnimationSpeed",label:"Slide speed",type:"input:slider",useOnlyUnitInit:!0,min:100,max:5e3,step:50,units:["ms"],showDefaultUnit:!0,isNumber:!0,default:500},{id:"ftAnimationMode",label:"Animation",type:"select",default:e.EASE_IN.value,options:[{label:"Ease in",value:e.EASE_IN.value},{label:"Ease out",value:e.EASE_OUT.value},{label:"Ease in out",value:e.EASE_IN_OUT.value}]},{id:"ftArrowIcon",type:"icon",hide:!0,label:"Custom Arrow",info:"Choose from list or paste any SVG icon",default:`<svg height="20" width="20" data-name="caret-right-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508418455613473128">
|
|
2
|
-
<path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z" /></svg>`},{id:"ftArrowIconColor",label:"Icon color",type:"color-picker-v2",default:"#121212"},{id:"ftArrowIconSize",label:"Number per show",type:"input:stepper",min:1,devices:{desktop:{default:16}}},{id:"ftDragToScroll",label:"Drag to scroll",type:"toggle",hide:!0,default:!0},{id:"ftArrowNavColor",label:"Nav. color",type:"color-picker-v2",default:"#FFFFFF"},{id:"ftArrowNavBorder",label:"Nav. border",type:"border",compoDefaultValue:{color:"line-3",borderType:"none",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1}},{id:"ftArrowNavRadius",label:"Nav. corner",type:"radius-preset",default:{btrr:"9999px",bblr:"9999px",bbrr:"9999px",btlr:"9999px",radiusType:"circle"}},{id:"ftArrowNavShadow",type:"shadow-v2"},{id:"ftDotStyle",label:"Dot style",type:"option:illustration",enableTooltip:!0,options:[{label:"None",value:"none",type:"carousel-dot",hide:!0},{label:"Inside",value:"inside",type:"carousel-dot",svgName:"gp-carousel-dot-inside"},{label:"Outside",value:"outside",type:"carousel-dot",svgName:"gp-carousel-dot-outside"}],devices:{desktop:{default:"none"}}},{id:"ftDotSize",label:"Dots size",type:"input:stepper",min:1,devices:{desktop:{default:16}}},{id:"ftDotGapToCarousel",label:"Gap to carousel",type:"input:slider",min:0,max:80,isNumber:!0,ignoreMax:!0,devices:{desktop:{default:16}}},{id:"ftDotColor",label:"Dot color",type:"color-picker-v2",devices:{desktop:{default:"#121212"}}},{id:"ftDotActiveColor",label:"Dot color active",type:"color-picker-v2",devices:{desktop:{default:"#FFFFFF"}}}],productSelectDisplaySetting=[{id:"typeDisplay",type:"select",options:[{title:"All images",value:"all-images"},{title:"Select manually",value:"select-manual"}],default:"all-images"},{id:"preDisplay",type:"select",label:"Pre-display",default:"1st-available-variant",options:[{title:"1st available variant",value:"1st-available-variant"},{title:"1st image",value:"1st-images"},{title:"1st video",value:"1st-video"},{title:"1st 3D model",value:"1st-3d-mode"}]}],productFeatureImageStyle=[{id:"ftShape",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"100%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full"]}},hiddenSettings:["padding","gap"]},{id:"ftLayout",type:"option:illustration",enableTooltip:!0,label:"Image scale",options:[{label:"Fill image",value:"cover",type:"image",svgName:"gp-image-cover"},{label:"Fit image",value:"contain",type:"image",svgName:"gp-image-contain"}],devices:getDefaultResponsive("cover")},{id:"ftCorner",type:"radius-preset",label:"Corner",default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},state:{hover:!0,normal:!0}}];export{productFeatureImageSetting,productFeatureImageStyle,productSelectDisplaySetting};
|
|
2
|
+
<path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z" /></svg>`},{id:"ftArrowIconColor",label:"Icon color",type:"color-picker-v2",default:"#121212"},{id:"ftArrowIconSize",label:"Number per show",type:"input:stepper",min:1,devices:{desktop:{default:16}}},{id:"ftDragToScroll",label:"Drag to scroll",type:"toggle",hide:!0,default:!0},{id:"ftArrowNavColor",label:"Nav. color",type:"color-picker-v2",default:"#FFFFFF"},{id:"ftArrowNavBorder",label:"Nav. border",type:"border",compoDefaultValue:{color:"line-3",borderType:"none",border:"solid",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!1}},{id:"ftArrowNavRadius",label:"Nav. corner",type:"radius-preset",default:{btrr:"9999px",bblr:"9999px",bbrr:"9999px",btlr:"9999px",radiusType:"circle"}},{id:"ftArrowNavShadow",type:"shadow-v2"},{id:"ftDotStyle",label:"Dot style",type:"option:illustration",enableTooltip:!0,tooltipPosition:"bottom",options:[{label:"None",value:"none",type:"carousel-dot",hide:!0},{label:"Inside",value:"inside",type:"carousel-dot",svgName:"gp-carousel-dot-inside"},{label:"Outside",value:"outside",type:"carousel-dot",svgName:"gp-carousel-dot-outside"}],devices:{desktop:{default:"none"}}},{id:"ftDotSize",label:"Dots size",type:"input:stepper",min:1,devices:{desktop:{default:16}}},{id:"ftDotGapToCarousel",label:"Gap to carousel",type:"input:slider",min:0,max:80,isNumber:!0,ignoreMax:!0,devices:{desktop:{default:16}}},{id:"ftDotColor",label:"Dot color",type:"color-picker-v2",devices:{desktop:{default:"#121212"}}},{id:"ftDotActiveColor",label:"Dot color active",type:"color-picker-v2",devices:{desktop:{default:"#FFFFFF"}}}],productSelectDisplaySetting=[{id:"typeDisplay",type:"select",options:[{title:"All images",value:"all-images"},{title:"Select manually",value:"select-manual"}],default:"all-images"},{id:"preDisplay",type:"select",label:"Pre-display",default:"1st-available-variant",options:[{title:"1st available variant",value:"1st-available-variant"},{title:"1st image",value:"1st-images"},{title:"1st video",value:"1st-video"},{title:"1st 3D model",value:"1st-3d-mode"}]}],productFeatureImageStyle=[{id:"ftShape",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",shapeValue:"1/1",width:"100%",height:void 0,shapeLinked:!0}}},settingConfig:{width:{displayOptions:["full"]}},hiddenSettings:["padding","gap"]},{id:"ftLayout",type:"option:illustration",enableTooltip:!0,label:"Image scale",options:[{label:"Fill image",value:"cover",type:"image",svgName:"gp-image-cover"},{label:"Fit image",value:"contain",type:"image",svgName:"gp-image-contain"}],devices:getDefaultResponsive("cover")},{id:"ftCorner",type:"radius-preset",label:"Corner",default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},state:{hover:!0,normal:!0}}];export{productFeatureImageSetting,productFeatureImageStyle,productSelectDisplaySetting};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getStyleBackgroundByDevice as
|
|
1
|
+
import{getStyleBackgroundByDevice as e,getGradientBgrStyleByDevice as t,makeStyleResponsive as r,makeWidth as l,makeStyle as o,getSingleColorVariable as a,getGlobalColorStateStyle as i,handleConvertBorderStyle as n,handleConvertBorderWidth as b,handleConvertBorderColor as s}from"@gem-sdk/core";import{filterTruthyStyles as c}from"../../helpers.js";import{getStyleWidthByPositionResponsive as m}from"./helpers.js";let getStyleWrapper=(o,a)=>{let{background:i,containWidth:n,align:b}=o??{},s={...a,...e(i),...t(i,{desktop:!0,tablet:!0,mobile:!0}),...r("w",l(n)),...r("as",b)};return c(s)},getTabListStyle=e=>{let{panelAlign:t}=e??{},l={...r("jc",t),...r("w",{desktop:"100%",tablet:"100%",mobile:"100%"})};return c(l)},getItemStyle=(e,t)=>{let{labelColor:l,labelBgColor:p,borderTab:g,labelAlign:d,enableActiveEffect:y,panelWidth:S,position:h,panelFullWidth:v,labelWidth:j}=e??{},u={},w=!0===y||void 0===y;return u={...u=t&&w?{...r("jc",d),...o({c:a(l?.active??l?.normal),bgc:a(p?.active??p?.normal),bs:g?.active?.border??g?.normal?.border,bw:g?.active?.width??g?.normal?.width,bc:a(g?.active?.color??g?.normal?.color)})}:{...r("jc",d),...i("c",l),...i("bgc",p),...n(g),...b(g),...s(g)},...r("w",m({position:h,panelFullWidth:v,panelWidth:S,labelWidth:j}))},e?.enableHoverEffect||(u=Object.fromEntries(Object.entries(u).filter(([e])=>!e.startsWith("--hvr")))),c(u)},getTabParentListStyle=e=>{let{panelAlign:t,panelAlignVertical:l}=e??{},o={...r("jc",t),...r("ai",l)};return c(o)},getContainContentStyle=()=>{let e={};return o({w:"100%"})&&(e={...o({w:"100%"})}),c(e)},getTabItemStyle=(e,t)=>{let r={...e,...o({h:"100%",v:t?"visible":"hidden",pos:t?"relative":"absolute"})};return c(r)};export{getContainContentStyle,getItemStyle,getStyleWrapper,getTabItemStyle,getTabListStyle,getTabParentListStyle};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as m}from"react/jsx-runtime";import{isEmptyChildren as o}from"@gem-sdk/core";import r from"../../grid/components/ChildrenDroppable.js";import{createStyle as e,createClass as t}from"@gem-sdk/system";import{getTabItemClasses as s}from"../common/classes.js";import{getTabItemStyle as i}from"../common/styles.js";let TabItem=l=>{let{children:p,builderAttrs:a,className:c,parentUid:d,isActive:n,style:f}=l,j=e({...i(f)}),u=t({...s({parentUid:d,className:c,isNotLiquid:!0,isActive:n})});return m("div",{...a,className:u,style:j,children:o(p)?m(r,{}):p})};export{TabItem as default};
|
|
2
|
+
import{jsx as m}from"react/jsx-runtime";import{isEmptyChildren as o}from"@gem-sdk/core";import r from"../../grid/components/ChildrenDroppable.js";import{createStyle as e,createClass as t}from"@gem-sdk/system";import{getTabItemClasses as s}from"../common/classes.js";import{getTabItemStyle as i}from"../common/styles.js";let TabItem=l=>{let{children:p,builderAttrs:a,className:c,parentUid:d,isActive:n,style:f}=l,j=e({...i(f,n)}),u=t({...s({parentUid:d,className:c,isNotLiquid:!0,isActive:n})});return m("div",{...a,className:u,style:j,children:o(p)?m(r,{}):p})};export{TabItem as default};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{template as m}from"@gem-sdk/core";import{createStyle as s,createClass as
|
|
1
|
+
import{template as m}from"@gem-sdk/core";import{createStyle as s,createClass as o}from"@gem-sdk/system";import{getTabItemClasses as t}from"../common/classes.js";import{getTabItemStyle as e}from"../common/styles.js";let TabItem=r=>{let{children:i,builderAttrs:l,className:a,parentUid:d,style:c,isActive:f}=r,p=s({...e(c,f)}),$=o({...t({parentUid:d,className:a,isNotLiquid:!1,isActive:f})});return m`
|
|
2
2
|
<div
|
|
3
3
|
${{...l}}
|
|
4
|
-
class="${
|
|
5
|
-
style="${
|
|
4
|
+
class="${$}"
|
|
5
|
+
style="${p}"
|
|
6
6
|
>
|
|
7
7
|
${i}
|
|
8
8
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{template as s,WrapRenderChildren as t,RenderChildren as e,RenderIf as l,isLocalEnv as
|
|
1
|
+
import{template as s,WrapRenderChildren as t,RenderChildren as e,RenderIf as l,isLocalEnv as i,baseAssetURL as a}from"@gem-sdk/core";import{getDynamicSourceLocales as r,getSettingPreloadData as d}from"../../helpers.js";import{createStateOrContext as o,createAttr as p,createStyle as c,createClass as m}from"@gem-sdk/system";import{getAttr as $,getAttrContent as n}from"../common/attrs.js";import u from"../../text/components/Text.liquid.js";import{getStyleWrapper as y,getTabParentListStyle as g,getTabListStyle as v,getContainContentStyle as f,getItemStyle as b}from"../common/styles.js";import{getClassesWrapper as x,getContainClasses as h,getStyleTagClasses as j,getTabParentListClasses as T,getTabListClasses as k,getWrapperContentClasses as A,getContainContentClasses as S,getTextClasses as C,getItemClasses as E}from"../common/classes.js";let Tabs=N=>{let{builderProps:I,style:P,setting:V,advanced:_,rawChildren:q}=N;delete V?.labelTypoV2?.attrs?.color;let{cssClass:z}=_??{},{panelWidth:G,childItem:K,labelAlign:O,labelTypo:W,labelTypoV2:F}=V??{},J=o({setting:V,builderProps:I}),L=void 0;V&&!V?.labelWidth&&(V.labelWidth={desktop:"200px"});let M=p({...$({uid:I?.uid||""})}),R=c({...y(V,P)}),U=m({...x({builderProps:I,advancedCssClass:z})}),w=m({...h({setting:V})}),B=j({panelWidth:G,builderProps:I}),D=m({...T()}),H=c({...g(V)}),Q=m({...k({setting:V})}),X=c({...v(V)}),Y=s=>m({...E({setting:V,isNotLiquid:!1,isActive:s,currentDevice:L})}),Z=s=>c({...b(V,s)}),ss=m({...A()}),st=m({...S()}),se=c({...f()}),sl=p({...n({uid:I?.uid||""})}),si=m({...C()}),sa=()=>K?.map(s=>s?.replaceAll("'","'"))?.map((t,e)=>{let l=e===V?.activeKey,i=r({val:t,uid:I?.uid,settingId:`childItem_${e}`,pageContext:N.pageContext,isCapitalize:V?.labelTypoV2?.attrs?.transform==="capitalize",translate:V?.translate});return s`
|
|
2
2
|
<li
|
|
3
3
|
aria-hidden
|
|
4
4
|
class="${Y(l)}"
|
|
@@ -6,19 +6,19 @@ import{template as s,WrapRenderChildren as t,RenderChildren as e,RenderIf as l,i
|
|
|
6
6
|
key="${I?.uid}"
|
|
7
7
|
|
|
8
8
|
>
|
|
9
|
-
${u({className:
|
|
9
|
+
${u({className:si,styles:{typo:F,typography:W,textAlign:O},setting:{text:i,htmlTag:"div",excludeFlex:!0}})}
|
|
10
10
|
</li>
|
|
11
|
-
`}).join(""),sr=()=>t({uid:I?.uid||"",customProps:q?.[0].customProps},q?.map(t=>t?s`${e({...t,parentUid:I?.uid})}`:"")),sd=()=>l(
|
|
11
|
+
`}).join(""),sr=()=>t({uid:I?.uid||"",customProps:q?.[0].customProps},q?.map((t,l)=>{let i=l===V?.activeKey;return t?s`${e({...t,parentUid:I?.uid,isActive:i})}`:""})),sd=()=>l(i,`<script ${d('class="gps-link" delay',"src")}="{{ 'gp-tab.js' | asset_url }}" defer="defer"></script>`,`<script ${d('class="gps-link" delay',"src")}="${a}/assets-v2/gp-tab.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);return s`
|
|
12
12
|
<gp-tab
|
|
13
13
|
${{...M}}
|
|
14
14
|
style="${R}"
|
|
15
15
|
class="${U}"
|
|
16
|
-
gp-data='${JSON.stringify(
|
|
16
|
+
gp-data='${JSON.stringify(J)?.replaceAll("'","'")}'>
|
|
17
17
|
<style>${B}</style>
|
|
18
18
|
<div class="${w}">
|
|
19
19
|
<div class="${D}" style="${H}">
|
|
20
20
|
<ul class="${Q}" style="${X}">
|
|
21
|
-
${
|
|
21
|
+
${sa()}
|
|
22
22
|
</ul>
|
|
23
23
|
</div>
|
|
24
24
|
<div class="${ss}">
|