@gem-sdk/components 2.0.0-dev.355 → 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 (70) hide show
  1. package/dist/cjs/builder.js +1 -1
  2. package/dist/cjs/button/components/Button.js +5 -3
  3. package/dist/cjs/button/components/Button.liquid.js +7 -3
  4. package/dist/cjs/button/components/common/attributes.js +1 -2
  5. package/dist/cjs/button/components/common/helpers.js +2 -2
  6. package/dist/cjs/button/components/common/styles.js +29 -1
  7. package/dist/cjs/button/setting/configs/settings.js +24 -4
  8. package/dist/cjs/button/setting/configs/uiV2.js +46 -8
  9. package/dist/cjs/image/setting/configs/uiV2.js +5 -1
  10. package/dist/cjs/index.js +1 -1
  11. package/dist/cjs/post-purchase/callout-banner/setting/config/callout-text/setting.js +4 -3
  12. package/dist/cjs/post-purchase/product/components/product-offer/common/attrs.js +14 -0
  13. package/dist/cjs/post-purchase/product/components/product-offer/common/classes.js +29 -0
  14. package/dist/cjs/post-purchase/product/components/product-offer/common/styles.js +27 -0
  15. package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOffer.js +53 -0
  16. package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOfferItem.js +45 -0
  17. package/dist/cjs/post-purchase/product/components/product-offer/hooks/useProductOfferData.js +57 -0
  18. package/dist/cjs/post-purchase/product/index.js +2 -2
  19. package/dist/cjs/post-purchase/product/next.js +1 -1
  20. package/dist/cjs/post-purchase/product/settings/{ProductOffer.js → product-offer/index.js} +23 -143
  21. package/dist/cjs/post-purchase/product/settings/product-offer/ui/uiV1.js +140 -0
  22. package/dist/cjs/post-purchase/product/settings/product-offer/ui/uiV2.js +141 -0
  23. package/dist/cjs/post-purchase/utils/constants.js +6 -0
  24. package/dist/cjs/product/components/ProductViewMore/ProductViewMore.js +17 -18
  25. package/dist/cjs/product/components/ProductViewMore/ProductViewMore.liquid.js +14 -21
  26. package/dist/cjs/product/components/ProductViewMore/common/data.js +26 -0
  27. package/dist/cjs/product/components/ProductViewMore/common/styles.js +12 -0
  28. package/dist/cjs/product/setting/dynamic-checkout/configs/settings.js +9 -5
  29. package/dist/cjs/product/setting/dynamic-checkout/configs/uiV2.js +10 -10
  30. package/dist/cjs/product/setting/product-button/configs/settings.js +1 -0
  31. package/dist/cjs/product/setting/product-button/configs/uiV2.js +1 -1
  32. package/dist/cjs/product/setting/product-view-more/configs/settings.js +17 -16
  33. package/dist/cjs/product/setting/product-view-more/configs/uiV2.js +45 -45
  34. package/dist/esm/builder.js +1 -1
  35. package/dist/esm/button/components/Button.js +5 -3
  36. package/dist/esm/button/components/Button.liquid.js +7 -3
  37. package/dist/esm/button/components/common/attributes.js +1 -2
  38. package/dist/esm/button/components/common/helpers.js +2 -2
  39. package/dist/esm/button/components/common/styles.js +29 -3
  40. package/dist/esm/button/setting/configs/settings.js +24 -4
  41. package/dist/esm/button/setting/configs/uiV2.js +46 -8
  42. package/dist/esm/image/setting/configs/uiV2.js +5 -1
  43. package/dist/esm/index.js +1 -1
  44. package/dist/esm/post-purchase/callout-banner/setting/config/callout-text/setting.js +4 -3
  45. package/dist/esm/post-purchase/product/components/product-offer/common/attrs.js +12 -0
  46. package/dist/esm/post-purchase/product/components/product-offer/common/classes.js +25 -0
  47. package/dist/esm/post-purchase/product/components/product-offer/common/styles.js +24 -0
  48. package/dist/esm/post-purchase/product/components/product-offer/components/ProductOffer.js +49 -0
  49. package/dist/esm/post-purchase/product/components/product-offer/components/ProductOfferItem.js +43 -0
  50. package/dist/esm/post-purchase/product/components/product-offer/hooks/useProductOfferData.js +55 -0
  51. package/dist/esm/post-purchase/product/index.js +1 -1
  52. package/dist/esm/post-purchase/product/next.js +1 -1
  53. package/dist/esm/post-purchase/product/settings/{ProductOffer.js → product-offer/index.js} +23 -143
  54. package/dist/esm/post-purchase/product/settings/product-offer/ui/uiV1.js +138 -0
  55. package/dist/esm/post-purchase/product/settings/product-offer/ui/uiV2.js +139 -0
  56. package/dist/esm/post-purchase/utils/constants.js +6 -1
  57. package/dist/esm/product/components/ProductViewMore/ProductViewMore.js +17 -18
  58. package/dist/esm/product/components/ProductViewMore/ProductViewMore.liquid.js +14 -21
  59. package/dist/esm/product/components/ProductViewMore/common/data.js +23 -0
  60. package/dist/esm/product/components/ProductViewMore/common/styles.js +10 -0
  61. package/dist/esm/product/setting/dynamic-checkout/configs/settings.js +9 -5
  62. package/dist/esm/product/setting/dynamic-checkout/configs/uiV2.js +10 -10
  63. package/dist/esm/product/setting/product-button/configs/settings.js +1 -0
  64. package/dist/esm/product/setting/product-button/configs/uiV2.js +1 -1
  65. package/dist/esm/product/setting/product-view-more/configs/settings.js +17 -16
  66. package/dist/esm/product/setting/product-view-more/configs/uiV2.js +45 -45
  67. package/dist/types/index.d.ts +32 -8
  68. package/package.json +2 -2
  69. package/dist/cjs/post-purchase/product/components/ProductOffer.js +0 -138
  70. package/dist/esm/post-purchase/product/components/ProductOffer.js +0 -133
@@ -288,15 +288,15 @@ const SettingUIV2 = [
288
288
  state: 'hover'
289
289
  }
290
290
  },
291
- // {
292
- // label: {
293
- // en: 'BG image',
294
- // },
295
- // setting: {
296
- // id: 'backgroundImage',
297
- // state: 'hover',
298
- // },
299
- // },
291
+ {
292
+ label: {
293
+ en: 'Image'
294
+ },
295
+ setting: {
296
+ id: 'backgroundImage',
297
+ state: 'hover'
298
+ }
299
+ },
300
300
  {
301
301
  label: {
302
302
  en: 'Text color'
@@ -366,7 +366,7 @@ const SettingUIV2 = [
366
366
  options: {
367
367
  labelVariant: 'primary',
368
368
  fullWidth: true,
369
- disableMessage: `Align is not supported when width is 100%`
369
+ disableMessage: `Horizontal alignment is disabled when the width is set to 100% or greater`
370
370
  }
371
371
  }
372
372
  ]
@@ -160,6 +160,7 @@ const ProductButtonSettings = [
160
160
  link: '/cart',
161
161
  target: '_self'
162
162
  },
163
+ isHiddenOpenLinkSelect: true,
163
164
  hide: true
164
165
  },
165
166
  {
@@ -550,7 +550,7 @@ const SettingUIV2 = [
550
550
  options: {
551
551
  labelVariant: 'primary',
552
552
  fullWidth: true,
553
- disableMessage: `Align is not supported when width is 100%`
553
+ disableMessage: `Horizontal alignment is disabled when the width is set to 100% or greater`
554
554
  }
555
555
  }
556
556
  ]
@@ -55,19 +55,9 @@ const ProductViewMoreSettings = [
55
55
  default: false
56
56
  },
57
57
  {
58
- id: 'target',
59
- type: 'option:value',
60
- options: [
61
- {
62
- label: 'Current',
63
- value: 'current'
64
- },
65
- {
66
- label: 'New Tab',
67
- value: 'new-tab'
68
- }
69
- ],
70
- default: 'current'
58
+ id: 'redirectNewTab',
59
+ type: 'toggle',
60
+ default: false
71
61
  }
72
62
  ]
73
63
  },
@@ -385,16 +375,25 @@ const ProductViewMoreSettings = [
385
375
  ],
386
376
  devices: {
387
377
  desktop: {
388
- default: 'center'
378
+ default: 'left'
389
379
  }
390
380
  }
391
381
  },
382
+ {
383
+ id: 'enableTextStyle',
384
+ label: '',
385
+ type: 'toggle',
386
+ default: true
387
+ },
392
388
  {
393
389
  id: 'typo',
394
390
  type: 'typography-v2',
395
391
  label: 'Typography',
396
392
  default: {
397
- type: 'paragraph-1'
393
+ type: 'paragraph-1',
394
+ attrs: {
395
+ color: 'text-1'
396
+ }
398
397
  },
399
398
  hiddenSetting: {
400
399
  textAlign: true
@@ -512,10 +511,12 @@ const ProductViewMoreSettings = [
512
511
  },
513
512
  {
514
513
  id: 'iconSpacing',
515
- type: 'input:unit',
514
+ type: 'input:slider',
516
515
  units: [
517
516
  'px'
518
517
  ],
518
+ step: 1,
519
+ max: 40,
519
520
  devices: {
520
521
  desktop: {
521
522
  default: '8px'
@@ -190,28 +190,27 @@ const SettingUIV2 = [
190
190
  ]
191
191
  },
192
192
  {
193
- label: {
194
- en: 'Icon'
195
- },
196
193
  controls: [
197
194
  {
195
+ label: {
196
+ en: 'Icon'
197
+ },
198
198
  setting: {
199
199
  id: 'iconVisible'
200
+ },
201
+ options: {
202
+ labelVariant: 'primary',
203
+ toggleStyle: 'switch'
200
204
  }
201
- }
202
- ]
203
- },
204
- {
205
- conditionDisplay: 'iconVisible == true',
206
- controls: [
205
+ },
207
206
  {
208
- type: 'control',
209
207
  label: {
210
- en: 'Choose icon'
208
+ en: 'Icon'
211
209
  },
212
210
  setting: {
213
211
  id: 'iconSvg'
214
- }
212
+ },
213
+ conditionDisplay: 'iconVisible == true'
215
214
  },
216
215
  {
217
216
  type: 'control',
@@ -220,24 +219,35 @@ const SettingUIV2 = [
220
219
  },
221
220
  setting: {
222
221
  id: 'iconAlign'
223
- }
222
+ },
223
+ conditionDisplay: 'iconVisible == true'
224
224
  },
225
225
  {
226
226
  type: 'control',
227
227
  label: {
228
- en: 'Spacing'
228
+ en: 'Text & icon gap'
229
229
  },
230
230
  setting: {
231
231
  id: 'iconSpacing'
232
- }
232
+ },
233
+ conditionDisplay: 'iconVisible == true'
233
234
  }
234
235
  ]
235
236
  },
236
237
  {
237
- label: {
238
- en: 'Text style'
239
- },
240
238
  controls: [
239
+ {
240
+ label: {
241
+ en: 'Text'
242
+ },
243
+ setting: {
244
+ id: 'enableTextStyle'
245
+ },
246
+ options: {
247
+ labelVariant: 'primary',
248
+ toggleStyle: 'switch'
249
+ }
250
+ },
241
251
  {
242
252
  id: 'typo',
243
253
  label: {
@@ -246,6 +256,7 @@ const SettingUIV2 = [
246
256
  setting: {
247
257
  id: 'typo'
248
258
  },
259
+ conditionDisplay: 'enableTextStyle == true',
249
260
  options: {
250
261
  hideLabel: true,
251
262
  fullWidth: true,
@@ -283,22 +294,22 @@ const SettingUIV2 = [
283
294
  controls: [
284
295
  {
285
296
  label: {
286
- en: 'Background'
297
+ en: 'Color'
287
298
  },
288
299
  setting: {
289
300
  id: 'backgroundColorV2',
290
301
  state: 'hover'
291
302
  }
292
303
  },
293
- // {
294
- // label: {
295
- // en: 'BG image',
296
- // },
297
- // setting: {
298
- // id: 'backgroundImage',
299
- // state: 'hover',
300
- // },
301
- // },
304
+ {
305
+ label: {
306
+ en: 'Image'
307
+ },
308
+ setting: {
309
+ id: 'backgroundImage',
310
+ state: 'hover'
311
+ }
312
+ },
302
313
  {
303
314
  label: {
304
315
  en: 'Text color'
@@ -341,28 +352,17 @@ const SettingUIV2 = [
341
352
  }
342
353
  ]
343
354
  },
344
- // {
345
- // label: {
346
- // en: 'Link',
347
- // },
348
- // controls: [
349
- // {
350
- // type: 'control',
351
- // layout: 'vertical',
352
- // setting: {
353
- // id: 'btnLink',
354
- // },
355
- // },
356
- // ],
357
- // },
358
355
  {
359
356
  label: {
360
- en: 'Open in'
357
+ en: 'Redirect to'
361
358
  },
362
359
  controls: [
363
360
  {
361
+ label: {
362
+ en: 'New tab'
363
+ },
364
364
  setting: {
365
- id: 'target'
365
+ id: 'redirectNewTab'
366
366
  }
367
367
  }
368
368
  ]
@@ -380,7 +380,7 @@ const SettingUIV2 = [
380
380
  options: {
381
381
  labelVariant: 'primary',
382
382
  fullWidth: true,
383
- disableMessage: `Align is not supported when width is 100%`
383
+ disableMessage: `Horizontal alignment is disabled when the width is set to 100% or greater`
384
384
  }
385
385
  }
386
386
  ]
@@ -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
  ]
@@ -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';
@@ -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: [