@anker-in/headless-ui 1.0.19 → 1.0.20-alpha.1761120380827

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 (615) hide show
  1. package/dist/cjs/biz-components/AccordionCards/index.js.map +2 -2
  2. package/dist/cjs/biz-components/AiuiProvider/index.d.ts +4 -0
  3. package/dist/cjs/biz-components/AiuiProvider/index.js +1 -1
  4. package/dist/cjs/biz-components/AiuiProvider/index.js.map +2 -2
  5. package/dist/cjs/biz-components/AplusDesc/index.d.ts +22 -0
  6. package/dist/cjs/biz-components/AplusDesc/index.js +2 -0
  7. package/dist/cjs/biz-components/AplusDesc/index.js.map +7 -0
  8. package/dist/cjs/biz-components/CollectionShelves/CollectionShelvesItem.d.ts +4 -0
  9. package/dist/cjs/biz-components/CollectionShelves/CollectionShelvesItem.js +2 -0
  10. package/dist/cjs/biz-components/CollectionShelves/CollectionShelvesItem.js.map +7 -0
  11. package/dist/cjs/biz-components/CollectionShelves/index.d.ts +6 -0
  12. package/dist/cjs/biz-components/CollectionShelves/index.js +2 -0
  13. package/dist/cjs/biz-components/CollectionShelves/index.js.map +7 -0
  14. package/dist/cjs/biz-components/CollectionsBanner/index.d.ts +7 -0
  15. package/dist/cjs/biz-components/CollectionsBanner/index.js +2 -0
  16. package/dist/cjs/biz-components/CollectionsBanner/index.js.map +7 -0
  17. package/dist/cjs/biz-components/CollectionsBanner/types.d.ts +43 -0
  18. package/dist/cjs/biz-components/CollectionsBanner/types.js +2 -0
  19. package/dist/cjs/biz-components/CollectionsBanner/types.js.map +7 -0
  20. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.d.ts +17 -0
  21. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.js +2 -0
  22. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.js.map +7 -0
  23. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrapItem.d.ts +10 -0
  24. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrapItem.js +2 -0
  25. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrapItem.js.map +7 -0
  26. package/dist/cjs/biz-components/CollectionsFilters/FilterHeader.d.ts +13 -0
  27. package/dist/cjs/biz-components/CollectionsFilters/FilterHeader.js +2 -0
  28. package/dist/cjs/biz-components/CollectionsFilters/FilterHeader.js.map +7 -0
  29. package/dist/cjs/biz-components/CollectionsFilters/FilterList.d.ts +14 -0
  30. package/dist/cjs/biz-components/CollectionsFilters/FilterList.js +2 -0
  31. package/dist/cjs/biz-components/CollectionsFilters/FilterList.js.map +7 -0
  32. package/dist/cjs/biz-components/CollectionsFilters/component/AnimatedUL.d.ts +5 -0
  33. package/dist/cjs/biz-components/CollectionsFilters/component/AnimatedUL.js +2 -0
  34. package/dist/cjs/biz-components/CollectionsFilters/component/AnimatedUL.js.map +7 -0
  35. package/dist/cjs/biz-components/CollectionsFilters/component/TabFilter.d.ts +12 -0
  36. package/dist/cjs/biz-components/CollectionsFilters/component/TabFilter.js +2 -0
  37. package/dist/cjs/biz-components/CollectionsFilters/component/TabFilter.js.map +7 -0
  38. package/dist/cjs/biz-components/CollectionsFilters/component/filtersFun.d.ts +12 -0
  39. package/dist/cjs/biz-components/CollectionsFilters/component/filtersFun.js +2 -0
  40. package/dist/cjs/biz-components/CollectionsFilters/component/filtersFun.js.map +7 -0
  41. package/dist/cjs/biz-components/CollectionsFilters/component/helper.d.ts +81 -0
  42. package/dist/cjs/biz-components/CollectionsFilters/component/helper.js +2 -0
  43. package/dist/cjs/biz-components/CollectionsFilters/component/helper.js.map +7 -0
  44. package/dist/cjs/biz-components/CollectionsFilters/component/price.d.ts +25 -0
  45. package/dist/cjs/biz-components/CollectionsFilters/component/price.js +2 -0
  46. package/dist/cjs/biz-components/CollectionsFilters/component/price.js.map +7 -0
  47. package/dist/cjs/biz-components/CollectionsFilters/component/priceProps.d.ts +215 -0
  48. package/dist/cjs/biz-components/CollectionsFilters/component/priceProps.js +2 -0
  49. package/dist/cjs/biz-components/CollectionsFilters/component/priceProps.js.map +7 -0
  50. package/dist/cjs/biz-components/CollectionsFilters/index.d.ts +22 -0
  51. package/dist/cjs/biz-components/CollectionsFilters/index.js +2 -0
  52. package/dist/cjs/biz-components/CollectionsFilters/index.js.map +7 -0
  53. package/dist/cjs/biz-components/DownLoad/index.d.ts +20 -0
  54. package/dist/cjs/biz-components/DownLoad/index.js +2 -0
  55. package/dist/cjs/biz-components/DownLoad/index.js.map +7 -0
  56. package/dist/cjs/biz-components/Faq/Faq.js +1 -1
  57. package/dist/cjs/biz-components/Faq/Faq.js.map +2 -2
  58. package/dist/cjs/biz-components/Features/index.d.ts +26 -0
  59. package/dist/cjs/biz-components/Features/index.js +2 -0
  60. package/dist/cjs/biz-components/Features/index.js.map +7 -0
  61. package/dist/cjs/biz-components/FootCharger/index.d.ts +12 -0
  62. package/dist/cjs/biz-components/FootCharger/index.js +2 -0
  63. package/dist/cjs/biz-components/FootCharger/index.js.map +7 -0
  64. package/dist/cjs/biz-components/FooterNavigation/index.js +1 -1
  65. package/dist/cjs/biz-components/FooterNavigation/index.js.map +3 -3
  66. package/dist/cjs/biz-components/FooterNavigation/types.d.ts +2 -1
  67. package/dist/cjs/biz-components/FooterNavigation/types.js +1 -1
  68. package/dist/cjs/biz-components/FooterNavigation/types.js.map +2 -2
  69. package/dist/cjs/biz-components/GiftBox/index.d.ts +17 -0
  70. package/dist/cjs/biz-components/GiftBox/index.js +2 -0
  71. package/dist/cjs/biz-components/GiftBox/index.js.map +7 -0
  72. package/dist/cjs/biz-components/Graphic/index.js +1 -1
  73. package/dist/cjs/biz-components/Graphic/index.js.map +2 -2
  74. package/dist/cjs/biz-components/GraphicMore/index.d.ts +22 -0
  75. package/dist/cjs/biz-components/GraphicMore/index.js +2 -0
  76. package/dist/cjs/biz-components/GraphicMore/index.js.map +7 -0
  77. package/dist/cjs/biz-components/HeaderNavigation/NavProvider.d.ts +6 -5
  78. package/dist/cjs/biz-components/HeaderNavigation/NavProvider.js +1 -1
  79. package/dist/cjs/biz-components/HeaderNavigation/NavProvider.js.map +3 -3
  80. package/dist/cjs/biz-components/HeaderNavigation/icons/Polygon.d.ts +3 -0
  81. package/dist/cjs/biz-components/HeaderNavigation/icons/Polygon.js +2 -0
  82. package/dist/cjs/biz-components/HeaderNavigation/icons/Polygon.js.map +7 -0
  83. package/dist/cjs/biz-components/HeaderNavigation/icons/index.d.ts +2 -1
  84. package/dist/cjs/biz-components/HeaderNavigation/icons/index.js +1 -1
  85. package/dist/cjs/biz-components/HeaderNavigation/icons/index.js.map +3 -3
  86. package/dist/cjs/biz-components/HeaderNavigation/index.js +1 -1
  87. package/dist/cjs/biz-components/HeaderNavigation/index.js.map +3 -3
  88. package/dist/cjs/biz-components/HeaderNavigation/types.d.ts +18 -2
  89. package/dist/cjs/biz-components/HeaderNavigation/types.js +1 -1
  90. package/dist/cjs/biz-components/HeaderNavigation/types.js.map +2 -2
  91. package/dist/cjs/biz-components/HeaderNavigation/withCategory.d.ts +1 -1
  92. package/dist/cjs/biz-components/HeaderNavigation/withCategory.js +1 -1
  93. package/dist/cjs/biz-components/HeaderNavigation/withCategory.js.map +3 -3
  94. package/dist/cjs/biz-components/Listing/ProductProvider.d.ts +52 -0
  95. package/dist/cjs/biz-components/Listing/ProductProvider.js +2 -0
  96. package/dist/cjs/biz-components/Listing/ProductProvider.js.map +7 -0
  97. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.d.ts +30 -0
  98. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js +2 -0
  99. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js.map +7 -0
  100. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +2 -0
  101. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +2 -0
  102. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +7 -0
  103. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +2 -0
  104. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +2 -0
  105. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +7 -0
  106. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +2 -0
  107. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +2 -0
  108. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +7 -0
  109. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +2 -0
  110. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js +2 -0
  111. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js.map +7 -0
  112. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/index.d.ts +2 -0
  113. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/index.js +2 -0
  114. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/index.js.map +7 -0
  115. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/types.d.ts +43 -0
  116. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/types.js +2 -0
  117. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/types.js.map +7 -0
  118. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.d.ts +2 -0
  119. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +2 -0
  120. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +7 -0
  121. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.d.ts +21 -0
  122. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js +2 -0
  123. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js.map +7 -0
  124. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.d.ts +5 -0
  125. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js +2 -0
  126. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js.map +7 -0
  127. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.d.ts +1 -0
  128. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js +2 -0
  129. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js.map +7 -0
  130. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +2 -0
  131. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js +2 -0
  132. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +7 -0
  133. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/types.d.ts +35 -0
  134. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/types.js +2 -0
  135. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/types.js.map +7 -0
  136. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGridBox.d.ts +6 -0
  137. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGridBox.js +2 -0
  138. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGridBox.js.map +7 -0
  139. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +3 -0
  140. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js +2 -0
  141. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +7 -0
  142. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/types.d.ts +2 -0
  143. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/types.js +2 -0
  144. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/types.js.map +7 -0
  145. package/dist/cjs/biz-components/Listing/components/ProductCard/index.d.ts +2 -0
  146. package/dist/cjs/biz-components/Listing/components/ProductCard/index.js +2 -0
  147. package/dist/cjs/biz-components/Listing/components/ProductCard/index.js.map +7 -0
  148. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.d.ts +2 -0
  149. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +2 -0
  150. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +7 -0
  151. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.d.ts +4 -0
  152. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js +2 -0
  153. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js.map +7 -0
  154. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.d.ts +10 -0
  155. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js +2 -0
  156. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js.map +7 -0
  157. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.d.ts +3 -0
  158. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js +2 -0
  159. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js.map +7 -0
  160. package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.d.ts +12 -0
  161. package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.js +2 -0
  162. package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.js.map +7 -0
  163. package/dist/cjs/biz-components/Listing/components/index.d.ts +3 -0
  164. package/dist/cjs/biz-components/Listing/components/index.js +2 -0
  165. package/dist/cjs/biz-components/Listing/components/index.js.map +7 -0
  166. package/dist/cjs/biz-components/Listing/const.d.ts +28 -0
  167. package/dist/cjs/biz-components/Listing/const.js +2 -0
  168. package/dist/cjs/biz-components/Listing/const.js.map +7 -0
  169. package/dist/cjs/biz-components/Listing/hooks/use-options.d.ts +3 -0
  170. package/dist/cjs/biz-components/Listing/hooks/use-options.js +2 -0
  171. package/dist/cjs/biz-components/Listing/hooks/use-options.js.map +7 -0
  172. package/dist/cjs/biz-components/Listing/hooks/use-variant-media.d.ts +14 -0
  173. package/dist/cjs/biz-components/Listing/hooks/use-variant-media.js +2 -0
  174. package/dist/cjs/biz-components/Listing/hooks/use-variant-media.js.map +7 -0
  175. package/dist/cjs/biz-components/Listing/hooks/use-variant.d.ts +5 -0
  176. package/dist/cjs/biz-components/Listing/hooks/use-variant.js +2 -0
  177. package/dist/cjs/biz-components/Listing/hooks/use-variant.js.map +7 -0
  178. package/dist/cjs/biz-components/Listing/hooks/useCopy.d.ts +8 -0
  179. package/dist/cjs/biz-components/Listing/hooks/useCopy.js +2 -0
  180. package/dist/cjs/biz-components/Listing/hooks/useCopy.js.map +7 -0
  181. package/dist/cjs/biz-components/Listing/index.d.ts +3 -0
  182. package/dist/cjs/biz-components/Listing/index.js +2 -0
  183. package/dist/cjs/biz-components/Listing/index.js.map +7 -0
  184. package/dist/cjs/biz-components/Listing/types/graphql.d.ts +7473 -0
  185. package/dist/cjs/biz-components/Listing/types/graphql.js +2 -0
  186. package/dist/cjs/biz-components/Listing/types/graphql.js.map +7 -0
  187. package/dist/cjs/biz-components/Listing/types/product.d.ts +141 -0
  188. package/dist/cjs/biz-components/Listing/types/product.js +2 -0
  189. package/dist/cjs/biz-components/Listing/types/product.js.map +7 -0
  190. package/dist/cjs/biz-components/Listing/types/productMetafields.d.js +2 -0
  191. package/dist/cjs/biz-components/Listing/types/productMetafields.d.js.map +7 -0
  192. package/dist/cjs/biz-components/Listing/types/type-helper.d.ts +5 -0
  193. package/dist/cjs/biz-components/Listing/types/type-helper.js +2 -0
  194. package/dist/cjs/biz-components/Listing/types/type-helper.js.map +7 -0
  195. package/dist/cjs/biz-components/Listing/types.d.ts +21 -0
  196. package/dist/cjs/biz-components/Listing/types.js +2 -0
  197. package/dist/cjs/biz-components/Listing/types.js.map +7 -0
  198. package/dist/cjs/biz-components/Listing/utils/helper.d.ts +21 -0
  199. package/dist/cjs/biz-components/Listing/utils/helper.js +2 -0
  200. package/dist/cjs/biz-components/Listing/utils/helper.js.map +7 -0
  201. package/dist/cjs/biz-components/Listing/utils/index.d.ts +37 -0
  202. package/dist/cjs/biz-components/Listing/utils/index.js +2 -0
  203. package/dist/cjs/biz-components/Listing/utils/index.js.map +7 -0
  204. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  205. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +2 -2
  206. package/dist/cjs/biz-components/NavigationSearch/index.d.ts +4 -0
  207. package/dist/cjs/biz-components/NavigationSearch/index.js +2 -0
  208. package/dist/cjs/biz-components/NavigationSearch/index.js.map +7 -0
  209. package/dist/cjs/biz-components/NavigationSearch/types.d.ts +18 -0
  210. package/dist/cjs/biz-components/NavigationSearch/types.js +2 -0
  211. package/dist/cjs/biz-components/NavigationSearch/types.js.map +7 -0
  212. package/dist/cjs/biz-components/Paginator/index.d.ts +7 -0
  213. package/dist/cjs/biz-components/Paginator/index.js +7 -0
  214. package/dist/cjs/biz-components/Paginator/index.js.map +7 -0
  215. package/dist/cjs/biz-components/SearchPage/index.d.ts +6 -0
  216. package/dist/cjs/biz-components/SearchPage/index.js +2 -0
  217. package/dist/cjs/biz-components/SearchPage/index.js.map +7 -0
  218. package/dist/cjs/biz-components/SearchPage/types.d.ts +58 -0
  219. package/dist/cjs/biz-components/SearchPage/types.js +2 -0
  220. package/dist/cjs/biz-components/SearchPage/types.js.map +7 -0
  221. package/dist/cjs/biz-components/SelectStore/index.d.ts +20 -0
  222. package/dist/cjs/biz-components/SelectStore/index.js +2 -0
  223. package/dist/cjs/biz-components/SelectStore/index.js.map +7 -0
  224. package/dist/cjs/biz-components/ShelfDisplay/index.js +1 -1
  225. package/dist/cjs/biz-components/ShelfDisplay/index.js.map +3 -3
  226. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.d.ts +11 -2
  227. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js +1 -1
  228. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js.map +3 -3
  229. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js +4 -4
  230. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
  231. package/dist/cjs/biz-components/Specs/dropdown.d.ts +11 -0
  232. package/dist/cjs/biz-components/Specs/dropdown.js +3 -0
  233. package/dist/cjs/biz-components/Specs/dropdown.js.map +7 -0
  234. package/dist/cjs/biz-components/Specs/index.d.ts +6 -0
  235. package/dist/cjs/biz-components/Specs/index.js +2 -0
  236. package/dist/cjs/biz-components/Specs/index.js.map +7 -0
  237. package/dist/cjs/biz-components/Subscribe/index.d.ts +7 -1
  238. package/dist/cjs/biz-components/Subscribe/index.js +10 -1
  239. package/dist/cjs/biz-components/Subscribe/index.js.map +3 -3
  240. package/dist/cjs/biz-components/Tabs/Tabs.js +1 -1
  241. package/dist/cjs/biz-components/Tabs/Tabs.js.map +2 -2
  242. package/dist/cjs/biz-components/TabsGroup/index.d.ts +7 -0
  243. package/dist/cjs/biz-components/TabsGroup/index.js +2 -0
  244. package/dist/cjs/biz-components/TabsGroup/index.js.map +7 -0
  245. package/dist/cjs/biz-components/TabsGroup/types.d.ts +16 -0
  246. package/dist/cjs/biz-components/TabsGroup/types.js +2 -0
  247. package/dist/cjs/biz-components/TabsGroup/types.js.map +7 -0
  248. package/dist/cjs/biz-components/TextMarquee/index.d.ts +9 -0
  249. package/dist/cjs/biz-components/TextMarquee/index.js +2 -0
  250. package/dist/cjs/biz-components/TextMarquee/index.js.map +7 -0
  251. package/dist/cjs/biz-components/Title/index.js +1 -1
  252. package/dist/cjs/biz-components/Title/index.js.map +3 -3
  253. package/dist/cjs/biz-components/Title/types.d.ts +4 -1
  254. package/dist/cjs/biz-components/Title/types.js +1 -1
  255. package/dist/cjs/biz-components/Title/types.js.map +1 -1
  256. package/dist/cjs/biz-components/index.d.ts +35 -0
  257. package/dist/cjs/biz-components/index.js +1 -1
  258. package/dist/cjs/biz-components/index.js.map +3 -3
  259. package/dist/cjs/components/breadcrumb.d.ts +12 -0
  260. package/dist/cjs/components/breadcrumb.js +2 -0
  261. package/dist/cjs/components/breadcrumb.js.map +7 -0
  262. package/dist/cjs/components/button.js +1 -1
  263. package/dist/cjs/components/button.js.map +2 -2
  264. package/dist/cjs/components/checkbox.js +1 -1
  265. package/dist/cjs/components/checkbox.js.map +3 -3
  266. package/dist/cjs/components/container.js +1 -1
  267. package/dist/cjs/components/container.js.map +2 -2
  268. package/dist/cjs/components/dialog.d.ts +3 -1
  269. package/dist/cjs/components/dialog.js +1 -1
  270. package/dist/cjs/components/dialog.js.map +3 -3
  271. package/dist/cjs/components/index.d.ts +2 -0
  272. package/dist/cjs/components/index.js +1 -1
  273. package/dist/cjs/components/index.js.map +3 -3
  274. package/dist/cjs/components/loadingDots.d.ts +6 -0
  275. package/dist/cjs/components/loadingDots.js +42 -0
  276. package/dist/cjs/components/loadingDots.js.map +7 -0
  277. package/dist/cjs/helpers/utils.d.ts +2 -0
  278. package/dist/cjs/helpers/utils.js +1 -1
  279. package/dist/cjs/helpers/utils.js.map +3 -3
  280. package/dist/cjs/hooks/useRollout.d.ts +1 -0
  281. package/dist/cjs/hooks/useRollout.js +2 -0
  282. package/dist/cjs/hooks/useRollout.js.map +7 -0
  283. package/dist/cjs/stories/aplusdesc.stories.d.ts +27 -0
  284. package/dist/cjs/stories/aplusdesc.stories.js +2 -0
  285. package/dist/cjs/stories/aplusdesc.stories.js.map +7 -0
  286. package/dist/cjs/stories/download.stories.d.ts +18 -0
  287. package/dist/cjs/stories/download.stories.js +2 -0
  288. package/dist/cjs/stories/download.stories.js.map +7 -0
  289. package/dist/cjs/stories/features.stories.d.ts +21 -0
  290. package/dist/cjs/stories/features.stories.js +2 -0
  291. package/dist/cjs/stories/features.stories.js.map +7 -0
  292. package/dist/cjs/stories/footcharger.stories.d.ts +19 -0
  293. package/dist/cjs/stories/footcharger.stories.js +2 -0
  294. package/dist/cjs/stories/footcharger.stories.js.map +7 -0
  295. package/dist/cjs/stories/giftbox.stories.d.ts +18 -0
  296. package/dist/cjs/stories/giftbox.stories.js +2 -0
  297. package/dist/cjs/stories/giftbox.stories.js.map +7 -0
  298. package/dist/cjs/stories/graphicMore.stories.d.ts +19 -0
  299. package/dist/cjs/stories/graphicMore.stories.js +2 -0
  300. package/dist/cjs/stories/graphicMore.stories.js.map +7 -0
  301. package/dist/cjs/stories/selectstore.stories.d.ts +18 -0
  302. package/dist/cjs/stories/selectstore.stories.js +2 -0
  303. package/dist/cjs/stories/selectstore.stories.js.map +7 -0
  304. package/dist/cjs/stories/shelfDisplay.stories.js +644 -1
  305. package/dist/cjs/stories/shelfDisplay.stories.js.map +2 -2
  306. package/dist/cjs/stories/tabs.stories.js +1 -1
  307. package/dist/cjs/stories/tabs.stories.js.map +3 -3
  308. package/dist/esm/biz-components/AccordionCards/index.js.map +2 -2
  309. package/dist/esm/biz-components/AiuiProvider/index.d.ts +4 -0
  310. package/dist/esm/biz-components/AiuiProvider/index.js +1 -1
  311. package/dist/esm/biz-components/AiuiProvider/index.js.map +2 -2
  312. package/dist/esm/biz-components/AplusDesc/index.d.ts +22 -0
  313. package/dist/esm/biz-components/AplusDesc/index.js +2 -0
  314. package/dist/esm/biz-components/AplusDesc/index.js.map +7 -0
  315. package/dist/esm/biz-components/CollectionShelves/CollectionShelvesItem.d.ts +4 -0
  316. package/dist/esm/biz-components/CollectionShelves/CollectionShelvesItem.js +2 -0
  317. package/dist/esm/biz-components/CollectionShelves/CollectionShelvesItem.js.map +7 -0
  318. package/dist/esm/biz-components/CollectionShelves/index.d.ts +6 -0
  319. package/dist/esm/biz-components/CollectionShelves/index.js +2 -0
  320. package/dist/esm/biz-components/CollectionShelves/index.js.map +7 -0
  321. package/dist/esm/biz-components/CollectionsBanner/index.d.ts +7 -0
  322. package/dist/esm/biz-components/CollectionsBanner/index.js +2 -0
  323. package/dist/esm/biz-components/CollectionsBanner/index.js.map +7 -0
  324. package/dist/esm/biz-components/CollectionsBanner/types.d.ts +43 -0
  325. package/dist/esm/biz-components/CollectionsBanner/types.js +1 -0
  326. package/dist/esm/biz-components/CollectionsBanner/types.js.map +7 -0
  327. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.d.ts +17 -0
  328. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.js +2 -0
  329. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.js.map +7 -0
  330. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrapItem.d.ts +10 -0
  331. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrapItem.js +2 -0
  332. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrapItem.js.map +7 -0
  333. package/dist/esm/biz-components/CollectionsFilters/FilterHeader.d.ts +13 -0
  334. package/dist/esm/biz-components/CollectionsFilters/FilterHeader.js +2 -0
  335. package/dist/esm/biz-components/CollectionsFilters/FilterHeader.js.map +7 -0
  336. package/dist/esm/biz-components/CollectionsFilters/FilterList.d.ts +14 -0
  337. package/dist/esm/biz-components/CollectionsFilters/FilterList.js +2 -0
  338. package/dist/esm/biz-components/CollectionsFilters/FilterList.js.map +7 -0
  339. package/dist/esm/biz-components/CollectionsFilters/component/AnimatedUL.d.ts +5 -0
  340. package/dist/esm/biz-components/CollectionsFilters/component/AnimatedUL.js +2 -0
  341. package/dist/esm/biz-components/CollectionsFilters/component/AnimatedUL.js.map +7 -0
  342. package/dist/esm/biz-components/CollectionsFilters/component/TabFilter.d.ts +12 -0
  343. package/dist/esm/biz-components/CollectionsFilters/component/TabFilter.js +2 -0
  344. package/dist/esm/biz-components/CollectionsFilters/component/TabFilter.js.map +7 -0
  345. package/dist/esm/biz-components/CollectionsFilters/component/filtersFun.d.ts +12 -0
  346. package/dist/esm/biz-components/CollectionsFilters/component/filtersFun.js +2 -0
  347. package/dist/esm/biz-components/CollectionsFilters/component/filtersFun.js.map +7 -0
  348. package/dist/esm/biz-components/CollectionsFilters/component/helper.d.ts +81 -0
  349. package/dist/esm/biz-components/CollectionsFilters/component/helper.js +2 -0
  350. package/dist/esm/biz-components/CollectionsFilters/component/helper.js.map +7 -0
  351. package/dist/esm/biz-components/CollectionsFilters/component/price.d.ts +25 -0
  352. package/dist/esm/biz-components/CollectionsFilters/component/price.js +2 -0
  353. package/dist/esm/biz-components/CollectionsFilters/component/price.js.map +7 -0
  354. package/dist/esm/biz-components/CollectionsFilters/component/priceProps.d.ts +215 -0
  355. package/dist/esm/biz-components/CollectionsFilters/component/priceProps.js +2 -0
  356. package/dist/esm/biz-components/CollectionsFilters/component/priceProps.js.map +7 -0
  357. package/dist/esm/biz-components/CollectionsFilters/index.d.ts +22 -0
  358. package/dist/esm/biz-components/CollectionsFilters/index.js +2 -0
  359. package/dist/esm/biz-components/CollectionsFilters/index.js.map +7 -0
  360. package/dist/esm/biz-components/DownLoad/index.d.ts +20 -0
  361. package/dist/esm/biz-components/DownLoad/index.js +2 -0
  362. package/dist/esm/biz-components/DownLoad/index.js.map +7 -0
  363. package/dist/esm/biz-components/Faq/Faq.js +1 -1
  364. package/dist/esm/biz-components/Faq/Faq.js.map +3 -3
  365. package/dist/esm/biz-components/Features/index.d.ts +26 -0
  366. package/dist/esm/biz-components/Features/index.js +2 -0
  367. package/dist/esm/biz-components/Features/index.js.map +7 -0
  368. package/dist/esm/biz-components/FootCharger/index.d.ts +12 -0
  369. package/dist/esm/biz-components/FootCharger/index.js +2 -0
  370. package/dist/esm/biz-components/FootCharger/index.js.map +7 -0
  371. package/dist/esm/biz-components/FooterNavigation/index.js +1 -1
  372. package/dist/esm/biz-components/FooterNavigation/index.js.map +3 -3
  373. package/dist/esm/biz-components/FooterNavigation/types.d.ts +2 -1
  374. package/dist/esm/biz-components/FooterNavigation/types.js +1 -1
  375. package/dist/esm/biz-components/FooterNavigation/types.js.map +2 -2
  376. package/dist/esm/biz-components/GiftBox/index.d.ts +17 -0
  377. package/dist/esm/biz-components/GiftBox/index.js +2 -0
  378. package/dist/esm/biz-components/GiftBox/index.js.map +7 -0
  379. package/dist/esm/biz-components/Graphic/index.js +1 -1
  380. package/dist/esm/biz-components/Graphic/index.js.map +2 -2
  381. package/dist/esm/biz-components/GraphicMore/index.d.ts +22 -0
  382. package/dist/esm/biz-components/GraphicMore/index.js +2 -0
  383. package/dist/esm/biz-components/GraphicMore/index.js.map +7 -0
  384. package/dist/esm/biz-components/HeaderNavigation/NavProvider.d.ts +6 -5
  385. package/dist/esm/biz-components/HeaderNavigation/NavProvider.js +1 -1
  386. package/dist/esm/biz-components/HeaderNavigation/NavProvider.js.map +3 -3
  387. package/dist/esm/biz-components/HeaderNavigation/icons/Polygon.d.ts +3 -0
  388. package/dist/esm/biz-components/HeaderNavigation/icons/Polygon.js +2 -0
  389. package/dist/esm/biz-components/HeaderNavigation/icons/Polygon.js.map +7 -0
  390. package/dist/esm/biz-components/HeaderNavigation/icons/index.d.ts +2 -1
  391. package/dist/esm/biz-components/HeaderNavigation/icons/index.js +1 -1
  392. package/dist/esm/biz-components/HeaderNavigation/icons/index.js.map +3 -3
  393. package/dist/esm/biz-components/HeaderNavigation/index.js +1 -1
  394. package/dist/esm/biz-components/HeaderNavigation/index.js.map +3 -3
  395. package/dist/esm/biz-components/HeaderNavigation/types.d.ts +18 -2
  396. package/dist/esm/biz-components/HeaderNavigation/types.js +1 -1
  397. package/dist/esm/biz-components/HeaderNavigation/types.js.map +2 -2
  398. package/dist/esm/biz-components/HeaderNavigation/withCategory.d.ts +1 -1
  399. package/dist/esm/biz-components/HeaderNavigation/withCategory.js +1 -1
  400. package/dist/esm/biz-components/HeaderNavigation/withCategory.js.map +3 -3
  401. package/dist/esm/biz-components/Listing/ProductProvider.d.ts +52 -0
  402. package/dist/esm/biz-components/Listing/ProductProvider.js +2 -0
  403. package/dist/esm/biz-components/Listing/ProductProvider.js.map +7 -0
  404. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.d.ts +30 -0
  405. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js +2 -0
  406. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js.map +7 -0
  407. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +2 -0
  408. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +2 -0
  409. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +7 -0
  410. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +2 -0
  411. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +2 -0
  412. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +7 -0
  413. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +2 -0
  414. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +2 -0
  415. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +7 -0
  416. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +2 -0
  417. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js +2 -0
  418. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js.map +7 -0
  419. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/index.d.ts +2 -0
  420. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/index.js +2 -0
  421. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/index.js.map +7 -0
  422. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/types.d.ts +43 -0
  423. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/types.js +2 -0
  424. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/types.js.map +7 -0
  425. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.d.ts +2 -0
  426. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +2 -0
  427. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +7 -0
  428. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.d.ts +21 -0
  429. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js +2 -0
  430. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js.map +7 -0
  431. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.d.ts +5 -0
  432. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js +2 -0
  433. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js.map +7 -0
  434. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.d.ts +1 -0
  435. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js +2 -0
  436. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js.map +7 -0
  437. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +2 -0
  438. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js +2 -0
  439. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +7 -0
  440. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/types.d.ts +35 -0
  441. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/types.js +2 -0
  442. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/types.js.map +7 -0
  443. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGridBox.d.ts +6 -0
  444. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGridBox.js +2 -0
  445. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGridBox.js.map +7 -0
  446. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +3 -0
  447. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js +2 -0
  448. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +7 -0
  449. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/types.d.ts +2 -0
  450. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/types.js +1 -0
  451. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/types.js.map +7 -0
  452. package/dist/esm/biz-components/Listing/components/ProductCard/index.d.ts +2 -0
  453. package/dist/esm/biz-components/Listing/components/ProductCard/index.js +2 -0
  454. package/dist/esm/biz-components/Listing/components/ProductCard/index.js.map +7 -0
  455. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.d.ts +2 -0
  456. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +2 -0
  457. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +7 -0
  458. package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.d.ts +4 -0
  459. package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js +2 -0
  460. package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js.map +7 -0
  461. package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.d.ts +10 -0
  462. package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js +1 -0
  463. package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js.map +7 -0
  464. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.d.ts +3 -0
  465. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js +2 -0
  466. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js.map +7 -0
  467. package/dist/esm/biz-components/Listing/components/PurchaseBar/types.d.ts +12 -0
  468. package/dist/esm/biz-components/Listing/components/PurchaseBar/types.js +1 -0
  469. package/dist/esm/biz-components/Listing/components/PurchaseBar/types.js.map +7 -0
  470. package/dist/esm/biz-components/Listing/components/index.d.ts +3 -0
  471. package/dist/esm/biz-components/Listing/components/index.js +2 -0
  472. package/dist/esm/biz-components/Listing/components/index.js.map +7 -0
  473. package/dist/esm/biz-components/Listing/const.d.ts +28 -0
  474. package/dist/esm/biz-components/Listing/const.js +2 -0
  475. package/dist/esm/biz-components/Listing/const.js.map +7 -0
  476. package/dist/esm/biz-components/Listing/hooks/use-options.d.ts +3 -0
  477. package/dist/esm/biz-components/Listing/hooks/use-options.js +2 -0
  478. package/dist/esm/biz-components/Listing/hooks/use-options.js.map +7 -0
  479. package/dist/esm/biz-components/Listing/hooks/use-variant-media.d.ts +14 -0
  480. package/dist/esm/biz-components/Listing/hooks/use-variant-media.js +2 -0
  481. package/dist/esm/biz-components/Listing/hooks/use-variant-media.js.map +7 -0
  482. package/dist/esm/biz-components/Listing/hooks/use-variant.d.ts +5 -0
  483. package/dist/esm/biz-components/Listing/hooks/use-variant.js +2 -0
  484. package/dist/esm/biz-components/Listing/hooks/use-variant.js.map +7 -0
  485. package/dist/esm/biz-components/Listing/hooks/useCopy.d.ts +8 -0
  486. package/dist/esm/biz-components/Listing/hooks/useCopy.js +2 -0
  487. package/dist/esm/biz-components/Listing/hooks/useCopy.js.map +7 -0
  488. package/dist/esm/biz-components/Listing/index.d.ts +3 -0
  489. package/dist/esm/biz-components/Listing/index.js +2 -0
  490. package/dist/esm/biz-components/Listing/index.js.map +7 -0
  491. package/dist/esm/biz-components/Listing/types/graphql.d.ts +7473 -0
  492. package/dist/esm/biz-components/Listing/types/graphql.js +2 -0
  493. package/dist/esm/biz-components/Listing/types/graphql.js.map +7 -0
  494. package/dist/esm/biz-components/Listing/types/product.d.ts +141 -0
  495. package/dist/esm/biz-components/Listing/types/product.js +2 -0
  496. package/dist/esm/biz-components/Listing/types/product.js.map +7 -0
  497. package/dist/esm/biz-components/Listing/types/productMetafields.d.js +2 -0
  498. package/dist/esm/biz-components/Listing/types/productMetafields.d.js.map +7 -0
  499. package/dist/esm/biz-components/Listing/types/type-helper.d.ts +5 -0
  500. package/dist/esm/biz-components/Listing/types/type-helper.js +1 -0
  501. package/dist/esm/biz-components/Listing/types/type-helper.js.map +7 -0
  502. package/dist/esm/biz-components/Listing/types.d.ts +21 -0
  503. package/dist/esm/biz-components/Listing/types.js +1 -0
  504. package/dist/esm/biz-components/Listing/types.js.map +7 -0
  505. package/dist/esm/biz-components/Listing/utils/helper.d.ts +21 -0
  506. package/dist/esm/biz-components/Listing/utils/helper.js +2 -0
  507. package/dist/esm/biz-components/Listing/utils/helper.js.map +7 -0
  508. package/dist/esm/biz-components/Listing/utils/index.d.ts +37 -0
  509. package/dist/esm/biz-components/Listing/utils/index.js +2 -0
  510. package/dist/esm/biz-components/Listing/utils/index.js.map +7 -0
  511. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  512. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +2 -2
  513. package/dist/esm/biz-components/NavigationSearch/index.d.ts +4 -0
  514. package/dist/esm/biz-components/NavigationSearch/index.js +2 -0
  515. package/dist/esm/biz-components/NavigationSearch/index.js.map +7 -0
  516. package/dist/esm/biz-components/NavigationSearch/types.d.ts +18 -0
  517. package/dist/esm/biz-components/NavigationSearch/types.js +2 -0
  518. package/dist/esm/biz-components/NavigationSearch/types.js.map +7 -0
  519. package/dist/esm/biz-components/Paginator/index.d.ts +7 -0
  520. package/dist/esm/biz-components/Paginator/index.js +7 -0
  521. package/dist/esm/biz-components/Paginator/index.js.map +7 -0
  522. package/dist/esm/biz-components/SearchPage/index.d.ts +6 -0
  523. package/dist/esm/biz-components/SearchPage/index.js +2 -0
  524. package/dist/esm/biz-components/SearchPage/index.js.map +7 -0
  525. package/dist/esm/biz-components/SearchPage/types.d.ts +58 -0
  526. package/dist/esm/biz-components/SearchPage/types.js +2 -0
  527. package/dist/esm/biz-components/SearchPage/types.js.map +7 -0
  528. package/dist/esm/biz-components/SelectStore/index.d.ts +20 -0
  529. package/dist/esm/biz-components/SelectStore/index.js +2 -0
  530. package/dist/esm/biz-components/SelectStore/index.js.map +7 -0
  531. package/dist/esm/biz-components/ShelfDisplay/index.js +1 -1
  532. package/dist/esm/biz-components/ShelfDisplay/index.js.map +3 -3
  533. package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.d.ts +11 -2
  534. package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js +1 -1
  535. package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js.map +3 -3
  536. package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js +9 -9
  537. package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
  538. package/dist/esm/biz-components/Specs/dropdown.d.ts +11 -0
  539. package/dist/esm/biz-components/Specs/dropdown.js +3 -0
  540. package/dist/esm/biz-components/Specs/dropdown.js.map +7 -0
  541. package/dist/esm/biz-components/Specs/index.d.ts +6 -0
  542. package/dist/esm/biz-components/Specs/index.js +2 -0
  543. package/dist/esm/biz-components/Specs/index.js.map +7 -0
  544. package/dist/esm/biz-components/Subscribe/index.d.ts +7 -1
  545. package/dist/esm/biz-components/Subscribe/index.js +10 -1
  546. package/dist/esm/biz-components/Subscribe/index.js.map +3 -3
  547. package/dist/esm/biz-components/Tabs/Tabs.js +1 -1
  548. package/dist/esm/biz-components/Tabs/Tabs.js.map +2 -2
  549. package/dist/esm/biz-components/TabsGroup/index.d.ts +7 -0
  550. package/dist/esm/biz-components/TabsGroup/index.js +2 -0
  551. package/dist/esm/biz-components/TabsGroup/index.js.map +7 -0
  552. package/dist/esm/biz-components/TabsGroup/types.d.ts +16 -0
  553. package/dist/esm/biz-components/TabsGroup/types.js +1 -0
  554. package/dist/esm/biz-components/TabsGroup/types.js.map +7 -0
  555. package/dist/esm/biz-components/TextMarquee/index.d.ts +9 -0
  556. package/dist/esm/biz-components/TextMarquee/index.js +2 -0
  557. package/dist/esm/biz-components/TextMarquee/index.js.map +7 -0
  558. package/dist/esm/biz-components/Title/index.js +1 -1
  559. package/dist/esm/biz-components/Title/index.js.map +3 -3
  560. package/dist/esm/biz-components/Title/types.d.ts +4 -1
  561. package/dist/esm/biz-components/index.d.ts +35 -0
  562. package/dist/esm/biz-components/index.js +1 -1
  563. package/dist/esm/biz-components/index.js.map +3 -3
  564. package/dist/esm/components/breadcrumb.d.ts +12 -0
  565. package/dist/esm/components/breadcrumb.js +2 -0
  566. package/dist/esm/components/breadcrumb.js.map +7 -0
  567. package/dist/esm/components/button.js +1 -1
  568. package/dist/esm/components/button.js.map +2 -2
  569. package/dist/esm/components/checkbox.js +1 -1
  570. package/dist/esm/components/checkbox.js.map +3 -3
  571. package/dist/esm/components/container.js +1 -1
  572. package/dist/esm/components/container.js.map +2 -2
  573. package/dist/esm/components/dialog.d.ts +3 -1
  574. package/dist/esm/components/dialog.js +1 -1
  575. package/dist/esm/components/dialog.js.map +3 -3
  576. package/dist/esm/components/index.d.ts +2 -0
  577. package/dist/esm/components/index.js +1 -1
  578. package/dist/esm/components/index.js.map +2 -2
  579. package/dist/esm/components/loadingDots.d.ts +6 -0
  580. package/dist/esm/components/loadingDots.js +42 -0
  581. package/dist/esm/components/loadingDots.js.map +7 -0
  582. package/dist/esm/helpers/utils.d.ts +2 -0
  583. package/dist/esm/helpers/utils.js +1 -1
  584. package/dist/esm/helpers/utils.js.map +3 -3
  585. package/dist/esm/hooks/useRollout.d.ts +1 -0
  586. package/dist/esm/hooks/useRollout.js +2 -0
  587. package/dist/esm/hooks/useRollout.js.map +7 -0
  588. package/dist/esm/stories/aplusdesc.stories.d.ts +27 -0
  589. package/dist/esm/stories/aplusdesc.stories.js +2 -0
  590. package/dist/esm/stories/aplusdesc.stories.js.map +7 -0
  591. package/dist/esm/stories/download.stories.d.ts +18 -0
  592. package/dist/esm/stories/download.stories.js +2 -0
  593. package/dist/esm/stories/download.stories.js.map +7 -0
  594. package/dist/esm/stories/features.stories.d.ts +21 -0
  595. package/dist/esm/stories/features.stories.js +2 -0
  596. package/dist/esm/stories/features.stories.js.map +7 -0
  597. package/dist/esm/stories/footcharger.stories.d.ts +19 -0
  598. package/dist/esm/stories/footcharger.stories.js +2 -0
  599. package/dist/esm/stories/footcharger.stories.js.map +7 -0
  600. package/dist/esm/stories/giftbox.stories.d.ts +18 -0
  601. package/dist/esm/stories/giftbox.stories.js +2 -0
  602. package/dist/esm/stories/giftbox.stories.js.map +7 -0
  603. package/dist/esm/stories/graphicMore.stories.d.ts +19 -0
  604. package/dist/esm/stories/graphicMore.stories.js +2 -0
  605. package/dist/esm/stories/graphicMore.stories.js.map +7 -0
  606. package/dist/esm/stories/selectstore.stories.d.ts +18 -0
  607. package/dist/esm/stories/selectstore.stories.js +2 -0
  608. package/dist/esm/stories/selectstore.stories.js.map +7 -0
  609. package/dist/esm/stories/shelfDisplay.stories.js +644 -1
  610. package/dist/esm/stories/shelfDisplay.stories.js.map +2 -2
  611. package/dist/esm/stories/tabs.stories.js +1 -1
  612. package/dist/esm/stories/tabs.stories.js.map +3 -3
  613. package/dist/tokens/base.css +1 -1
  614. package/package.json +1 -1
  615. package/style.css +32 -2
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/ShelfDisplay/shelfDisplay.ts"],
4
- "sourcesContent": ["import type { ContainerProps } from '../../types/props.js'\n/* eslint-disable no-useless-escape */\nexport const PRICE_SYMBOL = {\n us: '$',\n uk: '\u00A3',\n ca: '$',\n eu: '\u20AC',\n fr: '\u20AC',\n de: '\u20AC',\n vn: '\u20AB',\n cl: '$',\n sg: '$',\n ae: 'AED',\n} as any\n\nexport const languageTerritory = (locale: string) =>\n // https://unicode-org.github.io/cldr-staging/charts/37/supplemental/language_territory_information.html\n ({\n us: 'en-us',\n uk: 'en-gb',\n ca: 'en-ca',\n au: 'en-au',\n eu: 'en',\n fr: 'de-DE',\n 'eu-es': 'de-DE',\n 'eu-fr': 'de-DE',\n 'eu-it': 'de-DE',\n 'eu-de': 'de-DE',\n 'eu-en': 'en-US',\n 'cz-en': 'de-DE',\n nl: 'de-DE',\n de: 'de-DE',\n vn: 'vi-vn',\n sg: 'en-sg',\n 'ae-en': 'ae-en',\n plus: 'en-us',\n cl: 'es-cl',\n dk: 'en-dk',\n fi: 'en-fi',\n no: 'en-no',\n is: 'en-is',\n se: 'en-se',\n })[locale] || ''\n\nexport function formatPrice({\n amount,\n currencyCode,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros = false,\n}: {\n amount: number\n currencyCode: string\n locale: string\n maximumFractionDigits?: number\n minimumFractionDigits?: number\n removeTrailingZeros?: boolean\n}) {\n const formatCurrency = new Intl.NumberFormat(languageTerritory(locale), {\n style: 'currency',\n currency: currencyCode || 'USD',\n minimumFractionDigits: maximumFractionDigits === 0 ? 0 : minimumFractionDigits,\n maximumFractionDigits,\n })\n\n let formattedValue = formatCurrency.format(amount)\n\n if (['eu-de', 'eu-en', 'de', 'eu'].includes(locale)) {\n formattedValue = formattedValue?.toString()?.replace(/[\\s]/g, '')\n }\n\n if (removeTrailingZeros) {\n // Adjust the regex to match comma as decimal separator\n formattedValue = formattedValue\n .replace(/(\\.\\d*?[1-9])0+\\b/, '$1')\n .replace(/\\.0+\\b/, '')\n .replace(/(\\,\\d*?[1-9])0+\\b/, '$1')\n .replace(/\\,0+\\b/, '')\n }\n\n return formattedValue\n}\n\nexport function formatVariantPrice({\n amount,\n baseAmount,\n currencyCode,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros,\n}: {\n baseAmount: number\n amount: number\n currencyCode: string\n locale: string\n maximumFractionDigits?: number\n minimumFractionDigits?: number\n removeTrailingZeros?: boolean\n}) {\n if (typeof Intl === 'undefined') {\n return {\n price: `${PRICE_SYMBOL[locale]}${amount}`,\n basePrice: `${PRICE_SYMBOL[locale]}${baseAmount}`,\n discount: `${PRICE_SYMBOL[locale]}${baseAmount - amount || 0}`,\n }\n }\n\n const hasDiscount = baseAmount > amount\n const formatDiscount = new Intl.NumberFormat(languageTerritory(locale), {\n style: 'percent',\n })\n const discount = hasDiscount ? formatDiscount.format((baseAmount - amount) / baseAmount) : null\n\n const price = formatPrice({ amount, currencyCode, locale, removeTrailingZeros })\n const basePrice = hasDiscount\n ? formatPrice({\n amount: baseAmount,\n currencyCode,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros,\n })\n : undefined\n\n return { price, basePrice, discount }\n}\n\ntype EventType = {\n primaryButton?: (v: any, index: number, data: ShelfDisplayType) => void\n secondaryButton?: (v: any, index: number, data: ShelfDisplayType) => void\n}\n\nexport interface ShelfDisplayItem {\n id?: string\n /** \u4EA7\u54C1\u56FE\u7247*/\n img?: {\n url: string\n }\n handle?: string\n sku?: string\n /** \u6298\u6263\u540E\u4EF7\u683C*/\n price?: string\n title?: string\n /** \u6298\u6263\u524D\u4EF7\u683C*/\n basePrice?: string\n subTitle?: string\n /** \u6807\u7B7E*/\n tagItems?: string[]\n tab?: string\n data?: ShelfDisplayItem[]\n custom_name?: string\n custom_description?: string\n}\n\nexport type ShelfDisplayType = {\n title?: string\n isShowTab?: boolean\n isShowTag?: boolean\n isShowRecommendedCard?: boolean\n isShowOriginalPrice?: boolean\n direction?: 'horizontal' | 'vertical'\n align?: 'left' | 'center' | 'right'\n productsTab?: any[]\n productsCard?: any[]\n /** \u5361\u7247\u5F62\u72B6 */\n itemShape?: 'round' | 'square'\n /** \u6309\u94AE\u5F62\u72B6 */\n shape?: 'round' | 'square'\n /** \u6807\u7B7E\u9875\u5F62\u72B6*/\n tabShape?: 'rounded' | 'square'\n /** \u4E3B\u6309\u94AE\u914D\u7F6E */\n primaryButton?: string\n primaryFun?: 'AddCart' | 'BuyNow' | 'LearnMore'\n /** \u526F\u6309\u94AE\u914D\u7F6E */\n secondaryButton?: string\n secondaryFun?: 'AddCart' | 'BuyNow' | 'LearnMore'\n theme?: 'light' | 'dark'\n containerProps?: ContainerProps\n}\n\nexport interface ShelfDisplayProps {\n data: ShelfDisplayType\n buildData?: {\n categories: any[]\n products: any[]\n }\n recommendedData?: any[]\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: EventType\n className?: string\n key?: string\n target?: '_self' | '_blank'\n breakpoints?: {\n [key: number]: {\n spaceBetween: number\n freeMode: boolean\n slidesPerView: number\n }\n }\n isDisplayGudgments?: boolean\n isDisplayBackImage?: boolean\n}"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kBAAAE,EAAA,gBAAAC,EAAA,uBAAAC,EAAA,sBAAAC,IAAA,eAAAC,EAAAN,GAEO,MAAME,EAAe,CAC1B,GAAI,IACJ,GAAI,OACJ,GAAI,IACJ,GAAI,SACJ,GAAI,SACJ,GAAI,SACJ,GAAI,SACJ,GAAI,IACJ,GAAI,IACJ,GAAI,KACN,EAEaG,EAAqBE,IAE/B,CACC,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,KACJ,GAAI,QACJ,QAAS,QACT,QAAS,QACT,QAAS,QACT,QAAS,QACT,QAAS,QACT,QAAS,QACT,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,QAAS,QACT,KAAM,QACN,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,OACN,GAAGA,CAAM,GAAK,GAET,SAASJ,EAAY,CAC1B,OAAAK,EACA,aAAAC,EACA,OAAAF,EACA,sBAAAG,EACA,sBAAAC,EACA,oBAAAC,EAAsB,EACxB,EAOG,CAQD,IAAIC,EAPmB,IAAI,KAAK,a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Price", "languageTerritory", "__toCommonJS", "locale", "amount", "currencyCode", "maximumFractionDigits", "minimumFractionDigits", "removeTrailingZeros", "formattedValue", "baseAmount", "hasDiscount", "formatDiscount", "discount", "price", "basePrice"]
4
+ "sourcesContent": ["import Decimal from 'decimal.js'\nimport type { ContainerProps } from '../../types/props.js'\n/* eslint-disable no-useless-escape */\nexport const PRICE_SYMBOL = {\n us: '$',\n uk: '\u00A3',\n ca: '$',\n eu: '\u20AC',\n fr: '\u20AC',\n de: '\u20AC',\n nl: '\u20AC',\n vn: '\u20AB',\n cl: '$',\n sg: '$',\n ae: 'AED',\n} as any\n\nexport const languageTerritory = (locale: string) =>\n // https://unicode-org.github.io/cldr-staging/charts/37/supplemental/language_territory_information.html\n ({\n us: 'en-US',\n uk: 'en-GB',\n ca: 'en-CA',\n eu: 'en',\n fr: 'fr-FR',\n au: 'en-AU',\n my: 'en-my',\n 'eu-es': 'de-DE',\n 'eu-fr': 'de-DE',\n 'eu-it': 'de-DE',\n 'eu-de': 'de-DE',\n 'eu-en': 'en-US',\n 'cz-en': 'de-DE',\n 'ca-fr': 'fr-FR',\n nl: 'de-DE',\n de: 'de-DE',\n vn: 'vi-vn',\n sg: 'en-sg',\n 'ae-en': 'ae-en',\n plus: 'en-us',\n cl: 'es-cl',\n dk: 'en-dk',\n fi: 'en-fi',\n no: 'en-no',\n is: 'en-is',\n se: 'en-se',\n 'eu-pl': 'pl-PL',\n })[locale] || ''\n\nexport function formatPrice({\n amount,\n currencyCode,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros = false,\n}: {\n amount: number\n currencyCode: string\n locale: string\n maximumFractionDigits?: number\n minimumFractionDigits?: number\n removeTrailingZeros?: boolean\n}) {\n const code = locale === 'nl' ? 'EUR' : currencyCode || 'USD'\n const localeLanguage = languageTerritory(locale)\n if (!localeLanguage) {\n return null\n }\n const formatCurrency = new Intl.NumberFormat(localeLanguage, {\n style: 'currency',\n currency: code,\n minimumFractionDigits: maximumFractionDigits === 0 ? 0 : minimumFractionDigits,\n maximumFractionDigits,\n })\n\n let formattedValue = formatCurrency?.format?.(amount)\n\n if (['eu-de', 'eu-en', 'de', 'eu'].includes(locale)) {\n formattedValue = formattedValue?.toString()?.replace?.(/[\\s]/g, '')\n }\n\n if (removeTrailingZeros) {\n formattedValue = formattedValue\n ?.replace?.(/(\\.\\d*?[1-9])0+\\b/, '$1')\n ?.replace?.(/\\.0+\\b/, '')\n ?.replace?.(/(\\,\\d*?[1-9])0+\\b/, '$1')\n ?.replace?.(/\\,0+\\b/, '')\n }\n\n return formattedValue\n}\n\nexport function formatVariantPrice({\n amount,\n baseAmount,\n currencyCode,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros,\n}: {\n baseAmount: number\n amount: number\n currencyCode: string\n locale: string\n maximumFractionDigits?: number\n minimumFractionDigits?: number\n removeTrailingZeros?: boolean\n}) {\n if (typeof Intl === 'undefined') {\n return {\n price: `${PRICE_SYMBOL[locale]}${amount}`,\n basePrice: `${PRICE_SYMBOL[locale]}${baseAmount}`,\n discount: `${PRICE_SYMBOL[locale]}${baseAmount - amount || 0}`,\n }\n }\n\n const hasDiscount = baseAmount > amount\n let discount = null\n const currentLocale = languageTerritory(locale)\n if (currentLocale) {\n const formatDiscount = new Intl.NumberFormat(currentLocale, {\n style: 'percent',\n })\n discount = hasDiscount ? formatDiscount.format((baseAmount - amount) / baseAmount) : null\n }\n // \u6298\u6263\u91D1\u989D\n let discountAmount;\n if (hasDiscount) { \n const savePriceAmount = new Decimal(baseAmount).sub(amount || 0).toNumber()\n discountAmount = formatPrice({\n amount: savePriceAmount,\n currencyCode: currencyCode || 'USD',\n locale,\n maximumFractionDigits: 2,\n })\n }\n\n const price = formatPrice({ amount, currencyCode, locale, removeTrailingZeros })\n const basePrice = hasDiscount\n ? formatPrice({\n amount: baseAmount,\n currencyCode,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros,\n })\n : undefined\n\n return { price, basePrice, discount, discountAmount }\n}\n\ntype EventType = {\n primaryButton?: (v: any, index: number, data: ShelfDisplayType) => void\n secondaryButton?: (v: any, index: number, data: ShelfDisplayType) => void\n}\n\nexport interface ShelfDisplayItem {\n id?: string\n /** \u4EA7\u54C1\u56FE\u7247*/\n img?: {\n url: string\n }\n handle?: string\n sku?: string\n /** \u6298\u6263\u540E\u4EF7\u683C*/\n price?: string\n title?: string\n /** \u6298\u6263\u524D\u4EF7\u683C*/\n basePrice?: string\n subTitle?: string\n /** \u6807\u7B7E*/\n tagItems?: string[]\n tab?: string\n data?: ShelfDisplayItem[]\n custom_name?: string\n custom_description?: string\n custom_image?: string\n custom_theme?: string\n}\n\nexport type ShelfDisplayType = {\n title?: string\n isShowTab?: boolean\n isShowTag?: boolean\n isShowRecommendedCard?: boolean\n isShowOriginalPrice?: boolean\n direction?: 'horizontal' | 'vertical'\n align?: 'left' | 'center' | 'right'\n productsTab?: any[]\n productsCard?: any[]\n /** \u5361\u7247\u5F62\u72B6 */\n itemShape?: 'round' | 'square'\n /** \u6309\u94AE\u5F62\u72B6 */\n shape?: 'round' | 'square'\n /** \u6807\u7B7E\u9875\u5F62\u72B6*/\n tabShape?: 'rounded' | 'square'\n /** \u4E3B\u6309\u94AE\u914D\u7F6E */\n primaryButton?: string\n primaryFun?: 'AddCart' | 'BuyNow' | 'LearnMore'\n /** \u526F\u6309\u94AE\u914D\u7F6E */\n secondaryButton?: string\n secondaryFun?: 'AddCart' | 'BuyNow' | 'LearnMore'\n theme?: 'light' | 'dark'\n containerProps?: ContainerProps\n}\n\nexport interface ShelfDisplayProps {\n data: ShelfDisplayType\n buildData?: {\n categories: any[]\n products: any[]\n }\n recommendedData?: any[]\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: EventType\n className?: string\n key?: string\n target?: '_self' | '_blank'\n breakpoints?: {\n [key: number]: {\n spaceBetween: number\n freeMode: boolean\n slidesPerView: number\n }\n }\n metafields?: any\n isDisplayGudgments?: boolean\n isDisplayB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ory", "__toCommonJS", "import_decimal", "locale", "amount", "currencyCode", "maximumFractionDigits", "minimumFractionDigits", "removeTrailingZeros", "code", "localeLanguage", "formattedValue", "baseAmount", "hasDiscount", "discount", "currentLocale", "formatDiscount", "discountAmount", "savePriceAmount", "Decimal", "price", "basePrice"]
7
7
  }
@@ -1,10 +1,10 @@
1
- "use strict";var M=Object.create;var k=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var G=Object.getPrototypeOf,J=Object.prototype.hasOwnProperty;var K=(e,t)=>{for(var n in t)k(e,n,{get:t[n],enumerable:!0})},W=(e,t,n,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of q(t))!J.call(e,o)&&o!==n&&k(e,o,{get:()=>t[o],enumerable:!(c=V(t,o))||c.enumerable});return e};var P=(e,t,n)=>(n=e!=null?M(G(e)):{},W(t||!e||!e.__esModule?k(n,"default",{value:e,enumerable:!0}):n,e)),Q=e=>W(k({},"__esModule",{value:!0}),e);var Z={};K(Z,{ShelfDisplayHorizontalItem:()=>Y,ShelfDisplayWrapItem:()=>X});module.exports=Q(Z);var l=require("react/jsx-runtime"),$=require("../AiuiProvider/index.js"),j=require("./shelfDisplay.js"),S=P(require("../../components/picture.js")),O=P(require("../../components/badge.js")),m=require("../../helpers/utils.js"),H=require("../../components/text.js"),b=P(require("../../components/button.js")),L=require("../../shared/track.js"),z=require("../../shared/trackUrlRef.js"),E=require("../../components/heading.js"),F=require("../../hooks/useExposure.js"),U=require("react");const w="image",g="product_shelf",A=999999999e-2,X=({data:e,configuration:t})=>{const{isDisplayBackImage:n=!1,itemShape:c}=t||{},{locale:o="us",copyWriting:_}=(0,$.useAiuiContext)(),h=(0,U.useRef)(null),N=(i,s,r)=>t?.event?.primaryButton?.(i,s+1,r),B=(i,s,r)=>t?.event?.secondaryButton?.(i,s+1,r),a=e?.variants?.find(i=>i?.sku===e?.sku)||e?.variants?.[0]||{},D=!a?.availableForSale&&a?.price?.amount===A,T=t?.isShowTag,f=t?.isShowOriginalPrice,d=a?.coupons?.[0],{price:C,basePrice:I}=(0,j.formatVariantPrice)({locale:o,amount:f&&d?d.variant_price4wscode:a.price,baseAmount:f&&d?a.price:0,currencyCode:e?.price?.currencyCode||"USD"}),y=()=>{const i=e?.sku,s=e?.variants;return s?.find(v=>v?.sku===i)?.image?.url||s?.[0]?.image?.url||""},p=e?.custom_name||e?.title,x=e?.custom_description||e?.description;(0,F.useExposure)(h,{componentType:w,componentName:g,componentTitle:p,componentDescription:x,position:t?.index+1});const u=()=>(0,l.jsxs)(l.Fragment,{children:[T?(0,l.jsx)("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:e?.tags?.filter?.(i=>i?.startsWith?.("CLtag"))?.map?.(i=>i?.replace?.("CLtag:",""))?.slice?.(0,2)?.map?.((i,s)=>(0,l.jsx)(O.default,{children:i},s))}):null,p?(0,l.jsx)(E.Heading,{as:"h3",title:p||"",size:2,className:"shelf-display-product-title mb-1 line-clamp-2",html:p||""}):null,x?(0,l.jsx)(H.Text,{size:2,className:"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 shelf-display-product-description line-clamp-1 h-5 text-sm",html:x||""}):null,(0,l.jsx)("div",{className:"mb-2 mt-5 flex items-center",children:D?(0,l.jsx)("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:_?.soldOutText}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"final-price tablet:text-2xl text-info-primary text-xl font-bold",children:a?.availableForSale&&C||""}),(0,l.jsx)("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through",children:a?.availableForSale&&I||""})]})}),(0,l.jsxs)("div",{className:(0,m.cn)("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?(0,l.jsx)(b.default,{variant:"secondary",onClick:()=>B(e,t?.index,t),className:`
1
+ "use strict";var Q=Object.create;var B=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames;var Z=Object.getPrototypeOf,ee=Object.prototype.hasOwnProperty;var te=(e,t)=>{for(var i in t)B(e,i,{get:t[i],enumerable:!0})},G=(e,t,i,x)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Y(t))!ee.call(e,a)&&a!==i&&B(e,a,{get:()=>t[a],enumerable:!(x=X(t,a))||x.enumerable});return e};var H=(e,t,i)=>(i=e!=null?Q(Z(e)):{},G(t||!e||!e.__esModule?B(i,"default",{value:e,enumerable:!0}):i,e)),se=e=>G(B({},"__esModule",{value:!0}),e);var ie={};te(ie,{ShelfDisplayHorizontalItem:()=>oe,ShelfDisplayWrapItem:()=>le});module.exports=se(ie);var s=require("react/jsx-runtime"),L=require("../AiuiProvider/index.js"),z=require("./shelfDisplay.js"),$=H(require("../../components/picture.js")),F=H(require("../../components/badge.js")),u=require("../../helpers/utils.js"),U=require("../../components/text.js"),S=H(require("../../components/button.js")),W=require("../../shared/track.js"),R=require("../../shared/trackUrlRef.js"),M=require("../../components/heading.js"),k=require("react"),V=require("../../hooks/useExposure.js"),q=require("react");const D="image",C="product_shelf",J=999999999e-2,le=({data:e,configuration:t})=>{const{itemShape:i,metafields:x}=t||{},{locale:a="us",copyWriting:I}=(0,L.useAiuiContext)(),{discounts:f}=x||{},[P,E]=(0,k.useState)([]),_=(0,q.useRef)(null),N=(o,p,l)=>t?.event?.primaryButton?.(o,p+1,l),j=(o,p,l)=>t?.event?.secondaryButton?.(o,p+1,l),r=e?.variants?.find(o=>o?.sku===e?.sku)||e?.variants?.[0]||{},n=!r?.availableForSale&&r?.price?.amount===J,O=t?.isShowTag,T=t?.isShowOriginalPrice,v=r?.coupons?.[0],{price:w,basePrice:A,discount:b}=(0,z.formatVariantPrice)({locale:a,amount:T&&v?v.variant_price4wscode:r?.price,baseAmount:T&&v?r?.price:0,currencyCode:e?.price?.currencyCode||"USD"}),y=()=>{const o=e?.sku,p=e?.variants;return p?.find(m=>m?.sku===o)?.image?.url||p?.[0]?.image?.url||""},h=e?.custom_name||e?.title||e?.name,d=e?.custom_description||e?.description;(0,k.useEffect)(()=>{let o=[];if(b){const l=`${b}${f?.off||""}`;o.push(l)}const p=e?.tags?.filter?.(l=>l?.startsWith?.("CLtag"))?.map?.(l=>l?.replace?.("CLtag:",""))?.slice?.(0,b?1:2);E(o.concat(p))},[e?.tags,b]),(0,V.useExposure)(_,{componentType:D,componentName:C,componentTitle:h,componentDescription:d,position:t?.index+1});const g=()=>(0,s.jsxs)(s.Fragment,{children:[O?(0,s.jsx)("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:P?.map?.((o,p)=>(0,s.jsx)(F.default,{children:o},p))}):null,h?(0,s.jsx)(M.Heading,{as:"h3",title:h||"",size:2,className:"shelf-display-product-title mb-1 line-clamp-2 text-info-primary",html:h||""}):null,d?(0,s.jsx)(U.Text,{size:2,className:"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 shelf-display-product-description line-clamp-1 h-5 text-sm text-info-primary",html:d||""}):null,(0,s.jsx)("div",{className:"mb-2 mt-5 flex items-center",children:n?(0,s.jsx)("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:I?.soldOutText}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"final-price tablet:text-2xl text-info-primary text-xl font-bold",children:r?.availableForSale&&w||""}),(0,s.jsx)("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through",children:r?.availableForSale&&A||""})]})}),(0,s.jsxs)("div",{className:(0,u.cn)("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?(0,s.jsx)(S.default,{variant:"secondary",onClick:()=>j(e,t?.index,t),className:`
2
2
  ${t.direction==="vertical"?"w-full":""}
3
- `,children:t?.secondaryButton||""}):null,t?.primaryButton?(0,l.jsx)(b.default,{variant:"primary",onClick:()=>N(e,t?.index,t),className:`
3
+ `,children:t?.secondaryButton||""}):null,t?.primaryButton?(0,s.jsx)(S.default,{variant:"primary",onClick:()=>N(e,t?.index,t),className:`
4
4
  ${t.direction==="vertical"?"w-full":""}
5
- `,children:t?.primaryButton||""}):null]})]});return(0,l.jsx)("div",{ref:h,className:(0,m.cn)("bg-container-secondary-1 tablet:hover:bg-info-white box-border w-full cursor-pointer overflow-hidden duration-300",c==="round"?"rounded-2xl":"rounded-none","lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]","laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative","md-tablet:h-[360px]"),children:n?(0,l.jsx)("div",{className:"absolute inset-0 box-border overflow-hidden",children:(0,l.jsxs)("div",{className:"relative inset-0 size-full",children:[(0,l.jsx)(S.default,{source:y(),alt:"",className:"flex h-full justify-center object-cover [&_img]:w-auto"}),(0,l.jsx)("div",{className:"desktop:p-6 absolute inset-x-0 bottom-0 box-border overflow-hidden p-4",children:u()})]})}):(0,l.jsxs)("div",{className:"desktop:p-6 absolute inset-0 box-border flex flex-col justify-between overflow-hidden p-4",children:[(0,l.jsx)("div",{className:(0,m.cn)("lg-desktop:mb-3 lg-desktop:h-[195px] relative mb-2 inline-block h-[140px] w-full flex-1 overflow-hidden"),children:(0,l.jsx)("a",{"aria-label":p,target:t?.target,href:(0,z.trackUrlRef)(`${o==="us"||!o?"":`/${o}`}/products/${e?.handle}`,`${w}_${g}`),onClick:()=>{(0,L.gaTrack)({event:"ga4Event",event_name:"select_item",event_parameters:{page_group:"Home Page",item_list_name:"Home_Page_Bundle",items:[{item_id:e?.sku||a?.sku,item_name:e?.name,item_variant:a?.name,price:a?.price,index:t?.index+1}]}})},children:(0,l.jsx)(S.default,{source:y(),alt:"",className:"flex h-full justify-center object-cover [&_img]:w-auto"})})}),u()]})},e?.id||e?.handle)},Y=({data:e,configuration:t})=>{const{itemShape:n,itemLength:c}=t||{},{locale:o="us",copyWriting:_}=(0,$.useAiuiContext)(),h=(0,U.useRef)(null),N=(s,r,v)=>t?.event?.primaryButton?.(s,r+1,v),B=(s,r,v)=>t?.event?.secondaryButton?.(s,r+1,v),a=e?.variants?.find(s=>s?.sku===e?.sku)||e?.variants?.[0]||{},D=!a?.availableForSale&&a?.price?.amount===A,T=t?.isShowTag,f=t?.isShowOriginalPrice,d=a?.coupons?.[0],{price:C,basePrice:I}=(0,j.formatVariantPrice)({locale:o,amount:f&&d?d.variant_price4wscode:a.price,baseAmount:f&&d?a.price:0,currencyCode:e?.price?.currencyCode||"USD"}),y=()=>{const s=e?.sku,r=e?.variants;return r?.find(R=>R?.sku===s)?.image?.url||r?.[0]?.image?.url||""},p=e?.custom_name||e?.title,x=e?.custom_description||e?.description;(0,F.useExposure)(h,{componentType:w,componentName:g,componentTitle:p,componentDescription:x,position:t?.index+1});const u=()=>c>=2?{boxItem:"lg-desktop:max-w-[401px] desktop:max-w-[292px] max-w-full",imgItem:"m-tablet:m-auto lg-desktop:max-w-[330px] lg-desktop:max-h-[330px] desktop:max-w-[260px] desktop:max-h-[260px] max-w-[138px] max-h-[138px]",wrap:"lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[480] desktop:aspect-w-[648] desktop:aspect-h-[380] laptop:aspect-w-[440] laptop:aspect-h-[356] tablet:aspect-w-[346] tablet:aspect-h-[360] md-tablet:w-full"}:{boxItem:"lg-desktop:max-w-[401px] desktop:max-w-[292px] laptop:max-w-[289px] max-w-[262px]",imgItem:"md-tablet:m-auto lg-desktop:max-w-[450px] lg-desktop:max-h-[450px] desktop:max-w-[332px] desktop:max-h-[332px] max-w-[312px] max-h-[312px]",wrap:"lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[480] desktop:aspect-w-[1312] desktop:aspect-h-[380] laptop:aspect-w-[896] laptop:aspect-h-[356] tablet:aspect-w-[704] tablet:aspect-h-[360] md-tablet:w-full"},i=()=>c>=2?"flex flex-col justify-between desktop:gap-12 desktop:flex-row desktop:justify-center desktop:items-center":"flex justify-center items-center gap-6 md-tablet:flex-col";return(0,l.jsx)("div",{ref:h,className:(0,m.cn)(u().wrap,n==="round"?"rounded-2xl":"rounded-none","bg-container-secondary-1 tablet:hover:bg-info-white duration-300 gap-6","box-border w-full cursor-pointer overflow-hidden relative md-tablet:h-[360px]"),children:(0,l.jsxs)("div",{className:(0,m.cn)(i(),"desktop:p-6 absolute inset-0 box-border overflow-hidden p-4"),children:[(0,l.jsx)("div",{className:(0,m.cn)(u().imgItem,"relative overflow-hidden desktop:mb-0 mb-1"),children:(0,l.jsx)("a",{"aria-label":p,target:t?.target,href:(0,z.trackUrlRef)(`${o==="us"||!o?"":`/${o}`}/products/${e?.handle}`,`${w}_${g}`),onClick:()=>{(0,L.gaTrack)({event:"ga4Event",event_name:"select_item",event_parameters:{page_group:"Home Page",item_list_name:"Home_Page_Bundle",items:[{item_id:e?.sku||a?.sku,item_name:e?.name,item_variant:a?.name,price:a?.price,index:t?.index+1}]}})},children:(0,l.jsx)(S.default,{source:y(),alt:"",className:"flex h-full justify-center object-cover [&_img]:w-auto"})})}),(0,l.jsxs)("div",{className:(0,m.cn)("flex flex-col justify-center items-start",u().boxItem),children:[T?(0,l.jsx)("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:e?.tags?.filter?.(s=>s?.startsWith?.("CLtag"))?.map?.(s=>s?.replace?.("CLtag:",""))?.slice?.(0,2)?.map?.((s,r)=>(0,l.jsx)(O.default,{children:s},r))}):null,p?(0,l.jsx)(E.Heading,{as:"h3",title:p||"",size:2,className:"shelf-display-product-title mb-1 line-clamp-2",html:p||""}):null,x?(0,l.jsx)(H.Text,{size:2,className:"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 shelf-display-product-description line-clamp-1 h-5 text-sm",html:x||""}):null,(0,l.jsx)("div",{className:"mb-2 mt-5 flex items-center",children:D?(0,l.jsx)("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:_?.soldOutText}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"final-price tablet:text-2xl text-info-primary text-xl font-bold",children:a?.availableForSale&&C||""}),(0,l.jsx)("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through",children:a?.availableForSale&&I||""})]})}),(0,l.jsxs)("div",{className:(0,m.cn)("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?(0,l.jsx)(b.default,{variant:"secondary",onClick:()=>B(e,t?.index,t),className:`
5
+ `,children:t?.primaryButton||""}):null]})]});return(0,s.jsx)("div",{ref:_,className:(0,u.cn)("bg-[#EAEAEC] tablet:hover:bg-info-white box-border w-full cursor-pointer overflow-hidden duration-300",i==="round"?"rounded-2xl":"rounded-none","lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]","laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative","md-tablet:h-[360px]",{"aiui-dark":e?.custom_theme==="dark"}),children:e?.custom_image?(0,s.jsx)("div",{className:"absolute inset-0 box-border overflow-hidden",children:(0,s.jsxs)("div",{className:"relative inset-0 size-full",children:[(0,s.jsx)($.default,{alt:"",source:e?.custom_image,className:"flex h-full justify-center object-cover [&_img]:w-auto"}),(0,s.jsx)("div",{className:"desktop:p-6 absolute inset-x-0 bottom-0 box-border overflow-hidden p-4",children:g()})]})}):(0,s.jsxs)("div",{className:"desktop:p-6 absolute inset-0 box-border flex flex-col justify-between overflow-hidden p-4",children:[(0,s.jsx)("div",{className:(0,u.cn)("lg-desktop:mb-3 lg-desktop:h-[195px] relative mb-2 inline-block h-[140px] w-full flex-1 overflow-hidden"),children:(0,s.jsx)("a",{"aria-label":h,target:t?.target,href:(0,R.trackUrlRef)(`${a==="us"||!a?"":`/${a}`}/products/${e?.handle}`,`${D}_${C}`),onClick:()=>{(0,W.gaTrack)({event:"ga4Event",event_name:"select_item",event_parameters:{page_group:"Home Page",item_list_name:"Home_Page_Bundle",items:[{item_id:e?.sku||r?.sku,item_name:e?.name,item_variant:r?.name,price:r?.price,index:t?.index+1}]}})},children:(0,s.jsx)($.default,{source:y(),alt:"",className:"flex h-full justify-center object-cover [&_img]:w-auto"})})}),g()]})},e?.id||e?.handle)},oe=({data:e,configuration:t})=>{const{itemShape:i,itemLength:x,metafields:a}=t||{},{discounts:I}=a||{},{locale:f="us",copyWriting:P}=(0,L.useAiuiContext)(),[E,_]=(0,k.useState)([]),N=(0,q.useRef)(null),j=(l,m,c)=>t?.event?.primaryButton?.(l,m+1,c),r=(l,m,c)=>t?.event?.secondaryButton?.(l,m+1,c),n=e?.variants?.find(l=>l?.sku===e?.sku)||e?.variants?.[0]||{},O=!n?.availableForSale&&n?.price?.amount===J,T=t?.isShowTag,v=t?.isShowOriginalPrice,w=n?.coupons?.[0],{price:A,basePrice:b,discount:y}=(0,z.formatVariantPrice)({locale:f,amount:v&&w?w.variant_price4wscode:n.price,baseAmount:v&&w?n.price:0,currencyCode:e?.price?.currencyCode||"USD"}),h=()=>{const l=e?.sku,m=e?.variants;return m?.find(K=>K?.sku===l)?.image?.url||m?.[0]?.image?.url||""},d=e?.custom_name||e?.title,g=e?.custom_description||e?.description;(0,V.useExposure)(N,{componentType:D,componentName:C,componentTitle:d,componentDescription:g,position:t?.index+1});const o=()=>x>=2?{boxItem:"lg-desktop:max-w-[401px] desktop:max-w-[292px] max-w-full",imgItem:"m-tablet:m-auto lg-desktop:max-w-[330px] lg-desktop:max-h-[330px] desktop:max-w-[260px] desktop:max-h-[260px] max-w-[138px] max-h-[138px]",wrap:"lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[480] desktop:aspect-w-[648] desktop:aspect-h-[380] laptop:aspect-w-[440] laptop:aspect-h-[356] tablet:aspect-w-[346] tablet:aspect-h-[360] md-tablet:w-full"}:{boxItem:"lg-desktop:max-w-[401px] desktop:max-w-[292px] laptop:max-w-[289px] max-w-[262px]",imgItem:"md-tablet:m-auto lg-desktop:max-w-[450px] lg-desktop:max-h-[450px] desktop:max-w-[332px] desktop:max-h-[332px] max-w-[312px] max-h-[312px]",wrap:"lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[480] desktop:aspect-w-[1312] desktop:aspect-h-[380] laptop:aspect-w-[896] laptop:aspect-h-[356] tablet:aspect-w-[704] tablet:aspect-h-[360] md-tablet:w-full"},p=()=>x>=2?"flex flex-col justify-between desktop:gap-12 desktop:flex-row desktop:justify-center desktop:items-center":"flex justify-center items-center gap-6 md-tablet:flex-col";return(0,k.useEffect)(()=>{let l=[];if(y){const c=`${y}${I?.off||""}`;l.push(c)}const m=e?.tags?.filter?.(c=>c?.startsWith?.("CLtag"))?.map?.(c=>c?.replace?.("CLtag:",""))?.slice?.(0,y?1:2);_(l.concat(m))},[e?.tags,y]),(0,s.jsx)("div",{ref:N,className:(0,u.cn)(o().wrap,i==="round"?"rounded-2xl":"rounded-none","bg-[#EAEAEC] tablet:hover:bg-info-white duration-300 gap-6","box-border w-full cursor-pointer overflow-hidden relative md-tablet:h-[360px]",{"aiui-dark":e.custom_theme==="dark"}),children:(0,s.jsxs)("div",{className:(0,u.cn)(p(),"desktop:p-6 absolute inset-0 box-border overflow-hidden p-4"),children:[(0,s.jsx)("div",{className:(0,u.cn)(o().imgItem,"relative overflow-hidden desktop:mb-0 mb-1"),children:(0,s.jsx)("a",{"aria-label":d,target:t?.target,href:(0,R.trackUrlRef)(`${f==="us"||!f?"":`/${f}`}/products/${e?.handle}`,`${D}_${C}`),onClick:()=>{(0,W.gaTrack)({event:"ga4Event",event_name:"select_item",event_parameters:{page_group:"Home Page",item_list_name:"Home_Page_Bundle",items:[{item_id:e?.sku||n?.sku,item_name:e?.name,price:n?.price,item_variant:n?.name,index:t?.index+1}]}})},children:(0,s.jsx)($.default,{source:h(),alt:"",className:"flex h-full justify-center object-cover [&_img]:w-auto"})})}),(0,s.jsxs)("div",{className:(0,u.cn)("flex flex-col justify-center items-start",o().boxItem),children:[T?(0,s.jsx)("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:E?.map?.((l,m)=>(0,s.jsx)(F.default,{children:l},m))}):null,d?(0,s.jsx)(M.Heading,{as:"h3",title:d||"",size:2,className:"shelf-display-product-title mb-1 line-clamp-2 text-info-primary",html:d||""}):null,g?(0,s.jsx)(U.Text,{size:2,className:"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 shelf-display-product-description line-clamp-1 h-5 text-sm text-info-primary",html:g||""}):null,(0,s.jsx)("div",{className:"mb-2 mt-5 flex items-center",children:O?(0,s.jsx)("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:P?.soldOutText}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"final-price tablet:text-2xl text-info-primary text-xl font-bold",children:n?.availableForSale&&A||""}),(0,s.jsx)("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through",children:n?.availableForSale&&b||""})]})}),(0,s.jsxs)("div",{className:(0,u.cn)("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?(0,s.jsx)(S.default,{variant:"secondary",onClick:()=>r(e,t?.index,t),className:`
6
6
  ${t.direction==="vertical"?"w-full":""}
7
- `,children:t?.secondaryButton||""}):null,t?.primaryButton?(0,l.jsx)(b.default,{variant:"primary",onClick:()=>N(e,t?.index,t),className:`
7
+ `,children:t?.secondaryButton||""}):null,t?.primaryButton?(0,s.jsx)(S.default,{variant:"primary",onClick:()=>j(e,t?.index,t),className:`
8
8
  ${t.direction==="vertical"?"w-full":""}
9
9
  `,children:t?.primaryButton||""}):null]})]})]})},e?.id||e?.handle)};
10
10
  //# sourceMappingURL=shelfDisplayItem.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/ShelfDisplay/shelfDisplayItem.tsx"],
4
- "sourcesContent": ["import { useAiuiContext } from '../AiuiProvider/index.js'\nimport { formatVariantPrice } from './shelfDisplay.js'\nimport Picture from '../../components/picture.js'\nimport Badge from '../../components/badge.js'\nimport { cn } from '../../helpers/utils.js'\nimport { Text } from '../../components/text.js'\nimport Button from '../../components/button.js'\nimport { gaTrack } from '../../shared/track.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { Heading } from '../../components/heading.js'\nimport type { ShelfDisplayItem, ShelfDisplayType } from './shelfDisplay.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { useRef } from 'react'\n\nconst componentType = 'image'\nconst componentName = 'product_shelf'\n\nconst SOLD_OUT_PRICE = 9999999.99\n\nexport const ShelfDisplayWrapItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const { isDisplayBackImage = false, itemShape } = configuration || {}\n const { locale = 'us', copyWriting } = useAiuiContext()\n const ref = useRef<HTMLDivElement>(null)\n\n const onPrimaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.primaryButton?.(params, index + 1, data)\n\n const onSecondaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.secondaryButton?.(params, index + 1, data)\n\n const variant = data?.variants?.find((item: any) => item?.sku === data?.sku) || data?.variants?.[0] || {}\n\n const isSoldOut = !variant?.availableForSale && variant?.price?.amount === SOLD_OUT_PRICE\n const isShowTag = configuration?.isShowTag\n const isShowOriginalPrice = configuration?.isShowOriginalPrice\n\n // active \u7684 \u901A\u7528\u6298\u6263\n const coupon = variant?.coupons?.[0]\n\n const { price, basePrice } = formatVariantPrice({\n locale: locale,\n amount: isShowOriginalPrice && coupon ? coupon.variant_price4wscode : variant.price,\n baseAmount: isShowOriginalPrice && coupon ? variant.price : 0,\n currencyCode: data?.price?.currencyCode || 'USD',\n })\n\n const handleUrl = () => {\n const sku = data?.sku\n const skuArray = data?.variants\n const findSku = skuArray?.find((item: any) => item?.sku === sku)\n return findSku?.image?.url || skuArray?.[0]?.image?.url || ''\n }\n\n const displayTitle = data?.custom_name || data?.title\n const displayDescription = data?.custom_description || data?.description\n\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: displayTitle,\n componentDescription: displayDescription,\n position: configuration?.index + 1,\n })\n\n const bottomContent = () => {\n return (\n <>\n {isShowTag ? (\n <div className=\"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden\">\n {data?.tags\n ?.filter?.((item: any) => item?.startsWith?.('CLtag'))\n ?.map?.((item: any) => item?.replace?.('CLtag:', ''))\n ?.slice?.(0, 2)\n ?.map?.((item: any, index: number) => <Badge key={index}>{item}</Badge>)}\n </div>\n ) : null}\n {displayTitle ? (\n <Heading\n as=\"h3\"\n title={displayTitle || ''}\n size={2}\n className=\"shelf-display-product-title mb-1 line-clamp-2\"\n html={displayTitle || ''}\n />\n ) : null}\n {displayDescription ? (\n <Text\n size={2}\n className=\"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 shelf-display-product-description line-clamp-1 h-5 text-sm\"\n html={displayDescription || ''}\n />\n ) : null}\n <div className=\"mb-2 mt-5 flex items-center\">\n {isSoldOut ? (\n <div className=\"tablet:text-2xl text-info-primary text-xl font-bold\">{copyWriting?.soldOutText}</div>\n ) : (\n <>\n <div className=\"final-price tablet:text-2xl text-info-primary text-xl font-bold\">\n {variant?.availableForSale ? price || '' : ''}\n </div>\n <div className=\"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through\">\n {variant?.availableForSale ? basePrice || '' : ''}\n </div>\n </>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div\n className={cn(\n 'shelf-flex-button-group',\n 'lg-desktop:gap-3 flex items-center gap-2',\n configuration.direction === 'vertical' ? 'flex-col' : ''\n )}\n >\n {configuration?.secondaryButton ? (\n <Button\n variant=\"secondary\"\n onClick={() => onSecondaryButton(data, configuration?.index, configuration)}\n className={`\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n ) : null}\n {configuration?.primaryButton ? (\n <Button\n variant=\"primary\"\n onClick={() => onPrimaryButton(data, configuration?.index, configuration)}\n className={`\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.primaryButton || ''}\n </Button>\n ) : null}\n </div>\n </>\n )\n }\n\n return (\n <div\n ref={ref}\n key={data?.id || data?.handle}\n className={cn(\n 'bg-container-secondary-1 tablet:hover:bg-info-white box-border w-full cursor-pointer overflow-hidden duration-300',\n itemShape === 'round' ? 'rounded-2xl' : 'rounded-none',\n 'lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]',\n 'laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative',\n 'md-tablet:h-[360px]'\n )}\n >\n {isDisplayBackImage ? (\n <div className=\"absolute inset-0 box-border overflow-hidden\">\n <div className=\"relative inset-0 size-full\">\n <Picture source={handleUrl()} alt=\"\" className=\"flex h-full justify-center object-cover [&_img]:w-auto\" />\n <div className=\"desktop:p-6 absolute inset-x-0 bottom-0 box-border overflow-hidden p-4\">\n {bottomContent()}\n </div>\n </div>\n </div>\n ) : (\n <div className=\"desktop:p-6 absolute inset-0 box-border flex flex-col justify-between overflow-hidden p-4\">\n <div\n className={cn(\n 'lg-desktop:mb-3 lg-desktop:h-[195px] relative mb-2 inline-block h-[140px] w-full flex-1 overflow-hidden'\n )}\n >\n <a\n aria-label={displayTitle}\n target={configuration?.target}\n href={trackUrlRef(\n `${locale === 'us' || !locale ? '' : `/${locale}`}/products/${data?.handle}`,\n `${componentType}_${componentName}`\n )}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'select_item',\n event_parameters: {\n page_group: 'Home Page',\n item_list_name: 'Home_Page_Bundle',\n items: [\n {\n item_id: data?.sku || variant?.sku,\n item_name: data?.name,\n item_variant: variant?.name,\n price: variant?.price,\n index: configuration?.index + 1,\n },\n ],\n },\n })\n }}\n >\n <Picture source={handleUrl()} alt=\"\" className=\"flex h-full justify-center object-cover [&_img]:w-auto\" />\n </a>\n </div>\n {bottomContent()}\n </div>\n )}\n </div>\n )\n}\n\nexport const ShelfDisplayHorizontalItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const { itemShape, itemLength } = configuration || {}\n const { locale = 'us', copyWriting } = useAiuiContext()\n const ref = useRef<HTMLDivElement>(null)\n\n const onPrimaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.primaryButton?.(params, index + 1, data)\n\n const onSecondaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.secondaryButton?.(params, index + 1, data)\n\n const variant = data?.variants?.find((item: any) => item?.sku === data?.sku) || data?.variants?.[0] || {}\n\n const isSoldOut = !variant?.availableForSale && variant?.price?.amount === SOLD_OUT_PRICE\n const isShowTag = configuration?.isShowTag\n const isShowOriginalPrice = configuration?.isShowOriginalPrice\n\n // active \u7684 \u901A\u7528\u6298\u6263\n const coupon = variant?.coupons?.[0]\n\n const { price, basePrice } = formatVariantPrice({\n locale: locale,\n amount: isShowOriginalPrice && coupon ? coupon.variant_price4wscode : variant.price,\n baseAmount: isShowOriginalPrice && coupon ? variant.price : 0,\n currencyCode: data?.price?.currencyCode || 'USD',\n })\n\n const handleUrl = () => {\n const sku = data?.sku\n const skuArray = data?.variants\n const findSku = skuArray?.find((item: any) => item?.sku === sku)\n return findSku?.image?.url || skuArray?.[0]?.image?.url || ''\n }\n\n const displayTitle = data?.custom_name || data?.title\n const displayDescription = data?.custom_description || data?.description\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: displayTitle,\n componentDescription: displayDescription,\n position: configuration?.index + 1,\n })\n\n const showSizeClass = (): {\n boxItem: string \n imgItem: string\n wrap: string\n } => {\n if (itemLength >= 2) {\n return {\n boxItem: 'lg-desktop:max-w-[401px] desktop:max-w-[292px] max-w-full',\n imgItem:\n 'm-tablet:m-auto lg-desktop:max-w-[330px] lg-desktop:max-h-[330px] desktop:max-w-[260px] desktop:max-h-[260px] max-w-[138px] max-h-[138px]',\n wrap: 'lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[480] desktop:aspect-w-[648] desktop:aspect-h-[380] laptop:aspect-w-[440] laptop:aspect-h-[356] tablet:aspect-w-[346] tablet:aspect-h-[360] md-tablet:w-full',\n }\n }\n return {\n boxItem: 'lg-desktop:max-w-[401px] desktop:max-w-[292px] laptop:max-w-[289px] max-w-[262px]',\n imgItem:\n 'md-tablet:m-auto lg-desktop:max-w-[450px] lg-desktop:max-h-[450px] desktop:max-w-[332px] desktop:max-h-[332px] max-w-[312px] max-h-[312px]',\n wrap: 'lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[480] desktop:aspect-w-[1312] desktop:aspect-h-[380] laptop:aspect-w-[896] laptop:aspect-h-[356] tablet:aspect-w-[704] tablet:aspect-h-[360] md-tablet:w-full',\n }\n }\n \n const handleWrapClass = () => {\n if (itemLength >= 2) {\n return 'flex flex-col justify-between desktop:gap-12 desktop:flex-row desktop:justify-center desktop:items-center'\n }\n return 'flex justify-center items-center gap-6 md-tablet:flex-col'\n }\n\n return (\n <div\n ref={ref}\n key={data?.id || data?.handle}\n className={cn(\n showSizeClass().wrap,\n itemShape === 'round' ? 'rounded-2xl' : 'rounded-none',\n 'bg-container-secondary-1 tablet:hover:bg-info-white duration-300 gap-6',\n 'box-border w-full cursor-pointer overflow-hidden relative md-tablet:h-[360px]'\n )}\n >\n <div className={cn(handleWrapClass(), 'desktop:p-6 absolute inset-0 box-border overflow-hidden p-4')}>\n <div className={cn(showSizeClass().imgItem, 'relative overflow-hidden desktop:mb-0 mb-1')}>\n <a\n aria-label={displayTitle}\n target={configuration?.target}\n href={trackUrlRef(\n `${locale === 'us' || !locale ? '' : `/${locale}`}/products/${data?.handle}`,\n `${componentType}_${componentName}`\n )}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'select_item',\n event_parameters: {\n page_group: 'Home Page',\n item_list_name: 'Home_Page_Bundle',\n items: [\n {\n item_id: data?.sku || variant?.sku,\n item_name: data?.name,\n item_variant: variant?.name,\n price: variant?.price,\n index: configuration?.index + 1,\n },\n ],\n },\n })\n }}\n >\n <Picture source={handleUrl()} alt=\"\" className=\"flex h-full justify-center object-cover [&_img]:w-auto\" />\n </a>\n </div>\n <div className={cn('flex flex-col justify-center items-start', showSizeClass().boxItem)}>\n {isShowTag ? (\n <div className=\"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden\">\n {data?.tags\n ?.filter?.((item: any) => item?.startsWith?.('CLtag'))\n ?.map?.((item: any) => item?.replace?.('CLtag:', ''))\n ?.slice?.(0, 2)\n ?.map?.((item: any, index: number) => <Badge key={index}>{item}</Badge>)}\n </div>\n ) : null}\n {displayTitle ? (\n <Heading\n as=\"h3\"\n title={displayTitle || ''}\n size={2}\n className=\"shelf-display-product-title mb-1 line-clamp-2\"\n html={displayTitle || ''}\n />\n ) : null}\n {displayDescription ? (\n <Text\n size={2}\n className=\"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 shelf-display-product-description line-clamp-1 h-5 text-sm\"\n html={displayDescription || ''}\n />\n ) : null}\n <div className=\"mb-2 mt-5 flex items-center\">\n {isSoldOut ? (\n <div className=\"tablet:text-2xl text-info-primary text-xl font-bold\">{copyWriting?.soldOutText}</div>\n ) : (\n <>\n <div className=\"final-price tablet:text-2xl text-info-primary text-xl font-bold\">\n {variant?.availableForSale ? price || '' : ''}\n </div>\n <div className=\"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through\">\n {variant?.availableForSale ? basePrice || '' : ''}\n </div>\n </>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div\n className={cn(\n 'shelf-flex-button-group',\n 'lg-desktop:gap-3 flex items-center gap-2',\n configuration.direction === 'vertical' ? 'flex-col' : ''\n )}\n >\n {configuration?.secondaryButton ? (\n <Button\n variant=\"secondary\"\n onClick={() => onSecondaryButton(data, configuration?.index, configuration)}\n className={`\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n ) : null}\n {configuration?.primaryButton ? (\n <Button\n variant=\"primary\"\n onClick={() => onPrimaryButton(data, configuration?.index, configuration)}\n className={`\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.primaryButton || ''}\n </Button>\n ) : null}\n </div>\n </div>\n </div>\n </div>\n )\n}\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gCAAAE,EAAA,yBAAAC,IAAA,eAAAC,EAAAJ,GA0EoD,IAAAK,EAAA,6BA1EpDC,EAA+B,oCAC/BC,EAAmC,6BACnCC,EAAoB,0CACpBC,EAAkB,wCAClBC,EAAmB,kCACnBC,EAAqB,oCACrBC,EAAmB,yCACnBC,EAAwB,iCACxBC,EAA4B,uCAC5BC,EAAwB,uCAExBC,EAA4B,sCAC5BC,EAAuB,iBAEvB,MAAMC,EAAgB,QAChBC,EAAgB,gBAEhBC,EAAiB,aAEVjB,EAAuB,CAAC,CAAE,KAAAkB,EAAM,cAAAC,CAAc,IAA0C,CACnG,KAAM,CAAE,mBAAAC,EAAqB,GAAO,UAAAC,CAAU,EAAIF,GAAiB,CAAC,EAC9D,CAAE,OAAAG,EAAS,KAAM,YAAAC,CAAY,KAAI,kBAAe,EAChDC,KAAM,UAAuB,IAAI,EAEjCC,EAAkB,CAACC,EAA0BC,EAAeT,IAChEC,GAAe,OAAO,gBAAgBO,EAAQC,EAAQ,EAAGT,CAAI,EAEzDU,EAAoB,CAACF,EAA0BC,EAAeT,IAClEC,GAAe,OAAO,kBAAkBO,EAAQC,EAAQ,EAAGT,CAAI,EAE3DW,EAAUX,GAAM,UAAU,KAAMY,GAAcA,GAAM,MAAQZ,GAAM,GAAG,GAAKA,GAAM,WAAW,CAAC,GAAK,C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Aa,EACxE,UAAW;AAAA,gBACXA,EAAc,YAAc,WAAa,SAAW,EAAE;AAAA,cAGrD,SAAAA,GAAe,eAAiB,GACnC,EACE,MACN,GACF,GACF,GAhHKD,GAAM,IAAMA,GAAM,MAiHzB,CAEJ",
6
- "names": ["shelfDisplayItem_exports", "__export", "ShelfDisplayHorizontalItem", "ShelfDisplayWrapItem", "__toCommonJS", "import_jsx_runtime", "import_AiuiProvider", "import_shelfDisplay", "import_picture", "import_badge", "import_utils", "import_text", "import_button", "import_track", "import_trackUrlRef", "import_heading", "import_useExposure", "import_react", "componentType", "componentName", "SOLD_OUT_PRICE", "data", "configuration", "isDisplayBackImage", "itemShape", "locale", "copyWriting", "ref", "onPrimaryButton", "params", "index", "onSecondaryButton", "variant", "item", "isSoldOut", "isShowTag", "isShowOriginalPrice", "coupon", "price", "basePrice", "handleUrl", "sku", "skuArray", "displayTitle", "displayDescription", "bottomContent", "Badge", "Button", "Picture", "itemLength", "showSizeClass", "handleWrapClass"]
4
+ "sourcesContent": ["import { useAiuiContext } from '../AiuiProvider/index.js'\nimport { formatVariantPrice } from './shelfDisplay.js'\nimport Picture from '../../components/picture.js'\nimport Badge from '../../components/badge.js'\nimport { cn } from '../../helpers/utils.js'\nimport { Text } from '../../components/text.js'\nimport Button from '../../components/button.js'\nimport { gaTrack } from '../../shared/track.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { Heading } from '../../components/heading.js'\nimport type { ShelfDisplayItem, ShelfDisplayType } from './shelfDisplay.js'\nimport { useEffect, useState } from 'react'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { useRef } from 'react'\n\nconst componentType = 'image'\nconst componentName = 'product_shelf'\n\nconst SOLD_OUT_PRICE = 9999999.99\n\nexport const ShelfDisplayWrapItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const { itemShape, metafields } = configuration || {}\n const { locale = 'us', copyWriting } = useAiuiContext()\n const { discounts } = metafields || {}\n const [showTags, setShowTags] = useState<string[]>([])\n const ref = useRef<HTMLDivElement>(null)\n\n const onPrimaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.primaryButton?.(params, index + 1, data)\n\n const onSecondaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.secondaryButton?.(params, index + 1, data)\n\n const variant = data?.variants?.find((item: any) => item?.sku === data?.sku) || data?.variants?.[0] || {}\n\n const isSoldOut = !variant?.availableForSale && variant?.price?.amount === SOLD_OUT_PRICE\n const isShowTag = configuration?.isShowTag\n const isShowOriginalPrice = configuration?.isShowOriginalPrice\n\n // active \u7684 \u901A\u7528\u6298\u6263\n const coupon = variant?.coupons?.[0]\n\n const { price, basePrice, discount } = formatVariantPrice({\n locale: locale,\n amount: isShowOriginalPrice && coupon ? coupon.variant_price4wscode : variant?.price,\n baseAmount: isShowOriginalPrice && coupon ? variant?.price : 0,\n currencyCode: data?.price?.currencyCode || 'USD',\n })\n\n const handleUrl = () => {\n const sku = data?.sku\n const skuArray = data?.variants\n const findSku = skuArray?.find((item: any) => item?.sku === sku)\n return findSku?.image?.url || skuArray?.[0]?.image?.url || ''\n }\n\n const displayTitle = data?.custom_name || data?.title || data?.name\n const displayDescription = data?.custom_description || data?.description\n\n // \u5904\u7406\u6807\u7B7E\n useEffect(() => {\n let handleTags: string[] = []\n if (discount) {\n const discountTag = `${discount}${discounts?.off || ''}`\n handleTags.push(discountTag)\n }\n const newTags = data?.tags\n ?.filter?.((item: string) => item?.startsWith?.('CLtag'))\n ?.map?.((item: string) => item?.replace?.('CLtag:', ''))\n ?.slice?.(0, discount ? 1 : 2)\n setShowTags(handleTags.concat(newTags))\n }, [data?.tags, discount])\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: displayTitle,\n componentDescription: displayDescription,\n position: configuration?.index + 1,\n })\n\n const bottomContent = () => {\n return (\n <>\n {isShowTag ? (\n <div className=\"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden\">\n {showTags?.map?.((item: any, index: number) => <Badge key={index}>{item}</Badge>)}\n </div>\n ) : null}\n {displayTitle ? (\n <Heading\n as=\"h3\"\n title={displayTitle || ''}\n size={2}\n className=\"shelf-display-product-title mb-1 line-clamp-2 text-info-primary\"\n html={displayTitle || ''}\n />\n ) : null}\n {displayDescription ? (\n <Text\n size={2}\n className=\"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 shelf-display-product-description line-clamp-1 h-5 text-sm text-info-primary\"\n html={displayDescription || ''}\n />\n ) : null}\n <div className=\"mb-2 mt-5 flex items-center\">\n {isSoldOut ? (\n <div className=\"tablet:text-2xl text-info-primary text-xl font-bold\">{copyWriting?.soldOutText}</div>\n ) : (\n <>\n <div className=\"final-price tablet:text-2xl text-info-primary text-xl font-bold\">\n {variant?.availableForSale ? price || '' : ''}\n </div>\n <div className=\"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through\">\n {variant?.availableForSale ? basePrice || '' : ''}\n </div>\n </>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div\n className={cn(\n 'shelf-flex-button-group',\n 'lg-desktop:gap-3 flex items-center gap-2',\n configuration.direction === 'vertical' ? 'flex-col' : ''\n )}\n >\n {configuration?.secondaryButton ? (\n <Button\n variant=\"secondary\"\n onClick={() => onSecondaryButton(data, configuration?.index, configuration)}\n className={`\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n ) : null}\n {configuration?.primaryButton ? (\n <Button\n variant=\"primary\"\n onClick={() => onPrimaryButton(data, configuration?.index, configuration)}\n className={`\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.primaryButton || ''}\n </Button>\n ) : null}\n </div>\n </>\n )\n }\n\n return (\n <div\n ref={ref}\n key={data?.id || data?.handle}\n className={cn(\n 'bg-[#EAEAEC] tablet:hover:bg-info-white box-border w-full cursor-pointer overflow-hidden duration-300',\n itemShape === 'round' ? 'rounded-2xl' : 'rounded-none',\n 'lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]',\n 'laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative',\n 'md-tablet:h-[360px]',\n {\n 'aiui-dark': data?.custom_theme === 'dark',\n }\n )}\n >\n {data?.custom_image ? (\n <div className=\"absolute inset-0 box-border overflow-hidden\">\n <div className=\"relative inset-0 size-full\">\n <Picture\n alt=\"\"\n source={data?.custom_image}\n className=\"flex h-full justify-center object-cover [&_img]:w-auto\"\n />\n <div className=\"desktop:p-6 absolute inset-x-0 bottom-0 box-border overflow-hidden p-4\">\n {bottomContent()}\n </div>\n </div>\n </div>\n ) : (\n <div className=\"desktop:p-6 absolute inset-0 box-border flex flex-col justify-between overflow-hidden p-4\">\n <div\n className={cn(\n 'lg-desktop:mb-3 lg-desktop:h-[195px] relative mb-2 inline-block h-[140px] w-full flex-1 overflow-hidden'\n )}\n >\n <a\n aria-label={displayTitle}\n target={configuration?.target}\n href={trackUrlRef(\n `${locale === 'us' || !locale ? '' : `/${locale}`}/products/${data?.handle}`,\n `${componentType}_${componentName}`\n )}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'select_item',\n event_parameters: {\n page_group: 'Home Page',\n item_list_name: 'Home_Page_Bundle',\n items: [\n {\n item_id: data?.sku || variant?.sku,\n item_name: data?.name,\n item_variant: variant?.name,\n price: variant?.price,\n index: configuration?.index + 1,\n },\n ],\n },\n })\n }}\n >\n <Picture source={handleUrl()} alt=\"\" className=\"flex h-full justify-center object-cover [&_img]:w-auto\" />\n </a>\n </div>\n {bottomContent()}\n </div>\n )}\n </div>\n )\n}\n\nexport const ShelfDisplayHorizontalItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const { itemShape, itemLength, metafields } = configuration || {}\n const { discounts } = metafields || {}\n const { locale = 'us', copyWriting } = useAiuiContext()\n const [showTags, setShowTags] = useState<string[]>([])\n const ref = useRef<HTMLDivElement>(null)\n\n const onPrimaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.primaryButton?.(params, index + 1, data)\n\n const onSecondaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.secondaryButton?.(params, index + 1, data)\n\n const variant = data?.variants?.find((item: any) => item?.sku === data?.sku) || data?.variants?.[0] || {}\n\n const isSoldOut = !variant?.availableForSale && variant?.price?.amount === SOLD_OUT_PRICE\n const isShowTag = configuration?.isShowTag\n const isShowOriginalPrice = configuration?.isShowOriginalPrice\n\n // active \u7684 \u901A\u7528\u6298\u6263\n const coupon = variant?.coupons?.[0]\n\n const { price, basePrice, discount } = formatVariantPrice({\n locale: locale,\n amount: isShowOriginalPrice && coupon ? coupon.variant_price4wscode : variant.price,\n baseAmount: isShowOriginalPrice && coupon ? variant.price : 0,\n currencyCode: data?.price?.currencyCode || 'USD',\n })\n\n const handleUrl = () => {\n const sku = data?.sku\n const skuArray = data?.variants\n const findSku = skuArray?.find((item: any) => item?.sku === sku)\n return findSku?.image?.url || skuArray?.[0]?.image?.url || ''\n }\n\n const displayTitle = data?.custom_name || data?.title\n const displayDescription = data?.custom_description || data?.description\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: displayTitle,\n componentDescription: displayDescription,\n position: configuration?.index + 1,\n })\n\n const showSizeClass = (): {\n boxItem: string\n imgItem: string\n wrap: string\n } => {\n if (itemLength >= 2) {\n return {\n boxItem: 'lg-desktop:max-w-[401px] desktop:max-w-[292px] max-w-full',\n imgItem:\n 'm-tablet:m-auto lg-desktop:max-w-[330px] lg-desktop:max-h-[330px] desktop:max-w-[260px] desktop:max-h-[260px] max-w-[138px] max-h-[138px]',\n wrap: 'lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[480] desktop:aspect-w-[648] desktop:aspect-h-[380] laptop:aspect-w-[440] laptop:aspect-h-[356] tablet:aspect-w-[346] tablet:aspect-h-[360] md-tablet:w-full',\n }\n }\n return {\n boxItem: 'lg-desktop:max-w-[401px] desktop:max-w-[292px] laptop:max-w-[289px] max-w-[262px]',\n imgItem:\n 'md-tablet:m-auto lg-desktop:max-w-[450px] lg-desktop:max-h-[450px] desktop:max-w-[332px] desktop:max-h-[332px] max-w-[312px] max-h-[312px]',\n wrap: 'lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[480] desktop:aspect-w-[1312] desktop:aspect-h-[380] laptop:aspect-w-[896] laptop:aspect-h-[356] tablet:aspect-w-[704] tablet:aspect-h-[360] md-tablet:w-full',\n }\n }\n\n const handleWrapClass = () => {\n if (itemLength >= 2) {\n return 'flex flex-col justify-between desktop:gap-12 desktop:flex-row desktop:justify-center desktop:items-center'\n }\n return 'flex justify-center items-center gap-6 md-tablet:flex-col'\n }\n\n // \u5904\u7406\u6807\u7B7E\n useEffect(() => {\n let handleTags: string[] = []\n if (discount) {\n const discountTag = `${discount}${discounts?.off || ''}`\n handleTags.push(discountTag)\n }\n const newTags = data?.tags\n ?.filter?.((item: string) => item?.startsWith?.('CLtag'))\n ?.map?.((item: string) => item?.replace?.('CLtag:', ''))\n ?.slice?.(0, discount ? 1 : 2)\n setShowTags(handleTags.concat(newTags))\n }, [data?.tags, discount])\n\n return (\n <div\n ref={ref}\n key={data?.id || data?.handle}\n className={cn(\n showSizeClass().wrap,\n itemShape === 'round' ? 'rounded-2xl' : 'rounded-none',\n 'bg-[#EAEAEC] tablet:hover:bg-info-white duration-300 gap-6',\n 'box-border w-full cursor-pointer overflow-hidden relative md-tablet:h-[360px]',\n {\n 'aiui-dark': data.custom_theme === 'dark',\n }\n )}\n >\n <div className={cn(handleWrapClass(), 'desktop:p-6 absolute inset-0 box-border overflow-hidden p-4')}>\n <div className={cn(showSizeClass().imgItem, 'relative overflow-hidden desktop:mb-0 mb-1')}>\n <a\n aria-label={displayTitle}\n target={configuration?.target}\n href={trackUrlRef(\n `${locale === 'us' || !locale ? '' : `/${locale}`}/products/${data?.handle}`,\n `${componentType}_${componentName}`\n )}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'select_item',\n event_parameters: {\n page_group: 'Home Page',\n item_list_name: 'Home_Page_Bundle',\n items: [\n {\n item_id: data?.sku || variant?.sku,\n item_name: data?.name,\n price: variant?.price,\n item_variant: variant?.name,\n index: configuration?.index + 1,\n },\n ],\n },\n })\n }}\n >\n <Picture source={handleUrl()} alt=\"\" className=\"flex h-full justify-center object-cover [&_img]:w-auto\" />\n </a>\n </div>\n <div className={cn('flex flex-col justify-center items-start', showSizeClass().boxItem)}>\n {isShowTag ? (\n <div className=\"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden\">\n {showTags?.map?.((item: any, index: number) => <Badge key={index}>{item}</Badge>)}\n </div>\n ) : null}\n {displayTitle ? (\n <Heading\n as=\"h3\"\n title={displayTitle || ''}\n size={2}\n className=\"shelf-display-product-title mb-1 line-clamp-2 text-info-primary\"\n html={displayTitle || ''}\n />\n ) : null}\n {displayDescription ? (\n <Text\n size={2}\n className=\"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 shelf-display-product-description line-clamp-1 h-5 text-sm text-info-primary\"\n html={displayDescription || ''}\n />\n ) : null}\n <div className=\"mb-2 mt-5 flex items-center\">\n {isSoldOut ? (\n <div className=\"tablet:text-2xl text-info-primary text-xl font-bold\">{copyWriting?.soldOutText}</div>\n ) : (\n <>\n <div className=\"final-price tablet:text-2xl text-info-primary text-xl font-bold\">\n {variant?.availableForSale ? price || '' : ''}\n </div>\n <div className=\"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through\">\n {variant?.availableForSale ? basePrice || '' : ''}\n </div>\n </>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div\n className={cn(\n 'shelf-flex-button-group',\n 'lg-desktop:gap-3 flex items-center gap-2',\n configuration.direction === 'vertical' ? 'flex-col' : ''\n )}\n >\n {configuration?.secondaryButton ? (\n <Button\n variant=\"secondary\"\n onClick={() => onSecondaryButton(data, configuration?.index, configuration)}\n className={`\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n ) : null}\n {configuration?.primaryButton ? (\n <Button\n variant=\"primary\"\n onClick={() => onPrimaryButton(data, configuration?.index, configuration)}\n className={`\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.primaryButton || ''}\n </Button>\n ) : null}\n </div>\n </div>\n </div>\n </div>\n )\n}\n"],
5
+ "mappings": "8jBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,gCAAAE,GAAA,yBAAAC,KAAA,eAAAC,GAAAJ,IAsF2D,IAAAK,EAAA,6BAtF3DC,EAA+B,oCAC/BC,EAAmC,6BACnCC,EAAoB,0CACpBC,EAAkB,wCAClBC,EAAmB,kCACnBC,EAAqB,oCACrBC,EAAmB,yCACnBC,EAAwB,iCACxBC,EAA4B,uCAC5BC,EAAwB,uCAExBC,EAAoC,iBACpCC,EAA4B,sCAC5BD,EAAuB,iBAEvB,MAAME,EAAgB,QAChBC,EAAgB,gBAEhBC,EAAiB,aAEVjB,GAAuB,CAAC,CAAE,KAAAkB,EAAM,cAAAC,CAAc,IAA0C,CACnG,KAAM,CAAE,UAAAC,EAAW,WAAAC,CAAW,EAAIF,GAAiB,CAAC,EAC9C,CAAE,OAAAG,EAAS,KAAM,YAAAC,CAAY,KAAI,kBAAe,EAChD,CAAE,UAAAC,CAAU,EAAIH,GAAc,CAAC,EAC/B,CAACI,EAAUC,CAAW,KAAI,YAAmB,CAAC,CAAC,EAC/CC,KAAM,UAAuB,IAAI,EAEjCC,EAAkB,CAACC,EAA0BC,EAAeZ,IAChEC,GAAe,OAAO,gBAAgBU,EAAQC,EAAQ,EAAGZ,CAAI,EAEzDa,EAAoB,CAACF,EAA0BC,EAAeZ,IAClEC,GAAe,OAAO,kBAAkBU,EAAQC,EAAQ,EAAGZ,CAAI,EAE3Dc,EAAUd,GAAM,UAAU,KAAMe,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WH,OAAkB,OAAC,EAAAoB,QAAA,CAAmB,SAAAjB,GAARH,CAAa,CAAQ,EAClF,EACE,KACHc,KACC,OAAC,WACC,GAAG,KACH,MAAOA,GAAgB,GACvB,KAAM,EACN,UAAU,kEACV,KAAMA,GAAgB,GACxB,EACE,KACHC,KACC,OAAC,QACC,KAAM,EACN,UAAU,oJACV,KAAMA,GAAsB,GAC9B,EACE,QACJ,OAAC,OAAI,UAAU,8BACZ,SAAAX,KACC,OAAC,OAAI,UAAU,sDAAuD,SAAAX,GAAa,YAAY,KAE/F,oBACE,oBAAC,OAAI,UAAU,kEACZ,SAAAS,GAAS,kBAAmBM,GAAS,GACxC,KACA,OAAC,OAAI,UAAU,sFACZ,SAAAN,GAAS,kBAAmBO,GAAa,GAC5C,GACF,EAEJ,KAEA,QAAC,OACC,aAAW,MACT,0BACA,2CACApB,EAAc,YAAc,WAAa,WAAa,EACxD,EAEC,UAAAA,GAAe,mBACd,OAAC,EAAAgC,QAAA,CACC,QAAQ,YACR,QAAS,IAAMpB,EAAkBb,EAAMC,GAAe,MAAOA,CAAa,EAC1E,UAAW;AAAA,kBACTA,EAAc,YAAc,WAAa,SAAW,EAAE;AAAA,gBAGvD,SAAAA,GAAe,iBAAmB,GACrC,EACE,KACHA,GAAe,iBACd,OAAC,EAAAgC,QAAA,CACC,QAAQ,UACR,QAAS,IAAMvB,EAAgBV,EAAMC,GAAe,MAAOA,CAAa,EACxE,UAAW;AAAA,gBACXA,EAAc,YAAc,WAAa,SAAW,EAAE;AAAA,cAGrD,SAAAA,GAAe,eAAiB,GACnC,EACE,MACN,GACF,GACF,GA/GKD,GAAM,IAAMA,GAAM,MAgHzB,CAEJ",
6
+ "names": ["shelfDisplayItem_exports", "__export", "ShelfDisplayHorizontalItem", "ShelfDisplayWrapItem", "__toCommonJS", "import_jsx_runtime", "import_AiuiProvider", "import_shelfDisplay", "import_picture", "import_badge", "import_utils", "import_text", "import_button", "import_track", "import_trackUrlRef", "import_heading", "import_react", "import_useExposure", "componentType", "componentName", "SOLD_OUT_PRICE", "data", "configuration", "itemShape", "metafields", "locale", "copyWriting", "discounts", "showTags", "setShowTags", "ref", "onPrimaryButton", "params", "index", "onSecondaryButton", "variant", "item", "isSoldOut", "isShowTag", "isShowOriginalPrice", "coupon", "price", "basePrice", "discount", "handleUrl", "sku", "skuArray", "displayTitle", "displayDescription", "handleTags", "discountTag", "newTags", "bottomContent", "Badge", "Button", "Picture", "itemLength", "showSizeClass", "handleWrapClass"]
7
7
  }
@@ -0,0 +1,11 @@
1
+ export type DropDownProps = {
2
+ index: number;
3
+ active: any;
4
+ list: any;
5
+ setActive: any;
6
+ setVisible: any;
7
+ visible: any;
8
+ filterActive: any;
9
+ };
10
+ declare const DropDown: ({ index, active, list, setActive, setVisible, visible, filterActive }: DropDownProps) => import("react/jsx-runtime").JSX.Element;
11
+ export default DropDown;
@@ -0,0 +1,3 @@
1
+ "use strict";var p=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var y=(o,e)=>{for(var a in e)p(o,a,{get:e[a],enumerable:!0})},D=(o,e,a,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of m(e))!v.call(o,t)&&t!==a&&p(o,t,{get:()=>e[t],enumerable:!(s=x(e,t))||s.enumerable});return o};var k=o=>D(p({},"__esModule",{value:!0}),o);var C={};y(C,{default:()=>E});module.exports=k(C);var c=require("react/jsx-runtime"),l=require("react");const g="openDropDown",w=({index:o,active:e,list:a,setActive:s,setVisible:t,visible:u,filterActive:i})=>{const f=(0,l.useRef)(null);(0,l.useEffect)(()=>{const n=r=>{const d=r?.target?.getAttribute?.("class");!f?.current?.contains(r?.target)&&!d?.includes(g)&&t({...u,[o]:!1})};return document.addEventListener("click",n),()=>document.removeEventListener("click",n)},[]);const h=(0,l.useMemo)(()=>{const n=Object.keys(i||{});return a?.filter(r=>!n?.find(b=>i?.[b]?.handle===r?.handle))},[i,a]);return(0,c.jsx)("div",{ref:f,className:`absolute left-0 top-[104%] z-30 box-border max-h-[340px] w-full overflow-hidden rounded-lg bg-[#F5F5F7] ${u?.[o]?"block":"hidden"}`,children:(0,c.jsx)("div",{className:"m-0 box-border h-full flex-1 overflow-y-auto overflow-x-hidden p-0 [&:last-child]:border-r-0",children:h?.map((n,r)=>{const d=n?.sku||n?.variants?.[0]?.sku;return(0,c.jsx)("div",{onClick:()=>{s({...e,[r]:{sku:d,name:n?.name,handle:n?.handle}}),t({...u,[r]:!1})},title:n?.name,className:`openDropDown box-border cursor-pointer truncate px-6 py-4 text-base font-bold min-xl:text-lg min-xxl:text-lg [&:hover]:bg-[#EAEAEC]
2
+ ${n?.handle===e?.handle?"bg-[#EAEAEC]":""}`,children:n?.name},r)})})})};var E=w;
3
+ //# sourceMappingURL=dropdown.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/Specs/dropdown.tsx"],
4
+ "sourcesContent": ["import { useEffect, useRef, useMemo } from 'react'\n\nconst clickContent = 'openDropDown'\n\nexport type DropDownProps = {\n index: number\n active: any\n list: any\n setActive: any\n setVisible: any\n visible: any\n filterActive: any\n}\n\nconst DropDown = ({ index, active, list, setActive, setVisible, visible, filterActive }: DropDownProps) => {\n const dropDownRef = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n const handleClickOutside = (event: any) => {\n const isDel = event?.target?.getAttribute?.('class')\n const isContainer = !dropDownRef?.current?.contains(event?.target)\n if (isContainer && !isDel?.includes(clickContent)) {\n setVisible({ ...visible, [index]: false })\n }\n }\n document.addEventListener('click', handleClickOutside)\n return () => document.removeEventListener('click', handleClickOutside)\n }, [])\n\n const handleList = useMemo(() => {\n const activeIndex = Object.keys(filterActive || {})\n return list?.filter((item: { handle: any }) => {\n const currentIndex = activeIndex?.find((items: string) => filterActive?.[items]?.handle === item?.handle)\n return !currentIndex\n })\n }, [filterActive, list])\n\n return (\n <div\n ref={dropDownRef}\n className={`absolute left-0 top-[104%] z-30 box-border max-h-[340px] w-full overflow-hidden rounded-lg bg-[#F5F5F7] ${visible?.[index] ? 'block' : 'hidden'}`}\n >\n <div className={'m-0 box-border h-full flex-1 overflow-y-auto overflow-x-hidden p-0 [&:last-child]:border-r-0'}>\n {handleList?.map((item: any, index: number) => {\n const currentSku = item?.sku || item?.variants?.[0]?.sku\n return (\n <div\n key={index}\n onClick={() => {\n setActive({\n ...active,\n [index]: {\n sku: currentSku,\n name: item?.name,\n handle: item?.handle,\n },\n })\n setVisible({ ...visible, [index]: false })\n }}\n title={item?.name}\n className={`openDropDown box-border cursor-pointer truncate px-6 py-4 text-base font-bold min-xl:text-lg min-xxl:text-lg [&:hover]:bg-[#EAEAEC]\n ${item?.handle === active?.handle ? 'bg-[#EAEAEC]' : ''}`}\n >\n {item?.name}\n </div>\n )\n })}\n </div>\n </div>\n )\n}\n\nexport default DropDown\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA8CY,IAAAI,EAAA,6BA9CZC,EAA2C,iBAE3C,MAAMC,EAAe,eAYfC,EAAW,CAAC,CAAE,MAAAC,EAAO,OAAAC,EAAQ,KAAAC,EAAM,UAAAC,EAAW,WAAAC,EAAY,QAAAC,EAAS,aAAAC,CAAa,IAAqB,CACzG,MAAMC,KAAc,UAAuB,IAAI,KAE/C,aAAU,IAAM,CACd,MAAMC,EAAsBC,GAAe,CACzC,MAAMC,EAAQD,GAAO,QAAQ,eAAe,OAAO,EAC/B,CAACF,GAAa,SAAS,SAASE,GAAO,MAAM,GAC9C,CAACC,GAAO,SAASZ,CAAY,GAC9CM,EAAW,CAAE,GAAGC,EAAS,CAACL,CAAK,EAAG,EAAM,CAAC,CAE7C,EACA,gBAAS,iBAAiB,QAASQ,CAAkB,EAC9C,IAAM,SAAS,oBAAoB,QAASA,CAAkB,CACvE,EAAG,CAAC,CAAC,EAEL,MAAMG,KAAa,WAAQ,IAAM,CAC/B,MAAMC,EAAc,OAAO,KAAKN,GAAgB,CAAC,CAAC,EAClD,OAAOJ,GAAM,OAAQW,GAEZ,CADcD,GAAa,KAAME,GAAkBR,IAAeQ,CAAK,GAAG,SAAWD,GAAM,MAAM,CAEzG,CACH,EAAG,CAACP,EAAcJ,CAAI,CAAC,EAEvB,SACE,OAAC,OACC,IAAKK,EACL,UAAW,2GAA2GF,IAAUL,CAAK,EAAI,QAAU,QAAQ,GAE3J,mBAAC,OAAI,UAAW,+FACb,SAAAW,GAAY,IAAI,CAACE,EAAWb,IAAkB,CAC7C,MAAMe,EAAaF,GAAM,KAAOA,GAAM,WAAW,CAAC,GAAG,IACrD,SACE,OAAC,OAEC,QAAS,IAAM,CACbV,EAAU,CACR,GAAGF,EACH,CAACD,CAAK,EAAG,CACP,IAAKe,EACL,KAAMF,GAAM,KACZ,OAAQA,GAAM,MAChB,CACF,CAAC,EACDT,EAAW,CAAE,GAAGC,EAAS,CAACL,CAAK,EAAG,EAAM,CAAC,CAC3C,EACA,MAAOa,GAAM,KACb,UAAW;AAAA,kBACPA,GAAM,SAAWZ,GAAQ,OAAS,eAAiB,EAAE,GAExD,SAAAY,GAAM,MAhBFb,CAiBP,CAEJ,CAAC,EACH,EACF,CAEJ,EAEA,IAAON,EAAQK",
6
+ "names": ["dropdown_exports", "__export", "dropdown_default", "__toCommonJS", "import_jsx_runtime", "import_react", "clickContent", "DropDown", "index", "active", "list", "setActive", "setVisible", "visible", "filterActive", "dropDownRef", "handleClickOutside", "event", "isDel", "handleList", "activeIndex", "item", "items", "currentSku"]
7
+ }
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ declare const _default: React.ForwardRefExoticComponent<Omit<Omit<Omit<any, "ref"> & React.RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
3
+ className?: string;
4
+ data?: Record<string, any>;
5
+ }, "ref"> & React.RefAttributes<any>>;
6
+ export default _default;
@@ -0,0 +1,2 @@
1
+ "use strict";var O=Object.create;var v=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames;var q=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var Q=(l,n)=>{for(var r in n)v(l,r,{get:n[r],enumerable:!0})},F=(l,n,r,u)=>{if(n&&typeof n=="object"||typeof n=="function")for(let b of $(n))!z.call(l,b)&&b!==r&&v(l,b,{get:()=>n[b],enumerable:!(u=V(n,b))||u.enumerable});return l};var S=(l,n,r)=>(r=l!=null?O(q(l)):{},F(n||!l||!l.__esModule?v(r,"default",{value:l,enumerable:!0}):r,l)),G=l=>F(v({},"__esModule",{value:!0}),l);var K={};Q(K,{default:()=>J});module.exports=G(K);var e=require("react/jsx-runtime"),L=S(require("./dropdown")),T=require("next/router"),A=require("react-responsive"),f=require("react"),H=require("../../shared/Styles.js"),R=require("../ShelfDisplay/shelfDisplay.js"),d=require("../../components/index.js"),g=S(require("react"));const j=g.default.forwardRef((l,n)=>{const{data:r,buildData:u,onChange:b}=l||{},y=(0,A.useMediaQuery)({query:"(max-width: 768px)"}),[i,h]=(0,f.useState)({}),[w,N]=(0,f.useState)({}),D=(0,g.useRef)(null),{locale:P}=(0,T.useRouter)(),{LeftMenu:E,RightMenu:C,DefaultSelectMenu:k}=(0,f.useMemo)(()=>r?.data||{},[r?.data]),_=t=>{try{const o=new URL(t).pathname.toLowerCase();return/\.(jpeg|jpg|gif|png|webp|bmp|svg|tiff)$/.test(o)}catch{return/\.(jpeg|jpg|gif|png|webp|bmp|svg|tiff)$/i.test(t)}},I=(t,s)=>{const o=C?.menus?.find?.(p=>p?.handle===t?.handle),a=t?.variants?.find?.(p=>p?.sku===t?.sku||o?.sku),c=a?.coupons?.[0],{price:m,basePrice:x}=(0,R.formatVariantPrice)({locale:P||"us",amount:c?c?.variant_price4wscode:a?.price,baseAmount:c?a?.price:0,currencyCode:t?.price?.currencyCode||"USD"});return(0,e.jsxs)("div",{className:"box-border overflow-hidden specs-sku-node-wrap",children:[(0,e.jsxs)(d.Text,{className:"relative mb-6 box-border block rounded-[50px] border border-[#E4E5E6] bg-[#F5F5F7] px-6 py-4 text-base font-bold md-tablet:p-2 l-tablet:mb-4 l-tablet:text-sm desktop:px-6 lg-desktop:mb-8 lg-desktop:text-lg openDropDown specs-sku-node-text",onClick:()=>N({...w,[s]:!w?.[s]}),children:[(0,e.jsxs)("div",{className:"flex items-center justify-between overflow-hidden",children:[(0,e.jsx)("div",{className:"openDropDown flex-1 truncate text-base md-tablet:text-sm lg-desktop:text-lg specs-sku-node-title",title:i?.[s]?.name,children:i?.[s]?.name||""}),(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",className:"openDropDown",children:(0,e.jsx)("path",{d:"M6 9.5L12 15.5L18 9.5",stroke:"#1D1D1F","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})})]}),(0,e.jsx)(L.default,{index:s,list:u?.products,active:i,filterActive:i,setActive:h,visible:w,setVisible:N})]}),(0,e.jsx)("div",{className:"max-h-[138px] max-w-[138px] lg-desktop:max-h-[196px] lg-desktop:max-w-[196px]",children:(0,e.jsx)(d.Picture,{source:a?.image?.url||"",className:"aspect-h-[280] aspect-w-[280]",imgClassName:"w-full h-full object-cover"})}),a?.availableForSale?(0,e.jsxs)("div",{className:"mb-2 mt-6 flex items-center text-xl font-bold lg-desktop:text-2xl",children:[(0,e.jsx)("div",{className:"text-[#1D1D1F] specs-sku-node-price",children:m||""}),x&&(0,e.jsx)("div",{className:"ml-1 text-xl text-[#86868C] line-through lg-desktop:text-2xl specs-sku-node-base-price",children:x})]}):!1,k?.buttonText?(0,e.jsx)(d.Button,{onClick:()=>b?.(t),className:"specs-sku-node-button",children:k?.buttonText}):null]})},U=t=>{if(t)return t&&typeof t!="string"?(0,e.jsxs)("div",{className:"size-full",children:[(0,e.jsx)("p",{className:"text-base font-bold text-[#1D1D1F] md:text-sm min-xxl:text-lg specs-normal-node-text",dangerouslySetInnerHTML:{__html:t?.text||""}}),(0,e.jsx)(d.Picture,{source:t?.imgUrl,className:"m-auto max-h-[360px] max-w-[360px] l:max-h-[174px] l:max-w-[174px]",imgClassName:"w-full h-full object-cover"})]}):(0,e.jsx)("div",{className:"break-all",children:_(t)?(0,e.jsx)(d.Picture,{source:t,className:"m-auto max-h-[360px] max-w-[360px] l:max-h-[174px] l:max-w-[174px]",imgClassName:"w-full h-full object-cover"}):(0,e.jsx)("p",{className:"text-base font-bold text-[#1D1D1F] md:text-sm min-xxl:text-lg specs-normal-node-text",dangerouslySetInnerHTML:{__html:t||""}})})},M=t=>t.map((s,o)=>{const a=o===0;return(0,e.jsxs)("div",{className:"box-border grid w-full cursor-pointer grid-cols-3 overflow-hidden border-t border-t-[#E4E5E6] l-tablet:flex l-tablet:flex-col specs-product-node-wrap",children:[(0,e.jsx)(d.Heading,{as:"h3",html:s||"",className:"mr-4 flex-1 pt-4 tablet:py-6 text-base font-bold md:text-sm l-tablet:text-[#86868C] desktop:p-6 lg-desktop:text-lg specs-product-node-title"}),(0,e.jsx)("div",{className:"col-span-2 grid flex-1 py-6 l-tablet:w-full l-tablet:gap-4 laptop:gap-8 desktop:gap-12 desktop:p-6 lg-desktop:gap-16 grid-cols-2 specs-product-node-body",children:Object.keys(i)?.map?.(c=>{const m=i?.[c],x=C?.menus?.find?.(p=>p?.handle===m?.handle)?.subTitle;return U(x?.[s])})})]},s)}),B=t=>{if(!i)return;const{subTitle:s,isProduct:o}=t;return o?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"box-border grid w-full cursor-pointer grid-cols-3 overflow-hidden border-t-[#E4E5E6] l-tablet:flex l-tablet:flex-col border-t-0 specs-content-item-product",children:[t?.title&&(0,e.jsx)(d.Heading,{as:"h3",html:t?.title||"",className:"l:hidden specs-item-product-title"}),(0,e.jsx)("div",{className:"col-span-2 grid flex-1 pb-4 l-tablet:w-full l-tablet:gap-4 laptop:gap-8 desktop:gap-12 desktop:p-6 lg-desktop:gap-16 grid-cols-2 pr-0 specs-item-product-body",children:Object.keys(i)?.map((a,c)=>{const m=i?.[a],x=u?.products?.find?.(p=>p?.handle===m?.handle);return(0,e.jsx)("div",{children:I({...x,sku:m?.sku,item:a},c)},a)})})]}),s?.length?M(s):null]}):M(s)};return(0,g.useImperativeHandle)(n,()=>D.current),(0,f.useEffect)(()=>{if(!u?.products?.length)return;const t=k?.sku?.split?.(",")||[];let s={};t?.forEach?.((o,a)=>{const c=u?.products?.find?.(m=>{if(m?.variants?.find?.(p=>p?.sku===o))return!0});c&&(s={...s,[a]:{sku:o,name:c?.name,handle:c?.handle}})}),h(s)},[u]),(0,f.useEffect)(()=>{if(y){const t=Object.keys(i||{});if(t?.length>2){const s=t?.slice?.(0,2);let o={};s?.forEach?.(a=>{o={...o,[a]:i?.[a]}}),h(o)}}},[y]),(0,e.jsx)("div",{className:"w-full overflow-hidden bg-[#F5F5F7] specs-wrapper",ref:D,children:E?.data?(0,e.jsx)("div",{className:"box-border w-full overflow-hidden specs-wrapper-content",children:E?.data?.map?.((t,s)=>(0,e.jsx)("div",{className:"w-full overflow-hidden pt-10 [&:first-child]:pt-0 specs-wrapper-content-item",children:B(t)},s))}):null})});j.displayName="Specs";var J=(0,H.withLayout)(j);
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/Specs/index.tsx"],
4
+ "sourcesContent": ["/* eslint-disable no-undef */\nimport DropDown from './dropdown'\nimport { useRouter } from 'next/router'\nimport { useMediaQuery } from 'react-responsive'\nimport { useMemo, useState, useEffect } from 'react'\nimport { withLayout } from '../../shared/Styles.js'\nimport { formatVariantPrice } from '../ShelfDisplay/shelfDisplay.js'\nimport { Picture, Text, Button, Container, Heading } from '../../components/index.js'\nimport React, { useImperativeHandle, useRef } from 'react'\n\nconst Specs = React.forwardRef<HTMLDivElement, any>((page: any, ref) => {\n const { data, buildData, onChange } = page || {}\n\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n\n const [active, setActive] = useState<any>({})\n const [visibleActive, setVisibleActive] = useState<{ [key: number]: boolean }>({})\n\n const innerRef = useRef<HTMLDivElement>(null)\n\n const { locale } = useRouter()\n\n const { LeftMenu, RightMenu, DefaultSelectMenu } = useMemo(() => data?.data || {}, [data?.data])\n\n const isImageUrl = (urlPath: string) => {\n try {\n const url = new URL(urlPath)\n const path = url.pathname.toLowerCase()\n return /\\.(jpeg|jpg|gif|png|webp|bmp|svg|tiff)$/.test(path)\n } catch (e) {\n // \u5982\u679C\u4F20\u5165\u7684\u4E0D\u662F\u6709\u6548URL\uFF08\u5982\u76F8\u5BF9\u8DEF\u5F84\uFF09\uFF0C\u76F4\u63A5\u68C0\u67E5\u8DEF\u5F84\n return /\\.(jpeg|jpg|gif|png|webp|bmp|svg|tiff)$/i.test(urlPath)\n }\n }\n\n const skuNode = (product: any, index: number) => {\n const findCurrentData = RightMenu?.menus?.find?.((item: any) => item?.handle === product?.handle)\n const findSku = product?.variants?.find?.((item: any) => item?.sku === product?.sku || findCurrentData?.sku)\n const coupon = findSku?.coupons?.[0]\n const { price, basePrice } = formatVariantPrice({\n locale: locale || 'us',\n amount: coupon ? coupon?.variant_price4wscode : findSku?.price,\n baseAmount: coupon ? findSku?.price : 0,\n currencyCode: product?.price?.currencyCode || 'USD',\n })\n return (\n <div className=\"box-border overflow-hidden specs-sku-node-wrap\">\n <Text\n className={`relative mb-6 box-border block rounded-[50px] border border-[#E4E5E6] bg-[#F5F5F7] px-6 py-4 text-base font-bold md-tablet:p-2 l-tablet:mb-4 l-tablet:text-sm desktop:px-6 lg-desktop:mb-8 lg-desktop:text-lg openDropDown specs-sku-node-text`}\n onClick={() => setVisibleActive({ ...visibleActive, [index]: !visibleActive?.[index] })}\n >\n <div className=\"flex items-center justify-between overflow-hidden\">\n <div\n className=\"openDropDown flex-1 truncate text-base md-tablet:text-sm lg-desktop:text-lg specs-sku-node-title\"\n title={active?.[index]?.name}\n >\n {active?.[index]?.name || ''}\n </div>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"25\"\n viewBox=\"0 0 24 25\"\n fill=\"none\"\n className=\"openDropDown\"\n >\n <path\n d=\"M6 9.5L12 15.5L18 9.5\"\n stroke=\"#1D1D1F\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </div>\n <DropDown\n index={index}\n list={buildData?.products}\n active={active}\n filterActive={active}\n setActive={setActive}\n visible={visibleActive}\n setVisible={setVisibleActive}\n />\n </Text>\n <div className=\"max-h-[138px] max-w-[138px] lg-desktop:max-h-[196px] lg-desktop:max-w-[196px]\">\n <Picture\n source={findSku?.image?.url || ''}\n className=\"aspect-h-[280] aspect-w-[280]\"\n imgClassName=\"w-full h-full object-cover\"\n />\n </div>\n {findSku?.availableForSale ? (\n <div className=\"mb-2 mt-6 flex items-center text-xl font-bold lg-desktop:text-2xl\">\n <div className=\"text-[#1D1D1F] specs-sku-node-price\">{price || ''}</div>\n {basePrice && (\n <div className=\"ml-1 text-xl text-[#86868C] line-through lg-desktop:text-2xl specs-sku-node-base-price\">\n {basePrice}\n </div>\n )}\n </div>\n ) : (\n false\n )}\n {DefaultSelectMenu?.buttonText ? (\n <Button onClick={() => onChange?.(product)} className=\"specs-sku-node-button\">\n {DefaultSelectMenu?.buttonText}\n </Button>\n ) : null}\n </div>\n )\n }\n\n const normalNode = (v: any) => {\n if (!v) return\n if (v && typeof v !== 'string') {\n return (\n <div className=\"size-full\">\n <p\n className=\"text-base font-bold text-[#1D1D1F] md:text-sm min-xxl:text-lg specs-normal-node-text\"\n dangerouslySetInnerHTML={{\n __html: v?.text || '',\n }}\n />\n <Picture\n source={v?.imgUrl}\n className=\"m-auto max-h-[360px] max-w-[360px] l:max-h-[174px] l:max-w-[174px]\"\n imgClassName=\"w-full h-full object-cover\"\n />\n </div>\n )\n }\n return (\n <div className=\"break-all\">\n {isImageUrl(v) ? (\n <Picture\n source={v}\n className=\"m-auto max-h-[360px] max-w-[360px] l:max-h-[174px] l:max-w-[174px]\"\n imgClassName=\"w-full h-full object-cover\"\n />\n ) : (\n <p\n className=\"text-base font-bold text-[#1D1D1F] md:text-sm min-xxl:text-lg specs-normal-node-text\"\n dangerouslySetInnerHTML={{\n __html: v || '',\n }}\n />\n )}\n </div>\n )\n }\n\n const productNode = (data: any) => {\n return data.map((st: any, idx: number) => {\n const isFirstParameter = idx === 0\n return (\n <div\n key={st}\n className={`box-border grid w-full cursor-pointer grid-cols-3 overflow-hidden border-t border-t-[#E4E5E6] l-tablet:flex l-tablet:flex-col ${isFirstParameter ? '' : ''} specs-product-node-wrap`}\n >\n <Heading\n as=\"h3\"\n html={st || ''}\n className=\"mr-4 flex-1 pt-4 tablet:py-6 text-base font-bold md:text-sm l-tablet:text-[#86868C] desktop:p-6 lg-desktop:text-lg specs-product-node-title\"\n />\n <div\n className={`col-span-2 grid flex-1 py-6 l-tablet:w-full l-tablet:gap-4 laptop:gap-8 desktop:gap-12 desktop:p-6 lg-desktop:gap-16 grid-cols-2 specs-product-node-body`}\n >\n {Object.keys(active)?.map?.((item: string) => {\n const currentData = active?.[item]\n const currentMenus = RightMenu?.menus?.find?.(\n (item: any) => item?.handle === currentData?.handle\n )?.subTitle\n return normalNode(currentMenus?.[st])\n })}\n </div>\n </div>\n )\n })\n }\n\n // \u5DE6\u4FA7\u6807\u9898\u83DC\u5355\n const childrenNode = (node: any) => {\n if (!active) return\n const { subTitle, isProduct } = node\n // \u5982\u679C\u662F\u4EA7\u54C1\n if (isProduct) {\n return (\n <>\n <div\n className={`box-border grid w-full cursor-pointer grid-cols-3 overflow-hidden border-t-[#E4E5E6] l-tablet:flex l-tablet:flex-col border-t-0 specs-content-item-product`}\n >\n {node?.title && <Heading as=\"h3\" html={node?.title || ''} className=\"l:hidden specs-item-product-title\" />}\n <div\n className={`col-span-2 grid flex-1 pb-4 l-tablet:w-full l-tablet:gap-4 laptop:gap-8 desktop:gap-12 desktop:p-6 lg-desktop:gap-16 grid-cols-2 pr-0 specs-item-product-body`}\n >\n {Object.keys(active)?.map((item: string, index: number) => {\n const currentData = active?.[item]\n const currentProduct = buildData?.products?.find?.((item: any) => item?.handle === currentData?.handle)\n return <div key={item}>{skuNode({ ...currentProduct, sku: currentData?.sku, item: item }, index)}</div>\n })}\n </div>\n </div>\n {subTitle?.length ? productNode(subTitle) : null}\n </>\n )\n }\n return productNode(subTitle)\n }\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n useEffect(() => {\n if (!buildData?.products?.length) return\n const skus = DefaultSelectMenu?.sku?.split?.(',') || []\n let currentActive = {}\n skus?.forEach?.((sku: string, index: number) => {\n const findData = buildData?.products?.find?.((item: any) => {\n const findSku = item?.variants?.find?.((v: any) => v?.sku === sku)\n if (findSku) return true\n })\n if (findData) {\n currentActive = {\n ...currentActive,\n [index]: {\n sku: sku,\n name: findData?.name,\n handle: findData?.handle,\n },\n }\n }\n })\n setActive(currentActive)\n }, [buildData])\n\n useEffect(() => {\n if (isMobile) {\n const currentActive = Object.keys(active || {})\n if (currentActive?.length > 2) {\n const newActive = currentActive?.slice?.(0, 2)\n let newShowActive = {}\n newActive?.forEach?.((item: string) => {\n newShowActive = { ...newShowActive, [item]: active?.[item] }\n })\n setActive(newShowActive)\n }\n }\n }, [isMobile])\n\n return (\n <div className=\"w-full overflow-hidden bg-[#F5F5F7] specs-wrapper\" ref={innerRef}>\n {LeftMenu?.data ? (\n <div className=\"box-border w-full overflow-hidden specs-wrapper-content\">\n {LeftMenu?.data?.map?.((item: any, index: number) => {\n return (\n <div key={index} className=\"w-full overflow-hidden pt-10 [&:first-child]:pt-0 specs-wrapper-content-item\">\n {childrenNode(item)}\n </div>\n )\n })}\n </div>\n ) : null}\n </div>\n )\n})\n\nSpecs.displayName = 'Specs'\n\nexport default withLayout(Specs)\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAA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K",
6
+ "names": ["Specs_exports", "__export", "Specs_default", "__toCommonJS", "import_jsx_runtime", "import_dropdown", "import_router", "import_react_responsive", "import_react", "import_Styles", "import_shelfDisplay", "import_components", "Specs", "React", "page", "ref", "data", "buildData", "onChange", "isMobile", "active", "setActive", "visibleActive", "setVisibleActive", "innerRef", "locale", "LeftMenu", "RightMenu", "DefaultSelectMenu", "isImageUrl", "urlPath", "path", "skuNode", "product", "index", "findCurrentData", "item", "findSku", "coupon", "price", "basePrice", "DropDown", "normalNode", "v", "productNode", "st", "idx", "isFirstParameter", "currentData", "currentMenus", "childrenNode", "node", "subTitle", "isProduct", "currentProduct", "skus", "currentActive", "sku", "findData", "newActive", "newShowActive"]
7
+ }
@@ -7,7 +7,13 @@
7
7
  */
8
8
  declare const Subscribe: ({ subscribeMetadata, onSubmit, className, }: {
9
9
  subscribeMetadata: any;
10
- onSubmit?: (formData: FormData) => void;
10
+ onSubmit?: ({ email, terms, news, dealsType, onSuccess, }: {
11
+ email: string;
12
+ terms: string;
13
+ news: string;
14
+ dealsType?: string;
15
+ onSuccess?: () => void;
16
+ }) => void;
11
17
  className?: string;
12
18
  }) => import("react/jsx-runtime").JSX.Element;
13
19
  export default Subscribe;
@@ -1,2 +1,11 @@
1
- "use strict";var d=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var k=Object.prototype.hasOwnProperty;var N=(e,a)=>{for(var o in a)d(e,o,{get:a[o],enumerable:!0})},v=(e,a,o,m)=>{if(a&&typeof a=="object"||typeof a=="function")for(let s of u(a))!k.call(e,s)&&s!==o&&d(e,s,{get:()=>a[s],enumerable:!(m=g(a,s))||m.enumerable});return e};var B=e=>v(d({},"__esModule",{value:!0}),e);var D={};N(D,{default:()=>F});module.exports=B(D);var t=require("react/jsx-runtime"),i=require("react"),l=require("../../components/index.js"),f=require("../../helpers/utils.js");const w=({subscribeMetadata:e,onSubmit:a,className:o})=>{const[m,s]=(0,i.useState)(null),[p,x]=(0,i.useState)(null),b=r=>{r.preventDefault();const n=new FormData(r.target),c=n.get("email"),h=n.get("terms");if(!c){s(e?.emptyError);return}if(!/^[a-zA-Z0-9.,%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(c)){s(e?.formatError);return}if(!h){x(e?.termsError);return}a?.(n)};return(0,t.jsxs)("div",{className:(0,f.cn)("laptop:flex-row laptop:gap-4 desktop:flex-col desktop:gap-8 flex flex-col gap-4",o),children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(l.Text,{as:"p",html:e?.title,className:"desktop:text-base text-sm font-bold leading-[1.4] text-white"}),(0,t.jsx)(l.Text,{as:"p",html:e?.subtitle,className:"desktop:mt-2 desktop:text-[32px] mt-1 text-2xl font-bold leading-[1.2] text-white"})]}),(0,t.jsxs)("form",{onSubmit:b,children:[(0,t.jsxs)("div",{className:"desktop:h-[48px] flex h-[38px] items-center",children:[(0,t.jsx)("input",{name:"email",onFocus:()=>s(null),placeholder:e?.placeholder,className:"desktop:text-base tablet:max-w-[320px] laptop:max-w-none h-full flex-1 border border-[#B6B6BA] bg-transparent px-4 text-sm font-bold leading-[1.2] text-white"}),(0,t.jsx)("button",{type:"submit",className:"desktop:px-7 desktop:text-base h-full rounded-none bg-white px-5 text-sm font-bold leading-[1.2] text-black",children:(0,t.jsx)(l.Text,{html:e?.button,className:"text-base font-bold leading-[1.2]"})})]}),m&&(0,t.jsx)(l.Text,{as:"p",html:m,className:"mt-2 text-base font-bold leading-[1.2] text-red-500"}),(0,t.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(l.Checkbox,{name:"terms",id:"terms",size:"base",onCheckedChange:r=>r&&x(null),className:"border-[#B6B6BA] data-[state=checked]:bg-white data-[state=checked]:text-[#1D1D1F]"}),(0,t.jsx)("label",{htmlFor:"terms",children:(0,t.jsx)(l.Text,{as:"p",html:e?.terms,className:"desktop:text-base text-sm font-bold leading-[1.4] text-[#B6B6BA]"})})]}),p&&(0,t.jsx)(l.Text,{as:"p",html:p,className:"text-base font-bold leading-[1.2] text-red-500"}),(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(l.Checkbox,{name:"news",id:"news",size:"base",className:"border-[#B6B6BA] data-[state=checked]:bg-white data-[state=checked]:text-[#1D1D1F]"}),(0,t.jsx)("label",{htmlFor:"news",children:(0,t.jsx)(l.Text,{as:"p",html:e?.news,className:"desktop:text-base text-sm font-bold leading-[1.4] text-[#B6B6BA]"})})]})]})]})]})};var F=w;
1
+ "use strict";var c=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var E=(t,l)=>{for(var o in l)c(t,o,{get:l[o],enumerable:!0})},T=(t,l,o,r)=>{if(l&&typeof l=="object"||typeof l=="function")for(let a of F(l))!y.call(t,a)&&a!==o&&c(t,a,{get:()=>l[a],enumerable:!(r=B(l,a))||r.enumerable});return t};var D=t=>T(c({},"__esModule",{value:!0}),t);var z={};E(z,{default:()=>A});module.exports=D(z);var e=require("react/jsx-runtime"),m=require("react"),s=require("../../components/index.js"),p=require("../../helpers/utils.js");const S=({subscribeMetadata:t,onSubmit:l,className:o})=>{const[r,a]=(0,m.useState)(null),[x,b]=(0,m.useState)(null),[k,f]=(0,m.useState)(!1),[u,g]=(0,m.useState)(""),w=n=>{n.preventDefault();const i=new FormData(n.target),d=i.get("email"),h=i.get("terms"),v=i.get("news");if(!d){a(t?.emptyError);return}if(!/^[a-zA-Z0-9.,%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(d)){a(t?.formatError);return}if(!h){b(t?.termsError);return}l?.({email:d,terms:h,news:v,dealsType:t?.dealsType,onSuccess:()=>{f(!0);let N=setTimeout(()=>{f(!1),clearTimeout(N)},3e3)}})};return(0,e.jsxs)("div",{className:(0,p.cn)("subscribe-component laptop:flex-row laptop:gap-4 desktop:flex-col desktop:gap-8 flex flex-col gap-4",o),children:[(0,e.jsx)("style",{jsx:!0,global:!0,children:`
2
+ .subscribe-component input:-webkit-autofill,
3
+ .subscribe-component input:-webkit-autofill:hover,
4
+ .subscribe-component input:-webkit-autofill:focus {
5
+ -webkit-box-shadow: 0 0 0 1000px transparent inset !important; /* \u80CC\u666F\u900F\u660E */
6
+ -webkit-text-fill-color: #fff !important;
7
+ transition: background-color 9999s ease-in-out 0s !important;
8
+ caret-color: #fff;
9
+ }
10
+ `}),(0,e.jsxs)("div",{className:"laptop:flex-1",children:[(0,e.jsx)(s.Text,{as:"p",html:t?.title,className:"desktop:text-base text-sm font-bold leading-[1.4] text-white"}),(0,e.jsx)(s.Text,{as:"p",html:t?.subtitle,className:"desktop:mt-2 desktop:text-[32px] mt-1 text-2xl font-bold leading-[1.2] text-white"})]}),(0,e.jsxs)("form",{className:"laptop:flex-1",onSubmit:w,children:[(0,e.jsxs)("div",{className:"desktop:h-[48px] flex h-[38px] items-center",children:[(0,e.jsxs)("div",{className:"relative h-full flex-1 tablet:max-w-[320px] laptop:max-w-[404px]",children:[(0,e.jsx)("input",{name:"email",onFocus:()=>a(null),value:u,onChange:n=>g(n.target.value),placeholder:t?.placeholder,className:"desktop:text-base rounded-l-btn rounded-r-none size-full border border-[#B6B6BA] bg-transparent px-4 text-sm font-bold leading-[1.2] text-white"}),(0,e.jsx)("button",{onClick:()=>g(""),className:(0,p.cn)("absolute right-4 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",{hidden:!u}),children:"\u2715"})]}),(0,e.jsx)(s.Button,{type:"submit",className:"desktop:px-7 rounded-r-btn !rounded-l-none desktop:text-base h-full bg-white px-5 text-sm font-bold leading-[1.2] text-black",children:(0,e.jsx)(s.Text,{html:t?.button,className:"text-sm desktop:text-base font-bold leading-[1.2]"})})]}),r&&(0,e.jsx)(s.Text,{as:"p",html:r,className:"mt-2 text-base font-bold leading-[1.2] text-[#F84D4F]"}),(0,e.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[(0,e.jsxs)("div",{className:"flex items-start gap-2",children:[(0,e.jsx)(s.Checkbox,{name:"terms",id:"terms",size:"base",onCheckedChange:n=>n&&b(null),className:"border-[#B6B6BA] data-[state=checked]:bg-white data-[state=checked]:text-[#1D1D1F]"}),(0,e.jsx)("label",{htmlFor:"terms",children:(0,e.jsx)(s.Text,{as:"p",html:t?.terms,className:"desktop:text-base text-sm font-bold leading-[1.4] text-[#B6B6BA]"})})]}),x&&(0,e.jsx)(s.Text,{as:"p",html:x,className:"text-base font-bold leading-[1.2] text-[#F84D4F]"}),(0,e.jsxs)("div",{className:"flex items-start gap-2",children:[(0,e.jsx)(s.Checkbox,{name:"news",id:"news",size:"base",className:"border-[#B6B6BA] data-[state=checked]:bg-white data-[state=checked]:text-[#1D1D1F]"}),(0,e.jsx)("label",{htmlFor:"news",children:(0,e.jsx)(s.Text,{as:"p",html:t?.news,className:"desktop:text-base text-sm font-bold leading-[1.4] text-[#B6B6BA]"})})]}),k&&(0,e.jsx)(s.Text,{as:"p",html:t?.successMessage,className:"text-base text-brand-0 font-bold leading-[1.2]"})]})]})]})};var A=S;
2
11
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Subscribe/index.tsx"],
4
- "sourcesContent": ["import React, { useState } from 'react'\nimport { Text, Checkbox } from '../../components/index.js'\nimport { cn } from '../../helpers/utils.js'\n\n/**\n * Subscribe \u8BA2\u9605\u6A21\u5757\n * @param subscribeMetadata \u8BA2\u9605\u6A21\u5757\u6570\u636E\n * @param onSubmit \u63D0\u4EA4\u4E8B\u4EF6\n * @param className \u7C7B\u540D\n * @returns\n */\nconst Subscribe = ({\n subscribeMetadata,\n onSubmit,\n className,\n}: {\n subscribeMetadata: any\n onSubmit?: (formData: FormData) => void\n className?: string\n}) => {\n const [error, setError] = useState<string | null>(null)\n const [termsError, setTermsError] = useState<string | null>(null)\n\n const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault()\n const formData = new FormData(e.target as HTMLFormElement)\n const email = formData.get('email')\n const terms = formData.get('terms')\n if (!email) {\n setError(subscribeMetadata?.emptyError)\n return\n }\n if (!/^[a-zA-Z0-9.,%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$/.test(email as string)) {\n setError(subscribeMetadata?.formatError)\n return\n }\n if (!terms) {\n setTermsError(subscribeMetadata?.termsError)\n return\n }\n onSubmit?.(formData)\n }\n\n return (\n <div className={cn('laptop:flex-row laptop:gap-4 desktop:flex-col desktop:gap-8 flex flex-col gap-4', className)}>\n <div>\n <Text\n as=\"p\"\n html={subscribeMetadata?.title}\n className=\"desktop:text-base text-sm font-bold leading-[1.4] text-white\"\n />\n <Text\n as=\"p\"\n html={subscribeMetadata?.subtitle}\n className=\"desktop:mt-2 desktop:text-[32px] mt-1 text-2xl font-bold leading-[1.2] text-white\"\n />\n </div>\n <form onSubmit={handleSubmit}>\n <div className=\"desktop:h-[48px] flex h-[38px] items-center\">\n <input\n name=\"email\"\n onFocus={() => setError(null)}\n placeholder={subscribeMetadata?.placeholder}\n className=\"desktop:text-base tablet:max-w-[320px] laptop:max-w-none h-full flex-1 border border-[#B6B6BA] bg-transparent px-4 text-sm font-bold leading-[1.2] text-white\"\n />\n <button\n type=\"submit\"\n className=\"desktop:px-7 desktop:text-base h-full rounded-none bg-white px-5 text-sm font-bold leading-[1.2] text-black\"\n >\n <Text html={subscribeMetadata?.button} className=\"text-base font-bold leading-[1.2]\" />\n </button>\n </div>\n {error && <Text as=\"p\" html={error} className=\"mt-2 text-base font-bold leading-[1.2] text-red-500\" />}\n <div className=\"mt-4 flex flex-col gap-2\">\n <div className=\"flex items-start gap-2\">\n <Checkbox\n name=\"terms\"\n id=\"terms\"\n size=\"base\"\n onCheckedChange={(checked: boolean) => checked && setTermsError(null)}\n className=\"border-[#B6B6BA] data-[state=checked]:bg-white data-[state=checked]:text-[#1D1D1F]\"\n />\n <label htmlFor=\"terms\">\n <Text\n as=\"p\"\n html={subscribeMetadata?.terms}\n className=\"desktop:text-base text-sm font-bold leading-[1.4] text-[#B6B6BA]\"\n />\n </label>\n </div>\n {termsError && <Text as=\"p\" html={termsError} className=\"text-base font-bold leading-[1.2] text-red-500\" />}\n <div className=\"flex items-start gap-2\">\n <Checkbox\n name=\"news\"\n id=\"news\"\n size=\"base\"\n className=\"border-[#B6B6BA] data-[state=checked]:bg-white data-[state=checked]:text-[#1D1D1F]\"\n />\n <label htmlFor=\"news\">\n <Text\n as=\"p\"\n html={subscribeMetadata?.news}\n className=\"desktop:text-base text-sm font-bold leading-[1.4] text-[#B6B6BA]\"\n />\n </label>\n </div>\n </div>\n </form>\n </div>\n )\n}\n\nexport default Subscribe\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA6CM,IAAAI,EAAA,6BA7CNC,EAAgC,iBAChCC,EAA+B,qCAC/BC,EAAmB,kCASnB,MAAMC,EAAY,CAAC,CACjB,kBAAAC,EACA,SAAAC,EACA,UAAAC,CACF,IAIM,CACJ,KAAM,CAACC,EAAOC,CAAQ,KAAI,YAAwB,IAAI,EAChD,CAACC,EAAYC,CAAa,KAAI,YAAwB,IAAI,EAE1DC,EAAgBC,GAAwC,CAC5DA,EAAE,eAAe,EACjB,MAAMC,EAAW,IAAI,SAASD,EAAE,MAAyB,EACnDE,EAAQD,EAAS,IAAI,OAAO,EAC5BE,EAAQF,EAAS,IAAI,OAAO,EAClC,GAAI,CAACC,EAAO,CACVN,EAASJ,GAAmB,UAAU,EACtC,MACF,CACA,GAAI,CAAC,mDAAmD,KAAKU,CAAe,EAAG,CAC7EN,EAASJ,GAAmB,WAAW,EACvC,MACF,CACA,GAAI,CAACW,EAAO,CACVL,EAAcN,GAAmB,UAAU,EAC3C,MACF,CACAC,IAAWQ,CAAQ,CACrB,EAEA,SACE,QAAC,OAAI,aAAW,MAAG,kFAAmFP,CAAS,EAC7G,qBAAC,OACC,oBAAC,QACC,GAAG,IACH,KAAMF,GAAmB,MACzB,UAAU,+DACZ,KACA,OAAC,QACC,GAAG,IACH,KAAMA,GAAmB,SACzB,UAAU,oFACZ,GACF,KACA,QAAC,QAAK,SAAUO,EACd,qBAAC,OAAI,UAAU,8CACb,oBAAC,SACC,KAAK,QACL,QAAS,IAAMH,EAAS,IAAI,EAC5B,YAAaJ,GAAmB,YAChC,UAAU,gKACZ,KACA,OAAC,UACC,KAAK,SACL,UAAU,8GAEV,mBAAC,QAAK,KAAMA,GAAmB,OAAQ,UAAU,oCAAoC,EACvF,GACF,EACCG,MAAS,OAAC,QAAK,GAAG,IAAI,KAAMA,EAAO,UAAU,sDAAsD,KACpG,QAAC,OAAI,UAAU,2BACb,qBAAC,OAAI,UAAU,yBACb,oBAAC,YACC,KAAK,QACL,GAAG,QACH,KAAK,OACL,gBAAkBS,GAAqBA,GAAWN,EAAc,IAAI,EACpE,UAAU,qFACZ,KACA,OAAC,SAAM,QAAQ,QACb,mBAAC,QACC,GAAG,IACH,KAAMN,GAAmB,MACzB,UAAU,mEACZ,EACF,GACF,EACCK,MAAc,OAAC,QAAK,GAAG,IAAI,KAAMA,EAAY,UAAU,iDAAiD,KACzG,QAAC,OAAI,UAAU,yBACb,oBAAC,YACC,KAAK,OACL,GAAG,OACH,KAAK,OACL,UAAU,qFACZ,KACA,OAAC,SAAM,QAAQ,OACb,mBAAC,QACC,GAAG,IACH,KAAML,GAAmB,KACzB,UAAU,mEACZ,EACF,GACF,GACF,GACF,GACF,CAEJ,EAEA,IAAOP,EAAQM",
6
- "names": ["Subscribe_exports", "__export", "Subscribe_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_utils", "Subscribe", "subscribeMetadata", "onSubmit", "className", "error", "setError", "termsError", "setTermsError", "handleSubmit", "e", "formData", "email", "terms", "checked"]
4
+ "sourcesContent": ["import React, { useState } from 'react'\nimport { Text, Checkbox, Button } from '../../components/index.js'\nimport { cn } from '../../helpers/utils.js'\n\n/**\n * Subscribe \u8BA2\u9605\u6A21\u5757\n * @param subscribeMetadata \u8BA2\u9605\u6A21\u5757\u6570\u636E\n * @param onSubmit \u63D0\u4EA4\u4E8B\u4EF6\n * @param className \u7C7B\u540D\n * @returns\n */\nconst Subscribe = ({\n subscribeMetadata,\n onSubmit,\n className,\n}: {\n subscribeMetadata: any\n onSubmit?: ({\n email,\n terms,\n news,\n dealsType,\n onSuccess,\n }: {\n email: string\n terms: string\n news: string\n dealsType?: string\n onSuccess?: () => void\n }) => void\n className?: string\n}) => {\n const [error, setError] = useState<string | null>(null)\n const [termsError, setTermsError] = useState<string | null>(null)\n const [success, setSuccess] = useState<boolean>(false)\n const [email, setEmail] = useState<string>('')\n\n const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault()\n const formData = new FormData(e.target as HTMLFormElement)\n const email = formData.get('email')\n const terms = formData.get('terms')\n const news = formData.get('news')\n if (!email) {\n setError(subscribeMetadata?.emptyError)\n return\n }\n if (!/^[a-zA-Z0-9.,%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$/.test(email as string)) {\n setError(subscribeMetadata?.formatError)\n return\n }\n if (!terms) {\n setTermsError(subscribeMetadata?.termsError)\n return\n }\n onSubmit?.({\n email: email as string,\n terms: terms as string,\n news: news as string,\n dealsType: subscribeMetadata?.dealsType,\n onSuccess: () => {\n setSuccess(true)\n let timer = setTimeout(() => {\n setSuccess(false)\n clearTimeout(timer)\n }, 3000)\n },\n })\n }\n\n return (\n <div\n className={cn(\n 'subscribe-component laptop:flex-row laptop:gap-4 desktop:flex-col desktop:gap-8 flex flex-col gap-4',\n className\n )}\n >\n <style jsx global>\n {`\n .subscribe-component input:-webkit-autofill,\n .subscribe-component input:-webkit-autofill:hover,\n .subscribe-component input:-webkit-autofill:focus {\n -webkit-box-shadow: 0 0 0 1000px transparent inset !important; /* \u80CC\u666F\u900F\u660E */\n -webkit-text-fill-color: #fff !important;\n transition: background-color 9999s ease-in-out 0s !important;\n caret-color: #fff;\n }\n `}\n </style>\n <div className=\"laptop:flex-1\">\n <Text\n as=\"p\"\n html={subscribeMetadata?.title}\n className=\"desktop:text-base text-sm font-bold leading-[1.4] text-white\"\n />\n <Text\n as=\"p\"\n html={subscribeMetadata?.subtitle}\n className=\"desktop:mt-2 desktop:text-[32px] mt-1 text-2xl font-bold leading-[1.2] text-white\"\n />\n </div>\n <form className=\"laptop:flex-1\" onSubmit={handleSubmit}>\n <div className=\"desktop:h-[48px] flex h-[38px] items-center\">\n <div className=\"relative h-full flex-1 tablet:max-w-[320px] laptop:max-w-[404px]\">\n <input\n name=\"email\"\n onFocus={() => setError(null)}\n value={email}\n onChange={e => setEmail(e.target.value)}\n placeholder={subscribeMetadata?.placeholder}\n className=\"desktop:text-base rounded-l-btn rounded-r-none size-full border border-[#B6B6BA] bg-transparent px-4 text-sm font-bold leading-[1.2] text-white\"\n />\n <button\n onClick={() => setEmail('')}\n className={cn('absolute right-4 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600', {\n hidden: !email,\n })}\n >\n \u2715\n </button>\n </div>\n <Button\n type=\"submit\"\n className=\"desktop:px-7 rounded-r-btn !rounded-l-none desktop:text-base h-full bg-white px-5 text-sm font-bold leading-[1.2] text-black\"\n >\n <Text html={subscribeMetadata?.button} className=\"text-sm desktop:text-base font-bold leading-[1.2]\" />\n </Button>\n </div>\n {error && <Text as=\"p\" html={error} className=\"mt-2 text-base font-bold leading-[1.2] text-[#F84D4F]\" />}\n <div className=\"mt-4 flex flex-col gap-2\">\n <div className=\"flex items-start gap-2\">\n <Checkbox\n name=\"terms\"\n id=\"terms\"\n size=\"base\"\n onCheckedChange={(checked: boolean) => checked && setTermsError(null)}\n className=\"border-[#B6B6BA] data-[state=checked]:bg-white data-[state=checked]:text-[#1D1D1F]\"\n />\n <label htmlFor=\"terms\">\n <Text\n as=\"p\"\n html={subscribeMetadata?.terms}\n className=\"desktop:text-base text-sm font-bold leading-[1.4] text-[#B6B6BA]\"\n />\n </label>\n </div>\n {termsError && <Text as=\"p\" html={termsError} className=\"text-base font-bold leading-[1.2] text-[#F84D4F]\" />}\n <div className=\"flex items-start gap-2\">\n <Checkbox\n name=\"news\"\n id=\"news\"\n size=\"base\"\n className=\"border-[#B6B6BA] data-[state=checked]:bg-white data-[state=checked]:text-[#1D1D1F]\"\n />\n <label htmlFor=\"news\">\n <Text\n as=\"p\"\n html={subscribeMetadata?.news}\n className=\"desktop:text-base text-sm font-bold leading-[1.4] text-[#B6B6BA]\"\n />\n </label>\n </div>\n {success && (\n <Text\n as=\"p\"\n html={subscribeMetadata?.successMessage}\n className=\"text-base text-brand-0 font-bold leading-[1.2]\"\n />\n )}\n </div>\n </form>\n </div>\n )\n}\n\nexport default Subscribe\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA6EM,IAAAI,EAAA,6BA7ENC,EAAgC,iBAChCC,EAAuC,qCACvCC,EAAmB,kCASnB,MAAMC,EAAY,CAAC,CACjB,kBAAAC,EACA,SAAAC,EACA,UAAAC,CACF,IAgBM,CACJ,KAAM,CAACC,EAAOC,CAAQ,KAAI,YAAwB,IAAI,EAChD,CAACC,EAAYC,CAAa,KAAI,YAAwB,IAAI,EAC1D,CAACC,EAASC,CAAU,KAAI,YAAkB,EAAK,EAC/C,CAACC,EAAOC,CAAQ,KAAI,YAAiB,EAAE,EAEvCC,EAAgBC,GAAwC,CAC5DA,EAAE,eAAe,EACjB,MAAMC,EAAW,IAAI,SAASD,EAAE,MAAyB,EACnDH,EAAQI,EAAS,IAAI,OAAO,EAC5BC,EAAQD,EAAS,IAAI,OAAO,EAC5BE,EAAOF,EAAS,IAAI,MAAM,EAChC,GAAI,CAACJ,EAAO,CACVL,EAASJ,GAAmB,UAAU,EACtC,MACF,CACA,GAAI,CAAC,mDAAmD,KAAKS,CAAe,EAAG,CAC7EL,EAASJ,GAAmB,WAAW,EACvC,MACF,CACA,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ACpE,UAAU,qFACZ,KACA,OAAC,SAAM,QAAQ,QACb,mBAAC,QACC,GAAG,IACH,KAAMN,GAAmB,MACzB,UAAU,mEACZ,EACF,GACF,EACCK,MAAc,OAAC,QAAK,GAAG,IAAI,KAAMA,EAAY,UAAU,mDAAmD,KAC3G,QAAC,OAAI,UAAU,yBACb,oBAAC,YACC,KAAK,OACL,GAAG,OACH,KAAK,OACL,UAAU,qFACZ,KACA,OAAC,SAAM,QAAQ,OACb,mBAAC,QACC,GAAG,IACH,KAAML,GAAmB,KACzB,UAAU,mEACZ,EACF,GACF,EACCO,MACC,OAAC,QACC,GAAG,IACH,KAAMP,GAAmB,eACzB,UAAU,iDACZ,GAEJ,GACF,GACF,CAEJ,EAEA,IAAOP,EAAQM",
6
+ "names": ["Subscribe_exports", "__export", "Subscribe_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_utils", "Subscribe", "subscribeMetadata", "onSubmit", "className", "error", "setError", "termsError", "setTermsError", "success", "setSuccess", "email", "setEmail", "handleSubmit", "e", "formData", "terms", "news", "timer", "checked"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var L=Object.create;var l=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty;var D=(e,i)=>{for(var s in i)l(e,s,{get:i[s],enumerable:!0})},b=(e,i,s,m)=>{if(i&&typeof i=="object"||typeof i=="function")for(let o of q(i))!B.call(e,o)&&o!==s&&l(e,o,{get:()=>i[o],enumerable:!(m=G(i,o))||m.enumerable});return e};var t=(e,i,s)=>(s=e!=null?L(w(e)):{},b(i||!e||!e.__esModule?l(s,"default",{value:e,enumerable:!0}):s,e)),M=e=>b(l({},"__esModule",{value:!0}),e);var E={};D(E,{default:()=>A});module.exports=M(E);var r=require("react/jsx-runtime"),f=require("../../shared/Styles.js"),p=t(require("../../components/tabs.js")),u=require("../../helpers/index.js"),n=t(require("react")),d=t(require("../ShelfDisplay/index.js")),y=t(require("../AccordionCards/index.js")),k=t(require("../Faq/index.js")),N=t(require("../MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js")),h=t(require("../Title/index.js")),g=t(require("../Graphic/index.js"));const R=n.default.forwardRef(({data:e,className:i},s)=>{const{theme:m,shape:o,align:v,tabs:c,sectionTitle:T}=e,P=a=>a?.blockType==="ipc-shelfdisplay"?(0,r.jsx)(d.default,{data:a}):a?.blockType==="ipc-multiLayoutGraphicBlock"?(0,r.jsx)(N.default,{data:a}):a?.blockType==="ipc-accordioncards"?(0,r.jsx)(y.default,{data:a}):a?.blockType==="ipc-faq"?(0,r.jsx)(k.default,{data:a}):a?.blockType==="ipc-graphic"?(0,r.jsx)(g.default,{data:a}):null;return(0,r.jsxs)("section",{ref:s,className:(0,u.cn)(m==="dark"?"aiui-dark":"",i),children:[T&&(0,r.jsx)(h.default,{className:"section-title",data:{title:T}}),(0,r.jsxs)(p.Tabs,{shape:o,align:v,defaultValue:c[0].tabName,children:[(0,r.jsx)(p.TabsList,{className:"tabs-list",children:c.map(a=>(0,r.jsx)(p.TabsTrigger,{value:a.tabName,className:"tabs-trigger",children:a.tabName},a.tabName))}),c.map(a=>(0,r.jsx)(p.TabsContent,{value:a.tabName,className:"tabs-content",children:a.tabContent?.[0]?P(a.tabContent?.[0]):null},a.tabName))]})]})});var A=(0,f.withLayout)(R);
1
+ "use strict";"use client";var L=Object.create;var l=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty;var D=(e,i)=>{for(var s in i)l(e,s,{get:i[s],enumerable:!0})},b=(e,i,s,m)=>{if(i&&typeof i=="object"||typeof i=="function")for(let o of q(i))!B.call(e,o)&&o!==s&&l(e,o,{get:()=>i[o],enumerable:!(m=G(i,o))||m.enumerable});return e};var t=(e,i,s)=>(s=e!=null?L(w(e)):{},b(i||!e||!e.__esModule?l(s,"default",{value:e,enumerable:!0}):s,e)),M=e=>b(l({},"__esModule",{value:!0}),e);var A={};D(A,{default:()=>x});module.exports=M(A);var r=require("react/jsx-runtime"),f=require("../../shared/Styles.js"),p=t(require("../../components/tabs.js")),u=require("../../helpers/index.js"),n=t(require("react")),d=t(require("../ShelfDisplay/index.js")),y=t(require("../AccordionCards/index.js")),k=t(require("../Faq/index.js")),N=t(require("../MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js")),h=t(require("../Title/index.js")),g=t(require("../Graphic/index.js"));const R=n.default.forwardRef(({data:e,className:i},s)=>{const{theme:m,shape:o,align:v,tabs:c,sectionTitle:T}=e,P=a=>a?.blockType==="ipc-shelfdisplay"?(0,r.jsx)(d.default,{data:a}):a?.blockType==="ipc-multiLayoutGraphicBlock"?(0,r.jsx)(N.default,{data:a}):a?.blockType==="ipc-accordioncards"?(0,r.jsx)(y.default,{data:a}):a?.blockType==="ipc-faq"?(0,r.jsx)(k.default,{data:a}):a?.blockType==="ipc-graphic"?(0,r.jsx)(g.default,{data:a}):null;return(0,r.jsxs)("section",{ref:s,className:(0,u.cn)(m==="dark"?"aiui-dark":"",i),children:[T&&(0,r.jsx)(h.default,{className:"section-title",data:{title:T}}),(0,r.jsxs)(p.Tabs,{shape:o,align:v,defaultValue:c[0].tabName,children:[(0,r.jsx)(p.TabsList,{className:"tabs-list",children:c.map(a=>(0,r.jsx)(p.TabsTrigger,{value:a.tabName,className:"tabs-trigger",children:a.tabName},a.tabName))}),c.map(a=>(0,r.jsx)(p.TabsContent,{value:a.tabName,className:"tabs-content mt-[24px]",children:a.tabContent?.[0]?P(a.tabContent?.[0]):null},a.tabName))]})]})});var x=(0,f.withLayout)(R);
2
2
  //# sourceMappingURL=Tabs.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Tabs/Tabs.tsx"],
4
- "sourcesContent": ["'use client'\nimport { withLayout } from '../../shared/Styles.js'\nimport * as TabsPrimitive from '../../components/tabs.js'\nimport { cn } from '../../helpers/index.js'\nimport type { TabsProps } from './types.js'\nimport React from 'react'\nimport ShelfDisplay from '../ShelfDisplay/index.js'\nimport AccordionCards from '../AccordionCards/index.js'\nimport Faq from '../Faq/index.js'\nimport MultiLayoutGraphicBlock from '../MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js'\nimport Title from '../Title/index.js'\nimport Graphic from '../Graphic/index.js'\n\nconst Tabs = React.forwardRef<HTMLDivElement, TabsProps>(({ data, className }, forwardedRef) => {\n const { theme, shape, align, tabs, sectionTitle } = data\n\n const renderTabContent = (tabContent: TabsProps['data']['tabs'][number]['tabContent'][number]) => {\n if (tabContent?.blockType === 'ipc-shelfdisplay') {\n return <ShelfDisplay data={tabContent} />\n } else if (tabContent?.blockType === 'ipc-multiLayoutGraphicBlock') {\n return <MultiLayoutGraphicBlock data={tabContent} />\n } else if (tabContent?.blockType === 'ipc-accordioncards') {\n return <AccordionCards data={tabContent} />\n } else if (tabContent?.blockType === 'ipc-faq') {\n return <Faq data={tabContent} />\n } else if (tabContent?.blockType === 'ipc-graphic') {\n return <Graphic data={tabContent} />\n } else {\n return null\n }\n }\n\n return (\n <section ref={forwardedRef} className={cn(theme === 'dark' ? 'aiui-dark' : '', className)}>\n {sectionTitle && <Title className=\"section-title\" data={{ title: sectionTitle }} />}\n <TabsPrimitive.Tabs shape={shape} align={align} defaultValue={tabs[0].tabName}>\n <TabsPrimitive.TabsList className=\"tabs-list\">\n {tabs.map(tab => (\n <TabsPrimitive.TabsTrigger key={tab.tabName} value={tab.tabName} className=\"tabs-trigger\">\n {tab.tabName}\n </TabsPrimitive.TabsTrigger>\n ))}\n </TabsPrimitive.TabsList>\n {tabs.map(tab => (\n <TabsPrimitive.TabsContent key={tab.tabName} value={tab.tabName} className=\"tabs-content\">\n {tab.tabContent?.[0] ? renderTabContent(tab.tabContent?.[0]) : null}\n </TabsPrimitive.TabsContent>\n ))}\n </TabsPrimitive.Tabs>\n </section>\n )\n})\n\nexport default withLayout(T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AAI,OAEpC,CACD,EACH,EACCV,EAAK,IAAIU,MACR,OAAC3B,EAAc,YAAd,CAA4C,MAAO2B,EAAI,QAAS,UAAU,eACxE,SAAAA,EAAI,aAAa,CAAC,EAAIR,EAAiBQ,EAAI,aAAa,CAAC,CAAC,EAAI,MADjCA,EAAI,OAEpC,CACD,GACH,GACF,CAEJ,CAAC,EAED,IAAO/B,KAAQ,cAAWa,CAAI",
4
+ "sourcesContent": ["'use client'\nimport { withLayout } from '../../shared/Styles.js'\nimport * as TabsPrimitive from '../../components/tabs.js'\nimport { cn } from '../../helpers/index.js'\nimport type { TabsProps } from './types.js'\nimport React from 'react'\nimport ShelfDisplay from '../ShelfDisplay/index.js'\nimport AccordionCards from '../AccordionCards/index.js'\nimport Faq from '../Faq/index.js'\nimport MultiLayoutGraphicBlock from '../MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js'\nimport Title from '../Title/index.js'\nimport Graphic from '../Graphic/index.js'\n\nconst Tabs = React.forwardRef<HTMLDivElement, TabsProps>(({ data, className }, forwardedRef) => {\n const { theme, shape, align, tabs, sectionTitle } = data\n\n const renderTabContent = (tabContent: TabsProps['data']['tabs'][number]['tabContent'][number]) => {\n if (tabContent?.blockType === 'ipc-shelfdisplay') {\n return <ShelfDisplay data={tabContent} />\n } else if (tabContent?.blockType === 'ipc-multiLayoutGraphicBlock') {\n return <MultiLayoutGraphicBlock data={tabContent} />\n } else if (tabContent?.blockType === 'ipc-accordioncards') {\n return <AccordionCards data={tabContent} />\n } else if (tabContent?.blockType === 'ipc-faq') {\n return <Faq data={tabContent} />\n } else if (tabContent?.blockType === 'ipc-graphic') {\n return <Graphic data={tabContent} />\n } else {\n return null\n }\n }\n\n return (\n <section ref={forwardedRef} className={cn(theme === 'dark' ? 'aiui-dark' : '', className,)}>\n {sectionTitle && <Title className=\"section-title\" data={{ title: sectionTitle }} />}\n <TabsPrimitive.Tabs shape={shape} align={align} defaultValue={tabs[0].tabName}>\n <TabsPrimitive.TabsList className=\"tabs-list\">\n {tabs.map(tab => (\n <TabsPrimitive.TabsTrigger key={tab.tabName} value={tab.tabName} className=\"tabs-trigger\">\n {tab.tabName}\n </TabsPrimitive.TabsTrigger>\n ))}\n </TabsPrimitive.TabsList>\n {tabs.map(tab => (\n <TabsPrimitive.TabsContent key={tab.tabName} value={tab.tabName} className=\"tabs-content mt-[24px]\">\n {tab.tabContent?.[0] ? renderTabContent(tab.tabContent?.[0]) : null}\n </TabsPrimitive.TabsContent>\n ))}\n </TabsPrimitive.Tabs>\n </section>\n )\n})\n\nexport default withLayout(Tabs)\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAkBa,IAAAI,EAAA,6BAjBbC,EAA2B,kCAC3BC,EAA+B,uCAC/BC,EAAmB,kCAEnBC,EAAkB,oBAClBC,EAAyB,uCACzBC,EAA2B,yCAC3BC,EAAgB,8BAChBC,EAAoC,oEACpCC,EAAkB,gCAClBC,EAAoB,kCAEpB,MAAMC,EAAO,EAAAC,QAAM,WAAsC,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAiB,CAC9F,KAAM,CAAE,MAAAC,EAAO,MAAAC,EAAO,MAAAC,EAAO,KAAAC,EAAM,aAAAC,CAAa,EAAIP,EAE9CQ,EAAoBC,GACpBA,GAAY,YAAc,sBACrB,OAAC,EAAAC,QAAA,CAAa,KAAMD,EAAY,EAC9BA,GAAY,YAAc,iCAC5B,OAAC,EAAAE,QAAA,CAAwB,KAAMF,EAAY,EACzCA,GAAY,YAAc,wBAC5B,OAAC,EAAAG,QAAA,CAAe,KAAMH,EAAY,EAChCA,GAAY,YAAc,aAC5B,OAAC,EAAAI,QAAA,CAAI,KAAMJ,EAAY,EACrBA,GAAY,YAAc,iBAC5B,OAAC,EAAAK,QAAA,CAAQ,KAAML,EAAY,EAE3B,KAIX,SACE,QAAC,WAAQ,IAAKP,EAAc,aAAW,MAAGC,IAAU,OAAS,YAAc,GAAIF,CAAU,EACtF,UAAAM,MAAgB,OAAC,EAAAQ,QAAA,CAAM,UAAU,gBAAgB,KAAM,CAAE,MAAOR,CAAa,EAAG,KACjF,QAAClB,EAAc,KAAd,CAAmB,MAAOe,EAAO,MAAOC,EAAO,aAAcC,EAAK,CAAC,EAAE,QACpE,oBAACjB,EAAc,SAAd,CAAuB,UAAU,YAC/B,SAAAiB,EAAK,IAAIU,MACR,OAAC3B,EAAc,YAAd,CAA4C,MAAO2B,EAAI,QAAS,UAAU,eACxE,SAAAA,EAAI,SADyBA,EAAI,OAEpC,CACD,EACH,EACCV,EAAK,IAAIU,MACR,OAAC3B,EAAc,YAAd,CAA4C,MAAO2B,EAAI,QAAS,UAAU,yBACxE,SAAAA,EAAI,aAAa,CAAC,EAAIR,EAAiBQ,EAAI,aAAa,CAAC,CAAC,EAAI,MADjCA,EAAI,OAEpC,CACD,GACH,GACF,CAEJ,CAAC,EAED,IAAO/B,KAAQ,cAAWa,CAAI",
6
6
  "names": ["Tabs_exports", "__export", "Tabs_default", "__toCommonJS", "import_jsx_runtime", "import_Styles", "TabsPrimitive", "import_helpers", "import_react", "import_ShelfDisplay", "import_AccordionCards", "import_Faq", "import_MultiLayoutGraphicBlock", "import_Title", "import_Graphic", "Tabs", "React", "data", "className", "forwardedRef", "theme", "shape", "align", "tabs", "sectionTitle", "renderTabContent", "tabContent", "ShelfDisplay", "MultiLayoutGraphicBlock", "AccordionCards", "Faq", "Graphic", "Title", "tab"]
7
7
  }
@@ -0,0 +1,7 @@
1
+ import type { TabsGroupProps } from './types.js';
2
+ import React from 'react';
3
+ declare const _default: React.ForwardRefExoticComponent<Omit<Omit<TabsGroupProps & React.RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
4
+ className?: string;
5
+ data?: Record<string, any>;
6
+ }, "ref"> & React.RefAttributes<any>>;
7
+ export default _default;
@@ -0,0 +1,2 @@
1
+ "use strict";"use client";var N=Object.create;var o=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty;var h=(a,e)=>{for(var s in e)o(a,s,{get:e[s],enumerable:!0})},n=(a,e,s,m)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of v(e))!d.call(a,i)&&i!==s&&o(a,i,{get:()=>e[i],enumerable:!(m=g(e,i))||m.enumerable});return a};var p=(a,e,s)=>(s=a!=null?N(P(a)):{},n(e||!a||!a.__esModule?o(s,"default",{value:a,enumerable:!0}):s,a)),y=a=>n(o({},"__esModule",{value:!0}),a);var C={};h(C,{default:()=>L});module.exports=y(C);var r=require("react/jsx-runtime"),l=require("../../shared/Styles.js"),b=p(require("../../components/tabs.js")),c=require("../../helpers/index.js"),u=p(require("react"));const k=u.default.forwardRef(({data:a,className:e},s)=>{const{theme:m,shape:i,align:f,tabs:T}=a;return(0,r.jsx)("section",{ref:s,className:(0,c.cn)(m==="dark"?"aiui-dark":"",e),children:(0,r.jsxs)(b.Tabs,{shape:i,align:f,defaultValue:T[0].tabName,children:[(0,r.jsx)(b.TabsList,{className:"tabs-list",children:T.map(t=>(0,r.jsx)(b.TabsTrigger,{value:t.tabName,className:"tabs-trigger",children:t.tabName},t.tabName))}),T.map(t=>(0,r.jsx)(b.TabsContent,{value:t.tabName,className:"tabs-content",children:t.children(t.tabContent?.[0])},t.tabName))]})})});var L=(0,l.withLayout)(k);
2
+ //# sourceMappingURL=index.js.map