@gem-sdk/components 2.0.0-dev.582 → 2.0.0-dev.583

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.
@@ -21,7 +21,7 @@ const CarouselSettingsV2Setting = [
21
21
  },
22
22
  {
23
23
  id: 'sneakPeak',
24
- label: 'Sneak peak',
24
+ label: 'Sneak peek',
25
25
  type: 'sneak-peak',
26
26
  devices: {
27
27
  desktop: {
@@ -249,8 +249,7 @@ const CarouselSettingsV2Setting = [
249
249
  {
250
250
  id: 'arrowCustom',
251
251
  type: 'icon',
252
- hideInput: true,
253
- hideLabel: true,
252
+ isHideClear: true,
254
253
  default: `<svg data-name="arrow" width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
255
254
  <path fill-rule="evenodd" clip-rule="evenodd" d="M7.62204 5.13313C7.78476 4.95562 8.04858 4.95562 8.21129 5.13313L12.378 9.67859C12.5407 9.8561 12.5407 10.1439 12.378 10.3214L8.21129 14.8669C8.04858 15.0444 7.78476 15.0444 7.62204 14.8669C7.45932 14.6894 7.45932 14.4016 7.62204 14.224L11.4941 10L7.62204 5.77596C7.45932 5.59845 7.45932 5.31064 7.62204 5.13313Z"/>
256
255
  </svg>
@@ -26,7 +26,7 @@ const SettingUIV1 = [
26
26
  {
27
27
  type: 'control',
28
28
  label: {
29
- en: 'Sneak peak'
29
+ en: 'Sneak peek'
30
30
  },
31
31
  setting: {
32
32
  id: 'sneakPeak'
@@ -324,7 +324,7 @@ const SettingUIV2 = [
324
324
  controls: [
325
325
  {
326
326
  label: {
327
- en: 'Sneak peak'
327
+ en: 'Sneak peek'
328
328
  },
329
329
  type: 'combo',
330
330
  setting: {
@@ -0,0 +1,28 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var core = require('@gem-sdk/core');
6
+ var getClass = require('./common/getClass.js');
7
+
8
+ const ProductListItem = (props)=>{
9
+ const { pageContext, children } = props;
10
+ const { productItemClass, gpProductClass } = getClass.getClass(props);
11
+ return core.template /* liquid */ `
12
+ <gp-product
13
+ gp-context='{"variantSelected": {{ variant | json | escape }}, "quantity": 1 , "formId": "{{ product_form_id }}"}'
14
+ gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(pageContext)}}'
15
+ class="${gpProductClass}"
16
+
17
+ >
18
+ {%- form 'product', product, id: product_form_id, class: 'form contents ${productItemClass}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
19
+ <input type="hidden" name="id" value="{{ variant.id }}" />
20
+ <input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
21
+ <button type="submit" onclick="return false;" style="display:none;"></button>
22
+ ${children}
23
+ {%- endform -%}
24
+ </gp-product>
25
+ `;
26
+ };
27
+
28
+ exports.default = ProductListItem;
@@ -9,7 +9,7 @@ var index = require('./common/index.js');
9
9
  var getClass = require('./common/getClass.js');
10
10
  var getStyle = require('./common/getStyle.js');
11
11
  var helpers = require('../../../helpers.js');
12
- var ProductListItem_liquid = require('./ProductListItem.liquid.js');
12
+ var ProductListCarouselItem_liquid = require('./ProductListCarouselItem.liquid.js');
13
13
 
14
14
  const ProductListCarouselLayout = (props)=>{
15
15
  const { builderProps, advanced, productSrc, productListId } = props;
@@ -42,8 +42,10 @@ const ProductListCarouselLayout = (props)=>{
42
42
  },
43
43
  style: carouselItemStyle,
44
44
  parentId: `product-list-carousel-${builderProps?.uid} gp-child-item-${builderProps?.uid}`,
45
+ parentStyle: carouselConfigStyle,
46
+ background: carouselConfigSetting?.background,
45
47
  children: `
46
- ${ProductListItem_liquid.default({
48
+ ${ProductListCarouselItem_liquid.default({
47
49
  ...props
48
50
  })}
49
51
  `
@@ -6,7 +6,7 @@ var core = require('@gem-sdk/core');
6
6
  var getStyle = require('./common/getStyle.js');
7
7
  var getClass = require('./common/getClass.js');
8
8
  var getAttr = require('./common/getAttr.js');
9
- var ProductListItem_liquid = require('./ProductListItem.liquid.js');
9
+ var ProductListGridItem_liquid = require('./ProductListGridItem.liquid.js');
10
10
  var helpers = require('../../../helpers.js');
11
11
 
12
12
  const ProductListGridLayout = (props)=>{
@@ -36,7 +36,7 @@ const ProductListGridLayout = (props)=>{
36
36
  {%- assign count = count | plus: 1 -%}
37
37
  {%- assign variant = product.selected_or_first_available_variant -%}
38
38
  {%- assign product_form_id = 'product-form-' | append: "${builderProps?.uid}" | append: product.id -%}
39
- ${ProductListItem_liquid.default({
39
+ ${ProductListGridItem_liquid.default({
40
40
  ...props
41
41
  })}
42
42
  {%- endif -%}
@@ -19,7 +19,7 @@ const CarouselSettingsV2Setting = [
19
19
  },
20
20
  {
21
21
  id: 'sneakPeak',
22
- label: 'Sneak peak',
22
+ label: 'Sneak peek',
23
23
  type: 'sneak-peak',
24
24
  devices: {
25
25
  desktop: {
@@ -247,8 +247,7 @@ const CarouselSettingsV2Setting = [
247
247
  {
248
248
  id: 'arrowCustom',
249
249
  type: 'icon',
250
- hideInput: true,
251
- hideLabel: true,
250
+ isHideClear: true,
252
251
  default: `<svg data-name="arrow" width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
253
252
  <path fill-rule="evenodd" clip-rule="evenodd" d="M7.62204 5.13313C7.78476 4.95562 8.04858 4.95562 8.21129 5.13313L12.378 9.67859C12.5407 9.8561 12.5407 10.1439 12.378 10.3214L8.21129 14.8669C8.04858 15.0444 7.78476 15.0444 7.62204 14.8669C7.45932 14.6894 7.45932 14.4016 7.62204 14.224L11.4941 10L7.62204 5.77596C7.45932 5.59845 7.45932 5.31064 7.62204 5.13313Z"/>
254
253
  </svg>
@@ -24,7 +24,7 @@ const SettingUIV1 = [
24
24
  {
25
25
  type: 'control',
26
26
  label: {
27
- en: 'Sneak peak'
27
+ en: 'Sneak peek'
28
28
  },
29
29
  setting: {
30
30
  id: 'sneakPeak'
@@ -322,7 +322,7 @@ const SettingUIV2 = [
322
322
  controls: [
323
323
  {
324
324
  label: {
325
- en: 'Sneak peak'
325
+ en: 'Sneak peek'
326
326
  },
327
327
  type: 'combo',
328
328
  setting: {
@@ -0,0 +1,24 @@
1
+ import { template } from '@gem-sdk/core';
2
+ import { getClass } from './common/getClass.js';
3
+
4
+ const ProductListItem = (props)=>{
5
+ const { pageContext, children } = props;
6
+ const { productItemClass, gpProductClass } = getClass(props);
7
+ return template /* liquid */ `
8
+ <gp-product
9
+ gp-context='{"variantSelected": {{ variant | json | escape }}, "quantity": 1 , "formId": "{{ product_form_id }}"}'
10
+ gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(pageContext)}}'
11
+ class="${gpProductClass}"
12
+
13
+ >
14
+ {%- form 'product', product, id: product_form_id, class: 'form contents ${productItemClass}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
15
+ <input type="hidden" name="id" value="{{ variant.id }}" />
16
+ <input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
17
+ <button type="submit" onclick="return false;" style="display:none;"></button>
18
+ ${children}
19
+ {%- endform -%}
20
+ </gp-product>
21
+ `;
22
+ };
23
+
24
+ export { ProductListItem as default };
@@ -5,7 +5,7 @@ import { getData } from './common/index.js';
5
5
  import { getClass } from './common/getClass.js';
6
6
  import { getStyle } from './common/getStyle.js';
7
7
  import { getStaticLocale } from '../../../helpers.js';
8
- import ProductListItem from './ProductListItem.liquid.js';
8
+ import ProductListItem from './ProductListCarouselItem.liquid.js';
9
9
 
10
10
  const ProductListCarouselLayout = (props)=>{
11
11
  const { builderProps, advanced, productSrc, productListId } = props;
@@ -38,6 +38,8 @@ const ProductListCarouselLayout = (props)=>{
38
38
  },
39
39
  style: carouselItemStyle,
40
40
  parentId: `product-list-carousel-${builderProps?.uid} gp-child-item-${builderProps?.uid}`,
41
+ parentStyle: carouselConfigStyle,
42
+ background: carouselConfigSetting?.background,
41
43
  children: `
42
44
  ${ProductListItem({
43
45
  ...props
@@ -2,7 +2,7 @@ import { template, RenderIf } from '@gem-sdk/core';
2
2
  import { getStyle } from './common/getStyle.js';
3
3
  import { getClass } from './common/getClass.js';
4
4
  import { getAttr } from './common/getAttr.js';
5
- import ProductListItem from './ProductListItem.liquid.js';
5
+ import ProductListItem from './ProductListGridItem.liquid.js';
6
6
  import { getStaticLocale } from '../../../helpers.js';
7
7
 
8
8
  const ProductListGridLayout = (props)=>{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.582",
3
+ "version": "2.0.0-dev.583",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",