@gem-sdk/components 2.0.0-dev.879 → 2.0.0-dev.881

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.
@@ -1,25 +1,25 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),Row_liquid=require("../../../grid/components/Row.liquid.js"),AdaptiveImage_liquid=require("../../../image/components/AdaptiveImage.liquid.js"),common=require("../../helpers/common.js");const HeroBanner=({builderAttrs:e,builderProps:t,setting:o,styles:l,style:r,children:a,rawChildren:i,advanced:s})=>{let{link:n,layout:c,verticalAlign:g,order:p,alignBanner:d}=o??{},{background:m,overlayEnable:u,overlayColor:b,overlayOpacity:v,verticalGutter:h,contentWidth:f,hoverEffect:y,hoverEffectDuration:S,hoverEffectScale:w,cornerBg:$,borderBg:C,hasActiveShadow:k,shadowBg:B,sizeSetting:A,contentPadding:R}=l??{},x=o?.enableParallax||!1,P=Number(o?.speedParallax)||.6,q=common.getVisibilityStyle(r),I=core.makeStyleResponsive("h",core.getHeightByShapeGlobalSize(A)),_=core.makeStyleWithDefault("w",core.getWidthByShapeGlobalSize(A,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),j=common.getStyleAspectRatio(m,A),z=core.makeFixedBgAttachment(m),G=common.getResponsiveSetting(m||{}),E=common.getResponsiveSetting(d||{}),F=core.getPaddingGlobalSize(R),D=common.getContentPosition(o?.layout,l?.contentPosition1Col,l?.contentPosition2Col),H=common.mapContentPositionToHorizontal(D),W=()=>{let e={},t=common.getBgImage(m),o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=t?.[o]?.width,r=A?.[o]?.shape==="original";l&&r&&(e={...e,[o]:`${l}px`})}),e},O=core.removeUndefinedValuesFromObject(core.makeStyleWithDefault("w",W(),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}));return core.template`
2
- <div class='gp-flex gp-w-full gp-justify-center'>
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),Row_liquid=require("../../../grid/components/Row.liquid.js"),AdaptiveImage_liquid=require("../../../image/components/AdaptiveImage.liquid.js"),common=require("../../helpers/common.js");const HeroBanner=({builderAttrs:e,builderProps:t,setting:o,styles:l,style:r,children:a,rawChildren:i,advanced:s})=>{let{link:n,layout:c,verticalAlign:g,order:p,alignBanner:d}=o??{},{background:m,overlayEnable:u,overlayColor:b,overlayOpacity:v,verticalGutter:h,contentWidth:f,hoverEffect:y,hoverEffectDuration:S,hoverEffectScale:w,cornerBg:$,borderBg:C,hasActiveShadow:k,shadowBg:B,sizeSetting:R,contentPadding:A}=l??{},x=o?.enableParallax||!1,P=Number(o?.speedParallax)||.6,q=common.getVisibilityStyle(r),I=core.makeStyleResponsive("h",core.getHeightByShapeGlobalSize(R)),_=core.makeStyleWithDefault("w",core.getWidthByShapeGlobalSize(R,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),z=common.getStyleAspectRatio(m,R),G=core.makeFixedBgAttachment(m),j=common.getResponsiveSetting(m||{}),E=common.getResponsiveSetting(d||{}),F=core.getPaddingGlobalSize(A),D=common.getContentPosition(o?.layout,l?.contentPosition1Col,l?.contentPosition2Col),H=common.mapContentPositionToHorizontal(D),W=()=>{let e={},t=common.getBgImage(m),o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=t?.[o]?.width,r=R?.[o]?.shape==="original";l&&r&&(e={...e,[o]:`${l}px`})}),e},O=core.removeUndefinedValuesFromObject(core.makeStyleWithDefault("w",W(),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}));return core.template`
2
+ <div class="${core.cls("gp-flex gp-w-full",common.getClassJustify(E))}">
3
3
  <gp-hero-banner
4
- gp-data='${core.dataStringify({background:G,uid:t?.uid,enableParallax:x,speedParallax:P}).replaceAll("'","&#039;")}'
4
+ gp-data='${core.dataStringify({background:j,uid:t?.uid,enableParallax:x,speedParallax:P}).replaceAll("'","&#039;")}'
5
5
  ${{...e}}
6
- class="${core.cls(t?.uid,s?.cssClass,"gp-group/hero gp-flex gp-flex-col gp-transition-colors gp-duration-200 gp-ease-in-out gp-w-full",common.getClassAlignBanner(E))}"
7
- style="${{...r,...q,...I,..._,...j}}"
6
+ class="${core.cls(t?.uid,s?.cssClass,"gp-group/hero gp-flex gp-flex-col gp-transition-colors gp-duration-200 gp-ease-in-out gp-w-full")}"
7
+ style="${{...r,...q,...I,..._,...z}}"
8
8
  >
9
9
  <div
10
10
  class="${core.cls("gp-relative gp-flex gp-flex-col gp-items-center gp-overflow-hidden",{...common.getClassContentPosition(D||{})})}"
11
- style="${{...I,...j,...core.makeStyle({bs:C?.border??C?.border,bw:C?.width??C?.width,bc:core.getSingleColorVariable(C?.color)}),...core.getRadiusStyleActiveState({...$,active:{...$||{},radiusType:"custom"}}),...core.getStyleShadow({value:B,styleAppliedFor:"box-shadow",isEnableShadow:k})}}"
11
+ style="${{...I,...z,...core.makeStyle({bs:C?.border??C?.border,bw:C?.width??C?.width,bc:core.getSingleColorVariable(C?.color)}),...core.getRadiusStyleActiveState({...$,active:{...$||{},radiusType:"custom"}}),...core.getStyleShadow({value:B,styleAppliedFor:"box-shadow",isEnableShadow:k})}}"
12
12
  >
13
- ${AdaptiveImage_liquid.default({priority:o?.preload,pictureClass:"gp-w-full",srcSet:common.getBgImage(m),aspectRatio:core.getAspectRatioGlobalSize(A),style:{...common.getDisplayStyleByFitContent(A,m),...I,..._,...O,"--op":0,"--z":-1}})}
13
+ ${AdaptiveImage_liquid.default({priority:o?.preload,pictureClass:"gp-w-full",srcSet:common.getBgImage(m),aspectRatio:core.getAspectRatioGlobalSize(R),style:{...common.getDisplayStyleByFitContent(R,m),...I,..._,...O,"--op":0,"--z":-1}})}
14
14
  <div class="${core.cls("gp-absolute gp-w-full gp-h-full")}">
15
15
  <div
16
16
  class="${core.cls("gp-overflow-hidden gp-w-full gp-h-full")}"
17
- style="${{...z?.wrapper,"clip-path":"inset(0 0)"}}">
17
+ style="${{...G?.wrapper,"clip-path":"inset(0 0)"}}">
18
18
  <div
19
19
  aria-label="Background Image"
20
20
  role="banner"
21
21
  class="${core.cls("gp-hero-banner-bg gp-absolute gp-inset-0 gp-left-[var(--left)] gp-top-[var(--top)] gp-transition-transform gp-flex gp-items-center gp-justify-center gp-bg-clip-content",{"gp-duration-[var(--duration)] group-hover/hero:gp-scale-[var(--scale)]":y})}"
22
- style="${{...core.getStyleBackgroundByDevice(m,{liquid:!0,ignoreBgAttachment:!0}),"--duration":`${S??0}s`,"--scale":w??1,"--top":0,"--left":0,...z?.content,...core.getGradientBgrStyleByDevice(m)}}"
22
+ style="${{...core.getStyleBackgroundByDevice(m,{liquid:!0,ignoreBgAttachment:!0}),"--duration":`${S??0}s`,"--scale":w??1,"--top":0,"--left":0,...G?.content,...core.getGradientBgrStyleByDevice(m)}}"
23
23
  > </div>
24
24
  </div>
25
25
  ${core.RenderIf(u,core.template`<div
@@ -35,7 +35,7 @@
35
35
  aria-label="Hero banner link"
36
36
  class="gp-absolute gp-inset-0 gp-z-1"
37
37
  > </a>`)}
38
- ${Row_liquid.default({className:core.cls("gp-hero-banner-row gp-z-1 gp-w-full",common.getClassForContentByFitContent(A,m),common.getClassForStretchContent(g),common.getClassSpaceBetween(o?.layout||{},l?.contentPosition1Col||{},l?.contentPosition2Col||{})),setting:{layout:c,horizontalAlign:H,verticalAlign:g,order:p},styles:{verticalGutter:h,width:common.getWidth(f),fullWidth:{desktop:!1,tablet:!1,mobile:!1}},style:{...F},children:a,rawChildren:i})}
38
+ ${Row_liquid.default({className:core.cls("gp-hero-banner-row gp-z-1 gp-w-full",common.getClassForContentByFitContent(R,m),common.getClassForStretchContent(g),common.getClassSpaceBetween(o?.layout||{},l?.contentPosition1Col||{},l?.contentPosition2Col||{})),setting:{layout:c,horizontalAlign:H,verticalAlign:g,order:p},styles:{verticalGutter:h,width:common.getWidth(f),fullWidth:{desktop:!1,tablet:!1,mobile:!1}},style:{...F},children:a,rawChildren:i})}
39
39
  </div>
40
40
  </gp-hero-banner>
41
41
  </div>
@@ -1 +1 @@
1
- "use strict";var core=require("@gem-sdk/core");const 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]}),{}):{},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},getStyleAspectRatio=(e,t)=>{let o=core.getAspectRatioGlobalSize(t),l=["desktop","mobile","tablet"];return l.forEach(l=>{let n=core.getResponsiveValueByScreen(t,l),s=!!getDataVideoHeroBannerResponsive(l,e),i=n?.shape,a=n?.height,r="original"===i&&"fit-content"!==a,p=r&&s;p&&(o={...o,[l]:"16/9"})}),core.makeStyleResponsive("aspect",o)},getBgImage=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},getDisplayStyleByFitContent=(e,t)=>{let o={desktop:"none",tablet:"none",mobile:"none"},l=["desktop","mobile","tablet"];return l.forEach(l=>{let n=core.getResponsiveValueByScreen(e,l),s=!!getDataVideoHeroBannerResponsive(l,t),i=n?.shape,a=n?.height,r="original"===i&&"fit-content"!==a&&!s;o={...o,[l]:r?"block":"none"}}),core.makeStyleResponsive("d",o)},getClassForContentByFitContent=(e,t)=>{let o={desktop:!1,tablet:!1,mobile:!1},l=["desktop","mobile","tablet"];return l.forEach(l=>{let n=core.getResponsiveValueByScreen(e,l),s=!!getDataVideoHeroBannerResponsive(l,t),i=n?.shape,a=n?.height,r="original"===i&&"fit-content"!==a;o={...o,[l]:r&&!s}}),core.cls(o.desktop?"gp-absolute":"",o.tablet?"tablet:gp-absolute":"tablet:gp-relative",o.mobile?"mobile:gp-absolute":"mobile:gp-relative")},getClassForStretchContent=e=>{let t={desktop:"none",tablet:"none",mobile:"none"},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=core.getResponsiveValueByScreen(e,o);t={...t,[o]:l}}),core.cls("space-between"===t.desktop?"[&>*>*]:!gp-justify-between":"","space-between"===t.tablet?"tablet:[&>*>*]:!gp-justify-between ":`tablet:[&>*>*]:!gp-justify-${e?.tablet}`,"space-between"===t.mobile?"mobile:[&>*>*]:!gp-justify-between ":`mobile:[&>*>*]:!gp-justify-${e?.mobile}`)},getClassContentPosition=e=>{let t={center:"center",top:"start",bottom:"end","space-between":"between"},o=e.desktop||"center",l=e.tablet||o,n=e.mobile||l;return{[`!gp-justify-${t[o||"center"]}`]:!!o,[`tablet:!gp-justify-${t[l||"center"]}`]:!!l,[`mobile:!gp-justify-${t[n||"center"]}`]:!!n}},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}},getContentPosition=(e,t,o)=>{let l={},n=["desktop","tablet","mobile"];return n.map(n=>{let s=core.getResponsiveValueByScreen(e,n),i=core.getResponsiveValueByScreen(t,n),a=core.getResponsiveValueByScreen(o,n);l={...l,[n]:1>=(s?.cols?.length||1)?i:a}}),l},getClassSpaceBetween=(e,t,o)=>{let l=getResponsiveSetting(e),n=getResponsiveSetting(t),s=getResponsiveSetting(o),i=1>=(l?.desktop?.cols?.length||1)?n.desktop:s.desktop,a=1>=(l?.tablet?.cols?.length||1)?n.tablet:s.tablet,r=1>=(l?.mobile?.cols?.length||1)?n.mobile:s.mobile;return{"gp-h-full !gp-content-stretch [&>*]:!gp-justify-between":l.desktop?.cols?.length===1&&"space-between"===i,"!gp-content-stretch [&>*]:!gp-justify-start":l.desktop?.cols?.length===1&&"top"===i,"tablet:gp-h-full tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-between":l.tablet?.cols?.length===1&&"space-between"===a,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-start":l.tablet?.cols?.length===1&&"top"===a,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-center":l.tablet?.cols?.length===1&&"center"===a,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-end":l.tablet?.cols?.length===1&&"bottom"===a,"mobile:gp-h-full mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-between":l.mobile?.cols?.length===1&&"space-between"===r,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-start":l.mobile?.cols?.length===1&&"top"===r,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-center":l.mobile?.cols?.length===1&&"center"===r,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-end":l.mobile?.cols?.length===1&&"bottom"===r}},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}),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};exports.getBgImage=getBgImage,exports.getClassAlignBanner=getClassAlignBanner,exports.getClassContentPosition=getClassContentPosition,exports.getClassForContentByFitContent=getClassForContentByFitContent,exports.getClassForStretchContent=getClassForStretchContent,exports.getClassSpaceBetween=getClassSpaceBetween,exports.getContentPosition=getContentPosition,exports.getDataVideoHeroBannerResponsive=getDataVideoHeroBannerResponsive,exports.getDisplayStyleByFitContent=getDisplayStyleByFitContent,exports.getResponsiveSetting=getResponsiveSetting,exports.getStyleAspectRatio=getStyleAspectRatio,exports.getVisibilityStyle=getVisibilityStyle,exports.getWidth=getWidth,exports.mapContentPositionToHorizontal=mapContentPositionToHorizontal;
1
+ "use strict";var core=require("@gem-sdk/core");const 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]}),{}):{},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},getStyleAspectRatio=(e,t)=>{let o=core.getAspectRatioGlobalSize(t),l=["desktop","mobile","tablet"];return l.forEach(l=>{let s=core.getResponsiveValueByScreen(t,l),n=!!getDataVideoHeroBannerResponsive(l,e),i=s?.shape,a=s?.height,r="original"===i&&"fit-content"!==a,p=r&&n;p&&(o={...o,[l]:"16/9"})}),core.makeStyleResponsive("aspect",o)},getBgImage=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},getDisplayStyleByFitContent=(e,t)=>{let o={desktop:"none",tablet:"none",mobile:"none"},l=["desktop","mobile","tablet"];return l.forEach(l=>{let s=core.getResponsiveValueByScreen(e,l),n=!!getDataVideoHeroBannerResponsive(l,t),i=s?.shape,a=s?.height,r="original"===i&&"fit-content"!==a&&!n;o={...o,[l]:r?"block":"none"}}),core.makeStyleResponsive("d",o)},getClassForContentByFitContent=(e,t)=>{let o={desktop:!1,tablet:!1,mobile:!1},l=["desktop","mobile","tablet"];return l.forEach(l=>{let s=core.getResponsiveValueByScreen(e,l),n=!!getDataVideoHeroBannerResponsive(l,t),i=s?.shape,a=s?.height,r="original"===i&&"fit-content"!==a;o={...o,[l]:r&&!n}}),core.cls(o.desktop?"gp-absolute":"",o.tablet?"tablet:gp-absolute":"tablet:gp-relative",o.mobile?"mobile:gp-absolute":"mobile:gp-relative")},getClassForStretchContent=e=>{let t={desktop:"none",tablet:"none",mobile:"none"},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=core.getResponsiveValueByScreen(e,o);t={...t,[o]:l}}),core.cls("space-between"===t.desktop?"[&>*>*]:!gp-justify-between":"","space-between"===t.tablet?"tablet:[&>*>*]:!gp-justify-between ":`tablet:[&>*>*]:!gp-justify-${e?.tablet}`,"space-between"===t.mobile?"mobile:[&>*>*]:!gp-justify-between ":`mobile:[&>*>*]:!gp-justify-${e?.mobile}`)},getClassContentPosition=e=>{let t={center:"center",top:"start",bottom:"end","space-between":"between"},o=e.desktop||"center",l=e.tablet||o,s=e.mobile||l;return{[`!gp-justify-${t[o||"center"]}`]:!!o,[`tablet:!gp-justify-${t[l||"center"]}`]:!!l,[`mobile:!gp-justify-${t[s||"center"]}`]:!!s}},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}},getContentPosition=(e,t,o)=>{let l={},s=["desktop","tablet","mobile"];return s.map(s=>{let n=core.getResponsiveValueByScreen(e,s),i=core.getResponsiveValueByScreen(t,s),a=core.getResponsiveValueByScreen(o,s);l={...l,[s]:1>=(n?.cols?.length||1)?i:a}}),l},getClassSpaceBetween=(e,t,o)=>{let l=getResponsiveSetting(e),s=getResponsiveSetting(t),n=getResponsiveSetting(o),i=1>=(l?.desktop?.cols?.length||1)?s.desktop:n.desktop,a=1>=(l?.tablet?.cols?.length||1)?s.tablet:n.tablet,r=1>=(l?.mobile?.cols?.length||1)?s.mobile:n.mobile;return{"gp-h-full !gp-content-stretch [&>*]:!gp-justify-between":l.desktop?.cols?.length===1&&"space-between"===i,"!gp-content-stretch [&>*]:!gp-justify-start":l.desktop?.cols?.length===1&&"top"===i,"tablet:gp-h-full tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-between":l.tablet?.cols?.length===1&&"space-between"===a,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-start":l.tablet?.cols?.length===1&&"top"===a,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-center":l.tablet?.cols?.length===1&&"center"===a,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-end":l.tablet?.cols?.length===1&&"bottom"===a,"mobile:gp-h-full mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-between":l.mobile?.cols?.length===1&&"space-between"===r,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-start":l.mobile?.cols?.length===1&&"top"===r,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-center":l.mobile?.cols?.length===1&&"center"===r,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-end":l.mobile?.cols?.length===1&&"bottom"===r}},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}),getClassJustify=e=>({"!gp-justify-start":"left"===e.desktop,"!gp-justify-center":"center"===e.desktop,"!gp-justify-end":"right"===e.desktop,"tablet:!gp-justify-start":"left"===e.tablet,"tablet:!gp-justify-center":"center"===e.tablet,"tablet:!gp-justify-end":"right"===e.tablet,"mobile:!gp-justify-start":"left"===e.mobile,"mobile:!gp-justify-center":"center"===e.mobile,"mobile:!gp-justify-end":"right"===e.mobile}),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};exports.getBgImage=getBgImage,exports.getClassAlignBanner=getClassAlignBanner,exports.getClassContentPosition=getClassContentPosition,exports.getClassForContentByFitContent=getClassForContentByFitContent,exports.getClassForStretchContent=getClassForStretchContent,exports.getClassJustify=getClassJustify,exports.getClassSpaceBetween=getClassSpaceBetween,exports.getContentPosition=getContentPosition,exports.getDataVideoHeroBannerResponsive=getDataVideoHeroBannerResponsive,exports.getDisplayStyleByFitContent=getDisplayStyleByFitContent,exports.getResponsiveSetting=getResponsiveSetting,exports.getStyleAspectRatio=getStyleAspectRatio,exports.getVisibilityStyle=getVisibilityStyle,exports.getWidth=getWidth,exports.mapContentPositionToHorizontal=mapContentPositionToHorizontal;
@@ -1,31 +1,31 @@
1
- import{makeStyleResponsive as e,getHeightByShapeGlobalSize as t,makeStyleWithDefault as o,getWidthByShapeGlobalSize as r,makeFixedBgAttachment as l,getPaddingGlobalSize as a,removeUndefinedValuesFromObject as p,template as s,dataStringify as i,cls as g,makeStyle as n,getSingleColorVariable as c,getRadiusStyleActiveState as d,getStyleShadow as u,getAspectRatioGlobalSize as b,getStyleBackgroundByDevice as f,getGradientBgrStyleByDevice as v,RenderIf as h,getGlobalColorStateClass as m,getGlobalColorStateStyle as w,makeStyleState as $,isLocalEnv as y,baseAssetURL as x}from"@gem-sdk/core";import k from"../../../grid/components/Row.liquid.js";import j from"../../../image/components/AdaptiveImage.liquid.js";import{getVisibilityStyle as A,getStyleAspectRatio as P,getContentPosition as S,mapContentPositionToHorizontal as C,getClassAlignBanner as E,getClassContentPosition as z,getBgImage as B,getDisplayStyleByFitContent as _,getClassForContentByFitContent as q,getClassForStretchContent as H,getClassSpaceBetween as I,getWidth as N,getResponsiveSetting as R}from"../../helpers/common.js";let HeroBanner=({builderAttrs:G,builderProps:O,setting:T,styles:F,style:M,children:V,rawChildren:W,advanced:D})=>{let{link:J,layout:K,verticalAlign:L,order:Q,alignBanner:U}=T??{},{background:X,overlayEnable:Y,overlayColor:Z,overlayOpacity:ee,verticalGutter:et,contentWidth:eo,hoverEffect:er,hoverEffectDuration:el,hoverEffectScale:ea,cornerBg:ep,borderBg:es,hasActiveShadow:ei,shadowBg:eg,sizeSetting:en,contentPadding:ec}=F??{},ed=T?.enableParallax||!1,eu=Number(T?.speedParallax)||.6,eb=A(M),ef=e("h",t(en)),ev=o("w",r(en,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),eh=P(X,en),em=l(X),ew=R(X||{}),e$=R(U||{}),ey=a(ec),ex=S(T?.layout,F?.contentPosition1Col,F?.contentPosition2Col),ek=C(ex),ej=()=>{let e={},t=B(X),o=["desktop","mobile","tablet"];return o.forEach(o=>{let r=t?.[o]?.width,l=en?.[o]?.shape==="original";r&&l&&(e={...e,[o]:`${r}px`})}),e},eA=p(o("w",ej(),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}));return s`
2
- <div class='gp-flex gp-w-full gp-justify-center'>
1
+ import{makeStyleResponsive as e,getHeightByShapeGlobalSize as t,makeStyleWithDefault as o,getWidthByShapeGlobalSize as r,makeFixedBgAttachment as l,getPaddingGlobalSize as a,removeUndefinedValuesFromObject as p,template as s,cls as i,dataStringify as g,makeStyle as n,getSingleColorVariable as c,getRadiusStyleActiveState as d,getStyleShadow as u,getAspectRatioGlobalSize as b,getStyleBackgroundByDevice as f,getGradientBgrStyleByDevice as v,RenderIf as h,getGlobalColorStateClass as m,getGlobalColorStateStyle as w,makeStyleState as $,isLocalEnv as y,baseAssetURL as x}from"@gem-sdk/core";import k from"../../../grid/components/Row.liquid.js";import A from"../../../image/components/AdaptiveImage.liquid.js";import{getVisibilityStyle as P,getStyleAspectRatio as S,getContentPosition as j,mapContentPositionToHorizontal as C,getClassJustify as E,getClassContentPosition as z,getBgImage as B,getDisplayStyleByFitContent as _,getClassForContentByFitContent as q,getClassForStretchContent as H,getClassSpaceBetween as I,getWidth as N,getResponsiveSetting as R}from"../../helpers/common.js";let HeroBanner=({builderAttrs:G,builderProps:O,setting:T,styles:F,style:M,children:V,rawChildren:W,advanced:D})=>{let{link:J,layout:K,verticalAlign:L,order:Q,alignBanner:U}=T??{},{background:X,overlayEnable:Y,overlayColor:Z,overlayOpacity:ee,verticalGutter:et,contentWidth:eo,hoverEffect:er,hoverEffectDuration:el,hoverEffectScale:ea,cornerBg:ep,borderBg:es,hasActiveShadow:ei,shadowBg:eg,sizeSetting:en,contentPadding:ec}=F??{},ed=T?.enableParallax||!1,eu=Number(T?.speedParallax)||.6,eb=P(M),ef=e("h",t(en)),ev=o("w",r(en,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),eh=S(X,en),em=l(X),ew=R(X||{}),e$=R(U||{}),ey=a(ec),ex=j(T?.layout,F?.contentPosition1Col,F?.contentPosition2Col),ek=C(ex),eA=()=>{let e={},t=B(X),o=["desktop","mobile","tablet"];return o.forEach(o=>{let r=t?.[o]?.width,l=en?.[o]?.shape==="original";r&&l&&(e={...e,[o]:`${r}px`})}),e},eP=p(o("w",eA(),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}));return s`
2
+ <div class="${i("gp-flex gp-w-full",E(e$))}">
3
3
  <gp-hero-banner
4
- gp-data='${i({background:ew,uid:O?.uid,enableParallax:ed,speedParallax:eu}).replaceAll("'","&#039;")}'
4
+ gp-data='${g({background:ew,uid:O?.uid,enableParallax:ed,speedParallax:eu}).replaceAll("'","&#039;")}'
5
5
  ${{...G}}
6
- class="${g(O?.uid,D?.cssClass,"gp-group/hero gp-flex gp-flex-col gp-transition-colors gp-duration-200 gp-ease-in-out gp-w-full",E(e$))}"
6
+ class="${i(O?.uid,D?.cssClass,"gp-group/hero gp-flex gp-flex-col gp-transition-colors gp-duration-200 gp-ease-in-out gp-w-full")}"
7
7
  style="${{...M,...eb,...ef,...ev,...eh}}"
8
8
  >
9
9
  <div
10
- class="${g("gp-relative gp-flex gp-flex-col gp-items-center gp-overflow-hidden",{...z(ex||{})})}"
10
+ class="${i("gp-relative gp-flex gp-flex-col gp-items-center gp-overflow-hidden",{...z(ex||{})})}"
11
11
  style="${{...ef,...eh,...n({bs:es?.border??es?.border,bw:es?.width??es?.width,bc:c(es?.color)}),...d({...ep,active:{...ep||{},radiusType:"custom"}}),...u({value:eg,styleAppliedFor:"box-shadow",isEnableShadow:ei})}}"
12
12
  >
13
- ${j({priority:T?.preload,pictureClass:"gp-w-full",srcSet:B(X),aspectRatio:b(en),style:{..._(en,X),...ef,...ev,...eA,"--op":0,"--z":-1}})}
14
- <div class="${g("gp-absolute gp-w-full gp-h-full")}">
13
+ ${A({priority:T?.preload,pictureClass:"gp-w-full",srcSet:B(X),aspectRatio:b(en),style:{..._(en,X),...ef,...ev,...eP,"--op":0,"--z":-1}})}
14
+ <div class="${i("gp-absolute gp-w-full gp-h-full")}">
15
15
  <div
16
- class="${g("gp-overflow-hidden gp-w-full gp-h-full")}"
16
+ class="${i("gp-overflow-hidden gp-w-full gp-h-full")}"
17
17
  style="${{...em?.wrapper,"clip-path":"inset(0 0)"}}">
18
18
  <div
19
19
  aria-label="Background Image"
20
20
  role="banner"
21
- class="${g("gp-hero-banner-bg gp-absolute gp-inset-0 gp-left-[var(--left)] gp-top-[var(--top)] gp-transition-transform gp-flex gp-items-center gp-justify-center gp-bg-clip-content",{"gp-duration-[var(--duration)] group-hover/hero:gp-scale-[var(--scale)]":er})}"
21
+ class="${i("gp-hero-banner-bg gp-absolute gp-inset-0 gp-left-[var(--left)] gp-top-[var(--top)] gp-transition-transform gp-flex gp-items-center gp-justify-center gp-bg-clip-content",{"gp-duration-[var(--duration)] group-hover/hero:gp-scale-[var(--scale)]":er})}"
22
22
  style="${{...f(X,{liquid:!0,ignoreBgAttachment:!0}),"--duration":`${el??0}s`,"--scale":ea??1,"--top":0,"--left":0,...em?.content,...v(X)}}"
23
23
  > </div>
24
24
  </div>
25
25
  ${h(Y,s`<div
26
26
  aria-label="Overlay"
27
27
  role="banner"
28
- class="${g("gp-absolute gp-inset-0 gp-left-[var(--left)] gp-top-[var(--top)] gp-transition-all gp-duration-300 group-hover/hero:gp-bg-[color:var(--hvr-bgc,_var(--bgc))] group-hover/hero:gp-opacity-[var(--hvr-op,_var(--op))]",m("bg",Z))}"
28
+ class="${i("gp-absolute gp-inset-0 gp-left-[var(--left)] gp-top-[var(--top)] gp-transition-all gp-duration-300 group-hover/hero:gp-bg-[color:var(--hvr-bgc,_var(--bgc))] group-hover/hero:gp-opacity-[var(--hvr-op,_var(--op))]",m("bg",Z))}"
29
29
  style="${{...w("bgc",Z),"--top":0,"--left":0,...$("op",ee)}}"
30
30
  > </div>`)}
31
31
  </div>
@@ -35,7 +35,7 @@ import{makeStyleResponsive as e,getHeightByShapeGlobalSize as t,makeStyleWithDef
35
35
  aria-label="Hero banner link"
36
36
  class="gp-absolute gp-inset-0 gp-z-1"
37
37
  > </a>`)}
38
- ${k({className:g("gp-hero-banner-row gp-z-1 gp-w-full",q(en,X),H(L),I(T?.layout||{},F?.contentPosition1Col||{},F?.contentPosition2Col||{})),setting:{layout:K,horizontalAlign:ek,verticalAlign:L,order:Q},styles:{verticalGutter:et,width:N(eo),fullWidth:{desktop:!1,tablet:!1,mobile:!1}},style:{...ey},children:V,rawChildren:W})}
38
+ ${k({className:i("gp-hero-banner-row gp-z-1 gp-w-full",q(en,X),H(L),I(T?.layout||{},F?.contentPosition1Col||{},F?.contentPosition2Col||{})),setting:{layout:K,horizontalAlign:ek,verticalAlign:L,order:Q},styles:{verticalGutter:et,width:N(eo),fullWidth:{desktop:!1,tablet:!1,mobile:!1}},style:{...ey},children:V,rawChildren:W})}
39
39
  </div>
40
40
  </gp-hero-banner>
41
41
  </div>
@@ -1 +1 @@
1
- import{getAspectRatioGlobalSize as e,getResponsiveValueByScreen as t,makeStyleResponsive as o,cls as l}from"@gem-sdk/core";let 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]}),{}):{},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},getStyleAspectRatio=(l,n)=>{let i=e(n),s=["desktop","mobile","tablet"];return s.forEach(e=>{let o=t(n,e),s=!!getDataVideoHeroBannerResponsive(e,l),a=o?.shape,b=o?.height,p="original"===a&&"fit-content"!==b,g=p&&s;g&&(i={...i,[e]:"16/9"})}),o("aspect",i)},getBgImage=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},getDisplayStyleByFitContent=(e,l)=>{let n={desktop:"none",tablet:"none",mobile:"none"},i=["desktop","mobile","tablet"];return i.forEach(o=>{let i=t(e,o),s=!!getDataVideoHeroBannerResponsive(o,l),a=i?.shape,b=i?.height,p="original"===a&&"fit-content"!==b&&!s;n={...n,[o]:p?"block":"none"}}),o("d",n)},getClassForContentByFitContent=(e,o)=>{let n={desktop:!1,tablet:!1,mobile:!1},i=["desktop","mobile","tablet"];return i.forEach(l=>{let i=t(e,l),s=!!getDataVideoHeroBannerResponsive(l,o),a=i?.shape,b=i?.height,p="original"===a&&"fit-content"!==b;n={...n,[l]:p&&!s}}),l(n.desktop?"gp-absolute":"",n.tablet?"tablet:gp-absolute":"tablet:gp-relative",n.mobile?"mobile:gp-absolute":"mobile:gp-relative")},getClassForStretchContent=e=>{let o={desktop:"none",tablet:"none",mobile:"none"},n=["desktop","mobile","tablet"];return n.forEach(l=>{let n=t(e,l);o={...o,[l]:n}}),l("space-between"===o.desktop?"[&>*>*]:!gp-justify-between":"","space-between"===o.tablet?"tablet:[&>*>*]:!gp-justify-between ":`tablet:[&>*>*]:!gp-justify-${e?.tablet}`,"space-between"===o.mobile?"mobile:[&>*>*]:!gp-justify-between ":`mobile:[&>*>*]:!gp-justify-${e?.mobile}`)},getClassContentPosition=e=>{let t={center:"center",top:"start",bottom:"end","space-between":"between"},o=e.desktop||"center",l=e.tablet||o,n=e.mobile||l;return{[`!gp-justify-${t[o||"center"]}`]:!!o,[`tablet:!gp-justify-${t[l||"center"]}`]:!!l,[`mobile:!gp-justify-${t[n||"center"]}`]:!!n}},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}},getContentPosition=(e,o,l)=>{let n={},i=["desktop","tablet","mobile"];return i.map(i=>{let s=t(e,i),a=t(o,i),b=t(l,i);n={...n,[i]:1>=(s?.cols?.length||1)?a:b}}),n},getClassSpaceBetween=(e,t,o)=>{let l=getResponsiveSetting(e),n=getResponsiveSetting(t),i=getResponsiveSetting(o),s=1>=(l?.desktop?.cols?.length||1)?n.desktop:i.desktop,a=1>=(l?.tablet?.cols?.length||1)?n.tablet:i.tablet,b=1>=(l?.mobile?.cols?.length||1)?n.mobile:i.mobile;return{"gp-h-full !gp-content-stretch [&>*]:!gp-justify-between":l.desktop?.cols?.length===1&&"space-between"===s,"!gp-content-stretch [&>*]:!gp-justify-start":l.desktop?.cols?.length===1&&"top"===s,"tablet:gp-h-full tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-between":l.tablet?.cols?.length===1&&"space-between"===a,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-start":l.tablet?.cols?.length===1&&"top"===a,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-center":l.tablet?.cols?.length===1&&"center"===a,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-end":l.tablet?.cols?.length===1&&"bottom"===a,"mobile:gp-h-full mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-between":l.mobile?.cols?.length===1&&"space-between"===b,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-start":l.mobile?.cols?.length===1&&"top"===b,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-center":l.mobile?.cols?.length===1&&"center"===b,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-end":l.mobile?.cols?.length===1&&"bottom"===b}},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}),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};export{getBgImage,getClassAlignBanner,getClassContentPosition,getClassForContentByFitContent,getClassForStretchContent,getClassSpaceBetween,getContentPosition,getDataVideoHeroBannerResponsive,getDisplayStyleByFitContent,getResponsiveSetting,getStyleAspectRatio,getVisibilityStyle,getWidth,mapContentPositionToHorizontal};
1
+ import{getAspectRatioGlobalSize as e,getResponsiveValueByScreen as t,makeStyleResponsive as l,cls as o}from"@gem-sdk/core";let 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,l)=>({...t,[l]:e?.[l]!=="none"?"flex":e?.[l]}),{}):{},getWidth=e=>{let t={},l=["desktop","mobile","tablet"];return l.forEach(l=>{let o=e?.[l];o&&(t={...t,[l]:"default"===o?"var(--g-ct-w, 1200px)":o})}),t},getStyleAspectRatio=(o,n)=>{let i=e(n),s=["desktop","mobile","tablet"];return s.forEach(e=>{let l=t(n,e),s=!!getDataVideoHeroBannerResponsive(e,o),a=l?.shape,b=l?.height,p="original"===a&&"fit-content"!==b,g=p&&s;g&&(i={...i,[e]:"16/9"})}),l("aspect",i)},getBgImage=e=>{if(!e)return{};let t={desktop:e?.desktop?.image,tablet:e?.tablet?.image,mobile:e?.mobile?.image};return t},getDisplayStyleByFitContent=(e,o)=>{let n={desktop:"none",tablet:"none",mobile:"none"},i=["desktop","mobile","tablet"];return i.forEach(l=>{let i=t(e,l),s=!!getDataVideoHeroBannerResponsive(l,o),a=i?.shape,b=i?.height,p="original"===a&&"fit-content"!==b&&!s;n={...n,[l]:p?"block":"none"}}),l("d",n)},getClassForContentByFitContent=(e,l)=>{let n={desktop:!1,tablet:!1,mobile:!1},i=["desktop","mobile","tablet"];return i.forEach(o=>{let i=t(e,o),s=!!getDataVideoHeroBannerResponsive(o,l),a=i?.shape,b=i?.height,p="original"===a&&"fit-content"!==b;n={...n,[o]:p&&!s}}),o(n.desktop?"gp-absolute":"",n.tablet?"tablet:gp-absolute":"tablet:gp-relative",n.mobile?"mobile:gp-absolute":"mobile:gp-relative")},getClassForStretchContent=e=>{let l={desktop:"none",tablet:"none",mobile:"none"},n=["desktop","mobile","tablet"];return n.forEach(o=>{let n=t(e,o);l={...l,[o]:n}}),o("space-between"===l.desktop?"[&>*>*]:!gp-justify-between":"","space-between"===l.tablet?"tablet:[&>*>*]:!gp-justify-between ":`tablet:[&>*>*]:!gp-justify-${e?.tablet}`,"space-between"===l.mobile?"mobile:[&>*>*]:!gp-justify-between ":`mobile:[&>*>*]:!gp-justify-${e?.mobile}`)},getClassContentPosition=e=>{let t={center:"center",top:"start",bottom:"end","space-between":"between"},l=e.desktop||"center",o=e.tablet||l,n=e.mobile||o;return{[`!gp-justify-${t[l||"center"]}`]:!!l,[`tablet:!gp-justify-${t[o||"center"]}`]:!!o,[`mobile:!gp-justify-${t[n||"center"]}`]:!!n}},getResponsiveSetting=e=>{let t=e.desktop,l=e.tablet?e.tablet:t,o=e.mobile?e.mobile:l;return{desktop:t,tablet:l,mobile:o}},getContentPosition=(e,l,o)=>{let n={},i=["desktop","tablet","mobile"];return i.map(i=>{let s=t(e,i),a=t(l,i),b=t(o,i);n={...n,[i]:1>=(s?.cols?.length||1)?a:b}}),n},getClassSpaceBetween=(e,t,l)=>{let o=getResponsiveSetting(e),n=getResponsiveSetting(t),i=getResponsiveSetting(l),s=1>=(o?.desktop?.cols?.length||1)?n.desktop:i.desktop,a=1>=(o?.tablet?.cols?.length||1)?n.tablet:i.tablet,b=1>=(o?.mobile?.cols?.length||1)?n.mobile:i.mobile;return{"gp-h-full !gp-content-stretch [&>*]:!gp-justify-between":o.desktop?.cols?.length===1&&"space-between"===s,"!gp-content-stretch [&>*]:!gp-justify-start":o.desktop?.cols?.length===1&&"top"===s,"tablet:gp-h-full tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-between":o.tablet?.cols?.length===1&&"space-between"===a,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-start":o.tablet?.cols?.length===1&&"top"===a,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-center":o.tablet?.cols?.length===1&&"center"===a,"tablet:!gp-content-stretch tablet:[&>*]:!gp-justify-end":o.tablet?.cols?.length===1&&"bottom"===a,"mobile:gp-h-full mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-between":o.mobile?.cols?.length===1&&"space-between"===b,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-start":o.mobile?.cols?.length===1&&"top"===b,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-center":o.mobile?.cols?.length===1&&"center"===b,"mobile:!gp-content-stretch mobile:[&>*]:!gp-justify-end":o.mobile?.cols?.length===1&&"bottom"===b}},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}),getClassJustify=e=>({"!gp-justify-start":"left"===e.desktop,"!gp-justify-center":"center"===e.desktop,"!gp-justify-end":"right"===e.desktop,"tablet:!gp-justify-start":"left"===e.tablet,"tablet:!gp-justify-center":"center"===e.tablet,"tablet:!gp-justify-end":"right"===e.tablet,"mobile:!gp-justify-start":"left"===e.mobile,"mobile:!gp-justify-center":"center"===e.mobile,"mobile:!gp-justify-end":"right"===e.mobile}),mapContentPositionToHorizontal=e=>{let t={};for(let l in e)"top"===e[l]?t[l]="start":"bottom"===e[l]?t[l]="end":t[l]="center";return t};export{getBgImage,getClassAlignBanner,getClassContentPosition,getClassForContentByFitContent,getClassForStretchContent,getClassJustify,getClassSpaceBetween,getContentPosition,getDataVideoHeroBannerResponsive,getDisplayStyleByFitContent,getResponsiveSetting,getStyleAspectRatio,getVisibilityStyle,getWidth,mapContentPositionToHorizontal};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.879",
3
+ "version": "2.0.0-dev.881",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -26,7 +26,6 @@
26
26
  "@types/react-transition-group": "^4.4.5"
27
27
  },
28
28
  "dependencies": {
29
- "git": "^0.1.5",
30
29
  "keen-slider": "git+https://github.com/WolfieNguyen/keen-slider.git",
31
30
  "dynamic-marquee-react": "https://github.com/truongnc1/dynamic-marquee-react.git",
32
31
  "react-transition-group": "^4.4.5",