@gem-sdk/components 2.1.13-staging.11 → 2.1.13-staging.12

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.
@@ -219,8 +219,8 @@ const HeroBanner = ({ builderAttrs, builderProps, setting, styles, style, childr
219
219
  ...core.makeStyleResponsive('pos', getAttachmentDevice()),
220
220
  ...index.getStyleHeroBannerBg(backgroundResponsive || {}, enableParallax)
221
221
  }}"
222
- ${embed()}
223
222
  >
223
+ ${embed()}
224
224
  ${!setting?.preload ? getSrcSet.DEVICES.map((device)=>{
225
225
  return core.RenderIf(getEnableBgImageByDevice(device), NextImage_liquid.default({
226
226
  src: getSrcSet.getImageSrc(core.getResponsiveValueByScreen(srcSet, device), device),
@@ -27,13 +27,14 @@ const getHeightHeroBanner = (background, enableParallax)=>{
27
27
  'tablet'
28
28
  ];
29
29
  DEVICES.forEach((device)=>{
30
+ const enableParallaxDevice = background?.[device]?.type === 'image' ? enableParallax : false;
30
31
  const isScale = isScaleImage({
31
- enableParallax,
32
+ enableParallax: enableParallaxDevice,
32
33
  attachment: background[device]?.attachment
33
34
  });
34
35
  result = {
35
36
  ...result,
36
- [device]: enableParallax ? '150%' : isScale ? '100vh' : '100%'
37
+ [device]: enableParallaxDevice ? '150%' : isScale ? '100vh' : '100%'
37
38
  };
38
39
  });
39
40
  return core.makeStyleResponsive('h', result);
@@ -46,8 +47,9 @@ const getWidthHeroBanner = (background, enableParallax)=>{
46
47
  'tablet'
47
48
  ];
48
49
  DEVICES.forEach((device)=>{
50
+ const enableParallaxDevice = background?.[device]?.type === 'image' ? enableParallax : false;
49
51
  const isScale = isScaleImage({
50
- enableParallax,
52
+ enableParallax: enableParallaxDevice,
51
53
  attachment: background[device]?.attachment
52
54
  });
53
55
  result = {
@@ -215,8 +215,8 @@ const HeroBanner = ({ builderAttrs, builderProps, setting, styles, style, childr
215
215
  ...makeStyleResponsive('pos', getAttachmentDevice()),
216
216
  ...getStyleHeroBannerBg(backgroundResponsive || {}, enableParallax)
217
217
  }}"
218
- ${embed()}
219
218
  >
219
+ ${embed()}
220
220
  ${!setting?.preload ? DEVICES.map((device)=>{
221
221
  return RenderIf(getEnableBgImageByDevice(device), NextImage({
222
222
  src: getImageSrc(getResponsiveValueByScreen(srcSet, device), device),
@@ -25,13 +25,14 @@ const getHeightHeroBanner = (background, enableParallax)=>{
25
25
  'tablet'
26
26
  ];
27
27
  DEVICES.forEach((device)=>{
28
+ const enableParallaxDevice = background?.[device]?.type === 'image' ? enableParallax : false;
28
29
  const isScale = isScaleImage({
29
- enableParallax,
30
+ enableParallax: enableParallaxDevice,
30
31
  attachment: background[device]?.attachment
31
32
  });
32
33
  result = {
33
34
  ...result,
34
- [device]: enableParallax ? '150%' : isScale ? '100vh' : '100%'
35
+ [device]: enableParallaxDevice ? '150%' : isScale ? '100vh' : '100%'
35
36
  };
36
37
  });
37
38
  return makeStyleResponsive('h', result);
@@ -44,8 +45,9 @@ const getWidthHeroBanner = (background, enableParallax)=>{
44
45
  'tablet'
45
46
  ];
46
47
  DEVICES.forEach((device)=>{
48
+ const enableParallaxDevice = background?.[device]?.type === 'image' ? enableParallax : false;
47
49
  const isScale = isScaleImage({
48
- enableParallax,
50
+ enableParallax: enableParallaxDevice,
49
51
  attachment: background[device]?.attachment
50
52
  });
51
53
  result = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.1.13-staging.11",
3
+ "version": "2.1.13-staging.12",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",