@gem-sdk/components 2.0.0-staging.737 → 2.0.0-staging.739

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.
Files changed (33) hide show
  1. package/dist/cjs/banner/components/common/common.js +1 -1
  2. package/dist/cjs/banner/components/common/getStyle.js +1 -1
  3. package/dist/cjs/banner/components/hooks/useHeroBanner.js +1 -1
  4. package/dist/cjs/banner/setting/setting.js +2 -2
  5. package/dist/cjs/banner/setting/uiV2.js +1 -1
  6. package/dist/cjs/button/components/common/styles.js +7 -7
  7. package/dist/cjs/button/setting/configs/settings.js +1 -1
  8. package/dist/cjs/button/setting/configs/uiV2.js +1 -1
  9. package/dist/cjs/coupon/setting/config/uiV2.js +1 -1
  10. package/dist/cjs/form/setting/submit-button/configs/uiV2.js +1 -1
  11. package/dist/cjs/product/components/ProductButton/common/styles.js +1 -1
  12. package/dist/cjs/product/setting/dynamic-checkout/configs/uiV2.js +1 -1
  13. package/dist/cjs/product/setting/product-button/configs/settings.js +1 -1
  14. package/dist/cjs/product/setting/product-button/configs/uiV2.js +1 -1
  15. package/dist/cjs/product/setting/product-view-more/configs/uiV2.js +1 -1
  16. package/dist/cjs/sticky/components/Sticky.js +1 -1
  17. package/dist/esm/banner/components/common/common.js +1 -1
  18. package/dist/esm/banner/components/common/getStyle.js +1 -1
  19. package/dist/esm/banner/components/hooks/useHeroBanner.js +1 -1
  20. package/dist/esm/banner/setting/setting.js +2 -2
  21. package/dist/esm/banner/setting/uiV2.js +1 -1
  22. package/dist/esm/button/components/common/styles.js +11 -11
  23. package/dist/esm/button/setting/configs/settings.js +1 -1
  24. package/dist/esm/button/setting/configs/uiV2.js +1 -1
  25. package/dist/esm/coupon/setting/config/uiV2.js +1 -1
  26. package/dist/esm/form/setting/submit-button/configs/uiV2.js +1 -1
  27. package/dist/esm/product/components/ProductButton/common/styles.js +1 -1
  28. package/dist/esm/product/setting/dynamic-checkout/configs/uiV2.js +1 -1
  29. package/dist/esm/product/setting/product-button/configs/settings.js +1 -1
  30. package/dist/esm/product/setting/product-button/configs/uiV2.js +1 -1
  31. package/dist/esm/product/setting/product-view-more/configs/uiV2.js +1 -1
  32. package/dist/esm/sticky/components/Sticky.js +1 -1
  33. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";const SettingUIV2=[{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{id:"Height",label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",label:"height",inputType:"number",units:["px"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}}}]},{label:{en:"Background"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"normal"}},{label:{en:"Image"},setting:{id:"backgroundImage",state:"normal"}}]},{label:{en:"Shape"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"normal"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"normal"},options:{updateFields:[{field:"enable",settingId:"hasBoxShadowBtn",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.normal.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"styles",controlType:"styles",state:"normal",newValue:!0}},{condition:"boxShadowBtn.normal.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"styles",controlType:"styles",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"Icon"},setting:{id:"iconVisible"},options:{labelVariant:"primary",toggleStyle:"switch"}},{label:{en:"Icon"},setting:{id:"iconSvg"},conditionDisplay:"iconVisible == true"},{type:"control",label:{en:"Position"},setting:{id:"iconAlign"},conditionDisplay:"iconVisible == true"},{type:"control",label:{en:"Gap"},setting:{id:"iconSpacing"},conditionDisplay:"iconVisible == true"}]},{controls:[{label:{en:"Text"},setting:{id:"enableTextStyle"},options:{labelVariant:"primary",toggleStyle:"switch"},controlChangeTrigger:{settings:[{condition:'enableTextStyle === true && label === ""',source:["enableTextStyle","label"],action:{controlId:"label",groupType:"setting",controlType:"setting",newValue:"<p>View more</p>"}}],options:{noRecordHistory:!0}}},{id:"typo",label:{en:"Basic"},setting:{id:"typo"},conditionDisplay:"enableTextStyle == true",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:"Hover effect"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"hover"}},{label:{en:"Image"},setting:{id:"backgroundImage",state:"hover"}},{label:{en:"Text color"},setting:{id:"textColorHover",state:"hover"}}],moreSettings:{type:"collapse",controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"hover"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"hover"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"hover"},options:{updateFields:[{field:"enable",settingId:"hasBoxShadowBtn",state:"hover"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.hover.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"styles",controlType:"styles",state:"hover",newValue:!0}},{condition:"boxShadowBtn.normal.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"styles",controlType:"styles",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]}},{label:{en:"Redirect to"},controls:[{label:{en:"New tab"},setting:{id:"redirectNewTab"}}]},{controls:[{label:{en:"Align"},conditionEnable:'!(globalSize.width === "default" || (parseInt(globalSize.width) >= 100 && globalSize.width?.includes("%")))',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];exports.SettingUIV2=SettingUIV2;
1
+ "use strict";const SettingUIV2=[{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{id:"Height",label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",label:"height",inputType:"number",units:["px"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}}}]},{label:{en:"Background"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"normal"}},{label:{en:"Image"},setting:{id:"backgroundImage",state:"normal"}}]},{label:{en:"Shape"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"normal"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadowBtn",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.normal.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!0}},{condition:"boxShadowBtn.normal.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"Icon"},setting:{id:"iconVisible"},options:{labelVariant:"primary",toggleStyle:"switch"}},{label:{en:"Icon"},setting:{id:"iconSvg"},conditionDisplay:"iconVisible == true"},{type:"control",label:{en:"Position"},setting:{id:"iconAlign"},conditionDisplay:"iconVisible == true"},{type:"control",label:{en:"Gap"},setting:{id:"iconSpacing"},conditionDisplay:"iconVisible == true"}]},{controls:[{label:{en:"Text"},setting:{id:"enableTextStyle"},options:{labelVariant:"primary",toggleStyle:"switch"},controlChangeTrigger:{settings:[{condition:'enableTextStyle === true && label === ""',source:["enableTextStyle","label"],action:{controlId:"label",groupType:"setting",controlType:"setting",newValue:"<p>View more</p>"}}],options:{noRecordHistory:!0}}},{id:"typo",label:{en:"Basic"},setting:{id:"typo"},conditionDisplay:"enableTextStyle == true",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:"Hover effect"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"hover"}},{label:{en:"Image"},setting:{id:"backgroundImage",state:"hover"}},{label:{en:"Text color"},setting:{id:"textColorHover",state:"hover"}}],moreSettings:{type:"collapse",controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"hover"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"hover"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"hover"},options:{updateFields:[{field:"hover.enable",settingId:"hasBoxShadowBtn",state:"hover"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.hover.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!0}},{condition:"boxShadowBtn.hover.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!1}}],options:{noRecordHistory:!0}}}]}},{label:{en:"Redirect to"},controls:[{label:{en:"New tab"},setting:{id:"redirectNewTab"}}]},{controls:[{label:{en:"Align"},conditionEnable:'!(globalSize.width === "default" || (parseInt(globalSize.width) >= 100 && globalSize.width?.includes("%")))',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];exports.SettingUIV2=SettingUIV2;
@@ -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"),Head=require("next/head"),ChildrenDroppable=require("../../grid/components/ChildrenDroppable.js");require("react");var _const=require("../../common/const.js"),useSticky=require("./hooks/useSticky.js"),system=require("@gem-sdk/system"),styles=require("./common/styles.js"),classes=require("./common/classes.js");const Sticky=({children:e,builderAttrs:s,setting:t,style:r,builderProps:i,advanced:a})=>{let{background:l,preloadBgImage:n,width:m,isScrollToTop:c}=t??{},{positionStyle:d,displayStyle:u,makeDisplaySettingStyles:o}=useSticky.default(t),j=system.createStyle({margin:"0 auto",...u,...styles.getStylePadding(r),...d,zIndex:_const.ELEMENT_Z_INDEX.STICKY,...o}),x=system.createStyle(styles.getContentStyles({width:m,style:r,background:l})),y=system.createClass(classes.getContainerClasses({uid:i?.uid,isScrollToTop:c,cssClass:a?.cssClass,isLiquid:!1}));return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!!n&&jsxRuntime.jsxs(Head,{children:[!!l?.desktop?.image?.src&&jsxRuntime.jsx("link",{rel:"preload",href:l.desktop.image.src,as:"image"}),!!l?.tablet?.image?.src&&jsxRuntime.jsx("link",{rel:"preload",href:l.tablet.image.src,as:"image"}),!!l?.mobile?.image?.src&&jsxRuntime.jsx("link",{rel:"preload",href:l.mobile.image.src,as:"image"})]}),jsxRuntime.jsx("div",{className:y,id:i?.uid,style:j,children:jsxRuntime.jsx("div",{...s,"data-id":i?.uid,style:{...x},children:core.isEmptyChildren(e)?jsxRuntime.jsx(ChildrenDroppable.default,{}):e})})]})};exports.default=Sticky;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),Head=require("next/head"),ChildrenDroppable=require("../../grid/components/ChildrenDroppable.js");require("react");var _const=require("../../common/const.js"),useSticky=require("./hooks/useSticky.js"),system=require("@gem-sdk/system"),styles=require("./common/styles.js"),classes=require("./common/classes.js");const Sticky=({children:e,builderAttrs:s,setting:t,style:r,builderProps:i,advanced:a})=>{let l=core.useEditorMode(),{background:n,preloadBgImage:c,width:d,isScrollToTop:m}=t??{},{positionStyle:u,displayStyle:o,makeDisplaySettingStyles:j}=useSticky.default(t),x=system.createStyle({margin:"0 auto",...o,...styles.getStylePadding(r),...u,zIndex:_const.ELEMENT_Z_INDEX.STICKY,..."edit"!==l&&j}),y=system.createStyle(styles.getContentStyles({width:d,style:r,background:n})),g=system.createClass(classes.getContainerClasses({uid:i?.uid,isScrollToTop:m,cssClass:a?.cssClass,isLiquid:!1}));return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!!c&&jsxRuntime.jsxs(Head,{children:[!!n?.desktop?.image?.src&&jsxRuntime.jsx("link",{rel:"preload",href:n.desktop.image.src,as:"image"}),!!n?.tablet?.image?.src&&jsxRuntime.jsx("link",{rel:"preload",href:n.tablet.image.src,as:"image"}),!!n?.mobile?.image?.src&&jsxRuntime.jsx("link",{rel:"preload",href:n.mobile.image.src,as:"image"})]}),jsxRuntime.jsx("div",{className:g,id:i?.uid,style:x,children:jsxRuntime.jsx("div",{...s,"data-id":i?.uid,style:{...y},children:core.isEmptyChildren(e)?jsxRuntime.jsx(ChildrenDroppable.default,{}):e})})]})};exports.default=Sticky;
@@ -1 +1 @@
1
- import{getResponsiveValueByScreen as e,getAspectRatioGlobalSize as t,makeStyleResponsive as o,DEVICES as l,getValueByDevice as i,GRADIENT_BGR_KEY as n,cls as a}from"@gem-sdk/core";import{getImageSrc as s}from"../../../image/helpers/getSrcSet.js";import{HREF_TO_SALES_PAGE as r}from"../../../constant.js";import{createBlurDataURL as g}from"../../../image/components/common/helpers.js";let getContentPosition=(t,o,l)=>{let i={},n=["desktop","tablet","mobile"];return n.map(n=>{let a=e(t,n),s=e(o,n),r=e(l,n);i={...i,[n]:1>=(a?.cols?.length||1)?s:r}}),i},getAspectRatioSettings=(t,o)=>{let l={desktop:t?.desktop?.width,tablet:t?.tablet?.width,mobile:t?.mobile?.width},i={desktop:t?.desktop?.height,tablet:t?.tablet?.height,mobile:t?.mobile?.height},n={desktop:o?.desktop==="custom"?`${e(l,"desktop")}/${e(i,"desktop")}`:o?.desktop==="cover"?"unset":o?.desktop,tablet:o?.tablet==="custom"?`${e(l,"tablet")}/${e(i,"tablet")}`:o?.tablet==="cover"?"unset":o?.tablet,mobile:o?.mobile==="custom"?`${e(l,"mobile")}/${e(i,"mobile")}`:o?.mobile==="cover"?"unset":o?.mobile};return n},getEnableBgImageByDevice=(t,o)=>{if(!e(getBgImage(o),t))return!1;if(!o?.[t]){if("mobile"===t)return o?.tablet?.type==="image"||o?.desktop?.type==="image"&&!o?.tablet;if("tablet"===t)return o?.desktop?.type==="image"}return o?.[t]?.type==="image"},getBgImage=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},imagePlaceholder=e=>{let t=getBgImage(e);return{desktop:g(t?.desktop?.width??0,t?.desktop?.height??0),tablet:g(t?.tablet?.width??t?.desktop?.width??0,t?.tablet?.height??t?.desktop?.width??0),mobile:g(t?.mobile?.width??t?.tablet?.width??t?.desktop?.width??0,t?.mobile?.height??t?.tablet?.height??t?.desktop?.width??0)}},getBgImageByScreen=(t,o,l,i)=>{if(!t)return"";let a=getBgImage(t),r=e(t,o);return l&&!i?`url(${imagePlaceholder(t)[o]})`:r?.color?.includes(n)?"image"!==r.type?`${r.color}`:`url(${s(e(a,o),o,i)})${r?.color?`, ${r.color}`:""}`:r?.type==="image"?`url(${s(e(a,o),o,i)})`:void 0},getBackgroundImageHeroBanner=(e,t=!1,i=!1)=>{if(!e)return;let n={};return l.forEach(o=>{n={...n,[o]:getBgImageByScreen(e,o,t,i)}}),o("bgi",n)},getAttachmentDevice=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o]?.attachment;t={...t,[o]:"fixed"===l?"fixed":"absolute"}}),t},horizontalAlign=(e,t,o)=>mapContentPositionToHorizontal(getContentPosition(e,t,o)),scrollToContentBanner=e=>e?.target?.closest("div.gp-hero-banner-row")?.scrollTo(0,0),getDataVideoHeroBannerResponsive=(e,t)=>{switch(e){case"desktop":if(t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"tablet":if(t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.tablet&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"mobile":if(t?.mobile?.type==="video")return{device:"mobile",data:t.mobile};if(!t?.mobile&&t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.mobile&&!t?.tablet?.type&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop}}},getVisibilityStyle=e=>e?Object.keys(e).filter(e=>["--d","--d-tablet","--d-mobile"].includes(e)).reduce((t,o)=>({...t,[o]:e?.[o]!=="none"?"flex":e?.[o]}),{}):{},getStyleAspectRatioHeroBannerCustom=(l,i,n)=>{let a=t(i),s=["desktop","mobile","tablet"];return s.forEach(t=>{let o=e(i,t),s=!!getDataVideoHeroBannerResponsive(t,l),r=o?.shape,g=o?.height,p="original"===r&&"fit-content"!==g,b=p&&s;b&&(a={...a,[t]:"16/9"}),n&&n[t]&&getDataVideoHeroBannerResponsive(t,l)?.data?.videoType==="html5"&&(a={...a,[t]:n[t]})}),o("aspect",a)},mapContentPositionToHorizontal=e=>{let t={};for(let o in e)"top"===e[o]?t[o]="start":"bottom"===e[o]?t[o]="end":t[o]="center";return t},getDisplayStyleByFitContent=(t,l)=>{let i={desktop:"none",tablet:"none",mobile:"none"},n=["desktop","mobile","tablet"];return n.forEach(o=>{let n=e(t,o),a=!!getDataVideoHeroBannerResponsive(o,l),s=n?.shape,r=n?.height,g="original"===s&&"fit-content"!==r&&!a;i={...i,[o]:g?"block":"none"}}),o("d",i)},getWidth=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o];l&&(t={...t,[o]:"default"===l?"var(--g-ct-w, 1200px)":l})}),t},getPercentageVisible=(e,t)=>{let{top:o,height:l}=e,i=-l;if(o<i)return 0;if(o>t)return 100;let n=(o-i)/(t-i)*100;return Math.min(Math.max(n,0),100)},isScaleImage=({enableParallax:e=!1,attachment:t="scroll"})=>!!e||"fixed"===t,getHeightHeroBanner=(e,t)=>{let l={},i=["desktop","mobile","tablet"];return i.forEach(o=>{let i=isScaleImage({enableParallax:t,attachment:e[o]?.attachment});l={...l,[o]:t?"150%":i?"100vh":"100%"}}),o("h",l)},getWidthHeroBanner=(e,t)=>{let l={},i=["desktop","mobile","tablet"];return i.forEach(o=>{let i=isScaleImage({enableParallax:t,attachment:e[o]?.attachment});l={...l,[o]:i?"100vw":"100%"}}),o("w",l)},getTopHeroBanner=e=>{let t={},l=["desktop","mobile","tablet"];return l.forEach(o=>{t={...t,[o]:e[o]?.attachment==="fixed"?"0px":""}}),o("top",t)},getStyleHeroBannerBg=(e,t)=>{let o=getHeightHeroBanner(e,t),l=getWidthHeroBanner(e,t),i=getTopHeroBanner(e);return{...o,...l,...i}},calcRounderClipPath=(e,t=0,o=0)=>{let l=t,i=t;if(t>o?l=o:i=o,e>=999){let t=e-l;return t>0?t:0}let n=e-i;return n>0?n:0},getClipPath=(e,t)=>{if(!t||!e)return"inset(0 0 0)";let[o,l,i,n]=e.split(" ").map(e=>parseInt(e??"0")),{btlr:a,btrr:s,bbrr:r,bblr:g}=t,p=calcRounderClipPath(parseInt(a??"0"),o,n),b=calcRounderClipPath(parseInt(s??"0"),o,l),c=calcRounderClipPath(parseInt(r??"0"),l,i),d=calcRounderClipPath(parseInt(g??"0"),i,n);return`inset(0 0 0 round ${p}px ${b}px ${c}px ${d}px)`},getClassAlignBanner=e=>({"!gp-self-start":"left"===e.desktop,"!gp-self-center":"center"===e.desktop,"!gp-self-end":"right"===e.desktop,"tablet:!gp-self-start":"left"===e.tablet,"tablet:!gp-self-center":"center"===e.tablet,"tablet:!gp-self-end":"right"===e.tablet,"mobile:!gp-self-start":"left"===e.mobile,"mobile:!gp-self-center":"center"===e.mobile,"mobile:!gp-self-end":"right"===e.mobile}),getClassSpaceBetween=(e,t,o)=>{let l=getResponsiveSetting(e),i=getResponsiveSetting(t),n=getResponsiveSetting(o),a=1>=(l?.desktop?.cols?.length||1)?i.desktop:n.desktop,s=1>=(l?.tablet?.cols?.length||1)?i.tablet:n.tablet,r=1>=(l?.mobile?.cols?.length||1)?i.mobile:n.mobile;return{"gp-h-full !gp-content-stretch [&>*]:!gp-justify-between":l.desktop?.cols?.length===1&&"space-between"===a,"!gp-content-stretch [&>*]:!gp-justify-start":l.desktop?.cols?.length===1&&"top"===a,"tablet:gp-h-full tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-between":l.tablet?.cols?.length===1&&"space-between"===s,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-start":l.tablet?.cols?.length===1&&"top"===s,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-center":l.tablet?.cols?.length===1&&"center"===s,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-end":l.tablet?.cols?.length===1&&"bottom"===s,"mobile:gp-h-full mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-between":l.mobile?.cols?.length===1&&"space-between"===r,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-start":l.mobile?.cols?.length===1&&"top"===r,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-center":l.mobile?.cols?.length===1&&"center"===r,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-end":l.mobile?.cols?.length===1&&"bottom"===r}},getClassSpaceBetweenLeftRight=e=>{let t=getResponsiveSetting(e),o=t?.desktop?.type=="left-distributed"||t?.desktop?.type=="right-distributed",l=t?.tablet?.type=="left-distributed"||t?.tablet?.type=="right-distributed",i=t?.mobile?.type=="left-distributed"||t?.mobile?.type=="right-distributed";return{"gp-h-full [&>*]:!gp-justify-between":o,"tablet:gp-h-full tablet:[&>*]:!gp-justify-between":l,"mobile:gp-h-full mobile:[&>*]:!gp-justify-between":i}},getClassForStretchContent=t=>{let o={desktop:"none",tablet:"none",mobile:"none"},l=["desktop","mobile","tablet"];return l.forEach(l=>{let i=e(t,l);o={...o,[l]:i}}),a("space-between"===o.desktop?"[&>*>*]:!gp-justify-between":"","space-between"===o.tablet?"tablet:[&>*>*]:!gp-justify-between ":`tablet:[&>*>*]:!gp-justify-${t?.tablet}`,"space-between"===o.mobile?"mobile:[&>*>*]:!gp-justify-between ":`mobile:[&>*>*]:!gp-justify-${t?.mobile}`)},getClassForContentByFitContent=(t,o)=>{let l={desktop:!1,tablet:!1,mobile:!1},i=["desktop","mobile","tablet"];return i.forEach(i=>{let n=e(t,i),a=!!getDataVideoHeroBannerResponsive(i,o),s=n?.shape,r=n?.height,g="original"===s&&"fit-content"!==r;l={...l,[i]:g&&!a}}),a(l.desktop?"!gp-absolute":"",l.tablet?"tablet:!gp-absolute":"tablet:!gp-relative",l.mobile?"mobile:!gp-absolute":"mobile:!gp-relative")},getClassContentPosition=e=>{let t={center:"center",top:"start",bottom:"end","space-between":"between"},o=e.desktop||"center",l=e.tablet||o,i=e.mobile||l;return{[`gp-justify-${t[o||"center"]}`]:!!o,[`tablet:gp-justify-${t[l||"center"]}`]:!!l,[`mobile:gp-justify-${t[i||"center"]}`]:!!i}},getResponsiveSetting=e=>{let t=e.desktop,o=e.tablet?e.tablet:t,l=e.mobile?e.mobile:o;return{desktop:t,tablet:o,mobile:l}},showVideoType=e=>{let t=["desktop","tablet","mobile"];return t.some(t=>{let o=i(e,t);return o?.type!=="color"&&o?.type!=="image"&&!!o&&(o?.videoType==="html5"&&o?.videoHtml5||o?.videoType==="youtube"&&o?.video)})};function debounce(e,t){let o;return function(...l){clearTimeout(o),o=setTimeout(()=>e.apply(this,l),t)}}let fallbackImg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",getBannerLink=e=>{let t=e?.link;return t?.type==="go-to-sales-page"?{type:"go-to-sales-page",link:r,target:"_self"}:t};export{debounce,fallbackImg,getAspectRatioSettings,getAttachmentDevice,getBackgroundImageHeroBanner,getBannerLink,getBgImage,getClassAlignBanner,getClassContentPosition,getClassForContentByFitContent,getClassForStretchContent,getClassSpaceBetween,getClassSpaceBetweenLeftRight,getClipPath,getContentPosition,getDataVideoHeroBannerResponsive,getDisplayStyleByFitContent,getEnableBgImageByDevice,getPercentageVisible,getResponsiveSetting,getStyleAspectRatioHeroBannerCustom,getStyleHeroBannerBg,getVisibilityStyle,getWidth,horizontalAlign,imagePlaceholder,isScaleImage,mapContentPositionToHorizontal,scrollToContentBanner,showVideoType};
1
+ import{getResponsiveValueByScreen as e,getAspectRatioGlobalSize as t,makeStyleResponsive as o,DEVICES as l,getValueByDevice as i,GRADIENT_BGR_KEY as n,cls as a}from"@gem-sdk/core";import{getImageSrc as s}from"../../../image/helpers/getSrcSet.js";import{HREF_TO_SALES_PAGE as r}from"../../../constant.js";import{createBlurDataURL as g}from"../../../image/components/common/helpers.js";let getContentPosition=(t,o,l)=>{let i={},n=["desktop","tablet","mobile"];return n.map(n=>{let a=e(t,n),s=e(o,n),r=e(l,n);i={...i,[n]:1>=(a?.cols?.length||1)?s:r}}),i},getAspectRatioSettings=(t,o)=>{let l={desktop:t?.desktop?.width,tablet:t?.tablet?.width,mobile:t?.mobile?.width},i={desktop:t?.desktop?.height,tablet:t?.tablet?.height,mobile:t?.mobile?.height},n={desktop:o?.desktop==="custom"?`${e(l,"desktop")}/${e(i,"desktop")}`:o?.desktop==="cover"?"unset":o?.desktop,tablet:o?.tablet==="custom"?`${e(l,"tablet")}/${e(i,"tablet")}`:o?.tablet==="cover"?"unset":o?.tablet,mobile:o?.mobile==="custom"?`${e(l,"mobile")}/${e(i,"mobile")}`:o?.mobile==="cover"?"unset":o?.mobile};return n},getEnableBgImageByDevice=(t,o)=>{if(!e(getBgImage(o),t))return!1;if(!o?.[t]){if("mobile"===t)return o?.tablet?.type==="image"||o?.desktop?.type==="image"&&!o?.tablet;if("tablet"===t)return o?.desktop?.type==="image"}return o?.[t]?.type==="image"},getBgImage=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},imagePlaceholder=e=>{let t=getBgImage(e);return{desktop:g(t?.desktop?.width??0,t?.desktop?.height??0),tablet:g(t?.tablet?.width??t?.desktop?.width??0,t?.tablet?.height??t?.desktop?.width??0),mobile:g(t?.mobile?.width??t?.tablet?.width??t?.desktop?.width??0,t?.mobile?.height??t?.tablet?.height??t?.desktop?.width??0)}},getBgImageByScreen=(t,o,l,i)=>{if(!t)return"";let a=getBgImage(t),r=e(t,o),g=l?`url(${imagePlaceholder(t)[o]})`:`url(${s(e(a,o),o,i)})`,p=r?.color?`, ${r.color}`:"";return r?.color?.includes(n)&&r?.type==="image"?`${g}${p}`:r?.color?.includes(n)&&r?.type!=="image"?`${r.color}`:r?.type==="image"?g:"url()"},getBackgroundImageHeroBanner=(e,t=!1,i=!1)=>{if(!e)return;let n={};return l.forEach(o=>{n={...n,[o]:getBgImageByScreen(e,o,t,i)}}),o("bgi",n)},getAttachmentDevice=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o]?.attachment;t={...t,[o]:"fixed"===l?"fixed":"absolute"}}),t},horizontalAlign=(e,t,o)=>mapContentPositionToHorizontal(getContentPosition(e,t,o)),scrollToContentBanner=e=>e?.target?.closest("div.gp-hero-banner-row")?.scrollTo(0,0),getDataVideoHeroBannerResponsive=(e,t)=>{switch(e){case"desktop":if(t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"tablet":if(t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.tablet&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"mobile":if(t?.mobile?.type==="video")return{device:"mobile",data:t.mobile};if(!t?.mobile&&t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.mobile&&!t?.tablet?.type&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop}}},getVisibilityStyle=e=>e?Object.keys(e).filter(e=>["--d","--d-tablet","--d-mobile"].includes(e)).reduce((t,o)=>({...t,[o]:e?.[o]!=="none"?"flex":e?.[o]}),{}):{},getStyleAspectRatioHeroBannerCustom=(l,i,n)=>{let a=t(i),s=["desktop","mobile","tablet"];return s.forEach(t=>{let o=e(i,t),s=!!getDataVideoHeroBannerResponsive(t,l),r=o?.shape,g=o?.height,p="original"===r&&"fit-content"!==g,b=p&&s;b&&(a={...a,[t]:"16/9"}),n&&n[t]&&getDataVideoHeroBannerResponsive(t,l)?.data?.videoType==="html5"&&(a={...a,[t]:n[t]})}),o("aspect",a)},mapContentPositionToHorizontal=e=>{let t={};for(let o in e)"top"===e[o]?t[o]="start":"bottom"===e[o]?t[o]="end":t[o]="center";return t},getDisplayStyleByFitContent=(t,l)=>{let i={desktop:"none",tablet:"none",mobile:"none"},n=["desktop","mobile","tablet"];return n.forEach(o=>{let n=e(t,o),a=!!getDataVideoHeroBannerResponsive(o,l),s=n?.shape,r=n?.height,g="original"===s&&"fit-content"!==r&&!a;i={...i,[o]:g?"block":"none"}}),o("d",i)},getWidth=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o];l&&(t={...t,[o]:"default"===l?"var(--g-ct-w, 1200px)":l})}),t},getPercentageVisible=(e,t)=>{let{top:o,height:l}=e,i=-l;if(o<i)return 0;if(o>t)return 100;let n=(o-i)/(t-i)*100;return Math.min(Math.max(n,0),100)},isScaleImage=({enableParallax:e=!1,attachment:t="scroll"})=>!!e||"fixed"===t,getHeightHeroBanner=(e,t)=>{let l={},i=["desktop","mobile","tablet"];return i.forEach(o=>{let i=isScaleImage({enableParallax:t,attachment:e[o]?.attachment});l={...l,[o]:t?"150%":i?"100vh":"100%"}}),o("h",l)},getWidthHeroBanner=(e,t)=>{let l={},i=["desktop","mobile","tablet"];return i.forEach(o=>{let i=isScaleImage({enableParallax:t,attachment:e[o]?.attachment});l={...l,[o]:i?"100vw":"100%"}}),o("w",l)},getTopHeroBanner=e=>{let t={},l=["desktop","mobile","tablet"];return l.forEach(o=>{t={...t,[o]:e[o]?.attachment==="fixed"?"0px":""}}),o("top",t)},getStyleHeroBannerBg=(e,t)=>{let o=getHeightHeroBanner(e,t),l=getWidthHeroBanner(e,t),i=getTopHeroBanner(e);return{...o,...l,...i}},calcRounderClipPath=(e,t=0,o=0)=>{let l=t,i=t;if(t>o?l=o:i=o,e>=999){let t=e-l;return t>0?t:0}let n=e-i;return n>0?n:0},getClipPath=(e,t)=>{if(!t||!e)return"inset(0 0 0)";let[o,l,i,n]=e.split(" ").map(e=>parseInt(e??"0")),{btlr:a,btrr:s,bbrr:r,bblr:g}=t,p=calcRounderClipPath(parseInt(a??"0"),o,n),b=calcRounderClipPath(parseInt(s??"0"),o,l),c=calcRounderClipPath(parseInt(r??"0"),l,i),d=calcRounderClipPath(parseInt(g??"0"),i,n);return`inset(0 0 0 round ${p}px ${b}px ${c}px ${d}px)`},getClassAlignBanner=e=>({"!gp-self-start":"left"===e.desktop,"!gp-self-center":"center"===e.desktop,"!gp-self-end":"right"===e.desktop,"tablet:!gp-self-start":"left"===e.tablet,"tablet:!gp-self-center":"center"===e.tablet,"tablet:!gp-self-end":"right"===e.tablet,"mobile:!gp-self-start":"left"===e.mobile,"mobile:!gp-self-center":"center"===e.mobile,"mobile:!gp-self-end":"right"===e.mobile}),getClassSpaceBetween=(e,t,o)=>{let l=getResponsiveSetting(e),i=getResponsiveSetting(t),n=getResponsiveSetting(o),a=1>=(l?.desktop?.cols?.length||1)?i.desktop:n.desktop,s=1>=(l?.tablet?.cols?.length||1)?i.tablet:n.tablet,r=1>=(l?.mobile?.cols?.length||1)?i.mobile:n.mobile;return{"!gp-h-full !gp-content-stretch [&>*]:!gp-justify-between":l.desktop?.cols?.length===1&&"space-between"===a,"!gp-content-stretch [&>*]:!gp-justify-start":l.desktop?.cols?.length===1&&"top"===a,"tablet:!gp-h-full tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-between":l.tablet?.cols?.length===1&&"space-between"===s,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-start":l.tablet?.cols?.length===1&&"top"===s,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-center":l.tablet?.cols?.length===1&&"center"===s,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-end":l.tablet?.cols?.length===1&&"bottom"===s,"mobile:!gp-h-full mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-between":l.mobile?.cols?.length===1&&"space-between"===r,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-start":l.mobile?.cols?.length===1&&"top"===r,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-center":l.mobile?.cols?.length===1&&"center"===r,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-end":l.mobile?.cols?.length===1&&"bottom"===r}},getClassSpaceBetweenLeftRight=e=>{let t=getResponsiveSetting(e),o=t?.desktop?.type=="left-distributed"||t?.desktop?.type=="right-distributed",l=t?.tablet?.type=="left-distributed"||t?.tablet?.type=="right-distributed",i=t?.mobile?.type=="left-distributed"||t?.mobile?.type=="right-distributed";return{"!gp-h-full [&>*]:!gp-justify-between":o,"tablet:!gp-h-full tablet:[&>*]:!gp-justify-between":l,"mobile:!gp-h-full mobile:[&>*]:!gp-justify-between":i}},getClassForStretchContent=t=>{let o={desktop:"none",tablet:"none",mobile:"none"},l=["desktop","mobile","tablet"];return l.forEach(l=>{let i=e(t,l);o={...o,[l]:i}}),a("space-between"===o.desktop?"[&>*>*]:!gp-justify-between":"","space-between"===o.tablet?"tablet:[&>*>*]:!gp-justify-between ":`tablet:[&>*>*]:!gp-justify-${t?.tablet}`,"space-between"===o.mobile?"mobile:[&>*>*]:!gp-justify-between ":`mobile:[&>*>*]:!gp-justify-${t?.mobile}`)},getClassForContentByFitContent=(t,o)=>{let l={desktop:!1,tablet:!1,mobile:!1},i=["desktop","mobile","tablet"];return i.forEach(i=>{let n=e(t,i),a=!!getDataVideoHeroBannerResponsive(i,o),s=n?.shape,r=n?.height,g="original"===s&&"fit-content"!==r;l={...l,[i]:g&&!a}}),a(l.desktop?"!gp-absolute":"",l.tablet?"tablet:!gp-absolute":"tablet:!gp-relative",l.mobile?"mobile:!gp-absolute":"mobile:!gp-relative")},getClassContentPosition=e=>{let t={center:"center",top:"start",bottom:"end","space-between":"between"},o=e.desktop||"center",l=e.tablet||o,i=e.mobile||l;return{[`gp-justify-${t[o||"center"]}`]:!!o,[`tablet:gp-justify-${t[l||"center"]}`]:!!l,[`mobile:gp-justify-${t[i||"center"]}`]:!!i}},getResponsiveSetting=e=>{let t=e.desktop,o=e.tablet?e.tablet:t,l=e.mobile?e.mobile:o;return{desktop:t,tablet:o,mobile:l}},showVideoType=e=>{let t=["desktop","tablet","mobile"];return t.some(t=>{let o=i(e,t);return o?.type!=="color"&&o?.type!=="image"&&!!o&&(o?.videoType==="html5"&&o?.videoHtml5||o?.videoType==="youtube"&&o?.video)})};function debounce(e,t){let o;return function(...l){clearTimeout(o),o=setTimeout(()=>e.apply(this,l),t)}}let fallbackImg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",getBannerLink=e=>{let t=e?.link;return t?.type==="go-to-sales-page"?{type:"go-to-sales-page",link:r,target:"_self"}:t};export{debounce,fallbackImg,getAspectRatioSettings,getAttachmentDevice,getBackgroundImageHeroBanner,getBannerLink,getBgImage,getClassAlignBanner,getClassContentPosition,getClassForContentByFitContent,getClassForStretchContent,getClassSpaceBetween,getClassSpaceBetweenLeftRight,getClipPath,getContentPosition,getDataVideoHeroBannerResponsive,getDisplayStyleByFitContent,getEnableBgImageByDevice,getPercentageVisible,getResponsiveSetting,getStyleAspectRatioHeroBannerCustom,getStyleHeroBannerBg,getVisibilityStyle,getWidth,horizontalAlign,imagePlaceholder,isScaleImage,mapContentPositionToHorizontal,scrollToContentBanner,showVideoType};
@@ -1 +1 @@
1
- import{makeStyleResponsive as t,getHeightByShapeGlobalSize as e,makeStyleWithDefault as r,getWidthByShapeGlobalSize as l,makeStyle as o,getSingleColorVariable as i,getRadiusStyleActiveState as n,getStyleShadow as y,getGlobalColorStateStyle as g,makeStyleState as u,getResponsiveStylePadding as a,getStyleBackgroundByDevice as c}from"@gem-sdk/core";import{getVisibilityStyle as s,getStyleAspectRatioHeroBannerCustom as S,getAspectRatioSettings as d,getDisplayStyleByFitContent as h,getStyleHeroBannerBg as m,getAttachmentDevice as p,getClipPath as b,getResponsiveSetting as f}from"./common.js";function filterTruthyStyles(t){return Object.fromEntries(Object.entries(t||{}).filter(([,t])=>!!t))}let getStyle=(o,i,n)=>{let{sizeSetting:y,background:g}=o??{},{ratioOptions:u,aspectRatio:a}=i??{},c={...n,...s(n),...t("h",e(y)),...r("w",l(y,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),...S(g,y,d(u,a))};return filterTruthyStyles(c)},getContainerStyle=(r,l)=>{let{sizeSetting:g,background:u,borderBg:a,cornerBg:c,shadowBg:s,hasActiveShadow:h}=r??{},{ratioOptions:m,aspectRatio:p}=l??{},b={...t("h",e(g)),...S(u,g,d(m,p)),...o({bs:a?.border??a?.border,bw:a?.width??a?.width,bc:i(a?.color)}),...n({...c,active:{...c||{},radiusType:"custom"}}),...y({value:s,styleAppliedFor:"box-shadow",isEnableShadow:h})};return filterTruthyStyles(b)},getOverlayStyle=t=>{let{overlayColor:e,overlayOpacity:r,hoverEffect:l}=t??{},o=g("bgc",e),i=u("op",r);e?.normal&&r?.normal!="0%"||(delete o?.["--bgc"],delete i?.["--op"]),e?.hover&&r?.hover!="0%"&&l||(delete o?.["--hvr-bgc"],delete i?.["--hvr-op"]);let n={...o,...i,"--top":"0","--left":"0"};return filterTruthyStyles(n)},getRowStyle=t=>{let{contentPadding:e}=t??{},r={...a(e)};return filterTruthyStyles(r)},getAdaptiveStyle=o=>{let{sizeSetting:i,background:n}=o??{},y={...h(i,n),...t("h",e(i)),...r("w",l(i,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),"--op":0,"--z":-1};return filterTruthyStyles(y)},getBackgroundStyle=(e,r,l)=>{let{hoverEffectScale:o,background:i,hoverEffectDuration:n}=e??{},y={...m(f(i||{}),r),...c(i,{ignoreBgAttachment:!0,ignoreBackgroundImage:!0}),"--duration":`${n??0}s`,"--scale":`${o||100}%`,...t("pos",p(i)),transform:l,transition:"transform 300ms cubic-bezier(0,0,0,1)"};return filterTruthyStyles(y)},getContainBackgroundStyle=t=>{let{borderBg:e,cornerBg:r}=t??{},l={"clip-path":b(e?.width,r)};return filterTruthyStyles(l)},getHtml5VideoStyle=e=>{let r={...t("aspect",e)};return filterTruthyStyles(r)},getYoutubeIframeStyle=e=>{let r={...t("aspect",e),"pointer-event":"none"};return filterTruthyStyles(r)};export{getAdaptiveStyle,getBackgroundStyle,getContainBackgroundStyle,getContainerStyle,getHtml5VideoStyle,getOverlayStyle,getRowStyle,getStyle,getYoutubeIframeStyle};
1
+ import{makeStyleResponsive as t,getHeightByShapeGlobalSize as e,makeStyleWithDefault as r,getWidthByShapeGlobalSize as l,makeStyle as o,getSingleColorVariable as i,getRadiusStyleActiveState as n,getStyleShadow as y,getGlobalColorStateStyle as g,makeStyleState as u,getResponsiveStylePadding as a,getStyleBackgroundByDevice as c}from"@gem-sdk/core";import{getVisibilityStyle as s,getStyleAspectRatioHeroBannerCustom as S,getAspectRatioSettings as d,getDisplayStyleByFitContent as h,getStyleHeroBannerBg as m,getAttachmentDevice as p,getClipPath as b,getResponsiveSetting as f}from"./common.js";function filterTruthyStyles(t){return Object.fromEntries(Object.entries(t||{}).filter(([,t])=>!!t))}let getStyle=(o,i,n)=>{let{sizeSetting:y,background:g}=o??{},{ratioOptions:u,aspectRatio:a}=i??{},c={...n,...s(n),...t("h",e(y)),...r("w",l(y,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),...S(g,y,d(u,a))};return filterTruthyStyles(c)},getContainerStyle=(r,l)=>{let{sizeSetting:g,background:u,borderBg:a,cornerBg:c,shadowBg:s,hasActiveShadow:h}=r??{},{ratioOptions:m,aspectRatio:p}=l??{},b={...t("h",e(g)),...S(u,g,d(m,p)),...o({bs:a?.border??a?.border,bw:a?.width??a?.width,bc:i(a?.color)}),...n({...c,active:{...c||{},radiusType:"custom"}}),...y({value:s,styleAppliedFor:"box-shadow",isEnableShadow:h})};return filterTruthyStyles(b)},getOverlayStyle=t=>{let{overlayColor:e,overlayOpacity:r,hoverEffect:l}=t??{},o=g("bgc",e),i=u("op",r);e?.normal&&r?.normal!="0%"||(delete o?.["--bgc"],delete i?.["--op"]),e?.hover&&r?.hover!="0%"&&l||(delete o?.["--hvr-bgc"],delete i?.["--hvr-op"]);let n={...o,...i,"--top":"0","--left":"0"};return filterTruthyStyles(n)},getRowStyle=t=>{let{contentPadding:e}=t??{},r={...a(e)};return filterTruthyStyles(r)},getAdaptiveStyle=o=>{let{sizeSetting:i,background:n}=o??{},y={...h(i,n),...t("h",e(i)),...r("w",l(i,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),"--op":0,"--z":-1};return filterTruthyStyles(y)},getBackgroundStyle=(e,r,l)=>{let{hoverEffectScale:o,background:i,hoverEffectDuration:n}=e??{},y={...m(f(i||{}),r),...c(i,{ignoreBgAttachment:!0,ignoreBackgroundImage:!0}),"--duration":`${n??0}s`,"--scale":o||"100%",...t("pos",p(i)),transform:l,transition:"transform 300ms cubic-bezier(0,0,0,1)"};return filterTruthyStyles(y)},getContainBackgroundStyle=t=>{let{borderBg:e,cornerBg:r}=t??{},l={"clip-path":b(e?.width,r)};return filterTruthyStyles(l)},getHtml5VideoStyle=e=>{let r={...t("aspect",e)};return filterTruthyStyles(r)},getYoutubeIframeStyle=e=>{let r={...t("aspect",e),"pointer-event":"none"};return filterTruthyStyles(r)};export{getAdaptiveStyle,getBackgroundStyle,getContainBackgroundStyle,getContainerStyle,getHtml5VideoStyle,getOverlayStyle,getRowStyle,getStyle,getYoutubeIframeStyle};
@@ -1 +1 @@
1
- import{useState as e,useRef as r,useEffect as t,useCallback as n,useMemo as l}from"react";import o from"../parallax/AnimationManager.js";import{getResponsiveValueByScreen as a,getBgVideoByDevice as s}from"@gem-sdk/core";import{useTranslateValue as i}from"./useTranslateValue.js";import u from"./useIntersectionObserver.js";import{getResponsiveSetting as m}from"../common/common.js";let useHeroBanner=(p,c,d)=>{let{hoverEffect:g,hoverEffectScale:f,background:x}=p||{},{link:B}=c||{},b=Number(c?.speedParallax)||0,[j,w]=e(0),[H,$]=e(null),[k,v]=e(null),[y,N]=e(""),Y=r(null),[C,P]=u(),{translateValue:R}=i({containerBoundingClientRect:H,backgroundBoundingClientRect:k,speed:b}),T=a(c?.layout,d),h=m(x||{}),A=Number(c?.speedParallax||0)>0&&h[d]?.type==="image",E=()=>{g&&A&&N(`${y} scale(${f||100}%)`)},F=()=>{g&&A&&N(`translateY(${R}px)`)},I=e=>{B?.link&&!e?.srcElement?.closest("a")&&window.open(B?.link,B.target)};t(()=>{A?N(`translateY(${R}px)`):N("")},[R,A]);let M=n(()=>{if(!A||0===b||!P)return;let e=Number(window.scrollY.toFixed(0));j!==e&&($(C?.current?C?.current?.getBoundingClientRect():null),v(Y?.current?Y?.current?.getBoundingClientRect():null),w(e))},[j,P,A,b,C,Y]),O=s(x,d),V=l(()=>!!(O?.videoHtml5&&"html5"===O.videoType),[O]);return t(()=>(o.register(M),()=>{o.unregister(M)}),[M]),t(()=>(o.register(M),()=>{o.unregister(M)}),[M]),{onMouseEnterParallax:E,onMouseLeaveParallax:F,bgRef:Y,transform:y,elementRef:C,dataVideo:O,isShowVideoHtml5:V,openLinkBanner:I,layoutResponsive:T}};export{useHeroBanner as default,useHeroBanner};
1
+ import{useState as e,useRef as r,useEffect as t,useCallback as n,useMemo as l}from"react";import o from"../parallax/AnimationManager.js";import{getResponsiveValueByScreen as a,getBgVideoByDevice as s}from"@gem-sdk/core";import{useTranslateValue as i}from"./useTranslateValue.js";import u from"./useIntersectionObserver.js";import{getResponsiveSetting as m}from"../common/common.js";let useHeroBanner=(p,c,d)=>{let{hoverEffect:g,hoverEffectScale:f,background:x}=p||{},{link:B}=c||{},b=Number(c?.speedParallax)||0,[j,w]=e(0),[H,$]=e(null),[k,v]=e(null),[y,N]=e(""),Y=r(null),[C,P]=u(),{translateValue:R}=i({containerBoundingClientRect:H,backgroundBoundingClientRect:k,speed:b}),T=a(c?.layout,d),h=m(x||{}),A=Number(c?.speedParallax||0)>0&&h[d]?.type==="image",E=()=>{g&&A&&N(`${y} scale(${f||"100%"})`)},F=()=>{g&&A&&N(`translateY(${R}px)`)},I=e=>{B?.link&&!e?.srcElement?.closest("a")&&window.open(B?.link,B.target)};t(()=>{A?N(`translateY(${R}px)`):N("")},[R,A]);let M=n(()=>{if(!A||0===b||!P)return;let e=Number(window.scrollY.toFixed(0));j!==e&&($(C?.current?C?.current?.getBoundingClientRect():null),v(Y?.current?Y?.current?.getBoundingClientRect():null),w(e))},[j,P,A,b,C,Y]),O=s(x,d),V=l(()=>!!(O?.videoHtml5&&"html5"===O.videoType),[O]);return t(()=>(o.register(M),()=>{o.unregister(M)}),[M]),t(()=>(o.register(M),()=>{o.unregister(M)}),[M]),{onMouseEnterParallax:E,onMouseLeaveParallax:F,bgRef:Y,transform:y,elementRef:C,dataVideo:O,isShowVideoHtml5:V,openLinkBanner:I,layoutResponsive:T}};export{useHeroBanner as default,useHeroBanner};
@@ -84,7 +84,7 @@ let SettingsV2=[{id:"setting",controls:[{id:"layout",type:"layout-banner",device
84
84
  d="M4.75 11.25C3.71447 11.25 2.875 12.0895 2.875 13.125V13.625C2.875 14.6605 3.71447 15.5 4.75 15.5H15.25C16.2855 15.5 17.125 14.6605 17.125 13.625V13.125C17.125 12.0895 16.2855 11.25 15.25 11.25H4.75ZM4.125 13.125C4.125 12.7798 4.40482 12.5 4.75 12.5H15.25C15.5952 12.5 15.875 12.7798 15.875 13.125V13.625C15.875 13.9702 15.5952 14.25 15.25 14.25H4.75C4.40482 14.25 4.125 13.9702 4.125 13.625V13.125Z"
85
85
  fill="currentColor"
86
86
  />
87
- </svg> `}],devices:{desktop:{default:"center"}}},{id:"preload",type:"toggle",label:"Preload",default:!1},{id:"enableLink",label:"",type:"toggle",default:!1},{id:"link",type:"pick-link",label:"Hero Link",default:{link:"",target:"_self"},hiddenOptions:{"stay-on-page":!0}},{id:"enableParallax",type:"toggle",default:!1},{id:"speedParallax",type:"input:slider",label:"Speed",useOnlyUnitInit:!0,hideUnit:!0,min:0,max:1,step:.1,compoDefaultValue:.6,default:.6,ignoreMax:!0},{id:"alignBanner",type:"segment",options:[{label:"Left",value:"left",icon:`<svg
87
+ </svg> `}],devices:{desktop:{default:"center"}}},{id:"enableLink",label:"",type:"toggle",default:!1},{id:"preload",type:"toggle",label:"Preload",default:!1},{id:"link",type:"pick-link",label:"Hero Link",default:{link:"",target:"_self"},hiddenOptions:{"stay-on-page":!0}},{id:"enableParallax",type:"toggle",default:!1},{id:"speedParallax",type:"input:slider",label:"Speed",useOnlyUnitInit:!0,hideUnit:!0,min:0,max:1,step:.1,compoDefaultValue:.6,default:.6,ignoreMax:!0},{id:"alignBanner",type:"segment",options:[{label:"Left",value:"left",icon:`<svg
88
88
  xmlns="http://www.w3.org/2000/svg"
89
89
  width="21"
90
90
  height="20"
@@ -143,4 +143,4 @@ let SettingsV2=[{id:"setting",controls:[{id:"layout",type:"layout-banner",device
143
143
  d="M4.39584 15.625C3.36031 15.625 2.52084 14.7855 2.52084 13.75V12.5C2.52084 11.4645 3.36031 10.625 4.39584 10.625H14.3958C15.4314 10.625 16.2708 11.4645 16.2708 12.5V13.75C16.2708 14.7855 15.4314 15.625 14.3958 15.625H4.39584ZM3.77084 13.75C3.77084 14.0952 4.05066 14.375 4.39584 14.375H14.3958C14.741 14.375 15.0208 14.0952 15.0208 13.75V12.5C15.0208 12.1548 14.741 11.875 14.3958 11.875H4.39584C4.05066 11.875 3.77084 12.1548 3.77084 12.5V13.75Z"
144
144
  fill="currentColor"
145
145
  />
146
- </svg> `,tooltip:"Align right"}],devices:{desktop:{default:"center"}}},{id:"seo",type:"group",label:"SEO",controls:[{id:"alt",label:"Alt Text",type:"textarea",minHeight:56,autoHeight:!0,placeholder:"E.g: Classic white crewneck t-shirt with minimalist design",default:void 0},{id:"title",label:"Image title",info:"Show title when hover to image",type:"textarea",minHeight:56,autoHeight:!0,placeholder:"E.g: White t-shirt",default:void 0}]},{id:"ratioOptions",type:"ratio",min:1,useUnit:!1,useLink:!1,devices:{desktop:{default:{width:"16",height:"9"}}}},{id:"aspectRatio",type:"select",label:"Ratio",options:[{label:"Original",value:"auto"},{label:"Square",value:"1/1"},{label:"3:2",value:"3/2"},{label:"4:3",value:"4/3"},{label:"16:9",value:"16/9"},{label:"21:9",value:"21/9"},{label:"2:3",value:"2/3"},{label:"3:4",value:"3/4"},{label:"9:16",value:"9/16"},{label:"Cover",value:"cover"},{label:"Custom",value:"custom"}],devices:{desktop:{default:"16/9"},mobile:{default:"auto"}}},{id:"contentBanner",type:"banner",message:"The background image should be taller than the Hero Banner",closable:!0}]},{id:"style",controls:[{id:"sizeSetting",type:"size-setting",label:"",devices:{desktop:{default:{shape:"original",widthHeightLinked:!1,width:"100%"}},mobile:{default:{shape:"custom",width:"100%"}}},settingConfig:{width:{displayOptions:["full","default"],name:"Width"},height:{displayOptions:["fit-content","fit-screen"],name:"Height"},shape:{displayOptions:["original","custom"],name:"Frame",shapeTitleConfig:{original:"As banner source"}}},hiddenSettings:["padding","gap"]},{id:"background",type:"background-media",label:"Background Color & Image",ignoreReRender:!0,showVideo:!0,devices:{desktop:{default:{type:"image",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1920,height:900},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",video:"",videoHtml5:"",videoType:"youtube",loop:!0,lazyLoad:!1}}},compoDefaultValue:{desktop:{default:{type:"image",color:"bg-2",image:{src:"https://ucarecdn.com/40daf457-10f5-4a0f-a7c4-d73d28ffd60c/willianjustendevasconcellosjOF2TFSNxQIunsplash11min.png",width:1920,height:900},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",video:"https://youtu.be/KOxfzBp72uk",videoHtml5:"https://media.w3.org/2010/05/sintel/trailer.mp4",videoType:"youtube",loop:!0,lazyLoad:!1}}}},{id:"hoverEffect",type:"toggle",default:!1},{id:"hoverEffectScale",type:"input:slider",label:"Zoom Value",units:["%"],min:100,max:200,step:5,default:"110%",useOnlyUnitInit:!0,isNumber:!0},{id:"hoverEffectDuration",label:"Zoom Time",type:"input:unit",units:["s"],min:0,default:.5,useOnlyUnitInit:!0},{id:"height",label:"Height",type:"input:unit",units:["px"],placeholder:"Auto",devices:{desktop:{default:void 0}},info:"Full Width: To set Hero Banner full width, first you drag & drop a Section element from left sidebar, then make it full-width, after that you put your Hero Banner inside Section you have created."},{id:"contentPosition1Col",label:"Content Position",type:"option:value",options:[{label:"Top",value:"top",iconName:"gp-align-top"},{label:"Center",value:"center",iconName:"gp-align-center-vertical"},{label:"Bottom",value:"bottom",iconName:"gp-align-bottom"},{label:"Space between",value:"space-between",iconName:"gp-justify-content-space-between"}],devices:{desktop:{default:"center"}}},{id:"contentPosition2Col",label:"Content Position",type:"option:value",options:[{label:"Top",value:"top",iconName:"gp-align-top"},{label:"Center",value:"center",iconName:"gp-align-center-vertical"},{label:"Bottom",value:"bottom",iconName:"gp-align-bottom"},{label:"Space between",value:"space-between",iconName:"gp-justify-content-space-between"}],devices:{desktop:{default:"center"}}},{id:"wrapperWidth",type:"input:unit-width",label:"Width",placeholder:"Auto",min:0,units:["px","%"],devices:{desktop:{default:void 0},tablet:{default:void 0},mobile:{default:void 0}}},{id:"contentWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"default"},tablet:{default:"default"},mobile:{default:"default"}},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0}]},{id:"verticalGutter",type:"input:unit",units:["px"],min:0,label:"Spacing",devices:{desktop:{default:"32px"}}},{id:"overlayEnable",type:"toggle",default:!1},{id:"overlayOpacity",label:"Opacity",type:"input:slider",min:0,max:100,units:["%"],step:1,default:{normal:"20%",hover:"20%"},state:{normal:!0,hover:!0},compoDefaultValue:{normal:"20%",hover:"20%"}},{id:"overlayColor",label:"Color",type:"color-picker-v2",state:{normal:!0,hover:!0}},{id:"borderBg",type:"border-v2",label:"Border"},{id:"cornerBg",type:"corner-v2",label:"Corner",default:{radiusType:"none"}},{id:"hasActiveShadow",type:"toggle",label:"Enable Button Shadow",default:!1},{id:"shadowBg",type:"shadow-v2",label:"Button Shadow"},{id:"contentPadding",type:"padding-v2",devices:{desktop:{default:{top:"4px",left:"16px",bottom:"4px",right:"16px",linked:!1}},mobile:{default:{top:"16px",left:"16px",bottom:"16px",right:"16px",linked:!1}}},compoDefaultValue:{desktop:{default:{top:"4px",left:"16px",bottom:"4px",right:"16px",linked:!1}},mobile:{default:{top:"16px",left:"16px",bottom:"16px",right:"16px",linked:!1}}}}]}];export{SettingsV2};
146
+ </svg> `,tooltip:"Align right"}],devices:{desktop:{default:"center"}}},{id:"seo",type:"group",label:"SEO",controls:[{id:"alt",label:"Alt Text",type:"textarea",minHeight:56,autoHeight:!0,placeholder:"E.g: Classic white crewneck t-shirt with minimalist design",default:void 0},{id:"title",label:"Image title",info:"Show title when hover to image",type:"textarea",minHeight:56,autoHeight:!0,placeholder:"E.g: White t-shirt",default:void 0}]},{id:"ratioOptions",type:"ratio",min:1,useUnit:!1,useLink:!1,devices:{desktop:{default:{width:"16",height:"9"}}}},{id:"aspectRatio",type:"select",label:"Ratio",options:[{label:"Original",value:"auto"},{label:"Square",value:"1/1"},{label:"3:2",value:"3/2"},{label:"4:3",value:"4/3"},{label:"16:9",value:"16/9"},{label:"21:9",value:"21/9"},{label:"2:3",value:"2/3"},{label:"3:4",value:"3/4"},{label:"9:16",value:"9/16"},{label:"Cover",value:"cover"},{label:"Custom",value:"custom"}],devices:{desktop:{default:"16/9"},mobile:{default:"auto"}}},{id:"contentBanner",type:"banner",message:"The background image should be taller than the Hero Banner",closable:!0}]},{id:"style",controls:[{id:"sizeSetting",type:"size-setting",label:"",devices:{desktop:{default:{shape:"original",widthHeightLinked:!1,width:"100%"}},mobile:{default:{shape:"custom",width:"100%"}}},settingConfig:{width:{displayOptions:["full","default"],name:"Width"},height:{displayOptions:["fit-content","fit-screen"],name:"Height"},shape:{displayOptions:["original","custom"],name:"Frame",shapeTitleConfig:{original:"As banner source"}}},hiddenSettings:["padding","gap"]},{id:"background",type:"background-media",label:"Background Color & Image",ignoreReRender:!0,showVideo:!0,devices:{desktop:{default:{type:"image",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1920,height:900},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",video:"",videoHtml5:"",videoType:"youtube",loop:!0,lazyLoad:!1}}},compoDefaultValue:{desktop:{default:{type:"image",color:"bg-2",image:{src:"https://ucarecdn.com/40daf457-10f5-4a0f-a7c4-d73d28ffd60c/willianjustendevasconcellosjOF2TFSNxQIunsplash11min.png",width:1920,height:900},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",video:"https://youtu.be/KOxfzBp72uk",videoHtml5:"https://media.w3.org/2010/05/sintel/trailer.mp4",videoType:"youtube",loop:!0,lazyLoad:!1}}}},{id:"hoverEffect",type:"toggle",default:!1},{id:"hoverEffectScale",type:"input:slider",label:"Zoom Value",units:["%"],min:100,max:200,step:5,default:"110%"},{id:"hoverEffectDuration",label:"Zoom Time",type:"input:unit",units:["s"],min:0,default:.5,useOnlyUnitInit:!0},{id:"height",label:"Height",type:"input:unit",units:["px"],placeholder:"Auto",devices:{desktop:{default:void 0}},info:"Full Width: To set Hero Banner full width, first you drag & drop a Section element from left sidebar, then make it full-width, after that you put your Hero Banner inside Section you have created."},{id:"contentPosition1Col",label:"Content Position",type:"option:value",options:[{label:"Top",value:"top",iconName:"gp-align-top"},{label:"Center",value:"center",iconName:"gp-align-center-vertical"},{label:"Bottom",value:"bottom",iconName:"gp-align-bottom"},{label:"Space between",value:"space-between",iconName:"gp-justify-content-space-between"}],devices:{desktop:{default:"center"}}},{id:"contentPosition2Col",label:"Content Position",type:"option:value",options:[{label:"Top",value:"top",iconName:"gp-align-top"},{label:"Center",value:"center",iconName:"gp-align-center-vertical"},{label:"Bottom",value:"bottom",iconName:"gp-align-bottom"},{label:"Space between",value:"space-between",iconName:"gp-justify-content-space-between"}],devices:{desktop:{default:"center"}}},{id:"wrapperWidth",type:"input:unit-width",label:"Width",placeholder:"Auto",min:0,units:["px","%"],devices:{desktop:{default:void 0},tablet:{default:void 0},mobile:{default:void 0}}},{id:"contentWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"default"},tablet:{default:"default"},mobile:{default:"default"}},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0}]},{id:"verticalGutter",type:"input:unit",units:["px"],min:0,label:"Spacing",devices:{desktop:{default:"32px"}}},{id:"overlayEnable",type:"toggle",default:!1},{id:"overlayOpacity",label:"Opacity",type:"input:slider",min:0,max:100,units:["%"],step:1,default:{normal:"20%",hover:"20%"},state:{normal:!0,hover:!0},compoDefaultValue:{normal:"20%",hover:"20%"}},{id:"overlayColor",label:"Color",type:"color-picker-v2",state:{normal:!0,hover:!0}},{id:"borderBg",type:"border-v2",label:"Border"},{id:"cornerBg",type:"corner-v2",label:"Corner",default:{radiusType:"none"}},{id:"hasActiveShadow",type:"toggle",label:"Enable Button Shadow",default:!1},{id:"shadowBg",type:"shadow-v2",label:"Button Shadow"},{id:"contentPadding",type:"padding-v2",devices:{desktop:{default:{top:"4px",left:"16px",bottom:"4px",right:"16px",linked:!1}},mobile:{default:{top:"16px",left:"16px",bottom:"16px",right:"16px",linked:!1}}},compoDefaultValue:{desktop:{default:{top:"4px",left:"16px",bottom:"4px",right:"16px",linked:!1}},mobile:{default:{top:"16px",left:"16px",bottom:"16px",right:"16px",linked:!1}}}}]}];export{SettingsV2};
@@ -1 +1 @@
1
- let SettingUIV2=[{label:{en:"Layout"},controls:[{setting:{id:"layout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"layout.cols.length == 1 && layout.type === 'center-top'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length == 1 && layout.type === 'center'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length == 1 && layout.type === 'center-bottom'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"bottom"}},{condition:"layout.cols.length == 1 && layout.type === 'center-distributed'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-distributed' || layout.type === 'right-distributed')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-top' || layout.type === 'right-top')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length > 1 && ( layout.type === 'right' || layout.type === 'left')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-bottom' || layout.type === 'right-bottom')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"bottom"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},options:{updateFields:[{field:"preload",settingId:"preload"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{condition:"!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{shapeLinked:!1,hiddenShape:!0},valueIfNull:{width:"100%",height:"fit-content",hiddenShape:!0},groupType:"style",controlType:"size-setting"}},{condition:"!!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{hiddenShape:!1},valueIfNull:{hiddenShape:!1},groupType:"style",controlType:"size-setting"}}],options:{noRecordHistory:!0}},layout:"vertical"}],moreSettings:{type:"collapse",controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.normal",controls:[{setting:{id:"overlayColor",state:"normal"},label:{en:"Color"}},{setting:{id:"overlayOpacity",state:"normal"},label:{en:"Opacity"}}]}]}},{label:{en:"Size"},controls:[{label:{en:"Video Ratio"},setting:{id:"aspectRatio"},conditionDisplay:'background.type == "video" && background.videoType == "html5"'},{conditionDisplay:"aspectRatio === 'custom'",setting:{id:"ratioOptions"}},{setting:{id:"sizeSetting"},layout:"vertical"}]},{label:{en:"Content"},controls:[{id:"contentWidth",label:{en:"Width"},controlConfig:{id:"contentWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0},{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},setting:{id:"contentPadding"}},{label:{en:"Align"},setting:{id:"verticalAlign"},conditionEnable:'layout.cols.length > 1 && layout.type != "right-distributed" && layout.type != "left-distributed"'}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBg"}},{label:{en:"Corner"},setting:{id:"cornerBg"}},{label:{en:"Shadow"},setting:{id:"shadowBg"},options:{updateFields:[{field:"enable",settingId:"hasActiveShadow"}]},controlChangeTrigger:{settings:[{condition:"shadowBg.enable === true",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!0}},{condition:"shadowBg.enable === false",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{type:"combo",fixedValue:"Effect",iconName:"polaris-check-clicked",label:{en:"Hover effect"},setting:{id:"hoverEffect"},defaultValueWhenClear:!1,controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.hover",defaultValueWhenClear:"transparent",compoDefaultValue:"#121212",controls:[{setting:{id:"overlayColor",state:"hover"},compoDefaultValue:"#121212 ",label:{en:"Color"}},{setting:{id:"overlayOpacity",state:"hover"},label:{en:"Opacity"}}]},{label:{en:"Scale"},setting:{id:"hoverEffectScale"}},{type:"control",label:{en:"Time"},conditionDisplay:"hoverEffect == true",setting:{id:"hoverEffectDuration"}}]},{type:"combo",fixedValue:"Enabled",iconName:"polaris-parallax-effect",label:{en:"Parallax scroll"},setting:{id:"enableParallax"},conditionDisplay:'background.type == "image"',defaultValueWhenClear:!1,controls:[{setting:{id:"contentBanner"},layout:"vertical"},{label:{en:"Speed"},setting:{id:"speedParallax"}}]}]},{controls:[{label:{en:"Link"},setting:{id:"enableLink"},options:{labelVariant:"primary",toggleStyle:"switch"}},{layout:"vertical",controlConfig:{id:"linkedToPreSalesPageBanner",type:"banner",message:"Pre-sales page elements with link should redirect to the Sales page."},conditionDisplay:'pageType === "GP_PRE_SALE_PAGE" && enableLink == true'},{conditionDisplay:"enableLink == true",setting:{id:"link"},layout:"vertical"}]},{label:{en:"SEO"},controls:[{type:"combo",label:{en:"Alt text"},iconName:"polaris-text-block",getValueFromSettingID:"alt",compoDefaultValue:"Describes the appearance of the image",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"alt"},layout:"vertical"}]},{type:"combo",label:{en:"Image title"},iconName:"polaris-text-block",getValueFromSettingID:"title",compoDefaultValue:"Title",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"title"},layout:"vertical"}]}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(sizeSetting.width) >= 100 && sizeSetting.width?.includes("%"))',setting:{id:"alignBanner"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"This option is disabled because the width was set to 100%"}}]}];export{SettingUIV2};
1
+ let SettingUIV2=[{label:{en:"Layout"},controls:[{setting:{id:"layout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"layout.cols.length == 1 && layout.type === 'center-top'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length == 1 && layout.type === 'center'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length == 1 && layout.type === 'center-bottom'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"bottom"}},{condition:"layout.cols.length == 1 && layout.type === 'center-distributed'",source:["layout"],action:{controlId:"contentPosition1Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-distributed' || layout.type === 'right-distributed')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"space-between"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-top' || layout.type === 'right-top')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"top"}},{condition:"layout.cols.length > 1 && ( layout.type === 'right' || layout.type === 'left')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"center"}},{condition:"layout.cols.length > 1 && ( layout.type === 'left-bottom' || layout.type === 'right-bottom')",source:["layout"],action:{controlId:"contentPosition2Col",groupType:"style",controlType:"style",newValue:"bottom"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},options:{updateFields:[{field:"preload",settingId:"preload"}]},controlChangeTrigger:{settings:[{action:{controlId:"preload",valueFromField:"preload",groupType:"setting",controlType:"setting",removeDevice:!0}},{condition:"!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{shapeLinked:!1,hiddenShape:!0},valueIfNull:{width:"100%",height:"fit-content",hiddenShape:!0},groupType:"style",controlType:"size-setting"}},{condition:"!!background.image.src",source:["background"],action:{controlId:"sizeSetting",newValue:{hiddenShape:!1},valueIfNull:{hiddenShape:!1},groupType:"style",controlType:"size-setting"}}],options:{noRecordHistory:!0}},layout:"vertical"}],moreSettings:{type:"collapse",controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.normal",controls:[{setting:{id:"overlayColor",state:"normal"},label:{en:"Color"}},{setting:{id:"overlayOpacity",state:"normal"},label:{en:"Opacity"}}]}]}},{label:{en:"Size"},controls:[{label:{en:"Video Ratio"},setting:{id:"aspectRatio"},conditionDisplay:'background.type == "video" && background.videoType == "html5"'},{conditionDisplay:'aspectRatio === \'custom\' && background.type == "video" && background.videoType == "html5"',setting:{id:"ratioOptions"},label:{en:"Ratio"}},{setting:{id:"sizeSetting"},layout:"vertical"}]},{label:{en:"Content"},controls:[{id:"contentWidth",label:{en:"Width"},controlConfig:{id:"contentWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0},{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},setting:{id:"contentPadding"}},{label:{en:"Align"},setting:{id:"verticalAlign"},conditionEnable:'layout.cols.length > 1 && layout.type != "right-distributed" && layout.type != "left-distributed"'}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBg"}},{label:{en:"Corner"},setting:{id:"cornerBg"}},{label:{en:"Shadow"},setting:{id:"shadowBg"},options:{updateFields:[{field:"enable",settingId:"hasActiveShadow"}]},controlChangeTrigger:{settings:[{condition:"shadowBg.enable === true",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!0}},{condition:"shadowBg.enable === false",source:["shadowBg","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{type:"combo",fixedValue:"Effect",iconName:"polaris-check-clicked",label:{en:"Hover effect"},setting:{id:"hoverEffect"},defaultValueWhenClear:!1,controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.hover",defaultValueWhenClear:"transparent",compoDefaultValue:"#121212",controls:[{setting:{id:"overlayColor",state:"hover"},compoDefaultValue:"#121212 ",label:{en:"Color"}},{setting:{id:"overlayOpacity",state:"hover"},label:{en:"Opacity"}}]},{label:{en:"Scale"},type:"combo",iconName:"polaris-maximize",getValueFromSettingID:"hoverEffectScale",defaultValueWhenClear:"100%",compoDefaultValue:"110%",controls:[{label:{en:"Scale"},setting:{id:"hoverEffectScale"},defaultValueWhenClear:"100%"},{type:"control",label:{en:"Time"},setting:{id:"hoverEffectDuration"}}]}]},{type:"combo",fixedValue:"Enabled",iconName:"polaris-parallax-effect",label:{en:"Parallax scroll"},setting:{id:"enableParallax"},conditionDisplay:'background.type == "image"',defaultValueWhenClear:!1,controls:[{setting:{id:"contentBanner"},layout:"vertical"},{label:{en:"Speed"},setting:{id:"speedParallax"}}]}]},{controls:[{label:{en:"Link"},setting:{id:"enableLink"},options:{labelVariant:"primary",toggleStyle:"switch"}},{layout:"vertical",controlConfig:{id:"linkedToPreSalesPageBanner",type:"banner",message:"Pre-sales page elements with link should redirect to the Sales page."},conditionDisplay:'pageType === "GP_PRE_SALE_PAGE" && enableLink == true'},{conditionDisplay:"enableLink == true",setting:{id:"link"},layout:"vertical"}]},{label:{en:"SEO"},controls:[{type:"combo",label:{en:"Alt text"},iconName:"polaris-text-block",getValueFromSettingID:"alt",compoDefaultValue:"Describes the appearance of the image",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"alt"},layout:"vertical"}]},{type:"combo",label:{en:"Image title"},iconName:"polaris-text-block",getValueFromSettingID:"title",compoDefaultValue:"Title",isHideClear:!0,controls:[{label:{en:"Content"},setting:{id:"title"},layout:"vertical"}]}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(sizeSetting.width) >= 100 && sizeSetting.width?.includes("%"))',setting:{id:"alignBanner"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"This option is disabled because the width was set to 100%"}}]}];export{SettingUIV2};
@@ -1,7 +1,7 @@
1
- import{makeStyleResponsive,getStyleShadowState,composeRadius,makeGlobalSize,composeTypographyStyle,getColor,getStyleShadow,getStyleBackgroundImage,getGlobalColorStateStyle,getGradientBgrStyleForButton,composeBorderCss,composeCornerCss}from"@gem-sdk/core";let getButtonWrapperStyles=(e,t)=>({...e,...makeStyleResponsive("ta",t?.align)}),getButtonStyles=e=>({...getSizeStyles(e),...getRadiusStyles(e),...getShadowStyles(e),...getBackgroundStyles(e),...getTypographyStyles(e).textColorStyle}),getButtonIconStyles=(e,t)=>({...getIconSpacingStyle(e,t),"--height-desktop":`${e?.size?.desktop}`,"--height-tablet":`${e?.size?.desktop||e?.size?.tablet}`,"--height-mobile":`${e?.size?.mobile||e?.size?.tablet||e?.size?.desktop}`}),isEnableShadowStateForDevice=e=>({normal:e?.normal?.type!=="none",hover:e?.hover?.type!=="none"}),ignoreStateNoneValue=(obj,condition)=>Object.entries(obj).reduce((acc,[key,value])=>((!["hover","focus","normal"].includes(key)||eval(condition))&&(acc[key]=value),acc),{}),getShadowStyles=e=>{let{boxShadowBtn:t}=e||{},o=ignoreStateNoneValue(t||{},"value?.enable !== false");return{...getStyleShadowState(o,"box-shadow",isEnableShadowStateForDevice(t))}},getRadiusStyles=e=>{let t=ignoreStateNoneValue(e?.roundedBtnV2||{},'value?.radiusType !== "none"');return composeRadius(t)},getIconSpacingStyle=(e,t)=>{let o=e?.iconSpacing||{desktop:"8px"};return t?.iconAlign==="left"?makeStyleResponsive("mr",o):makeStyleResponsive("ml",o)},getSizeStyles=e=>{let t=makeGlobalSize(e?.globalSize);return{...t.width,...t.height,...t.padding}},getTypographyStyles=e=>{let t=composeTypographyStyle(e?.typo,e?.typography),o={"--c":t?.["--c"]},r={...t};return delete r["--c"],{textColorStyle:{"--hvr-c":getColor(e?.textColorHover?.hover),...o},withoutTextColorStyles:r}},getTypoStyles=e=>({...getTypographyStyles(e).withoutTextColorStyles,...getStyleShadow({styleAppliedFor:"text-shadow",value:e?.typo?.custom?.textShadow,isEnableShadow:e?.typo?.custom?.hasShadowText}),"word-break":"break-word"}),getBackgroundStyles=e=>({...getStyleBackgroundImage(e?.backgroundImage),...getGlobalColorStateStyle("bg",e?.backgroundColorV2),...getGradientBgrStyleForButton(e?.backgroundColorV2)}),getCustomCssStyles=({styles:e,uid:t,builderAttrs:o})=>{if(!t)return"";let{borderBtnV2:r,roundedBtnV2:l}=e??{},n=ignoreStateNoneValue(r||{},'value?.borderType !== "none"'),s=ignoreStateNoneValue(l||{},'value?.radiusType !== "none"'),a=generateBorderCornerStyles({uid:t,borderBtn:n,roundedBtn:s,builderAttrs:o});return`
1
+ import{makeStyleResponsive,getStyleShadowState,composeRadius,makeGlobalSize,composeTypographyStyle,getColor,getStyleShadow,getStyleBackgroundImage,getGlobalColorStateStyle,getGradientBgrStyleForButton,composeBorderCss,composeCornerCss}from"@gem-sdk/core";let getButtonWrapperStyles=(e,t)=>({...e,...makeStyleResponsive("ta",t?.align)}),getButtonStyles=e=>({...getSizeStyles(e),...getRadiusStyles(e),...getShadowStyles(e),...getBackgroundStyles(e),...getTypographyStyles(e).textColorStyle}),getButtonIconStyles=(e,t)=>({...getIconSpacingStyle(e,t),"--height-desktop":`${e?.size?.desktop}`,"--height-tablet":`${e?.size?.desktop||e?.size?.tablet}`,"--height-mobile":`${e?.size?.mobile||e?.size?.tablet||e?.size?.desktop}`}),ignoreStateNoneValue=(obj,condition)=>Object.entries(obj).reduce((acc,[key,value])=>((!["hover","focus","normal"].includes(key)||eval(condition))&&(acc[key]=value),acc),{}),getShadowStyles=e=>{let{boxShadowBtn:t,hasBoxShadowBtn:o}=e||{},r=ignoreStateNoneValue(t||{},"value?.enable !== false");return{...getStyleShadowState(r,"box-shadow",o)}},getRadiusStyles=e=>{let t=ignoreStateNoneValue(e?.roundedBtnV2||{},'value?.radiusType !== "none"');return composeRadius(t)},getIconSpacingStyle=(e,t)=>{let o=e?.iconSpacing||{desktop:"8px"};return t?.iconAlign==="left"?makeStyleResponsive("mr",o):makeStyleResponsive("ml",o)},getSizeStyles=e=>{let t=makeGlobalSize(e?.globalSize);return{...t.width,...t.height,...t.padding}},getTypographyStyles=e=>{let t=composeTypographyStyle(e?.typo,e?.typography),o={"--c":t?.["--c"]},r={...t};return delete r["--c"],{textColorStyle:{"--hvr-c":getColor(e?.textColorHover?.hover),...o},withoutTextColorStyles:r}},getTypoStyles=e=>({...getTypographyStyles(e).withoutTextColorStyles,...getStyleShadow({styleAppliedFor:"text-shadow",value:e?.typo?.custom?.textShadow,isEnableShadow:e?.typo?.custom?.hasShadowText}),"word-break":"break-word"}),getBackgroundStyles=e=>({...getStyleBackgroundImage(e?.backgroundImage),...getGlobalColorStateStyle("bg",e?.backgroundColorV2),...getGradientBgrStyleForButton(e?.backgroundColorV2)}),getCustomCssStyles=({styles:e,uid:t,builderAttrs:o})=>{if(!t)return"";let{borderBtnV2:r,roundedBtnV2:l}=e??{},s=ignoreStateNoneValue(r||{},'value?.borderType !== "none"'),n=ignoreStateNoneValue(l||{},'value?.radiusType !== "none"'),a=generateBorderCornerStyles({uid:t,borderBtn:s,roundedBtn:n,builderAttrs:o});return`
2
2
  ${a.normalStyles}
3
3
  ${a.hoverStyles}
4
- `.trim()},generateBorderCornerStyles=({uid:e,borderBtn:t,roundedBtn:o,builderAttrs:r})=>{let l=r?.["data-component-tag"],n=({styleObj:e,state:t})=>{if(e)return e?.[t]},s=n({styleObj:t,state:"normal"}),a=n({styleObj:t,state:"hover"}),i=n({styleObj:o,state:"normal"}),d=n({styleObj:o,state:"hover"}),y=`
4
+ `.trim()},generateBorderCornerStyles=({uid:e,borderBtn:t,roundedBtn:o,builderAttrs:r})=>{let l=r?.["data-component-tag"],s=({styleObj:e,state:t})=>{if(e)return e?.[t]},n=s({styleObj:t,state:"normal"}),a=s({styleObj:t,state:"hover"}),d=s({styleObj:o,state:"normal"}),g=s({styleObj:o,state:"hover"}),i=`
5
5
  content: "";
6
6
  height: 100%;
7
7
  width: 100%;
@@ -9,18 +9,18 @@ import{makeStyleResponsive,getStyleShadowState,composeRadius,makeGlobalSize,comp
9
9
  pointer-events: none;
10
10
  top: 0;
11
11
  left: 0;
12
- ${composeBorderCss(s)}
13
- ${composeCornerCss(i)}
14
- `,g=`
12
+ ${composeBorderCss(n)}
13
+ ${composeCornerCss(d)}
14
+ `,u=`
15
15
  .${e}.gp-button-base::before {
16
- ${y}
16
+ ${i}
17
17
  }
18
- `;if("ProductButton"===l){let t=r?.["data-is-in-stock"]??!1;g=`
18
+ `;if("ProductButton"===l){let t=r?.["data-is-in-stock"]??!1;u=`
19
19
  [data-is-in-stock="${t}"]>.${e}.gp-button-base::before {
20
- ${y}
21
- `}let u=`
20
+ ${i}
21
+ `}let y=`
22
22
  .${e}:hover::before {
23
23
  ${composeBorderCss(a)}
24
- ${composeCornerCss(d)}
24
+ ${composeCornerCss(g)}
25
25
  }
26
- `;return{normalStyles:g,hoverStyles:u}};export{generateBorderCornerStyles,getButtonIconStyles,getButtonStyles,getButtonWrapperStyles,getCustomCssStyles,getRadiusStyles,getShadowStyles,getTypoStyles};
26
+ `;return{normalStyles:u,hoverStyles:y}};export{generateBorderCornerStyles,getButtonIconStyles,getButtonStyles,getButtonWrapperStyles,getCustomCssStyles,getRadiusStyles,getShadowStyles,getTypoStyles};
@@ -2,4 +2,4 @@ let ButtonSettings=[{id:"setting",controls:[{id:"label",label:"Text",type:"input
2
2
  <svg width="100%" height="100%" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <path d="M8.90239 3.29786C8.54015 2.53874 7.45959 2.53873 7.09736 3.29786L5.98572 5.62747L3.42662 5.96481C2.59271 6.07473 2.2588 7.1024 2.86883 7.68149L4.74091 9.45861L4.27093 11.9967C4.11778 12.8238 4.99198 13.4589 5.73123 13.0577L7.99987 11.8264L10.2685 13.0577C11.0078 13.4589 11.882 12.8238 11.7288 11.9967L11.2588 9.45861L13.1309 7.68149C13.7409 7.1024 13.407 6.07473 12.5731 5.96481L10.014 5.62747L8.90239 3.29786Z" fill="currentColor"/>
4
4
  </svg>
5
- `},{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:"#121212",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}},compoDefaultValue:{normal:{border:"solid",color:"#121212",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"#121212",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",default:{normal:{}},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:45}}},{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",default:{normal:{}},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}},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}}}},{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:!0},{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"}}},mobile:{default:{width:"100%"}}},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};
5
+ `},{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:"#121212",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}},compoDefaultValue:{normal:{border:"solid",color:"#121212",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"#121212",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:"#121212",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",default:{normal:{}},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}},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}}}},{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:!0},{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"}}},mobile:{default:{width:"100%"}}},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
- let SettingUIV2=[{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,fallbackValue:"Auto",linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{id:"Height",label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",label:"height",inputType:"number",units:["px"],hideUnit:!1,fallbackValue:"Auto",linkWithSetting:{name:"globalSize",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}}}]},{label:{en:"Background"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"normal"}},{label:{en:"Image"},setting:{id:"backgroundImage",state:"normal"}}]},{label:{en:"Shape"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"normal"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"normal"},options:{updateFields:[{field:"enable",settingId:"hasBoxShadowBtn",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.normal.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"styles",controlType:"styles",state:"normal",newValue:!0}},{condition:"boxShadowBtn.normal.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"styles",controlType:"styles",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"Icon"},setting:{id:"iconVisible"},options:{labelVariant:"primary",toggleStyle:"switch"}},{label:{en:"Icon"},setting:{id:"iconSvg"},conditionDisplay:"iconVisible == true"},{type:"control",label:{en:"Position"},setting:{id:"iconAlign"},conditionDisplay:"iconVisible == true"},{type:"control",label:{en:"Gap"},setting:{id:"iconSpacing"},conditionDisplay:"iconVisible == true"}]},{controls:[{label:{en:"Text"},setting:{id:"enableTextStyle"},options:{labelVariant:"primary",toggleStyle:"switch"},controlChangeTrigger:{settings:[{condition:'enableTextStyle === true && label === ""',source:["enableTextStyle","label"],action:{controlId:"label",groupType:"setting",controlType:"setting",newValue:"<p>Button</p>"}}],options:{noRecordHistory:!0}}},{id:"typo",label:{en:"Basic"},setting:{id:"typo"},conditionDisplay:"enableTextStyle == true",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:"Hover effect"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{label:{en:"Background"},setting:{id:"backgroundColorV2",state:"hover"}},{label:{en:"Image"},setting:{id:"backgroundImage",state:"hover"}},{label:{en:"Text color"},setting:{id:"textColorHover",state:"hover"}}],moreSettings:{type:"collapse",controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"hover"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"hover"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"hover"},options:{updateFields:[{field:"enable",settingId:"hasBoxShadowBtn",state:"hover"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.hover.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"styles",controlType:"styles",state:"hover",newValue:!0}},{condition:"boxShadowBtn.hover.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"styles",controlType:"styles",state:"hover",newValue:!1}}],options:{noRecordHistory:!0}}}]}},{controls:[{label:{en:"Link"},setting:{id:"enableBtnLink"},options:{labelVariant:"primary",toggleStyle:"switch"}},{layout:"vertical",controlConfig:{id:"linkedToPreSalesPageBanner",type:"banner",message:"Pre-sales page elements with link should redirect to the Sales page."},conditionDisplay:'pageType === "GP_PRE_SALE_PAGE" && enableBtnLink == true'},{type:"control",layout:"vertical",conditionDisplay:"enableBtnLink == true",setting:{id:"btnLink"}}]},{controls:[{label:{en:"Align"},conditionEnable:'!(globalSize.width === "default" || (parseInt(globalSize.width) >= 100 && globalSize.width?.includes("%")))',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];export{SettingUIV2};
1
+ let SettingUIV2=[{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,fallbackValue:"Auto",linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{id:"Height",label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",label:"height",inputType:"number",units:["px"],hideUnit:!1,fallbackValue:"Auto",linkWithSetting:{name:"globalSize",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}}}]},{label:{en:"Background"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"normal"}},{label:{en:"Image"},setting:{id:"backgroundImage",state:"normal"}}]},{label:{en:"Shape"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"normal"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadowBtn",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.normal.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!0}},{condition:"boxShadowBtn.normal.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"Icon"},setting:{id:"iconVisible"},options:{labelVariant:"primary",toggleStyle:"switch"}},{label:{en:"Icon"},setting:{id:"iconSvg"},conditionDisplay:"iconVisible == true"},{type:"control",label:{en:"Position"},setting:{id:"iconAlign"},conditionDisplay:"iconVisible == true"},{type:"control",label:{en:"Gap"},setting:{id:"iconSpacing"},conditionDisplay:"iconVisible == true"}]},{controls:[{label:{en:"Text"},setting:{id:"enableTextStyle"},options:{labelVariant:"primary",toggleStyle:"switch"},controlChangeTrigger:{settings:[{condition:'enableTextStyle === true && label === ""',source:["enableTextStyle","label"],action:{controlId:"label",groupType:"setting",controlType:"setting",newValue:"<p>Button</p>"}}],options:{noRecordHistory:!0}}},{id:"typo",label:{en:"Basic"},setting:{id:"typo"},conditionDisplay:"enableTextStyle == true",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:"Hover effect"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{label:{en:"Background"},setting:{id:"backgroundColorV2",state:"hover"}},{label:{en:"Image"},setting:{id:"backgroundImage",state:"hover"}},{label:{en:"Text color"},setting:{id:"textColorHover",state:"hover"}}],moreSettings:{type:"collapse",controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"hover"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"hover"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"hover"},options:{updateFields:[{field:"hover.enable",settingId:"hasBoxShadowBtn",state:"hover"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.hover.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!0}},{condition:"boxShadowBtn.hover.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!1}}],options:{noRecordHistory:!0}}}]}},{controls:[{label:{en:"Link"},setting:{id:"enableBtnLink"},options:{labelVariant:"primary",toggleStyle:"switch"}},{layout:"vertical",controlConfig:{id:"linkedToPreSalesPageBanner",type:"banner",message:"Pre-sales page elements with link should redirect to the Sales page."},conditionDisplay:'pageType === "GP_PRE_SALE_PAGE" && enableBtnLink == true'},{type:"control",layout:"vertical",conditionDisplay:"enableBtnLink == true",setting:{id:"btnLink"}}]},{controls:[{label:{en:"Align"},conditionEnable:'!(globalSize.width === "default" || (parseInt(globalSize.width) >= 100 && globalSize.width?.includes("%")))',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];export{SettingUIV2};
@@ -1 +1 @@
1
- let SettingUIV2=[{label:{en:"Layout"},controls:[{type:"control",setting:{id:"couponLayout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"couponLayout === 'icon'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!0}},{condition:"couponLayout === 'none'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Coupon code"},controls:[{type:"combo",label:{en:"Code"},iconName:"polaris-text-block",getValueFromSettingID:"copyContent",isHideClear:!0,compoDefaultValue:"GEMPAGES30",popoverLabel:{en:"Code"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"copyContent"}}]}]},{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{id:"Height",label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",label:"height",inputType:"number",units:["px"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"custom",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"normal"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"normal"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"normal"},options:{updateFields:[{field:"enable",settingId:"hasBoxShadowBtn",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.normal.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"styles",controlType:"styles",state:"normal",newValue:!0}},{condition:"boxShadowBtn.normal.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"styles",controlType:"styles",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"Icon"},setting:{id:"iconVisible"},options:{labelVariant:"primary",toggleStyle:"switch"}},{conditionDisplay:"iconVisible == true",type:"control",setting:{id:"iconSvg"},label:{en:"Icon"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Position"},setting:{id:"iconAlign"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Gap"},setting:{id:"iconSpacing"}}]},{controls:[{label:{en:"Text"},setting:{id:"enableTextStyle"},options:{labelVariant:"primary",toggleStyle:"switch"}},{type:"combo",label:{en:"Content"},iconName:"polaris-text-block",getValueFromSettingID:"defaultLabel",isHideClear:!0,conditionDisplay:"enableTextStyle == true",compoDefaultValue:"Copy",popoverLabel:{en:"Content"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"defaultLabel"}}]},{type:"control",layout:"vertical",setting:{id:"typo"},conditionDisplay:"enableTextStyle == true",options:{updateFields:[{field:"attrs.color",settingId:"textColor",state:"normal"}]},controlChangeTrigger:{settings:[{action:{controlId:"textColor",valueFromField:"attrs.color",groupType:"style",controlType:"style",removeDevice:!0,state:"normal"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{label:{en:"Hover"},type:"combo",iconName:"polaris-check-hover",fixedValue:"Enabled",isHideClear:!0,popoverLabel:{en:"Hover"},controls:[{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"hover"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColorHover",state:"hover"},compoDefaultValue:{desktop:{default:{normal:"#121212"}}}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"hover"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"hover"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"hover"},options:{updateFields:[{field:"enable",settingId:"hasBoxShadowBtn",state:"hover"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.hover.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"styles",controlType:"styles",state:"hover",newValue:!0}},{condition:"boxShadowBtn.hover.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"styles",controlType:"styles",state:"hover",newValue:!1}}],options:{noRecordHistory:!0}}}]}]},{label:{en:"Clicked"},type:"combo",iconName:"polaris-check-clicked",fixedValue:"Enabled",isHideClear:!0,popoverLabel:{en:"Clicked"},controls:[{type:"group",label:{en:"Content"},controls:[{label:{en:"After click"},setting:{id:"clickedLabel"}}]},{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"active"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColorHover",state:"active"}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"active"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"active"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"active"},options:{updateFields:[{field:"enable",settingId:"hasBoxShadowBtn",state:"active"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.active.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"styles",controlType:"styles",state:"active",newValue:!0}},{condition:"boxShadowBtn.active.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"styles",controlType:"styles",state:"active",newValue:!1}}],options:{noRecordHistory:!0}}}]}]}]},{conditionDisplay:"globalSize.width !== '100%'",controls:[{label:{en:"Align"},type:"control",setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0}}]}];export{SettingUIV2};
1
+ let SettingUIV2=[{label:{en:"Layout"},controls:[{type:"control",setting:{id:"couponLayout"},layout:"vertical",controlChangeTrigger:{settings:[{condition:"couponLayout === 'icon'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!0}},{condition:"couponLayout === 'none'",source:["couponLayout","iconVisible"],action:{controlId:"iconVisible",groupType:"setting",controlType:"setting",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Coupon code"},controls:[{type:"combo",label:{en:"Code"},iconName:"polaris-text-block",getValueFromSettingID:"copyContent",isHideClear:!0,compoDefaultValue:"GEMPAGES30",popoverLabel:{en:"Code"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"copyContent"}}]}]},{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{id:"Height",label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",label:"height",inputType:"number",units:["px"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"custom",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"normal"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"normal"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadowBtn",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.normal.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!0}},{condition:"boxShadowBtn.normal.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"Icon"},setting:{id:"iconVisible"},options:{labelVariant:"primary",toggleStyle:"switch"}},{conditionDisplay:"iconVisible == true",type:"control",setting:{id:"iconSvg"},label:{en:"Icon"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Position"},setting:{id:"iconAlign"}},{conditionDisplay:"iconVisible == true",type:"control",label:{en:"Gap"},setting:{id:"iconSpacing"}}]},{controls:[{label:{en:"Text"},setting:{id:"enableTextStyle"},options:{labelVariant:"primary",toggleStyle:"switch"}},{type:"combo",label:{en:"Content"},iconName:"polaris-text-block",getValueFromSettingID:"defaultLabel",isHideClear:!0,conditionDisplay:"enableTextStyle == true",compoDefaultValue:"Copy",popoverLabel:{en:"Content"},controls:[{label:{en:"Content"},options:{fullWidth:!0},layout:"vertical",setting:{id:"defaultLabel"}}]},{type:"control",layout:"vertical",setting:{id:"typo"},conditionDisplay:"enableTextStyle == true",options:{updateFields:[{field:"attrs.color",settingId:"textColor",state:"normal"}]},controlChangeTrigger:{settings:[{action:{controlId:"textColor",valueFromField:"attrs.color",groupType:"style",controlType:"style",removeDevice:!0,state:"normal"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Effect"},controls:[{label:{en:"Hover"},type:"combo",iconName:"polaris-check-hover",fixedValue:"Enabled",isHideClear:!0,popoverLabel:{en:"Hover"},controls:[{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"hover"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColorHover",state:"hover"},compoDefaultValue:{desktop:{default:{normal:"#121212"}}}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"hover"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"hover"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"hover"},options:{updateFields:[{field:"hover.enable",settingId:"hasBoxShadowBtn",state:"hover"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.hover.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!0}},{condition:"boxShadowBtn.hover.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!1}}],options:{noRecordHistory:!0}}}]}]},{label:{en:"Clicked"},type:"combo",iconName:"polaris-check-clicked",fixedValue:"Enabled",isHideClear:!0,popoverLabel:{en:"Clicked"},controls:[{type:"group",label:{en:"Content"},controls:[{label:{en:"After click"},setting:{id:"clickedLabel"}}]},{type:"group",label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"active"}}]},{type:"group",label:{en:"Text"},controls:[{label:{en:"Color"},setting:{id:"textColorHover",state:"active"}}]},{type:"group",label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"active"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"active"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"active"},options:{updateFields:[{field:"active.enable",settingId:"hasBoxShadowBtn",state:"active"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.active.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"active",newValue:!0}},{condition:"boxShadowBtn.active.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"active",newValue:!1}}],options:{noRecordHistory:!0}}}]}]}]},{conditionDisplay:"globalSize.width !== '100%'",controls:[{label:{en:"Align"},type:"control",setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0}}]}];export{SettingUIV2};
@@ -1 +1 @@
1
- let SettingUIV2=[{messageConfig:{type:"info",message:"This element can only be used in the Contact Form to send data to Shopify"}},{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",inputType:"number",units:["px"],linkWithSetting:{name:"globalSize",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]}},{label:{en:"Padding"},controlConfig:{id:"height",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"}}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"normal"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"normal"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"normal"},options:{updateFields:[{field:"enable",settingId:"hasBoxShadowBtn",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.normal.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"styles",controlType:"styles",state:"normal",newValue:!0}},{condition:"boxShadowBtn.normal.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"styles",controlType:"styles",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"Icon"},setting:{id:"iconVisible"},options:{labelVariant:"primary",toggleStyle:"switch"}},{label:{en:"Icon"},setting:{id:"iconSvg"},conditionDisplay:"iconVisible == true"},{label:{en:"Position"},setting:{id:"iconAlign"},conditionDisplay:"iconVisible == true"},{type:"control",label:{en:"Gap"},setting:{id:"iconSpacing"},conditionDisplay:"iconVisible == true"}]},{label:{en:"Text styles"},controls:[{layout:"vertical",setting:{id:"typo"},options:{hideLabel:!0,fullWidth:!0,updateFields:[{field:"attrs.color",settingId:"textColor",state:"normal"}]},controlChangeTrigger:{settings:[{action:{controlId:"textColor",valueFromField:"attrs.color",groupType:"style",controlType:"style",removeDevice:!0,state:"normal"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Hover effect"},controls:[{label:{en:"Background"},setting:{id:"backgroundColorV2",state:"hover"}},{label:{en:"Text color"},setting:{id:"textColorHover",state:"hover"}}],moreSettings:{type:"collapse",controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"hover"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"hover"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"hover"},options:{updateFields:[{field:"enable",settingId:"hasBoxShadowBtn",state:"hover"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.hover.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"styles",controlType:"styles",state:"hover",newValue:!0}},{condition:"boxShadowBtn.hover.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"styles",controlType:"styles",state:"hover",newValue:!1}}],options:{noRecordHistory:!0}}}]}},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(globalSize.width) >= 100 && globalSize.width?.includes("%"))',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Align is not supported when width is 100%"}}]}];export{SettingUIV2};
1
+ let SettingUIV2=[{messageConfig:{type:"info",message:"This element can only be used in the Contact Form to send data to Shopify"}},{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",inputType:"number",units:["px"],linkWithSetting:{name:"globalSize",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]}},{label:{en:"Padding"},controlConfig:{id:"height",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"}}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"normal"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"normal"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadowBtn",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.normal.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!0}},{condition:"boxShadowBtn.normal.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{label:{en:"Icon"},setting:{id:"iconVisible"},options:{labelVariant:"primary",toggleStyle:"switch"}},{label:{en:"Icon"},setting:{id:"iconSvg"},conditionDisplay:"iconVisible == true"},{label:{en:"Position"},setting:{id:"iconAlign"},conditionDisplay:"iconVisible == true"},{type:"control",label:{en:"Gap"},setting:{id:"iconSpacing"},conditionDisplay:"iconVisible == true"}]},{label:{en:"Text styles"},controls:[{layout:"vertical",setting:{id:"typo"},options:{hideLabel:!0,fullWidth:!0,updateFields:[{field:"attrs.color",settingId:"textColor",state:"normal"}]},controlChangeTrigger:{settings:[{action:{controlId:"textColor",valueFromField:"attrs.color",groupType:"style",controlType:"style",removeDevice:!0,state:"normal"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Hover effect"},controls:[{label:{en:"Background"},setting:{id:"backgroundColorV2",state:"hover"}},{label:{en:"Text color"},setting:{id:"textColorHover",state:"hover"}}],moreSettings:{type:"collapse",controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"hover"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"hover"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"hover"},options:{updateFields:[{field:"hover.enable",settingId:"hasBoxShadowBtn",state:"hover"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.hover.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!0}},{condition:"boxShadowBtn.hover.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!1}}],options:{noRecordHistory:!0}}}]}},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(globalSize.width) >= 100 && globalSize.width?.includes("%"))',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Align is not supported when width is 100%"}}]}];export{SettingUIV2};
@@ -1 +1 @@
1
- import{splitStyle as t,makeStyleResponsive as e,makeStyle as o}from"@gem-sdk/core";let getButtonStyle=(t,o)=>({...t,...e("ta",o?.align)}),getButtonBaseStyles=()=>({size:{desktop:"1em",tablet:"1em",mobile:"1em"}}),getAddToCartButtonStyles=t=>({...t,...getButtonBaseStyles()}),getSoldOutButtonStyles=t=>{let{isCustomOutOfStock:e,oosBorder:o,oosShadow:l,oosRounded:r,oosBorderV2:a,oosShadowV2:n,oosTextColor:S,oosRoundedV2:B,oosBackground:s,oosTextColorV2:g,oosBackgroundV2:m,oosEnableShadow:p,...y}=t??{},d={...y};e&&Object.assign(d,{backgroundColor:{normal:s},textColor:{normal:S},borderBtn:o,hasBoxShadowBtn:{normal:p},boxShadowBtn:{normal:l},roundedBtn:{normal:r}});let u=(t,e,o)=>{o&&(t[e]={normal:o?.normal,hover:t[e]?.hover})};return u(d,"backgroundColorV2",m),u(d,"boxShadowBtn",n),u(d,"roundedBtnV2",B),u(d,"borderBtnV2",a),g?.normal&&(d.typo=d.typo??{},d.typo.attrs=d.typo.attrs??{},d.typo.attrs.color=g.normal),{...getButtonBaseStyles(),...d}},getSplitStyle=e=>{let[o,l]=t(["pos","top","left","bottom","right","z"],e);return{wrapStyle:o,restStyle:l}},getSeparatorStyle=()=>({...o({mr:"8px",ml:"8px"})}),getBlankSpaceStyle=()=>({"--mr":"2px","--ml":"2px",display:"block !important"});export{getAddToCartButtonStyles,getBlankSpaceStyle,getButtonBaseStyles,getButtonStyle,getSeparatorStyle,getSoldOutButtonStyles,getSplitStyle};
1
+ import{splitStyle as t,makeStyleResponsive as e,makeStyle as o}from"@gem-sdk/core";let getButtonStyle=(t,o)=>({...t,...e("ta",o?.align)}),getButtonBaseStyles=()=>({size:{desktop:"1em",tablet:"1em",mobile:"1em"}}),getAddToCartButtonStyles=t=>({...t,...getButtonBaseStyles(),enableTextStyle:!0}),getSoldOutButtonStyles=t=>{let{isCustomOutOfStock:e,oosBorder:o,oosShadow:l,oosRounded:r,oosBorderV2:a,oosShadowV2:n,oosTextColor:S,oosRoundedV2:B,oosBackground:s,oosTextColorV2:y,oosBackgroundV2:g,oosEnableShadow:m,...p}=t??{},d={...p};e&&Object.assign(d,{backgroundColor:{normal:s},textColor:{normal:S},borderBtn:o,hasBoxShadowBtn:{normal:m},boxShadowBtn:{normal:l},roundedBtn:{normal:r}});let u=(t,e,o)=>{o&&(t[e]={normal:o?.normal,hover:t[e]?.hover})};return u(d,"backgroundColorV2",g),u(d,"boxShadowBtn",n),u(d,"roundedBtnV2",B),u(d,"borderBtnV2",a),y?.normal&&(d.typo=d.typo??{},d.typo.attrs=d.typo.attrs??{},d.typo.attrs.color=y.normal),{...getButtonBaseStyles(),...d}},getSplitStyle=e=>{let[o,l]=t(["pos","top","left","bottom","right","z"],e);return{wrapStyle:o,restStyle:l}},getSeparatorStyle=()=>({...o({mr:"8px",ml:"8px"})}),getBlankSpaceStyle=()=>({"--mr":"2px","--ml":"2px",display:"block !important"});export{getAddToCartButtonStyles,getBlankSpaceStyle,getButtonBaseStyles,getButtonStyle,getSeparatorStyle,getSoldOutButtonStyles,getSplitStyle};
@@ -1 +1 @@
1
- let SettingUIV2=[{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0},{label:"Small",value:"100px",showValue:!0},{label:"Medium",value:"116px",showValue:!0},{label:"Large",value:"132px",showValue:!0}]},layout:"horizontal"},{id:"Height",label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",label:"height",inputType:"number",units:["px"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Small",value:"28px",showValue:!0},{label:"Medium",value:"36px",showValue:!0},{label:"Large",value:"44px",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}}}]},{label:{en:"Background"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"normal"}},{label:{en:"Image"},setting:{id:"backgroundImage",state:"normal"}}]},{label:{en:"Shape"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"normal"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"normal"},options:{updateFields:[{field:"enable",settingId:"hasBoxShadowBtn",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.normal.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"styles",controlType:"styles",state:"normal",newValue:!0}},{condition:"boxShadowBtn.normal.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"styles",controlType:"styles",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Text style"},controls:[{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:"Hover effect"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{label:{en:"Background"},setting:{id:"backgroundColorV2",state:"hover"}},{label:{en:"Image"},setting:{id:"backgroundImage",state:"hover"}},{label:{en:"Text color"},setting:{id:"textColorHover",state:"hover"}}],moreSettings:{type:"collapse",controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"hover"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"hover"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"hover"},options:{updateFields:[{field:"enable",settingId:"hasBoxShadowBtn",state:"hover"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.hover.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"styles",controlType:"styles",state:"hover",newValue:!0}},{condition:"boxShadowBtn.hover.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"styles",controlType:"styles",state:"hover",newValue:!1}}],options:{noRecordHistory:!0}}}]}},{controls:[{label:{en:"Align"},conditionEnable:'!(globalSize.width === "default" || (parseInt(globalSize.width) >= 100 && globalSize.width?.includes("%")))',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];export{SettingUIV2};
1
+ let SettingUIV2=[{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0},{label:"Small",value:"100px",showValue:!0},{label:"Medium",value:"116px",showValue:!0},{label:"Large",value:"132px",showValue:!0}]},layout:"horizontal"},{id:"Height",label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",label:"height",inputType:"number",units:["px"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Small",value:"28px",showValue:!0},{label:"Medium",value:"36px",showValue:!0},{label:"Large",value:"44px",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}}}]},{label:{en:"Background"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{label:{en:"Color"},setting:{id:"backgroundColorV2",state:"normal"}},{label:{en:"Image"},setting:{id:"backgroundImage",state:"normal"}}]},{label:{en:"Shape"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"normal"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadowBtn",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.normal.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!0}},{condition:"boxShadowBtn.normal.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Text style"},controls:[{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:"Hover effect"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{label:{en:"Background"},setting:{id:"backgroundColorV2",state:"hover"}},{label:{en:"Image"},setting:{id:"backgroundImage",state:"hover"}},{label:{en:"Text color"},setting:{id:"textColorHover",state:"hover"}}],moreSettings:{type:"collapse",controls:[{label:{en:"Border"},setting:{id:"borderBtnV2",state:"hover"}},{label:{en:"Corner"},setting:{id:"roundedBtnV2",state:"hover"}},{label:{en:"Shadow"},setting:{id:"boxShadowBtn",state:"hover"},options:{updateFields:[{field:"hover.enable",settingId:"hasBoxShadowBtn",state:"hover"}]},controlChangeTrigger:{settings:[{condition:"boxShadowBtn.hover.enable === true",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!0}},{condition:"boxShadowBtn.hover.enable === false",source:["boxShadowBtn","hasBoxShadowBtn"],action:{controlId:"hasBoxShadowBtn",groupType:"style",controlType:"style",state:"hover",newValue:!1}}],options:{noRecordHistory:!0}}}]}},{controls:[{label:{en:"Align"},conditionEnable:'!(globalSize.width === "default" || (parseInt(globalSize.width) >= 100 && globalSize.width?.includes("%")))',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];export{SettingUIV2};
@@ -20,4 +20,4 @@ let cartIcon=`<svg
20
20
  <circle cx="14.3094" cy="15.8948" r="1.61255" fill="#F9F9F9" />
21
21
  </svg>`,ProductButtonSettings=[{id:"setting",controls:[{id:"buttonLayoutGroup",type:"group",controls:[{id:"buttonLayout",type:"button-layout",default:"cart-icon",options:[{id:"cart-full",value:"cart-full",name:`<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10 flex items-center justify-center gap-4">${cartIcon} Add to cart - $19 <s>$30<s/></div>`,icon:!0},{id:"cart-price",value:"cart-price",name:'<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10">Add to cart - $19</div>',icon:!1},{id:"cart-only",value:"cart-only",name:'<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10">Add to cart</div>',icon:!1},{id:"cart-price-icon",value:"cart-price-icon",name:`<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10 flex items-center justify-center gap-4">${cartIcon} Add to cart - $19</div>`,icon:!0},{id:"cart-icon",value:"cart-icon",name:`<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10 flex items-center justify-center gap-4">${cartIcon} Add to cart</div>`,icon:!0}]},{id:"priceTypo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-3"}},hiddenSetting:{color:!0,textAlign:!0},ignoreReRender:!0},{id:"compareAtPriceTypo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-3"}},hiddenSetting:{color:!0,textAlign:!0},ignoreReRender:!0}]},{id:"priceLayout",type:"option:illustration",enableTooltip:!1,label:"Layout",options:[{value:"price-only",type:"image",svgName:"gp-product-button-price-only-layout"},{value:"price-before",type:"image",svgName:"gp-product-button-price-before-layout"},{value:"price-after",type:"image",svgName:"gp-product-button-price-after-layout"}],default:"price-only"},{id:"button-text-group",type:"group",label:"Product Button",controls:[{id:"label",type:"input",label:"Button Text",default:"Add to cart"},{id:"translate",type:"input",default:"label,outOfStockLabel,unavailableLabel,variantSelectionRequiredMessage"},{id:"outOfStockLabel",type:"input",label:"Out Of Stock Message",clearButton:!1,default:"Out of stock"},{id:"unavailableLabel",type:"input",label:"Unavailable",default:"Unavailable"},{id:"actionEffect",label:"After Add To Cart Action",type:"select",options:[{title:"Keep shopping",value:"continue-shopping"},{title:"Go to checkout",value:"buy-now"},{title:"Open cart",value:"open-cart-drawer"},{title:"Open URL",value:"go-to-url"}],default:"open-cart-drawer"},{id:"customURL",label:"Custom URL",type:"pick-link",default:{link:"/cart",target:"_self"},isHiddenOpenLinkSelect:!0,hide:!0},{id:"enableMessage",type:"toggle",default:!0},{id:"successMessage",type:"textarea",label:"Success",minHeight:58,default:"Add product to cart successfully",autoHeight:!0},{id:"errorMessage",type:"textarea",label:"Error",minHeight:58,default:"Cannot add product to cart",autoHeight:!0},{id:"variantSelectionRequiredMessage",type:"textarea",label:"Error Message",minHeight:78,default:"Please select a variant to add product to cart",autoHeight:!0}]},{id:"group-icon",type:"group",label:"Icon",controls:[{id:"iconSvg",label:"SVG icon",type:"icon",hide:!0,default:`<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414779109605736">
22
22
  <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M233.21,56.31A12,12,0,0,0,224,52H66L60.53,21.85A12,12,0,0,0,48.73,12H24a12,12,0,0,0,0,24H38.71L63.62,173a28,28,0,0,0,4.07,10.21A32,32,0,1,0,123,196h34a32,32,0,1,0,31-24H91.17a4,4,0,0,1-3.93-3.28L84.92,156H196.1a28,28,0,0,0,27.55-23l12.16-66.86A12,12,0,0,0,233.21,56.31ZM100,204a8,8,0,1,1-8-8A8,8,0,0,1,100,204Zm88,8a8,8,0,1,1,8-8A8,8,0,0,1,188,212Zm12-83.28A4,4,0,0,1,196.1,132H80.56L70.38,76H209.62Z"></path></svg>`,compoDefaultValue:`<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414779109605736">
23
- <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M233.21,56.31A12,12,0,0,0,224,52H66L60.53,21.85A12,12,0,0,0,48.73,12H24a12,12,0,0,0,0,24H38.71L63.62,173a28,28,0,0,0,4.07,10.21A32,32,0,1,0,123,196h34a32,32,0,1,0,31-24H91.17a4,4,0,0,1-3.93-3.28L84.92,156H196.1a28,28,0,0,0,27.55-23l12.16-66.86A12,12,0,0,0,233.21,56.31ZM100,204a8,8,0,1,1-8-8A8,8,0,0,1,100,204Zm88,8a8,8,0,1,1,8-8A8,8,0,0,1,188,212Zm12-83.28A4,4,0,0,1,196.1,132H80.56L70.38,76H209.62Z"></path></svg>`},{id:"iconAlign",label:"Icon Alignment",type:"option:value",hide:!0,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],default:"left"}]},{id:"errorType",type:"option:value",options:[{value:"built-in",label:"Shopify",tooltip:"Show default error message from Shopify"},{value:"custom",label:"Custom",tooltip:"Customize error message"}],default:"built-in"},{id:"shouldClearSpace",label:"",type:"toggle",default:!1},{id:"separator",label:"Separator",type:"option:value",options:[{value:"horizontal-line",iconName:"gp-product-button-horizontal-line-separator"},{value:"dot",iconName:"gp-product-button-dot-separator"},{value:"vertical-line",iconName:"gp-product-button-vertical-line-separator"}],default:"horizontal-line"}]},{id:"style",controls:[{id:"iconSpacing",type:"input:unit",units:["px"],devices:{desktop:{default:"8px"}}},{id:"behavior-state",type:"behavior-state",controls:[{id:"backgroundColor",type:"colorpicker",label:"Background Color",default:{normal:"brand",hover:"highlight"},state:{hover:!0,normal:!0}},{id:"textColor",type:"colorpicker",label:"Text Color",default:{normal:"text-3"},state:{hover:!0,normal:!0}},{id:"borderBtn",type:"border",label:"Border Style",default:{normal:{border:"none",isCustom:!0,position:"all",borderWidth:"1px",width:"1px 1px 1px 1px"},hover:{border:"none",isCustom:!0,position:"all",borderWidth:"1px",width:"1px 1px 1px 1px"}},state:{hover:!0,normal:!0}},{id:"hasBoxShadowBtn",type:"toggle",label:"Enable Button Shadow",default:{normal:!1,hover:!1},state:{normal:!0,hover:!0}},{id:"roundedBtn",type:"radius-preset",label:"Border Radius",default:{normal:{radiusType:"none"}},state:{hover:!0,normal:!0}}]},{id:"backgroundColorV2",type:"color-picker-v2",default:{normal:"brand",hover:"highlight"},compoDefaultValue:{normal:"brand",hover:"highlight"},enableGradient:!0},{id:"boxShadowBtn",type:"shadow-v2",default:{normal:{}},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:45}}},{id:"roundedBtnV2",type:"corner-v2",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}},compoDefaultValue:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}},{id:"borderBtnV2",type:"border-v2",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}},compoDefaultValue:{normal:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"}}},{id:"textColorHover",type:"color-picker-v2",default:{hover:"text-3"},compoDefaultValue:{hover:"text-3"}},{id:"oosBackgroundV2",type:"color-picker-v2",default:{normal:"brand",hover:"highlight"},compoDefaultValue:{normal:"brand",hover:"highlight"},enableGradient:!0},{id:"oosTextColorV2",type:"color-picker-v2",default:{normal:"text-3"},compoDefaultValue:{normal:"text-3"}},{id:"oosBorderV2",type:"border-v2",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}},compoDefaultValue:{normal:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"}}},{id:"oosShadowV2",type:"shadow-v2",default:{normal:{}},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:45}}},{id:"oosRoundedV2",label:"Border Radius",type:"corner-v2",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}},compoDefaultValue:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}},{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:"typo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1",attrs:{color:"text-3"}},hiddenSetting:{textAlign:!0},ignoreReRender:!0},{id:"enableIcon",type:"toggle",default:!0},{id:"enablePrice",type:"toggle",default:!1},{id:"enableSeparator",type:"toggle",default:!1},{id:"enableTextStyle",type:"toggle",default:!0},{id:"transform",label:"Text Transform",type:"select",options:[{value:"default",title:"None"},{value:"capitalize",title:"Capitalize"},{value:"uppercase",title:"Uppercase"},{value:"lowercase",title:"Lowercase"}],default:"default"},{id:"button-dimensions",type:"group",label:"Dimensions",controls:[{id:"btnSpacing",label:"Inside space",type:"size",default:{type:"medium"},ignoreReRender:!0},{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"width",type:"input:unit",label:"Width",emptyOnClear:!0,placeholder:"Auto",min:0,units:["px","%"],devices:{desktop:{default:void 0}}}]},{id:"icon-dimensions",type:"group",label:"Icon Dimension",hide:!0,controls:[{id:"iconSizeAuto",type:"toggle",label:"Auto Size",default:!0},{id:"size",label:"Size Icon",type:"select",options:[{title:"Large",value:"1.2em"},{title:"medium",value:"1em"},{title:"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:"success-group",type:"group",label:"Success Message",controls:[{id:"successTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2",attrs:{color:"success"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"successColor",type:"colorpicker",label:"Text Color",default:"success"}]},{id:"error-group",type:"group",label:"Error Message",controls:[{id:"errorTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2",attrs:{color:"error"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"errorColor",type:"colorpicker",label:"Text Color",default:"error"}]},{id:"outofstock-group",type:"group",label:"Out of Stock",controls:[{id:"isCustomOutOfStock",label:"Custom Style",type:"toggle",default:!1},{id:"oosBackground",type:"colorpicker",label:"Background Color",default:"brand",hide:!0},{id:"oosTextColor",type:"colorpicker",label:"Text Color",default:"text-3",hide:!0},{id:"oosIconColor",type:"colorpicker",label:"Text Color",default:"text-3",hide:!0},{id:"oosBorder",type:"border",label:"Border Style",default:{normal:{borderType:"none",border:"none",isCustom:!1,borderWidth:"1px",width:"1px 1px 1px 1px"}},hide:!0},{id:"oosEnableShadow",type:"toggle",label:"Enable Button Shadow",default:!1,hide:!0},{id:"oosShadow",type:"boxShadow",label:"Shadow Style",hide:!0,emptyOnClear:!0,default:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90}},{id:"oosRounded",type:"radius-preset",label:"Border Radius",default:{radiusType:"none"},hide:!0}]},{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"]},height:{displayOptions:["auto"]}},hiddenSettings:["shape","gap"]}]}];export{ProductButtonSettings};
23
+ <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M233.21,56.31A12,12,0,0,0,224,52H66L60.53,21.85A12,12,0,0,0,48.73,12H24a12,12,0,0,0,0,24H38.71L63.62,173a28,28,0,0,0,4.07,10.21A32,32,0,1,0,123,196h34a32,32,0,1,0,31-24H91.17a4,4,0,0,1-3.93-3.28L84.92,156H196.1a28,28,0,0,0,27.55-23l12.16-66.86A12,12,0,0,0,233.21,56.31ZM100,204a8,8,0,1,1-8-8A8,8,0,0,1,100,204Zm88,8a8,8,0,1,1,8-8A8,8,0,0,1,188,212Zm12-83.28A4,4,0,0,1,196.1,132H80.56L70.38,76H209.62Z"></path></svg>`},{id:"iconAlign",label:"Icon Alignment",type:"option:value",hide:!0,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],default:"left"}]},{id:"errorType",type:"option:value",options:[{value:"built-in",label:"Shopify",tooltip:"Show default error message from Shopify"},{value:"custom",label:"Custom",tooltip:"Customize error message"}],default:"built-in"},{id:"shouldClearSpace",label:"",type:"toggle",default:!1},{id:"separator",label:"Separator",type:"option:value",options:[{value:"horizontal-line",iconName:"gp-product-button-horizontal-line-separator"},{value:"dot",iconName:"gp-product-button-dot-separator"},{value:"vertical-line",iconName:"gp-product-button-vertical-line-separator"}],default:"horizontal-line"}]},{id:"style",controls:[{id:"iconSpacing",type:"input:unit",units:["px"],devices:{desktop:{default:"8px"}}},{id:"behavior-state",type:"behavior-state",controls:[{id:"backgroundColor",type:"colorpicker",label:"Background Color",default:{normal:"brand",hover:"highlight"},state:{hover:!0,normal:!0}},{id:"textColor",type:"colorpicker",label:"Text Color",default:{normal:"text-3"},state:{hover:!0,normal:!0}},{id:"borderBtn",type:"border",label:"Border Style",default:{normal:{border:"none",isCustom:!0,position:"all",borderWidth:"1px",width:"1px 1px 1px 1px"},hover:{border:"none",isCustom:!0,position:"all",borderWidth:"1px",width:"1px 1px 1px 1px"}},state:{hover:!0,normal:!0}},{id:"hasBoxShadowBtn",type:"toggle",label:"Enable Button Shadow",default:{normal:!1,hover:!1},state:{normal:!0,hover:!0}},{id:"roundedBtn",type:"radius-preset",label:"Border Radius",default:{normal:{radiusType:"none"}},state:{hover:!0,normal:!0}}]},{id:"backgroundColorV2",type:"color-picker-v2",default:{normal:"brand",hover:"highlight"},compoDefaultValue:{normal:"brand",hover:"highlight"},enableGradient:!0},{id:"boxShadowBtn",type:"shadow-v2",default:{normal:{}},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:45}}},{id:"roundedBtnV2",type:"corner-v2",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}},compoDefaultValue:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}},{id:"borderBtnV2",type:"border-v2",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}},compoDefaultValue:{normal:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}}},{id:"textColorHover",type:"color-picker-v2",default:{hover:"text-3"},compoDefaultValue:{hover:"text-3"}},{id:"oosBackgroundV2",type:"color-picker-v2",default:{normal:"brand",hover:"highlight"},compoDefaultValue:{normal:"brand",hover:"highlight"},enableGradient:!0},{id:"oosTextColorV2",type:"color-picker-v2",default:{normal:"text-3"},compoDefaultValue:{normal:"text-3"}},{id:"oosBorderV2",type:"border-v2",default:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0},hover:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}},compoDefaultValue:{normal:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"},hover:{border:"solid",color:"#212121",width:"1px",borderWidth:"1px"}}},{id:"oosShadowV2",type:"shadow-v2",default:{normal:{}},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"#121212",angle:45}}},{id:"oosRoundedV2",label:"Border Radius",type:"corner-v2",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}},compoDefaultValue:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"},hover:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}}},{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:"typo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1",attrs:{color:"text-3"}},hiddenSetting:{textAlign:!0},ignoreReRender:!0},{id:"enableIcon",type:"toggle",default:!0},{id:"enablePrice",type:"toggle",default:!1},{id:"enableSeparator",type:"toggle",default:!1},{id:"transform",label:"Text Transform",type:"select",options:[{value:"default",title:"None"},{value:"capitalize",title:"Capitalize"},{value:"uppercase",title:"Uppercase"},{value:"lowercase",title:"Lowercase"}],default:"default"},{id:"button-dimensions",type:"group",label:"Dimensions",controls:[{id:"btnSpacing",label:"Inside space",type:"size",default:{type:"medium"},ignoreReRender:!0},{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"width",type:"input:unit",label:"Width",emptyOnClear:!0,min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}}]},{id:"icon-dimensions",type:"group",label:"Icon Dimension",hide:!0,controls:[{id:"iconSizeAuto",type:"toggle",label:"Auto Size",default:!0},{id:"size",label:"Size Icon",type:"select",options:[{title:"Large",value:"1.2em"},{title:"medium",value:"1em"},{title:"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:"success-group",type:"group",label:"Success Message",controls:[{id:"successTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2",attrs:{color:"success"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"successColor",type:"colorpicker",label:"Text Color",default:"success"}]},{id:"error-group",type:"group",label:"Error Message",controls:[{id:"errorTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2",attrs:{color:"error"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"errorColor",type:"colorpicker",label:"Text Color",default:"error"}]},{id:"outofstock-group",type:"group",label:"Out of Stock",controls:[{id:"isCustomOutOfStock",label:"Custom Style",type:"toggle",default:!1},{id:"oosBackground",type:"colorpicker",label:"Background Color",default:"brand",hide:!0},{id:"oosTextColor",type:"colorpicker",label:"Text Color",default:"text-3",hide:!0},{id:"oosIconColor",type:"colorpicker",label:"Text Color",default:"text-3",hide:!0},{id:"oosBorder",type:"border",label:"Border Style",default:{normal:{borderType:"none",border:"none",isCustom:!1,borderWidth:"1px",width:"1px 1px 1px 1px"}},hide:!0},{id:"oosEnableShadow",type:"toggle",label:"Enable Button Shadow",default:!1,hide:!0},{id:"oosShadow",type:"boxShadow",label:"Shadow Style",hide:!0,emptyOnClear:!0,default:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90}},{id:"oosRounded",type:"radius-preset",label:"Border Radius",default:{radiusType:"none"},hide:!0}]},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"100%",height:"Auto",padding:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}},settingConfig:{width:{displayOptions:["full","auto"]},height:{displayOptions:["auto"]}},hiddenSettings:["shape","gap"]}]}];export{ProductButtonSettings};