@gem-sdk/components 2.0.0-dev.278 → 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/components/CalloutText.js +2 -1
  89. package/dist/cjs/post-purchase/callout-banner/components/common/getClasses.js +5 -2
  90. package/dist/cjs/post-purchase/callout-banner/components/common/getStyles.js +2 -4
  91. package/dist/cjs/post-purchase/callout-banner/setting/config/callout-box/setting.js +4 -10
  92. package/dist/cjs/post-purchase/callout-banner/setting/config/callout-text/setting.js +1 -11
  93. package/dist/cjs/post-purchase/countdown-timer/components/PostPurchaseCountdownTimer.js +9 -23
  94. package/dist/cjs/post-purchase/countdown-timer/components/TextCountdown.js +12 -26
  95. package/dist/cjs/post-purchase/countdown-timer/components/common/getClasses.js +24 -0
  96. package/dist/cjs/post-purchase/countdown-timer/components/common/getStyles.js +21 -0
  97. package/dist/cjs/post-purchase/countdown-timer/hooks/useCountdownTimer.js +18 -1
  98. package/dist/cjs/post-purchase/countdown-timer/hooks/useGetTimeExpired.js +18 -0
  99. package/dist/cjs/post-purchase/countdown-timer/settings/CountdownTimer.js +9 -358
  100. package/dist/cjs/post-purchase/countdown-timer/settings/config/preset.js +26 -0
  101. package/dist/cjs/post-purchase/countdown-timer/settings/config/setting.js +243 -0
  102. package/dist/cjs/post-purchase/countdown-timer/settings/config/uiV1.js +125 -0
  103. package/dist/cjs/post-purchase/countdown-timer/settings/config/uiV2.js +185 -0
  104. package/dist/cjs/post-purchase/image/common/getClasses.js +1 -1
  105. package/dist/cjs/post-purchase/image/setting/setting-v2.js +5 -5
  106. package/dist/cjs/post-purchase/product/components/product-image/carousel-post-purchase/CarouselWrapperPostPurchase.js +24 -26
  107. package/dist/cjs/post-purchase/product/settings/product-image/setting-v2.js +5 -5
  108. package/dist/cjs/post-purchase/product/settings/product-price-breakdown/configs/settings.js +2 -2
  109. package/dist/cjs/post-purchase/product/settings/product-quantity/configs/settings.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/components/CalloutText.js +2 -1
  229. package/dist/esm/post-purchase/callout-banner/components/common/getClasses.js +5 -2
  230. package/dist/esm/post-purchase/callout-banner/components/common/getStyles.js +2 -4
  231. package/dist/esm/post-purchase/callout-banner/setting/config/callout-box/setting.js +4 -10
  232. package/dist/esm/post-purchase/callout-banner/setting/config/callout-text/setting.js +1 -11
  233. package/dist/esm/post-purchase/countdown-timer/components/PostPurchaseCountdownTimer.js +9 -23
  234. package/dist/esm/post-purchase/countdown-timer/components/TextCountdown.js +13 -27
  235. package/dist/esm/post-purchase/countdown-timer/components/common/getClasses.js +21 -0
  236. package/dist/esm/post-purchase/countdown-timer/components/common/getStyles.js +19 -0
  237. package/dist/esm/post-purchase/countdown-timer/hooks/useCountdownTimer.js +19 -3
  238. package/dist/esm/post-purchase/countdown-timer/hooks/useGetTimeExpired.js +16 -0
  239. package/dist/esm/post-purchase/countdown-timer/settings/CountdownTimer.js +9 -358
  240. package/dist/esm/post-purchase/countdown-timer/settings/config/preset.js +24 -0
  241. package/dist/esm/post-purchase/countdown-timer/settings/config/setting.js +241 -0
  242. package/dist/esm/post-purchase/countdown-timer/settings/config/uiV1.js +123 -0
  243. package/dist/esm/post-purchase/countdown-timer/settings/config/uiV2.js +183 -0
  244. package/dist/esm/post-purchase/image/common/getClasses.js +1 -1
  245. package/dist/esm/post-purchase/image/setting/setting-v2.js +5 -5
  246. package/dist/esm/post-purchase/product/components/product-image/carousel-post-purchase/CarouselWrapperPostPurchase.js +25 -27
  247. package/dist/esm/post-purchase/product/settings/product-image/setting-v2.js +5 -5
  248. package/dist/esm/post-purchase/product/settings/product-price-breakdown/configs/settings.js +2 -2
  249. package/dist/esm/post-purchase/product/settings/product-quantity/configs/settings.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 +174 -257
  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
@@ -61,6 +61,99 @@ const SettingUIV2 = [
61
61
  }
62
62
  ]
63
63
  },
64
+ {
65
+ label: {
66
+ en: 'Size'
67
+ },
68
+ controls: [
69
+ {
70
+ id: 'Width',
71
+ label: {
72
+ en: 'Width'
73
+ },
74
+ controlConfig: {
75
+ id: 'width',
76
+ type: 'dropdown:input',
77
+ label: 'Width',
78
+ inputType: 'number',
79
+ units: [
80
+ 'px',
81
+ '%'
82
+ ],
83
+ hideUnit: false,
84
+ linkWithSetting: {
85
+ name: 'globalSize',
86
+ field: 'width'
87
+ },
88
+ displayOptions: [
89
+ {
90
+ label: 'Fit content',
91
+ value: 'Auto',
92
+ showValue: true
93
+ },
94
+ {
95
+ label: 'Full',
96
+ value: '100%',
97
+ showValue: true
98
+ },
99
+ {
100
+ label: 'Small',
101
+ value: '100px',
102
+ showValue: true
103
+ },
104
+ {
105
+ label: 'Medium',
106
+ value: '116px',
107
+ showValue: true
108
+ },
109
+ {
110
+ label: 'Large',
111
+ value: '132px',
112
+ showValue: true
113
+ }
114
+ ]
115
+ },
116
+ layout: 'horizontal'
117
+ },
118
+ {
119
+ label: {
120
+ en: 'Padding'
121
+ },
122
+ controlConfig: {
123
+ id: 'padding',
124
+ type: 'padding-v2',
125
+ linkWithSetting: {
126
+ name: 'globalSize',
127
+ field: 'padding'
128
+ },
129
+ compoDefaultValue: {
130
+ desktop: {
131
+ default: {
132
+ type: 'medium',
133
+ top: '12px',
134
+ bottom: '12px',
135
+ left: '24px',
136
+ right: '24px'
137
+ }
138
+ }
139
+ }
140
+ }
141
+ }
142
+ ]
143
+ },
144
+ {
145
+ label: {
146
+ en: 'Background'
147
+ },
148
+ controls: [
149
+ {
150
+ setting: {
151
+ id: 'background'
152
+ },
153
+ layout: 'vertical'
154
+ }
155
+ ]
156
+ },
64
157
  {
65
158
  label: {
66
159
  en: 'Shape'
@@ -4,6 +4,43 @@ const SubmitButtonSettings = [
4
4
  {
5
5
  id: 'setting',
6
6
  controls: [
7
+ {
8
+ id: 'buttonLayoutGroup',
9
+ type: 'group',
10
+ controls: [
11
+ {
12
+ id: 'layout',
13
+ type: 'button-layout',
14
+ default: 'default',
15
+ options: [
16
+ {
17
+ id: 'default',
18
+ value: 'default',
19
+ name: `<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10 flex items-center justify-center gap-4">SUBMIT</div>`,
20
+ icon: true
21
+ },
22
+ {
23
+ id: 'rounded',
24
+ value: 'rounded',
25
+ name: `<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10 flex items-center justify-center gap-4">SUBMIT</div>`,
26
+ icon: true
27
+ },
28
+ {
29
+ id: 'bordered',
30
+ value: 'bordered',
31
+ name: '<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10">SUBMIT</div>',
32
+ icon: false
33
+ },
34
+ {
35
+ id: 'underlined',
36
+ value: 'underlined',
37
+ name: '<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10">SUBMIT</div>',
38
+ icon: false
39
+ }
40
+ ]
41
+ }
42
+ ]
43
+ },
7
44
  {
8
45
  id: 'label',
9
46
  label: 'Text',
@@ -1,6 +1,19 @@
1
1
  'use strict';
2
2
 
3
3
  const SettingUIV2 = [
4
+ {
5
+ label: {
6
+ en: 'Layout'
7
+ },
8
+ controls: [
9
+ {
10
+ setting: {
11
+ id: 'layout'
12
+ },
13
+ layout: 'vertical'
14
+ }
15
+ ]
16
+ },
4
17
  {
5
18
  label: {
6
19
  en: 'Size'
@@ -2,18 +2,19 @@
2
2
 
3
3
  function reduceRadiusForState(borderWidth, radiusSettings) {
4
4
  if (!borderWidth || !radiusSettings) return {};
5
- const borderWidthValues = borderWidth.split(' ').map((value)=>parseInt(value, 10));
6
- const borderRadiusValues = [
7
- parseInt(radiusSettings.btrr ?? '0', 10),
8
- parseInt(radiusSettings.bblr ?? '0', 10),
9
- parseInt(radiusSettings.bbrr ?? '0', 10),
10
- parseInt(radiusSettings.btlr ?? '0', 10)
5
+ const borderWidthValues = (typeof borderWidth === 'string' ? borderWidth.split(' ') : []).map((value)=>parseInt(value, 10) || 0);
6
+ const keys = [
7
+ 'btrr',
8
+ 'bblr',
9
+ 'bbrr',
10
+ 'btlr'
11
11
  ];
12
+ const result = Object.fromEntries(keys.map((key, index)=>[
13
+ key,
14
+ Math.max(0, (parseInt(radiusSettings[key] ?? '0', 10) || 0) - (borderWidthValues[index] || 0)) + 'px'
15
+ ]));
12
16
  return {
13
- btrr: Math.max(0, (borderRadiusValues?.[0] ?? 0) - (borderWidthValues?.[0] ?? 0)) + 'px',
14
- bblr: Math.max(0, (borderRadiusValues?.[1] ?? 0) - (borderWidthValues?.[1] ?? 0)) + 'px',
15
- bbrr: Math.max(0, (borderRadiusValues?.[2] ?? 0) - (borderWidthValues?.[2] ?? 0)) + 'px',
16
- btlr: Math.max(0, (borderRadiusValues?.[3] ?? 0) - (borderWidthValues?.[3] ?? 0)) + 'px',
17
+ ...result,
17
18
  radiusType: radiusSettings.radiusType
18
19
  };
19
20
  }
@@ -85,7 +85,7 @@ const SettingUIV2 = [
85
85
  options: {
86
86
  fullWidth: true
87
87
  },
88
- conditionDisplay: `pageType == "POST_PURCHASE"`,
88
+ conditionDisplay: `pageType == "POST_PURCHASE" && !!layout.cols && layout.cols.length > 1`,
89
89
  conditionEnable: '!!layout.cols && layout.cols.length > 1'
90
90
  }
91
91
  ]
@@ -8,6 +8,7 @@ var core = require('@gem-sdk/core');
8
8
  var dynamic = require('next/dynamic');
9
9
  require('react');
10
10
  require('@gem-sdk/system');
11
+ require('next/link');
11
12
  var Cart = require('../../../../cart/components/Cart.js');
12
13
  require('next/head');
13
14
  require('next/image');
@@ -7,11 +7,11 @@ var jsxRuntime = require('react/jsx-runtime');
7
7
  var core = require('@gem-sdk/core');
8
8
  require('react');
9
9
  require('@gem-sdk/system');
10
+ require('next/link');
10
11
  var Cart = require('../../../../cart/components/Cart.js');
11
12
  require('next/head');
12
13
  require('next/image');
13
14
  require('react-youtube');
14
- require('next/link');
15
15
  require('../../../../image/components/AdaptiveImage.js');
16
16
  require('../../../../cart/components/ShopPayButton/ShopPayButton.js');
17
17
 
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ var Link = require('./link/components/Link.js');
4
+
3
5
  const isTransparentColor = (str)=>{
4
6
  if (!str) return false;
5
7
  if (str.startsWith('#')) {
@@ -110,6 +112,52 @@ const getInsertLinkData = (defaultWrap, setting, htmlType)=>{
110
112
  shouldRenderLink
111
113
  };
112
114
  };
115
+ const getLinkData = ({ setting, htmlType, defaultWrap, isLiquid = false, enableImageLink = false })=>{
116
+ const URL_INCLUDES = [
117
+ 'product.url'
118
+ ];
119
+ const URL_START_WITH = [
120
+ '#',
121
+ 'mailto:',
122
+ 'tel:'
123
+ ];
124
+ const urlHref = setting?.link ?? '';
125
+ const isHomePageHref = urlHref === '/';
126
+ const isHyperlink = setting?.link !== undefined && setting.link !== '';
127
+ const regexHttp = new RegExp(/^https?:\/\//i);
128
+ const isDomain = isHyperlink && regexHttp.test(urlHref);
129
+ const regexPageType = new RegExp(/^\/?(?:collections|pages|products|blogs|checkout|cart)\/?/i);
130
+ const isShopifyDomain = isHyperlink && !regexHttp.test(urlHref) && regexPageType.test(urlHref);
131
+ const isLink = ()=>{
132
+ if (URL_INCLUDES.find((el)=>urlHref.includes(el))) return true;
133
+ if (URL_START_WITH.find((el)=>urlHref.startsWith(el))) return true;
134
+ return false;
135
+ };
136
+ const shouldRenderLink = enableImageLink && (isDomain || isShopifyDomain || isLink() || isHomePageHref);
137
+ let transformedUrl = urlHref;
138
+ if (isLiquid && (isShopifyDomain || isHomePageHref)) {
139
+ transformedUrl = setting?.isTranslate ? '$locationOrigin' + urlHref : "{{ request.origin }}{{ routes.root_url | split: '/' | join: '/' }}" + urlHref;
140
+ }
141
+ const Wrapper = shouldRenderLink ? isLiquid ? 'a' : Link.default : defaultWrap;
142
+ const baseUrlData = {
143
+ href: transformedUrl,
144
+ target: setting?.target,
145
+ ...setting?.noFollow && {
146
+ rel: 'nofollow'
147
+ }
148
+ };
149
+ const urlData = shouldRenderLink ? baseUrlData : isHyperlink ? {
150
+ ...baseUrlData,
151
+ type: htmlType
152
+ } : {
153
+ type: htmlType
154
+ };
155
+ return {
156
+ Wrapper,
157
+ urlData,
158
+ shouldRenderLink
159
+ };
160
+ };
113
161
  const replaceLinkData = (text, isTranslate)=>{
114
162
  const regex = /<a\s[^>]*>.*?<\/a>/;
115
163
  if (text && regex.test(text)) {
@@ -132,10 +180,15 @@ const replaceLinkData = (text, isTranslate)=>{
132
180
  function filterTruthyStyles(styles) {
133
181
  return Object.fromEntries(Object.entries(styles || {}).filter(([, value])=>!!value));
134
182
  }
183
+ function filterTruthyObject(obj) {
184
+ return Object.fromEntries(Object.entries(obj || {}).filter(([, value])=>!!value));
185
+ }
135
186
 
187
+ exports.filterTruthyObject = filterTruthyObject;
136
188
  exports.filterTruthyStyles = filterTruthyStyles;
137
189
  exports.getDynamicSourceLocales = getDynamicSourceLocales;
138
190
  exports.getInsertLinkData = getInsertLinkData;
191
+ exports.getLinkData = getLinkData;
139
192
  exports.getSettingPreloadData = getSettingPreloadData;
140
193
  exports.getStaticLocale = getStaticLocale;
141
194
  exports.isHexTransparent = isHexTransparent;
@@ -41,7 +41,7 @@ const SettingUIV2 = [
41
41
  en: 'Gap'
42
42
  },
43
43
  setting: {
44
- id: 'verticalSpacing'
44
+ id: 'horizontalSpacing'
45
45
  }
46
46
  }
47
47
  ]
@@ -226,21 +226,21 @@ const IconListSettings = [
226
226
  },
227
227
  {
228
228
  id: 'position',
229
- type: 'layout-segment',
230
- iconViewBox: '0 0 66 48',
231
- enableItemBackground: true,
229
+ type: 'option:illustration',
232
230
  enableTooltip: true,
233
231
  label: 'Position',
234
232
  options: [
235
233
  {
236
234
  label: 'Align center',
237
235
  value: 'center',
238
- type: 'align-pos'
236
+ type: 'align-pos',
237
+ svgName: 'gp-align-position-center'
239
238
  },
240
239
  {
241
240
  label: 'Align top',
242
241
  value: 'baseline',
243
- type: 'align-pos'
242
+ type: 'align-pos',
243
+ svgName: 'gp-align-position-top'
244
244
  }
245
245
  ],
246
246
  devices: {
@@ -4,56 +4,70 @@
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
- var Head = require('next/head');
8
- var Img = require('./Img.js');
9
- var getSrcSet = require('../helpers/getSrcSet.js');
7
+ var constants = require('./common/constants.js');
8
+ var system = require('@gem-sdk/system');
9
+ var attributes = require('./common/attributes.js');
10
+ var classes = require('./common/classes.js');
11
+ var data = require('./common/data.js');
12
+ var styles = require('./common/styles.js');
10
13
 
11
- const AdaptiveImage = ({ srcSet, priority, pictureClass, ...rest })=>{
12
- return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
13
- children: [
14
- /*#__PURE__*/ jsxRuntime.jsxs(Head, {
15
- children: [
16
- !!srcSet?.desktop?.src && /*#__PURE__*/ jsxRuntime.jsx("link", {
17
- rel: "preload",
18
- href: srcSet.desktop.src,
19
- as: "image"
20
- }),
21
- !!srcSet?.tablet?.src && /*#__PURE__*/ jsxRuntime.jsx("link", {
22
- rel: "preload",
23
- href: srcSet.tablet.src,
24
- as: "image"
25
- }),
26
- !!srcSet?.mobile?.src && /*#__PURE__*/ jsxRuntime.jsx("link", {
27
- rel: "preload",
28
- href: srcSet.mobile.src,
29
- as: "image"
30
- })
31
- ]
32
- }),
33
- /*#__PURE__*/ jsxRuntime.jsxs("picture", {
34
- style: {
35
- borderRadius: 'inherit'
36
- },
37
- className: pictureClass,
38
- children: [
39
- !!srcSet?.mobile?.src && /*#__PURE__*/ jsxRuntime.jsx("source", {
40
- media: "(max-width: 767px)",
41
- srcSet: srcSet.mobile.src
42
- }),
43
- !!srcSet?.tablet?.src && /*#__PURE__*/ jsxRuntime.jsx("source", {
44
- media: "(max-width: 1024px)",
45
- srcSet: srcSet?.tablet?.src
46
- }),
47
- /*#__PURE__*/ jsxRuntime.jsx(Img.default, {
48
- ...rest,
49
- loading: priority ? 'eager' : 'lazy',
50
- image: {
51
- src: srcSet?.desktop?.src || getSrcSet.imagePlaceholder
52
- }
53
- })
54
- ]
55
- })
56
- ]
14
+ const AdaptiveImage = (props)=>{
15
+ const { alt, style, srcSet, layout, priority, className, aspectRatio, borderRadius, pictureClass, enableLazyloadImage, ...restProps } = props;
16
+ const { getDeviceSource } = data.getAdaptiveImageData(props);
17
+ const { srcDesktop, srcTablet, srcMobile } = getDeviceSource();
18
+ const loadingAttrs = system.createAttr(attributes.getLoadingAdaptiveImageAttrs({
19
+ srcDesktop,
20
+ enableLazyLoadImage: enableLazyloadImage
21
+ }));
22
+ const pictureStyle = system.createStyle({
23
+ ...styles.getAdaptivePictureStyles()
24
+ });
25
+ const adaptiveImageStyles = system.createStyle({
26
+ ...styles.getAdaptiveImageStyles({
27
+ layout,
28
+ aspectRatio,
29
+ borderRadius
30
+ }),
31
+ ...style
32
+ });
33
+ const adaptiveImageClasses = system.createClass({
34
+ ...classes.getAdaptiveImageClasses({
35
+ className,
36
+ hasLazyLoad: enableLazyloadImage
37
+ })
38
+ });
39
+ const renderSource = ()=>{
40
+ return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
41
+ children: [
42
+ srcMobile && /*#__PURE__*/ jsxRuntime.jsx("source", {
43
+ media: "(max-width: 767px)",
44
+ srcSet: enableLazyloadImage ? constants.IMAGE_PLACEHOLDER : srcMobile
45
+ }),
46
+ srcTablet && /*#__PURE__*/ jsxRuntime.jsx("source", {
47
+ media: "(max-width: 1024px)",
48
+ srcSet: enableLazyloadImage ? constants.IMAGE_PLACEHOLDER : srcTablet
49
+ })
50
+ ]
51
+ });
52
+ };
53
+ const renderImage = ()=>{
54
+ return /*#__PURE__*/ jsxRuntime.jsx("img", {
55
+ ...restProps,
56
+ ...loadingAttrs,
57
+ alt: alt,
58
+ style: adaptiveImageStyles,
59
+ className: adaptiveImageClasses
60
+ });
61
+ };
62
+ return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
63
+ children: /*#__PURE__*/ jsxRuntime.jsxs("picture", {
64
+ style: pictureStyle,
65
+ className: pictureClass,
66
+ children: [
67
+ renderSource(),
68
+ renderImage()
69
+ ]
70
+ })
57
71
  });
58
72
  };
59
73
  AdaptiveImage.defaultProps = {
@@ -3,56 +3,68 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var core = require('@gem-sdk/core');
6
- var getSrcSet = require('../helpers/getSrcSet.js');
6
+ var system = require('@gem-sdk/system');
7
+ var attributes = require('./common/attributes.js');
8
+ var classes = require('./common/classes.js');
9
+ var constants = require('./common/constants.js');
10
+ var data = require('./common/data.js');
11
+ var styles = require('./common/styles.js');
7
12
 
8
- const AdaptiveImage = ({ srcSet, priority, alt, aspectRatio, layout, className, pictureClass, style, enableLazyLoadImage = true, pageContext, ...props })=>{
9
- const fallBackImage = 'https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif';
10
- const srcDesktop = getSrcSet.getImageSrc(srcSet?.desktop, 'desktop') || fallBackImage;
11
- const srcTablet = (getSrcSet.getImageSrc(srcSet?.tablet, 'tablet') ?? getSrcSet.getImageSrc(srcSet?.desktop, 'tablet')) || fallBackImage;
12
- const srcMobile = (getSrcSet.getImageSrc(srcSet?.mobile, 'mobile') ?? getSrcSet.getImageSrc(srcSet?.tablet, 'mobile') ?? getSrcSet.getImageSrc(srcSet?.desktop, 'mobile')) || fallBackImage;
13
- const imagePlaceholder = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=';
14
- return core.template`
15
- <picture style="border-radius: inherit" class="${core.cls(pictureClass)}">
16
- ${core.RenderIf(priority, core.template`
17
- ${srcMobile ? `<source media="(max-width: 767px)" srcset="${srcMobile}" />` : ``}
18
- ${srcTablet ? `<source media="(max-width: 1024px)" srcset="${srcTablet}" />` : ``}
19
- <img
20
- ${{
21
- ...props
22
- }}
23
- class="${core.cls(className)}"
24
- src="${srcDesktop}"
25
- alt="${alt}"
26
- fetchpriority="high"
27
- style="${{
28
- ...core.makeStyleResponsive('aspect', aspectRatio),
29
- ...core.makeStyleResponsive('objf', layout),
13
+ const AdaptiveImage = (props)=>{
14
+ const { alt, style, layout, srcSet, priority, className, aspectRatio, pageContext, pictureClass, borderRadius, enableLazyLoadImage = true, ...restProps } = props;
15
+ const { getDeviceSource } = data.getAdaptiveImageData(props);
16
+ const { srcDesktop, srcTablet, srcMobile } = getDeviceSource({
17
+ isLiquid: true
18
+ });
19
+ const loadingAttrs = system.createAttr(attributes.getLoadingAdaptiveImageAttrs({
20
+ srcDesktop,
21
+ enableLazyLoadImage
22
+ }));
23
+ const pictureStyle = system.createStyle({
24
+ ...styles.getAdaptivePictureStyles()
25
+ });
26
+ const adaptiveImageStyles = system.createStyle({
27
+ ...styles.getAdaptiveImageStyles({
28
+ layout,
29
+ aspectRatio,
30
+ borderRadius
31
+ }),
30
32
  ...style
31
- }}"
32
- />
33
- `, core.template`
34
- ${srcMobile ? `<source media="(max-width: 767px)" data-srcSet="${srcMobile}" srcset="${enableLazyLoadImage ? imagePlaceholder : srcMobile}" />` : ''}
35
- ${srcTablet ? `<source media="(max-width: 1024px)" data-srcSet="${srcTablet}" srcset="${enableLazyLoadImage ? imagePlaceholder : srcTablet}" />` : ''}
33
+ });
34
+ const adaptiveImageClasses = system.createClass({
35
+ ...classes.getAdaptiveImageClasses({
36
+ className,
37
+ hasLazyLoad: enableLazyLoadImage,
38
+ hasForceLoad: pageContext?.isOptimizePlan
39
+ })
40
+ });
41
+ const renderSource = ()=>{
42
+ return `
43
+ ${srcMobile ? `<source media="(max-width: 767px)" srcset="${enableLazyLoadImage ? constants.IMAGE_PLACEHOLDER : srcMobile}" />` : ``}
44
+ ${srcTablet ? `<source media="(max-width: 1024px)" srcset="${enableLazyLoadImage ? constants.IMAGE_PLACEHOLDER : srcTablet}" />` : ``}
45
+ `;
46
+ };
47
+ const renderImage = ()=>{
48
+ return `
36
49
  <img
37
50
  ${{
38
- ...props
39
- }}
40
- class="${core.cls(className, {
41
- gp_lazyload: enableLazyLoadImage,
42
- gp_force_load: pageContext?.isOptimizePlan
43
- })}"
44
- src="${enableLazyLoadImage ? imagePlaceholder : srcDesktop}"
45
- data-src="${srcDesktop}"
46
- width="100%"
51
+ ...restProps
52
+ }}
53
+ ${{
54
+ ...loadingAttrs
55
+ }}
47
56
  alt="${alt}"
48
- style="${{
49
- ...core.makeStyleResponsive('aspect', aspectRatio),
50
- ...core.makeStyleResponsive('objf', layout),
51
- ...style
52
- }}"
57
+ style="${adaptiveImageStyles}"
58
+ class="${adaptiveImageClasses}"
53
59
  />
54
- `)}
55
- </picture>`;
60
+ `;
61
+ };
62
+ return core.template`
63
+ <picture style="${pictureStyle}" class="${pictureClass}">
64
+ ${renderSource()}
65
+ ${renderImage()}
66
+ </picture>
67
+ `;
56
68
  };
57
69
 
58
70
  exports.default = AdaptiveImage;