@gem-sdk/components 2.0.0-dev.261 → 2.0.0-dev.266

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 (108) hide show
  1. package/dist/cjs/banner/components/HeroBannerItem.liquid.js +3 -2
  2. package/dist/cjs/estimate-delivery/components/EstimateDate.liquid.js +3 -2
  3. package/dist/cjs/grid/row/setting/configs/settings.js +9 -83
  4. package/dist/cjs/grid/section/setting/configs/settings.js +13 -75
  5. package/dist/cjs/icon-list-hoz/setting/configs/settings.js +4 -17
  6. package/dist/cjs/post-purchase/advanced-list/setting/configs/uiV2.js +3 -15
  7. package/dist/cjs/post-purchase/line/setting/configs/settings.js +3 -1
  8. package/dist/cjs/post-purchase/line/setting/configs/uiV2.js +2 -1
  9. package/dist/cjs/post-purchase/link/components/PostPurchaseLink.js +23 -14
  10. package/dist/cjs/post-purchase/link/components/common/getClasses.js +7 -1
  11. package/dist/cjs/post-purchase/link/setting/configs/settings.js +21 -14
  12. package/dist/cjs/post-purchase/product/common/getClasses.js +45 -0
  13. package/dist/cjs/post-purchase/product/common/getStyles.js +43 -0
  14. package/dist/cjs/post-purchase/product/components/product-image/FeatureImage.js +32 -42
  15. package/dist/cjs/post-purchase/product/components/product-image/ImageListCarousel.js +6 -65
  16. package/dist/cjs/post-purchase/product/components/product-image/ImageListGrid.js +24 -68
  17. package/dist/cjs/post-purchase/product/components/product-image/ItemCarouselPostPurchase.js +42 -0
  18. package/dist/cjs/post-purchase/product/components/product-image/ItemGridPostPurchase.js +42 -0
  19. package/dist/cjs/post-purchase/product/components/product-image/carousel-post-purchase/Arrow.js +29 -0
  20. package/dist/cjs/post-purchase/product/components/product-image/carousel-post-purchase/CarouselPostPurchase.js +35 -0
  21. package/dist/cjs/post-purchase/product/components/product-image/carousel-post-purchase/CarouselPostPurchaseContext.js +22 -0
  22. package/dist/cjs/post-purchase/product/components/product-image/carousel-post-purchase/CarouselWrapperPostPurchase.js +75 -0
  23. package/dist/cjs/post-purchase/product/components/product-image/index.js +41 -43
  24. package/dist/cjs/post-purchase/product/components/product-image/layouts/FeatureImageWithGalleryImage.js +22 -58
  25. package/dist/cjs/post-purchase/product/components/product-image/layouts/OnlyGalleryImage.js +19 -12
  26. package/dist/cjs/post-purchase/product/constants/index.js +36 -0
  27. package/dist/cjs/post-purchase/product/hooks/product-image/useCarousel.js +14 -0
  28. package/dist/cjs/post-purchase/product/hooks/product-image/useFeatureImagePostPurchase.js +32 -0
  29. package/dist/cjs/post-purchase/product/hooks/product-image/useListCarousel.js +43 -0
  30. package/dist/cjs/post-purchase/product/hooks/product-image/useNavigationCarouselPostPurchase.js +32 -0
  31. package/dist/cjs/post-purchase/product/hooks/product-image/useProductImagePostPurchase.js +60 -0
  32. package/dist/cjs/post-purchase/product/hooks/product-image/useSlideCarousel.js +35 -0
  33. package/dist/cjs/post-purchase/product/settings/product-description/settingV2.js +6 -9
  34. package/dist/cjs/post-purchase/product/settings/product-image/ProductFeatureImage.js +41 -0
  35. package/dist/cjs/post-purchase/product/settings/product-image/ProductGalleryImage.js +0 -118
  36. package/dist/cjs/post-purchase/product/settings/product-image/ProductImages.js +8 -79
  37. package/dist/cjs/post-purchase/product/settings/product-image/setting-v1.js +163 -0
  38. package/dist/cjs/post-purchase/product/settings/product-image/setting-v2.js +375 -0
  39. package/dist/cjs/post-purchase/product/settings/product-image/uiV1.js +42 -0
  40. package/dist/cjs/post-purchase/product/settings/product-image/uiV2.js +235 -0
  41. package/dist/cjs/post-purchase/product/settings/product-price/uiV2.js +0 -3
  42. package/dist/cjs/post-purchase/product/settings/product-price-breakdown/configs/settings.js +10 -6
  43. package/dist/cjs/post-purchase/product/settings/product-price-breakdown/configs/uiV2.js +2 -2
  44. package/dist/cjs/post-purchase/product/settings/product-quantity/configs/settings.js +3 -1
  45. package/dist/cjs/post-purchase/product/settings/product-title/settingV2.js +6 -9
  46. package/dist/cjs/post-purchase/text/settings/text/settingV2.js +0 -7
  47. package/dist/cjs/post-purchase/text/settings/text/uiV2.js +2 -2
  48. package/dist/cjs/product/components/FileUpload/components/common/index.js +3 -2
  49. package/dist/cjs/product/setting/product/configs/presets.js +1 -1
  50. package/dist/cjs/product/setting/product/configs/settings.js +4 -20
  51. package/dist/cjs/setting.js +2 -1
  52. package/dist/esm/banner/components/HeroBannerItem.liquid.js +3 -2
  53. package/dist/esm/estimate-delivery/components/EstimateDate.liquid.js +3 -2
  54. package/dist/esm/grid/row/setting/configs/settings.js +9 -83
  55. package/dist/esm/grid/section/setting/configs/settings.js +13 -75
  56. package/dist/esm/icon-list-hoz/setting/configs/settings.js +4 -17
  57. package/dist/esm/post-purchase/advanced-list/setting/configs/uiV2.js +3 -15
  58. package/dist/esm/post-purchase/line/setting/configs/settings.js +3 -1
  59. package/dist/esm/post-purchase/line/setting/configs/uiV2.js +2 -1
  60. package/dist/esm/post-purchase/link/components/PostPurchaseLink.js +25 -16
  61. package/dist/esm/post-purchase/link/components/common/getClasses.js +7 -2
  62. package/dist/esm/post-purchase/link/setting/configs/settings.js +21 -14
  63. package/dist/esm/post-purchase/product/common/getClasses.js +37 -1
  64. package/dist/esm/post-purchase/product/common/getStyles.js +39 -1
  65. package/dist/esm/post-purchase/product/components/product-image/FeatureImage.js +32 -42
  66. package/dist/esm/post-purchase/product/components/product-image/ImageListCarousel.js +7 -66
  67. package/dist/esm/post-purchase/product/components/product-image/ImageListGrid.js +24 -68
  68. package/dist/esm/post-purchase/product/components/product-image/ItemCarouselPostPurchase.js +40 -0
  69. package/dist/esm/post-purchase/product/components/product-image/ItemGridPostPurchase.js +40 -0
  70. package/dist/esm/post-purchase/product/components/product-image/carousel-post-purchase/Arrow.js +27 -0
  71. package/dist/esm/post-purchase/product/components/product-image/carousel-post-purchase/CarouselPostPurchase.js +33 -0
  72. package/dist/esm/post-purchase/product/components/product-image/carousel-post-purchase/CarouselPostPurchaseContext.js +19 -0
  73. package/dist/esm/post-purchase/product/components/product-image/carousel-post-purchase/CarouselWrapperPostPurchase.js +73 -0
  74. package/dist/esm/post-purchase/product/components/product-image/index.js +42 -44
  75. package/dist/esm/post-purchase/product/components/product-image/layouts/FeatureImageWithGalleryImage.js +22 -58
  76. package/dist/esm/post-purchase/product/components/product-image/layouts/OnlyGalleryImage.js +19 -12
  77. package/dist/esm/post-purchase/product/constants/index.js +34 -0
  78. package/dist/esm/post-purchase/product/hooks/product-image/useCarousel.js +12 -0
  79. package/dist/esm/post-purchase/product/hooks/product-image/useFeatureImagePostPurchase.js +30 -0
  80. package/dist/esm/post-purchase/product/hooks/product-image/useListCarousel.js +41 -0
  81. package/dist/esm/post-purchase/product/hooks/product-image/useNavigationCarouselPostPurchase.js +30 -0
  82. package/dist/esm/post-purchase/product/hooks/product-image/useProductImagePostPurchase.js +58 -0
  83. package/dist/esm/post-purchase/product/hooks/product-image/useSlideCarousel.js +33 -0
  84. package/dist/esm/post-purchase/product/settings/product-description/settingV2.js +6 -9
  85. package/dist/esm/post-purchase/product/settings/product-image/ProductFeatureImage.js +41 -0
  86. package/dist/esm/post-purchase/product/settings/product-image/ProductGalleryImage.js +1 -118
  87. package/dist/esm/post-purchase/product/settings/product-image/ProductImages.js +8 -79
  88. package/dist/esm/post-purchase/product/settings/product-image/setting-v1.js +161 -0
  89. package/dist/esm/post-purchase/product/settings/product-image/setting-v2.js +373 -0
  90. package/dist/esm/post-purchase/product/settings/product-image/uiV1.js +40 -0
  91. package/dist/esm/post-purchase/product/settings/product-image/uiV2.js +233 -0
  92. package/dist/esm/post-purchase/product/settings/product-price/uiV2.js +0 -3
  93. package/dist/esm/post-purchase/product/settings/product-price-breakdown/configs/settings.js +10 -6
  94. package/dist/esm/post-purchase/product/settings/product-price-breakdown/configs/uiV2.js +2 -2
  95. package/dist/esm/post-purchase/product/settings/product-quantity/configs/settings.js +3 -1
  96. package/dist/esm/post-purchase/product/settings/product-title/settingV2.js +6 -9
  97. package/dist/esm/post-purchase/text/settings/text/settingV2.js +0 -7
  98. package/dist/esm/post-purchase/text/settings/text/uiV2.js +2 -2
  99. package/dist/esm/product/components/FileUpload/components/common/index.js +3 -2
  100. package/dist/esm/product/setting/product/configs/presets.js +1 -1
  101. package/dist/esm/product/setting/product/configs/settings.js +4 -20
  102. package/dist/esm/setting.js +2 -1
  103. package/dist/types/index.d.ts +12 -5
  104. package/package.json +4 -4
  105. package/dist/cjs/post-purchase/product/components/product-image/Arrow.js +0 -60
  106. package/dist/cjs/post-purchase/product/components/product-image/CarouselPostPurchase.js +0 -78
  107. package/dist/esm/post-purchase/product/components/product-image/Arrow.js +0 -58
  108. package/dist/esm/post-purchase/product/components/product-image/CarouselPostPurchase.js +0 -76
@@ -24,33 +24,20 @@ const SectionSettings = [
24
24
  {
25
25
  label: 'Start',
26
26
  value: 'start',
27
- icon: `<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
28
- <path d="M1.91699 1C2.19314 1 2.41699 1.22386 2.41699 1.5L2.41699 14.5C2.41699 14.7761 2.19313 15 1.91699 15C1.64085 15 1.41699 14.7761 1.41699 14.5V1.5C1.41699 1.22386 1.64085 1 1.91699 1Z" fill="currentColor"/>
29
- <path fill-rule="evenodd" clip-rule="evenodd" d="M2.91699 5C2.91699 4.17157 3.58857 3.5 4.41699 3.5H9.41699C10.2454 3.5 10.917 4.17157 10.917 5V6C10.917 6.82843 10.2454 7.5 9.41699 7.5H4.41699C3.58857 7.5 2.91699 6.82843 2.91699 6V5ZM4.41699 4.5C4.14085 4.5 3.91699 4.72386 3.91699 5V6C3.91699 6.27614 4.14085 6.5 4.41699 6.5H9.41699C9.69314 6.5 9.91699 6.27614 9.91699 6V5C9.91699 4.72386 9.69314 4.5 9.41699 4.5H4.41699Z" fill="currentColor"/>
30
- <path fill-rule="evenodd" clip-rule="evenodd" d="M4.41699 8.5C3.58857 8.5 2.91699 9.17157 2.91699 10V11C2.91699 11.8284 3.58857 12.5 4.41699 12.5H12.417C13.2454 12.5 13.917 11.8284 13.917 11V10C13.917 9.17157 13.2454 8.5 12.417 8.5H4.41699ZM3.91699 10C3.91699 9.72386 4.14085 9.5 4.41699 9.5H12.417C12.6931 9.5 12.917 9.72386 12.917 10V11C12.917 11.2761 12.6931 11.5 12.417 11.5H4.41699C4.14085 11.5 3.91699 11.2761 3.91699 11V10Z" fill="currentColor"/>
31
- </svg>
32
- `,
33
- tooltip: 'Align left'
27
+ tooltip: 'Align left',
28
+ iconName: 'gp-align-left'
34
29
  },
35
30
  {
36
31
  label: 'Center',
37
32
  value: 'center',
38
- icon: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
39
- <path fill-rule="evenodd" clip-rule="evenodd" d="M8 1C8.27614 1 8.5 1.22386 8.5 1.5V3.5H10.5C11.3284 3.5 12 4.17157 12 5V6C12 6.82843 11.3284 7.5 10.5 7.5H8.5V8.5H12C12.8284 8.5 13.5 9.17157 13.5 10V11C13.5 11.8284 12.8284 12.5 12 12.5H8.5V14.5C8.5 14.7761 8.27614 15 8 15C7.72386 15 7.5 14.7761 7.5 14.5V12.5H4C3.17157 12.5 2.5 11.8284 2.5 11V10C2.5 9.17157 3.17157 8.5 4 8.5H7.5V7.5H5.5C4.67157 7.5 4 6.82843 4 6V5C4 4.17157 4.67157 3.5 5.5 3.5H7.5V1.5C7.5 1.22386 7.72386 1 8 1ZM12 11.5C12.2761 11.5 12.5 11.2761 12.5 11V10C12.5 9.72386 12.2761 9.5 12 9.5H4C3.72386 9.5 3.5 9.72386 3.5 10V11C3.5 11.2761 3.72386 11.5 4 11.5H12ZM10.5 6.5H5.5C5.22386 6.5 5 6.27614 5 6V5C5 4.72386 5.22386 4.5 5.5 4.5H10.5C10.7761 4.5 11 4.72386 11 5V6C11 6.27614 10.7761 6.5 10.5 6.5Z" fill="currentColor"/>
40
- </svg>
41
- `,
42
- tooltip: 'Align horizontal center'
33
+ tooltip: 'Align horizontal center',
34
+ iconName: 'gp-align-center'
43
35
  },
44
36
  {
45
37
  label: 'End',
46
38
  value: 'end',
47
- icon: `<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
48
- <path d="M14.084 15C14.3601 15 14.584 14.7761 14.584 14.5L14.584 1.5C14.584 1.22386 14.3601 1 14.084 1C13.8078 1 13.584 1.22386 13.584 1.5L13.584 14.5C13.584 14.7761 13.8078 15 14.084 15Z" fill="currentColor"/>
49
- <path fill-rule="evenodd" clip-rule="evenodd" d="M5.08398 6C5.08398 6.82843 5.75556 7.5 6.58398 7.5H11.584C12.4124 7.5 13.084 6.82843 13.084 6V5C13.084 4.17157 12.4124 3.5 11.584 3.5L6.58398 3.5C5.75556 3.5 5.08398 4.17157 5.08398 5V6ZM6.58398 6.5C6.30784 6.5 6.08398 6.27614 6.08398 6V5C6.08398 4.72386 6.30784 4.5 6.58398 4.5L11.584 4.5C11.8601 4.5 12.084 4.72386 12.084 5V6C12.084 6.27614 11.8601 6.5 11.584 6.5H6.58398Z" fill="currentColor"/>
50
- <path fill-rule="evenodd" clip-rule="evenodd" d="M3.58398 12.5C2.75556 12.5 2.08398 11.8284 2.08398 11L2.08398 10C2.08398 9.17157 2.75556 8.5 3.58398 8.5H11.584C12.4124 8.5 13.084 9.17157 13.084 10V11C13.084 11.8284 12.4124 12.5 11.584 12.5L3.58398 12.5ZM3.08398 11C3.08398 11.2761 3.30784 11.5 3.58398 11.5L11.584 11.5C11.8601 11.5 12.084 11.2761 12.084 11V10C12.084 9.72386 11.8601 9.5 11.584 9.5L3.58398 9.5C3.30784 9.5 3.08398 9.72386 3.08398 10L3.08398 11Z" fill="currentColor"/>
51
- </svg>
52
- `,
53
- tooltip: 'Align right'
39
+ tooltip: 'Align right',
40
+ iconName: 'gp-align-right'
54
41
  }
55
42
  ],
56
43
  devices: {
@@ -66,49 +53,26 @@ const SectionSettings = [
66
53
  {
67
54
  label: 'Start',
68
55
  value: 'start',
69
- icon: `<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
70
- <path d="M15.5 2.25C15.5 2.52614 15.2761 2.75 15 2.75L2 2.75C1.72386 2.75 1.5 2.52614 1.5 2.25C1.5 1.97386 1.72386 1.75 2 1.75L15 1.75C15.2761 1.75 15.5 1.97386 15.5 2.25Z" fill="currentColor"/>
71
- <path fill-rule="evenodd" clip-rule="evenodd" d="M11.5 3.25C12.3284 3.25 13 3.92157 13 4.75L13 9.75C13 10.5784 12.3284 11.25 11.5 11.25L10.5 11.25C9.67157 11.25 9 10.5784 9 9.75L9 4.75C9 3.92157 9.67157 3.25 10.5 3.25L11.5 3.25ZM12 4.75C12 4.47386 11.7761 4.25 11.5 4.25L10.5 4.25C10.2239 4.25 10 4.47386 10 4.75L10 9.75C10 10.0261 10.2239 10.25 10.5 10.25L11.5 10.25C11.7761 10.25 12 10.0261 12 9.75L12 4.75Z" fill="currentColor"/>
72
- <path fill-rule="evenodd" clip-rule="evenodd" d="M8 4.75C8 3.92157 7.32843 3.25 6.5 3.25L5.5 3.25C4.67157 3.25 4 3.92157 4 4.75L4 12.75C4 13.5784 4.67157 14.25 5.5 14.25L6.5 14.25C7.32843 14.25 8 13.5784 8 12.75L8 4.75ZM6.5 4.25C6.77614 4.25 7 4.47386 7 4.75L7 12.75C7 13.0261 6.77614 13.25 6.5 13.25L5.5 13.25C5.22386 13.25 5 13.0261 5 12.75L5 4.75C5 4.47386 5.22386 4.25 5.5 4.25L6.5 4.25Z" fill="currentColor"/>
73
- </svg>
74
- `,
75
56
  tooltip: 'Align top',
76
57
  iconName: 'gp-align-top'
77
58
  },
78
59
  {
79
60
  label: 'Center',
80
61
  value: 'center',
81
- icon: `<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
82
- <path fill-rule="evenodd" clip-rule="evenodd" d="M14.5 8.5C14.5 8.77614 14.2921 9 14.0357 9L12.1786 9L12.1786 11C12.1786 11.8284 11.555 12.5 10.7857 12.5L9.85714 12.5C9.08789 12.5 8.46429 11.8284 8.46429 11L8.46429 9L7.53571 9L7.53571 12.5C7.53571 13.3284 6.91211 14 6.14286 14L5.21429 14C4.44503 14 3.82143 13.3284 3.82143 12.5L3.82143 9L1.96429 9C1.70787 9 1.5 8.77614 1.5 8.5C1.5 8.22386 1.70787 8 1.96429 8L3.82143 8L3.82143 4.5C3.82143 3.67157 4.44503 3 5.21429 3L6.14286 3C6.91211 3 7.53572 3.67157 7.53572 4.5L7.53571 8L8.46429 8L8.46429 6C8.46429 5.17157 9.08789 4.5 9.85714 4.5L10.7857 4.5C11.555 4.5 12.1786 5.17157 12.1786 6L12.1786 8L14.0357 8C14.2921 8 14.5 8.22386 14.5 8.5ZM4.75 12.5C4.75 12.7761 4.95787 13 5.21429 13L6.14286 13C6.39928 13 6.60714 12.7761 6.60714 12.5L6.60714 4.5C6.60714 4.22386 6.39928 4 6.14286 4L5.21429 4C4.95787 4 4.75 4.22386 4.75 4.5L4.75 12.5ZM9.39286 11L9.39286 6C9.39286 5.72386 9.60073 5.5 9.85714 5.5L10.7857 5.5C11.0421 5.5 11.25 5.72386 11.25 6L11.25 11C11.25 11.2761 11.0421 11.5 10.7857 11.5L9.85714 11.5C9.60073 11.5 9.39286 11.2761 9.39286 11Z" fill="currentColor"/>
83
- </svg>
84
- `,
85
62
  tooltip: 'Align vertical center',
86
63
  iconName: 'gp-align-center-vertical'
87
64
  },
88
65
  {
89
66
  label: 'End',
90
67
  value: 'end',
91
- icon: `<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
92
- <path d="M1.5 14.5C1.5 14.2239 1.72386 14 2 14L15 14C15.2761 14 15.5 14.2239 15.5 14.5C15.5 14.7761 15.2761 15 15 15L2 15C1.72386 15 1.5 14.7761 1.5 14.5Z" fill="currentColor"/>
93
- <path fill-rule="evenodd" clip-rule="evenodd" d="M5.5 13.5C4.67157 13.5 4 12.8284 4 12L4 7C4 6.17157 4.67157 5.5 5.5 5.5L6.5 5.5C7.32843 5.5 8 6.17157 8 7L8 12C8 12.8284 7.32843 13.5 6.5 13.5L5.5 13.5ZM5 12C5 12.2761 5.22386 12.5 5.5 12.5L6.5 12.5C6.77614 12.5 7 12.2761 7 12L7 7C7 6.72386 6.77614 6.5 6.5 6.5L5.5 6.5C5.22386 6.5 5 6.72386 5 7L5 12Z" fill="currentColor"/>
94
- <path fill-rule="evenodd" clip-rule="evenodd" d="M9 12C9 12.8284 9.67157 13.5 10.5 13.5L11.5 13.5C12.3284 13.5 13 12.8284 13 12L13 4C13 3.17157 12.3284 2.5 11.5 2.5L10.5 2.5C9.67157 2.5 9 3.17157 9 4L9 12ZM10.5 12.5C10.2239 12.5 10 12.2761 10 12L10 4C10 3.72386 10.2239 3.5 10.5 3.5L11.5 3.5C11.7761 3.5 12 3.72386 12 4L12 12C12 12.2761 11.7761 12.5 11.5 12.5L10.5 12.5Z" fill="currentColor"/>
95
- </svg>
96
- `,
97
68
  tooltip: 'Align bottom',
98
69
  iconName: 'gp-align-bottom'
99
70
  },
100
71
  {
101
72
  label: 'Between',
102
73
  value: 'space-between',
103
- icon: `<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
104
- <path d="M2.00293 14.498L15.0037 14.498" stroke="currentColor" stroke-linecap="round"/>
105
- <path d="M2.00293 1.49805L15.0037 1.49805" stroke="currentColor" stroke-linecap="round"/>
106
- <rect x="2.5" y="6" width="3" height="12" rx="1" transform="rotate(-90 2.5 6)" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
107
- <rect x="2.5" y="13" width="3" height="12" rx="1" transform="rotate(-90 2.5 13)" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
108
- </svg>
109
- `,
110
74
  tooltip: 'Distribute vertical spacing',
111
- iconName: 'gp-align-space-between'
75
+ iconName: 'gp-justify-content-space-between'
112
76
  }
113
77
  ],
114
78
  devices: {
@@ -124,30 +88,17 @@ const SectionSettings = [
124
88
  {
125
89
  label: 'Start',
126
90
  value: 'start',
127
- icon: `<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
128
- <path d="M1.91699 1C2.19314 1 2.41699 1.22386 2.41699 1.5L2.41699 14.5C2.41699 14.7761 2.19313 15 1.91699 15C1.64085 15 1.41699 14.7761 1.41699 14.5V1.5C1.41699 1.22386 1.64085 1 1.91699 1Z" fill="currentColor"/>
129
- <path fill-rule="evenodd" clip-rule="evenodd" d="M2.91699 5C2.91699 4.17157 3.58857 3.5 4.41699 3.5H9.41699C10.2454 3.5 10.917 4.17157 10.917 5V6C10.917 6.82843 10.2454 7.5 9.41699 7.5H4.41699C3.58857 7.5 2.91699 6.82843 2.91699 6V5ZM4.41699 4.5C4.14085 4.5 3.91699 4.72386 3.91699 5V6C3.91699 6.27614 4.14085 6.5 4.41699 6.5H9.41699C9.69314 6.5 9.91699 6.27614 9.91699 6V5C9.91699 4.72386 9.69314 4.5 9.41699 4.5H4.41699Z" fill="currentColor"/>
130
- <path fill-rule="evenodd" clip-rule="evenodd" d="M4.41699 8.5C3.58857 8.5 2.91699 9.17157 2.91699 10V11C2.91699 11.8284 3.58857 12.5 4.41699 12.5H12.417C13.2454 12.5 13.917 11.8284 13.917 11V10C13.917 9.17157 13.2454 8.5 12.417 8.5H4.41699ZM3.91699 10C3.91699 9.72386 4.14085 9.5 4.41699 9.5H12.417C12.6931 9.5 12.917 9.72386 12.917 10V11C12.917 11.2761 12.6931 11.5 12.417 11.5H4.41699C4.14085 11.5 3.91699 11.2761 3.91699 11V10Z" fill="currentColor"/>
131
- </svg>
132
- `
91
+ iconName: 'gp-justify-content-top'
133
92
  },
134
93
  {
135
94
  label: 'Center',
136
95
  value: 'center',
137
- icon: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
138
- <path fill-rule="evenodd" clip-rule="evenodd" d="M8 1C8.27614 1 8.5 1.22386 8.5 1.5V3.5H10.5C11.3284 3.5 12 4.17157 12 5V6C12 6.82843 11.3284 7.5 10.5 7.5H8.5V8.5H12C12.8284 8.5 13.5 9.17157 13.5 10V11C13.5 11.8284 12.8284 12.5 12 12.5H8.5V14.5C8.5 14.7761 8.27614 15 8 15C7.72386 15 7.5 14.7761 7.5 14.5V12.5H4C3.17157 12.5 2.5 11.8284 2.5 11V10C2.5 9.17157 3.17157 8.5 4 8.5H7.5V7.5H5.5C4.67157 7.5 4 6.82843 4 6V5C4 4.17157 4.67157 3.5 5.5 3.5H7.5V1.5C7.5 1.22386 7.72386 1 8 1ZM12 11.5C12.2761 11.5 12.5 11.2761 12.5 11V10C12.5 9.72386 12.2761 9.5 12 9.5H4C3.72386 9.5 3.5 9.72386 3.5 10V11C3.5 11.2761 3.72386 11.5 4 11.5H12ZM10.5 6.5H5.5C5.22386 6.5 5 6.27614 5 6V5C5 4.72386 5.22386 4.5 5.5 4.5H10.5C10.7761 4.5 11 4.72386 11 5V6C11 6.27614 10.7761 6.5 10.5 6.5Z" fill="currentColor"/>
139
- </svg>
140
- `
96
+ iconName: 'gp-justify-content-center'
141
97
  },
142
98
  {
143
99
  label: 'End',
144
100
  value: 'end',
145
- icon: `<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
146
- <path d="M14.084 15C14.3601 15 14.584 14.7761 14.584 14.5L14.584 1.5C14.584 1.22386 14.3601 1 14.084 1C13.8078 1 13.584 1.22386 13.584 1.5L13.584 14.5C13.584 14.7761 13.8078 15 14.084 15Z" fill="currentColor"/>
147
- <path fill-rule="evenodd" clip-rule="evenodd" d="M5.08398 6C5.08398 6.82843 5.75556 7.5 6.58398 7.5H11.584C12.4124 7.5 13.084 6.82843 13.084 6V5C13.084 4.17157 12.4124 3.5 11.584 3.5L6.58398 3.5C5.75556 3.5 5.08398 4.17157 5.08398 5V6ZM6.58398 6.5C6.30784 6.5 6.08398 6.27614 6.08398 6V5C6.08398 4.72386 6.30784 4.5 6.58398 4.5L11.584 4.5C11.8601 4.5 12.084 4.72386 12.084 5V6C12.084 6.27614 11.8601 6.5 11.584 6.5H6.58398Z" fill="currentColor"/>
148
- <path fill-rule="evenodd" clip-rule="evenodd" d="M3.58398 12.5C2.75556 12.5 2.08398 11.8284 2.08398 11L2.08398 10C2.08398 9.17157 2.75556 8.5 3.58398 8.5H11.584C12.4124 8.5 13.084 9.17157 13.084 10V11C13.084 11.8284 12.4124 12.5 11.584 12.5L3.58398 12.5ZM3.08398 11C3.08398 11.2761 3.30784 11.5 3.58398 11.5L11.584 11.5C11.8601 11.5 12.084 11.2761 12.084 11V10C12.084 9.72386 11.8601 9.5 11.584 9.5L3.58398 9.5C3.30784 9.5 3.08398 9.72386 3.08398 10L3.08398 11Z" fill="currentColor"/>
149
- </svg>
150
- `
101
+ iconName: 'gp-justify-content-bottom'
151
102
  }
152
103
  ],
153
104
  default: 'start'
@@ -159,30 +110,17 @@ const SectionSettings = [
159
110
  {
160
111
  label: 'Start',
161
112
  value: 'start',
162
- icon: `<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
163
- <path d="M15.5 2.25C15.5 2.52614 15.2761 2.75 15 2.75L2 2.75C1.72386 2.75 1.5 2.52614 1.5 2.25C1.5 1.97386 1.72386 1.75 2 1.75L15 1.75C15.2761 1.75 15.5 1.97386 15.5 2.25Z" fill="currentColor"/>
164
- <path fill-rule="evenodd" clip-rule="evenodd" d="M11.5 3.25C12.3284 3.25 13 3.92157 13 4.75L13 9.75C13 10.5784 12.3284 11.25 11.5 11.25L10.5 11.25C9.67157 11.25 9 10.5784 9 9.75L9 4.75C9 3.92157 9.67157 3.25 10.5 3.25L11.5 3.25ZM12 4.75C12 4.47386 11.7761 4.25 11.5 4.25L10.5 4.25C10.2239 4.25 10 4.47386 10 4.75L10 9.75C10 10.0261 10.2239 10.25 10.5 10.25L11.5 10.25C11.7761 10.25 12 10.0261 12 9.75L12 4.75Z" fill="currentColor"/>
165
- <path fill-rule="evenodd" clip-rule="evenodd" d="M8 4.75C8 3.92157 7.32843 3.25 6.5 3.25L5.5 3.25C4.67157 3.25 4 3.92157 4 4.75L4 12.75C4 13.5784 4.67157 14.25 5.5 14.25L6.5 14.25C7.32843 14.25 8 13.5784 8 12.75L8 4.75ZM6.5 4.25C6.77614 4.25 7 4.47386 7 4.75L7 12.75C7 13.0261 6.77614 13.25 6.5 13.25L5.5 13.25C5.22386 13.25 5 13.0261 5 12.75L5 4.75C5 4.47386 5.22386 4.25 5.5 4.25L6.5 4.25Z" fill="currentColor"/>
166
- </svg>
167
- `
113
+ iconName: 'gp-justify-content-top'
168
114
  },
169
115
  {
170
116
  label: 'Center',
171
117
  value: 'center',
172
- icon: `<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
173
- <path fill-rule="evenodd" clip-rule="evenodd" d="M14.5 8.5C14.5 8.77614 14.2921 9 14.0357 9L12.1786 9L12.1786 11C12.1786 11.8284 11.555 12.5 10.7857 12.5L9.85714 12.5C9.08789 12.5 8.46429 11.8284 8.46429 11L8.46429 9L7.53571 9L7.53571 12.5C7.53571 13.3284 6.91211 14 6.14286 14L5.21429 14C4.44503 14 3.82143 13.3284 3.82143 12.5L3.82143 9L1.96429 9C1.70787 9 1.5 8.77614 1.5 8.5C1.5 8.22386 1.70787 8 1.96429 8L3.82143 8L3.82143 4.5C3.82143 3.67157 4.44503 3 5.21429 3L6.14286 3C6.91211 3 7.53572 3.67157 7.53572 4.5L7.53571 8L8.46429 8L8.46429 6C8.46429 5.17157 9.08789 4.5 9.85714 4.5L10.7857 4.5C11.555 4.5 12.1786 5.17157 12.1786 6L12.1786 8L14.0357 8C14.2921 8 14.5 8.22386 14.5 8.5ZM4.75 12.5C4.75 12.7761 4.95787 13 5.21429 13L6.14286 13C6.39928 13 6.60714 12.7761 6.60714 12.5L6.60714 4.5C6.60714 4.22386 6.39928 4 6.14286 4L5.21429 4C4.95787 4 4.75 4.22386 4.75 4.5L4.75 12.5ZM9.39286 11L9.39286 6C9.39286 5.72386 9.60073 5.5 9.85714 5.5L10.7857 5.5C11.0421 5.5 11.25 5.72386 11.25 6L11.25 11C11.25 11.2761 11.0421 11.5 10.7857 11.5L9.85714 11.5C9.60073 11.5 9.39286 11.2761 9.39286 11Z" fill="currentColor"/>
174
- </svg>
175
- `
118
+ iconName: 'gp-justify-content-center'
176
119
  },
177
120
  {
178
121
  label: 'End',
179
122
  value: 'end',
180
- icon: `<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
181
- <path d="M1.5 14.5C1.5 14.2239 1.72386 14 2 14L15 14C15.2761 14 15.5 14.2239 15.5 14.5C15.5 14.7761 15.2761 15 15 15L2 15C1.72386 15 1.5 14.7761 1.5 14.5Z" fill="currentColor"/>
182
- <path fill-rule="evenodd" clip-rule="evenodd" d="M5.5 13.5C4.67157 13.5 4 12.8284 4 12L4 7C4 6.17157 4.67157 5.5 5.5 5.5L6.5 5.5C7.32843 5.5 8 6.17157 8 7L8 12C8 12.8284 7.32843 13.5 6.5 13.5L5.5 13.5ZM5 12C5 12.2761 5.22386 12.5 5.5 12.5L6.5 12.5C6.77614 12.5 7 12.2761 7 12L7 7C7 6.72386 6.77614 6.5 6.5 6.5L5.5 6.5C5.22386 6.5 5 6.72386 5 7L5 12Z" fill="currentColor"/>
183
- <path fill-rule="evenodd" clip-rule="evenodd" d="M9 12C9 12.8284 9.67157 13.5 10.5 13.5L11.5 13.5C12.3284 13.5 13 12.8284 13 12L13 4C13 3.17157 12.3284 2.5 11.5 2.5L10.5 2.5C9.67157 2.5 9 3.17157 9 4L9 12ZM10.5 12.5C10.2239 12.5 10 12.2761 10 12L10 4C10 3.72386 10.2239 3.5 10.5 3.5L11.5 3.5C11.7761 3.5 12 3.72386 12 4L12 12C12 12.2761 11.7761 12.5 11.5 12.5L10.5 12.5Z" fill="currentColor"/>
184
- </svg>
185
- `
123
+ iconName: 'gp-justify-content-bottom'
186
124
  }
187
125
  ],
188
126
  default: 'start'
@@ -121,35 +121,22 @@ const IconListHozSettings = [
121
121
  label: 'Align top',
122
122
  value: 'start',
123
123
  type: 'align',
124
- icon: `<svg width="20" height="20" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
125
- <path d="M15.5 2.25C15.5 2.52614 15.2761 2.75 15 2.75L2 2.75C1.72386 2.75 1.5 2.52614 1.5 2.25C1.5 1.97386 1.72386 1.75 2 1.75L15 1.75C15.2761 1.75 15.5 1.97386 15.5 2.25Z" fill="currentColor"/>
126
- <path fill-rule="evenodd" clip-rule="evenodd" d="M11.5 3.25C12.3284 3.25 13 3.92157 13 4.75L13 9.75C13 10.5784 12.3284 11.25 11.5 11.25L10.5 11.25C9.67157 11.25 9 10.5784 9 9.75L9 4.75C9 3.92157 9.67157 3.25 10.5 3.25L11.5 3.25ZM12 4.75C12 4.47386 11.7761 4.25 11.5 4.25L10.5 4.25C10.2239 4.25 10 4.47386 10 4.75L10 9.75C10 10.0261 10.2239 10.25 10.5 10.25L11.5 10.25C11.7761 10.25 12 10.0261 12 9.75L12 4.75Z" fill="currentColor"/>
127
- <path fill-rule="evenodd" clip-rule="evenodd" d="M8 4.75C8 3.92157 7.32843 3.25 6.5 3.25L5.5 3.25C4.67157 3.25 4 3.92157 4 4.75L4 12.75C4 13.5784 4.67157 14.25 5.5 14.25L6.5 14.25C7.32843 14.25 8 13.5784 8 12.75L8 4.75ZM6.5 4.25C6.77614 4.25 7 4.47386 7 4.75L7 12.75C7 13.0261 6.77614 13.25 6.5 13.25L5.5 13.25C5.22386 13.25 5 13.0261 5 12.75L5 4.75C5 4.47386 5.22386 4.25 5.5 4.25L6.5 4.25Z" fill="currentColor"/>
128
- </svg>
129
- `,
130
- tooltip: 'Align top'
124
+ tooltip: 'Align top',
125
+ iconName: 'gp-align-top'
131
126
  },
132
127
  {
133
128
  label: 'Align center',
134
129
  value: 'center',
135
130
  type: 'align',
136
131
  tooltip: 'Align center',
137
- icon: `<svg width="20" height="20" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
138
- <path fill-rule="evenodd" clip-rule="evenodd" d="M14.5 8.5C14.5 8.77614 14.2921 9 14.0357 9L12.1786 9L12.1786 11C12.1786 11.8284 11.555 12.5 10.7857 12.5L9.85714 12.5C9.08789 12.5 8.46429 11.8284 8.46429 11L8.46429 9L7.53571 9L7.53571 12.5C7.53571 13.3284 6.91211 14 6.14286 14L5.21429 14C4.44503 14 3.82143 13.3284 3.82143 12.5L3.82143 9L1.96429 9C1.70787 9 1.5 8.77614 1.5 8.5C1.5 8.22386 1.70787 8 1.96429 8L3.82143 8L3.82143 4.5C3.82143 3.67157 4.44503 3 5.21429 3L6.14286 3C6.91211 3 7.53572 3.67157 7.53572 4.5L7.53571 8L8.46429 8L8.46429 6C8.46429 5.17157 9.08789 4.5 9.85714 4.5L10.7857 4.5C11.555 4.5 12.1786 5.17157 12.1786 6L12.1786 8L14.0357 8C14.2921 8 14.5 8.22386 14.5 8.5ZM4.75 12.5C4.75 12.7761 4.95787 13 5.21429 13L6.14286 13C6.39928 13 6.60714 12.7761 6.60714 12.5L6.60714 4.5C6.60714 4.22386 6.39928 4 6.14286 4L5.21429 4C4.95787 4 4.75 4.22386 4.75 4.5L4.75 12.5ZM9.39286 11L9.39286 6C9.39286 5.72386 9.60073 5.5 9.85714 5.5L10.7857 5.5C11.0421 5.5 11.25 5.72386 11.25 6L11.25 11C11.25 11.2761 11.0421 11.5 10.7857 11.5L9.85714 11.5C9.60073 11.5 9.39286 11.2761 9.39286 11Z" fill="currentColor"/>
139
- </svg>
140
- `
132
+ iconName: 'gp-align-center-vertical'
141
133
  },
142
134
  {
143
135
  label: 'Align bottom',
144
136
  value: 'end',
145
137
  type: 'align',
146
138
  tooltip: 'Align bottom',
147
- icon: `<svg width="20" height="20" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
148
- <path d="M1.5 14.5C1.5 14.2239 1.72386 14 2 14L15 14C15.2761 14 15.5 14.2239 15.5 14.5C15.5 14.7761 15.2761 15 15 15L2 15C1.72386 15 1.5 14.7761 1.5 14.5Z" fill="currentColor"/>
149
- <path fill-rule="evenodd" clip-rule="evenodd" d="M5.5 13.5C4.67157 13.5 4 12.8284 4 12L4 7C4 6.17157 4.67157 5.5 5.5 5.5L6.5 5.5C7.32843 5.5 8 6.17157 8 7L8 12C8 12.8284 7.32843 13.5 6.5 13.5L5.5 13.5ZM5 12C5 12.2761 5.22386 12.5 5.5 12.5L6.5 12.5C6.77614 12.5 7 12.2761 7 12L7 7C7 6.72386 6.77614 6.5 6.5 6.5L5.5 6.5C5.22386 6.5 5 6.72386 5 7L5 12Z" fill="currentColor"/>
150
- <path fill-rule="evenodd" clip-rule="evenodd" d="M9 12C9 12.8284 9.67157 13.5 10.5 13.5L11.5 13.5C12.3284 13.5 13 12.8284 13 12L13 4C13 3.17157 12.3284 2.5 11.5 2.5L10.5 2.5C9.67157 2.5 9 3.17157 9 4L9 12ZM10.5 12.5C10.2239 12.5 10 12.2761 10 12L10 4C10 3.72386 10.2239 3.5 10.5 3.5L11.5 3.5C11.7761 3.5 12 3.72386 12 4L12 12C12 12.2761 11.7761 12.5 11.5 12.5L10.5 12.5Z" fill="currentColor"/>
151
- </svg>
152
- `
139
+ iconName: 'gp-align-bottom'
153
140
  }
154
141
  ],
155
142
  devices: {
@@ -8,21 +8,9 @@ const SettingUIV2 = [
8
8
  label: {
9
9
  en: 'Items'
10
10
  },
11
- type: 'combo',
12
- iconName: 'polaris-list-bulleted',
13
- fixedValue: 'Items',
14
- isHideClear: true,
15
- popoverLabel: {
16
- en: 'Item management'
17
- },
18
- controls: [
19
- {
20
- layout: 'vertical',
21
- setting: {
22
- id: 'childItem'
23
- }
24
- }
25
- ]
11
+ setting: {
12
+ id: 'childItem'
13
+ }
26
14
  }
27
15
  ]
28
16
  },
@@ -97,7 +97,9 @@ const PostPurchaseLineSettings = [
97
97
  value: 'xthick'
98
98
  }
99
99
  ],
100
- default: 'medium'
100
+ default: [
101
+ 'medium'
102
+ ]
101
103
  },
102
104
  {
103
105
  id: 'width',
@@ -36,7 +36,8 @@ const SettingUIV2 = [
36
36
  },
37
37
  options: {
38
38
  fullWidth: true,
39
- disableMessage: `This option is disabled because the width is set to 100%`
39
+ labelVariant: 'primary',
40
+ disableMessage: `Horizontal alignment is disabled when the width is set to 100% or greater`
40
41
  }
41
42
  }
42
43
  ]
@@ -1,10 +1,11 @@
1
1
  'use client';
2
- import { jsx } from 'react/jsx-runtime';
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
3
  import Text from '../../text/components/Text.js';
4
4
  import { createClass, createStyle } from '@gem-sdk/system';
5
- import { getClasses, getComponentClasses, getTextClasses } from './common/getClasses.js';
5
+ import { getClasses, getComponentClasses, getTextClasses, getElementMarginClasses } from './common/getClasses.js';
6
6
  import { getStyle, getComponentStyles, getTextStyle } from './common/getStyles.js';
7
7
  import { getComponentTag } from './common/common.js';
8
+ import { PostPurchaseFontSizeValue } from '@gem-sdk/core/src/types/control-types/typography-post-purchase';
8
9
 
9
10
  const Link = ({ builderAttrs, setting = {}, styles, builderProps })=>{
10
11
  const { link, width, label } = setting;
@@ -32,25 +33,33 @@ const Link = ({ builderAttrs, setting = {}, styles, builderProps })=>{
32
33
  const textClasses = createClass({
33
34
  ...getTextClasses(link)
34
35
  });
36
+ const elementMarginClasses = createClass({
37
+ ...getElementMarginClasses()
38
+ });
35
39
  return /*#__PURE__*/ jsx("div", {
36
40
  ...builderAttrs,
37
41
  className: wrapperClasses,
38
- children: /*#__PURE__*/ jsx("div", {
42
+ children: /*#__PURE__*/ jsxs("div", {
39
43
  style: wrapperStyle,
40
- children: /*#__PURE__*/ jsx(Component, {
41
- href: link,
42
- target: "_blank",
43
- rel: "noreferrer",
44
- className: componentClasses,
45
- style: componentStyles,
46
- children: /*#__PURE__*/ jsx(Text, {
47
- styles: textStyles,
48
- setting: {
49
- text: label
50
- },
51
- textClass: textClasses
44
+ children: [
45
+ /*#__PURE__*/ jsx(Component, {
46
+ href: link,
47
+ target: "_blank",
48
+ rel: "noreferrer",
49
+ className: componentClasses,
50
+ style: componentStyles,
51
+ children: /*#__PURE__*/ jsx(Text, {
52
+ styles: textStyles,
53
+ setting: {
54
+ text: label
55
+ },
56
+ textClass: textClasses
57
+ })
58
+ }),
59
+ typo?.fontSize === PostPurchaseFontSizeValue.XLarge && /*#__PURE__*/ jsx("div", {
60
+ className: elementMarginClasses
52
61
  })
53
- })
62
+ ]
54
63
  })
55
64
  });
56
65
  };
@@ -5,7 +5,7 @@ const getClasses = ({ builderProps, styles })=>{
5
5
  const { align } = styles ?? {};
6
6
  let classList = 'gp-flex gp-w-full ';
7
7
  if (builderProps?.uid) {
8
- classList = builderProps?.uid?.toLocaleLowerCase();
8
+ classList += builderProps?.uid?.toLocaleLowerCase();
9
9
  }
10
10
  return {
11
11
  ...composeClasses(classList),
@@ -28,5 +28,10 @@ const getTextClasses = (link)=>{
28
28
  '[&>*]:gp-underline': !isValidLink
29
29
  };
30
30
  };
31
+ const getElementMarginClasses = ()=>{
32
+ return {
33
+ 'gp-h-2': true
34
+ };
35
+ };
31
36
 
32
- export { getClasses, getComponentClasses, getTextClasses };
37
+ export { getClasses, getComponentClasses, getElementMarginClasses, getTextClasses };
@@ -19,24 +19,31 @@ const PostPurchaseLinkSettings = [
19
19
  },
20
20
  {
21
21
  id: 'width',
22
- type: 'input:unit-width',
22
+ type: 'dropdown:input',
23
23
  label: 'Width',
24
- min: 0,
24
+ inputType: 'number',
25
25
  units: [
26
26
  'px',
27
27
  '%'
28
28
  ],
29
+ hideUnit: false,
29
30
  devices: {
30
31
  desktop: {
31
32
  default: '100%'
33
+ }
34
+ },
35
+ displayOptions: [
36
+ {
37
+ label: 'Full',
38
+ value: '100%',
39
+ showValue: true
32
40
  },
33
- tablet: {
34
- default: '100%'
35
- },
36
- mobile: {
37
- default: '100%'
41
+ {
42
+ label: 'Default',
43
+ value: '1200px',
44
+ showValue: true
38
45
  }
39
- }
46
+ ]
40
47
  }
41
48
  ]
42
49
  },
@@ -93,22 +100,22 @@ const PostPurchaseLinkSettings = [
93
100
  type: 'option:value',
94
101
  options: [
95
102
  {
96
- label: 'Left',
97
103
  value: 'left',
98
104
  type: 'text',
99
- tooltip: 'Align left'
105
+ tooltip: 'Align left',
106
+ iconName: 'polaris-text-align-left'
100
107
  },
101
108
  {
102
- label: 'Center',
103
109
  value: 'center',
104
110
  type: 'text',
105
- tooltip: 'Align center'
111
+ tooltip: 'Align center',
112
+ iconName: 'polaris-text-align-center'
106
113
  },
107
114
  {
108
- label: 'Right',
109
115
  value: 'right',
110
116
  type: 'text',
111
- tooltip: 'Align right'
117
+ tooltip: 'Align right',
118
+ iconName: 'polaris-text-align-right'
112
119
  }
113
120
  ],
114
121
  default: 'left'
@@ -1,4 +1,5 @@
1
1
  import { composeClasses } from '@gem-sdk/core';
2
+ import { getPostPurchaseAlignClasses } from '../helpers/index.js';
2
3
 
3
4
  const getContainerClasses = ({ uid })=>{
4
5
  return {
@@ -6,5 +7,40 @@ const getContainerClasses = ({ uid })=>{
6
7
  ...composeClasses('gp-flex gp-w-full')
7
8
  };
8
9
  };
10
+ const getNavigationClass = ()=>{
11
+ return composeClasses('gp-w-[24px] gp-h-[24px] gp-shrink-0 gp-flex gp-items-center gp-justify-center');
12
+ };
13
+ const getItemCarouselPostPurchaseClass = (settings)=>{
14
+ const classList = 'gp-w-full gp-border';
15
+ return {
16
+ ...composeClasses(classList),
17
+ '!gp-border-[#d9d9d9]': settings?.border,
18
+ 'gp-border-transparent': !settings?.border
19
+ };
20
+ };
21
+ const getItemCarouseEmptyPostPurchaseClass = ()=>{
22
+ return composeClasses('gp-w-full');
23
+ };
24
+ const getImageListClass = ()=>{
25
+ return composeClasses('gp-flex gp-items-center gp-justify-center');
26
+ };
27
+ const getImageGridClass = ()=>{
28
+ return composeClasses('gp-grid gp-h-fit gp-w-full gp-flex-wrap');
29
+ };
30
+ const getProductImageClass = (settings)=>{
31
+ return {
32
+ ...composeClasses('gp-flex'),
33
+ [getPostPurchaseAlignClasses(settings?.align)]: true
34
+ };
35
+ };
36
+ const getProductImageLayoutClass = ()=>{
37
+ return composeClasses('gp-grid gp-w-full');
38
+ };
39
+ const getFeatureImageClass = ()=>{
40
+ return composeClasses('gp-flex gp-justify-center gp-h-fit gp-w-full');
41
+ };
42
+ const getOnlyFeatureLayoutClass = ()=>{
43
+ return composeClasses('gp-flex gp-h-fit gp-max-w-full');
44
+ };
9
45
 
10
- export { getContainerClasses };
46
+ export { getContainerClasses, getFeatureImageClass, getImageGridClass, getImageListClass, getItemCarouseEmptyPostPurchaseClass, getItemCarouselPostPurchaseClass, getNavigationClass, getOnlyFeatureLayoutClass, getProductImageClass, getProductImageLayoutClass };
@@ -1,8 +1,46 @@
1
+ import { makeStyleResponsive, makeStyle } from '@gem-sdk/core';
2
+
1
3
  const getContainerStyles = ({ style, hasDiscount })=>{
2
4
  return {
3
5
  ...style,
4
6
  opacity: hasDiscount ? 1 : 0.2
5
7
  };
6
8
  };
9
+ const getFeatureImageStyle = (settings)=>{
10
+ return {
11
+ ...makeStyleResponsive('w', settings?.ftWidth)
12
+ };
13
+ };
14
+ const getImageListStyle = (settings)=>{
15
+ return {
16
+ flexDirection: settings?.vertical ? 'column' : 'row',
17
+ gap: parseInt(settings?.gap)
18
+ };
19
+ };
20
+ const getImageGridStyle = (settings, style)=>{
21
+ return {
22
+ ...style,
23
+ ...makeStyle({
24
+ gg: settings?.gap
25
+ }),
26
+ ...makeStyle({
27
+ gtc: `repeat(${settings?.itemSlide}, 1fr)`
28
+ })
29
+ };
30
+ };
31
+ const getProductImageLayoutStyle = (settings, style)=>{
32
+ return {
33
+ ...style,
34
+ ...makeStyle({
35
+ gg: settings?.gap
36
+ })
37
+ };
38
+ };
39
+ const getAlignStyle = (settings)=>{
40
+ return {
41
+ '--o': settings?.layoutType === 'left' ? `1` : '0',
42
+ '--jc': settings?.align === 'left' ? 'flex-start' : settings?.align === 'right' ? 'flex-end' : 'center'
43
+ };
44
+ };
7
45
 
8
- export { getContainerStyles };
46
+ export { getAlignStyle, getContainerStyles, getFeatureImageStyle, getImageGridStyle, getImageListStyle, getProductImageLayoutStyle };
@@ -1,53 +1,43 @@
1
1
  'use client';
2
2
  import { jsx } from 'react/jsx-runtime';
3
- import { useFeaturedImageGlobal, useProductStore, useCurrentVariant, makeStyleResponsive } from '@gem-sdk/core';
4
- import PostPurchaseImage from '../../../image/components/Image.js';
5
- import { useEffect } from 'react';
3
+ import ImageListCarousel from './ImageListCarousel.js';
4
+ import { createStyle } from '@gem-sdk/system';
5
+ import '@gem-sdk/core';
6
+ import { getFeatureImageStyle } from '../../common/getStyles.js';
7
+ import { useFeatureImagePostPurchase } from '../../hooks/product-image/useFeatureImagePostPurchase.js';
8
+ import { useSlideCarousel } from '../../hooks/product-image/useSlideCarousel.js';
6
9
 
7
- const FeatureImage = ({ styles, setting })=>{
8
- const { ftAspectRatio, ftObjectFit } = styles || {};
10
+ const FeatureImage = (productImageProps)=>{
11
+ const { styles, setting, gallery } = productImageProps;
9
12
  const settings = {
10
13
  ...setting,
11
14
  ...styles
12
15
  };
13
- const featuredImageGlobal = useFeaturedImageGlobal();
14
- const setProductFeaturedImage = useProductStore((store)=>store.setProductFeaturedImage);
15
- const currentVariant = useCurrentVariant();
16
- useEffect(()=>{
17
- if (currentVariant?.media && currentVariant.media.contentType === 'IMAGE') {
18
- setProductFeaturedImage(currentVariant.media);
19
- }
20
- }, [
21
- currentVariant,
22
- setProductFeaturedImage
23
- ]);
24
- const source = {
25
- src: featuredImageGlobal?.src || 'https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif',
26
- alt: 'Feature Image'
27
- };
28
- const width = makeStyleResponsive('w', settings?.ftWidth);
16
+ const { ftNavigation = 'none', ftBorder = 'none', ftItemPerSlide = 1, ftSpacing = 'xtight', ftDisplayType, layoutType, ftAspectRatio, ftObjectFit, ftWidth } = settings;
17
+ const { idxActive } = useFeatureImagePostPurchase({
18
+ gallery
19
+ });
20
+ const { itemSlideList } = useSlideCarousel({
21
+ ftItemPerSlide,
22
+ layoutType
23
+ });
24
+ const navigation = ftDisplayType === 'slider' ? ftNavigation : 'none';
25
+ const style = createStyle(getFeatureImageStyle({
26
+ ftWidth
27
+ }));
29
28
  return /*#__PURE__*/ jsx("div", {
30
- style: {
31
- ...width
32
- },
33
- children: /*#__PURE__*/ jsx(PostPurchaseImage, {
34
- setting: {
35
- srcSet: {
36
- desktop: source,
37
- mobile: source,
38
- tablet: source
39
- }
40
- },
41
- styles: {
42
- aspectRatio: ftAspectRatio,
43
- objectFit: ftObjectFit,
44
- width: {
45
- desktop: '100%',
46
- mobile: '100%',
47
- tablet: '100%'
48
- },
49
- enableBorder: 'none'
50
- }
29
+ style: style,
30
+ children: /*#__PURE__*/ jsx(ImageListCarousel, {
31
+ ...productImageProps,
32
+ productImages: gallery,
33
+ aspectRatio: ftAspectRatio,
34
+ objectFit: ftObjectFit,
35
+ spacing: ftSpacing,
36
+ navigation: navigation,
37
+ vertical: false,
38
+ border: ftBorder,
39
+ itemPerSlide: itemSlideList,
40
+ idxActive: idxActive
51
41
  })
52
42
  });
53
43
  };