@anker-in/headless-ui 1.1.87 → 1.1.89

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 (412) hide show
  1. package/dist/cjs/biz-components/AccordionCards/index.d.ts +1 -1
  2. package/dist/cjs/biz-components/ActiveShelf/index.d.ts +1 -1
  3. package/dist/cjs/biz-components/ActivitySchedule/index.d.ts +1 -1
  4. package/dist/cjs/biz-components/AiuiProvider/index.d.ts +6 -0
  5. package/dist/cjs/biz-components/AiuiProvider/index.js +1 -1
  6. package/dist/cjs/biz-components/AiuiProvider/index.js.map +3 -3
  7. package/dist/cjs/biz-components/AnchorNavigation/index.d.ts +1 -1
  8. package/dist/cjs/biz-components/AplusDesc/index.d.ts +1 -1
  9. package/dist/cjs/biz-components/BrandCardLink/BrandCardLink.d.ts +1 -1
  10. package/dist/cjs/biz-components/BrandEquity/BrandEquity.d.ts +1 -1
  11. package/dist/cjs/biz-components/BrandEquity/BrandEquity.js +1 -1
  12. package/dist/cjs/biz-components/BrandEquity/BrandEquity.js.map +3 -3
  13. package/dist/cjs/biz-components/BrandEquity/types.d.ts +8 -0
  14. package/dist/cjs/biz-components/BrandEquity/types.js +1 -1
  15. package/dist/cjs/biz-components/BrandEquity/types.js.map +1 -1
  16. package/dist/cjs/biz-components/Category/index.d.ts +1 -1
  17. package/dist/cjs/biz-components/CreativeModule/index.d.ts +1 -1
  18. package/dist/cjs/biz-components/DownLoad/index.d.ts +1 -1
  19. package/dist/cjs/biz-components/Evaluate/index.d.ts +1 -1
  20. package/dist/cjs/biz-components/EventSchedule/index.d.ts +1 -1
  21. package/dist/cjs/biz-components/Faq/Faq.d.ts +1 -1
  22. package/dist/cjs/biz-components/Faq/Faq.js +1 -1
  23. package/dist/cjs/biz-components/Faq/Faq.js.map +2 -2
  24. package/dist/cjs/biz-components/Faq/types.d.ts +1 -0
  25. package/dist/cjs/biz-components/Faq/types.js +1 -1
  26. package/dist/cjs/biz-components/Faq/types.js.map +1 -1
  27. package/dist/cjs/biz-components/FeatureCards/FeatureCards.d.ts +1 -1
  28. package/dist/cjs/biz-components/FeatureShowcase/FeatureShowcase.d.ts +1 -1
  29. package/dist/cjs/biz-components/FeaturedBlogPosts/index.d.ts +1 -1
  30. package/dist/cjs/biz-components/Features/index.d.ts +1 -1
  31. package/dist/cjs/biz-components/FootCharger/index.d.ts +1 -1
  32. package/dist/cjs/biz-components/FooterNavigation/index.d.ts +1 -1
  33. package/dist/cjs/biz-components/GiftBox/index.d.ts +1 -1
  34. package/dist/cjs/biz-components/GiftShelf/index.d.ts +1 -1
  35. package/dist/cjs/biz-components/GiftTierShelf/index.d.ts +1 -1
  36. package/dist/cjs/biz-components/Graphic/index.d.ts +1 -1
  37. package/dist/cjs/biz-components/GraphicAttractionBlock/index.d.ts +1 -1
  38. package/dist/cjs/biz-components/GraphicMore/index.d.ts +1 -1
  39. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.d.ts +1 -1
  40. package/dist/cjs/biz-components/HeaderNavigation/index.d.ts +1 -1
  41. package/dist/cjs/biz-components/HeroBanner/HeroBanner.d.ts +21 -1
  42. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
  43. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +3 -3
  44. package/dist/cjs/biz-components/HeroBanner/HeroBannerCarousel.d.ts +23 -0
  45. package/dist/cjs/biz-components/HeroBanner/HeroBannerCarousel.js +2 -0
  46. package/dist/cjs/biz-components/HeroBanner/HeroBannerCarousel.js.map +7 -0
  47. package/dist/cjs/biz-components/HeroBanner/index.d.ts +1 -0
  48. package/dist/cjs/biz-components/HeroBanner/index.js +1 -1
  49. package/dist/cjs/biz-components/HeroBanner/index.js.map +1 -1
  50. package/dist/cjs/biz-components/HeroBanner/types.d.ts +73 -0
  51. package/dist/cjs/biz-components/HeroBanner/types.js +1 -1
  52. package/dist/cjs/biz-components/HeroBanner/types.js.map +1 -1
  53. package/dist/cjs/biz-components/ImageOverlayShelf/index.d.ts +2 -2
  54. package/dist/cjs/biz-components/ImageOverlayShelf/index.js +1 -1
  55. package/dist/cjs/biz-components/ImageOverlayShelf/index.js.map +3 -3
  56. package/dist/cjs/biz-components/ImageTextFeature/ImageTextFeature.d.ts +1 -1
  57. package/dist/cjs/biz-components/ImageTextOverlay/index.d.ts +9 -0
  58. package/dist/cjs/biz-components/ImageTextOverlay/index.js +18 -0
  59. package/dist/cjs/biz-components/ImageTextOverlay/index.js.map +7 -0
  60. package/dist/cjs/biz-components/ImageTextOverlay/types.d.ts +58 -0
  61. package/dist/cjs/biz-components/ImageTextOverlay/types.js +2 -0
  62. package/dist/cjs/biz-components/ImageTextOverlay/types.js.map +7 -0
  63. package/dist/cjs/biz-components/ImageWithText/ImageWithText.d.ts +1 -1
  64. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js +1 -1
  65. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js.map +2 -2
  66. package/dist/cjs/biz-components/Ksp/index.d.ts +1 -1
  67. package/dist/cjs/biz-components/Listing/components/PaidShipping/index.d.ts +1 -1
  68. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +1 -1
  69. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +1 -1
  70. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +1 -1
  71. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +1 -1
  72. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +1 -1
  73. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +1 -1
  74. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +1 -1
  75. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductPaidShipping/index.d.ts +1 -1
  76. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +1 -1
  77. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.d.ts +1 -1
  78. package/dist/cjs/biz-components/LotteryShared/BaseModal.js +1 -1
  79. package/dist/cjs/biz-components/LotteryShared/BaseModal.js.map +2 -2
  80. package/dist/cjs/biz-components/LotteryShared/ChanceMethods.js +1 -1
  81. package/dist/cjs/biz-components/LotteryShared/ChanceMethods.js.map +3 -3
  82. package/dist/cjs/biz-components/LotteryShared/ErrorModal.js +1 -1
  83. package/dist/cjs/biz-components/LotteryShared/ErrorModal.js.map +2 -2
  84. package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.d.ts +33 -0
  85. package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.js +1 -1
  86. package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.js.map +3 -3
  87. package/dist/cjs/biz-components/LotteryShared/PrizePool.js +1 -1
  88. package/dist/cjs/biz-components/LotteryShared/PrizePool.js.map +3 -3
  89. package/dist/cjs/biz-components/LotteryShared/WinnerModal.d.ts +1 -1
  90. package/dist/cjs/biz-components/LotteryShared/WinnerModal.js +1 -1
  91. package/dist/cjs/biz-components/LotteryShared/WinnerModal.js.map +3 -3
  92. package/dist/cjs/biz-components/LotteryShared/types.d.ts +101 -0
  93. package/dist/cjs/biz-components/LotteryShared/types.js +1 -1
  94. package/dist/cjs/biz-components/LotteryShared/types.js.map +2 -2
  95. package/dist/cjs/biz-components/Marquee/Marquee.d.ts +2 -1
  96. package/dist/cjs/biz-components/Marquee/Marquee.js +1 -1
  97. package/dist/cjs/biz-components/Marquee/Marquee.js.map +3 -3
  98. package/dist/cjs/biz-components/MarqueeReview/index.d.ts +1 -1
  99. package/dist/cjs/biz-components/Media/index.d.ts +15 -3
  100. package/dist/cjs/biz-components/Media/index.js +1 -1
  101. package/dist/cjs/biz-components/Media/index.js.map +3 -3
  102. package/dist/cjs/biz-components/MediaEndorsement/index.d.ts +1 -1
  103. package/dist/cjs/biz-components/MediaEndorsement/index.js +2 -2
  104. package/dist/cjs/biz-components/MediaEndorsement/index.js.map +3 -3
  105. package/dist/cjs/biz-components/MediaPlayerBase/index.d.ts +1 -1
  106. package/dist/cjs/biz-components/MediaPlayerBase/index.js +1 -1
  107. package/dist/cjs/biz-components/MediaPlayerBase/index.js.map +3 -3
  108. package/dist/cjs/biz-components/MediaPlayerBase/types.d.ts +26 -0
  109. package/dist/cjs/biz-components/MediaPlayerBase/types.js +1 -1
  110. package/dist/cjs/biz-components/MediaPlayerBase/types.js.map +1 -1
  111. package/dist/cjs/biz-components/MediaPlayerMulti/index.d.ts +1 -1
  112. package/dist/cjs/biz-components/MediaPlayerSticky/index.d.ts +1 -1
  113. package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +1 -1
  114. package/dist/cjs/biz-components/MediaSceneSwitcherV2/index.d.ts +1 -1
  115. package/dist/cjs/biz-components/MediaShelf/index.d.ts +1 -1
  116. package/dist/cjs/biz-components/MemberEquity/index.d.ts +1 -1
  117. package/dist/cjs/biz-components/MiniCart/index.js +1 -1
  118. package/dist/cjs/biz-components/MiniCart/index.js.map +2 -2
  119. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +1 -1
  120. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  121. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +2 -2
  122. package/dist/cjs/biz-components/NavigationSearch/index.d.ts +1 -1
  123. package/dist/cjs/biz-components/ProductCompare/index.d.ts +1 -1
  124. package/dist/cjs/biz-components/ProductHero/ProductHero.d.ts +1 -1
  125. package/dist/cjs/biz-components/ProductLottery/MediaDrawArea.js +1 -1
  126. package/dist/cjs/biz-components/ProductLottery/MediaDrawArea.js.map +3 -3
  127. package/dist/cjs/biz-components/ProductLottery/index.d.ts +3 -2
  128. package/dist/cjs/biz-components/ProductLottery/index.js +1 -1
  129. package/dist/cjs/biz-components/ProductLottery/index.js.map +3 -3
  130. package/dist/cjs/biz-components/ProductLottery/types.d.ts +75 -89
  131. package/dist/cjs/biz-components/ProductLottery/types.js +1 -1
  132. package/dist/cjs/biz-components/ProductLottery/types.js.map +2 -2
  133. package/dist/cjs/biz-components/ProductNav/ProductNav.d.ts +1 -1
  134. package/dist/cjs/biz-components/PromotionalBar/index.d.ts +3 -2
  135. package/dist/cjs/biz-components/PromotionalBar/index.js +1 -1
  136. package/dist/cjs/biz-components/PromotionalBar/index.js.map +3 -3
  137. package/dist/cjs/biz-components/SceneShelfV2/index.d.ts +113 -0
  138. package/dist/cjs/biz-components/SceneShelfV2/index.js +2 -0
  139. package/dist/cjs/biz-components/SceneShelfV2/index.js.map +7 -0
  140. package/dist/cjs/biz-components/SceneShelfV3/ProductCard.d.ts +89 -0
  141. package/dist/cjs/biz-components/SceneShelfV3/ProductCard.js +2 -0
  142. package/dist/cjs/biz-components/SceneShelfV3/ProductCard.js.map +7 -0
  143. package/dist/cjs/biz-components/SceneShelfV3/index.d.ts +79 -0
  144. package/dist/cjs/biz-components/SceneShelfV3/index.js +2 -0
  145. package/dist/cjs/biz-components/SceneShelfV3/index.js.map +7 -0
  146. package/dist/cjs/biz-components/SceneShelfV3/types.d.ts +19 -0
  147. package/dist/cjs/biz-components/SceneShelfV3/types.js +2 -0
  148. package/dist/cjs/biz-components/SceneShelfV3/types.js.map +7 -0
  149. package/dist/cjs/biz-components/SecondaryBanner/SecondaryBannerCarousel.d.ts +21 -0
  150. package/dist/cjs/biz-components/SecondaryBanner/SecondaryBannerCarousel.js +2 -0
  151. package/dist/cjs/biz-components/SecondaryBanner/SecondaryBannerCarousel.js.map +7 -0
  152. package/dist/cjs/biz-components/SecondaryBanner/index.d.ts +65 -1
  153. package/dist/cjs/biz-components/SecondaryBanner/index.js +1 -1
  154. package/dist/cjs/biz-components/SecondaryBanner/index.js.map +3 -3
  155. package/dist/cjs/biz-components/SelectStore/index.d.ts +1 -1
  156. package/dist/cjs/biz-components/ShelfDisplay/index.d.ts +1 -1
  157. package/dist/cjs/biz-components/Slogan/index.d.ts +1 -1
  158. package/dist/cjs/biz-components/Spacer/index.d.ts +1 -1
  159. package/dist/cjs/biz-components/Specs/index.d.ts +1 -1
  160. package/dist/cjs/biz-components/SpecsComparison/SpecsComparison.d.ts +1 -1
  161. package/dist/cjs/biz-components/TabWithImage/TabWithImage.d.ts +1 -1
  162. package/dist/cjs/biz-components/Tabs/Tabs.d.ts +1 -1
  163. package/dist/cjs/biz-components/TabsGroup/index.d.ts +1 -1
  164. package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.d.ts +1 -1
  165. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +1 -1
  166. package/dist/cjs/biz-components/Title/index.d.ts +1 -1
  167. package/dist/cjs/biz-components/Title/index.js +1 -1
  168. package/dist/cjs/biz-components/Title/index.js.map +3 -3
  169. package/dist/cjs/biz-components/Title/types.d.ts +53 -1
  170. package/dist/cjs/biz-components/Title/types.js +1 -1
  171. package/dist/cjs/biz-components/Title/types.js.map +1 -1
  172. package/dist/cjs/biz-components/VideoFeature/VideoFeature.d.ts +1 -1
  173. package/dist/cjs/biz-components/WheelLottery/BaseModal.js +1 -1
  174. package/dist/cjs/biz-components/WheelLottery/BaseModal.js.map +2 -2
  175. package/dist/cjs/biz-components/WheelLottery/ErrorModal.js +1 -1
  176. package/dist/cjs/biz-components/WheelLottery/ErrorModal.js.map +2 -2
  177. package/dist/cjs/biz-components/WheelLottery/MyRewardsModal.js +1 -1
  178. package/dist/cjs/biz-components/WheelLottery/MyRewardsModal.js.map +2 -2
  179. package/dist/cjs/biz-components/WheelLottery/WinnerModal.js +1 -1
  180. package/dist/cjs/biz-components/WheelLottery/WinnerModal.js.map +2 -2
  181. package/dist/cjs/biz-components/WheelLottery/index.d.ts +2 -1
  182. package/dist/cjs/biz-components/WheelLottery/index.js +1 -1
  183. package/dist/cjs/biz-components/WheelLottery/index.js.map +3 -3
  184. package/dist/cjs/biz-components/WheelLottery/types.d.ts +6 -0
  185. package/dist/cjs/biz-components/WheelLottery/types.js.map +2 -2
  186. package/dist/cjs/biz-components/WhyChoose/WhyChoose.d.ts +1 -1
  187. package/dist/cjs/biz-components/index.d.ts +7 -0
  188. package/dist/cjs/biz-components/index.js +1 -1
  189. package/dist/cjs/biz-components/index.js.map +3 -3
  190. package/dist/cjs/hooks/useExposure.d.ts +4 -3
  191. package/dist/cjs/hooks/useExposure.js +1 -1
  192. package/dist/cjs/hooks/useExposure.js.map +3 -3
  193. package/dist/cjs/hooks/useGridRowCount.d.ts +16 -0
  194. package/dist/cjs/hooks/useGridRowCount.js +2 -0
  195. package/dist/cjs/hooks/useGridRowCount.js.map +7 -0
  196. package/dist/cjs/hooks/useViewItemList.d.ts +21 -0
  197. package/dist/cjs/hooks/useViewItemList.js +2 -0
  198. package/dist/cjs/hooks/useViewItemList.js.map +7 -0
  199. package/dist/cjs/index.d.ts +1 -0
  200. package/dist/cjs/index.js +1 -1
  201. package/dist/cjs/index.js.map +3 -3
  202. package/dist/cjs/shared/Styles.js +1 -1
  203. package/dist/cjs/shared/Styles.js.map +3 -3
  204. package/dist/cjs/shared/trackUrlRef.d.ts +9 -0
  205. package/dist/cjs/shared/trackUrlRef.js +1 -1
  206. package/dist/cjs/shared/trackUrlRef.js.map +3 -3
  207. package/dist/cjs/types/props.d.ts +18 -1
  208. package/dist/cjs/types/props.js +1 -1
  209. package/dist/cjs/types/props.js.map +1 -1
  210. package/dist/esm/biz-components/AccordionCards/index.d.ts +1 -1
  211. package/dist/esm/biz-components/ActiveShelf/index.d.ts +1 -1
  212. package/dist/esm/biz-components/ActivitySchedule/index.d.ts +1 -1
  213. package/dist/esm/biz-components/AiuiProvider/index.d.ts +6 -0
  214. package/dist/esm/biz-components/AiuiProvider/index.js +1 -1
  215. package/dist/esm/biz-components/AiuiProvider/index.js.map +3 -3
  216. package/dist/esm/biz-components/AnchorNavigation/index.d.ts +1 -1
  217. package/dist/esm/biz-components/AplusDesc/index.d.ts +1 -1
  218. package/dist/esm/biz-components/BrandCardLink/BrandCardLink.d.ts +1 -1
  219. package/dist/esm/biz-components/BrandEquity/BrandEquity.d.ts +1 -1
  220. package/dist/esm/biz-components/BrandEquity/BrandEquity.js +1 -1
  221. package/dist/esm/biz-components/BrandEquity/BrandEquity.js.map +3 -3
  222. package/dist/esm/biz-components/BrandEquity/types.d.ts +8 -0
  223. package/dist/esm/biz-components/Category/index.d.ts +1 -1
  224. package/dist/esm/biz-components/CreativeModule/index.d.ts +1 -1
  225. package/dist/esm/biz-components/DownLoad/index.d.ts +1 -1
  226. package/dist/esm/biz-components/Evaluate/index.d.ts +1 -1
  227. package/dist/esm/biz-components/EventSchedule/index.d.ts +1 -1
  228. package/dist/esm/biz-components/Faq/Faq.d.ts +1 -1
  229. package/dist/esm/biz-components/Faq/Faq.js +1 -1
  230. package/dist/esm/biz-components/Faq/Faq.js.map +2 -2
  231. package/dist/esm/biz-components/Faq/types.d.ts +1 -0
  232. package/dist/esm/biz-components/FeatureCards/FeatureCards.d.ts +1 -1
  233. package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.d.ts +1 -1
  234. package/dist/esm/biz-components/FeaturedBlogPosts/index.d.ts +1 -1
  235. package/dist/esm/biz-components/Features/index.d.ts +1 -1
  236. package/dist/esm/biz-components/FootCharger/index.d.ts +1 -1
  237. package/dist/esm/biz-components/FooterNavigation/index.d.ts +1 -1
  238. package/dist/esm/biz-components/GiftBox/index.d.ts +1 -1
  239. package/dist/esm/biz-components/GiftShelf/index.d.ts +1 -1
  240. package/dist/esm/biz-components/GiftTierShelf/index.d.ts +1 -1
  241. package/dist/esm/biz-components/Graphic/index.d.ts +1 -1
  242. package/dist/esm/biz-components/GraphicAttractionBlock/index.d.ts +1 -1
  243. package/dist/esm/biz-components/GraphicMore/index.d.ts +1 -1
  244. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.d.ts +1 -1
  245. package/dist/esm/biz-components/HeaderNavigation/index.d.ts +1 -1
  246. package/dist/esm/biz-components/HeroBanner/HeroBanner.d.ts +21 -1
  247. package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
  248. package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +3 -3
  249. package/dist/esm/biz-components/HeroBanner/HeroBannerCarousel.d.ts +23 -0
  250. package/dist/esm/biz-components/HeroBanner/HeroBannerCarousel.js +2 -0
  251. package/dist/esm/biz-components/HeroBanner/HeroBannerCarousel.js.map +7 -0
  252. package/dist/esm/biz-components/HeroBanner/index.d.ts +1 -0
  253. package/dist/esm/biz-components/HeroBanner/index.js +1 -1
  254. package/dist/esm/biz-components/HeroBanner/index.js.map +1 -1
  255. package/dist/esm/biz-components/HeroBanner/types.d.ts +73 -0
  256. package/dist/esm/biz-components/ImageOverlayShelf/index.d.ts +2 -2
  257. package/dist/esm/biz-components/ImageOverlayShelf/index.js +1 -1
  258. package/dist/esm/biz-components/ImageOverlayShelf/index.js.map +3 -3
  259. package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.d.ts +1 -1
  260. package/dist/esm/biz-components/ImageTextOverlay/index.d.ts +9 -0
  261. package/dist/esm/biz-components/ImageTextOverlay/index.js +18 -0
  262. package/dist/esm/biz-components/ImageTextOverlay/index.js.map +7 -0
  263. package/dist/esm/biz-components/ImageTextOverlay/types.d.ts +58 -0
  264. package/dist/esm/biz-components/ImageTextOverlay/types.js +1 -0
  265. package/dist/esm/biz-components/ImageTextOverlay/types.js.map +7 -0
  266. package/dist/esm/biz-components/ImageWithText/ImageWithText.d.ts +1 -1
  267. package/dist/esm/biz-components/ImageWithText/ImageWithText.js +1 -1
  268. package/dist/esm/biz-components/ImageWithText/ImageWithText.js.map +2 -2
  269. package/dist/esm/biz-components/Ksp/index.d.ts +1 -1
  270. package/dist/esm/biz-components/Listing/components/PaidShipping/index.d.ts +1 -1
  271. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +1 -1
  272. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +1 -1
  273. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +1 -1
  274. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +1 -1
  275. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +1 -1
  276. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +1 -1
  277. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +1 -1
  278. package/dist/esm/biz-components/Listing/components/ProductCard/ProductPaidShipping/index.d.ts +1 -1
  279. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +1 -1
  280. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.d.ts +1 -1
  281. package/dist/esm/biz-components/LotteryShared/BaseModal.js +1 -1
  282. package/dist/esm/biz-components/LotteryShared/BaseModal.js.map +2 -2
  283. package/dist/esm/biz-components/LotteryShared/ChanceMethods.js +1 -1
  284. package/dist/esm/biz-components/LotteryShared/ChanceMethods.js.map +3 -3
  285. package/dist/esm/biz-components/LotteryShared/ErrorModal.js +1 -1
  286. package/dist/esm/biz-components/LotteryShared/ErrorModal.js.map +2 -2
  287. package/dist/esm/biz-components/LotteryShared/MyRewardsModal.d.ts +33 -0
  288. package/dist/esm/biz-components/LotteryShared/MyRewardsModal.js +1 -1
  289. package/dist/esm/biz-components/LotteryShared/MyRewardsModal.js.map +3 -3
  290. package/dist/esm/biz-components/LotteryShared/PrizePool.js +1 -1
  291. package/dist/esm/biz-components/LotteryShared/PrizePool.js.map +3 -3
  292. package/dist/esm/biz-components/LotteryShared/WinnerModal.d.ts +1 -1
  293. package/dist/esm/biz-components/LotteryShared/WinnerModal.js +1 -1
  294. package/dist/esm/biz-components/LotteryShared/WinnerModal.js.map +3 -3
  295. package/dist/esm/biz-components/LotteryShared/types.d.ts +101 -0
  296. package/dist/esm/biz-components/LotteryShared/types.js +1 -1
  297. package/dist/esm/biz-components/LotteryShared/types.js.map +2 -2
  298. package/dist/esm/biz-components/Marquee/Marquee.d.ts +2 -1
  299. package/dist/esm/biz-components/Marquee/Marquee.js +1 -1
  300. package/dist/esm/biz-components/Marquee/Marquee.js.map +2 -2
  301. package/dist/esm/biz-components/MarqueeReview/index.d.ts +1 -1
  302. package/dist/esm/biz-components/Media/index.d.ts +15 -3
  303. package/dist/esm/biz-components/Media/index.js +1 -1
  304. package/dist/esm/biz-components/Media/index.js.map +3 -3
  305. package/dist/esm/biz-components/MediaEndorsement/index.d.ts +1 -1
  306. package/dist/esm/biz-components/MediaEndorsement/index.js +2 -2
  307. package/dist/esm/biz-components/MediaEndorsement/index.js.map +3 -3
  308. package/dist/esm/biz-components/MediaPlayerBase/index.d.ts +1 -1
  309. package/dist/esm/biz-components/MediaPlayerBase/index.js +1 -1
  310. package/dist/esm/biz-components/MediaPlayerBase/index.js.map +3 -3
  311. package/dist/esm/biz-components/MediaPlayerBase/types.d.ts +26 -0
  312. package/dist/esm/biz-components/MediaPlayerMulti/index.d.ts +1 -1
  313. package/dist/esm/biz-components/MediaPlayerSticky/index.d.ts +1 -1
  314. package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +1 -1
  315. package/dist/esm/biz-components/MediaSceneSwitcherV2/index.d.ts +1 -1
  316. package/dist/esm/biz-components/MediaShelf/index.d.ts +1 -1
  317. package/dist/esm/biz-components/MemberEquity/index.d.ts +1 -1
  318. package/dist/esm/biz-components/MiniCart/index.js +1 -1
  319. package/dist/esm/biz-components/MiniCart/index.js.map +2 -2
  320. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +1 -1
  321. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  322. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +2 -2
  323. package/dist/esm/biz-components/NavigationSearch/index.d.ts +1 -1
  324. package/dist/esm/biz-components/ProductCompare/index.d.ts +1 -1
  325. package/dist/esm/biz-components/ProductHero/ProductHero.d.ts +1 -1
  326. package/dist/esm/biz-components/ProductLottery/MediaDrawArea.js +1 -1
  327. package/dist/esm/biz-components/ProductLottery/MediaDrawArea.js.map +3 -3
  328. package/dist/esm/biz-components/ProductLottery/index.d.ts +3 -2
  329. package/dist/esm/biz-components/ProductLottery/index.js +1 -1
  330. package/dist/esm/biz-components/ProductLottery/index.js.map +3 -3
  331. package/dist/esm/biz-components/ProductLottery/types.d.ts +75 -89
  332. package/dist/esm/biz-components/ProductLottery/types.js.map +2 -2
  333. package/dist/esm/biz-components/ProductNav/ProductNav.d.ts +1 -1
  334. package/dist/esm/biz-components/PromotionalBar/index.d.ts +3 -2
  335. package/dist/esm/biz-components/PromotionalBar/index.js +1 -1
  336. package/dist/esm/biz-components/PromotionalBar/index.js.map +3 -3
  337. package/dist/esm/biz-components/SceneShelfV2/index.d.ts +113 -0
  338. package/dist/esm/biz-components/SceneShelfV2/index.js +2 -0
  339. package/dist/esm/biz-components/SceneShelfV2/index.js.map +7 -0
  340. package/dist/esm/biz-components/SceneShelfV3/ProductCard.d.ts +89 -0
  341. package/dist/esm/biz-components/SceneShelfV3/ProductCard.js +2 -0
  342. package/dist/esm/biz-components/SceneShelfV3/ProductCard.js.map +7 -0
  343. package/dist/esm/biz-components/SceneShelfV3/index.d.ts +79 -0
  344. package/dist/esm/biz-components/SceneShelfV3/index.js +2 -0
  345. package/dist/esm/biz-components/SceneShelfV3/index.js.map +7 -0
  346. package/dist/esm/biz-components/SceneShelfV3/types.d.ts +19 -0
  347. package/dist/esm/biz-components/SceneShelfV3/types.js +1 -0
  348. package/dist/esm/biz-components/SceneShelfV3/types.js.map +7 -0
  349. package/dist/esm/biz-components/SecondaryBanner/SecondaryBannerCarousel.d.ts +21 -0
  350. package/dist/esm/biz-components/SecondaryBanner/SecondaryBannerCarousel.js +2 -0
  351. package/dist/esm/biz-components/SecondaryBanner/SecondaryBannerCarousel.js.map +7 -0
  352. package/dist/esm/biz-components/SecondaryBanner/index.d.ts +65 -1
  353. package/dist/esm/biz-components/SecondaryBanner/index.js +1 -1
  354. package/dist/esm/biz-components/SecondaryBanner/index.js.map +3 -3
  355. package/dist/esm/biz-components/SelectStore/index.d.ts +1 -1
  356. package/dist/esm/biz-components/ShelfDisplay/index.d.ts +1 -1
  357. package/dist/esm/biz-components/Slogan/index.d.ts +1 -1
  358. package/dist/esm/biz-components/Spacer/index.d.ts +1 -1
  359. package/dist/esm/biz-components/Specs/index.d.ts +1 -1
  360. package/dist/esm/biz-components/SpecsComparison/SpecsComparison.d.ts +1 -1
  361. package/dist/esm/biz-components/TabWithImage/TabWithImage.d.ts +1 -1
  362. package/dist/esm/biz-components/Tabs/Tabs.d.ts +1 -1
  363. package/dist/esm/biz-components/TabsGroup/index.d.ts +1 -1
  364. package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.d.ts +1 -1
  365. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +1 -1
  366. package/dist/esm/biz-components/Title/index.d.ts +1 -1
  367. package/dist/esm/biz-components/Title/index.js +1 -1
  368. package/dist/esm/biz-components/Title/index.js.map +3 -3
  369. package/dist/esm/biz-components/Title/types.d.ts +53 -1
  370. package/dist/esm/biz-components/VideoFeature/VideoFeature.d.ts +1 -1
  371. package/dist/esm/biz-components/WheelLottery/BaseModal.js +1 -1
  372. package/dist/esm/biz-components/WheelLottery/BaseModal.js.map +2 -2
  373. package/dist/esm/biz-components/WheelLottery/ErrorModal.js +1 -1
  374. package/dist/esm/biz-components/WheelLottery/ErrorModal.js.map +2 -2
  375. package/dist/esm/biz-components/WheelLottery/MyRewardsModal.js +1 -1
  376. package/dist/esm/biz-components/WheelLottery/MyRewardsModal.js.map +2 -2
  377. package/dist/esm/biz-components/WheelLottery/WinnerModal.js +1 -1
  378. package/dist/esm/biz-components/WheelLottery/WinnerModal.js.map +2 -2
  379. package/dist/esm/biz-components/WheelLottery/index.d.ts +2 -1
  380. package/dist/esm/biz-components/WheelLottery/index.js +1 -1
  381. package/dist/esm/biz-components/WheelLottery/index.js.map +3 -3
  382. package/dist/esm/biz-components/WheelLottery/types.d.ts +6 -0
  383. package/dist/esm/biz-components/WheelLottery/types.js.map +2 -2
  384. package/dist/esm/biz-components/WhyChoose/WhyChoose.d.ts +1 -1
  385. package/dist/esm/biz-components/index.d.ts +7 -0
  386. package/dist/esm/biz-components/index.js +1 -1
  387. package/dist/esm/biz-components/index.js.map +3 -3
  388. package/dist/esm/hooks/useExposure.d.ts +4 -3
  389. package/dist/esm/hooks/useExposure.js +1 -1
  390. package/dist/esm/hooks/useExposure.js.map +3 -3
  391. package/dist/esm/hooks/useGridRowCount.d.ts +16 -0
  392. package/dist/esm/hooks/useGridRowCount.js +2 -0
  393. package/dist/esm/hooks/useGridRowCount.js.map +7 -0
  394. package/dist/esm/hooks/useViewItemList.d.ts +21 -0
  395. package/dist/esm/hooks/useViewItemList.js +2 -0
  396. package/dist/esm/hooks/useViewItemList.js.map +7 -0
  397. package/dist/esm/index.d.ts +1 -0
  398. package/dist/esm/index.js +1 -1
  399. package/dist/esm/index.js.map +3 -3
  400. package/dist/esm/shared/Styles.js +1 -1
  401. package/dist/esm/shared/Styles.js.map +3 -3
  402. package/dist/esm/shared/trackUrlRef.d.ts +9 -0
  403. package/dist/esm/shared/trackUrlRef.js +1 -1
  404. package/dist/esm/shared/trackUrlRef.js.map +3 -3
  405. package/dist/esm/types/props.d.ts +18 -1
  406. package/dist/tokens/anker.css +2 -2
  407. package/dist/tokens/eufy.css +2 -2
  408. package/dist/tokens/eufyMake.css +2 -2
  409. package/dist/tokens/soundcore.css +2 -2
  410. package/package.json +1 -1
  411. package/style.css +224 -26
  412. package/tailwind.config.js +14 -2
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { HeaderNavigationProps } from './types.js';
3
- declare const _default: React.ForwardRefExoticComponent<Omit<HeaderNavigationProps & React.RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps & React.RefAttributes<unknown>> & {
3
+ declare const _default: React.ForwardRefExoticComponent<Omit<HeaderNavigationProps & React.RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("../WheelLottery/index.js").ContainerProps & React.RefAttributes<unknown>> & {
4
4
  readonly $$typeof: symbol;
5
5
  };
6
6
  export default _default;
@@ -1,9 +1,29 @@
1
1
  import React from 'react';
2
2
  import type { HeroBannerProps } from './types.js';
3
+ /**
4
+ * jump.js 配置选项
5
+ */
6
+ export interface JumpOptions {
7
+ /** 动画持续时间(毫秒) @default 500 */
8
+ duration?: number;
9
+ /** 偏移量(像素) @default 0 */
10
+ offset?: number;
11
+ /** 动画完成回调 */
12
+ callback?: () => void;
13
+ /** 缓动函数 */
14
+ easing?: (t: number, b: number, c: number, d: number) => number;
15
+ /** 是否考虑 a11y @default false */
16
+ a11y?: boolean;
17
+ }
3
18
  export type HeroBannerSemanticName = 'root' | 'title' | 'subtitle' | 'buttonGroup' | 'primaryButton' | 'secondaryButton' | 'captionGroup';
4
19
  declare const _default: React.ForwardRefExoticComponent<Omit<HeroBannerProps & {
5
20
  classNames?: Partial<Record<HeroBannerSemanticName, string>>;
6
- } & React.RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps & React.RefAttributes<unknown>> & {
21
+ /**
22
+ * 锚点跳转配置(用于 # 开头的链接)
23
+ * @default { duration: 500, offset: 0 }
24
+ */
25
+ jumpOptions?: JumpOptions;
26
+ } & React.RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("../WheelLottery/index.js").ContainerProps & React.RefAttributes<unknown>> & {
7
27
  readonly $$typeof: symbol;
8
28
  };
9
29
  export default _default;
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var xe=Object.create;var V=Object.defineProperty;var he=Object.getOwnPropertyDescriptor;var ye=Object.getOwnPropertyNames;var ve=Object.getPrototypeOf,we=Object.prototype.hasOwnProperty;var ke=(t,o)=>{for(var s in o)V(t,s,{get:o[s],enumerable:!0})},K=(t,o,s,N)=>{if(o&&typeof o=="object"||typeof o=="function")for(let g of ye(o))!we.call(t,g)&&g!==s&&V(t,g,{get:()=>o[g],enumerable:!(N=he(o,g))||N.enumerable});return t};var M=(t,o,s)=>(s=t!=null?xe(ve(t)):{},K(o||!t||!t.__esModule?V(s,"default",{value:t,enumerable:!0}):s,t)),Ne=t=>K(V({},"__esModule",{value:!0}),t);var Ie={};ke(Ie,{default:()=>Te});module.exports=Ne(Ie);var e=require("react/jsx-runtime"),l=M(require("react")),v=M(require("gsap")),w=require("gsap/dist/ScrollTrigger"),D=require("react-responsive"),W=require("react-intersection-observer"),X=M(require("../../helpers/ScrollLoadVideo.js")),n=require("../../components/index.js"),c=require("../../helpers/index.js"),k=require("class-variance-authority"),ee=require("../../shared/Styles.js"),te=require("../../hooks/useExposure.js"),B=require("../../shared/trackUrlRef.js"),ae=require("../../helpers/utils.js"),oe=require("../AiuiProvider/index.js"),re=require("../../components/button.js"),le=require("../VideoModal/index.js");const d="image",m="hero_banner",$e=(0,k.cva)("hero-banner-content lg-desktop:gap-[32px] absolute top-24 z-10 flex w-full flex-col gap-[24px]",{variants:{align:{left:"tablet:px-[32px] laptop:top-1/2 laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] laptop:-translate-y-1/2 left-0 px-[16px]",center:"tablet:top-[84px] laptop:top-[76px] desktop:top-[176px] lg-desktop:top-[192px] left-1/2 top-[84px] -translate-x-1/2 translate-y-0 items-center text-center"}},defaultVariants:{align:"left"}}),Ve=(0,k.cva)("hero-banner-wrap-text lg-desktop:max-w-[824px] desktop:max-w-[648px] laptop:max-w-[440px] tablet:max-w-[704px] max-w-[358px]",{variants:{align:{left:"laptop:text-left",center:"text-center"}},defaultVariants:{align:"left"}}),Be=(0,k.cva)("hero-banner-button-group lg-desktop:gap-3 flex items-center gap-2",{variants:{align:{left:"laptop:justify-start",center:"justify-center"}},defaultVariants:{align:"left"}}),ze=(0,k.cva)("hero-banner-icon-group flex items-center gap-2",{variants:{align:{left:"justify-start",center:"justify-center"}},defaultVariants:{align:"left"}}),He=({size:t="base"})=>{const{width:o,height:s}=re.sizeMap[t];return(0,e.jsx)("svg",{width:o,height:s,viewBox:"0 0 20 20",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",children:(0,e.jsx)("path",{d:"M13.9599 9.30662C14.4547 9.63647 14.4547 10.3635 13.9599 10.6934L6.29558 15.8029C5.74179 16.1721 5 15.7751 5 15.1096V4.89042C5 4.22484 5.74179 3.82785 6.29558 4.19705L13.9599 9.30662Z",fill:"currentcolor"})})},O=l.default.forwardRef(({data:t,className:o,classNames:s={},onSecondaryClick:N,onPrimaryClick:g,...ne},se)=>{const{locale:E}=(0,oe.useAiuiContext)(),z=a=>!a||!E?a:(0,ae.getLocalizedPath)(a,E),{label:j,title:i,subtitle:p,endDate:U,endDate_tz:ie,dateFormat:pe,pcImage:H,padImage:_,mobileImage:$,pcVideo:ce,padVideo:ue,mobileVideo:G,isShowVideo:de,isVideoLoop:me=!0,primaryButton:u,secondaryButton:r,theme:ge="light",size:T="default",titleSize:I,caption:C=[],blockLink:F,iconArray:fe,align:b="left"}=t,A=(0,D.useMediaQuery)({query:"(max-width: 768px)"}),q=(0,D.useMediaQuery)({query:"(max-width: 1024px)"}),[Y,Q]=(0,l.useState)(!1),{ref:be,inView:Z}=(0,W.useInView)(),P=(0,l.useRef)(null),S=(0,l.useRef)(null),R=(0,l.useRef)(null),x=(0,l.useRef)(null),f=(0,l.useRef)(null);return(0,te.useExposure)(f,{componentType:d,componentName:m,componentTitle:i,componentDescription:p}),(0,l.useImperativeHandle)(se,()=>f.current),(0,l.useEffect)(()=>{v.default.registerPlugin(w.ScrollTrigger);function a(){if(!x.current)return;const L=f.current?.clientHeight||100;window.innerHeight<=L?P.current=w.ScrollTrigger.create({trigger:f.current,start:"top bottom",end:"bottom top",scrub:!0,onUpdate:h=>{const y=h.progress*40-20;v.default.set(x.current,{yPercent:y})}}):(R.current=w.ScrollTrigger.create({trigger:f.current,start:"top bottom",end:"bottom bottom",scrub:!0,onUpdate:h=>{const y=h.progress*20-20;v.default.set(x.current,{yPercent:y})}}),S.current=w.ScrollTrigger.create({trigger:f.current,start:"top top",end:"bottom top",scrub:!0,onUpdate:h=>{const y=h.progress*20;v.default.set(x.current,{yPercent:y})}}))}return Z&&a(),()=>{P.current&&P.current.kill(),R.current&&R.current.kill(),S.current&&S.current.kill()}},[Z]),(0,e.jsx)("div",{...ne,ref:be,"data-ui-component-id":"HeroBanner",children:(0,e.jsxs)("div",{ref:f,className:(0,c.cn)(ge==="dark"?"aiui-dark":"","text-info-primary relative w-full overflow-hidden",{"lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]":T==="default","lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]":T==="sm"},o),children:[F&&(0,e.jsx)("a",{className:"absolute inset-0 z-10",href:(0,B.trackUrlRef)(z(F),`${d}_${m}`),"data-headless-type-name":`${d}#${m}`,"data-headless-title-desc-button":`${i}#${p}`,tabIndex:-1,"aria-hidden":"true","aria-label":i}),(0,e.jsx)("div",{ref:x,className:(0,c.cn)("absolute left-0 top-0 size-full"),children:de?(0,e.jsx)(X.default,{poster:A?$?.url:q?_?.url||$?.url:H?.url,src:A?G?.url:q?ue?.url||G?.url:ce?.url,className:"laptop:w-full h-full",videoClassName:"h-full object-cover",muted:!0,loop:me,playsInline:!0}):(0,e.jsx)(n.Picture,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",loading:"eager",fetchPriority:"high",alt:H?.alt||"",source:`${H?.url||""} , ${_?.url??($?.url||"")} 1024, ${$?.url||""} 767`})}),(0,e.jsxs)("div",{className:$e({align:b}),children:[(0,e.jsxs)("div",{className:Ve({align:b}),children:[j&&(0,e.jsx)(n.Text,{size:2,as:"p",className:(0,c.cn)("hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm"),html:j}),i&&(0,e.jsx)(n.Heading,{as:I==="4"?"h1":"h2",html:i,className:(0,c.cn)("hero-banner-title",s.title),size:I?Number(I||"5"):T==="sm"?4:5}),p&&(0,e.jsx)(n.Text,{as:"p",size:2,className:(0,c.cn)("hero-banner-subtitle font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm"),html:p}),U&&(0,e.jsx)("div",{className:"mt-3",children:(0,e.jsx)(n.Countdown,{endDate:U,endDate_tz:ie,dateFormat:pe,variant:"spacious",align:b})})]}),(0,e.jsxs)("div",{className:Be({align:b}),children:[r?.isShowPlayVideoButton&&r?.playVideoButtonText?(0,e.jsxs)(n.Button,{onClick:()=>Q(!0),size:"lg",variant:"secondary",className:"hero-banner-play-video-button","data-headless-type-name":`${d}#${m}`,"data-headless-title-desc-button":`${i}#${p}#${r?.playVideoButtonText}`,children:[r?.playVideoButtonText," ",(0,e.jsx)(He,{size:"lg"})]}):r?.text?(0,e.jsxs)(n.Button,{"aria-label":i??p,size:"lg",variant:"secondary",className:"hero-banner-secondary-button",as:r?.isCustomSecondaryButton?"button":"a",href:(0,B.trackUrlRef)(z(r?.link),`${d}_${m}`),onClick:a=>r?.isCustomSecondaryButton&&N?.(t,a,r?.customSecondaryEventId),"data-headless-type-name":`${d}#${m}`,"data-headless-title-desc-button":`${i}#${p}#${r?.text}`,children:[r?.text,(0,e.jsx)("span",{className:"sr-only",children:i??p})]}):null,u&&u.text&&(0,e.jsx)(n.Button,{"aria-label":i??p,size:"lg",variant:"primary",className:"hero-banner-primary-button",as:u?.isCustomPrimaryButton?"button":"a",href:(0,B.trackUrlRef)(z(u.link),`${d}_${m}`),onClick:a=>u?.isCustomPrimaryButton&&g?.(t,a,u?.customPrimaryEventId),"data-headless-type-name":`${d}#${m}`,"data-headless-title-desc-button":`${i}#${p}#${u?.text}`,children:u.text})]}),(0,e.jsx)("div",{className:ze({align:b}),children:fe?.map(a=>(0,e.jsx)("div",{className:"h-12",children:(0,e.jsx)(n.Picture,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",loading:"eager",alt:a?.pcImage?.alt||"",source:a?.pcImage?.url})},a?.pcImage?.url||a?.pcImage?.alt))})]}),C.length>0&&(0,e.jsx)("div",{className:(0,c.cn)("hero-banner-caption-group laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]",s.captionGroup),children:C.map((a,L)=>(0,e.jsxs)(l.default.Fragment,{children:[(0,e.jsx)(n.Text,{size:2,className:(0,c.cn)("hero-banner-product-text tablet:w-[108px] loptop:w-[150px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]"),html:a.title}),L<C.length-1&&(0,e.jsx)("div",{className:(0,c.cn)("bg-info-primary w-px")})]},a.title))}),Y&&(0,e.jsx)(le.VideoModal,{visible:Y,videoUrl:r?.isYoutubeVideo?void 0:r?.videoUrl?.url,youTubeId:r?.isYoutubeVideo?r?.youtubeId:void 0,onCloseModal:()=>Q(!1)})]})})});O.displayName="HeroBanner";var Te=(0,ee.withLayout)(O);
1
+ "use strict";"use client";var $e=Object.create;var T=Object.defineProperty;var Be=Object.getOwnPropertyDescriptor;var Ve=Object.getOwnPropertyNames;var He=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty;var ze=(t,o)=>{for(var i in o)T(t,i,{get:o[i],enumerable:!0})},ee=(t,o,i,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let d of Ve(o))!Te.call(t,d)&&d!==i&&T(t,d,{get:()=>o[d],enumerable:!(x=Be(o,d))||x.enumerable});return t};var N=(t,o,i)=>(i=t!=null?$e(He(t)):{},ee(o||!t||!t.__esModule?T(i,"default",{value:t,enumerable:!0}):i,t)),Ce=t=>ee(T({},"__esModule",{value:!0}),t);var De={};ze(De,{default:()=>Me});module.exports=Ce(De);var e=require("react/jsx-runtime"),s=N(require("react")),$=N(require("gsap")),B=require("gsap/dist/ScrollTrigger"),D=N(require("jump.js")),E=require("react-responsive"),ae=require("react-intersection-observer"),re=N(require("../../helpers/ScrollLoadVideo.js")),l=require("../../components/index.js"),m=require("../../helpers/index.js"),V=require("class-variance-authority"),oe=require("../../shared/Styles.js"),ne=require("../../hooks/useExposure.js"),z=require("../../shared/trackUrlRef.js"),se=require("../../helpers/utils.js"),le=require("../AiuiProvider/index.js"),ie=require("../../components/button.js"),pe=require("../VideoModal/index.js"),ue=N(require("./HeroBannerCarousel.js"));const f="image",g="hero_banner",Ie=(0,V.cva)("hero-banner-content lg-desktop:gap-[32px] absolute top-24 z-10 flex w-full flex-col gap-[24px]",{variants:{align:{left:"tablet:px-[32px] laptop:top-1/2 laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] laptop:-translate-y-1/2 left-0 px-[16px]",center:"tablet:top-[84px] laptop:top-[76px] desktop:top-[176px] lg-desktop:top-[192px] left-1/2 top-[84px] -translate-x-1/2 translate-y-0 items-center text-center"}},defaultVariants:{align:"left"}}),Le=(0,V.cva)("hero-banner-wrap-text lg-desktop:max-w-[824px] desktop:max-w-[648px] laptop:max-w-[440px] tablet:max-w-[704px] max-w-[358px]",{variants:{align:{left:"laptop:text-left",center:"text-center"}},defaultVariants:{align:"left"}}),Pe=(0,V.cva)("hero-banner-button-group lg-desktop:gap-3 flex items-center gap-2",{variants:{align:{left:"laptop:justify-start",center:"justify-center"}},defaultVariants:{align:"left"}}),Se=(0,V.cva)("hero-banner-icon-group flex items-center gap-2",{variants:{align:{left:"justify-start",center:"justify-center"}},defaultVariants:{align:"left"}}),Re=({size:t="base"})=>{const{width:o,height:i}=ie.sizeMap[t];return(0,e.jsx)("svg",{width:o,height:i,viewBox:"0 0 20 20",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",children:(0,e.jsx)("path",{d:"M13.9599 9.30662C14.4547 9.63647 14.4547 10.3635 13.9599 10.6934L6.29558 15.8029C5.74179 16.1721 5 15.7751 5 15.1096V4.89042C5 4.22484 5.74179 3.82785 6.29558 4.19705L13.9599 9.30662Z",fill:"currentcolor"})})},te=s.default.forwardRef(({data:t,className:o,classNames:i={},onSecondaryClick:x,onPrimaryClick:d,jumpOptions:ce={},...j},O)=>{const{locale:U}=(0,le.useAiuiContext)(),J={...{duration:500,offset:0},...ce},C=a=>!a||!U?a:(0,se.getLocalizedPath)(a,U),{label:_,title:p,subtitle:n,endDate:G,endDate_tz:me,dateFormat:de,pcImage:h,padImage:q,mobileImage:H,pcVideo:fe,padVideo:ge,mobileVideo:F,isShowVideo:be,isVideoLoop:xe=!0,primaryButton:u,secondaryButton:r,theme:he="light",size:I="default",titleSize:L,caption:P=[],blockLink:A,iconArray:ve,align:v="left"}=t,W=(0,E.useMediaQuery)({query:"(max-width: 768px)"}),Y=(0,E.useMediaQuery)({query:"(max-width: 1024px)"}),[Q,Z]=(0,s.useState)(!1),{ref:ye,inView:K}=(0,ae.useInView)(),S=(0,s.useRef)(null),R=(0,s.useRef)(null),M=(0,s.useRef)(null),y=(0,s.useRef)(null),b=(0,s.useRef)(null),ke=p?.trim()||n?.trim()||h?.alt?.trim()||void 0,we=p!==void 0?p?.trim()||n?.trim()||h?.alt?.trim()||void 0:n&&n.trim()||"",Ne=n&&n.trim()||"";return(0,ne.useExposure)(b,{componentType:f,componentName:g,componentTitle:we,componentDescription:Ne}),(0,s.useImperativeHandle)(O,()=>b.current),(0,s.useEffect)(()=>{if(t.items&&t.items.length>0)return;$.default.registerPlugin(B.ScrollTrigger);function a(){if(!y.current)return;const c=b.current?.clientHeight||100;window.innerHeight<=c?S.current=B.ScrollTrigger.create({trigger:b.current,start:"top bottom",end:"bottom top",scrub:!0,onUpdate:k=>{const w=k.progress*40-20;$.default.set(y.current,{yPercent:w})}}):(M.current=B.ScrollTrigger.create({trigger:b.current,start:"top bottom",end:"bottom bottom",scrub:!0,onUpdate:k=>{const w=k.progress*20-20;$.default.set(y.current,{yPercent:w})}}),R.current=B.ScrollTrigger.create({trigger:b.current,start:"top top",end:"bottom top",scrub:!0,onUpdate:k=>{const w=k.progress*20;$.default.set(y.current,{yPercent:w})}}))}return K&&a(),()=>{S.current&&S.current.kill(),M.current&&M.current.kill(),R.current&&R.current.kill()}},[K,t.items]),t.items&&t.items.length>0?(0,e.jsx)(ue.default,{data:t,className:o,classNames:i,onPrimaryClick:d,onSecondaryClick:x,ref:O,...j}):(0,e.jsx)("div",{...j,ref:ye,"data-ui-component-id":"HeroBanner",children:(0,e.jsxs)("div",{ref:b,className:(0,m.cn)(he==="dark"?"aiui-dark":"","text-info-primary relative w-full overflow-hidden",{"lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]":I==="default","lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]":I==="sm"},o),children:[A&&(0,e.jsx)("a",{className:"absolute inset-0 z-10",href:(0,z.trackUrlRef)(C(A),`${f}_${g}`),"data-headless-type-name":`${f}#${g}`,"data-headless-title-desc-button":`${p}#${n}`,tabIndex:-1,"aria-hidden":"true","aria-label":ke}),(0,e.jsx)("div",{ref:y,className:(0,m.cn)("absolute left-0 top-0 size-full"),children:be?(0,e.jsx)(re.default,{poster:W?H?.url:Y?q?.url||H?.url:h?.url,src:W?F?.url:Y?ge?.url||F?.url:fe?.url,className:"laptop:w-full h-full",videoClassName:"h-full object-cover",muted:!0,loop:xe,playsInline:!0}):(0,e.jsx)(l.Picture,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",loading:"eager",fetchPriority:"high",alt:h?.alt||"",source:`${h?.url||""} , ${q?.url??(H?.url||"")} 1024, ${H?.url||""} 767`})}),(0,e.jsxs)("div",{className:Ie({align:v}),children:[(0,e.jsxs)("div",{className:Le({align:v}),children:[_&&(0,e.jsx)(l.Text,{size:2,as:"p",className:(0,m.cn)("hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm"),html:_}),p&&(0,e.jsx)(l.Heading,{as:L==="4"?"h1":"h2",html:p,className:(0,m.cn)("hero-banner-title",i.title),size:L?Number(L||"5"):I==="sm"?4:5}),n&&(0,e.jsx)(l.Text,{as:"p",size:2,className:(0,m.cn)("hero-banner-subtitle font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm"),html:n}),G&&(0,e.jsx)("div",{className:"mt-3",children:(0,e.jsx)(l.Countdown,{endDate:G,endDate_tz:me,dateFormat:de,variant:"spacious",align:v})})]}),(0,e.jsxs)("div",{className:Pe({align:v}),children:[r?.isShowPlayVideoButton&&r?.playVideoButtonText?(0,e.jsxs)(l.Button,{onClick:()=>Z(!0),size:"lg",variant:"secondary",className:"hero-banner-play-video-button","data-headless-type-name":`${f}#${g}`,"data-headless-title-desc-button":`${p}#${n}#${r?.playVideoButtonText}`,children:[r?.playVideoButtonText," ",(0,e.jsx)(Re,{size:"lg"})]}):r?.text?(0,e.jsxs)(l.Button,{"aria-label":p??n,size:"lg",variant:"secondary",className:"hero-banner-secondary-button",as:r?.isCustomSecondaryButton?"button":"a",href:(0,z.trackUrlRef)(C(r?.link),`${f}_${g}`),onClick:a=>{if(r.link?.startsWith("#")){a.preventDefault();const c=document.querySelector(r.link);c&&(0,D.default)(c,J)}r?.isCustomSecondaryButton&&x?.(t,a,r?.customSecondaryEventId)},"data-headless-type-name":`${f}#${g}`,"data-headless-title-desc-button":`${p}#${n}#${r?.text}`,children:[r?.text,(0,e.jsx)("span",{className:"sr-only",children:p??n})]}):null,u&&u.text&&(0,e.jsx)(l.Button,{"aria-label":p??n,size:"lg",variant:"primary",className:"hero-banner-primary-button",as:u?.isCustomPrimaryButton?"button":"a",href:(0,z.trackUrlRef)(C(u.link),`${f}_${g}`),onClick:a=>{if(u.link?.startsWith("#")){a.preventDefault();const c=document.querySelector(u.link);c&&(0,D.default)(c,J)}u?.isCustomPrimaryButton&&d?.(t,a,u?.customPrimaryEventId)},"data-headless-type-name":`${f}#${g}`,"data-headless-title-desc-button":`${p}#${n}#${u?.text}`,children:u.text})]}),(0,e.jsx)("div",{className:Se({align:v}),children:ve?.map(a=>(0,e.jsx)("div",{className:"h-12",children:(0,e.jsx)(l.Picture,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",loading:"eager",alt:a?.pcImage?.alt||"",source:a?.pcImage?.url})},a?.pcImage?.url||a?.pcImage?.alt))})]}),P.length>0&&(0,e.jsx)("div",{className:(0,m.cn)("hero-banner-caption-group laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]",i.captionGroup),children:P.map((a,c)=>(0,e.jsxs)(s.default.Fragment,{children:[(0,e.jsx)(l.Text,{size:2,className:(0,m.cn)("hero-banner-product-text tablet:w-[108px] loptop:w-[150px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]"),html:a.title}),c<P.length-1&&(0,e.jsx)("div",{className:(0,m.cn)("bg-info-primary w-px")})]},a.title))}),Q&&(0,e.jsx)(pe.VideoModal,{visible:Q,videoUrl:r?.isYoutubeVideo?void 0:r?.videoUrl?.url,youTubeId:r?.isYoutubeVideo?r?.youtubeId:void 0,onCloseModal:()=>Z(!1)})]})})});te.displayName="HeroBanner";var Me=(0,oe.withLayout)(te);
2
2
  //# sourceMappingURL=HeroBanner.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/HeroBanner/HeroBanner.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef, useState, useEffect } from 'react'\nimport gsap from 'gsap'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport type { HeroBannerProps } from './types.js'\nimport { useMediaQuery } from 'react-responsive'\nimport { useInView } from 'react-intersection-observer'\nimport ScrollLoadVideo from '../../helpers/ScrollLoadVideo.js'\nimport { Button, Heading, Picture, Text, Countdown } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport { cva } from 'class-variance-authority'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { getLocalizedPath } from '../../helpers/utils.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport { sizeMap } from '../../components/button.js'\nimport { VideoModal } from '../VideoModal/index.js'\n\nconst componentType = 'image'\nconst componentName = 'hero_banner'\n\n// CVA variants for align\nconst contentVariants = cva(\n 'hero-banner-content lg-desktop:gap-[32px] absolute top-24 z-10 flex w-full flex-col gap-[24px]',\n {\n variants: {\n align: {\n left: 'tablet:px-[32px] laptop:top-1/2 laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] laptop:-translate-y-1/2 left-0 px-[16px]',\n center:\n 'tablet:top-[84px] laptop:top-[76px] desktop:top-[176px] lg-desktop:top-[192px] left-1/2 top-[84px] -translate-x-1/2 translate-y-0 items-center text-center',\n },\n },\n defaultVariants: {\n align: 'left',\n },\n }\n)\n\nconst textVariants = cva(\n 'hero-banner-wrap-text lg-desktop:max-w-[824px] desktop:max-w-[648px] laptop:max-w-[440px] tablet:max-w-[704px] max-w-[358px]',\n {\n variants: {\n align: {\n left: 'laptop:text-left',\n center: 'text-center',\n },\n },\n defaultVariants: {\n align: 'left',\n },\n }\n)\n\nconst buttonGroupVariants = cva('hero-banner-button-group lg-desktop:gap-3 flex items-center gap-2', {\n variants: {\n align: {\n left: 'laptop:justify-start',\n center: 'justify-center',\n },\n },\n defaultVariants: {\n align: 'left',\n },\n})\n\nconst iconGroupVariants = cva('hero-banner-icon-group flex items-center gap-2', {\n variants: {\n align: {\n left: 'justify-start',\n center: 'justify-center',\n },\n },\n defaultVariants: {\n align: 'left',\n },\n})\n\nexport type HeroBannerSemanticName =\n | 'root'\n | 'title'\n | 'subtitle'\n | 'buttonGroup'\n | 'primaryButton'\n | 'secondaryButton'\n | 'captionGroup'\n\nconst PlayButtonAppendIcon = ({ size = 'base' }: { size: 'base' | 'lg' | 'sm' }) => {\n const { width, height } = sizeMap[size]\n return (\n <svg width={width} height={height} viewBox=\"0 0 20 20\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M13.9599 9.30662C14.4547 9.63647 14.4547 10.3635 13.9599 10.6934L6.29558 15.8029C5.74179 16.1721 5 15.7751 5 15.1096V4.89042C5 4.22484 5.74179 3.82785 6.29558 4.19705L13.9599 9.30662Z\"\n fill=\"currentcolor\"\n />\n </svg>\n )\n}\n\nconst HeroBanner = React.forwardRef<\n HTMLDivElement,\n HeroBannerProps & {\n classNames?: Partial<Record<HeroBannerSemanticName, string>>\n }\n>(({ data, className, classNames = {}, onSecondaryClick, onPrimaryClick, ...rest }, ref) => {\n const { locale } = useAiuiContext()\n\n // \u5305\u88C5\u94FE\u63A5\uFF0C\u81EA\u52A8\u6DFB\u52A0 locale \u524D\u7F00\n const localizeUrl = (url?: string) => {\n if (!url || !locale) return url\n return getLocalizedPath(url, locale)\n }\n\n const {\n label,\n title,\n subtitle,\n endDate,\n endDate_tz,\n dateFormat,\n pcImage,\n padImage,\n mobileImage,\n pcVideo,\n padVideo,\n mobileVideo,\n isShowVideo,\n isVideoLoop = true,\n primaryButton,\n secondaryButton,\n theme = 'light',\n size = 'default',\n titleSize,\n caption = [],\n blockLink,\n iconArray,\n align = 'left',\n } = data\n\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n const isPad = useMediaQuery({ query: '(max-width: 1024px)' })\n const [visible, setVisible] = useState<boolean>(false)\n const { ref: inViewRef, inView } = useInView()\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n const bgTriggerRef = useRef<ScrollTrigger | null>(null)\n const boxTriggerRef = useRef<ScrollTrigger | null>(null)\n\n const bgRef = useRef<HTMLImageElement>(null)\n const boxRef = useRef<HTMLDivElement>(null)\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: title,\n componentDescription: subtitle,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n useEffect(() => {\n gsap.registerPlugin(ScrollTrigger)\n function gsapResize() {\n if (!bgRef.current) return\n const clientHeight = boxRef.current?.clientHeight || 100\n const screenHeight = window.innerHeight\n\n if (screenHeight <= clientHeight) {\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top bottom',\n end: 'bottom top',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 40\n const value = self.progress * base - base / 2\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n } else {\n boxTriggerRef.current = ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top bottom',\n end: 'bottom bottom',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 20\n const value = self.progress * base - base\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n bgTriggerRef.current = ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top top',\n end: 'bottom top',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 20\n const value = self.progress * base\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n }\n }\n if (inView) gsapResize()\n return () => {\n // ScrollTrigger.getAll().forEach((t: any) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n boxTriggerRef.current && boxTriggerRef.current.kill()\n bgTriggerRef.current && bgTriggerRef.current.kill()\n }\n }, [inView])\n\n return (\n <div {...rest} ref={inViewRef} data-ui-component-id=\"HeroBanner\">\n <div\n ref={boxRef}\n className={cn(\n theme === 'dark' ? 'aiui-dark' : '',\n 'text-info-primary relative w-full overflow-hidden',\n {\n 'lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]':\n size === 'default',\n 'lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]':\n size === 'sm',\n },\n className\n )}\n >\n {blockLink && (\n <a\n className=\"absolute inset-0 z-10\"\n href={trackUrlRef(localizeUrl(blockLink), `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}`}\n tabIndex={-1}\n aria-hidden=\"true\"\n aria-label={title}\n ></a>\n )}\n <div ref={bgRef} className={cn('absolute left-0 top-0 size-full')}>\n {isShowVideo ? (\n <ScrollLoadVideo\n poster={isMobile ? mobileImage?.url : isPad ? padImage?.url || mobileImage?.url : pcImage?.url}\n src={\n isMobile\n ? (mobileVideo?.url as string)\n : isPad\n ? (padVideo?.url as string) || (mobileVideo?.url as string)\n : (pcVideo?.url as string)\n }\n className=\"laptop:w-full h-full\"\n videoClassName=\"h-full object-cover\"\n muted\n loop={isVideoLoop}\n playsInline\n />\n ) : (\n <Picture\n className=\"laptop:w-full h-full\"\n imgClassName=\"h-full object-cover\"\n loading=\"eager\"\n fetchPriority=\"high\"\n alt={pcImage?.alt || ''}\n source={`${pcImage?.url || ''} , ${padImage?.url ?? (mobileImage?.url || '')} 1024, ${mobileImage?.url || ''} 767`}\n />\n )}\n </div>\n\n {/* \u5185\u5BB9\u533A\u57DF */}\n <div className={contentVariants({ align })}>\n <div className={textVariants({ align })}>\n {label && (\n <Text\n size={2}\n as=\"p\"\n className={cn('hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm')}\n html={label}\n />\n )}\n {title && (\n <Heading\n as={titleSize === '4' ? 'h1' : 'h2'}\n html={title}\n className={cn('hero-banner-title', classNames.title)}\n size={titleSize ? (Number(titleSize || '5') as any) : size === 'sm' ? 4 : 5}\n />\n )}\n {subtitle && (\n <Text\n as=\"p\"\n size={2}\n className={cn(\n 'hero-banner-subtitle font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm'\n )}\n html={subtitle}\n />\n )}\n {endDate && (\n <div className=\"mt-3\">\n <Countdown\n endDate={endDate}\n endDate_tz={endDate_tz}\n dateFormat={dateFormat}\n variant=\"spacious\"\n align={align}\n />\n </div>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div className={buttonGroupVariants({ align })}>\n {secondaryButton?.isShowPlayVideoButton && secondaryButton?.playVideoButtonText ? (\n <Button\n onClick={() => setVisible(true)}\n size=\"lg\"\n variant=\"secondary\"\n className=\"hero-banner-play-video-button\"\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}#${secondaryButton?.playVideoButtonText}`}\n >\n {secondaryButton?.playVideoButtonText} <PlayButtonAppendIcon size=\"lg\" />\n </Button>\n ) : secondaryButton?.text ? (\n <Button\n aria-label={title ?? subtitle}\n size=\"lg\"\n variant=\"secondary\"\n className=\"hero-banner-secondary-button\"\n as={secondaryButton?.isCustomSecondaryButton ? 'button' : 'a'}\n href={trackUrlRef(localizeUrl(secondaryButton?.link), `${componentType}_${componentName}`)}\n onClick={e =>\n secondaryButton?.isCustomSecondaryButton &&\n onSecondaryClick?.(data, e, secondaryButton?.customSecondaryEventId)\n }\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}#${secondaryButton?.text}`}\n >\n {secondaryButton?.text}\n <span className=\"sr-only\">{title ?? subtitle}</span>\n </Button>\n ) : null}\n {primaryButton && primaryButton.text && (\n <Button\n aria-label={title ?? subtitle}\n size=\"lg\"\n variant=\"primary\"\n className=\"hero-banner-primary-button\"\n as={primaryButton?.isCustomPrimaryButton ? 'button' : 'a'}\n href={trackUrlRef(localizeUrl(primaryButton.link), `${componentType}_${componentName}`)}\n onClick={e =>\n primaryButton?.isCustomPrimaryButton && onPrimaryClick?.(data, e, primaryButton?.customPrimaryEventId)\n }\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}#${primaryButton?.text}`}\n >\n {primaryButton.text}\n </Button>\n )}\n </div>\n <div className={iconGroupVariants({ align })}>\n {iconArray?.map(icon => (\n <div key={icon?.pcImage?.url || icon?.pcImage?.alt} className=\"h-12\">\n <Picture\n className=\"laptop:w-full h-full\"\n imgClassName=\"h-full object-cover\"\n loading=\"eager\"\n alt={icon?.pcImage?.alt || ''}\n source={icon?.pcImage?.url}\n />\n </div>\n ))}\n </div>\n </div>\n\n {/* \u5E95\u90E8\u4EA7\u54C1\u5217\u8868 */}\n {caption.length > 0 && (\n <div\n className={cn(\n 'hero-banner-caption-group laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]',\n classNames.captionGroup\n )}\n >\n {caption.map((c, index) => (\n <React.Fragment key={c.title}>\n <Text\n size={2}\n className={cn(\n 'hero-banner-product-text tablet:w-[108px] loptop:w-[150px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]'\n )}\n html={c.title}\n />\n {index < caption.length - 1 && <div className={cn('bg-info-primary w-px')} />}\n </React.Fragment>\n ))}\n </div>\n )}\n\n {/* \u89C6\u9891\u5F39\u7A97 */}\n {visible && (\n <VideoModal\n visible={visible}\n videoUrl={secondaryButton?.isYoutubeVideo ? undefined : secondaryButton?.videoUrl?.url}\n youTubeId={secondaryButton?.isYoutubeVideo ? secondaryButton?.youtubeId : undefined}\n onCloseModal={() => setVisible(false)}\n />\n )}\n </div>\n </div>\n )\n})\n\nHeroBanner.displayName = 'HeroBanner'\n\nexport default withLayout(HeroBanner)\n"],
5
- "mappings": "mlBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,KAAA,e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AM,SAAS,IACzB,GAPQA,GAAM,SAAS,KAAOA,GAAM,SAAS,GAQ/C,CACD,EACH,GACF,EAGCtB,EAAQ,OAAS,MAChB,OAAC,OACC,aAAW,MACT,iMACA1B,EAAW,YACb,EAEC,SAAA0B,EAAQ,IAAI,CAACuB,EAAGC,OACf,QAAC,EAAArD,QAAM,SAAN,CACC,oBAAC,QACC,KAAM,EACN,aAAW,MACT,yIACF,EACA,KAAMoD,EAAE,MACV,EACCC,EAAQxB,EAAQ,OAAS,MAAK,OAAC,OAAI,aAAW,MAAG,sBAAsB,EAAG,IARxDuB,EAAE,KASvB,CACD,EACH,EAIDjB,MACC,OAAC,eACC,QAASA,EACT,SAAUT,GAAiB,eAAiB,OAAYA,GAAiB,UAAU,IACnF,UAAWA,GAAiB,eAAiBA,GAAiB,UAAY,OAC1E,aAAc,IAAMU,EAAW,EAAK,EACtC,GAEJ,EACF,CAEJ,CAAC,EAEDrC,EAAW,YAAc,aAEzB,IAAO7B,MAAQ,eAAW6B,CAAU",
6
- "names": ["HeroBanner_exports", "__export", "HeroBanner_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_gsap", "import_ScrollTrigger", "import_react_responsive", "import_react_intersection_observer", "import_ScrollLoadVideo", "import_components", "import_helpers", "import_class_variance_authority", "import_Styles", "import_useExposure", "import_trackUrlRef", "import_utils", "import_AiuiProvider", "import_button", "import_VideoModal", "componentType", "componentName", "contentVariants", "textVariants", "buttonGroupVariants", "iconGroupVariants", "PlayButtonAppendIcon", "size", "width", "height", "HeroBanner", "React", "data", "className", "classNames", "onSecondaryClick", "onPrimaryClick", "rest", "ref", "locale", "localizeUrl", "url", "label", "title", "subtitle", "endDate", "endDate_tz", "dateFormat", "pcImage", "padImage", "mobileImage", "pcVideo", "padVideo", "mobileVideo", "isShowVideo", "isVideoLoop", "primaryButton", "secondaryButton", "theme", "titleSize", "caption", "blockLink", "iconArray", "align", "isMobile", "isPad", "visible", "setVisible", "inViewRef", "inView", "scrollTriggerRef", "bgTriggerRef", "boxTriggerRef", "bgRef", "boxRef", "gsap", "gsapResize", "clientHeight", "self", "value", "ScrollLoadVideo", "e", "icon", "c", "index"]
4
+ "sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef, useState, useEffect } from 'react'\nimport gsap from 'gsap'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport jump from 'jump.js'\nimport type { HeroBannerProps } from './types.js'\nimport { useMediaQuery } from 'react-responsive'\nimport { useInView } from 'react-intersection-observer'\nimport ScrollLoadVideo from '../../helpers/ScrollLoadVideo.js'\nimport { Button, Heading, Picture, Text, Countdown } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport { cva } from 'class-variance-authority'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { getLocalizedPath } from '../../helpers/utils.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport { sizeMap } from '../../components/button.js'\nimport { VideoModal } from '../VideoModal/index.js'\n// Task 18: import carousel implementation for early-return delegation (DECISION-A002)\nimport HeroBannerCarousel from './HeroBannerCarousel.js'\n\n/**\n * jump.js \u914D\u7F6E\u9009\u9879\n */\nexport interface JumpOptions {\n /** \u52A8\u753B\u6301\u7EED\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09 @default 500 */\n duration?: number\n /** \u504F\u79FB\u91CF\uFF08\u50CF\u7D20\uFF09 @default 0 */\n offset?: number\n /** \u52A8\u753B\u5B8C\u6210\u56DE\u8C03 */\n callback?: () => void\n /** \u7F13\u52A8\u51FD\u6570 */\n easing?: (t: number, b: number, c: number, d: number) => number\n /** \u662F\u5426\u8003\u8651 a11y @default false */\n a11y?: boolean\n}\n\nconst componentType = 'image'\nconst componentName = 'hero_banner'\n\n// CVA variants for align\nconst contentVariants = cva(\n 'hero-banner-content lg-desktop:gap-[32px] absolute top-24 z-10 flex w-full flex-col gap-[24px]',\n {\n variants: {\n align: {\n left: 'tablet:px-[32px] laptop:top-1/2 laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] laptop:-translate-y-1/2 left-0 px-[16px]',\n center:\n 'tablet:top-[84px] laptop:top-[76px] desktop:top-[176px] lg-desktop:top-[192px] left-1/2 top-[84px] -translate-x-1/2 translate-y-0 items-center text-center',\n },\n },\n defaultVariants: {\n align: 'left',\n },\n }\n)\n\nconst textVariants = cva(\n 'hero-banner-wrap-text lg-desktop:max-w-[824px] desktop:max-w-[648px] laptop:max-w-[440px] tablet:max-w-[704px] max-w-[358px]',\n {\n variants: {\n align: {\n left: 'laptop:text-left',\n center: 'text-center',\n },\n },\n defaultVariants: {\n align: 'left',\n },\n }\n)\n\nconst buttonGroupVariants = cva('hero-banner-button-group lg-desktop:gap-3 flex items-center gap-2', {\n variants: {\n align: {\n left: 'laptop:justify-start',\n center: 'justify-center',\n },\n },\n defaultVariants: {\n align: 'left',\n },\n})\n\nconst iconGroupVariants = cva('hero-banner-icon-group flex items-center gap-2', {\n variants: {\n align: {\n left: 'justify-start',\n center: 'justify-center',\n },\n },\n defaultVariants: {\n align: 'left',\n },\n})\n\nexport type HeroBannerSemanticName =\n | 'root'\n | 'title'\n | 'subtitle'\n | 'buttonGroup'\n | 'primaryButton'\n | 'secondaryButton'\n | 'captionGroup'\n\nconst PlayButtonAppendIcon = ({ size = 'base' }: { size: 'base' | 'lg' | 'sm' }) => {\n const { width, height } = sizeMap[size]\n return (\n <svg width={width} height={height} viewBox=\"0 0 20 20\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M13.9599 9.30662C14.4547 9.63647 14.4547 10.3635 13.9599 10.6934L6.29558 15.8029C5.74179 16.1721 5 15.7751 5 15.1096V4.89042C5 4.22484 5.74179 3.82785 6.29558 4.19705L13.9599 9.30662Z\"\n fill=\"currentcolor\"\n />\n </svg>\n )\n}\n\nconst HeroBanner = React.forwardRef<\n HTMLDivElement,\n HeroBannerProps & {\n classNames?: Partial<Record<HeroBannerSemanticName, string>>\n /**\n * \u951A\u70B9\u8DF3\u8F6C\u914D\u7F6E\uFF08\u7528\u4E8E # \u5F00\u5934\u7684\u94FE\u63A5\uFF09\n * @default { duration: 500, offset: 0 }\n */\n jumpOptions?: JumpOptions\n }\n>(({ data, className, classNames = {}, onSecondaryClick, onPrimaryClick, jumpOptions = {}, ...rest }, ref) => {\n const { locale } = useAiuiContext()\n\n // \u9ED8\u8BA4 jump \u914D\u7F6E\n const defaultJumpOptions: JumpOptions = { duration: 500, offset: 0 }\n const mergedJumpOptions = { ...defaultJumpOptions, ...jumpOptions }\n\n // \u5305\u88C5\u94FE\u63A5\uFF0C\u81EA\u52A8\u6DFB\u52A0 locale \u524D\u7F00\n const localizeUrl = (url?: string) => {\n if (!url || !locale) return url\n return getLocalizedPath(url, locale)\n }\n\n const {\n label,\n title,\n subtitle,\n endDate,\n endDate_tz,\n dateFormat,\n pcImage,\n padImage,\n mobileImage,\n pcVideo,\n padVideo,\n mobileVideo,\n isShowVideo,\n isVideoLoop = true,\n primaryButton,\n secondaryButton,\n theme = 'light',\n size = 'default',\n titleSize,\n caption = [],\n blockLink,\n iconArray,\n align = 'left',\n } = data\n\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n const isPad = useMediaQuery({ query: '(max-width: 1024px)' })\n const [visible, setVisible] = useState<boolean>(false)\n const { ref: inViewRef, inView } = useInView()\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n const bgTriggerRef = useRef<ScrollTrigger | null>(null)\n const boxTriggerRef = useRef<ScrollTrigger | null>(null)\n\n const bgRef = useRef<HTMLImageElement>(null)\n const boxRef = useRef<HTMLDivElement>(null)\n\n // Task 7: Compute accessibility / tracking fallback values (Rule 2/3/4 \u2014 DECISION-T3)\n // blockLink aria-label: title \u2192 subtitle \u2192 pcImage.alt \u2192 undefined (absent attr)\n const blockLinkLabel = title?.trim() || subtitle?.trim() || pcImage?.alt?.trim() || undefined\n // componentTitle: title=undefined \u2192 coerce '' via subtitle only (no pcImage.alt for undefined title);\n // title='' (intentional) \u2192 cascade: subtitle \u2192 pcImage.alt \u2192 undefined\n const resolvedComponentTitle =\n title !== undefined\n ? title?.trim() || subtitle?.trim() || pcImage?.alt?.trim() || undefined\n : (subtitle && subtitle.trim()) || ''\n // componentDescription: subtitle with undefined guard\n const resolvedComponentDescription = (subtitle && subtitle.trim()) || ''\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: resolvedComponentTitle,\n componentDescription: resolvedComponentDescription,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n useEffect(() => {\n // Task 18: GSAP bypass \u2014 skip ALL GSAP setup in carousel mode (DECISION-A002/DECISION-009)\n if (data.items && data.items.length > 0) return\n gsap.registerPlugin(ScrollTrigger)\n function gsapResize() {\n if (!bgRef.current) return\n const clientHeight = boxRef.current?.clientHeight || 100\n const screenHeight = window.innerHeight\n\n if (screenHeight <= clientHeight) {\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top bottom',\n end: 'bottom top',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 40\n const value = self.progress * base - base / 2\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n } else {\n boxTriggerRef.current = ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top bottom',\n end: 'bottom bottom',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 20\n const value = self.progress * base - base\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n bgTriggerRef.current = ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top top',\n end: 'bottom top',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 20\n const value = self.progress * base\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n }\n }\n if (inView) gsapResize()\n return () => {\n // ScrollTrigger.getAll().forEach((t: any) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n boxTriggerRef.current && boxTriggerRef.current.kill()\n bgTriggerRef.current && bgTriggerRef.current.kill()\n }\n }, [inView, data.items])\n\n // Task 18: Carousel mode early return (DECISION-A002 / DECISION-011)\n // All hooks above have already run. Delegate entirely to HeroBannerCarousel\n // when data.items is non-empty; GSAP was already bypassed in the useEffect above.\n if (data.items && data.items.length > 0) {\n return (\n <HeroBannerCarousel\n data={data}\n className={className}\n classNames={classNames}\n onPrimaryClick={onPrimaryClick}\n onSecondaryClick={onSecondaryClick}\n ref={ref as React.Ref<HTMLDivElement>}\n {...rest}\n />\n )\n }\n return (\n <div {...rest} ref={inViewRef} data-ui-component-id=\"HeroBanner\">\n <div\n ref={boxRef}\n className={cn(\n theme === 'dark' ? 'aiui-dark' : '',\n 'text-info-primary relative w-full overflow-hidden',\n {\n 'lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]':\n size === 'default',\n 'lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]':\n size === 'sm',\n },\n className\n )}\n >\n {blockLink && (\n <a\n className=\"absolute inset-0 z-10\"\n href={trackUrlRef(localizeUrl(blockLink), `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}`}\n tabIndex={-1}\n aria-hidden=\"true\"\n aria-label={blockLinkLabel}\n ></a>\n )}\n <div ref={bgRef} className={cn('absolute left-0 top-0 size-full')}>\n {isShowVideo ? (\n <ScrollLoadVideo\n poster={isMobile ? mobileImage?.url : isPad ? padImage?.url || mobileImage?.url : pcImage?.url}\n src={\n isMobile\n ? (mobileVideo?.url as string)\n : isPad\n ? (padVideo?.url as string) || (mobileVideo?.url as string)\n : (pcVideo?.url as string)\n }\n className=\"laptop:w-full h-full\"\n videoClassName=\"h-full object-cover\"\n muted\n loop={isVideoLoop}\n playsInline\n />\n ) : (\n <Picture\n className=\"laptop:w-full h-full\"\n imgClassName=\"h-full object-cover\"\n loading=\"eager\"\n fetchPriority=\"high\"\n alt={pcImage?.alt || ''}\n source={`${pcImage?.url || ''} , ${padImage?.url ?? (mobileImage?.url || '')} 1024, ${mobileImage?.url || ''} 767`}\n />\n )}\n </div>\n\n {/* \u5185\u5BB9\u533A\u57DF */}\n <div className={contentVariants({ align })}>\n <div className={textVariants({ align })}>\n {label && (\n <Text\n size={2}\n as=\"p\"\n className={cn('hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm')}\n html={label}\n />\n )}\n {title && (\n <Heading\n as={titleSize === '4' ? 'h1' : 'h2'}\n html={title}\n className={cn('hero-banner-title', classNames.title)}\n size={titleSize ? (Number(titleSize || '5') as any) : size === 'sm' ? 4 : 5}\n />\n )}\n {subtitle && (\n <Text\n as=\"p\"\n size={2}\n className={cn(\n 'hero-banner-subtitle font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm'\n )}\n html={subtitle}\n />\n )}\n {endDate && (\n <div className=\"mt-3\">\n <Countdown\n endDate={endDate}\n endDate_tz={endDate_tz}\n dateFormat={dateFormat}\n variant=\"spacious\"\n align={align}\n />\n </div>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div className={buttonGroupVariants({ align })}>\n {secondaryButton?.isShowPlayVideoButton && secondaryButton?.playVideoButtonText ? (\n <Button\n onClick={() => setVisible(true)}\n size=\"lg\"\n variant=\"secondary\"\n className=\"hero-banner-play-video-button\"\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}#${secondaryButton?.playVideoButtonText}`}\n >\n {secondaryButton?.playVideoButtonText} <PlayButtonAppendIcon size=\"lg\" />\n </Button>\n ) : secondaryButton?.text ? (\n <Button\n aria-label={title ?? subtitle}\n size=\"lg\"\n variant=\"secondary\"\n className=\"hero-banner-secondary-button\"\n as={secondaryButton?.isCustomSecondaryButton ? 'button' : 'a'}\n href={trackUrlRef(localizeUrl(secondaryButton?.link), `${componentType}_${componentName}`)}\n onClick={e => {\n if (secondaryButton.link?.startsWith('#')) {\n e.preventDefault()\n const element = document.querySelector(secondaryButton.link)\n if (element) {\n jump(element as HTMLElement, mergedJumpOptions)\n }\n }\n secondaryButton?.isCustomSecondaryButton &&\n onSecondaryClick?.(data, e, secondaryButton?.customSecondaryEventId)\n }}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}#${secondaryButton?.text}`}\n >\n {secondaryButton?.text}\n <span className=\"sr-only\">{title ?? subtitle}</span>\n </Button>\n ) : null}\n {primaryButton && primaryButton.text && (\n <Button\n aria-label={title ?? subtitle}\n size=\"lg\"\n variant=\"primary\"\n className=\"hero-banner-primary-button\"\n as={primaryButton?.isCustomPrimaryButton ? 'button' : 'a'}\n href={trackUrlRef(localizeUrl(primaryButton.link), `${componentType}_${componentName}`)}\n onClick={e => {\n if (primaryButton.link?.startsWith('#')) {\n e.preventDefault()\n const element = document.querySelector(primaryButton.link)\n if (element) {\n jump(element as HTMLElement, mergedJumpOptions)\n }\n }\n primaryButton?.isCustomPrimaryButton && onPrimaryClick?.(data, e, primaryButton?.customPrimaryEventId)\n }}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}#${primaryButton?.text}`}\n >\n {primaryButton.text}\n </Button>\n )}\n </div>\n <div className={iconGroupVariants({ align })}>\n {iconArray?.map(icon => (\n <div key={icon?.pcImage?.url || icon?.pcImage?.alt} className=\"h-12\">\n <Picture\n className=\"laptop:w-full h-full\"\n imgClassName=\"h-full object-cover\"\n loading=\"eager\"\n alt={icon?.pcImage?.alt || ''}\n source={icon?.pcImage?.url}\n />\n </div>\n ))}\n </div>\n </div>\n\n {/* \u5E95\u90E8\u4EA7\u54C1\u5217\u8868 */}\n {caption.length > 0 && (\n <div\n className={cn(\n 'hero-banner-caption-group laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]',\n classNames.captionGroup\n )}\n >\n {caption.map((c, index) => (\n <React.Fragment key={c.title}>\n <Text\n size={2}\n className={cn(\n 'hero-banner-product-text tablet:w-[108px] loptop:w-[150px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]'\n )}\n html={c.title}\n />\n {index < caption.length - 1 && <div className={cn('bg-info-primary w-px')} />}\n </React.Fragment>\n ))}\n </div>\n )}\n\n {/* \u89C6\u9891\u5F39\u7A97 */}\n {visible && (\n <VideoModal\n visible={visible}\n videoUrl={secondaryButton?.isYoutubeVideo ? undefined : secondaryButton?.videoUrl?.url}\n youTubeId={secondaryButton?.isYoutubeVideo ? secondaryButton?.youtubeId : undefined}\n onCloseModal={() => setVisible(false)}\n />\n )}\n </div>\n </div>\n )\n})\n\nHeroBanner.displayName = 'HeroBanner'\n\nexport default withLayout(HeroBanner)\n"],
5
+ "mappings": "slBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IA8GM,IAAAI,EAAA,6BA7GNC,EAAwE,oBACxEC,EAAiB,mBACjBC,EAA8B,mCAC9BC,EAAiB,sBAEjBC,EAA8B,4BAC9BC,GAA0B,uCAC1BC,GAA4B,+CAC5BC,EAA0D,qCAC1DC,EAAmB,kCACnBC,EAAoB,oCACpBC,GAA2B,kCAC3BC,GAA4B,sCAC5BC,EAA4B,uCAC5BC,GAAiC,kCACjCC,GAA+B,oCAC/BC,GAAwB,sCACxBC,GAA2B,kCAE3BC,GAA+B,sCAkB/B,MAAMC,EAAgB,QAChBC,EAAgB,cAGhBC,MAAkB,OACtB,iGACA,CACE,SAAU,CACR,MAAO,CACL,KAAM,4HACN,OACE,4JACJ,CACF,EACA,gBAAiB,CACf,MAAO,MACT,CACF,CACF,EAEMC,MAAe,OACnB,+HACA,CACE,SAAU,CACR,MAAO,CACL,KAAM,mBACN,OAAQ,aACV,CACF,EACA,gBAAiB,CACf,MA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uD,EAAG7B,GAAe,oBAAoB,CACvG,EACA,0BAAyB,GAAGtC,CAAa,IAAIC,CAAa,GAC1D,kCAAiC,GAAGwB,CAAK,IAAIC,CAAQ,IAAIY,GAAe,IAAI,GAE3E,SAAAA,EAAc,KACjB,GAEJ,KACA,OAAC,OAAI,UAAWjC,GAAkB,CAAE,MAAAwC,CAAM,CAAC,EACxC,SAAAD,IAAW,IAAI0B,MACd,OAAC,OAAmD,UAAU,OAC5D,mBAAC,WACC,UAAU,uBACV,aAAa,sBACb,QAAQ,QACR,IAAKA,GAAM,SAAS,KAAO,GAC3B,OAAQA,GAAM,SAAS,IACzB,GAPQA,GAAM,SAAS,KAAOA,GAAM,SAAS,GAQ/C,CACD,EACH,GACF,EAGC5B,EAAQ,OAAS,MAChB,OAAC,OACC,aAAW,MACT,iMACA5B,EAAW,YACb,EAEC,SAAA4B,EAAQ,IAAI,CAAC6B,EAAGC,OACf,QAAC,EAAA7D,QAAM,SAAN,CACC,oBAAC,QACC,KAAM,EACN,aAAW,MACT,yIACF,EACA,KAAM4D,EAAE,MACV,EACCC,EAAQ9B,EAAQ,OAAS,MAAK,OAAC,OAAI,aAAW,MAAG,sBAAsB,EAAG,IARxD6B,EAAE,KASvB,CACD,EACH,EAIDvB,MACC,OAAC,eACC,QAASA,EACT,SAAUT,GAAiB,eAAiB,OAAYA,GAAiB,UAAU,IACnF,UAAWA,GAAiB,eAAiBA,GAAiB,UAAY,OAC1E,aAAc,IAAMU,EAAW,EAAK,EACtC,GAEJ,EACF,CAEJ,CAAC,EAEDvC,GAAW,YAAc,aAEzB,IAAO/B,MAAQ,eAAW+B,EAAU",
6
+ "names": ["HeroBanner_exports", "__export", "HeroBanner_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_gsap", "import_ScrollTrigger", "import_jump", "import_react_responsive", "import_react_intersection_observer", "import_ScrollLoadVideo", "import_components", "import_helpers", "import_class_variance_authority", "import_Styles", "import_useExposure", "import_trackUrlRef", "import_utils", "import_AiuiProvider", "import_button", "import_VideoModal", "import_HeroBannerCarousel", "componentType", "componentName", "contentVariants", "textVariants", "buttonGroupVariants", "iconGroupVariants", "PlayButtonAppendIcon", "size", "width", "height", "HeroBanner", "React", "data", "className", "classNames", "onSecondaryClick", "onPrimaryClick", "jumpOptions", "rest", "ref", "locale", "mergedJumpOptions", "localizeUrl", "url", "label", "title", "subtitle", "endDate", "endDate_tz", "dateFormat", "pcImage", "padImage", "mobileImage", "pcVideo", "padVideo", "mobileVideo", "isShowVideo", "isVideoLoop", "primaryButton", "secondaryButton", "theme", "titleSize", "caption", "blockLink", "iconArray", "align", "isMobile", "isPad", "visible", "setVisible", "inViewRef", "inView", "scrollTriggerRef", "bgTriggerRef", "boxTriggerRef", "bgRef", "boxRef", "blockLinkLabel", "resolvedComponentTitle", "resolvedComponentDescription", "gsap", "gsapResize", "clientHeight", "self", "value", "HeroBannerCarousel", "ScrollLoadVideo", "e", "element", "jump", "icon", "c", "index"]
7
7
  }
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import type { HeroBannerProps } from './types.js';
3
+ import 'swiper/css';
4
+ import 'swiper/css/navigation';
5
+ import 'swiper/css/pagination';
6
+ interface HeroBannerCarouselProps extends React.HTMLAttributes<HTMLDivElement> {
7
+ data: HeroBannerProps['data'];
8
+ classNames?: Record<string, string>;
9
+ onPrimaryClick?: (data: any, e: any, id?: string) => void;
10
+ onSecondaryClick?: (data: any, e: any, id?: string) => void;
11
+ }
12
+ /**
13
+ * HeroBannerCarousel — arrows-only Navigation Swiper wrapping HeroBannerSlide units.
14
+ *
15
+ * Architecture:
16
+ * - DECISION-A007: Navigation only, loop=false, slidesPerView=1
17
+ * - DECISION-A003: ScrollLoadVideo videoRef as imperative pause channel
18
+ * - DECISION-A010: initial activeIndex=0; useEffect pauses slides 1..N on mount
19
+ * - DECISION-A006: arrow buttons at z-[20], above blockLink overlay z-10
20
+ * - ISSUE-017: post-mount pause wins over IO rootMargin='200px' race
21
+ */
22
+ declare const HeroBannerCarousel: React.ForwardRefExoticComponent<HeroBannerCarouselProps & React.RefAttributes<HTMLDivElement>>;
23
+ export default HeroBannerCarousel;
@@ -0,0 +1,2 @@
1
+ "use strict";"use client";var A=Object.create;var B=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var M=Object.getPrototypeOf,V=Object.prototype.hasOwnProperty;var D=(t,n)=>{for(var i in n)B(t,i,{get:n[i],enumerable:!0})},_=(t,n,i,f)=>{if(n&&typeof n=="object"||typeof n=="function")for(let l of I(n))!V.call(t,l)&&l!==i&&B(t,l,{get:()=>n[l],enumerable:!(f=E(n,l))||f.enumerable});return t};var T=(t,n,i)=>(i=t!=null?A(M(t)):{},_(n||!t||!t.__esModule?B(i,"default",{value:t,enumerable:!0}):i,t)),O=t=>_(B({},"__esModule",{value:!0}),t);var q={};D(q,{default:()=>$});module.exports=O(q);var e=require("react/jsx-runtime"),r=T(require("react")),N=require("swiper/react"),d=require("swiper/modules"),R=T(require("../../helpers/ScrollLoadVideo.js")),g=require("../../helpers/index.js"),m=require("../../components/index.js"),J=require("swiper/css"),K=require("swiper/css/navigation"),Q=require("swiper/css/pagination");const W=()=>(0,e.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,e.jsx)("circle",{cx:"20",cy:"20",r:"20",fill:"currentColor",fillOpacity:"0.2"}),(0,e.jsx)("path",{d:"M23 13L16 20L23 27",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),F=()=>(0,e.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,e.jsx)("circle",{cx:"20",cy:"20",r:"20",fill:"currentColor",fillOpacity:"0.2"}),(0,e.jsx)("path",{d:"M17 13L24 20L17 27",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),U=({data:t,isActive:n,videoRef:i,onPrimaryClick:f,onSecondaryClick:l})=>{const{pcVideo:H,padVideo:L,mobileVideo:x,pcImage:b,mobileImage:y,isVideoLoop:P=!0,title:k,subtitle:u,primaryButton:c,secondaryButton:s,theme:v="light",align:w="left",titleSize:h,size:S="default"}=t,a=H?.url||L?.url||x?.url||"",o=b?.url||y?.url||"";return(0,e.jsxs)("div",{className:(0,g.cn)("text-info-primary relative w-full overflow-hidden",v==="dark"?"aiui-dark":"",S==="default"?"lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]":"lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]"),children:[(0,e.jsx)(R.default,{videoRef:i,src:a,poster:o,className:"absolute inset-0 size-full",videoClassName:"size-full object-cover",muted:!0,loop:P,playsInline:!0}),(0,e.jsxs)("div",{className:(0,g.cn)("laptop:top-1/2 laptop:-translate-y-1/2 lg-desktop:gap-[32px] absolute top-24 z-10 flex w-full flex-col gap-[24px]",w==="center"?"left-1/2 -translate-x-1/2 items-center text-center":"tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] left-0 px-[16px]"),children:[(0,e.jsxs)("div",{className:(0,g.cn)("tablet:max-w-[704px] laptop:max-w-[440px] desktop:max-w-[648px] lg-desktop:max-w-[824px] max-w-[358px]",w==="center"?"text-center":"laptop:text-left"),children:[k&&(0,e.jsx)(m.Heading,{as:h==="4"?"h1":"h2",html:k,size:h?Number(h||"5"):S==="sm"?4:5}),u&&(0,e.jsx)(m.Text,{as:"p",size:2,className:"font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm",html:u})]}),(c?.text||s?.text)&&(0,e.jsxs)("div",{className:(0,g.cn)("lg-desktop:gap-3 flex items-center gap-2",w==="center"?"justify-center":"laptop:justify-start"),children:[s?.text&&(0,e.jsx)(m.Button,{size:"lg",variant:"secondary",as:s?.isCustomSecondaryButton?"button":"a",href:s.link,onClick:p=>s?.isCustomSecondaryButton&&l?.(t,p,s?.customSecondaryEventId),children:s.text}),c?.text&&(0,e.jsx)(m.Button,{size:"lg",variant:"primary",as:c?.isCustomPrimaryButton?"button":"a",href:c.link,onClick:p=>c?.isCustomPrimaryButton&&f?.(t,p,c?.customPrimaryEventId),children:c.text})]})]})]})},z=r.default.forwardRef(({data:t,className:n,classNames:i={},onPrimaryClick:f,onSecondaryClick:l,...H},L)=>{const x=t.items||[],b=t.carousel,y=(0,r.useRef)(null),[P,k]=(0,r.useState)(0),u=(0,r.useRef)(x.map(()=>r.default.createRef())),c=(b?.showArrows??!0)&&x.length>1,s=b?.showDots??!0,v=b?.autoplaySeconds,w=v!==void 0?[d.Navigation,d.Pagination,d.Autoplay]:[d.Navigation,d.Pagination],h=v!==void 0?{delay:v*1e3,disableOnInteraction:!1}:!1;(0,r.useEffect)(()=>{u.current.forEach((a,o)=>{o!==0&&a.current&&(a.current.pause(),a.current.currentTime=0)})},[]);const S=(0,r.useCallback)(a=>{const o=a.realIndex;u.current.forEach((C,j)=>{j!==o&&C.current&&(C.current.pause(),C.current.currentTime=0)});const p=u.current[o];p?.current&&p.current.paused&&p.current.play()?.catch(()=>{}),k(o)},[]);return(0,e.jsxs)("div",{ref:L,className:(0,g.cn)("hero-banner-carousel relative w-full overflow-hidden",n),...H,children:[(0,e.jsx)(N.Swiper,{onSwiper:a=>y.current=a,onSlideChange:S,modules:w,slidesPerView:1,loop:b?.loop??!0,initialSlide:0,allowTouchMove:!0,autoplay:h,pagination:s?{clickable:!0,el:".hero-banner-pagination",renderBullet:(a,o)=>`<span class="${o} banner-dot"></span>`}:!1,children:x.map((a,o)=>(0,e.jsx)(N.SwiperSlide,{children:({isActive:p})=>(0,e.jsx)(U,{data:a,isActive:p,videoRef:u.current[o],onPrimaryClick:f,onSecondaryClick:l})},o))}),c&&(0,e.jsxs)("div",{className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-between px-4",children:[(0,e.jsx)("button",{type:"button",className:"tablet:flex pointer-events-auto hidden items-center justify-center",onClick:()=>y.current?.slidePrev(),"aria-label":"Previous banner",children:(0,e.jsx)(W,{})}),(0,e.jsx)("button",{type:"button",className:"tablet:flex pointer-events-auto hidden items-center justify-center",onClick:()=>y.current?.slideNext(),"aria-label":"Next banner",children:(0,e.jsx)(F,{})})]}),s&&(0,e.jsx)("div",{className:"hero-banner-pagination swiper-pagination tablet:bottom-6 absolute bottom-5 left-1/2 z-20 flex -translate-x-1/2 items-center justify-center gap-2 [&_.banner-dot.swiper-pagination-bullet-active]:h-2 [&_.banner-dot.swiper-pagination-bullet-active]:w-8 [&_.banner-dot.swiper-pagination-bullet-active]:rounded-full [&_.banner-dot.swiper-pagination-bullet-active]:bg-[#080A0F] [&_.banner-dot]:size-2 [&_.banner-dot]:rounded-full [&_.banner-dot]:bg-[#767880] [&_.banner-dot]:transition-all [&_.banner-dot]:duration-300 [&_.banner-dot]:ease-out [&_.swiper-pagination-bullet]:m-0 [&_.swiper-pagination-bullet]:shrink-0 [&_.swiper-pagination-bullet]:opacity-100"})]})});z.displayName="HeroBannerCarousel";var $=z;
2
+ //# sourceMappingURL=HeroBannerCarousel.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/HeroBanner/HeroBannerCarousel.tsx"],
4
+ "sourcesContent": ["'use client'\nimport React, { useRef, useEffect, useCallback, useState } from 'react'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Navigation, Pagination, Autoplay } from 'swiper/modules'\nimport type { Swiper as SwiperType } from 'swiper'\nimport ScrollLoadVideo from '../../helpers/ScrollLoadVideo.js'\nimport { cn } from '../../helpers/index.js'\nimport type { HeroBannerProps, HeroBannerSlideData } from './types.js'\nimport { Button, Heading, Text } from '../../components/index.js'\n\nimport 'swiper/css'\nimport 'swiper/css/navigation'\nimport 'swiper/css/pagination'\n\n// \u2500\u2500 Arrow icons \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nconst ChevronLeft = () => (\n <svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <circle cx=\"20\" cy=\"20\" r=\"20\" fill=\"currentColor\" fillOpacity=\"0.2\" />\n <path d=\"M23 13L16 20L23 27\" stroke=\"white\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n)\n\nconst ChevronRight = () => (\n <svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <circle cx=\"20\" cy=\"20\" r=\"20\" fill=\"currentColor\" fillOpacity=\"0.2\" />\n <path d=\"M17 13L24 20L17 27\" stroke=\"white\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n)\n\n// \u2500\u2500 HeroBannerSlide \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// Minimal per-slide content unit. No GSAP, no withLayout, no useExposure.\n// videoRef is the imperative pause/play channel (DECISION-A003).\n\ninterface HeroBannerSlideProps {\n data: HeroBannerSlideData\n isActive: boolean\n videoRef: React.RefObject<HTMLVideoElement>\n onPrimaryClick?: (data: any, e: any, id?: string) => void\n onSecondaryClick?: (data: any, e: any, id?: string) => void\n}\n\nconst HeroBannerSlide = ({\n data,\n isActive: _isActive,\n videoRef,\n onPrimaryClick,\n onSecondaryClick,\n}: HeroBannerSlideProps) => {\n const {\n pcVideo,\n padVideo,\n mobileVideo,\n pcImage,\n mobileImage,\n isVideoLoop = true,\n title,\n subtitle,\n primaryButton,\n secondaryButton,\n theme = 'light',\n align = 'left',\n titleSize,\n size = 'default',\n } = data\n\n // Resolve video src (pc preferred; fallback to mobile)\n const videoSrc = pcVideo?.url || padVideo?.url || mobileVideo?.url || ''\n // Poster from image (shown while video loads or for image-only slides)\n const posterUrl = pcImage?.url || mobileImage?.url || ''\n\n return (\n <div\n className={cn(\n 'text-info-primary relative w-full overflow-hidden',\n theme === 'dark' ? 'aiui-dark' : '',\n size === 'default'\n ? 'lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]'\n : 'lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]'\n )}\n >\n {/* Background media \u2014 always ScrollLoadVideo so videoRef is always attached.\n For image-only slides src='', IO won't load a video, but ref is live for control. */}\n <ScrollLoadVideo\n videoRef={videoRef}\n src={videoSrc}\n poster={posterUrl}\n className=\"absolute inset-0 size-full\"\n videoClassName=\"size-full object-cover\"\n muted\n loop={isVideoLoop}\n playsInline\n />\n\n {/* Content Overlay */}\n <div\n className={cn(\n 'laptop:top-1/2 laptop:-translate-y-1/2 lg-desktop:gap-[32px] absolute top-24 z-10 flex w-full flex-col gap-[24px]',\n align === 'center'\n ? 'left-1/2 -translate-x-1/2 items-center text-center'\n : 'tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] left-0 px-[16px]'\n )}\n >\n <div\n className={cn(\n 'tablet:max-w-[704px] laptop:max-w-[440px] desktop:max-w-[648px] lg-desktop:max-w-[824px] max-w-[358px]',\n align === 'center' ? 'text-center' : 'laptop:text-left'\n )}\n >\n {title && (\n <Heading\n as={titleSize === '4' ? 'h1' : 'h2'}\n html={title}\n size={titleSize ? (Number(titleSize || '5') as any) : size === 'sm' ? 4 : 5}\n />\n )}\n {subtitle && (\n <Text\n as=\"p\"\n size={2}\n className=\"font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm\"\n html={subtitle}\n />\n )}\n </div>\n\n {(primaryButton?.text || secondaryButton?.text) && (\n <div\n className={cn(\n 'lg-desktop:gap-3 flex items-center gap-2',\n align === 'center' ? 'justify-center' : 'laptop:justify-start'\n )}\n >\n {secondaryButton?.text && (\n <Button\n size=\"lg\"\n variant=\"secondary\"\n as={secondaryButton?.isCustomSecondaryButton ? 'button' : 'a'}\n href={secondaryButton.link}\n onClick={e =>\n secondaryButton?.isCustomSecondaryButton &&\n onSecondaryClick?.(data, e, secondaryButton?.customSecondaryEventId)\n }\n >\n {secondaryButton.text}\n </Button>\n )}\n {primaryButton?.text && (\n <Button\n size=\"lg\"\n variant=\"primary\"\n as={primaryButton?.isCustomPrimaryButton ? 'button' : 'a'}\n href={primaryButton.link}\n onClick={e =>\n primaryButton?.isCustomPrimaryButton && onPrimaryClick?.(data, e, primaryButton?.customPrimaryEventId)\n }\n >\n {primaryButton.text}\n </Button>\n )}\n </div>\n )}\n </div>\n </div>\n )\n}\n\n// \u2500\u2500 HeroBannerCarousel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\ninterface HeroBannerCarouselProps extends React.HTMLAttributes<HTMLDivElement> {\n data: HeroBannerProps['data']\n classNames?: Record<string, string>\n onPrimaryClick?: (data: any, e: any, id?: string) => void\n onSecondaryClick?: (data: any, e: any, id?: string) => void\n}\n\n/**\n * HeroBannerCarousel \u2014 arrows-only Navigation Swiper wrapping HeroBannerSlide units.\n *\n * Architecture:\n * - DECISION-A007: Navigation only, loop=false, slidesPerView=1\n * - DECISION-A003: ScrollLoadVideo videoRef as imperative pause channel\n * - DECISION-A010: initial activeIndex=0; useEffect pauses slides 1..N on mount\n * - DECISION-A006: arrow buttons at z-[20], above blockLink overlay z-10\n * - ISSUE-017: post-mount pause wins over IO rootMargin='200px' race\n */\nconst HeroBannerCarousel = React.forwardRef<HTMLDivElement, HeroBannerCarouselProps>(\n (\n {\n data,\n className,\n classNames: _classNames = {},\n onPrimaryClick: _onPrimaryClick,\n onSecondaryClick: _onSecondaryClick,\n ...rest\n },\n ref\n ) => {\n const items = data.items || []\n const carousel = data.carousel\n\n const swiperRef = useRef<SwiperType | null>(null)\n const [_activeIndex, setActiveIndex] = useState(0)\n\n // One RefObject<HTMLVideoElement> per slide.\n // Created once at mount; ref count is fixed (ISSUE-022 \u2014 stable data assumed).\n // DECISION-A003: passed to HeroBannerSlide \u2192 ScrollLoadVideo as imperative channel.\n const videoRefs = useRef<React.RefObject<HTMLVideoElement>[]>(items.map(() => React.createRef<HTMLVideoElement>()))\n\n // Arrow visibility formula \u2014 DECISION-011\n const showArrowControls = (carousel?.showArrows ?? true) && items.length > 1\n\n // Pagination dots visibility formula \u2014 DECISION-006\n const showDots = carousel?.showDots ?? true\n\n // Autoplay module configuration \u2014 DECISION-006\n const autoplaySeconds = carousel?.autoplaySeconds\n const swiperModules = autoplaySeconds !== undefined ? [Navigation, Pagination, Autoplay] : [Navigation, Pagination]\n const autoplayConfig =\n autoplaySeconds !== undefined ? { delay: autoplaySeconds * 1000, disableOnInteraction: false } : false\n\n // Post-mount effect: pause all non-active (index !== 0) slide videos.\n // Wins the race against ScrollLoadVideo's IO rootMargin='200px' auto-play (ISSUE-017).\n useEffect(() => {\n videoRefs.current.forEach((vRef, i) => {\n if (i !== 0 && vRef.current) {\n vRef.current.pause()\n vRef.current.currentTime = 0\n }\n })\n }, [])\n\n // Slide transition handler \u2014 pause outgoing, play incoming (DECISION-A003 / DECISION-009)\n const handleSlideChange = useCallback((swiper: SwiperType) => {\n const newIndex = swiper.realIndex\n // Pause and reset all non-active slide videos\n videoRefs.current.forEach((vRef, i) => {\n if (i !== newIndex && vRef.current) {\n vRef.current.pause()\n vRef.current.currentTime = 0\n }\n })\n // Play incoming slide video \u2014 guard against AbortError from rapid swipe (ISSUE-005)\n const incoming = videoRefs.current[newIndex]\n if (incoming?.current && incoming.current.paused) {\n const p = incoming.current.play()\n p?.catch(() => {}) // Absorb AbortError silently\n }\n setActiveIndex(newIndex)\n }, [])\n\n return (\n <div ref={ref} className={cn('hero-banner-carousel relative w-full overflow-hidden', className)} {...rest}>\n <Swiper\n onSwiper={s => (swiperRef.current = s)}\n onSlideChange={handleSlideChange}\n modules={swiperModules}\n slidesPerView={1}\n loop={carousel?.loop ?? true}\n initialSlide={0}\n allowTouchMove={true}\n autoplay={autoplayConfig}\n pagination={\n showDots\n ? {\n clickable: true,\n el: '.hero-banner-pagination',\n renderBullet: (_index: number, className: string) => `<span class=\"${className} banner-dot\"></span>`,\n }\n : false\n }\n >\n {items.map((slideData, index) => (\n <SwiperSlide key={index}>\n {({ isActive }) => (\n <HeroBannerSlide\n data={slideData}\n isActive={isActive}\n videoRef={videoRefs.current[index]}\n onPrimaryClick={_onPrimaryClick}\n onSecondaryClick={_onSecondaryClick}\n />\n )}\n </SwiperSlide>\n ))}\n </Swiper>\n\n {/* Arrow navigation \u2014 z-[20] to stay above blockLink overlay (z-10) \u2014 DECISION-A006 */}\n {showArrowControls && (\n <div className=\"pointer-events-none absolute inset-0 z-20 flex items-center justify-between px-4\">\n <button\n type=\"button\"\n className=\"tablet:flex pointer-events-auto hidden items-center justify-center\"\n onClick={() => swiperRef.current?.slidePrev()}\n aria-label=\"Previous banner\"\n >\n <ChevronLeft />\n </button>\n <button\n type=\"button\"\n className=\"tablet:flex pointer-events-auto hidden items-center justify-center\"\n onClick={() => swiperRef.current?.slideNext()}\n aria-label=\"Next banner\"\n >\n <ChevronRight />\n </button>\n </div>\n )}\n\n {/* Pagination dots \u2014 visible on all devices */}\n {showDots && (\n <div className=\"hero-banner-pagination swiper-pagination tablet:bottom-6 absolute bottom-5 left-1/2 z-20 flex -translate-x-1/2 items-center justify-center gap-2 [&_.banner-dot.swiper-pagination-bullet-active]:h-2 [&_.banner-dot.swiper-pagination-bullet-active]:w-8 [&_.banner-dot.swiper-pagination-bullet-active]:rounded-full [&_.banner-dot.swiper-pagination-bullet-active]:bg-[#080A0F] [&_.banner-dot]:size-2 [&_.banner-dot]:rounded-full [&_.banner-dot]:bg-[#767880] [&_.banner-dot]:transition-all [&_.banner-dot]:duration-300 [&_.banner-dot]:ease-out [&_.swiper-pagination-bullet]:m-0 [&_.swiper-pagination-bullet]:shrink-0 [&_.swiper-pagination-bullet]:opacity-100\" />\n )}\n </div>\n )\n }\n)\n\nHeroBannerCarousel.displayName = 'HeroBannerCarousel'\n\nexport default HeroBannerCarousel\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAiBE,IAAAI,EAAA,6BAhBFC,EAAgE,oBAChEA,EAAoC,wBACpCC,EAAiD,0BAEjDC,EAA4B,+CAC5BC,EAAmB,kCAEnBC,EAAsC,qCAEtCC,EAAO,sBACPC,EAAO,iCACPC,EAAO,iCAIP,MAAMC,EAAc,OAClB,QAAC,OAAI,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAA6B,cAAY,OACzG,oBAAC,UAAO,GAAG,KAAK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,qEACV,QAAS,IAAMJ,EAAU,SAAS,UAAU,EAC5C,aAAW,kBAEX,mBAACpC,EAAA,EAAY,EACf,KACA,OAAC,UACC,KAAK,SACL,UAAU,qEACV,QAAS,IAAMoC,EAAU,SAAS,UAAU,EAC5C,aAAW,cAEX,mBAACnC,EAAA,EAAa,EAChB,GACF,EAIDwC,MACC,OAAC,OAAI,UAAU,8oBAA8oB,GAEjqB,CAEJ,CACF,EAEAf,EAAmB,YAAc,qBAEjC,IAAOrC,EAAQqC",
6
+ "names": ["HeroBannerCarousel_exports", "__export", "HeroBannerCarousel_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_modules", "import_ScrollLoadVideo", "import_helpers", "import_components", "import_css", "import_navigation", "import_pagination", "ChevronLeft", "ChevronRight", "HeroBannerSlide", "data", "_isActive", "videoRef", "onPrimaryClick", "onSecondaryClick", "pcVideo", "padVideo", "mobileVideo", "pcImage", "mobileImage", "isVideoLoop", "title", "subtitle", "primaryButton", "secondaryButton", "theme", "align", "titleSize", "size", "videoSrc", "posterUrl", "ScrollLoadVideo", "e", "HeroBannerCarousel", "React", "className", "_classNames", "_onPrimaryClick", "_onSecondaryClick", "rest", "ref", "items", "carousel", "swiperRef", "_activeIndex", "setActiveIndex", "videoRefs", "showArrowControls", "showDots", "autoplaySeconds", "swiperModules", "autoplayConfig", "vRef", "i", "handleSlideChange", "swiper", "newIndex", "incoming", "s", "_index", "slideData", "index", "isActive"]
7
+ }
@@ -1 +1,2 @@
1
1
  export { default } from './HeroBanner.js';
2
+ export type { JumpOptions } from './HeroBanner.js';
@@ -1,2 +1,2 @@
1
- "use strict";var m=Object.create;var t=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var c=(e,f)=>{for(var o in f)t(e,o,{get:f[o],enumerable:!0})},d=(e,f,o,a)=>{if(f&&typeof f=="object"||typeof f=="function")for(let r of u(f))!b.call(e,r)&&r!==o&&t(e,r,{get:()=>f[r],enumerable:!(a=p(f,r))||a.enumerable});return e};var g=(e,f,o)=>(o=e!=null?m(x(e)):{},d(f||!e||!e.__esModule?t(o,"default",{value:e,enumerable:!0}):o,e)),h=e=>d(t({},"__esModule",{value:!0}),e);var i={};c(i,{default:()=>l.default});module.exports=h(i);var l=g(require("./HeroBanner.js"));
1
+ "use strict";var a=Object.create;var t=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty;var i=(e,o)=>{for(var r in o)t(e,r,{get:o[r],enumerable:!0})},m=(e,o,r,f)=>{if(o&&typeof o=="object"||typeof o=="function")for(let p of u(o))!d.call(e,p)&&p!==r&&t(e,p,{get:()=>o[p],enumerable:!(f=s(o,p))||f.enumerable});return e};var j=(e,o,r)=>(r=e!=null?a(x(e)):{},m(o||!e||!e.__esModule?t(r,"default",{value:e,enumerable:!0}):r,e)),l=e=>m(t({},"__esModule",{value:!0}),e);var y={};i(y,{default:()=>n.default});module.exports=l(y);var n=j(require("./HeroBanner.js"));
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/HeroBanner/index.tsx"],
4
- "sourcesContent": ["export { default } from './HeroBanner.js'\n"],
4
+ "sourcesContent": ["export { default } from './HeroBanner.js'\nexport type { JumpOptions } from './HeroBanner.js'\n"],
5
5
  "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wCAAAE,EAAAF,GAAA,IAAAG,EAAwB",
6
6
  "names": ["HeroBanner_exports", "__export", "__toCommonJS", "import_HeroBanner"]
7
7
  }
@@ -1,6 +1,68 @@
1
1
  import type { ButtonProps } from '../../components/button.js';
2
2
  import type { Media, Theme } from '../../types/props.js';
3
3
  type TitleSizeType = '5' | '4' | '3' | '2' | '1';
4
+ /**
5
+ * Carousel navigation configuration for HeroBanner. v1: arrows only.
6
+ * autoplay, dots, and progress are intentionally EXCLUDED from v1.
7
+ */
8
+ export interface HeroBannerCarouselConfig {
9
+ /**
10
+ * Show prev/next arrow navigation controls.
11
+ * Only used when data.items has 2+ slides.
12
+ * @default true
13
+ */
14
+ showArrows?: boolean;
15
+ showDots?: boolean;
16
+ loop?: boolean;
17
+ autoplaySeconds?: number;
18
+ }
19
+ /**
20
+ * Per-slide data for HeroBanner carousel mode.
21
+ * Mirrors the single-banner data shape; no nested carousels allowed in v1.
22
+ */
23
+ export interface HeroBannerSlideData {
24
+ title: string;
25
+ subtitle: string;
26
+ pcImage: Media;
27
+ mobileImage: Media;
28
+ label?: string;
29
+ endDate?: string;
30
+ endDate_tz?: string;
31
+ dateFormat?: string;
32
+ iconArray?: Array<any>;
33
+ padImage?: Media;
34
+ pcVideo?: Media;
35
+ padVideo?: Media;
36
+ mobileVideo?: Media;
37
+ isShowVideo?: boolean;
38
+ isVideoLoop?: boolean;
39
+ blockLink?: string;
40
+ primaryButton?: {
41
+ text: string;
42
+ link?: string;
43
+ isCustomPrimaryButton?: boolean;
44
+ customPrimaryEventId?: string;
45
+ } & Omit<ButtonProps, 'children'>;
46
+ secondaryButton?: {
47
+ text: string;
48
+ link?: string;
49
+ isShowPlayVideoButton?: boolean;
50
+ playVideoButtonText?: string;
51
+ playIcon?: boolean;
52
+ videoUrl?: Media;
53
+ youtubeId?: string;
54
+ isYoutubeVideo?: boolean;
55
+ isCustomSecondaryButton?: boolean;
56
+ customSecondaryEventId?: string;
57
+ } & Omit<ButtonProps, 'children'>;
58
+ theme?: Theme;
59
+ size?: 'default' | 'sm';
60
+ titleSize?: TitleSizeType;
61
+ align?: 'left' | 'center';
62
+ caption?: Array<{
63
+ title: string;
64
+ }>;
65
+ }
4
66
  export interface HeroBannerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
5
67
  data: {
6
68
  /** 标签 */
@@ -60,6 +122,17 @@ export interface HeroBannerProps extends Omit<React.HTMLAttributes<HTMLDivElemen
60
122
  caption?: Array<{
61
123
  title: string;
62
124
  }>;
125
+ /**
126
+ * Carousel slide items. When present and non-empty, activates carousel mode.
127
+ * Single-banner mode is used when this field is absent or empty.
128
+ * DECISION-002: items absence = legacy single-banner path.
129
+ */
130
+ items?: HeroBannerSlideData[];
131
+ /**
132
+ * Carousel navigation configuration.
133
+ * Only meaningful when data.items is present and has 2+ items.
134
+ */
135
+ carousel?: HeroBannerCarouselConfig;
63
136
  };
64
137
  onSecondaryClick?: (data: any, e: any, customPrimaryEventId?: string) => void;
65
138
  onPrimaryClick?: (data: any, e: any, customSecondaryEventId?: string) => void;
@@ -1,2 +1,2 @@
1
- "use strict";var n=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var l=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of s(t))!d.call(e,i)&&i!==a&&n(e,i,{get:()=>t[i],enumerable:!(o=r(t,i))||o.enumerable});return e};var m=e=>l(n({},"__esModule",{value:!0}),e);var y={};module.exports=m(y);
1
+ "use strict";var n=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var l=(t,e,a,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of s(e))!d.call(t,o)&&o!==a&&n(t,o,{get:()=>e[o],enumerable:!(i=r(e,o))||i.enumerable});return t};var m=t=>l(n({},"__esModule",{value:!0}),t);var u={};module.exports=m(u);
2
2
  //# sourceMappingURL=types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/HeroBanner/types.ts"],
4
- "sourcesContent": ["import type { ButtonProps } from '../../components/button.js'\nimport type { Media, Theme } from '../../types/props.js'\n\ntype TitleSizeType = '5' | '4' | '3' | '2' | '1'\nexport interface HeroBannerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n data: {\n /** \u6807\u7B7E */\n label?: string\n /** \u4E3B\u6807\u9898 */\n title: string\n /** \u526F\u6807\u9898/\u63CF\u8FF0\u6587\u672C */\n subtitle: string\n /** \u7ED3\u675F\u65F6\u95F4\uFF08ISO \u5B57\u7B26\u4E32\uFF09 */\n endDate?: string\n /** \u7ED3\u675F\u65F6\u95F4\u65F6\u533A\uFF08\u5982: America/Los_Angeles\uFF09 */\n endDate_tz?: string\n dateFormat?: string\n /** \u56FE\u6807\u5217\u8868 */\n iconArray?: Array<any>\n pcImage: Media\n padImage?: Media\n mobileImage: Media\n pcVideo?: Media\n padVideo?: Media\n mobileVideo?: Media\n isShowVideo?: boolean\n /** \u89C6\u9891\u662F\u5426\u5FAA\u73AF\u64AD\u653E */\n isVideoLoop?: boolean\n blockLink?: string\n /** \u4E3B\u6309\u94AE\u6587\u672C\u548C\u914D\u7F6E */\n primaryButton?: {\n text: string\n link?: string\n isCustomPrimaryButton?: boolean\n /** \u81EA\u5B9A\u4E49\u4E8B\u4EF6ID\uFF0C\u4F20\u9012\u7ED9 onPrimaryClick */\n customPrimaryEventId?: string\n } & Omit<ButtonProps, 'children'>\n /** \u6B21\u8981\u6309\u94AE\u6587\u672C\u548C\u914D\u7F6E */\n secondaryButton?: {\n text: string\n link?: string\n isShowPlayVideoButton?: boolean\n playVideoButtonText?: string\n playIcon?: boolean\n videoUrl?: Media\n youtubeId?: string\n /** \u662F\u5426\u4E3AYouTube\u89C6\u9891\uFF0Ctrue\u65F6\u64AD\u653EYouTube\u89C6\u9891\uFF08\u9700\u8981youtubeId\uFF09\uFF0Cfalse\u65F6\u64AD\u653E\u539F\u751Fvideo\uFF08\u9700\u8981isShowPlayVideoButton\u4E3Atrue\u4E14videoUrl.url\u5B58\u5728\uFF09 */\n isYoutubeVideo?: boolean\n isCustomSecondaryButton?: boolean\n /** \u81EA\u5B9A\u4E49\u4E8B\u4EF6ID\uFF0C\u4F20\u9012\u7ED9 onSecondaryClick */\n customSecondaryEventId?: string\n } & Omit<ButtonProps, 'children'>\n /** \u4E3B\u9898 */\n theme?: Theme\n /** \u5927\u5C0F, \u9ED8\u8BA4default,\u5355banner, \u53EF\u9009sm, \u7528\u4E8E\u591Abanner\u573A\u666F */\n size?: 'default' | 'sm'\n titleSize?: TitleSizeType\n /** \u5185\u5BB9\u5BF9\u9F50\u65B9\u5F0F */\n align?: 'left' | 'center'\n /** \u5E95\u90E8\u4EA7\u54C1\u5217\u8868 */\n caption?: Array<{\n title: string\n }>\n }\n onSecondaryClick?: (data: any, e: any, customPrimaryEventId?: string) => void\n onPrimaryClick?: (data: any, e: any, customSecondaryEventId?: string) => void\n}\n"],
4
+ "sourcesContent": ["import type { ButtonProps } from '../../components/button.js'\nimport type { Media, Theme } from '../../types/props.js'\n\ntype TitleSizeType = '5' | '4' | '3' | '2' | '1'\n\n/**\n * Carousel navigation configuration for HeroBanner. v1: arrows only.\n * autoplay, dots, and progress are intentionally EXCLUDED from v1.\n */\nexport interface HeroBannerCarouselConfig {\n /**\n * Show prev/next arrow navigation controls.\n * Only used when data.items has 2+ slides.\n * @default true\n */\n showArrows?: boolean\n showDots?: boolean\n loop?: boolean\n autoplaySeconds?: number\n}\n\n/**\n * Per-slide data for HeroBanner carousel mode.\n * Mirrors the single-banner data shape; no nested carousels allowed in v1.\n */\nexport interface HeroBannerSlideData {\n // \u2500\u2500 Required (same constraints as single-banner) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n title: string\n subtitle: string\n pcImage: Media\n mobileImage: Media\n\n // \u2500\u2500 Optional (all existing HeroBannerData optionals carried over) \u2500\u2500\u2500\u2500\u2500\n label?: string\n endDate?: string\n endDate_tz?: string\n dateFormat?: string\n iconArray?: Array<any>\n padImage?: Media\n pcVideo?: Media\n padVideo?: Media\n mobileVideo?: Media\n isShowVideo?: boolean\n isVideoLoop?: boolean\n blockLink?: string\n primaryButton?: {\n text: string\n link?: string\n isCustomPrimaryButton?: boolean\n customPrimaryEventId?: string\n } & Omit<ButtonProps, 'children'>\n secondaryButton?: {\n text: string\n link?: string\n isShowPlayVideoButton?: boolean\n playVideoButtonText?: string\n playIcon?: boolean\n videoUrl?: Media\n youtubeId?: string\n isYoutubeVideo?: boolean\n isCustomSecondaryButton?: boolean\n customSecondaryEventId?: string\n } & Omit<ButtonProps, 'children'>\n theme?: Theme\n size?: 'default' | 'sm'\n titleSize?: TitleSizeType\n align?: 'left' | 'center'\n caption?: Array<{ title: string }>\n}\n\nexport interface HeroBannerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n data: {\n /** \u6807\u7B7E */\n label?: string\n /** \u4E3B\u6807\u9898 */\n title: string\n /** \u526F\u6807\u9898/\u63CF\u8FF0\u6587\u672C */\n subtitle: string\n /** \u7ED3\u675F\u65F6\u95F4\uFF08ISO \u5B57\u7B26\u4E32\uFF09 */\n endDate?: string\n /** \u7ED3\u675F\u65F6\u95F4\u65F6\u533A\uFF08\u5982: America/Los_Angeles\uFF09 */\n endDate_tz?: string\n dateFormat?: string\n /** \u56FE\u6807\u5217\u8868 */\n iconArray?: Array<any>\n pcImage: Media\n padImage?: Media\n mobileImage: Media\n pcVideo?: Media\n padVideo?: Media\n mobileVideo?: Media\n isShowVideo?: boolean\n /** \u89C6\u9891\u662F\u5426\u5FAA\u73AF\u64AD\u653E */\n isVideoLoop?: boolean\n blockLink?: string\n /** \u4E3B\u6309\u94AE\u6587\u672C\u548C\u914D\u7F6E */\n primaryButton?: {\n text: string\n link?: string\n isCustomPrimaryButton?: boolean\n /** \u81EA\u5B9A\u4E49\u4E8B\u4EF6ID\uFF0C\u4F20\u9012\u7ED9 onPrimaryClick */\n customPrimaryEventId?: string\n } & Omit<ButtonProps, 'children'>\n /** \u6B21\u8981\u6309\u94AE\u6587\u672C\u548C\u914D\u7F6E */\n secondaryButton?: {\n text: string\n link?: string\n isShowPlayVideoButton?: boolean\n playVideoButtonText?: string\n playIcon?: boolean\n videoUrl?: Media\n youtubeId?: string\n /** \u662F\u5426\u4E3AYouTube\u89C6\u9891\uFF0Ctrue\u65F6\u64AD\u653EYouTube\u89C6\u9891\uFF08\u9700\u8981youtubeId\uFF09\uFF0Cfalse\u65F6\u64AD\u653E\u539F\u751Fvideo\uFF08\u9700\u8981isShowPlayVideoButton\u4E3Atrue\u4E14videoUrl.url\u5B58\u5728\uFF09 */\n isYoutubeVideo?: boolean\n isCustomSecondaryButton?: boolean\n /** \u81EA\u5B9A\u4E49\u4E8B\u4EF6ID\uFF0C\u4F20\u9012\u7ED9 onSecondaryClick */\n customSecondaryEventId?: string\n } & Omit<ButtonProps, 'children'>\n /** \u4E3B\u9898 */\n theme?: Theme\n /** \u5927\u5C0F, \u9ED8\u8BA4default,\u5355banner, \u53EF\u9009sm, \u7528\u4E8E\u591Abanner\u573A\u666F */\n size?: 'default' | 'sm'\n titleSize?: TitleSizeType\n /** \u5185\u5BB9\u5BF9\u9F50\u65B9\u5F0F */\n align?: 'left' | 'center'\n /** \u5E95\u90E8\u4EA7\u54C1\u5217\u8868 */\n caption?: Array<{\n title: string\n }>\n /**\n * Carousel slide items. When present and non-empty, activates carousel mode.\n * Single-banner mode is used when this field is absent or empty.\n * DECISION-002: items absence = legacy single-banner path.\n */\n items?: HeroBannerSlideData[]\n /**\n * Carousel navigation configuration.\n * Only meaningful when data.items is present and has 2+ items.\n */\n carousel?: HeroBannerCarouselConfig\n }\n onSecondaryClick?: (data: any, e: any, customPrimaryEventId?: string) => void\n onPrimaryClick?: (data: any, e: any, customSecondaryEventId?: string) => void\n}\n"],
5
5
  "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
6
  "names": ["types_exports", "__toCommonJS"]
7
7
  }
@@ -14,7 +14,7 @@ export interface ImageOverlayShelfData {
14
14
  /** 产品列表 */
15
15
  productsCard: ProductCardData[];
16
16
  /** 是否显示标签 */
17
- showTags?: boolean;
17
+ isShowTag?: boolean;
18
18
  /** 是否显示原价 */
19
19
  showOriginalPrice?: boolean;
20
20
  /** 了解更多按钮文本 */
@@ -63,7 +63,7 @@ export interface ImageOverlayShelfComponent extends React.ForwardRefExoticCompon
63
63
  ProductCard: typeof ProductCard;
64
64
  }
65
65
  export { ProductCard };
66
- declare const ImageOverlayShelfWrapped: React.ForwardRefExoticComponent<Omit<ImageOverlayShelfProps & React.RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps & React.RefAttributes<unknown>> & {
66
+ declare const ImageOverlayShelfWrapped: React.ForwardRefExoticComponent<Omit<ImageOverlayShelfProps & React.RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("../WheelLottery/index.js").ContainerProps & React.RefAttributes<unknown>> & {
67
67
  readonly $$typeof: symbol;
68
68
  ProductCard: typeof ProductCard;
69
69
  };
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var V=Object.create;var c=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var z=Object.getPrototypeOf,W=Object.prototype.hasOwnProperty;var _=(e,t)=>{for(var r in t)c(e,r,{get:t[r],enumerable:!0})},f=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of j(t))!W.call(e,a)&&a!==r&&c(e,a,{get:()=>t[a],enumerable:!(i=A(t,a))||i.enumerable});return e};var y=(e,t,r)=>(r=e!=null?V(z(e)):{},f(t||!e||!e.__esModule?c(r,"default",{value:e,enumerable:!0}):r,e)),q=e=>f(c({},"__esModule",{value:!0}),e);var U={};_(U,{ProductCard:()=>n.default,default:()=>Q});module.exports=q(U);var o=require("react/jsx-runtime"),P=y(require("react")),d=require("../../helpers/utils.js"),v=require("../../shared/Styles.js"),l=require("swiper/react"),Y=require("swiper/css"),C=require("../../components/text.js"),w=require("../../components/heading.js"),S=require("react"),n=y(require("./ProductCard.js")),T=require("../../hooks/useExposure.js");const G="shelf",J="image_overlay_shelf",g=(0,S.forwardRef)(({data:e,onLearnMore:t,onShopNow:r,onAddToCart:i,onProductImageClick:a,classNames:s,copy:x,breakpoints:B,className:O="",...I},b)=>{const m=P.useRef(null);(0,T.useExposure)(m,{componentType:G,componentName:J,componentTitle:e.title,componentDescription:e.description}),P.useImperativeHandle(b,()=>m.current);const{productsCard:p=[],showTags:D=!0,showOriginalPrice:M=!0,secondaryButtonText:N,secondaryButtonFun:R,primaryButtonText:F,primaryButtonFun:H}=e,L={showTags:D,showOriginalPrice:M,secondaryButtonText:N,secondaryButtonFun:R,primaryButtonText:F,primaryButtonFun:H,onLearnMore:t,onShopNow:r,onAddToCart:i,onProductImageClick:a,classNames:s,copy:x},k={0:{spaceBetween:12,slidesPerView:1.2},768:{spaceBetween:16,slidesPerView:p.length<=2?2:2.2},1024:{spaceBetween:16,slidesPerView:p.length<=2?2:3},1440:{spaceBetween:16,slidesPerView:Math.max(2,Math.min(4,p.length))}};return(0,o.jsxs)("div",{ref:m,className:(0,d.cn)("collection-shelves-wrap w-full",O,s?.root),...I,children:[e.title&&(0,o.jsx)(w.Heading,{as:"h2",size:4,className:(0,d.cn)("text-info-primary mb-4",s?.title),children:e.title}),e.description&&(0,o.jsx)(C.Text,{size:3,as:"p",className:(0,d.cn)("text-info-primary mb-6",s?.description),children:e.description}),(0,o.jsx)(l.Swiper,{spaceBetween:16,slidesPerView:"auto",className:"!overflow-visible",breakpoints:B||k,children:p.map((u,E)=>(0,o.jsx)(l.SwiperSlide,{children:(0,o.jsx)(n.default,{product:u,...L})},u.sku||E))})]})});g.displayName="ImageOverlayShelf";const h=g;h.ProductCard=n.default;const K=(0,v.withLayout)(h);var Q=K;
1
+ "use strict";"use client";var V=Object.create;var c=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var z=Object.getPrototypeOf,W=Object.prototype.hasOwnProperty;var _=(e,t)=>{for(var r in t)c(e,r,{get:t[r],enumerable:!0})},f=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of j(t))!W.call(e,a)&&a!==r&&c(e,a,{get:()=>t[a],enumerable:!(n=A(t,a))||n.enumerable});return e};var y=(e,t,r)=>(r=e!=null?V(z(e)):{},f(t||!e||!e.__esModule?c(r,"default",{value:e,enumerable:!0}):r,e)),q=e=>f(c({},"__esModule",{value:!0}),e);var U={};_(U,{ProductCard:()=>i.default,default:()=>Q});module.exports=q(U);var o=require("react/jsx-runtime"),P=y(require("react")),d=require("../../helpers/utils.js"),v=require("../../shared/Styles.js"),l=require("swiper/react"),Y=require("swiper/css"),C=require("../../components/text.js"),w=require("../../components/heading.js"),S=require("react"),i=y(require("./ProductCard.js")),T=require("../../hooks/useExposure.js");const G="shelf",J="image_overlay_shelf",g=(0,S.forwardRef)(({data:e,onLearnMore:t,onShopNow:r,onAddToCart:n,onProductImageClick:a,classNames:s,copy:x,breakpoints:B,className:O="",...I},b)=>{const m=P.useRef(null);(0,T.useExposure)(m,{componentType:G,componentName:J,componentTitle:e.title,componentDescription:e.description}),P.useImperativeHandle(b,()=>m.current);const{productsCard:p=[],isShowTag:D=!0,showOriginalPrice:M=!0,secondaryButtonText:N,secondaryButtonFun:R,primaryButtonText:F,primaryButtonFun:H}=e,L={showTags:D,showOriginalPrice:M,secondaryButtonText:N,secondaryButtonFun:R,primaryButtonText:F,primaryButtonFun:H,onLearnMore:t,onShopNow:r,onAddToCart:n,onProductImageClick:a,classNames:s,copy:x},k={0:{spaceBetween:12,slidesPerView:1.2},768:{spaceBetween:16,slidesPerView:p.length<=2?2:2.2},1024:{spaceBetween:16,slidesPerView:p.length<=2?2:3},1440:{spaceBetween:16,slidesPerView:Math.max(2,Math.min(4,p.length))}};return(0,o.jsxs)("div",{ref:m,className:(0,d.cn)("collection-shelves-wrap w-full",O,s?.root),...I,children:[e.title&&(0,o.jsx)(w.Heading,{as:"h2",size:4,className:(0,d.cn)("text-info-primary mb-4",s?.title),children:e.title}),e.description&&(0,o.jsx)(C.Text,{size:3,as:"p",className:(0,d.cn)("text-info-primary mb-6",s?.description),children:e.description}),(0,o.jsx)(l.Swiper,{spaceBetween:16,slidesPerView:"auto",className:"!overflow-visible",breakpoints:B||k,children:p.map((u,E)=>(0,o.jsx)(l.SwiperSlide,{children:(0,o.jsx)(i.default,{product:u,...L})},u.sku||E))})]})});g.displayName="ImageOverlayShelf";const h=g;h.ProductCard=i.default;const K=(0,v.withLayout)(h);var Q=K;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/ImageOverlayShelf/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport * as React from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\n\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport 'swiper/css'\n\nimport { Text } from '../../components/text.js'\nimport { Heading } from '../../components/heading.js'\nimport { forwardRef } from 'react'\n\nimport ProductCard from './ProductCard.js'\nimport type {\n ProductCardData,\n ProductCardProps,\n ButtonFunctionType,\n ImageOverlayShelfSemanticName,\n CopyConfig,\n} from './types.js'\nimport { useExposure } from '../../hooks/useExposure.js'\n\nconst componentType = 'shelf'\nconst componentName = 'image_overlay_shelf'\n\n// Re-export types for external use\nexport type {\n ButtonFunctionType,\n ProductCardData,\n ProductCardProps,\n ImageOverlayShelfSemanticName,\n CopyConfig,\n ImageObjectPosition,\n} from './types.js'\n\n/**\n * ImageOverlayShelf \u4E1A\u52A1\u7EC4\u4EF6\u6570\u636E\u63A5\u53E3\n */\nexport interface ImageOverlayShelfData {\n /** \u7EC4\u4EF6\u6807\u9898 */\n title?: string\n /** \u7EC4\u4EF6\u63CF\u8FF0 */\n description?: string\n /** \u4EA7\u54C1\u5217\u8868 */\n productsCard: ProductCardData[]\n /** \u662F\u5426\u663E\u793A\u6807\u7B7E */\n showTags?: boolean\n /** \u662F\u5426\u663E\u793A\u539F\u4EF7 */\n showOriginalPrice?: boolean\n /** \u4E86\u89E3\u66F4\u591A\u6309\u94AE\u6587\u672C */\n secondaryButtonText?: string\n /** \u4E86\u89E3\u66F4\u591A\u6309\u94AE\u529F\u80FD */\n secondaryButtonFun?: ButtonFunctionType\n /** \u7ACB\u5373\u8D2D\u4E70\u6309\u94AE\u6587\u672C */\n primaryButtonText?: string\n /** \u7ACB\u5373\u8D2D\u4E70\u6309\u94AE\u529F\u80FD */\n primaryButtonFun?: ButtonFunctionType\n}\n\n/**\n * ImageOverlayShelf Props \u63A5\u53E3\n */\nexport interface ImageOverlayShelfProps extends React.HTMLAttributes<HTMLDivElement> {\n /** \u4E1A\u52A1\u6570\u636E */\n data: ImageOverlayShelfData\n /** \u70B9\u51FB\u4E86\u89E3\u66F4\u591A\u56DE\u8C03 */\n onLearnMore?: (product: ProductCardData) => void\n /** \u70B9\u51FB\u7ACB\u5373\u8D2D\u4E70\u56DE\u8C03 */\n onShopNow?: (product: ProductCardData) => void\n /** \u70B9\u51FB\u52A0\u5165\u8D2D\u7269\u8F66\u56DE\u8C03 */\n onAddToCart?: (product: ProductCardData) => void\n /** \u70B9\u51FB\u4EA7\u54C1\u56FE\u7247\u56DE\u8C03 */\n onProductImageClick?: (product: ProductCardData) => void\n /** \u8BED\u4E49\u5316\u7C7B\u540D */\n classNames?: Partial<Record<ImageOverlayShelfSemanticName, string>>\n /** \u6837\u5F0F\u7C7B\u540D */\n className?: string\n /** \u6587\u6848\u914D\u7F6E */\n copy?: CopyConfig\n /** \u65AD\u70B9\u914D\u7F6E */\n breakpoints?: {\n [key: number]: {\n spaceBetween: number\n freeMode: boolean\n slidesPerView: number\n }\n }\n}\n\n/**\n * ImageOverlayShelf \u590D\u5408\u7EC4\u4EF6\u7C7B\u578B\u5B9A\u4E49\n */\nexport interface ImageOverlayShelfComponent extends React.ForwardRefExoticComponent<\n ImageOverlayShelfProps & React.RefAttributes<HTMLDivElement>\n> {\n /** \u72EC\u7ACB\u7684 ProductCard \u7EC4\u4EF6 */\n ProductCard: typeof ProductCard\n}\n\n/**\n * \u5171\u4EAB Props \u7C7B\u578B\uFF08\u900F\u4F20\u7ED9 ProductCard\uFF09\n */\ntype SharedProductCardProps = Omit<ProductCardProps, 'product' | 'className'>\n\nconst ImageOverlayShelf = forwardRef<HTMLDivElement, ImageOverlayShelfProps>(\n (\n {\n data,\n onLearnMore,\n onShopNow,\n onAddToCart,\n onProductImageClick,\n classNames,\n copy,\n breakpoints,\n className = '',\n ...props\n },\n ref\n ) => {\n const boxRef = React.useRef<HTMLDivElement>(null)\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: data.title,\n componentDescription: data.description,\n })\n\n React.useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n const {\n productsCard: products = [],\n showTags = true,\n showOriginalPrice = true,\n secondaryButtonText,\n secondaryButtonFun,\n primaryButtonText,\n primaryButtonFun,\n } = data\n\n // \u6784\u5EFA\u5171\u4EAB props\uFF08\u900F\u4F20\u7ED9 ProductCard\uFF09\n const sharedProps: SharedProductCardProps = {\n showTags,\n showOriginalPrice,\n secondaryButtonText,\n secondaryButtonFun,\n primaryButtonText,\n primaryButtonFun,\n onLearnMore,\n onShopNow,\n onAddToCart,\n onProductImageClick,\n classNames,\n copy,\n }\n\n // \u9ED8\u8BA4\u65AD\u70B9\u914D\u7F6E\n const defaultBreakpoints = {\n 0: {\n spaceBetween: 12,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n slidesPerView: products.length <= 2 ? 2 : 2.2,\n },\n 1024: {\n spaceBetween: 16,\n slidesPerView: products.length <= 2 ? 2 : 3,\n },\n 1440: {\n spaceBetween: 16,\n slidesPerView: Math.max(2, Math.min(4, products.length)),\n },\n }\n\n return (\n <div ref={boxRef} className={cn('collection-shelves-wrap w-full', className, classNames?.root)} {...props}>\n {/* \u6807\u9898\u533A\u57DF */}\n {data.title && (\n <Heading as=\"h2\" size={4} className={cn('text-info-primary mb-4', classNames?.title)}>\n {data.title}\n </Heading>\n )}\n {data.description && (\n <Text size={3} as=\"p\" className={cn('text-info-primary mb-6', classNames?.description)}>\n {data.description}\n </Text>\n )}\n\n {/* Swiper \u6A2A\u5411\u6ED1\u52A8\u5E03\u5C40 */}\n <Swiper\n spaceBetween={16}\n slidesPerView=\"auto\"\n className=\"!overflow-visible\"\n breakpoints={breakpoints || defaultBreakpoints}\n >\n {products.map((product, index) => (\n <SwiperSlide key={product.sku || index}>\n <ProductCard product={product} {...sharedProps} />\n </SwiperSlide>\n ))}\n </Swiper>\n </div>\n )\n }\n)\n\nImageOverlayShelf.displayName = 'ImageOverlayShelf'\n\n// \u521B\u5EFA\u590D\u5408\u7EC4\u4EF6\nconst ImageOverlayShelfWithProductCard = ImageOverlayShelf as ImageOverlayShelfComponent\nImageOverlayShelfWithProductCard.ProductCard = ProductCard\n\nexport { ProductCard }\nconst ImageOverlayShelfWrapped = withLayout(ImageOverlayShelfWithProductCard)\nexport default ImageOverlayShelfWrapped\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,QAAA,YAAAC,IAAA,eAAAC,EAAAJ,GAkLM,IAAAK,EAAA,6BAjLNC,EAAuB,oBACvBC,EAAmB,kCACnBC,EAA2B,kCAE3BC,EAAoC,wBACpCC,EAAO,sBAEPC,EAAqB,oCACrBC,EAAwB,uCACxBH,EAA2B,iBAE3BI,EAAwB,+BAQxBC,EAA4B,sCAE5B,MAAMC,EAAgB,QAChBC,EAAgB,sBAiFhBC,KAAoB,cACxB,CACE,CACE,KAAAC,EACA,YAAAC,EACA,UAAAC,EACA,YAAAC,EACA,oBAAAC,EACA,WAAAC,EACA,KAAAC,EACA,YAAAC,EACA,UAAAC,EAAY,GACZ,GAAGC,CACL,EACAC,IACG,CACH,MAAMC,EAASvB,EAAM,OAAuB,IAAI,KAEhD,eAAYuB,EAAQ,CAClB,cAAAd,EACA,cAAAC,EACA,eAAgBE,EAAK,MACrB,qBAAsBA,EAAK,WAC7B,CAA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YAAc,oBAGhC,MAAMwB,EAAmCxB,EACzCwB,EAAiC,YAAc,EAAAvC,QAG/C,MAAMwC,KAA2B,cAAWD,CAAgC,EAC5E,IAAOtC,EAAQuC",
6
- "names": ["ImageOverlayShelf_exports", "__export", "ProductCard", "ImageOverlayShelf_default", "__toCommonJS", "import_jsx_runtime", "React", "import_utils", "import_Styles", "import_react", "import_css", "import_text", "import_heading", "import_ProductCard", "import_useExposure", "componentType", "componentName", "ImageOverlayShelf", "data", "onLearnMore", "onShopNow", "onAddToCart", "onProductImageClick", "classNames", "copy", "breakpoints", "className", "props", "ref", "boxRef", "products", "showTags", "showOriginalPrice", "secondaryButtonText", "secondaryButtonFun", "primaryButtonText", "primaryButtonFun", "sharedProps", "defaultBreakpoints", "product", "index", "ImageOverlayShelfWithProductCard", "ImageOverlayShelfWrapped"]
4
+ "sourcesContent": ["'use client'\nimport * as React from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\n\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport 'swiper/css'\n\nimport { Text } from '../../components/text.js'\nimport { Heading } from '../../components/heading.js'\nimport { forwardRef } from 'react'\n\nimport ProductCard from './ProductCard.js'\nimport type {\n ProductCardData,\n ProductCardProps,\n ButtonFunctionType,\n ImageOverlayShelfSemanticName,\n CopyConfig,\n} from './types.js'\nimport { useExposure } from '../../hooks/useExposure.js'\n\nconst componentType = 'shelf'\nconst componentName = 'image_overlay_shelf'\n\n// Re-export types for external use\nexport type {\n ButtonFunctionType,\n ProductCardData,\n ProductCardProps,\n ImageOverlayShelfSemanticName,\n CopyConfig,\n ImageObjectPosition,\n} from './types.js'\n\n/**\n * ImageOverlayShelf \u4E1A\u52A1\u7EC4\u4EF6\u6570\u636E\u63A5\u53E3\n */\nexport interface ImageOverlayShelfData {\n /** \u7EC4\u4EF6\u6807\u9898 */\n title?: string\n /** \u7EC4\u4EF6\u63CF\u8FF0 */\n description?: string\n /** \u4EA7\u54C1\u5217\u8868 */\n productsCard: ProductCardData[]\n /** \u662F\u5426\u663E\u793A\u6807\u7B7E */\n isShowTag?: boolean\n /** \u662F\u5426\u663E\u793A\u539F\u4EF7 */\n showOriginalPrice?: boolean\n /** \u4E86\u89E3\u66F4\u591A\u6309\u94AE\u6587\u672C */\n secondaryButtonText?: string\n /** \u4E86\u89E3\u66F4\u591A\u6309\u94AE\u529F\u80FD */\n secondaryButtonFun?: ButtonFunctionType\n /** \u7ACB\u5373\u8D2D\u4E70\u6309\u94AE\u6587\u672C */\n primaryButtonText?: string\n /** \u7ACB\u5373\u8D2D\u4E70\u6309\u94AE\u529F\u80FD */\n primaryButtonFun?: ButtonFunctionType\n}\n\n/**\n * ImageOverlayShelf Props \u63A5\u53E3\n */\nexport interface ImageOverlayShelfProps extends React.HTMLAttributes<HTMLDivElement> {\n /** \u4E1A\u52A1\u6570\u636E */\n data: ImageOverlayShelfData\n /** \u70B9\u51FB\u4E86\u89E3\u66F4\u591A\u56DE\u8C03 */\n onLearnMore?: (product: ProductCardData) => void\n /** \u70B9\u51FB\u7ACB\u5373\u8D2D\u4E70\u56DE\u8C03 */\n onShopNow?: (product: ProductCardData) => void\n /** \u70B9\u51FB\u52A0\u5165\u8D2D\u7269\u8F66\u56DE\u8C03 */\n onAddToCart?: (product: ProductCardData) => void\n /** \u70B9\u51FB\u4EA7\u54C1\u56FE\u7247\u56DE\u8C03 */\n onProductImageClick?: (product: ProductCardData) => void\n /** \u8BED\u4E49\u5316\u7C7B\u540D */\n classNames?: Partial<Record<ImageOverlayShelfSemanticName, string>>\n /** \u6837\u5F0F\u7C7B\u540D */\n className?: string\n /** \u6587\u6848\u914D\u7F6E */\n copy?: CopyConfig\n /** \u65AD\u70B9\u914D\u7F6E */\n breakpoints?: {\n [key: number]: {\n spaceBetween: number\n freeMode: boolean\n slidesPerView: number\n }\n }\n}\n\n/**\n * ImageOverlayShelf \u590D\u5408\u7EC4\u4EF6\u7C7B\u578B\u5B9A\u4E49\n */\nexport interface ImageOverlayShelfComponent extends React.ForwardRefExoticComponent<\n ImageOverlayShelfProps & React.RefAttributes<HTMLDivElement>\n> {\n /** \u72EC\u7ACB\u7684 ProductCard \u7EC4\u4EF6 */\n ProductCard: typeof ProductCard\n}\n\n/**\n * \u5171\u4EAB Props \u7C7B\u578B\uFF08\u900F\u4F20\u7ED9 ProductCard\uFF09\n */\ntype SharedProductCardProps = Omit<ProductCardProps, 'product' | 'className'>\n\nconst ImageOverlayShelf = forwardRef<HTMLDivElement, ImageOverlayShelfProps>(\n (\n {\n data,\n onLearnMore,\n onShopNow,\n onAddToCart,\n onProductImageClick,\n classNames,\n copy,\n breakpoints,\n className = '',\n ...props\n },\n ref\n ) => {\n const boxRef = React.useRef<HTMLDivElement>(null)\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: data.title,\n componentDescription: data.description,\n })\n\n React.useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n const {\n productsCard: products = [],\n isShowTag = true,\n showOriginalPrice = true,\n secondaryButtonText,\n secondaryButtonFun,\n primaryButtonText,\n primaryButtonFun,\n } = data\n\n // \u6784\u5EFA\u5171\u4EAB props\uFF08\u900F\u4F20\u7ED9 ProductCard\uFF09\n const sharedProps: SharedProductCardProps = {\n showTags: isShowTag,\n showOriginalPrice,\n secondaryButtonText,\n secondaryButtonFun,\n primaryButtonText,\n primaryButtonFun,\n onLearnMore,\n onShopNow,\n onAddToCart,\n onProductImageClick,\n classNames,\n copy,\n }\n\n // \u9ED8\u8BA4\u65AD\u70B9\u914D\u7F6E\n const defaultBreakpoints = {\n 0: {\n spaceBetween: 12,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n slidesPerView: products.length <= 2 ? 2 : 2.2,\n },\n 1024: {\n spaceBetween: 16,\n slidesPerView: products.length <= 2 ? 2 : 3,\n },\n 1440: {\n spaceBetween: 16,\n slidesPerView: Math.max(2, Math.min(4, products.length)),\n },\n }\n\n return (\n <div ref={boxRef} className={cn('collection-shelves-wrap w-full', className, classNames?.root)} {...props}>\n {/* \u6807\u9898\u533A\u57DF */}\n {data.title && (\n <Heading as=\"h2\" size={4} className={cn('text-info-primary mb-4', classNames?.title)}>\n {data.title}\n </Heading>\n )}\n {data.description && (\n <Text size={3} as=\"p\" className={cn('text-info-primary mb-6', classNames?.description)}>\n {data.description}\n </Text>\n )}\n\n {/* Swiper \u6A2A\u5411\u6ED1\u52A8\u5E03\u5C40 */}\n <Swiper\n spaceBetween={16}\n slidesPerView=\"auto\"\n className=\"!overflow-visible\"\n breakpoints={breakpoints || defaultBreakpoints}\n >\n {products.map((product, index) => (\n <SwiperSlide key={product.sku || index}>\n <ProductCard product={product} {...sharedProps} />\n </SwiperSlide>\n ))}\n </Swiper>\n </div>\n )\n }\n)\n\nImageOverlayShelf.displayName = 'ImageOverlayShelf'\n\n// \u521B\u5EFA\u590D\u5408\u7EC4\u4EF6\nconst ImageOverlayShelfWithProductCard = ImageOverlayShelf as ImageOverlayShelfComponent\nImageOverlayShelfWithProductCard.ProductCard = ProductCard\n\nexport { ProductCard }\nconst ImageOverlayShelfWrapped = withLayout(ImageOverlayShelfWithProductCard)\nexport default ImageOverlayShelfWrapped\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,QAAA,YAAAC,IAAA,eAAAC,EAAAJ,GAkLM,IAAAK,EAAA,6BAjLNC,EAAuB,oBACvBC,EAAmB,kCACnBC,EAA2B,kCAE3BC,EAAoC,wBACpCC,EAAO,sBAEPC,EAAqB,oCACrBC,EAAwB,uCACxBH,EAA2B,iBAE3BI,EAAwB,+BAQxBC,EAA4B,sCAE5B,MAAMC,EAAgB,QAChBC,EAAgB,sBAiFhBC,KAAoB,cACxB,CACE,CACE,KAAAC,EACA,YAAAC,EACA,UAAAC,EACA,YAAAC,EACA,oBAAAC,EACA,WAAAC,EACA,KAAAC,EACA,YAAAC,EACA,UAAAC,EAAY,GACZ,GAAGC,CACL,EACAC,IACG,CACH,MAAM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eACC,mBAAC,EAAAtC,QAAA,CAAY,QAASqC,EAAU,GAAGF,EAAa,GADhCE,EAAQ,KAAOC,CAEjC,CACD,EACH,GACF,CAEJ,CACF,EAEAvB,EAAkB,YAAc,oBAGhC,MAAMwB,EAAmCxB,EACzCwB,EAAiC,YAAc,EAAAvC,QAG/C,MAAMwC,KAA2B,cAAWD,CAAgC,EAC5E,IAAOtC,EAAQuC",
6
+ "names": ["ImageOverlayShelf_exports", "__export", "ProductCard", "ImageOverlayShelf_default", "__toCommonJS", "import_jsx_runtime", "React", "import_utils", "import_Styles", "import_react", "import_css", "import_text", "import_heading", "import_ProductCard", "import_useExposure", "componentType", "componentName", "ImageOverlayShelf", "data", "onLearnMore", "onShopNow", "onAddToCart", "onProductImageClick", "classNames", "copy", "breakpoints", "className", "props", "ref", "boxRef", "products", "isShowTag", "showOriginalPrice", "secondaryButtonText", "secondaryButtonFun", "primaryButtonText", "primaryButtonFun", "sharedProps", "defaultBreakpoints", "product", "index", "ImageOverlayShelfWithProductCard", "ImageOverlayShelfWrapped"]
7
7
  }