@gem-sdk/components 3.1.0-staging.1137 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/cjs/article/components/ArticleImage.js +1 -1
  2. package/dist/cjs/article/components/ArticleImage.liquid.js +4 -4
  3. package/dist/cjs/dialog/common/classes.js +1 -1
  4. package/dist/cjs/dialog/components/Dialog.js +1 -1
  5. package/dist/cjs/dialog/components/Dialog.liquid.js +1 -1
  6. package/dist/cjs/grid/components/row/common/classes.js +1 -1
  7. package/dist/cjs/hero-banner/common/classes.js +1 -1
  8. package/dist/cjs/hero-banner/common/helpers.js +1 -1
  9. package/dist/cjs/hero-banner/common/styles.js +1 -1
  10. package/dist/cjs/hero-banner/components/HeroBanner.liquid.js +7 -7
  11. package/dist/cjs/hero-banner/settings/configs/settings.js +1 -1
  12. package/dist/cjs/icon-list-v2/common/helpers.js +1 -1
  13. package/dist/cjs/icon-list-v2/components/IconList.js +1 -1
  14. package/dist/cjs/icon-list-v2/hooks/useIconLineHeight.js +1 -1
  15. package/dist/cjs/image/common/attrs.js +1 -1
  16. package/dist/cjs/product/components/dynamic-checkout/Button.liquid.js +1 -1
  17. package/dist/cjs/product/components/product-description/hooks/useGpDescription.js +1 -1
  18. package/dist/cjs/product/components/product-list/ProductList.liquid.js +22 -30
  19. package/dist/cjs/product/components/product-list/common/helpers.js +1 -1
  20. package/dist/cjs/product/components/product-quantity/common/classes.js +1 -1
  21. package/dist/cjs/product/settings/product-list/configs/settings-v2.js +1 -1
  22. package/dist/cjs/text/common/styles.js +1 -1
  23. package/dist/cjs/video/components/LiteVimeoEmbed.liquid.js +6 -6
  24. package/dist/esm/article/components/ArticleImage.js +1 -1
  25. package/dist/esm/article/components/ArticleImage.liquid.js +4 -4
  26. package/dist/esm/dialog/common/classes.js +1 -1
  27. package/dist/esm/dialog/components/Dialog.js +1 -1
  28. package/dist/esm/dialog/components/Dialog.liquid.js +1 -1
  29. package/dist/esm/grid/components/row/common/classes.js +1 -1
  30. package/dist/esm/hero-banner/common/classes.js +1 -1
  31. package/dist/esm/hero-banner/common/helpers.js +1 -1
  32. package/dist/esm/hero-banner/common/styles.js +1 -1
  33. package/dist/esm/hero-banner/components/HeroBanner.liquid.js +10 -10
  34. package/dist/esm/hero-banner/settings/configs/settings.js +1 -1
  35. package/dist/esm/icon-list-v2/common/helpers.js +1 -1
  36. package/dist/esm/icon-list-v2/components/IconList.js +1 -1
  37. package/dist/esm/icon-list-v2/hooks/useIconLineHeight.js +1 -1
  38. package/dist/esm/image/common/attrs.js +1 -1
  39. package/dist/esm/product/components/dynamic-checkout/Button.liquid.js +1 -1
  40. package/dist/esm/product/components/product-description/hooks/useGpDescription.js +1 -1
  41. package/dist/esm/product/components/product-list/ProductList.liquid.js +24 -32
  42. package/dist/esm/product/components/product-list/common/helpers.js +1 -1
  43. package/dist/esm/product/components/product-quantity/common/classes.js +1 -1
  44. package/dist/esm/product/settings/product-list/configs/settings-v2.js +1 -1
  45. package/dist/esm/text/common/styles.js +1 -1
  46. package/dist/esm/video/components/LiteVimeoEmbed.liquid.js +5 -5
  47. package/dist/types/index.d.ts +0 -1
  48. package/package.json +4 -4
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e}from"react/jsx-runtime";import{useArticleStore as t,cls as r}from"@gem-sdk/core";import a from"../../image/components/Image.js";import{useMemo as i}from"react";let ArticleImage=({className:m,setting:o={},styles:s={},advanced:l,builderProps:c})=>{let d=t(e=>e.article),n=i(()=>{let{src:e,alt:t}=d?.media??{};return{src:e,alt:t}},[d]);return e("div",{className:r("gp-text-center",m),style:{borderRadius:"inherit"},children:e(a,{builderProps:c,setting:{...o,image:n,disableNoDataState:!0},styles:s,advanced:l})})};export{ArticleImage as default};
2
+ import{jsx as e}from"react/jsx-runtime";import{useArticleStore as t,cls as r}from"@gem-sdk/core";import a from"../../image/components/Image.js";import{useMemo as i}from"react";let ArticleImage=({className:m,setting:l={},styles:o={},advanced:s,builderProps:c})=>{let d=t(e=>e.article),n=i(()=>{let{src:e,alt:t}=d?.media??{};return{src:e,alt:t}},[d]);return e("div",{className:r("gp-text-center",m),style:{borderRadius:"inherit"},children:e(a,{builderProps:c,setting:{...l,alt:n.alt,image:n,disableNoDataState:!0},styles:o,advanced:s})})};export{ArticleImage as default};
@@ -1,12 +1,12 @@
1
1
  'use client';
2
- import{template as e,cls as t}from"@gem-sdk/core";import a from"../../image/components/Image.liquid.js";import{getLinkArticle as i}from"../../helpers.js";let ArticleImage=r=>{let l=r?.setting??{},{alt:s,title:c}=l,{builderProps:d}=r,m=l?.openNewTab?"_blank":"_self";return e`
2
+ import{template as e,cls as t}from"@gem-sdk/core";import a from"../../image/components/Image.liquid.js";import{getLinkArticle as i}from"../../helpers.js";let ArticleImage=r=>{let l=r?.setting??{},{builderProps:s}=r,c=l?.openNewTab?"_blank":"_self";return e`
3
3
  <div class="${t("gp-text-center",r?.className)}" style="border-radius: inherit">
4
4
  ${l?.linkArticle?`
5
- <a href="${i(l.linkArticle,l.customURL)}" target="${m}" title="{{article.title}}">
6
- ${a({...r,styles:r.styles,setting:{...r.setting,alt:s,title:c,image:{src:"{{article.image.src | img_url: '1024x1024'}}",alt:"{{article.image.alt}}"},srcSet:{desktop:{src:"{{article.image.src | img_url: '1024x1024'}}"}},disableNoDataState:!0},advanced:r.advanced,builderAttrs:{"data-id":d?.uid}})}
5
+ <a href="${i(l.linkArticle,l.customURL)}" target="${c}" title="{{article.title}}">
6
+ ${a({...r,styles:r.styles,setting:{...r.setting,alt:"{{article.image.alt}}",image:{src:"{{article.image.src | img_url: '1024x1024'}}",alt:"{{article.image.alt}}"},srcSet:{desktop:{src:"{{article.image.src | img_url: '1024x1024'}}"}},disableNoDataState:!0},advanced:r.advanced,builderAttrs:{"data-id":s?.uid}})}
7
7
  </a>
8
8
  `:`
9
- ${a({...r,styles:r.styles,setting:{...r.setting,alt:"{{article.image.alt}}",image:{src:"{{article.image.src | img_url: '1024x1024'}}",alt:"{{article.image.alt}}"},srcSet:{desktop:{src:"{{article.image.src | img_url: '1024x1024'}}"}},disableNoDataState:!0},advanced:r.advanced,builderAttrs:{"data-id":d?.uid}})}
9
+ ${a({...r,styles:r.styles,setting:{...r.setting,alt:"{{article.image.alt}}",image:{src:"{{article.image.src | img_url: '1024x1024'}}",alt:"{{article.image.alt}}"},srcSet:{desktop:{src:"{{article.image.src | img_url: '1024x1024'}}"}},disableNoDataState:!0},advanced:r.advanced,builderAttrs:{"data-id":s?.uid}})}
10
10
  `}
11
11
  </div>
12
12
  `};export{ArticleImage as default};
@@ -1 +1 @@
1
- import{isTransparentColor as e}from"../../helpers.js";function composeClasses(e){return e.split(" ").reduce((e,t)=>(e[t]=!0,e),{})}let getContainClasses=(e,t)=>{let s="gp-dialog gp-bg-transparent gp-z-[999999]";return 0==Number(t)&&(s+=" backdrop:!gp-bg-transparent"),e&&(s+=` ${e}`),{...composeClasses(s)}},getBackdropClasses=e=>{let t="gp-fixed gp-inset-0 gp-z-50 gp-flex gp-overflow-y-auto gp-overflow-x-hidden gp-shadow-xl";return"center"===e&&(t+=" gp-items-center gp-justify-center"),"top"===e&&(t+=" gp-justify-center gp-items-start"),"top-right"===e&&(t+=" gp-justify-end gp-items-start"),"top-left"===e&&(t+=" gp-justify-start gp-items-start"),"bottom"===e&&(t+=" gp-items-end gp-justify-center"),"left"===e&&(t+=" gp-items-center gp-justify-start"),"right"===e&&(t+=" gp-items-center gp-justify-end"),"bottom-left"===e&&(t+=" gp-items-end gp-justify-start"),"bottom-right"===e&&(t+=" gp-items-end gp-justify-end"),{...composeClasses(t)}},getOverlayClasses=()=>({...composeClasses("gp-fixed gp-inset-0 gp-block gp-transition-all gp-duration-100")}),getDialogContentClasses=({setting:t,enableEffect:s,isILP:o})=>{let{effectType:g,background:n,closeButtonPosition:p}=t??{},a="gp-relative gp-max-h-full gp-max-w-full";return"fade"===g&&s&&(a+=" gp-animate-[fadeIn_0.4s_ease-in]"),"zoom"===g&&s&&(a+=" gp-animate-[zoomIn_0.3s_ease-in]"),"zoom-out"===g&&s&&(a+=" gp-animate-[zoomOut_0.3s_ease-in]"),"horizontal"===g&&s&&(a+=" gp-animate-[slideInLeft_0.3s_ease-in]"),"vertical"===g&&s&&(a+=" gp-animate-[slideInUp_0.3s_ease-in]"),"unfold"===g&&s&&(a+=" gp-animate-[unfold_0.3s_ease-in-out]"),"outside"!==p&&(a+=" gp-overflow-hidden"),e(n?.desktop?.color)||(a+=" gp-shadow-xl"),!s&&o&&(a+=" gp-animate-[fadeOut_0.2s_ease-out]"),{...composeClasses(a)}},getHeadContentClasses=()=>({...composeClasses("gp-inline-block gp-h-screen gp-align-middle")}),getButtonContentClasses=e=>{let t="gp-absolute gp-top-0 gp-right-0 gp-inline-flex gp-items-center gp-justify-center gp-outline-none focus-visible:gp-shadow-none focus-visible:gp-outline-none gp-overflow-hidden gp-z-1";return"outside"===e&&(t+=" gp-translate-x-1/2 -gp-translate-y-1/2 gp-shadow-md gp-z-[999999]"),{...composeClasses(t)}},getSvgContentClasses=()=>({...composeClasses("[&>svg]:!gp-w-auto [&>svg]:!gp-h-[var(--height-icon)]")}),getBodyContentClasses=()=>({...composeClasses("gp-h-full gp-w-full gp-overflow-y-auto gp-overflow-x-hidden !gp-max-h-screen")});export{getBackdropClasses,getBodyContentClasses,getButtonContentClasses,getContainClasses,getDialogContentClasses,getHeadContentClasses,getOverlayClasses,getSvgContentClasses};
1
+ import{isTransparentColor as e}from"../../helpers.js";function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}let getContainClasses=e=>{let s="gp-dialog gp-bg-transparent gp-z-[999999]";return e&&(s+=` ${e}`),{...composeClasses(s)}},getBackdropClasses=e=>{let s="gp-fixed gp-inset-0 gp-z-50 gp-flex gp-overflow-y-auto gp-overflow-x-hidden gp-shadow-xl";return"center"===e&&(s+=" gp-items-center gp-justify-center"),"top"===e&&(s+=" gp-justify-center gp-items-start"),"top-right"===e&&(s+=" gp-justify-end gp-items-start"),"top-left"===e&&(s+=" gp-justify-start gp-items-start"),"bottom"===e&&(s+=" gp-items-end gp-justify-center"),"left"===e&&(s+=" gp-items-center gp-justify-start"),"right"===e&&(s+=" gp-items-center gp-justify-end"),"bottom-left"===e&&(s+=" gp-items-end gp-justify-start"),"bottom-right"===e&&(s+=" gp-items-end gp-justify-end"),{...composeClasses(s)}},getOverlayClasses=()=>({...composeClasses("gp-fixed gp-inset-0 gp-block gp-transition-all gp-duration-100")}),getDialogContentClasses=({setting:s,enableEffect:t,isILP:o})=>{let{effectType:g,background:n,closeButtonPosition:p}=s??{},a="gp-relative gp-max-h-full gp-max-w-full";return"fade"===g&&t&&(a+=" gp-animate-[fadeIn_0.4s_ease-in]"),"zoom"===g&&t&&(a+=" gp-animate-[zoomIn_0.3s_ease-in]"),"zoom-out"===g&&t&&(a+=" gp-animate-[zoomOut_0.3s_ease-in]"),"horizontal"===g&&t&&(a+=" gp-animate-[slideInLeft_0.3s_ease-in]"),"vertical"===g&&t&&(a+=" gp-animate-[slideInUp_0.3s_ease-in]"),"unfold"===g&&t&&(a+=" gp-animate-[unfold_0.3s_ease-in-out]"),"outside"!==p&&(a+=" gp-overflow-hidden"),e(n?.desktop?.color)||(a+=" gp-shadow-xl"),!t&&o&&(a+=" gp-animate-[fadeOut_0.2s_ease-out]"),{...composeClasses(a)}},getHeadContentClasses=()=>({...composeClasses("gp-inline-block gp-h-screen gp-align-middle")}),getButtonContentClasses=e=>{let s="gp-absolute gp-top-0 gp-right-0 gp-inline-flex gp-items-center gp-justify-center gp-outline-none focus-visible:gp-shadow-none focus-visible:gp-outline-none gp-overflow-hidden gp-z-1";return"outside"===e&&(s+=" gp-translate-x-1/2 -gp-translate-y-1/2 gp-shadow-md gp-z-[999999]"),{...composeClasses(s)}},getSvgContentClasses=()=>({...composeClasses("[&>svg]:!gp-w-auto [&>svg]:!gp-h-[var(--height-icon)]")}),getBodyContentClasses=()=>({...composeClasses("gp-h-full gp-w-full gp-overflow-y-auto gp-overflow-x-hidden !gp-max-h-screen")});export{getBackdropClasses,getBodyContentClasses,getButtonContentClasses,getContainClasses,getDialogContentClasses,getHeadContentClasses,getOverlayClasses,getSvgContentClasses};
@@ -1,4 +1,4 @@
1
1
  'use client';
2
- import{jsx as e,jsxs as l}from"react/jsx-runtime";import{useEditorMode as o,isEmptyChildren as s,filterToolbarPreview as t}from"@gem-sdk/core";import a from"../../grid/components/ChildrenDroppable.js";import{createAttr as i,createStyle as r,createClass as m,If as n}from"@gem-sdk/system";import{getAttr as c,getAttrContainer as d,getAttrOverlay as p,getAttrClose as f}from"../common/attrs.js";import{getWrapperStyle as g,getContainStyle as y,getBackdropStyle as u,getOverlayStyle as b,getDialogContentStyle as h,getButtonContentStyle as v,getSvgContentStyle as j,getBodyContentStyle as N}from"../common/styles.js";import{getContainClasses as k,getBackdropClasses as C,getOverlayClasses as D,getDialogContentClasses as L,getHeadContentClasses as x,getButtonContentClasses as B,getSvgContentClasses as I,getBodyContentClasses as S}from"../common/classes.js";import w from"../../button/components/ButtonIcon.js";import{useDialog as z}from"../hooks/useDialog.js";let Dialog=E=>{let{setting:M,children:q,builderProps:A,style:F,advanced:G,builderAttrs:H}=E,J=G?.d,{name:K,fullScreen:O,width:P,height:Q,position:R,overlayColor:T,overlayOpacity:U,iconSize:V,closeButtonPosition:W,iconSvg:X}=M??{},Y=o(),{ref:Z,overlay:$,handleClickOverlay:_,closeModal:ee,open:el,dialogId:eo}=z(M,A,"edit"===Y),es="edit"!==Y,et=i({...c({uid:A?.uid||""})}),ea=r({...g(J)}),ei=m({...k(G?.cssClass,U)}),er=i({...d({uid:eo||""})}),em=r({...y()}),en=m({...C(R)}),ec=r({...u(F)}),ed=i({...p()}),ep=m({...D()}),ef=r({...b(U,T,F)}),eg=r({...h({style:F,width:P,height:Q,fullScreen:O})}),ey=m({...L({setting:M,enableEffect:el,isILP:es})}),eu=i({...f()}),eb=m({...x()}),eh=r({...v(M)}),ev=m({...B(W)}),ej=r({...j(V)}),eN=m({...I()}),ek=r({...N(M,F)}),eC=m({...S()});return e("div",{...et,style:ea,children:(el||"edit"!==Y)&&e("dialog",{ref:Z,open:el,"aria-label":K,...er,className:ei,style:em,children:l("div",{"aria-label":"Backdrop",className:en,style:ec,children:[n(!!T,e("div",{ref:$,...ed,className:ep,style:ef,onClick:_,"aria-hidden":!0})),e("span",{className:eb}),l("div",{role:"dialog","aria-label":"Dialog content",...H,className:ey,style:eg,children:[e("button",{...eu,type:"button",tabIndex:-1,className:ev,style:eh,onClick:ee,children:e(w,{iconSvg:X??`<svg viewBox="0 0 12 12" fill="currentColor" style={svgContentStyle}>
2
+ import{jsx as e,jsxs as l}from"react/jsx-runtime";import{useEditorMode as o,isEmptyChildren as s,filterToolbarPreview as t}from"@gem-sdk/core";import a from"../../grid/components/ChildrenDroppable.js";import{createAttr as i,createStyle as r,createClass as m,If as n}from"@gem-sdk/system";import{getAttr as c,getAttrContainer as d,getAttrOverlay as p,getAttrClose as f}from"../common/attrs.js";import{getWrapperStyle as g,getContainStyle as y,getBackdropStyle as u,getOverlayStyle as b,getDialogContentStyle as h,getButtonContentStyle as v,getSvgContentStyle as j,getBodyContentStyle as N}from"../common/styles.js";import{getContainClasses as k,getBackdropClasses as C,getOverlayClasses as D,getDialogContentClasses as L,getHeadContentClasses as x,getButtonContentClasses as B,getSvgContentClasses as I,getBodyContentClasses as S}from"../common/classes.js";import w from"../../button/components/ButtonIcon.js";import{useDialog as z}from"../hooks/useDialog.js";let Dialog=E=>{let{setting:M,children:q,builderProps:A,style:F,advanced:G,builderAttrs:H}=E,J=G?.d,{name:K,fullScreen:O,width:P,height:Q,position:R,overlayColor:T,overlayOpacity:U,iconSize:V,closeButtonPosition:W,iconSvg:X}=M??{},Y=o(),{ref:Z,overlay:$,handleClickOverlay:_,closeModal:ee,open:el,dialogId:eo}=z(M,A,"edit"===Y),es="edit"!==Y,et=i({...c({uid:A?.uid||""})}),ea=r({...g(J)}),ei=m({...k(G?.cssClass)}),er=i({...d({uid:eo||""})}),em=r({...y()}),en=m({...C(R)}),ec=r({...u(F)}),ed=i({...p()}),ep=m({...D()}),ef=r({...b(U,T,F)}),eg=r({...h({style:F,width:P,height:Q,fullScreen:O})}),ey=m({...L({setting:M,enableEffect:el,isILP:es})}),eu=i({...f()}),eb=m({...x()}),eh=r({...v(M)}),ev=m({...B(W)}),ej=r({...j(V)}),eN=m({...I()}),ek=r({...N(M,F)}),eC=m({...S()});return e("div",{...et,style:ea,children:(el||"edit"!==Y)&&e("dialog",{ref:Z,open:el,"aria-label":K,...er,className:ei,style:em,children:l("div",{"aria-label":"Backdrop",className:en,style:ec,children:[n(!!T,e("div",{ref:$,...ed,className:ep,style:ef,onClick:_,"aria-hidden":!0})),e("span",{className:eb}),l("div",{role:"dialog","aria-label":"Dialog content",...H,className:ey,style:eg,children:[e("button",{...eu,type:"button",tabIndex:-1,className:ev,style:eh,onClick:ee,children:e(w,{iconSvg:X??`<svg viewBox="0 0 12 12" fill="currentColor" style={svgContentStyle}>
3
3
  <path d="M7.1,6l4.5,4.5l-1.1,1.1L6,7.1l-4.5,4.5l-1.1-1.1L4.9,6L0.5,1.5l1.1-1.1L6,4.9l4.5-4.5l1.1,1.1L7.1,6z"></path>
4
4
  </svg>`,styles:ej,classes:eN})}),e("div",{"aria-label":"Dialog body",style:ek,className:eC,children:s(q)?e(a,{}):t(q)}),t(q,!0)]})]})})})};export{Dialog as default};
@@ -1,4 +1,4 @@
1
- import{template as s,RenderIf as l,isLocalEnv as a,baseAssetURL as e}from"@gem-sdk/core";import{createStateOrContext as t,createAttr as i,createStyle as o,createClass as r,If as d}from"@gem-sdk/system";import{getAttr as $,getAttrContainer as p,getAttrOverlay as c,getAttrClose as g}from"../common/attrs.js";import{getWrapperStyle as m,getContainStyle as n,getBackdropStyle as v,getOverlayStyle as f,getDialogContentStyle as y,getButtonContentStyle as u,getSvgContentStyle as b,getBodyContentStyle as S}from"../common/styles.js";import{getContainClasses as j,getBackdropClasses as L,getOverlayClasses as h,getDialogContentClasses as E,getHeadContentClasses as D,getButtonContentClasses as k,getSvgContentClasses as x,getBodyContentClasses as C}from"../common/classes.js";import{getSettingPreloadData as I}from"../../helpers.js";let Dialog=z=>{let{setting:A,children:B,builderProps:G,style:M,advanced:N,builderAttrs:O}=z,P=N?.d,{frequency:_=3,triggerPercentage:w=0,trigger:J,triggerTime:R,frequencyMode:T="once",mobileTrigger:V,mobileTriggerTime:q,closeOnClickOutside:F}=A??{},{name:H,fullScreen:K,width:Q,height:U,position:W,overlayColor:X,overlayOpacity:Y,iconSize:Z,closeButtonPosition:ss,iconSvg:sl}=A??{},sa=A?.dialogId??G?.uid,se=t({dialogId:sa,trigger:J,triggerTime:R,frequency:_,triggerPercentage:w,mobileTrigger:V,mobileTriggerTime:q,closeOnClickOutside:F,frequencyMode:T,display:P}),st=i({...$({uid:G?.uid||""})}),si=o({...m(P)}),so=r({...j(N?.cssClass,Y)}),sr=i({...p({uid:sa||""})}),sd=o({...n()}),s$=r({...L(W)}),sp=o({...v(M)}),sc=i({...c()}),sg=r({...h()}),sm=o({...f(Y,X,M)}),sn=o({...y({style:M,width:Q,height:U,fullScreen:K})}),sv=r({...E({setting:A,enableEffect:!0,isILP:!1})}),sf=i({...g()}),sy=r({...D()}),su=o({...u(A)}),sb=r({...k(ss)}),sS=o({...b(Z)}),sj=r({...x()}),sL=o({...S(A,M)}),sh=r({...C()}),sE=()=>l(a,'<script src="{{ \'gp-dialog-v7-5.js\' | asset_url }}" defer="defer"></script>',`<script src="${e}/assets-v2/gp-dialog-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);return s`
1
+ import{template as s,RenderIf as l,isLocalEnv as a,baseAssetURL as e}from"@gem-sdk/core";import{createStateOrContext as t,createAttr as i,createStyle as o,createClass as r,If as d}from"@gem-sdk/system";import{getAttr as $,getAttrContainer as p,getAttrOverlay as c,getAttrClose as g}from"../common/attrs.js";import{getWrapperStyle as m,getContainStyle as n,getBackdropStyle as v,getOverlayStyle as f,getDialogContentStyle as y,getButtonContentStyle as u,getSvgContentStyle as b,getBodyContentStyle as S}from"../common/styles.js";import{getContainClasses as j,getBackdropClasses as L,getOverlayClasses as h,getDialogContentClasses as E,getHeadContentClasses as D,getButtonContentClasses as k,getSvgContentClasses as x,getBodyContentClasses as C}from"../common/classes.js";import{getSettingPreloadData as I}from"../../helpers.js";let Dialog=z=>{let{setting:A,children:B,builderProps:G,style:M,advanced:N,builderAttrs:O}=z,P=N?.d,{frequency:_=3,triggerPercentage:w=0,trigger:J,triggerTime:R,frequencyMode:T="once",mobileTrigger:V,mobileTriggerTime:q,closeOnClickOutside:F}=A??{},{name:H,fullScreen:K,width:Q,height:U,position:W,overlayColor:X,overlayOpacity:Y,iconSize:Z,closeButtonPosition:ss,iconSvg:sl}=A??{},sa=A?.dialogId??G?.uid,se=t({dialogId:sa,trigger:J,triggerTime:R,frequency:_,triggerPercentage:w,mobileTrigger:V,mobileTriggerTime:q,closeOnClickOutside:F,frequencyMode:T,display:P}),st=i({...$({uid:G?.uid||""})}),si=o({...m(P)}),so=r({...j(N?.cssClass)}),sr=i({...p({uid:sa||""})}),sd=o({...n()}),s$=r({...L(W)}),sp=o({...v(M)}),sc=i({...c()}),sg=r({...h()}),sm=o({...f(Y,X,M)}),sn=o({...y({style:M,width:Q,height:U,fullScreen:K})}),sv=r({...E({setting:A,enableEffect:!0,isILP:!1})}),sf=i({...g()}),sy=r({...D()}),su=o({...u(A)}),sb=r({...k(ss)}),sS=o({...b(Z)}),sj=r({...x()}),sL=o({...S(A,M)}),sh=r({...C()}),sE=()=>l(a,'<script src="{{ \'gp-dialog-v7-5.js\' | asset_url }}" defer="defer"></script>',`<script src="${e}/assets-v2/gp-dialog-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);return s`
2
2
  <gp-dialog
3
3
  ${{...st}}
4
4
  class="${I("gps-lazy")}"
@@ -1 +1 @@
1
- import{createClass as g}from"@gem-sdk/system";let getClass=l=>{let{builderProps:p,advanced:e,className:a}=l,o=g({"gp-background-video gp-absolute gp-overflow-hidden gp-w-full gp-h-full left-0 top-0 !gp-block":!0}),s=g({"gp-bg-video gp-relative gp-h-full":!0}),t=g({...a&&{[a]:!0},...p?.uid&&{[p.uid]:!0},"gp-relative gp-mx-auto gp-mb-0 gp-grid gp-max-w-full gp-transition-colors gp-duration-200 gp-ease-in-out [&_*]:gp-max-w-full gp-grid-rows-[1fr]":!0,...e?.cssClass&&{[e?.cssClass]:!0}}),u=g({"gp-mx-auto gp-max-w-full [&_*]:gp-max-w-full":!0}),r=g({"gp-pb-[56.25%] gp-h-full gp-w-full !gp-max-w-none gp-background-article":!0}),i=g({"!gp-w-[500%] !gp-ml-[-200%] !gp-h-full !gp-max-w-none gp-scale-[104%]":!0});return{rowClass:t,backgroundBoxClass:o,backgroundBoxInnerClass:s,sectionClass:u,wrapperYoutubeClasses:r,iframeYoutubeClasses:i}};export{getClass};
1
+ import{createClass as g}from"@gem-sdk/system";let getClass=l=>{let{builderProps:p,advanced:e,className:a}=l,o=g({"gp-background-video gp-absolute gp-overflow-hidden gp-w-full gp-h-full left-0 top-0":!0}),s=g({"gp-bg-video gp-relative gp-h-full":!0}),t=g({...a&&{[a]:!0},...p?.uid&&{[p.uid]:!0},"gp-relative gp-mx-auto gp-mb-0 gp-grid gp-max-w-full gp-transition-colors gp-duration-200 gp-ease-in-out [&_*]:gp-max-w-full gp-grid-rows-[1fr]":!0,...e?.cssClass&&{[e?.cssClass]:!0}}),u=g({"gp-mx-auto gp-max-w-full [&_*]:gp-max-w-full":!0}),r=g({"gp-pb-[56.25%] gp-h-full gp-w-full !gp-max-w-none gp-background-article":!0}),i=g({"!gp-w-[500%] !gp-ml-[-200%] !gp-h-full !gp-max-w-none gp-scale-[104%]":!0});return{rowClass:t,backgroundBoxClass:o,backgroundBoxInnerClass:s,sectionClass:u,wrapperYoutubeClasses:r,iframeYoutubeClasses:i}};export{getClass};
@@ -1 +1 @@
1
- import{getGlobalColorStateClass as e,getValueByDevice as s}from"@gem-sdk/core";import{getClassAlignBanner as o,getResponsiveSetting as l,getClassContentPosition as a,getContentPosition as t,getClassForContentByFitContent as r,getClassForStretchContent as g,getClassSpaceBetween as p,opacityEnabledData as n,getClassSpaceBetweenLeftRight as i,getOpacityHover as u}from"./helpers.js";function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}let getClasses=({setting:e,builderProps:s,advancedCssClass:a})=>{let t="gp-group/hero gp-flex gp-w-full gp-flex-col gp-self-center gp-transition-colors gp-duration-200 gp-ease-in-out";return a&&(t+=` ${a}`),{...s?.uid&&{[s.uid]:!0},...composeClasses(t),...o(l(e?.alignBanner||{}))}},getLinkClasses=()=>({...composeClasses("gp-cursor-pointer gp-h-full")}),getContainerClasses=(e,s)=>({...composeClasses("gp-relative gp-flex gp-w-full gp-flex-col gp-items-center gp-overflow-hidden hero-banner-container"),...a(t(e?.layout,s?.contentPosition1Col,s?.contentPosition2Col)||{})}),enableTransitionHover=e=>{let{overlayColor:s}=e??{},o=s?.hover||s?.normal;return o&&"transparent"!==o&&"0%"!=u(e)},getOverlayClasses=s=>{let{overlayColor:o,hoverEffect:l}=s??{},{disableOpacity:a}=n(s),t="gp-absolute gp-inset-0 gp-left-[var(--left)] gp-top-[var(--top)] gp-z-1";return enableTransitionHover(s)&&(t+=" gp-transition-all gp-duration-300"),l&&(t+=" group-hover/hero:gp-bg-[color:var(--hvr-bgc,_var(--bgc))] group-hover/hero:gp-opacity-[var(--hvr-op,_var(--op))]"),e("bg",o,a,!l)&&(t+=` ${e("bg",o,a,!l)}`),composeClasses(t)},getRowClasses=(e,s)=>{let{sizeSetting:o,background:l}=e??{},{verticalAlign:a}=s??{},t=r(o,l),n=g(a),u=p(s?.layout||{},e?.contentPosition1Col||{}),c=i(s?.layout||{}),C=`gp-hero-banner-row ${t} ${n}`;return{...composeClasses(C),...u,...c}},getAdaptiveClasses=()=>composeClasses("adaptive-hero-banner"),getAdaptivePictureClasses=()=>composeClasses("gp-w-full"),getBackgroundClasses=(e,s)=>{let o="hero-banner-bg gp-hero-banner-image-background hero-banner-bg-parallax";return s&&(o+=" gp_lazybg"),e&&(o+=" gp-duration-[var(--duration)] group-hover/hero:gp-scale-[var(--scale)] gp-transition-transform"),composeClasses(o)},getContainBackgroundClasses=()=>composeClasses("gp-hero-banner-bg gp-absolute gp-overflow-hidden gp-w-full gp-h-full top-0 left-0"),getHtml5VideoClasses=(e,o=!1)=>{let l="gp-relative",a=s(e,"tablet"),t=s(e,"mobile");return o&&(l+=" gp-hidden"),a&&(l+=" tablet:gp-h-full tablet:gp-object-cover"),t&&(l+=" mobile:gp-h-full mobile:gp-object-cover"),composeClasses(l)},getWrapperYoutubeClasses=()=>composeClasses("gp-pb-[56.25%] gp-h-full gp-w-full !gp-max-w-none gp-pointer-events-none"),getIframeYoutubeClasses=()=>composeClasses("!gp-w-[500%] !gp-ml-[-200%] !gp-h-full !gp-max-w-none gp-scale-[104%]"),getLazyBackgroundClasses=e=>{let s="gp-absolute gp-top-0 gp-invisible gp-w-full gp_lazyload gp-h-full gp_lazyforbg";return"tablet"===e&&(s+=" gp_lazybg_tl"),"mobile"===e&&(s+=" gp_lazybg_mb"),composeClasses(s)};export{enableTransitionHover,getAdaptiveClasses,getAdaptivePictureClasses,getBackgroundClasses,getClasses,getContainBackgroundClasses,getContainerClasses,getHtml5VideoClasses,getIframeYoutubeClasses,getLazyBackgroundClasses,getLinkClasses,getOverlayClasses,getRowClasses,getWrapperYoutubeClasses};
1
+ import{getGlobalColorStateClass as e,getValueByDevice as s}from"@gem-sdk/core";import{getClassAlignBanner as o,getResponsiveSetting as l,getClassContentPosition as a,getContentPosition as t,getClassForContentByFitContent as r,getClassForStretchContent as g,opacityEnabledData as p,getClassSpaceBetween as n,getClassSpaceBetweenLeftRight as i,getOpacityHover as u}from"./helpers.js";function composeClasses(e){return e.split(" ").reduce((e,s)=>(e[s]=!0,e),{})}let getClasses=({setting:e,builderProps:s,advancedCssClass:a})=>{let t="gp-group/hero gp-flex gp-w-full gp-flex-col gp-self-center gp-transition-colors gp-duration-200 gp-ease-in-out";return a&&(t+=` ${a}`),{...s?.uid&&{[s.uid]:!0},...composeClasses(t),...o(l(e?.alignBanner||{}))}},getLinkClasses=()=>({...composeClasses("gp-cursor-pointer gp-h-full")}),getContainerClasses=(e,s)=>({...composeClasses("gp-relative gp-flex gp-w-full gp-flex-col gp-items-center gp-overflow-hidden hero-banner-container"),...a(t(e?.layout,s?.contentPosition1Col,s?.contentPosition2Col)||{})}),enableTransitionHover=e=>{let{overlayColor:s}=e??{},o=s?.hover||s?.normal;return o&&"transparent"!==o&&"0%"!=u(e)},getOverlayClasses=s=>{let{overlayColor:o,hoverEffect:l}=s??{},{disableOpacity:a}=p(s),t="gp-absolute gp-inset-0 gp-left-[var(--left)] gp-top-[var(--top)] gp-z-1";return enableTransitionHover(s)&&(t+=" gp-transition-all gp-duration-300"),l&&(t+=" group-hover/hero:gp-bg-[color:var(--hvr-bgc,_var(--bgc))] group-hover/hero:gp-opacity-[var(--hvr-op,_var(--op))]"),e("bg",o,a,!l)&&(t+=` ${e("bg",o,a,!l)}`),composeClasses(t)},getRowClasses=(e,s)=>{let{sizeSetting:o,background:l}=e??{},{verticalAlign:a}=s??{},t=r(o,l),p=g(a),u=n(s?.layout||{},e?.contentPosition1Col||{},e?.contentPosition2Col||{}),c=i(s?.layout||{}),C=`gp-hero-banner-row ${t} ${p}`;return{...composeClasses(C),...u,...c}},getAdaptiveClasses=()=>composeClasses("adaptive-hero-banner"),getAdaptivePictureClasses=()=>composeClasses("gp-w-full"),getBackgroundClasses=(e,s)=>{let o="hero-banner-bg gp-hero-banner-image-background hero-banner-bg-parallax";return s&&(o+=" gp_lazybg"),e&&(o+=" gp-duration-[var(--duration)] group-hover/hero:gp-scale-[var(--scale)] gp-transition-transform"),composeClasses(o)},getContainBackgroundClasses=()=>composeClasses("gp-hero-banner-bg gp-absolute gp-overflow-hidden gp-w-full gp-h-full top-0 left-0"),getHtml5VideoClasses=(e,o=!1)=>{let l="gp-relative",a=s(e,"tablet"),t=s(e,"mobile");return o&&(l+=" gp-hidden"),a&&(l+=" tablet:gp-h-full tablet:gp-object-cover"),t&&(l+=" mobile:gp-h-full mobile:gp-object-cover"),composeClasses(l)},getWrapperYoutubeClasses=()=>composeClasses("gp-pb-[56.25%] gp-h-full gp-w-full !gp-max-w-none gp-pointer-events-none"),getIframeYoutubeClasses=()=>composeClasses("!gp-w-[500%] !gp-ml-[-200%] !gp-h-full !gp-max-w-none gp-scale-[104%]"),getLazyBackgroundClasses=e=>{let s="gp-absolute gp-top-0 gp-invisible gp-w-full gp_lazyload gp-h-full gp_lazyforbg";return"tablet"===e&&(s+=" gp_lazybg_tl"),"mobile"===e&&(s+=" gp_lazybg_mb"),composeClasses(s)};export{enableTransitionHover,getAdaptiveClasses,getAdaptivePictureClasses,getBackgroundClasses,getClasses,getContainBackgroundClasses,getContainerClasses,getHtml5VideoClasses,getIframeYoutubeClasses,getLazyBackgroundClasses,getLinkClasses,getOverlayClasses,getRowClasses,getWrapperYoutubeClasses};
@@ -1 +1 @@
1
- import{getResponsiveValueByScreen as e,getAspectRatioGlobalSize as t,makeStyleResponsive as o,DEVICES as l,getValueByDevice as i,GRADIENT_BGR_KEY as a,cls as n}from"@gem-sdk/core";import{getImageSrc as r,createBlurDataURL as s}from"../../image/common/helpers.js";import{HREF_TO_SALES_PAGE as g}from"../../constant.js";let getContentPosition=(t,o,i)=>{let a={};return l.map(l=>{let n=e(t,l),r=e(o,l),s=e(i,l);a={...a,[l]:1>=(n?.cols?.length||1)?r:s}}),a},getAspectRatioSettings=(t,o)=>{let l={desktop:t?.desktop?.width,tablet:t?.tablet?.width,mobile:t?.mobile?.width},i={desktop:t?.desktop?.height,tablet:t?.tablet?.height,mobile:t?.mobile?.height},a={desktop:o?.desktop==="custom"?`${e(l,"desktop")}/${e(i,"desktop")}`:o?.desktop==="cover"?"unset":o?.desktop,tablet:o?.tablet==="custom"?`${e(l,"tablet")}/${e(i,"tablet")}`:o?.tablet==="cover"?"unset":o?.tablet,mobile:o?.mobile==="custom"?`${e(l,"mobile")}/${e(i,"mobile")}`:o?.mobile==="cover"?"unset":o?.mobile};return a},getEnableBgImageByDevice=(t,o)=>{if(!e(getBgImage(o),t))return!1;if(!o?.[t]){if("mobile"===t)return o?.tablet?.type==="image"||o?.desktop?.type==="image"&&!o?.tablet;if("tablet"===t)return o?.desktop?.type==="image"}return o?.[t]?.type==="image"},getBgImage=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},imagePlaceholder=e=>{let t=getBgImage(e);return{desktop:s(t?.desktop?.width??0,t?.desktop?.height??0),tablet:s(t?.tablet?.width??t?.desktop?.width??0,t?.tablet?.height??t?.desktop?.width??0),mobile:s(t?.mobile?.width??t?.tablet?.width??t?.desktop?.width??0,t?.mobile?.height??t?.tablet?.height??t?.desktop?.width??0)}},getBgImageByScreen=(t,o,l,i)=>{if(!t)return"";let n=getBgImage(t),s=e(t,o),g=l?`url(${imagePlaceholder(t)[o]})`:`url(${r(e(n,o),o,i)})`,p=s?.color?`, ${s.color}`:"";return s?.color?.includes(a)&&s?.type==="image"?`${g}${p}`:s?.color?.includes(a)&&s?.type!=="image"?`${s.color}`:s?.type==="image"?g:"url()"},getBackgroundImageHeroBanner=(e,t=!1,i=!1)=>{if(!e)return;let a={};return l.forEach(o=>{a={...a,[o]:getBgImageByScreen(e,o,t,i)}}),o("bgi",a)},getAttachmentDevice=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o]?.attachment;t={...t,[o]:"fixed"===l?"fixed":"absolute"}}),t},horizontalAlign=(e,t,o)=>mapContentPositionToHorizontal(getContentPosition(e,t,o)),scrollToContentBanner=e=>e?.target?.closest("div.gp-hero-banner-row")?.scrollTo(0,0),getDataVideoHeroBannerResponsive=(e,t)=>{switch(e){case"desktop":if(t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"tablet":if(t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.tablet&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"mobile":if(t?.mobile?.type==="video")return{device:"mobile",data:t.mobile};if(!t?.mobile&&t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.mobile&&!t?.tablet?.type&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop}}},getVisibilityStyle=e=>e?Object.keys(e).filter(e=>["--d","--d-tablet","--d-mobile"].includes(e)).reduce((t,o)=>({...t,[o]:e?.[o]!=="none"?"flex":e?.[o]}),{}):{},getStyleAspectRatioHeroBannerCustom=(l,i,a)=>{let n=t(i),r=["desktop","mobile","tablet"];return r.forEach(t=>{let o=e(i,t),r=!!getDataVideoHeroBannerResponsive(t,l),s=o?.shape,g=o?.height,p="original"===s&&"fit-content"!==g,b=p&&r;b&&(n={...n,[t]:"16/9"}),a&&a[t]&&getDataVideoHeroBannerResponsive(t,l)?.data?.videoType==="html5"&&(n={...n,[t]:a[t]})}),o("aspect",n)},mapContentPositionToHorizontal=e=>{let t={};for(let o in e)"top"===e[o]?t[o]="start":"bottom"===e[o]?t[o]="end":t[o]="center";return t},getDisplayStyleByFitContent=(t,l)=>{let i={desktop:"none",tablet:"none",mobile:"none"},a=["desktop","mobile","tablet"];return a.forEach(o=>{let a=e(t,o),n=!!getDataVideoHeroBannerResponsive(o,l),r=a?.shape,s=a?.height,g="original"===r&&"fit-content"!==s&&!n;i={...i,[o]:g?"block":"none"}}),o("d",i)},getWidth=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o];l&&(t={...t,[o]:"default"===l?"var(--g-ct-w, 1200px)":l})}),t},getPercentageVisible=(e,t)=>{let{top:o,height:l}=e,i=-l;if(o<i)return 0;if(o>t)return 100;let a=(o-i)/(t-i)*100;return Math.min(Math.max(a,0),100)},isScaleImage=({enableParallax:e=!1,attachment:t="scroll"})=>!!e||"fixed"===t,getHeightHeroBanner=(e,t)=>{let l={},i=["desktop","mobile","tablet"];return i.forEach(o=>{let i=isScaleImage({enableParallax:t,attachment:e[o]?.attachment});l={...l,[o]:t?"150%":i?"100vh":"100%"}}),o("h",l)},getWidthHeroBanner=(e,t)=>{let l={},i=["desktop","mobile","tablet"];return i.forEach(o=>{let i=isScaleImage({enableParallax:t,attachment:e[o]?.attachment});l={...l,[o]:i?"100vw":"100%"}}),o("w",l)},getTopHeroBanner=e=>{let t={},l=["desktop","mobile","tablet"];return l.forEach(o=>{t={...t,[o]:e[o]?.attachment==="fixed"?"0px":""}}),o("top",t)},getStyleHeroBannerBg=(e,t)=>{let o=getHeightHeroBanner(e,t),l=getWidthHeroBanner(e,t),i=getTopHeroBanner(e);return{...o,...l,...i}},calcRounderClipPath=(e,t=0,o=0)=>{let l=t,i=t;if(t>o?l=o:i=o,e>=999){let t=e-l;return t>0?t:0}let a=e-i;return a>0?a:0},getClipPath=(e,t)=>{if(!t||!e)return"inset(0 0 0)";let[o,l,i,a]=e.split(" ").map(e=>parseInt(e??"0")),{btlr:n,btrr:r,bbrr:s,bblr:g}=t,p=calcRounderClipPath(parseInt(n??"0"),o,a),b=calcRounderClipPath(parseInt(r??"0"),o,l),c=calcRounderClipPath(parseInt(s??"0"),l,i),d=calcRounderClipPath(parseInt(g??"0"),i,a);return`inset(0 0 0 round ${p}px ${b}px ${c}px ${d}px)`},getClassAlignBanner=e=>({"!gp-self-start":"left"===e.desktop,"!gp-self-center":"center"===e.desktop,"!gp-self-end":"right"===e.desktop,"tablet:!gp-self-start":"left"===e.tablet,"tablet:!gp-self-center":"center"===e.tablet,"tablet:!gp-self-end":"right"===e.tablet,"mobile:!gp-self-start":"left"===e.mobile,"mobile:!gp-self-center":"center"===e.mobile,"mobile:!gp-self-end":"right"===e.mobile}),get1ColLayout=({device:e,settingLayoutRes:t,contentPosition1ColRes:o})=>{let l=t[e]?.cols??[],i=l.length<=1,a=o[e];if(!i||!a)return;let n=["space-between","top","center","bottom"];return n.includes(a)?a:void 0},getClassSpaceBetween=(e,t)=>{let o=getResponsiveSetting(e),i=getResponsiveSetting(t),a={desktop:get1ColLayout({device:"desktop",settingLayoutRes:o,contentPosition1ColRes:i}),tablet:get1ColLayout({device:"tablet",settingLayoutRes:o,contentPosition1ColRes:i}),mobile:get1ColLayout({device:"mobile",settingLayoutRes:o,contentPosition1ColRes:i})},n={"space-between":{desktop:"!gp-h-full !gp-content-stretch [&>*]:!gp-justify-between [&>*:nth-child(2)]:gp-absolute [&>*:nth-child(2)]:gp-hidden",tablet:"tablet:!gp-h-full tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-between tablet:[&>*:nth-child(2)]:gp-absolute tablet:[&>*:nth-child(2)]:gp-hidden",mobile:"mobile:!gp-h-full mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-between mobile:[&>*:nth-child(2)]:gp-absolute mobile:[&>*:nth-child(2)]:gp-hidden"},top:{desktop:"!gp-content-stretch [&>*]:!gp-justify-start",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-start",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-start"},center:{desktop:"!gp-content-stretch [&>*]:!gp-justify-center",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-center",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-center"},bottom:{desktop:"!gp-content-stretch [&>*]:!gp-justify-end",tablet:"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-end",mobile:"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-end"}},r={};return l.forEach(e=>{let t=a[e],o=n?.[t]?.[e];r[o]=!0}),r},getClassSpaceBetweenLeftRight=e=>{let t=getResponsiveSetting(e),o=t?.desktop?.type=="left-distributed"||t?.desktop?.type=="right-distributed",l=t?.tablet?.type=="left-distributed"||t?.tablet?.type=="right-distributed",i=t?.mobile?.type=="left-distributed"||t?.mobile?.type=="right-distributed";return{"gp-h-full tablet:gp-h-auto mobile:gp-h-auto [&>*]:!gp-justify-between":o,"tablet:!gp-h-full tablet:[&>*]:!gp-justify-between mobile:gp-h-auto":l,"mobile:!gp-h-full mobile:[&>*]:!gp-justify-between":i,"mobile:!gp-h-auto":!i}},getClassForStretchContent=t=>{let o={desktop:"none",tablet:"none",mobile:"none"},l=["desktop","mobile","tablet"];return l.forEach(l=>{let i=e(t,l);o={...o,[l]:i}}),n("space-between"===o.desktop?"[&>*>*]:!gp-justify-between":"","space-between"===o.tablet?"tablet:[&>*>*]:!gp-justify-between ":`tablet:[&>*>*]:!gp-justify-${t?.tablet}`,"space-between"===o.mobile?"mobile:[&>*>*]:!gp-justify-between ":`mobile:[&>*>*]:!gp-justify-${t?.mobile}`)},getClassForContentByFitContent=(t,o)=>{let l={desktop:!1,tablet:!1,mobile:!1},i=["desktop","mobile","tablet"];return i.forEach(i=>{let a=e(t,i),n=!!getDataVideoHeroBannerResponsive(i,o),r=a?.shape,s=a?.height,g="original"===r&&"fit-content"!==s;l={...l,[i]:g&&!n}}),n(l.desktop?"!gp-absolute":"",l.tablet?"tablet:!gp-absolute":"tablet:!gp-relative",l.mobile?"mobile:!gp-absolute":"mobile:!gp-relative")},getClassContentPosition=e=>{let t={center:"center",top:"start",bottom:"end","space-between":"between"},o=e.desktop||"center",l=e.tablet||o,i=e.mobile||l;return{[`gp-justify-${t[o||"center"]}`]:!!o,[`tablet:gp-justify-${t[l||"center"]}`]:!!l,[`mobile:gp-justify-${t[i||"center"]}`]:!!i}},getResponsiveSetting=e=>{let t=e.desktop,o=e.tablet?e.tablet:t,l=e.mobile?e.mobile:o;return{desktop:t,tablet:o,mobile:l}},showVideoType=e=>l.some(t=>{let o=i(e,t);return o?.type!=="color"&&o?.type!=="image"&&!!o&&(o?.videoType==="html5"&&o?.videoHtml5||o?.videoType==="youtube"&&o?.video)});function debounce(e,t){let o;return function(...l){clearTimeout(o),o=setTimeout(()=>e.apply(this,l),t)}}let fallbackImg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",getBannerLink=e=>{let t=e?.link;return t?.type==="go-to-sales-page"?{type:"go-to-sales-page",link:g,target:"_self"}:t},formatHoverScale=e=>e?String(e).includes("%")?`${e}`:`${e}%`:"100%",opacityEnabledData=e=>{let{overlayColor:t,overlayOpacity:o}=e??{},l=!t?.normal||o?.normal=="0%"||!o?.normal;return{disableOpacity:l}},getOpacityHover=e=>{let{overlayOpacity:t}=e??{},o="number"!=typeof t?.hover||isNaN(t?.hover)?"string"==typeof t?.hover?`${parseInt(t?.hover)}%`:"":`${t?.hover}%`,l="number"!=typeof t?.normal||isNaN(t?.normal)?"string"==typeof t?.normal?`${parseInt(t?.normal)}%`:"0%":`${t?.normal}%`;return o||l};export{debounce,fallbackImg,formatHoverScale,getAspectRatioSettings,getAttachmentDevice,getBackgroundImageHeroBanner,getBannerLink,getBgImage,getClassAlignBanner,getClassContentPosition,getClassForContentByFitContent,getClassForStretchContent,getClassSpaceBetween,getClassSpaceBetweenLeftRight,getClipPath,getContentPosition,getDataVideoHeroBannerResponsive,getDisplayStyleByFitContent,getEnableBgImageByDevice,getOpacityHover,getPercentageVisible,getResponsiveSetting,getStyleAspectRatioHeroBannerCustom,getStyleHeroBannerBg,getVisibilityStyle,getWidth,horizontalAlign,imagePlaceholder,isScaleImage,mapContentPositionToHorizontal,opacityEnabledData,scrollToContentBanner,showVideoType};
1
+ import{getResponsiveValueByScreen as e,getAspectRatioGlobalSize as t,makeStyleResponsive as o,DEVICES as l,getValueByDevice as i,GRADIENT_BGR_KEY as n,cls as a}from"@gem-sdk/core";import{getImageSrc as r,createBlurDataURL as s}from"../../image/common/helpers.js";import{HREF_TO_SALES_PAGE as g}from"../../constant.js";let getContentPosition=(t,o,i)=>{let n={};return l.map(l=>{let a=e(t,l),r=e(o,l),s=e(i,l);n={...n,[l]:1>=(a?.cols?.length||1)?r:s}}),n},getAspectRatioSettings=(t,o)=>{let l={desktop:t?.desktop?.width,tablet:t?.tablet?.width,mobile:t?.mobile?.width},i={desktop:t?.desktop?.height,tablet:t?.tablet?.height,mobile:t?.mobile?.height},n={desktop:o?.desktop==="custom"?`${e(l,"desktop")}/${e(i,"desktop")}`:o?.desktop==="cover"?"unset":o?.desktop,tablet:o?.tablet==="custom"?`${e(l,"tablet")}/${e(i,"tablet")}`:o?.tablet==="cover"?"unset":o?.tablet,mobile:o?.mobile==="custom"?`${e(l,"mobile")}/${e(i,"mobile")}`:o?.mobile==="cover"?"unset":o?.mobile};return n},getEnableBgImageByDevice=(t,o)=>{if(!e(getBgImage(o),t))return!1;if(!o?.[t]){if("mobile"===t)return o?.tablet?.type==="image"||o?.desktop?.type==="image"&&!o?.tablet;if("tablet"===t)return o?.desktop?.type==="image"}return o?.[t]?.type==="image"},getBgImage=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},imagePlaceholder=e=>{let t=getBgImage(e);return{desktop:s(t?.desktop?.width??0,t?.desktop?.height??0),tablet:s(t?.tablet?.width??t?.desktop?.width??0,t?.tablet?.height??t?.desktop?.width??0),mobile:s(t?.mobile?.width??t?.tablet?.width??t?.desktop?.width??0,t?.mobile?.height??t?.tablet?.height??t?.desktop?.width??0)}},getBgImageByScreen=(t,o,l,i)=>{if(!t)return"";let a=getBgImage(t),s=e(t,o),g=l?`url(${imagePlaceholder(t)[o]})`:`url(${r(e(a,o),o,i)})`,p=s?.color?`, ${s.color}`:"";return s?.color?.includes(n)&&s?.type==="image"?`${g}${p}`:s?.color?.includes(n)&&s?.type!=="image"?`${s.color}`:s?.type==="image"?g:"url()"},getBackgroundImageHeroBanner=(e,t=!1,i=!1)=>{if(!e)return;let n={};return l.forEach(o=>{n={...n,[o]:getBgImageByScreen(e,o,t,i)}}),o("bgi",n)},getAttachmentDevice=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o]?.attachment;t={...t,[o]:"fixed"===l?"fixed":"absolute"}}),t},horizontalAlign=(e,t,o)=>mapContentPositionToHorizontal(getContentPosition(e,t,o)),scrollToContentBanner=e=>e?.target?.closest("div.gp-hero-banner-row")?.scrollTo(0,0),getDataVideoHeroBannerResponsive=(e,t)=>{switch(e){case"desktop":if(t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"tablet":if(t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.tablet&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop};break;case"mobile":if(t?.mobile?.type==="video")return{device:"mobile",data:t.mobile};if(!t?.mobile&&t?.tablet?.type==="video")return{device:"tablet",data:t.tablet};if(!t?.mobile&&!t?.tablet?.type&&t?.desktop?.type==="video")return{device:"desktop",data:t.desktop}}},getVisibilityStyle=e=>e?Object.keys(e).filter(e=>["--d","--d-tablet","--d-mobile"].includes(e)).reduce((t,o)=>({...t,[o]:e?.[o]!=="none"?"flex":e?.[o]}),{}):{},getStyleAspectRatioHeroBannerCustom=(l,i,n)=>{let a=t(i),r=["desktop","mobile","tablet"];return r.forEach(t=>{let o=e(i,t),r=!!getDataVideoHeroBannerResponsive(t,l),s=o?.shape,g=o?.height,p="original"===s&&"fit-content"!==g,b=p&&r;b&&(a={...a,[t]:"16/9"}),n&&n[t]&&getDataVideoHeroBannerResponsive(t,l)?.data?.videoType==="html5"&&(a={...a,[t]:n[t]})}),o("aspect",a)},mapContentPositionToHorizontal=e=>{let t={};for(let o in e)"top"===e[o]?t[o]="start":"bottom"===e[o]?t[o]="end":t[o]="center";return t},getDisplayStyleByFitContent=(t,l)=>{let i={desktop:"none",tablet:"none",mobile:"none"},n=["desktop","mobile","tablet"];return n.forEach(o=>{let n=e(t,o),a=!!getDataVideoHeroBannerResponsive(o,l),r=n?.shape,s=n?.height,g="original"===r&&"fit-content"!==s&&!a;i={...i,[o]:g?"block":"none"}}),o("d",i)},getWidth=e=>{let t={},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=e?.[o];l&&(t={...t,[o]:"default"===l?"var(--g-ct-w, 1200px)":l})}),t},getPercentageVisible=(e,t)=>{let{top:o,height:l}=e,i=-l;if(o<i)return 0;if(o>t)return 100;let n=(o-i)/(t-i)*100;return Math.min(Math.max(n,0),100)},isScaleImage=({enableParallax:e=!1,attachment:t="scroll"})=>!!e||"fixed"===t,getHeightHeroBanner=(e,t)=>{let l={},i=["desktop","mobile","tablet"];return i.forEach(o=>{let i=isScaleImage({enableParallax:t,attachment:e[o]?.attachment});l={...l,[o]:t?"150%":i?"100vh":"100%"}}),o("h",l)},getWidthHeroBanner=(e,t)=>{let l={},i=["desktop","mobile","tablet"];return i.forEach(o=>{let i=isScaleImage({enableParallax:t,attachment:e[o]?.attachment});l={...l,[o]:i?"100vw":"100%"}}),o("w",l)},getTopHeroBanner=e=>{let t={},l=["desktop","mobile","tablet"];return l.forEach(o=>{t={...t,[o]:e[o]?.attachment==="fixed"?"0px":""}}),o("top",t)},getStyleHeroBannerBg=(e,t)=>{let o=getHeightHeroBanner(e,t),l=getWidthHeroBanner(e,t),i=getTopHeroBanner(e);return{...o,...l,...i}},calcRounderClipPath=(e,t=0,o=0)=>{let l=t,i=t;if(t>o?l=o:i=o,e>=999){let t=e-l;return t>0?t:0}let n=e-i;return n>0?n:0},getClipPath=(e,t)=>{if(!t||!e)return"inset(0 0 0)";let[o,l,i,n]=e.split(" ").map(e=>parseInt(e??"0")),{btlr:a,btrr:r,bbrr:s,bblr:g}=t,p=calcRounderClipPath(parseInt(a??"0"),o,n),b=calcRounderClipPath(parseInt(r??"0"),o,l),c=calcRounderClipPath(parseInt(s??"0"),l,i),d=calcRounderClipPath(parseInt(g??"0"),i,n);return`inset(0 0 0 round ${p}px ${b}px ${c}px ${d}px)`},getClassAlignBanner=e=>({"!gp-self-start":"left"===e.desktop,"!gp-self-center":"center"===e.desktop,"!gp-self-end":"right"===e.desktop,"tablet:!gp-self-start":"left"===e.tablet,"tablet:!gp-self-center":"center"===e.tablet,"tablet:!gp-self-end":"right"===e.tablet,"mobile:!gp-self-start":"left"===e.mobile,"mobile:!gp-self-center":"center"===e.mobile,"mobile:!gp-self-end":"right"===e.mobile}),getClassSpaceBetween=(e,t,o)=>{let l=getResponsiveSetting(e),i=getResponsiveSetting(t),n=getResponsiveSetting(o),a=1>=(l?.desktop?.cols?.length||1)?i.desktop:n.desktop,r=1>=(l?.tablet?.cols?.length||1)?i.tablet:n.tablet,s=1>=(l?.mobile?.cols?.length||1)?i.mobile:n.mobile;return{"!gp-h-full !gp-content-stretch [&>*]:!gp-justify-between [&>*:nth-child(2)]:gp-absolute [&>*:nth-child(2)]:gp-hidden":l.desktop?.cols?.length===1&&"space-between"===a,"!gp-content-stretch [&>*]:!gp-justify-start":l.desktop?.cols?.length===1&&"top"===a,"tablet:!gp-h-full tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-between tablet:[&>*:nth-child(2)]:gp-absolute [&>*:nth-child(2)]:gp-hidden":l.tablet?.cols?.length===1&&"space-between"===r,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-start":l.tablet?.cols?.length===1&&"top"===r,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-center":l.tablet?.cols?.length===1&&"center"===r,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-end":l.tablet?.cols?.length===1&&"bottom"===r,"mobile:!gp-h-full mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-between mobile:[&>*:nth-child(2)]:gp-absolute [&>*:nth-child(2)]:gp-hidden":l.mobile?.cols?.length===1&&"space-between"===s,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-start":l.mobile?.cols?.length===1&&"top"===s,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-center":l.mobile?.cols?.length===1&&"center"===s,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-end":l.mobile?.cols?.length===1&&"bottom"===s}},getClassSpaceBetweenLeftRight=e=>{let t=getResponsiveSetting(e),o=t?.desktop?.type=="left-distributed"||t?.desktop?.type=="right-distributed",l=t?.tablet?.type=="left-distributed"||t?.tablet?.type=="right-distributed",i=t?.mobile?.type=="left-distributed"||t?.mobile?.type=="right-distributed";return{"gp-h-full tablet:gp-h-auto mobile:gp-h-auto [&>*]:!gp-justify-between":o,"tablet:!gp-h-full tablet:[&>*]:!gp-justify-between mobile:gp-h-auto":l,"mobile:!gp-h-full mobile:[&>*]:!gp-justify-between":i,"mobile:!gp-h-auto":!i}},getClassForStretchContent=t=>{let o={desktop:"none",tablet:"none",mobile:"none"},l=["desktop","mobile","tablet"];return l.forEach(l=>{let i=e(t,l);o={...o,[l]:i}}),a("space-between"===o.desktop?"[&>*>*]:!gp-justify-between":"","space-between"===o.tablet?"tablet:[&>*>*]:!gp-justify-between ":`tablet:[&>*>*]:!gp-justify-${t?.tablet}`,"space-between"===o.mobile?"mobile:[&>*>*]:!gp-justify-between ":`mobile:[&>*>*]:!gp-justify-${t?.mobile}`)},getClassForContentByFitContent=(t,o)=>{let l={desktop:!1,tablet:!1,mobile:!1},i=["desktop","mobile","tablet"];return i.forEach(i=>{let n=e(t,i),a=!!getDataVideoHeroBannerResponsive(i,o),r=n?.shape,s=n?.height,g="original"===r&&"fit-content"!==s;l={...l,[i]:g&&!a}}),a(l.desktop?"!gp-absolute":"",l.tablet?"tablet:!gp-absolute":"tablet:!gp-relative",l.mobile?"mobile:!gp-absolute":"mobile:!gp-relative")},getClassContentPosition=e=>{let t={center:"center",top:"start",bottom:"end","space-between":"between"},o=e.desktop||"center",l=e.tablet||o,i=e.mobile||l;return{[`gp-justify-${t[o||"center"]}`]:!!o,[`tablet:gp-justify-${t[l||"center"]}`]:!!l,[`mobile:gp-justify-${t[i||"center"]}`]:!!i}},getResponsiveSetting=e=>{let t=e.desktop,o=e.tablet?e.tablet:t,l=e.mobile?e.mobile:o;return{desktop:t,tablet:o,mobile:l}},showVideoType=e=>l.some(t=>{let o=i(e,t);return o?.type!=="color"&&o?.type!=="image"&&!!o&&(o?.videoType==="html5"&&o?.videoHtml5||o?.videoType==="youtube"&&o?.video)});function debounce(e,t){let o;return function(...l){clearTimeout(o),o=setTimeout(()=>e.apply(this,l),t)}}let fallbackImg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJnLTE5MjAtOTAwIj4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjIwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjUwJSIgLz4KICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSJyZ2JhKDUxLCA1MSwgNTEsIDApIiBvZmZzZXQ9IjcwJSIgLz4KICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxyZWN0IHdpZHRoPSIxOTIwIiBoZWlnaHQ9IjkwMCIgZmlsbD0icmdiYSg1MSwgNTEsIDUxLCAwKSIgLz4KICAgIDxyZWN0IGlkPSJyIiB3aWR0aD0iMTkyMCIgaGVpZ2h0PSI5MDAiIGZpbGw9InVybCgjZy0xOTIwLTkwMCkiIC8+CiAgICA8YW5pbWF0ZSB4bGluazpocmVmPSIjciIgYXR0cmlidXRlTmFtZT0ieCIgZnJvbT0iLTE5MjAiIHRvPSIxOTIwIiBkdXI9IjFzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgIC8+CiAgPC9zdmc+",getBannerLink=e=>{let t=e?.link;return t?.type==="go-to-sales-page"?{type:"go-to-sales-page",link:g,target:"_self"}:t},formatHoverScale=e=>e?String(e).includes("%")?`${e}`:`${e}%`:"100%",opacityEnabledData=e=>{let{overlayColor:t,overlayOpacity:o}=e??{},l=!t?.normal||o?.normal=="0%"||!o?.normal;return{disableOpacity:l}},getOpacityHover=e=>{let{overlayOpacity:t}=e??{},o="number"!=typeof t?.hover||isNaN(t?.hover)?"string"==typeof t?.hover?`${parseInt(t?.hover)}%`:"":`${t?.hover}%`,l="number"!=typeof t?.normal||isNaN(t?.normal)?"string"==typeof t?.normal?`${parseInt(t?.normal)}%`:"0%":`${t?.normal}%`;return o||l};export{debounce,fallbackImg,formatHoverScale,getAspectRatioSettings,getAttachmentDevice,getBackgroundImageHeroBanner,getBannerLink,getBgImage,getClassAlignBanner,getClassContentPosition,getClassForContentByFitContent,getClassForStretchContent,getClassSpaceBetween,getClassSpaceBetweenLeftRight,getClipPath,getContentPosition,getDataVideoHeroBannerResponsive,getDisplayStyleByFitContent,getEnableBgImageByDevice,getOpacityHover,getPercentageVisible,getResponsiveSetting,getStyleAspectRatioHeroBannerCustom,getStyleHeroBannerBg,getVisibilityStyle,getWidth,horizontalAlign,imagePlaceholder,isScaleImage,mapContentPositionToHorizontal,opacityEnabledData,scrollToContentBanner,showVideoType};
@@ -1 +1 @@
1
- import{makeStyleWithDefault as e,getWidthByShapeGlobalSize as t,makeStyleResponsive as r,getHeightByShapeGlobalSize as l,makeStyle as o,getSingleColorVariable as n,getRadiusStyleActiveState as i,getStyleBgColor as y,getStyleShadow as a,makeStyleState as g,getGlobalColorStateStyle as u,getResponsiveStylePadding as s,getStyleBackgroundByDevice as c}from"@gem-sdk/core";import{getVisibilityStyle as S,getStyleAspectRatioHeroBannerCustom as d,getAspectRatioSettings as h,getOpacityHover as p,getDisplayStyleByFitContent as m,getStyleHeroBannerBg as b,formatHoverScale as f,getAttachmentDevice as w,getClipPath as v,opacityEnabledData as T,getResponsiveSetting as k}from"./helpers.js";function filterTruthyStyles(e){return Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!!e))}let getStyle=(o,n,i)=>{let{sizeSetting:y,background:a}=o??{},{ratioOptions:g,aspectRatio:u}=n??{},s={...i,...S(i),...e("w",t(y,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),...d(a,y,h(g,u)),...r("h",l(y))};return filterTruthyStyles(s)},getContainerStyle=(e,t)=>{let{sizeSetting:g,background:u,borderBg:s,cornerBg:c,shadowBg:S,hasActiveShadow:p}=e??{},{ratioOptions:m,aspectRatio:b}=t??{},f={...r("h",l(g)),...d(u,g,h(m,b)),...o({bs:s?.border??s?.border,bw:s?.width??s?.width,bc:n(s?.color)}),...i({...c,active:{...c||{},radiusType:"custom"}}),...u?{...y(u)}:{},...a({value:S,styleAppliedFor:"box-shadow",isEnableShadow:p})};return filterTruthyStyles(f)},getOverlayStyle=e=>{let{overlayColor:t,overlayOpacity:r,hoverEffect:l}=e??{},{disableOpacity:o}=T(e),n="number"!=typeof r?.normal||isNaN(r?.normal)?"string"==typeof r?.normal?`${parseInt(r?.normal)}%`:"0%":`${r?.normal}%`,i=g("op",{normal:n,hover:p(e)}),y=u("bgc",{...t,hover:t?.hover||t?.normal});o&&(delete y?.["--bgc"],delete i?.["--op"]),l||(delete y?.["--hvr-bgc"],delete i?.["--hvr-op"]);let a={...y,...i,"--top":"0","--left":"0"};return filterTruthyStyles(a)},getRowStyle=e=>{let{contentPadding:t}=e??{},r={...s(t)};return filterTruthyStyles(r)},getAdaptiveStyle=o=>{let{sizeSetting:n,background:i}=o??{},y={...m(n,i),...r("h",l(n)),...e("w",t(n,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),"--op":0,"--z":-1};return filterTruthyStyles(y)},getBackgroundStyle=(e,t,l)=>{let{hoverEffectScale:o,background:n,hoverEffectDuration:i}=e??{},y=`${parseFloat(`${i}`)??.5}s`,a={...b(k(n||{}),t),...c(n,{ignoreBgAttachment:!0,ignoreBackgroundImage:!0}),"--duration":y,"--scale":f(o),...r("pos",w(n)),transform:l,transition:`transform ${y} cubic-bezier(0,0,0,1)`};return filterTruthyStyles(a)},getContainBackgroundStyle=e=>{let{borderBg:t,cornerBg:r}=e??{},l={"clip-path":v(t?.width,r)};return filterTruthyStyles(l)},getHtml5VideoStyle=e=>{let t={...r("aspect",e)};return filterTruthyStyles(t)},getYoutubeIframeStyle=e=>{let t={...r("aspect",e),"pointer-event":"none"};return filterTruthyStyles(t)};export{getAdaptiveStyle,getBackgroundStyle,getContainBackgroundStyle,getContainerStyle,getHtml5VideoStyle,getOverlayStyle,getRowStyle,getStyle,getYoutubeIframeStyle};
1
+ import{makeStyleWithDefault as e,getWidthByShapeGlobalSize as t,makeStyleResponsive as r,getHeightByShapeGlobalSize as l,makeStyle as o,getSingleColorVariable as n,getRadiusStyleActiveState as i,getStyleBgColor as y,getStyleShadow as a,makeStyleState as g,getGlobalColorStateStyle as u,getResponsiveStylePadding as s,getStyleBackgroundByDevice as c}from"@gem-sdk/core";import{getVisibilityStyle as S,getStyleAspectRatioHeroBannerCustom as d,getAspectRatioSettings as h,getOpacityHover as p,getDisplayStyleByFitContent as m,getStyleHeroBannerBg as b,formatHoverScale as f,getAttachmentDevice as w,getClipPath as v,opacityEnabledData as T,getResponsiveSetting as k}from"./helpers.js";function filterTruthyStyles(e){return Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!!e))}let getStyle=(o,n,i)=>{let{sizeSetting:y,background:a}=o??{},{ratioOptions:g,aspectRatio:u}=n??{},s={...i,...S(i),...e("w",t(y,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),...d(a,y,h(g,u)),...r("h",l(y))};return filterTruthyStyles(s)},getContainerStyle=(e,t)=>{let{sizeSetting:g,background:u,borderBg:s,cornerBg:c,shadowBg:S,hasActiveShadow:p}=e??{},{ratioOptions:m,aspectRatio:b}=t??{},f={...r("h",l(g)),...d(u,g,h(m,b)),...o({bs:s?.border??s?.border,bw:s?.width??s?.width,bc:n(s?.color)}),...i({...c,active:{...c||{},radiusType:"custom"}}),...u?{...y(u)}:{},...a({value:S,styleAppliedFor:"box-shadow",isEnableShadow:p})};return filterTruthyStyles(f)},getOverlayStyle=e=>{let{overlayColor:t,overlayOpacity:r,hoverEffect:l}=e??{},{disableOpacity:o}=T(e),n="number"!=typeof r?.normal||isNaN(r?.normal)?"string"==typeof r?.normal?`${parseInt(r?.normal)}%`:"0%":`${r?.normal}%`,i=g("op",{normal:n,hover:p(e)}),y=u("bgc",{...t,hover:t?.hover||t?.normal});o&&(delete y?.["--bgc"],delete i?.["--op"]),l||(delete y?.["--hvr-bgc"],delete i?.["--hvr-op"]);let a={...y,...i,"--top":"0","--left":"0"};return filterTruthyStyles(a)},getRowStyle=e=>{let{contentPadding:t}=e??{},r={...s(t)};return filterTruthyStyles(r)},getAdaptiveStyle=o=>{let{sizeSetting:n,background:i}=o??{},y={...m(n,i),...r("h",l(n)),...e("w",t(n,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),"--op":0,"--z":-1};return filterTruthyStyles(y)},getBackgroundStyle=(e,t,l)=>{let{hoverEffectScale:o,background:n,hoverEffectDuration:i}=e??{},y={...b(k(n||{}),t),...c(n,{ignoreBgAttachment:!0,ignoreBackgroundImage:!0}),"--duration":`${parseInt(`${i}`)??0}s`,"--scale":f(o),...r("pos",w(n)),transform:l,transition:"transform 300ms cubic-bezier(0,0,0,1)"};return filterTruthyStyles(y)},getContainBackgroundStyle=e=>{let{borderBg:t,cornerBg:r}=e??{},l={"clip-path":v(t?.width,r)};return filterTruthyStyles(l)},getHtml5VideoStyle=e=>{let t={...r("aspect",e)};return filterTruthyStyles(t)},getYoutubeIframeStyle=e=>{let t={...r("aspect",e),"pointer-event":"none"};return filterTruthyStyles(t)};export{getAdaptiveStyle,getBackgroundStyle,getContainBackgroundStyle,getContainerStyle,getHtml5VideoStyle,getOverlayStyle,getRowStyle,getStyle,getYoutubeIframeStyle};
@@ -1,19 +1,19 @@
1
- import e from"./HeroBannerItem.liquid.js";import{getAttr as r,getAttrLink as o}from"../common/attrs.js";import{getStyle as s}from"../common/styles.js";import{getClasses as t,getLinkClasses as a}from"../common/classes.js";import{createStateOrContext as n,createAttr as l,createStyle as i,createClass as c,If as m}from"@gem-sdk/system";import{template as p,dataStringify as d,RenderIf as f,isLocalEnv as h,baseAssetURL as u}from"@gem-sdk/core";import{getInsertLinkData as $,getSettingPreloadData as g}from"../../helpers.js";import{getResponsiveSetting as v,getBannerLink as E}from"../common/helpers.js";let HeroBanner=b=>{let{builderAttrs:y,builderProps:P,setting:j,styles:k,style:C,children:S,advanced:x,pageContext:B}=b,{enableLazyLoadImage:H}=B??{},{enableLink:N}=j??{},R=E(j),{cssClass:_}=x??{},{urlData:w}=$("",R),A=n({background:v(k?.background||{}),uid:P?.uid,enableParallax:Number(j?.speedParallax||0)>0,speedParallax:Number(j?.speedParallax)||0,hoverEffect:k?.hoverEffect,hoverEffectScale:k?.hoverEffectScale,layout:j?.layout,contentPosition1Col:k?.contentPosition1Col,contentPosition2Col:k?.contentPosition2Col,aspectRatio:j?.aspectRatio,target:R?.target??"_self",href:w?.href??"",linkType:R?.type??"",hoverEffectDuration:k?.hoverEffectDuration}),D=!!R?.link&&N,G=l({...r({uid:P?.uid||""})}),I=l(o()),T=i({...s(k,j,C)}),q=c({...t({setting:j,builderProps:P,advancedCssClass:_})}),M=c({...a()}),O=()=>e({setting:j,styles:k,children:S,enableLazyLoadImage:H,rawChildren:b.rawChildren,builderProps:P});return p`
1
+ import e from"./HeroBannerItem.liquid.js";import{getAttr as r,getAttrLink as o}from"../common/attrs.js";import{getStyle as s}from"../common/styles.js";import{getClasses as t,getLinkClasses as a}from"../common/classes.js";import{createStateOrContext as l,createAttr as n,createStyle as i,createClass as c,If as m}from"@gem-sdk/system";import{template as p,dataStringify as d,RenderIf as f,isLocalEnv as h,baseAssetURL as u}from"@gem-sdk/core";import{getInsertLinkData as $,getSettingPreloadData as g}from"../../helpers.js";import{getResponsiveSetting as v,getBannerLink as b}from"../common/helpers.js";let HeroBanner=y=>{let{builderAttrs:P,builderProps:j,setting:k,styles:C,style:E,children:S,advanced:x,pageContext:B}=y,{enableLazyLoadImage:H}=B??{},{enableLink:N}=k??{},R=b(k),{cssClass:_}=x??{},{urlData:w}=$("",R),A=l({background:v(C?.background||{}),uid:j?.uid,enableParallax:Number(k?.speedParallax||0)>0,speedParallax:Number(k?.speedParallax)||0,hoverEffect:C?.hoverEffect,hoverEffectScale:C?.hoverEffectScale,layout:k?.layout,contentPosition1Col:C?.contentPosition1Col,contentPosition2Col:C?.contentPosition2Col,aspectRatio:k?.aspectRatio,target:R?.target??"_self",href:w?.href??"",linkType:R?.type??""}),G=!!R?.link&&N,I=n({...r({uid:j?.uid||""})}),T=n(o()),q=i({...s(C,k,E)}),M=c({...t({setting:k,builderProps:j,advancedCssClass:_})}),O=c({...a()}),V=()=>e({setting:k,styles:C,children:S,enableLazyLoadImage:H,rawChildren:y.rawChildren,builderProps:j});return p`
2
2
  <gp-hero-banner
3
- ${{...y}}
4
- ${{...G}}
5
- class="${q}"
6
- style="${T}"
3
+ ${{...P}}
4
+ ${{...I}}
5
+ class="${M}"
6
+ style="${q}"
7
7
  gp-data='${d(A)}'
8
8
  >
9
- ${m(!D,O())}
10
- ${m(D,p`
9
+ ${m(!G,V())}
10
+ ${m(G,p`
11
11
  <div
12
- ${{...I}}
12
+ ${{...T}}
13
13
  aria-hidden="true"
14
- class="${M}"
14
+ class="${O}"
15
15
  >
16
- ${O()}
16
+ ${V()}
17
17
  </div>`)}
18
18
  </gp-hero-banner>
19
19
  ${f(h,`<script ${g('class="gps-link" delay',"src")}="{{ 'gp-hero-banner-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${g('class="gps-link" delay',"src")}="${u}/assets-v2/gp-hero-banner-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>
@@ -143,4 +143,4 @@ let SettingsV2=[{id:"setting",controls:[{id:"layout",type:"layout-banner",device
143
143
  d="M4.39584 15.625C3.36031 15.625 2.52084 14.7855 2.52084 13.75V12.5C2.52084 11.4645 3.36031 10.625 4.39584 10.625H14.3958C15.4314 10.625 16.2708 11.4645 16.2708 12.5V13.75C16.2708 14.7855 15.4314 15.625 14.3958 15.625H4.39584ZM3.77084 13.75C3.77084 14.0952 4.05066 14.375 4.39584 14.375H14.3958C14.741 14.375 15.0208 14.0952 15.0208 13.75V12.5C15.0208 12.1548 14.741 11.875 14.3958 11.875H4.39584C4.05066 11.875 3.77084 12.1548 3.77084 12.5V13.75Z"
144
144
  fill="currentColor"
145
145
  />
146
- </svg> `,tooltip:"Align right"}],devices:{desktop:{default:"center"}}},{id:"seo",type:"group",label:"SEO",controls:[{id:"alt",label:"Alt Text",type:"textarea",minHeight:56,autoHeight:!0,placeholder:"E.g: Classic white crewneck t-shirt with minimalist design",default:void 0},{id:"title",label:"Image title",info:"Show title when hover to image",type:"textarea",minHeight:56,autoHeight:!0,placeholder:"E.g: White t-shirt",default:void 0}]},{id:"ratioOptions",type:"ratio",min:1,useUnit:!1,useLink:!1,devices:{desktop:{default:{width:"16",height:"9"}}}},{id:"aspectRatio",type:"select",label:"Ratio",options:[{label:"Original",value:"auto"},{label:"Square",value:"1/1"},{label:"3:2",value:"3/2"},{label:"4:3",value:"4/3"},{label:"16:9",value:"16/9"},{label:"21:9",value:"21/9"},{label:"2:3",value:"2/3"},{label:"3:4",value:"3/4"},{label:"9:16",value:"9/16"},{label:"Cover",value:"cover"},{label:"Custom",value:"custom"}],devices:{desktop:{default:"16/9"},mobile:{default:"auto"}}},{id:"contentBanner",type:"banner",message:"The background image should be taller than the Hero Banner",closable:!0}]},{id:"style",controls:[{id:"sizeSetting",type:"size-setting",label:"",devices:{desktop:{default:{shape:"original",widthHeightLinked:!1,width:"100%"}},mobile:{default:{shape:"custom",width:"100%"}}},settingConfig:{width:{displayOptions:["full","default"],name:"Width"},height:{displayOptions:["fit-content","fit-screen"],name:"Height"},shape:{displayOptions:["original","custom"],name:"Frame",shapeTitleConfig:{original:"As banner source"}}},hiddenSettings:["padding","gap"]},{id:"background",type:"background-media",ignoreReRender:!0,showVideo:!0,showDeviceControl:!0,devices:{desktop:{default:{type:"image",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1920,height:900},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",video:"",videoHtml5:"",videoType:"youtube",loop:!0,lazyLoad:!1}}},compoDefaultValue:{desktop:{default:{type:"image",color:"bg-2",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1920,height:900},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",video:"https://youtu.be/KOxfzBp72uk",videoHtml5:"https://cdn.shopify.com/videos/c/o/v/92a407d4e0c94a288eb54cac18c387dc.mp4",videoType:"youtube",loop:!0,lazyLoad:!1}}}},{id:"hoverEffect",type:"toggle",default:!1},{id:"hoverEffectScale",type:"input:slider",label:"Zoom Value",units:["%"],min:100,max:200,step:5,default:"120%"},{id:"hoverEffectDuration",label:"Zoom Time",type:"input:unit",units:["s"],min:0,default:.5,inputType:"number",placeholder:"",disableAutoValue:!0},{id:"height",label:"Height",type:"input:unit",units:["px"],placeholder:"Auto",devices:{desktop:{default:void 0}},info:"Full Width: To set Hero Banner full width, first you drag & drop a Section element from left sidebar, then make it full-width, after that you put your Hero Banner inside Section you have created."},{id:"contentPosition1Col",label:"Content Position",type:"option:value",options:[{label:"Top",value:"top",iconName:"gp-align-top"},{label:"Center",value:"center",iconName:"gp-align-center-vertical"},{label:"Bottom",value:"bottom",iconName:"gp-align-bottom"},{label:"Space between",value:"space-between",iconName:"gp-justify-content-space-between"}],devices:{desktop:{default:"center"}}},{id:"contentPosition2Col",label:"Content Position",type:"option:value",options:[{label:"Top",value:"top",iconName:"gp-align-top"},{label:"Center",value:"center",iconName:"gp-align-center-vertical"},{label:"Bottom",value:"bottom",iconName:"gp-align-bottom"},{label:"Space between",value:"space-between",iconName:"gp-justify-content-space-between"}],devices:{desktop:{default:"center"}}},{id:"wrapperWidth",type:"input:unit-width",label:"Width",placeholder:"Auto",min:0,units:["px","%"],devices:{desktop:{default:void 0},tablet:{default:void 0},mobile:{default:void 0}}},{id:"contentWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"default"},tablet:{default:"default"},mobile:{default:"default"}},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0}]},{id:"verticalGutter",type:"input:unit",units:["px"],min:0,label:"Spacing",devices:{desktop:{default:"32px"}}},{id:"overlayEnable",type:"toggle",default:!1},{id:"overlayOpacity",label:"Opacity",type:"input:slider",min:0,max:100,units:["%"],step:1,default:{normal:"20%"},state:{normal:!0,hover:!0},compoDefaultValue:{normal:"20%",hover:"20%"}},{id:"overlayColor",label:"Color",type:"color-picker-v2",state:{normal:!0,hover:!0}},{id:"borderBg",type:"border-v2",label:"Border",compoDefaultValue:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}},{id:"cornerBg",type:"corner-v2",label:"Corner",default:{radiusType:"none"}},{id:"hasActiveShadow",type:"toggle",label:"Enable Button Shadow",default:!1},{id:"shadowBg",type:"shadow-v2",label:"Button Shadow",compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}},{id:"contentPadding",type:"padding-v2",devices:{desktop:{default:{top:"4px",left:"16px",bottom:"4px",right:"16px",linked:!1}},mobile:{default:{top:"16px",left:"16px",bottom:"16px",right:"16px",linked:!1}}},compoDefaultValue:{desktop:{default:{top:"4px",left:"16px",bottom:"4px",right:"16px",linked:!1}},mobile:{default:{top:"16px",left:"16px",bottom:"16px",right:"16px",linked:!1}}}}]}];export{SettingsV2};
146
+ </svg> `,tooltip:"Align right"}],devices:{desktop:{default:"center"}}},{id:"seo",type:"group",label:"SEO",controls:[{id:"alt",label:"Alt Text",type:"textarea",minHeight:56,autoHeight:!0,placeholder:"E.g: Classic white crewneck t-shirt with minimalist design",default:void 0},{id:"title",label:"Image title",info:"Show title when hover to image",type:"textarea",minHeight:56,autoHeight:!0,placeholder:"E.g: White t-shirt",default:void 0}]},{id:"ratioOptions",type:"ratio",min:1,useUnit:!1,useLink:!1,devices:{desktop:{default:{width:"16",height:"9"}}}},{id:"aspectRatio",type:"select",label:"Ratio",options:[{label:"Original",value:"auto"},{label:"Square",value:"1/1"},{label:"3:2",value:"3/2"},{label:"4:3",value:"4/3"},{label:"16:9",value:"16/9"},{label:"21:9",value:"21/9"},{label:"2:3",value:"2/3"},{label:"3:4",value:"3/4"},{label:"9:16",value:"9/16"},{label:"Cover",value:"cover"},{label:"Custom",value:"custom"}],devices:{desktop:{default:"16/9"},mobile:{default:"auto"}}},{id:"contentBanner",type:"banner",message:"The background image should be taller than the Hero Banner",closable:!0}]},{id:"style",controls:[{id:"sizeSetting",type:"size-setting",label:"",devices:{desktop:{default:{shape:"original",widthHeightLinked:!1,width:"100%"}},mobile:{default:{shape:"custom",width:"100%"}}},settingConfig:{width:{displayOptions:["full","default"],name:"Width"},height:{displayOptions:["fit-content","fit-screen"],name:"Height"},shape:{displayOptions:["original","custom"],name:"Frame",shapeTitleConfig:{original:"As banner source"}}},hiddenSettings:["padding","gap"]},{id:"background",type:"background-media",ignoreReRender:!0,showVideo:!0,showDeviceControl:!0,devices:{desktop:{default:{type:"image",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1920,height:900},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",video:"",videoHtml5:"",videoType:"youtube",loop:!0,lazyLoad:!1}}},compoDefaultValue:{desktop:{default:{type:"image",color:"bg-2",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1920,height:900},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll",video:"https://youtu.be/KOxfzBp72uk",videoHtml5:"https://cdn.shopify.com/videos/c/o/v/92a407d4e0c94a288eb54cac18c387dc.mp4",videoType:"youtube",loop:!0,lazyLoad:!1}}}},{id:"hoverEffect",type:"toggle",default:!1},{id:"hoverEffectScale",type:"input:slider",label:"Zoom Value",units:["%"],min:100,max:200,step:5,default:"120%"},{id:"hoverEffectDuration",label:"Zoom Time",type:"input:unit",units:["s"],min:0,default:.5,useOnlyUnitInit:!0},{id:"height",label:"Height",type:"input:unit",units:["px"],placeholder:"Auto",devices:{desktop:{default:void 0}},info:"Full Width: To set Hero Banner full width, first you drag & drop a Section element from left sidebar, then make it full-width, after that you put your Hero Banner inside Section you have created."},{id:"contentPosition1Col",label:"Content Position",type:"option:value",options:[{label:"Top",value:"top",iconName:"gp-align-top"},{label:"Center",value:"center",iconName:"gp-align-center-vertical"},{label:"Bottom",value:"bottom",iconName:"gp-align-bottom"},{label:"Space between",value:"space-between",iconName:"gp-justify-content-space-between"}],devices:{desktop:{default:"center"}}},{id:"contentPosition2Col",label:"Content Position",type:"option:value",options:[{label:"Top",value:"top",iconName:"gp-align-top"},{label:"Center",value:"center",iconName:"gp-align-center-vertical"},{label:"Bottom",value:"bottom",iconName:"gp-align-bottom"},{label:"Space between",value:"space-between",iconName:"gp-justify-content-space-between"}],devices:{desktop:{default:"center"}}},{id:"wrapperWidth",type:"input:unit-width",label:"Width",placeholder:"Auto",min:0,units:["px","%"],devices:{desktop:{default:void 0},tablet:{default:void 0},mobile:{default:void 0}}},{id:"contentWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"default"},tablet:{default:"default"},mobile:{default:"default"}},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0}]},{id:"verticalGutter",type:"input:unit",units:["px"],min:0,label:"Spacing",devices:{desktop:{default:"32px"}}},{id:"overlayEnable",type:"toggle",default:!1},{id:"overlayOpacity",label:"Opacity",type:"input:slider",min:0,max:100,units:["%"],step:1,default:{normal:"20%"},state:{normal:!0,hover:!0},compoDefaultValue:{normal:"20%",hover:"20%"}},{id:"overlayColor",label:"Color",type:"color-picker-v2",state:{normal:!0,hover:!0}},{id:"borderBg",type:"border-v2",label:"Border",compoDefaultValue:{border:"solid",color:"line-3",width:"1px",borderWidth:"1px"}},{id:"cornerBg",type:"corner-v2",label:"Corner",default:{radiusType:"none"}},{id:"hasActiveShadow",type:"toggle",label:"Enable Button Shadow",default:!1},{id:"shadowBg",type:"shadow-v2",label:"Button Shadow",compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}},{id:"contentPadding",type:"padding-v2",devices:{desktop:{default:{top:"4px",left:"16px",bottom:"4px",right:"16px",linked:!1}},mobile:{default:{top:"16px",left:"16px",bottom:"16px",right:"16px",linked:!1}}},compoDefaultValue:{desktop:{default:{top:"4px",left:"16px",bottom:"4px",right:"16px",linked:!1}},mobile:{default:{top:"16px",left:"16px",bottom:"16px",right:"16px",linked:!1}}}}]}];export{SettingsV2};
@@ -1 +1 @@
1
- import{DEVICES as t,composePositionLineHeight as o}from"@gem-sdk/core";import{getDynamicSourceLocales as e,getStaticLocale as n}from"../../helpers.js";let composeIconWith=t=>({...t,desktop:t?.desktop??0,tablet:t?.tablet??t?.desktop??0,mobile:t?.mobile??t?.tablet??t?.desktop??0}),getTextIconNotFound=t=>"react"===t?"Icons not found":n("IconList","icons_not_found"),getTextIconTranslations=({setting:t,builderProps:o,pageContext:n,key:i,type:s})=>{let{childItem:l,translate:c}=t??{};return"react"===s?l?.[i]:e({val:l?.[i],uid:o?.uid,settingId:`childItem_${i}`,pageContext:n,translate:c,isReplaceLocationOrigin:!0})},getvalueMap=({setting:t})=>{let{childConfig:o,iconType:e,iconSvg:n}=t??{};return e&&"matching"!==e?"different"===e?o:void 0:Array(o?.length).fill(n)},composePostionIconList=(e,n,i)=>{let s={...i,desktop:i?.desktop??0,tablet:i?.tablet??i?.desktop??0,mobile:i?.mobile??i?.tablet??i?.desktop??0},l={};return t.forEach(t=>{o({compose:l,lineHeight:e,device:t,position:n,iconWidth:s})}),l};export{composeIconWith,composePostionIconList,getTextIconNotFound,getTextIconTranslations,getvalueMap};
1
+ import{DEVICES as t,composePositionLineHeight as e}from"@gem-sdk/core";import{getDynamicSourceLocales as o,getStaticLocale as n}from"../../helpers.js";let getTextIconNotFound=t=>"react"===t?"Icons not found":n("IconList","icons_not_found"),getTextIconTranslations=({setting:t,builderProps:e,pageContext:n,key:i,type:r})=>{let{childItem:s,translate:c}=t??{};return"react"===r?s?.[i]:o({val:s?.[i],uid:e?.uid,settingId:`childItem_${i}`,pageContext:n,translate:c,isReplaceLocationOrigin:!0})},getvalueMap=({setting:t})=>{let{childConfig:e,iconType:o,iconSvg:n}=t??{};return o&&"matching"!==o?"different"===o?e:void 0:Array(e?.length).fill(n)},composePostionIconList=(o,n,i)=>{let r={...i,desktop:i?.desktop??0,tablet:i?.tablet??i?.desktop??0,mobile:i?.mobile??i?.tablet??i?.desktop??0},s={};return t.forEach(t=>{e({compose:s,lineHeight:o,device:t,position:n,iconWidth:r})}),s};export{composePostionIconList,getTextIconNotFound,getTextIconTranslations,getvalueMap};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useGetProductId as s}from"../../hooks/useGetProductId.js";import o from"../../text/components/Text.js";import{createClass as i,createStyle as r,createAttr as m,If as l}from"@gem-sdk/system";import{getClassWraplistIcon as n,getClassColListIcon as a,getClassWrapItemIcon as c,getClassWrapIcon as d,getClassIcon as p,getClassTextItem as h}from"../common/classes.js";import{getStyleContainerIconlistMain as u,getStyleWraplistIcon as f,getStyleColListIcon as y,getStyleIcon as g,getStyleWrapIcon as j,getStyleWrapItemIcon as v,getStyleTypoText as N}from"../common/styles.js";import{getvalueMap as x,composePostionIconList as I,getTextIconTranslations as L,getTextIconNotFound as k,composeIconWith as w}from"../common/helpers.js";import{useIconLineHeight as S}from"../hooks/useIconLineHeight.js";let IconListV2=T=>{let{builderProps:W,builderAttrs:$,style:H,setting:V,styles:_,pageContext:q,advanced:C}=T,G=i({[W?.uid??""]:!0}),M=i(n()),P=i(a()),b=i(c({builderProps:W})),z=i(d()),A=i(p()),B=i(h({setting:V})),D=r(u({styles:_,style:H,type:"react",advanced:C})),E=r(f({styles:_})),F=r(y({styles:_})),J=r(g({styles:_,setting:V})),K=N({setting:V}),O=m({...$}),Q=k("react"),R=x({setting:V}),{ref:U,lineHeight:X}=S({iconWidth:w(V?.iconWidth)}),Y=I(X,_?.position,V?.iconWidth),{refContainer:Z,productID:ee}=s(),et=r({...j({styles:_,setting:V}),...Y.content}),es=r({...v({styles:_}),...Y.wrapper});return e("div",{...O,...W,"data-id":W?.uid,style:D,className:G,ref:Z,children:l(!R||!R.length,e("div",{children:Q}),e("div",{className:M,style:E,children:e("div",{className:P,style:F,children:R?.map((s,i)=>{let r=L({setting:V,builderProps:W,pageContext:q,key:i,type:"react"});return t("div",{"data-index":i,className:b,style:es,children:[e("div",{className:z,style:et,children:e("span",{style:J,className:A,dangerouslySetInnerHTML:{__html:s}})}),e(o,{setting:{text:r?.toString(),htmlTag:"div",options:{useState:!0,uniqueId:`${W?.uid}-${i}-${ee}`,productID:ee,customClass:{wrapper:"gp-w-full"}}},styles:K,className:B,ref:U})]},i)})})}))})};export{IconListV2 as default};
2
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useGetProductId as s}from"../../hooks/useGetProductId.js";import o from"../../text/components/Text.js";import{createClass as i,createStyle as r,createAttr as m,If as l}from"@gem-sdk/system";import{getClassWraplistIcon as n,getClassColListIcon as a,getClassWrapItemIcon as c,getClassWrapIcon as d,getClassIcon as p,getClassTextItem as h}from"../common/classes.js";import{getStyleContainerIconlistMain as u,getStyleWraplistIcon as f,getStyleColListIcon as y,getStyleIcon as g,getStyleWrapIcon as j,getStyleWrapItemIcon as v,getStyleTypoText as N}from"../common/styles.js";import{getvalueMap as x,composePostionIconList as I,getTextIconTranslations as L,getTextIconNotFound as k}from"../common/helpers.js";import{useIconLineHeight as w}from"../hooks/useIconLineHeight.js";let IconListV2=S=>{let{builderProps:T,builderAttrs:W,style:$,setting:H,styles:V,pageContext:_,advanced:q}=S,C=i({[T?.uid??""]:!0}),G=i(n()),M=i(a()),P=i(c({builderProps:T})),b=i(d()),z=i(p()),A=i(h({setting:H})),B=r(u({styles:V,style:$,type:"react",advanced:q})),D=r(f({styles:V})),E=r(y({styles:V})),F=r(g({styles:V,setting:H})),J=N({setting:H}),K=m({...W}),O=k("react"),Q=x({setting:H}),{ref:R,lineHeight:U}=w({iconWidth:H?.iconWidth}),X=I(U,V?.position,H?.iconWidth),{refContainer:Y,productID:Z}=s(),ee=r({...j({styles:V,setting:H}),...X.content}),et=r({...v({styles:V}),...X.wrapper});return e("div",{...K,...T,"data-id":T?.uid,style:B,className:C,ref:Y,children:l(!Q||!Q.length,e("div",{children:O}),e("div",{className:G,style:D,children:e("div",{className:M,style:E,children:Q?.map((s,i)=>{let r=L({setting:H,builderProps:T,pageContext:_,key:i,type:"react"});return t("div",{"data-index":i,className:P,style:et,children:[e("div",{className:b,style:ee,children:e("span",{style:F,className:z,dangerouslySetInnerHTML:{__html:s}})}),e(o,{setting:{text:r?.toString(),htmlTag:"div",options:{useState:!0,uniqueId:`${T?.uid}-${i}-${Z}`,productID:Z,customClass:{wrapper:"gp-w-full"}}},styles:J,className:A,ref:R})]},i)})})}))})};export{IconListV2 as default};
@@ -1 +1 @@
1
- import{useCurrentDevice as e}from"@gem-sdk/core";import{useRef as t,useState as r,useEffect as o}from"react";let useIconLineHeight=({iconWidth:i})=>{let n=t(null),[l,u]=r(""),c=e();return o(()=>{if(n?.current){let e=window.getComputedStyle(n?.current).getPropertyValue("line-height");u(e)}},[i,c]),{ref:n,lineHeight:l}};export{useIconLineHeight};
1
+ import{useRef as e,useState as t,useEffect as r}from"react";let useIconLineHeight=({iconWidth:n})=>{let i=e(null),[o,l]=t("");return r(()=>{if(i?.current){let e=window.getComputedStyle(i?.current).getPropertyValue("line-height");l(e)}},[n?.desktop]),{ref:i,lineHeight:o}};export{useIconLineHeight};
@@ -1 +1 @@
1
- import{HREF_TO_SALES_PAGE as t}from"../../constant.js";import{getAspectRatio as e,getNewBackupFileKey as r,getImageSrc as a,safeStringify as s,NEXT_IMAGE_CONFIG as i,getSrcSet as l,createBlurDataURL as o,IMAGE_PLACEHOLDER as g}from"./helpers.js";import{createAttr as p}from"@gem-sdk/system";import{handleClickLink as n}from"../../helpers.js";import{PRIORITY_LOAD_ATTRS as c}from"../constants.js";let getContainerAttrs=(t,e)=>({...t,...e&&{"data-id":e}}),getLinkWrapperAttrs=({urlData:e,imageLink:r,title:a,isLiquid:s=!1})=>{let i=s?{...e,...r?.noFollow&&{rel:"nofollow"},title:a}:{setting:e,title:a};return r?.type!=="go-to-sales-page"?r?.link?i:{}:s?{href:t,target:"_self"}:{setting:{href:t,target:"_self"}}},getImageLiquidAttrs=({pageContext:t,enableLazyLoadImage:e=!1})=>({...t&&{pageContext:t},...e&&{enableLazyLoadImage:e}}),getAdaptiveImageAttrs=({styles:t,setting:i,mode:l,isLiquid:o})=>{let{alt:g,srcSet:p,priority:u,qualityPercent:d,qualityType:m}=i??{},A=e({styles:t,setting:i}),y=()=>{n(i?.imageLink,l)},k=p?.desktop?.backupFileKey?r(p?.desktop?.backupFileKey??"",p?.desktop?.src??""):"",L=o?a({src:p?.desktop?.src,backupFileKey:k,backupFilePath:p?.desktop?.backupFilePath,storage:p?.desktop?.storage}):p?.desktop?.src??"",F=u?{}:{"base-src":L??"","quality-type":s(m),"quality-percent":s(d)};return{pictureClass:"gp-contents",...g&&{alt:g},...p&&{srcSet:p},...u&&c,...F,...t?.objectFit&&{layout:t.objectFit},onClick:y,aspectRatio:A}},getNextImageAttrs=({styles:t,setting:r})=>{let{objectFit:a}=t??{},{vw:s,alt:i,title:l,quality:o,priority:g,isNotLazyload:p,qualityType:n,qualityPercent:c}=r??{},u=e({styles:t,setting:r});return{...r?.image,...s&&{vw:s},...i&&{alt:i},...l&&{title:l},...o&&{quality:o},...g&&{priority:g},isNotLazyload:p,setting:{aspectRatio:u,layout:a,qualityType:n,qualityPercent:c}}},getNextImageLiquidAttrs=t=>{let{srcset:e,setting:g,storage:n,baseSrc:c,priority:u,customAttrs:d,width:m=2237,height:A=1678,isNotLazyload:y,backupFileKey:k,backupFilePath:L,srcIsLiquidCode:F,enableLazyLoadImage:b,alt:f,title:h,src:I=i.DEFAULT_SRC,sizes:q=i.DEFAULT_SIZES}=t,E=!y&&b&&!u,T=()=>{let t=k?r(k??"",I):"",s=F?c:a({src:I,backupFileKey:t,backupFilePath:L,storage:n}),i=F?I:l(t??"",n??"THEME",I),g={sizes:"100vw",src:o(m,A),...s&&!u?{"base-src":s}:{},...s?{"data-src":s}:{},...i?{"data-srcset":i}:{}},p={sizes:q,src:s??"",isNotLazyload:"true",srcset:e??"",...s&&!u?{"base-src":s}:{},...u?{loading:"eager",fetchpriority:"high"}:{loading:"lazy"}};return{"data-sizes":"auto",...E?g:p}},_=()=>{let{qualityPercent:t,qualityType:e}=g??{},r=!u&&e&&t?{"quality-type":s(e),"quality-percent":s(t)}:{"quality-type":"","quality-percent":""};return{...f&&{alt:f},...h&&{title:h},width:m,height:A,draggable:"false",...r}};return p({...d,..._(),...T()})},getNextImageReactAttrs=t=>{let{width:e=i.DEFAULT_WIDTH_PROPS,height:r=i.DEFAULT_HEIGHT_PROPS,quality:a,priority:s,isNotLazyload:l,enableLazyLoadImage:o,base64:n=g,alt:c=i.DEFAULT_ALT,title:u,src:d=i.DEFAULT_SRC}=t,m=!l&&o&&!s,A=()=>{let t={loading:"lazy",placeholder:"blur",...n&&{blurDataURL:n}},e={loading:"eager",fetchpriority:"high"};return{...m?t:e}},y=()=>({src:d,alt:c,title:u,width:e,height:r,quality:a}),k=y(),L=p(A());return{...k,...L}};export{getAdaptiveImageAttrs,getContainerAttrs,getImageLiquidAttrs,getLinkWrapperAttrs,getNextImageAttrs,getNextImageLiquidAttrs,getNextImageReactAttrs};
1
+ import{HREF_TO_SALES_PAGE as t}from"../../constant.js";import{getAspectRatio as e,getNewBackupFileKey as r,getImageSrc as a,safeStringify as s,NEXT_IMAGE_CONFIG as i,getSrcSet as l,createBlurDataURL as o,IMAGE_PLACEHOLDER as g}from"./helpers.js";import{createAttr as p}from"@gem-sdk/system";import{handleClickLink as n}from"../../helpers.js";import{PRIORITY_LOAD_ATTRS as c}from"../constants.js";let getContainerAttrs=(t,e)=>({...t,...e&&{"data-id":e}}),getLinkWrapperAttrs=({urlData:e,imageLink:r,title:a,isLiquid:s=!1})=>{let i=s?{...e,...r?.noFollow&&{rel:"nofollow"},title:a}:{setting:e,title:a};return r?.type!=="go-to-sales-page"?r?.link?i:{}:s?{href:t,target:"_self"}:{setting:{href:t,target:"_self"}}},getImageLiquidAttrs=({pageContext:t,enableLazyLoadImage:e=!1})=>({...t&&{pageContext:t},...e&&{enableLazyLoadImage:e}}),getAdaptiveImageAttrs=({styles:t,setting:i,mode:l,isLiquid:o})=>{let{alt:g,srcSet:p,priority:u,qualityPercent:d,qualityType:m}=i??{},A=e({styles:t,setting:i}),y=()=>{n(i?.imageLink,l)},k=p?.desktop?.backupFileKey?r(p?.desktop?.backupFileKey??"",p?.desktop?.src??""):"",L=o?a({src:p?.desktop?.src,backupFileKey:k,backupFilePath:p?.desktop?.backupFilePath,storage:p?.desktop?.storage}):p?.desktop?.src??"",F=u?{}:{"base-src":L??"","quality-type":s(m),"quality-percent":s(d)};return{pictureClass:"gp-contents",...g&&{alt:g},...p&&{srcSet:p},...u&&c,...F,...t?.objectFit&&{layout:t.objectFit},onClick:y,aspectRatio:A}},getNextImageAttrs=({styles:t,setting:r})=>{let{objectFit:a}=t??{},{vw:s,alt:i,title:l,quality:o,priority:g,isNotLazyload:p,qualityType:n,qualityPercent:c}=r??{},u=e({styles:t,setting:r});return{...r?.image,...s&&{vw:s},...i&&{alt:i},...l&&{title:l},...o&&{quality:o},...g&&{priority:g},isNotLazyload:p,setting:{aspectRatio:u,layout:a,qualityType:n,qualityPercent:c}}},getNextImageLiquidAttrs=t=>{let{srcset:e,setting:g,storage:n,baseSrc:c,priority:u,customAttrs:d,width:m=2237,height:A=1678,isNotLazyload:y,backupFileKey:k,backupFilePath:L,srcIsLiquidCode:F,enableLazyLoadImage:b,alt:f,title:h,src:I=i.DEFAULT_SRC,sizes:q=i.DEFAULT_SIZES}=t,E=!y&&b&&!u,T=()=>{let t=k?r(k??"",I):"",s=F?c:a({src:I,backupFileKey:t,backupFilePath:L,storage:n}),i=F?I:l(t??"",n??"THEME",I),g={sizes:"100vw",src:o(m,A),...s&&!u?{"base-src":s}:{},...s?{"data-src":s}:{},...i?{"data-srcset":i}:{}},p={sizes:q,src:s??"",isNotLazyload:"true",srcset:e??"",...s&&!u?{"base-src":s}:{},...u?{loading:"eager",fetchpriority:"high"}:{loading:"lazy"}};return{"data-sizes":"auto",...E?g:p}},_=()=>{let{qualityPercent:t,qualityType:e}=g??{},r=!u&&e&&t?{"quality-type":s(e),"quality-percent":s(t)}:{"quality-type":"","quality-percent":""};return{...f&&{alt:f},...h&&{title:h},width:m,height:A,draggable:"false",...r}};return p({...d,..._(),...T()})},getNextImageReactAttrs=t=>{let{width:e=i.DEFAULT_WIDTH_PROPS,height:r=i.DEFAULT_HEIGHT_PROPS,quality:a,priority:s,isNotLazyload:l,enableLazyLoadImage:o,base64:n=g,alt:c=i.DEFAULT_ALT,src:u=i.DEFAULT_SRC}=t,d=!l&&o&&!s,m=()=>{let t={loading:"lazy",placeholder:"blur",...n&&{blurDataURL:n}},e={loading:"eager",fetchpriority:"high"};return{...d?t:e}},A=()=>({src:u,alt:c,width:e,height:r,quality:a}),y=A(),k=p(m());return{...y,...k}};export{getAdaptiveImageAttrs,getContainerAttrs,getImageLiquidAttrs,getLinkWrapperAttrs,getNextImageAttrs,getNextImageLiquidAttrs,getNextImageReactAttrs};
@@ -7,7 +7,7 @@ import{template as t,isLocalEnv as s,baseAssetURL as a}from"@gem-sdk/core";impor
7
7
  assign supported_payment_methods = shop.enabled_payment_types
8
8
  -%}
9
9
  `)}
10
- <gp-product-dynamic data-id="${_?.uid}" data-translate-label='${$}' class="${u?.cssClass}" gp-data='${JSON.stringify(S).replaceAll("'","&#039;")}
10
+ <gp-product-dynamic data-id="${_?.uid}" data-translate-label="${$}" class="${u?.cssClass}" gp-data='${JSON.stringify(S).replaceAll("'","&#039;")}
11
11
  '>
12
12
  <div class="${v}">
13
13
  {{ form | payment_button }}
@@ -1 +1 @@
1
- import{useRef as e,useState as t,useCallback as r,useEffect as i}from"react";import{DESCRIPTION_LINE_HEIGHT_DEFAULT as l}from"../common/helpers.js";import{useProduct as n,useCurrentDevice as o,getResponsiveValueByScreen as p,useProductShopifyEditLink as u,useEditorMode as m,isSafari as s}from"@gem-sdk/core";let useGpDescription=c=>{let a=e(null),[h,g]=t(!1),[d,y]=t(!1),H=n(),f=o(),x=p(c?.hasLineClamp,f),w=p(c?.lineClamp,f),{redirectProductShopifyLink:C}=u(),D=m(),G=r(()=>{if(!a.current)return l;let e=window.getComputedStyle(a.current).getPropertyValue("line-height");return Math.ceil(parseFloat(e))},[]),M=r(e=>x&&w&&e?`${w*e}px`:"auto",[x,w]),P=()=>{if(!a.current)return;let e=G();h?a.current.style.maxHeight=M(e):a.current.style.maxHeight="none",g(e=>!e)};return i(()=>{let e=G();M(e)},[c?.typo?.custom,M,G]),i(()=>{let e=a.current;if(g(!1),!e)return;let t=x&&H?.descriptionHtml;t?setTimeout(()=>{let t=e?.scrollHeight??0,r=e?.clientHeight??0,i=r<t,l=window.getComputedStyle(e).getPropertyValue("line-height"),n=parseInt(l,10)||1,o=Math.round((t??0)/n),p=void 0!==w&&w<o,u=s()?p:i;e.style.maxHeight=M(n),w&&u?y(()=>!0):y(()=>!1)},100):e.style.maxHeight="none"},[x,w,H?.description,H?.descriptionHtml,G,M,g,y]),{ref:a,open:h,isShowViewMore:d,handleToggleShowMore:P,mode:D,redirectProductShopifyLink:C}};export{useGpDescription};
1
+ import{useRef as e,useState as t,useCallback as r,useEffect as i}from"react";import{DESCRIPTION_LINE_HEIGHT_DEFAULT as l}from"../common/helpers.js";import{useProduct as n,useCurrentDevice as o,getResponsiveValueByScreen as m,useProductShopifyEditLink as u,useEditorMode as p}from"@gem-sdk/core";let useGpDescription=s=>{let c=e(null),[a,h]=t(!1),[g,H]=t(!1),d=n(),y=o(),f=m(s?.hasLineClamp,y),x=m(s?.lineClamp,y),{redirectProductShopifyLink:C}=u(),w=p(),D=r(()=>{if(!c.current)return l;let e=window.getComputedStyle(c.current).getPropertyValue("line-height");return Math.ceil(parseFloat(e))},[]),G=r(e=>f&&x&&e?`${x*e}px`:"auto",[f,x]),M=()=>{if(!c.current)return;let e=D();a?c.current.style.maxHeight=G(e):c.current.style.maxHeight="none",h(e=>!e)};return i(()=>{let e=D();G(e)},[s?.typo?.custom,G,D]),i(()=>{let e=c.current;if(h(!1),!e)return;let t=f&&d?.descriptionHtml;t?setTimeout(()=>{let t=e?.scrollHeight??0,r=e?.clientHeight??0,i=D(),l=Math.round((t??0)/i);e.style.maxHeight=G(i);let n=x&&x<l||r<t;x&&n?H(()=>!0):H(()=>!1)},100):e.style.maxHeight="none"},[f,x,d?.description,d?.descriptionHtml,D,G,h,H]),{ref:c,open:a,isShowViewMore:g,handleToggleShowMore:M,mode:w,redirectProductShopifyLink:C}};export{useGpDescription};
@@ -1,4 +1,4 @@
1
- import{template as e,RenderIf as s,isLocalEnv as t,baseAssetURL as i}from"@gem-sdk/core";import{getSettingPreloadData as d,getStaticLocale as o}from"../../../helpers.js";import{If as r}from"@gem-sdk/system";import a from"./ProductListCarouselLayout.liquid.js";import n from"./ProductListGridLayout.liquid.js";import{getStyle as c}from"./common/styles.js";import{getClass as l}from"./common/classes.js";import{getDataLiquid as u}from"./common/helpers.js";let ProductList=g=>{let{setting:p,styles:f,pageContext:m}=g,$=m?.pageType==="GP_FUNNEL_PAGE";if($)return"";let{hasRelatedExclude:P,relatedExcludeTrim:h,collectionID:_,isLatestProducts:y,isGrid:v,numberOfProducts:E,productListId:k,productListHandles:x,sortedBy:S,isReverse:b,productSrc:L,productNumber:A,isSorted:R,relatedTag:I,collectionHandle:F}=u(g),j=()=>e`
1
+ import{template as e,RenderIf as s,isLocalEnv as t,baseAssetURL as i}from"@gem-sdk/core";import{getSettingPreloadData as d,getStaticLocale as o}from"../../../helpers.js";import{If as r}from"@gem-sdk/system";import a from"./ProductListCarouselLayout.liquid.js";import n from"./ProductListGridLayout.liquid.js";import{getStyle as c}from"./common/styles.js";import{getClass as l}from"./common/classes.js";import{getDataLiquid as u}from"./common/helpers.js";let ProductList=g=>{let{setting:p,styles:f,pageContext:m}=g,P=m?.pageType==="GP_FUNNEL_PAGE";if(P)return"";let{hasRelatedExclude:$,relatedExcludeTrim:h,collectionID:_,isLatestProducts:y,isGrid:v,numberOfProducts:E,productListId:k,productListHandles:x,sortedBy:S,isReverse:b,productSrc:L,productNumber:A,isSorted:R,relatedTag:I}=u(g),F=()=>e`
2
2
  ${s("RelatedProduct"===L,`
3
3
  assign relatedTag = '${I}'
4
4
  assign assignProduct = product
@@ -9,7 +9,7 @@ import{template as e,RenderIf as s,isLocalEnv as t,baseAssetURL as i}from"@gem-s
9
9
  assign handleAssignProduct = assignProduct.handle
10
10
  case relatedTag
11
11
  when 'collection'
12
- assign hasRelatedExclude = ${P}
12
+ assign hasRelatedExclude = ${$}
13
13
  if hasRelatedExclude
14
14
  assign relatedExclude = '${h}'
15
15
  else
@@ -63,7 +63,7 @@ import{template as e,RenderIf as s,isLocalEnv as t,baseAssetURL as i}from"@gem-s
63
63
  endfor
64
64
  when 'tags'
65
65
  assign tagsAssignProduct = assignProduct.tags
66
- assign hasRelatedExclude = ${P}
66
+ assign hasRelatedExclude = ${$}
67
67
  if hasRelatedExclude
68
68
  assign relatedExclude = '${h}'
69
69
  else
@@ -95,24 +95,7 @@ import{template as e,RenderIf as s,isLocalEnv as t,baseAssetURL as i}from"@gem-s
95
95
  assign products = products
96
96
  endpaginate
97
97
  `)}
98
- `,w=()=>{let s=F?`
99
- assign target_collection = collections['${F}']
100
- if target_collection == empty
101
- for collection in collections
102
- if collection.id == ${_}
103
- assign target_collection = collection
104
- break
105
- endif
106
- endfor
107
- endif
108
- `:`
109
- for collection in collections
110
- if collection.id == ${_}
111
- assign target_collection = collection
112
- break
113
- endif
114
- endfor
115
- `;return e`
98
+ `,j=()=>e`
116
99
  {%- liquid
117
100
  assign productHandles = '${x.toString()}'| split: ','
118
101
  assign products = null
@@ -120,14 +103,18 @@ import{template as e,RenderIf as s,isLocalEnv as t,baseAssetURL as i}from"@gem-s
120
103
  assign productSrc = '${L}'
121
104
  assign c = 0
122
105
  assign limit = ${A??4}
123
-
124
106
  if request.page_type == 'collection' or preview_page_type == 'collection'
125
107
  assign target_collection = collection
126
108
  if target_collection == empty or target_collection == null
127
109
  if '${_.toLowerCase()}' == 'latest'
128
110
  assign target_collection = collections | sort: 'updated_at' ${b?"| reverse":""} | first
129
111
  else
130
- ${s}
112
+ for collection in collections
113
+ if collection.id == ${_}
114
+ assign target_collection = collection
115
+ break
116
+ endif
117
+ endfor
131
118
  endif
132
119
  endif
133
120
  paginate target_collection.products by ${E||4}
@@ -135,7 +122,7 @@ import{template as e,RenderIf as s,isLocalEnv as t,baseAssetURL as i}from"@gem-s
135
122
  endpaginate
136
123
  else
137
124
  if productSrc == 'RelatedProduct'
138
- ${j()}
125
+ ${F()}
139
126
  elsif productSrc == 'PickProduct'
140
127
  unless ${y}
141
128
  assign products = null | sort
@@ -155,7 +142,12 @@ import{template as e,RenderIf as s,isLocalEnv as t,baseAssetURL as i}from"@gem-s
155
142
  if '${_.toLowerCase()}' == 'latest'
156
143
  assign target_collection = collections | sort: 'updated_at' ${b?"| reverse":""} | first
157
144
  else
158
- ${s}
145
+ for collection in collections
146
+ if collection.id == ${_}
147
+ assign target_collection = collection
148
+ break
149
+ endif
150
+ endfor
159
151
  endif
160
152
  paginate target_collection.products by ${E||4}
161
153
  assign products = target_collection.products ${R?S:""} ${b?"| reverse":""}
@@ -163,7 +155,7 @@ import{template as e,RenderIf as s,isLocalEnv as t,baseAssetURL as i}from"@gem-s
163
155
  endif
164
156
  endif
165
157
  -%}
166
- `},{productListWrapStyle:H,productListContentStyle:q,productListWrapAlignStyle:G}=c(g),{productListWrapClass:B}=l(g),T=()=>e`
158
+ `,{productListWrapStyle:w,productListContentStyle:H,productListWrapAlignStyle:q}=c(g),{productListWrapClass:G}=l(g),B=()=>e`
167
159
  {%- if products == null -%}
168
160
  {%- if count == 0 and ${k.length} == 0 -%}
169
161
  {% if '${L}' == 'RelatedProduct' -%}
@@ -186,17 +178,17 @@ import{template as e,RenderIf as s,isLocalEnv as t,baseAssetURL as i}from"@gem-s
186
178
 
187
179
  ${s(!!f?.preloadBgImage,`${s(!!f?.backgroundImage?.desktop?.image?.src,`<link rel="preload" href="${f?.backgroundImage?.desktop?.image?.src}" as="image" />`)}${s(!!f?.backgroundImage?.tablet?.image?.src,`<link rel="preload" href="${f?.backgroundImage?.tablet?.image?.src}" as="image" />`)}${s(!!f?.backgroundImage?.mobile?.image?.src,`<link rel="preload" href="${f?.backgroundImage?.mobile?.image?.src}" as="image" />`)}`)}
188
180
  <div
189
- class="${B}"
190
- style="${H}"
181
+ class="${G}"
182
+ style="${w}"
191
183
  >
192
- <div class='gp-flex gp-w-full' style="${G}">
184
+ <div class='gp-flex gp-w-full' style="${q}">
193
185
  <div
194
- style="${q}"
186
+ style="${H}"
195
187
  >
196
188
  {%- assign gpBkProduct = product -%}
197
189
  {%- assign gpBkProducts = products -%}
198
- ${w()}
199
- ${T()}
190
+ ${j()}
191
+ ${B()}
200
192
  {%- assign product = gpBkProduct -%}
201
193
  {%- assign products = gpBkProducts -%}
202
194
  </div>
@@ -1 +1 @@
1
- import{getSizeSetting as t}from"../../../helpers/product.js";import{convertUnitToNumber as e}from"../../product-images/common/productFeaturedImage.js";import{getUpdatedDotStyle as o}from"../../../../carousel/components/dot/common/helpers.js";let getData=e=>{let{setting:d,styles:r}=e,c=d?.productSetting??{},l="RelatedProduct"===c.productSrc,i=o(d?.dot,d?.dotStyle),a={dotSize:{desktop:12},dotGapToCarousel:{desktop:16},arrowIconSize:{desktop:24},showWhenHover:!1,rtl:!1,...d};delete a.childItem;let u={...r,sizeSetting:{...t({adaptiveHeight:r?.adaptiveHeight,height:r?.height,fullWidth:{desktop:!0}})},spacing:r?.spacing};return delete u.backgroundColor,delete u.backgroundImage,{isRelatedProduct:l,productSetting:c,dotStyle:i,carouselConfigSetting:a,carouselConfigStyle:u}},getDataLiquid=t=>{let{setting:o,styles:d}=t,r=o?.productSetting,c=r?.relatedTag,l=r?.hasRelatedExclude,i=(c&&"collection"===c[0]?r?.relatedCollectionExclude:r?.relatedTagsExclude)??"",a=i?.split(",").map(t=>t.trim()).toString(),u=r?.productSrc??"Collection",p=r?.collectionId?.replace(PREFIX_COLLECTION_ID,"")??"latest",n=r?.productSrc==="PickProduct"&&r?.productIds?.length===0,s=d?.layout==="grid",g=e(o?.numberOfProducts,4),I="PickProduct"===u&&r?.productIds?.length?r?.productIds.map(t=>t.replace(PREFIX_PRODUCT_ID,"")):[],m="PickProduct"===u&&r?.productHandles?.length?r?.productHandles:[],P=o?.orderBy&&o?.orderBy!=="none",h=(r?.productSrc==="Collection"||r?.productSrc==="DynamicCollection")&&P?o?.orderBy?.split("_"):"none",C=P&&h?.[0]==="TITLE"?"| sort: 'title'":"| sort: 'updated_at'",D=h?.[h.length-1]==="DESC",E=()=>"PickProduct"===u?n?4:r?.numOfSelectedProducts??4:g;return{hasRelatedExclude:l,relatedExcludeTrim:a,collectionID:p,isLatestProducts:n,isGrid:s,numberOfProducts:g,productListId:I,productListHandles:m,sortedBy:C,isReverse:D,productSrc:u,productSetting:r,isSorted:P,relatedTag:c,productNumber:E(),collectionHandle:r?.collectionHandle}},PREFIX_COLLECTION_ID="gid://shopify/Collection/",PREFIX_PRODUCT_ID="gid://shopify/Product/";export{PREFIX_COLLECTION_ID,PREFIX_PRODUCT_ID,getData,getDataLiquid};
1
+ import{getSizeSetting as t}from"../../../helpers/product.js";import{convertUnitToNumber as e}from"../../product-images/common/productFeaturedImage.js";import{getUpdatedDotStyle as o}from"../../../../carousel/components/dot/common/helpers.js";let getData=e=>{let{setting:r,styles:d}=e,c=r?.productSetting??{},l="RelatedProduct"===c.productSrc,i=o(r?.dot,r?.dotStyle),a={dotSize:{desktop:12},dotGapToCarousel:{desktop:16},arrowIconSize:{desktop:24},showWhenHover:!1,rtl:!1,...r};delete a.childItem;let u={...d,sizeSetting:{...t({adaptiveHeight:d?.adaptiveHeight,height:d?.height,fullWidth:{desktop:!0}})},spacing:d?.spacing};return delete u.backgroundColor,delete u.backgroundImage,{isRelatedProduct:l,productSetting:c,dotStyle:i,carouselConfigSetting:a,carouselConfigStyle:u}},getDataLiquid=t=>{let{setting:o,styles:r}=t,d=o?.productSetting,c=d?.relatedTag,l=d?.hasRelatedExclude,i=(c&&"collection"===c[0]?d?.relatedCollectionExclude:d?.relatedTagsExclude)??"",a=i?.split(",").map(t=>t.trim()).toString(),u=d?.productSrc??"Collection",p=d?.collectionId?.replace(PREFIX_COLLECTION_ID,"")??"latest",n=d?.productSrc==="PickProduct"&&d?.productIds?.length===0,s=r?.layout==="grid",g=e(o?.numberOfProducts,4),I="PickProduct"===u&&d?.productIds?.length?d?.productIds.map(t=>t.replace(PREFIX_PRODUCT_ID,"")):[],m="PickProduct"===u&&d?.productHandles?.length?d?.productHandles:[],P=o?.orderBy&&o?.orderBy!=="none",h=(d?.productSrc==="Collection"||d?.productSrc==="DynamicCollection")&&P?o?.orderBy?.split("_"):"none",C=P&&h?.[0]==="TITLE"?"| sort: 'title'":"| sort: 'updated_at'",D=h?.[h.length-1]==="DESC",E=()=>"PickProduct"===u?n?4:d?.numOfSelectedProducts??4:g;return{hasRelatedExclude:l,relatedExcludeTrim:a,collectionID:p,isLatestProducts:n,isGrid:s,numberOfProducts:g,productListId:I,productListHandles:m,sortedBy:C,isReverse:D,productSrc:u,productSetting:d,isSorted:P,relatedTag:c,productNumber:E()}},PREFIX_COLLECTION_ID="gid://shopify/Collection/",PREFIX_PRODUCT_ID="gid://shopify/Product/";export{PREFIX_COLLECTION_ID,PREFIX_PRODUCT_ID,getData,getDataLiquid};
@@ -1 +1 @@
1
- import{composeTypographyClassName as e,handleConvertClassColor as t,getGlobalColorStateClass as p,composeClasses as l}from"@gem-sdk/core";let getInputClasses=({styles:s,borderBtn:g,inputBackgroundColor:n,textColor:r,isDisabled:a})=>{let o="gp-flex gp-w-full gp-shrink-[99999] gp-appearance-none gp-items-center gp-text-center gp-outline-none focus-visible:gp-shadow-none focus-visible:gp-outline-none gp-transition-all gp-duration-150 hover:gp-text-black disabled:gp-cursor-not-allowed",i=e(s?.typo,s?.typography),u=t(g),c=p("bg",n),f=p("text",r);return u&&(o+=` ${u} `),i&&(o+=` ${i} `),c&&(o+=` ${c} `),f&&(o+=` ${f} `),a&&(o+="gp-cursor-not-allowed"),{...l(o)}},getButtonClass=({borderBtn:e,buttonBackgroundColor:s,iconColor:g,buttonSide:n,isDisabled:r})=>{let a=`gp-flex gp-aspect-square gp-h-full disabled:gp-cursor-not-allowed ${r?"gp-cursor-not-allowed":"gp-cursor-pointer"} gp-items-center gp-justify-center gp-outline-none ${"left"===n?"gp-minus":"gp-plus"} `,o=t(e),i=p("bg",s),u=p("text",g);return o&&(a+=` ${o} `),i&&(a+=` ${i} `),u&&(a+=` ${u} `),{...l(a)}},getContainerClasses=e=>({...l(`quantityClass gp-relative gp-inline-flex gp-h-12 gp-w-full gp-bg-transparent gp-transition-all gp-duration-150 data-[disabled=true]:gp-opacity-60 ${e??""}`)}),getWrapperClasses=()=>({...l("gp-inline-flex gp-w-full gp-overflow-hidden")}),getIconWrapperClasses=()=>({...l("gp-inline-flex gp-items-center gp-justify-center [&>*]:gp-h-full [&>*]:gp-w-full")});export{getButtonClass,getContainerClasses,getIconWrapperClasses,getInputClasses,getWrapperClasses};
1
+ import{composeTypographyClassName as e,handleConvertClassColor as t,getGlobalColorStateClass as p,composeClasses as l}from"@gem-sdk/core";let getInputClasses=({styles:g,borderBtn:s,inputBackgroundColor:n,textColor:r,isDisabled:a})=>{let o="gp-flex gp-w-full gp-px-1 gp-min-w-[45px] gp-shrink-[99999] gp-appearance-none gp-items-center gp-text-center gp-outline-none focus-visible:gp-shadow-none focus-visible:gp-outline-none gp-transition-all gp-duration-150 hover:gp-text-black disabled:gp-cursor-not-allowed",i=e(g?.typo,g?.typography),u=t(s),c=p("bg",n),f=p("text",r);return u&&(o+=` ${u} `),i&&(o+=` ${i} `),c&&(o+=` ${c} `),f&&(o+=` ${f} `),a&&(o+="gp-cursor-not-allowed"),{...l(o)}},getButtonClass=({borderBtn:e,buttonBackgroundColor:g,iconColor:s,buttonSide:n,isDisabled:r})=>{let a=`gp-flex gp-aspect-square gp-h-full disabled:gp-cursor-not-allowed ${r?"gp-cursor-not-allowed":"gp-cursor-pointer"} gp-items-center gp-justify-center gp-outline-none ${"left"===n?"gp-minus":"gp-plus"} `,o=t(e),i=p("bg",g),u=p("text",s);return o&&(a+=` ${o} `),i&&(a+=` ${i} `),u&&(a+=` ${u} `),{...l(a)}},getContainerClasses=e=>({...l(`quantityClass gp-relative gp-inline-flex gp-h-12 gp-w-full gp-bg-transparent gp-transition-all gp-duration-150 data-[disabled=true]:gp-opacity-60 ${e??""}`)}),getWrapperClasses=()=>({...l("gp-inline-flex gp-w-full gp-overflow-hidden")}),getIconWrapperClasses=()=>({...l("gp-inline-flex gp-items-center gp-justify-center [&>*]:gp-h-full [&>*]:gp-w-full")});export{getButtonClass,getContainerClasses,getIconWrapperClasses,getInputClasses,getWrapperClasses};
@@ -1 +1 @@
1
- import{CarouselSettingsV2Setting as e,CarouselSettingsV2Style as t}from"../../../../carousel/settings/configs/settings-v2.js";let ProductListSettingsV2=[{id:"setting",controls:[{id:"productSetting",type:"product-list",label:"Select product list",default:{productSrc:"PickProduct",productIds:[],collectionId:"Latest",collectionHandle:"",relatedType:"related-product",relatedTag:["collection"],hasRelatedExclude:!1}},{id:"slidesToShow",type:"input:slider",min:1,max:6,isNumber:!0,label:"Products per rows ",devices:{desktop:{default:4},tablet:{default:3},mobile:{default:2}}},{id:"numberOfProducts",type:"input:slider",min:1,max:50,label:"Number of products",isNumber:!0,default:10,ignoreMax:!0},{id:"sameHeight",label:"Enable same height",type:"select",options:[{label:"Same height",value:!0},{label:"Fit content height",value:!1}],default:!0},...e]},{id:"style",controls:[{id:"layout",label:"Layout",type:"layout-selector",iconViewBox:"0 0 78 52",itemPerRow:2,itemSpacing:"large",default:"grid",options:[{label:"Grid",value:"grid",iconName:"gp-grid-layout"},{label:"Slider",value:"slider",iconName:"gp-slider-layout"}]},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,isRowWith:!0,devices:{desktop:{default:"default"}},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0}]},{id:"height",label:"Height",type:"dropdown:input",inputType:"number",units:["px"],displayOptions:[{label:"Fit content",value:"Auto"}],devices:{}},{id:"horizontalGutter",label:"Row gap",type:"input:unit",fallbackValue:!0,min:0,units:["px","%"],devices:{desktop:{default:"16px"},mobile:{default:"16px"}}},{id:"verticalGutter",label:"Column gap",type:"input:unit",units:["px","%"],fallbackValue:!0,min:0,devices:{desktop:{default:"16px"},mobile:{default:"16px"}}},{id:"backgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"#DDDDDD"}},enableGradient:!0},{id:"backgroundImage",type:"background-image",devices:{desktop:{default:{}}},compoDefaultValue:{desktop:{default:{type:"image",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1200,height:480,hiddenSEO:!0},repeat:"no-repeat",size:"cover",position:{x:50,y:50},attachment:"scroll",preload:!1}}}},{id:"preloadBgImage",type:"toggle",label:"Preload",default:!1},{id:"align",label:"Align",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:"center"}}},...t]}];export{ProductListSettingsV2};
1
+ import{CarouselSettingsV2Setting as e,CarouselSettingsV2Style as t}from"../../../../carousel/settings/configs/settings-v2.js";let ProductListSettingsV2=[{id:"setting",controls:[{id:"productSetting",type:"product-list",label:"Select product list",default:{productSrc:"PickProduct",productIds:[],collectionId:"Latest",relatedType:"related-product",relatedTag:["collection"],hasRelatedExclude:!1}},{id:"slidesToShow",type:"input:slider",min:1,max:6,isNumber:!0,label:"Products per rows ",devices:{desktop:{default:4},tablet:{default:3},mobile:{default:2}}},{id:"numberOfProducts",type:"input:slider",min:1,max:50,label:"Number of products",isNumber:!0,default:10,ignoreMax:!0},{id:"sameHeight",label:"Enable same height",type:"select",options:[{label:"Same height",value:!0},{label:"Fit content height",value:!1}],default:!0},...e]},{id:"style",controls:[{id:"layout",label:"Layout",type:"layout-selector",iconViewBox:"0 0 78 52",itemPerRow:2,itemSpacing:"large",default:"grid",options:[{label:"Grid",value:"grid",iconName:"gp-grid-layout"},{label:"Slider",value:"slider",iconName:"gp-slider-layout"}]},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,isRowWith:!0,devices:{desktop:{default:"default"}},displayOptions:[{label:"Full",value:"100%",showValue:!0},{label:"Default",value:"default",showValue:!0}]},{id:"height",label:"Height",type:"dropdown:input",inputType:"number",units:["px"],displayOptions:[{label:"Fit content",value:"Auto"}],devices:{}},{id:"horizontalGutter",label:"Row gap",type:"input:unit",fallbackValue:!0,min:0,units:["px","%"],devices:{desktop:{default:"16px"},mobile:{default:"16px"}}},{id:"verticalGutter",label:"Column gap",type:"input:unit",units:["px","%"],fallbackValue:!0,min:0,devices:{desktop:{default:"16px"},mobile:{default:"16px"}}},{id:"backgroundColor",type:"color-picker-v2",devices:{desktop:{default:"transparent"}},compoDefaultValue:{desktop:{default:"#DDDDDD"}},enableGradient:!0},{id:"backgroundImage",type:"background-image",devices:{desktop:{default:{}}},compoDefaultValue:{desktop:{default:{type:"image",image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1200,height:480,hiddenSEO:!0},repeat:"no-repeat",size:"cover",position:{x:50,y:50},attachment:"scroll",preload:!1}}}},{id:"preloadBgImage",type:"toggle",label:"Preload",default:!1},{id:"align",label:"Align",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:"center"}}},...t]}];export{ProductListSettingsV2};
@@ -1 +1 @@
1
- import{makeStyle as e,makeStyleResponsive as t,makeGlobalSize as r,getSingleColorVariable as o,composeBorderResponsive as l,composeRadiusResponsive as i,getResponsiveStyleShadowWithoutState as n,getStyleShadow as a,makeLineClamp as d,getGlobalColorStyle as y,getGlobalColorStateStyle as h,composeTypographyStyle as s,getStyleBackgroundByDevice as p,getGradientBgrStyleByDevice as c,filterHoverVariables as u}from"@gem-sdk/core";import{formatThickness as g}from"./helpers.js";function filterTruthyStyles(e){return Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!!e))}let getStyle=(r,o)=>{let l={...e({mr:r?.spacing,mb:r?.spacing}),...t("ta",r?.align),...o,"--dynamic-source-color":"#F4F4F4"};return filterTruthyStyles(l)},getContainerStyle=(e,r)=>{let{tagWidth:o}=r??{},l={...t("jc",e?.align),...o};return filterTruthyStyles(l)},getTextStyle=(S,w)=>{let m=r(w?.globalSize),b=[S?.lineThrough&&"line-through",S?.typo?.attrs?.underline&&"underline"].filter(Boolean),f={...m?.width?.["--w"]?m.width:{"--w":"100%"},...e({tdc:o(S?.lineColor?.normal),tdt:g(S?.thickness)}),...l(S?.shapeBorder),...i(S?.shapeRounded),...n(S?.shapeBoxShadow,"box-shadow",S?.shapeBoxShadow),...a({value:S?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:S?.typo?.custom?.hasShadowText}),...t("ta",S?.textAlign),...t("line-clamp",d(S?.lineClamp,S?.hasLineClamp)),...S?.textColor?y(S.textColor):h("c",S?.color),...s(S?.typo,S?.typography),"word-break":"break-word",...p(w?.background),...m.padding,...c(w?.background,{desktop:!0,tablet:!0,mobile:!0}),overflow:"hidden",...S?.opacityPrice&&{opacity:`${S?.opacityPrice}%`},...e({tdl:b.join(" ")})};return S?.enableHoverEffect?filterTruthyStyles(f):u(f)},getTextStyleInline=e=>{let t={...s(e?.typo),"word-break":"break-word",overflow:"hidden"};return filterTruthyStyles(t)};export{getContainerStyle,getStyle,getTextStyle,getTextStyleInline};
1
+ import{makeStyle as e,makeStyleResponsive as t,makeGlobalSize as r,getSingleColorVariable as o,composeBorderResponsive as l,composeRadiusResponsive as i,getResponsiveStyleShadowWithoutState as n,getStyleShadow as a,makeLineClamp as d,getGlobalColorStyle as s,getGlobalColorStateStyle as h,composeTypographyStyle as y,getStyleBackgroundByDevice as c,getGradientBgrStyleByDevice as p,filterHoverVariables as u}from"@gem-sdk/core";import{formatThickness as g}from"./helpers.js";function filterTruthyStyles(e){return Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!!e))}let getStyle=(r,o)=>{let l={...e({mr:r?.spacing,mb:r?.spacing}),...t("ta",r?.align),...o,"--dynamic-source-color":"#F4F4F4"};return filterTruthyStyles(l)},getContainerStyle=(e,r)=>{let{tagWidth:o}=r??{},l={...t("jc",e?.align),...o};return filterTruthyStyles(l)},getTextStyle=(S,w)=>{let m=r(w?.globalSize),b=[S?.lineThrough&&"line-through",S?.typo?.attrs?.underline&&"underline"].filter(Boolean),f={...m?.width?.["--w"]?m.width:{"--w":"100%"},...e({tdc:o(S?.lineColor?.normal),tdt:g(S?.thickness)}),...l(S?.shapeBorder),...i(S?.shapeRounded),...n(S?.shapeBoxShadow,"box-shadow",S?.shapeBoxShadow),...a({value:S?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:S?.typo?.custom?.hasShadowText}),...t("ta",S?.textAlign),...t("line-clamp",d(S?.lineClamp,S?.hasLineClamp)),...S?.textColor?s(S.textColor):h("c",S?.color),...y(S?.typo),"word-break":"break-word",...c(w?.background),...m.padding,...p(w?.background,{desktop:!0,tablet:!0,mobile:!0}),overflow:"hidden",...S?.opacityPrice&&{opacity:`${S?.opacityPrice}%`},...e({tdl:b.join(" ")})};return S?.enableHoverEffect?filterTruthyStyles(f):u(f)},getTextStyleInline=e=>{let t={...y(e?.typo),"word-break":"break-word",overflow:"hidden"};return filterTruthyStyles(t)};export{getContainerStyle,getStyle,getTextStyle,getTextStyleInline};
@@ -1,12 +1,12 @@
1
- import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as i}from"@gem-sdk/core";import{getSettingPreloadData as l}from"../../helpers.js";import{createStateOrContext as r,createStyle as a,createClass as m,If as o}from"@gem-sdk/system";import{getArticleVimeoClasses as p,getImageVimeoClasses as c,getButtonVimeoClasses as d,getIframeVimeoClasses as g}from"../common/classes.js";import{getIframeVimeoStyle as f,getArticleVimeoStyle as n}from"../common/styles.js";import{getVimeoParams as y}from"../common/helpers.js";import $ from"../../image/components/NextImage.liquid.js";let LiteVimeoEmbed=b=>{let{title:h,id:u,lazy:v,aspectRatio:S,autoplay:j,muted:w,thumbnailLink:E,poster:x}=b,{iframeSrc:L}=y(b),k=!v,I=b.thumbnail,N=r({id:u,thumbnail:E,lazy:v,iframeSrc:L,title:h,autoplay:j,muted:w,style:b?.vimeoStyleIframe||""}),V=a({...f(S)}),A=a({...n(S,"")}),T=m({...p(I,S)}),C=m({...c(k)}),G=m({...d(k)}),M=m({...g()});return e`
1
+ import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as l}from"@gem-sdk/core";import{getSettingPreloadData as i}from"../../helpers.js";import{createStateOrContext as r,createStyle as a,createClass as m,If as o}from"@gem-sdk/system";import{getArticleVimeoClasses as p,getImageVimeoClasses as c,getButtonVimeoClasses as d,getIframeVimeoClasses as f}from"../common/classes.js";import{getIframeVimeoStyle as n,getArticleVimeoStyle as g}from"../common/styles.js";import{getVimeoParams as y}from"../common/helpers.js";import $ from"../../image/components/NextImage.liquid.js";let LiteVimeoEmbed=b=>{let{title:u,id:v,lazy:h,aspectRatio:S,autoplay:j,muted:E,thumbnailLink:w,poster:x}=b,{iframeSrc:L}=y(b),k=!h,I=b.thumbnail,N=r({id:v,thumbnail:w,lazy:h,iframeSrc:L,title:u,autoplay:j,muted:E,style:b?.vimeoStyleIframe||""}),V=a({...n(S)}),A=a({...g(S,"")}),T=m({...p(I,S)}),C=m({...c(k)}),G=m({...d(k)}),M=m({...f()});return e`
2
2
  <gp-lite-vimeo-embed gp-data='${JSON.stringify(N)}'>
3
3
  <article
4
4
  aria-hidden
5
5
  class="${T}"
6
- data-title="${h}"
6
+ data-title="${u}"
7
7
  style="${A}"
8
8
  >
9
- ${$({src:I,alt:x?.altText,title:x?.imageTitle,className:C,isDisableAspectStyle:!0,enableLazyLoadImage:!0,priority:x?.preload,height:x?.height,width:x?.width})}
9
+ ${$({src:I,alt:x?.altText,title:x?.imageTitle,className:C,isDisableAspectStyle:!0,enableLazyLoadImage:!0,priority:x?.preload})}
10
10
  ${o(!k,e`
11
11
  <button type="button" class="${G}" aria-label="Play">
12
12
  <svg class="gp-w-5 gp-text-white" viewBox="0 0 24 24">
@@ -19,7 +19,7 @@ import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as i}from"@gem-s
19
19
  ${o(k,e`
20
20
  <iframe
21
21
  style="${V}"
22
- title="${h}"
22
+ title="${u}"
23
23
  frameborder="0"
24
24
  allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
25
25
  allowfullscreen
@@ -28,5 +28,5 @@ import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as i}from"@gem-s
28
28
  ></iframe>`)}
29
29
  </article>
30
30
  </gp-lite-vimeo-embed>
31
- ${t(s,`<script ${l('class="gps-link" delay',"src")}="{{ 'gp-lite-vimeo-embed-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${l('class="gps-link" delay',"src")}="${i}/assets-v2/gp-lite-vimeo-embed-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
31
+ ${t(s,`<script ${i('class="gps-link" delay',"src")}="{{ 'gp-lite-vimeo-embed-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${i('class="gps-link" delay',"src")}="${l}/assets-v2/gp-lite-vimeo-embed-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
32
32
  `};export{LiteVimeoEmbed as default};