@gem-sdk/components 2.0.0-dev.721 → 2.0.0-dev.723

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.
@@ -55,13 +55,13 @@ const HeroBannerItem = (props)=>{
55
55
  ...getClasses.getBackgroundClasses(hoverEffect, enableLazyImage)
56
56
  });
57
57
  const backgroundStyle = system.createStyle({
58
- ...getStyle.getBackgroundStyle(styles, enableParallax, transform),
58
+ ...common.getBackgroundImageHeroBanner(background, enableLazyImage, isNotLiquid),
59
59
  ...core.getGradientBgrStyleByDevice(background, {
60
60
  desktop: true,
61
61
  tablet: true,
62
62
  mobile: true
63
63
  }),
64
- ...common.getBackgroundImageHeroBanner(background, enableLazyImage, isNotLiquid)
64
+ ...getStyle.getBackgroundStyle(styles, enableParallax, transform)
65
65
  });
66
66
  const containBackgroundClasses = system.createClass({
67
67
  ...getClasses.getContainBackgroundClasses()
@@ -56,8 +56,8 @@ const HeroBannerItem = (props)=>{
56
56
  ...getClasses.getBackgroundClasses(hoverEffect, enableLazyImage)
57
57
  });
58
58
  const backgroundStyle = system.createStyle({
59
- ...getStyle.getBackgroundStyle(styles, enableParallax, transform),
60
- ...common.getBackgroundImageHeroBanner(background, enableLazyImage, isNotLiquid)
59
+ ...common.getBackgroundImageHeroBanner(background, enableLazyImage, isNotLiquid),
60
+ ...getStyle.getBackgroundStyle(styles, enableParallax, transform)
61
61
  });
62
62
  const containBackgroundClasses = system.createClass({
63
63
  ...getClasses.getContainBackgroundClasses()
@@ -25,7 +25,7 @@ const Carousel = (props)=>{
25
25
  const { rootStyleRender, wrapperStyleRender, wrapperInnerStyle, sliderStyle } = getStyle.getStyle(renderData);
26
26
  const { rootAttrRender, sliderAttr } = getAttr.getAttr(renderData);
27
27
  const renderJS = ()=>{
28
- return core.RenderIf(core.isLocalEnv, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-carousel-v2.js' | asset_url }}" defer="defer"></script>`, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="${core.baseAssetURL}/assets-v2/gp-carousel-v2.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);
28
+ return core.RenderIf(core.isLocalEnv, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-carousel-v3.js' | asset_url }}" defer="defer"></script>`, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="${core.baseAssetURL}/assets-v2/gp-carousel-v3.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);
29
29
  };
30
30
  const renderArrow = (position)=>{
31
31
  const isNext = position === 'next';
@@ -77,9 +77,9 @@ const Carousel = (props)=>{
77
77
  class="${wrapperClassRender}"
78
78
  style="${wrapperStyleRender}"
79
79
  >
80
- <div class="${wrapperInnerClass}" style="${wrapperInnerStyle}">
80
+ <div ${sliderAttr} class="${wrapperInnerClass}" style="${wrapperInnerStyle}">
81
81
  ${renderArrow('prev')}
82
- <div ${sliderAttr} class="${sliderClass}" style="${sliderStyle}">
82
+ <div class="${sliderClass}" style="${sliderStyle}">
83
83
  ${renderChildren()}
84
84
  </div>
85
85
  ${renderArrow('next')}
@@ -98,7 +98,7 @@ const getClass = (props)=>{
98
98
  ...getDisplayOfWrapper()
99
99
  });
100
100
  const wrapperInnerClass = system.createClass({
101
- 'gp-relative gp-flex gp-items-center gp-justify-between': true,
101
+ 'gp-relative gp-overflow-hidden gp-flex gp-items-center gp-justify-between': true,
102
102
  '!gp-h-full': fullHeight,
103
103
  ...getWrapperInnerHeight(),
104
104
  ...makeFlexColClass()
@@ -116,7 +116,7 @@ const getClass = (props)=>{
116
116
  }
117
117
  });
118
118
  const sliderClass = system.createClass({
119
- 'gem-slider gp-h-full gp-overflow-hidden gp-select-none': true,
119
+ 'gem-slider-wrapper gp-flex gp-content-start gp-h-full gp-select-none': true,
120
120
  [sliderSelector]: true,
121
121
  ...slidesClass && {
122
122
  [slidesClass]: true
@@ -51,6 +51,8 @@ const getStyle = (props)=>{
51
51
  ...rootStyles
52
52
  });
53
53
  const sliderStyle = system.createStyle({
54
+ ...styleWidth,
55
+ ...styleHeight,
54
56
  ...makeSpacing()
55
57
  });
56
58
  return {
@@ -173,6 +173,9 @@ const carouselDotsSettings = {
173
173
  },
174
174
  setting: {
175
175
  id: 'dotStyle'
176
+ },
177
+ options: {
178
+ hiddenSwitchDeviceIcon: true
176
179
  }
177
180
  },
178
181
  {
@@ -182,6 +185,9 @@ const carouselDotsSettings = {
182
185
  },
183
186
  setting: {
184
187
  id: 'dotActiveColor'
188
+ },
189
+ options: {
190
+ hiddenSwitchDeviceIcon: true
185
191
  }
186
192
  },
187
193
  {
@@ -191,6 +197,9 @@ const carouselDotsSettings = {
191
197
  },
192
198
  setting: {
193
199
  id: 'dotColor'
200
+ },
201
+ options: {
202
+ hiddenSwitchDeviceIcon: true
194
203
  }
195
204
  }
196
205
  ],
@@ -203,6 +212,9 @@ const carouselDotsSettings = {
203
212
  },
204
213
  setting: {
205
214
  id: 'dotSize'
215
+ },
216
+ options: {
217
+ hiddenSwitchDeviceIcon: true
206
218
  }
207
219
  },
208
220
  {
@@ -212,6 +224,9 @@ const carouselDotsSettings = {
212
224
  },
213
225
  setting: {
214
226
  id: 'dotGapToCarousel'
227
+ },
228
+ options: {
229
+ hiddenSwitchDeviceIcon: true
215
230
  }
216
231
  }
217
232
  ]
@@ -126,7 +126,7 @@ const ProductImages = (props)=>{
126
126
  {% assign featured_image = product.featured_image %}
127
127
  ${system.LiquidIf(`variant != null and variant.featured_image != null`, `{% assign featured_image = variant.featured_image %}`)}
128
128
  `)}
129
- <gp-product-images-v2
129
+ <gp-product-images-v3
130
130
  gp-data='${gpData}'
131
131
  ${{
132
132
  ...gpProductImagesAttrs
@@ -148,8 +148,8 @@ const ProductImages = (props)=>{
148
148
  })}
149
149
  ${system.If(!isOnlyFeatureAllDevices, system.LiquidIf('product.media.size > 1', renderProductGalleryImages()))}
150
150
  </div>
151
- </gp-product-images-v2>
152
- ${system.If(core.isLocalEnv, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-product-images-v2.js' | asset_url }}" defer="defer"></script>`, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="${core.baseAssetURL}/assets-v2/gp-product-images-v2.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
151
+ </gp-product-images-v3>
152
+ ${system.If(core.isLocalEnv, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-product-images-v3.js' | asset_url }}" defer="defer"></script>`, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="${core.baseAssetURL}/assets-v2/gp-product-images-v3.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
153
153
  `;
154
154
  };
155
155
 
@@ -33,7 +33,8 @@ const product2Col = {
33
33
  mobile: {
34
34
  cols: [
35
35
  12
36
- ]
36
+ ],
37
+ display: 'fill'
37
38
  }
38
39
  },
39
40
  productSetting: {
@@ -286,7 +287,8 @@ const product2ColProductPage = {
286
287
  mobile: {
287
288
  cols: [
288
289
  12
289
- ]
290
+ ],
291
+ display: 'fill'
290
292
  }
291
293
  },
292
294
  productSetting: {
@@ -34,7 +34,8 @@ const productDefault = {
34
34
  mobile: {
35
35
  cols: [
36
36
  12
37
- ]
37
+ ],
38
+ display: 'fill'
38
39
  }
39
40
  },
40
41
  productSetting: {
@@ -288,7 +289,8 @@ const productDynamicProductPage = {
288
289
  mobile: {
289
290
  cols: [
290
291
  12
291
- ]
292
+ ],
293
+ display: 'fill'
292
294
  }
293
295
  },
294
296
  productSetting: {
@@ -249,7 +249,7 @@ const SettingUIV2 = [
249
249
  label: {
250
250
  en: 'Align'
251
251
  },
252
- conditionDisplay: `pageType != "POST_PURCHASE" && (layout.display !== 'fill' || (!!layout.cols && layout.cols.length > 1))`,
252
+ conditionDisplay: `pageType != "POST_PURCHASE" && (layout.display === 'fit' || (!!layout.cols && layout.cols.length > 1))`,
253
253
  controls: [
254
254
  {
255
255
  id: 'verticalAlign',
@@ -269,7 +269,7 @@ const SettingUIV2 = [
269
269
  setting: {
270
270
  id: 'horizontalAlign'
271
271
  },
272
- conditionDisplay: `layout.display !== 'fill'`,
272
+ conditionDisplay: `layout.display == 'fit'`,
273
273
  options: {
274
274
  disableMessage: `Horizontal Align is available when layout is "Fit to content"`
275
275
  }
@@ -51,13 +51,13 @@ const HeroBannerItem = (props)=>{
51
51
  ...getBackgroundClasses(hoverEffect, enableLazyImage)
52
52
  });
53
53
  const backgroundStyle = createStyle({
54
- ...getBackgroundStyle(styles, enableParallax, transform),
54
+ ...getBackgroundImageHeroBanner(background, enableLazyImage, isNotLiquid),
55
55
  ...getGradientBgrStyleByDevice(background, {
56
56
  desktop: true,
57
57
  tablet: true,
58
58
  mobile: true
59
59
  }),
60
- ...getBackgroundImageHeroBanner(background, enableLazyImage, isNotLiquid)
60
+ ...getBackgroundStyle(styles, enableParallax, transform)
61
61
  });
62
62
  const containBackgroundClasses = createClass({
63
63
  ...getContainBackgroundClasses()
@@ -52,8 +52,8 @@ const HeroBannerItem = (props)=>{
52
52
  ...getBackgroundClasses(hoverEffect, enableLazyImage)
53
53
  });
54
54
  const backgroundStyle = createStyle({
55
- ...getBackgroundStyle(styles, enableParallax, transform),
56
- ...getBackgroundImageHeroBanner(background, enableLazyImage, isNotLiquid)
55
+ ...getBackgroundImageHeroBanner(background, enableLazyImage, isNotLiquid),
56
+ ...getBackgroundStyle(styles, enableParallax, transform)
57
57
  });
58
58
  const containBackgroundClasses = createClass({
59
59
  ...getContainBackgroundClasses()
@@ -21,7 +21,7 @@ const Carousel = (props)=>{
21
21
  const { rootStyleRender, wrapperStyleRender, wrapperInnerStyle, sliderStyle } = getStyle(renderData);
22
22
  const { rootAttrRender, sliderAttr } = getAttr(renderData);
23
23
  const renderJS = ()=>{
24
- return RenderIf(isLocalEnv, `<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-carousel-v2.js' | asset_url }}" defer="defer"></script>`, `<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="${baseAssetURL}/assets-v2/gp-carousel-v2.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);
24
+ return RenderIf(isLocalEnv, `<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-carousel-v3.js' | asset_url }}" defer="defer"></script>`, `<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="${baseAssetURL}/assets-v2/gp-carousel-v3.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);
25
25
  };
26
26
  const renderArrow = (position)=>{
27
27
  const isNext = position === 'next';
@@ -73,9 +73,9 @@ const Carousel = (props)=>{
73
73
  class="${wrapperClassRender}"
74
74
  style="${wrapperStyleRender}"
75
75
  >
76
- <div class="${wrapperInnerClass}" style="${wrapperInnerStyle}">
76
+ <div ${sliderAttr} class="${wrapperInnerClass}" style="${wrapperInnerStyle}">
77
77
  ${renderArrow('prev')}
78
- <div ${sliderAttr} class="${sliderClass}" style="${sliderStyle}">
78
+ <div class="${sliderClass}" style="${sliderStyle}">
79
79
  ${renderChildren()}
80
80
  </div>
81
81
  ${renderArrow('next')}
@@ -96,7 +96,7 @@ const getClass = (props)=>{
96
96
  ...getDisplayOfWrapper()
97
97
  });
98
98
  const wrapperInnerClass = createClass({
99
- 'gp-relative gp-flex gp-items-center gp-justify-between': true,
99
+ 'gp-relative gp-overflow-hidden gp-flex gp-items-center gp-justify-between': true,
100
100
  '!gp-h-full': fullHeight,
101
101
  ...getWrapperInnerHeight(),
102
102
  ...makeFlexColClass()
@@ -114,7 +114,7 @@ const getClass = (props)=>{
114
114
  }
115
115
  });
116
116
  const sliderClass = createClass({
117
- 'gem-slider gp-h-full gp-overflow-hidden gp-select-none': true,
117
+ 'gem-slider-wrapper gp-flex gp-content-start gp-h-full gp-select-none': true,
118
118
  [sliderSelector]: true,
119
119
  ...slidesClass && {
120
120
  [slidesClass]: true
@@ -49,6 +49,8 @@ const getStyle = (props)=>{
49
49
  ...rootStyles
50
50
  });
51
51
  const sliderStyle = createStyle({
52
+ ...styleWidth,
53
+ ...styleHeight,
52
54
  ...makeSpacing()
53
55
  });
54
56
  return {
@@ -171,6 +171,9 @@ const carouselDotsSettings = {
171
171
  },
172
172
  setting: {
173
173
  id: 'dotStyle'
174
+ },
175
+ options: {
176
+ hiddenSwitchDeviceIcon: true
174
177
  }
175
178
  },
176
179
  {
@@ -180,6 +183,9 @@ const carouselDotsSettings = {
180
183
  },
181
184
  setting: {
182
185
  id: 'dotActiveColor'
186
+ },
187
+ options: {
188
+ hiddenSwitchDeviceIcon: true
183
189
  }
184
190
  },
185
191
  {
@@ -189,6 +195,9 @@ const carouselDotsSettings = {
189
195
  },
190
196
  setting: {
191
197
  id: 'dotColor'
198
+ },
199
+ options: {
200
+ hiddenSwitchDeviceIcon: true
192
201
  }
193
202
  }
194
203
  ],
@@ -201,6 +210,9 @@ const carouselDotsSettings = {
201
210
  },
202
211
  setting: {
203
212
  id: 'dotSize'
213
+ },
214
+ options: {
215
+ hiddenSwitchDeviceIcon: true
204
216
  }
205
217
  },
206
218
  {
@@ -210,6 +222,9 @@ const carouselDotsSettings = {
210
222
  },
211
223
  setting: {
212
224
  id: 'dotGapToCarousel'
225
+ },
226
+ options: {
227
+ hiddenSwitchDeviceIcon: true
213
228
  }
214
229
  }
215
230
  ]
@@ -122,7 +122,7 @@ const ProductImages = (props)=>{
122
122
  {% assign featured_image = product.featured_image %}
123
123
  ${LiquidIf(`variant != null and variant.featured_image != null`, `{% assign featured_image = variant.featured_image %}`)}
124
124
  `)}
125
- <gp-product-images-v2
125
+ <gp-product-images-v3
126
126
  gp-data='${gpData}'
127
127
  ${{
128
128
  ...gpProductImagesAttrs
@@ -144,8 +144,8 @@ const ProductImages = (props)=>{
144
144
  })}
145
145
  ${If(!isOnlyFeatureAllDevices, LiquidIf('product.media.size > 1', renderProductGalleryImages()))}
146
146
  </div>
147
- </gp-product-images-v2>
148
- ${If(isLocalEnv, `<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-product-images-v2.js' | asset_url }}" defer="defer"></script>`, `<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="${baseAssetURL}/assets-v2/gp-product-images-v2.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
147
+ </gp-product-images-v3>
148
+ ${If(isLocalEnv, `<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-product-images-v3.js' | asset_url }}" defer="defer"></script>`, `<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="${baseAssetURL}/assets-v2/gp-product-images-v3.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
149
149
  `;
150
150
  };
151
151
 
@@ -31,7 +31,8 @@ const product2Col = {
31
31
  mobile: {
32
32
  cols: [
33
33
  12
34
- ]
34
+ ],
35
+ display: 'fill'
35
36
  }
36
37
  },
37
38
  productSetting: {
@@ -284,7 +285,8 @@ const product2ColProductPage = {
284
285
  mobile: {
285
286
  cols: [
286
287
  12
287
- ]
288
+ ],
289
+ display: 'fill'
288
290
  }
289
291
  },
290
292
  productSetting: {
@@ -32,7 +32,8 @@ const productDefault = {
32
32
  mobile: {
33
33
  cols: [
34
34
  12
35
- ]
35
+ ],
36
+ display: 'fill'
36
37
  }
37
38
  },
38
39
  productSetting: {
@@ -286,7 +287,8 @@ const productDynamicProductPage = {
286
287
  mobile: {
287
288
  cols: [
288
289
  12
289
- ]
290
+ ],
291
+ display: 'fill'
290
292
  }
291
293
  },
292
294
  productSetting: {
@@ -247,7 +247,7 @@ const SettingUIV2 = [
247
247
  label: {
248
248
  en: 'Align'
249
249
  },
250
- conditionDisplay: `pageType != "POST_PURCHASE" && (layout.display !== 'fill' || (!!layout.cols && layout.cols.length > 1))`,
250
+ conditionDisplay: `pageType != "POST_PURCHASE" && (layout.display === 'fit' || (!!layout.cols && layout.cols.length > 1))`,
251
251
  controls: [
252
252
  {
253
253
  id: 'verticalAlign',
@@ -267,7 +267,7 @@ const SettingUIV2 = [
267
267
  setting: {
268
268
  id: 'horizontalAlign'
269
269
  },
270
- conditionDisplay: `layout.display !== 'fill'`,
270
+ conditionDisplay: `layout.display == 'fit'`,
271
271
  options: {
272
272
  disableMessage: `Horizontal Align is available when layout is "Fit to content"`
273
273
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.721",
3
+ "version": "2.0.0-dev.723",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -25,7 +25,7 @@
25
25
  "scan-all-text": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/scan-all-text && node ./scripts/scan-all-text"
26
26
  },
27
27
  "devDependencies": {
28
- "@gem-sdk/core": "2.0.0-dev.719",
28
+ "@gem-sdk/core": "2.0.0-dev.723",
29
29
  "@gem-sdk/styles": "2.0.0-dev.703",
30
30
  "@gem-sdk/system": "2.0.0-dev.695",
31
31
  "@types/react-transition-group": "^4.4.5",