@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
@@ -6,8 +6,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var core = require('@gem-sdk/core');
8
8
  var Image = require('../../image/components/Image.js');
9
- require('next/image');
10
- require('react');
11
9
 
12
10
  const CartLineImage = ({ className, style, setting = {}, styles = {}, builderProps })=>{
13
11
  const line = core.useCartLine();
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ var core = require('@gem-sdk/core');
4
+
5
+ const getCodeClasses = (uid, condition, cssClass)=>{
6
+ return core.composeClasses(core.cls(uid, {
7
+ 'gp-sr-only': condition
8
+ }, 'gp-cursor-pointer', cssClass));
9
+ };
10
+
11
+ exports.getCodeClasses = getCodeClasses;
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ var core = require('@gem-sdk/core');
4
+
5
+ const getCodeStyle = (style, setting, isLiquid)=>{
6
+ return {
7
+ ...style,
8
+ ...core.makeStyleResponsive('ta', setting?.align),
9
+ ...core.getStyleBackgroundByDevice(setting?.background, {
10
+ liquid: isLiquid
11
+ })
12
+ };
13
+ };
14
+
15
+ exports.getCodeStyle = getCodeStyle;
@@ -4,101 +4,17 @@
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
- var React = require('react');
8
- var core = require('@gem-sdk/core');
9
7
  var Head = require('next/head');
8
+ var useCSSCode = require('../hooks/useCSSCode.js');
9
+ var system = require('@gem-sdk/system');
10
+ var styles = require('../common/styles.js');
11
+ var classes = require('../common/classes.js');
10
12
 
11
- const EMPTY_TAGS = [
12
- 'SCRIPT'
13
- ];
14
- const ALLOWED_EMPTY_TAG = [
15
- 'EMBED',
16
- 'IMG',
17
- 'INPUT',
18
- 'PICTURE',
19
- 'VIDEO'
20
- ];
21
13
  const CSSCode = ({ setting, style, advanced, builderAttrs, builderProps, children })=>{
22
14
  const { editorData } = advanced;
23
- const mode = core.useEditorMode();
24
- const getEmptyContent = React.useCallback((css, javascript, html)=>{
25
- return `<p class="gp-text-center gp-text-sm gp-py-4 gp-leading-6 gp-text-light-500 gp-flex gp-flex-col gp-gap-[4px]">
26
- <span>${editorData?.customLabel || 'Custom Code'}</span>
27
- ${css || javascript || html ? '<span class="gp-text-[#676767] gp-text-12 gp-leading-5">Preview or Publish the page to see the content.</span>' : ``}</p>`;
28
- }, [
29
- editorData?.customLabel
30
- ]);
31
- const getHtmlContent = (html, javascript)=>{
32
- const $element = document.createElement('div');
33
- $element.innerHTML = html;
34
- const childrenRoot = $element.childNodes;
35
- let hasScript = false;
36
- let empty = true;
37
- if (childrenRoot.length > 0) {
38
- childrenRoot.forEach((child)=>{
39
- //@ts-expect-error
40
- if (EMPTY_TAGS.includes(child?.tagName)) {
41
- hasScript = true;
42
- child?.remove();
43
- }
44
- });
45
- const children = $element.childNodes;
46
- children.forEach((child)=>{
47
- //@ts-expect-error
48
- if (ALLOWED_EMPTY_TAG.includes(child?.tagName)) {
49
- empty = false;
50
- } else if (child?.nodeName !== '#comment') {
51
- const content = child?.textContent?.trim();
52
- if (content) {
53
- empty = false;
54
- }
55
- }
56
- });
57
- }
58
- if (empty) {
59
- empty = !$element?.textContent?.trim();
60
- }
61
- if (javascript) {
62
- hasScript = true;
63
- }
64
- return {
65
- empty,
66
- hasScript
67
- };
68
- };
69
- const htmlPlainText = React.useMemo(()=>{
70
- if (mode === 'edit') {
71
- const { empty, hasScript } = getHtmlContent(editorData?.html || '', editorData?.javascript || '');
72
- if (hasScript) {
73
- return `<p class="gp-text-center gp-text-sm gp-font-[sans-serif] gp-py-4 gp-leading-[21px] gp-text-[#676767] gp-bg-[#eee]">
74
- Publish the page to see the content.
75
- </p>`;
76
- }
77
- if (empty) {
78
- return getEmptyContent(editorData?.css || '', editorData?.javascript || '', editorData?.html || '');
79
- }
80
- return editorData?.html?.trim();
81
- }
82
- return editorData?.html?.trim();
83
- }, [
84
- editorData?.css,
85
- editorData?.html,
86
- editorData?.javascript,
87
- mode,
88
- getEmptyContent
89
- ]);
90
- const handleDoubleClickCustomCode = (e)=>{
91
- switch(e.detail){
92
- case 2:
93
- {
94
- const event = new CustomEvent('editor:toolbar:open-custom-code', {
95
- bubbles: true
96
- });
97
- window.dispatchEvent(event);
98
- break;
99
- }
100
- }
101
- };
15
+ const { handleDoubleClickCustomCode, htmlPlainText, mode } = useCSSCode.default(advanced);
16
+ const composeCodeStyle = system.createStyle(styles.getCodeStyle(style, setting, false));
17
+ const composeCodeClasses = system.createClass(classes.getCodeClasses(builderProps?.uid, mode !== 'edit' && !editorData?.html, advanced?.cssClass));
102
18
  return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
103
19
  children: [
104
20
  /*#__PURE__*/ jsxRuntime.jsx(Head, {
@@ -125,15 +41,9 @@ const CSSCode = ({ setting, style, advanced, builderAttrs, builderProps, childre
125
41
  /*#__PURE__*/ jsxRuntime.jsxs("div", {
126
42
  onClick: handleDoubleClickCustomCode,
127
43
  "aria-hidden": "true",
128
- style: {
129
- ...style,
130
- ...core.makeStyleResponsive('ta', setting?.align),
131
- ...core.getStyleBackgroundByDevice(setting?.background)
132
- },
44
+ style: composeCodeStyle,
133
45
  ...builderAttrs,
134
- className: core.cls(builderProps?.uid, {
135
- 'gp-sr-only': mode !== 'edit' && !editorData?.html
136
- }, 'gp-cursor-pointer'),
46
+ className: composeCodeClasses,
137
47
  children: [
138
48
  /*#__PURE__*/ jsxRuntime.jsx("div", {
139
49
  dangerouslySetInnerHTML: {
@@ -3,29 +3,29 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var core = require('@gem-sdk/core');
6
+ var styles = require('../common/styles.js');
7
+ var system = require('@gem-sdk/system');
8
+ var classes = require('../common/classes.js');
6
9
 
7
10
  const CSSCode = ({ setting, style, advanced, builderAttrs, builderProps })=>{
8
11
  const { background, preloadBgImage } = setting ?? {};
9
12
  const editorData = advanced?.editorData;
10
13
  const htmlPlainText = editorData?.html?.trim();
14
+ const composeCodeStyle = system.createStyle(styles.getCodeStyle(style, setting, true));
15
+ const composeCodeClasses = system.createClass(classes.getCodeClasses(builderProps?.uid, !editorData?.html && !background, advanced?.cssClass));
11
16
  return core.template`
12
17
  ${core.RenderIf(!!preloadBgImage, `${core.RenderIf(!!background?.desktop?.image?.src, `<link rel="preload" href="${background?.desktop?.image?.src}" as="image" />`)}${core.RenderIf(!!background?.tablet?.image?.src, `<link rel="preload" href="${background?.tablet?.image?.src}" as="image" />`)}${core.RenderIf(!!background?.mobile?.image?.src, `<link rel="preload" href="${background?.mobile?.image?.src}" as="image" />`)}`)}
13
18
  <div
14
19
  ${{
15
20
  ...builderAttrs
16
21
  }}
17
- style="${{
18
- ...style,
19
- ...core.getStyleBackgroundByDevice(background, {
20
- liquid: true
21
- }),
22
- ...core.makeStyleResponsive('ta', setting?.align)
23
- }}"
22
+ style="${composeCodeStyle}"
24
23
  data-keep-class="true"
25
- class="${core.cls(builderProps?.uid, {
26
- 'gp-sr-only': !editorData?.html && !background
27
- })} ${advanced?.cssClass}"
28
- ><div>${htmlPlainText}</div></div>
24
+ class="${composeCodeClasses}">
25
+ <div>
26
+ ${htmlPlainText}
27
+ </div>
28
+ </div>
29
29
  `;
30
30
  };
31
31
 
@@ -0,0 +1,102 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var core = require('@gem-sdk/core');
6
+ var React = require('react');
7
+
8
+ const EMPTY_TAGS = [
9
+ 'SCRIPT'
10
+ ];
11
+ const ALLOWED_EMPTY_TAG = [
12
+ 'EMBED',
13
+ 'IMG',
14
+ 'INPUT',
15
+ 'PICTURE',
16
+ 'VIDEO'
17
+ ];
18
+ const useCSSCode = (advanced)=>{
19
+ const mode = core.useEditorMode();
20
+ const { editorData } = advanced;
21
+ const getEmptyContent = React.useCallback((css, javascript, html)=>{
22
+ return `<p class="gp-text-center gp-text-sm gp-py-4 gp-leading-6 gp-text-light-500 gp-flex gp-flex-col gp-gap-[4px]">
23
+ <span>${editorData?.customLabel || 'Custom Code'}</span>
24
+ ${css || javascript || html ? '<span class="gp-text-[#676767] gp-text-12 gp-leading-5">Preview or Publish the page to see the content.</span>' : ``}</p>`;
25
+ }, [
26
+ editorData?.customLabel
27
+ ]);
28
+ const getHtmlContent = (html, javascript)=>{
29
+ const $element = document.createElement('div');
30
+ $element.innerHTML = html;
31
+ const childrenRoot = $element.childNodes;
32
+ let hasScript = false;
33
+ let empty = true;
34
+ if (childrenRoot.length > 0) {
35
+ childrenRoot.forEach((child)=>{
36
+ //@ts-expect-error
37
+ if (EMPTY_TAGS.includes(child?.tagName)) {
38
+ hasScript = true;
39
+ child?.remove();
40
+ }
41
+ });
42
+ const children = $element.childNodes;
43
+ children.forEach((child)=>{
44
+ //@ts-expect-error
45
+ if (ALLOWED_EMPTY_TAG.includes(child?.tagName)) {
46
+ empty = false;
47
+ } else if (child?.nodeName !== '#comment') {
48
+ const content = child?.textContent?.trim();
49
+ if (content) {
50
+ empty = false;
51
+ }
52
+ }
53
+ });
54
+ }
55
+ if (empty) {
56
+ empty = !$element?.textContent?.trim();
57
+ }
58
+ if (javascript) {
59
+ hasScript = true;
60
+ }
61
+ return {
62
+ empty,
63
+ hasScript
64
+ };
65
+ };
66
+ const htmlPlainText = React.useMemo(()=>{
67
+ if (mode === 'edit') {
68
+ const { empty, hasScript } = getHtmlContent(editorData?.html || '', editorData?.javascript || '');
69
+ if (hasScript) {
70
+ return `<p class="gp-text-center gp-text-sm gp-font-[sans-serif] gp-py-4 gp-leading-[21px] gp-text-[#676767] gp-bg-[#eee]">
71
+ Publish the page to see the content.
72
+ </p>`;
73
+ }
74
+ if (empty) {
75
+ return getEmptyContent(editorData?.css || '', editorData?.javascript || '', editorData?.html || '');
76
+ }
77
+ return editorData?.html?.trim();
78
+ }
79
+ return editorData?.html?.trim();
80
+ }, [
81
+ editorData?.css,
82
+ editorData?.html,
83
+ editorData?.javascript,
84
+ mode,
85
+ getEmptyContent
86
+ ]);
87
+ const handleDoubleClickCustomCode = (e)=>{
88
+ if (e.detail === 2) {
89
+ const event = new CustomEvent('editor:toolbar:open-custom-code', {
90
+ bubbles: true
91
+ });
92
+ window.dispatchEvent(event);
93
+ }
94
+ };
95
+ return {
96
+ mode,
97
+ htmlPlainText,
98
+ handleDoubleClickCustomCode
99
+ };
100
+ };
101
+
102
+ exports.default = useCSSCode;
@@ -2,6 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var setting = require('./config/setting.js');
6
+ var uiV1 = require('./config/uiV1.js');
7
+ var uiV2 = require('./config/uiV2.js');
8
+
5
9
  const config = {
6
10
  tag: 'CSSCode',
7
11
  label: 'Custom Code',
@@ -9,127 +13,9 @@ const config = {
9
13
  icon: `
10
14
  <svg width="40" viewBox="0 0 24 24"><path fill="currentColor" d="m24 12l-5.657 5.657l-1.414-1.414L21.172 12l-4.243-4.243l1.414-1.414L24 12zM2.828 12l4.243 4.243l-1.414 1.414L0 12l5.657-5.657L7.07 7.757L2.828 12zm6.96 9H7.66l6.552-18h2.128L9.788 21z"/></svg>
11
15
  `,
12
- settings: [
13
- {
14
- id: 'setting',
15
- controls: [
16
- {
17
- id: 'editorData',
18
- type: 'customCodeEditor'
19
- },
20
- {
21
- id: 'background',
22
- type: 'background',
23
- label: 'Background',
24
- devices: {
25
- desktop: {
26
- default: {
27
- type: 'color',
28
- color: 'transparent',
29
- image: {
30
- src: '',
31
- width: 0,
32
- height: 0
33
- },
34
- size: 'cover',
35
- position: {
36
- x: 50,
37
- y: 50
38
- },
39
- repeat: 'no-repeat',
40
- attachment: 'scroll'
41
- }
42
- }
43
- }
44
- },
45
- {
46
- id: 'align',
47
- label: 'Alignment',
48
- type: 'segment',
49
- options: [
50
- {
51
- label: 'Left',
52
- value: 'left',
53
- type: 'align'
54
- },
55
- {
56
- label: 'Center',
57
- value: 'center',
58
- type: 'align'
59
- },
60
- {
61
- label: 'Right',
62
- value: 'right',
63
- type: 'align'
64
- }
65
- ],
66
- devices: {
67
- desktop: {
68
- default: 'left'
69
- }
70
- }
71
- },
72
- {
73
- id: 'preloadBgImage',
74
- type: 'toggle',
75
- label: 'Preload',
76
- default: false
77
- }
78
- ]
79
- },
80
- {
81
- id: 'style',
82
- controls: []
83
- }
84
- ],
85
- ui: [
86
- {
87
- type: 'control',
88
- setting: {
89
- id: 'editorData'
90
- },
91
- layout: 'vertical'
92
- },
93
- {
94
- type: 'group',
95
- controls: [
96
- {
97
- type: 'control',
98
- setting: {
99
- id: 'background'
100
- },
101
- label: {
102
- en: 'Background'
103
- },
104
- layout: 'vertical',
105
- options: {
106
- styleLabel: {
107
- marginBottom: '4px'
108
- }
109
- }
110
- },
111
- {
112
- label: {
113
- en: 'Preload'
114
- },
115
- type: 'control',
116
- setting: {
117
- id: 'preloadBgImage'
118
- },
119
- condition: 'background.type == "image"'
120
- }
121
- ]
122
- },
123
- {
124
- type: 'control',
125
- label: {
126
- en: 'Align'
127
- },
128
- setting: {
129
- id: 'align'
130
- }
131
- }
132
- ],
16
+ settings: setting.SettingCode,
17
+ ui: uiV1.SettingUIV1,
18
+ uiV2: uiV2.SettingUIV2,
133
19
  editorConfigs: {
134
20
  sideBar: {
135
21
  tab: {
@@ -0,0 +1,77 @@
1
+ 'use strict';
2
+
3
+ const SettingCode = [
4
+ {
5
+ id: 'setting',
6
+ controls: [
7
+ {
8
+ id: 'editorData',
9
+ type: 'customCodeEditor'
10
+ },
11
+ {
12
+ id: 'background',
13
+ type: 'background',
14
+ label: 'Background',
15
+ devices: {
16
+ desktop: {
17
+ default: {
18
+ type: 'color',
19
+ color: 'transparent',
20
+ image: {
21
+ src: '',
22
+ width: 0,
23
+ height: 0
24
+ },
25
+ size: 'cover',
26
+ position: {
27
+ x: 50,
28
+ y: 50
29
+ },
30
+ repeat: 'no-repeat',
31
+ attachment: 'scroll'
32
+ }
33
+ }
34
+ }
35
+ },
36
+ {
37
+ id: 'align',
38
+ label: 'Alignment',
39
+ type: 'segment',
40
+ options: [
41
+ {
42
+ label: 'Left',
43
+ value: 'left',
44
+ type: 'align'
45
+ },
46
+ {
47
+ label: 'Center',
48
+ value: 'center',
49
+ type: 'align'
50
+ },
51
+ {
52
+ label: 'Right',
53
+ value: 'right',
54
+ type: 'align'
55
+ }
56
+ ],
57
+ devices: {
58
+ desktop: {
59
+ default: 'left'
60
+ }
61
+ }
62
+ },
63
+ {
64
+ id: 'preloadBgImage',
65
+ type: 'toggle',
66
+ label: 'Preload',
67
+ default: false
68
+ }
69
+ ]
70
+ },
71
+ {
72
+ id: 'style',
73
+ controls: []
74
+ }
75
+ ];
76
+
77
+ exports.SettingCode = SettingCode;
@@ -0,0 +1,52 @@
1
+ 'use strict';
2
+
3
+ const SettingUIV1 = [
4
+ {
5
+ type: 'control',
6
+ setting: {
7
+ id: 'editorData'
8
+ },
9
+ layout: 'vertical'
10
+ },
11
+ {
12
+ type: 'group',
13
+ controls: [
14
+ {
15
+ type: 'control',
16
+ setting: {
17
+ id: 'background'
18
+ },
19
+ label: {
20
+ en: 'Background'
21
+ },
22
+ layout: 'vertical',
23
+ options: {
24
+ styleLabel: {
25
+ marginBottom: '4px'
26
+ }
27
+ }
28
+ },
29
+ {
30
+ label: {
31
+ en: 'Preload'
32
+ },
33
+ type: 'control',
34
+ setting: {
35
+ id: 'preloadBgImage'
36
+ },
37
+ condition: 'background.type == "image"'
38
+ }
39
+ ]
40
+ },
41
+ {
42
+ type: 'control',
43
+ label: {
44
+ en: 'Align'
45
+ },
46
+ setting: {
47
+ id: 'align'
48
+ }
49
+ }
50
+ ];
51
+
52
+ exports.SettingUIV1 = SettingUIV1;
@@ -0,0 +1,58 @@
1
+ 'use strict';
2
+
3
+ const SettingUIV2 = [
4
+ {
5
+ controls: [
6
+ {
7
+ type: 'control',
8
+ setting: {
9
+ id: 'editorData'
10
+ },
11
+ layout: 'vertical'
12
+ }
13
+ ]
14
+ },
15
+ {
16
+ controls: [
17
+ {
18
+ type: 'control',
19
+ setting: {
20
+ id: 'background'
21
+ },
22
+ label: {
23
+ en: 'Background'
24
+ },
25
+ layout: 'vertical'
26
+ },
27
+ {
28
+ label: {
29
+ en: 'Preload'
30
+ },
31
+ type: 'control',
32
+ setting: {
33
+ id: 'preloadBgImage'
34
+ },
35
+ conditionDisplay: 'background.type == "image"'
36
+ }
37
+ ]
38
+ },
39
+ {
40
+ controls: [
41
+ {
42
+ label: {
43
+ en: 'Align'
44
+ },
45
+ type: 'control',
46
+ setting: {
47
+ id: 'align'
48
+ },
49
+ options: {
50
+ labelVariant: 'primary',
51
+ fullWidth: true
52
+ }
53
+ }
54
+ ]
55
+ }
56
+ ];
57
+
58
+ exports.SettingUIV2 = SettingUIV2;
@@ -8,13 +8,16 @@ var helpers = require('../../helpers.js');
8
8
  require('react/jsx-runtime');
9
9
  require('react');
10
10
  require('next/link');
11
- require('../../product/components/ProductVariants/variants/index.js');
12
11
  var Text_liquid = require('../../text/components/Text.liquid.js');
12
+ require('../../product/components/ProductVariants/variants/index.js');
13
+ require('../../product/components/ProductBundle/common/styles.js');
14
+ require('../../product/components/ProductBundle/common/classes.js');
13
15
  require('../../product/components/ProductBadge/constants.js');
14
16
  require('../../product/components/constants/product-bundle.js');
15
17
  require('../../product/components/ProductBadge/types.js');
16
18
  require('../../product/components/ProductBadge/utils/shape.js');
17
19
  require('../../accordion/setting/configs/settings.js');
20
+ require('../../accordion/components/common/classes.js');
18
21
  require('@gem-sdk/keen-slider/react');
19
22
  require('next/head');
20
23
  require('next/image');
@@ -6,9 +6,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var core = require('@gem-sdk/core');
8
8
  var ChildrenDroppable = require('../../../grid/components/ChildrenDroppable.js');
9
+ var composeStyles = require('./common/composeStyles.js');
10
+ var system = require('@gem-sdk/system');
9
11
 
10
- const ContactForm = ({ children })=>{
11
- return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
12
+ const ContactForm = ({ children, styles, setting })=>{
13
+ const containerStyle = system.createStyle(composeStyles.composeContainerStyles(setting, styles));
14
+ return /*#__PURE__*/ jsxRuntime.jsx("div", {
15
+ style: containerStyle,
12
16
  children: core.isEmptyChildren(children) ? /*#__PURE__*/ jsxRuntime.jsx(ChildrenDroppable.default, {}) : children
13
17
  });
14
18
  };