@gem-sdk/components 2.0.0-staging.923 → 2.0.0-staging.925
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/button/common/helpers.js +1 -1
- package/dist/cjs/button/components/Button.js +1 -1
- package/dist/cjs/code/hooks/useCSSCode.js +1 -1
- package/dist/cjs/form/settings/form-checkbox/configs/settings.js +1 -1
- package/dist/cjs/form/settings/form-checkbox/configs/ui-v2.js +1 -1
- package/dist/cjs/form/settings/form-email/configs/settings.js +1 -1
- package/dist/cjs/icon-list-v2/settings/configs/settings.js +1 -1
- package/dist/cjs/text/settings/configs/ui-v2.js +1 -1
- package/dist/esm/button/common/helpers.js +1 -1
- package/dist/esm/button/components/Button.js +1 -1
- package/dist/esm/code/hooks/useCSSCode.js +3 -3
- package/dist/esm/form/settings/form-checkbox/configs/settings.js +1 -1
- package/dist/esm/form/settings/form-checkbox/configs/ui-v2.js +1 -1
- package/dist/esm/form/settings/form-email/configs/settings.js +1 -1
- package/dist/esm/icon-list-v2/settings/configs/settings.js +1 -1
- package/dist/esm/text/settings/configs/ui-v2.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core"),helpers=require("../../helpers.js"),Link=require("../../link/components/Link.js"),constant=require("../../constant.js"),styles=require("./styles.js");const getCleanedStyles=(e,t)=>{if(!t)return e;let l={...e},a=["hover","focus"];return a.forEach(e=>{delete l?.backgroundColorV2?.[e]}),l},handleGetLabelToDisplay=({label:e,styles:t,translate:l,pageContext:a,isUseTranslatedValue:s,builderProps:r,isLiquid:o=!1})=>{let n=s?helpers.getDynamicSourceLocales({translate:l,val:e,pageContext:a,settingId:l??"label",uid:r?.uidTranslate??r?.uid,isCapitalize:t?.typo?.attrs?.transform==="capitalize"}):e;return o?n?.toString()??"":core.convertHTML(e)},checkIsShowIcon=(e,t)=>!!e&&t,handleCheckIsShowLabel=(e,t)=>!!e||!t,handleCheckIsEditableLabel=({mode:e,options:t,isLiquid:l=!1})=>l?!t?.isCannotEditing:"edit"===e&&!t?.isCannotEditing,checkIsScrollToElement=e=>!!e?.link?.startsWith("#")&&("_self"===e.target||"scroll-to"===e.type),getSplitStyles=e=>core.splitStyle(["pos","top","left","bottom","right","z"],e),getDataState=e=>e?"loading":"idle",getDataId=(e,t,l)=>e??(t||l)??"",handleGetArialLabel=({label:e,isLiquid:t=!1})=>t?e?.toString().replaceAll("'","'").replaceAll('"',"'")??"":e?.toString()??"",getInsertLinkData=({setting:e,htmlType:t,defaultTag:l,enableBtnLink:a,isLiquid:s=!1})=>{let
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),helpers=require("../../helpers.js"),Link=require("../../link/components/Link.js"),constant=require("../../constant.js"),styles=require("./styles.js");const getCleanedStyles=(e,t)=>{if(!t)return e;let l={...e},a=["hover","focus"];return a.forEach(e=>{delete l?.backgroundColorV2?.[e]}),l},handleGetLabelToDisplay=({label:e,styles:t,translate:l,pageContext:a,isUseTranslatedValue:s,builderProps:r,isLiquid:o=!1})=>{let n=s?helpers.getDynamicSourceLocales({translate:l,val:e,pageContext:a,settingId:l??"label",uid:r?.uidTranslate??r?.uid,isCapitalize:t?.typo?.attrs?.transform==="capitalize"}):e;return o?n?.toString()??"":core.convertHTML(e)},checkIsShowIcon=(e,t)=>!!e&&t,handleCheckIsShowLabel=(e,t)=>!!e||!t,handleCheckIsEditableLabel=({mode:e,options:t,isLiquid:l=!1})=>l?!t?.isCannotEditing:"edit"===e&&!t?.isCannotEditing,checkIsScrollToElement=e=>!!e?.link?.startsWith("#")&&("_self"===e.target||"scroll-to"===e.type),getSplitStyles=e=>core.splitStyle(["pos","top","left","bottom","right","z"],e),getDataState=e=>e?"loading":"idle",getDataId=(e,t,l)=>e??(t||l)??"",handleGetArialLabel=({label:e,isLiquid:t=!1})=>t?e?.toString().replaceAll("'","'").replaceAll('"',"'")??"":e?.toString()??"",getInsertLinkData=({setting:e,htmlType:t,defaultTag:l,enableBtnLink:a,isLiquid:s=!1,pageType:r})=>{let o=["product.url"],n=["#","mailto:","tel:"],i=e?.link??"",c="/"===i,p=e?.link!==void 0&&""!==e.link,h=new RegExp(/^https?:\/\//i),g=p&&h.test(i),d=new RegExp(/^\/?(?:collections|pages|products|blogs|checkout|cart)\/?/i),u=p&&!h.test(i)&&d.test(i),I=()=>{if(o.find(e=>i.includes(e)))return!0;let t=n.find(e=>i.startsWith(e));return!(!t||helpers.checkIsScrollToTop(e)||"STATIC"===r&&helpers.checkIsOpenPopup(e))},S=helpers.isLinkedToSalesPage(e?.type),k=!!a&&(g||u||I()||c||S),y=i;s&&(u||c)&&(y=e?.isTranslate?"$locationOrigin"+i:"{{ request.origin }}{{ routes.root_url | split: '/' | join: '/' }}"+i);let L=k?s?"a":Link.default:l,b={href:y,target:e?.target,...e?.noFollow&&{rel:"nofollow"}},C=k?b:p?{...b,type:t}:{type:t};return S&&(C={href:constant.HREF_TO_SALES_PAGE,target:"_self"}),{HTMLTag:L,urlData:C,shouldRenderLink:k}},getData=e=>{let{style:t,dataId:l,pageContext:a,styles:s={},setting:r={},builderProps:o,builderAttrs:n,isUseTranslatedValue:i=!0}=e,{label:c,iconSvg:p,btnLink:h,loading:g,options:d,disabled:u,translate:I,iconVisible:S,shouldClearSpace:k}=r,[y,L]=getSplitStyles(t),b=getCleanedStyles(s,u),C=styles.getCustomCssStyles({styles:s,uid:o?.uid,builderAttrs:n}),D=getDataState(g),T=getDataId(o?.uidInteraction,l,o?.uid),w=e=>{let{isLiquid:t}=e??{};return handleGetArialLabel({label:c,isLiquid:t})},x=e=>{let{isLiquid:t}=e??{};return handleGetLabelToDisplay({label:c,builderProps:o,styles:b,isLiquid:t,...t&&{translate:I},...t&&{pageContext:a},...t&&{isUseTranslatedValue:i}})},f=e=>{let{isLiquid:t}=e??{},l=x({isLiquid:t});return handleCheckIsShowLabel(l,k)},A=e=>{let{isLiquid:t,mode:l}=e??{};return handleCheckIsEditableLabel({options:d,isLiquid:t,...!t&&l&&{mode:l}})},E=checkIsShowIcon(p,S),m=checkIsScrollToElement(h);return{customCss:C,wrapStyle:y,restStyle:L,dataState:D,dataIdAttr:T,isShowIcon:E,isScrollToElement:m,getArialLabel:w,getLabelToDisplay:x,checkIsShowLabel:f,checkIsEditableLabel:A}},LOADING_INDICATOR=`
|
|
2
2
|
<svg
|
|
3
3
|
class="gp-invisible gp-absolute gp-h-5 gp-w-5 group-data-[state=loading]:gp-animate-spin group-data-[state=loading]:gp-visible"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -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"),system=require("@gem-sdk/system"),helpers$1=require("../../helpers.js"),attrs=require("../common/attrs.js"),styles=require("../common/styles.js"),classes=require("../common/classes.js"),ButtonIcon=require("./ButtonIcon.js"),ButtonLabel=require("./ButtonLabel.js"),ButtonLoadingIndicator=require("./ButtonLoadingIndicator.js"),helpers=require("../common/helpers.js");const Button=e=>{let{children:s,advanced:t,className:
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),system=require("@gem-sdk/system"),helpers$1=require("../../helpers.js"),attrs=require("../common/attrs.js"),styles=require("../common/styles.js"),classes=require("../common/classes.js"),ButtonIcon=require("./ButtonIcon.js"),ButtonLabel=require("./ButtonLabel.js"),ButtonLoadingIndicator=require("./ButtonLoadingIndicator.js"),helpers=require("../common/helpers.js");const Button=e=>{let{children:s,advanced:t,className:r,nodePrice:l,customAttrs:a,styles:n={},setting:u={},builderProps:o,builderAttrs:c,wrapClassName:i="",onClick:y}=e,{iconSvg:m,btnLink:d,htmlType:g,loading:j,disabled:x,shouldClearSpace:p,enableBtnLink:B}=u,{enableTextStyle:h=!0}=n,I=core.useEditorMode(),C=core.usePageType(),{customCss:f,wrapStyle:L,restStyle:q,dataState:S,dataIdAttr:b,isShowIcon:R,isScrollToElement:k,getArialLabel:T,getLabelToDisplay:v,checkIsShowLabel:M,checkIsEditableLabel:N}=helpers.getData(e),{HTMLTag:_,urlData:W,shouldRenderLink:A}=helpers.getInsertLinkData({enableBtnLink:B,htmlType:g,setting:d,defaultTag:"button",pageType:C}),D=system.createStyle({...styles.getButtonStyles(n)}),H=system.createStyle({...styles.getTypoStyles(n)}),P=system.createStyle({...styles.getTypoStyles(n),...styles.getButtonIconStyles(n,u)}),$=system.createStyle({...styles.getButtonWrapperStyles(q,n)}),E=system.createClass({...classes.getButtonClasses({styles:n,className:r,shouldRenderLink:A,uid:o?.uid})}),O=system.createClass({...classes.getButtonIconClasses(v(),p,h)}),w=system.createClass({...classes.getButtonLabelClasses(n,N({mode:I}))}),z=system.createClass({...classes.getButtonWrapperClasses(i,r,t?.cssClass)}),F=system.createClass({...classes.getButtonContentWrapperClasses(u)}),G=system.createAttr({...attrs.getButtonAttributes({disabled:x,dataState:S,dataId:b,arialLabel:T()})}),J=e=>{y?.(e),helpers$1.handleClickLink(d,I)};return jsxRuntime.jsx("div",{style:L,children:jsxRuntime.jsxs("div",{...c,style:$,className:z,children:[jsxRuntime.jsx("style",{type:"text/css",dangerouslySetInnerHTML:{__html:f}}),system.If(k,jsxRuntime.jsx("a",{className:"gp-trigger-button-link gp-hidden",href:W.href,target:W.target})),jsxRuntime.jsxs(_,{...G,...a,setting:W,style:D,className:E,onClick:J,children:[system.If(j,jsxRuntime.jsx(ButtonLoadingIndicator.default,{})),jsxRuntime.jsxs("div",{className:F,children:[system.If(R,jsxRuntime.jsx(ButtonIcon.default,{iconSvg:m??"",styles:P,classes:O})),system.If(h&&M(),jsxRuntime.jsx(ButtonLabel.default,{label:v(),styles:H,classes:w}))]}),system.If(!!l,l??"")]}),s]})})};exports.default=Button;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<span>${a||"Custom Code"}</span>
|
|
4
4
|
${e||t||s?'<span class="gp-text-[#676767] gp-text-12 gp-leading-5">Publish the page to see the content.</span>':""}
|
|
5
5
|
</p>`,[a]),r=(e,t)=>{let s=document.createElement("div");s.innerHTML=e;let p=s.childNodes,a=!1,l=!0;if(p.length>0){p.forEach(e=>{EMPTY_TAGS.includes(e?.tagName)&&(a=!0,e?.remove())});let e=s.childNodes;e.forEach(e=>{if(ALLOWED_EMPTY_TAG.includes(e?.tagName))l=!1;else if(e?.nodeName!=="#comment"){let t=e?.textContent?.trim();t&&(l=!1)}})}return l&&(l=!s?.textContent?.trim()),t&&(a=!0),{empty:l,hasScript:a}},n=React.useMemo(()=>{if("edit"===s){let{empty:e,hasScript:t}=r(p?.html||"",p?.javascript||"");if(t)return`
|
|
6
|
-
<div class="gp-py-4 gp-
|
|
6
|
+
<div class="gp-py-4 gp-font-[sans-serif] gp-flex gp-flex-col gp-gap-[4px]" >
|
|
7
7
|
<p class="gp-text-center gp-text-sm gp-leading-[21px] gp-text-[#676767] ">
|
|
8
8
|
Publish the page to see the content.
|
|
9
9
|
</p>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const FormCheckboxSettings=[{id:"setting",controls:[{id:"name",type:"input",label:"name",default:"contact[agree]"},{id:"description",type:"textarea",label:"Description",default:"Yes, sign me up to receive exclusive offers, news and more!",minHeight:100,autoHeight:!0},{id:"translate",type:"input",default:"description"},{id:"required",type:"toggle",label:"Required",default:!0},{id:"selected",type:"toggle",label:"Selected as default",default:!1},{id:"typo",type:"typography-v2",label:"Text styles",default:{type:"paragraph-1",attrs:{color:"text-1"}},ignoreReRender:!0,hiddenSetting:{
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const FormCheckboxSettings=[{id:"setting",controls:[{id:"name",type:"input",label:"name",default:"contact[agree]"},{id:"description",type:"textarea",label:"Description",default:"Yes, sign me up to receive exclusive offers, news and more!",minHeight:100,autoHeight:!0},{id:"translate",type:"input",default:"description"},{id:"required",type:"toggle",label:"Required",default:!0},{id:"selected",type:"toggle",label:"Selected as default",default:!1},{id:"typo",type:"typography-v2",label:"Text styles",default:{type:"paragraph-1",attrs:{color:"text-1"}},ignoreReRender:!0,hiddenSetting:{textShadow:!0}},{id:"textColor",type:"colorpicker",label:"Text color",default:"text-1"},{id:"horizontalSpacing",units:["px"],type:"input:slider",step:1,min:0,max:40,devices:{desktop:{default:"4px"}},ignoreMax:!0},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"background",type:"background-media",ignoreReRender:!0,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#DDDDDD",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",preload:!1}}}}]},{id:"style",controls:[{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"Auto",height:"Auto",padding:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}},settingConfig:{width:{displayOptions:["full","auto","small","large","medium"],sizeConfig:{small:"100px",medium:"116px",large:"132px"}},height:{displayOptions:["auto","small","large","medium"],sizeConfig:{small:"28px",medium:"36px",large:"44px"}}},hiddenSettings:["shape","gap"]},{id:"wrapperBorder",type:"border",label:"Border",default:{borderType:"none",border:"none",width:"1px 1px 1px 1px",position:"all",borderWidth:"1px",color:"#000000",isCustom:!0}},{id:"borderRadius",type:"radius-preset",label:"Corner",default:{radiusType:"none"},compoDefaultValue:{bblr:"20px",btrr:"20px",bbrr:"20px",btlr:"20px",radiusType:"rounded"}},{id:"hasActiveShadow",type:"toggle",label:"Enable Button Shadow",default:!1},{id:"shadow",type:"boxShadow",label:"Button Shadow",default:{type:"none",distance:"10px",blur:"12px",spread:"10px",color:"rgba(18, 18, 18, 0.77)",angle:40}}]}];exports.default=FormCheckboxSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const SettingUIV2=[{label:{en:"Text style"},controls:[{type:"combo",label:{en:"Content"},iconName:"polaris-text-block",getValueFromSettingID:"description",isHideClear:!0,controls:[{layout:"vertical",setting:{id:"description"}}]},{layout:"vertical",setting:{id:"typo"}}]},{label:{en:"Spacing"},controls:[{type:"control",label:{en:"Gap"},setting:{id:"horizontalSpacing"}}]},{label:{en:"Configuration"},controls:[{label:{en:"Required"},setting:{id:"required"}},{label:{en:"Default selected"},setting:{id:"selected"}},{label:{en:"Field name"},setting:{id:"name"},help:{content:"Identify the information submitted via this element."}}]}
|
|
1
|
+
"use strict";const SettingUIV2=[{label:{en:"Text style"},controls:[{type:"combo",label:{en:"Content"},iconName:"polaris-text-block",getValueFromSettingID:"description",isHideClear:!0,controls:[{layout:"vertical",setting:{id:"description"}}]},{layout:"vertical",setting:{id:"typo"},options:{updateFields:[{field:"attrs.textAlign",settingId:"align"}]},controlChangeTrigger:{settings:[{action:{controlId:"align",valueFromField:"attrs.textAlign",groupType:"setting",controlType:"setting"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Spacing"},controls:[{type:"control",label:{en:"Gap"},setting:{id:"horizontalSpacing"}}]},{label:{en:"Configuration"},controls:[{label:{en:"Required"},setting:{id:"required"}},{label:{en:"Default selected"},setting:{id:"selected"}},{label:{en:"Field name"},setting:{id:"name"},help:{content:"Identify the information submitted via this element."}}]}];exports.SettingUIV2=SettingUIV2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const FormEmailSettings=[{id:"setting",controls:[{id:"placeholder",type:"textarea",minHeight:56,label:"Placeholder",default:"Enter your email address"},{id:"placeholderColor",type:"color-picker-v2",label:"Color",default:"#A3A3A3"},{id:"translate",type:"input",default:"placeholder"},{id:"required",type:"toggle",label:"Placeholder",default:!0},{id:"hideOnClient",type:"toggle",label:"Hide on client",default:!1},{id:"defaultEmail",type:"input",label:"Default value",default:"default@gempages.help"},{id:"typo",label:"Text styles",type:"typography-v2",default:{type:"paragraph-1"},hiddenSetting:{color:!0,textAlign:!0,textShadow:!0},ignoreReRender:!0},{id:"size",label:"Field size",type:"size",default:{type:"medium"},ignoreReRender:!0},{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0},tablet:{default:!0},mobile:{default:!0}}},{id:"width",type:"input:unit",label:"Width",placeholder:"Auto Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"background",type:"background-media",ignoreReRender:!0,hideImage:!0,devices:{desktop:{default:{type:"color",color:"#FFFFFF"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#FFFFFF"}}}},{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:"style",controls:[{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"100%",height:"Auto",padding:{type:"medium",top:"12px",bottom:"12px",left:"12px",right:"12px"}}}},settingConfig:{width:{},height:{displayOptions:["auto","small","large","medium"],sizeConfig:{small:"28px",medium:"36px",large:"44px"}}},hiddenSettings:["shape","gap"]},{id:"wrapperBorder",type:"border-v2",label:"Border",default:{border:"solid",width:"1px 1px 1px 1px",position:"all",borderWidth:"1px",color:"#7D7D7D",isCustom:!0}},{id:"backgroundColorV2Hover",type:"color-picker-v2",enableGradient:!0},{id:"textColorHover",type:"color-picker-v2",label:"Text Color",state:{hover:!0}},{id:"borderEmailHover",type:"border",emptyOnClear:!0,state:{hover:!0}},{id:"roundedEmailHover",type:"radius-preset",default:{hover:{radiusType:"small"}},state:{hover:!0}},{id:"boxShadowEmailHover",type:"shadow-v2",label:"Button Shadow",hideOnState:{hover:!0},
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const FormEmailSettings=[{id:"setting",controls:[{id:"placeholder",type:"textarea",minHeight:56,label:"Placeholder",default:"Enter your email address"},{id:"placeholderColor",type:"color-picker-v2",label:"Color",default:"#A3A3A3"},{id:"translate",type:"input",default:"placeholder"},{id:"required",type:"toggle",label:"Placeholder",default:!0},{id:"hideOnClient",type:"toggle",label:"Hide on client",default:!1},{id:"defaultEmail",type:"input",label:"Default value",default:"default@gempages.help"},{id:"typo",label:"Text styles",type:"typography-v2",default:{type:"paragraph-1"},hiddenSetting:{color:!0,textAlign:!0,textShadow:!0},ignoreReRender:!0},{id:"size",label:"Field size",type:"size",default:{type:"medium"},ignoreReRender:!0},{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0},tablet:{default:!0},mobile:{default:!0}}},{id:"width",type:"input:unit",label:"Width",placeholder:"Auto Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"background",type:"background-media",ignoreReRender:!0,hideImage:!0,devices:{desktop:{default:{type:"color",color:"#FFFFFF"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#FFFFFF"}}}},{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:"style",controls:[{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"100%",height:"Auto",padding:{type:"medium",top:"12px",bottom:"12px",left:"12px",right:"12px"}}}},settingConfig:{width:{},height:{displayOptions:["auto","small","large","medium"],sizeConfig:{small:"28px",medium:"36px",large:"44px"}}},hiddenSettings:["shape","gap"]},{id:"wrapperBorder",type:"border-v2",label:"Border",default:{border:"solid",width:"1px 1px 1px 1px",position:"all",borderWidth:"1px",color:"#7D7D7D",isCustom:!0}},{id:"backgroundColorV2Hover",type:"color-picker-v2",enableGradient:!0},{id:"textColorHover",type:"color-picker-v2",label:"Text Color",state:{hover:!0}},{id:"borderEmailHover",type:"border",emptyOnClear:!0,state:{hover:!0}},{id:"roundedEmailHover",type:"radius-preset",default:{hover:{radiusType:"small"}},state:{hover:!0}},{id:"boxShadowEmailHover",type:"shadow-v2",label:"Button Shadow",hideOnState:{hover:!0},state:{hover:!0}},{id:"backgroundColorV2Active",type:"color-picker-v2",enableGradient:!0},{id:"textColorActive",type:"color-picker-v2",label:"Text Color",state:{active:!0}},{id:"borderEmailActive",type:"border",emptyOnClear:!0,state:{active:!0}},{id:"roundedEmailActive",type:"radius-preset",default:{active:{radiusType:"small"}},state:{active:!0}},{id:"boxShadowEmailActive",type:"shadow-v2",label:"Button Shadow",hideOnState:{active:!0},state:{active:!0}}]}];exports.default=FormEmailSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var items=require("./items.js");const IconListSettings=[{id:"setting",controls:[{id:"childItem",label:"Item management",type:"child-item",default:["Icon 1","Icon 2"],childTemplate:items.itemControlTemplate},{id:"translate",type:"input",default:"childItem"},{id:"textTypo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-1"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0,textShadow:!0}},{id:"iconSvg",type:"icon",label:"Icon Parent",hideInput:!0,info:"Choose from list or paste any SVG icon",default:'<svg data-name="check-circle-filled" height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414807831544168"><path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"></path></svg>'},{id:"iconWidth",type:"input:stepper",label:"Icon Width",devices:{desktop:{default:24}},min:0},{id:"childConfig",type:"child-icon",label:"",default:[,,,].fill('<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414807831544168"><path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"></path></svg>')},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{padding:{type:"custom",top:"0px",bottom:"0px",left:"0px",right:"0px"}}}},hiddenShowMore:!0,hiddenSettings:["shape","width","height","gap"]},{id:"iconType",type:"option:illustration",enableTooltip:!0,label:"Icon type",options:[{label:"Matching icons",value:"matching",svgName:"gp-item-list-icon-matching"},{label:"Different icons",value:"different",svgName:"gp-item-list-icon-different"}],default:"matching"}]},{id:"style",controls:[{id:"background",type:"background-media",ignoreReRender:!0,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#DDDDDD",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}}},{id:"iconColor",type:"color-picker-v2",label:"Icon color",default:"text-1",compoDefaultValue:"text-1"},{id:"backgroundColor",type:"color-picker-v2",label:"Background color",default:"transparent",compoDefaultValue:"bg-1"},{id:"iconBorder",label:"Border",type:"border-v2",default:{},compoDefaultValue:{border:"solid",width:"1px 1px 1px 1px",position:"bottom",color:"line-3",isCustom:!0,borderWidth:"Mixed"}},{id:"iconRounded",type:"corner-v2",label:"Border Radius",default:{radiusType:"none"},compoDefaultValue:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}},{id:"horizontalSpacing",label:"Horizontal Spacing",type:"input:slider",units:["px"],min:0,max:40,ignoreMax:!0,devices:{desktop:{default:"8px"}}},{id:"position",type:"option:illustration",enableTooltip:!0,label:"Position",options:[{label:"Align center",value:"center",type:"align-pos",svgName:"gp-align-position-center"},{label:"Align top",value:"baseline",type:"align-pos",svgName:"gp-align-position-top"}],devices:{desktop:{default:"center"},tablet:{default:"center"},mobile:{default:"center"}}},{id:"contentBoxWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"100%"}}},{id:"contentBoxPadding",label:"Padding",type:"padding-v2",devices:{desktop:{}},compoDefaultValue:{desktop:{default:{top:"16px",bottom:"16px",left:"16px",right:"16px"}}}},{id:"panelAlign",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:"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:"verticalSpacing",type:"input:slider",label:"Item gap",units:["px"],min:0,max:40,ignoreMax:!0,devices:{desktop:{default:"12px"}}}]}];exports.IconListSettings=IconListSettings;
|
|
1
|
+
"use strict";var items=require("./items.js");const IconListSettings=[{id:"setting",controls:[{id:"childItem",label:"Item management",type:"child-item",default:["Icon 1","Icon 2"],childTemplate:items.itemControlTemplate,isDisabledDuplicateIncrease:!0},{id:"translate",type:"input",default:"childItem"},{id:"textTypo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-1"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0,textShadow:!0}},{id:"iconSvg",type:"icon",label:"Icon Parent",hideInput:!0,info:"Choose from list or paste any SVG icon",default:'<svg data-name="check-circle-filled" height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414807831544168"><path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"></path></svg>'},{id:"iconWidth",type:"input:stepper",label:"Icon Width",devices:{desktop:{default:24}},min:0},{id:"childConfig",type:"child-icon",label:"",default:[,,,].fill('<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414807831544168"><path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"></path></svg>')},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{padding:{type:"custom",top:"0px",bottom:"0px",left:"0px",right:"0px"}}}},hiddenShowMore:!0,hiddenSettings:["shape","width","height","gap"]},{id:"iconType",type:"option:illustration",enableTooltip:!0,label:"Icon type",options:[{label:"Matching icons",value:"matching",svgName:"gp-item-list-icon-matching"},{label:"Different icons",value:"different",svgName:"gp-item-list-icon-different"}],default:"matching"}]},{id:"style",controls:[{id:"background",type:"background-media",ignoreReRender:!0,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#DDDDDD",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}}},{id:"iconColor",type:"color-picker-v2",label:"Icon color",default:"text-1",compoDefaultValue:"text-1"},{id:"backgroundColor",type:"color-picker-v2",label:"Background color",default:"transparent",compoDefaultValue:"bg-1"},{id:"iconBorder",label:"Border",type:"border-v2",default:{},compoDefaultValue:{border:"solid",width:"1px 1px 1px 1px",position:"bottom",color:"line-3",isCustom:!0,borderWidth:"Mixed"}},{id:"iconRounded",type:"corner-v2",label:"Border Radius",default:{radiusType:"none"},compoDefaultValue:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}},{id:"horizontalSpacing",label:"Horizontal Spacing",type:"input:slider",units:["px"],min:0,max:40,ignoreMax:!0,devices:{desktop:{default:"8px"}}},{id:"position",type:"option:illustration",enableTooltip:!0,label:"Position",options:[{label:"Align center",value:"center",type:"align-pos",svgName:"gp-align-position-center"},{label:"Align top",value:"baseline",type:"align-pos",svgName:"gp-align-position-top"}],devices:{desktop:{default:"center"},tablet:{default:"center"},mobile:{default:"center"}}},{id:"contentBoxWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"100%"}}},{id:"contentBoxPadding",label:"Padding",type:"padding-v2",devices:{desktop:{}},compoDefaultValue:{desktop:{default:{top:"16px",bottom:"16px",left:"16px",right:"16px"}}}},{id:"panelAlign",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:"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:"verticalSpacing",type:"input:slider",label:"Item gap",units:["px"],min:0,max:40,ignoreMax:!0,devices:{desktop:{default:"12px"}}}]}];exports.IconListSettings=IconListSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const SettingUIV2=[{label:{en:"Text style"},controls:[{id:"typo",label:{en:"Basic"},setting:{id:"typo"},options:{hideLabel:!0,fullWidth:!0,updateFields:[{field:"attrs.textAlign",settingId:"textAlign"}]},layout:"vertical",controlChangeTrigger:{settings:[{action:{controlId:"textAlign",valueFromField:"attrs.textAlign",groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"
|
|
1
|
+
"use strict";const SettingUIV2=[{label:{en:"Text style"},controls:[{id:"typo",label:{en:"Basic"},setting:{id:"typo"},options:{hideLabel:!0,fullWidth:!0,updateFields:[{field:"attrs.textAlign",settingId:"textAlign"}]},layout:"vertical",controlChangeTrigger:{settings:[{action:{controlId:"textAlign",valueFromField:"attrs.textAlign",groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{default:{top:"16px",right:"16px",bottom:"16px",left:"16px",linked:!1}}}}]},{label:{en:"Background"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{setting:{id:"background"},layout:"vertical"}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"shapeBorder"}},{label:{en:"Corner"},setting:{id:"shapeRounded"}},{label:{en:"Shadow"},setting:{id:"shapeBoxShadow"}}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(globalSize.width) >= 100 && globalSize.width?.includes("%"))',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];exports.SettingUIV2=SettingUIV2;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{splitStyle as t,convertHTML as e}from"@gem-sdk/core";import{checkIsScrollToTop as l,checkIsOpenPopup as a,isLinkedToSalesPage as
|
|
1
|
+
import{splitStyle as t,convertHTML as e}from"@gem-sdk/core";import{checkIsScrollToTop as l,checkIsOpenPopup as a,isLinkedToSalesPage as r,getDynamicSourceLocales as o}from"../../helpers.js";import i from"../../link/components/Link.js";import{HREF_TO_SALES_PAGE as n}from"../../constant.js";import{getCustomCssStyles as s}from"./styles.js";let getCleanedStyles=(t,e)=>{if(!e)return t;let l={...t},a=["hover","focus"];return a.forEach(t=>{delete l?.backgroundColorV2?.[t]}),l},handleGetLabelToDisplay=({label:t,styles:l,translate:a,pageContext:r,isUseTranslatedValue:i,builderProps:n,isLiquid:s=!1})=>{let c=i?o({translate:a,val:t,pageContext:r,settingId:a??"label",uid:n?.uidTranslate??n?.uid,isCapitalize:l?.typo?.attrs?.transform==="capitalize"}):t;return s?c?.toString()??"":e(t)},checkIsShowIcon=(t,e)=>!!t&&e,handleCheckIsShowLabel=(t,e)=>!!t||!e,handleCheckIsEditableLabel=({mode:t,options:e,isLiquid:l=!1})=>l?!e?.isCannotEditing:"edit"===t&&!e?.isCannotEditing,checkIsScrollToElement=t=>!!t?.link?.startsWith("#")&&("_self"===t.target||"scroll-to"===t.type),getSplitStyles=e=>t(["pos","top","left","bottom","right","z"],e),getDataState=t=>t?"loading":"idle",getDataId=(t,e,l)=>t??(e||l)??"",handleGetArialLabel=({label:t,isLiquid:e=!1})=>e?t?.toString().replaceAll("'","'").replaceAll('"',"'")??"":t?.toString()??"",getInsertLinkData=({setting:t,htmlType:e,defaultTag:o,enableBtnLink:s,isLiquid:c=!1,pageType:g})=>{let d=["product.url"],p=["#","mailto:","tel:"],h=t?.link??"",u="/"===h,I=t?.link!==void 0&&""!==t.link,k=new RegExp(/^https?:\/\//i),S=I&&k.test(h),b=new RegExp(/^\/?(?:collections|pages|products|blogs|checkout|cart)\/?/i),m=I&&!k.test(h)&&b.test(h),f=()=>{if(d.find(t=>h.includes(t)))return!0;let e=p.find(t=>h.startsWith(t));return!(!e||l(t)||"STATIC"===g&&a(t))},y=r(t?.type),C=!!s&&(S||m||f()||u||y),w=h;c&&(m||u)&&(w=t?.isTranslate?"$locationOrigin"+h:"{{ request.origin }}{{ routes.root_url | split: '/' | join: '/' }}"+h);let D=C?c?"a":i:o,L={href:w,target:t?.target,...t?.noFollow&&{rel:"nofollow"}},T=C?L:I?{...L,type:e}:{type:e};return y&&(T={href:n,target:"_self"}),{HTMLTag:D,urlData:T,shouldRenderLink:C}},getData=t=>{let{style:e,dataId:l,pageContext:a,styles:r={},setting:o={},builderProps:i,builderAttrs:n,isUseTranslatedValue:c=!0}=t,{label:g,iconSvg:d,btnLink:p,loading:h,options:u,disabled:I,translate:k,iconVisible:S,shouldClearSpace:b}=o,[m,f]=getSplitStyles(e),y=getCleanedStyles(r,I),C=s({styles:r,uid:i?.uid,builderAttrs:n}),w=getDataState(h),D=getDataId(i?.uidInteraction,l,i?.uid),L=t=>{let{isLiquid:e}=t??{};return handleGetArialLabel({label:g,isLiquid:e})},T=t=>{let{isLiquid:e}=t??{};return handleGetLabelToDisplay({label:g,builderProps:i,styles:y,isLiquid:e,...e&&{translate:k},...e&&{pageContext:a},...e&&{isUseTranslatedValue:c}})},A=t=>{let{isLiquid:e}=t??{},l=T({isLiquid:e});return handleCheckIsShowLabel(l,b)},E=t=>{let{isLiquid:e,mode:l}=t??{};return handleCheckIsEditableLabel({options:u,isLiquid:e,...!e&&l&&{mode:l}})},v=checkIsShowIcon(d,S),G=checkIsScrollToElement(p);return{customCss:C,wrapStyle:m,restStyle:f,dataState:w,dataIdAttr:D,isShowIcon:v,isScrollToElement:G,getArialLabel:L,getLabelToDisplay:T,checkIsShowLabel:A,checkIsEditableLabel:E}},LOADING_INDICATOR=`
|
|
2
2
|
<svg
|
|
3
3
|
class="gp-invisible gp-absolute gp-h-5 gp-w-5 group-data-[state=loading]:gp-animate-spin group-data-[state=loading]:gp-visible"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as t,jsxs as s}from"react/jsx-runtime";import{useEditorMode as e}from"@gem-sdk/core";import{createStyle as
|
|
2
|
+
import{jsx as t,jsxs as s}from"react/jsx-runtime";import{useEditorMode as e,usePageType as o}from"@gem-sdk/core";import{createStyle as r,createClass as m,createAttr as l,If as a}from"@gem-sdk/system";import{handleClickLink as i}from"../../helpers.js";import{getButtonAttributes as n}from"../common/attrs.js";import{getButtonStyles as c,getTypoStyles as d,getButtonIconStyles as p,getButtonWrapperStyles as f}from"../common/styles.js";import{getButtonClasses as g,getButtonIconClasses as u,getButtonLabelClasses as h,getButtonWrapperClasses as y,getButtonContentWrapperClasses as j}from"../common/classes.js";import b from"./ButtonIcon.js";import B from"./ButtonLabel.js";import L from"./ButtonLoadingIndicator.js";import{getData as k,getInsertLinkData as v}from"../common/helpers.js";let Button=I=>{let{children:N,advanced:T,className:x,nodePrice:C,customAttrs:H,styles:M={},setting:S={},builderProps:_,builderAttrs:q,wrapClassName:w="",onClick:z}=I,{iconSvg:A,btnLink:D,htmlType:E,loading:F,disabled:G,shouldClearSpace:J,enableBtnLink:K}=S,{enableTextStyle:O=!0}=M,P=e(),Q=o(),{customCss:R,wrapStyle:U,restStyle:V,dataState:W,dataIdAttr:X,isShowIcon:Y,isScrollToElement:Z,getArialLabel:$,getLabelToDisplay:tt,checkIsShowLabel:ts,checkIsEditableLabel:te}=k(I),{HTMLTag:to,urlData:tr,shouldRenderLink:tm}=v({enableBtnLink:K,htmlType:E,setting:D,defaultTag:"button",pageType:Q}),tl=r({...c(M)}),ta=r({...d(M)}),ti=r({...d(M),...p(M,S)}),tn=r({...f(V,M)}),tc=m({...g({styles:M,className:x,shouldRenderLink:tm,uid:_?.uid})}),td=m({...u(tt(),J,O)}),tp=m({...h(M,te({mode:P}))}),tf=m({...y(w,x,T?.cssClass)}),tg=m({...j(S)}),tu=l({...n({disabled:G,dataState:W,dataId:X,arialLabel:$()})}),th=t=>{z?.(t),i(D,P)};return t("div",{style:U,children:s("div",{...q,style:tn,className:tf,children:[t("style",{type:"text/css",dangerouslySetInnerHTML:{__html:R}}),a(Z,t("a",{className:"gp-trigger-button-link gp-hidden",href:tr.href,target:tr.target})),s(to,{...tu,...H,setting:tr,style:tl,className:tc,onClick:th,children:[a(F,t(L,{})),s("div",{className:tg,children:[a(Y,t(b,{iconSvg:A??"",styles:ti,classes:td})),a(O&&ts(),t(B,{label:tt(),styles:ta,classes:tp}))]}),a(!!C,C??"")]}),N]})})};export{Button as default};
|
|
@@ -2,10 +2,10 @@ import{useEditorMode as e}from"@gem-sdk/core";import{useCallback as t,useMemo as
|
|
|
2
2
|
<p class="gp-text-center gp-text-sm gp-py-4 gp-leading-6 gp-text-light-500 gp-flex gp-flex-col gp-gap-[4px]">
|
|
3
3
|
<span>${i||"Custom Code"}</span>
|
|
4
4
|
${e||t||p?'<span class="gp-text-[#676767] gp-text-12 gp-leading-5">Publish the page to see the content.</span>':""}
|
|
5
|
-
</p>`,[i]),
|
|
6
|
-
<div class="gp-py-4 gp-
|
|
5
|
+
</p>`,[i]),r=(e,t)=>{let p=document.createElement("div");p.innerHTML=e;let s=p.childNodes,l=!1,n=!0;if(s.length>0){s.forEach(e=>{EMPTY_TAGS.includes(e?.tagName)&&(l=!0,e?.remove())});let e=p.childNodes;e.forEach(e=>{if(ALLOWED_EMPTY_TAG.includes(e?.tagName))n=!1;else if(e?.nodeName!=="#comment"){let t=e?.textContent?.trim();t&&(n=!1)}})}return n&&(n=!p?.textContent?.trim()),t&&(l=!0),{empty:n,hasScript:l}},g=p(()=>{if("edit"===n){let{empty:e,hasScript:t}=r(a?.html||"",a?.javascript||"");if(t)return`
|
|
6
|
+
<div class="gp-py-4 gp-font-[sans-serif] gp-flex gp-flex-col gp-gap-[4px]" >
|
|
7
7
|
<p class="gp-text-center gp-text-sm gp-leading-[21px] gp-text-[#676767] ">
|
|
8
8
|
Publish the page to see the content.
|
|
9
9
|
</p>
|
|
10
10
|
</div>
|
|
11
|
-
`;if(e)return o(a?.css||"",a?.javascript||"",a?.html||"")}return a?.html?.trim()},[n,a?.html,a?.javascript,a?.css,o]),c=e=>{if(2===e.detail){let e=new CustomEvent("editor:toolbar:open-custom-code",{bubbles:!0});window.dispatchEvent(e)}};return{mode:n,htmlPlainText:
|
|
11
|
+
`;if(e)return o(a?.css||"",a?.javascript||"",a?.html||"")}return a?.html?.trim()},[n,a?.html,a?.javascript,a?.css,o]),c=e=>{if(2===e.detail){let e=new CustomEvent("editor:toolbar:open-custom-code",{bubbles:!0});window.dispatchEvent(e)}};return{mode:n,htmlPlainText:g,handleDoubleClickCustomCode:c}};export{useCSSCode as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let FormCheckboxSettings=[{id:"setting",controls:[{id:"name",type:"input",label:"name",default:"contact[agree]"},{id:"description",type:"textarea",label:"Description",default:"Yes, sign me up to receive exclusive offers, news and more!",minHeight:100,autoHeight:!0},{id:"translate",type:"input",default:"description"},{id:"required",type:"toggle",label:"Required",default:!0},{id:"selected",type:"toggle",label:"Selected as default",default:!1},{id:"typo",type:"typography-v2",label:"Text styles",default:{type:"paragraph-1",attrs:{color:"text-1"}},ignoreReRender:!0,hiddenSetting:{
|
|
1
|
+
let FormCheckboxSettings=[{id:"setting",controls:[{id:"name",type:"input",label:"name",default:"contact[agree]"},{id:"description",type:"textarea",label:"Description",default:"Yes, sign me up to receive exclusive offers, news and more!",minHeight:100,autoHeight:!0},{id:"translate",type:"input",default:"description"},{id:"required",type:"toggle",label:"Required",default:!0},{id:"selected",type:"toggle",label:"Selected as default",default:!1},{id:"typo",type:"typography-v2",label:"Text styles",default:{type:"paragraph-1",attrs:{color:"text-1"}},ignoreReRender:!0,hiddenSetting:{textShadow:!0}},{id:"textColor",type:"colorpicker",label:"Text color",default:"text-1"},{id:"horizontalSpacing",units:["px"],type:"input:slider",step:1,min:0,max:40,devices:{desktop:{default:"4px"}},ignoreMax:!0},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"background",type:"background-media",ignoreReRender:!0,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#DDDDDD",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",preload:!1}}}}]},{id:"style",controls:[{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"Auto",height:"Auto",padding:{type:"medium",top:"12px",bottom:"12px",left:"24px",right:"24px"}}}},settingConfig:{width:{displayOptions:["full","auto","small","large","medium"],sizeConfig:{small:"100px",medium:"116px",large:"132px"}},height:{displayOptions:["auto","small","large","medium"],sizeConfig:{small:"28px",medium:"36px",large:"44px"}}},hiddenSettings:["shape","gap"]},{id:"wrapperBorder",type:"border",label:"Border",default:{borderType:"none",border:"none",width:"1px 1px 1px 1px",position:"all",borderWidth:"1px",color:"#000000",isCustom:!0}},{id:"borderRadius",type:"radius-preset",label:"Corner",default:{radiusType:"none"},compoDefaultValue:{bblr:"20px",btrr:"20px",bbrr:"20px",btlr:"20px",radiusType:"rounded"}},{id:"hasActiveShadow",type:"toggle",label:"Enable Button Shadow",default:!1},{id:"shadow",type:"boxShadow",label:"Button Shadow",default:{type:"none",distance:"10px",blur:"12px",spread:"10px",color:"rgba(18, 18, 18, 0.77)",angle:40}}]}];export{FormCheckboxSettings as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let SettingUIV2=[{label:{en:"Text style"},controls:[{type:"combo",label:{en:"Content"},iconName:"polaris-text-block",getValueFromSettingID:"description",isHideClear:!0,controls:[{layout:"vertical",setting:{id:"description"}}]},{layout:"vertical",setting:{id:"typo"}}]},{label:{en:"Spacing"},controls:[{type:"control",label:{en:"Gap"},setting:{id:"horizontalSpacing"}}]},{label:{en:"Configuration"},controls:[{label:{en:"Required"},setting:{id:"required"}},{label:{en:"Default selected"},setting:{id:"selected"}},{label:{en:"Field name"},setting:{id:"name"},help:{content:"Identify the information submitted via this element."}}]}
|
|
1
|
+
let SettingUIV2=[{label:{en:"Text style"},controls:[{type:"combo",label:{en:"Content"},iconName:"polaris-text-block",getValueFromSettingID:"description",isHideClear:!0,controls:[{layout:"vertical",setting:{id:"description"}}]},{layout:"vertical",setting:{id:"typo"},options:{updateFields:[{field:"attrs.textAlign",settingId:"align"}]},controlChangeTrigger:{settings:[{action:{controlId:"align",valueFromField:"attrs.textAlign",groupType:"setting",controlType:"setting"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Spacing"},controls:[{type:"control",label:{en:"Gap"},setting:{id:"horizontalSpacing"}}]},{label:{en:"Configuration"},controls:[{label:{en:"Required"},setting:{id:"required"}},{label:{en:"Default selected"},setting:{id:"selected"}},{label:{en:"Field name"},setting:{id:"name"},help:{content:"Identify the information submitted via this element."}}]}];export{SettingUIV2};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let FormEmailSettings=[{id:"setting",controls:[{id:"placeholder",type:"textarea",minHeight:56,label:"Placeholder",default:"Enter your email address"},{id:"placeholderColor",type:"color-picker-v2",label:"Color",default:"#A3A3A3"},{id:"translate",type:"input",default:"placeholder"},{id:"required",type:"toggle",label:"Placeholder",default:!0},{id:"hideOnClient",type:"toggle",label:"Hide on client",default:!1},{id:"defaultEmail",type:"input",label:"Default value",default:"default@gempages.help"},{id:"typo",label:"Text styles",type:"typography-v2",default:{type:"paragraph-1"},hiddenSetting:{color:!0,textAlign:!0,textShadow:!0},ignoreReRender:!0},{id:"size",label:"Field size",type:"size",default:{type:"medium"},ignoreReRender:!0},{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0},tablet:{default:!0},mobile:{default:!0}}},{id:"width",type:"input:unit",label:"Width",placeholder:"Auto Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"background",type:"background-media",ignoreReRender:!0,hideImage:!0,devices:{desktop:{default:{type:"color",color:"#FFFFFF"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#FFFFFF"}}}},{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:"style",controls:[{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"100%",height:"Auto",padding:{type:"medium",top:"12px",bottom:"12px",left:"12px",right:"12px"}}}},settingConfig:{width:{},height:{displayOptions:["auto","small","large","medium"],sizeConfig:{small:"28px",medium:"36px",large:"44px"}}},hiddenSettings:["shape","gap"]},{id:"wrapperBorder",type:"border-v2",label:"Border",default:{border:"solid",width:"1px 1px 1px 1px",position:"all",borderWidth:"1px",color:"#7D7D7D",isCustom:!0}},{id:"backgroundColorV2Hover",type:"color-picker-v2",enableGradient:!0},{id:"textColorHover",type:"color-picker-v2",label:"Text Color",state:{hover:!0}},{id:"borderEmailHover",type:"border",emptyOnClear:!0,state:{hover:!0}},{id:"roundedEmailHover",type:"radius-preset",default:{hover:{radiusType:"small"}},state:{hover:!0}},{id:"boxShadowEmailHover",type:"shadow-v2",label:"Button Shadow",hideOnState:{hover:!0},
|
|
1
|
+
let FormEmailSettings=[{id:"setting",controls:[{id:"placeholder",type:"textarea",minHeight:56,label:"Placeholder",default:"Enter your email address"},{id:"placeholderColor",type:"color-picker-v2",label:"Color",default:"#A3A3A3"},{id:"translate",type:"input",default:"placeholder"},{id:"required",type:"toggle",label:"Placeholder",default:!0},{id:"hideOnClient",type:"toggle",label:"Hide on client",default:!1},{id:"defaultEmail",type:"input",label:"Default value",default:"default@gempages.help"},{id:"typo",label:"Text styles",type:"typography-v2",default:{type:"paragraph-1"},hiddenSetting:{color:!0,textAlign:!0,textShadow:!0},ignoreReRender:!0},{id:"size",label:"Field size",type:"size",default:{type:"medium"},ignoreReRender:!0},{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0},tablet:{default:!0},mobile:{default:!0}}},{id:"width",type:"input:unit",label:"Width",placeholder:"Auto Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"background",type:"background-media",ignoreReRender:!0,hideImage:!0,devices:{desktop:{default:{type:"color",color:"#FFFFFF"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#FFFFFF"}}}},{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:"style",controls:[{id:"globalSize",type:"size-setting",devices:{desktop:{default:{width:"100%",height:"Auto",padding:{type:"medium",top:"12px",bottom:"12px",left:"12px",right:"12px"}}}},settingConfig:{width:{},height:{displayOptions:["auto","small","large","medium"],sizeConfig:{small:"28px",medium:"36px",large:"44px"}}},hiddenSettings:["shape","gap"]},{id:"wrapperBorder",type:"border-v2",label:"Border",default:{border:"solid",width:"1px 1px 1px 1px",position:"all",borderWidth:"1px",color:"#7D7D7D",isCustom:!0}},{id:"backgroundColorV2Hover",type:"color-picker-v2",enableGradient:!0},{id:"textColorHover",type:"color-picker-v2",label:"Text Color",state:{hover:!0}},{id:"borderEmailHover",type:"border",emptyOnClear:!0,state:{hover:!0}},{id:"roundedEmailHover",type:"radius-preset",default:{hover:{radiusType:"small"}},state:{hover:!0}},{id:"boxShadowEmailHover",type:"shadow-v2",label:"Button Shadow",hideOnState:{hover:!0},state:{hover:!0}},{id:"backgroundColorV2Active",type:"color-picker-v2",enableGradient:!0},{id:"textColorActive",type:"color-picker-v2",label:"Text Color",state:{active:!0}},{id:"borderEmailActive",type:"border",emptyOnClear:!0,state:{active:!0}},{id:"roundedEmailActive",type:"radius-preset",default:{active:{radiusType:"small"}},state:{active:!0}},{id:"boxShadowEmailActive",type:"shadow-v2",label:"Button Shadow",hideOnState:{active:!0},state:{active:!0}}]}];export{FormEmailSettings as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{itemControlTemplate as e}from"./items.js";let IconListSettings=[{id:"setting",controls:[{id:"childItem",label:"Item management",type:"child-item",default:["Icon 1","Icon 2"],childTemplate:e},{id:"translate",type:"input",default:"childItem"},{id:"textTypo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-1"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0,textShadow:!0}},{id:"iconSvg",type:"icon",label:"Icon Parent",hideInput:!0,info:"Choose from list or paste any SVG icon",default:'<svg data-name="check-circle-filled" height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414807831544168"><path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"></path></svg>'},{id:"iconWidth",type:"input:stepper",label:"Icon Width",devices:{desktop:{default:24}},min:0},{id:"childConfig",type:"child-icon",label:"",default:[,,,].fill('<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414807831544168"><path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"></path></svg>')},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{padding:{type:"custom",top:"0px",bottom:"0px",left:"0px",right:"0px"}}}},hiddenShowMore:!0,hiddenSettings:["shape","width","height","gap"]},{id:"iconType",type:"option:illustration",enableTooltip:!0,label:"Icon type",options:[{label:"Matching icons",value:"matching",svgName:"gp-item-list-icon-matching"},{label:"Different icons",value:"different",svgName:"gp-item-list-icon-different"}],default:"matching"}]},{id:"style",controls:[{id:"background",type:"background-media",ignoreReRender:!0,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#DDDDDD",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}}},{id:"iconColor",type:"color-picker-v2",label:"Icon color",default:"text-1",compoDefaultValue:"text-1"},{id:"backgroundColor",type:"color-picker-v2",label:"Background color",default:"transparent",compoDefaultValue:"bg-1"},{id:"iconBorder",label:"Border",type:"border-v2",default:{},compoDefaultValue:{border:"solid",width:"1px 1px 1px 1px",position:"bottom",color:"line-3",isCustom:!0,borderWidth:"Mixed"}},{id:"iconRounded",type:"corner-v2",label:"Border Radius",default:{radiusType:"none"},compoDefaultValue:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}},{id:"horizontalSpacing",label:"Horizontal Spacing",type:"input:slider",units:["px"],min:0,max:40,ignoreMax:!0,devices:{desktop:{default:"8px"}}},{id:"position",type:"option:illustration",enableTooltip:!0,label:"Position",options:[{label:"Align center",value:"center",type:"align-pos",svgName:"gp-align-position-center"},{label:"Align top",value:"baseline",type:"align-pos",svgName:"gp-align-position-top"}],devices:{desktop:{default:"center"},tablet:{default:"center"},mobile:{default:"center"}}},{id:"contentBoxWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"100%"}}},{id:"contentBoxPadding",label:"Padding",type:"padding-v2",devices:{desktop:{}},compoDefaultValue:{desktop:{default:{top:"16px",bottom:"16px",left:"16px",right:"16px"}}}},{id:"panelAlign",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:"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:"verticalSpacing",type:"input:slider",label:"Item gap",units:["px"],min:0,max:40,ignoreMax:!0,devices:{desktop:{default:"12px"}}}]}];export{IconListSettings};
|
|
1
|
+
import{itemControlTemplate as e}from"./items.js";let IconListSettings=[{id:"setting",controls:[{id:"childItem",label:"Item management",type:"child-item",default:["Icon 1","Icon 2"],childTemplate:e,isDisabledDuplicateIncrease:!0},{id:"translate",type:"input",default:"childItem"},{id:"textTypo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-1"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0,textShadow:!0}},{id:"iconSvg",type:"icon",label:"Icon Parent",hideInput:!0,info:"Choose from list or paste any SVG icon",default:'<svg data-name="check-circle-filled" height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414807831544168"><path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"></path></svg>'},{id:"iconWidth",type:"input:stepper",label:"Icon Width",devices:{desktop:{default:24}},min:0},{id:"childConfig",type:"child-icon",label:"",default:[,,,].fill('<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414807831544168"><path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"></path></svg>')},{id:"globalSize",type:"size-setting",devices:{desktop:{default:{padding:{type:"custom",top:"0px",bottom:"0px",left:"0px",right:"0px"}}}},hiddenShowMore:!0,hiddenSettings:["shape","width","height","gap"]},{id:"iconType",type:"option:illustration",enableTooltip:!0,label:"Icon type",options:[{label:"Matching icons",value:"matching",svgName:"gp-item-list-icon-matching"},{label:"Different icons",value:"different",svgName:"gp-item-list-icon-different"}],default:"matching"}]},{id:"style",controls:[{id:"background",type:"background-media",ignoreReRender:!0,devices:{desktop:{default:{type:"color",color:"transparent",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"#DDDDDD",image:{src:"https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/",width:1200,height:480},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}}},{id:"iconColor",type:"color-picker-v2",label:"Icon color",default:"text-1",compoDefaultValue:"text-1"},{id:"backgroundColor",type:"color-picker-v2",label:"Background color",default:"transparent",compoDefaultValue:"bg-1"},{id:"iconBorder",label:"Border",type:"border-v2",default:{},compoDefaultValue:{border:"solid",width:"1px 1px 1px 1px",position:"bottom",color:"line-3",isCustom:!0,borderWidth:"Mixed"}},{id:"iconRounded",type:"corner-v2",label:"Border Radius",default:{radiusType:"none"},compoDefaultValue:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}},{id:"horizontalSpacing",label:"Horizontal Spacing",type:"input:slider",units:["px"],min:0,max:40,ignoreMax:!0,devices:{desktop:{default:"8px"}}},{id:"position",type:"option:illustration",enableTooltip:!0,label:"Position",options:[{label:"Align center",value:"center",type:"align-pos",svgName:"gp-align-position-center"},{label:"Align top",value:"baseline",type:"align-pos",svgName:"gp-align-position-top"}],devices:{desktop:{default:"center"},tablet:{default:"center"},mobile:{default:"center"}}},{id:"contentBoxWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}],devices:{desktop:{default:"100%"}}},{id:"contentBoxPadding",label:"Padding",type:"padding-v2",devices:{desktop:{}},compoDefaultValue:{desktop:{default:{top:"16px",bottom:"16px",left:"16px",right:"16px"}}}},{id:"panelAlign",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:"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:"verticalSpacing",type:"input:slider",label:"Item gap",units:["px"],min:0,max:40,ignoreMax:!0,devices:{desktop:{default:"12px"}}}]}];export{IconListSettings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let SettingUIV2=[{label:{en:"Text style"},controls:[{id:"typo",label:{en:"Basic"},setting:{id:"typo"},options:{hideLabel:!0,fullWidth:!0,updateFields:[{field:"attrs.textAlign",settingId:"textAlign"}]},layout:"vertical",controlChangeTrigger:{settings:[{action:{controlId:"textAlign",valueFromField:"attrs.textAlign",groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"
|
|
1
|
+
let SettingUIV2=[{label:{en:"Text style"},controls:[{id:"typo",label:{en:"Basic"},setting:{id:"typo"},options:{hideLabel:!0,fullWidth:!0,updateFields:[{field:"attrs.textAlign",settingId:"textAlign"}]},layout:"vertical",controlChangeTrigger:{settings:[{action:{controlId:"textAlign",valueFromField:"attrs.textAlign",groupType:"style",controlType:"style"}}],options:{noRecordHistory:!0}}}]},{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{default:{top:"16px",right:"16px",bottom:"16px",left:"16px",linked:!1}}}}]},{label:{en:"Background"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{setting:{id:"background"},layout:"vertical"}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"shapeBorder"}},{label:{en:"Corner"},setting:{id:"shapeRounded"}},{label:{en:"Shadow"},setting:{id:"shapeBoxShadow"}}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(globalSize.width) >= 100 && globalSize.width?.includes("%"))',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];export{SettingUIV2};
|