@gem-sdk/components 2.0.0-staging.778 → 2.0.0-staging.780
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/collection/components/collection-description/common/classes.js +1 -1
- package/dist/cjs/grid/settings/Section.js +1 -1
- package/dist/cjs/product/settings/product-variant/configs/settings.js +1 -1
- package/dist/cjs/sticky/common/classes.js +1 -1
- package/dist/cjs/sticky/components/Sticky.js +1 -1
- package/dist/cjs/sticky/hooks/useSticky.js +1 -1
- package/dist/esm/collection/components/collection-description/common/classes.js +1 -1
- package/dist/esm/grid/settings/Section.js +1 -1
- package/dist/esm/product/settings/product-variant/configs/settings.js +1 -1
- package/dist/esm/sticky/common/classes.js +1 -1
- package/dist/esm/sticky/components/Sticky.js +1 -1
- package/dist/esm/sticky/hooks/useSticky.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");const getClassContainerCollectionDes=({setting:e})=>{let s=core.composeTypographyClassName(e?.typo,e?.typography);return composeClasses(core.cls("gp-relative p-description-wrapper gp-p-description-text gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre",s,core.getGlobalColorClass("text",e?.color),"data-[browser=safari]:after:gp-content-[' '] data-[browser=safari]:after:gp-absolute data-[browser=safari]:after:gp-left-0 data-[browser=safari]:after:gp-right-0 data-[browser=safari]:after:gp-bottom-0 data-[browser=safari]:after:gp-w-full data-[browser=safari]:after:gp-h-1/2 data-[browser=safari]:after:gp-bg-gradient-to-t data-[browser=safari]:after:gp-from-white"))},getClassButtonViewMore=({setting:e})=>{let s=core.composeTypographyClassName(e?.typo,e?.typography);return composeClasses(core.cls("p-description-show-more","gp-mt-4 hover:gp-opacity-80 gp-transition-all gp-w-full",s,core.getGlobalColorClass("text",e?.showMoreColor)))},getDescriptionClasses=({advanced:e})=>composeClasses(core.cls("gp-collection-description",e?.cssClass)),getShowMoreIconClasses=()=>composeClasses(core.cls("gp-show-more-icon gp-ml-1 gp-flex gp-items-center")),getShowMoreTextClasses=()=>composeClasses(core.cls("gp-show-more-text")),getClassPreBuilt=()=>composeClasses(core.cls("gp-rotate-180 gp-hidden")),composeClasses=e=>e.trim().split(/\s+/).reduce((e,s)=>(e[s]=!0,e),{});exports.getClassButtonViewMore=getClassButtonViewMore,exports.getClassContainerCollectionDes=getClassContainerCollectionDes,exports.getClassPreBuilt=getClassPreBuilt,exports.getDescriptionClasses=getDescriptionClasses,exports.getShowMoreIconClasses=getShowMoreIconClasses,exports.getShowMoreTextClasses=getShowMoreTextClasses;
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");const getClassContainerCollectionDes=({setting:e})=>{let s=core.composeTypographyClassName(e?.typo,e?.typography);return composeClasses(core.cls("gp-relative p-description-wrapper gp-p-description-text gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre",s,core.getGlobalColorClass("text",e?.color),"data-[browser=safari]:after:gp-content-[' '] data-[browser=safari]:after:gp-absolute data-[browser=safari]:after:gp-left-0 data-[browser=safari]:after:gp-right-0 data-[browser=safari]:after:gp-bottom-0 data-[browser=safari]:after:gp-w-full data-[browser=safari]:after:gp-h-1/2 data-[browser=safari]:after:gp-bg-gradient-to-t data-[browser=safari]:after:gp-from-white"))},getClassButtonViewMore=({setting:e})=>{let s=core.composeTypographyClassName(e?.typo,e?.typography);return composeClasses(core.cls("p-description-show-more","gp-mt-4 hover:gp-opacity-80 gp-transition-all gp-w-full gp-items-center",s,core.getGlobalColorClass("text",e?.showMoreColor)))},getDescriptionClasses=({advanced:e})=>composeClasses(core.cls("gp-collection-description",e?.cssClass)),getShowMoreIconClasses=()=>composeClasses(core.cls("gp-show-more-icon gp-ml-1 gp-flex gp-items-center")),getShowMoreTextClasses=()=>composeClasses(core.cls("gp-show-more-text")),getClassPreBuilt=()=>composeClasses(core.cls("gp-rotate-180 gp-hidden")),composeClasses=e=>e.trim().split(/\s+/).reduce((e,s)=>(e[s]=!0,e),{});exports.getClassButtonViewMore=getClassButtonViewMore,exports.getClassContainerCollectionDes=getClassContainerCollectionDes,exports.getClassPreBuilt=getClassPreBuilt,exports.getDescriptionClasses=getDescriptionClasses,exports.getShowMoreIconClasses=getShowMoreIconClasses,exports.getShowMoreTextClasses=getShowMoreTextClasses;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Row=require("./Row.js"),settings=require("./configs/section/settings.js"),uiV1=require("./configs/section/ui-v1.js"),uiV2=require("./configs/section/ui-v2.js");const config={...Row.default,tag:"Section",label:"Section",settings:settings.SectionSettings,ui:uiV1.SettingUIV1,uiV2:uiV2.SettingUIV2,init:[{tag:"Section",settings:{layout:{desktop:{cols:[12],display:"fill"}}},styles:{enablePagePadding:{desktop:!1,tablet:!1,mobile:!1}},advanced:{blockPadding:"base","spacing-setting":{desktop:{padding:{top:"var(--g-s-2xl)",bottom:"var(--g-s-2xl)"}}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Row=require("./Row.js"),settings=require("./configs/section/settings.js"),uiV1=require("./configs/section/ui-v1.js"),uiV2=require("./configs/section/ui-v2.js");const config={...Row.default,tag:"Section",label:"Section",settings:settings.SectionSettings,ui:uiV1.SettingUIV1,uiV2:uiV2.SettingUIV2,init:[{tag:"Section",settings:{layout:{desktop:{cols:[12],display:"fill"}}},styles:{enablePagePadding:{desktop:!1,tablet:!1,mobile:!1}},advanced:{blockPadding:"base","spacing-setting":{desktop:{padding:{top:"var(--g-s-2xl)",bottom:"var(--g-s-2xl)"}}}},childrens:[{tag:"Col",childrens:[]}]}],advanced:{blockPadding:"base","spacing-setting":{desktop:{padding:{top:"30px",bottom:"30px"}},mobile:{padding:{top:"20px",bottom:"20px"}}}},editorConfigs:{sideBar:{hide:!0},toolbar:{parent:!0}}};exports.default=config;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var rectangleList=require("../swatches-style-config/rectangle-list.js"),color=require("../swatches-style-config/color.js"),image=require("../swatches-style-config/image.js"),imageShopify=require("../swatches-style-config/image-shopify.js"),dropdown=require("../swatches-style-config/dropdown.js");const ProductVariantSettings=[{id:"setting",controls:[{id:"variantsOption",type:"group",label:"Variants Options",controls:[{id:"optionType",label:"Option Label",type:"select",default:"singleOption",options:[{label:"Separated",value:"singleOption"},{label:"Combine",value:"groupOption"}]},{id:"label",label:"Option Label",type:"toggle",default:!0},{id:"optionAlign",label:"Alignment",type:"segment",devices:{desktop:{default:"left"}},options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}]},{id:"price",label:"Option Price",type:"option:value",hide:!0,default:!0,options:[{value:!0,label:"Yes"},{value:!1,label:"No"}]},{id:"showAsSwatches",label:"Use Option Swatches",type:"swatchesLink",hide:!0,default:!0,hyperlinkInfo:{beforeText:"Go to ",hyperlinkText:"Manage Swatches",afterText:" to configure options display as swatches",modal:"manage_swatches"}},{id:"combineFullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"combineWidth",type:"input:unit",label:"Width",placeholder:"Auto",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"combineHeight",type:"input:unit",label:"Height",placeholder:"Auto",min:0,units:["px"],default:"45px"},{id:"variantPresets",label:"Use Option Swatches",type:"variant:presets",default:[{optionName:"base",optionType:"rectangle_list",presets:{...color.colorPresetConfig,...rectangleList.rectangleListPresetConfig,...image.imagePresetConfig,...imageShopify.imageShopifyPresetConfig,...dropdown.dropdownPresetConfig}}],hyperlinkInfo:{modal:"manage_swatches"}},{id:"soldOutStyle",type:"select",default:"line",options:[{label:"None",value:"none"},{label:"Unclickable",value:"disable"},{label:"Cross-out",value:"line",icon:"
|
|
1
|
+
"use strict";var rectangleList=require("../swatches-style-config/rectangle-list.js"),color=require("../swatches-style-config/color.js"),image=require("../swatches-style-config/image.js"),imageShopify=require("../swatches-style-config/image-shopify.js"),dropdown=require("../swatches-style-config/dropdown.js");const ProductVariantSettings=[{id:"setting",controls:[{id:"variantsOption",type:"group",label:"Variants Options",controls:[{id:"optionType",label:"Option Label",type:"select",default:"singleOption",options:[{label:"Separated",value:"singleOption"},{label:"Combine",value:"groupOption"}]},{id:"label",label:"Option Label",type:"toggle",default:!0},{id:"optionAlign",label:"Alignment",type:"segment",devices:{desktop:{default:"left"}},options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}]},{id:"price",label:"Option Price",type:"option:value",hide:!0,default:!0,options:[{value:!0,label:"Yes"},{value:!1,label:"No"}]},{id:"showAsSwatches",label:"Use Option Swatches",type:"swatchesLink",hide:!0,default:!0,hyperlinkInfo:{beforeText:"Go to ",hyperlinkText:"Manage Swatches",afterText:" to configure options display as swatches",modal:"manage_swatches"}},{id:"combineFullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"combineWidth",type:"input:unit",label:"Width",placeholder:"Auto",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"combineHeight",type:"input:unit",label:"Height",placeholder:"Auto",min:0,units:["px"],default:"45px"},{id:"variantPresets",label:"Use Option Swatches",type:"variant:presets",default:[{optionName:"base",optionType:"rectangle_list",presets:{...color.colorPresetConfig,...rectangleList.rectangleListPresetConfig,...image.imagePresetConfig,...imageShopify.imageShopifyPresetConfig,...dropdown.dropdownPresetConfig}}],hyperlinkInfo:{modal:"manage_swatches"}},{id:"soldOutStyle",type:"select",default:"line",options:[{label:"None",value:"none"},{label:"Unclickable",value:"disable"},{label:"Cross-out",value:"line",icon:"gp-cross-out-one-line"}]}]},{id:"options",type:"group",label:"Options",controls:[{id:"layout",label:"Layout",type:"option:illustration",iconViewBox:"0 0 66 45",enableItemBackground:!0,devices:{desktop:{default:"vertical"}},options:[{label:"Vertical",value:"vertical",type:"arrange",svgName:"gp-arrange-vertical"},{label:"Horizontal",value:"horizontal",type:"arrange",svgName:"gp-arrange-horizontal"}]},{id:"column",label:"Column",type:"select",devices:{desktop:{default:1}},options:[{label:"1 column",value:1},{label:"2 columns",value:2},{label:"3 columns",value:3},{label:"4 columns",value:4}]}]},{id:"variantDisplay",type:"group",label:"Variant Display",controls:[{id:"hasPreSelected",type:"toggle",label:"hasPreSelected",default:!0},{id:"selectVariantDefault",type:"select-variant",label:"Select Default Variant",hide:!0}]},{id:"blankText",label:"Blank Option Text",type:"input",hide:!0,default:"Please select an option"},{id:"hasOnlyDefaultVariant",label:"Blank Option Text",type:"variant:default",hide:!0,default:!1}]},{id:"style",controls:[{id:"dimension",type:"group",label:"Variants Dimension",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"width",type:"input:unit",label:"Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"optionSpacing",label:"Option Spacing",type:"input:unit",units:["px"],placeholder:"Auto",default:"30px"},{id:"labelGap",label:"Gap",type:"input:slider",units:["px"],ignoreMax:!0,max:40,default:"8px"}]},{id:"swatchDimension",type:"group",label:"Swatch Dimension",controls:[{id:"swatchAutoWidth",label:"Auto Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"swatchWidth",type:"input:unit",label:"Width",placeholder:"Auto Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"80px"}}},{id:"swatchHeight",type:"input:unit",label:"Height",placeholder:"Auto Height",min:0,units:["px"],devices:{desktop:{default:"45px"}}},{id:"swatchSpacing",label:"Swatch Spacing",type:"input:unit",units:["px"],placeholder:"Auto",default:"var(--g-s-m)"},{id:"marginBottom",label:"Margin Bottom",type:"input:slider",units:["px"],ignoreMax:!0,max:40,devices:{desktop:{default:"16px"},mobile:{default:"16px"}}}]},{id:"align",label:"Align",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"labelGroup",type:"group",label:"Label",controls:[{id:"labelTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2",attrs:{color:"text-1",bold:!0},custom:{fontFamily:"Assistant",letterSpacing:"0px"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"labelColor",type:"color-picker-v2",label:"Text Color",default:"text-2"}]},{id:"labelGroup",type:"group",label:"Option Value",controls:[{id:"optionTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2"},hiddenSetting:{textAlign:!0,textShadow:!0},ignoreReRender:!0}]},{id:"behavior-state",type:"behavior-state",label:"Option Value",controls:[{id:"optionBgColor",type:"color-picker-v2",label:"Background Color",default:{normal:"bg-3"},state:{active:!0,hover:!0,normal:!0}},{id:"optionTextColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},state:{active:!0,hover:!0,normal:!0}},{id:"optionBorder",type:"border",label:"Border",default:{normal:{borderType:"style-2",border:"solid",color:"line-2",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"},active:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"2px 2px 2px 2px",borderWidth:"2px"},hover:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"}},state:{active:!0,hover:!0,normal:!0}},{id:"optionRounded",type:"radius-preset",label:"Border Radius",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},active:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}},state:{active:!0,hover:!0,normal:!0}},{id:"optionHasShadow",type:"toggle",label:"Shadow Enable",default:{normal:!1,hover:!1,active:!1},state:{normal:!0,hover:!0,active:!0}},{id:"optionShadow",type:"shadow-v2",label:"Shadow",hideOnState:{normal:!0,hover:!0,active:!0},default:{normal:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1},hover:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1},active:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1}},state:{normal:!0,hover:!0,active:!0}}]},{id:"dropdownItemWidth",type:"segment",label:"Dropdown Width",devices:{desktop:{default:"fill"},mobile:{default:"fill"},tablet:{default:"fill"}},options:[{label:"Fill",value:"fill"},{label:"Fixed",value:"fixed"}]},{id:"fixedDropdownWidth",type:"input:unit",label:"Fixed Width",units:["px","%"],devices:{desktop:{default:"240px"},mobile:{default:"240px"},tablet:{default:"240px"}}},{id:"swatchItemWidth",type:"segment",label:"Swatch Width",devices:{desktop:{default:"auto"}},options:[{label:"Fill",value:"auto"},{label:"Fixed",value:"fixed"}]},{id:"fixedDropdownWidth",type:"input:unit",label:"Fixed Width",units:["px","%"],devices:{desktop:{default:"240px"}}}]}];exports.ProductVariantSettings=ProductVariantSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");const getContainerClasses=e=>{let{uid:s,isScrollToTop:t,cssClass:r,isLiquid:n}=e,o=t&&n?"!gp-pointer-events-none [&_gp-button_a]:!gp-pointer-events-auto":"";return core.composeClasses(`sticky-wrapper
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");const getContainerClasses=e=>{let{uid:s,isScrollToTop:t,cssClass:r,isLiquid:n}=e,o=t&&n?"!gp-pointer-events-none [&_gp-button_a]:!gp-pointer-events-auto":"";return core.composeClasses(`sticky-wrapper ${o} ${s} ${r}`)};exports.getContainerClasses=getContainerClasses;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),Head=require("next/head"),ChildrenDroppable=require("../../grid/components/ChildrenDroppable.js");require("react");var _const=require("../../common/const.js"),useSticky=require("../hooks/useSticky.js"),system=require("@gem-sdk/system"),styles=require("../common/styles.js"),classes=require("../common/classes.js");const Sticky=({children:e,builderAttrs:s,setting:t,style:r,builderProps:i,advanced:a})=>{let l=core.useEditorMode(),{background:n,preloadBgImage:c,width:d,isScrollToTop:m}=t??{},{positionStyle:u,displayStyle:o,makeDisplaySettingStyles:j}=useSticky.default(t),
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),Head=require("next/head"),ChildrenDroppable=require("../../grid/components/ChildrenDroppable.js");require("react");var _const=require("../../common/const.js"),useSticky=require("../hooks/useSticky.js"),system=require("@gem-sdk/system"),styles=require("../common/styles.js"),classes=require("../common/classes.js");const Sticky=({children:e,builderAttrs:s,setting:t,style:r,builderProps:i,advanced:a})=>{let l=core.useEditorMode(),{background:n,preloadBgImage:c,width:d,isScrollToTop:m}=t??{},{positionStyle:u,displayStyle:o,makeDisplaySettingStyles:j,getCSSAlign:x,w:y}=useSticky.default(t),g=system.createStyle({margin:"0 auto",...y,...o,...x,...styles.getStylePadding(r),...u,zIndex:_const.ELEMENT_Z_INDEX.STICKY,..."edit"!==l&&j}),p=system.createStyle(styles.getContentStyles({width:d,style:r,background:n})),h=system.createClass(classes.getContainerClasses({uid:i?.uid,isScrollToTop:m,cssClass:a?.cssClass,isLiquid:!1}));return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!!c&&jsxRuntime.jsxs(Head,{children:[!!n?.desktop?.image?.src&&jsxRuntime.jsx("link",{rel:"preload",href:n.desktop.image.src,as:"image"}),!!n?.tablet?.image?.src&&jsxRuntime.jsx("link",{rel:"preload",href:n.tablet.image.src,as:"image"}),!!n?.mobile?.image?.src&&jsxRuntime.jsx("link",{rel:"preload",href:n.mobile.image.src,as:"image"})]}),jsxRuntime.jsx("div",{className:h,id:i?.uid,style: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
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),React=require("react");const useSticky=e=>{let{width:t,position:o}=e??{},s=core.useStickyStore(e=>e.isStickyVisible),a=core.makeStyleResponsive("w",t),l=core.usePageStore(e=>"interaction"===e.sidebarMode),i=core.useCurrentDevice(),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),React=require("react");const useSticky=e=>{let{width:t,position:o}=e??{},s=core.useStickyStore(e=>e.isStickyVisible),a=core.makeStyleResponsive("w",t),l=core.usePageStore(e=>"interaction"===e.sidebarMode),i=core.useCurrentDevice(),b=(e,t)=>({[`--left${t}`]:"top"==e?"0":"50%",[`--t${t}`]:"top"==e?"unset":"translateX(-50%)"}),r=React.useMemo(()=>({...b(o?.desktop,""),...b(o?.tablet??o?.desktop,"-tablet"),...b(o?.mobile??o?.tablet,"-mobile")}),[o?.desktop,o?.mobile,o?.tablet]),p=React.useMemo(()=>{if(l&&o?.[i]==="top")return"40px"},[i,l,o]),c=React.useMemo(()=>({"--d":e?.display?.desktop!=="after-first-cart-button"||s?"block":"none","--d-tablet":e?.display?.tablet!=="after-first-cart-button"||s?"block":"none","--d-mobile":e?.display?.mobile!=="after-first-cart-button"||s?"block":"none"}),[s,e?.display?.desktop,e?.display?.mobile,e?.display?.tablet]),d=React.useMemo(()=>({"--top":p??"auto","--top-tablet":p??"auto","--top-mobile":p??"auto",[`--${o?.desktop}`]:p??"0px",[`--${o?.tablet??o?.desktop}-tablet`]:p??"0px",[`--${o?.mobile??o?.desktop}-mobile`]:p??"0px"}),[p,o?.desktop,o?.mobile,o?.tablet]),u=e=>"top"==e?"sticky":"fixed",k=React.useMemo(()=>({"--pos":u(o?.desktop),"--pos-tablet":u(o?.tablet??o?.desktop),"--pos-mobile":u(o?.mobile??o?.tablet)}),[o?.desktop,o?.mobile,o?.tablet]);return{w:a,displayStyle:d,positionStyle:k,getCSSAlign:r,makeDisplaySettingStyles:c}};exports.default=useSticky;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{composeTypographyClassName as e,cls as s,getGlobalColorClass as t}from"@gem-sdk/core";let getClassContainerCollectionDes=({setting:r})=>{let a=e(r?.typo,r?.typography);return composeClasses(s("gp-relative p-description-wrapper gp-p-description-text gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre",a,t("text",r?.color),"data-[browser=safari]:after:gp-content-[' '] data-[browser=safari]:after:gp-absolute data-[browser=safari]:after:gp-left-0 data-[browser=safari]:after:gp-right-0 data-[browser=safari]:after:gp-bottom-0 data-[browser=safari]:after:gp-w-full data-[browser=safari]:after:gp-h-1/2 data-[browser=safari]:after:gp-bg-gradient-to-t data-[browser=safari]:after:gp-from-white"))},getClassButtonViewMore=({setting:r})=>{let a=e(r?.typo,r?.typography);return composeClasses(s("p-description-show-more","gp-mt-4 hover:gp-opacity-80 gp-transition-all gp-w-full",a,t("text",r?.showMoreColor)))},getDescriptionClasses=({advanced:e})=>composeClasses(s("gp-collection-description",e?.cssClass)),getShowMoreIconClasses=()=>composeClasses(s("gp-show-more-icon gp-ml-1 gp-flex gp-items-center")),getShowMoreTextClasses=()=>composeClasses(s("gp-show-more-text")),getClassPreBuilt=()=>composeClasses(s("gp-rotate-180 gp-hidden")),composeClasses=e=>e.trim().split(/\s+/).reduce((e,s)=>(e[s]=!0,e),{});export{getClassButtonViewMore,getClassContainerCollectionDes,getClassPreBuilt,getDescriptionClasses,getShowMoreIconClasses,getShowMoreTextClasses};
|
|
1
|
+
import{composeTypographyClassName as e,cls as s,getGlobalColorClass as t}from"@gem-sdk/core";let getClassContainerCollectionDes=({setting:r})=>{let a=e(r?.typo,r?.typography);return composeClasses(s("gp-relative p-description-wrapper gp-p-description-text gp-break-words safari:[&_p]:gp-inline safari:[&_p]:after:gp-whitespace-pre",a,t("text",r?.color),"data-[browser=safari]:after:gp-content-[' '] data-[browser=safari]:after:gp-absolute data-[browser=safari]:after:gp-left-0 data-[browser=safari]:after:gp-right-0 data-[browser=safari]:after:gp-bottom-0 data-[browser=safari]:after:gp-w-full data-[browser=safari]:after:gp-h-1/2 data-[browser=safari]:after:gp-bg-gradient-to-t data-[browser=safari]:after:gp-from-white"))},getClassButtonViewMore=({setting:r})=>{let a=e(r?.typo,r?.typography);return composeClasses(s("p-description-show-more","gp-mt-4 hover:gp-opacity-80 gp-transition-all gp-w-full gp-items-center",a,t("text",r?.showMoreColor)))},getDescriptionClasses=({advanced:e})=>composeClasses(s("gp-collection-description",e?.cssClass)),getShowMoreIconClasses=()=>composeClasses(s("gp-show-more-icon gp-ml-1 gp-flex gp-items-center")),getShowMoreTextClasses=()=>composeClasses(s("gp-show-more-text")),getClassPreBuilt=()=>composeClasses(s("gp-rotate-180 gp-hidden")),composeClasses=e=>e.trim().split(/\s+/).reduce((e,s)=>(e[s]=!0,e),{});export{getClassButtonViewMore,getClassContainerCollectionDes,getClassPreBuilt,getDescriptionClasses,getShowMoreIconClasses,getShowMoreTextClasses};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"./Row.js";import{SectionSettings as o}from"./configs/section/settings.js";import{SettingUIV1 as i}from"./configs/section/ui-v1.js";import{SettingUIV2 as s}from"./configs/section/ui-v2.js";let config={...t,tag:"Section",label:"Section",settings:o,ui:i,uiV2:s,init:[{tag:"Section",settings:{layout:{desktop:{cols:[12],display:"fill"}}},styles:{enablePagePadding:{desktop:!1,tablet:!1,mobile:!1}},advanced:{blockPadding:"base","spacing-setting":{desktop:{padding:{top:"var(--g-s-2xl)",bottom:"var(--g-s-2xl)"}}
|
|
1
|
+
import t from"./Row.js";import{SectionSettings as o}from"./configs/section/settings.js";import{SettingUIV1 as i}from"./configs/section/ui-v1.js";import{SettingUIV2 as s}from"./configs/section/ui-v2.js";let config={...t,tag:"Section",label:"Section",settings:o,ui:i,uiV2:s,init:[{tag:"Section",settings:{layout:{desktop:{cols:[12],display:"fill"}}},styles:{enablePagePadding:{desktop:!1,tablet:!1,mobile:!1}},advanced:{blockPadding:"base","spacing-setting":{desktop:{padding:{top:"var(--g-s-2xl)",bottom:"var(--g-s-2xl)"}}}},childrens:[{tag:"Col",childrens:[]}]}],advanced:{blockPadding:"base","spacing-setting":{desktop:{padding:{top:"30px",bottom:"30px"}},mobile:{padding:{top:"20px",bottom:"20px"}}}},editorConfigs:{sideBar:{hide:!0},toolbar:{parent:!0}}};export{config as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{rectangleListPresetConfig as e}from"../swatches-style-config/rectangle-list.js";import{colorPresetConfig as t}from"../swatches-style-config/color.js";import{imagePresetConfig as l}from"../swatches-style-config/image.js";import{imageShopifyPresetConfig as a}from"../swatches-style-config/image-shopify.js";import{dropdownPresetConfig as i}from"../swatches-style-config/dropdown.js";let ProductVariantSettings=[{id:"setting",controls:[{id:"variantsOption",type:"group",label:"Variants Options",controls:[{id:"optionType",label:"Option Label",type:"select",default:"singleOption",options:[{label:"Separated",value:"singleOption"},{label:"Combine",value:"groupOption"}]},{id:"label",label:"Option Label",type:"toggle",default:!0},{id:"optionAlign",label:"Alignment",type:"segment",devices:{desktop:{default:"left"}},options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}]},{id:"price",label:"Option Price",type:"option:value",hide:!0,default:!0,options:[{value:!0,label:"Yes"},{value:!1,label:"No"}]},{id:"showAsSwatches",label:"Use Option Swatches",type:"swatchesLink",hide:!0,default:!0,hyperlinkInfo:{beforeText:"Go to ",hyperlinkText:"Manage Swatches",afterText:" to configure options display as swatches",modal:"manage_swatches"}},{id:"combineFullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"combineWidth",type:"input:unit",label:"Width",placeholder:"Auto",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"combineHeight",type:"input:unit",label:"Height",placeholder:"Auto",min:0,units:["px"],default:"45px"},{id:"variantPresets",label:"Use Option Swatches",type:"variant:presets",default:[{optionName:"base",optionType:"rectangle_list",presets:{...t,...e,...l,...a,...i}}],hyperlinkInfo:{modal:"manage_swatches"}},{id:"soldOutStyle",type:"select",default:"line",options:[{label:"None",value:"none"},{label:"Unclickable",value:"disable"},{label:"Cross-out",value:"line",icon:"
|
|
1
|
+
import{rectangleListPresetConfig as e}from"../swatches-style-config/rectangle-list.js";import{colorPresetConfig as t}from"../swatches-style-config/color.js";import{imagePresetConfig as l}from"../swatches-style-config/image.js";import{imageShopifyPresetConfig as a}from"../swatches-style-config/image-shopify.js";import{dropdownPresetConfig as i}from"../swatches-style-config/dropdown.js";let ProductVariantSettings=[{id:"setting",controls:[{id:"variantsOption",type:"group",label:"Variants Options",controls:[{id:"optionType",label:"Option Label",type:"select",default:"singleOption",options:[{label:"Separated",value:"singleOption"},{label:"Combine",value:"groupOption"}]},{id:"label",label:"Option Label",type:"toggle",default:!0},{id:"optionAlign",label:"Alignment",type:"segment",devices:{desktop:{default:"left"}},options:[{label:"Left",value:"left",type:"align"},{label:"Center",value:"center",type:"align"},{label:"Right",value:"right",type:"align"}]},{id:"price",label:"Option Price",type:"option:value",hide:!0,default:!0,options:[{value:!0,label:"Yes"},{value:!1,label:"No"}]},{id:"showAsSwatches",label:"Use Option Swatches",type:"swatchesLink",hide:!0,default:!0,hyperlinkInfo:{beforeText:"Go to ",hyperlinkText:"Manage Swatches",afterText:" to configure options display as swatches",modal:"manage_swatches"}},{id:"combineFullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"combineWidth",type:"input:unit",label:"Width",placeholder:"Auto",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"combineHeight",type:"input:unit",label:"Height",placeholder:"Auto",min:0,units:["px"],default:"45px"},{id:"variantPresets",label:"Use Option Swatches",type:"variant:presets",default:[{optionName:"base",optionType:"rectangle_list",presets:{...t,...e,...l,...a,...i}}],hyperlinkInfo:{modal:"manage_swatches"}},{id:"soldOutStyle",type:"select",default:"line",options:[{label:"None",value:"none"},{label:"Unclickable",value:"disable"},{label:"Cross-out",value:"line",icon:"gp-cross-out-one-line"}]}]},{id:"options",type:"group",label:"Options",controls:[{id:"layout",label:"Layout",type:"option:illustration",iconViewBox:"0 0 66 45",enableItemBackground:!0,devices:{desktop:{default:"vertical"}},options:[{label:"Vertical",value:"vertical",type:"arrange",svgName:"gp-arrange-vertical"},{label:"Horizontal",value:"horizontal",type:"arrange",svgName:"gp-arrange-horizontal"}]},{id:"column",label:"Column",type:"select",devices:{desktop:{default:1}},options:[{label:"1 column",value:1},{label:"2 columns",value:2},{label:"3 columns",value:3},{label:"4 columns",value:4}]}]},{id:"variantDisplay",type:"group",label:"Variant Display",controls:[{id:"hasPreSelected",type:"toggle",label:"hasPreSelected",default:!0},{id:"selectVariantDefault",type:"select-variant",label:"Select Default Variant",hide:!0}]},{id:"blankText",label:"Blank Option Text",type:"input",hide:!0,default:"Please select an option"},{id:"hasOnlyDefaultVariant",label:"Blank Option Text",type:"variant:default",hide:!0,default:!1}]},{id:"style",controls:[{id:"dimension",type:"group",label:"Variants Dimension",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"width",type:"input:unit",label:"Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"100%"}}},{id:"optionSpacing",label:"Option Spacing",type:"input:unit",units:["px"],placeholder:"Auto",default:"30px"},{id:"labelGap",label:"Gap",type:"input:slider",units:["px"],ignoreMax:!0,max:40,default:"8px"}]},{id:"swatchDimension",type:"group",label:"Swatch Dimension",controls:[{id:"swatchAutoWidth",label:"Auto Width",type:"toggle",devices:{desktop:{default:!0}}},{id:"swatchWidth",type:"input:unit",label:"Width",placeholder:"Auto Width",min:0,units:["px","%"],hide:!0,devices:{desktop:{default:"80px"}}},{id:"swatchHeight",type:"input:unit",label:"Height",placeholder:"Auto Height",min:0,units:["px"],devices:{desktop:{default:"45px"}}},{id:"swatchSpacing",label:"Swatch Spacing",type:"input:unit",units:["px"],placeholder:"Auto",default:"var(--g-s-m)"},{id:"marginBottom",label:"Margin Bottom",type:"input:slider",units:["px"],ignoreMax:!0,max:40,devices:{desktop:{default:"16px"},mobile:{default:"16px"}}}]},{id:"align",label:"Align",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}},{id:"labelGroup",type:"group",label:"Label",controls:[{id:"labelTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2",attrs:{color:"text-1",bold:!0},custom:{fontFamily:"Assistant",letterSpacing:"0px"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"labelColor",type:"color-picker-v2",label:"Text Color",default:"text-2"}]},{id:"labelGroup",type:"group",label:"Option Value",controls:[{id:"optionTypo",type:"typography-v2",label:"Typography",default:{type:"paragraph-2"},hiddenSetting:{textAlign:!0,textShadow:!0},ignoreReRender:!0}]},{id:"behavior-state",type:"behavior-state",label:"Option Value",controls:[{id:"optionBgColor",type:"color-picker-v2",label:"Background Color",default:{normal:"bg-3"},state:{active:!0,hover:!0,normal:!0}},{id:"optionTextColor",type:"color-picker-v2",label:"Text Color",default:{normal:"text-2"},state:{active:!0,hover:!0,normal:!0}},{id:"optionBorder",type:"border",label:"Border",default:{normal:{borderType:"style-2",border:"solid",color:"line-2",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"},active:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"2px 2px 2px 2px",borderWidth:"2px"},hover:{borderType:"style-3",border:"solid",color:"line-3",isCustom:!1,width:"1px 1px 1px 1px",borderWidth:"1px"}},state:{active:!0,hover:!0,normal:!0}},{id:"optionRounded",type:"radius-preset",label:"Border Radius",default:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},hover:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"},active:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}},state:{active:!0,hover:!0,normal:!0}},{id:"optionHasShadow",type:"toggle",label:"Shadow Enable",default:{normal:!1,hover:!1,active:!1},state:{normal:!0,hover:!0,active:!0}},{id:"optionShadow",type:"shadow-v2",label:"Shadow",hideOnState:{normal:!0,hover:!0,active:!0},default:{normal:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1},hover:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1},active:{type:"shadow-1",distance:"4px",blur:"12px",spread:"0px",color:"rgba(0, 0, 0, 0.20)",angle:90,enable:!1}},state:{normal:!0,hover:!0,active:!0}}]},{id:"dropdownItemWidth",type:"segment",label:"Dropdown Width",devices:{desktop:{default:"fill"},mobile:{default:"fill"},tablet:{default:"fill"}},options:[{label:"Fill",value:"fill"},{label:"Fixed",value:"fixed"}]},{id:"fixedDropdownWidth",type:"input:unit",label:"Fixed Width",units:["px","%"],devices:{desktop:{default:"240px"},mobile:{default:"240px"},tablet:{default:"240px"}}},{id:"swatchItemWidth",type:"segment",label:"Swatch Width",devices:{desktop:{default:"auto"}},options:[{label:"Fill",value:"auto"},{label:"Fixed",value:"fixed"}]},{id:"fixedDropdownWidth",type:"input:unit",label:"Fixed Width",units:["px","%"],devices:{desktop:{default:"240px"}}}]}];export{ProductVariantSettings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{composeClasses as e}from"@gem-sdk/core";let getContainerClasses=t=>{let{uid:n,isScrollToTop:r,cssClass:o,isLiquid:
|
|
1
|
+
import{composeClasses as e}from"@gem-sdk/core";let getContainerClasses=t=>{let{uid:n,isScrollToTop:r,cssClass:o,isLiquid:s}=t,p=r&&s?"!gp-pointer-events-none [&_gp-button_a]:!gp-pointer-events-auto":"";return e(`sticky-wrapper ${p} ${n} ${o}`)};export{getContainerClasses};
|
|
@@ -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{getStylePadding as n,getContentStyles as p}from"../common/styles.js";import{getContainerClasses as f}from"../common/classes.js";let Sticky=({children:g,builderAttrs:k,setting:h,style:u,builderProps:y,advanced:j})=>{let b=s(),{background:x,preloadBgImage:C,width:S,isScrollToTop:v}=h??{},{positionStyle:I,displayStyle:q,makeDisplaySettingStyles:z}=l(h),
|
|
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{getStylePadding as n,getContentStyles as p}from"../common/styles.js";import{getContainerClasses as f}from"../common/classes.js";let Sticky=({children:g,builderAttrs:k,setting:h,style:u,builderProps:y,advanced:j})=>{let b=s(),{background:x,preloadBgImage:C,width:S,isScrollToTop:v}=h??{},{positionStyle:I,displayStyle:q,makeDisplaySettingStyles:z,getCSSAlign:D,w:K}=l(h),L=d({margin:"0 auto",...K,...q,...D,...n(u),...I,zIndex:a.STICKY,..."edit"!==b&&z}),N=d(p({width:S,style:u,background:x})),T=c(f({uid:y?.uid,isScrollToTop:v,cssClass:j?.cssClass,isLiquid:!1}));return e(r,{children:[!!C&&e(o,{children:[!!x?.desktop?.image?.src&&i("link",{rel:"preload",href:x.desktop.image.src,as:"image"}),!!x?.tablet?.image?.src&&i("link",{rel:"preload",href:x.tablet.image.src,as:"image"}),!!x?.mobile?.image?.src&&i("link",{rel:"preload",href:x.mobile.image.src,as:"image"})]}),i("div",{className:T,id:y?.uid,style:L,children:i("div",{...k,"data-id":y?.uid,style:N,children:m(g)?i(t,{}):g})})]})};export{Sticky as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useStickyStore as t,makeStyleResponsive as e,usePageStore as o,useCurrentDevice as l}from"@gem-sdk/core";import{useMemo as a}from"react";let useSticky=
|
|
1
|
+
import{useStickyStore as t,makeStyleResponsive as e,usePageStore as o,useCurrentDevice as l}from"@gem-sdk/core";import{useMemo as a}from"react";let useSticky=b=>{let{width:i,position:p}=b??{},s=t(t=>t.isStickyVisible),d=e("w",i),r=o(t=>"interaction"===t.sidebarMode),k=l(),m=(t,e)=>({[`--left${e}`]:"top"==t?"0":"50%",[`--t${e}`]:"top"==t?"unset":"translateX(-50%)"}),n=a(()=>({...m(p?.desktop,""),...m(p?.tablet??p?.desktop,"-tablet"),...m(p?.mobile??p?.tablet,"-mobile")}),[p?.desktop,p?.mobile,p?.tablet]),c=a(()=>{if(r&&p?.[k]==="top")return"40px"},[k,r,p]),f=a(()=>({"--d":b?.display?.desktop!=="after-first-cart-button"||s?"block":"none","--d-tablet":b?.display?.tablet!=="after-first-cart-button"||s?"block":"none","--d-mobile":b?.display?.mobile!=="after-first-cart-button"||s?"block":"none"}),[s,b?.display?.desktop,b?.display?.mobile,b?.display?.tablet]),u=a(()=>({"--top":c??"auto","--top-tablet":c??"auto","--top-mobile":c??"auto",[`--${p?.desktop}`]:c??"0px",[`--${p?.tablet??p?.desktop}-tablet`]:c??"0px",[`--${p?.mobile??p?.desktop}-mobile`]:c??"0px"}),[c,p?.desktop,p?.mobile,p?.tablet]),y=t=>"top"==t?"sticky":"fixed",x=a(()=>({"--pos":y(p?.desktop),"--pos-tablet":y(p?.tablet??p?.desktop),"--pos-mobile":y(p?.mobile??p?.tablet)}),[p?.desktop,p?.mobile,p?.tablet]);return{w:d,displayStyle:u,positionStyle:x,getCSSAlign:n,makeDisplaySettingStyles:f}};export{useSticky as default};
|