@gem-sdk/components 2.0.0-staging.162 → 2.0.0-staging.164

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 (23) hide show
  1. package/dist/cjs/form/components/form-email/FormEmail.js +1 -1
  2. package/dist/cjs/image-comparison/components/CompareImage.js +2 -1
  3. package/dist/cjs/post-purchase/product/constants/ProductOfferPlaceholder.js +8 -30
  4. package/dist/cjs/product/components/ProductBadge/index.js +1 -0
  5. package/dist/cjs/product/components/ProductImagesV2/jsx/components/ProductGalleryGrid.js +1 -0
  6. package/dist/cjs/product/components/ProductList.js +1 -0
  7. package/dist/cjs/product/components/ProductTag.js +1 -0
  8. package/dist/cjs/product/components/ProductVariants/variants/index.js +3 -1
  9. package/dist/cjs/product/components/ProductVariants/variants/index.liquid.js +1 -1
  10. package/dist/cjs/product/setting/ProductButton.js +1 -1
  11. package/dist/cjs/third-party/components/Bogos/BogosSampleContent.js +2 -1
  12. package/dist/esm/form/components/form-email/FormEmail.js +1 -1
  13. package/dist/esm/image-comparison/components/CompareImage.js +2 -1
  14. package/dist/esm/post-purchase/product/constants/ProductOfferPlaceholder.js +8 -30
  15. package/dist/esm/product/components/ProductBadge/index.js +1 -0
  16. package/dist/esm/product/components/ProductImagesV2/jsx/components/ProductGalleryGrid.js +1 -0
  17. package/dist/esm/product/components/ProductList.js +1 -0
  18. package/dist/esm/product/components/ProductTag.js +1 -0
  19. package/dist/esm/product/components/ProductVariants/variants/index.js +3 -1
  20. package/dist/esm/product/components/ProductVariants/variants/index.liquid.js +1 -1
  21. package/dist/esm/product/setting/ProductButton.js +1 -1
  22. package/dist/esm/third-party/components/Bogos/BogosSampleContent.js +2 -1
  23. package/package.json +1 -1
@@ -35,7 +35,7 @@ const FormEmail = ({ builderProps, builderAttrs, setting, advanced, children })=
35
35
  const appendTypoStyle = core.composeTypographyStyle(setting?.typo, typography);
36
36
  return /*#__PURE__*/ jsxRuntime.jsxs("div", {
37
37
  ...builderAttrs,
38
- "qdata-id": builderProps?.uid,
38
+ "data-id": builderProps?.uid,
39
39
  className: core.cls(builderProps?.uid),
40
40
  style: {
41
41
  ...wrapStyle,
@@ -39,9 +39,10 @@ const CompareImage = (props)=>{
39
39
  setSliderPosition(Number(data));
40
40
  return;
41
41
  }
42
- saveToElementInteractionData(ref.current, uniqueStorageKey, sliderPosition);
42
+ saveToElementInteractionData(ref.current, uniqueStorageKey, sliderPosition.toString());
43
43
  setSliderPosition(Number(data) / 100);
44
44
  });
45
+ // eslint-disable-next-line react-hooks/exhaustive-deps
45
46
  }, []);
46
47
  const defaultRatio = React.useMemo(()=>{
47
48
  const leftRatio = (leftImage?.width ?? 0) / (leftImage?.height ?? 1);
@@ -22,7 +22,7 @@ const productOfferPlaceholder = {
22
22
  id: '1',
23
23
  label: 'Variant option',
24
24
  isDefault: true,
25
- baseID: ''
25
+ baseID: '1'
26
26
  }
27
27
  ]
28
28
  }
@@ -106,35 +106,13 @@ const productOfferPlaceholder = {
106
106
  soldIndividually: false,
107
107
  weight: 0,
108
108
  width: 0,
109
- selectedOptions: [],
110
- media: undefined
111
- }
112
- },
113
- {
114
- cursor: 'gqFpzwc5ZqRtDAMIoXYC',
115
- node: {
116
- id: '520560088328176392',
117
- title: 'Default Title',
118
- barcode: '',
119
- baseID: 'gid://shopify/ProductVariant/49298248925463',
120
- costPrice: 88,
121
- height: 0,
122
- inventoryPolicy: 'DENY',
123
- inventoryQuantity: 211,
124
- inventoryStatus: '',
125
- isDigital: true,
126
- length: 0,
127
- lowInventoryAmount: 0,
128
- manageInventory: false,
129
- mediaId: '0',
130
- platform: 'SHOPIFY',
131
- price: 88,
132
- salePrice: 88,
133
- sku: '',
134
- soldIndividually: false,
135
- weight: 0,
136
- width: 0,
137
- selectedOptions: [],
109
+ selectedOptions: [
110
+ {
111
+ name: 'Variant',
112
+ value: 'Variant option',
113
+ optionType: ''
114
+ }
115
+ ],
138
116
  media: undefined
139
117
  }
140
118
  }
@@ -158,6 +158,7 @@ const ProductBadge = ({ builderAttrs, builderProps, isInsideProductImage, settin
158
158
  } : {}, style)
159
159
  },
160
160
  className: core.cls(conditionClass, builderProps?.builderData?.advanced?.cssClass || '', builderProps?.uid, 'gp-shrink-0', 'product-badge', isInsideProductImage ? 'inside-image' : ''),
161
+ // eslint-disable-next-line react/no-unknown-property
161
162
  "gp-data-hidden": "false",
162
163
  children: [
163
164
  mode === 'edit' && isNoDiscountState ? /*#__PURE__*/ jsxRuntime.jsx(TooltipHover.default, {
@@ -121,6 +121,7 @@ const ProductGalleryGrid = ({ builderPropUID, productImages, onHandleClick, acti
121
121
  ...core.makeStyleResponsive('rg', setting?.itemSpacing),
122
122
  ...core.makeStyleResponsive('jc', setting?.align)
123
123
  },
124
+ // eslint-disable-next-line react/no-unknown-property
124
125
  "gp-data-hidden": `${isHiddenInteraction}`,
125
126
  children: [
126
127
  productImages?.map((image, index)=>{
@@ -321,6 +321,7 @@ const ProductList = ({ children, className, setting, styles, builderProps })=>{
321
321
  })
322
322
  },
323
323
  className: core.cls(className, 'gp-m-auto gp-grid gp-w-full', setting?.sameHeight ? ' gp-grid-flow-row' : ''),
324
+ // eslint-disable-next-line react/no-unknown-property
324
325
  "items-repeat": "true",
325
326
  "data-id": builderProps?.uid,
326
327
  children: !productSortedById?.length ? null : productSortedById?.map((product, index)=>/*#__PURE__*/ jsxRuntime.jsx(core.ProductProvider, {
@@ -115,6 +115,7 @@ const ProductTag = ({ setting, styles, builderProps, ...passProps })=>{
115
115
  id: `shopify-text-element-${builderProps?.uid}`,
116
116
  "data-id": builderProps?.uid,
117
117
  "data-product-id": currentProductId,
118
+ // eslint-disable-next-line react/no-unknown-property
118
119
  "gp-data-hidden": "false",
119
120
  children: !product ? null : /*#__PURE__*/ jsxRuntime.jsx("div", {
120
121
  className: core.cls('gp-inline-flex gp-flex-wrap gp-items-end gp-gap-3'),
@@ -81,7 +81,7 @@ const VariantItem = ({ name, variantKey, optionName, optionValue, ...props })=>{
81
81
  htmlFor: `${props.uid}-${variantKey}`,
82
82
  children: [
83
83
  /*#__PURE__*/ jsxRuntime.jsxs("div", {
84
- className: "gp-invisible gp-overflow-hidden tablet:gp-overflow-[unset] !gp-max-w-[0px] tablet:!gp-max-w-[150px] gp-left-[50%] gp-translate-x-[-50%] gp-translate-y-0 gp-absolute gp-bottom-[calc(100%+20px)] gp-text-[12px] group-hover:gp-visible gp-w-max gp-bg-[#333333] gp-text-[#F9F9F9] gp-px-[0px] tablet:gp-px-[8px] gp-py-[4px] gp-rounded-[8px] gp-mb-[-10px] after:gp-content-[''] after:gp-absolute after:gp-p-[0px] tablet:after:gp-p-[7px] after:gp-left-0 after:gp-w-full after:gp-bottom-[-10px]",
84
+ className: "gp-invisible mobile:gp-overflow-hidden mobile:!gp-max-w-[0px] !gp-max-w-[150px] gp-left-[50%] gp-translate-x-[-50%] gp-translate-y-0 gp-absolute gp-bottom-[calc(100%+20px)] gp-text-[12px] group-hover:gp-visible gp-w-max gp-bg-[#333333] gp-text-[#F9F9F9] mobile:gp-px-[0px] gp-px-[8px] gp-py-[4px] gp-rounded-[8px] gp-mb-[-10px] after:gp-content-[''] after:gp-absolute mobile:after:gp-p-[0px] after:gp-p-[7px] after:gp-left-0 after:gp-w-full after:gp-bottom-[-10px]",
85
85
  children: [
86
86
  /*#__PURE__*/ jsxRuntime.jsx("p", {
87
87
  className: "gp-text-[#F9F9F9]",
@@ -115,7 +115,9 @@ const VariantItem = ({ name, variantKey, optionName, optionValue, ...props })=>{
115
115
  children: props.value?.label
116
116
  }),
117
117
  /*#__PURE__*/ jsxRuntime.jsx("div", {
118
+ // eslint-disable-next-line react/no-unknown-property
118
119
  "option-name": optionName,
120
+ // eslint-disable-next-line react/no-unknown-property
119
121
  "option-name-value": optionValue,
120
122
  className: "option-item-inner gp-w-auto gp-h-auto",
121
123
  children: /*#__PURE__*/ jsxRuntime.jsx(Component, {
@@ -120,7 +120,7 @@ const VariantItem = ({ name, variantKey, value, id, activeClass, optionPosition,
120
120
  for="{{product.id}}-${props.uid}-${variantKey}"
121
121
  class="gp-group gp-relative option-item gp-child-item-${props.uid}"
122
122
  >
123
- <div class="gp-invisible gp-overflow-hidden tablet:gp-overflow-[unset] !gp-max-w-[0px] tablet:!gp-max-w-[150px] gp-left-[50%] gp-translate-x-[-50%] gp-translate-y-0 gp-absolute gp-bottom-[calc(100%+20px)] gp-text-[12px] group-hover:gp-visible gp-w-max gp-bg-[#333333] gp-text-[#F9F9F9] gp-px-[0px] tablet:gp-px-[8px] gp-py-[4px] gp-rounded-[8px] gp-mb-[-10px] after:gp-content-[''] after:gp-absolute after:gp-p-[0px] tablet:after:gp-p-[7px] after:gp-left-0 after:gp-w-full after:gp-bottom-[-10px]">
123
+ <div class="gp-invisible mobile:gp-overflow-hidden mobile:!gp-max-w-[0px] !gp-max-w-[150px] gp-left-[50%] gp-translate-x-[-50%] gp-translate-y-0 gp-absolute gp-bottom-[calc(100%+20px)] gp-text-[12px] group-hover:gp-visible gp-w-max gp-bg-[#333333] gp-text-[#F9F9F9] mobile:gp-px-[0px] gp-px-[8px] gp-py-[4px] gp-rounded-[8px] gp-mb-[-10px] after:gp-content-[''] after:gp-absolute mobile:after:gp-p-[0px] after:gp-p-[7px] after:gp-left-0 after:gp-w-full after:gp-bottom-[-10px]">
124
124
  <p class="gp-text-[#F9F9F9]">${value?.label}</p>
125
125
  <svg class="gp-absolute gp-left-[50%] gp-translate-x-[-50%] gp-translate-y-0 gp-z-10 gp-bottom-[-4px]" width="8" height="4" viewBox="0 0 16 10" fill="none" xmlns="http://www.w3.org/2000/svg">
126
126
  <path d="M8 10L0 0L16 1.41326e-06L8 10Z" fill="#333333"/>
@@ -232,7 +232,7 @@ const config = {
232
232
  value: 'go-to-url'
233
233
  }
234
234
  ],
235
- default: 'continue-shopping'
235
+ default: 'open-cart-drawer'
236
236
  },
237
237
  {
238
238
  id: 'customURL',
@@ -14,7 +14,8 @@ const mapWidgetLabel = {
14
14
  slider: 'Gift slider',
15
15
  message: 'Cart message',
16
16
  ['classic-bundle']: 'Classic bundle',
17
- ['quantity-break']: 'Quantity break'
17
+ ['quantity-break']: 'Quantity break',
18
+ ['mix-match']: 'Mix and match'
18
19
  };
19
20
  const BogosSampleContent = ({ setting })=>{
20
21
  const widgetLabel = setting?.widgetType && mapWidgetLabel[setting.widgetType];
@@ -31,7 +31,7 @@ const FormEmail = ({ builderProps, builderAttrs, setting, advanced, children })=
31
31
  const appendTypoStyle = composeTypographyStyle(setting?.typo, typography);
32
32
  return /*#__PURE__*/ jsxs("div", {
33
33
  ...builderAttrs,
34
- "qdata-id": builderProps?.uid,
34
+ "data-id": builderProps?.uid,
35
35
  className: cls(builderProps?.uid),
36
36
  style: {
37
37
  ...wrapStyle,
@@ -35,9 +35,10 @@ const CompareImage = (props)=>{
35
35
  setSliderPosition(Number(data));
36
36
  return;
37
37
  }
38
- saveToElementInteractionData(ref.current, uniqueStorageKey, sliderPosition);
38
+ saveToElementInteractionData(ref.current, uniqueStorageKey, sliderPosition.toString());
39
39
  setSliderPosition(Number(data) / 100);
40
40
  });
41
+ // eslint-disable-next-line react-hooks/exhaustive-deps
41
42
  }, []);
42
43
  const defaultRatio = useMemo(()=>{
43
44
  const leftRatio = (leftImage?.width ?? 0) / (leftImage?.height ?? 1);
@@ -20,7 +20,7 @@ const productOfferPlaceholder = {
20
20
  id: '1',
21
21
  label: 'Variant option',
22
22
  isDefault: true,
23
- baseID: ''
23
+ baseID: '1'
24
24
  }
25
25
  ]
26
26
  }
@@ -104,35 +104,13 @@ const productOfferPlaceholder = {
104
104
  soldIndividually: false,
105
105
  weight: 0,
106
106
  width: 0,
107
- selectedOptions: [],
108
- media: undefined
109
- }
110
- },
111
- {
112
- cursor: 'gqFpzwc5ZqRtDAMIoXYC',
113
- node: {
114
- id: '520560088328176392',
115
- title: 'Default Title',
116
- barcode: '',
117
- baseID: 'gid://shopify/ProductVariant/49298248925463',
118
- costPrice: 88,
119
- height: 0,
120
- inventoryPolicy: 'DENY',
121
- inventoryQuantity: 211,
122
- inventoryStatus: '',
123
- isDigital: true,
124
- length: 0,
125
- lowInventoryAmount: 0,
126
- manageInventory: false,
127
- mediaId: '0',
128
- platform: 'SHOPIFY',
129
- price: 88,
130
- salePrice: 88,
131
- sku: '',
132
- soldIndividually: false,
133
- weight: 0,
134
- width: 0,
135
- selectedOptions: [],
107
+ selectedOptions: [
108
+ {
109
+ name: 'Variant',
110
+ value: 'Variant option',
111
+ optionType: ''
112
+ }
113
+ ],
136
114
  media: undefined
137
115
  }
138
116
  }
@@ -154,6 +154,7 @@ const ProductBadge = ({ builderAttrs, builderProps, isInsideProductImage, settin
154
154
  } : {}, style)
155
155
  },
156
156
  className: cls(conditionClass, builderProps?.builderData?.advanced?.cssClass || '', builderProps?.uid, 'gp-shrink-0', 'product-badge', isInsideProductImage ? 'inside-image' : ''),
157
+ // eslint-disable-next-line react/no-unknown-property
157
158
  "gp-data-hidden": "false",
158
159
  children: [
159
160
  mode === 'edit' && isNoDiscountState ? /*#__PURE__*/ jsx(TooltipHover, {
@@ -117,6 +117,7 @@ const ProductGalleryGrid = ({ builderPropUID, productImages, onHandleClick, acti
117
117
  ...makeStyleResponsive('rg', setting?.itemSpacing),
118
118
  ...makeStyleResponsive('jc', setting?.align)
119
119
  },
120
+ // eslint-disable-next-line react/no-unknown-property
120
121
  "gp-data-hidden": `${isHiddenInteraction}`,
121
122
  children: [
122
123
  productImages?.map((image, index)=>{
@@ -317,6 +317,7 @@ const ProductList = ({ children, className, setting, styles, builderProps })=>{
317
317
  })
318
318
  },
319
319
  className: cls(className, 'gp-m-auto gp-grid gp-w-full', setting?.sameHeight ? ' gp-grid-flow-row' : ''),
320
+ // eslint-disable-next-line react/no-unknown-property
320
321
  "items-repeat": "true",
321
322
  "data-id": builderProps?.uid,
322
323
  children: !productSortedById?.length ? null : productSortedById?.map((product, index)=>/*#__PURE__*/ jsx(ProductProvider, {
@@ -111,6 +111,7 @@ const ProductTag = ({ setting, styles, builderProps, ...passProps })=>{
111
111
  id: `shopify-text-element-${builderProps?.uid}`,
112
112
  "data-id": builderProps?.uid,
113
113
  "data-product-id": currentProductId,
114
+ // eslint-disable-next-line react/no-unknown-property
114
115
  "gp-data-hidden": "false",
115
116
  children: !product ? null : /*#__PURE__*/ jsx("div", {
116
117
  className: cls('gp-inline-flex gp-flex-wrap gp-items-end gp-gap-3'),
@@ -77,7 +77,7 @@ const VariantItem = ({ name, variantKey, optionName, optionValue, ...props })=>{
77
77
  htmlFor: `${props.uid}-${variantKey}`,
78
78
  children: [
79
79
  /*#__PURE__*/ jsxs("div", {
80
- className: "gp-invisible gp-overflow-hidden tablet:gp-overflow-[unset] !gp-max-w-[0px] tablet:!gp-max-w-[150px] gp-left-[50%] gp-translate-x-[-50%] gp-translate-y-0 gp-absolute gp-bottom-[calc(100%+20px)] gp-text-[12px] group-hover:gp-visible gp-w-max gp-bg-[#333333] gp-text-[#F9F9F9] gp-px-[0px] tablet:gp-px-[8px] gp-py-[4px] gp-rounded-[8px] gp-mb-[-10px] after:gp-content-[''] after:gp-absolute after:gp-p-[0px] tablet:after:gp-p-[7px] after:gp-left-0 after:gp-w-full after:gp-bottom-[-10px]",
80
+ className: "gp-invisible mobile:gp-overflow-hidden mobile:!gp-max-w-[0px] !gp-max-w-[150px] gp-left-[50%] gp-translate-x-[-50%] gp-translate-y-0 gp-absolute gp-bottom-[calc(100%+20px)] gp-text-[12px] group-hover:gp-visible gp-w-max gp-bg-[#333333] gp-text-[#F9F9F9] mobile:gp-px-[0px] gp-px-[8px] gp-py-[4px] gp-rounded-[8px] gp-mb-[-10px] after:gp-content-[''] after:gp-absolute mobile:after:gp-p-[0px] after:gp-p-[7px] after:gp-left-0 after:gp-w-full after:gp-bottom-[-10px]",
81
81
  children: [
82
82
  /*#__PURE__*/ jsx("p", {
83
83
  className: "gp-text-[#F9F9F9]",
@@ -111,7 +111,9 @@ const VariantItem = ({ name, variantKey, optionName, optionValue, ...props })=>{
111
111
  children: props.value?.label
112
112
  }),
113
113
  /*#__PURE__*/ jsx("div", {
114
+ // eslint-disable-next-line react/no-unknown-property
114
115
  "option-name": optionName,
116
+ // eslint-disable-next-line react/no-unknown-property
115
117
  "option-name-value": optionValue,
116
118
  className: "option-item-inner gp-w-auto gp-h-auto",
117
119
  children: /*#__PURE__*/ jsx(Component, {
@@ -116,7 +116,7 @@ const VariantItem = ({ name, variantKey, value, id, activeClass, optionPosition,
116
116
  for="{{product.id}}-${props.uid}-${variantKey}"
117
117
  class="gp-group gp-relative option-item gp-child-item-${props.uid}"
118
118
  >
119
- <div class="gp-invisible gp-overflow-hidden tablet:gp-overflow-[unset] !gp-max-w-[0px] tablet:!gp-max-w-[150px] gp-left-[50%] gp-translate-x-[-50%] gp-translate-y-0 gp-absolute gp-bottom-[calc(100%+20px)] gp-text-[12px] group-hover:gp-visible gp-w-max gp-bg-[#333333] gp-text-[#F9F9F9] gp-px-[0px] tablet:gp-px-[8px] gp-py-[4px] gp-rounded-[8px] gp-mb-[-10px] after:gp-content-[''] after:gp-absolute after:gp-p-[0px] tablet:after:gp-p-[7px] after:gp-left-0 after:gp-w-full after:gp-bottom-[-10px]">
119
+ <div class="gp-invisible mobile:gp-overflow-hidden mobile:!gp-max-w-[0px] !gp-max-w-[150px] gp-left-[50%] gp-translate-x-[-50%] gp-translate-y-0 gp-absolute gp-bottom-[calc(100%+20px)] gp-text-[12px] group-hover:gp-visible gp-w-max gp-bg-[#333333] gp-text-[#F9F9F9] mobile:gp-px-[0px] gp-px-[8px] gp-py-[4px] gp-rounded-[8px] gp-mb-[-10px] after:gp-content-[''] after:gp-absolute mobile:after:gp-p-[0px] after:gp-p-[7px] after:gp-left-0 after:gp-w-full after:gp-bottom-[-10px]">
120
120
  <p class="gp-text-[#F9F9F9]">${value?.label}</p>
121
121
  <svg class="gp-absolute gp-left-[50%] gp-translate-x-[-50%] gp-translate-y-0 gp-z-10 gp-bottom-[-4px]" width="8" height="4" viewBox="0 0 16 10" fill="none" xmlns="http://www.w3.org/2000/svg">
122
122
  <path d="M8 10L0 0L16 1.41326e-06L8 10Z" fill="#333333"/>
@@ -228,7 +228,7 @@ const config = {
228
228
  value: 'go-to-url'
229
229
  }
230
230
  ],
231
- default: 'continue-shopping'
231
+ default: 'open-cart-drawer'
232
232
  },
233
233
  {
234
234
  id: 'customURL',
@@ -10,7 +10,8 @@ const mapWidgetLabel = {
10
10
  slider: 'Gift slider',
11
11
  message: 'Cart message',
12
12
  ['classic-bundle']: 'Classic bundle',
13
- ['quantity-break']: 'Quantity break'
13
+ ['quantity-break']: 'Quantity break',
14
+ ['mix-match']: 'Mix and match'
14
15
  };
15
16
  const BogosSampleContent = ({ setting })=>{
16
17
  const widgetLabel = setting?.widgetType && mapWidgetLabel[setting.widgetType];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-staging.162",
3
+ "version": "2.0.0-staging.164",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",