@gem-sdk/components 2.0.0-staging.862 → 2.0.0-staging.864
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/marquee/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/product/components/file-upload/settings/configs/settings.js +1 -1
- package/dist/cjs/sticky/common/styles.js +1 -1
- package/dist/cjs/sticky/components/Sticky.js +1 -1
- package/dist/esm/marquee/settings/configs/ui-v2.js +1 -1
- package/dist/esm/product/components/file-upload/settings/configs/settings.js +1 -1
- package/dist/esm/sticky/common/styles.js +1 -1
- package/dist/esm/sticky/components/Sticky.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const SettingUIV2=[{label:{en:"Item management"},controls:[{label:{en:"Order"},setting:{id:"childItem"}}]},{label:{en:"Item spacing"},controls:[{label:{en:"Gap"},setting:{id:"itemSpacing"}}]},{label:{en:"Item style"},controls:[{setting:{id:"itemWidthType"},label:{en:"Max width"}},{label:{en:"Custom width"},setting:{id:"itemMaxWidth"},conditionDisplay:'itemWidthType == "CUSTOM"'}],moreSettings:{type:"collapse",controls:[{label:{en:"Background"},setting:{id:"itemBackgroundColor"}},{label:{en:"Border"},setting:{id:"itemBorderStyle"}},{label:{en:"Corner"},setting:{id:"itemCorner"}},{label:{en:"Shadow"},setting:{id:"itemShadow"}}]}},{controls:[{label:{en:"Separator"},setting:{id:"isShowIconSeparator"},options:{labelVariant:"primary",toggleStyle:"switch"}},{setting:{id:"iconSeparatorSvg"},conditionDisplay:"isShowIconSeparator == true",label:{en:"Icon"}},{label:{en:"Icon size"},setting:{id:"iconSeparatorSize"},conditionDisplay:"isShowIconSeparator == true"},{label:{en:"Icon color"},setting:{id:"iconSeparatorColor"},conditionDisplay:"isShowIconSeparator == true"}]},{label:{en:"Marquee effect"},controls:[{label:{en:"Direction"},setting:{id:"direction"}},{label:{en:"Stop on hover"},setting:{id:"stopOnHover"}},{label:{en:"Speed"},setting:{id:"speed"}},{setting:{id:"isPreview"},layout:"vertical"}]},{label:{en:"Size"},controls:[{label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"sizeSetting",field:"width"}}},{label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",inputType:"number",units:["px"],linkWithSetting:{name:"sizeSetting",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Small",value:"32px",showValue:!0},{label:"Medium",value:"48px",showValue:!0},{label:"Large",value:"64px",showValue:!0}]}},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"spacing-setting",field:"padding"},compoDefaultValue:{desktop:{default:{padding:{type:"custom",top:"16px",bottom:"16px",left:"0px",right:"0px"}}}}}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColor"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"border",state:"normal"}},{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}}}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(sizeSetting.width) >= 100 && sizeSetting.width?.includes("%"))',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];exports.SettingUIV2=SettingUIV2;
|
|
1
|
+
"use strict";const SettingUIV2=[{label:{en:"Item management"},controls:[{label:{en:"Order"},setting:{id:"childItem"}}]},{label:{en:"Item spacing"},controls:[{label:{en:"Gap"},setting:{id:"itemSpacing"}}]},{label:{en:"Item style"},controls:[{setting:{id:"itemWidthType"},label:{en:"Max width"}},{label:{en:"Custom width"},setting:{id:"itemMaxWidth"},conditionDisplay:'itemWidthType == "CUSTOM"'}],moreSettings:{type:"collapse",controls:[{label:{en:"Background"},setting:{id:"itemBackgroundColor"}},{label:{en:"Border"},setting:{id:"itemBorderStyle"}},{label:{en:"Corner"},setting:{id:"itemCorner"}},{label:{en:"Shadow"},setting:{id:"itemShadow"},options:{updateFields:[{field:"enable",settingId:"hasItemShadow"}]},controlChangeTrigger:{settings:[{condition:"itemShadow.enable === true",source:["itemShadow","hasItemShadow"],action:{controlId:"hasItemShadow",groupType:"style",controlType:"style",newValue:!0}},{condition:"itemShadow.enable === false",source:["itemShadow","hasItemShadow"],action:{controlId:"hasItemShadow",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}}]}},{controls:[{label:{en:"Separator"},setting:{id:"isShowIconSeparator"},options:{labelVariant:"primary",toggleStyle:"switch"}},{setting:{id:"iconSeparatorSvg"},conditionDisplay:"isShowIconSeparator == true",label:{en:"Icon"}},{label:{en:"Icon size"},setting:{id:"iconSeparatorSize"},conditionDisplay:"isShowIconSeparator == true"},{label:{en:"Icon color"},setting:{id:"iconSeparatorColor"},conditionDisplay:"isShowIconSeparator == true"}]},{label:{en:"Marquee effect"},controls:[{label:{en:"Direction"},setting:{id:"direction"}},{label:{en:"Stop on hover"},setting:{id:"stopOnHover"}},{label:{en:"Speed"},setting:{id:"speed"}},{setting:{id:"isPreview"},layout:"vertical"}]},{label:{en:"Size"},controls:[{label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"sizeSetting",field:"width"}}},{label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",inputType:"number",units:["px"],linkWithSetting:{name:"sizeSetting",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Small",value:"32px",showValue:!0},{label:"Medium",value:"48px",showValue:!0},{label:"Large",value:"64px",showValue:!0}]}},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"spacing-setting",field:"padding"},compoDefaultValue:{desktop:{default:{padding:{type:"custom",top:"16px",bottom:"16px",left:"0px",right:"0px"}}}}}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColor"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"border",state:"normal"}},{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}}}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(sizeSetting.width) >= 100 && sizeSetting.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;
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
`},{label:"Right",value:"end",icon:`<svg width="42" height="28" viewBox="0 0 42 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
9
9
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M18.8628 17C18.8628 18.0355 19.7023 18.875 20.7378 18.875L28.2378 18.875C28.457 18.875 28.6673 18.8374 28.8628 18.7683L28.8628 22.375C28.8628 22.7202 29.1426 23 29.4878 23C29.833 23 30.1128 22.7202 30.1128 22.375L30.1128 6.12408C30.1128 5.77891 29.833 5.49908 29.4878 5.49908C29.1426 5.49908 28.8628 5.77891 28.8628 6.12408L28.8628 9.7317C28.6673 9.6626 28.457 9.625 28.2378 9.625L20.7378 9.625C19.7023 9.625 18.8628 10.4645 18.8628 11.5L18.8628 17ZM20.7378 17.625C20.3926 17.625 20.1128 17.3452 20.1128 17L20.1128 11.5C20.1128 11.1548 20.3926 10.875 20.7378 10.875L28.2378 10.875C28.583 10.875 28.8628 11.1548 28.8628 11.5L28.8628 17C28.8628 17.3452 28.583 17.625 28.2378 17.625L20.7378 17.625Z" fill="currentColor"/>
|
|
10
10
|
</svg>
|
|
11
|
-
`,type:"align-v"}]},{id:"positionVertical",type:"layout-segment",iconViewBox:"0 0 66 48",enableItemBackground:!0,enableTooltip:!0,label:"Position",default:"center",options:[{label:"
|
|
11
|
+
`,type:"align-v"}]},{id:"positionVertical",type:"layout-segment",iconViewBox:"0 0 66 48",enableItemBackground:!0,enableTooltip:!0,label:"Position",default:"center",options:[{label:"Center",value:"center",type:"file-upload-position-vertical"},{label:"Left",value:"start",type:"file-upload-position-vertical"}]},{id:"positionHorizontal",type:"layout-segment",iconViewBox:"0 0 66 48",enableItemBackground:!0,enableTooltip:!0,label:"Position",default:"center",options:[{label:"Align center",value:"center",type:"file-upload-position-horizontal"},{label:"Align start",value:"start",type:"file-upload-position-horizontal"}]},{id:"optionSetting",type:"group",controls:[{id:"isRequired",label:"Required",type:"toggle",default:!0},{id:"isShowPreviewImage",label:"Click image to preview",type:"toggle",default:!0},{id:"numberOfFiles",type:"segment",label:"Number of files",default:"multiple",options:[{label:"Single",value:"single"},{label:"Multiple",value:"multiple"}]}]},{id:"iconGroup",type:"group",label:"Icon",controls:[{id:"iconVisible",label:"Icon Visible",type:"toggle",default:!0},{id:"iconSvg",label:"SVG Icon",type:"icon",hideLabel:!0,default:`<svg height="20px" width="20px" data-name="upload-simple-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817710018527592">
|
|
12
12
|
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0ZM93.66,77.66,120,51.31V144a8,8,0,0,0,16,0V51.31l26.34,26.35a8,8,0,0,0,11.32-11.32l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,93.66,77.66Z"></path></svg>
|
|
13
13
|
`},{id:"iconSize",type:"input:stepper",label:"Icon Width",devices:{desktop:{default:20},tablet:{default:20},mobile:{default:20}},min:0},{id:"iconAlignVertical",label:"Icon Alignment",type:"segment",options:[{label:"Above",value:"above"},{label:"Below",value:"below"}],default:"above"},{id:"iconAlignHorizontal",label:"Icon Alignment",type:"segment",options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],default:"left"}]},{id:"contentWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"}},displayOptions:[{label:"Full",value:"100%",showValue:!0}]},{id:"paddingSize",type:"size-setting",devices:{desktop:{default:{padding:{type:"large",top:"12px",bottom:"12px",left:"32px",right:"32px"}}}},hiddenSettings:["shape","gap","width","height"],hiddenShowMore:!0},{id:"size",type:"size-setting",devices:{desktop:{default:{width:"100%",height:"Auto",padding:{type:"large",top:"12px",bottom:"12px",left:"32px",right:"32px"}}}},settingConfig:{width:{displayOptions:["full","auto","small","large","medium"]},height:{displayOptions:["auto","small","large","medium"]}},hiddenShowMore:!0,hiddenSettings:["shape","gap","padding"]}]},{id:"style",controls:[{id:"behavior-state",type:"behavior-state",controls:[{id:"backgroundColor",type:"color-picker-v2",label:"Background Color",default:{normal:"#FFFFFF",hover:"#DDDDDD"},compoDefaultValue:{hover:"#DDDDDD"},state:{hover:!0,normal:!0}},{id:"textColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},compoDefaultValue:{hover:"text-2"},state:{hover:!0,normal:!0}},{id:"borderBtn",type:"border",label:"Border Style",default:{normal:{border:"dashed",isCustom:!0,position:"all",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#7D7D7D"}},state:{hover:!0,normal:!0}},{id:"hasBoxShadowBtn",type:"toggle",label:"Enable Button Shadow",default:{normal:!0,hover:!0},state:{normal:!0,hover:!0}},{id:"boxShadowBtn",type:"shadow-v2",label:"Shadow Style",hideOnState:{normal:!0,hover:!0},state:{normal:!0,hover:!0},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45}}},{id:"roundedBtn",type:"radius-preset",label:"Border Radius",default:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}},state:{hover:!0,normal:!0}}]},{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-2"}},ignoreReRender:!0},{id:"spacing",label:"Spacing Icon",type:"input:slider",min:0,max:40,step:1,units:["px","em","rem","%","vh"],devices:{desktop:{default:"8px"}}},{id:"textAlign",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left"},{label:"Center",value:"center",type:"text",tooltip:"Align center"},{label:"Right",value:"right",type:"text",tooltip:"Align right"},{label:"Justify",value:"justify",type:"text",tooltip:"Align justify"}],devices:{desktop:{default:"left"}}},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left"},{label:"Center",value:"center",type:"align",tooltip:"Align center"},{label:"Right",value:"right",type:"align",tooltip:"Align right"}],devices:{desktop:{default:"left"}}}]}];exports.Settings=Settings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");require("react/jsx-runtime"),require("react");var _const=require("../../common/const.js");const getCSSPosition=
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");require("react/jsx-runtime"),require("react");var _const=require("../../common/const.js");const getCSSPosition=t=>"top"==t?"sticky":"fixed",getDisplayStyle=(t,e,l)=>{let o={[`--top${t}`]:"auto",[`--${l+t}`]:"0",[`--pos${t}`]:getCSSPosition(l)};return"after-first-cart-button"===e&&(o[`--d${t}`]="none"),o},displayConditionStyle=(t,e)=>({...getDisplayStyle("",t?.desktop,e?.desktop),...getDisplayStyle("-tablet",t?.tablet??t?.desktop,e?.tablet??e?.desktop),...getDisplayStyle("-mobile",t?.mobile??t?.tablet??t?.desktop,e?.mobile??e?.tablet??e?.desktop)}),getCSSAlignByDevice=(t,e)=>({[`--left${e}`]:"top"==t?"0":"50%",[`--t${e}`]:"top"==t?"unset":"translateX(-50%)"}),getCSSAlign=t=>({...getCSSAlignByDevice(t?.desktop,""),...getCSSAlignByDevice(t?.tablet??t?.desktop,"-tablet"),...getCSSAlignByDevice(t?.mobile??t?.tablet??t?.desktop,"-mobile")}),getContainerStyles=t=>{let{position:e,display:l,width:o}=t;return{margin:"0 auto",...core.makeStyleResponsive("w",o),...getCSSAlign(e),...displayConditionStyle(l,e),"z-index":_const.ELEMENT_Z_INDEX.STICKY}},getContentStyles=t=>{let{style:e,background:l}=t;return{...core.makeStyle({m:"0 auto"}),...getStylePadding(e),...filterStyles(e),...core.getStyleBackgroundByDevice(l),...core.getGradientBgrStyleByDevice(l)}},getStylePadding=t=>{let e=["--pt","--pb","--pr","--pl","--pt-mobile","--pb-mobile","--pr-mobile","--pl-mobile","--pt-tablet","--pb-tablet","--pr-tablet","--pl-tablet"],l={};return e.forEach(e=>{t?.[e]&&(l[e]=t[e])}),l},filterStyles=t=>{let e={...t},l=["--pt","--pb","--pr","--pl","--pt-mobile","--pb-mobile","--pr-mobile","--pl-mobile","--pt-tablet","--pb-tablet","--pr-tablet","--pl-tablet"];return l.forEach(t=>{delete e?.[t]}),e};exports.displayConditionStyle=displayConditionStyle,exports.filterStyles=filterStyles,exports.getContainerStyles=getContainerStyles,exports.getContentStyles=getContentStyles,exports.getDisplayStyle=getDisplayStyle,exports.getStylePadding=getStylePadding;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),Head=require("next/head"),ChildrenDroppable=require("../../grid/components/ChildrenDroppable.js");require("react");var _const=require("../../common/const.js"),useSticky=require("../hooks/useSticky.js"),system=require("@gem-sdk/system"),styles=require("../common/styles.js"),classes=require("../common/classes.js");const Sticky=({children:e,builderAttrs:s,setting:r,style:t,builderProps:i,advanced:a})=>{let l=core.useEditorMode(),{background:n,preloadBgImage:c,width:m,isScrollToTop:d}=r??{},{positionStyle:u,displayStyle:o,makeDisplaySettingStyles:j,getCSSAlign:x}=useSticky.default(r),
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),Head=require("next/head"),ChildrenDroppable=require("../../grid/components/ChildrenDroppable.js");require("react");var _const=require("../../common/const.js"),useSticky=require("../hooks/useSticky.js"),system=require("@gem-sdk/system"),styles=require("../common/styles.js"),classes=require("../common/classes.js");const Sticky=({children:e,builderAttrs:s,setting:r,style:t,builderProps:i,advanced:a})=>{let l=core.useEditorMode(),{background:n,preloadBgImage:c,width:m,isScrollToTop:d}=r??{},{positionStyle:u,displayStyle:o,makeDisplaySettingStyles:j,getCSSAlign:x,w:y}=useSticky.default(r),g=system.createStyle({margin:"0 auto",...o,...x,...u,zIndex:_const.ELEMENT_Z_INDEX.STICKY,..."edit"!==l&&j}),p=system.createStyle(styles.getContentStyles({width:m,style:t,background:n})),h=system.createClass(classes.getContainerClasses({uid:i?.uid,isScrollToTop:d,cssClass:a?.cssClass,isLiquid:!1}));return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!!c&&jsxRuntime.jsxs(Head,{children:[!!n?.desktop?.image?.src&&jsxRuntime.jsx("link",{rel:"preload",href:n.desktop.image.src,as:"image"}),!!n?.tablet?.image?.src&&jsxRuntime.jsx("link",{rel:"preload",href:n.tablet.image.src,as:"image"}),!!n?.mobile?.image?.src&&jsxRuntime.jsx("link",{rel:"preload",href:n.mobile.image.src,as:"image"})]}),jsxRuntime.jsx("div",{className:h,id:i?.uid,style:{...y,...g},children:jsxRuntime.jsx("div",{...s,"data-id":i?.uid,style:p,children:core.isEmptyChildren(e)?jsxRuntime.jsx(ChildrenDroppable.default,{}):e})})]})};exports.default=Sticky;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let SettingUIV2=[{label:{en:"Item management"},controls:[{label:{en:"Order"},setting:{id:"childItem"}}]},{label:{en:"Item spacing"},controls:[{label:{en:"Gap"},setting:{id:"itemSpacing"}}]},{label:{en:"Item style"},controls:[{setting:{id:"itemWidthType"},label:{en:"Max width"}},{label:{en:"Custom width"},setting:{id:"itemMaxWidth"},conditionDisplay:'itemWidthType == "CUSTOM"'}],moreSettings:{type:"collapse",controls:[{label:{en:"Background"},setting:{id:"itemBackgroundColor"}},{label:{en:"Border"},setting:{id:"itemBorderStyle"}},{label:{en:"Corner"},setting:{id:"itemCorner"}},{label:{en:"Shadow"},setting:{id:"itemShadow"}}]}},{controls:[{label:{en:"Separator"},setting:{id:"isShowIconSeparator"},options:{labelVariant:"primary",toggleStyle:"switch"}},{setting:{id:"iconSeparatorSvg"},conditionDisplay:"isShowIconSeparator == true",label:{en:"Icon"}},{label:{en:"Icon size"},setting:{id:"iconSeparatorSize"},conditionDisplay:"isShowIconSeparator == true"},{label:{en:"Icon color"},setting:{id:"iconSeparatorColor"},conditionDisplay:"isShowIconSeparator == true"}]},{label:{en:"Marquee effect"},controls:[{label:{en:"Direction"},setting:{id:"direction"}},{label:{en:"Stop on hover"},setting:{id:"stopOnHover"}},{label:{en:"Speed"},setting:{id:"speed"}},{setting:{id:"isPreview"},layout:"vertical"}]},{label:{en:"Size"},controls:[{label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"sizeSetting",field:"width"}}},{label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",inputType:"number",units:["px"],linkWithSetting:{name:"sizeSetting",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Small",value:"32px",showValue:!0},{label:"Medium",value:"48px",showValue:!0},{label:"Large",value:"64px",showValue:!0}]}},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"spacing-setting",field:"padding"},compoDefaultValue:{desktop:{default:{padding:{type:"custom",top:"16px",bottom:"16px",left:"0px",right:"0px"}}}}}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColor"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"border",state:"normal"}},{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}}}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(sizeSetting.width) >= 100 && sizeSetting.width?.includes("%"))',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];export{SettingUIV2};
|
|
1
|
+
let SettingUIV2=[{label:{en:"Item management"},controls:[{label:{en:"Order"},setting:{id:"childItem"}}]},{label:{en:"Item spacing"},controls:[{label:{en:"Gap"},setting:{id:"itemSpacing"}}]},{label:{en:"Item style"},controls:[{setting:{id:"itemWidthType"},label:{en:"Max width"}},{label:{en:"Custom width"},setting:{id:"itemMaxWidth"},conditionDisplay:'itemWidthType == "CUSTOM"'}],moreSettings:{type:"collapse",controls:[{label:{en:"Background"},setting:{id:"itemBackgroundColor"}},{label:{en:"Border"},setting:{id:"itemBorderStyle"}},{label:{en:"Corner"},setting:{id:"itemCorner"}},{label:{en:"Shadow"},setting:{id:"itemShadow"},options:{updateFields:[{field:"enable",settingId:"hasItemShadow"}]},controlChangeTrigger:{settings:[{condition:"itemShadow.enable === true",source:["itemShadow","hasItemShadow"],action:{controlId:"hasItemShadow",groupType:"style",controlType:"style",newValue:!0}},{condition:"itemShadow.enable === false",source:["itemShadow","hasItemShadow"],action:{controlId:"hasItemShadow",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}}]}},{controls:[{label:{en:"Separator"},setting:{id:"isShowIconSeparator"},options:{labelVariant:"primary",toggleStyle:"switch"}},{setting:{id:"iconSeparatorSvg"},conditionDisplay:"isShowIconSeparator == true",label:{en:"Icon"}},{label:{en:"Icon size"},setting:{id:"iconSeparatorSize"},conditionDisplay:"isShowIconSeparator == true"},{label:{en:"Icon color"},setting:{id:"iconSeparatorColor"},conditionDisplay:"isShowIconSeparator == true"}]},{label:{en:"Marquee effect"},controls:[{label:{en:"Direction"},setting:{id:"direction"}},{label:{en:"Stop on hover"},setting:{id:"stopOnHover"}},{label:{en:"Speed"},setting:{id:"speed"}},{setting:{id:"isPreview"},layout:"vertical"}]},{label:{en:"Size"},controls:[{label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,linkWithSetting:{name:"sizeSetting",field:"width"}}},{label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",inputType:"number",units:["px"],linkWithSetting:{name:"sizeSetting",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Small",value:"32px",showValue:!0},{label:"Medium",value:"48px",showValue:!0},{label:"Large",value:"64px",showValue:!0}]}},{label:{en:"Padding"},controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"spacing-setting",field:"padding"},compoDefaultValue:{desktop:{default:{padding:{type:"custom",top:"16px",bottom:"16px",left:"0px",right:"0px"}}}}}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColor"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"border",state:"normal"}},{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}}}]},{controls:[{label:{en:"Align"},conditionEnable:'!(parseInt(sizeSetting.width) >= 100 && sizeSetting.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};
|
|
@@ -8,6 +8,6 @@ let Settings=[{id:"setting",controls:[{id:"textContent",type:"textarea",default:
|
|
|
8
8
|
`},{label:"Right",value:"end",icon:`<svg width="42" height="28" viewBox="0 0 42 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
9
9
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M18.8628 17C18.8628 18.0355 19.7023 18.875 20.7378 18.875L28.2378 18.875C28.457 18.875 28.6673 18.8374 28.8628 18.7683L28.8628 22.375C28.8628 22.7202 29.1426 23 29.4878 23C29.833 23 30.1128 22.7202 30.1128 22.375L30.1128 6.12408C30.1128 5.77891 29.833 5.49908 29.4878 5.49908C29.1426 5.49908 28.8628 5.77891 28.8628 6.12408L28.8628 9.7317C28.6673 9.6626 28.457 9.625 28.2378 9.625L20.7378 9.625C19.7023 9.625 18.8628 10.4645 18.8628 11.5L18.8628 17ZM20.7378 17.625C20.3926 17.625 20.1128 17.3452 20.1128 17L20.1128 11.5C20.1128 11.1548 20.3926 10.875 20.7378 10.875L28.2378 10.875C28.583 10.875 28.8628 11.1548 28.8628 11.5L28.8628 17C28.8628 17.3452 28.583 17.625 28.2378 17.625L20.7378 17.625Z" fill="currentColor"/>
|
|
10
10
|
</svg>
|
|
11
|
-
`,type:"align-v"}]},{id:"positionVertical",type:"layout-segment",iconViewBox:"0 0 66 48",enableItemBackground:!0,enableTooltip:!0,label:"Position",default:"center",options:[{label:"
|
|
11
|
+
`,type:"align-v"}]},{id:"positionVertical",type:"layout-segment",iconViewBox:"0 0 66 48",enableItemBackground:!0,enableTooltip:!0,label:"Position",default:"center",options:[{label:"Center",value:"center",type:"file-upload-position-vertical"},{label:"Left",value:"start",type:"file-upload-position-vertical"}]},{id:"positionHorizontal",type:"layout-segment",iconViewBox:"0 0 66 48",enableItemBackground:!0,enableTooltip:!0,label:"Position",default:"center",options:[{label:"Align center",value:"center",type:"file-upload-position-horizontal"},{label:"Align start",value:"start",type:"file-upload-position-horizontal"}]},{id:"optionSetting",type:"group",controls:[{id:"isRequired",label:"Required",type:"toggle",default:!0},{id:"isShowPreviewImage",label:"Click image to preview",type:"toggle",default:!0},{id:"numberOfFiles",type:"segment",label:"Number of files",default:"multiple",options:[{label:"Single",value:"single"},{label:"Multiple",value:"multiple"}]}]},{id:"iconGroup",type:"group",label:"Icon",controls:[{id:"iconVisible",label:"Icon Visible",type:"toggle",default:!0},{id:"iconSvg",label:"SVG Icon",type:"icon",hideLabel:!0,default:`<svg height="20px" width="20px" data-name="upload-simple-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817710018527592">
|
|
12
12
|
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0ZM93.66,77.66,120,51.31V144a8,8,0,0,0,16,0V51.31l26.34,26.35a8,8,0,0,0,11.32-11.32l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,93.66,77.66Z"></path></svg>
|
|
13
13
|
`},{id:"iconSize",type:"input:stepper",label:"Icon Width",devices:{desktop:{default:20},tablet:{default:20},mobile:{default:20}},min:0},{id:"iconAlignVertical",label:"Icon Alignment",type:"segment",options:[{label:"Above",value:"above"},{label:"Below",value:"below"}],default:"above"},{id:"iconAlignHorizontal",label:"Icon Alignment",type:"segment",options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],default:"left"}]},{id:"contentWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"}},displayOptions:[{label:"Full",value:"100%",showValue:!0}]},{id:"paddingSize",type:"size-setting",devices:{desktop:{default:{padding:{type:"large",top:"12px",bottom:"12px",left:"32px",right:"32px"}}}},hiddenSettings:["shape","gap","width","height"],hiddenShowMore:!0},{id:"size",type:"size-setting",devices:{desktop:{default:{width:"100%",height:"Auto",padding:{type:"large",top:"12px",bottom:"12px",left:"32px",right:"32px"}}}},settingConfig:{width:{displayOptions:["full","auto","small","large","medium"]},height:{displayOptions:["auto","small","large","medium"]}},hiddenShowMore:!0,hiddenSettings:["shape","gap","padding"]}]},{id:"style",controls:[{id:"behavior-state",type:"behavior-state",controls:[{id:"backgroundColor",type:"color-picker-v2",label:"Background Color",default:{normal:"#FFFFFF",hover:"#DDDDDD"},compoDefaultValue:{hover:"#DDDDDD"},state:{hover:!0,normal:!0}},{id:"textColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},compoDefaultValue:{hover:"text-2"},state:{hover:!0,normal:!0}},{id:"borderBtn",type:"border",label:"Border Style",default:{normal:{border:"dashed",isCustom:!0,position:"all",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#7D7D7D"}},state:{hover:!0,normal:!0}},{id:"hasBoxShadowBtn",type:"toggle",label:"Enable Button Shadow",default:{normal:!0,hover:!0},state:{normal:!0,hover:!0}},{id:"boxShadowBtn",type:"shadow-v2",label:"Shadow Style",hideOnState:{normal:!0,hover:!0},state:{normal:!0,hover:!0},compoDefaultValue:{normal:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45}}},{id:"roundedBtn",type:"radius-preset",label:"Border Radius",default:{normal:{btrr:"8px",bblr:"8px",bbrr:"8px",btlr:"8px",radiusType:"rounded"}},state:{hover:!0,normal:!0}}]},{id:"typo",type:"typography-v2",default:{type:"paragraph-1",attrs:{color:"text-2"}},ignoreReRender:!0},{id:"spacing",label:"Spacing Icon",type:"input:slider",min:0,max:40,step:1,units:["px","em","rem","%","vh"],devices:{desktop:{default:"8px"}}},{id:"textAlign",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left"},{label:"Center",value:"center",type:"text",tooltip:"Align center"},{label:"Right",value:"right",type:"text",tooltip:"Align right"},{label:"Justify",value:"justify",type:"text",tooltip:"Align justify"}],devices:{desktop:{default:"left"}}},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left"},{label:"Center",value:"center",type:"align",tooltip:"Align center"},{label:"Right",value:"right",type:"align",tooltip:"Align right"}],devices:{desktop:{default:"left"}}}]}];export{Settings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyleResponsive as t,makeStyle as e,getStyleBackgroundByDevice as l,getGradientBgrStyleByDevice as i}from"@gem-sdk/core";import"react/jsx-runtime";import"react";import{ELEMENT_Z_INDEX as o}from"../../common/const.js";let getCSSPosition=t=>"top"==t?"sticky":"fixed",getDisplayStyle=(t,e,l)=>{let i={[`--top${t}`]:"auto",[`--${l+t}`]:"0",[`--pos${t}`]:getCSSPosition(l)};return"after-first-cart-button"===e&&(i[`--d${t}`]="none"),i},displayConditionStyle=(t,e)=>({...getDisplayStyle("",t?.desktop,e?.desktop),...getDisplayStyle("-tablet",t?.tablet??t?.desktop,e?.tablet??e?.desktop),...getDisplayStyle("-mobile",t?.mobile??t?.tablet??t?.desktop,e?.mobile??e?.tablet??e?.desktop)}),getCSSAlignByDevice=(t,e)=>({[`--left${e}`]:"top"==t?"0":"50%",[`--t${e}`]:"top"==t?"unset":"translateX(-50%)"}),getCSSAlign=t=>({...getCSSAlignByDevice(t?.desktop,""),...getCSSAlignByDevice(t?.tablet??t?.desktop,"-tablet"),...getCSSAlignByDevice(t?.mobile??t?.tablet??t?.desktop,"-mobile")}),getContainerStyles=e=>{let{position:l,display:i,width:p}=e;return{margin:"0 auto",...t("w",p),...getCSSAlign(l),...displayConditionStyle(i,l),"z-index":o.STICKY}},getContentStyles=
|
|
1
|
+
import{makeStyleResponsive as t,makeStyle as e,getStyleBackgroundByDevice as l,getGradientBgrStyleByDevice as i}from"@gem-sdk/core";import"react/jsx-runtime";import"react";import{ELEMENT_Z_INDEX as o}from"../../common/const.js";let getCSSPosition=t=>"top"==t?"sticky":"fixed",getDisplayStyle=(t,e,l)=>{let i={[`--top${t}`]:"auto",[`--${l+t}`]:"0",[`--pos${t}`]:getCSSPosition(l)};return"after-first-cart-button"===e&&(i[`--d${t}`]="none"),i},displayConditionStyle=(t,e)=>({...getDisplayStyle("",t?.desktop,e?.desktop),...getDisplayStyle("-tablet",t?.tablet??t?.desktop,e?.tablet??e?.desktop),...getDisplayStyle("-mobile",t?.mobile??t?.tablet??t?.desktop,e?.mobile??e?.tablet??e?.desktop)}),getCSSAlignByDevice=(t,e)=>({[`--left${e}`]:"top"==t?"0":"50%",[`--t${e}`]:"top"==t?"unset":"translateX(-50%)"}),getCSSAlign=t=>({...getCSSAlignByDevice(t?.desktop,""),...getCSSAlignByDevice(t?.tablet??t?.desktop,"-tablet"),...getCSSAlignByDevice(t?.mobile??t?.tablet??t?.desktop,"-mobile")}),getContainerStyles=e=>{let{position:l,display:i,width:p}=e;return{margin:"0 auto",...t("w",p),...getCSSAlign(l),...displayConditionStyle(i,l),"z-index":o.STICKY}},getContentStyles=t=>{let{style:o,background:p}=t;return{...e({m:"0 auto"}),...getStylePadding(o),...filterStyles(o),...l(p),...i(p)}},getStylePadding=t=>{let e=["--pt","--pb","--pr","--pl","--pt-mobile","--pb-mobile","--pr-mobile","--pl-mobile","--pt-tablet","--pb-tablet","--pr-tablet","--pl-tablet"],l={};return e.forEach(e=>{t?.[e]&&(l[e]=t[e])}),l},filterStyles=t=>{let e={...t},l=["--pt","--pb","--pr","--pl","--pt-mobile","--pb-mobile","--pr-mobile","--pl-mobile","--pt-tablet","--pb-tablet","--pr-tablet","--pl-tablet"];return l.forEach(t=>{delete e?.[t]}),e};export{displayConditionStyle,filterStyles,getContainerStyles,getContentStyles,getDisplayStyle,getStylePadding};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,Fragment as r,jsx as i}from"react/jsx-runtime";import{useEditorMode as s,isEmptyChildren as m}from"@gem-sdk/core";import o from"next/head";import t from"../../grid/components/ChildrenDroppable.js";import"react";import{ELEMENT_Z_INDEX as a}from"../../common/const.js";import l from"../hooks/useSticky.js";import{createStyle as d,createClass as c}from"@gem-sdk/system";import{getContentStyles as n}from"../common/styles.js";import{getContainerClasses as p}from"../common/classes.js";let Sticky=({children:f,builderAttrs:g,setting:k,style:h,builderProps:u,advanced:y})=>{let j=s(),{background:b,preloadBgImage:x,width:C,isScrollToTop:S}=k??{},{positionStyle:v,displayStyle:I,makeDisplaySettingStyles:q,getCSSAlign:z}=l(k),
|
|
2
|
+
import{jsxs as e,Fragment as r,jsx as i}from"react/jsx-runtime";import{useEditorMode as s,isEmptyChildren as m}from"@gem-sdk/core";import o from"next/head";import t from"../../grid/components/ChildrenDroppable.js";import"react";import{ELEMENT_Z_INDEX as a}from"../../common/const.js";import l from"../hooks/useSticky.js";import{createStyle as d,createClass as c}from"@gem-sdk/system";import{getContentStyles as n}from"../common/styles.js";import{getContainerClasses as p}from"../common/classes.js";let Sticky=({children:f,builderAttrs:g,setting:k,style:h,builderProps:u,advanced:y})=>{let j=s(),{background:b,preloadBgImage:x,width:C,isScrollToTop:S}=k??{},{positionStyle:v,displayStyle:I,makeDisplaySettingStyles:q,getCSSAlign:z,w:D}=l(k),K=d({margin:"0 auto",...I,...z,...v,zIndex:a.STICKY,..."edit"!==j&&q}),L=d(n({width:C,style:h,background:b})),N=c(p({uid:u?.uid,isScrollToTop:S,cssClass:y?.cssClass,isLiquid:!1}));return e(r,{children:[!!x&&e(o,{children:[!!b?.desktop?.image?.src&&i("link",{rel:"preload",href:b.desktop.image.src,as:"image"}),!!b?.tablet?.image?.src&&i("link",{rel:"preload",href:b.tablet.image.src,as:"image"}),!!b?.mobile?.image?.src&&i("link",{rel:"preload",href:b.mobile.image.src,as:"image"})]}),i("div",{className:N,id:u?.uid,style:{...D,...K},children:i("div",{...g,"data-id":u?.uid,style:L,children:m(f)?i(t,{}):f})})]})};export{Sticky as default};
|