@gem-sdk/components 2.0.0-dev.277 → 2.0.0-dev.288

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 (300) hide show
  1. package/dist/cjs/accordion/components/Accordion.js +60 -179
  2. package/dist/cjs/accordion/components/Accordion.liquid.js +77 -101
  3. package/dist/cjs/accordion/components/AccordionItem.js +126 -280
  4. package/dist/cjs/accordion/components/AccordionItem.liquid.js +77 -215
  5. package/dist/cjs/accordion/components/common/classes.js +55 -0
  6. package/dist/cjs/accordion/components/common/index.js +146 -0
  7. package/dist/cjs/accordion/components/common/styles.js +131 -0
  8. package/dist/cjs/accordion/hooks/useAccordion.js +145 -0
  9. package/dist/cjs/accordion/hooks/useAccordionItem.js +119 -0
  10. package/dist/cjs/article/components/ArticleImage.js +0 -1
  11. package/dist/cjs/article/components/ArticlePagination.js +1 -1
  12. package/dist/cjs/article/components/ArticlePagination.liquid.js +3 -3
  13. package/dist/cjs/article/setting/configs/ArticleImage/settings.js +5 -5
  14. package/dist/cjs/banner/components/HeroBannerItem.js +0 -6
  15. package/dist/cjs/banner/components/HeroBannerItem.liquid.js +3 -0
  16. package/dist/cjs/banner/setting/setting.js +28 -3
  17. package/dist/cjs/banner/setting/uiV2.js +10 -97
  18. package/dist/cjs/builder.js +18 -20
  19. package/dist/cjs/cart/components/CartLineImage.js +0 -2
  20. package/dist/cjs/code/common/classes.js +11 -0
  21. package/dist/cjs/code/common/styles.js +15 -0
  22. package/dist/cjs/code/components/CSSCode.js +9 -99
  23. package/dist/cjs/code/components/CSSCode.liquid.js +11 -11
  24. package/dist/cjs/code/hooks/useCSSCode.js +102 -0
  25. package/dist/cjs/code/setting/CSSCode.js +7 -121
  26. package/dist/cjs/code/setting/config/setting.js +77 -0
  27. package/dist/cjs/code/setting/config/uiV1.js +52 -0
  28. package/dist/cjs/code/setting/config/uiV2.js +58 -0
  29. package/dist/cjs/estimate-delivery/components/EstimateDate.liquid.js +4 -1
  30. package/dist/cjs/form/components/contact/Contact.js +6 -2
  31. package/dist/cjs/form/components/contact/common/composeStyles.js +21 -0
  32. package/dist/cjs/form/components/form-checkbox/FormCheckbox.js +6 -4
  33. package/dist/cjs/form/components/form-checkbox/FormCheckbox.liquid.js +2 -4
  34. package/dist/cjs/form/components/form-checkbox/common/composeClasses.js +2 -2
  35. package/dist/cjs/form/components/form-checkbox/common/composeStyles.js +23 -10
  36. package/dist/cjs/form/components/form-dropdown/common/composeClasses.js +1 -1
  37. package/dist/cjs/form/components/form-email/FormEmail.js +18 -10
  38. package/dist/cjs/form/components/form-email/common/composeClasses.js +2 -1
  39. package/dist/cjs/form/components/newsletter/Newsletter.js +7 -2
  40. package/dist/cjs/form/components/newsletter/Newsletter.liquid.js +1 -1
  41. package/dist/cjs/form/components/newsletter/common/composeStyles.js +4 -2
  42. package/dist/cjs/form/components/textarea/TextArea.js +16 -8
  43. package/dist/cjs/form/components/textarea/common/composeClasses.js +1 -1
  44. package/dist/cjs/form/components/textfield/TextField.js +17 -9
  45. package/dist/cjs/form/components/textfield/common/composeClasses.js +2 -2
  46. package/dist/cjs/form/setting/contact/Contact.js +5 -1
  47. package/dist/cjs/form/setting/form-checkbox/configs/settings.js +153 -6
  48. package/dist/cjs/form/setting/form-checkbox/configs/uiV2.js +137 -0
  49. package/dist/cjs/form/setting/form-dropdown/configs/settings.js +147 -0
  50. package/dist/cjs/form/setting/form-dropdown/configs/uiV2.js +156 -4
  51. package/dist/cjs/form/setting/newsletter/configs/settings.js +132 -3
  52. package/dist/cjs/form/setting/newsletter/configs/uiV2.js +93 -0
  53. package/dist/cjs/form/setting/submit-button/configs/settings.js +37 -0
  54. package/dist/cjs/form/setting/submit-button/configs/uiV2.js +13 -0
  55. package/dist/cjs/grid/row/commons/getInnerRadius.js +11 -10
  56. package/dist/cjs/grid/row/setting/configs/uiV2.js +1 -1
  57. package/dist/cjs/header/components/kind/basic/index.js +1 -0
  58. package/dist/cjs/header/components/kind/modern/index.js +1 -1
  59. package/dist/cjs/helpers.js +53 -0
  60. package/dist/cjs/icon-list/setting/configs/uiV2.js +1 -1
  61. package/dist/cjs/icon-list-v2/setting/configs/settings.js +5 -5
  62. package/dist/cjs/image/components/AdaptiveImage.js +63 -49
  63. package/dist/cjs/image/components/AdaptiveImage.liquid.js +56 -44
  64. package/dist/cjs/image/components/Image.js +65 -154
  65. package/dist/cjs/image/components/Image.liquid.js +68 -103
  66. package/dist/cjs/image/components/Modal3d.liquid.js +54 -21
  67. package/dist/cjs/image/components/NextImage.js +26 -59
  68. package/dist/cjs/image/components/NextImage.liquid.js +27 -115
  69. package/dist/cjs/image/components/Video.liquid.js +38 -13
  70. package/dist/cjs/image/components/common/attributes.js +115 -0
  71. package/dist/cjs/image/components/common/classes.js +57 -0
  72. package/dist/cjs/image/components/common/constants.js +15 -0
  73. package/dist/cjs/image/components/common/data.js +24 -0
  74. package/dist/cjs/image/components/common/helpers.js +75 -0
  75. package/dist/cjs/image/components/common/styles.js +88 -0
  76. package/dist/cjs/image/components/helpers/getNextImageLiquidAttrs.js +80 -0
  77. package/dist/cjs/image/components/helpers/getNextImageReactAttrs.js +40 -0
  78. package/dist/cjs/image/components/hooks/useCheckNoImage.js +25 -0
  79. package/dist/cjs/image/helpers/getSrcSet.js +0 -2
  80. package/dist/cjs/image/next.js +1 -5
  81. package/dist/cjs/image/setting/configs/settings.js +14 -8
  82. package/dist/cjs/image/setting/configs/uiV2.js +61 -15
  83. package/dist/cjs/image/setting/index.js +1 -3
  84. package/dist/cjs/image-comparison/components/CompareImage.js +1 -1
  85. package/dist/cjs/image-comparison/components/CompareImage.liquid.js +1 -1
  86. package/dist/cjs/index.js +91 -91
  87. package/dist/cjs/index.liquid.js +8 -8
  88. package/dist/cjs/post-purchase/callout-banner/setting/config/callout-box/setting.js +4 -10
  89. package/dist/cjs/post-purchase/countdown-timer/components/PostPurchaseCountdownTimer.js +9 -23
  90. package/dist/cjs/post-purchase/countdown-timer/components/TextCountdown.js +12 -26
  91. package/dist/cjs/post-purchase/countdown-timer/components/common/getClasses.js +24 -0
  92. package/dist/cjs/post-purchase/countdown-timer/components/common/getStyles.js +21 -0
  93. package/dist/cjs/post-purchase/countdown-timer/hooks/useCountdownTimer.js +18 -1
  94. package/dist/cjs/post-purchase/countdown-timer/hooks/useGetTimeExpired.js +18 -0
  95. package/dist/cjs/post-purchase/countdown-timer/settings/CountdownTimer.js +9 -358
  96. package/dist/cjs/post-purchase/countdown-timer/settings/config/preset.js +26 -0
  97. package/dist/cjs/post-purchase/countdown-timer/settings/config/setting.js +243 -0
  98. package/dist/cjs/post-purchase/countdown-timer/settings/config/uiV1.js +125 -0
  99. package/dist/cjs/post-purchase/countdown-timer/settings/config/uiV2.js +185 -0
  100. package/dist/cjs/post-purchase/image/common/getClasses.js +1 -1
  101. package/dist/cjs/post-purchase/image/setting/setting-v2.js +5 -5
  102. package/dist/cjs/post-purchase/product/components/product-image/carousel-post-purchase/CarouselWrapperPostPurchase.js +24 -26
  103. package/dist/cjs/post-purchase/product/hooks/product-image/useListCarousel.js +1 -1
  104. package/dist/cjs/post-purchase/product/hooks/product-image/useProductImagePostPurchase.js +4 -1
  105. package/dist/cjs/post-purchase/product/settings/product-image/setting-v2.js +20 -7
  106. package/dist/cjs/post-purchase/product/settings/product-image/uiV2.js +3 -1
  107. package/dist/cjs/post-purchase/product/settings/product-price-breakdown/configs/settings.js +2 -2
  108. package/dist/cjs/post-purchase/product/settings/product-quantity/configs/settings.js +1 -1
  109. package/dist/cjs/post-purchase/utils/constants.js +1 -1
  110. package/dist/cjs/product/components/FileUpload/components/common/index.js +3 -0
  111. package/dist/cjs/product/components/ProductBundle/common/classes.js +25 -0
  112. package/dist/cjs/product/components/ProductBundle/common/index.js +5 -0
  113. package/dist/cjs/product/components/ProductBundle/common/styles.js +89 -0
  114. package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscount.js +82 -0
  115. package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscount.liquid.js +74 -0
  116. package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.js +69 -0
  117. package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.liquid.js +46 -0
  118. package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountItem.js +23 -0
  119. package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountItem.liquid.js +14 -0
  120. package/dist/cjs/product/components/{ProductBundleDiscount.js → ProductBundle/hooks/useProductBundleDataState.js} +20 -215
  121. package/dist/cjs/product/components/ProductBundle/hooks/useProductBundleDiscountState.js +56 -0
  122. package/dist/cjs/product/{setting → components/ProductBundle/setting}/ProductBundleDiscount.js +7 -7
  123. package/dist/cjs/product/{setting → components/ProductBundle/setting}/ProductBundleDiscountItem.js +3 -0
  124. package/dist/cjs/product/components/ProductButton.js +2 -2
  125. package/dist/cjs/product/components/ProductButton.liquid.js +2 -2
  126. package/dist/cjs/product/components/ProductPrice/common/getAttr.js +23 -0
  127. package/dist/cjs/product/components/ProductPrice/common/getClasses.js +19 -0
  128. package/dist/cjs/product/components/ProductPrice/common/getTextData.js +40 -0
  129. package/dist/cjs/product/components/ProductPrice/hooks/useGpPrice.js +126 -0
  130. package/dist/cjs/product/components/ProductPrice/index.js +54 -0
  131. package/dist/cjs/product/components/ProductPrice/index.liquid.js +43 -0
  132. package/dist/cjs/product/components/ProductQuickView/ProductQuickView.js +5 -5
  133. package/dist/cjs/product/next.js +3 -3
  134. package/dist/cjs/product/setting/index.js +2 -2
  135. package/dist/cjs/product/setting/product/configs/presets.js +1 -0
  136. package/dist/cjs/product/setting/product-image-v2/configs/setting-v2/ProductFeatureImage.js +6 -7
  137. package/dist/cjs/product/setting/product-image-v2/configs/setting-v2/ProductGalleryImage.js +11 -12
  138. package/dist/cjs/product/setting/product-image-v2/configs/setting-v2/index.js +6 -5
  139. package/dist/cjs/product/setting/product-list/configs/settingsV2.js +10 -8
  140. package/dist/cjs/setting.js +5 -2
  141. package/dist/esm/accordion/components/Accordion.js +61 -180
  142. package/dist/esm/accordion/components/Accordion.liquid.js +78 -102
  143. package/dist/esm/accordion/components/AccordionItem.js +129 -281
  144. package/dist/esm/accordion/components/AccordionItem.liquid.js +76 -214
  145. package/dist/esm/accordion/components/common/classes.js +44 -0
  146. package/dist/esm/accordion/components/common/index.js +136 -0
  147. package/dist/esm/accordion/components/common/styles.js +122 -0
  148. package/dist/esm/accordion/hooks/useAccordion.js +141 -0
  149. package/dist/esm/accordion/hooks/useAccordionItem.js +115 -0
  150. package/dist/esm/article/components/ArticleImage.js +0 -1
  151. package/dist/esm/article/components/ArticlePagination.js +1 -1
  152. package/dist/esm/article/components/ArticlePagination.liquid.js +3 -3
  153. package/dist/esm/article/setting/configs/ArticleImage/settings.js +5 -5
  154. package/dist/esm/banner/components/HeroBannerItem.js +0 -6
  155. package/dist/esm/banner/components/HeroBannerItem.liquid.js +3 -0
  156. package/dist/esm/banner/setting/setting.js +28 -3
  157. package/dist/esm/banner/setting/uiV2.js +10 -97
  158. package/dist/esm/builder.js +3 -5
  159. package/dist/esm/cart/components/CartLineImage.js +0 -2
  160. package/dist/esm/code/common/classes.js +9 -0
  161. package/dist/esm/code/common/styles.js +13 -0
  162. package/dist/esm/code/components/CSSCode.js +9 -99
  163. package/dist/esm/code/components/CSSCode.liquid.js +12 -12
  164. package/dist/esm/code/hooks/useCSSCode.js +98 -0
  165. package/dist/esm/code/setting/CSSCode.js +7 -121
  166. package/dist/esm/code/setting/config/setting.js +75 -0
  167. package/dist/esm/code/setting/config/uiV1.js +50 -0
  168. package/dist/esm/code/setting/config/uiV2.js +56 -0
  169. package/dist/esm/estimate-delivery/components/EstimateDate.liquid.js +4 -1
  170. package/dist/esm/form/components/contact/Contact.js +7 -3
  171. package/dist/esm/form/components/contact/common/composeStyles.js +19 -0
  172. package/dist/esm/form/components/form-checkbox/FormCheckbox.js +7 -5
  173. package/dist/esm/form/components/form-checkbox/FormCheckbox.liquid.js +3 -5
  174. package/dist/esm/form/components/form-checkbox/common/composeClasses.js +2 -2
  175. package/dist/esm/form/components/form-checkbox/common/composeStyles.js +25 -11
  176. package/dist/esm/form/components/form-dropdown/common/composeClasses.js +1 -1
  177. package/dist/esm/form/components/form-email/FormEmail.js +18 -10
  178. package/dist/esm/form/components/form-email/common/composeClasses.js +2 -1
  179. package/dist/esm/form/components/newsletter/Newsletter.js +8 -3
  180. package/dist/esm/form/components/newsletter/Newsletter.liquid.js +1 -1
  181. package/dist/esm/form/components/newsletter/common/composeStyles.js +4 -2
  182. package/dist/esm/form/components/textarea/TextArea.js +16 -8
  183. package/dist/esm/form/components/textarea/common/composeClasses.js +1 -1
  184. package/dist/esm/form/components/textfield/TextField.js +17 -9
  185. package/dist/esm/form/components/textfield/common/composeClasses.js +2 -2
  186. package/dist/esm/form/setting/contact/Contact.js +5 -1
  187. package/dist/esm/form/setting/form-checkbox/configs/settings.js +153 -6
  188. package/dist/esm/form/setting/form-checkbox/configs/uiV2.js +137 -0
  189. package/dist/esm/form/setting/form-dropdown/configs/settings.js +147 -0
  190. package/dist/esm/form/setting/form-dropdown/configs/uiV2.js +156 -4
  191. package/dist/esm/form/setting/newsletter/configs/settings.js +132 -3
  192. package/dist/esm/form/setting/newsletter/configs/uiV2.js +93 -0
  193. package/dist/esm/form/setting/submit-button/configs/settings.js +37 -0
  194. package/dist/esm/form/setting/submit-button/configs/uiV2.js +13 -0
  195. package/dist/esm/grid/row/commons/getInnerRadius.js +11 -10
  196. package/dist/esm/grid/row/setting/configs/uiV2.js +1 -1
  197. package/dist/esm/header/components/kind/basic/index.js +1 -0
  198. package/dist/esm/header/components/kind/modern/index.js +1 -1
  199. package/dist/esm/helpers.js +52 -1
  200. package/dist/esm/icon-list/setting/configs/uiV2.js +1 -1
  201. package/dist/esm/icon-list-v2/setting/configs/settings.js +5 -5
  202. package/dist/esm/image/components/AdaptiveImage.js +64 -50
  203. package/dist/esm/image/components/AdaptiveImage.liquid.js +57 -45
  204. package/dist/esm/image/components/Image.js +66 -155
  205. package/dist/esm/image/components/Image.liquid.js +69 -104
  206. package/dist/esm/image/components/Modal3d.liquid.js +55 -22
  207. package/dist/esm/image/components/NextImage.js +26 -59
  208. package/dist/esm/image/components/NextImage.liquid.js +28 -116
  209. package/dist/esm/image/components/Video.liquid.js +38 -13
  210. package/dist/esm/image/components/common/attributes.js +108 -0
  211. package/dist/esm/image/components/common/classes.js +51 -0
  212. package/dist/esm/image/components/common/constants.js +11 -0
  213. package/dist/esm/image/components/common/data.js +22 -0
  214. package/dist/esm/image/components/common/helpers.js +69 -0
  215. package/dist/esm/image/components/common/styles.js +80 -0
  216. package/dist/esm/image/components/helpers/getNextImageLiquidAttrs.js +78 -0
  217. package/dist/esm/image/components/helpers/getNextImageReactAttrs.js +38 -0
  218. package/dist/esm/image/components/hooks/useCheckNoImage.js +23 -0
  219. package/dist/esm/image/helpers/getSrcSet.js +1 -2
  220. package/dist/esm/image/next.js +1 -5
  221. package/dist/esm/image/setting/configs/settings.js +14 -8
  222. package/dist/esm/image/setting/configs/uiV2.js +61 -15
  223. package/dist/esm/image/setting/index.js +1 -3
  224. package/dist/esm/image-comparison/components/CompareImage.js +1 -1
  225. package/dist/esm/image-comparison/components/CompareImage.liquid.js +1 -1
  226. package/dist/esm/index.js +4 -5
  227. package/dist/esm/index.liquid.js +3 -3
  228. package/dist/esm/post-purchase/callout-banner/setting/config/callout-box/setting.js +4 -10
  229. package/dist/esm/post-purchase/countdown-timer/components/PostPurchaseCountdownTimer.js +9 -23
  230. package/dist/esm/post-purchase/countdown-timer/components/TextCountdown.js +13 -27
  231. package/dist/esm/post-purchase/countdown-timer/components/common/getClasses.js +21 -0
  232. package/dist/esm/post-purchase/countdown-timer/components/common/getStyles.js +19 -0
  233. package/dist/esm/post-purchase/countdown-timer/hooks/useCountdownTimer.js +19 -3
  234. package/dist/esm/post-purchase/countdown-timer/hooks/useGetTimeExpired.js +16 -0
  235. package/dist/esm/post-purchase/countdown-timer/settings/CountdownTimer.js +9 -358
  236. package/dist/esm/post-purchase/countdown-timer/settings/config/preset.js +24 -0
  237. package/dist/esm/post-purchase/countdown-timer/settings/config/setting.js +241 -0
  238. package/dist/esm/post-purchase/countdown-timer/settings/config/uiV1.js +123 -0
  239. package/dist/esm/post-purchase/countdown-timer/settings/config/uiV2.js +183 -0
  240. package/dist/esm/post-purchase/image/common/getClasses.js +1 -1
  241. package/dist/esm/post-purchase/image/setting/setting-v2.js +5 -5
  242. package/dist/esm/post-purchase/product/components/product-image/carousel-post-purchase/CarouselWrapperPostPurchase.js +25 -27
  243. package/dist/esm/post-purchase/product/hooks/product-image/useListCarousel.js +1 -1
  244. package/dist/esm/post-purchase/product/hooks/product-image/useProductImagePostPurchase.js +4 -1
  245. package/dist/esm/post-purchase/product/settings/product-image/setting-v2.js +20 -7
  246. package/dist/esm/post-purchase/product/settings/product-image/uiV2.js +3 -1
  247. package/dist/esm/post-purchase/product/settings/product-price-breakdown/configs/settings.js +2 -2
  248. package/dist/esm/post-purchase/product/settings/product-quantity/configs/settings.js +1 -1
  249. package/dist/esm/post-purchase/utils/constants.js +1 -1
  250. package/dist/esm/product/components/FileUpload/components/common/index.js +3 -0
  251. package/dist/esm/product/components/ProductBundle/common/classes.js +19 -0
  252. package/dist/esm/product/components/ProductBundle/common/index.js +3 -0
  253. package/dist/esm/product/components/ProductBundle/common/styles.js +80 -0
  254. package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscount.js +78 -0
  255. package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscount.liquid.js +70 -0
  256. package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.js +65 -0
  257. package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.liquid.js +42 -0
  258. package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountItem.js +19 -0
  259. package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountItem.liquid.js +10 -0
  260. package/dist/esm/product/components/{ProductBundleDiscount.js → ProductBundle/hooks/useProductBundleDataState.js} +21 -216
  261. package/dist/esm/product/components/ProductBundle/hooks/useProductBundleDiscountState.js +52 -0
  262. package/dist/esm/product/{setting → components/ProductBundle/setting}/ProductBundleDiscount.js +7 -7
  263. package/dist/esm/product/{setting → components/ProductBundle/setting}/ProductBundleDiscountItem.js +3 -0
  264. package/dist/esm/product/components/ProductButton.js +1 -1
  265. package/dist/esm/product/components/ProductButton.liquid.js +1 -1
  266. package/dist/esm/product/components/ProductPrice/common/getAttr.js +21 -0
  267. package/dist/esm/product/components/ProductPrice/common/getClasses.js +17 -0
  268. package/dist/esm/product/components/ProductPrice/common/getTextData.js +38 -0
  269. package/dist/esm/product/components/ProductPrice/hooks/useGpPrice.js +124 -0
  270. package/dist/esm/product/components/ProductPrice/index.js +50 -0
  271. package/dist/esm/product/components/ProductPrice/index.liquid.js +38 -0
  272. package/dist/esm/product/components/ProductQuickView/ProductQuickView.js +1 -1
  273. package/dist/esm/product/next.js +3 -3
  274. package/dist/esm/product/setting/index.js +2 -2
  275. package/dist/esm/product/setting/product/configs/presets.js +1 -0
  276. package/dist/esm/product/setting/product-image-v2/configs/setting-v2/ProductFeatureImage.js +6 -7
  277. package/dist/esm/product/setting/product-image-v2/configs/setting-v2/ProductGalleryImage.js +11 -12
  278. package/dist/esm/product/setting/product-image-v2/configs/setting-v2/index.js +6 -5
  279. package/dist/esm/product/setting/product-list/configs/settingsV2.js +10 -8
  280. package/dist/esm/setting.js +5 -2
  281. package/dist/types/index.d.ts +173 -256
  282. package/package.json +2 -2
  283. package/dist/cjs/image/components/BackgroundImage.js +0 -102
  284. package/dist/cjs/image/components/Img.js +0 -28
  285. package/dist/cjs/image/components/helpers.js +0 -12
  286. package/dist/cjs/image/setting/BackgroundImage.js +0 -364
  287. package/dist/cjs/product/components/ProductBundleDiscount.liquid.js +0 -81
  288. package/dist/cjs/product/components/ProductBundleDiscountItem.js +0 -42
  289. package/dist/cjs/product/components/ProductBundleDiscountItem.liquid.js +0 -103
  290. package/dist/cjs/product/components/ProductPrice.js +0 -209
  291. package/dist/cjs/product/components/ProductPrice.liquid.js +0 -88
  292. package/dist/esm/image/components/BackgroundImage.js +0 -98
  293. package/dist/esm/image/components/Img.js +0 -24
  294. package/dist/esm/image/components/helpers.js +0 -9
  295. package/dist/esm/image/setting/BackgroundImage.js +0 -360
  296. package/dist/esm/product/components/ProductBundleDiscount.liquid.js +0 -77
  297. package/dist/esm/product/components/ProductBundleDiscountItem.js +0 -36
  298. package/dist/esm/product/components/ProductBundleDiscountItem.liquid.js +0 -99
  299. package/dist/esm/product/components/ProductPrice.js +0 -205
  300. package/dist/esm/product/components/ProductPrice.liquid.js +0 -83
@@ -4,6 +4,7 @@ import { makeStyleResponsive, cls } from '@gem-sdk/core';
4
4
  import dynamic from 'next/dynamic';
5
5
  import 'react';
6
6
  import '@gem-sdk/system';
7
+ import 'next/link';
7
8
  import Cart from '../../../../cart/components/Cart.js';
8
9
  import 'next/head';
9
10
  import 'next/image';
@@ -3,11 +3,11 @@ import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import { makeStyleResponsive } from '@gem-sdk/core';
4
4
  import 'react';
5
5
  import '@gem-sdk/system';
6
+ import 'next/link';
6
7
  import Cart from '../../../../cart/components/Cart.js';
7
8
  import 'next/head';
8
9
  import 'next/image';
9
10
  import 'react-youtube';
10
- import 'next/link';
11
11
  import '../../../../image/components/AdaptiveImage.js';
12
12
  import '../../../../cart/components/ShopPayButton/ShopPayButton.js';
13
13
 
@@ -1,3 +1,5 @@
1
+ import Link from './link/components/Link.js';
2
+
1
3
  const isTransparentColor = (str)=>{
2
4
  if (!str) return false;
3
5
  if (str.startsWith('#')) {
@@ -108,6 +110,52 @@ const getInsertLinkData = (defaultWrap, setting, htmlType)=>{
108
110
  shouldRenderLink
109
111
  };
110
112
  };
113
+ const getLinkData = ({ setting, htmlType, defaultWrap, isLiquid = false, enableImageLink = false })=>{
114
+ const URL_INCLUDES = [
115
+ 'product.url'
116
+ ];
117
+ const URL_START_WITH = [
118
+ '#',
119
+ 'mailto:',
120
+ 'tel:'
121
+ ];
122
+ const urlHref = setting?.link ?? '';
123
+ const isHomePageHref = urlHref === '/';
124
+ const isHyperlink = setting?.link !== undefined && setting.link !== '';
125
+ const regexHttp = new RegExp(/^https?:\/\//i);
126
+ const isDomain = isHyperlink && regexHttp.test(urlHref);
127
+ const regexPageType = new RegExp(/^\/?(?:collections|pages|products|blogs|checkout|cart)\/?/i);
128
+ const isShopifyDomain = isHyperlink && !regexHttp.test(urlHref) && regexPageType.test(urlHref);
129
+ const isLink = ()=>{
130
+ if (URL_INCLUDES.find((el)=>urlHref.includes(el))) return true;
131
+ if (URL_START_WITH.find((el)=>urlHref.startsWith(el))) return true;
132
+ return false;
133
+ };
134
+ const shouldRenderLink = enableImageLink && (isDomain || isShopifyDomain || isLink() || isHomePageHref);
135
+ let transformedUrl = urlHref;
136
+ if (isLiquid && (isShopifyDomain || isHomePageHref)) {
137
+ transformedUrl = setting?.isTranslate ? '$locationOrigin' + urlHref : "{{ request.origin }}{{ routes.root_url | split: '/' | join: '/' }}" + urlHref;
138
+ }
139
+ const Wrapper = shouldRenderLink ? isLiquid ? 'a' : Link : defaultWrap;
140
+ const baseUrlData = {
141
+ href: transformedUrl,
142
+ target: setting?.target,
143
+ ...setting?.noFollow && {
144
+ rel: 'nofollow'
145
+ }
146
+ };
147
+ const urlData = shouldRenderLink ? baseUrlData : isHyperlink ? {
148
+ ...baseUrlData,
149
+ type: htmlType
150
+ } : {
151
+ type: htmlType
152
+ };
153
+ return {
154
+ Wrapper,
155
+ urlData,
156
+ shouldRenderLink
157
+ };
158
+ };
111
159
  const replaceLinkData = (text, isTranslate)=>{
112
160
  const regex = /<a\s[^>]*>.*?<\/a>/;
113
161
  if (text && regex.test(text)) {
@@ -130,5 +178,8 @@ const replaceLinkData = (text, isTranslate)=>{
130
178
  function filterTruthyStyles(styles) {
131
179
  return Object.fromEntries(Object.entries(styles || {}).filter(([, value])=>!!value));
132
180
  }
181
+ function filterTruthyObject(obj) {
182
+ return Object.fromEntries(Object.entries(obj || {}).filter(([, value])=>!!value));
183
+ }
133
184
 
134
- export { filterTruthyStyles, getDynamicSourceLocales, getInsertLinkData, getSettingPreloadData, getStaticLocale, isHexTransparent, isTransparentColor, isTransparentRGBA, replaceLinkData, youtubeShortsRegex };
185
+ export { filterTruthyObject, filterTruthyStyles, getDynamicSourceLocales, getInsertLinkData, getLinkData, getSettingPreloadData, getStaticLocale, isHexTransparent, isTransparentColor, isTransparentRGBA, replaceLinkData, youtubeShortsRegex };
@@ -39,7 +39,7 @@ const SettingUIV2 = [
39
39
  en: 'Gap'
40
40
  },
41
41
  setting: {
42
- id: 'verticalSpacing'
42
+ id: 'horizontalSpacing'
43
43
  }
44
44
  }
45
45
  ]
@@ -224,21 +224,21 @@ const IconListSettings = [
224
224
  },
225
225
  {
226
226
  id: 'position',
227
- type: 'layout-segment',
228
- iconViewBox: '0 0 66 48',
229
- enableItemBackground: true,
227
+ type: 'option:illustration',
230
228
  enableTooltip: true,
231
229
  label: 'Position',
232
230
  options: [
233
231
  {
234
232
  label: 'Align center',
235
233
  value: 'center',
236
- type: 'align-pos'
234
+ type: 'align-pos',
235
+ svgName: 'gp-align-position-center'
237
236
  },
238
237
  {
239
238
  label: 'Align top',
240
239
  value: 'baseline',
241
- type: 'align-pos'
240
+ type: 'align-pos',
241
+ svgName: 'gp-align-position-top'
242
242
  }
243
243
  ],
244
244
  devices: {
@@ -1,55 +1,69 @@
1
1
  'use client';
2
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
3
- import Head from 'next/head';
4
- import Img from './Img.js';
5
- import { imagePlaceholder } from '../helpers/getSrcSet.js';
2
+ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
3
+ import { IMAGE_PLACEHOLDER } from './common/constants.js';
4
+ import { createAttr, createStyle, createClass } from '@gem-sdk/system';
5
+ import { getLoadingAdaptiveImageAttrs } from './common/attributes.js';
6
+ import { getAdaptiveImageClasses } from './common/classes.js';
7
+ import { getAdaptiveImageData } from './common/data.js';
8
+ import { getAdaptivePictureStyles, getAdaptiveImageStyles } from './common/styles.js';
6
9
 
7
- const AdaptiveImage = ({ srcSet, priority, pictureClass, ...rest })=>{
8
- return /*#__PURE__*/ jsxs(Fragment, {
9
- children: [
10
- /*#__PURE__*/ jsxs(Head, {
11
- children: [
12
- !!srcSet?.desktop?.src && /*#__PURE__*/ jsx("link", {
13
- rel: "preload",
14
- href: srcSet.desktop.src,
15
- as: "image"
16
- }),
17
- !!srcSet?.tablet?.src && /*#__PURE__*/ jsx("link", {
18
- rel: "preload",
19
- href: srcSet.tablet.src,
20
- as: "image"
21
- }),
22
- !!srcSet?.mobile?.src && /*#__PURE__*/ jsx("link", {
23
- rel: "preload",
24
- href: srcSet.mobile.src,
25
- as: "image"
26
- })
27
- ]
28
- }),
29
- /*#__PURE__*/ jsxs("picture", {
30
- style: {
31
- borderRadius: 'inherit'
32
- },
33
- className: pictureClass,
34
- children: [
35
- !!srcSet?.mobile?.src && /*#__PURE__*/ jsx("source", {
36
- media: "(max-width: 767px)",
37
- srcSet: srcSet.mobile.src
38
- }),
39
- !!srcSet?.tablet?.src && /*#__PURE__*/ jsx("source", {
40
- media: "(max-width: 1024px)",
41
- srcSet: srcSet?.tablet?.src
42
- }),
43
- /*#__PURE__*/ jsx(Img, {
44
- ...rest,
45
- loading: priority ? 'eager' : 'lazy',
46
- image: {
47
- src: srcSet?.desktop?.src || imagePlaceholder
48
- }
49
- })
50
- ]
51
- })
52
- ]
10
+ const AdaptiveImage = (props)=>{
11
+ const { alt, style, srcSet, layout, priority, className, aspectRatio, borderRadius, pictureClass, enableLazyloadImage, ...restProps } = props;
12
+ const { getDeviceSource } = getAdaptiveImageData(props);
13
+ const { srcDesktop, srcTablet, srcMobile } = getDeviceSource();
14
+ const loadingAttrs = createAttr(getLoadingAdaptiveImageAttrs({
15
+ srcDesktop,
16
+ enableLazyLoadImage: enableLazyloadImage
17
+ }));
18
+ const pictureStyle = createStyle({
19
+ ...getAdaptivePictureStyles()
20
+ });
21
+ const adaptiveImageStyles = createStyle({
22
+ ...getAdaptiveImageStyles({
23
+ layout,
24
+ aspectRatio,
25
+ borderRadius
26
+ }),
27
+ ...style
28
+ });
29
+ const adaptiveImageClasses = createClass({
30
+ ...getAdaptiveImageClasses({
31
+ className,
32
+ hasLazyLoad: enableLazyloadImage
33
+ })
34
+ });
35
+ const renderSource = ()=>{
36
+ return /*#__PURE__*/ jsxs(Fragment, {
37
+ children: [
38
+ srcMobile && /*#__PURE__*/ jsx("source", {
39
+ media: "(max-width: 767px)",
40
+ srcSet: enableLazyloadImage ? IMAGE_PLACEHOLDER : srcMobile
41
+ }),
42
+ srcTablet && /*#__PURE__*/ jsx("source", {
43
+ media: "(max-width: 1024px)",
44
+ srcSet: enableLazyloadImage ? IMAGE_PLACEHOLDER : srcTablet
45
+ })
46
+ ]
47
+ });
48
+ };
49
+ const renderImage = ()=>{
50
+ return /*#__PURE__*/ jsx("img", {
51
+ ...restProps,
52
+ ...loadingAttrs,
53
+ alt: alt,
54
+ style: adaptiveImageStyles,
55
+ className: adaptiveImageClasses
56
+ });
57
+ };
58
+ return /*#__PURE__*/ jsx(Fragment, {
59
+ children: /*#__PURE__*/ jsxs("picture", {
60
+ style: pictureStyle,
61
+ className: pictureClass,
62
+ children: [
63
+ renderSource(),
64
+ renderImage()
65
+ ]
66
+ })
53
67
  });
54
68
  };
55
69
  AdaptiveImage.defaultProps = {
@@ -1,54 +1,66 @@
1
- import { template, cls, RenderIf, makeStyleResponsive } from '@gem-sdk/core';
2
- import { getImageSrc } from '../helpers/getSrcSet.js';
1
+ import { template } from '@gem-sdk/core';
2
+ import { createAttr, createStyle, createClass } from '@gem-sdk/system';
3
+ import { getLoadingAdaptiveImageAttrs } from './common/attributes.js';
4
+ import { getAdaptiveImageClasses } from './common/classes.js';
5
+ import { IMAGE_PLACEHOLDER } from './common/constants.js';
6
+ import { getAdaptiveImageData } from './common/data.js';
7
+ import { getAdaptivePictureStyles, getAdaptiveImageStyles } from './common/styles.js';
3
8
 
4
- const AdaptiveImage = ({ srcSet, priority, alt, aspectRatio, layout, className, pictureClass, style, enableLazyLoadImage = true, pageContext, ...props })=>{
5
- const fallBackImage = 'https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif';
6
- const srcDesktop = getImageSrc(srcSet?.desktop, 'desktop') || fallBackImage;
7
- const srcTablet = (getImageSrc(srcSet?.tablet, 'tablet') ?? getImageSrc(srcSet?.desktop, 'tablet')) || fallBackImage;
8
- const srcMobile = (getImageSrc(srcSet?.mobile, 'mobile') ?? getImageSrc(srcSet?.tablet, 'mobile') ?? getImageSrc(srcSet?.desktop, 'mobile')) || fallBackImage;
9
- const imagePlaceholder = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=';
10
- return template`
11
- <picture style="border-radius: inherit" class="${cls(pictureClass)}">
12
- ${RenderIf(priority, template`
13
- ${srcMobile ? `<source media="(max-width: 767px)" srcset="${srcMobile}" />` : ``}
14
- ${srcTablet ? `<source media="(max-width: 1024px)" srcset="${srcTablet}" />` : ``}
15
- <img
16
- ${{
17
- ...props
18
- }}
19
- class="${cls(className)}"
20
- src="${srcDesktop}"
21
- alt="${alt}"
22
- fetchpriority="high"
23
- style="${{
24
- ...makeStyleResponsive('aspect', aspectRatio),
25
- ...makeStyleResponsive('objf', layout),
9
+ const AdaptiveImage = (props)=>{
10
+ const { alt, style, layout, srcSet, priority, className, aspectRatio, pageContext, pictureClass, borderRadius, enableLazyLoadImage = true, ...restProps } = props;
11
+ const { getDeviceSource } = getAdaptiveImageData(props);
12
+ const { srcDesktop, srcTablet, srcMobile } = getDeviceSource({
13
+ isLiquid: true
14
+ });
15
+ const loadingAttrs = createAttr(getLoadingAdaptiveImageAttrs({
16
+ srcDesktop,
17
+ enableLazyLoadImage
18
+ }));
19
+ const pictureStyle = createStyle({
20
+ ...getAdaptivePictureStyles()
21
+ });
22
+ const adaptiveImageStyles = createStyle({
23
+ ...getAdaptiveImageStyles({
24
+ layout,
25
+ aspectRatio,
26
+ borderRadius
27
+ }),
26
28
  ...style
27
- }}"
28
- />
29
- `, template`
30
- ${srcMobile ? `<source media="(max-width: 767px)" data-srcSet="${srcMobile}" srcset="${enableLazyLoadImage ? imagePlaceholder : srcMobile}" />` : ''}
31
- ${srcTablet ? `<source media="(max-width: 1024px)" data-srcSet="${srcTablet}" srcset="${enableLazyLoadImage ? imagePlaceholder : srcTablet}" />` : ''}
29
+ });
30
+ const adaptiveImageClasses = createClass({
31
+ ...getAdaptiveImageClasses({
32
+ className,
33
+ hasLazyLoad: enableLazyLoadImage,
34
+ hasForceLoad: pageContext?.isOptimizePlan
35
+ })
36
+ });
37
+ const renderSource = ()=>{
38
+ return `
39
+ ${srcMobile ? `<source media="(max-width: 767px)" srcset="${enableLazyLoadImage ? IMAGE_PLACEHOLDER : srcMobile}" />` : ``}
40
+ ${srcTablet ? `<source media="(max-width: 1024px)" srcset="${enableLazyLoadImage ? IMAGE_PLACEHOLDER : srcTablet}" />` : ``}
41
+ `;
42
+ };
43
+ const renderImage = ()=>{
44
+ return `
32
45
  <img
33
46
  ${{
34
- ...props
35
- }}
36
- class="${cls(className, {
37
- gp_lazyload: enableLazyLoadImage,
38
- gp_force_load: pageContext?.isOptimizePlan
39
- })}"
40
- src="${enableLazyLoadImage ? imagePlaceholder : srcDesktop}"
41
- data-src="${srcDesktop}"
42
- width="100%"
47
+ ...restProps
48
+ }}
49
+ ${{
50
+ ...loadingAttrs
51
+ }}
43
52
  alt="${alt}"
44
- style="${{
45
- ...makeStyleResponsive('aspect', aspectRatio),
46
- ...makeStyleResponsive('objf', layout),
47
- ...style
48
- }}"
53
+ style="${adaptiveImageStyles}"
54
+ class="${adaptiveImageClasses}"
49
55
  />
50
- `)}
51
- </picture>`;
56
+ `;
57
+ };
58
+ return template`
59
+ <picture style="${pictureStyle}" class="${pictureClass}">
60
+ ${renderSource()}
61
+ ${renderImage()}
62
+ </picture>
63
+ `;
52
64
  };
53
65
 
54
66
  export { AdaptiveImage as default };
@@ -1,168 +1,79 @@
1
1
  'use client';
2
- import { jsxs, jsx } from 'react/jsx-runtime';
3
- import { useCurrentDevice, makeStyleResponsive, getWidthByShapeGlobalSize, makeWidth, getHeightByShapeGlobalSize, cls, handleConvertClassColor, getBorderStyle, getBorderRadiusStyle, getStyleShadow, getAspectRatioGlobalSize, getGlobalColorStateClass, getGlobalColorStateStyle, makeStyleState, getCornerCSSFromGlobal } from '@gem-sdk/core';
4
- import Link from '../../link/components/Link.js';
2
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
+ import { createStyle, createClass, createAttr, If } from '@gem-sdk/system';
5
4
  import AdaptiveImage from './AdaptiveImage.js';
6
5
  import NextImage from './NextImage.js';
7
- import { composeAspectRatio } from './helpers.js';
8
6
  import NoDataImage from './NoDataImage.js';
9
- import { useMemo } from 'react';
7
+ import { getWrapperStyles, getNoDataImageStyles, getImageStyles, getContainerStyles } from './common/styles.js';
8
+ import { getWrapperClasses, getImageClasses, getContainerClasses } from './common/classes.js';
9
+ import { getContainerAttrs, getAdaptiveImageAttrs, getNextImageAttrs, getLinkWrapperAttrs } from './common/attributes.js';
10
+ import { getLinkData } from '../../helpers.js';
11
+ import { useCheckNoImage } from './hooks/useCheckNoImage.js';
10
12
 
11
- const Image = ({ styles, className, setting, builderAttrs, builderProps, style, children, onClick, onLoad })=>{
12
- const { image, imageLink, srcSet, isNotLazyload } = setting ?? {};
13
- const { customAspectRadio } = styles ?? {};
14
- const currentDevice = useCurrentDevice();
15
- const { shape } = styles ?? {};
16
- const WrapLink = imageLink?.link ? Link : 'div';
17
- const opacity = {
18
- normal: styles?.opacity?.normal !== undefined ? styles?.opacity?.normal / 100 : undefined,
19
- hover: styles?.opacity?.hover !== undefined ? styles?.opacity?.hover / 100 : undefined,
20
- focus: styles?.opacity?.focus !== undefined ? styles?.opacity?.focus / 100 : undefined
21
- };
22
- const imageWidth = shape ? makeStyleResponsive('w', getWidthByShapeGlobalSize(shape)) : makeStyleResponsive('w', makeWidth(styles?.width, styles?.fullWidth));
23
- const imageHeight = makeStyleResponsive('h', getHeightByShapeGlobalSize(shape));
24
- const overwriteDefaultRadius = (cornerRadius)=>{
25
- const radius = {
26
- ...cornerRadius
27
- };
28
- let hasDefault = true;
29
- if (radius) {
30
- Object.keys(radius ?? {}).forEach((key)=>{
31
- if (key === 'bblr' || key === 'bbrr' || key === 'btlr' || key === 'btrr') {
32
- const currPos = radius[key] ?? {};
33
- if (currPos !== '0px') hasDefault = false;
34
- }
35
- });
36
- }
37
- return hasDefault ? getCornerCSSFromGlobal(builderProps?.builderData?.advanced?.rounded) : {};
13
+ const Image = ({ style, styles, setting, children, advanced, className, builderAttrs, builderProps, onLoad, onClick })=>{
14
+ const { imageLink, isAdaptive, enableImageLink } = setting ?? {};
15
+ const { isShowNoDataState } = useCheckNoImage(setting);
16
+ const { Wrapper: HTMLTag, urlData } = getLinkData({
17
+ defaultWrap: 'div',
18
+ setting: imageLink,
19
+ enableImageLink
20
+ });
21
+ console.log('image', {
22
+ setting,
23
+ styles
24
+ });
25
+ const wrapperStyles = createStyle(getWrapperStyles(styles));
26
+ const noDataImageStyles = createStyle(getNoDataImageStyles(styles));
27
+ const imageStyles = createStyle(getImageStyles(styles, builderProps));
28
+ const containerStyles = createStyle(getContainerStyles(style, styles));
29
+ const wrapperClasses = createClass(getWrapperClasses());
30
+ const imageClasses = createClass(getImageClasses(className, styles));
31
+ const containerClasses = createClass(getContainerClasses(builderProps?.uid, advanced?.cssClass));
32
+ const containerAttrs = createAttr(getContainerAttrs(builderAttrs, builderProps?.uid));
33
+ const linkWrapperAttrs = getLinkWrapperAttrs({
34
+ urlData,
35
+ imageLink,
36
+ title: setting?.title
37
+ });
38
+ const adaptiveImageAttrs = getAdaptiveImageAttrs({
39
+ styles,
40
+ setting
41
+ });
42
+ const nextImageAttrs = getNextImageAttrs({
43
+ styles,
44
+ setting
45
+ });
46
+ const Image = ()=>{
47
+ return /*#__PURE__*/ jsx(Fragment, {
48
+ children: If(isAdaptive, /*#__PURE__*/ jsx(AdaptiveImage, {
49
+ ...adaptiveImageAttrs,
50
+ style: imageStyles,
51
+ className: imageClasses
52
+ }), /*#__PURE__*/ jsx(NextImage, {
53
+ ...nextImageAttrs,
54
+ style: imageStyles,
55
+ className: imageClasses,
56
+ onLoad: onLoad
57
+ }))
58
+ });
38
59
  };
39
- const aspectRatio = {
40
- desktop: composeAspectRatio({
41
- device: 'desktop',
42
- aspect: styles?.aspectRatio,
43
- auto: setting?.isAdaptive ? srcSet?.desktop : image,
44
- custom: customAspectRadio
45
- }),
46
- tablet: composeAspectRatio({
47
- device: 'tablet',
48
- aspect: styles?.aspectRatio,
49
- auto: setting?.isAdaptive ? srcSet?.tablet : image,
50
- custom: customAspectRadio
51
- }),
52
- mobile: composeAspectRatio({
53
- device: 'mobile',
54
- aspect: styles?.aspectRatio,
55
- auto: setting?.isAdaptive ? srcSet?.mobile : image,
56
- custom: customAspectRadio
57
- })
60
+ const renderImage = ()=>{
61
+ return If(isShowNoDataState, /*#__PURE__*/ jsx(NoDataImage, {
62
+ style: noDataImageStyles
63
+ }), /*#__PURE__*/ jsx(Image, {}));
58
64
  };
59
- const isShowNoDataState = useMemo(()=>{
60
- if (setting?.disableNoDataState) return false;
61
- if (currentDevice === 'mobile') return !setting?.srcSet?.mobile?.src && !setting?.srcSet?.tablet?.src && !setting?.srcSet?.desktop?.src;
62
- if (currentDevice === 'tablet') return !setting?.srcSet?.tablet?.src && !setting?.srcSet?.desktop?.src;
63
- return !setting?.srcSet?.desktop?.src;
64
- }, [
65
- currentDevice,
66
- setting?.disableNoDataState,
67
- setting?.srcSet?.desktop?.src,
68
- setting?.srcSet?.mobile?.src,
69
- setting?.srcSet?.tablet?.src
70
- ]);
71
65
  return /*#__PURE__*/ jsxs("div", {
72
- ...builderAttrs,
73
- "data-id": builderProps?.uid,
74
- onClick: onClick,
75
66
  role: "presentation",
76
- className: cls('gp-group/image gp-relative', builderProps?.uid),
77
- style: {
78
- ...style,
79
- ...makeStyleResponsive('ta', styles?.align)
80
- },
67
+ ...containerAttrs,
68
+ style: containerStyles,
69
+ className: containerClasses,
70
+ onClick: onClick,
81
71
  children: [
82
- /*#__PURE__*/ jsxs(WrapLink, {
83
- ...imageLink?.link ? {
84
- setting: {
85
- type: 'custom',
86
- href: imageLink?.link,
87
- target: imageLink?.target,
88
- noFollow: imageLink?.noFollow
89
- },
90
- title: setting?.title
91
- } : {},
92
- className: "gp-h-full gp-w-full gp-flex",
93
- style: {
94
- // ...getStyleShadowState(styles?.boxShadowImg, 'box-shadow', styles?.hasBoxShadowImg),
95
- borderRadius: 'inherit',
96
- overflow: 'hidden',
97
- ...makeStyleResponsive('jc', styles?.align)
98
- },
99
- children: [
100
- isShowNoDataState ? /*#__PURE__*/ jsx(NoDataImage, {
101
- style: {
102
- ...imageWidth,
103
- ...imageHeight
104
- }
105
- }) : setting?.isAdaptive ? /*#__PURE__*/ jsx(AdaptiveImage, {
106
- srcSet: setting.srcSet,
107
- pictureClass: "gp-contents",
108
- className: cls(className, 'gp-inline-block gp-w-full gp-max-w-full', handleConvertClassColor(styles?.borderImg)),
109
- alt: setting.alt,
110
- style: {
111
- ...imageWidth,
112
- ...imageHeight,
113
- // ...handleConvertBorderStyle(styles?.borderImg),
114
- // ...handleConvertBorderWidth(styles?.borderImg),
115
- // ...handleConvertBorderColor(styles?.borderImg),
116
- ...overwriteDefaultRadius(builderProps?.builderData?.advanced?.rounded),
117
- ...getBorderStyle(styles?.wrapperBorder),
118
- ...getBorderRadiusStyle(styles?.borderRadius),
119
- ...getStyleShadow({
120
- value: styles?.shadow,
121
- styleAppliedFor: 'box-shadow',
122
- isEnableShadow: styles?.shadow?.type !== 'none'
123
- })
124
- },
125
- aspectRatio: shape ? getAspectRatioGlobalSize(styles?.shape) : aspectRatio,
126
- layout: styles?.objectFit,
127
- priority: setting?.priority
128
- }) : /*#__PURE__*/ jsx(NextImage, {
129
- ...setting?.image,
130
- priority: setting?.priority,
131
- quality: setting?.quality,
132
- isNotLazyload: isNotLazyload,
133
- className: cls(className, 'gp-inline gp-h-full gp-max-w-full', handleConvertClassColor(styles?.borderImg)),
134
- onLoad: onLoad,
135
- style: {
136
- ...imageWidth,
137
- ...imageHeight,
138
- // ...handleConvertBorderStyle(styles?.borderImg),
139
- // ...handleConvertBorderWidth(styles?.borderImg),
140
- // ...handleConvertBorderColor(styles?.borderImg),
141
- ...overwriteDefaultRadius(builderProps?.builderData?.advanced?.rounded),
142
- ...getBorderStyle(styles?.wrapperBorder),
143
- ...getBorderRadiusStyle(styles?.borderRadius),
144
- ...getStyleShadow({
145
- value: styles?.shadow,
146
- styleAppliedFor: 'box-shadow',
147
- isEnableShadow: styles?.shadow?.type !== 'none'
148
- })
149
- },
150
- alt: setting?.alt,
151
- title: setting?.title,
152
- vw: setting?.vw,
153
- setting: {
154
- aspectRatio: shape ? getAspectRatioGlobalSize(styles?.shape) : aspectRatio,
155
- layout: styles?.objectFit
156
- }
157
- }),
158
- /*#__PURE__*/ jsx("div", {
159
- className: cls('gp-absolute gp-inset-0 gp-transition-all gp-duration-300 group-hover/image:gp-bg-[color:var(--hvr-bgc,_var(--bgc))] group-hover/image:gp-opacity-[var(--hvr-op,_var(--op))]', getGlobalColorStateClass('bg', styles?.opacityColor)),
160
- style: {
161
- ...getGlobalColorStateStyle('bgc', styles?.opacityColor),
162
- ...makeStyleState('op', opacity)
163
- }
164
- })
165
- ]
72
+ /*#__PURE__*/ jsx(HTMLTag, {
73
+ ...linkWrapperAttrs,
74
+ style: wrapperStyles,
75
+ className: wrapperClasses,
76
+ children: renderImage()
166
77
  }),
167
78
  children
168
79
  ]