@gem-sdk/components 2.0.0-dev.353 → 2.0.0-dev.356

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 (110) hide show
  1. package/dist/cjs/article/components/ArticleAuthor.liquid.js +27 -0
  2. package/dist/cjs/article/components/ArticleCategory.liquid.js +27 -0
  3. package/dist/cjs/article/components/ArticleContent.liquid.js +42 -0
  4. package/dist/cjs/article/components/ArticleDate.liquid.js +35 -0
  5. package/dist/cjs/article/components/ArticleExcerpt.liquid.js +26 -0
  6. package/dist/cjs/article/components/ArticleImage.liquid.js +67 -0
  7. package/dist/cjs/article/components/ArticlePagination.liquid.js +17 -0
  8. package/dist/cjs/article/components/ArticleReadMore.liquid.js +58 -0
  9. package/dist/cjs/article/components/ArticleTag.liquid.js +27 -0
  10. package/dist/cjs/article/components/ArticleTitle.liquid.js +46 -0
  11. package/dist/cjs/builder.js +1 -1
  12. package/dist/cjs/button/components/Button.js +5 -3
  13. package/dist/cjs/button/components/Button.liquid.js +7 -3
  14. package/dist/cjs/button/components/common/attributes.js +1 -2
  15. package/dist/cjs/button/components/common/helpers.js +2 -2
  16. package/dist/cjs/button/components/common/styles.js +29 -1
  17. package/dist/cjs/button/setting/configs/settings.js +24 -4
  18. package/dist/cjs/button/setting/configs/uiV2.js +46 -8
  19. package/dist/cjs/form/setting/newsletter/configs/settings.js +2 -2
  20. package/dist/cjs/form/setting/newsletter/configs/uiV2.js +0 -44
  21. package/dist/cjs/image/setting/configs/uiV2.js +5 -1
  22. package/dist/cjs/index.js +1 -1
  23. package/dist/cjs/index.liquid.js +20 -0
  24. package/dist/cjs/post-purchase/callout-banner/setting/config/callout-text/setting.js +4 -3
  25. package/dist/cjs/post-purchase/image/common/getClasses.js +1 -4
  26. package/dist/cjs/post-purchase/product/common/getClasses.js +4 -5
  27. package/dist/cjs/post-purchase/product/components/product-image/carousel-post-purchase/CarouselPostPurchase.js +3 -2
  28. package/dist/cjs/post-purchase/product/components/product-image/carousel-post-purchase/CarouselWrapperPostPurchase.js +2 -1
  29. package/dist/cjs/post-purchase/product/components/product-offer/common/attrs.js +14 -0
  30. package/dist/cjs/post-purchase/product/components/product-offer/common/classes.js +29 -0
  31. package/dist/cjs/post-purchase/product/components/product-offer/common/styles.js +27 -0
  32. package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOffer.js +53 -0
  33. package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOfferItem.js +45 -0
  34. package/dist/cjs/post-purchase/product/components/product-offer/hooks/useProductOfferData.js +57 -0
  35. package/dist/cjs/post-purchase/product/hooks/product-image/useListCarousel.js +6 -2
  36. package/dist/cjs/post-purchase/product/index.js +2 -2
  37. package/dist/cjs/post-purchase/product/next.js +1 -1
  38. package/dist/cjs/post-purchase/product/settings/product-image/setting-v2.js +5 -5
  39. package/dist/cjs/post-purchase/product/settings/product-image/uiV2.js +2 -1
  40. package/dist/cjs/post-purchase/product/settings/{ProductOffer.js → product-offer/index.js} +23 -143
  41. package/dist/cjs/post-purchase/product/settings/product-offer/ui/uiV1.js +140 -0
  42. package/dist/cjs/post-purchase/product/settings/product-offer/ui/uiV2.js +141 -0
  43. package/dist/cjs/post-purchase/utils/constants.js +6 -0
  44. package/dist/cjs/product/components/ProductViewMore/ProductViewMore.js +17 -18
  45. package/dist/cjs/product/components/ProductViewMore/ProductViewMore.liquid.js +14 -21
  46. package/dist/cjs/product/components/ProductViewMore/common/data.js +26 -0
  47. package/dist/cjs/product/components/ProductViewMore/common/styles.js +12 -0
  48. package/dist/cjs/product/setting/dynamic-checkout/configs/settings.js +9 -5
  49. package/dist/cjs/product/setting/dynamic-checkout/configs/uiV2.js +10 -10
  50. package/dist/cjs/product/setting/product-button/configs/settings.js +1 -0
  51. package/dist/cjs/product/setting/product-button/configs/uiV2.js +1 -1
  52. package/dist/cjs/product/setting/product-view-more/configs/settings.js +17 -16
  53. package/dist/cjs/product/setting/product-view-more/configs/uiV2.js +45 -45
  54. package/dist/esm/article/components/ArticleAuthor.liquid.js +23 -0
  55. package/dist/esm/article/components/ArticleCategory.liquid.js +23 -0
  56. package/dist/esm/article/components/ArticleContent.liquid.js +38 -0
  57. package/dist/esm/article/components/ArticleDate.liquid.js +31 -0
  58. package/dist/esm/article/components/ArticleExcerpt.liquid.js +22 -0
  59. package/dist/esm/article/components/ArticleImage.liquid.js +63 -0
  60. package/dist/esm/article/components/ArticlePagination.liquid.js +13 -0
  61. package/dist/esm/article/components/ArticleReadMore.liquid.js +54 -0
  62. package/dist/esm/article/components/ArticleTag.liquid.js +23 -0
  63. package/dist/esm/article/components/ArticleTitle.liquid.js +42 -0
  64. package/dist/esm/builder.js +1 -1
  65. package/dist/esm/button/components/Button.js +5 -3
  66. package/dist/esm/button/components/Button.liquid.js +7 -3
  67. package/dist/esm/button/components/common/attributes.js +1 -2
  68. package/dist/esm/button/components/common/helpers.js +2 -2
  69. package/dist/esm/button/components/common/styles.js +29 -3
  70. package/dist/esm/button/setting/configs/settings.js +24 -4
  71. package/dist/esm/button/setting/configs/uiV2.js +46 -8
  72. package/dist/esm/form/setting/newsletter/configs/settings.js +2 -2
  73. package/dist/esm/form/setting/newsletter/configs/uiV2.js +0 -44
  74. package/dist/esm/image/setting/configs/uiV2.js +5 -1
  75. package/dist/esm/index.js +1 -1
  76. package/dist/esm/index.liquid.js +10 -0
  77. package/dist/esm/post-purchase/callout-banner/setting/config/callout-text/setting.js +4 -3
  78. package/dist/esm/post-purchase/image/common/getClasses.js +1 -4
  79. package/dist/esm/post-purchase/product/common/getClasses.js +4 -5
  80. package/dist/esm/post-purchase/product/components/product-image/carousel-post-purchase/CarouselPostPurchase.js +3 -2
  81. package/dist/esm/post-purchase/product/components/product-image/carousel-post-purchase/CarouselWrapperPostPurchase.js +2 -1
  82. package/dist/esm/post-purchase/product/components/product-offer/common/attrs.js +12 -0
  83. package/dist/esm/post-purchase/product/components/product-offer/common/classes.js +25 -0
  84. package/dist/esm/post-purchase/product/components/product-offer/common/styles.js +24 -0
  85. package/dist/esm/post-purchase/product/components/product-offer/components/ProductOffer.js +49 -0
  86. package/dist/esm/post-purchase/product/components/product-offer/components/ProductOfferItem.js +43 -0
  87. package/dist/esm/post-purchase/product/components/product-offer/hooks/useProductOfferData.js +55 -0
  88. package/dist/esm/post-purchase/product/hooks/product-image/useListCarousel.js +6 -2
  89. package/dist/esm/post-purchase/product/index.js +1 -1
  90. package/dist/esm/post-purchase/product/next.js +1 -1
  91. package/dist/esm/post-purchase/product/settings/product-image/setting-v2.js +5 -5
  92. package/dist/esm/post-purchase/product/settings/product-image/uiV2.js +2 -1
  93. package/dist/esm/post-purchase/product/settings/{ProductOffer.js → product-offer/index.js} +23 -143
  94. package/dist/esm/post-purchase/product/settings/product-offer/ui/uiV1.js +138 -0
  95. package/dist/esm/post-purchase/product/settings/product-offer/ui/uiV2.js +139 -0
  96. package/dist/esm/post-purchase/utils/constants.js +6 -1
  97. package/dist/esm/product/components/ProductViewMore/ProductViewMore.js +17 -18
  98. package/dist/esm/product/components/ProductViewMore/ProductViewMore.liquid.js +14 -21
  99. package/dist/esm/product/components/ProductViewMore/common/data.js +23 -0
  100. package/dist/esm/product/components/ProductViewMore/common/styles.js +10 -0
  101. package/dist/esm/product/setting/dynamic-checkout/configs/settings.js +9 -5
  102. package/dist/esm/product/setting/dynamic-checkout/configs/uiV2.js +10 -10
  103. package/dist/esm/product/setting/product-button/configs/settings.js +1 -0
  104. package/dist/esm/product/setting/product-button/configs/uiV2.js +1 -1
  105. package/dist/esm/product/setting/product-view-more/configs/settings.js +17 -16
  106. package/dist/esm/product/setting/product-view-more/configs/uiV2.js +45 -45
  107. package/dist/types/index.d.ts +82 -18
  108. package/package.json +2 -2
  109. package/dist/cjs/post-purchase/product/components/ProductOffer.js +0 -138
  110. package/dist/esm/post-purchase/product/components/ProductOffer.js +0 -133
@@ -100,7 +100,7 @@ import PostPurchaseProductPrice from './post-purchase/product/components/Product
100
100
  import PostPurchaseProductVariants from './post-purchase/product/components/product-variant/components/ProductVariant.js';
101
101
  import PostPurchaseAcceptButton from './post-purchase/product/components/AcceptButton.js';
102
102
  import PostPurchaseProductQuantity from './post-purchase/product/components/ProductQuantity.js';
103
- import PostPurchaseProductOffer from './post-purchase/product/components/ProductOffer.js';
103
+ import PostPurchaseProductOffer from './post-purchase/product/components/product-offer/components/ProductOffer.js';
104
104
  import PostPurchaseProductPriceBreakdown from './post-purchase/product/components/ProductPriceBreakdown.js';
105
105
  import PostPurchaseProductDiscountTag from './post-purchase/product/components/ProductDiscountTag.js';
106
106
  import PostPurchaseProductImages from './post-purchase/product/components/product-image/index.js';
@@ -13,10 +13,12 @@ import { getInsertLinkData, getButtonWrapper } from './common/helpers.js';
13
13
 
14
14
  const Button = (props)=>{
15
15
  const { children, advanced, className, nodePrice, customAttrs, styles = {}, setting = {}, builderProps, builderAttrs, wrapClassName = '', onClick } = props;
16
- const { iconSvg, btnLink, htmlType, loading, disabled, shouldClearSpace } = setting;
16
+ const { iconSvg, btnLink, htmlType, loading, disabled, shouldClearSpace, enableBtnLink } = setting;
17
+ const { enableTextStyle = true } = styles;
17
18
  const mode = useEditorMode();
18
19
  const { customCss, wrapStyle, restStyle, dataState, dataIdAttr, isShowIcon, isScrollToElement, getArialLabel, getLabelToDisplay, checkIsShowLabel, checkIsEditableLabel } = getData(props);
19
20
  const { HTMLTag, urlData, shouldRenderLink } = getInsertLinkData({
21
+ enableBtnLink,
20
22
  htmlType,
21
23
  setting: btnLink,
22
24
  defaultTag: 'button'
@@ -55,7 +57,6 @@ const Button = (props)=>{
55
57
  });
56
58
  const buttonWrapperAttrs = createAttr({
57
59
  ...getButtonAttributes({
58
- urlData,
59
60
  disabled,
60
61
  dataState,
61
62
  dataId: dataIdAttr,
@@ -89,6 +90,7 @@ const Button = (props)=>{
89
90
  /*#__PURE__*/ jsxs(ButtonWrapper, {
90
91
  ...buttonWrapperAttrs,
91
92
  ...customAttrs,
93
+ setting: urlData,
92
94
  style: buttonStyles,
93
95
  className: buttonClasses,
94
96
  onClick: handleClick,
@@ -102,7 +104,7 @@ const Button = (props)=>{
102
104
  styles: buttonIconStyles,
103
105
  classes: buttonIconClasses
104
106
  })),
105
- If(checkIsShowLabel(), /*#__PURE__*/ jsx(ButtonLabel, {
107
+ If(enableTextStyle && checkIsShowLabel(), /*#__PURE__*/ jsx(ButtonLabel, {
106
108
  label: getLabelToDisplay(),
107
109
  classes: buttonLabelClasses
108
110
  }))
@@ -12,9 +12,11 @@ import { getInsertLinkData, getButtonWrapper } from './common/helpers.js';
12
12
 
13
13
  const Button = (props)=>{
14
14
  const { advanced, className, nodePrice, customAttrs, styles = {}, setting = {}, builderProps, wrapClassName = '' } = props;
15
- const { iconSvg, loading, btnLink, htmlType, disabled, shouldClearSpace } = setting;
15
+ const { iconSvg, loading, btnLink, htmlType, disabled, shouldClearSpace, enableBtnLink } = setting;
16
+ const { enableTextStyle = true } = styles;
16
17
  const { customCss, wrapStyle, restStyle, dataState, dataIdAttr, isShowIcon, isScrollToElement, getArialLabel, getLabelToDisplay, checkIsShowLabel, checkIsEditableLabel } = getData(props);
17
18
  const { HTMLTag, urlData, shouldRenderLink } = getInsertLinkData({
19
+ enableBtnLink,
18
20
  htmlType,
19
21
  setting: btnLink,
20
22
  defaultTag: 'button',
@@ -56,7 +58,6 @@ const Button = (props)=>{
56
58
  });
57
59
  const buttonWrapperAttrs = createAttr({
58
60
  ...getButtonAttributes({
59
- urlData,
60
61
  disabled,
61
62
  dataState,
62
63
  dataId: dataIdAttr,
@@ -88,6 +89,9 @@ const Button = (props)=>{
88
89
  }}
89
90
  ${{
90
91
  ...customAttrs
92
+ }}
93
+ ${{
94
+ ...urlData
91
95
  }}
92
96
  style="${buttonStyles}"
93
97
  class="${buttonClasses}"
@@ -99,7 +103,7 @@ const Button = (props)=>{
99
103
  styles: buttonIconStyles,
100
104
  classes: buttonIconClasses
101
105
  }))}
102
- ${If(checkIsShowLabel({
106
+ ${If(enableTextStyle && checkIsShowLabel({
103
107
  isLiquid: true
104
108
  }), ButtonLabel({
105
109
  label: getLabelToDisplay({
@@ -1,6 +1,5 @@
1
- const getButtonAttributes = ({ dataId, disabled, urlData, dataState, arialLabel })=>{
1
+ const getButtonAttributes = ({ dataId, disabled, dataState, arialLabel })=>{
2
2
  return {
3
- ...urlData,
4
3
  ...!!disabled && {
5
4
  disabled
6
5
  },
@@ -68,7 +68,7 @@ const getDataId = (uidInteraction, dataId, uid)=>{
68
68
  const handleGetArialLabel = ({ label, isLiquid = false })=>{
69
69
  return isLiquid ? label?.toString().replaceAll("'", ''').replaceAll('"', "'") ?? '' : label?.toString() ?? '';
70
70
  };
71
- const getInsertLinkData = ({ setting, htmlType, defaultTag, isLiquid = false })=>{
71
+ const getInsertLinkData = ({ setting, htmlType, defaultTag, enableBtnLink, isLiquid = false })=>{
72
72
  const URL_INCLUDES = [
73
73
  'product.url'
74
74
  ];
@@ -89,7 +89,7 @@ const getInsertLinkData = ({ setting, htmlType, defaultTag, isLiquid = false })=
89
89
  if (URL_START_WITH.find((el)=>urlHref.startsWith(el))) return true;
90
90
  return false;
91
91
  };
92
- const shouldRenderLink = isDomain || isShopifyDomain || isLink() || isHomePageHref;
92
+ const shouldRenderLink = enableBtnLink ? isDomain || isShopifyDomain || isLink() || isHomePageHref : false;
93
93
  let transformedUrl = urlHref;
94
94
  if (isLiquid && (isShopifyDomain || isHomePageHref)) {
95
95
  transformedUrl = setting?.isTranslate ? '$locationOrigin' + urlHref : "{{ request.origin }}{{ routes.root_url | split: '/' | join: '/' }}" + urlHref;
@@ -1,4 +1,4 @@
1
- import { makeStyleResponsive, getStyleShadowState, composeRadius, makeGlobalSize, makeStyleResponsiveState, composeTypographyStyle, getStyleShadow, getStyleBackgroundImageByDevice, getGlobalColorStateResponsiveStyle, composeBorderCss, composeCornerCss } from '@gem-sdk/core';
1
+ import { makeStyleResponsive, getStyleShadowState, composeRadius, makeGlobalSize, makeStyleResponsiveState, composeTypographyStyle, getStyleShadow, getStyleBackgroundImageByDevice, getGlobalColorStateResponsiveStyle, getSingleColorVariable, composeBorderCss, composeCornerCss } from '@gem-sdk/core';
2
2
 
3
3
  const MEDIA_QUERIES = {
4
4
  TABLET: '@media only screen and (max-width: 1024px) and (min-width: 768px)',
@@ -52,7 +52,7 @@ const getSizeStyles = (styles)=>{
52
52
  };
53
53
  const getTypoStyles = (styles)=>{
54
54
  return {
55
- ...makeStyleResponsiveState('c', styles?.textColorHover),
55
+ ...makeStyleResponsiveState('c', processResponsiveHoverColors(styles?.textColorHover)),
56
56
  ...composeTypographyStyle(styles?.typo, styles?.typography),
57
57
  ...getStyleShadow({
58
58
  styleAppliedFor: 'text-shadow',
@@ -61,6 +61,32 @@ const getTypoStyles = (styles)=>{
61
61
  })
62
62
  };
63
63
  };
64
+ /**
65
+ * Process hover color for a single device
66
+ */ const processDeviceHoverColor = (deviceStyle)=>{
67
+ if (!deviceStyle?.hover) return deviceStyle;
68
+ return {
69
+ ...deviceStyle,
70
+ hover: getSingleColorVariable(deviceStyle.hover)
71
+ };
72
+ };
73
+ /**
74
+ * Process hover colors for all responsive devices
75
+ */ const processResponsiveHoverColors = (responsiveStyle)=>{
76
+ if (!responsiveStyle) return {};
77
+ const devices = [
78
+ 'desktop',
79
+ 'tablet',
80
+ 'mobile'
81
+ ];
82
+ return devices.reduce((acc, device)=>{
83
+ const processedStyle = processDeviceHoverColor(responsiveStyle[device]);
84
+ if (processedStyle) {
85
+ acc[device] = processedStyle;
86
+ }
87
+ return acc;
88
+ }, {});
89
+ };
64
90
  const getBackgroundStyles = (styles)=>{
65
91
  return {
66
92
  ...getStyleBackgroundImageByDevice(styles?.backgroundImage),
@@ -143,4 +169,4 @@ const generateBorderCornerStyles = ({ uid, device, borderBtn, roundedBtn, builde
143
169
  };
144
170
  };
145
171
 
146
- export { generateBorderCornerStyles, getButtonIconStyles, getButtonStyles, getButtonWrapperStyles, getCustomCssStyles, getRadiusStyles, getShadowStyles };
172
+ export { generateBorderCornerStyles, getButtonIconStyles, getButtonStyles, getButtonWrapperStyles, getCustomCssStyles, getRadiusStyles, getShadowStyles, processDeviceHoverColor, processResponsiveHoverColors };
@@ -13,6 +13,11 @@ const ButtonSettings = [
13
13
  type: 'input',
14
14
  default: 'label'
15
15
  },
16
+ {
17
+ id: 'enableBtnLink',
18
+ type: 'toggle',
19
+ default: false
20
+ },
16
21
  {
17
22
  id: 'btnLink',
18
23
  type: 'pick-link',
@@ -383,11 +388,20 @@ const ButtonSettings = [
383
388
  }
384
389
  }
385
390
  },
391
+ {
392
+ id: 'enableTextStyle',
393
+ label: '',
394
+ type: 'toggle',
395
+ default: true
396
+ },
386
397
  {
387
398
  id: 'typo',
388
399
  type: 'typography-v2',
389
400
  default: {
390
- type: 'paragraph-1'
401
+ type: 'paragraph-1',
402
+ attrs: {
403
+ color: 'text-1'
404
+ }
391
405
  },
392
406
  ignoreReRender: true,
393
407
  hiddenSetting: {
@@ -399,12 +413,16 @@ const ButtonSettings = [
399
413
  type: 'color-picker-v2',
400
414
  devices: {
401
415
  desktop: {
402
- default: {}
416
+ default: {
417
+ hover: 'text-3'
418
+ }
403
419
  }
404
420
  },
405
421
  compoDefaultValue: {
406
422
  desktop: {
407
- default: {}
423
+ default: {
424
+ hover: 'text-3'
425
+ }
408
426
  }
409
427
  },
410
428
  enableGradient: true
@@ -542,10 +560,12 @@ const ButtonSettings = [
542
560
  },
543
561
  {
544
562
  id: 'iconSpacing',
545
- type: 'input:unit',
563
+ type: 'input:slider',
546
564
  units: [
547
565
  'px'
548
566
  ],
567
+ step: 1,
568
+ max: 40,
549
569
  devices: {
550
570
  desktop: {
551
571
  default: '8px'
@@ -108,6 +108,15 @@ const SettingUIV2 = [
108
108
  id: 'backgroundColorV2',
109
109
  state: 'normal'
110
110
  }
111
+ },
112
+ {
113
+ label: {
114
+ en: 'Image'
115
+ },
116
+ setting: {
117
+ id: 'backgroundImage',
118
+ state: 'normal'
119
+ }
111
120
  }
112
121
  ]
113
122
  },
@@ -186,7 +195,7 @@ const SettingUIV2 = [
186
195
  {
187
196
  type: 'control',
188
197
  label: {
189
- en: 'Text & icon gap'
198
+ en: 'Gap'
190
199
  },
191
200
  setting: {
192
201
  id: 'iconSpacing'
@@ -196,10 +205,19 @@ const SettingUIV2 = [
196
205
  ]
197
206
  },
198
207
  {
199
- label: {
200
- en: 'Text style'
201
- },
202
208
  controls: [
209
+ {
210
+ label: {
211
+ en: 'Text'
212
+ },
213
+ setting: {
214
+ id: 'enableTextStyle'
215
+ },
216
+ options: {
217
+ labelVariant: 'primary',
218
+ toggleStyle: 'switch'
219
+ }
220
+ },
203
221
  {
204
222
  id: 'typo',
205
223
  label: {
@@ -208,6 +226,7 @@ const SettingUIV2 = [
208
226
  setting: {
209
227
  id: 'typo'
210
228
  },
229
+ conditionDisplay: 'enableTextStyle == true',
211
230
  options: {
212
231
  hideLabel: true,
213
232
  fullWidth: true,
@@ -252,6 +271,15 @@ const SettingUIV2 = [
252
271
  state: 'hover'
253
272
  }
254
273
  },
274
+ {
275
+ label: {
276
+ en: 'Image'
277
+ },
278
+ setting: {
279
+ id: 'backgroundImage',
280
+ state: 'hover'
281
+ }
282
+ },
255
283
  {
256
284
  label: {
257
285
  en: 'Text color'
@@ -295,13 +323,23 @@ const SettingUIV2 = [
295
323
  ]
296
324
  },
297
325
  {
298
- label: {
299
- en: 'Link'
300
- },
301
326
  controls: [
327
+ {
328
+ label: {
329
+ en: 'Link'
330
+ },
331
+ setting: {
332
+ id: 'enableBtnLink'
333
+ },
334
+ options: {
335
+ labelVariant: 'primary',
336
+ toggleStyle: 'switch'
337
+ }
338
+ },
302
339
  {
303
340
  type: 'control',
304
341
  layout: 'vertical',
342
+ conditionDisplay: 'enableBtnLink == true',
305
343
  setting: {
306
344
  id: 'btnLink'
307
345
  }
@@ -321,7 +359,7 @@ const SettingUIV2 = [
321
359
  options: {
322
360
  labelVariant: 'primary',
323
361
  fullWidth: true,
324
- disableMessage: `Align is not supported when width is 100%`
362
+ disableMessage: `Horizontal alignment is disabled when the width is set to 100% or greater`
325
363
  }
326
364
  }
327
365
  ]
@@ -86,7 +86,7 @@ const NewsletterSettings = [
86
86
  desktop: {
87
87
  default: {
88
88
  type: 'color',
89
- color: '#DDDDDD',
89
+ color: '#E2E2E2',
90
90
  image: {
91
91
  src: 'https://ucarecdn.com/5e27d43d-eb1e-4e71-b7e1-4158f3071bb6/-/format/auto/',
92
92
  width: 1200,
@@ -117,7 +117,7 @@ const NewsletterSettings = [
117
117
  hide: true,
118
118
  devices: {
119
119
  desktop: {
120
- default: '100%'
120
+ default: '480px'
121
121
  }
122
122
  }
123
123
  },
@@ -90,54 +90,10 @@ const SettingUIV2 = [
90
90
  label: 'Fit content',
91
91
  value: 'Auto',
92
92
  showValue: true
93
- },
94
- {
95
- label: 'Full',
96
- value: '100%',
97
- showValue: true
98
- },
99
- {
100
- label: 'Small',
101
- value: '100px',
102
- showValue: true
103
- },
104
- {
105
- label: 'Medium',
106
- value: '116px',
107
- showValue: true
108
- },
109
- {
110
- label: 'Large',
111
- value: '132px',
112
- showValue: true
113
93
  }
114
94
  ]
115
95
  },
116
96
  layout: 'horizontal'
117
- },
118
- {
119
- label: {
120
- en: 'Padding'
121
- },
122
- controlConfig: {
123
- id: 'padding',
124
- type: 'padding-v2',
125
- linkWithSetting: {
126
- name: 'globalSize',
127
- field: 'padding'
128
- },
129
- compoDefaultValue: {
130
- desktop: {
131
- default: {
132
- type: 'medium',
133
- top: '12px',
134
- bottom: '12px',
135
- left: '24px',
136
- right: '24px'
137
- }
138
- }
139
- }
140
- }
141
97
  }
142
98
  ]
143
99
  },
@@ -107,7 +107,7 @@ const SettingUIV2 = [
107
107
  },
108
108
  {
109
109
  label: {
110
- en: 'Image'
110
+ en: 'Source'
111
111
  },
112
112
  controls: [
113
113
  {
@@ -283,6 +283,10 @@ const SettingUIV2 = [
283
283
  label: {
284
284
  en: 'Optimize LCP'
285
285
  },
286
+ messageConfig: {
287
+ type: 'info',
288
+ message: 'You can optimize image size with our partnered app'
289
+ },
286
290
  controls: [
287
291
  {
288
292
  label: {
package/dist/esm/index.js CHANGED
@@ -161,7 +161,7 @@ export { default as PostPurchaseProductVariants } from './post-purchase/product/
161
161
  export { default as PostPurchaseAcceptButton } from './post-purchase/product/components/AcceptButton.js';
162
162
  export { default as PostPurchaseProductQuantity } from './post-purchase/product/components/ProductQuantity.js';
163
163
  export { default as PostPurchaseProductPriceBreakdown } from './post-purchase/product/components/ProductPriceBreakdown.js';
164
- export { default as PostPurchaseProductOffer } from './post-purchase/product/components/ProductOffer.js';
164
+ export { default as PostPurchaseProductOffer } from './post-purchase/product/components/product-offer/components/ProductOffer.js';
165
165
  export { default as PostPurchaseProductDiscountTag } from './post-purchase/product/components/ProductDiscountTag.js';
166
166
  export { default as PostPurchaseProductImages } from './post-purchase/product/components/product-image/index.js';
167
167
  export { postPurchaseProduct1Col } from './post-purchase/product/settings/presets-config/product-presets/product-1-col.js';
@@ -2,6 +2,16 @@
2
2
  export { default as Accordion } from './accordion/components/Accordion.liquid.js';
3
3
  export { default as AccordionItem } from './accordion/components/AccordionItem.liquid.js';
4
4
  export { default as ArticleList } from './article/components/ArticleList.liquid.js';
5
+ export { default as ArticleTitle } from './article/components/ArticleTitle.liquid.js';
6
+ export { default as ArticleExcerpt } from './article/components/ArticleExcerpt.liquid.js';
7
+ export { default as ArticleContent } from './article/components/ArticleContent.liquid.js';
8
+ export { default as ArticleImage } from './article/components/ArticleImage.liquid.js';
9
+ export { default as ArticlePagination } from './article/components/ArticlePagination.liquid.js';
10
+ export { default as ArticleAuthor } from './article/components/ArticleAuthor.liquid.js';
11
+ export { default as ArticleTag } from './article/components/ArticleTag.liquid.js';
12
+ export { default as ArticleCategory } from './article/components/ArticleCategory.liquid.js';
13
+ export { default as ArticleDate } from './article/components/ArticleDate.liquid.js';
14
+ export { default as ArticleReadMore } from './article/components/ArticleReadMore.liquid.js';
5
15
  export { default as HeroBanner } from './banner/components/HeroBanner.liquid.js';
6
16
  export { default as Breadcrumb } from './breadcrumb/components/Breadcrumb.liquid.js';
7
17
  export { default as Button } from './button/components/Button.liquid.js';
@@ -91,14 +91,15 @@ const CalloutTextSettings = [
91
91
  ],
92
92
  hideUnit: false,
93
93
  devices: {
94
+ // Default: 100%
94
95
  desktop: {
95
- default: 'default'
96
+ default: '100%'
96
97
  },
97
98
  tablet: {
98
- default: 'default'
99
+ default: '100%'
99
100
  },
100
101
  mobile: {
101
- default: 'default'
102
+ default: '100%'
102
103
  }
103
104
  },
104
105
  displayOptions: [
@@ -13,11 +13,8 @@ const getImageClass = ()=>{
13
13
  return composeClasses(classList);
14
14
  };
15
15
  const getImageWrapperClass = (settings)=>{
16
- const classList = 'gp-border';
17
16
  return {
18
- ...composeClasses(classList),
19
- 'gp-border-[#d9d9d9]': settings?.enableBorder !== 'none',
20
- 'gp-border-transparent': settings?.enableBorder === 'none'
17
+ 'gp-border-[#d9d9d9] gp-border': settings?.enableBorder !== 'none'
21
18
  };
22
19
  };
23
20
 
@@ -11,11 +11,10 @@ const getNavigationClass = ()=>{
11
11
  return composeClasses('gp-w-[24px] gp-h-[24px] gp-shrink-0 gp-flex gp-items-center gp-justify-center');
12
12
  };
13
13
  const getItemCarouselPostPurchaseClass = (settings)=>{
14
- const classList = 'gp-w-full gp-border';
14
+ const classList = 'gp-w-full';
15
15
  return {
16
16
  ...composeClasses(classList),
17
- '!gp-border-[#d9d9d9]': settings?.border,
18
- 'gp-border-transparent': !settings?.border
17
+ '!gp-border-[#d9d9d9] !gp-border': settings?.border
19
18
  };
20
19
  };
21
20
  const getItemCarouseEmptyPostPurchaseClass = ()=>{
@@ -29,7 +28,7 @@ const getImageGridClass = ()=>{
29
28
  };
30
29
  const getProductImageClass = (settings)=>{
31
30
  return {
32
- ...composeClasses('gp-flex'),
31
+ ...composeClasses('gp-flex gp-w-full'),
33
32
  [getPostPurchaseAlignClasses(settings?.align)]: true
34
33
  };
35
34
  };
@@ -40,7 +39,7 @@ const getFeatureImageClass = ()=>{
40
39
  return composeClasses('gp-flex gp-justify-center gp-h-fit gp-w-full');
41
40
  };
42
41
  const getOnlyFeatureLayoutClass = ()=>{
43
- return composeClasses('gp-flex gp-h-fit gp-max-w-full');
42
+ return composeClasses('gp-flex gp-h-fit gp-max-w-full gp-w-full');
44
43
  };
45
44
 
46
45
  export { getContainerClasses, getFeatureImageClass, getImageGridClass, getImageListClass, getItemCarouseEmptyPostPurchaseClass, getItemCarouselPostPurchaseClass, getNavigationClass, getOnlyFeatureLayoutClass, getProductImageClass, getProductImageLayoutClass };
@@ -7,10 +7,11 @@ import '@gem-sdk/core';
7
7
  import { useListCarousel } from '../../../hooks/product-image/useListCarousel.js';
8
8
 
9
9
  const CarouselPostPurchase = (props)=>{
10
- const { productImages, itemPerRow, border, aspectRatio, objectFit } = props;
10
+ const { productImages, itemPerRow, border, aspectRatio, objectFit, vertical } = props;
11
11
  const { listRender } = useListCarousel({
12
12
  productImages,
13
- itemPerRow
13
+ itemPerRow,
14
+ vertical
14
15
  });
15
16
  const itemEmptyClass = createClass(getItemCarouseEmptyPostPurchaseClass());
16
17
  return /*#__PURE__*/ jsx(Fragment, {
@@ -56,7 +56,8 @@ const CarouselWrapperPostPurchase = ({ styles, setting, productImages, objectFit
56
56
  itemPerRow: itemPerSlide,
57
57
  border: border,
58
58
  aspectRatio: aspectRatio,
59
- objectFit: objectFit
59
+ objectFit: objectFit,
60
+ vertical: vertical
60
61
  }),
61
62
  /*#__PURE__*/ jsx(ArrowPostPurchase, {
62
63
  type: "next",
@@ -0,0 +1,12 @@
1
+ const getProductOfferAttrs = (product, uid)=>{
2
+ return {
3
+ 'data-uid': uid || '',
4
+ 'data-component-type': 'component',
5
+ 'data-component-tag': 'Product',
6
+ 'data-component-label': 'Product',
7
+ 'data-component-no-setting': true,
8
+ 'data-product-id': product?.baseID?.replace('gid://shopify/Product/', '') || ''
9
+ };
10
+ };
11
+
12
+ export { getProductOfferAttrs };
@@ -0,0 +1,25 @@
1
+ import { composeClasses } from '@gem-sdk/core';
2
+ import { DEVICES } from '../../../../utils/constants.js';
3
+
4
+ const getProductOfferContainerClasses = (uid)=>{
5
+ return {
6
+ ...composeClasses(uid),
7
+ ...composeClasses('gp-flex gp-w-auto')
8
+ };
9
+ };
10
+ const getProductOfferWrapperClasses = ()=>{
11
+ return composeClasses('gp-grid gp-grid-cols-2');
12
+ };
13
+ const getProductOfferItemClasses = (index, setting, totalProduct)=>{
14
+ const { productOfferLayout } = setting ?? {};
15
+ let className = '';
16
+ DEVICES.map((device)=>{
17
+ const key = device === 'desktop' ? '' : `${device}:`;
18
+ if (productOfferLayout?.[device] === '1col' && index % 3 === 0 || (totalProduct || 0) <= 1) {
19
+ className += ` ${key}gp-col-span-2`;
20
+ }
21
+ });
22
+ return composeClasses(className);
23
+ };
24
+
25
+ export { getProductOfferContainerClasses, getProductOfferItemClasses, getProductOfferWrapperClasses };
@@ -0,0 +1,24 @@
1
+ import { filterTruthyStyles, makeStyleResponsive, makeWidth, makeStyle } from '@gem-sdk/core';
2
+ import { postPurchaseViewSpacing } from '../../../../utils/helper.js';
3
+
4
+ const getWrapperStyles = (styles)=>{
5
+ const { productOfferColumnGap, productOfferVerticalGutter, productOfferWidth } = styles ?? {};
6
+ return filterTruthyStyles({
7
+ ...makeStyleResponsive('cg', productOfferColumnGap),
8
+ ...makeStyleResponsive('rg', {
9
+ desktop: postPurchaseViewSpacing[productOfferVerticalGutter || 'base']
10
+ }),
11
+ ...makeStyleResponsive('w', makeWidth(productOfferWidth))
12
+ });
13
+ };
14
+ const getContainerStyles = (setting, style)=>{
15
+ const { inlineAlignment } = setting ?? {};
16
+ return filterTruthyStyles({
17
+ ...makeStyle({
18
+ pc: inlineAlignment
19
+ }),
20
+ ...style
21
+ });
22
+ };
23
+
24
+ export { getContainerStyles, getWrapperStyles };