@gem-sdk/components 2.0.0-staging.799 → 2.0.0-staging.801
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/countdown-timer/components/Countdown.js +1 -1
- package/dist/cjs/hero-banner/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/product/components/file-upload/settings/configs/settings.js +1 -1
- package/dist/cjs/product/settings/product-button/configs/settings.js +1 -1
- package/dist/cjs/product/settings/product-variant/configs/settings.js +1 -1
- package/dist/cjs/sticky/hooks/useSticky.js +1 -1
- package/dist/cjs/tab/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/text/common/classes.js +1 -1
- package/dist/cjs/text/components/Text.js +1 -1
- package/dist/esm/countdown-timer/components/Countdown.js +1 -1
- package/dist/esm/hero-banner/settings/configs/ui-v2.js +1 -1
- package/dist/esm/product/components/file-upload/settings/configs/settings.js +1 -1
- package/dist/esm/product/settings/product-button/configs/settings.js +1 -1
- package/dist/esm/product/settings/product-variant/configs/settings.js +1 -1
- package/dist/esm/sticky/hooks/useSticky.js +1 -1
- package/dist/esm/tab/settings/configs/ui-v2.js +1 -1
- package/dist/esm/text/common/classes.js +1 -1
- package/dist/esm/text/components/Text.js +1 -1
- package/dist/types/index.d.ts +14 -4
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),helpers=require("../common/helpers.js"),Text=require("../../text/components/Text.js"),core=require("@gem-sdk/core"),system=require("@gem-sdk/system"),attrs=require("../common/attrs.js"),classes=require("../common/classes.js"),styles=require("../common/styles.js"),useCountDownTimer=require("../hooks/useCountDownTimer.js");const Countdown=e=>{let{setting:s,styles:t,builderProps:l,advanced:
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),helpers=require("../common/helpers.js"),Text=require("../../text/components/Text.js"),core=require("@gem-sdk/core"),system=require("@gem-sdk/system"),attrs=require("../common/attrs.js"),classes=require("../common/classes.js"),styles=require("../common/styles.js"),useCountDownTimer=require("../hooks/useCountDownTimer.js");const Countdown=e=>{let{setting:s,styles:t,builderProps:l,advanced:a}=e,{labelTypo:r,numTypo:i,labelTypography:m,numTypography:n,enableLabelTextStyle:y}=t??{},{weekLabel:c,dayLabel:o,hourLabel:u,minuteLabel:d,secondLabel:x,enableWeek:j,enableDay:C,enableHour:g,enableMinute:p,enableSecond:h,redirectUrl:f}=s??{},T=core.useEditorMode(),{week:S,day:k,hour:q,minute:R,second:v,timeLeft:w,ref:I}=useCountDownTimer.default(s,l),N=!!f?.link&&"edit"!==T,b=system.createClass({...classes.getTextExpireClasses()});if(s?.autoHideWhenTimeout&&w<=0)return"edit"!==T?null:jsxRuntime.jsx("div",{className:b,children:jsxRuntime.jsx("span",{children:"Countdown is run out of time (this only visible in the editor)"})});let D=system.createAttr({...attrs.getAttr({uid:l?.uid||""})}),E=system.createStyle({...styles.getWrapperStyle(t)}),F=system.createClass({...classes.getWrapperClasses(a?.cssClass)}),W=system.createClass({...classes.getContentClasses()}),A=system.createStyle({...styles.getContainStyle(t)}),B=system.createStyle({...styles.getDateStyle(t)}),M=e=>system.createClass({...classes.getDateClasses(e)}),_=system.createClass({...classes.getTextFrontClasses(t)}),H=system.createStyle({...styles.getTextFrontStyle(t)}),L=system.createStyle({...styles.getTextBackStyle(t)}),O=e=>system.createClass({...classes.getTextBackClasses(t,e)}),P=system.createClass({...classes.getLinkClasses()}),z=(e,s)=>{let t=helpers.formatTime(e);return jsxRuntime.jsxs("div",{style:B,className:M(s),children:[jsxRuntime.jsx(Text.default,{styles:{typography:n,typo:i},setting:{htmlTag:"div",text:t,excludeFlex:!0},className:_,style:H,disableEdit:!0}),system.If(!!y,jsxRuntime.jsx(Text.default,{styles:{typography:m,typo:r},setting:{text:s,htmlTag:"p",excludeFlex:!0},style:L,className:O(s),disableEdit:!0}))]})};return jsxRuntime.jsx("div",{ref:I,...D,className:F,style:E,children:jsxRuntime.jsxs("div",{className:W,style:A,children:[system.If(N,jsxRuntime.jsx("a",{href:f?.link,target:f?.target,"aria-label":"Countdown link",className:P,children:" "})),system.If(j,z(S,c)),system.If(C,z(k,o)),system.If(g,z(q,u)),system.If(p,z(R,d)),system.If(h,z(v,x))]})})};exports.default=Countdown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const 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:"overlayOpacity",state:"hover"},label:{en:"Opacity"}},{setting:{id:"overlayColor",state:"hover"},compoDefaultValue:"#121212",label:{en:"Color"},controlChangeTrigger:{settings:[{condition:"hoverEffectScale == '100%' && (!overlayColor || !overlayColor.hover || overlayColor.hover === \"transparent\")",source:["overlayColor","hoverEffectScale"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Scale"},type:"combo",iconName:"polaris-maximize",getValueFromSettingID:"hoverEffectScale",defaultValueWhenClear:"100%",compoDefaultValue:"120%",controls:[{label:{en:"Scale"},setting:{id:"hoverEffectScale"},defaultValueWhenClear:"100%",controlChangeTrigger:{settings:[{condition:"hoverEffectScale == '100%' && (!overlayColor ||!overlayColor.hover || overlayColor.hover === \"transparent\")",source:["overlayColor","hoverEffectScale"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}},{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:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];exports.SettingUIV2=SettingUIV2;
|
|
1
|
+
"use strict";const 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"},controlChangeTrigger:{settings:[{condition:'hoverEffect == true && hoverEffectScale == "100%"',source:["hoverEffect","hoverEffectScale"],action:{controlId:"hoverEffectScale",groupType:"style",controlType:"style",newValue:"120%"}}],options:{noRecordHistory:!0}},defaultValueWhenClear:!1,controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.hover",defaultValueWhenClear:"transparent",compoDefaultValue:"#121212",controls:[{setting:{id:"overlayOpacity",state:"hover"},label:{en:"Opacity"}},{setting:{id:"overlayColor",state:"hover"},compoDefaultValue:"#121212",label:{en:"Color"},controlChangeTrigger:{settings:[{condition:"hoverEffectScale == '100%' && (!overlayColor || !overlayColor.hover || overlayColor.hover === \"transparent\")",source:["overlayColor","hoverEffectScale"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!1}},{condition:"hoverEffectScale != '100%' && overlayColor.hover && overlayColor.hover !== \"transparent\")",source:["overlayColor","hoverEffectScale"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!0}}],options:{noRecordHistory:!0}}}]},{label:{en:"Scale"},type:"combo",iconName:"polaris-maximize",getValueFromSettingID:"hoverEffectScale",defaultValueWhenClear:"100%",compoDefaultValue:"120%",controls:[{label:{en:"Scale"},setting:{id:"hoverEffectScale"},defaultValueWhenClear:"100%",controlChangeTrigger:{settings:[{condition:"hoverEffectScale == '100%' && (!overlayColor ||!overlayColor.hover || overlayColor.hover === \"transparent\")",source:["overlayColor","hoverEffectScale"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}},{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:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];exports.SettingUIV2=SettingUIV2;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const Settings=[{id:"setting",controls:[{id:"textContent",type:"textarea",default:"Click or drop your image to upload (Max $max_size)"},{id:"translate",type:"input",default:"textContent"},{id:"fileUploadLayout",label:"Layout",type:"layout-selector",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemSpacing:"large",itemPerRow:2,default:"vertical",options:[{label:"Vertical",value:"vertical",iconName:"gp-product-file-upload-vertical-layout"},{label:"Horizontal",value:"horizontal",iconName:"gp-product-file-upload-horizontal-layout"}]},{id:"arrangeContent",label:"Arrange content",type:"segment",default:"center",options:[{label:"Left",value:"start",type:"align-v",icon:`<svg width="42" height="28" viewBox="0 0 42 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1
|
+
"use strict";const Settings=[{id:"setting",controls:[{id:"textContent",type:"textarea",default:"Click or drop your image to upload (Max $max_size)",minHeight:58},{id:"translate",type:"input",default:"textContent"},{id:"fileUploadLayout",label:"Layout",type:"layout-selector",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemSpacing:"large",itemPerRow:2,default:"vertical",options:[{label:"Vertical",value:"vertical",iconName:"gp-product-file-upload-vertical-layout"},{label:"Horizontal",value:"horizontal",iconName:"gp-product-file-upload-horizontal-layout"}]},{id:"arrangeContent",label:"Arrange content",type:"segment",default:"center",options:[{label:"Left",value:"start",type:"align-v",icon:`<svg width="42" height="28" viewBox="0 0 42 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.8867 22.375C11.8867 22.7202 12.1665 23 12.5117 23C12.8569 23 13.1367 22.7202 13.1367 22.375L13.1367 18.7683C13.3322 18.8374 13.5426 18.875 13.7617 18.875L21.2617 18.875C22.2973 18.875 23.1367 18.0355 23.1367 17L23.1367 11.5C23.1367 10.4645 22.2973 9.625 21.2617 9.625L13.7617 9.625C13.5426 9.625 13.3322 9.6626 13.1367 9.7317L13.1367 6.12408C13.1367 5.77891 12.8569 5.49908 12.5117 5.49908C12.1665 5.49908 11.8867 5.77891 11.8867 6.12408L11.8867 22.375ZM13.7617 17.625C13.4166 17.625 13.1367 17.3452 13.1367 17L13.1367 11.5C13.1367 11.1548 13.4166 10.875 13.7617 10.875L21.2617 10.875C21.6069 10.875 21.8867 11.1548 21.8867 11.5L21.8867 17C21.8867 17.3452 21.6069 17.625 21.2617 17.625L13.7617 17.625Z" fill="currentColor"/>
|
|
3
3
|
</svg>
|
|
4
4
|
`},{label:"Center",value:"center",type:"align-v",icon:`<svg width="42" height="28" viewBox="0 0 42 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";const ProductButtonSettings=[{id:"setting",controls:[{id:"buttonLayoutGroup",type:"group",controls:[{id:"buttonLayout",label:"Layout",type:"layout-selector",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemSpacing:"large",itemPerRow:1,default:"cart-icon",options:[{value:"cart-full",iconName:"gp-product-button-cart-full-layout"},{value:"cart-price",iconName:"gp-product-button-cart-price-layout"},{value:"cart-only",iconName:"gp-product-button-cart-only-layout"},{value:"cart-price-icon",iconName:"gp-product-button-price-icon-layout"},{value:"cart-icon",iconName:"gp-product-button-cart-item-layout"}]},{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:"opacityPrice",type:"input:slider",step:1,min:0,max:100,ignoreMax:!0,default:50}]},{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
|
|
1
|
+
"use strict";const ProductButtonSettings=[{id:"setting",controls:[{id:"buttonLayoutGroup",type:"group",controls:[{id:"buttonLayout",label:"Layout",type:"layout-selector",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemSpacing:"large",itemPerRow:1,default:"cart-icon",options:[{value:"cart-full",iconName:"gp-product-button-cart-full-layout"},{value:"cart-price",iconName:"gp-product-button-cart-price-layout"},{value:"cart-only",iconName:"gp-product-button-cart-only-layout"},{value:"cart-price-icon",iconName:"gp-product-button-price-icon-layout"},{value:"cart-icon",iconName:"gp-product-button-cart-item-layout"}]},{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:"opacityPrice",type:"input:slider",step:1,min:0,max:100,ignoreMax:!0,default:50}]},{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 Page",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">
|
|
2
2
|
<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">
|
|
3
3
|
<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:slider",units:["px"],step:1,min:0,max:40,ignoreMax:!0,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:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}},{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"},{id:"oosEnableShadow",type:"toggle",label:"Enable Button Shadow",default:!1,hide:!0},{id:"oosShadow",type:"shadow-v2",compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}},{id:"oosRoundedV2",label:"Border Radius",type:"corner-v2",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:"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"]}]}];exports.ProductButtonSettings=ProductButtonSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var rectangleList=require("../swatches-style-config/rectangle-list.js"),color=require("../swatches-style-config/color.js"),image=require("../swatches-style-config/image.js"),imageShopify=require("../swatches-style-config/image-shopify.js"),dropdown=require("../swatches-style-config/dropdown.js");const ProductVariantSettings=[{id:"setting",controls:[{id:"variantsOption",type:"group",label:"Variants Options",controls:[{id:"optionType",label:"Option Label",type:"select",default:"singleOption",options:[{label:"Separated",value:"singleOption"},{label:"Combine",value:"groupOption"}]},{id:"label",label:"Option Label",type:"toggle",default:!0},{id:"optionAlign",label:"Alignment",type:"segment",devices:{desktop:{default:"left"}},options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}]},{id:"price",label:"Option Price",type:"option:value",hide:!0,default:!0,options:[{value:!0,label:"Yes"},{value:!1,label:"No"}]},{id:"showAsSwatches",label:"Use Option Swatches",type:"swatchesLink",hide:!0,default:!0,hyperlinkInfo:{beforeText:"Go to ",hyperlinkText:"Manage Swatches",afterText:" to configure options display as swatches",modal:"manage_swatches"}},{id:"combineFullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"combineWidth",type:"input:unit",label:"Width",placeholder:"Auto",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"combineHeight",type:"input:unit",label:"Height",placeholder:"Auto",min:0,units:["px"],default:"45px"},{id:"variantPresets",label:"Use Option Swatches",type:"variant:presets",default:[{optionName:"base",optionType:"rectangle_list",presets:{...color.colorPresetConfig,...rectangleList.rectangleListPresetConfig,...image.imagePresetConfig,...imageShopify.imageShopifyPresetConfig,...dropdown.dropdownPresetConfig}}],hyperlinkInfo:{modal:"manage_swatches"}},{id:"soldOutStyle",type:"select",default:"line",options:[{label:"None",value:"none"},{label:"Unclickable",value:"disable"},{label:"Cross-out",value:"line",icon:"gp-cross-out-one-line"}]}]},{id:"options",type:"group",label:"Options",controls:[{id:"layout",label:"Layout",type:"option:illustration",iconViewBox:"0 0 66 45",enableItemBackground:!0,devices:{desktop:{default:"vertical"}},options:[{label:"Vertical",value:"vertical",type:"arrange",svgName:"gp-arrange-vertical"},{label:"Horizontal",value:"horizontal",type:"arrange",svgName:"gp-arrange-horizontal"}]},{id:"column",label:"Column",type:"select",devices:{desktop:{default:1}},options:[{label:"1 column",value:1},{label:"2 columns",value:2},{label:"3 columns",value:3},{label:"4 columns",value:4}]}]},{id:"variantDisplay",type:"group",label:"Variant Display",controls:[{id:"hasPreSelected",type:"toggle",label:"hasPreSelected",default:!0},{id:"selectVariantDefault",type:"select-variant",label:"Select Default Variant",hide:!0}]},{id:"blankText",label:"Blank Option Text",type:"input",hide:!0,default:"Please select an option"},{id:"hasOnlyDefaultVariant",label:"Blank Option Text",type:"variant:default",hide:!0,default:!1}]},{id:"style",controls:[{id:"dimension",type:"group",label:"Variants Dimension",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"width",type:"input:unit",label:"Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"optionSpacing",label:"Option Spacing",type:"input:unit",units:["px"],placeholder:"Auto",default:"30px"},{id:"labelGap",label:"Gap",type:"input:slider",units:["px"],ignoreMax:!0,max:40,default:"8px"}]},{id:"swatchDimension",type:"group",label:"Swatch Dimension",controls:[{id:"swatchAutoWidth",label:"Auto Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"swatchWidth",type:"input:unit",label:"Width",placeholder:"Auto Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"80px"}}},{id:"swatchHeight",type:"input:unit",label:"Height",placeholder:"Auto Height",min:0,units:["px"],devices:{desktop:{default:"45px"}}},{id:"swatchSpacing",label:"Swatch Spacing",type:"input:unit",units:["px"],placeholder:"Auto",default:"var(--g-s-m)"},{id:"marginBottom",label:"Margin Bottom",type:"input:slider",units:["px"],ignoreMax:!0,max:40,devices:{desktop:{default:"16px"}
|
|
1
|
+
"use strict";var rectangleList=require("../swatches-style-config/rectangle-list.js"),color=require("../swatches-style-config/color.js"),image=require("../swatches-style-config/image.js"),imageShopify=require("../swatches-style-config/image-shopify.js"),dropdown=require("../swatches-style-config/dropdown.js");const ProductVariantSettings=[{id:"setting",controls:[{id:"variantsOption",type:"group",label:"Variants Options",controls:[{id:"optionType",label:"Option Label",type:"select",default:"singleOption",options:[{label:"Separated",value:"singleOption"},{label:"Combine",value:"groupOption"}]},{id:"label",label:"Option Label",type:"toggle",default:!0},{id:"optionAlign",label:"Alignment",type:"segment",devices:{desktop:{default:"left"}},options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}]},{id:"price",label:"Option Price",type:"option:value",hide:!0,default:!0,options:[{value:!0,label:"Yes"},{value:!1,label:"No"}]},{id:"showAsSwatches",label:"Use Option Swatches",type:"swatchesLink",hide:!0,default:!0,hyperlinkInfo:{beforeText:"Go to ",hyperlinkText:"Manage Swatches",afterText:" to configure options display as swatches",modal:"manage_swatches"}},{id:"combineFullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"combineWidth",type:"input:unit",label:"Width",placeholder:"Auto",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"combineHeight",type:"input:unit",label:"Height",placeholder:"Auto",min:0,units:["px"],default:"45px"},{id:"variantPresets",label:"Use Option Swatches",type:"variant:presets",default:[{optionName:"base",optionType:"rectangle_list",presets:{...color.colorPresetConfig,...rectangleList.rectangleListPresetConfig,...image.imagePresetConfig,...imageShopify.imageShopifyPresetConfig,...dropdown.dropdownPresetConfig}}],hyperlinkInfo:{modal:"manage_swatches"}},{id:"soldOutStyle",type:"select",default:"line",options:[{label:"None",value:"none"},{label:"Unclickable",value:"disable"},{label:"Cross-out",value:"line",icon:"gp-cross-out-one-line"}]}]},{id:"options",type:"group",label:"Options",controls:[{id:"layout",label:"Layout",type:"option:illustration",iconViewBox:"0 0 66 45",enableItemBackground:!0,devices:{desktop:{default:"vertical"}},options:[{label:"Vertical",value:"vertical",type:"arrange",svgName:"gp-arrange-vertical"},{label:"Horizontal",value:"horizontal",type:"arrange",svgName:"gp-arrange-horizontal"}]},{id:"column",label:"Column",type:"select",devices:{desktop:{default:1}},options:[{label:"1 column",value:1},{label:"2 columns",value:2},{label:"3 columns",value:3},{label:"4 columns",value:4}]}]},{id:"variantDisplay",type:"group",label:"Variant Display",controls:[{id:"hasPreSelected",type:"toggle",label:"hasPreSelected",default:!0},{id:"selectVariantDefault",type:"select-variant",label:"Select Default Variant",hide:!0}]},{id:"blankText",label:"Blank Option Text",type:"input",hide:!0,default:"Please select an option"},{id:"hasOnlyDefaultVariant",label:"Blank Option Text",type:"variant:default",hide:!0,default:!1}]},{id:"style",controls:[{id:"dimension",type:"group",label:"Variants Dimension",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"width",type:"input:unit",label:"Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"optionSpacing",label:"Option Spacing",type:"input:unit",units:["px"],placeholder:"Auto",default:"30px"},{id:"labelGap",label:"Gap",type:"input:slider",units:["px"],ignoreMax:!0,max:40,default:"8px"}]},{id:"swatchDimension",type:"group",label:"Swatch Dimension",controls:[{id:"swatchAutoWidth",label:"Auto Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"swatchWidth",type:"input:unit",label:"Width",placeholder:"Auto Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"80px"}}},{id:"swatchHeight",type:"input:unit",label:"Height",placeholder:"Auto Height",min:0,units:["px"],devices:{desktop:{default:"45px"}}},{id:"swatchSpacing",label:"Swatch Spacing",type:"input:unit",units:["px"],placeholder:"Auto",default:"var(--g-s-m)"},{id:"marginBottom",label:"Margin Bottom",type:"input:slider",units:["px"],ignoreMax:!0,max:40,devices:{desktop:{default:"16px"}}}]},{id:"align",label:"Align",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"labelGroup",type:"group",label:"Label",controls:[{id:"labelTypo",type:"typography-combo",label:"Typography",default:{type:"paragraph-2",attrs:{color:"text-1",bold:!0},custom:{fontFamily:"Assistant",letterSpacing:"0px"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"labelColor",type:"color-picker-v2",label:"Text Color",default:"text-2"}]},{id:"labelGroup",type:"group",label:"Option Value",controls:[{id:"optionTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2"},hiddenSetting:{textAlign:!0,textShadow:!0},ignoreReRender:!0}]},{id:"behavior-state",type:"behavior-state",label:"Option Value",controls:[{id:"optionBgColor",type:"color-picker-v2",label:"Background Color",default:{normal:"bg-3"},state:{active:!0,hover:!0,normal:!0}},{id:"optionTextColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},state:{active:!0,hover:!0,normal:!0}},{id:"optionBorder",type:"border",label:"Border",default:{normal:{borderType:"style-2",border:"solid",color:"line-2",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"},active:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"2px 2px 2px 2px",borderWidth:"2px"},hover:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"}},state:{active:!0,hover:!0,normal:!0}},{id:"optionRounded",type:"radius-preset",label:"Border Radius",default:{normal:{btrr:"9999px",bblr:"9999px",bbrr:"9999px",btlr:"9999px",radiusType:"circle"},hover:{btrr:"9999px",bblr:"9999px",bbrr:"9999px",btlr:"9999px",radiusType:"circle"},active:{btrr:"9999px",bblr:"9999px",bbrr:"9999px",btlr:"9999px",radiusType:"circle"}},state:{active:!0,hover:!0,normal:!0}},{id:"optionHasShadow",type:"toggle",label:"Shadow Enable",default:{normal:!1,hover:!1,active:!1},state:{normal:!0,hover:!0,active:!0}},{id:"optionShadow",type:"shadow-v2",label:"Shadow",hideOnState:{normal:!0,hover:!0,active:!0},default:{normal:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1},hover:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1},active:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1}},state:{normal:!0,hover:!0,active:!0}}]},{id:"dropdownItemWidth",type:"segment",label:"Dropdown Width",devices:{desktop:{default:"fill"},mobile:{default:"fill"},tablet:{default:"fill"}},options:[{label:"Fill",value:"fill"},{label:"Fixed",value:"fixed"}]},{id:"fixedDropdownWidth",type:"input:unit",label:"Fixed Width",units:["px","%"],devices:{desktop:{default:"240px"},mobile:{default:"240px"},tablet:{default:"240px"}}},{id:"swatchItemWidth",type:"segment",label:"Swatch Width",devices:{desktop:{default:"auto"}},options:[{label:"Fill",value:"auto"},{label:"Fixed",value:"fixed"}]},{id:"fixedDropdownWidth",type:"input:unit",label:"Fixed Width",units:["px","%"],devices:{desktop:{default:"240px"}}}]}];exports.ProductVariantSettings=ProductVariantSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),React=require("react");const useSticky=e=>{let{width:t,position:o}=e??{},s=core.useStickyStore(e=>e.isStickyVisible),a=core.makeStyleResponsive("w",t),l=core.usePageStore(e=>"interaction"===e.sidebarMode),i=core.useCurrentDevice(),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),React=require("react");const useSticky=e=>{let{width:t,position:o}=e??{},s=core.useStickyStore(e=>e.isStickyVisible),a=core.makeStyleResponsive("w",t),l=core.usePageStore(e=>"interaction"===e.sidebarMode),i=core.useCurrentDevice(),p=(e,t)=>({[`--left${t}`]:"top"==e?"0":"50%",[`--t${t}`]:"top"==e?"unset":"translateX(-50%)"}),b=React.useMemo(()=>({...p(o?.desktop,""),...p(o?.tablet??o?.desktop,"-tablet"),...p(o?.mobile??o?.tablet??o?.desktop,"-mobile")}),[o?.desktop,o?.mobile,o?.tablet]),r=React.useMemo(()=>{if(l&&o?.[i]==="top")return"40px"},[i,l,o]),d=React.useMemo(()=>({"--d":e?.display?.desktop!=="after-first-cart-button"||s?"block":"none","--d-tablet":e?.display?.tablet!=="after-first-cart-button"||s?"block":"none","--d-mobile":e?.display?.mobile!=="after-first-cart-button"||s?"block":"none"}),[s,e?.display?.desktop,e?.display?.mobile,e?.display?.tablet]),c=React.useMemo(()=>({"--top":r??"auto","--top-tablet":r??"auto","--top-mobile":r??"auto",[`--${o?.desktop}`]:r??"0px",[`--${o?.tablet??o?.desktop}-tablet`]:r??"0px",[`--${o?.mobile??o?.desktop}-mobile`]:r??"0px"}),[r,o?.desktop,o?.mobile,o?.tablet]),u=e=>"top"==e?"sticky":"fixed",k=React.useMemo(()=>({"--pos":u(o?.desktop),"--pos-tablet":u(o?.tablet??o?.desktop),"--pos-mobile":u(o?.mobile??o?.tablet??o?.desktop)}),[o?.desktop,o?.mobile,o?.tablet]);return{w:a,displayStyle:c,positionStyle:k,getCSSAlign:b,makeDisplaySettingStyles:d}};exports.default=useSticky;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const SettingUIV2=[{label:{en:"Layout"},controls:[{layout:"vertical",setting:{id:"position"}}]},{label:{en:"Tabs"},controls:[{label:{en:"Order"},setting:{id:"childItem"},controlConfig:{id:"childItem",type:"child-item",labelItem:"tab"}},{label:{en:"Text
|
|
1
|
+
"use strict";const SettingUIV2=[{label:{en:"Layout"},controls:[{layout:"vertical",setting:{id:"position"}}]},{label:{en:"Tabs"},controls:[{label:{en:"Order"},setting:{id:"childItem"},controlConfig:{id:"childItem",type:"child-item",labelItem:"tab",labelPopover:{en:"Tab management"}}},{label:{en:"Text"},type:"combo",iconName:"polaris-text-title",getValueFromSettingID:"labelTypoV2.type",isTypoValue:!0,isHideClear:!0,controls:[{layout:"vertical",setting:{id:"labelTypoV2"},options:{updateFields:[{field:"attrs.textAlign",settingId:"labelAlign"},{field:"attrs.color",settingId:"labelColor",state:"normal"}]},controlChangeTrigger:{settings:[{action:{controlId:"labelAlign",valueFromField:"attrs.textAlign",groupType:"setting",controlType:"setting"}},{action:{controlId:"labelColor",valueFromField:"attrs.color",groupType:"setting",controlType:"setting",removeDevice:!0,state:"normal"}}],options:{noRecordHistory:!0}}}]},{conditionDisplay:'position == "top"',label:{en:"Width"},setting:{id:"panelWidth"}}],moreSettings:{type:"collapse",controls:[{id:"Width",label:{en:"Width"},conditionDisplay:'position != "top"',controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,fallbackValue:"Auto",linkWithSetting:{name:"labelWidth"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{label:{en:"Background"},setting:{id:"labelBgColor",state:"normal"}},{label:{en:"Border"},setting:{id:"borderTab",state:"normal"}},{conditionDisplay:'position == "top" && labelWidth != "100%"',label:{en:"Tabs align"},setting:{id:"panelAlign"}},{conditionDisplay:'position != "top" && labelWidth != "100%"',label:{en:"Tabs align"},setting:{id:"panelAlignVertical"}},{label:{en:"Hover effect"},type:"combo",iconName:"polaris-check-hover",fixedValue:"Enabled",setting:{id:"enableHoverEffect"},popoverLabel:{en:"Tabs hover effect"},controls:[{label:{en:"Text color"},setting:{id:"labelColor",state:"hover"}},{label:{en:"Background"},setting:{id:"labelBgColor",state:"hover"}},{label:{en:"Border"},setting:{id:"borderTab",state:"hover"}}]},{label:{en:"Active state"},type:"combo",setting:{id:"enableActiveEffect"},iconName:"polaris-status-active",fixedValue:"Enabled",popoverLabel:{en:"Tabs active state"},controls:[{label:{en:"Text color"},setting:{id:"labelColor",state:"active"}},{label:{en:"Background"},setting:{id:"labelBgColor",state:"active"}},{label:{en:"Border"},setting:{id:"borderTab",state:"active"}}]}]}},{label:{en:"Size"},controls:[{id:"containWidth",label:{en:"Width"},controlConfig:{id:"containWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"containWidth"}},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"spacing-setting",field:"padding"}}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},layout:"vertical"}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},controlConfig:{id:"border-advanced",type:"border-v2",linkWithSetting:{name:"border",field:"normal"},compoDefaultValue:{color:"line-3",border:"solid",width:"1px",borderWidth:"1px"}}},{label:{en:"Corner"},setting:{id:"rounded",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadow",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Display option"},controls:[{label:{en:"Default active"},setting:{id:"activeKey"}}]},{controls:[{label:{en:"Align"},setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"},conditionEnable:'!(parseInt(containWidth) >= 100 && containWidth?.includes("%"))'}]}];exports.SettingUIV2=SettingUIV2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");const getClasses=({setting:e,advanced:s,builderProps:t})=>({...t?.uid&&{[t.uid]:!0},...e?.options?.customClass?.wrapper&&{[e.options.customClass.wrapper]:!0},...s?.cssClass&&{[s.cssClass]:!0}}),getContainerClasses=({setting:e})=>{let{excludeFlex:s}=e??{},t="";return s||(t+=" gp-flex"),composeClasses(t)},getTextClasses=({styles:e,setting:s,className:t,mode:o})=>{let{text:
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");const getClasses=({setting:e,advanced:s,builderProps:t})=>({...t?.uid&&{[t.uid]:!0},...e?.options?.customClass?.wrapper&&{[e.options.customClass.wrapper]:!0},...s?.cssClass&&{[s.cssClass]:!0}}),getContainerClasses=({setting:e})=>{let{excludeFlex:s}=e??{},t="";return s||(t+=" gp-flex"),composeClasses(t)},getTextClasses=({styles:e,setting:s,className:t,mode:o,disableEdit:r})=>{let{text:l,options:p}=s??{},a="";l||r||(a+="gp-relative empty:gp-pl-[2px] after:gp-content-['Your_custom_text_goes_here'] after:gp-absolute after:gp-select-none after:gp-top-0 after:gp-left-[2px] after:gp-w-full after:gp-truncate after:gp-text-black after:gp-opacity-20 "),e?.underlineLink&&(a+=` ${e.underlineLink.hover?"hover:gp-underline":"hover:!gp-no-underline"} ${e.underlineLink.normal?" gp-underline":""}`+(e.underlineLink.hover?"":" hover:!gp-no-underline")),"edit"===o?(a+=" gp-text gp-cursor-pointer !gp-cursor-default",r||(a+=" gp-p-[2px]"),p?.useState&&(a+=" child-item-text gp-border gp-border-transparent hover:!gp-border-[#3C67FF]")):(a+=" gp-text-instant",p?.disablePointerEvent&&(a+=" gp-pointer-events-none"));let n=a.trim().split(" ").reduce((e,s)=>(e[s]=!0,e),{});return{...t&&{[t]:!0},...globalTypoClasses(e),...n}};function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}const globalTypoClasses=e=>{let s=core.composeTypographyClassName(e?.typo);return{...s&&{[s]:!0},...e?.textColor&&{[core.getGlobalColorClass("text",e?.textColor)]:!0},...!e?.textColor&&{[core.getGlobalColorStateClass("text",e?.color)]:!0}}};exports.composeClasses=composeClasses,exports.getClasses=getClasses,exports.getContainerClasses=getContainerClasses,exports.getTextClasses=getTextClasses,exports.globalTypoClasses=globalTypoClasses;
|
|
@@ -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"),React=require("react"),system=require("@gem-sdk/system"),attrs=require("../common/attrs.js"),styles=require("../common/styles.js"),classes=require("../common/classes.js"),helpers=require("../common/helpers.js");const Text=React.forwardRef(({styles:e,builderAttrs:s,style:t,setting:r,advanced:a,builderProps:l,className:c,children:y,...
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),React=require("react"),system=require("@gem-sdk/system"),attrs=require("../common/attrs.js"),styles=require("../common/styles.js"),classes=require("../common/classes.js"),helpers=require("../common/helpers.js");const Text=React.forwardRef(({styles:e,builderAttrs:s,style:t,setting:r,advanced:a,builderProps:l,className:c,children:y,disableEdit:m,...n},i)=>{let o=core.useEditorMode(),{htmlTag:u="div",options:d}=r??{},x=system.createAttr({...attrs.getAttr({uid:l?.uid||""})}),g=system.createAttr({...attrs.getTextAttr(d)}),j=system.createStyleReact({...styles.getStyle(e,t)}),p=system.createStyleReact({...styles.getContainerStyle(e,r)}),R=system.createStyleReact({...styles.getTextStyle(e,r)}),C=system.createClass({...classes.getClasses({setting:r,advanced:a,builderProps:l})}),q=system.createClass({...classes.getContainerClasses({setting:r})}),S=system.createClass({...classes.getTextClasses({styles:e,setting:r,className:c,mode:o,disableEdit:m})}),T=helpers.getDisplayText({type:"React",styles:e,setting:r,builderProps:l}),f=system.createContent(T);return jsxRuntime.jsxs("div",{...x,...n,...s,style:j,className:C,children:[jsxRuntime.jsx("div",{className:q,style:{...p},children:jsxRuntime.jsx(u,{ref:i,...g,className:S,onDragStart:e=>e.preventDefault(),onDrop:e=>e.preventDefault(),style:{...R},dangerouslySetInnerHTML:{__html:f}})}),y]})});exports.default=Text;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{formatTime as s}from"../common/helpers.js";import o from"../../text/components/Text.js";import{useEditorMode as
|
|
2
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{formatTime as s}from"../common/helpers.js";import o from"../../text/components/Text.js";import{useEditorMode as i}from"@gem-sdk/core";import{createClass as l,createAttr as r,createStyle as m,If as n}from"@gem-sdk/system";import{getAttr as a}from"../common/attrs.js";import{getTextExpireClasses as d,getWrapperClasses as c,getContentClasses as p,getTextFrontClasses as u,getLinkClasses as h,getDateClasses as y,getTextBackClasses as f}from"../common/classes.js";import{getWrapperStyle as g,getContainStyle as x,getDateStyle as j,getTextFrontStyle as N,getTextBackStyle as k}from"../common/styles.js";import v from"../hooks/useCountDownTimer.js";let Countdown=C=>{let{setting:w,styles:T,builderProps:b,advanced:E}=C,{labelTypo:F,numTypo:D,labelTypography:H,numTypography:W,enableLabelTextStyle:q}=T??{},{weekLabel:z,dayLabel:A,hourLabel:B,minuteLabel:G,secondLabel:I,enableWeek:J,enableDay:K,enableHour:L,enableMinute:M,enableSecond:O,redirectUrl:P}=w??{},Q=i(),{week:R,day:S,hour:U,minute:V,second:X,timeLeft:Y,ref:Z}=v(w,b),$=!!P?.link&&"edit"!==Q,_=l({...d()});if(w?.autoHideWhenTimeout&&Y<=0)return"edit"!==Q?null:e("div",{className:_,children:e("span",{children:"Countdown is run out of time (this only visible in the editor)"})});let ee=r({...a({uid:b?.uid||""})}),et=m({...g(T)}),es=l({...c(E?.cssClass)}),eo=l({...p()}),ei=m({...x(T)}),el=m({...j(T)}),er=e=>l({...y(e)}),em=l({...u(T)}),en=m({...N(T)}),ea=m({...k(T)}),ed=e=>l({...f(T,e)}),ec=l({...h()}),ep=(i,l)=>{let r=s(i);return t("div",{style:el,className:er(l),children:[e(o,{styles:{typography:W,typo:D},setting:{htmlTag:"div",text:r,excludeFlex:!0},className:em,style:en,disableEdit:!0}),n(!!q,e(o,{styles:{typography:H,typo:F},setting:{text:l,htmlTag:"p",excludeFlex:!0},style:ea,className:ed(l),disableEdit:!0}))]})};return e("div",{ref:Z,...ee,className:es,style:et,children:t("div",{className:eo,style:ei,children:[n($,e("a",{href:P?.link,target:P?.target,"aria-label":"Countdown link",className:ec,children:" "})),n(J,ep(R,z)),n(K,ep(S,A)),n(L,ep(U,B)),n(M,ep(V,G)),n(O,ep(X,I))]})})};export{Countdown as default};
|
|
@@ -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\' && 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:"overlayOpacity",state:"hover"},label:{en:"Opacity"}},{setting:{id:"overlayColor",state:"hover"},compoDefaultValue:"#121212",label:{en:"Color"},controlChangeTrigger:{settings:[{condition:"hoverEffectScale == '100%' && (!overlayColor || !overlayColor.hover || overlayColor.hover === \"transparent\")",source:["overlayColor","hoverEffectScale"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Scale"},type:"combo",iconName:"polaris-maximize",getValueFromSettingID:"hoverEffectScale",defaultValueWhenClear:"100%",compoDefaultValue:"120%",controls:[{label:{en:"Scale"},setting:{id:"hoverEffectScale"},defaultValueWhenClear:"100%",controlChangeTrigger:{settings:[{condition:"hoverEffectScale == '100%' && (!overlayColor ||!overlayColor.hover || overlayColor.hover === \"transparent\")",source:["overlayColor","hoverEffectScale"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}},{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:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];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"},controlChangeTrigger:{settings:[{condition:'hoverEffect == true && hoverEffectScale == "100%"',source:["hoverEffect","hoverEffectScale"],action:{controlId:"hoverEffectScale",groupType:"style",controlType:"style",newValue:"120%"}}],options:{noRecordHistory:!0}},defaultValueWhenClear:!1,controls:[{label:{en:"Overlay"},type:"combo",comboType:"color",getValueFromSettingID:"overlayColor.hover",defaultValueWhenClear:"transparent",compoDefaultValue:"#121212",controls:[{setting:{id:"overlayOpacity",state:"hover"},label:{en:"Opacity"}},{setting:{id:"overlayColor",state:"hover"},compoDefaultValue:"#121212",label:{en:"Color"},controlChangeTrigger:{settings:[{condition:"hoverEffectScale == '100%' && (!overlayColor || !overlayColor.hover || overlayColor.hover === \"transparent\")",source:["overlayColor","hoverEffectScale"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!1}},{condition:"hoverEffectScale != '100%' && overlayColor.hover && overlayColor.hover !== \"transparent\")",source:["overlayColor","hoverEffectScale"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!0}}],options:{noRecordHistory:!0}}}]},{label:{en:"Scale"},type:"combo",iconName:"polaris-maximize",getValueFromSettingID:"hoverEffectScale",defaultValueWhenClear:"100%",compoDefaultValue:"120%",controls:[{label:{en:"Scale"},setting:{id:"hoverEffectScale"},defaultValueWhenClear:"100%",controlChangeTrigger:{settings:[{condition:"hoverEffectScale == '100%' && (!overlayColor ||!overlayColor.hover || overlayColor.hover === \"transparent\")",source:["overlayColor","hoverEffectScale"],action:{controlId:"hoverEffect",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}},{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:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];export{SettingUIV2};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
let Settings=[{id:"setting",controls:[{id:"textContent",type:"textarea",default:"Click or drop your image to upload (Max $max_size)"},{id:"translate",type:"input",default:"textContent"},{id:"fileUploadLayout",label:"Layout",type:"layout-selector",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemSpacing:"large",itemPerRow:2,default:"vertical",options:[{label:"Vertical",value:"vertical",iconName:"gp-product-file-upload-vertical-layout"},{label:"Horizontal",value:"horizontal",iconName:"gp-product-file-upload-horizontal-layout"}]},{id:"arrangeContent",label:"Arrange content",type:"segment",default:"center",options:[{label:"Left",value:"start",type:"align-v",icon:`<svg width="42" height="28" viewBox="0 0 42 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1
|
+
let Settings=[{id:"setting",controls:[{id:"textContent",type:"textarea",default:"Click or drop your image to upload (Max $max_size)",minHeight:58},{id:"translate",type:"input",default:"textContent"},{id:"fileUploadLayout",label:"Layout",type:"layout-selector",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemSpacing:"large",itemPerRow:2,default:"vertical",options:[{label:"Vertical",value:"vertical",iconName:"gp-product-file-upload-vertical-layout"},{label:"Horizontal",value:"horizontal",iconName:"gp-product-file-upload-horizontal-layout"}]},{id:"arrangeContent",label:"Arrange content",type:"segment",default:"center",options:[{label:"Left",value:"start",type:"align-v",icon:`<svg width="42" height="28" viewBox="0 0 42 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.8867 22.375C11.8867 22.7202 12.1665 23 12.5117 23C12.8569 23 13.1367 22.7202 13.1367 22.375L13.1367 18.7683C13.3322 18.8374 13.5426 18.875 13.7617 18.875L21.2617 18.875C22.2973 18.875 23.1367 18.0355 23.1367 17L23.1367 11.5C23.1367 10.4645 22.2973 9.625 21.2617 9.625L13.7617 9.625C13.5426 9.625 13.3322 9.6626 13.1367 9.7317L13.1367 6.12408C13.1367 5.77891 12.8569 5.49908 12.5117 5.49908C12.1665 5.49908 11.8867 5.77891 11.8867 6.12408L11.8867 22.375ZM13.7617 17.625C13.4166 17.625 13.1367 17.3452 13.1367 17L13.1367 11.5C13.1367 11.1548 13.4166 10.875 13.7617 10.875L21.2617 10.875C21.6069 10.875 21.8867 11.1548 21.8867 11.5L21.8867 17C21.8867 17.3452 21.6069 17.625 21.2617 17.625L13.7617 17.625Z" fill="currentColor"/>
|
|
3
3
|
</svg>
|
|
4
4
|
`},{label:"Center",value:"center",type:"align-v",icon:`<svg width="42" height="28" viewBox="0 0 42 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
let ProductButtonSettings=[{id:"setting",controls:[{id:"buttonLayoutGroup",type:"group",controls:[{id:"buttonLayout",label:"Layout",type:"layout-selector",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemSpacing:"large",itemPerRow:1,default:"cart-icon",options:[{value:"cart-full",iconName:"gp-product-button-cart-full-layout"},{value:"cart-price",iconName:"gp-product-button-cart-price-layout"},{value:"cart-only",iconName:"gp-product-button-cart-only-layout"},{value:"cart-price-icon",iconName:"gp-product-button-price-icon-layout"},{value:"cart-icon",iconName:"gp-product-button-cart-item-layout"}]},{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:"opacityPrice",type:"input:slider",step:1,min:0,max:100,ignoreMax:!0,default:50}]},{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
|
|
1
|
+
let ProductButtonSettings=[{id:"setting",controls:[{id:"buttonLayoutGroup",type:"group",controls:[{id:"buttonLayout",label:"Layout",type:"layout-selector",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemSpacing:"large",itemPerRow:1,default:"cart-icon",options:[{value:"cart-full",iconName:"gp-product-button-cart-full-layout"},{value:"cart-price",iconName:"gp-product-button-cart-price-layout"},{value:"cart-only",iconName:"gp-product-button-cart-only-layout"},{value:"cart-price-icon",iconName:"gp-product-button-price-icon-layout"},{value:"cart-icon",iconName:"gp-product-button-cart-item-layout"}]},{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:"opacityPrice",type:"input:slider",step:1,min:0,max:100,ignoreMax:!0,default:50}]},{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 Page",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">
|
|
2
2
|
<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">
|
|
3
3
|
<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:slider",units:["px"],step:1,min:0,max:40,ignoreMax:!0,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:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}},{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"},{id:"oosEnableShadow",type:"toggle",label:"Enable Button Shadow",default:!1,hide:!0},{id:"oosShadow",type:"shadow-v2",compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}},{id:"oosRoundedV2",label:"Border Radius",type:"corner-v2",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:"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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{rectangleListPresetConfig as e}from"../swatches-style-config/rectangle-list.js";import{colorPresetConfig as t}from"../swatches-style-config/color.js";import{imagePresetConfig as l}from"../swatches-style-config/image.js";import{imageShopifyPresetConfig as a}from"../swatches-style-config/image-shopify.js";import{dropdownPresetConfig as i}from"../swatches-style-config/dropdown.js";let ProductVariantSettings=[{id:"setting",controls:[{id:"variantsOption",type:"group",label:"Variants Options",controls:[{id:"optionType",label:"Option Label",type:"select",default:"singleOption",options:[{label:"Separated",value:"singleOption"},{label:"Combine",value:"groupOption"}]},{id:"label",label:"Option Label",type:"toggle",default:!0},{id:"optionAlign",label:"Alignment",type:"segment",devices:{desktop:{default:"left"}},options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}]},{id:"price",label:"Option Price",type:"option:value",hide:!0,default:!0,options:[{value:!0,label:"Yes"},{value:!1,label:"No"}]},{id:"showAsSwatches",label:"Use Option Swatches",type:"swatchesLink",hide:!0,default:!0,hyperlinkInfo:{beforeText:"Go to ",hyperlinkText:"Manage Swatches",afterText:" to configure options display as swatches",modal:"manage_swatches"}},{id:"combineFullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"combineWidth",type:"input:unit",label:"Width",placeholder:"Auto",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"combineHeight",type:"input:unit",label:"Height",placeholder:"Auto",min:0,units:["px"],default:"45px"},{id:"variantPresets",label:"Use Option Swatches",type:"variant:presets",default:[{optionName:"base",optionType:"rectangle_list",presets:{...t,...e,...l,...a,...i}}],hyperlinkInfo:{modal:"manage_swatches"}},{id:"soldOutStyle",type:"select",default:"line",options:[{label:"None",value:"none"},{label:"Unclickable",value:"disable"},{label:"Cross-out",value:"line",icon:"gp-cross-out-one-line"}]}]},{id:"options",type:"group",label:"Options",controls:[{id:"layout",label:"Layout",type:"option:illustration",iconViewBox:"0 0 66 45",enableItemBackground:!0,devices:{desktop:{default:"vertical"}},options:[{label:"Vertical",value:"vertical",type:"arrange",svgName:"gp-arrange-vertical"},{label:"Horizontal",value:"horizontal",type:"arrange",svgName:"gp-arrange-horizontal"}]},{id:"column",label:"Column",type:"select",devices:{desktop:{default:1}},options:[{label:"1 column",value:1},{label:"2 columns",value:2},{label:"3 columns",value:3},{label:"4 columns",value:4}]}]},{id:"variantDisplay",type:"group",label:"Variant Display",controls:[{id:"hasPreSelected",type:"toggle",label:"hasPreSelected",default:!0},{id:"selectVariantDefault",type:"select-variant",label:"Select Default Variant",hide:!0}]},{id:"blankText",label:"Blank Option Text",type:"input",hide:!0,default:"Please select an option"},{id:"hasOnlyDefaultVariant",label:"Blank Option Text",type:"variant:default",hide:!0,default:!1}]},{id:"style",controls:[{id:"dimension",type:"group",label:"Variants Dimension",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"width",type:"input:unit",label:"Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"optionSpacing",label:"Option Spacing",type:"input:unit",units:["px"],placeholder:"Auto",default:"30px"},{id:"labelGap",label:"Gap",type:"input:slider",units:["px"],ignoreMax:!0,max:40,default:"8px"}]},{id:"swatchDimension",type:"group",label:"Swatch Dimension",controls:[{id:"swatchAutoWidth",label:"Auto Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"swatchWidth",type:"input:unit",label:"Width",placeholder:"Auto Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"80px"}}},{id:"swatchHeight",type:"input:unit",label:"Height",placeholder:"Auto Height",min:0,units:["px"],devices:{desktop:{default:"45px"}}},{id:"swatchSpacing",label:"Swatch Spacing",type:"input:unit",units:["px"],placeholder:"Auto",default:"var(--g-s-m)"},{id:"marginBottom",label:"Margin Bottom",type:"input:slider",units:["px"],ignoreMax:!0,max:40,devices:{desktop:{default:"16px"}
|
|
1
|
+
import{rectangleListPresetConfig as e}from"../swatches-style-config/rectangle-list.js";import{colorPresetConfig as t}from"../swatches-style-config/color.js";import{imagePresetConfig as l}from"../swatches-style-config/image.js";import{imageShopifyPresetConfig as a}from"../swatches-style-config/image-shopify.js";import{dropdownPresetConfig as i}from"../swatches-style-config/dropdown.js";let ProductVariantSettings=[{id:"setting",controls:[{id:"variantsOption",type:"group",label:"Variants Options",controls:[{id:"optionType",label:"Option Label",type:"select",default:"singleOption",options:[{label:"Separated",value:"singleOption"},{label:"Combine",value:"groupOption"}]},{id:"label",label:"Option Label",type:"toggle",default:!0},{id:"optionAlign",label:"Alignment",type:"segment",devices:{desktop:{default:"left"}},options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}]},{id:"price",label:"Option Price",type:"option:value",hide:!0,default:!0,options:[{value:!0,label:"Yes"},{value:!1,label:"No"}]},{id:"showAsSwatches",label:"Use Option Swatches",type:"swatchesLink",hide:!0,default:!0,hyperlinkInfo:{beforeText:"Go to ",hyperlinkText:"Manage Swatches",afterText:" to configure options display as swatches",modal:"manage_swatches"}},{id:"combineFullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"combineWidth",type:"input:unit",label:"Width",placeholder:"Auto",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"combineHeight",type:"input:unit",label:"Height",placeholder:"Auto",min:0,units:["px"],default:"45px"},{id:"variantPresets",label:"Use Option Swatches",type:"variant:presets",default:[{optionName:"base",optionType:"rectangle_list",presets:{...t,...e,...l,...a,...i}}],hyperlinkInfo:{modal:"manage_swatches"}},{id:"soldOutStyle",type:"select",default:"line",options:[{label:"None",value:"none"},{label:"Unclickable",value:"disable"},{label:"Cross-out",value:"line",icon:"gp-cross-out-one-line"}]}]},{id:"options",type:"group",label:"Options",controls:[{id:"layout",label:"Layout",type:"option:illustration",iconViewBox:"0 0 66 45",enableItemBackground:!0,devices:{desktop:{default:"vertical"}},options:[{label:"Vertical",value:"vertical",type:"arrange",svgName:"gp-arrange-vertical"},{label:"Horizontal",value:"horizontal",type:"arrange",svgName:"gp-arrange-horizontal"}]},{id:"column",label:"Column",type:"select",devices:{desktop:{default:1}},options:[{label:"1 column",value:1},{label:"2 columns",value:2},{label:"3 columns",value:3},{label:"4 columns",value:4}]}]},{id:"variantDisplay",type:"group",label:"Variant Display",controls:[{id:"hasPreSelected",type:"toggle",label:"hasPreSelected",default:!0},{id:"selectVariantDefault",type:"select-variant",label:"Select Default Variant",hide:!0}]},{id:"blankText",label:"Blank Option Text",type:"input",hide:!0,default:"Please select an option"},{id:"hasOnlyDefaultVariant",label:"Blank Option Text",type:"variant:default",hide:!0,default:!1}]},{id:"style",controls:[{id:"dimension",type:"group",label:"Variants Dimension",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"width",type:"input:unit",label:"Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"optionSpacing",label:"Option Spacing",type:"input:unit",units:["px"],placeholder:"Auto",default:"30px"},{id:"labelGap",label:"Gap",type:"input:slider",units:["px"],ignoreMax:!0,max:40,default:"8px"}]},{id:"swatchDimension",type:"group",label:"Swatch Dimension",controls:[{id:"swatchAutoWidth",label:"Auto Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"swatchWidth",type:"input:unit",label:"Width",placeholder:"Auto Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"80px"}}},{id:"swatchHeight",type:"input:unit",label:"Height",placeholder:"Auto Height",min:0,units:["px"],devices:{desktop:{default:"45px"}}},{id:"swatchSpacing",label:"Swatch Spacing",type:"input:unit",units:["px"],placeholder:"Auto",default:"var(--g-s-m)"},{id:"marginBottom",label:"Margin Bottom",type:"input:slider",units:["px"],ignoreMax:!0,max:40,devices:{desktop:{default:"16px"}}}]},{id:"align",label:"Align",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"labelGroup",type:"group",label:"Label",controls:[{id:"labelTypo",type:"typography-combo",label:"Typography",default:{type:"paragraph-2",attrs:{color:"text-1",bold:!0},custom:{fontFamily:"Assistant",letterSpacing:"0px"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"labelColor",type:"color-picker-v2",label:"Text Color",default:"text-2"}]},{id:"labelGroup",type:"group",label:"Option Value",controls:[{id:"optionTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2"},hiddenSetting:{textAlign:!0,textShadow:!0},ignoreReRender:!0}]},{id:"behavior-state",type:"behavior-state",label:"Option Value",controls:[{id:"optionBgColor",type:"color-picker-v2",label:"Background Color",default:{normal:"bg-3"},state:{active:!0,hover:!0,normal:!0}},{id:"optionTextColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},state:{active:!0,hover:!0,normal:!0}},{id:"optionBorder",type:"border",label:"Border",default:{normal:{borderType:"style-2",border:"solid",color:"line-2",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"},active:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"2px 2px 2px 2px",borderWidth:"2px"},hover:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"}},state:{active:!0,hover:!0,normal:!0}},{id:"optionRounded",type:"radius-preset",label:"Border Radius",default:{normal:{btrr:"9999px",bblr:"9999px",bbrr:"9999px",btlr:"9999px",radiusType:"circle"},hover:{btrr:"9999px",bblr:"9999px",bbrr:"9999px",btlr:"9999px",radiusType:"circle"},active:{btrr:"9999px",bblr:"9999px",bbrr:"9999px",btlr:"9999px",radiusType:"circle"}},state:{active:!0,hover:!0,normal:!0}},{id:"optionHasShadow",type:"toggle",label:"Shadow Enable",default:{normal:!1,hover:!1,active:!1},state:{normal:!0,hover:!0,active:!0}},{id:"optionShadow",type:"shadow-v2",label:"Shadow",hideOnState:{normal:!0,hover:!0,active:!0},default:{normal:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1},hover:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1},active:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1}},state:{normal:!0,hover:!0,active:!0}}]},{id:"dropdownItemWidth",type:"segment",label:"Dropdown Width",devices:{desktop:{default:"fill"},mobile:{default:"fill"},tablet:{default:"fill"}},options:[{label:"Fill",value:"fill"},{label:"Fixed",value:"fixed"}]},{id:"fixedDropdownWidth",type:"input:unit",label:"Fixed Width",units:["px","%"],devices:{desktop:{default:"240px"},mobile:{default:"240px"},tablet:{default:"240px"}}},{id:"swatchItemWidth",type:"segment",label:"Swatch Width",devices:{desktop:{default:"auto"}},options:[{label:"Fill",value:"auto"},{label:"Fixed",value:"fixed"}]},{id:"fixedDropdownWidth",type:"input:unit",label:"Fixed Width",units:["px","%"],devices:{desktop:{default:"240px"}}}]}];export{ProductVariantSettings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useStickyStore as t,makeStyleResponsive as e,usePageStore as o,useCurrentDevice as l}from"@gem-sdk/core";import{useMemo as a}from"react";let useSticky=
|
|
1
|
+
import{useStickyStore as t,makeStyleResponsive as e,usePageStore as o,useCurrentDevice as l}from"@gem-sdk/core";import{useMemo as a}from"react";let useSticky=p=>{let{width:b,position:i}=p??{},s=t(t=>t.isStickyVisible),d=e("w",b),r=o(t=>"interaction"===t.sidebarMode),k=l(),m=(t,e)=>({[`--left${e}`]:"top"==t?"0":"50%",[`--t${e}`]:"top"==t?"unset":"translateX(-50%)"}),n=a(()=>({...m(i?.desktop,""),...m(i?.tablet??i?.desktop,"-tablet"),...m(i?.mobile??i?.tablet??i?.desktop,"-mobile")}),[i?.desktop,i?.mobile,i?.tablet]),c=a(()=>{if(r&&i?.[k]==="top")return"40px"},[k,r,i]),f=a(()=>({"--d":p?.display?.desktop!=="after-first-cart-button"||s?"block":"none","--d-tablet":p?.display?.tablet!=="after-first-cart-button"||s?"block":"none","--d-mobile":p?.display?.mobile!=="after-first-cart-button"||s?"block":"none"}),[s,p?.display?.desktop,p?.display?.mobile,p?.display?.tablet]),u=a(()=>({"--top":c??"auto","--top-tablet":c??"auto","--top-mobile":c??"auto",[`--${i?.desktop}`]:c??"0px",[`--${i?.tablet??i?.desktop}-tablet`]:c??"0px",[`--${i?.mobile??i?.desktop}-mobile`]:c??"0px"}),[c,i?.desktop,i?.mobile,i?.tablet]),y=t=>"top"==t?"sticky":"fixed",x=a(()=>({"--pos":y(i?.desktop),"--pos-tablet":y(i?.tablet??i?.desktop),"--pos-mobile":y(i?.mobile??i?.tablet??i?.desktop)}),[i?.desktop,i?.mobile,i?.tablet]);return{w:d,displayStyle:u,positionStyle:x,getCSSAlign:n,makeDisplaySettingStyles:f}};export{useSticky as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let SettingUIV2=[{label:{en:"Layout"},controls:[{layout:"vertical",setting:{id:"position"}}]},{label:{en:"Tabs"},controls:[{label:{en:"Order"},setting:{id:"childItem"},controlConfig:{id:"childItem",type:"child-item",labelItem:"tab"}},{label:{en:"Text
|
|
1
|
+
let SettingUIV2=[{label:{en:"Layout"},controls:[{layout:"vertical",setting:{id:"position"}}]},{label:{en:"Tabs"},controls:[{label:{en:"Order"},setting:{id:"childItem"},controlConfig:{id:"childItem",type:"child-item",labelItem:"tab",labelPopover:{en:"Tab management"}}},{label:{en:"Text"},type:"combo",iconName:"polaris-text-title",getValueFromSettingID:"labelTypoV2.type",isTypoValue:!0,isHideClear:!0,controls:[{layout:"vertical",setting:{id:"labelTypoV2"},options:{updateFields:[{field:"attrs.textAlign",settingId:"labelAlign"},{field:"attrs.color",settingId:"labelColor",state:"normal"}]},controlChangeTrigger:{settings:[{action:{controlId:"labelAlign",valueFromField:"attrs.textAlign",groupType:"setting",controlType:"setting"}},{action:{controlId:"labelColor",valueFromField:"attrs.color",groupType:"setting",controlType:"setting",removeDevice:!0,state:"normal"}}],options:{noRecordHistory:!0}}}]},{conditionDisplay:'position == "top"',label:{en:"Width"},setting:{id:"panelWidth"}}],moreSettings:{type:"collapse",controls:[{id:"Width",label:{en:"Width"},conditionDisplay:'position != "top"',controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,fallbackValue:"Auto",linkWithSetting:{name:"labelWidth"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{label:{en:"Background"},setting:{id:"labelBgColor",state:"normal"}},{label:{en:"Border"},setting:{id:"borderTab",state:"normal"}},{conditionDisplay:'position == "top" && labelWidth != "100%"',label:{en:"Tabs align"},setting:{id:"panelAlign"}},{conditionDisplay:'position != "top" && labelWidth != "100%"',label:{en:"Tabs align"},setting:{id:"panelAlignVertical"}},{label:{en:"Hover effect"},type:"combo",iconName:"polaris-check-hover",fixedValue:"Enabled",setting:{id:"enableHoverEffect"},popoverLabel:{en:"Tabs hover effect"},controls:[{label:{en:"Text color"},setting:{id:"labelColor",state:"hover"}},{label:{en:"Background"},setting:{id:"labelBgColor",state:"hover"}},{label:{en:"Border"},setting:{id:"borderTab",state:"hover"}}]},{label:{en:"Active state"},type:"combo",setting:{id:"enableActiveEffect"},iconName:"polaris-status-active",fixedValue:"Enabled",popoverLabel:{en:"Tabs active state"},controls:[{label:{en:"Text color"},setting:{id:"labelColor",state:"active"}},{label:{en:"Background"},setting:{id:"labelBgColor",state:"active"}},{label:{en:"Border"},setting:{id:"borderTab",state:"active"}}]}]}},{label:{en:"Size"},controls:[{id:"containWidth",label:{en:"Width"},controlConfig:{id:"containWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"containWidth"}},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"spacing-setting",field:"padding"}}}]},{label:{en:"Background"},controls:[{setting:{id:"background"},layout:"vertical"}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},controlConfig:{id:"border-advanced",type:"border-v2",linkWithSetting:{name:"border",field:"normal"},compoDefaultValue:{color:"line-3",border:"solid",width:"1px",borderWidth:"1px"}}},{label:{en:"Corner"},setting:{id:"rounded",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadow",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{label:{en:"Display option"},controls:[{label:{en:"Default active"},setting:{id:"activeKey"}}]},{controls:[{label:{en:"Align"},setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"},conditionEnable:'!(parseInt(containWidth) >= 100 && containWidth?.includes("%"))'}]}];export{SettingUIV2};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{composeTypographyClassName as e,getGlobalColorClass as t,getGlobalColorStateClass as s}from"@gem-sdk/core";let getClasses=({setting:e,advanced:t,builderProps:s})=>({...s?.uid&&{[s.uid]:!0},...e?.options?.customClass?.wrapper&&{[e.options.customClass.wrapper]:!0},...t?.cssClass&&{[t.cssClass]:!0}}),getContainerClasses=({setting:e})=>{let{excludeFlex:t}=e??{},s="";return t||(s+=" gp-flex"),composeClasses(s)},getTextClasses=({styles:e,setting:t,className:s,mode:r})=>{let{text:
|
|
1
|
+
import{composeTypographyClassName as e,getGlobalColorClass as t,getGlobalColorStateClass as s}from"@gem-sdk/core";let getClasses=({setting:e,advanced:t,builderProps:s})=>({...s?.uid&&{[s.uid]:!0},...e?.options?.customClass?.wrapper&&{[e.options.customClass.wrapper]:!0},...t?.cssClass&&{[t.cssClass]:!0}}),getContainerClasses=({setting:e})=>{let{excludeFlex:t}=e??{},s="";return t||(s+=" gp-flex"),composeClasses(s)},getTextClasses=({styles:e,setting:t,className:s,mode:r,disableEdit:o})=>{let{text:l,options:p}=t??{},n="";l||o||(n+="gp-relative empty:gp-pl-[2px] after:gp-content-['Your_custom_text_goes_here'] after:gp-absolute after:gp-select-none after:gp-top-0 after:gp-left-[2px] after:gp-w-full after:gp-truncate after:gp-text-black after:gp-opacity-20 "),e?.underlineLink&&(n+=` ${e.underlineLink.hover?"hover:gp-underline":"hover:!gp-no-underline"} ${e.underlineLink.normal?" gp-underline":""}`+(e.underlineLink.hover?"":" hover:!gp-no-underline")),"edit"===r?(n+=" gp-text gp-cursor-pointer !gp-cursor-default",o||(n+=" gp-p-[2px]"),p?.useState&&(n+=" child-item-text gp-border gp-border-transparent hover:!gp-border-[#3C67FF]")):(n+=" gp-text-instant",p?.disablePointerEvent&&(n+=" gp-pointer-events-none"));let a=n.trim().split(" ").reduce((e,t)=>(e[t]=!0,e),{});return{...s&&{[s]:!0},...globalTypoClasses(e),...a}};function composeClasses(e){return e.split(" ").reduce((e,t)=>(e[t]=!0,e),{})}let globalTypoClasses=r=>{let o=e(r?.typo);return{...o&&{[o]:!0},...r?.textColor&&{[t("text",r?.textColor)]:!0},...!r?.textColor&&{[s("text",r?.color)]:!0}}};export{composeClasses,getClasses,getContainerClasses,getTextClasses,globalTypoClasses};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useEditorMode as r}from"@gem-sdk/core";import{forwardRef as m}from"react";import{createAttr as o,createStyleReact as s,createClass as a,createContent as l}from"@gem-sdk/system";import{getAttr as i,getTextAttr as n}from"../common/attrs.js";import{getStyle as c,getContainerStyle as p,getTextStyle as f}from"../common/styles.js";import{getClasses as d,getContainerClasses as u,getTextClasses as y}from"../common/classes.js";import{getDisplayText as g}from"../common/helpers.js";let Text=m(({styles:m,builderAttrs:h,style:j,setting:v,advanced:x,builderProps:D,className:T,children:N,...
|
|
2
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useEditorMode as r}from"@gem-sdk/core";import{forwardRef as m}from"react";import{createAttr as o,createStyleReact as s,createClass as a,createContent as l}from"@gem-sdk/system";import{getAttr as i,getTextAttr as n}from"../common/attrs.js";import{getStyle as c,getContainerStyle as p,getTextStyle as f}from"../common/styles.js";import{getClasses as d,getContainerClasses as u,getTextClasses as y}from"../common/classes.js";import{getDisplayText as g}from"../common/helpers.js";let Text=m(({styles:m,builderAttrs:h,style:j,setting:v,advanced:x,builderProps:D,className:T,children:N,disableEdit:k,...S},_)=>{let H=r(),{htmlTag:I="div",options:L}=v??{},M=o({...i({uid:D?.uid||""})}),R=o({...n(L)}),b=s({...c(m,j)}),q=s({...p(m,v)}),w=s({...f(m,v)}),z=a({...d({setting:v,advanced:x,builderProps:D})}),A=a({...u({setting:v})}),B=a({...y({styles:m,setting:v,className:T,mode:H,disableEdit:k})}),C=g({type:"React",styles:m,setting:v,builderProps:D}),E=l(C);return e("div",{...M,...S,...h,style:b,className:z,children:[t("div",{className:A,style:{...q},children:t(I,{ref:_,...R,className:B,onDragStart:e=>e.preventDefault(),onDrop:e=>e.preventDefault(),style:{...w},dangerouslySetInnerHTML:{__html:E}})}),N]})});export{Text as default};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -134,7 +134,9 @@ type TextProps = BasePropsWrap<{
|
|
|
134
134
|
isForceValue?: boolean;
|
|
135
135
|
lineThrough?: boolean;
|
|
136
136
|
opacityPrice?: number;
|
|
137
|
-
}> & Omit<React.ComponentPropsWithoutRef<'p'>, ''
|
|
137
|
+
}> & Omit<React.ComponentPropsWithoutRef<'p'>, ''> & {
|
|
138
|
+
disableEdit?: boolean;
|
|
139
|
+
};
|
|
138
140
|
|
|
139
141
|
declare const Text$2: React.ForwardRefExoticComponent<_gem_sdk_core.BaseProps<{
|
|
140
142
|
text?: string | number | undefined;
|
|
@@ -189,7 +191,9 @@ declare const Text$2: React.ForwardRefExoticComponent<_gem_sdk_core.BaseProps<{
|
|
|
189
191
|
}, Record<string, any>> & {
|
|
190
192
|
builderAttrs?: Record<string, any> | undefined;
|
|
191
193
|
style?: React.CSSProperties | undefined;
|
|
192
|
-
} & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, ""> &
|
|
194
|
+
} & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, ""> & {
|
|
195
|
+
disableEdit?: boolean | undefined;
|
|
196
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
193
197
|
|
|
194
198
|
declare const textSetting: {
|
|
195
199
|
Text: _gem_sdk_core.ComponentSetting<TextProps>;
|
|
@@ -5730,7 +5734,9 @@ declare const _default$3: {
|
|
|
5730
5734
|
}, Record<string, any>> & {
|
|
5731
5735
|
builderAttrs?: Record<string, any> | undefined;
|
|
5732
5736
|
style?: React.CSSProperties | undefined;
|
|
5733
|
-
} & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, ""> &
|
|
5737
|
+
} & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, ""> & {
|
|
5738
|
+
disableEdit?: boolean | undefined;
|
|
5739
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
5734
5740
|
Tabs: React.ComponentType<TabsProps>;
|
|
5735
5741
|
TabItem: React.ComponentType<TabItemProps>;
|
|
5736
5742
|
Select: React.ComponentType<SelectProps>;
|
|
@@ -6248,6 +6254,8 @@ declare const Text: ({ id, styles, builderAttrs, style, setting, advanced, build
|
|
|
6248
6254
|
builderAttrs?: Record<string, any> | undefined;
|
|
6249
6255
|
style?: React.CSSProperties | undefined;
|
|
6250
6256
|
} & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, ""> & {
|
|
6257
|
+
disableEdit?: boolean | undefined;
|
|
6258
|
+
} & {
|
|
6251
6259
|
isText?: boolean | undefined;
|
|
6252
6260
|
advanced?: any;
|
|
6253
6261
|
pageContext?: PageContext | undefined;
|
|
@@ -7340,7 +7348,9 @@ declare const _default$2: {
|
|
|
7340
7348
|
}, Record<string, any>> & {
|
|
7341
7349
|
builderAttrs?: Record<string, any> | undefined;
|
|
7342
7350
|
style?: React.CSSProperties | undefined;
|
|
7343
|
-
} & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, ""> &
|
|
7351
|
+
} & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, ""> & {
|
|
7352
|
+
disableEdit?: boolean | undefined;
|
|
7353
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
7344
7354
|
Textarea: React.FC<TextareaProps>;
|
|
7345
7355
|
Video: React.FC<VideoProps>;
|
|
7346
7356
|
PushOwl: React.FC<ButtonProps>;
|