@anker-in/headless-ui 1.0.13 → 1.0.15-alpha.1758628142544

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 (479) hide show
  1. package/dist/cjs/biz-components/AccordionCards/index.js +1 -1
  2. package/dist/cjs/biz-components/AccordionCards/index.js.map +2 -2
  3. package/dist/cjs/biz-components/AiuiProvider/index.d.ts +1 -0
  4. package/dist/cjs/biz-components/AiuiProvider/index.js +1 -1
  5. package/dist/cjs/biz-components/AiuiProvider/index.js.map +3 -3
  6. package/dist/cjs/biz-components/BrandEquity/BrandEquity.js +1 -1
  7. package/dist/cjs/biz-components/BrandEquity/BrandEquity.js.map +2 -2
  8. package/dist/cjs/biz-components/Category/index.js +1 -1
  9. package/dist/cjs/biz-components/Category/index.js.map +2 -2
  10. package/dist/cjs/biz-components/CollectionsFilters/AnimatedUL.d.ts +9 -0
  11. package/dist/cjs/biz-components/CollectionsFilters/AnimatedUL.js +2 -0
  12. package/dist/cjs/biz-components/CollectionsFilters/AnimatedUL.js.map +7 -0
  13. package/dist/cjs/biz-components/CollectionsFilters/index.d.ts +1 -0
  14. package/dist/cjs/biz-components/CollectionsFilters/index.js +2 -0
  15. package/dist/cjs/biz-components/CollectionsFilters/index.js.map +7 -0
  16. package/dist/cjs/biz-components/CreativeModule/index.js +1 -1
  17. package/dist/cjs/biz-components/CreativeModule/index.js.map +2 -2
  18. package/dist/cjs/biz-components/Evaluate/index.js +1 -1
  19. package/dist/cjs/biz-components/Evaluate/index.js.map +2 -2
  20. package/dist/cjs/biz-components/Faq/Faq.js +1 -1
  21. package/dist/cjs/biz-components/Faq/Faq.js.map +1 -1
  22. package/dist/cjs/biz-components/FooterNavigation/index.js +1 -1
  23. package/dist/cjs/biz-components/FooterNavigation/index.js.map +3 -3
  24. package/dist/cjs/biz-components/FooterNavigation/types.d.ts +2 -1
  25. package/dist/cjs/biz-components/FooterNavigation/types.js +1 -1
  26. package/dist/cjs/biz-components/FooterNavigation/types.js.map +2 -2
  27. package/dist/cjs/biz-components/Graphic/index.js +1 -1
  28. package/dist/cjs/biz-components/Graphic/index.js.map +2 -2
  29. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.js +1 -1
  30. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.js.map +2 -2
  31. package/dist/cjs/biz-components/HeaderNavigation/NavProvider.d.ts +6 -5
  32. package/dist/cjs/biz-components/HeaderNavigation/NavProvider.js +1 -1
  33. package/dist/cjs/biz-components/HeaderNavigation/NavProvider.js.map +3 -3
  34. package/dist/cjs/biz-components/HeaderNavigation/icons/Polygon.d.ts +3 -0
  35. package/dist/cjs/biz-components/HeaderNavigation/icons/Polygon.js +2 -0
  36. package/dist/cjs/biz-components/HeaderNavigation/icons/Polygon.js.map +7 -0
  37. package/dist/cjs/biz-components/HeaderNavigation/icons/index.d.ts +2 -1
  38. package/dist/cjs/biz-components/HeaderNavigation/icons/index.js +1 -1
  39. package/dist/cjs/biz-components/HeaderNavigation/icons/index.js.map +3 -3
  40. package/dist/cjs/biz-components/HeaderNavigation/index.js +1 -1
  41. package/dist/cjs/biz-components/HeaderNavigation/index.js.map +3 -3
  42. package/dist/cjs/biz-components/HeaderNavigation/types.d.ts +8 -1
  43. package/dist/cjs/biz-components/HeaderNavigation/types.js +1 -1
  44. package/dist/cjs/biz-components/HeaderNavigation/types.js.map +2 -2
  45. package/dist/cjs/biz-components/HeaderNavigation/withCategory.d.ts +1 -1
  46. package/dist/cjs/biz-components/HeaderNavigation/withCategory.js +1 -1
  47. package/dist/cjs/biz-components/HeaderNavigation/withCategory.js.map +3 -3
  48. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
  49. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +2 -2
  50. package/dist/cjs/biz-components/Listing/ProductProvider.d.ts +52 -0
  51. package/dist/cjs/biz-components/Listing/ProductProvider.js +2 -0
  52. package/dist/cjs/biz-components/Listing/ProductProvider.js.map +7 -0
  53. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTabs/index.d.ts +5 -0
  54. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTabs/index.js +2 -0
  55. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTabs/index.js.map +7 -0
  56. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +2 -0
  57. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +2 -0
  58. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +7 -0
  59. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +2 -0
  60. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +2 -0
  61. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +7 -0
  62. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +3 -0
  63. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +2 -0
  64. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +7 -0
  65. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +2 -0
  66. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js +2 -0
  67. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js.map +7 -0
  68. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/index.d.ts +2 -0
  69. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/index.js +2 -0
  70. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/index.js.map +7 -0
  71. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/types.d.ts +53 -0
  72. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/types.js +2 -0
  73. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/types.js.map +7 -0
  74. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.d.ts +2 -0
  75. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +2 -0
  76. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +7 -0
  77. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.d.ts +21 -0
  78. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js +2 -0
  79. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js.map +7 -0
  80. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.d.ts +5 -0
  81. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js +2 -0
  82. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js.map +7 -0
  83. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.d.ts +1 -0
  84. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js +2 -0
  85. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js.map +7 -0
  86. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +3 -0
  87. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js +2 -0
  88. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +7 -0
  89. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/types.d.ts +35 -0
  90. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/types.js +2 -0
  91. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/types.js.map +7 -0
  92. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +3 -0
  93. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js +2 -0
  94. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +7 -0
  95. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/types.d.ts +2 -0
  96. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/types.js +2 -0
  97. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/types.js.map +7 -0
  98. package/dist/cjs/biz-components/Listing/components/ProductCard/index.d.ts +2 -0
  99. package/dist/cjs/biz-components/Listing/components/ProductCard/index.js +2 -0
  100. package/dist/cjs/biz-components/Listing/components/ProductCard/index.js.map +7 -0
  101. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.d.ts +2 -0
  102. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +2 -0
  103. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +7 -0
  104. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.d.ts +4 -0
  105. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js +2 -0
  106. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js.map +7 -0
  107. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.d.ts +10 -0
  108. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js +2 -0
  109. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js.map +7 -0
  110. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.d.ts +3 -0
  111. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js +2 -0
  112. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js.map +7 -0
  113. package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.d.ts +20 -0
  114. package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.js +2 -0
  115. package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.js.map +7 -0
  116. package/dist/cjs/biz-components/Listing/components/index.d.ts +3 -0
  117. package/dist/cjs/biz-components/Listing/components/index.js +2 -0
  118. package/dist/cjs/biz-components/Listing/components/index.js.map +7 -0
  119. package/dist/cjs/biz-components/Listing/const.d.ts +28 -0
  120. package/dist/cjs/biz-components/Listing/const.js +2 -0
  121. package/dist/cjs/biz-components/Listing/const.js.map +7 -0
  122. package/dist/cjs/biz-components/Listing/hooks/use-options.d.ts +3 -0
  123. package/dist/cjs/biz-components/Listing/hooks/use-options.js +2 -0
  124. package/dist/cjs/biz-components/Listing/hooks/use-options.js.map +7 -0
  125. package/dist/cjs/biz-components/Listing/hooks/use-variant-media.d.ts +14 -0
  126. package/dist/cjs/biz-components/Listing/hooks/use-variant-media.js +2 -0
  127. package/dist/cjs/biz-components/Listing/hooks/use-variant-media.js.map +7 -0
  128. package/dist/cjs/biz-components/Listing/hooks/use-variant.d.ts +5 -0
  129. package/dist/cjs/biz-components/Listing/hooks/use-variant.js +2 -0
  130. package/dist/cjs/biz-components/Listing/hooks/use-variant.js.map +7 -0
  131. package/dist/cjs/biz-components/Listing/hooks/useCopy.d.ts +8 -0
  132. package/dist/cjs/biz-components/Listing/hooks/useCopy.js +2 -0
  133. package/dist/cjs/biz-components/Listing/hooks/useCopy.js.map +7 -0
  134. package/dist/cjs/biz-components/Listing/index.d.ts +3 -0
  135. package/dist/cjs/biz-components/Listing/index.js +2 -0
  136. package/dist/cjs/biz-components/Listing/index.js.map +7 -0
  137. package/dist/cjs/biz-components/Listing/types/graphql.d.ts +7473 -0
  138. package/dist/cjs/biz-components/Listing/types/graphql.js +2 -0
  139. package/dist/cjs/biz-components/Listing/types/graphql.js.map +7 -0
  140. package/dist/cjs/biz-components/Listing/types/product.d.ts +139 -0
  141. package/dist/cjs/biz-components/Listing/types/product.js +2 -0
  142. package/dist/cjs/biz-components/Listing/types/product.js.map +7 -0
  143. package/dist/cjs/biz-components/Listing/types/productMetafields.d.js +2 -0
  144. package/dist/cjs/biz-components/Listing/types/productMetafields.d.js.map +7 -0
  145. package/dist/cjs/biz-components/Listing/types/type-helper.d.ts +5 -0
  146. package/dist/cjs/biz-components/Listing/types/type-helper.js +2 -0
  147. package/dist/cjs/biz-components/Listing/types/type-helper.js.map +7 -0
  148. package/dist/cjs/biz-components/Listing/types.d.ts +21 -0
  149. package/dist/cjs/biz-components/Listing/types.js +2 -0
  150. package/dist/cjs/biz-components/Listing/types.js.map +7 -0
  151. package/dist/cjs/biz-components/Listing/utils/helper.d.ts +21 -0
  152. package/dist/cjs/biz-components/Listing/utils/helper.js +2 -0
  153. package/dist/cjs/biz-components/Listing/utils/helper.js.map +7 -0
  154. package/dist/cjs/biz-components/Listing/utils/index.d.ts +37 -0
  155. package/dist/cjs/biz-components/Listing/utils/index.js +2 -0
  156. package/dist/cjs/biz-components/Listing/utils/index.js.map +7 -0
  157. package/dist/cjs/biz-components/MediaPlayerMulti/index.js +1 -1
  158. package/dist/cjs/biz-components/MediaPlayerMulti/index.js.map +2 -2
  159. package/dist/cjs/biz-components/MemberEquity/index.js +2 -2
  160. package/dist/cjs/biz-components/MemberEquity/index.js.map +2 -2
  161. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  162. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
  163. package/dist/cjs/biz-components/NavigationSearch/index.d.ts +4 -0
  164. package/dist/cjs/biz-components/NavigationSearch/index.js +2 -0
  165. package/dist/cjs/biz-components/NavigationSearch/index.js.map +7 -0
  166. package/dist/cjs/biz-components/NavigationSearch/types.d.ts +12 -0
  167. package/dist/cjs/biz-components/NavigationSearch/types.js +2 -0
  168. package/dist/cjs/biz-components/NavigationSearch/types.js.map +7 -0
  169. package/dist/cjs/biz-components/Paginator/index.d.ts +6 -0
  170. package/dist/cjs/biz-components/Paginator/index.js +7 -0
  171. package/dist/cjs/biz-components/Paginator/index.js.map +7 -0
  172. package/dist/cjs/biz-components/SearchPage/index.d.ts +6 -0
  173. package/dist/cjs/biz-components/SearchPage/index.js +2 -0
  174. package/dist/cjs/biz-components/SearchPage/index.js.map +7 -0
  175. package/dist/cjs/biz-components/SearchPage/types.d.ts +58 -0
  176. package/dist/cjs/biz-components/SearchPage/types.js +2 -0
  177. package/dist/cjs/biz-components/SearchPage/types.js.map +7 -0
  178. package/dist/cjs/biz-components/ShelfDisplay/index.d.ts +1 -64
  179. package/dist/cjs/biz-components/ShelfDisplay/index.js +1 -5
  180. package/dist/cjs/biz-components/ShelfDisplay/index.js.map +3 -3
  181. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.d.ts +74 -0
  182. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js +1 -1
  183. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js.map +2 -2
  184. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.d.ts +8 -0
  185. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js +10 -0
  186. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js.map +7 -0
  187. package/dist/cjs/biz-components/Slogan/index.js +1 -1
  188. package/dist/cjs/biz-components/Slogan/index.js.map +2 -2
  189. package/dist/cjs/biz-components/Subscribe/index.d.ts +7 -1
  190. package/dist/cjs/biz-components/Subscribe/index.js +1 -1
  191. package/dist/cjs/biz-components/Subscribe/index.js.map +3 -3
  192. package/dist/cjs/biz-components/SwiperBox/index.js +1 -1
  193. package/dist/cjs/biz-components/SwiperBox/index.js.map +3 -3
  194. package/dist/cjs/biz-components/SwiperBox/types.d.ts +1 -0
  195. package/dist/cjs/biz-components/SwiperBox/types.js +1 -1
  196. package/dist/cjs/biz-components/SwiperBox/types.js.map +1 -1
  197. package/dist/cjs/biz-components/Tabs/Tabs.js +1 -1
  198. package/dist/cjs/biz-components/Tabs/Tabs.js.map +3 -3
  199. package/dist/cjs/biz-components/Tabs/types.d.ts +4 -1
  200. package/dist/cjs/biz-components/Tabs/types.js +1 -1
  201. package/dist/cjs/biz-components/Tabs/types.js.map +1 -1
  202. package/dist/cjs/biz-components/TextModal/index.js +1 -1
  203. package/dist/cjs/biz-components/TextModal/index.js.map +2 -2
  204. package/dist/cjs/biz-components/Title/index.js +1 -1
  205. package/dist/cjs/biz-components/Title/index.js.map +2 -2
  206. package/dist/cjs/biz-components/VideoModal/YouTubePlayer.js +1 -1
  207. package/dist/cjs/biz-components/VideoModal/YouTubePlayer.js.map +2 -2
  208. package/dist/cjs/biz-components/VideoModal/index.js +1 -1
  209. package/dist/cjs/biz-components/VideoModal/index.js.map +2 -2
  210. package/dist/cjs/biz-components/WhyChoose/WhyChoose.js +1 -1
  211. package/dist/cjs/biz-components/WhyChoose/WhyChoose.js.map +2 -2
  212. package/dist/cjs/biz-components/index.d.ts +4 -0
  213. package/dist/cjs/biz-components/index.js +1 -1
  214. package/dist/cjs/biz-components/index.js.map +3 -3
  215. package/dist/cjs/components/button.d.ts +1 -0
  216. package/dist/cjs/components/button.js +1 -1
  217. package/dist/cjs/components/button.js.map +3 -3
  218. package/dist/cjs/components/container.js +1 -1
  219. package/dist/cjs/components/container.js.map +2 -2
  220. package/dist/cjs/components/dialog.d.ts +3 -1
  221. package/dist/cjs/components/dialog.js +1 -1
  222. package/dist/cjs/components/dialog.js.map +3 -3
  223. package/dist/cjs/components/index.d.ts +1 -0
  224. package/dist/cjs/components/index.js +1 -1
  225. package/dist/cjs/components/index.js.map +3 -3
  226. package/dist/cjs/components/loadingDots.d.ts +6 -0
  227. package/dist/cjs/components/loadingDots.js +42 -0
  228. package/dist/cjs/components/loadingDots.js.map +7 -0
  229. package/dist/cjs/components/tabs.js +1 -1
  230. package/dist/cjs/components/tabs.js.map +3 -3
  231. package/dist/cjs/helpers/utils.d.ts +1 -0
  232. package/dist/cjs/helpers/utils.js +1 -1
  233. package/dist/cjs/helpers/utils.js.map +3 -3
  234. package/dist/cjs/stories/graphic.stories.d.ts +1 -1
  235. package/dist/cjs/stories/shelfDisplay.stories.d.ts +1 -1
  236. package/dist/cjs/stories/shelfDisplay.stories.js +644 -1
  237. package/dist/cjs/stories/shelfDisplay.stories.js.map +2 -2
  238. package/dist/cjs/stories/tabs.stories.js +1 -1
  239. package/dist/cjs/stories/tabs.stories.js.map +3 -3
  240. package/dist/esm/biz-components/AccordionCards/index.js +1 -1
  241. package/dist/esm/biz-components/AccordionCards/index.js.map +2 -2
  242. package/dist/esm/biz-components/AiuiProvider/index.d.ts +1 -0
  243. package/dist/esm/biz-components/AiuiProvider/index.js +1 -1
  244. package/dist/esm/biz-components/AiuiProvider/index.js.map +3 -3
  245. package/dist/esm/biz-components/BrandEquity/BrandEquity.js +1 -1
  246. package/dist/esm/biz-components/BrandEquity/BrandEquity.js.map +2 -2
  247. package/dist/esm/biz-components/Category/index.js +1 -1
  248. package/dist/esm/biz-components/Category/index.js.map +2 -2
  249. package/dist/esm/biz-components/CollectionsFilters/AnimatedUL.d.ts +9 -0
  250. package/dist/esm/biz-components/CollectionsFilters/AnimatedUL.js +2 -0
  251. package/dist/esm/biz-components/CollectionsFilters/AnimatedUL.js.map +7 -0
  252. package/dist/esm/biz-components/CollectionsFilters/index.d.ts +1 -0
  253. package/dist/esm/biz-components/CollectionsFilters/index.js +2 -0
  254. package/dist/esm/biz-components/CollectionsFilters/index.js.map +7 -0
  255. package/dist/esm/biz-components/CreativeModule/index.js +1 -1
  256. package/dist/esm/biz-components/CreativeModule/index.js.map +2 -2
  257. package/dist/esm/biz-components/Evaluate/index.js +1 -1
  258. package/dist/esm/biz-components/Evaluate/index.js.map +2 -2
  259. package/dist/esm/biz-components/Faq/Faq.js +1 -1
  260. package/dist/esm/biz-components/Faq/Faq.js.map +1 -1
  261. package/dist/esm/biz-components/FooterNavigation/index.js +1 -1
  262. package/dist/esm/biz-components/FooterNavigation/index.js.map +3 -3
  263. package/dist/esm/biz-components/FooterNavigation/types.d.ts +2 -1
  264. package/dist/esm/biz-components/FooterNavigation/types.js +1 -1
  265. package/dist/esm/biz-components/FooterNavigation/types.js.map +2 -2
  266. package/dist/esm/biz-components/Graphic/index.js +1 -1
  267. package/dist/esm/biz-components/Graphic/index.js.map +2 -2
  268. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.js +1 -1
  269. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.js.map +2 -2
  270. package/dist/esm/biz-components/HeaderNavigation/NavProvider.d.ts +6 -5
  271. package/dist/esm/biz-components/HeaderNavigation/NavProvider.js +1 -1
  272. package/dist/esm/biz-components/HeaderNavigation/NavProvider.js.map +3 -3
  273. package/dist/esm/biz-components/HeaderNavigation/icons/Polygon.d.ts +3 -0
  274. package/dist/esm/biz-components/HeaderNavigation/icons/Polygon.js +2 -0
  275. package/dist/esm/biz-components/HeaderNavigation/icons/Polygon.js.map +7 -0
  276. package/dist/esm/biz-components/HeaderNavigation/icons/index.d.ts +2 -1
  277. package/dist/esm/biz-components/HeaderNavigation/icons/index.js +1 -1
  278. package/dist/esm/biz-components/HeaderNavigation/icons/index.js.map +3 -3
  279. package/dist/esm/biz-components/HeaderNavigation/index.js +1 -1
  280. package/dist/esm/biz-components/HeaderNavigation/index.js.map +3 -3
  281. package/dist/esm/biz-components/HeaderNavigation/types.d.ts +8 -1
  282. package/dist/esm/biz-components/HeaderNavigation/types.js +1 -1
  283. package/dist/esm/biz-components/HeaderNavigation/types.js.map +2 -2
  284. package/dist/esm/biz-components/HeaderNavigation/withCategory.d.ts +1 -1
  285. package/dist/esm/biz-components/HeaderNavigation/withCategory.js +1 -1
  286. package/dist/esm/biz-components/HeaderNavigation/withCategory.js.map +3 -3
  287. package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
  288. package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +2 -2
  289. package/dist/esm/biz-components/Listing/ProductProvider.d.ts +52 -0
  290. package/dist/esm/biz-components/Listing/ProductProvider.js +2 -0
  291. package/dist/esm/biz-components/Listing/ProductProvider.js.map +7 -0
  292. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTabs/index.d.ts +5 -0
  293. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTabs/index.js +2 -0
  294. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTabs/index.js.map +7 -0
  295. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +2 -0
  296. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +2 -0
  297. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +7 -0
  298. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +2 -0
  299. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +2 -0
  300. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +7 -0
  301. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +3 -0
  302. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +2 -0
  303. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +7 -0
  304. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +2 -0
  305. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js +2 -0
  306. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js.map +7 -0
  307. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/index.d.ts +2 -0
  308. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/index.js +2 -0
  309. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/index.js.map +7 -0
  310. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/types.d.ts +53 -0
  311. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/types.js +2 -0
  312. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/types.js.map +7 -0
  313. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.d.ts +2 -0
  314. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +2 -0
  315. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +7 -0
  316. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.d.ts +21 -0
  317. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js +2 -0
  318. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js.map +7 -0
  319. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.d.ts +5 -0
  320. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js +2 -0
  321. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js.map +7 -0
  322. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.d.ts +1 -0
  323. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js +2 -0
  324. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js.map +7 -0
  325. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +3 -0
  326. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js +2 -0
  327. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +7 -0
  328. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/types.d.ts +35 -0
  329. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/types.js +2 -0
  330. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/types.js.map +7 -0
  331. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +3 -0
  332. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js +2 -0
  333. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +7 -0
  334. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/types.d.ts +2 -0
  335. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/types.js +1 -0
  336. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/types.js.map +7 -0
  337. package/dist/esm/biz-components/Listing/components/ProductCard/index.d.ts +2 -0
  338. package/dist/esm/biz-components/Listing/components/ProductCard/index.js +2 -0
  339. package/dist/esm/biz-components/Listing/components/ProductCard/index.js.map +7 -0
  340. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.d.ts +2 -0
  341. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +2 -0
  342. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +7 -0
  343. package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.d.ts +4 -0
  344. package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js +2 -0
  345. package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js.map +7 -0
  346. package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.d.ts +10 -0
  347. package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js +1 -0
  348. package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js.map +7 -0
  349. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.d.ts +3 -0
  350. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js +2 -0
  351. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js.map +7 -0
  352. package/dist/esm/biz-components/Listing/components/PurchaseBar/types.d.ts +20 -0
  353. package/dist/esm/biz-components/Listing/components/PurchaseBar/types.js +1 -0
  354. package/dist/esm/biz-components/Listing/components/PurchaseBar/types.js.map +7 -0
  355. package/dist/esm/biz-components/Listing/components/index.d.ts +3 -0
  356. package/dist/esm/biz-components/Listing/components/index.js +2 -0
  357. package/dist/esm/biz-components/Listing/components/index.js.map +7 -0
  358. package/dist/esm/biz-components/Listing/const.d.ts +28 -0
  359. package/dist/esm/biz-components/Listing/const.js +2 -0
  360. package/dist/esm/biz-components/Listing/const.js.map +7 -0
  361. package/dist/esm/biz-components/Listing/hooks/use-options.d.ts +3 -0
  362. package/dist/esm/biz-components/Listing/hooks/use-options.js +2 -0
  363. package/dist/esm/biz-components/Listing/hooks/use-options.js.map +7 -0
  364. package/dist/esm/biz-components/Listing/hooks/use-variant-media.d.ts +14 -0
  365. package/dist/esm/biz-components/Listing/hooks/use-variant-media.js +2 -0
  366. package/dist/esm/biz-components/Listing/hooks/use-variant-media.js.map +7 -0
  367. package/dist/esm/biz-components/Listing/hooks/use-variant.d.ts +5 -0
  368. package/dist/esm/biz-components/Listing/hooks/use-variant.js +2 -0
  369. package/dist/esm/biz-components/Listing/hooks/use-variant.js.map +7 -0
  370. package/dist/esm/biz-components/Listing/hooks/useCopy.d.ts +8 -0
  371. package/dist/esm/biz-components/Listing/hooks/useCopy.js +2 -0
  372. package/dist/esm/biz-components/Listing/hooks/useCopy.js.map +7 -0
  373. package/dist/esm/biz-components/Listing/index.d.ts +3 -0
  374. package/dist/esm/biz-components/Listing/index.js +2 -0
  375. package/dist/esm/biz-components/Listing/index.js.map +7 -0
  376. package/dist/esm/biz-components/Listing/types/graphql.d.ts +7473 -0
  377. package/dist/esm/biz-components/Listing/types/graphql.js +2 -0
  378. package/dist/esm/biz-components/Listing/types/graphql.js.map +7 -0
  379. package/dist/esm/biz-components/Listing/types/product.d.ts +139 -0
  380. package/dist/esm/biz-components/Listing/types/product.js +2 -0
  381. package/dist/esm/biz-components/Listing/types/product.js.map +7 -0
  382. package/dist/esm/biz-components/Listing/types/productMetafields.d.js +2 -0
  383. package/dist/esm/biz-components/Listing/types/productMetafields.d.js.map +7 -0
  384. package/dist/esm/biz-components/Listing/types/type-helper.d.ts +5 -0
  385. package/dist/esm/biz-components/Listing/types/type-helper.js +1 -0
  386. package/dist/esm/biz-components/Listing/types/type-helper.js.map +7 -0
  387. package/dist/esm/biz-components/Listing/types.d.ts +21 -0
  388. package/dist/esm/biz-components/Listing/types.js +1 -0
  389. package/dist/esm/biz-components/Listing/types.js.map +7 -0
  390. package/dist/esm/biz-components/Listing/utils/helper.d.ts +21 -0
  391. package/dist/esm/biz-components/Listing/utils/helper.js +2 -0
  392. package/dist/esm/biz-components/Listing/utils/helper.js.map +7 -0
  393. package/dist/esm/biz-components/Listing/utils/index.d.ts +37 -0
  394. package/dist/esm/biz-components/Listing/utils/index.js +2 -0
  395. package/dist/esm/biz-components/Listing/utils/index.js.map +7 -0
  396. package/dist/esm/biz-components/MediaPlayerMulti/index.js +1 -1
  397. package/dist/esm/biz-components/MediaPlayerMulti/index.js.map +2 -2
  398. package/dist/esm/biz-components/MemberEquity/index.js +2 -2
  399. package/dist/esm/biz-components/MemberEquity/index.js.map +2 -2
  400. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  401. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
  402. package/dist/esm/biz-components/NavigationSearch/index.d.ts +4 -0
  403. package/dist/esm/biz-components/NavigationSearch/index.js +2 -0
  404. package/dist/esm/biz-components/NavigationSearch/index.js.map +7 -0
  405. package/dist/esm/biz-components/NavigationSearch/types.d.ts +12 -0
  406. package/dist/esm/biz-components/NavigationSearch/types.js +2 -0
  407. package/dist/esm/biz-components/NavigationSearch/types.js.map +7 -0
  408. package/dist/esm/biz-components/Paginator/index.d.ts +6 -0
  409. package/dist/esm/biz-components/Paginator/index.js +7 -0
  410. package/dist/esm/biz-components/Paginator/index.js.map +7 -0
  411. package/dist/esm/biz-components/SearchPage/index.d.ts +6 -0
  412. package/dist/esm/biz-components/SearchPage/index.js +2 -0
  413. package/dist/esm/biz-components/SearchPage/index.js.map +7 -0
  414. package/dist/esm/biz-components/SearchPage/types.d.ts +58 -0
  415. package/dist/esm/biz-components/SearchPage/types.js +2 -0
  416. package/dist/esm/biz-components/SearchPage/types.js.map +7 -0
  417. package/dist/esm/biz-components/ShelfDisplay/index.d.ts +1 -64
  418. package/dist/esm/biz-components/ShelfDisplay/index.js +1 -5
  419. package/dist/esm/biz-components/ShelfDisplay/index.js.map +3 -3
  420. package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.d.ts +74 -0
  421. package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js +1 -1
  422. package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js.map +2 -2
  423. package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.d.ts +8 -0
  424. package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js +10 -0
  425. package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js.map +7 -0
  426. package/dist/esm/biz-components/Slogan/index.js +1 -1
  427. package/dist/esm/biz-components/Slogan/index.js.map +2 -2
  428. package/dist/esm/biz-components/Subscribe/index.d.ts +7 -1
  429. package/dist/esm/biz-components/Subscribe/index.js +1 -1
  430. package/dist/esm/biz-components/Subscribe/index.js.map +3 -3
  431. package/dist/esm/biz-components/SwiperBox/index.js +1 -1
  432. package/dist/esm/biz-components/SwiperBox/index.js.map +3 -3
  433. package/dist/esm/biz-components/SwiperBox/types.d.ts +1 -0
  434. package/dist/esm/biz-components/SwiperBox/types.js.map +1 -1
  435. package/dist/esm/biz-components/Tabs/Tabs.js +1 -1
  436. package/dist/esm/biz-components/Tabs/Tabs.js.map +3 -3
  437. package/dist/esm/biz-components/Tabs/types.d.ts +4 -1
  438. package/dist/esm/biz-components/TextModal/index.js +1 -1
  439. package/dist/esm/biz-components/TextModal/index.js.map +2 -2
  440. package/dist/esm/biz-components/Title/index.js +1 -1
  441. package/dist/esm/biz-components/Title/index.js.map +2 -2
  442. package/dist/esm/biz-components/VideoModal/YouTubePlayer.js +1 -1
  443. package/dist/esm/biz-components/VideoModal/YouTubePlayer.js.map +2 -2
  444. package/dist/esm/biz-components/VideoModal/index.js +1 -1
  445. package/dist/esm/biz-components/VideoModal/index.js.map +2 -2
  446. package/dist/esm/biz-components/WhyChoose/WhyChoose.js +1 -1
  447. package/dist/esm/biz-components/WhyChoose/WhyChoose.js.map +2 -2
  448. package/dist/esm/biz-components/index.d.ts +4 -0
  449. package/dist/esm/biz-components/index.js +1 -1
  450. package/dist/esm/biz-components/index.js.map +3 -3
  451. package/dist/esm/components/button.d.ts +1 -0
  452. package/dist/esm/components/button.js +1 -1
  453. package/dist/esm/components/button.js.map +3 -3
  454. package/dist/esm/components/container.js +1 -1
  455. package/dist/esm/components/container.js.map +2 -2
  456. package/dist/esm/components/dialog.d.ts +3 -1
  457. package/dist/esm/components/dialog.js +1 -1
  458. package/dist/esm/components/dialog.js.map +3 -3
  459. package/dist/esm/components/index.d.ts +1 -0
  460. package/dist/esm/components/index.js +1 -1
  461. package/dist/esm/components/index.js.map +2 -2
  462. package/dist/esm/components/loadingDots.d.ts +6 -0
  463. package/dist/esm/components/loadingDots.js +42 -0
  464. package/dist/esm/components/loadingDots.js.map +7 -0
  465. package/dist/esm/components/tabs.js +1 -1
  466. package/dist/esm/components/tabs.js.map +3 -3
  467. package/dist/esm/helpers/utils.d.ts +1 -0
  468. package/dist/esm/helpers/utils.js +1 -1
  469. package/dist/esm/helpers/utils.js.map +3 -3
  470. package/dist/esm/stories/graphic.stories.d.ts +1 -1
  471. package/dist/esm/stories/shelfDisplay.stories.d.ts +1 -1
  472. package/dist/esm/stories/shelfDisplay.stories.js +644 -1
  473. package/dist/esm/stories/shelfDisplay.stories.js.map +2 -2
  474. package/dist/esm/stories/tabs.stories.js +1 -1
  475. package/dist/esm/stories/tabs.stories.js.map +3 -3
  476. package/dist/tokens/base.css +7 -1
  477. package/package.json +1 -1
  478. package/style.css +11 -4
  479. package/tailwind.config.js +2 -0
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var A=Object.create;var f=Object.defineProperty;var D=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,V=Object.prototype.hasOwnProperty;var W=(e,i)=>{for(var s in i)f(e,s,{get:i[s],enumerable:!0})},I=(e,i,s,d)=>{if(i&&typeof i=="object"||typeof i=="function")for(let a of j(i))!V.call(e,a)&&a!==s&&f(e,a,{get:()=>i[a],enumerable:!(d=D(i,a))||d.enumerable});return e};var m=(e,i,s)=>(s=e!=null?A(P(e)):{},I(i||!e||!e.__esModule?f(s,"default",{value:e,enumerable:!0}):s,e)),q=e=>I(f({},"__esModule",{value:!0}),e);var G={};W(G,{default:()=>F});module.exports=q(G);var o=require("react/jsx-runtime"),B=m(require("../Title/index.js")),l=require("../../helpers/utils.js"),y=m(require("../../components/picture.js")),x=m(require("../../components/button.js")),E=m(require("../SwiperBox/index.js")),L=require("../../shared/Styles.js"),r=m(require("react")),H=require("../../hooks/useExposure.js"),u=require("../../shared/trackUrlRef.js"),M=require("../../shared/track.js"),R=m(require("../../shared/throttle.js")),w=require("../../components/heading.js");const c="image",p="scene_banner",U=r.default.forwardRef(({data:e,className:i="",event:s},d)=>{const[a,C]=(0,r.useState)(0),v=(0,r.useRef)(0),h=(0,r.useRef)([]),b=(0,r.useRef)(!1),[k,S]=(0,r.useState)(0),g=(0,r.useRef)(null);(0,r.useImperativeHandle)(d,()=>g.current),(0,H.useExposure)(g,{componentType:c,componentName:p,componentTitle:e?.title});const $=(t,n)=>{n&&(h.current[t]=n)};(0,r.useEffect)(()=>{const t=()=>{h.current[v.current]&&S(h.current[v.current].offsetWidth)};t();const n=(0,R.default)(t,300);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]);const z=({data:t,configuration:n})=>(0,o.jsxs)("div",{className:(0,l.cn)("bg-container-secondary-1 relative w-full shrink-0 grow-0 overflow-hidden border border-solid",n?.itemShape==="round"?"rounded-2xl":""),children:[(0,o.jsx)("a",{href:(0,u.trackUrlRef)(t?.imgLink,`${c}_${p}`),children:(0,o.jsx)(y.default,{className:"size-full object-cover [&_img]:h-full [&_img]:object-cover",source:t?.mobileImg?.url||"",alt:t?.mobileImg?.alt||""})}),(0,o.jsxs)("div",{className:(0,l.cn)("absolute inset-x-0 bottom-0 overflow-hidden px-4 pb-4"),children:[(0,o.jsxs)("div",{className:"tablet:mb-6 mb-4 flex-1 overflow-hidden",children:[(0,o.jsx)("p",{className:"text-info-primary text-2xl font-bold leading-[1.2]",children:t?.title}),(0,o.jsx)("h3",{className:"text-info-primary line-clamp-2 text-sm font-semibold",children:t?.subTitle})]}),(0,o.jsx)(x.default,{"aria-label":t?.title??t?.subTitle,variant:"secondary",className:(0,l.cn)("text-info-primary text-sm font-bold"),as:"a",href:(0,u.trackUrlRef)(t.link,`${c}_${p}`),children:n?.primaryButton})]})]}),_=(0,r.useCallback)(t=>{a===t||b.current||(b.current=!0,C(t),v.current=t,(0,M.gaTrack)({event:"ga4Event",event_name:"component_click",event_parameters:{page_group:"Home Page",component_type:c,component_name:p,component_title:e?.products[t]?.title,component_description:e?.products[t]?.subTitle,position:t+1}}))},[e?.products,a]);return(0,o.jsxs)(o.Fragment,{children:[e?.title&&(0,o.jsx)(B.default,{data:{title:e?.title}}),(0,o.jsx)("div",{ref:g,className:(0,l.cn)("laptop:block hidden",{"aiui-dark":e?.theme==="dark"}),children:(0,o.jsx)("div",{className:(0,l.cn)("lg-desktop:h-[calc(560_/_1920*100vw)] desktop:h-[calc(448_/_1440*100vw)] laptop:h-[calc(336_/_1025*100vw)] flex max-h-[560px] min-h-[336px] w-full gap-4 overflow-hidden",i),children:e?.products?.map((t,n)=>{const T=a===n;return(0,o.jsxs)("div",{style:{flex:`${T?8:1} 1 0%`,transition:"all 0.6s"},ref:N=>{N&&$(n,N)},className:(0,l.cn)("relative cursor-pointer overflow-hidden",e?.itemShape==="round"?"rounded-2xl":""),onMouseEnter:()=>_(n),onMouseLeave:()=>{b.current=!1},onClick:()=>{_(n)},children:[(0,o.jsx)("a",{href:(0,u.trackUrlRef)(t?.imgLink,`${c}_${p}`),children:(0,o.jsx)(y.default,{source:t?.img?.url,className:"size-full object-cover [&_img]:h-full [&_img]:object-cover",alt:t?.img?.alt||""})}),(0,o.jsxs)("div",{style:{width:k},className:(0,l.cn)("absolute inset-x-0 bottom-0 flex w-full items-end justify-between overflow-hidden px-8 pb-8 opacity-0 transition-opacity duration-[600ms] ease-in",T&&k?"opacity-100":"opacity-0"),children:[(0,o.jsxs)("div",{className:"mr-16 flex-1 overflow-hidden",children:[(0,o.jsx)(w.Heading,{as:"h3",className:"laptop:text-2xl desktop:text-[32px] text-info-primary mb-1 text-xl font-bold",children:t?.title}),(0,o.jsx)(w.Heading,{as:"h4",className:"lg-desktop:text-[18px] desktop:text-[16px] text-info-primary line-clamp-2 text-[14px] font-[700]",children:t?.subTitle})]}),(0,o.jsxs)(x.default,{className:(0,l.cn)("mb-1.5 font-bold"),as:"a",href:(0,u.trackUrlRef)(t?.link,`${c}_${p}`),onClick:()=>s?.primaryButton?.(e,n),children:[e?.primaryButton,(0,o.jsx)("span",{className:"sr-only",children:t?.title??t?.subTitle})]})]})]},n)})})}),(0,o.jsx)("div",{className:(0,l.cn)("laptop:hidden block",{"aiui-dark":e?.theme==="dark"}),children:(0,o.jsx)(E.default,{className:(0,l.cn)("h-[400px] !overflow-visible",i),id:"AccordionCards"+e?.key,data:{list:e?.products,configuration:{shape:e?.shape,itemShape:e?.itemShape,primaryButton:e?.primaryButton,event:s}},Slide:z,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3}}})})]})});var F=(0,L.withLayout)(U);
1
+ "use strict";"use client";var A=Object.create;var f=Object.defineProperty;var D=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,V=Object.prototype.hasOwnProperty;var W=(t,i)=>{for(var s in i)f(t,s,{get:i[s],enumerable:!0})},N=(t,i,s,u)=>{if(i&&typeof i=="object"||typeof i=="function")for(let p of j(i))!V.call(t,p)&&p!==s&&f(t,p,{get:()=>i[p],enumerable:!(u=D(i,p))||u.enumerable});return t};var c=(t,i,s)=>(s=t!=null?A(P(t)):{},N(i||!t||!t.__esModule?f(s,"default",{value:t,enumerable:!0}):s,t)),q=t=>N(f({},"__esModule",{value:!0}),t);var G={};W(G,{default:()=>F});module.exports=q(G);var o=require("react/jsx-runtime"),B=c(require("../Title/index.js")),l=require("../../helpers/utils.js"),g=c(require("../../components/picture.js")),x=c(require("../../components/button.js")),I=c(require("../SwiperBox/index.js")),E=require("../../shared/Styles.js"),n=c(require("react")),L=require("../../hooks/useExposure.js"),d=require("../../shared/trackUrlRef.js"),H=require("../../shared/track.js"),M=c(require("../../shared/throttle.js")),w=require("../../components/heading.js");const a="image",m="scene_banner",U=n.default.forwardRef(({data:t,className:i="",event:s},u)=>{const[p,R]=(0,n.useState)(0),v=(0,n.useRef)(0),h=(0,n.useRef)([]),b=(0,n.useRef)(!1),[k,C]=(0,n.useState)(0),y=(0,n.useRef)(null);(0,n.useImperativeHandle)(u,()=>y.current),(0,L.useExposure)(y,{componentType:a,componentName:m,componentTitle:t?.title});const S=(e,r)=>{r&&(h.current[e]=r)};(0,n.useEffect)(()=>{const e=()=>{h.current[v.current]&&C(h.current[v.current].offsetWidth)};e();const r=(0,M.default)(e,300);return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]);const z=({data:e,configuration:r})=>(0,o.jsxs)("div",{className:(0,l.cn)("bg-container-secondary-1 relative w-full shrink-0 grow-0 overflow-hidden border border-solid",r?.itemShape==="round"?"rounded-2xl":""),children:[(0,o.jsx)("a",{href:(0,d.trackUrlRef)(e?.imgLink,`${a}_${m}`),"data-headless-type-name":`${a}#${m}`,"data-headless-title-desc-button":`${e?.title}@${e?.subTitle}`,"data-headless-nav-postion":`''#${r?.index+1}`,children:(0,o.jsx)(g.default,{className:"size-full object-cover [&_img]:h-full [&_img]:object-cover",source:e?.mobileImg?.url||"",alt:e?.mobileImg?.alt||""})}),(0,o.jsxs)("div",{className:(0,l.cn)("absolute inset-x-0 bottom-0 overflow-hidden px-4 pb-4"),children:[(0,o.jsxs)("div",{className:"tablet:mb-6 mb-4 flex-1 overflow-hidden",children:[(0,o.jsx)("p",{className:"text-info-primary text-2xl font-bold leading-[1.2]",children:e?.title}),(0,o.jsx)("h3",{className:"text-info-primary line-clamp-2 text-sm font-semibold",children:e?.subTitle})]}),(0,o.jsx)(x.default,{as:"a",variant:"secondary","aria-label":e?.title??e?.subTitle,className:(0,l.cn)("text-info-primary text-sm font-bold"),href:(0,d.trackUrlRef)(e.link,`${a}_${m}`),"data-headless-type-name":`${a}#${m}`,"data-headless-nav-postion":`''#${r?.index+1}`,"data-headless-title-desc-button":`${e?.title}#${e?.subTitle}#${r?.primaryButton}`,children:r?.primaryButton})]})]}),$=(0,n.useCallback)(e=>{p===e||b.current||(b.current=!0,R(e),v.current=e,(0,H.gaTrack)({event:"ga4Event",event_name:"component_click",event_parameters:{page_group:"Home Page",component_type:a,component_name:m,component_title:t?.products[e]?.title,component_description:t?.products[e]?.subTitle,position:e+1}}))},[t?.products,p]);return(0,o.jsxs)(o.Fragment,{children:[t?.title&&(0,o.jsx)(B.default,{data:{title:t?.title}}),(0,o.jsx)("div",{ref:y,className:(0,l.cn)("laptop:block hidden",{"aiui-dark":t?.theme==="dark"}),children:(0,o.jsx)("div",{className:(0,l.cn)("lg-desktop:h-[calc(560_/_1920*100vw)] desktop:h-[calc(448_/_1440*100vw)] laptop:h-[calc(336_/_1025*100vw)] flex max-h-[560px] min-h-[336px] w-full gap-4 overflow-hidden",i),children:t?.products?.map((e,r)=>{const T=p===r;return(0,o.jsxs)("div",{style:{flex:`${T?8:1} 1 0%`,transition:"all 0.6s"},ref:_=>{_&&S(r,_)},className:(0,l.cn)("relative cursor-pointer overflow-hidden",t?.itemShape==="round"?"rounded-2xl":""),onMouseEnter:()=>$(r),onMouseLeave:()=>{b.current=!1},onClick:()=>{$(r)},children:[(0,o.jsx)("a",{href:(0,d.trackUrlRef)(e?.imgLink,`${a}_${m}`),"data-headless-type-name":`${a}#${m}`,"data-headless-title-desc-button":`${e?.title}#${e?.subTitle}`,children:(0,o.jsx)(g.default,{source:e?.img?.url,className:"size-full object-cover [&_img]:h-full [&_img]:object-cover",alt:e?.img?.alt||""})}),(0,o.jsxs)("div",{style:{width:k},className:(0,l.cn)("absolute inset-x-0 bottom-0 flex w-full items-end justify-between overflow-hidden px-8 pb-8 opacity-0 transition-opacity duration-[600ms] ease-in",T&&k?"opacity-100":"opacity-0"),children:[(0,o.jsxs)("div",{className:"mr-16 flex-1 overflow-hidden",children:[(0,o.jsx)(w.Heading,{as:"h3",className:"laptop:text-2xl desktop:text-[32px] text-info-primary mb-1 text-xl font-bold",children:e?.title}),(0,o.jsx)(w.Heading,{as:"h4",className:"lg-desktop:text-[18px] desktop:text-[16px] text-info-primary line-clamp-2 text-[14px] font-[700]",children:e?.subTitle})]}),(0,o.jsxs)(x.default,{className:(0,l.cn)("mb-1.5 font-bold"),as:"a",href:(0,d.trackUrlRef)(e?.link,`${a}_${m}`),"data-headless-type-name":`${a}#${m}`,"data-headless-title-desc-button":`${e?.title}#${e?.subTitle}#${t?.primaryButton}`,onClick:()=>s?.primaryButton?.(t,r),children:[t?.primaryButton,(0,o.jsx)("span",{className:"sr-only",children:e?.title??e?.subTitle})]})]})]},r)})})}),(0,o.jsx)("div",{className:(0,l.cn)("laptop:hidden block",{"aiui-dark":t?.theme==="dark"}),children:(0,o.jsx)(I.default,{className:(0,l.cn)("h-[400px] !overflow-visible",i),id:"AccordionCards"+t?.key,data:{list:t?.products,configuration:{shape:t?.shape,itemShape:t?.itemShape,primaryButton:t?.primaryButton,event:s,title:t?.title}},Slide:z,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3}}})})]})});var F=(0,E.withLayout)(U);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/AccordionCards/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport Title from '../Title/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport React, { useState, useRef, useCallback, useImperativeHandle, useEffect } from 'react'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { gaTrack } from '../../shared/track.js'\nimport type { Img } from '../../types/props.js'\nimport throttle from '../../shared/throttle.js'\nimport { Heading } from '../../components/heading.js'\n\nconst componentType = 'image'\nconst componentName = 'scene_banner'\n\n/** Hook\uFF1A\u76D1\u542C\u7A97\u53E3\u5BBD\u5EA6 */\ntype ItemType = {\n /** \u6807\u9898\u6587\u672C */\n title: string\n /** \u56FE\u7247*/\n img: Img\n mobileImg?: Img\n /** \u5185\u5BB9\u8282\u70B9 */\n subTitle: string\n link?: string\n imgLink?: string\n}\n\nexport type AccordionCardsType = {\n className?: string\n data: {\n key?: string\n title?: string\n products: Array<ItemType>\n /** \u6309\u94AE\u5F62\u72B6 */\n shape?: 'round' | 'square'\n /** \u5361\u7247\u5F62\u72B6 */\n itemShape?: 'round' | 'square'\n /** \u4E3B\u6309\u94AE\u914D\u7F6E */\n primaryButton?: string\n theme?: 'light' | 'dark'\n }\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: {\n primaryButton?: (v: any, index: number) => void\n }\n}\n\nconst AccordionCards = React.forwardRef<HTMLDivElement, AccordionCardsType>(({ data, className = '', event }, ref) => {\n const [hoverIndex, setHoverIndex] = useState<number | null>(0)\n\n const hoverIndexRef = useRef<number>(0)\n const accordionRef = useRef<HTMLDivElement[]>([])\n const isAnimation = useRef<boolean>(false)\n const [contentWidth, setContentWidth] = useState<number>(0)\n\n const innerRef = useRef<HTMLDivElement>(null)\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n useExposure(innerRef, {\n componentType,\n componentName,\n componentTitle: data?.title,\n })\n\n const getRef = (index: number, el: HTMLDivElement) => {\n if (el) {\n accordionRef.current[index] = el\n }\n }\n\n useEffect(() => {\n const handleResize = () => {\n if (accordionRef.current[hoverIndexRef.current]) {\n setContentWidth(accordionRef.current[hoverIndexRef.current].offsetWidth)\n }\n }\n handleResize()\n const throttleResize = throttle(handleResize, 300)\n window.addEventListener('resize', throttleResize)\n return () => window.removeEventListener('resize', throttleResize)\n }, [])\n\n const MobileItem = ({ data, configuration }: { data: ItemType; configuration?: any }) => {\n return (\n <div\n className={cn(\n 'bg-container-secondary-1 relative w-full shrink-0 grow-0 overflow-hidden border border-solid',\n configuration?.itemShape === 'round' ? 'rounded-2xl' : ''\n )}\n >\n <a href={trackUrlRef(data?.imgLink, `${componentType}_${componentName}`)}>\n <Picture\n className=\"size-full object-cover [&_img]:h-full [&_img]:object-cover\"\n source={data?.mobileImg?.url || ''}\n alt={data?.mobileImg?.alt || ''}\n />\n </a>\n <div className={cn('absolute inset-x-0 bottom-0 overflow-hidden px-4 pb-4')}>\n <div className=\"tablet:mb-6 mb-4 flex-1 overflow-hidden\">\n <p className=\"text-info-primary text-2xl font-bold leading-[1.2]\">{data?.title}</p>\n <h3 className=\"text-info-primary line-clamp-2 text-sm font-semibold\">{data?.subTitle}</h3>\n </div>\n\n <Button\n aria-label={data?.title ?? data?.subTitle}\n variant=\"secondary\"\n className={cn('text-info-primary text-sm font-bold')}\n as=\"a\"\n href={trackUrlRef(data.link, `${componentType}_${componentName}`)}\n >\n {configuration?.primaryButton}\n </Button>\n </div>\n </div>\n )\n }\n\n const handleSwiperItemClick = useCallback(\n (idx: number) => {\n if (hoverIndex === idx || isAnimation.current) return\n isAnimation.current = true\n // \u66F4\u65B0\u5BBD\u5EA6\u76F8\u5173\u72B6\u6001\n setHoverIndex(idx)\n hoverIndexRef.current = idx\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_click',\n event_parameters: {\n page_group: 'Home Page',\n component_type: componentType,\n component_name: componentName,\n component_title: data?.products[idx]?.title,\n component_description: data?.products[idx]?.subTitle,\n position: idx + 1,\n },\n })\n },\n [data?.products, hoverIndex]\n )\n\n return (\n <>\n {data?.title && <Title data={{ title: data?.title }} />}\n <div ref={innerRef} className={cn('laptop:block hidden', { 'aiui-dark': data?.theme === 'dark' })}>\n <div\n className={cn(\n 'lg-desktop:h-[calc(560_/_1920*100vw)] desktop:h-[calc(448_/_1440*100vw)] laptop:h-[calc(336_/_1025*100vw)] flex max-h-[560px] min-h-[336px] w-full gap-4 overflow-hidden',\n className\n )}\n >\n {data?.products?.map((item, idx) => {\n const isExpanded = hoverIndex === idx\n const flexValue = isExpanded ? 8 : 1\n return (\n <div\n key={idx}\n style={{\n flex: `${flexValue} 1 0%`,\n transition: 'all 0.6s',\n }}\n ref={(el: HTMLDivElement | null) => {\n if (el) getRef(idx, el)\n }}\n className={cn(\n 'relative cursor-pointer overflow-hidden',\n data?.itemShape === 'round' ? 'rounded-2xl' : ''\n )}\n onMouseEnter={() => handleSwiperItemClick(idx)}\n onMouseLeave={() => {\n isAnimation.current = false\n }}\n onClick={() => {\n handleSwiperItemClick(idx)\n }}\n >\n <a href={trackUrlRef(item?.imgLink, `${componentType}_${componentName}`)}>\n <Picture\n source={item?.img?.url}\n className=\"size-full object-cover [&_img]:h-full [&_img]:object-cover\"\n alt={item?.img?.alt || ''}\n />\n </a>\n <div\n style={{\n width: contentWidth,\n }}\n className={cn(\n 'absolute inset-x-0 bottom-0 flex w-full items-end justify-between overflow-hidden px-8 pb-8 opacity-0 transition-opacity duration-[600ms] ease-in',\n isExpanded && contentWidth ? 'opacity-100' : 'opacity-0'\n )}\n >\n <div className=\"mr-16 flex-1 overflow-hidden\">\n <Heading\n as=\"h3\"\n className=\"laptop:text-2xl desktop:text-[32px] text-info-primary mb-1 text-xl font-bold\"\n >\n {item?.title}\n </Heading>\n <Heading\n as=\"h4\"\n className=\"lg-desktop:text-[18px] desktop:text-[16px] text-info-primary line-clamp-2 text-[14px] font-[700]\"\n >\n {item?.subTitle}\n </Heading>\n </div>\n <Button\n className={cn('mb-1.5 font-bold')}\n as=\"a\"\n href={trackUrlRef(item?.link, `${componentType}_${componentName}`)}\n onClick={() => event?.primaryButton?.(data, idx)}\n >\n {data?.primaryButton}\n <span className=\"sr-only\">{item?.title ?? item?.subTitle}</span>\n </Button>\n </div>\n </div>\n )\n })}\n </div>\n </div>\n <div className={cn('laptop:hidden block', { 'aiui-dark': data?.theme === 'dark' })}>\n <SwiperBox\n className={cn('h-[400px] !overflow-visible', className)}\n id={'AccordionCards' + data?.key}\n data={{\n list: data?.products,\n configuration: {\n shape: data?.shape,\n itemShape: data?.itemShape,\n primaryButton: data?.primaryButton,\n event: event,\n },\n }}\n Slide={MobileItem}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n }}\n />\n </div>\n </>\n )\n})\nexport default withLayout(AccordionCards)\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA8FU,IAAAI,EAAA,6BA7FVC,EAAkB,gCAClBC,EAAmB,kCACnBC,EAAoB,0CACpBC,EAAmB,yCACnBC,EAAsB,oCACtBC,EAA2B,kCAC3BC,EAAqF,oBACrFC,EAA4B,sCAC5BC,EAA4B,uCAC5BC,EAAwB,iCAExBC,EAAqB,uCACrBC,EAAwB,uCAExB,MAAMC,EAAgB,QAChBC,EAAgB,eAmChBC,EAAiB,EAAAC,QAAM,WAA+C,CAAC,CAAE,KAA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,CAAC,EACD,IAAOrC,KAAQ,cAAWiB,CAAc",
4
+ "sourcesContent": ["'use client'\nimport Title from '../Title/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport React, { useState, useRef, useCallback, useImperativeHandle, useEffect } from 'react'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { gaTrack } from '../../shared/track.js'\nimport type { Img } from '../../types/props.js'\nimport throttle from '../../shared/throttle.js'\nimport { Heading } from '../../components/heading.js'\n\nconst componentType = 'image'\nconst componentName = 'scene_banner'\n\n/** Hook\uFF1A\u76D1\u542C\u7A97\u53E3\u5BBD\u5EA6 */\ntype ItemType = {\n /** \u6807\u9898\u6587\u672C */\n title: string\n /** \u56FE\u7247*/\n img: Img\n mobileImg?: Img\n /** \u5185\u5BB9\u8282\u70B9 */\n subTitle: string\n link?: string\n imgLink?: string\n}\n\nexport type AccordionCardsType = {\n className?: string\n data: {\n key?: string\n title?: string\n products: Array<ItemType>\n /** \u6309\u94AE\u5F62\u72B6 */\n shape?: 'round' | 'square'\n /** \u5361\u7247\u5F62\u72B6 */\n itemShape?: 'round' | 'square'\n /** \u4E3B\u6309\u94AE\u914D\u7F6E */\n primaryButton?: string\n theme?: 'light' | 'dark'\n }\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: {\n primaryButton?: (v: any, index: number) => void\n }\n}\n\nconst AccordionCards = React.forwardRef<HTMLDivElement, AccordionCardsType>(({ data, className = '', event }, ref) => {\n const [hoverIndex, setHoverIndex] = useState<number | null>(0)\n\n const hoverIndexRef = useRef<number>(0)\n const accordionRef = useRef<HTMLDivElement[]>([])\n const isAnimation = useRef<boolean>(false)\n const [contentWidth, setContentWidth] = useState<number>(0)\n\n const innerRef = useRef<HTMLDivElement>(null)\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n useExposure(innerRef, {\n componentType,\n componentName,\n componentTitle: data?.title,\n })\n\n const getRef = (index: number, el: HTMLDivElement) => {\n if (el) {\n accordionRef.current[index] = el\n }\n }\n\n useEffect(() => {\n const handleResize = () => {\n if (accordionRef.current[hoverIndexRef.current]) {\n setContentWidth(accordionRef.current[hoverIndexRef.current].offsetWidth)\n }\n }\n handleResize()\n const throttleResize = throttle(handleResize, 300)\n window.addEventListener('resize', throttleResize)\n return () => window.removeEventListener('resize', throttleResize)\n }, [])\n\n const MobileItem = ({ data, configuration }: { data: ItemType; configuration?: any }) => {\n return (\n <div\n className={cn(\n 'bg-container-secondary-1 relative w-full shrink-0 grow-0 overflow-hidden border border-solid',\n configuration?.itemShape === 'round' ? 'rounded-2xl' : ''\n )}\n >\n <a\n href={trackUrlRef(data?.imgLink, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${data?.title}@${data?.subTitle}`}\n data-headless-nav-postion={`''#${configuration?.index + 1}`}\n >\n <Picture\n className=\"size-full object-cover [&_img]:h-full [&_img]:object-cover\"\n source={data?.mobileImg?.url || ''}\n alt={data?.mobileImg?.alt || ''}\n />\n </a>\n <div className={cn('absolute inset-x-0 bottom-0 overflow-hidden px-4 pb-4')}>\n <div className=\"tablet:mb-6 mb-4 flex-1 overflow-hidden\">\n <p className=\"text-info-primary text-2xl font-bold leading-[1.2]\">{data?.title}</p>\n <h3 className=\"text-info-primary line-clamp-2 text-sm font-semibold\">{data?.subTitle}</h3>\n </div>\n\n <Button\n as=\"a\"\n variant=\"secondary\"\n aria-label={data?.title ?? data?.subTitle}\n className={cn('text-info-primary text-sm font-bold')}\n href={trackUrlRef(data.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-nav-postion={`''#${configuration?.index + 1}`}\n data-headless-title-desc-button={`${data?.title}#${data?.subTitle}#${configuration?.primaryButton}`}\n >\n {configuration?.primaryButton}\n </Button>\n </div>\n </div>\n )\n }\n\n const handleSwiperItemClick = useCallback(\n (idx: number) => {\n if (hoverIndex === idx || isAnimation.current) return\n isAnimation.current = true\n // \u66F4\u65B0\u5BBD\u5EA6\u76F8\u5173\u72B6\u6001\n setHoverIndex(idx)\n hoverIndexRef.current = idx\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_click',\n event_parameters: {\n page_group: 'Home Page',\n component_type: componentType,\n component_name: componentName,\n component_title: data?.products[idx]?.title,\n component_description: data?.products[idx]?.subTitle,\n position: idx + 1,\n },\n })\n },\n [data?.products, hoverIndex]\n )\n\n return (\n <>\n {data?.title && <Title data={{ title: data?.title }} />}\n <div ref={innerRef} className={cn('laptop:block hidden', { 'aiui-dark': data?.theme === 'dark' })}>\n <div\n className={cn(\n 'lg-desktop:h-[calc(560_/_1920*100vw)] desktop:h-[calc(448_/_1440*100vw)] laptop:h-[calc(336_/_1025*100vw)] flex max-h-[560px] min-h-[336px] w-full gap-4 overflow-hidden',\n className\n )}\n >\n {data?.products?.map((item, idx) => {\n const isExpanded = hoverIndex === idx\n const flexValue = isExpanded ? 8 : 1\n return (\n <div\n key={idx}\n style={{\n flex: `${flexValue} 1 0%`,\n transition: 'all 0.6s',\n }}\n ref={(el: HTMLDivElement | null) => {\n if (el) getRef(idx, el)\n }}\n className={cn(\n 'relative cursor-pointer overflow-hidden',\n data?.itemShape === 'round' ? 'rounded-2xl' : ''\n )}\n onMouseEnter={() => handleSwiperItemClick(idx)}\n onMouseLeave={() => {\n isAnimation.current = false\n }}\n onClick={() => {\n handleSwiperItemClick(idx)\n }}\n >\n <a\n href={trackUrlRef(item?.imgLink, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${item?.title}#${item?.subTitle}`}\n >\n <Picture\n source={item?.img?.url}\n className=\"size-full object-cover [&_img]:h-full [&_img]:object-cover\"\n alt={item?.img?.alt || ''}\n />\n </a>\n <div\n style={{\n width: contentWidth,\n }}\n className={cn(\n 'absolute inset-x-0 bottom-0 flex w-full items-end justify-between overflow-hidden px-8 pb-8 opacity-0 transition-opacity duration-[600ms] ease-in',\n isExpanded && contentWidth ? 'opacity-100' : 'opacity-0'\n )}\n >\n <div className=\"mr-16 flex-1 overflow-hidden\">\n <Heading\n as=\"h3\"\n className=\"laptop:text-2xl desktop:text-[32px] text-info-primary mb-1 text-xl font-bold\"\n >\n {item?.title}\n </Heading>\n <Heading\n as=\"h4\"\n className=\"lg-desktop:text-[18px] desktop:text-[16px] text-info-primary line-clamp-2 text-[14px] font-[700]\"\n >\n {item?.subTitle}\n </Heading>\n </div>\n <Button\n className={cn('mb-1.5 font-bold')}\n as=\"a\"\n href={trackUrlRef(item?.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${item?.title}#${item?.subTitle}#${data?.primaryButton}`}\n onClick={() => event?.primaryButton?.(data, idx)}\n >\n {data?.primaryButton}\n <span className=\"sr-only\">{item?.title ?? item?.subTitle}</span>\n </Button>\n </div>\n </div>\n )\n })}\n </div>\n </div>\n <div className={cn('laptop:hidden block', { 'aiui-dark': data?.theme === 'dark' })}>\n <SwiperBox\n className={cn('h-[400px] !overflow-visible', className)}\n id={'AccordionCards' + data?.key}\n data={{\n list: data?.products,\n configuration: {\n shape: data?.shape,\n itemShape: data?.itemShape,\n primaryButton: data?.primaryButton,\n event: event,\n title: data?.title,\n },\n }}\n Slide={MobileItem}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n }}\n />\n </div>\n </>\n )\n})\nexport default withLayout(AccordionCards)\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAmGU,IAAAI,EAAA,6BAlGVC,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BAAyB,GAAGD,CAAa,IAAIC,CAAa,GAC1D,kCAAiC,GAAG4B,GAAM,KAAK,IAAIA,GAAM,QAAQ,IAAIzB,GAAM,aAAa,GACxF,QAAS,IAAME,GAAO,gBAAgBF,EAAMuB,CAAG,EAE9C,UAAAvB,GAAM,iBACP,OAAC,QAAK,UAAU,UAAW,SAAAyB,GAAM,OAASA,GAAM,SAAS,GAC3D,GACF,IAjEKF,CAkEP,CAEJ,CAAC,EACH,EACF,KACA,OAAC,OAAI,aAAW,MAAG,sBAAuB,CAAE,YAAavB,GAAM,QAAU,MAAO,CAAC,EAC/E,mBAAC,EAAA2B,QAAA,CACC,aAAW,MAAG,8BAA+B1B,CAAS,EACtD,GAAI,iBAAmBD,GAAM,IAC7B,KAAM,CACJ,KAAMA,GAAM,SACZ,cAAe,CACb,MAAOA,GAAM,MACb,UAAWA,GAAM,UACjB,cAAeA,GAAM,cACrB,MAAOE,EACP,MAAOF,GAAM,KACf,CACF,EACA,MAAOkB,EACP,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,CACF,EACF,EACF,GACF,CAEJ,CAAC,EACD,IAAOrC,KAAQ,cAAWiB,CAAc",
6
6
  "names": ["AccordionCards_exports", "__export", "AccordionCards_default", "__toCommonJS", "import_jsx_runtime", "import_Title", "import_utils", "import_picture", "import_button", "import_SwiperBox", "import_Styles", "import_react", "import_useExposure", "import_trackUrlRef", "import_track", "import_throttle", "import_heading", "componentType", "componentName", "AccordionCards", "React", "data", "className", "event", "ref", "hoverIndex", "setHoverIndex", "hoverIndexRef", "accordionRef", "isAnimation", "contentWidth", "setContentWidth", "innerRef", "getRef", "index", "el", "handleResize", "throttleResize", "throttle", "MobileItem", "configuration", "Picture", "Button", "handleSwiperItemClick", "idx", "Title", "item", "isExpanded", "SwiperBox"]
7
7
  }
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  interface AiuiContextType {
3
3
  trackingData: Record<string, any>;
4
4
  locale?: string;
5
+ storeDomain?: string;
5
6
  copyWriting?: Record<string, string>;
6
7
  }
7
8
  export declare const AiuiContext: React.Context<AiuiContextType>;
@@ -1,2 +1,2 @@
1
- "use strict";var c=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var p=(e,t)=>{for(var r in t)c(e,r,{get:t[r],enumerable:!0})},A=(e,t,r,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of s(t))!x.call(e,i)&&i!==r&&c(e,i,{get:()=>t[i],enumerable:!(u=d(t,i))||u.enumerable});return e};var g=e=>A(c({},"__esModule",{value:!0}),e);var f={};p(f,{AiuiContext:()=>n,default:()=>y,useAiuiContext:()=>C});module.exports=g(f);var a=require("react/jsx-runtime"),o=require("react");const n=(0,o.createContext)({trackingData:{},locale:void 0,copyWriting:{}}),C=()=>{if(!(0,o.useContext)(n))throw new Error("useAiui must be used in <AiuiProvider>");return(0,o.useContext)(n)},l=({children:e,...t})=>(0,a.jsx)(n.Provider,{value:t,children:e});var y=l;
1
+ "use strict";var p=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var A=Object.prototype.hasOwnProperty;var k=(a,e)=>{for(var o in e)p(a,o,{get:e[o],enumerable:!0})},x=(a,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of v(e))!A.call(a,t)&&t!==o&&p(a,t,{get:()=>e[t],enumerable:!(s=f(e,t))||s.enumerable});return a};var C=a=>x(p({},"__esModule",{value:!0}),a);var T={};k(T,{AiuiContext:()=>c,default:()=>P,useAiuiContext:()=>_});module.exports=C(T);var b=require("react/jsx-runtime"),h=require("../../shared/track.js"),r=require("react");const c=(0,r.createContext)({trackingData:{},locale:void 0,copyWriting:{}}),_=()=>{if(!(0,r.useContext)(c))throw new Error("useAiui must be used in <AiuiProvider>");return(0,r.useContext)(c)},E=({children:a,...e})=>((0,r.useEffect)(()=>{const o=(t,n)=>{t?.stopPropagation?.();const i={};if(!n||!n.attributes)return i;for(const y of Array.from(n.attributes)){const u=y?.name;u?.startsWith("data-headless-")&&(i[u]=n.getAttribute(u))}const g=i?.["data-headless-sku"],l=i?.["data-headless-type-name"]?.split?.("#"),d=i?.["data-headless-title-desc-button"]?.split?.("#"),m=i?.["data-headless-nav-postion"]?.split?.("#");(0,h.gaTrack)({event:"ga4Event",event_name:"component_click",event_parameters:{page_group:e?.trackingData?.pageGroup||"Home Page",component_type:l?.[0]||"",component_name:l?.[1]||"",position:m?.[1]||"",navigation:m?.[0]||"",button_name:d?.[2]||"",SKU:g||"",component_title:d?.[0]||"",component_description:d?.[1]||""}})},s=new MutationObserver(()=>{document.querySelectorAll("[data-headless-type-name]").forEach(t=>{t.hasAttribute("data-headless-track-bound")||(t.addEventListener("click",n=>o(n,t)),t.setAttribute("data-headless-track-bound","true"))})});return s.observe(document.body,{childList:!0,subtree:!0}),document.querySelectorAll("[data-headless-type-name]").forEach(t=>{t.hasAttribute("data-headless-track-bound")||(t.addEventListener("click",n=>o(n,t)),t.setAttribute("data-headless-track-bound","true"))}),()=>s.disconnect()},[]),(0,b.jsx)(c.Provider,{value:e,children:a}));var P=E;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/AiuiProvider/index.tsx"],
4
- "sourcesContent": ["import React, { createContext, useContext } from 'react'\n\ninterface AiuiContextType {\n trackingData: Record<string, any>\n locale?: string\n copyWriting?: Record<string, string>\n}\n\nexport const AiuiContext = createContext<AiuiContextType>({\n trackingData: {},\n locale: undefined,\n copyWriting: {},\n})\n\nexport const useAiuiContext = () => {\n const context = useContext(AiuiContext)\n if (!context) {\n throw new Error('useAiui must be used in <AiuiProvider>')\n }\n return useContext(AiuiContext)\n}\n\nconst AiuiProvider = ({\n children,\n ...rest\n}: {\n children: React.ReactNode\n} & AiuiContextType) => {\n return <AiuiContext.Provider value={rest}>{children}</AiuiContext.Provider>\n}\n\nexport default AiuiProvider\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,EAAA,YAAAC,EAAA,mBAAAC,IAAA,eAAAC,EAAAL,GA4BS,IAAAM,EAAA,6BA5BTC,EAAiD,iBAQ1C,MAAML,KAAc,iBAA+B,CACxD,aAAc,CAAC,EACf,OAAQ,OACR,YAAa,CAAC,CAChB,CAAC,EAEYE,EAAiB,IAAM,CAElC,GAAI,IADY,cAAWF,CAAW,EAEpC,MAAM,IAAI,MAAM,wCAAwC,EAE1D,SAAO,cAAWA,CAAW,CAC/B,EAEMM,EAAe,CAAC,CACpB,SAAAC,EACA,GAAGC,CACL,OAGS,OAACR,EAAY,SAAZ,CAAqB,MAAOQ,EAAO,SAAAD,EAAS,EAGtD,IAAON,EAAQK",
6
- "names": ["AiuiProvider_exports", "__export", "AiuiContext", "AiuiProvider_default", "useAiuiContext", "__toCommonJS", "import_jsx_runtime", "import_react", "AiuiProvider", "children", "rest"]
4
+ "sourcesContent": ["import { gaTrack } from '../../shared/track.js'\nimport React, { createContext, useContext, useEffect } from 'react'\n\ninterface AiuiContextType {\n trackingData: Record<string, any>\n locale?: string\n storeDomain?: string\n copyWriting?: Record<string, string>\n}\n\nexport const AiuiContext = createContext<AiuiContextType>({\n trackingData: {},\n locale: undefined,\n copyWriting: {},\n})\n\nexport const useAiuiContext = () => {\n const context = useContext(AiuiContext)\n if (!context) {\n throw new Error('useAiui must be used in <AiuiProvider>')\n }\n return useContext(AiuiContext)\n}\n\nconst AiuiProvider = ({\n children,\n ...rest\n}: {\n children: React.ReactNode\n} & AiuiContextType) => {\n useEffect(() => {\n const handleTrackClick = (e: any, el: any) => {\n e?.stopPropagation?.()\n const out: any = {}\n if (!el || !el.attributes) return out\n for (const attr of Array.from(el.attributes)) {\n const name = (attr as any)?.name\n if (name?.startsWith('data-headless-')) {\n out[name] = el.getAttribute(name)\n }\n }\n const sku = out?.['data-headless-sku']\n const nameType = out?.['data-headless-type-name']?.split?.('#')\n const titleDesc = out?.['data-headless-title-desc-button']?.split?.('#')\n const navPosition = out?.['data-headless-nav-postion']?.split?.('#')\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_click',\n event_parameters: {\n page_group: rest?.trackingData?.pageGroup || 'Home Page',\n component_type: nameType?.[0] || '',\n component_name: nameType?.[1] || '',\n position: navPosition?.[1] || '',\n navigation: navPosition?.[0] || '',\n button_name: titleDesc?.[2] || '',\n SKU: sku || '',\n component_title: titleDesc?.[0] || '',\n component_description: titleDesc?.[1] || '',\n },\n })\n }\n const observer = new MutationObserver(() => {\n document.querySelectorAll('[data-headless-type-name]').forEach(el => {\n if (!el.hasAttribute('data-headless-track-bound')) {\n el.addEventListener('click', e => handleTrackClick(e, el))\n el.setAttribute('data-headless-track-bound', 'true') // \u907F\u514D\u91CD\u590D\u7ED1\u5B9A\n }\n })\n })\n observer.observe(document.body, { childList: true, subtree: true })\n // \u521D\u59CB\u5316\u4E00\u6B21\u73B0\u6709\u8282\u70B9\n document.querySelectorAll('[data-headless-type-name]').forEach(el => {\n if (!el.hasAttribute('data-headless-track-bound')) {\n el.addEventListener('click', e => handleTrackClick(e, el))\n el.setAttribute('data-headless-track-bound', 'true')\n }\n })\n return () => observer.disconnect()\n }, [])\n\n return <AiuiContext.Provider value={rest}>{children}</AiuiContext.Provider>\n}\n\nexport default AiuiProvider\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,EAAA,YAAAC,EAAA,mBAAAC,IAAA,eAAAC,EAAAL,GAgFS,IAAAM,EAAA,6BAhFTC,EAAwB,iCACxBC,EAA4D,iBASrD,MAAMN,KAAc,iBAA+B,CACxD,aAAc,CAAC,EACf,OAAQ,OACR,YAAa,CAAC,CAChB,CAAC,EAEYE,EAAiB,IAAM,CAElC,GAAI,IADY,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AAQ,SAAS,KAAM,CAAE,UAAW,GAAM,QAAS,EAAK,CAAC,EAElE,SAAS,iBAAiB,2BAA2B,EAAE,QAAQR,GAAM,CAC9DA,EAAG,aAAa,2BAA2B,IAC9CA,EAAG,iBAAiB,QAASD,GAAKD,EAAiBC,EAAGC,CAAE,CAAC,EACzDA,EAAG,aAAa,4BAA6B,MAAM,EAEvD,CAAC,EACM,IAAMQ,EAAS,WAAW,CACnC,EAAG,CAAC,CAAC,KAEE,OAACpB,EAAY,SAAZ,CAAqB,MAAOS,EAAO,SAAAD,EAAS,GAGtD,IAAOP,EAAQM",
6
+ "names": ["AiuiProvider_exports", "__export", "AiuiContext", "AiuiProvider_default", "useAiuiContext", "__toCommonJS", "import_jsx_runtime", "import_track", "import_react", "AiuiProvider", "children", "rest", "handleTrackClick", "e", "el", "out", "attr", "name", "sku", "nameType", "titleDesc", "navPosition", "observer"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var D=Object.create;var m=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty;var L=(e,t)=>{for(var o in t)m(e,o,{get:t[o],enumerable:!0})},b=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of j(t))!T.call(e,s)&&s!==o&&m(e,s,{get:()=>t[s],enumerable:!(a=I(t,s))||a.enumerable});return e};var h=(e,t,o)=>(o=e!=null?D(P(e)):{},b(t||!e||!e.__esModule?m(o,"default",{value:e,enumerable:!0}):o,e)),A=e=>b(m({},"__esModule",{value:!0}),e);var C={};L(C,{default:()=>Q});module.exports=A(C);var r=require("react/jsx-runtime"),i=require("react"),l=require("../../helpers/utils.js"),f=h(require("../../components/picture.js")),w=require("../../shared/Styles.js"),N=require("react-responsive"),E=require("../../hooks/useExposure.js"),c=require("swiper/react"),p=require("swiper/modules"),q=h(require("../Title/index.js"));const H="copy",z="store_benefits",R=(e,t)=>{const o=[];for(let a=0;a<e.length;a+=t)o.push(e.slice(a,a+t));return o},F=(0,i.forwardRef)(({data:{items:e=[],itemShape:t,title:o},className:a},s)=>{const[x,S]=(0,i.useState)(!1),y=(0,N.useMediaQuery)({query:"(max-width: 768px)"}),v=(0,i.useRef)(null),u=(0,i.useRef)(null);(0,i.useImperativeHandle)(s,()=>u.current),(0,E.useExposure)(u,{componentType:H,componentName:z}),(0,i.useEffect)(()=>{S(y)},[y]);const M=x?R(e,3):e;return(0,r.jsxs)("div",{ref:u,className:(0,l.cn)("brand-equity-wrapper w-full",a),children:[o&&(0,r.jsx)(q.default,{data:{title:o}}),x?(0,r.jsxs)(c.Swiper,{className:(0,l.cn)(a),modules:[p.FreeMode,p.Mousewheel,p.Pagination],freeMode:!0,mousewheel:{forceToAxis:!0},pagination:{clickable:!0,el:v.current},breakpoints:{0:{spaceBetween:12}},children:[M?.map((n,d)=>(0,r.jsx)(c.SwiperSlide,{className:"!flex flex-col gap-3",children:Array.isArray(n)&&n?.map((B,g)=>(0,r.jsx)(k,{data:B,itemShape:t,index:g},g))},"SwiperSlide"+d)),(0,r.jsx)("div",{ref:v,className:"mt-3 flex justify-center"})]}):(0,r.jsx)("div",{className:(0,l.cn)("grid grid-cols-1 gap-3","tablet:grid-cols-2","laptop:gap-4 laptop:grid-cols-10"),children:e.map((n,d)=>(0,r.jsx)(k,{data:n,itemShape:t,index:d},d))})]})}),k=({data:e,itemShape:t,index:o})=>(0,r.jsxs)("div",{className:(0,l.cn)("brand-equity-item","box-border flex w-full flex-col bg-white p-4","desktop:p-6 justify-between","laptop:col-span-3 lg-desktop:p-8","laptop:h-[192px] lg-desktop:h-[240px] h-[160px]",{"laptop:col-span-4":[0,5,6,11].includes(o)},t==="round"?"rounded-box":"rounded-none"),children:[(0,r.jsxs)("div",{className:"lg-desktop:h-[36px] flex h-[30px] items-center justify-between gap-3",children:[(0,r.jsx)("h3",{className:"lg-desktop:text-[18px] desktop:text-[16px] text-[14px] font-bold leading-[1.2] tracking-[-0.02em] text-[#1D1D1F]",children:e.title}),e.type==="avatar"?(0,r.jsx)("div",{className:"flex -space-x-2",children:e?.avatarList?.map((a,s)=>(0,r.jsx)("div",{className:(0,l.cn)("size-[30px] overflow-hidden rounded-full border-2 border-white","relative inline-block","lg-desktop:size-[36px]"),children:(0,r.jsx)(f.default,{source:a.avatar.url,alt:a.avatar?.alt,className:"size-full object-cover"})},s))}):(0,r.jsx)(f.default,{className:"lg-desktop:size-[36px] size-[30px] shrink-0 object-cover",source:e.icon?.url,alt:e.icon?.alt,imgClassName:"w-full h-full object-cover"})]}),(0,r.jsx)("p",{className:"lg-desktop:text-[24px] line-clamp-3 text-[20px] font-bold leading-[1.2] tracking-[-0.04em] text-[#1D1D1F]",children:e.description})]});var Q=(0,w.withLayout)(F);
1
+ "use strict";"use client";var D=Object.create;var m=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty;var L=(e,t)=>{for(var o in t)m(e,o,{get:t[o],enumerable:!0})},b=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of j(t))!T.call(e,s)&&s!==o&&m(e,s,{get:()=>t[s],enumerable:!(a=I(t,s))||a.enumerable});return e};var h=(e,t,o)=>(o=e!=null?D(P(e)):{},b(t||!e||!e.__esModule?m(o,"default",{value:e,enumerable:!0}):o,e)),A=e=>b(m({},"__esModule",{value:!0}),e);var C={};L(C,{default:()=>Q});module.exports=A(C);var r=require("react/jsx-runtime"),i=require("react"),l=require("../../helpers/utils.js"),f=h(require("../../components/picture.js")),w=require("../../shared/Styles.js"),N=require("react-responsive"),E=require("../../hooks/useExposure.js"),c=require("swiper/react"),p=require("swiper/modules"),q=h(require("../Title/index.js"));const H="copy",z="store_benefits",R=(e,t)=>{const o=[];for(let a=0;a<e.length;a+=t)o.push(e.slice(a,a+t));return o},F=(0,i.forwardRef)(({data:{items:e=[],itemShape:t,title:o},className:a},s)=>{const[x,S]=(0,i.useState)(!1),y=(0,N.useMediaQuery)({query:"(max-width: 768px)"}),v=(0,i.useRef)(null),u=(0,i.useRef)(null);(0,i.useImperativeHandle)(s,()=>u.current),(0,E.useExposure)(u,{componentType:H,componentName:z}),(0,i.useEffect)(()=>{S(y)},[y]);const M=x?R(e,3):e;return(0,r.jsxs)("div",{ref:u,className:(0,l.cn)("brand-equity-wrapper w-full",a),children:[o&&(0,r.jsx)(q.default,{data:{title:o}}),x?(0,r.jsxs)(c.Swiper,{className:(0,l.cn)(a),modules:[p.FreeMode,p.Mousewheel,p.Pagination],freeMode:!0,mousewheel:{forceToAxis:!0},pagination:{clickable:!0,el:v.current},breakpoints:{0:{spaceBetween:12}},children:[M?.map((n,d)=>(0,r.jsx)(c.SwiperSlide,{className:"!flex flex-col gap-3",children:Array.isArray(n)&&n?.map((B,g)=>(0,r.jsx)(k,{data:B,itemShape:t,index:g},g))},"SwiperSlide"+d)),(0,r.jsx)("div",{ref:v,className:"mt-3 flex justify-center"})]}):(0,r.jsx)("div",{className:(0,l.cn)("grid grid-cols-1 gap-3","tablet:grid-cols-2","laptop:gap-4 laptop:grid-cols-10"),children:e.map((n,d)=>(0,r.jsx)(k,{data:n,itemShape:t,index:d},d))})]})}),k=({data:e,itemShape:t,index:o})=>(0,r.jsxs)("div",{className:(0,l.cn)("brand-equity-item","box-border flex w-full flex-col bg-white p-4","desktop:p-6 justify-between","laptop:col-span-3 lg-desktop:p-8","laptop:h-[192px] lg-desktop:h-[240px] h-[160px]",{"laptop:col-span-4":[0,5,6,11].includes(o)},t==="round"?"rounded-box":"rounded-none"),children:[(0,r.jsxs)("div",{className:"lg-desktop:h-[36px] flex h-[30px] items-center justify-between gap-3",children:[(0,r.jsx)("h3",{className:"lg-desktop:text-[18px] desktop:text-[16px] text-[14px] font-bold leading-[1.2] tracking-[-0.02em] text-[#1D1D1F]",children:e.title}),e.type==="avatar"?(0,r.jsx)("div",{className:"flex -space-x-2",children:e?.avatarList?.map((a,s)=>(0,r.jsx)("div",{className:(0,l.cn)("size-[30px] overflow-hidden rounded-full border-2 border-white","relative inline-block","lg-desktop:size-[36px]"),children:(0,r.jsx)(f.default,{source:a.avatar?.url,alt:a.avatar?.alt,className:"size-full object-cover"})},s))}):(0,r.jsx)(f.default,{className:"lg-desktop:size-[36px] size-[30px] shrink-0 object-cover",source:e.icon?.url,alt:e.icon?.alt,imgClassName:"w-full h-full object-cover"})]}),(0,r.jsx)("p",{className:"lg-desktop:text-[24px] line-clamp-3 text-[20px] font-bold leading-[1.2] tracking-[-0.04em] text-[#1D1D1F]",children:e.description})]});var Q=(0,w.withLayout)(F);
2
2
  //# sourceMappingURL=BrandEquity.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/BrandEquity/BrandEquity.tsx"],
4
- "sourcesContent": ["'use client'\nimport { forwardRef, useEffect, useRef, useState, useImperativeHandle } from 'react'\n\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { BrandEquityProps, BrandEquityItemProps } from './types.js'\n\nimport type { Img } from '../../types/props.js'\nimport { useMediaQuery } from 'react-responsive'\nimport { useExposure } from '../../hooks/useExposure.js'\n\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Pagination, FreeMode, Mousewheel } from 'swiper/modules'\nimport Title from '../Title/index.js'\n\nconst componentType = 'copy'\nconst componentName = 'store_benefits'\n\nconst chunkArray = (arr: BrandEquityItemProps[], size: number) => {\n const chunks = []\n for (let i = 0; i < arr.length; i += size) {\n chunks.push(arr.slice(i, i + size))\n }\n return chunks\n}\n\nconst BrandEquity = forwardRef<HTMLDivElement, BrandEquityProps>(\n ({ data: { items = [], itemShape, title }, className }, ref) => {\n const [isMobile, setIsMobile] = useState(false)\n const mediaQuery = useMediaQuery({ query: '(max-width: 768px)' })\n const paginationRef = useRef<HTMLDivElement>(null)\n const innerRef = useRef<HTMLDivElement>(null)\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n useExposure(innerRef, {\n componentType,\n componentName,\n })\n\n useEffect(() => {\n setIsMobile(mediaQuery)\n }, [mediaQuery])\n\n const itemsArray = isMobile ? chunkArray(items, 3) : items\n return (\n <div ref={innerRef} className={cn('brand-equity-wrapper w-full', className)}>\n {title && <Title data={{ title: title }} />}\n {isMobile ? (\n <Swiper\n className={cn(className)}\n modules={[FreeMode, Mousewheel, Pagination]}\n freeMode={true}\n mousewheel={{\n forceToAxis: true,\n }}\n pagination={{\n clickable: true,\n el: paginationRef.current,\n }}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n },\n }}\n >\n {itemsArray?.map((item, jIndex) => (\n <SwiperSlide key={'SwiperSlide' + jIndex} className=\"!flex flex-col gap-3\">\n {Array.isArray(item) &&\n item?.map((item, index) => (\n <BrandEquityItem key={index} data={item} itemShape={itemShape} index={index} />\n ))}\n </SwiperSlide>\n ))}\n <div ref={paginationRef} className=\"mt-3 flex justify-center\"></div>\n </Swiper>\n ) : (\n <div className={cn('grid grid-cols-1 gap-3', 'tablet:grid-cols-2', 'laptop:gap-4 laptop:grid-cols-10')}>\n {items.map((item, index) => (\n <BrandEquityItem key={index} data={item} itemShape={itemShape} index={index} />\n ))}\n </div>\n )}\n </div>\n )\n }\n)\n\nconst BrandEquityItem = ({\n data,\n itemShape,\n index,\n}: {\n data: BrandEquityItemProps\n itemShape?: 'round' | 'square'\n index: number\n}) => {\n return (\n <div\n className={cn(\n 'brand-equity-item',\n 'box-border flex w-full flex-col bg-white p-4',\n 'desktop:p-6 justify-between',\n 'laptop:col-span-3 lg-desktop:p-8',\n 'laptop:h-[192px] lg-desktop:h-[240px] h-[160px]',\n {\n ['laptop:col-span-4']: [0, 5, 6, 11].includes(index),\n },\n itemShape === 'round' ? 'rounded-box' : 'rounded-none'\n )}\n >\n <div className=\"lg-desktop:h-[36px] flex h-[30px] items-center justify-between gap-3\">\n <h3 className=\"lg-desktop:text-[18px] desktop:text-[16px] text-[14px] font-bold leading-[1.2] tracking-[-0.02em] text-[#1D1D1F]\">\n {data.title}\n </h3>\n {data.type === 'avatar' ? (\n <div className=\"flex -space-x-2\">\n {data?.avatarList?.map((item: { avatar: Img }, index: number) => (\n <div\n key={index}\n className={cn(\n 'size-[30px] overflow-hidden rounded-full border-2 border-white',\n 'relative inline-block',\n 'lg-desktop:size-[36px]'\n )}\n >\n <Picture source={item.avatar.url} alt={item.avatar?.alt} className=\"size-full object-cover\" />\n </div>\n ))}\n </div>\n ) : (\n <Picture\n className=\"lg-desktop:size-[36px] size-[30px] shrink-0 object-cover\"\n source={data.icon?.url}\n alt={data.icon?.alt}\n imgClassName=\"w-full h-full object-cover\"\n />\n )}\n </div>\n <p className=\"lg-desktop:text-[24px] line-clamp-3 text-[20px] font-bold leading-[1.2] tracking-[-0.04em] text-[#1D1D1F]\">\n {data.description}\n </p>\n </div>\n )\n}\n\nexport default withLayout(BrandEquity)\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA8CkB,IAAAI,EAAA,6BA7ClBC,EAA6E,iBAE7EC,EAAmB,kCACnBC,EAAoB,0CACpBC,EAA2B,kCAI3BC,EAA8B,4BAC9BC,EAA4B,sCAE5BL,EAAoC,wBACpCM,EAAiD,0BACjDC,EAAkB,gCAElB,MAAMC,EAAgB,OAChBC,EAAgB,iBAEhBC,EAAa,CAACC,EAA6BC,IAAiB,CAChE,MAAMC,EAAS,CAAC,EAChB,QAASC,EAAI,EAAGA,EAAIH,EAAI,OAAQG,GAAKF,EACnCC,EAAO,KAAKF,EAAI,MAAMG,EAAGA,EAAIF,CAAI,CAAC,EAEpC,OAAOC,CACT,EAEME,KAAc,cAClB,CAAC,CAAE,KAAM,CAAE,MAAAC,EAAQ,CAAC,EAAG,UAAAC,EAAW,MAAAC,CAAM,EAAG,UAAAC,CAAU,EAAGC,IAAQ,CAC9D,KAAM,CAACC,EAAUC,CAAW,KAA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AC,OACC,aAAW,MACT,oBACA,+CACA,8BACA,mCACA,kDACA,CACG,oBAAsB,CAAC,EAAG,EAAG,EAAG,EAAE,EAAE,SAASA,CAAK,CACrD,EACAb,IAAc,QAAU,cAAgB,cAC1C,EAEA,qBAAC,OAAI,UAAU,uEACb,oBAAC,MAAG,UAAU,mHACX,SAAAe,EAAK,MACR,EACCA,EAAK,OAAS,YACb,OAAC,OAAI,UAAU,kBACZ,SAAAA,GAAM,YAAY,IAAI,CAACJ,EAAuBE,OAC7C,OAAC,OAEC,aAAW,MACT,iEACA,wBACA,wBACF,EAEA,mBAAC,EAAAG,QAAA,CAAQ,OAAQL,EAAK,OAAO,IAAK,IAAKA,EAAK,QAAQ,IAAK,UAAU,yBAAyB,GAPvFE,CAQP,CACD,EACH,KAEA,OAAC,EAAAG,QAAA,CACC,UAAU,2DACV,OAAQD,EAAK,MAAM,IACnB,IAAKA,EAAK,MAAM,IAChB,aAAa,6BACf,GAEJ,KACA,OAAC,KAAE,UAAU,4GACV,SAAAA,EAAK,YACR,GACF,EAIJ,IAAOnC,KAAQ,cAAWkB,CAAW",
4
+ "sourcesContent": ["'use client'\nimport { forwardRef, useEffect, useRef, useState, useImperativeHandle } from 'react'\n\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { BrandEquityProps, BrandEquityItemProps } from './types.js'\n\nimport type { Img } from '../../types/props.js'\nimport { useMediaQuery } from 'react-responsive'\nimport { useExposure } from '../../hooks/useExposure.js'\n\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Pagination, FreeMode, Mousewheel } from 'swiper/modules'\nimport Title from '../Title/index.js'\n\nconst componentType = 'copy'\nconst componentName = 'store_benefits'\n\nconst chunkArray = (arr: BrandEquityItemProps[], size: number) => {\n const chunks = []\n for (let i = 0; i < arr.length; i += size) {\n chunks.push(arr.slice(i, i + size))\n }\n return chunks\n}\n\nconst BrandEquity = forwardRef<HTMLDivElement, BrandEquityProps>(\n ({ data: { items = [], itemShape, title }, className }, ref) => {\n const [isMobile, setIsMobile] = useState(false)\n const mediaQuery = useMediaQuery({ query: '(max-width: 768px)' })\n const paginationRef = useRef<HTMLDivElement>(null)\n const innerRef = useRef<HTMLDivElement>(null)\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n useExposure(innerRef, {\n componentType,\n componentName,\n })\n\n useEffect(() => {\n setIsMobile(mediaQuery)\n }, [mediaQuery])\n\n const itemsArray = isMobile ? chunkArray(items, 3) : items\n return (\n <div ref={innerRef} className={cn('brand-equity-wrapper w-full', className)}>\n {title && <Title data={{ title: title }} />}\n {isMobile ? (\n <Swiper\n className={cn(className)}\n modules={[FreeMode, Mousewheel, Pagination]}\n freeMode={true}\n mousewheel={{\n forceToAxis: true,\n }}\n pagination={{\n clickable: true,\n el: paginationRef.current,\n }}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n },\n }}\n >\n {itemsArray?.map((item, jIndex) => (\n <SwiperSlide key={'SwiperSlide' + jIndex} className=\"!flex flex-col gap-3\">\n {Array.isArray(item) &&\n item?.map((item, index) => (\n <BrandEquityItem key={index} data={item} itemShape={itemShape} index={index} />\n ))}\n </SwiperSlide>\n ))}\n <div ref={paginationRef} className=\"mt-3 flex justify-center\"></div>\n </Swiper>\n ) : (\n <div className={cn('grid grid-cols-1 gap-3', 'tablet:grid-cols-2', 'laptop:gap-4 laptop:grid-cols-10')}>\n {items.map((item, index) => (\n <BrandEquityItem key={index} data={item} itemShape={itemShape} index={index} />\n ))}\n </div>\n )}\n </div>\n )\n }\n)\n\nconst BrandEquityItem = ({\n data,\n itemShape,\n index,\n}: {\n data: BrandEquityItemProps\n itemShape?: 'round' | 'square'\n index: number\n}) => {\n return (\n <div\n className={cn(\n 'brand-equity-item',\n 'box-border flex w-full flex-col bg-white p-4',\n 'desktop:p-6 justify-between',\n 'laptop:col-span-3 lg-desktop:p-8',\n 'laptop:h-[192px] lg-desktop:h-[240px] h-[160px]',\n {\n ['laptop:col-span-4']: [0, 5, 6, 11].includes(index),\n },\n itemShape === 'round' ? 'rounded-box' : 'rounded-none'\n )}\n >\n <div className=\"lg-desktop:h-[36px] flex h-[30px] items-center justify-between gap-3\">\n <h3 className=\"lg-desktop:text-[18px] desktop:text-[16px] text-[14px] font-bold leading-[1.2] tracking-[-0.02em] text-[#1D1D1F]\">\n {data.title}\n </h3>\n {data.type === 'avatar' ? (\n <div className=\"flex -space-x-2\">\n {data?.avatarList?.map((item: { avatar: Img }, index: number) => (\n <div\n key={index}\n className={cn(\n 'size-[30px] overflow-hidden rounded-full border-2 border-white',\n 'relative inline-block',\n 'lg-desktop:size-[36px]'\n )}\n >\n <Picture source={item.avatar?.url} alt={item.avatar?.alt} className=\"size-full object-cover\" />\n </div>\n ))}\n </div>\n ) : (\n <Picture\n className=\"lg-desktop:size-[36px] size-[30px] shrink-0 object-cover\"\n source={data.icon?.url}\n alt={data.icon?.alt}\n imgClassName=\"w-full h-full object-cover\"\n />\n )}\n </div>\n <p className=\"lg-desktop:text-[24px] line-clamp-3 text-[20px] font-bold leading-[1.2] tracking-[-0.04em] text-[#1D1D1F]\">\n {data.description}\n </p>\n </div>\n )\n}\n\nexport default withLayout(BrandEquity)\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA8CkB,IAAAI,EAAA,6BA7ClBC,EAA6E,iBAE7EC,EAAmB,kCACnBC,EAAoB,0CACpBC,EAA2B,kCAI3BC,EAA8B,4BAC9BC,EAA4B,sCAE5BL,EAAoC,wBACpCM,EAAiD,0BACjDC,EAAkB,gCAElB,MAAMC,EAAgB,OAChBC,EAAgB,iBAEhBC,EAAa,CAACC,EAA6BC,IAAiB,CAChE,MAAMC,EAAS,CAAC,EAChB,QAASC,EAAI,EAAGA,EAAIH,EAAI,OAAQG,GAAKF,EACnCC,EAAO,KAAKF,EAAI,MAAMG,EAAGA,EAAIF,CAAI,CAAC,EAEp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ME,OAChB,OAACC,EAAA,CAA4B,KAAMH,EAAM,UAAWX,EAAW,MAAOa,GAAhDA,CAAuD,CAC9E,EACH,GAEJ,CAEJ,CACF,EAEMC,EAAkB,CAAC,CACvB,KAAAC,EACA,UAAAf,EACA,MAAAa,CACF,OAMI,QAAC,OACC,aAAW,MACT,oBACA,+CACA,8BACA,mCACA,kDACA,CACG,oBAAsB,CAAC,EAAG,EAAG,EAAG,EAAE,EAAE,SAASA,CAAK,CACrD,EACAb,IAAc,QAAU,cAAgB,cAC1C,EAEA,qBAAC,OAAI,UAAU,uEACb,oBAAC,MAAG,UAAU,mHACX,SAAAe,EAAK,MACR,EACCA,EAAK,OAAS,YACb,OAAC,OAAI,UAAU,kBACZ,SAAAA,GAAM,YAAY,IAAI,CAACJ,EAAuBE,OAC7C,OAAC,OAEC,aAAW,MACT,iEACA,wBACA,wBACF,EAEA,mBAAC,EAAAG,QAAA,CAAQ,OAAQL,EAAK,QAAQ,IAAK,IAAKA,EAAK,QAAQ,IAAK,UAAU,yBAAyB,GAPxFE,CAQP,CACD,EACH,KAEA,OAAC,EAAAG,QAAA,CACC,UAAU,2DACV,OAAQD,EAAK,MAAM,IACnB,IAAKA,EAAK,MAAM,IAChB,aAAa,6BACf,GAEJ,KACA,OAAC,KAAE,UAAU,4GACV,SAAAA,EAAK,YACR,GACF,EAIJ,IAAOnC,KAAQ,cAAWkB,CAAW",
6
6
  "names": ["BrandEquity_exports", "__export", "BrandEquity_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_picture", "import_Styles", "import_react_responsive", "import_useExposure", "import_modules", "import_Title", "componentType", "componentName", "chunkArray", "arr", "size", "chunks", "i", "BrandEquity", "items", "itemShape", "title", "className", "ref", "isMobile", "setIsMobile", "mediaQuery", "paginationRef", "innerRef", "itemsArray", "Title", "item", "jIndex", "index", "BrandEquityItem", "data", "Picture"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var N=Object.create;var s=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var _=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var S=(e,t)=>{for(var o in t)s(e,o,{get:t[o],enumerable:!0})},y=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of I(t))!j.call(e,n)&&n!==o&&s(e,n,{get:()=>t[n],enumerable:!(a=C(t,n))||a.enumerable});return e};var m=(e,t,o)=>(o=e!=null?N(_(e)):{},y(t||!e||!e.__esModule?s(o,"default",{value:e,enumerable:!0}):o,e)),D=e=>y(s({},"__esModule",{value:!0}),e);var E={};S(E,{default:()=>R});module.exports=D(E);var r=require("react/jsx-runtime"),l=m(require("react")),i=require("../../helpers/utils.js"),c=m(require("../../components/picture.js")),v=require("../../shared/Styles.js"),b=m(require("../Title/index.js")),g=m(require("./SwiperCategory.js")),k=require("../../hooks/useExposure.js"),f=require("../../shared/trackUrlRef.js"),w=require("../../components/heading.js");const d="image",u="category_banner",$=(e,t)=>{const o=[];for(let a=0;a<e.length;a+=t)o.push(e.slice(a,a+t));return o},H=({data:e,configuration:t})=>(0,r.jsxs)("div",{className:(0,i.cn)("tablet:h-[120px] laptop:h-[144px] desktop:h-[192px] lg-desktop:h-[240px]","tablet:p-3 laptop:p-4 desktop:p-6 lg-desktop:p-8","bg-container-secondary-1 hover:bg-info-white group box-border flex size-full cursor-pointer flex-col overflow-hidden duration-300",t?.shape==="round"?"rounded-2xl":"rounded-none"),children:[(0,r.jsx)("div",{className:"transition-all duration-300 group-hover:scale-110",children:(0,r.jsx)("a",{"aria-label":e?.name,href:(0,f.trackUrlRef)(e?.link,`${d}_${u}`),onClick:()=>t?.event?.primaryButton(e,t?.index),children:(0,r.jsx)(c.default,{alt:e?.image?.alt||"",source:e?.image?.url||"",className:"laptop:size-[88px] tablet:size-[72px] desktop:size-[116px] lg-desktop:size-[146px] m-auto flex justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover"})})}),(0,r.jsx)(w.Heading,{as:"h3",className:"lg-desktop:text-[18px] text-info-primary box-border line-clamp-2 flex-1 text-center text-[14px] font-bold",children:e?.name})]}),T=({data:e,configuration:t})=>(0,r.jsxs)("div",{className:(0,i.cn)("bg-container-secondary-1 box-border max-h-[126px] w-full overflow-hidden","hover:bg-info-white cursor-pointer px-3 py-4 duration-300",t?.shape==="round"?"rounded-2xl":"rounded-none"),children:[(0,r.jsx)("a",{href:(0,f.trackUrlRef)(e?.link,`${d}_${u}`),onClick:()=>t?.event?.primaryButton(e,t?.index),children:(0,r.jsx)(c.default,{alt:e?.image?.alt||"",className:"m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover",source:e?.image?.url||""})}),(0,r.jsx)("p",{className:"text-info-primary flex-1 truncate text-center text-sm font-bold",children:e?.name})]},`${e?.name}`),z=({data:e,configuration:t,index:o})=>(0,r.jsxs)("div",{className:(0,i.cn)("bg-container-secondary-1 box-border flex w-full shrink-0 flex-col items-center justify-center overflow-hidden","hover:bg-info-white cursor-pointer p-4",o===0?"aspect-h-[252] row-span-2":"aspect-h-[120]",t?.shape==="round"?"rounded-2xl":"rounded-none"),children:[(0,r.jsx)("a",{href:e?.link||"",onClick:()=>t?.event?.primaryButton(e,t?.index),children:(0,r.jsx)(c.default,{source:e?.image?.url||"",alt:e?.image?.alt||"",className:(0,i.cn)("mb-2 flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover",o===0?"max-h-[146px] overflow-hidden":"max-h-[72px] max-w-[72px]")})}),(0,r.jsx)("p",{className:"text-info-primary line-clamp-2 text-center text-sm font-bold",children:e?.name})]}),B=({data:e,configuration:t})=>(0,r.jsx)("div",{className:"grid grid-cols-2 gap-3",children:e?.map((o,a)=>e?.length===5?(0,r.jsx)(z,{index:a,data:o,configuration:t},a):(0,r.jsx)(T,{data:o,configuration:t},a))}),M=l.default.forwardRef((e,t)=>{const{data:o,className:a="",key:n,event:x}=e,h=o?.isShowSelect?o?.products:o?.productData,p=(0,l.useRef)(null);return(0,l.useImperativeHandle)(t,()=>p.current),(0,k.useExposure)(p,{componentType:d,componentName:u,componentTitle:o?.title}),(0,r.jsxs)("div",{ref:p,className:(0,i.cn)("w-full overflow-hidden",a,{"aiui-dark":o?.theme==="dark"}),children:[o?.title&&(0,r.jsx)(b.default,{data:{title:o?.title},className:"text-4xl"}),(0,r.jsx)("div",{className:"tablet:block hidden",children:(0,r.jsx)(g.default,{id:`Category${n}`,Slide:H,data:{list:h,configuration:{shape:o?.shape,event:x}}})}),(0,r.jsx)("div",{className:"tablet:hidden block",children:(0,r.jsx)(g.default,{id:`Category1${n}`,Slide:B,data:{list:$(h,6),configuration:{shape:o?.shape,event:x}}})}),(0,r.jsx)("div",{className:"h-7"})]})});var R=(0,v.withLayout)(M);
1
+ "use strict";"use client";var N=Object.create;var c=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var $=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty;var j=(e,t)=>{for(var o in t)c(e,o,{get:t[o],enumerable:!0})},y=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of I(t))!_.call(e,n)&&n!==o&&c(e,n,{get:()=>t[n],enumerable:!(a=C(t,n))||a.enumerable});return e};var p=(e,t,o)=>(o=e!=null?N($(e)):{},y(t||!e||!e.__esModule?c(o,"default",{value:e,enumerable:!0}):o,e)),S=e=>y(c({},"__esModule",{value:!0}),e);var E={};j(E,{default:()=>R});module.exports=S(E);var r=require("react/jsx-runtime"),l=p(require("react")),i=require("../../helpers/utils.js"),d=p(require("../../components/picture.js")),v=require("../../shared/Styles.js"),b=p(require("../Title/index.js")),g=p(require("./SwiperCategory.js")),k=require("../../hooks/useExposure.js"),f=require("../../shared/trackUrlRef.js"),w=require("../../components/heading.js");const s="image",m="category_banner",D=(e,t)=>{const o=[];for(let a=0;a<e.length;a+=t)o.push(e.slice(a,a+t));return o},H=({data:e,configuration:t})=>(0,r.jsxs)("div",{className:(0,i.cn)("tablet:h-[120px] laptop:h-[144px] desktop:h-[192px] lg-desktop:h-[240px]","tablet:p-3 laptop:p-4 desktop:p-6 lg-desktop:p-8","bg-container-secondary-1 hover:bg-info-white group box-border flex size-full cursor-pointer flex-col overflow-hidden duration-300",t?.shape==="round"?"rounded-2xl":"rounded-none"),children:[(0,r.jsx)("div",{className:"transition-all duration-300 group-hover:scale-110",children:(0,r.jsx)("a",{"aria-label":e?.name,href:(0,f.trackUrlRef)(e?.link,`${s}_${m}`),"data-headless-type-name":`${s}#${m}`,"data-headless-title-desc-button":`${e?.name}`,onClick:()=>t?.event?.primaryButton(e,t?.index),children:(0,r.jsx)(d.default,{alt:e?.image?.alt||"",source:e?.image?.url||"",className:"laptop:size-[88px] tablet:size-[72px] desktop:size-[116px] lg-desktop:size-[146px] m-auto flex justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover"})})}),(0,r.jsx)(w.Heading,{as:"h3",className:"lg-desktop:text-[18px] text-info-primary box-border line-clamp-2 flex-1 text-center text-[14px] font-bold",children:e?.name})]}),T=({data:e,configuration:t})=>(0,r.jsxs)("div",{className:(0,i.cn)("bg-container-secondary-1 box-border max-h-[126px] w-full overflow-hidden","hover:bg-info-white cursor-pointer px-3 py-4 duration-300",t?.shape==="round"?"rounded-2xl":"rounded-none"),children:[(0,r.jsx)("a",{href:(0,f.trackUrlRef)(e?.link,`${s}_${m}`),"data-headless-type-name":`${s}#${m}`,"data-headless-title-desc-button":`${e?.name}`,"data-headless-nav-postion":`''#${t?.index+1}`,onClick:()=>t?.event?.primaryButton(e,t?.index+1),children:(0,r.jsx)(d.default,{alt:e?.image?.alt||"",className:"m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover",source:e?.image?.url||""})}),(0,r.jsx)("p",{className:"text-info-primary flex-1 truncate text-center text-sm font-bold",children:e?.name})]},`${e?.name}`),z=({data:e,configuration:t,index:o})=>(0,r.jsxs)("div",{className:(0,i.cn)("bg-container-secondary-1 box-border flex w-full shrink-0 flex-col items-center justify-center overflow-hidden","hover:bg-info-white cursor-pointer p-4",o===0?"aspect-h-[252] row-span-2":"aspect-h-[120]",t?.shape==="round"?"rounded-2xl":"rounded-none"),children:[(0,r.jsx)("a",{href:e?.link||"",onClick:()=>t?.event?.primaryButton(e,t?.index),children:(0,r.jsx)(d.default,{source:e?.image?.url||"",alt:e?.image?.alt||"",className:(0,i.cn)("mb-2 flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover",o===0?"max-h-[146px] overflow-hidden":"max-h-[72px] max-w-[72px]")})}),(0,r.jsx)("p",{className:"text-info-primary line-clamp-2 text-center text-sm font-bold",children:e?.name})]}),B=({data:e,configuration:t})=>(0,r.jsx)("div",{className:"grid grid-cols-2 gap-3",children:e?.map((o,a)=>e?.length===5?(0,r.jsx)(z,{index:a,data:o,configuration:t},a):(0,r.jsx)(T,{data:o,configuration:t},a))}),M=l.default.forwardRef((e,t)=>{const{data:o,className:a="",key:n,event:h}=e,x=o?.isShowSelect?o?.products:o?.productData,u=(0,l.useRef)(null);return(0,l.useImperativeHandle)(t,()=>u.current),(0,k.useExposure)(u,{componentType:s,componentName:m,componentTitle:o?.title}),(0,r.jsxs)("div",{ref:u,className:(0,i.cn)("w-full overflow-hidden",a,{"aiui-dark":o?.theme==="dark"}),children:[o?.title&&(0,r.jsx)(b.default,{data:{title:o?.title},className:"text-4xl"}),(0,r.jsx)("div",{className:"tablet:block hidden",children:(0,r.jsx)(g.default,{id:`Category${n}`,Slide:H,data:{list:x,configuration:{shape:o?.shape,event:h,title:o?.title}}})}),(0,r.jsx)("div",{className:"tablet:hidden block",children:(0,r.jsx)(g.default,{id:`Category1${n}`,Slide:B,data:{list:D(x,6),configuration:{shape:o?.shape,event:h,title:o?.title}}})}),(0,r.jsx)("div",{className:"h-7"})]})});var R=(0,v.withLayout)(M);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Category/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport Title from '../Title/index.js'\nimport SwiperBox from './SwiperCategory.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport type { Img } from '../../types/props.js'\nimport { Heading } from '../../components/heading.js'\n\nconst componentType = 'image'\nconst componentName = 'category_banner'\n\nexport interface CategoryItem {\n /** \u4EA7\u54C1\u56FE\u7247*/\n image: Img\n name: string\n link?: string\n}\n\nexport interface CategoryProps {\n className?: string\n /** \u4E3B\u9898\u8272*/\n data: {\n isShowSelect: boolean\n products: CategoryItem[]\n productData: CategoryItem[]\n /** \u5361\u7247\u5F62\u72B6 */\n shape?: 'round' | 'square'\n title?: string\n theme?: 'light' | 'dark'\n }\n buildData?: {\n categories: any[]\n products: any[]\n }\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: {\n primaryButton?: (v: any, index: number) => void\n }\n key?: string\n}\n\nconst chunkArray = (arr: any[], size: number) => {\n const chunks = []\n for (let i = 0; i < arr.length; i += size) {\n chunks.push(arr.slice(i, i + size))\n }\n return chunks\n}\n\nconst CategoryPcItem = ({ data, configuration }: { data: CategoryItem; configuration?: any }) => {\n return (\n <div\n className={cn(\n 'tablet:h-[120px] laptop:h-[144px] desktop:h-[192px] lg-desktop:h-[240px]',\n 'tablet:p-3 laptop:p-4 desktop:p-6 lg-desktop:p-8',\n 'bg-container-secondary-1 hover:bg-info-white group box-border flex size-full cursor-pointer flex-col overflow-hidden duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <div className=\"transition-all duration-300 group-hover:scale-110\">\n <a\n aria-label={data?.name}\n href={trackUrlRef(data?.link, `${componentType}_${componentName}`)}\n onClick={() => configuration?.event?.primaryButton(data, configuration?.index)}\n >\n <Picture\n alt={data?.image?.alt || ''}\n source={data?.image?.url || ''}\n className=\"laptop:size-[88px] tablet:size-[72px] desktop:size-[116px] lg-desktop:size-[146px] m-auto flex justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover\"\n />\n </a>\n </div>\n <Heading\n as=\"h3\"\n className=\"lg-desktop:text-[18px] text-info-primary box-border line-clamp-2 flex-1 text-center text-[14px] font-bold\"\n >\n {data?.name}\n </Heading>\n </div>\n )\n}\n\n// \u79FB\u52A8\u7AEF\nconst SingleItem = ({ data, configuration }: { data: CategoryItem; configuration?: any }) => {\n return (\n <div\n key={`${data?.name}`}\n className={cn(\n 'bg-container-secondary-1 box-border max-h-[126px] w-full overflow-hidden',\n 'hover:bg-info-white cursor-pointer px-3 py-4 duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <a\n href={trackUrlRef(data?.link, `${componentType}_${componentName}`)}\n onClick={() => configuration?.event?.primaryButton(data, configuration?.index)}\n >\n <Picture\n alt={data?.image?.alt || ''}\n className=\"m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover\"\n source={data?.image?.url || ''}\n />\n </a>\n <p className=\"text-info-primary flex-1 truncate text-center text-sm font-bold\">{data?.name}</p>\n </div>\n )\n}\n\n// soundcore mobile\u5C55\u793A\nconst SingleMobileCategoryItem = ({\n data,\n configuration,\n index,\n}: {\n data: CategoryItem\n configuration?: any\n index: number\n}) => {\n return (\n <div\n className={cn(\n 'bg-container-secondary-1 box-border flex w-full shrink-0 flex-col items-center justify-center overflow-hidden',\n 'hover:bg-info-white cursor-pointer p-4',\n index === 0 ? 'aspect-h-[252] row-span-2' : 'aspect-h-[120]',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <a href={data?.link || ''} onClick={() => configuration?.event?.primaryButton(data, configuration?.index)}>\n <Picture\n source={data?.image?.url || ''}\n alt={data?.image?.alt || ''}\n className={cn(\n 'mb-2 flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover',\n index === 0 ? 'max-h-[146px] overflow-hidden' : 'max-h-[72px] max-w-[72px]'\n )}\n />\n </a>\n <p className=\"text-info-primary line-clamp-2 text-center text-sm font-bold\">{data?.name}</p>\n </div>\n )\n}\n\n// \u5176\u5B83\u54C1\u724Cmobile\u5C55\u793A\nconst CategoryMobileItem = ({ data, configuration }: { data: CategoryItem[]; configuration?: any }) => {\n return (\n <div className=\"grid grid-cols-2 gap-3\">\n {data?.map((item, index) => {\n return data?.length === 5 ? (\n <SingleMobileCategoryItem key={index} index={index} data={item} configuration={configuration} />\n ) : (\n <SingleItem key={index} data={item} configuration={configuration} />\n )\n })}\n </div>\n )\n}\n\nconst Category = React.forwardRef<HTMLDivElement, CategoryProps>((props, ref) => {\n const { data, className = '', key, event } = props\n // soundcore\u54C1\u724C\u54C1\u7C7B\u4E0D\u8D85\u8FC75\u4E2A\uFF0C\u5355\u72EC\u505A\u6837\u5F0F\u5904\u7406\n const currentData = data?.isShowSelect ? data?.products : data?.productData\n\n const innerRef = useRef<HTMLDivElement>(null)\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n useExposure(innerRef, {\n componentType,\n componentName,\n componentTitle: data?.title,\n })\n\n return (\n <div ref={innerRef} className={cn('w-full overflow-hidden', className, { 'aiui-dark': data?.theme === 'dark' })}>\n {data?.title && <Title data={{ title: data?.title }} className=\"text-4xl\" />}\n <div className=\"tablet:block hidden\">\n <SwiperBox\n id={`Category${key}`}\n Slide={CategoryPcItem}\n data={{ list: currentData, configuration: { shape: data?.shape, event: event } }}\n />\n </div>\n <div className=\"tablet:hidden block\">\n <SwiperBox\n id={`Category1${key}`}\n Slide={CategoryMobileItem}\n data={{ list: chunkArray(currentData, 6), configuration: { shape: data?.shape, event: event } }}\n />\n </div>\n <div className=\"h-7\" />\n </div>\n )\n})\n\nex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KACjE,eAAYA,EAAU,CACpB,cAAAxB,EACA,cAAAC,EACA,eAAgBO,GAAM,KACxB,CAAC,KAGC,QAAC,OAAI,IAAKgB,EAAU,aAAW,MAAG,yBAA0BJ,EAAW,CAAE,YAAaZ,GAAM,QAAU,MAAO,CAAC,EAC3G,UAAAA,GAAM,UAAS,OAAC,EAAAiB,QAAA,CAAM,KAAM,CAAE,MAAOjB,GAAM,KAAM,EAAG,UAAU,WAAW,KAC1E,OAAC,OAAI,UAAU,sBACb,mBAAC,EAAAkB,QAAA,CACC,GAAI,WAAWL,CAAG,GAClB,MAAOd,EACP,KAAM,CAAE,KAAMgB,EAAa,cAAe,CAAE,MAAOf,GAAM,MAAO,MAAOc,CAAM,CAAE,EACjF,EACF,KACA,OAAC,OAAI,UAAU,sBACb,mBAAC,EAAAI,QAAA,CACC,GAAI,YAAYL,CAAG,GACnB,MAAOP,EACP,KAAM,CAAE,KAAMZ,EAAWqB,EAAa,CAAC,EAAG,cAAe,CAAE,MAAOf,GAAM,MAAO,MAAOc,CAAM,CAAE,EAChG,EACF,KACA,OAAC,OAAI,UAAU,MAAM,GACvB,CAEJ,CAAC,EAED,IAAOlC,KAAQ,cAAW4B,CAAQ",
4
+ "sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport Title from '../Title/index.js'\nimport SwiperBox from './SwiperCategory.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport type { Img } from '../../types/props.js'\nimport { Heading } from '../../components/heading.js'\n\nconst componentType = 'image'\nconst componentName = 'category_banner'\n\nexport interface CategoryItem {\n /** \u4EA7\u54C1\u56FE\u7247*/\n image: Img\n name: string\n link?: string\n}\n\nexport interface CategoryProps {\n className?: string\n /** \u4E3B\u9898\u8272*/\n data: {\n isShowSelect: boolean\n products: CategoryItem[]\n productData: CategoryItem[]\n /** \u5361\u7247\u5F62\u72B6 */\n shape?: 'round' | 'square'\n title?: string\n theme?: 'light' | 'dark'\n }\n buildData?: {\n categories: any[]\n products: any[]\n }\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: {\n primaryButton?: (v: any, index: number) => void\n }\n key?: string\n}\n\nconst chunkArray = (arr: any[], size: number) => {\n const chunks = []\n for (let i = 0; i < arr.length; i += size) {\n chunks.push(arr.slice(i, i + size))\n }\n return chunks\n}\n\nconst CategoryPcItem = ({ data, configuration }: { data: CategoryItem; configuration?: any }) => {\n return (\n <div\n className={cn(\n 'tablet:h-[120px] laptop:h-[144px] desktop:h-[192px] lg-desktop:h-[240px]',\n 'tablet:p-3 laptop:p-4 desktop:p-6 lg-desktop:p-8',\n 'bg-container-secondary-1 hover:bg-info-white group box-border flex size-full cursor-pointer flex-col overflow-hidden duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <div className=\"transition-all duration-300 group-hover:scale-110\">\n <a\n aria-label={data?.name}\n href={trackUrlRef(data?.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${data?.name}`}\n onClick={() => configuration?.event?.primaryButton(data, configuration?.index)}\n >\n <Picture\n alt={data?.image?.alt || ''}\n source={data?.image?.url || ''}\n className=\"laptop:size-[88px] tablet:size-[72px] desktop:size-[116px] lg-desktop:size-[146px] m-auto flex justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover\"\n />\n </a>\n </div>\n <Heading\n as=\"h3\"\n className=\"lg-desktop:text-[18px] text-info-primary box-border line-clamp-2 flex-1 text-center text-[14px] font-bold\"\n >\n {data?.name}\n </Heading>\n </div>\n )\n}\n\n// \u79FB\u52A8\u7AEF\nconst SingleItem = ({ data, configuration }: { data: CategoryItem; configuration?: any }) => {\n return (\n <div\n key={`${data?.name}`}\n className={cn(\n 'bg-container-secondary-1 box-border max-h-[126px] w-full overflow-hidden',\n 'hover:bg-info-white cursor-pointer px-3 py-4 duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <a\n href={trackUrlRef(data?.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${data?.name}`}\n data-headless-nav-postion={`''#${configuration?.index + 1}`}\n onClick={() => configuration?.event?.primaryButton(data, configuration?.index + 1)}\n >\n <Picture\n alt={data?.image?.alt || ''}\n className=\"m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover\"\n source={data?.image?.url || ''}\n />\n </a>\n <p className=\"text-info-primary flex-1 truncate text-center text-sm font-bold\">{data?.name}</p>\n </div>\n )\n}\n\n// soundcore mobile\u5C55\u793A\nconst SingleMobileCategoryItem = ({\n data,\n configuration,\n index,\n}: {\n data: CategoryItem\n configuration?: any\n index: number\n}) => {\n return (\n <div\n className={cn(\n 'bg-container-secondary-1 box-border flex w-full shrink-0 flex-col items-center justify-center overflow-hidden',\n 'hover:bg-info-white cursor-pointer p-4',\n index === 0 ? 'aspect-h-[252] row-span-2' : 'aspect-h-[120]',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <a href={data?.link || ''} onClick={() => configuration?.event?.primaryButton(data, configuration?.index)}>\n <Picture\n source={data?.image?.url || ''}\n alt={data?.image?.alt || ''}\n className={cn(\n 'mb-2 flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover',\n index === 0 ? 'max-h-[146px] overflow-hidden' : 'max-h-[72px] max-w-[72px]'\n )}\n />\n </a>\n <p className=\"text-info-primary line-clamp-2 text-center text-sm font-bold\">{data?.name}</p>\n </div>\n )\n}\n\n// \u5176\u5B83\u54C1\u724Cmobile\u5C55\u793A\nconst CategoryMobileItem = ({ data, configuration }: { data: CategoryItem[]; configuration?: any }) => {\n return (\n <div className=\"grid grid-cols-2 gap-3\">\n {data?.map((item, index) => {\n return data?.length === 5 ? (\n <SingleMobileCategoryItem key={index} index={index} data={item} configuration={configuration} />\n ) : (\n <SingleItem key={index} data={item} configuration={configuration} />\n )\n })}\n </div>\n )\n}\n\nconst Category = React.forwardRef<HTMLDivElement, CategoryProps>((props, ref) => {\n const { data, className = '', key, event } = props\n // soundcore\u54C1\u724C\u54C1\u7C7B\u4E0D\u8D85\u8FC75\u4E2A\uFF0C\u5355\u72EC\u505A\u6837\u5F0F\u5904\u7406\n const currentData = data?.isShowSelect ? data?.products : data?.productData\n\n const innerRef = useRef<HTMLDivElement>(null)\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n useExposure(innerRef, {\n componentType,\n componentName,\n componentTitle: data?.title,\n })\n\n return (\n <div ref={innerRef} className={cn('w-full overflow-hidden', className, { 'aiui-dark': data?.theme === 'dark' })}>\n {data?.title && <Title data={{ title: data?.title }} className=\"text-4xl\" />}\n <div className=\"tablet:block hidden\">\n <SwiperBox\n id={`Category${key}`}\n Slide={CategoryPcItem}\n data={{ list: currentData, configuration: { shape: data?.shape, event: event, title: data?.title } }}\n />\n </div>\n <div className=\"tablet:hidden block\">\n <SwiperBox\n id={`Category1${key}`}\n Slide={CategoryMobileItem}\n data={{ list: chunkArray(currentData, 6), configuration: { shape: data?.shape, event: event, title: data?.title } }}\n />\n </div>\n <div className=\"h-7\" />\n </div>\n )\n})\n\nexport default withLayout(Category)\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAuDI,IAAAI,EAAA,6BAtDJC,EAAmD,oBACnDC,EAAmB,kCACnBC,EAAoB,0CACpBC,EAA2B,kCAC3BC,EAAkB,gCAClBC,EAAsB,kCACtBC,EAA4B,sCAC5BC,EAA4B,uCAE5BC,EAAwB,uCAExB,MAAMC,EAAgB,QAChBC,EAAgB,kBAgChBC,EAAa,CAACC,EAAYC,IAAiB,CAC/C,MAAMC,EAAS,CAAC,EAChB,QAASC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,EAC3G,UAAAA,GAAM,UAAS,OAAC,EAAAiB,QAAA,CAAM,KAAM,CAAE,MAAOjB,GAAM,KAAM,EAAG,UAAU,WAAW,KAC1E,OAAC,OAAI,UAAU,sBACb,mBAAC,EAAAkB,QAAA,CACC,GAAI,WAAWL,CAAG,GAClB,MAAOd,EACP,KAAM,CAAE,KAAMgB,EAAa,cAAe,CAAE,MAAOf,GAAM,MAAO,MAAOc,EAAO,MAAOd,GAAM,KAAM,CAAE,EACrG,EACF,KACA,OAAC,OAAI,UAAU,sBACb,mBAAC,EAAAkB,QAAA,CACC,GAAI,YAAYL,CAAG,GACnB,MAAOP,EACP,KAAM,CAAE,KAAMZ,EAAWqB,EAAa,CAAC,EAAG,cAAe,CAAE,MAAOf,GAAM,MAAO,MAAOc,EAAO,MAAOd,GAAM,KAAM,CAAE,EACpH,EACF,KACA,OAAC,OAAI,UAAU,MAAM,GACvB,CAEJ,CAAC,EAED,IAAOpB,KAAQ,cAAW4B,CAAQ",
6
6
  "names": ["Category_exports", "__export", "Category_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_picture", "import_Styles", "import_Title", "import_SwiperCategory", "import_useExposure", "import_trackUrlRef", "import_heading", "componentType", "componentName", "chunkArray", "arr", "size", "chunks", "i", "CategoryPcItem", "data", "configuration", "Picture", "SingleItem", "SingleMobileCategoryItem", "index", "CategoryMobileItem", "item", "Category", "React", "props", "ref", "className", "key", "event", "currentData", "innerRef", "Title", "SwiperBox"]
7
7
  }
@@ -0,0 +1,9 @@
1
+ type AnimatedULProps = React.HTMLAttributes<HTMLUListElement> & {
2
+ isOpen: boolean;
3
+ };
4
+ /**
5
+ * AnimatedUL - 用于替换 <motion.ul>
6
+ * 保持 overflow hidden,height 由 gsap 动态控制
7
+ */
8
+ export default function AnimatedUL({ isOpen, children, className, ...rest }: AnimatedULProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";var f=Object.create;var s=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var T=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty;var y=(e,t)=>{for(var i in t)s(e,i,{get:t[i],enumerable:!0})},d=(e,t,i,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let p of c(t))!m.call(e,p)&&p!==i&&s(e,p,{get:()=>t[p],enumerable:!(a=g(t,p))||a.enumerable});return e};var L=(e,t,i)=>(i=e!=null?f(T(e)):{},d(t||!e||!e.__esModule?s(i,"default",{value:e,enumerable:!0}):i,e)),H=e=>d(s({},"__esModule",{value:!0}),e);var w={};y(w,{default:()=>u});module.exports=H(w);var h=require("react/jsx-runtime"),r=require("react"),n=L(require("gsap"));function u({isOpen:e,children:t,className:i,...a}){const p=(0,r.useRef)(null);return(0,r.useLayoutEffect)(()=>{const o=p.current;if(o){if(n.default.killTweensOf(o),e){n.default.set(o,{height:"auto",paddingTop:"24px",opacity:1});const l=o.offsetHeight;n.default.set(o,{height:0,paddingTop:"0px",opacity:0}),n.default.to(o,{height:l,paddingTop:"24px",opacity:1,duration:.35,ease:"power2.out",onComplete:()=>{n.default.set(o,{height:"auto"})}})}else{const l=o.offsetHeight;n.default.set(o,{height:l,paddingTop:o.style.paddingTop||"16px",opacity:1}),n.default.to(o,{height:0,paddingTop:"0px",opacity:0,duration:.28,ease:"power2.in",onComplete:()=>{n.default.set(o,{height:0})}})}return()=>{p.current&&n.default.killTweensOf(p.current)}}},[e]),(0,h.jsx)("ul",{ref:p,className:i,style:{height:0,overflow:"hidden",paddingTop:0},...a,children:t})}
2
+ //# sourceMappingURL=AnimatedUL.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/CollectionsFilters/AnimatedUL.tsx"],
4
+ "sourcesContent": ["// \u9876\u90E8 imports\nimport { useLayoutEffect, useRef } from 'react'\nimport gsap from 'gsap'\n\ntype AnimatedULProps = React.HTMLAttributes<HTMLUListElement> & {\n isOpen: boolean\n}\n\n/**\n * AnimatedUL - \u7528\u4E8E\u66FF\u6362 <motion.ul>\n * \u4FDD\u6301 overflow hidden\uFF0Cheight \u7531 gsap \u52A8\u6001\u63A7\u5236\n */\nexport default function AnimatedUL({ isOpen, children, className, ...rest }: AnimatedULProps) {\n const ref = useRef<HTMLUListElement | null>(null)\n\n useLayoutEffect(() => {\n const el = ref.current\n if (!el) return\n // \u5148\u505C\u6B62\u5DF2\u6709 tween\uFF0C\u907F\u514D\u51B2\u7A81\n gsap.killTweensOf(el)\n\n if (isOpen) {\n // \u5C55\u5F00\u6D41\u7A0B\uFF1A\u5148\u8BBE\u7F6E\u4E3A auto \u4EE5\u6D4B\u91CF\u5B8C\u6574\u9AD8\u5EA6\uFF0C\u518D\u56DE\u5230 0 \u5F00\u59CB\u52A8\u753B\n gsap.set(el, { height: 'auto', paddingTop: '24px', opacity: 1 })\n const fullHeight = el.offsetHeight // \u83B7\u53D6\u5C55\u5F00\u540E\u603B\u9AD8\u5EA6\n // \u4ECE\u6536\u8D77\u72B6\u6001\u5F00\u59CB\u52A8\u753B\n gsap.set(el, { height: 0, paddingTop: '0px', opacity: 0 })\n gsap.to(el, {\n height: fullHeight,\n paddingTop: '24px',\n opacity: 1,\n duration: 0.35,\n ease: 'power2.out',\n onComplete: () => {\n // \u52A8\u753B\u7ED3\u675F\u540E\u628A height \u8BBE\u4E3A auto \u4FDD\u6301\u81EA\u9002\u5E94\n gsap.set(el, { height: 'auto' })\n },\n })\n } else {\n // \u6536\u8D77\u6D41\u7A0B\uFF1A\u5148\u628A\u5F53\u524D\u9AD8\u5EA6\u56FA\u5B9A\uFF0C\u518D\u52A8\u753B\u5230 0\n const curHeight = el.offsetHeight\n gsap.set(el, { height: curHeight, paddingTop: el.style.paddingTop || '16px', opacity: 1 })\n gsap.to(el, {\n height: 0,\n paddingTop: '0px',\n opacity: 0,\n duration: 0.28,\n ease: 'power2.in',\n onComplete: () => {\n // \u5B8C\u5168\u6536\u8D77\u540E\u4FDD\u6301 height \u4E3A 0\uFF08\u6216\u53EF\u79FB\u9664\u5185\u8054\u6837\u5F0F\uFF09\n gsap.set(el, { height: 0 })\n },\n })\n }\n\n return () => {\n // \u6E05\u7406\n if (ref.current) gsap.killTweensOf(ref.current)\n }\n }, [isOpen])\n\n // \u521D\u59CB\u6837\u5F0F\uFF1A\u6536\u8D77\u72B6\u6001\uFF08\u548C motion.ul \u7684 hidden \u72B6\u6001\u7B49\u4EF7\uFF09\n return (\n <ul ref={ref} className={className} style={{ height: 0, overflow: 'hidden', paddingTop: 0 }} {...rest}>\n {children}\n </ul>\n )\n}\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA+DI,IAAAI,EAAA,6BA9DJC,EAAwC,iBACxCC,EAAiB,mBAUF,SAARJ,EAA4B,CAAE,OAAAK,EAAQ,SAAAC,EAAU,UAAAC,EAAW,GAAGC,CAAK,EAAoB,CAC5F,MAAMC,KAAM,UAAgC,IAAI,EAEhD,4BAAgB,IAAM,CACpB,MAAMC,EAAKD,EAAI,QACf,GAAKC,EAIL,IAFA,EAAAC,QAAK,aAAaD,CAAE,EAEhBL,EAAQ,CAEV,EAAAM,QAAK,IAAID,EAAI,CAAE,OAAQ,OAAQ,WAAY,OAAQ,QAAS,CAAE,CAAC,EAC/D,MAAME,EAAaF,EAAG,aAEtB,EAAAC,QAAK,IAAID,EAAI,CAAE,OAAQ,EAAG,WAAY,MAAO,QAAS,CAAE,CAAC,EACzD,EAAAC,QAAK,GAAGD,EAAI,CACV,OAAQE,EACR,WAAY,OACZ,QAAS,EACT,SAAU,IACV,KAAM,aACN,WAAY,IAAM,CAEhB,EAAAD,QAAK,IAAID,EAAI,CAAE,OAAQ,MAAO,CAAC,CACjC,CACF,CAAC,CACH,KAAO,CAEL,MAAMG,EAAYH,EAAG,aACrB,EAAAC,QAAK,IAAID,EAAI,CAAE,OAAQG,EAAW,WAAYH,EAAG,MAAM,YAAc,OAAQ,QAAS,CAAE,CAAC,EACzF,EAAAC,QAAK,GAAGD,EAAI,CACV,OAAQ,EACR,WAAY,MACZ,QAAS,EACT,SAAU,IACV,KAAM,YACN,WAAY,IAAM,CAEhB,EAAAC,QAAK,IAAID,EAAI,CAAE,OAAQ,CAAE,CAAC,CAC5B,CACF,CAAC,CACH,CAEA,MAAO,IAAM,CAEPD,EAAI,SAAS,EAAAE,QAAK,aAAaF,EAAI,OAAO,CAChD,EACF,EAAG,CAACJ,CAAM,CAAC,KAIT,OAAC,MAAG,IAAKI,EAAK,UAAWF,EAAW,MAAO,CAAE,OAAQ,EAAG,SAAU,SAAU,WAAY,CAAE,EAAI,GAAGC,EAC9F,SAAAF,EACH,CAEJ",
6
+ "names": ["AnimatedUL_exports", "__export", "AnimatedUL", "__toCommonJS", "import_jsx_runtime", "import_react", "import_gsap", "isOpen", "children", "className", "rest", "ref", "el", "gsap", "fullHeight", "curHeight"]
7
+ }
@@ -0,0 +1 @@
1
+ export default function CollectionsFilters(props: any): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ "use strict";var H=Object.create;var x=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var K=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var Q=(s,r)=>{for(var i in r)x(s,i,{get:r[i],enumerable:!0})},S=(s,r,i,p)=>{if(r&&typeof r=="object"||typeof r=="function")for(let c of U(r))!q.call(s,c)&&c!==i&&x(s,c,{get:()=>r[c],enumerable:!(p=T(r,c))||p.enumerable});return s};var w=(s,r,i)=>(i=s!=null?H(K(s)):{},S(r||!s||!s.__esModule?x(i,"default",{value:s,enumerable:!0}):i,s)),V=s=>S(x({},"__esModule",{value:!0}),s);var D={};Q(D,{default:()=>z});module.exports=V(D);var e=require("react/jsx-runtime"),m=require("react"),d=require("../../helpers/utils.js"),y=w(require("../../components/picture.js")),L=require("es-toolkit"),g=w(require("../../components/button")),N=w(require("./AnimatedUL")),P=require("react-responsive");function z(s){const{filters:r,filtered:i={},setFiltered:p,noShowList:c=[],sortKeyIndx:G,setSortKeyIndx:E,metafields:j={},width:B="w-full"}=s,{shop_filters_pair:u}=j,[k,$]=(0,m.useState)(!1),[C,v]=(0,m.useState)(!1),[h,F]=(0,m.useState)([]),M=(0,P.useMediaQuery)({query:"(max-width: 768px)"}),f=(0,m.useMemo)(()=>r?.map(t=>({...t,options:t.options.map((l,n)=>({...l,checked:i?.[t.value]?.indexOf?.(l.value)>-1}))}))||[{label:"Price",value:"price",options:[{value:"798|1223.99",label:"$798.00 - $1,223.99",checked:!1},{value:"1224|1648.99",label:"$1,224.00 - $1,648.99",checked:!1},{value:"1649|2073.99",label:"$1,649.00 - $2,073.99",checked:!1},{value:"2074|2499.99",label:"$2,074.00 - $2,499.99",checked:!1}],mainPair:!1},{label:"Offers",value:"offers",mainPair:!1,options:[{label:"On Sale",value:"onsale",checked:!1}]},{label:"Availability",options:[{count:5,label:"In stock",value:"filter.v.availability.1",checked:!1}],value:"filter.v.availability",mainPair:!1}],[i,r]),_=(t,l,n)=>{const a=t.target;if(n)delete i?.[a.name];else{const o=l?[]:i?.[a.name]||[];if(a.checked)o.push(a.value);else{if(l)return;(0,L.remove)(o,b=>b===a.value)}i[a.name]=o,o.length<=0&&delete i[a.name]}p?.({...i})},I=()=>{p?.({})},O=t=>{let l=h.concat();l.map(n=>n.label===t?n.show=!n.show:n),F(l)};return(0,m.useEffect)(()=>{if(h?.length===0){let t=[];const l=document?.getElementsByClassName("pt-5 transition-all duration-400 ease-in-out");for(let n=0;n<l.length;n++){let a={};a.label=l[n]?.getAttribute("data-label"),a.show=M?!1:n<6,a.height=document?.getElementsByClassName("pt-5 transition-all duration-400 ease-in-out")?.[n]?.clientHeight,t.push(a)}F(t)}},[f]),(0,e.jsxs)("div",{className:(0,d.cn)("md-tablet:flex md-tablet:items-center md-tablet:w-full md-tablet:m-0 md-tablet:py-4",`${B}`),children:[(0,e.jsxs)("div",{className:"w-full flex-1",children:[(0,e.jsxs)("div",{className:(0,d.cn)("relative flex items-center md-tablet:p-0 text-base font-bold cursor-pointer box-border"),onClick:()=>v(!0),children:[(0,e.jsx)(y.default,{className:"inline-block size-[20px]",source:"https://cdn.shopify.com/s/files/1/0508/1815/4652/files/icon_table-of-contents.svg?v=1694054638"}),(0,e.jsx)("span",{className:"font-bold inline-block pt-1 pl-2 leading-none",children:u?.filter_txt?.filter||"Close Filter"})]}),(0,e.jsx)("div",{className:(0,d.cn)("border-t border-[#E4E5E6] pt-4 mt-4","transition-all duration-400 ease-in-out md-tablet:fixed md-tablet:bottom-0 md-tablet:left-0 md-tablet:right-0 md-tablet:top-0 md-tablet:z-[99]",C?"md-tablet:pointer-events-auto md-tablet:opacity-100":"md-tablet:pointer-events-none md-tablet:opacity-0"),children:(0,e.jsxs)("div",{className:(0,d.cn)("transition-all duration-400 ease-in-out md-tablet:absolute md-tablet:bottom-0 md-tablet:h-[90vh] md-tablet:w-full",C?"md-tablet:translate-y-0":"md-tablet:translate-y-[100%]"),children:[(0,e.jsxs)("div",{className:(0,d.cn)("!hidden md-tablet:!flex md-tablet:justify-between md-tablet:p-6 md-tablet:overflow-hidden"),children:[(0,e.jsx)("p",{className:"flex-1 truncate",children:u?.filter_txt?.filter}),(0,e.jsx)("div",{onClick:()=>v(!1),className:"size-6 cursor-pointer fill-[#333]",children:(0,e.jsx)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"6948",width:"24",height:"24",children:(0,e.jsx)("path",{d:"M557.311759 513.248864l265.280473-263.904314c12.54369-12.480043 12.607338-32.704421 0.127295-45.248112-12.512727-12.576374-32.704421-12.607338-45.248112-0.127295L512.127295 467.904421 249.088241 204.063755c-12.447359-12.480043-32.704421-12.54369-45.248112-0.063647-12.512727 12.480043-12.54369 32.735385-0.063647 45.280796l262.975407 263.775299-265.151458 263.744335c-12.54369 12.480043-12.607338 32.704421-0.127295 45.248112 6.239161 6.271845 14.463432 9.440452 22.687703 9.440452 8.160624 0 16.319527-3.103239 22.560409-9.311437l265.216826-263.807983 265.440452 266.240344c6.239161 6.271845 14.432469 9.407768 22.65674 9.407768 8.191587 0 16.352211-3.135923 22.591372-9.34412 12.512727-12.480043 12.54369-32.704421 0.063647-45.248112L557.311759 513.248864z","p-id":"6949"})})})]}),f&&f.length>0&&(0,e.jsxs)("div",{className:"md-tablet:p-6 md-tablet:h-[calc(100% - 155px)] md-tablet:overflow-auto",children:[f.map((t,l)=>{if(!t?.mainPair)return;const n=h.find(a=>a.label==t.label);return(0,e.jsxs)("div",{className:(0,d.cn)("flex-1 overflow-hidden pb-12 text-left duration-300 ease-in-out","hidden md-tablet:block"),children:[(0,e.jsxs)("div",{className:"relative flex items-center md-tablet:justify-center md-tablet:p-0 text-base font-bold pb-6 cursor-pointer",onClick:()=>O(t?.label||""),children:[(0,e.jsx)("button",{className:"w-full whitespace-nowrap py-2 text-left font-medium overflow-hidden box-border",children:(0,e.jsx)("span",{className:"font-bold pr-2 truncate",children:t?.label||""})}),(0,e.jsx)("div",{className:`mr-8 size-4 duration-300 ease-in-out ${n?.show&&"rotate-180"}`,children:(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon",children:(0,e.jsx)("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})})})]}),(0,e.jsx)("div",{className:"transition-all duration-400 ease-in-out overflow-hidden",children:(0,e.jsx)(N.default,{className:"pt-5 transition-all duration-400 ease-in-out","data-label":t?.label||"",isOpen:!!n?.show,children:t?.options?.map((a,o)=>(0,e.jsx)("li",{className:(0,d.cn)("w-full mb-3 box-border",{"mb-0":o>=t?.options?.length-1}),children:(0,e.jsxs)("label",{className:"pb-4 flex items-center overflow-hidden box-border",htmlFor:`${t?.value}-${o}`,children:[(0,e.jsx)("input",{type:"radio",name:t?.value,value:a.value,id:`${t?.value}-${o}`,onChange:b=>_(b,!0),checked:a.checked,className:"size-4 cursor-pointer"}),(0,e.jsx)("p",{className:(0,d.cn)("pt-0.5 pl-3 inline-block cursor-pointer font-bold leading-none text-base"),children:a.label})]})},a.value))})})]},`${t.label}${l}`)}),f.map((t,l)=>{if(c?.indexOf?.(t?.value)>-1||t?.mainPair)return null;const a=h?.find?.(o=>o.label==t.label);return(0,e.jsxs)("div",{className:(0,d.cn)("mb-6 flex-1 overflow-hidden text-left duration-300 ease-in-out"),children:[(0,e.jsxs)("div",{onClick:()=>O(t.label),className:"relative flex items-center md-tablet:justify-center text-base font-bold cursor-pointer leading-none",children:[(0,e.jsx)("button",{className:"w-full whitespace-nowrap text-left font-medium overflow-hidden box-border",children:(0,e.jsx)("span",{className:"pr-2 font-bold truncate",children:t.label})}),(0,e.jsx)("div",{className:`mr-8 size-4 duration-300 ease-in-out ${a?.show&&"rotate-180"}`,children:(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon",children:(0,e.jsx)("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})})})]}),(0,e.jsx)("div",{className:"transition-all duration-400 ease-in-out overflow-hidden",children:(0,e.jsx)(N.default,{className:"pt-5 transition-all duration-400 ease-in-out","data-label":t.label,isOpen:!!a?.show,children:t.options.map((o,b)=>(0,e.jsx)("li",{className:(0,d.cn)("w-full mb-3 box-border",{disabled:o?.count<=0,"mb-0":b>=t?.options?.length-1}),children:(0,e.jsxs)("label",{className:"flex items-center overflow-hidden box-border",htmlFor:`${t.value}-${b}`,children:[(0,e.jsx)("input",{type:"checkbox",name:t.value,value:o.value,id:`${t.value}-${b}`,disabled:o?.count<=0,onChange:A=>_(A,!1),checked:o.checked,className:"size-4 cursor-pointer"}),(0,e.jsx)("p",{className:(0,d.cn)("pt-0.5 pl-3 inline-block cursor-pointer font-bold leading-none text-base"),children:o.label})]})},o.value))})})]},`${t.label}${l}`)})]}),(0,e.jsxs)("div",{className:(0,d.cn)("flex items-center justify-between py-[18px] px-6","!hidden md-tablet:!flex"),children:[(0,e.jsx)(g.default,{className:"w-[48%]",onClick:t=>{v(!1),I()},children:u?.filter_txt?.clear}),(0,e.jsx)(g.default,{className:"w-[48%] bg-[#fff] text-[#00befa] border border-[#00befa]",onClick:t=>{v(!1)},children:u?.filter_txt?.apply})]})]})})]}),(0,e.jsxs)("div",{className:"relative text-base color-[#777] font-medium hidden md-tablet:w-1/2 md-tablet:text-lg md-tablet:font-semibold md-tablet:block md-tablet:flex md-tablet:items-center md-tablet:justify-between md-tablet:text-center",children:[(0,e.jsxs)("div",{className:"md-tablet:text-lg md-tablet:color-[#333] flex-1 flex items-center justify-end",onClick:()=>$(!k),children:[(0,e.jsx)("span",{className:"text-base pt-0.5 pr-1",dangerouslySetInnerHTML:{__html:u?.filter_txt?.sort||"Sort by"}}),(0,e.jsx)(y.default,{className:"w-3 duration-300 ease-in-out",imgClassName:"w-full object-cover",source:"https://cdn.shopify.com/s/files/1/0887/1798/4111/files/Vector_Stroke.svg?v=1756197600"})]}),(0,e.jsx)("ul",{className:(0,d.cn)("md-tablet:left-2.5 md-tablet:right-auto md-tablet:top-[120%] md-tablet:text-left absolute top-[110%] right-0 w-full bg-[#FFFFFF] z-10 py-2 px-0 rounded-lg transition-all duration-400 ease-in-out",k?"visibility opacity-100":"invisible opacity-0"),children:u?.filter_txt?.sortList?.map((t,l)=>(0,e.jsx)("li",{children:(0,e.jsx)("button",{name:t?.txt,className:"md-tablet:text-left",dangerouslySetInnerHTML:{__html:t?.txt},onClick:()=>{$(!1),E(l)}})},t?.txt+l))})]})]})}
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/CollectionsFilters/index.tsx"],
4
+ "sourcesContent": ["import { useState, useMemo, useEffect, type ChangeEvent } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport { remove } from 'es-toolkit'\nimport Button from '../../components/button'\nimport AnimatedUL from './AnimatedUL'\nimport { useMediaQuery } from 'react-responsive'\n\nexport default function CollectionsFilters(props: any) {\n const {\n filters, // \u7B5B\u9009\u9879\n filtered = {}, // \u5DF2\u9009\u4E2D\u7684\u7B5B\u9009\u9879\n setFiltered, // \u8BBE\u7F6E\u5DF2\u9009\u4E2D\u7684\u7B5B\u9009\u9879\n noShowList = [], // \u4E0D\u663E\u793A\u7684\u7B5B\u9009\u9879\n sortKeyIndx, // \u6392\u5E8F\u65B9\u5F0F\n setSortKeyIndx, // \u8BBE\u7F6E\u6392\u5E8F\u65B9\u5F0F\n metafields = {},\n width = 'w-full', // \u5BBD\u5EA6\n } = props\n const { shop_filters_pair } = metafields\n const [openSort, setOpenSort] = useState<boolean>(false)\n const [showFilterPair, setShowFilterPair] = useState<boolean>(false)\n // \u5C55\u5F00\u7B5B\u9009\u9879\n const [openOptions, setOpenOpt] = useState<any[]>([])\n\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n\n // \u5904\u7406\u7B5B\u9009\u9879\u6570\u636E\n const filtersPair = useMemo(() => {\n return (\n filters?.map((filter: any) => {\n return {\n ...filter,\n options: filter.options.map((opt: any, i: number) => {\n return {\n ...opt,\n checked: filtered?.[filter.value]?.indexOf?.(opt.value) > -1,\n }\n }),\n }\n }) || [\n {\n label: 'Price',\n value: 'price',\n options: [\n {\n value: '798|1223.99',\n label: '$798.00 - $1,223.99',\n checked: false,\n },\n {\n value: '1224|1648.99',\n label: '$1,224.00 - $1,648.99',\n checked: false,\n },\n {\n value: '1649|2073.99',\n label: '$1,649.00 - $2,073.99',\n checked: false,\n },\n {\n value: '2074|2499.99',\n label: '$2,074.00 - $2,499.99',\n checked: false,\n },\n ],\n mainPair: false,\n },\n {\n label: 'Offers',\n value: 'offers',\n mainPair: false,\n options: [\n {\n label: 'On Sale',\n value: 'onsale',\n checked: false,\n },\n ],\n },\n {\n label: 'Availability',\n options: [\n {\n count: 5,\n label: 'In stock',\n value: 'filter.v.availability.1',\n checked: false,\n },\n ],\n value: 'filter.v.availability',\n mainPair: false,\n },\n ]\n )\n }, [filtered, filters])\n\n const filterChange = (event: ChangeEvent<HTMLInputElement>, radio: boolean, showAll?: undefined) => {\n const target = event.target\n if (showAll) {\n delete filtered?.[target.name]\n } else {\n const current = radio ? [] : filtered?.[target.name] || []\n if (target.checked) {\n current.push(target.value)\n } else {\n if (radio) return\n remove(current, (v: string) => v === target.value)\n }\n filtered[target.name] = current\n current.length <= 0 && delete filtered[target.name]\n }\n setFiltered?.({ ...filtered })\n }\n\n const clearFiltered = () => {\n setFiltered?.({})\n }\n\n const handleFilterOpt = (label: string) => {\n let res = openOptions.concat()\n res.map((item: any) => {\n if (item.label === label) return (item.show = !item.show)\n return item\n })\n setOpenOpt(res)\n }\n\n useEffect(() => {\n if (openOptions?.length === 0) {\n let res = []\n const domList = document?.getElementsByClassName('pt-5 transition-all duration-400 ease-in-out')\n for (let index = 0; index < domList.length; index++) {\n let data = {} as any\n data.label = domList[index]?.getAttribute('data-label')\n data.show = isMobile ? false : index < 6 ? true : false\n data.height = document?.getElementsByClassName('pt-5 transition-all duration-400 ease-in-out')?.[\n index\n ]?.clientHeight\n res.push(data)\n }\n setOpenOpt(res)\n }\n }, [filtersPair])\n\n return (\n <div\n className={cn('md-tablet:flex md-tablet:items-center md-tablet:w-full md-tablet:m-0 md-tablet:py-4', `${width}`)}\n >\n <div className=\"w-full flex-1\">\n {/* FilterHeader */}\n <div\n className={cn('relative flex items-center md-tablet:p-0 text-base font-bold cursor-pointer box-border')}\n onClick={() => setShowFilterPair(true)}\n >\n <Picture\n className=\"inline-block size-[20px]\"\n source=\"https://cdn.shopify.com/s/files/1/0508/1815/4652/files/icon_table-of-contents.svg?v=1694054638\"\n />\n <span className=\"font-bold inline-block pt-1 pl-2 leading-none\">\n {shop_filters_pair?.filter_txt?.filter || 'Close Filter'}\n </span>\n </div>\n\n {/* FilterList */}\n <div\n className={cn(\n 'border-t border-[#E4E5E6] pt-4 mt-4',\n 'transition-all duration-400 ease-in-out md-tablet:fixed md-tablet:bottom-0 md-tablet:left-0 md-tablet:right-0 md-tablet:top-0 md-tablet:z-[99]',\n showFilterPair\n ? 'md-tablet:pointer-events-auto md-tablet:opacity-100'\n : 'md-tablet:pointer-events-none md-tablet:opacity-0'\n )}\n >\n <div\n className={cn(\n 'transition-all duration-400 ease-in-out md-tablet:absolute md-tablet:bottom-0 md-tablet:h-[90vh] md-tablet:w-full',\n showFilterPair ? 'md-tablet:translate-y-0' : 'md-tablet:translate-y-[100%]'\n )}\n >\n {/* FilterListHeader only-in-mob */}\n <div\n className={cn(\n '!hidden md-tablet:!flex md-tablet:justify-between md-tablet:p-6 md-tablet:overflow-hidden'\n )}\n >\n <p className=\"flex-1 truncate\">{shop_filters_pair?.filter_txt?.filter}</p>\n <div onClick={() => setShowFilterPair(false)} className=\"size-6 cursor-pointer fill-[#333]\">\n <svg\n viewBox=\"0 0 1024 1024\"\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n p-id=\"6948\"\n width=\"24\"\n height=\"24\"\n >\n <path\n d=\"M557.311759 513.248864l265.280473-263.904314c12.54369-12.480043 12.607338-32.704421 0.127295-45.248112-12.512727-12.576374-32.704421-12.607338-45.248112-0.127295L512.127295 467.904421 249.088241 204.063755c-12.447359-12.480043-32.704421-12.54369-45.248112-0.063647-12.512727 12.480043-12.54369 32.735385-0.063647 45.280796l262.975407 263.775299-265.151458 263.744335c-12.54369 12.480043-12.607338 32.704421-0.127295 45.248112 6.239161 6.271845 14.463432 9.440452 22.687703 9.440452 8.160624 0 16.319527-3.103239 22.560409-9.311437l265.216826-263.807983 265.440452 266.240344c6.239161 6.271845 14.432469 9.407768 22.65674 9.407768 8.191587 0 16.352211-3.135923 22.591372-9.34412 12.512727-12.480043 12.54369-32.704421 0.063647-45.248112L557.311759 513.248864z\"\n p-id=\"6949\"\n />\n </svg>\n </div>\n </div>\n\n {/* FilterListCon */}\n {filtersPair && filtersPair.length > 0 && (\n <div className={'md-tablet:p-6 md-tablet:h-[calc(100% - 155px)] md-tablet:overflow-auto'}>\n {/* mainPair mob */}\n {filtersPair.map((filter: any, i: number) => {\n if (!filter?.mainPair) return\n const openOption = openOptions.find((item: any) => item.label == filter.label) as any\n return (\n <div\n key={`${filter.label}${i}`}\n className={cn(\n 'flex-1 overflow-hidden pb-12 text-left duration-300 ease-in-out',\n 'hidden md-tablet:block'\n )}\n >\n <div\n className={\n 'relative flex items-center md-tablet:justify-center md-tablet:p-0 text-base font-bold pb-6 cursor-pointer'\n }\n onClick={() => handleFilterOpt(filter?.label || '')}\n >\n <button className=\"w-full whitespace-nowrap py-2 text-left font-medium overflow-hidden box-border\">\n <span className=\"font-bold pr-2 truncate\">{filter?.label || ''}</span>\n </button>\n <div\n className={`mr-8 size-4 duration-300 ease-in-out ${openOption?.show && 'rotate-180'}`}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n aria-hidden=\"true\"\n data-slot=\"icon\"\n >\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"m19.5 8.25-7.5 7.5-7.5-7.5\"></path>\n </svg>\n </div>\n </div>\n <div className={'transition-all duration-400 ease-in-out overflow-hidden'}>\n <AnimatedUL\n className={'pt-5 transition-all duration-400 ease-in-out'}\n data-label={filter?.label || ''}\n isOpen={!!openOption?.show}\n >\n {filter?.options?.map((opt: any, p: number) => {\n return (\n <li\n key={opt.value}\n className={cn('w-full mb-3 box-border', {\n 'mb-0': p >= filter?.options?.length - 1,\n })}\n >\n <label\n className=\"pb-4 flex items-center overflow-hidden box-border\"\n htmlFor={`${filter?.value}-${p}`}\n >\n <input\n type=\"radio\"\n name={filter?.value}\n value={opt.value}\n id={`${filter?.value}-${p}`}\n onChange={e => filterChange(e, true)}\n checked={opt.checked}\n className=\"size-4 cursor-pointer\"\n />\n <p\n className={cn(\n 'pt-0.5 pl-3 inline-block cursor-pointer font-bold leading-none text-base'\n )}\n >\n {opt.label}\n </p>\n </label>\n </li>\n )\n })}\n </AnimatedUL>\n </div>\n </div>\n )\n })}\n\n {filtersPair.map((filter: any, i: number) => {\n const isNoShow = noShowList?.indexOf?.(filter?.value) > -1\n if (isNoShow || filter?.mainPair) return null\n const openOption = openOptions?.find?.((item: any) => item.label == filter.label) as any\n return (\n <div\n key={`${filter.label}${i}`}\n className={cn('mb-6 flex-1 overflow-hidden text-left duration-300 ease-in-out')}\n >\n <div\n onClick={() => handleFilterOpt(filter.label)}\n className={\n 'relative flex items-center md-tablet:justify-center text-base font-bold cursor-pointer leading-none'\n }\n >\n <button className=\"w-full whitespace-nowrap text-left font-medium overflow-hidden box-border\">\n <span className=\"pr-2 font-bold truncate\">{filter.label}</span>\n </button>\n <div\n className={`mr-8 size-4 duration-300 ease-in-out ${openOption?.show && 'rotate-180'}`}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n aria-hidden=\"true\"\n data-slot=\"icon\"\n >\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"m19.5 8.25-7.5 7.5-7.5-7.5\" />\n </svg>\n </div>\n </div>\n <div className={'transition-all duration-400 ease-in-out overflow-hidden'}>\n <AnimatedUL\n className={'pt-5 transition-all duration-400 ease-in-out'}\n data-label={filter.label}\n isOpen={!!openOption?.show}\n >\n {filter.options.map((opt: any, p: number) => {\n return (\n <li\n key={opt.value}\n className={cn('w-full mb-3 box-border', {\n ['disabled']: opt?.count <= 0,\n 'mb-0': p >= filter?.options?.length - 1,\n })}\n >\n <label\n className=\"flex items-center overflow-hidden box-border\"\n htmlFor={`${filter.value}-${p}`}\n >\n <input\n type=\"checkbox\"\n name={filter.value}\n value={opt.value}\n id={`${filter.value}-${p}`}\n disabled={opt?.count <= 0}\n onChange={e => filterChange(e, false)}\n checked={opt.checked}\n className=\"size-4 cursor-pointer\"\n />\n <p\n className={cn(\n 'pt-0.5 pl-3 inline-block cursor-pointer font-bold leading-none text-base'\n )}\n >\n {opt.label}\n </p>\n </label>\n </li>\n )\n })}\n </AnimatedUL>\n </div>\n </div>\n )\n })}\n </div>\n )}\n\n {/* FilterListBottom only-in-mob */}\n <div className={cn('flex items-center justify-between py-[18px] px-6', '!hidden md-tablet:!flex')}>\n <Button\n className=\"w-[48%]\"\n onClick={e => {\n setShowFilterPair(false)\n clearFiltered()\n }}\n >\n {shop_filters_pair?.filter_txt?.clear}\n </Button>\n <Button\n className=\"w-[48%] bg-[#fff] text-[#00befa] border border-[#00befa]\"\n onClick={e => {\n setShowFilterPair(false)\n }}\n >\n {shop_filters_pair?.filter_txt?.apply}\n </Button>\n </div>\n </div>\n </div>\n </div>\n <div\n className={\n 'relative text-base color-[#777] font-medium hidden md-tablet:w-1/2 md-tablet:text-lg md-tablet:font-semibold md-tablet:block md-tablet:flex md-tablet:items-center md-tablet:justify-between md-tablet:text-center'\n }\n >\n <div\n className={'md-tablet:text-lg md-tablet:color-[#333] flex-1 flex items-center justify-end'}\n onClick={() => setOpenSort(!openSort)}\n >\n <span\n className=\"text-base pt-0.5 pr-1\"\n dangerouslySetInnerHTML={{\n __html: shop_filters_pair?.filter_txt?.sort || 'Sort by',\n }}\n />\n <Picture\n className=\"w-3 duration-300 ease-in-out\"\n imgClassName=\"w-full object-cover\"\n source=\"https://cdn.shopify.com/s/files/1/0887/1798/4111/files/Vector_Stroke.svg?v=1756197600\"\n />\n </div>\n <ul\n className={cn(\n 'md-tablet:left-2.5 md-tablet:right-auto md-tablet:top-[120%] md-tablet:text-left absolute top-[110%] right-0 w-full bg-[#FFFFFF] z-10 py-2 px-0 rounded-lg transition-all duration-400 ease-in-out',\n openSort ? 'visibility opacity-100' : 'invisible opacity-0'\n )}\n >\n {shop_filters_pair?.filter_txt?.sortList?.map((l: any, k: number) => (\n <li key={l?.txt + k}>\n <button\n name={l?.txt}\n className={'md-tablet:text-left'}\n dangerouslySetInnerHTML={{ __html: l?.txt }}\n onClick={() => {\n setOpenSort(false)\n setSortKeyIndx(k)\n }}\n />\n </li>\n ))}\n </ul>\n </div>\n </div>\n )\n}\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAuJQ,IAAAI,EAAA,6BAvJRC,EAA+D,iBAC/DC,EAAmB,kCACnBC,EAAoB,0CACpBC,EAAuB,sBACvBC,EAAmB,sCACnBC,EAAuB,2BACvBC,EAA8B,4BAEf,SAART,EAAoCU,EAAY,CACrD,KAAM,CACJ,QAAAC,EACA,SAAAC,EAAW,CAAC,EACZ,YAAAC,EACA,WAAAC,EAAa,CAAC,EACd,YAAAC,EACA,eAAAC,EACA,WAAAC,EAAa,CAAC,EACd,MAAAC,EAAQ,QACV,EAAIR,EACE,CAAE,kBAAAS,CAAkB,EAAIF,EACxB,CAACG,EAAUC,CAAW,KAAI,YAAkB,EAAK,EACjD,CAACC,EAAgBC,CAAiB,KAAI,YAAkB,EAAK,EAE7D,CAACC,EAAaC,CAAU,KAAI,YAAgB,CAAC,CAAC,EAE9CC,KAAW,iBAAc,CAAE,MAAO,oBAAqB,CAAC,EAGxDC,KAAc,WAAQ,IAExBhB,GAAS,IAAKiB,IACL,CACL,GAAGA,EACH,QAASA,EAAO,QAAQ,IAAI,CAACC,EAAUC,KAC9B,CACL,GAAGD,EACH,QAASjB,IAAWgB,EAAO,KAAK,GAAG,UAAUC,EAAI,KAAK,EAAI,EAC5D,EACD,CACH,EACD,GAAK,CACJ,CACE,MAAO,QACP,MAAO,QACP,QAAS,CACP,CACE,MAAO,cACP,MAAO,sBACP,QAAS,EACX,EACA,CACE,MAAO,eACP,MAAO,wBACP,QAAS,EACX,EACA,CACE,MAAO,eAC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ACvBe,EAAc,CAChB,EAEC,SAAAnB,GAAmB,YAAY,MAClC,KACA,OAAC,EAAAgC,QAAA,CACC,UAAU,2DACV,QAASD,GAAK,CACZ3B,EAAkB,EAAK,CACzB,EAEC,SAAAJ,GAAmB,YAAY,MAClC,GACF,GACF,EACF,GACF,KACA,QAAC,OACC,UACE,qNAGF,qBAAC,OACC,UAAW,gFACX,QAAS,IAAME,EAAY,CAACD,CAAQ,EAEpC,oBAAC,QACC,UAAU,wBACV,wBAAyB,CACvB,OAAQD,GAAmB,YAAY,MAAQ,SACjD,EACF,KACA,OAAC,EAAA2B,QAAA,CACC,UAAU,+BACV,aAAa,sBACb,OAAO,wFACT,GACF,KACA,OAAC,MACC,aAAW,MACT,qMACA1B,EAAW,yBAA2B,qBACxC,EAEC,SAAAD,GAAmB,YAAY,UAAU,IAAI,CAACiC,EAAQC,OACrD,OAAC,MACC,mBAAC,UACC,KAAMD,GAAG,IACT,UAAW,sBACX,wBAAyB,CAAE,OAAQA,GAAG,GAAI,EAC1C,QAAS,IAAM,CACb/B,EAAY,EAAK,EACjBL,EAAeqC,CAAC,CAClB,EACF,GATOD,GAAG,IAAMC,CAUlB,CACD,EACH,GACF,GACF,CAEJ",
6
+ "names": ["CollectionsFilters_exports", "__export", "CollectionsFilters", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_picture", "import_es_toolkit", "import_button", "import_AnimatedUL", "import_react_responsive", "props", "filters", "filtered", "setFiltered", "noShowList", "sortKeyIndx", "setSortKeyIndx", "metafields", "width", "shop_filters_pair", "openSort", "setOpenSort", "showFilterPair", "setShowFilterPair", "openOptions", "setOpenOpt", "isMobile", "filtersPair", "filter", "opt", "i", "filterChange", "event", "radio", "showAll", "target", "current", "v", "clearFiltered", "handleFilterOpt", "label", "res", "item", "domList", "index", "data", "Picture", "openOption", "AnimatedUL", "p", "e", "Button", "l", "k"]
7
+ }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var g=Object.create;var p=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var w=(e,l)=>{for(var o in l)p(e,o,{get:l[o],enumerable:!0})},n=(e,l,o,r)=>{if(l&&typeof l=="object"||typeof l=="function")for(let a of b(l))!h.call(e,a)&&a!==o&&p(e,a,{get:()=>l[a],enumerable:!(r=x(l,a))||r.enumerable});return e};var N=(e,l,o)=>(o=e!=null?g(v(e)):{},n(l||!e||!e.__esModule?p(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>n(p({},"__esModule",{value:!0}),e);var I={};w(I,{default:()=>C});module.exports=k(I);var t=require("react/jsx-runtime"),d=require("../../helpers/utils.js"),c=N(require("../SwiperBox/index.js")),u=require("../../shared/Styles.js"),m=require("../../components/gird.js"),s=require("../../components/index.js");const y=({data:e,configuration:l})=>(0,t.jsx)("div",{className:(0,d.cn)("text-info-primary aspect-h-[360] aspect-w-[296] relative flex-1 shrink-0 overflow-hidden md:basis-[296px]",l?.shape==="rounded"?"rounded-2xl":"rounded-none",{"aiui-dark":e.theme==="dark"}),children:(0,t.jsxs)("div",{className:"absolute inset-0",children:[(0,t.jsx)(s.Picture,{className:"h-full",imgClassName:"h-full object-cover",source:e?.mobileImg?.url||e?.img?.url,alt:e?.mobileImg?.alt||e?.img?.alt||""}),(0,t.jsxs)("div",{className:"z-1 absolute bottom-4 left-4 box-border flex w-full flex-col",children:[(0,t.jsx)(s.Text,{html:e?.title,className:"graphic-title truncate text-xl font-bold leading-[1.2]"}),e?.description&&(0,t.jsx)(s.Text,{html:e?.description,className:"graphic-title line-clamp-2 text-sm font-bold leading-[1.2]"})]})]})}),M=e=>{const{data:l,className:o}=e,{productsTab:r,shape:a}=l;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"laptop:block box-border hidden w-full overflow-hidden",children:(0,t.jsx)(m.Grid,{className:(0,d.cn)("tablet:gap-4 grid grid-cols-12 gap-3 ",o),children:r?.map((i,f)=>(0,t.jsxs)(m.GridItem,{span:i.span,className:(0,d.cn)("text-info-primary relative w-full cursor-pointer overflow-hidden",a==="rounded"?"rounded-2xl":"rounded-none","lg-desktop:max-h-[480px] desktop:max-h-[384px] laptop:max-h-[288px]",{"aiui-dark":i.theme==="dark"}),children:[(0,t.jsx)(s.Picture,{source:i.img.url,className:"size-full",imgClassName:"h-full object-cover tablet:hover:scale-110 transition-all duration-300"}),(0,t.jsxs)("div",{className:"lg-desktop:bottom-8 lg-desktop:left-8 desktop:bottom-6 desktop:left-6 absolute bottom-4 left-4",children:[i.title&&(0,t.jsx)(s.Text,{html:i.title,as:"p",className:"desktop:text-[32px] laptop:text-2xl text-xl font-bold"}),i.description&&(0,t.jsx)(s.Text,{html:i.description,className:"desktop:text-lg text-sm font-bold"})]})]},f))})}),(0,t.jsx)("div",{className:"laptop:hidden block w-full",children:(0,t.jsx)(c.default,{id:"CreativeModule",className:(0,d.cn)("!overflow-visible",o),data:{list:r||[],configuration:{shape:a}},Slide:y,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:3}}})})]})};var C=(0,u.withLayout)(M);
1
+ "use strict";"use client";var x=Object.create;var p=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var w=(e,l)=>{for(var o in l)p(e,o,{get:l[o],enumerable:!0})},n=(e,l,o,d)=>{if(l&&typeof l=="object"||typeof l=="function")for(let a of v(l))!b.call(e,a)&&a!==o&&p(e,a,{get:()=>l[a],enumerable:!(d=g(l,a))||d.enumerable});return e};var k=(e,l,o)=>(o=e!=null?x(h(e)):{},n(l||!e||!e.__esModule?p(o,"default",{value:e,enumerable:!0}):o,e)),N=e=>n(p({},"__esModule",{value:!0}),e);var C={};w(C,{default:()=>I});module.exports=N(C);var t=require("react/jsx-runtime"),r=require("../../helpers/utils.js"),c=k(require("../SwiperBox/index.js")),u=require("../../shared/Styles.js"),m=require("../../components/gird.js"),i=require("../../components/index.js");const y=({data:e,configuration:l})=>(0,t.jsx)("div",{className:(0,r.cn)("creativeModuleItem","text-info-primary aspect-h-[360] aspect-w-[296] relative flex-1 shrink-0 overflow-hidden md:basis-[296px]",l?.shape==="rounded"?"rounded-2xl":"rounded-none",{"aiui-dark":e.theme==="dark"}),children:(0,t.jsxs)("div",{className:"absolute inset-0",children:[(0,t.jsx)(i.Picture,{className:"h-full",imgClassName:"h-full object-cover",source:e?.mobileImg?.url||e?.img?.url,alt:e?.mobileImg?.alt||e?.img?.alt||""}),(0,t.jsxs)("div",{className:"z-1 absolute bottom-4 left-0 right-0 box-border flex w-full flex-col px-4 overflow-hidden",children:[(0,t.jsx)(i.Text,{html:e?.title,className:"graphic-title truncate text-xl font-bold leading-[1.2]"}),e?.description&&(0,t.jsx)(i.Text,{html:e?.description,className:"graphic-title line-clamp-2 text-sm font-bold leading-[1.2]"})]})]})}),M=e=>{const{data:l,className:o}=e,{productsTab:d,shape:a}=l;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:(0,r.cn)("creativeModuleBlock","laptop:block box-border hidden w-full overflow-hidden"),children:(0,t.jsx)(m.Grid,{className:(0,r.cn)("tablet:gap-4 grid grid-cols-12 gap-3 ",o),children:d?.map((s,f)=>(0,t.jsxs)(m.GridItem,{span:s.span,className:(0,r.cn)("text-info-primary relative w-full overflow-hidden",a==="rounded"?"rounded-2xl":"rounded-none","lg-desktop:h-[480px] desktop:h-[384px] laptop:h-[288px]",{"aiui-dark":s.theme==="dark"}),children:[(0,t.jsx)(i.Picture,{source:s.img.url,className:"size-full",imgClassName:"h-full object-cover"}),(0,t.jsxs)("div",{className:"lg-desktop:bottom-8 lg-desktop:px-8 desktop:bottom-6 desktop:px-6 absolute bottom-4 px-4 flex flex-col gap-[6px] left-0 right-0 overflow-hidden",children:[s.title&&(0,t.jsx)(i.Text,{html:s.title,as:"p",className:"line-clamp-2 desktop:text-[32px] laptop:text-2xl text-xl font-bold"}),s.description&&(0,t.jsx)(i.Text,{html:s.description,className:"line-clamp-2 desktop:text-lg text-sm font-bold"})]})]},f))})}),(0,t.jsx)("div",{className:"laptop:hidden block w-full",children:(0,t.jsx)(c.default,{id:"CreativeModule",className:(0,r.cn)("!overflow-visible",o),data:{list:d||[],configuration:{shape:a}},Slide:y,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:3}}})})]})};var I=(0,u.withLayout)(M);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/CreativeModule/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Grid, GridItem } from '../../components/gird.js'\nimport { Picture, Text } from '../../components/index.js'\n\nexport type CreativeModuleDataType = {\n img: Img\n mobileImg: Img\n title: string\n description: string\n theme: 'light' | 'dark'\n span: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12\n}\n\ntype CreativeModuleType = {\n data: {\n shape?: 'rounded' | 'square'\n productsTab: CreativeModuleDataType[]\n }\n className?: string\n}\n\nconst Item = ({ data, configuration }: { data: CreativeModuleDataType; configuration?: any }) => {\n return (\n <div\n className={cn(\n 'text-info-primary aspect-h-[360] aspect-w-[296] relative flex-1 shrink-0 overflow-hidden md:basis-[296px]',\n configuration?.shape === 'rounded' ? 'rounded-2xl' : 'rounded-none',\n {\n 'aiui-dark': data.theme === 'dark',\n }\n )}\n >\n <div className=\"absolute inset-0\">\n <Picture\n className=\"h-full\"\n imgClassName=\"h-full object-cover\"\n source={data?.mobileImg?.url || data?.img?.url}\n alt={data?.mobileImg?.alt || data?.img?.alt || ''}\n />\n <div className=\"z-1 absolute bottom-4 left-4 box-border flex w-full flex-col\">\n <Text html={data?.title} className=\"graphic-title truncate text-xl font-bold leading-[1.2]\" />\n {data?.description && (\n <Text html={data?.description} className=\"graphic-title line-clamp-2 text-sm font-bold leading-[1.2]\" />\n )}\n </div>\n </div>\n </div>\n )\n}\n\nconst CreativeModule = (props: CreativeModuleType) => {\n const { data, className } = props\n const { productsTab, shape } = data\n\n return (\n <>\n <div className=\"laptop:block box-border hidden w-full overflow-hidden\">\n <Grid className={cn('tablet:gap-4 grid grid-cols-12 gap-3 ', className)}>\n {productsTab?.map((item, index) => {\n return (\n <GridItem\n key={index}\n span={item.span}\n className={cn(\n 'text-info-primary relative w-full cursor-pointer overflow-hidden',\n shape === 'rounded' ? 'rounded-2xl' : 'rounded-none',\n 'lg-desktop:max-h-[480px] desktop:max-h-[384px] laptop:max-h-[288px]',\n {\n 'aiui-dark': item.theme === 'dark',\n }\n )}\n >\n <Picture\n source={item.img.url}\n className=\"size-full\"\n imgClassName=\"h-full object-cover tablet:hover:scale-110 transition-all duration-300\"\n />\n <div className=\"lg-desktop:bottom-8 lg-desktop:left-8 desktop:bottom-6 desktop:left-6 absolute bottom-4 left-4\">\n {item.title && (\n <Text html={item.title} as=\"p\" className=\"desktop:text-[32px] laptop:text-2xl text-xl font-bold\" />\n )}\n {item.description && <Text html={item.description} className=\"desktop:text-lg text-sm font-bold\" />}\n </div>\n </GridItem>\n )\n })}\n </Grid>\n </div>\n <div className=\"laptop:hidden block w-full\">\n <SwiperBox\n id=\"CreativeModule\"\n className={cn('!overflow-visible', className)}\n data={{\n list: productsTab || [],\n configuration: {\n shape,\n },\n }}\n Slide={Item}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 3,\n },\n }}\n />\n </div>\n </>\n )\n}\n\nexport default withLayout(CreativeModule)\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAqCQ,IAAAI,EAAA,6BApCRC,EAAmB,kCACnBC,EAAsB,oCAEtBC,EAA2B,kCAC3BC,EAA+B,oCAC/BC,EAA8B,qCAmB9B,MAAMC,EAAO,CAAC,CAAE,KAAAC,EAAM,cAAAC,CAAc,OAEhC,OAAC,OACC,aAAW,MACT,4GACAA,GAAe,QAAU,UAAY,cAAgB,eACrD,CACE,YAAaD,EAAK,QAAU,MAC9B,CACF,EAEA,oBAAC,OAAI,UAAU,mBACb,oBAAC,WACC,UAAU,SACV,aAAa,sBACb,OAAQA,GAAM,WAAW,KAAOA,GAAM,KAAK,IAC3C,IAAKA,GAAM,WAAW,KAAOA,GAAM,KAAK,KAAO,GACjD,KACA,QAAC,OAAI,UAAU,+DACb,oBAAC,QAAK,KAAMA,GAAM,MAAO,UAAU,yDAAyD,EAC3FA,GAAM,gBACL,OAAC,QAAK,KAAMA,GAAM,YAAa,UAAU,6DAA6D,GAE1G,GACF,EACF,EAIEE,EAAkBC,GAA8B,CACpD,KAAM,CAAE,KAAAH,EAAM,UAAAI,CAAU,EAAID,EACtB,CAAE,YAAAE,EAAa,MAAAC,CAAM,EAAIN,EAE/B,SACE,oBACE,oBAAC,OAAI,UAAU,wDACb,mBAAC,QAAK,aAAW,MAAG,wCAAyCI,CAAS,EACnE,SAAAC,GAAa,IAAI,CAACE,EAAMC,OAErB,QAAC,YAEC,KAAMD,EAAK,KACX,aAAW,MACT,mEACAD,IAAU,UAAY,cAAgB,eACtC,sEACA,CACE,YAAaC,EAAK,QAAU,MAC9B,CACF,EAEA,oBAAC,WACC,OAAQA,EAAK,IAAI,IACjB,UAAU,YACV,aAAa,yEACf,KACA,QAAC,OAAI,UAAU,iGACZ,UAAAA,EAAK,UACJ,OAAC,QAAK,KAAMA,EAAK,MAAO,GAAG,IAAI,UAAU,wDAAwD,EAElGA,EAAK,gBAAe,OAAC,QAAK,KAAMA,EAAK,YAAa,UAAU,oCAAoC,GACnG,IArBKC,CAsBP,CAEH,EACH,EACF,KACA,OAAC,OAAI,UAAU,6BACb,mBAAC,EAAAC,QAAA,CACC,GAAG,iBACH,aAAW,MAAG,oBAAqBL,CAAS,EAC5C,KAAM,CACJ,KAAMC,GAAe,CAAC,EACtB,cAAe,CACb,MAAAC,CACF,CACF,EACA,MAAOP,EACP,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,CACjB,CACF,EACF,EACF,GACF,CAEJ,EAEA,IAAOR,KAAQ,cAAWW,CAAc",
4
+ "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Grid, GridItem } from '../../components/gird.js'\nimport { Picture, Text } from '../../components/index.js'\n\nexport type CreativeModuleDataType = {\n img: Img\n mobileImg: Img\n title: string\n description: string\n theme: 'light' | 'dark'\n span: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12\n}\n\ntype CreativeModuleType = {\n data: {\n shape?: 'rounded' | 'square'\n productsTab: CreativeModuleDataType[]\n }\n className?: string\n}\n\nconst Item = ({ data, configuration }: { data: CreativeModuleDataType; configuration?: any }) => {\n return (\n <div\n className={cn(\n 'creativeModuleItem',\n 'text-info-primary aspect-h-[360] aspect-w-[296] relative flex-1 shrink-0 overflow-hidden md:basis-[296px]',\n configuration?.shape === 'rounded' ? 'rounded-2xl' : 'rounded-none',\n {\n 'aiui-dark': data.theme === 'dark',\n }\n )}\n >\n <div className=\"absolute inset-0\">\n <Picture\n className=\"h-full\"\n imgClassName=\"h-full object-cover\"\n source={data?.mobileImg?.url || data?.img?.url}\n alt={data?.mobileImg?.alt || data?.img?.alt || ''}\n />\n <div className=\"z-1 absolute bottom-4 left-0 right-0 box-border flex w-full flex-col px-4 overflow-hidden\">\n <Text html={data?.title} className=\"graphic-title truncate text-xl font-bold leading-[1.2]\" />\n {data?.description && (\n <Text html={data?.description} className=\"graphic-title line-clamp-2 text-sm font-bold leading-[1.2]\" />\n )}\n </div>\n </div>\n </div>\n )\n}\n\nconst CreativeModule = (props: CreativeModuleType) => {\n const { data, className } = props\n const { productsTab, shape } = data\n\n return (\n <>\n <div className={cn('creativeModuleBlock', 'laptop:block box-border hidden w-full overflow-hidden')}>\n <Grid className={cn('tablet:gap-4 grid grid-cols-12 gap-3 ', className)}>\n {productsTab?.map((item, index) => {\n return (\n <GridItem\n key={index}\n span={item.span}\n className={cn(\n 'text-info-primary relative w-full overflow-hidden',\n shape === 'rounded' ? 'rounded-2xl' : 'rounded-none',\n 'lg-desktop:h-[480px] desktop:h-[384px] laptop:h-[288px]',\n {\n 'aiui-dark': item.theme === 'dark',\n }\n )}\n >\n <Picture source={item.img.url} className=\"size-full\" imgClassName=\"h-full object-cover\" />\n <div className=\"lg-desktop:bottom-8 lg-desktop:px-8 desktop:bottom-6 desktop:px-6 absolute bottom-4 px-4 flex flex-col gap-[6px] left-0 right-0 overflow-hidden\">\n {item.title && (\n <Text\n html={item.title}\n as=\"p\"\n className=\"line-clamp-2 desktop:text-[32px] laptop:text-2xl text-xl font-bold\"\n />\n )}\n {item.description && (\n <Text html={item.description} className=\"line-clamp-2 desktop:text-lg text-sm font-bold\" />\n )}\n </div>\n </GridItem>\n )\n })}\n </Grid>\n </div>\n <div className=\"laptop:hidden block w-full\">\n <SwiperBox\n id=\"CreativeModule\"\n className={cn('!overflow-visible', className)}\n data={{\n list: productsTab || [],\n configuration: {\n shape,\n },\n }}\n Slide={Item}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 3,\n },\n }}\n />\n </div>\n </>\n )\n}\n\nexport default withLayout(CreativeModule)\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAsCQ,IAAAI,EAAA,6BArCRC,EAAmB,kCACnBC,EAAsB,oCAEtBC,EAA2B,kCAC3BC,EAA+B,oCAC/BC,EAA8B,qCAmB9B,MAAMC,EAAO,CAAC,CAAE,KAAAC,EAAM,cAAAC,CAAc,OAEhC,OAAC,OACC,aAAW,MACT,qBACA,4GACAA,GAAe,QAAU,UAAY,cAAgB,eACrD,CACE,YAAaD,EAAK,QAAU,MAC9B,CACF,EAEA,oBAAC,OAAI,UAAU,mBACb,oBAAC,WACC,UAAU,SACV,aAAa,sBACb,OAAQA,GAAM,WAAW,KAAOA,GAAM,KAAK,IAC3C,IAAKA,GAAM,WAAW,KAAOA,GAAM,KAAK,KAAO,GACjD,KACA,QAAC,OAAI,UAAU,4FACb,oBAAC,QAAK,KAAMA,GAAM,MAAO,UAAU,yDAAyD,EAC3FA,GAAM,gBACL,OAAC,QAAK,KAAMA,GAAM,YAAa,UAAU,6DAA6D,GAE1G,GACF,EACF,EAIEE,EAAkBC,GAA8B,CACpD,KAAM,CAAE,KAAAH,EAAM,UAAAI,CAAU,EAAID,EACtB,CAAE,YAAAE,EAAa,MAAAC,CAAM,EAAIN,EAE/B,SACE,oBACE,oBAAC,OAAI,aAAW,MAAG,sBAAuB,uDAAuD,EAC/F,mBAAC,QAAK,aAAW,MAAG,wCAAyCI,CAAS,EACnE,SAAAC,GAAa,IAAI,CAACE,EAAMC,OAErB,QAAC,YAEC,KAAMD,EAAK,KACX,aAAW,MACT,oDACAD,IAAU,UAAY,cAAgB,eACtC,0DACA,CACE,YAAaC,EAAK,QAAU,MAC9B,CACF,EAEA,oBAAC,WAAQ,OAAQA,EAAK,IAAI,IAAK,UAAU,YAAY,aAAa,sBAAsB,KACxF,QAAC,OAAI,UAAU,kJACZ,UAAAA,EAAK,UACJ,OAAC,QACC,KAAMA,EAAK,MACX,GAAG,IACH,UAAU,qEACZ,EAEDA,EAAK,gBACJ,OAAC,QAAK,KAAMA,EAAK,YAAa,UAAU,iDAAiD,GAE7F,IAvBKC,CAwBP,CAEH,EACH,EACF,KACA,OAAC,OAAI,UAAU,6BACb,mBAAC,EAAAC,QAAA,CACC,GAAG,iBACH,aAAW,MAAG,oBAAqBL,CAAS,EAC5C,KAAM,CACJ,KAAMC,GAAe,CAAC,EACtB,cAAe,CACb,MAAAC,CACF,CACF,EACA,MAAOP,EACP,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,CACjB,CACF,EACF,EACF,GACF,CAEJ,EAEA,IAAOR,KAAQ,cAAWW,CAAc",
6
6
  "names": ["CreativeModule_exports", "__export", "CreativeModule_default", "__toCommonJS", "import_jsx_runtime", "import_utils", "import_SwiperBox", "import_Styles", "import_gird", "import_components", "Item", "data", "configuration", "CreativeModule", "props", "className", "productsTab", "shape", "item", "index", "SwiperBox"]
7
7
  }