@anker-in/headless-ui 1.1.9-alpha.1764084619241 → 1.1.9-alpha.1764141671439

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 (613) hide show
  1. package/dist/cjs/biz-components/AccordionCards/index.d.ts +2 -2
  2. package/dist/cjs/biz-components/AplusDesc/index.d.ts +3 -2
  3. package/dist/cjs/biz-components/BrandEquity/BrandEquity.d.ts +3 -2
  4. package/dist/cjs/biz-components/BrandEquity/BrandEquity.js +1 -1
  5. package/dist/cjs/biz-components/BrandEquity/BrandEquity.js.map +3 -3
  6. package/dist/cjs/biz-components/BrandEquity/types.d.ts +0 -1
  7. package/dist/cjs/biz-components/BrandEquity/types.js +1 -1
  8. package/dist/cjs/biz-components/BrandEquity/types.js.map +1 -1
  9. package/dist/cjs/biz-components/Category/index.d.ts +2 -2
  10. package/dist/cjs/biz-components/CreativeModule/index.d.ts +3 -2
  11. package/dist/cjs/biz-components/DownLoad/index.d.ts +3 -2
  12. package/dist/cjs/biz-components/Evaluate/index.d.ts +2 -2
  13. package/dist/cjs/biz-components/Faq/Faq.d.ts +2 -2
  14. package/dist/cjs/biz-components/Faq/Faq.js.map +2 -2
  15. package/dist/cjs/biz-components/FeatureCards/FeatureCards.d.ts +7 -0
  16. package/dist/cjs/biz-components/FeatureCards/FeatureCards.js +2 -0
  17. package/dist/cjs/biz-components/FeatureCards/FeatureCards.js.map +7 -0
  18. package/dist/cjs/biz-components/FeatureCards/index.d.ts +2 -0
  19. package/dist/cjs/biz-components/FeatureCards/index.js +2 -0
  20. package/dist/cjs/biz-components/FeatureCards/index.js.map +7 -0
  21. package/dist/cjs/biz-components/FeatureCards/types.d.ts +27 -0
  22. package/dist/cjs/biz-components/FeatureCards/types.js +2 -0
  23. package/dist/cjs/biz-components/FeatureCards/types.js.map +7 -0
  24. package/dist/cjs/biz-components/FeatureShowcase/FeatureShowcase.d.ts +7 -0
  25. package/dist/cjs/biz-components/FeatureShowcase/FeatureShowcase.js +2 -0
  26. package/dist/cjs/biz-components/FeatureShowcase/FeatureShowcase.js.map +7 -0
  27. package/dist/cjs/biz-components/FeatureShowcase/index.d.ts +2 -0
  28. package/dist/cjs/biz-components/FeatureShowcase/index.js +2 -0
  29. package/dist/cjs/biz-components/FeatureShowcase/index.js.map +7 -0
  30. package/dist/cjs/biz-components/FeatureShowcase/types.d.ts +23 -0
  31. package/dist/cjs/biz-components/FeatureShowcase/types.js +2 -0
  32. package/dist/cjs/biz-components/FeatureShowcase/types.js.map +7 -0
  33. package/dist/cjs/biz-components/Features/index.d.ts +3 -2
  34. package/dist/cjs/biz-components/FootCharger/index.d.ts +3 -2
  35. package/dist/cjs/biz-components/FooterNavigation/index.d.ts +3 -2
  36. package/dist/cjs/biz-components/GiftBox/index.d.ts +3 -2
  37. package/dist/cjs/biz-components/Graphic/index.d.ts +2 -2
  38. package/dist/cjs/biz-components/GraphicAttractionBlock/index.d.ts +2 -2
  39. package/dist/cjs/biz-components/GraphicMore/index.d.ts +3 -2
  40. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.d.ts +2 -2
  41. package/dist/cjs/biz-components/HeaderNavigation/index.d.ts +2 -2
  42. package/dist/cjs/biz-components/HeaderNavigation/index.js.map +2 -2
  43. package/dist/cjs/biz-components/HeroBanner/HeroBanner.d.ts +2 -2
  44. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
  45. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +3 -3
  46. package/dist/cjs/biz-components/HeroBanner/types.d.ts +2 -0
  47. package/dist/cjs/biz-components/HeroBanner/types.js +1 -1
  48. package/dist/cjs/biz-components/HeroBanner/types.js.map +1 -1
  49. package/dist/cjs/biz-components/ImageTextFeature/ImageTextFeature.d.ts +7 -0
  50. package/dist/cjs/biz-components/ImageTextFeature/ImageTextFeature.js +2 -0
  51. package/dist/cjs/biz-components/ImageTextFeature/ImageTextFeature.js.map +7 -0
  52. package/dist/cjs/biz-components/ImageTextFeature/index.d.ts +2 -0
  53. package/dist/cjs/biz-components/ImageTextFeature/index.js +2 -0
  54. package/dist/cjs/biz-components/ImageTextFeature/index.js.map +7 -0
  55. package/dist/cjs/biz-components/ImageTextFeature/types.d.ts +31 -0
  56. package/dist/cjs/biz-components/ImageTextFeature/types.js +2 -0
  57. package/dist/cjs/biz-components/ImageTextFeature/types.js.map +7 -0
  58. package/dist/cjs/biz-components/ImageWithText/ImageWithText.d.ts +7 -0
  59. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js +2 -0
  60. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js.map +7 -0
  61. package/dist/cjs/biz-components/ImageWithText/index.d.ts +3 -0
  62. package/dist/cjs/biz-components/ImageWithText/index.js +2 -0
  63. package/dist/cjs/biz-components/ImageWithText/index.js.map +7 -0
  64. package/dist/cjs/biz-components/ImageWithText/types.d.ts +110 -0
  65. package/dist/cjs/biz-components/ImageWithText/types.js +2 -0
  66. package/dist/cjs/biz-components/ImageWithText/types.js.map +7 -0
  67. package/dist/cjs/biz-components/InlineVideo/index.d.ts +16 -0
  68. package/dist/cjs/biz-components/InlineVideo/index.js +2 -0
  69. package/dist/cjs/biz-components/InlineVideo/index.js.map +7 -0
  70. package/dist/cjs/biz-components/Ksp/index.d.ts +44 -0
  71. package/dist/cjs/biz-components/Ksp/index.js +2 -0
  72. package/dist/cjs/biz-components/Ksp/index.js.map +7 -0
  73. package/dist/cjs/biz-components/Listing/BizProductProvider.d.ts +1 -1
  74. package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js +1 -1
  75. package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js.map +2 -2
  76. package/dist/cjs/biz-components/Listing/components/PaidShipping/index.d.ts +19 -6
  77. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +2 -2
  78. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +3 -2
  79. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +3 -2
  80. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +3 -2
  81. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +1 -1
  82. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +2 -2
  83. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +3 -2
  84. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +3 -2
  85. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +1 -1
  86. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +1 -1
  87. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +3 -2
  88. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
  89. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +2 -2
  90. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +3 -2
  91. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.d.ts +1 -0
  92. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.d.ts +3 -2
  93. package/dist/cjs/biz-components/Marquee/Marquee.d.ts +2 -2
  94. package/dist/cjs/biz-components/MarqueeReview/index.d.ts +42 -0
  95. package/dist/cjs/biz-components/MarqueeReview/index.js +2 -0
  96. package/dist/cjs/biz-components/MarqueeReview/index.js.map +7 -0
  97. package/dist/cjs/biz-components/MediaPlayerBase/index.backup.d.ts +7 -0
  98. package/dist/cjs/biz-components/MediaPlayerBase/index.backup.js +2 -0
  99. package/dist/cjs/biz-components/MediaPlayerBase/index.backup.js.map +7 -0
  100. package/dist/cjs/biz-components/MediaPlayerBase/index.d.ts +3 -2
  101. package/dist/cjs/biz-components/MediaPlayerBase/index.js +1 -1
  102. package/dist/cjs/biz-components/MediaPlayerBase/index.js.map +3 -3
  103. package/dist/cjs/biz-components/MediaPlayerMulti/index.d.ts +3 -2
  104. package/dist/cjs/biz-components/MediaPlayerSticky/index.d.ts +2 -2
  105. package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +8 -0
  106. package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +11 -0
  107. package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js.map +7 -0
  108. package/dist/cjs/biz-components/MediaSceneSwitcher/index.d.ts +2 -0
  109. package/dist/cjs/biz-components/MediaSceneSwitcher/index.js +2 -0
  110. package/dist/cjs/biz-components/MediaSceneSwitcher/index.js.map +7 -0
  111. package/dist/cjs/biz-components/MediaSceneSwitcher/types.d.ts +19 -0
  112. package/dist/cjs/biz-components/MediaSceneSwitcher/types.js +2 -0
  113. package/dist/cjs/biz-components/MediaSceneSwitcher/types.js.map +7 -0
  114. package/dist/cjs/biz-components/MemberEquity/index.d.ts +2 -2
  115. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +2 -2
  116. package/dist/cjs/biz-components/NavigationSearch/index.d.ts +1 -0
  117. package/dist/cjs/biz-components/ProductCompare/index.d.ts +54 -0
  118. package/dist/cjs/biz-components/ProductCompare/index.js +2 -0
  119. package/dist/cjs/biz-components/ProductCompare/index.js.map +7 -0
  120. package/dist/cjs/biz-components/ProductHero/ProductHero.d.ts +7 -0
  121. package/dist/cjs/biz-components/ProductHero/ProductHero.js +2 -0
  122. package/dist/cjs/biz-components/ProductHero/ProductHero.js.map +7 -0
  123. package/dist/cjs/biz-components/ProductHero/index.d.ts +2 -0
  124. package/dist/cjs/biz-components/ProductHero/index.js +2 -0
  125. package/dist/cjs/biz-components/ProductHero/index.js.map +7 -0
  126. package/dist/cjs/biz-components/ProductHero/types.d.ts +23 -0
  127. package/dist/cjs/biz-components/ProductHero/types.js +2 -0
  128. package/dist/cjs/biz-components/ProductHero/types.js.map +7 -0
  129. package/dist/cjs/biz-components/ProductNav/ProductNav.d.ts +7 -0
  130. package/dist/cjs/biz-components/ProductNav/ProductNav.js +2 -0
  131. package/dist/cjs/biz-components/ProductNav/ProductNav.js.map +7 -0
  132. package/dist/cjs/biz-components/ProductNav/index.d.ts +2 -0
  133. package/dist/cjs/biz-components/ProductNav/index.js +2 -0
  134. package/dist/cjs/biz-components/ProductNav/index.js.map +7 -0
  135. package/dist/cjs/biz-components/ProductNav/types.d.ts +35 -0
  136. package/dist/cjs/biz-components/ProductNav/types.js +2 -0
  137. package/dist/cjs/biz-components/ProductNav/types.js.map +7 -0
  138. package/dist/cjs/biz-components/SelectStore/index.d.ts +3 -2
  139. package/dist/cjs/biz-components/ShelfDisplay/index.d.ts +2 -2
  140. package/dist/cjs/biz-components/Slogan/index.d.ts +2 -2
  141. package/dist/cjs/biz-components/Spacer/index.d.ts +2 -2
  142. package/dist/cjs/biz-components/Spacer/index.js +1 -1
  143. package/dist/cjs/biz-components/Spacer/index.js.map +2 -2
  144. package/dist/cjs/biz-components/Specs/index.d.ts +2 -2
  145. package/dist/cjs/biz-components/SpecsComparison/SpecsComparison.d.ts +7 -0
  146. package/dist/cjs/biz-components/SpecsComparison/SpecsComparison.js +2 -0
  147. package/dist/cjs/biz-components/SpecsComparison/SpecsComparison.js.map +7 -0
  148. package/dist/cjs/biz-components/SpecsComparison/index.d.ts +2 -0
  149. package/dist/cjs/biz-components/SpecsComparison/index.js +2 -0
  150. package/dist/cjs/biz-components/SpecsComparison/index.js.map +7 -0
  151. package/dist/cjs/biz-components/SpecsComparison/types.d.ts +34 -0
  152. package/dist/cjs/biz-components/SpecsComparison/types.js +2 -0
  153. package/dist/cjs/biz-components/SpecsComparison/types.js.map +7 -0
  154. package/dist/cjs/biz-components/TabWithImage/TabWithImage.d.ts +7 -0
  155. package/dist/cjs/biz-components/TabWithImage/TabWithImage.js +2 -0
  156. package/dist/cjs/biz-components/TabWithImage/TabWithImage.js.map +7 -0
  157. package/dist/cjs/biz-components/TabWithImage/index.d.ts +2 -0
  158. package/dist/cjs/biz-components/TabWithImage/index.js +2 -0
  159. package/dist/cjs/biz-components/TabWithImage/index.js.map +7 -0
  160. package/dist/cjs/biz-components/TabWithImage/types.d.ts +29 -0
  161. package/dist/cjs/biz-components/TabWithImage/types.js +2 -0
  162. package/dist/cjs/biz-components/TabWithImage/types.js.map +7 -0
  163. package/dist/cjs/biz-components/Tabs/Tabs.d.ts +2 -2
  164. package/dist/cjs/biz-components/Tabs/Tabs.js +1 -1
  165. package/dist/cjs/biz-components/Tabs/Tabs.js.map +1 -1
  166. package/dist/cjs/biz-components/Tabs/types.d.ts +11 -0
  167. package/dist/cjs/biz-components/Tabs/types.js +1 -1
  168. package/dist/cjs/biz-components/Tabs/types.js.map +1 -1
  169. package/dist/cjs/biz-components/TabsGroup/index.d.ts +2 -2
  170. package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.d.ts +7 -0
  171. package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.js +2 -0
  172. package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.js.map +7 -0
  173. package/dist/cjs/biz-components/TabsWithMedia/index.d.ts +2 -0
  174. package/dist/cjs/biz-components/TabsWithMedia/index.js +2 -0
  175. package/dist/cjs/biz-components/TabsWithMedia/index.js.map +7 -0
  176. package/dist/cjs/biz-components/TabsWithMedia/types.d.ts +43 -0
  177. package/dist/cjs/biz-components/TabsWithMedia/types.js +2 -0
  178. package/dist/cjs/biz-components/TabsWithMedia/types.js.map +7 -0
  179. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +11 -0
  180. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js +2 -0
  181. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +7 -0
  182. package/dist/cjs/biz-components/ThreeDCarousel/index.d.ts +2 -0
  183. package/dist/cjs/biz-components/ThreeDCarousel/index.js +2 -0
  184. package/dist/cjs/biz-components/ThreeDCarousel/index.js.map +7 -0
  185. package/dist/cjs/biz-components/ThreeDCarousel/types.d.ts +26 -0
  186. package/dist/cjs/biz-components/ThreeDCarousel/types.js +2 -0
  187. package/dist/cjs/biz-components/ThreeDCarousel/types.js.map +7 -0
  188. package/dist/cjs/biz-components/Title/index.d.ts +2 -2
  189. package/dist/cjs/biz-components/Title/types.js +1 -1
  190. package/dist/cjs/biz-components/Title/types.js.map +1 -1
  191. package/dist/cjs/biz-components/VideoFeature/VideoFeature.d.ts +7 -0
  192. package/dist/cjs/biz-components/VideoFeature/VideoFeature.js +2 -0
  193. package/dist/cjs/biz-components/VideoFeature/VideoFeature.js.map +7 -0
  194. package/dist/cjs/biz-components/VideoFeature/index.d.ts +2 -0
  195. package/dist/cjs/biz-components/VideoFeature/index.js +2 -0
  196. package/dist/cjs/biz-components/VideoFeature/index.js.map +7 -0
  197. package/dist/cjs/biz-components/VideoFeature/types.d.ts +19 -0
  198. package/dist/cjs/biz-components/VideoFeature/types.js +2 -0
  199. package/dist/cjs/biz-components/VideoFeature/types.js.map +7 -0
  200. package/dist/cjs/biz-components/WhyChoose/WhyChoose.d.ts +2 -2
  201. package/dist/cjs/biz-components/index.d.ts +33 -0
  202. package/dist/cjs/biz-components/index.js +1 -1
  203. package/dist/cjs/biz-components/index.js.map +3 -3
  204. package/dist/cjs/components/alert.d.ts +2 -2
  205. package/dist/cjs/components/avatar.d.ts +8 -8
  206. package/dist/cjs/components/container.d.ts +7 -7
  207. package/dist/cjs/components/container.js +1 -1
  208. package/dist/cjs/components/container.js.map +2 -2
  209. package/dist/cjs/components/dialog.d.ts +1 -1
  210. package/dist/cjs/components/drop-down.d.ts +3 -3
  211. package/dist/cjs/components/heading.d.ts +1 -0
  212. package/dist/cjs/components/heading.js +1 -1
  213. package/dist/cjs/components/heading.js.map +3 -3
  214. package/dist/cjs/components/input-number.d.ts +15 -15
  215. package/dist/cjs/components/link.d.ts +6 -6
  216. package/dist/cjs/components/tabs.d.ts +2 -2
  217. package/dist/cjs/components/tabs.js +1 -1
  218. package/dist/cjs/components/tabs.js.map +2 -2
  219. package/dist/cjs/cpn-components/CpnNavigation/index.js +1 -1
  220. package/dist/cjs/cpn-components/CpnNavigation/index.js.map +3 -3
  221. package/dist/cjs/helpers/ScrollLoadVideo.js.map +2 -2
  222. package/dist/cjs/shared/ErrorBoundary.d.ts +18 -0
  223. package/dist/cjs/shared/ErrorBoundary.js +2 -0
  224. package/dist/cjs/shared/ErrorBoundary.js.map +7 -0
  225. package/dist/cjs/shared/Styles.d.ts +2 -2
  226. package/dist/cjs/shared/Styles.js +1 -1
  227. package/dist/cjs/shared/Styles.js.map +3 -3
  228. package/dist/cjs/stories/InlineVideo.stories.js +164 -0
  229. package/dist/cjs/stories/InlineVideo.stories.js.map +7 -0
  230. package/dist/cjs/stories/MarqueeReview.stories.js +19 -0
  231. package/dist/cjs/stories/MarqueeReview.stories.js.map +7 -0
  232. package/dist/cjs/stories/MediaSceneSwitcher.stories.js +2 -0
  233. package/dist/cjs/stories/MediaSceneSwitcher.stories.js.map +7 -0
  234. package/dist/cjs/stories/ProductNav.stories.js +2 -0
  235. package/dist/cjs/stories/ProductNav.stories.js.map +7 -0
  236. package/dist/cjs/stories/ThreeDCarousel.stories.js +118 -0
  237. package/dist/cjs/stories/ThreeDCarousel.stories.js.map +7 -0
  238. package/dist/cjs/stories/featureCards.stories.js +61 -0
  239. package/dist/cjs/stories/featureCards.stories.js.map +7 -0
  240. package/dist/cjs/stories/featureShowcase.stories.js +44 -0
  241. package/dist/cjs/stories/featureShowcase.stories.js.map +7 -0
  242. package/dist/cjs/stories/imageTextFeature.stories.js +50 -0
  243. package/dist/cjs/stories/imageTextFeature.stories.js.map +7 -0
  244. package/dist/cjs/stories/imageWithText.stories.js +84 -0
  245. package/dist/cjs/stories/imageWithText.stories.js.map +7 -0
  246. package/dist/cjs/stories/ksp.stories.js +128 -0
  247. package/dist/cjs/stories/ksp.stories.js.map +7 -0
  248. package/dist/cjs/stories/productCompare.stories.js +54 -0
  249. package/dist/cjs/stories/productCompare.stories.js.map +7 -0
  250. package/dist/cjs/stories/productHero.stories.js +50 -0
  251. package/dist/cjs/stories/productHero.stories.js.map +7 -0
  252. package/dist/cjs/stories/specsComparison.stories.js +105 -0
  253. package/dist/cjs/stories/specsComparison.stories.js.map +7 -0
  254. package/dist/cjs/stories/tabWithImage.stories.js +53 -0
  255. package/dist/cjs/stories/tabWithImage.stories.js.map +7 -0
  256. package/dist/cjs/stories/tabsWithMedia.stories.js +68 -0
  257. package/dist/cjs/stories/tabsWithMedia.stories.js.map +7 -0
  258. package/dist/cjs/stories/videoFeature.stories.js +56 -0
  259. package/dist/cjs/stories/videoFeature.stories.js.map +7 -0
  260. package/dist/cjs/types/props.d.ts +9 -2
  261. package/dist/cjs/types/props.js +1 -1
  262. package/dist/cjs/types/props.js.map +1 -1
  263. package/dist/esm/biz-components/AccordionCards/index.d.ts +2 -2
  264. package/dist/esm/biz-components/AplusDesc/index.d.ts +3 -2
  265. package/dist/esm/biz-components/BrandEquity/BrandEquity.d.ts +3 -2
  266. package/dist/esm/biz-components/BrandEquity/BrandEquity.js +1 -1
  267. package/dist/esm/biz-components/BrandEquity/BrandEquity.js.map +3 -3
  268. package/dist/esm/biz-components/BrandEquity/types.d.ts +0 -1
  269. package/dist/esm/biz-components/Category/index.d.ts +2 -2
  270. package/dist/esm/biz-components/CreativeModule/index.d.ts +3 -2
  271. package/dist/esm/biz-components/DownLoad/index.d.ts +3 -2
  272. package/dist/esm/biz-components/Evaluate/index.d.ts +2 -2
  273. package/dist/esm/biz-components/Faq/Faq.d.ts +2 -2
  274. package/dist/esm/biz-components/Faq/Faq.js +1 -1
  275. package/dist/esm/biz-components/Faq/Faq.js.map +2 -2
  276. package/dist/esm/biz-components/FeatureCards/FeatureCards.d.ts +7 -0
  277. package/dist/esm/biz-components/FeatureCards/FeatureCards.js +2 -0
  278. package/dist/esm/biz-components/FeatureCards/FeatureCards.js.map +7 -0
  279. package/dist/esm/biz-components/FeatureCards/index.d.ts +2 -0
  280. package/dist/esm/biz-components/FeatureCards/index.js +2 -0
  281. package/dist/esm/biz-components/FeatureCards/index.js.map +7 -0
  282. package/dist/esm/biz-components/FeatureCards/types.d.ts +27 -0
  283. package/dist/esm/biz-components/FeatureCards/types.js +1 -0
  284. package/dist/esm/biz-components/FeatureCards/types.js.map +7 -0
  285. package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.d.ts +7 -0
  286. package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.js +2 -0
  287. package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.js.map +7 -0
  288. package/dist/esm/biz-components/FeatureShowcase/index.d.ts +2 -0
  289. package/dist/esm/biz-components/FeatureShowcase/index.js +2 -0
  290. package/dist/esm/biz-components/FeatureShowcase/index.js.map +7 -0
  291. package/dist/esm/biz-components/FeatureShowcase/types.d.ts +23 -0
  292. package/dist/esm/biz-components/FeatureShowcase/types.js +1 -0
  293. package/dist/esm/biz-components/FeatureShowcase/types.js.map +7 -0
  294. package/dist/esm/biz-components/Features/index.d.ts +3 -2
  295. package/dist/esm/biz-components/FootCharger/index.d.ts +3 -2
  296. package/dist/esm/biz-components/FooterNavigation/index.d.ts +3 -2
  297. package/dist/esm/biz-components/GiftBox/index.d.ts +3 -2
  298. package/dist/esm/biz-components/Graphic/index.d.ts +2 -2
  299. package/dist/esm/biz-components/GraphicAttractionBlock/index.d.ts +2 -2
  300. package/dist/esm/biz-components/GraphicMore/index.d.ts +3 -2
  301. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.d.ts +2 -2
  302. package/dist/esm/biz-components/HeaderNavigation/index.d.ts +2 -2
  303. package/dist/esm/biz-components/HeaderNavigation/index.js.map +2 -2
  304. package/dist/esm/biz-components/HeroBanner/HeroBanner.d.ts +2 -2
  305. package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
  306. package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +3 -3
  307. package/dist/esm/biz-components/HeroBanner/types.d.ts +2 -0
  308. package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.d.ts +7 -0
  309. package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.js +2 -0
  310. package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.js.map +7 -0
  311. package/dist/esm/biz-components/ImageTextFeature/index.d.ts +2 -0
  312. package/dist/esm/biz-components/ImageTextFeature/index.js +2 -0
  313. package/dist/esm/biz-components/ImageTextFeature/index.js.map +7 -0
  314. package/dist/esm/biz-components/ImageTextFeature/types.d.ts +31 -0
  315. package/dist/esm/biz-components/ImageTextFeature/types.js +1 -0
  316. package/dist/esm/biz-components/ImageTextFeature/types.js.map +7 -0
  317. package/dist/esm/biz-components/ImageWithText/ImageWithText.d.ts +7 -0
  318. package/dist/esm/biz-components/ImageWithText/ImageWithText.js +2 -0
  319. package/dist/esm/biz-components/ImageWithText/ImageWithText.js.map +7 -0
  320. package/dist/esm/biz-components/ImageWithText/index.d.ts +3 -0
  321. package/dist/esm/biz-components/ImageWithText/index.js +2 -0
  322. package/dist/esm/biz-components/ImageWithText/index.js.map +7 -0
  323. package/dist/esm/biz-components/ImageWithText/types.d.ts +110 -0
  324. package/dist/esm/biz-components/ImageWithText/types.js +2 -0
  325. package/dist/esm/biz-components/ImageWithText/types.js.map +7 -0
  326. package/dist/esm/biz-components/InlineVideo/index.d.ts +16 -0
  327. package/dist/esm/biz-components/InlineVideo/index.js +2 -0
  328. package/dist/esm/biz-components/InlineVideo/index.js.map +7 -0
  329. package/dist/esm/biz-components/Ksp/index.d.ts +44 -0
  330. package/dist/esm/biz-components/Ksp/index.js +2 -0
  331. package/dist/esm/biz-components/Ksp/index.js.map +7 -0
  332. package/dist/esm/biz-components/Listing/BizProductProvider.d.ts +1 -1
  333. package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js +1 -1
  334. package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js.map +2 -2
  335. package/dist/esm/biz-components/Listing/components/PaidShipping/index.d.ts +19 -6
  336. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +2 -2
  337. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +3 -2
  338. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +3 -2
  339. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +3 -2
  340. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +1 -1
  341. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +3 -3
  342. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +3 -2
  343. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +3 -2
  344. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +1 -1
  345. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +1 -1
  346. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +3 -2
  347. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
  348. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +3 -3
  349. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +3 -2
  350. package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.d.ts +1 -0
  351. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.d.ts +3 -2
  352. package/dist/esm/biz-components/Marquee/Marquee.d.ts +2 -2
  353. package/dist/esm/biz-components/MarqueeReview/index.d.ts +42 -0
  354. package/dist/esm/biz-components/MarqueeReview/index.js +2 -0
  355. package/dist/esm/biz-components/MarqueeReview/index.js.map +7 -0
  356. package/dist/esm/biz-components/MediaPlayerBase/index.backup.d.ts +7 -0
  357. package/dist/esm/biz-components/MediaPlayerBase/index.backup.js +2 -0
  358. package/dist/esm/biz-components/MediaPlayerBase/index.backup.js.map +7 -0
  359. package/dist/esm/biz-components/MediaPlayerBase/index.d.ts +3 -2
  360. package/dist/esm/biz-components/MediaPlayerBase/index.js +1 -1
  361. package/dist/esm/biz-components/MediaPlayerBase/index.js.map +3 -3
  362. package/dist/esm/biz-components/MediaPlayerMulti/index.d.ts +3 -2
  363. package/dist/esm/biz-components/MediaPlayerSticky/index.d.ts +2 -2
  364. package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +8 -0
  365. package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +11 -0
  366. package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js.map +7 -0
  367. package/dist/esm/biz-components/MediaSceneSwitcher/index.d.ts +2 -0
  368. package/dist/esm/biz-components/MediaSceneSwitcher/index.js +2 -0
  369. package/dist/esm/biz-components/MediaSceneSwitcher/index.js.map +7 -0
  370. package/dist/esm/biz-components/MediaSceneSwitcher/types.d.ts +19 -0
  371. package/dist/esm/biz-components/MediaSceneSwitcher/types.js +1 -0
  372. package/dist/esm/biz-components/MediaSceneSwitcher/types.js.map +7 -0
  373. package/dist/esm/biz-components/MemberEquity/index.d.ts +2 -2
  374. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +2 -2
  375. package/dist/esm/biz-components/NavigationSearch/index.d.ts +1 -0
  376. package/dist/esm/biz-components/ProductCompare/index.d.ts +54 -0
  377. package/dist/esm/biz-components/ProductCompare/index.js +2 -0
  378. package/dist/esm/biz-components/ProductCompare/index.js.map +7 -0
  379. package/dist/esm/biz-components/ProductHero/ProductHero.d.ts +7 -0
  380. package/dist/esm/biz-components/ProductHero/ProductHero.js +2 -0
  381. package/dist/esm/biz-components/ProductHero/ProductHero.js.map +7 -0
  382. package/dist/esm/biz-components/ProductHero/index.d.ts +2 -0
  383. package/dist/esm/biz-components/ProductHero/index.js +2 -0
  384. package/dist/esm/biz-components/ProductHero/index.js.map +7 -0
  385. package/dist/esm/biz-components/ProductHero/types.d.ts +23 -0
  386. package/dist/esm/biz-components/ProductHero/types.js +1 -0
  387. package/dist/esm/biz-components/ProductHero/types.js.map +7 -0
  388. package/dist/esm/biz-components/ProductNav/ProductNav.d.ts +7 -0
  389. package/dist/esm/biz-components/ProductNav/ProductNav.js +2 -0
  390. package/dist/esm/biz-components/ProductNav/ProductNav.js.map +7 -0
  391. package/dist/esm/biz-components/ProductNav/index.d.ts +2 -0
  392. package/dist/esm/biz-components/ProductNav/index.js +2 -0
  393. package/dist/esm/biz-components/ProductNav/index.js.map +7 -0
  394. package/dist/esm/biz-components/ProductNav/types.d.ts +35 -0
  395. package/dist/esm/biz-components/ProductNav/types.js +1 -0
  396. package/dist/esm/biz-components/ProductNav/types.js.map +7 -0
  397. package/dist/esm/biz-components/SelectStore/index.d.ts +3 -2
  398. package/dist/esm/biz-components/ShelfDisplay/index.d.ts +2 -2
  399. package/dist/esm/biz-components/Slogan/index.d.ts +2 -2
  400. package/dist/esm/biz-components/Spacer/index.d.ts +2 -2
  401. package/dist/esm/biz-components/Spacer/index.js +1 -1
  402. package/dist/esm/biz-components/Spacer/index.js.map +2 -2
  403. package/dist/esm/biz-components/Specs/index.d.ts +2 -2
  404. package/dist/esm/biz-components/SpecsComparison/SpecsComparison.d.ts +7 -0
  405. package/dist/esm/biz-components/SpecsComparison/SpecsComparison.js +2 -0
  406. package/dist/esm/biz-components/SpecsComparison/SpecsComparison.js.map +7 -0
  407. package/dist/esm/biz-components/SpecsComparison/index.d.ts +2 -0
  408. package/dist/esm/biz-components/SpecsComparison/index.js +2 -0
  409. package/dist/esm/biz-components/SpecsComparison/index.js.map +7 -0
  410. package/dist/esm/biz-components/SpecsComparison/types.d.ts +34 -0
  411. package/dist/esm/biz-components/SpecsComparison/types.js +1 -0
  412. package/dist/esm/biz-components/SpecsComparison/types.js.map +7 -0
  413. package/dist/esm/biz-components/TabWithImage/TabWithImage.d.ts +7 -0
  414. package/dist/esm/biz-components/TabWithImage/TabWithImage.js +2 -0
  415. package/dist/esm/biz-components/TabWithImage/TabWithImage.js.map +7 -0
  416. package/dist/esm/biz-components/TabWithImage/index.d.ts +2 -0
  417. package/dist/esm/biz-components/TabWithImage/index.js +2 -0
  418. package/dist/esm/biz-components/TabWithImage/index.js.map +7 -0
  419. package/dist/esm/biz-components/TabWithImage/types.d.ts +29 -0
  420. package/dist/esm/biz-components/TabWithImage/types.js +1 -0
  421. package/dist/esm/biz-components/TabWithImage/types.js.map +7 -0
  422. package/dist/esm/biz-components/Tabs/Tabs.d.ts +2 -2
  423. package/dist/esm/biz-components/Tabs/Tabs.js +1 -1
  424. package/dist/esm/biz-components/Tabs/Tabs.js.map +1 -1
  425. package/dist/esm/biz-components/Tabs/types.d.ts +11 -0
  426. package/dist/esm/biz-components/TabsGroup/index.d.ts +2 -2
  427. package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.d.ts +7 -0
  428. package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.js +2 -0
  429. package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.js.map +7 -0
  430. package/dist/esm/biz-components/TabsWithMedia/index.d.ts +2 -0
  431. package/dist/esm/biz-components/TabsWithMedia/index.js +2 -0
  432. package/dist/esm/biz-components/TabsWithMedia/index.js.map +7 -0
  433. package/dist/esm/biz-components/TabsWithMedia/types.d.ts +43 -0
  434. package/dist/esm/biz-components/TabsWithMedia/types.js +1 -0
  435. package/dist/esm/biz-components/TabsWithMedia/types.js.map +7 -0
  436. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +11 -0
  437. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js +2 -0
  438. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +7 -0
  439. package/dist/esm/biz-components/ThreeDCarousel/index.d.ts +2 -0
  440. package/dist/esm/biz-components/ThreeDCarousel/index.js +2 -0
  441. package/dist/esm/biz-components/ThreeDCarousel/index.js.map +7 -0
  442. package/dist/esm/biz-components/ThreeDCarousel/types.d.ts +26 -0
  443. package/dist/esm/biz-components/ThreeDCarousel/types.js +1 -0
  444. package/dist/esm/biz-components/ThreeDCarousel/types.js.map +7 -0
  445. package/dist/esm/biz-components/Title/index.d.ts +2 -2
  446. package/dist/esm/biz-components/VideoFeature/VideoFeature.d.ts +7 -0
  447. package/dist/esm/biz-components/VideoFeature/VideoFeature.js +2 -0
  448. package/dist/esm/biz-components/VideoFeature/VideoFeature.js.map +7 -0
  449. package/dist/esm/biz-components/VideoFeature/index.d.ts +2 -0
  450. package/dist/esm/biz-components/VideoFeature/index.js +2 -0
  451. package/dist/esm/biz-components/VideoFeature/index.js.map +7 -0
  452. package/dist/esm/biz-components/VideoFeature/types.d.ts +19 -0
  453. package/dist/esm/biz-components/VideoFeature/types.js +1 -0
  454. package/dist/esm/biz-components/VideoFeature/types.js.map +7 -0
  455. package/dist/esm/biz-components/WhyChoose/WhyChoose.d.ts +2 -2
  456. package/dist/esm/biz-components/index.d.ts +33 -0
  457. package/dist/esm/biz-components/index.js +1 -1
  458. package/dist/esm/biz-components/index.js.map +2 -2
  459. package/dist/esm/components/alert.d.ts +2 -2
  460. package/dist/esm/components/avatar.d.ts +8 -8
  461. package/dist/esm/components/container.d.ts +7 -7
  462. package/dist/esm/components/container.js +1 -1
  463. package/dist/esm/components/container.js.map +2 -2
  464. package/dist/esm/components/dialog.d.ts +1 -1
  465. package/dist/esm/components/drop-down.d.ts +3 -3
  466. package/dist/esm/components/heading.d.ts +1 -0
  467. package/dist/esm/components/heading.js +1 -1
  468. package/dist/esm/components/heading.js.map +3 -3
  469. package/dist/esm/components/input-number.d.ts +15 -15
  470. package/dist/esm/components/link.d.ts +6 -6
  471. package/dist/esm/components/tabs.d.ts +2 -2
  472. package/dist/esm/components/tabs.js +1 -1
  473. package/dist/esm/components/tabs.js.map +2 -2
  474. package/dist/esm/cpn-components/CpnNavigation/index.js +1 -1
  475. package/dist/esm/cpn-components/CpnNavigation/index.js.map +2 -2
  476. package/dist/esm/helpers/ScrollLoadVideo.js.map +2 -2
  477. package/dist/esm/shared/ErrorBoundary.d.ts +18 -0
  478. package/dist/esm/shared/ErrorBoundary.js +2 -0
  479. package/dist/esm/shared/ErrorBoundary.js.map +7 -0
  480. package/dist/esm/shared/Styles.d.ts +2 -2
  481. package/dist/esm/shared/Styles.js +1 -1
  482. package/dist/esm/shared/Styles.js.map +3 -3
  483. package/dist/esm/stories/InlineVideo.stories.js +164 -0
  484. package/dist/esm/stories/InlineVideo.stories.js.map +7 -0
  485. package/dist/esm/stories/MarqueeReview.stories.js +19 -0
  486. package/dist/esm/stories/MarqueeReview.stories.js.map +7 -0
  487. package/dist/esm/stories/MediaSceneSwitcher.stories.js +2 -0
  488. package/dist/esm/stories/MediaSceneSwitcher.stories.js.map +7 -0
  489. package/dist/esm/stories/ProductNav.stories.js +2 -0
  490. package/dist/esm/stories/ProductNav.stories.js.map +7 -0
  491. package/dist/esm/stories/ThreeDCarousel.stories.js +118 -0
  492. package/dist/esm/stories/ThreeDCarousel.stories.js.map +7 -0
  493. package/dist/esm/stories/featureCards.stories.js +61 -0
  494. package/dist/esm/stories/featureCards.stories.js.map +7 -0
  495. package/dist/esm/stories/featureShowcase.stories.js +44 -0
  496. package/dist/esm/stories/featureShowcase.stories.js.map +7 -0
  497. package/dist/esm/stories/imageTextFeature.stories.js +50 -0
  498. package/dist/esm/stories/imageTextFeature.stories.js.map +7 -0
  499. package/dist/esm/stories/imageWithText.stories.js +84 -0
  500. package/dist/esm/stories/imageWithText.stories.js.map +7 -0
  501. package/dist/esm/stories/ksp.stories.js +128 -0
  502. package/dist/esm/stories/ksp.stories.js.map +7 -0
  503. package/dist/esm/stories/productCompare.stories.js +54 -0
  504. package/dist/esm/stories/productCompare.stories.js.map +7 -0
  505. package/dist/esm/stories/productHero.stories.js +50 -0
  506. package/dist/esm/stories/productHero.stories.js.map +7 -0
  507. package/dist/esm/stories/specsComparison.stories.js +105 -0
  508. package/dist/esm/stories/specsComparison.stories.js.map +7 -0
  509. package/dist/esm/stories/tabWithImage.stories.js +53 -0
  510. package/dist/esm/stories/tabWithImage.stories.js.map +7 -0
  511. package/dist/esm/stories/tabsWithMedia.stories.js +68 -0
  512. package/dist/esm/stories/tabsWithMedia.stories.js.map +7 -0
  513. package/dist/esm/stories/videoFeature.stories.js +56 -0
  514. package/dist/esm/stories/videoFeature.stories.js.map +7 -0
  515. package/dist/esm/types/props.d.ts +9 -2
  516. package/dist/tokens/base.css +3 -0
  517. package/package.json +18 -13
  518. package/style.css +11 -2
  519. package/tailwind.config.js +24 -0
  520. package/dist/cjs/stories/HeroBanner.stories.d.ts +0 -27
  521. package/dist/cjs/stories/MemberEquity.stories.d.ts +0 -9
  522. package/dist/cjs/stories/MultiLayoutGraphicBlock.stories.d.ts +0 -9
  523. package/dist/cjs/stories/accordionCards.stories.d.ts +0 -17
  524. package/dist/cjs/stories/alert.stories.d.ts +0 -27
  525. package/dist/cjs/stories/avatar.stories.d.ts +0 -39
  526. package/dist/cjs/stories/badge.stories.d.ts +0 -31
  527. package/dist/cjs/stories/bizTabs.stories.d.ts +0 -7
  528. package/dist/cjs/stories/board.stories.d.ts +0 -6
  529. package/dist/cjs/stories/brandEquity.stories.d.ts +0 -16
  530. package/dist/cjs/stories/button.stories.d.ts +0 -56
  531. package/dist/cjs/stories/card.stories.d.ts +0 -27
  532. package/dist/cjs/stories/carousel.stories.d.ts +0 -8
  533. package/dist/cjs/stories/category.stories.d.ts +0 -17
  534. package/dist/cjs/stories/checkbox.stories.d.ts +0 -46
  535. package/dist/cjs/stories/container.stories.d.ts +0 -28
  536. package/dist/cjs/stories/cpnBanner.stories.d.ts +0 -14
  537. package/dist/cjs/stories/cpnCountdown.stories.d.ts +0 -12
  538. package/dist/cjs/stories/cpnNavigation.stories.d.ts +0 -14
  539. package/dist/cjs/stories/cpnProductcard.stories.d.ts +0 -14
  540. package/dist/cjs/stories/cpnTitle.stories.d.ts +0 -14
  541. package/dist/cjs/stories/creativeModule.stories.d.ts +0 -19
  542. package/dist/cjs/stories/dialog.stories.d.ts +0 -20
  543. package/dist/cjs/stories/drawer.stories.d.ts +0 -20
  544. package/dist/cjs/stories/drop-down.stories.d.ts +0 -16
  545. package/dist/cjs/stories/evaluate.stories.d.ts +0 -16
  546. package/dist/cjs/stories/faq.stories.d.ts +0 -21
  547. package/dist/cjs/stories/graphic.stories.d.ts +0 -64
  548. package/dist/cjs/stories/graphicAttractionBlock.stories.d.ts +0 -6
  549. package/dist/cjs/stories/grid.stories.d.ts +0 -22
  550. package/dist/cjs/stories/heading.stories.d.ts +0 -84
  551. package/dist/cjs/stories/input-number.stories.d.ts +0 -39
  552. package/dist/cjs/stories/input.stories.d.ts +0 -35
  553. package/dist/cjs/stories/link.stories.d.ts +0 -69
  554. package/dist/cjs/stories/marquee.stories.d.ts +0 -30
  555. package/dist/cjs/stories/mediaplayerBase.stories.d.ts +0 -6
  556. package/dist/cjs/stories/mediaplayerMulti.stories.d.ts +0 -16
  557. package/dist/cjs/stories/picture.stories.d.ts +0 -22
  558. package/dist/cjs/stories/popover.stories.d.ts +0 -17
  559. package/dist/cjs/stories/radio.stories.d.ts +0 -39
  560. package/dist/cjs/stories/shelfDisplay.stories.d.ts +0 -16
  561. package/dist/cjs/stories/skeleton.stories.d.ts +0 -20
  562. package/dist/cjs/stories/slogan.stories.d.ts +0 -20
  563. package/dist/cjs/stories/specs.stories.d.ts +0 -13
  564. package/dist/cjs/stories/tabs.stories.d.ts +0 -373
  565. package/dist/cjs/stories/text.stories.d.ts +0 -86
  566. package/dist/cjs/stories/whychoose.stories.d.ts +0 -21
  567. package/dist/esm/stories/HeroBanner.stories.d.ts +0 -27
  568. package/dist/esm/stories/MemberEquity.stories.d.ts +0 -9
  569. package/dist/esm/stories/MultiLayoutGraphicBlock.stories.d.ts +0 -9
  570. package/dist/esm/stories/accordionCards.stories.d.ts +0 -17
  571. package/dist/esm/stories/alert.stories.d.ts +0 -27
  572. package/dist/esm/stories/avatar.stories.d.ts +0 -39
  573. package/dist/esm/stories/badge.stories.d.ts +0 -31
  574. package/dist/esm/stories/bizTabs.stories.d.ts +0 -7
  575. package/dist/esm/stories/board.stories.d.ts +0 -6
  576. package/dist/esm/stories/brandEquity.stories.d.ts +0 -16
  577. package/dist/esm/stories/button.stories.d.ts +0 -56
  578. package/dist/esm/stories/card.stories.d.ts +0 -27
  579. package/dist/esm/stories/carousel.stories.d.ts +0 -8
  580. package/dist/esm/stories/category.stories.d.ts +0 -17
  581. package/dist/esm/stories/checkbox.stories.d.ts +0 -46
  582. package/dist/esm/stories/container.stories.d.ts +0 -28
  583. package/dist/esm/stories/cpnBanner.stories.d.ts +0 -14
  584. package/dist/esm/stories/cpnCountdown.stories.d.ts +0 -12
  585. package/dist/esm/stories/cpnNavigation.stories.d.ts +0 -14
  586. package/dist/esm/stories/cpnProductcard.stories.d.ts +0 -14
  587. package/dist/esm/stories/cpnTitle.stories.d.ts +0 -14
  588. package/dist/esm/stories/creativeModule.stories.d.ts +0 -19
  589. package/dist/esm/stories/dialog.stories.d.ts +0 -20
  590. package/dist/esm/stories/drawer.stories.d.ts +0 -20
  591. package/dist/esm/stories/drop-down.stories.d.ts +0 -16
  592. package/dist/esm/stories/evaluate.stories.d.ts +0 -16
  593. package/dist/esm/stories/faq.stories.d.ts +0 -21
  594. package/dist/esm/stories/graphic.stories.d.ts +0 -64
  595. package/dist/esm/stories/graphicAttractionBlock.stories.d.ts +0 -6
  596. package/dist/esm/stories/grid.stories.d.ts +0 -22
  597. package/dist/esm/stories/heading.stories.d.ts +0 -84
  598. package/dist/esm/stories/input-number.stories.d.ts +0 -39
  599. package/dist/esm/stories/input.stories.d.ts +0 -35
  600. package/dist/esm/stories/link.stories.d.ts +0 -69
  601. package/dist/esm/stories/marquee.stories.d.ts +0 -30
  602. package/dist/esm/stories/mediaplayerBase.stories.d.ts +0 -6
  603. package/dist/esm/stories/mediaplayerMulti.stories.d.ts +0 -16
  604. package/dist/esm/stories/picture.stories.d.ts +0 -22
  605. package/dist/esm/stories/popover.stories.d.ts +0 -17
  606. package/dist/esm/stories/radio.stories.d.ts +0 -39
  607. package/dist/esm/stories/shelfDisplay.stories.d.ts +0 -16
  608. package/dist/esm/stories/skeleton.stories.d.ts +0 -20
  609. package/dist/esm/stories/slogan.stories.d.ts +0 -20
  610. package/dist/esm/stories/specs.stories.d.ts +0 -13
  611. package/dist/esm/stories/tabs.stories.d.ts +0 -373
  612. package/dist/esm/stories/text.stories.d.ts +0 -86
  613. package/dist/esm/stories/whychoose.stories.d.ts +0 -21
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/MediaPlayerBase/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport { useState, useRef, useMemo, useEffect, forwardRef, useImperativeHandle } from 'react'\nimport { debounce } from 'lodash'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport Button from '../../components/button.js'\nimport { VideoModal } from '../VideoModal/index.js'\nimport { convertLexicalToHTML } from '@payloadcms/richtext-lexical/html'\nimport type { MediaPlayerBaseProps } from './types.js'\n// import { Right } from './right.js'\nimport { useInView } from 'react-intersection-observer'\nimport type { HTMLConvertersFunction } from '@payloadcms/richtext-lexical/html'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport ScrollLoadVideo from '../../helpers/ScrollLoadVideo.js'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\n\nconst componentName = 'media_player_base'\nconst componentType = 'video'\n\nconst htmlConverters: HTMLConvertersFunction = ({ defaultConverters }) => ({\n ...defaultConverters,\n text: args => {\n const { node } = args\n // \u68C0\u67E5\u662F\u5426\u6709\u81EA\u5B9A\u4E49 color\n if (node.$ && node.$.color) {\n return `<span class=\"lexical-${node.$.color}\">${node.text}</span>`\n }\n return node.text\n },\n})\n\nconst MediaPlayerBase = forwardRef<HTMLDivElement, MediaPlayerBaseProps>(\n (\n {\n className = '',\n id,\n onBtnClick,\n data: { title, videoTitle, btnText, youtubeId, video, mobileVideo, theme, img, shape, titleAnimation, ...rest },\n },\n ref\n ) => {\n const { sticky } = rest\n const [isPlaying, setIsPlaying] = useState(false)\n const [btb, setbtb] = useState(0)\n const [titleHeight, setTitleHeight] = useState(0)\n const [videoHeightProgress, setVideoHeightProgress] = useState(0)\n const [visible, setVisible] = useState<boolean>(false)\n\n const videoRef = useRef<HTMLVideoElement>(null)\n const bgRef = useRef<HTMLImageElement>(null)\n const titleRef = useRef<HTMLDivElement>(null)\n const titleFadeInRef = useRef<HTMLDivElement>(null)\n const trackRef = useRef<HTMLDivElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n const heightTriggerRef = useRef<ScrollTrigger | null>(null)\n const { ref: inViewRef, inView } = useInView()\n\n useImperativeHandle(ref, () => titleRef.current as HTMLDivElement)\n\n const title_html =\n typeof title === 'string' ? title : title && convertLexicalToHTML({ data: title, converters: htmlConverters })\n const videoTitle_html =\n typeof videoTitle === 'string'\n ? videoTitle\n : videoTitle && convertLexicalToHTML({ data: videoTitle, converters: htmlConverters })\n\n useEffect(() => {\n if (inView) {\n videoRef.current?.play()\n setIsPlaying(true)\n } else {\n videoRef.current?.pause()\n setIsPlaying(false)\n }\n }, [inView])\n\n const debouncedHandleResize = debounce(() => {\n if (titleRef.current) {\n const rect = titleRef.current.getBoundingClientRect()\n const screenHeight = window.innerHeight\n const scrollTop = window.scrollY || window.pageYOffset\n const elementBottomToPageTop = rect.bottom + scrollTop\n const pageHeight = document.documentElement.scrollHeight\n const distanceToPageBottom = pageHeight - elementBottomToPageTop\n setbtb(distanceToPageBottom > screenHeight ? screenHeight : distanceToPageBottom)\n }\n if (titleRef.current) {\n const titleHeight = titleRef.current.clientHeight\n const screenHeight = window.innerHeight\n setTitleHeight(titleHeight + screenHeight)\n }\n }, 600)\n\n useEffect(() => {\n debouncedHandleResize()\n window.addEventListener('resize', debouncedHandleResize)\n return () => {\n window.removeEventListener('resize', debouncedHandleResize)\n }\n }, [])\n\n useEffect(() => {\n function gsapResize() {\n if (!titleFadeInRef.current || titleAnimation !== 'fade-in') return\n const height = titleFadeInRef.current?.clientHeight || 80\n splitTextInstance.current = new SplitText(titleFadeInRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'top center-=10%',\n end: `top+=${height * 1.5 + 80}px center-=10%`,\n scrub: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length\n const interval = 1 / total\n const overlap = 0.5\n words.forEach((word: any, i: number) => {\n const start = (i / total) * (1 - overlap)\n const width = interval * (1 + overlap)\n let opacity = (progress - start) / width\n opacity = Math.max(0, Math.min(opacity, 1))\n gsap.set(word, { opacity })\n })\n gsap.set(bgRef.current, { opacity: progress })\n },\n })\n }\n\n function gsapVideoHeightResize() {\n heightTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom',\n end: `bottom top`,\n // markers: true,\n scrub: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n console.log('progress__', progress)\n setVideoHeightProgress(progress)\n },\n })\n }\n\n if (inView) {\n gsapResize()\n gsapVideoHeightResize()\n }\n\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n // ScrollTrigger.getAll().forEach((t: { kill: () => any }) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n heightTriggerRef.current && heightTriggerRef.current.kill()\n }\n }, [titleAnimation, inView])\n\n useExposure(trackRef, {\n componentType,\n componentName,\n componentTitle: videoTitle_html,\n })\n\n const zIndexVideo = useMemo(() => {\n if (inView && videoHeightProgress > 0 && videoHeightProgress < 0.9) return 3\n if (inView) return 2\n return 1\n }, [videoHeightProgress, inView])\n\n const aspect =\n 'lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] desktop:aspect-w-[1024] desktop:aspect-h-[520] laptop:aspect-w-[1024] laptop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]'\n return (\n <>\n {sticky && (\n <div\n ref={titleRef}\n className={cn(\n 'relative z-10',\n aspect,\n {\n 'aiui-dark': theme === 'dark',\n 'rounded-box': shape === 'rounded',\n },\n className\n )}\n >\n <div ref={inViewRef}>\n {!titleAnimation && (\n <div className=\"media-content absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 px-4 text-center\">\n {title_html && !isPlaying && (\n <div\n className=\"lg-desktop:text-[64px] text-btn-primary-foreground text-center text-[40px] font-bold leading-none lg:text-5xl\"\n dangerouslySetInnerHTML={{ __html: title_html }}\n />\n )}\n {videoTitle_html && isPlaying && (\n <div\n className=\"lg-desktop:text-[64px] text-btn-primary-foreground text-center text-[40px] font-bold leading-none lg:text-5xl\"\n dangerouslySetInnerHTML={{ __html: videoTitle_html }}\n />\n )}\n {btnText && (\n <Button\n variant=\"link\"\n className={cn('member-equity-button-secondary text-btn-primary-foreground')}\n onClick={() => {\n setVisible(true)\n // if (isPlaying) {\n // if (videoRef.current) {\n // videoRef.current.pause()\n // }\n // setIsPlaying(false)\n // } else {\n // if (videoRef.current) {\n // videoRef.current.play()\n // }\n // setIsPlaying(true)\n // }\n onBtnClick && onBtnClick?.()\n }}\n >\n {btnText}\n {/* <Right /> */}\n </Button>\n )}\n </div>\n )}\n </div>\n </div>\n )}\n <div\n style={\n sticky\n ? {\n marginBottom: `-${btb}px`,\n marginTop: `-${titleHeight}px`,\n zIndex: zIndexVideo,\n }\n : {}\n }\n className=\"relative\"\n >\n <div className=\"sticky top-0 \">\n <div\n id={id}\n className={cn('relative overflow-hidden', sticky ? 'h-screen w-full' : aspect, {\n 'aiui-dark': theme === 'dark',\n 'rounded-box': shape === 'rounded',\n })}\n >\n {titleAnimation === 'fade-in' && title_html && (\n <div\n ref={titleFadeInRef}\n className=\"lg-desktop:text-[64px] text-btn-primary-foreground absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 text-center text-[40px] font-bold leading-none lg:text-5xl\"\n dangerouslySetInnerHTML={{ __html: title_html }}\n />\n )}\n <div\n className=\"media-cover left-0 top-0 h-screen w-screen\"\n style={{ height: `${102 - videoHeightProgress * 100}vh` }}\n >\n <ScrollLoadVideo\n videoRef={videoRef}\n poster={img?.url || ''}\n src={video?.url!}\n className=\"tablet:block hidden size-full\"\n videoClassName=\"object-cover\"\n muted\n loop\n playsInline\n autoplay\n webkit-playsinline\n x5-playsinline\n />\n <ScrollLoadVideo\n videoRef={videoRef}\n poster={img?.url || ''}\n src={mobileVideo?.url || video?.url!}\n className=\"tablet:hidden block size-full\"\n videoClassName=\"object-cover\"\n muted\n loop\n playsInline\n autoplay\n webkit-playsinline\n x5-playsinline\n />\n <div\n ref={bgRef}\n className=\"absolute left-0 top-0 z-10 size-full opacity-0\"\n style={{\n background: 'rgba(0, 0, 0, 0.2)',\n }}\n />\n </div>\n </div>\n </div>\n <div\n className={cn(sticky && 'relative box-content block', aspect)}\n style={sticky ? { height: `${btb}px` } : {}}\n ref={trackRef}\n />\n </div>\n {visible && youtubeId && (\n <VideoModal visible={visible} youTubeId={youtubeId} onCloseModal={() => setVisible(false)} />\n )}\n </>\n )\n }\n)\n\nexport default withLayout(MediaPlayerBase)\n"],
5
- "mappings": "aAmLM,mBAAAA,GAkBc,OAAAC,EAFJ,QAAAC,MAhBV,oBAlLN,OAAS,YAAAC,EAAU,UAAAC,EAAQ,WAAAC,GAAS,aAAAC,EAAW,cAAAC,GAAY,uBAAAC,OAA2B,QACtF,OAAS,YAAAC,OAAgB,SACzB,OAAS,MAAAC,MAAU,yBACnB,OAA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AAAjD,EAACgB,EAAA,CACC,SAAUqC,EACV,OAAQhB,GAAK,KAAO,GACpB,IAAKH,GAAO,IACZ,UAAU,gCACV,eAAe,eACf,MAAK,GACL,KAAI,GACJ,YAAW,GACX,SAAQ,GACR,qBAAkB,GAClB,iBAAc,GAChB,EACAlC,EAACgB,EAAA,CACC,SAAUqC,EACV,OAAQhB,GAAK,KAAO,GACpB,IAAKF,GAAa,KAAOD,GAAO,IAChC,UAAU,gCACV,eAAe,eACf,MAAK,GACL,KAAI,GACJ,YAAW,GACX,SAAQ,GACR,qBAAkB,GAClB,iBAAc,GAChB,EACAlC,EAAC,OACC,IAAKsD,EACL,UAAU,iDACV,MAAO,CACL,WAAY,oBACd,EACF,GACF,GACF,EACF,EACAtD,EAAC,OACC,UAAWS,EAAGiC,GAAU,6BAA8B4C,CAAM,EAC5D,MAAO5C,EAAS,CAAE,OAAQ,GAAGG,CAAG,IAAK,EAAI,CAAC,EAC1C,IAAKY,EACP,GACF,EACCN,GAAWlB,GACVjC,EAACY,GAAA,CAAW,QAASuC,EAAS,UAAWlB,EAAW,aAAc,IAAMmB,EAAW,EAAK,EAAG,GAE/F,CAEJ,CACF,EAEA,IAAOmC,GAAQ7E,GAAWgB,EAAe",
6
- "names": ["Fragment", "jsx", "jsxs", "useState", "useRef", "useMemo", "useEffect", "forwardRef", "useImperativeHandle", "debounce", "cn", "withLayout", "Button", "VideoModal", "convertLexicalToHTML", "useInView", "useExposure", "ScrollLoadVideo", "gsap", "SplitText", "ScrollTrigger", "componentName", "componentType", "htmlConverters", "defaultConverters", "args", "node", "MediaPlayerBase", "className", "id", "onBtnClick", "title", "videoTitle", "btnText", "youtubeId", "video", "mobileVideo", "theme", "img", "shape", "titleAnimation", "rest", "ref", "sticky", "isPlaying", "setIsPlaying", "btb", "setbtb", "titleHeight", "setTitleHeight", "videoHeightProgress", "setVideoHeightProgress", "visible", "setVisible", "videoRef", "bgRef", "titleRef", "titleFadeInRef", "trackRef", "splitTextInstance", "scrollTriggerRef", "heightTriggerRef", "inViewRef", "inView", "title_html", "videoTitle_html", "debouncedHandleResize", "rect", "screenHeight", "scrollTop", "elementBottomToPageTop", "distanceToPageBottom", "gsapResize", "height", "words", "self", "progress", "total", "interval", "overlap", "word", "i", "start", "width", "opacity", "gsapVideoHeightResize", "zIndexVideo", "aspect", "MediaPlayerBase_default"]
4
+ "sourcesContent": ["'use client'\nimport { useState, useRef, useMemo, useEffect, forwardRef, useImperativeHandle, useCallback } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport Button from '../../components/button.js'\nimport { VideoModal } from '../VideoModal/index.js'\nimport { convertLexicalToHTML } from '@payloadcms/richtext-lexical/html'\nimport type { MediaPlayerBaseProps } from './types.js'\nimport { useInView } from 'react-intersection-observer'\nimport type { HTMLConvertersFunction } from '@payloadcms/richtext-lexical/html'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport ScrollLoadVideo from '../../helpers/ScrollLoadVideo.js'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\n\nconst componentName = 'media_player_base'\nconst componentType = 'video'\n\n// \u52A8\u753B\u914D\u7F6E\u5E38\u91CF\nconst ANIMATION_CONFIG = {\n TEXT_START_OFFSET: '10%',\n TEXT_ANIMATION_MULTIPLIER: 1.5,\n TEXT_ANIMATION_OFFSET: 80,\n VIDEO_HEIGHT_BASE: 102,\n OVERLAP_FACTOR: 0.5,\n VIDEO_PROGRESS_THRESHOLD: 0.9,\n HEIGHT_CHANGE_THRESHOLD: 5, // \u9AD8\u5EA6\u53D8\u5316\u9608\u503C(px)\n} as const\n\nconst htmlConverters: HTMLConvertersFunction = ({ defaultConverters }) => ({\n ...defaultConverters,\n text: args => {\n const { node } = args\n // \u68C0\u67E5\u662F\u5426\u6709\u81EA\u5B9A\u4E49 color\n if (node.$ && node.$.color) {\n return `<span class=\"lexical-${node.$.color}\">${node.text}</span>`\n }\n return node.text\n },\n})\n\ninterface ScrollTriggerInstance {\n progress: number\n kill: () => void\n}\n\nconst MediaPlayerBase = forwardRef<HTMLDivElement, MediaPlayerBaseProps>(\n (\n {\n className = '',\n id,\n onBtnClick,\n data: { title, videoTitle, btnText, youtubeId, video, mobileVideo, theme, img, shape, titleAnimation, ...rest },\n },\n ref\n ) => {\n const { sticky } = rest\n const [isPlaying, setIsPlaying] = useState(false)\n const [btb, setbtb] = useState(0)\n const [titleHeight, setTitleHeight] = useState(0)\n const [videoHeightProgress, setVideoHeightProgress] = useState(0)\n const [visible, setVisible] = useState<boolean>(false)\n\n const videoRef = useRef<HTMLVideoElement>(null)\n const bgRef = useRef<HTMLDivElement>(null)\n const titleRef = useRef<HTMLDivElement>(null)\n const titleFadeInRef = useRef<HTMLDivElement>(null)\n const trackRef = useRef<HTMLDivElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n const scrollTriggerRef = useRef<ScrollTriggerInstance | null>(null)\n const heightTriggerRef = useRef<ScrollTriggerInstance | null>(null)\n const { ref: inViewRef, inView } = useInView()\n\n useImperativeHandle(ref, () => titleRef.current as HTMLDivElement)\n\n const title_html =\n typeof title === 'string' ? title : title && convertLexicalToHTML({ data: title, converters: htmlConverters })\n const videoTitle_html =\n typeof videoTitle === 'string'\n ? videoTitle\n : videoTitle && convertLexicalToHTML({ data: videoTitle, converters: htmlConverters })\n\n // \u89C6\u9891\u64AD\u653E\u63A7\u5236\n useEffect(() => {\n if (inView) {\n videoRef.current?.play()\n setIsPlaying(true)\n } else {\n videoRef.current?.pause()\n setIsPlaying(false)\n }\n }, [inView])\n\n // \u4F18\u5316: \u4F7F\u7528 ResizeObserver \u66FF\u4EE3 debounce + resize \u4E8B\u4EF6\n useEffect(() => {\n if (!titleRef.current || !sticky) return\n\n // \u8BA1\u7B97\u5E03\u5C40\u5C3A\u5BF8\u7684\u6838\u5FC3\u51FD\u6570\n const calculateLayout = () => {\n if (!titleRef.current) return\n\n const rect = titleRef.current.getBoundingClientRect()\n const screenHeight = window.innerHeight\n const scrollTop = window.scrollY || window.pageYOffset\n const elementBottomToPageTop = rect.bottom + scrollTop\n const pageHeight = document.documentElement.scrollHeight\n const distanceToPageBottom = pageHeight - elementBottomToPageTop\n\n const newBtb = distanceToPageBottom > screenHeight ? screenHeight : distanceToPageBottom\n const newTitleHeight = titleRef.current.clientHeight + screenHeight\n\n // \u4F7F\u7528\u9608\u503C\u68C0\u6D4B,\u907F\u514D\u9891\u7E41\u66F4\u65B0\n setbtb(prevBtb => {\n return Math.abs(newBtb - prevBtb) > ANIMATION_CONFIG.HEIGHT_CHANGE_THRESHOLD ? newBtb : prevBtb\n })\n\n setTitleHeight(prevHeight => {\n return Math.abs(newTitleHeight - prevHeight) > ANIMATION_CONFIG.HEIGHT_CHANGE_THRESHOLD\n ? newTitleHeight\n : prevHeight\n })\n }\n\n // \u521D\u59CB\u8BA1\u7B97\n calculateLayout()\n\n // ResizeObserver \u76D1\u542C\u5C3A\u5BF8\u53D8\u5316\n const resizeObserver = new ResizeObserver(() => {\n // \u4F7F\u7528 requestAnimationFrame \u6279\u91CF\u66F4\u65B0\n requestAnimationFrame(() => {\n calculateLayout()\n })\n })\n\n resizeObserver.observe(titleRef.current)\n\n // \u76D1\u542C\u7A97\u53E3\u6EDA\u52A8(\u7528\u4E8E\u8BA1\u7B97 btb)\n const handleScroll = () => {\n requestAnimationFrame(() => {\n calculateLayout()\n })\n }\n\n // \u4F7F\u7528\u8282\u6D41\u7684\u6EDA\u52A8\u76D1\u542C\n let scrollTimeout: NodeJS.Timeout\n const throttledScroll = () => {\n if (!scrollTimeout) {\n scrollTimeout = setTimeout(() => {\n handleScroll()\n scrollTimeout = null as any\n }, 100)\n }\n }\n\n window.addEventListener('scroll', throttledScroll, { passive: true })\n\n return () => {\n resizeObserver.disconnect()\n window.removeEventListener('scroll', throttledScroll)\n if (scrollTimeout) clearTimeout(scrollTimeout)\n }\n }, [sticky])\n\n // \u4F18\u5316: GSAP \u52A8\u753B\u8BBE\u7F6E\n useEffect(() => {\n if (!inView || !titleAnimation || titleAnimation !== 'fade-in' || !titleFadeInRef.current) return\n\n const titleElement = titleFadeInRef.current\n const height = titleElement.clientHeight || 80\n\n // \u5206\u8BCD\n splitTextInstance.current = new SplitText(titleElement, {\n type: 'words',\n wordsClass: 'word',\n })\n\n const words = splitTextInstance.current.words\n const total = words.length\n const interval = 1 / total\n\n // \u9884\u8BA1\u7B97\u6BCF\u4E2A\u5355\u8BCD\u7684\u52A8\u753B\u53C2\u6570 - \u907F\u514D\u6BCF\u5E27\u91CD\u590D\u8BA1\u7B97\n const wordAnimations = words.map((_, i) => {\n const start = (i / total) * (1 - ANIMATION_CONFIG.OVERLAP_FACTOR)\n const width = interval * (1 + ANIMATION_CONFIG.OVERLAP_FACTOR)\n return { start, width }\n })\n\n // \u521D\u59CB\u5316\u900F\u660E\u5EA6\n gsap.set(words, { opacity: 0 })\n\n // \u521B\u5EFA\u6587\u5B57\u6DE1\u5165 ScrollTrigger\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: `top center-=${ANIMATION_CONFIG.TEXT_START_OFFSET}`,\n end: `top+=${height * ANIMATION_CONFIG.TEXT_ANIMATION_MULTIPLIER + ANIMATION_CONFIG.TEXT_ANIMATION_OFFSET}px center-=${ANIMATION_CONFIG.TEXT_START_OFFSET}`,\n scrub: true,\n onUpdate: self => {\n const progress = self.progress\n\n // \u6279\u91CF\u66F4\u65B0\u6587\u5B57\u900F\u660E\u5EA6\n words.forEach((word, i) => {\n const { start, width } = wordAnimations[i]\n let opacity = (progress - start) / width\n opacity = Math.max(0, Math.min(opacity, 1))\n gsap.set(word, { opacity })\n })\n\n // \u66F4\u65B0\u80CC\u666F\u900F\u660E\u5EA6\n if (bgRef.current) {\n gsap.set(bgRef.current, { opacity: progress })\n }\n },\n }) as ScrollTriggerInstance\n\n return () => {\n splitTextInstance.current?.revert()\n scrollTriggerRef.current?.kill()\n }\n }, [titleAnimation, inView])\n\n // \u89C6\u9891\u9AD8\u5EA6\u52A8\u753B ScrollTrigger\n useEffect(() => {\n if (!inView || !titleRef.current) return\n\n heightTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom',\n end: 'bottom top',\n scrub: true,\n onUpdate: self => {\n setVideoHeightProgress(self.progress)\n },\n }) as ScrollTriggerInstance\n\n return () => {\n heightTriggerRef.current?.kill()\n }\n }, [inView])\n\n // \u66DD\u5149\u57CB\u70B9\n useExposure(trackRef, {\n componentType,\n componentName,\n componentTitle: videoTitle_html,\n })\n\n // \u8BA1\u7B97\u89C6\u9891\u5BB9\u5668\u7684 z-index\n const zIndexVideo = useMemo(() => {\n if (inView && videoHeightProgress > 0 && videoHeightProgress < ANIMATION_CONFIG.VIDEO_PROGRESS_THRESHOLD) return 3\n if (inView) return 2\n return 1\n }, [videoHeightProgress, inView])\n\n // \u5904\u7406\u6309\u94AE\u70B9\u51FB\n const handleBtnClick = useCallback(() => {\n setVisible(true)\n onBtnClick?.()\n }, [onBtnClick])\n\n const aspect =\n 'lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] desktop:aspect-w-[1024] desktop:aspect-h-[520] laptop:aspect-w-[1024] laptop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]'\n\n // \u975E sticky \u6A21\u5F0F - \u7B80\u5355\u5E03\u5C40\n if (!sticky) {\n return (\n <>\n <div\n id={id}\n className={cn(\n 'relative overflow-hidden',\n aspect,\n {\n 'aiui-dark': theme === 'dark',\n 'rounded-box': shape === 'rounded',\n },\n className\n )}\n >\n <div ref={inViewRef}>\n {/* \u5185\u5BB9\u5C42 */}\n {!titleAnimation && (\n <div className=\"media-content text-info-primary absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 px-4 text-center\">\n {title_html && !isPlaying && (\n <div\n className=\"lg-desktop:text-[64px] text-center text-[40px] font-bold leading-none lg:text-5xl\"\n dangerouslySetInnerHTML={{ __html: title_html }}\n />\n )}\n {videoTitle_html && isPlaying && (\n <div\n className=\"lg-desktop:text-[64px] text-center text-[40px] font-bold leading-none lg:text-5xl\"\n dangerouslySetInnerHTML={{ __html: videoTitle_html }}\n />\n )}\n {btnText && (\n <Button variant=\"link\" className={cn('member-equity-button-secondary')} onClick={handleBtnClick}>\n {btnText}\n </Button>\n )}\n </div>\n )}\n\n {/* \u89C6\u9891\u5C42 */}\n <ScrollLoadVideo\n videoRef={videoRef}\n poster={img?.url || ''}\n src={video?.url!}\n className=\"tablet:block hidden size-full\"\n videoClassName=\"object-cover\"\n muted\n loop\n playsInline\n autoplay\n webkit-playsinline\n x5-playsinline\n />\n <ScrollLoadVideo\n videoRef={videoRef}\n poster={img?.url || ''}\n src={mobileVideo?.url || video?.url!}\n className=\"tablet:hidden block size-full\"\n videoClassName=\"object-cover\"\n muted\n loop\n playsInline\n autoplay\n webkit-playsinline\n x5-playsinline\n />\n </div>\n\n {/* \u57CB\u70B9\u5143\u7D20 */}\n <div ref={trackRef} className=\"absolute bottom-0 left-0 h-px w-full\" />\n </div>\n\n {visible && youtubeId && (\n <VideoModal visible={visible} youTubeId={youtubeId} onCloseModal={() => setVisible(false)} />\n )}\n </>\n )\n }\n\n // Sticky \u6A21\u5F0F - \u590D\u6742\u5E03\u5C40\n return (\n <>\n <div\n ref={titleRef}\n className={cn(\n 'relative z-10',\n aspect,\n {\n 'aiui-dark': theme === 'dark',\n 'rounded-box': shape === 'rounded',\n },\n className\n )}\n >\n <div ref={inViewRef}>\n {!titleAnimation && (\n <div className=\"media-content text-info-primary absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 px-4 text-center\">\n {title_html && !isPlaying && (\n <div\n className=\"lg-desktop:text-[64px] text-center text-[40px] font-bold leading-none lg:text-5xl\"\n dangerouslySetInnerHTML={{ __html: title_html }}\n />\n )}\n {videoTitle_html && isPlaying && (\n <div\n className=\"lg-desktop:text-[64px] text-center text-[40px] font-bold leading-none lg:text-5xl\"\n dangerouslySetInnerHTML={{ __html: videoTitle_html }}\n />\n )}\n {btnText && (\n <Button variant=\"link\" className={cn('member-equity-button-secondary ')} onClick={handleBtnClick}>\n {btnText}\n </Button>\n )}\n </div>\n )}\n </div>\n </div>\n <div\n style={{\n marginBottom: `-${btb}px`,\n marginTop: `-${titleHeight}px`,\n zIndex: zIndexVideo,\n }}\n className=\"relative\"\n >\n <div className=\"sticky top-0\">\n <div\n id={id}\n className={cn('relative h-screen w-full overflow-hidden', {\n 'aiui-dark': theme === 'dark',\n 'rounded-box': shape === 'rounded',\n })}\n >\n {titleAnimation === 'fade-in' && title_html && (\n <div\n ref={titleFadeInRef}\n className=\"lg-desktop:text-[64px] absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 text-center text-[40px] font-bold leading-none lg:text-5xl\"\n dangerouslySetInnerHTML={{ __html: title_html }}\n />\n )}\n <div\n className=\"media-cover absolute left-0 top-0 size-full\"\n style={{\n height: `${ANIMATION_CONFIG.VIDEO_HEIGHT_BASE - videoHeightProgress * 100}vh`,\n }}\n >\n <ScrollLoadVideo\n videoRef={videoRef}\n poster={img?.url || ''}\n src={video?.url!}\n className=\"tablet:block hidden size-full\"\n videoClassName=\"object-cover\"\n muted\n loop\n playsInline\n autoplay\n webkit-playsinline\n x5-playsinline\n />\n <ScrollLoadVideo\n videoRef={videoRef}\n poster={img?.url || ''}\n src={mobileVideo?.url || video?.url!}\n className=\"tablet:hidden block size-full\"\n videoClassName=\"object-cover\"\n muted\n loop\n playsInline\n autoplay\n webkit-playsinline\n x5-playsinline\n />\n <div\n ref={bgRef}\n className=\"absolute left-0 top-0 z-10 size-full opacity-0\"\n style={{\n background: 'rgba(0, 0, 0, 0.2)',\n }}\n />\n </div>\n </div>\n </div>\n <div className={cn('relative box-content block', aspect)} style={{ height: `${btb}px` }} ref={trackRef} />\n </div>\n {visible && youtubeId && (\n <VideoModal visible={visible} youTubeId={youtubeId} onCloseModal={() => set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OAAQhB,GAAK,KAAO,GACpB,IAAKH,GAAO,IACZ,UAAU,gCACV,eAAe,eACf,MAAK,GACL,KAAI,GACJ,YAAW,GACX,SAAQ,GACR,qBAAkB,GAClB,iBAAc,GAChB,EACAnC,EAACgB,EAAA,CACC,SAAUsC,EACV,OAAQhB,GAAK,KAAO,GACpB,IAAKF,GAAa,KAAOD,GAAO,IAChC,UAAU,gCACV,eAAe,eACf,MAAK,GACL,KAAI,GACJ,YAAW,GACX,SAAQ,GACR,qBAAkB,GAClB,iBAAc,GAChB,GACF,EAGAnC,EAAC,OAAI,IAAK0D,EAAU,UAAU,uCAAuC,GACvE,EAECN,GAAWlB,GACVlC,EAACY,GAAA,CAAW,QAASwC,EAAS,UAAWlB,EAAW,aAAc,IAAMmB,EAAW,EAAK,EAAG,GAE/F,CAmHN,CACF,EAEA1B,GAAgB,YAAc,kBAE9B,IAAOsE,GAAQvF,GAAWiB,EAAe",
6
+ "names": ["Fragment", "jsx", "jsxs", "useState", "useRef", "useMemo", "useEffect", "forwardRef", "useImperativeHandle", "useCallback", "cn", "withLayout", "Button", "VideoModal", "convertLexicalToHTML", "useInView", "useExposure", "ScrollLoadVideo", "gsap", "SplitText", "ScrollTrigger", "componentName", "componentType", "ANIMATION_CONFIG", "htmlConverters", "defaultConverters", "args", "node", "MediaPlayerBase", "className", "id", "onBtnClick", "title", "videoTitle", "btnText", "youtubeId", "video", "mobileVideo", "theme", "img", "shape", "titleAnimation", "rest", "ref", "sticky", "isPlaying", "setIsPlaying", "btb", "setbtb", "titleHeight", "setTitleHeight", "videoHeightProgress", "setVideoHeightProgress", "visible", "setVisible", "videoRef", "bgRef", "titleRef", "titleFadeInRef", "trackRef", "splitTextInstance", "scrollTriggerRef", "heightTriggerRef", "inViewRef", "inView", "title_html", "videoTitle_html", "calculateLayout", "rect", "screenHeight", "scrollTop", "elementBottomToPageTop", "distanceToPageBottom", "newBtb", "newTitleHeight", "prevBtb", "prevHeight", "resizeObserver", "handleScroll", "scrollTimeout", "throttledScroll", "titleElement", "height", "words", "total", "interval", "wordAnimations", "_", "i", "start", "width", "self", "progress", "word", "opacity", "zIndexVideo", "handleBtnClick", "aspect", "MediaPlayerBase_default"]
7
7
  }
@@ -1,6 +1,7 @@
1
+ /// <reference types="react" />
1
2
  import type { MediaPlayerMultiProps } from './types.js';
2
3
  declare const _default: import("react").ForwardRefExoticComponent<Omit<Omit<MediaPlayerMultiProps & import("react").RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
3
- className?: string;
4
- data?: Record<string, any>;
4
+ className?: string | undefined;
5
+ data?: Record<string, any> | undefined;
5
6
  }, "ref"> & import("react").RefAttributes<any>>;
6
7
  export default _default;
@@ -3,7 +3,7 @@ import type { MediaPlayerBaseProps } from './types.js';
3
3
  declare const _default: React.ForwardRefExoticComponent<Omit<Omit<MediaPlayerBaseProps & React.RefAttributes<{
4
4
  mediaPlayerStickyRef: HTMLDivElement;
5
5
  }>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
6
- className?: string;
7
- data?: Record<string, any>;
6
+ className?: string | undefined;
7
+ data?: Record<string, any> | undefined;
8
8
  }, "ref"> & React.RefAttributes<any>>;
9
9
  export default _default;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import type { MediaSceneSwitcherProps } from './types.js';
3
+ import 'swiper/css';
4
+ declare const _default: import("react").ForwardRefExoticComponent<Omit<Omit<MediaSceneSwitcherProps & import("react").RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
5
+ className?: string | undefined;
6
+ data?: Record<string, any> | undefined;
7
+ }, "ref"> & import("react").RefAttributes<any>>;
8
+ export default _default;
@@ -0,0 +1,11 @@
1
+ "use client";import{Fragment as Q,jsx as e,jsxs as r}from"react/jsx-runtime";import{useState as z,useRef as v,useEffect as R,forwardRef as H,useImperativeHandle as F}from"react";import{useMediaQuery as D}from"react-responsive";import{cn as x}from"../../helpers/utils.js";import{withLayout as V}from"../../shared/Styles.js";import{Heading as p,Text as T,Picture as A}from"../../components/index.js";import"../SwiperBox/index.js";import{useExposure as I}from"../../hooks/useExposure.js";import{Swiper as B,SwiperSlide as _}from"swiper/react";import{Autoplay as q}from"swiper/modules";import"swiper/css";const k="media",U="media_scene_switcher",h=3e3,$=({data:t,configuration:o,theme:u})=>{const m=v(null),a=o?.isActive||!1;return I(m,{componentType:k,componentName:U,componentTitle:t?.title,position:(o?.index??0)+1}),r("div",{ref:m,className:x("media-scene-switcher-item rounded-box cursor-pointer overflow-hidden transition-colors","text-[#6D6D6F]",{"bg-[#1D1D1F] text-white":a,"bg-[#EAEAEC] text-[1D1D1F]":a&&u==="light"}),onClick:()=>o?.onItemClick?.(o?.index??0),children:[r("div",{className:"media-scene-switcher-item-content laptop:gap-[32px] laptop:p-[12px] desktop:gap-[48px] desktop:p-[24px] flex items-center justify-between gap-[24px]",children:[e("div",{className:"media-scene-switcher-item-title flex-1",children:e(p,{as:"h6",size:2,html:t?.title})}),e("div",{className:"media-scene-switcher-item-badge rounded-btn border-[1.6px] px-[18px] py-[7px]",children:e(p,{as:"h6",size:2,html:t?.tag})})]}),e("div",{className:x("media-scene-switcher-progress h-[2px] w-full",{"media-scene-switcher-progress-active":a}),style:{transform:"translate3d(-100%, -2px, 0)",background:"linear-gradient(90deg, #3ad1ff 0%, #008cd6 100%)",animation:a?`progress-bar ${h}ms ease-out`:"none"}})]})},O=({data:t,configuration:o,theme:u})=>{const m=v(null),a=o?.isActive||!1,n=D({query:"(max-width: 768px)"});I(m,{componentType:k,componentName:U,componentTitle:t?.title,position:(o?.index??0)+1});const c=n&&t?.mobVideoUrl?.url?t.mobVideoUrl.url:t?.videoUrl?.url,s=n&&t?.mobImageUrl?.url?t.mobImageUrl.url:t?.imageUrl?.url,f=s||t?.videoUrl?.thumbnailURL||"";return r("div",{ref:m,className:"media-scene-switcher-mobile-item rounded-box flex h-[360px] w-[296px] flex-col overflow-hidden",children:[e("div",{className:"media-scene-switcher-mobile-media relative aspect-[554/480] w-full overflow-hidden",children:c?e("video",{src:c,playsInline:!0,autoPlay:!0,loop:!0,muted:!0,poster:f,className:"size-full object-cover"}):s?e(A,{className:"size-full",imgClassName:"size-full object-cover",source:s,alt:t?.title||""}):null}),r("div",{className:"media-scene-switcher-mobile-bottom flex items-start justify-between gap-[8px] bg-[#1D1D1F] p-[16px] text-white",children:[e("div",{className:"media-scene-switcher-mobile-title line-clamp-3 h-[72px] flex-1",children:e(p,{as:"h6",size:2,html:t?.title})}),e("div",{className:"media-scene-switcher-mobile-badge rounded-btn shrink-0 border-[1.6px] px-[12px] py-[5px]",children:e(p,{as:"h6",size:1,html:t?.tag})})]}),e("div",{className:x("media-scene-switcher-progress h-[2px] w-full",{"media-scene-switcher-progress-active":a}),style:{transform:"translate3d(-100%, -2px, 0)",background:"linear-gradient(90deg, #3ad1ff 0%, #008cd6 100%)",animation:a?`progress-bar ${h}ms ease-out`:"none"}})]})},E=H(({className:t="",data:o,id:u,style:m},a)=>{const{title:n,subtitle:c,items:s=[],theme:f="light"}=o||{},[w,b]=z(0),[P,C]=z(0),g=v(null),d=v(0),S=D({query:"(max-width: 1023px)"});F(a,()=>g.current),I(g,{componentType:k,componentName:U,componentTitle:n}),R(()=>{if(!(S||s.length===0))return d.current=window.setInterval(()=>{b(i=>(i+1)%s.length)},h),()=>{d.current&&window.clearInterval(d.current)}},[S,s.length]);const L=i=>{b(i),d.current&&window.clearInterval(d.current),d.current=window.setInterval(()=>{b(l=>(l+1)%s.length)},h)},N=s[w],G=N?.videoUrl?.url,K=N?.imageUrl?.url||N?.videoUrl?.thumbnailURL||"";return r(Q,{children:[e("style",{children:`
2
+ @keyframes progress-bar {
3
+ from {
4
+ transform: translate3d(-100%, -2px, 0);
5
+ }
6
+ to {
7
+ transform: translate3d(0, -2px, 0);
8
+ }
9
+ }
10
+ `}),r("section",{id:u,ref:g,className:x("media-scene-switcher text-info-primary w-full overflow-hidden",{"aiui-dark":f==="dark"},t),children:[r("div",{className:"media-scene-switcher-desktop laptop:gap-[24px] lg-desktop:gap-[40px] laptop:flex hidden w-full items-stretch gap-[20px] overflow-hidden",children:[e("div",{className:"media-scene-switcher-preview rounded-box laptop:flex-1 relative aspect-[824/640] max-w-[824px] shrink-0 overflow-hidden",children:s.map((i,l)=>{const M=i?.videoUrl?.url,y=i?.imageUrl?.url,j=y||i?.videoUrl?.thumbnailURL||"";return e("div",{className:x("media-scene-switcher-media rounded-box absolute inset-0 hidden size-full overflow-hidden",{"inline-block":l===w}),children:M?e("video",{src:M,playsInline:!0,autoPlay:!0,loop:!0,muted:!0,poster:j,className:"size-full object-cover"}):y?e(A,{className:"size-full",imgClassName:"size-full object-cover",source:y,alt:i?.title||""}):null},i.id||l)})}),r("div",{className:"media-scene-switcher-sidebar laptop:flex-1 flex shrink-0 flex-col justify-between",children:[r("div",{className:"media-scene-switcher-header flex flex-col",children:[n&&e(p,{as:"h3",html:n,size:4,className:"media-scene-switcher-title text-info-primary tablet:!text-[40px] desktop:!text-[56px] lg-desktop:!text-[64px] text-[40px] leading-none text-[#00BEFA]"}),c&&e(T,{as:"span",size:4,html:c,className:"media-scene-switcher-subtitle tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] relative -top-2 mt-3 text-[14px] text-white"})]}),e("div",{className:"media-scene-switcher-list flex flex-col gap-[16px]",children:s.map((i,l)=>e($,{data:i,configuration:{index:l,isActive:l===w,onItemClick:L}},i.id||l))})]})]}),r("div",{className:"media-scene-switcher-mobile laptop:hidden flex flex-col overflow-visible",children:[r("div",{className:"media-scene-switcher-mobile-header",children:[n&&e(p,{as:"h2",html:n,size:2,className:"media-scene-switcher-title tablet:!text-[40px] desktop:!text-[56px] lg-desktop:!text-[64px] text-[40px] leading-tight"}),c&&e(T,{as:"span",size:4,html:c,className:"media-scene-switcher-subtitle text-[14px] text-white"})]}),e("div",{className:"media-scene-switcher-mobile-swiper mt-[24px] overflow-visible",children:e(B,{onSlideChange:i=>C(i.realIndex),initialSlide:0,modules:[q],loop:s.length>1,autoplay:s.length>1?{delay:h,disableOnInteraction:!1}:!1,spaceBetween:12,slidesPerView:"auto",watchSlidesProgress:!0,className:"w-full !overflow-visible",children:s.map((i,l)=>e(_,{className:"!h-auto !w-[296px]",children:e(O,{data:i,configuration:{index:l,isActive:l===P}})},i.id||l))})})]})]})]})});E.displayName="MediaSceneSwitcher";var ae=V(E);export{ae as default};
11
+ //# sourceMappingURL=MediaSceneSwitcher.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.tsx"],
4
+ "sourcesContent": ["'use client'\nimport { useState, useRef, useEffect, forwardRef, useImperativeHandle } from 'react'\nimport { useMediaQuery } from 'react-responsive'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Heading, Text, Picture } from '../../components/index.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport type { MediaSceneSwitcherProps, MediaSceneSwitcherItem } from './types.js'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Autoplay } from 'swiper/modules'\nimport 'swiper/css'\nimport type { Theme } from '../../types/props.js'\n\nconst componentType = 'media'\nconst componentName = 'media_scene_switcher'\nconst INTERVAL_TIME = 3000\n\ninterface ItemProps {\n data: MediaSceneSwitcherItem\n configuration?: {\n index: number\n isActive?: boolean\n onItemClick?: (index: number) => void\n }\n theme?: Theme\n}\n\nconst DesktopItem = ({ data, configuration, theme }: ItemProps) => {\n const ref = useRef<HTMLDivElement>(null)\n const isActive = configuration?.isActive || false\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: data?.title,\n position: (configuration?.index ?? 0) + 1,\n })\n\n return (\n <div\n ref={ref}\n className={cn(\n 'media-scene-switcher-item rounded-box cursor-pointer overflow-hidden transition-colors',\n 'text-[#6D6D6F]',\n {\n 'bg-[#1D1D1F] text-white': isActive,\n 'bg-[#EAEAEC] text-[1D1D1F]': isActive && theme === 'light',\n }\n )}\n onClick={() => configuration?.onItemClick?.(configuration?.index ?? 0)}\n >\n <div className=\"media-scene-switcher-item-content laptop:gap-[32px] laptop:p-[12px] desktop:gap-[48px] desktop:p-[24px] flex items-center justify-between gap-[24px]\">\n <div className=\"media-scene-switcher-item-title flex-1\">\n <Heading as=\"h6\" size={2} html={data?.title} />\n </div>\n <div className=\"media-scene-switcher-item-badge rounded-btn border-[1.6px] px-[18px] py-[7px]\">\n <Heading as=\"h6\" size={2} html={data?.tag} />\n </div>\n </div>\n <div\n className={cn('media-scene-switcher-progress h-[2px] w-full', {\n 'media-scene-switcher-progress-active': isActive,\n })}\n style={{\n transform: 'translate3d(-100%, -2px, 0)',\n background: 'linear-gradient(90deg, #3ad1ff 0%, #008cd6 100%)',\n animation: isActive ? `progress-bar ${INTERVAL_TIME}ms ease-out` : 'none',\n }}\n />\n </div>\n )\n}\n\nconst MobileItem = ({ data, configuration, theme }: ItemProps) => {\n const ref = useRef<HTMLDivElement>(null)\n const isActive = configuration?.isActive || false\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: data?.title,\n position: (configuration?.index ?? 0) + 1,\n })\n\n const videoUrl = isMobile && data?.mobVideoUrl?.url ? data.mobVideoUrl.url : data?.videoUrl?.url\n const imageUrl = isMobile && data?.mobImageUrl?.url ? data.mobImageUrl.url : data?.imageUrl?.url\n const posterUrl = imageUrl || data?.videoUrl?.thumbnailURL || ''\n\n return (\n <div\n ref={ref}\n className=\"media-scene-switcher-mobile-item rounded-box flex h-[360px] w-[296px] flex-col overflow-hidden\"\n >\n <div className=\"media-scene-switcher-mobile-media relative aspect-[554/480] w-full overflow-hidden\">\n {videoUrl ? (\n <video src={videoUrl} playsInline autoPlay loop muted poster={posterUrl} className=\"size-full object-cover\" />\n ) : imageUrl ? (\n <Picture\n className=\"size-full\"\n imgClassName=\"size-full object-cover\"\n source={imageUrl}\n alt={data?.title || ''}\n />\n ) : null}\n </div>\n <div className=\"media-scene-switcher-mobile-bottom flex items-start justify-between gap-[8px] bg-[#1D1D1F] p-[16px] text-white\">\n <div className=\"media-scene-switcher-mobile-title line-clamp-3 h-[72px] flex-1\">\n <Heading as=\"h6\" size={2} html={data?.title} />\n </div>\n <div className=\"media-scene-switcher-mobile-badge rounded-btn shrink-0 border-[1.6px] px-[12px] py-[5px]\">\n <Heading as=\"h6\" size={1} html={data?.tag} />\n </div>\n </div>\n <div\n className={cn('media-scene-switcher-progress h-[2px] w-full', {\n 'media-scene-switcher-progress-active': isActive,\n })}\n style={{\n transform: 'translate3d(-100%, -2px, 0)',\n background: 'linear-gradient(90deg, #3ad1ff 0%, #008cd6 100%)',\n animation: isActive ? `progress-bar ${INTERVAL_TIME}ms ease-out` : 'none',\n }}\n />\n </div>\n )\n}\n\nconst MediaSceneSwitcher = forwardRef<HTMLDivElement, MediaSceneSwitcherProps>(\n ({ className = '', data, id, style }, ref) => {\n const { title, subtitle, items = [], theme = 'light' } = data || {}\n const [currentIndex, setCurrentIndex] = useState(0)\n const [activeIndex, setActiveIndex] = useState(0)\n const innerRef = useRef<HTMLDivElement>(null)\n const intervalRef = useRef<number>(0)\n const isMobile = useMediaQuery({ query: '(max-width: 1023px)' })\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n useExposure(innerRef, {\n componentType,\n componentName,\n componentTitle: title,\n })\n\n // Auto-play functionality for desktop\n useEffect(() => {\n if (isMobile || items.length === 0) return\n\n intervalRef.current = window.setInterval(() => {\n setCurrentIndex(prev => (prev + 1) % items.length)\n }, INTERVAL_TIME)\n\n return () => {\n if (intervalRef.current) {\n window.clearInterval(intervalRef.current)\n }\n }\n }, [isMobile, items.length])\n\n const handleItemClick = (index: number) => {\n setCurrentIndex(index)\n if (intervalRef.current) {\n window.clearInterval(intervalRef.current)\n }\n intervalRef.current = window.setInterval(() => {\n setCurrentIndex(prev => (prev + 1) % items.length)\n }, INTERVAL_TIME)\n }\n\n const currentItem = items[currentIndex]\n const videoUrl = currentItem?.videoUrl?.url\n const imageUrl = currentItem?.imageUrl?.url\n const posterUrl = imageUrl || currentItem?.videoUrl?.thumbnailURL || ''\n\n return (\n <>\n <style>{`\n @keyframes progress-bar {\n from {\n transform: translate3d(-100%, -2px, 0);\n }\n to {\n transform: translate3d(0, -2px, 0);\n }\n }\n `}</style>\n <section\n id={id}\n ref={innerRef}\n className={cn(\n 'media-scene-switcher text-info-primary w-full overflow-hidden',\n {\n 'aiui-dark': theme === 'dark',\n },\n className\n )}\n >\n {/* Desktop Layout */}\n <div className=\"media-scene-switcher-desktop laptop:gap-[24px] lg-desktop:gap-[40px] laptop:flex hidden w-full items-stretch gap-[20px] overflow-hidden\">\n <div className=\"media-scene-switcher-preview rounded-box laptop:flex-1 relative aspect-[824/640] max-w-[824px] shrink-0 overflow-hidden\">\n {items.map((item, index) => {\n const itemVideoUrl = item?.videoUrl?.url\n const itemImageUrl = item?.imageUrl?.url\n const itemPosterUrl = itemImageUrl || item?.videoUrl?.thumbnailURL || ''\n\n return (\n <div\n key={item.id || index}\n className={cn(\n 'media-scene-switcher-media rounded-box absolute inset-0 hidden size-full overflow-hidden',\n {\n 'inline-block': index === currentIndex,\n }\n )}\n >\n {itemVideoUrl ? (\n <video\n src={itemVideoUrl}\n playsInline\n autoPlay\n loop\n muted\n poster={itemPosterUrl}\n className=\"size-full object-cover\"\n />\n ) : itemImageUrl ? (\n <Picture\n className=\"size-full\"\n imgClassName=\"size-full object-cover\"\n source={itemImageUrl}\n alt={item?.title || ''}\n />\n ) : null}\n </div>\n )\n })}\n </div>\n\n <div className=\"media-scene-switcher-sidebar laptop:flex-1 flex shrink-0 flex-col justify-between\">\n <div className=\"media-scene-switcher-header flex flex-col\">\n {title && (\n <Heading\n as=\"h3\"\n html={title}\n size={4}\n className=\"media-scene-switcher-title text-info-primary tablet:!text-[40px] desktop:!text-[56px] lg-desktop:!text-[64px] text-[40px] leading-none text-[#00BEFA]\"\n />\n )}\n {subtitle && (\n <Text\n as=\"span\"\n size={4}\n html={subtitle}\n className=\"media-scene-switcher-subtitle tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] relative -top-2 mt-3 text-[14px] text-white\"\n />\n )}\n </div>\n\n <div className=\"media-scene-switcher-list flex flex-col gap-[16px]\">\n {items.map((item, index) => (\n <DesktopItem\n key={item.id || index}\n data={item}\n configuration={{\n index,\n isActive: index === currentIndex,\n onItemClick: handleItemClick,\n }}\n />\n ))}\n </div>\n </div>\n </div>\n\n {/* Mobile Layout */}\n <div className=\"media-scene-switcher-mobile laptop:hidden flex flex-col overflow-visible\">\n <div className=\"media-scene-switcher-mobile-header\">\n {title && (\n <Heading\n as=\"h2\"\n html={title}\n size={2}\n className=\"media-scene-switcher-title tablet:!text-[40px] desktop:!text-[56px] lg-desktop:!text-[64px] text-[40px] leading-tight\"\n />\n )}\n {subtitle && (\n <Text\n as=\"span\"\n size={4}\n html={subtitle}\n className=\"media-scene-switcher-subtitle text-[14px] text-white\"\n />\n )}\n </div>\n\n <div className=\"media-scene-switcher-mobile-swiper mt-[24px] overflow-visible\">\n <Swiper\n onSlideChange={swiper => setActiveIndex(swiper.realIndex)}\n initialSlide={0}\n modules={[Autoplay]}\n loop={items.length > 1}\n autoplay={items.length > 1 ? { delay: INTERVAL_TIME, disableOnInteraction: false } : false}\n spaceBetween={12}\n slidesPerView=\"auto\"\n watchSlidesProgress={true}\n className=\"w-full !overflow-visible\"\n >\n {items.map((item, index) => (\n <SwiperSlide key={item.id || index} className=\"!h-auto !w-[296px]\">\n <MobileItem\n data={item}\n configuration={{\n index,\n isActive: index === activeIndex,\n }}\n />\n </SwiperSlide>\n ))}\n </Swiper>\n </div>\n </div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GANKG,EAAK,IAAMF,CAOlB,CACD,EACH,GACF,GACF,EAGA7C,EAAC,OAAI,UAAU,2EACb,UAAAA,EAAC,OAAI,UAAU,qCACZ,UAAAkC,GACCnC,EAACU,EAAA,CACC,GAAG,KACH,KAAMyB,EACN,KAAM,EACN,UAAU,wHACZ,EAEDC,GACCpC,EAACW,EAAA,CACC,GAAG,OACH,KAAM,EACN,KAAMyB,EACN,UAAU,uDACZ,GAEJ,EAEApC,EAAC,OAAI,UAAU,gEACb,SAAAA,EAACc,EAAA,CACC,cAAesC,GAAUX,EAAeW,EAAO,SAAS,EACxD,aAAc,EACd,QAAS,CAACpC,CAAQ,EAClB,KAAMqB,EAAM,OAAS,EACrB,SAAUA,EAAM,OAAS,EAAI,CAAE,MAAOlB,EAAe,qBAAsB,EAAM,EAAI,GACrF,aAAc,GACd,cAAc,OACd,oBAAqB,GACrB,UAAU,2BAET,SAAAkB,EAAM,IAAI,CAACW,EAAMF,IAChB9C,EAACe,EAAA,CAAmC,UAAU,qBAC5C,SAAAf,EAAC0B,EAAA,CACC,KAAMsB,EACN,cAAe,CACb,MAAAF,EACA,SAAUA,IAAUN,CACtB,EACF,GAPgBQ,EAAK,IAAMF,CAQ7B,CACD,EACH,EACF,GACF,GACF,GACF,CAEJ,CACF,EAEAf,EAAmB,YAAc,qBAEjC,IAAOsB,GAAQ5C,EAAWsB,CAAkB",
6
+ "names": ["Fragment", "jsx", "jsxs", "useState", "useRef", "useEffect", "forwardRef", "useImperativeHandle", "useMediaQuery", "cn", "withLayout", "Heading", "Text", "Picture", "useExposure", "Swiper", "SwiperSlide", "Autoplay", "componentType", "componentName", "INTERVAL_TIME", "DesktopItem", "data", "configuration", "theme", "ref", "isActive", "MobileItem", "isMobile", "videoUrl", "imageUrl", "posterUrl", "MediaSceneSwitcher", "className", "id", "style", "title", "subtitle", "items", "currentIndex", "setCurrentIndex", "activeIndex", "setActiveIndex", "innerRef", "intervalRef", "prev", "handleItemClick", "index", "currentItem", "item", "itemVideoUrl", "itemImageUrl", "itemPosterUrl", "swiper", "MediaSceneSwitcher_default"]
7
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from './MediaSceneSwitcher.js';
2
+ export * from './types.js';
@@ -0,0 +1,2 @@
1
+ import{default as e}from"./MediaSceneSwitcher.js";export*from"./types.js";export{e as default};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/MediaSceneSwitcher/index.ts"],
4
+ "sourcesContent": ["export { default } from './MediaSceneSwitcher.js'\nexport * from './types.js'\n"],
5
+ "mappings": "AAAA,OAAS,WAAAA,MAAe,0BACxB,WAAc",
6
+ "names": ["default"]
7
+ }
@@ -0,0 +1,19 @@
1
+ import type { ComponentCommonProps, Media, Theme } from '../../types/props.js';
2
+ export interface MediaSceneSwitcherItem {
3
+ id: string;
4
+ title: string;
5
+ tag?: string;
6
+ videoUrl?: Media | null;
7
+ imageUrl?: Media | null;
8
+ mobVideoUrl?: Media | null;
9
+ mobImageUrl?: Media | null;
10
+ }
11
+ export interface MediaSceneSwitcherProps extends ComponentCommonProps {
12
+ data: {
13
+ title?: string;
14
+ subtitle?: string;
15
+ items?: MediaSceneSwitcherItem[];
16
+ /** 主题,默认 light */
17
+ theme?: Theme;
18
+ };
19
+ }
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { MemberEquityProps } from './types.js';
3
3
  declare const _default: React.ForwardRefExoticComponent<Omit<MemberEquityProps, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
4
- className?: string;
5
- data?: Record<string, any>;
4
+ className?: string | undefined;
5
+ data?: Record<string, any> | undefined;
6
6
  } & React.RefAttributes<any>>;
7
7
  export default _default;
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import type { MultiLayoutGraphicBlockProps } from './types';
3
3
  declare const _default: React.ForwardRefExoticComponent<Omit<Omit<MultiLayoutGraphicBlockProps & React.RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
4
- className?: string;
5
- data?: Record<string, any>;
4
+ className?: string | undefined;
5
+ data?: Record<string, any> | undefined;
6
6
  }, "ref"> & React.RefAttributes<any>>;
7
7
  export default _default;
8
8
  export type { MultiLayoutGraphicBlockProps };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { NavigationSearchProps } from './types.js';
2
3
  export declare const canSearch: (target: any) => boolean;
3
4
  declare const NavigationSearch: import("react").ForwardRefExoticComponent<NavigationSearchProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,54 @@
1
+ /// <reference types="react" />
2
+ import type { Media, Theme } from '../../types/props.js';
3
+ export interface ProductItemData {
4
+ /** 产品标签文本 */
5
+ text?: string;
6
+ /** 桌面端媒体(视频或图片) */
7
+ media?: Media;
8
+ /** 移动端媒体(视频或图片) */
9
+ mobMedia?: Media;
10
+ /** 桌面端封面图(仅用于视频) */
11
+ poster?: Media;
12
+ /** 移动端封面图(仅用于视频) */
13
+ mobPoster?: Media;
14
+ }
15
+ /** 标题类型 */
16
+ export type TitleType = 'selling-point' | 'primary' | 'secondary';
17
+ /** 文本对齐方式 */
18
+ export type TextAlign = 'left' | 'center';
19
+ /** 图片宽度比例(2张图片时) */
20
+ export type TwoImageRatio = '2:3' | '1:1';
21
+ /** 图片宽度比例(3张图片时) */
22
+ export type ThreeImageRatio = '1:1:1';
23
+ export interface ProductCompareProps {
24
+ /** 组件数据 */
25
+ data: {
26
+ /** 主标题 */
27
+ title?: string;
28
+ /** 标题类型:selling-point(卖点)、primary(一级标题)、secondary(二级标题) */
29
+ titleType?: TitleType;
30
+ /** 标题图标(仅当 titleType 为 selling-point 时有效) */
31
+ titleIcon?: Media;
32
+ /** 副标题 */
33
+ subtitle?: string;
34
+ /** 副标题下方的图片 */
35
+ subtitleImage?: Media;
36
+ /** 文本对齐方式:left(左对齐)、center(居中) */
37
+ textAlign?: TextAlign;
38
+ /** 产品列表(支持2-3个产品) */
39
+ products?: ProductItemData[];
40
+ /** 2张图片时的宽度比例 */
41
+ twoImageRatio?: TwoImageRatio;
42
+ /** 3张图片时的宽度比例 */
43
+ threeImageRatio?: ThreeImageRatio;
44
+ /** 主题:light 或 dark */
45
+ theme?: Theme;
46
+ };
47
+ /** 外层容器类名 */
48
+ className?: string;
49
+ }
50
+ declare const _default: import("react").ForwardRefExoticComponent<Omit<ProductCompareProps, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
51
+ className?: string | undefined;
52
+ data?: Record<string, any> | undefined;
53
+ } & import("react").RefAttributes<any>>;
54
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import{jsx as t,jsxs as d}from"react/jsx-runtime";import{useEffect as T,useRef as I,useState as M}from"react";import{Heading as x,Text as P}from"../../components/index.js";import{cn as l}from"../../helpers/index.js";import{withLayout as R}from"../../shared/Styles.js";function k({children:e,offset:a=800}){const[r,i]=M(!1),p=I(null);return T(()=>{const o=new IntersectionObserver(([u])=>u.isIntersecting&&i(!0),{rootMargin:`${a}px`});return p.current&&o.observe(p.current),()=>o.disconnect()},[a]),t("div",{ref:p,className:"size-full",children:r&&e})}function g({media:e,poster:a,className:r}){return e?.url?e.mimeType?.startsWith("video/")?t("video",{src:e.url,playsInline:!0,autoPlay:!0,muted:!0,loop:!0,poster:a?.url||"",preload:"metadata",disablePictureInPicture:!0,disableRemotePlayback:!0,"webkit-playsinline":"true","x5-video-player-type":"h5","x5-video-player-fullscreen":"false","x5-playsinline":"true",className:r,width:e.width,height:e.height}):t("img",{src:e.url,alt:e.alt||"",className:r,width:e.width,height:e.height}):null}function z(e,a,r){return a===2?r==="1:1"?"laptop:flex-[1]":e===0?"laptop:flex-[2]":"laptop:flex-[3]":"laptop:flex-[1]"}function C(e){const{title:a,titleType:r="primary",titleIcon:i,subtitle:p,subtitleImage:o,textAlign:u="left",products:n=[],twoImageRatio:h="2:3",threeImageRatio:L="1:1:1",theme:b="light"}=e.data,m=u==="center"?"text-center":"text-left laptop:text-left",f=()=>r==="secondary"?3:4,y=()=>a?r==="selling-point"&&i?d("div",{className:l("product-compare-title-wrapper flex items-center gap-[8px]",m==="text-center"?"justify-center":""),children:[t("img",{src:i.url,alt:i.alt||"",className:"product-compare-title-icon laptop:size-[32px] size-[24px]"}),t(x,{as:"h2",size:f(),html:a,className:"product-compare-title",style:{color:"#00BEFA"}})]}):t(x,{as:"h2",size:f(),html:a,className:l("product-compare-title",m)}):null;return d("section",{className:l("product-compare text-info-primary",e.className,{"aiui-dark":b==="dark"}),children:[y(),p&&t(P,{as:"p",size:2,html:p,className:l("product-compare-subtitle tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]",m)}),o&&t("div",{className:l("product-compare-subtitle-image laptop:mt-[24px] mt-[16px]",m==="text-center"?"flex justify-center":""),children:t("img",{src:o.url,alt:o.alt||"",className:"max-w-full",width:o.width,height:o.height})}),t("div",{className:"product-compare-container tablet:flex-row tablet:flex-nowrap laptop:mt-[32px] mt-[24px] flex w-full flex-col items-stretch gap-[16px]",children:n.map((s,c)=>{const v=c===n.length-1,w=z(c,n.length,h),N=v?"bg-brand-0":"bg-[rgba(0,0,0,0.2)]";return d("div",{className:l("product-compare-item rounded-box relative shrink overflow-hidden",w,{"order-2 tablet:order-1":c===0&&n.length===2,"order-1 tablet:order-2":c===1&&n.length===2}),children:[s.text&&t("div",{className:l("product-compare-label rounded-btn laptop:left-[28px] laptop:top-[28px] laptop:px-[28px] laptop:pb-[14px] laptop:pt-[15px] desktop:left-[32px] desktop:top-[32px] absolute left-[16px] top-[16px] z-10 px-[20px] pb-[10px] pt-[11px] font-bold text-white",N),children:t(x,{as:"h6",className:"font-bold",size:1,children:s.text})}),d(k,{offset:1500,children:[t(g,{media:s.media,poster:s.poster,className:"product-compare-media laptop:block hidden size-full object-cover"}),t(g,{media:s.mobMedia,poster:s.mobPoster,className:"product-compare-media-mobile laptop:hidden block w-full"})]})]},c)})})]})}var H=R(C);export{H as default};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/ProductCompare/index.tsx"],
4
+ "sourcesContent": ["import { useEffect, useRef, useState } from 'react'\nimport { Heading, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport type { Media, Theme } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\n\nfunction LazyMedia({ children, offset = 800 }: { children: React.ReactNode; offset?: number }) {\n const [loaded, setLoaded] = useState(false)\n const ref = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n const observer = new IntersectionObserver(([entry]) => entry.isIntersecting && setLoaded(true), {\n rootMargin: `${offset}px`,\n })\n ref.current && observer.observe(ref.current)\n return () => observer.disconnect()\n }, [offset])\n\n return (\n <div ref={ref} className=\"size-full\">\n {loaded && children}\n </div>\n )\n}\n\nfunction MediaElement({ media, poster, className }: { media?: Media; poster?: Media; className?: string }) {\n if (!media?.url) return null\n\n const isVideo = media.mimeType?.startsWith('video/')\n\n if (isVideo) {\n return (\n <video\n src={media.url}\n playsInline\n autoPlay\n muted\n loop\n poster={poster?.url || ''}\n preload=\"metadata\"\n disablePictureInPicture\n disableRemotePlayback\n webkit-playsinline=\"true\"\n x5-video-player-type=\"h5\"\n x5-video-player-fullscreen=\"false\"\n x5-playsinline=\"true\"\n className={className}\n width={media.width}\n height={media.height}\n />\n )\n }\n\n return <img src={media.url} alt={media.alt || ''} className={className} width={media.width} height={media.height} />\n}\n\nexport interface ProductItemData {\n /** \u4EA7\u54C1\u6807\u7B7E\u6587\u672C */\n text?: string\n /** \u684C\u9762\u7AEF\u5A92\u4F53\uFF08\u89C6\u9891\u6216\u56FE\u7247\uFF09 */\n media?: Media\n /** \u79FB\u52A8\u7AEF\u5A92\u4F53\uFF08\u89C6\u9891\u6216\u56FE\u7247\uFF09 */\n mobMedia?: Media\n /** \u684C\u9762\u7AEF\u5C01\u9762\u56FE\uFF08\u4EC5\u7528\u4E8E\u89C6\u9891\uFF09 */\n poster?: Media\n /** \u79FB\u52A8\u7AEF\u5C01\u9762\u56FE\uFF08\u4EC5\u7528\u4E8E\u89C6\u9891\uFF09 */\n mobPoster?: Media\n}\n\n/** \u6807\u9898\u7C7B\u578B */\nexport type TitleType = 'selling-point' | 'primary' | 'secondary'\n\n/** \u6587\u672C\u5BF9\u9F50\u65B9\u5F0F */\nexport type TextAlign = 'left' | 'center'\n\n/** \u56FE\u7247\u5BBD\u5EA6\u6BD4\u4F8B\uFF082\u5F20\u56FE\u7247\u65F6\uFF09 */\nexport type TwoImageRatio = '2:3' | '1:1'\n\n/** \u56FE\u7247\u5BBD\u5EA6\u6BD4\u4F8B\uFF083\u5F20\u56FE\u7247\u65F6\uFF09 */\nexport type ThreeImageRatio = '1:1:1'\n\nexport interface ProductCompareProps {\n /** \u7EC4\u4EF6\u6570\u636E */\n data: {\n /** \u4E3B\u6807\u9898 */\n title?: string\n /** \u6807\u9898\u7C7B\u578B\uFF1Aselling-point\uFF08\u5356\u70B9\uFF09\u3001primary\uFF08\u4E00\u7EA7\u6807\u9898\uFF09\u3001secondary\uFF08\u4E8C\u7EA7\u6807\u9898\uFF09 */\n titleType?: TitleType\n /** \u6807\u9898\u56FE\u6807\uFF08\u4EC5\u5F53 titleType \u4E3A selling-point \u65F6\u6709\u6548\uFF09 */\n titleIcon?: Media\n /** \u526F\u6807\u9898 */\n subtitle?: string\n /** \u526F\u6807\u9898\u4E0B\u65B9\u7684\u56FE\u7247 */\n subtitleImage?: Media\n /** \u6587\u672C\u5BF9\u9F50\u65B9\u5F0F\uFF1Aleft\uFF08\u5DE6\u5BF9\u9F50\uFF09\u3001center\uFF08\u5C45\u4E2D\uFF09 */\n textAlign?: TextAlign\n /** \u4EA7\u54C1\u5217\u8868\uFF08\u652F\u63012-3\u4E2A\u4EA7\u54C1\uFF09 */\n products?: ProductItemData[]\n /** 2\u5F20\u56FE\u7247\u65F6\u7684\u5BBD\u5EA6\u6BD4\u4F8B */\n twoImageRatio?: TwoImageRatio\n /** 3\u5F20\u56FE\u7247\u65F6\u7684\u5BBD\u5EA6\u6BD4\u4F8B */\n threeImageRatio?: ThreeImageRatio\n /** \u4E3B\u9898\uFF1Alight \u6216 dark */\n theme?: Theme\n }\n /** \u5916\u5C42\u5BB9\u5668\u7C7B\u540D */\n className?: string\n}\n\n/**\n * \u6839\u636E\u4EA7\u54C1\u6570\u91CF\u548C\u6BD4\u4F8B\u83B7\u53D6\u5E03\u5C40\u7C7B\u540D\n */\nfunction getProductLayoutClasses(index: number, totalProducts: number, twoImageRatio?: TwoImageRatio): string {\n if (totalProducts === 2) {\n if (twoImageRatio === '1:1') {\n return 'laptop:flex-[1]'\n }\n // \u9ED8\u8BA4 2:3 \u6BD4\u4F8B\n return index === 0 ? 'laptop:flex-[2]' : 'laptop:flex-[3]'\n }\n\n if (totalProducts === 3) {\n // 1:1:1 \u6BD4\u4F8B\n return 'laptop:flex-[1]'\n }\n\n return 'laptop:flex-[1]'\n}\n\nfunction ProductCompare(props: ProductCompareProps) {\n const {\n title,\n titleType = 'primary',\n titleIcon,\n subtitle,\n subtitleImage,\n textAlign = 'left',\n products = [],\n twoImageRatio = '2:3',\n threeImageRatio = '1:1:1',\n theme = 'light',\n } = props.data\n\n // \u6587\u672C\u5BF9\u9F50\u7C7B\u540D\n const alignClasses = textAlign === 'center' ? 'text-center' : 'text-left laptop:text-left'\n\n // \u6839\u636E\u6807\u9898\u7C7B\u578B\u786E\u5B9A Heading size \u548C\u6837\u5F0F\n const getTitleSize = () => {\n if (titleType === 'secondary') return 3\n return 4\n }\n\n // \u6E32\u67D3\u6807\u9898\n const renderTitle = () => {\n if (!title) return null\n\n // \u5356\u70B9\u6807\u9898\uFF08\u5305\u542B\u56FE\u6807\uFF09\n if (titleType === 'selling-point' && titleIcon) {\n return (\n <div\n className={cn(\n 'product-compare-title-wrapper flex items-center gap-[8px]',\n alignClasses === 'text-center' ? 'justify-center' : ''\n )}\n >\n <img\n src={titleIcon.url}\n alt={titleIcon.alt || ''}\n className=\"product-compare-title-icon laptop:size-[32px] size-[24px]\"\n />\n <Heading\n as=\"h2\"\n size={getTitleSize()}\n html={title}\n className=\"product-compare-title\"\n style={{ color: '#00BEFA' }}\n />\n </div>\n )\n }\n\n // \u666E\u901A\u6807\u9898\n return <Heading as=\"h2\" size={getTitleSize()} html={title} className={cn('product-compare-title', alignClasses)} />\n }\n\n return (\n <section\n className={cn('product-compare text-info-primary', props.className, {\n 'aiui-dark': theme === 'dark',\n })}\n >\n {/* \u6807\u9898\u533A\u57DF */}\n {renderTitle()}\n\n {/* \u526F\u6807\u9898 */}\n {subtitle && (\n <Text\n as=\"p\"\n size={2}\n html={subtitle}\n className={cn(\n 'product-compare-subtitle tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]',\n alignClasses\n )}\n />\n )}\n\n {/* \u526F\u6807\u9898\u4E0B\u65B9\u56FE\u7247 */}\n {subtitleImage && (\n <div\n className={cn(\n 'product-compare-subtitle-image laptop:mt-[24px] mt-[16px]',\n alignClasses === 'text-center' ? 'flex justify-center' : ''\n )}\n >\n <img\n src={subtitleImage.url}\n alt={subtitleImage.alt || ''}\n className=\"max-w-full\"\n width={subtitleImage.width}\n height={subtitleImage.height}\n />\n </div>\n )}\n\n {/* \u4EA7\u54C1\u5BF9\u6BD4\u5361\u7247\u5BB9\u5668 */}\n <div className=\"product-compare-container tablet:flex-row tablet:flex-nowrap laptop:mt-[32px] mt-[24px] flex w-full flex-col items-stretch gap-[16px]\">\n {products.map((product, index) => {\n const isLastProduct = index === products.length - 1\n const layoutClasses = getProductLayoutClasses(index, products.length, twoImageRatio)\n\n // \u6807\u7B7E\u6837\u5F0F\uFF1A\u6700\u540E\u4E00\u4E2A\u4EA7\u54C1\u7528 bg-brand-0\uFF0C\u5176\u4ED6\u7528 rgba(0,0,0,0.2)\n const labelBgClass = isLastProduct ? 'bg-brand-0' : 'bg-[rgba(0,0,0,0.2)]'\n\n return (\n <div\n key={index}\n className={cn('product-compare-item rounded-box relative shrink overflow-hidden', layoutClasses, {\n 'order-2 tablet:order-1': index === 0 && products.length === 2,\n 'order-1 tablet:order-2': index === 1 && products.length === 2,\n })}\n >\n {/* \u4EA7\u54C1\u6807\u7B7E */}\n {product.text && (\n <div\n className={cn(\n 'product-compare-label rounded-btn laptop:left-[28px] laptop:top-[28px] laptop:px-[28px] laptop:pb-[14px] laptop:pt-[15px] desktop:left-[32px] desktop:top-[32px] absolute left-[16px] top-[16px] z-10 px-[20px] pb-[10px] pt-[11px] font-bold text-white',\n labelBgClass\n )}\n >\n <Heading as=\"h6\" className=\"font-bold\" size={1}>\n {product.text}\n </Heading>\n </div>\n )}\n\n {/* \u4EA7\u54C1\u5A92\u4F53 */}\n <LazyMedia offset={1500}>\n <MediaElement\n media={product.media}\n poster={product.poster}\n className=\"product-compare-media laptop:block hidden size-full object-cover\"\n />\n <MediaElement\n media={product.mobMedia}\n poster={product.mobPoster}\n className=\"product-compare-media-mobile laptop:hidden block w-full\"\n />\n </LazyMedia>\n </div>\n )\n })}\n </div>\n </section>\n )\n}\n\nexport default withLayout(ProductCompare)\n"],
5
+ "mappings": "AAmBI,cAAAA,EA4II,QAAAC,MA5IJ,oBAnBJ,OAAS,aAAAC,EAAW,UAAAC,EAAQ,YAAAC,MAAgB,QAC5C,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BAC9B,OAAS,MAAAC,MAAU,yBAEnB,OAAS,cAAAC,MAAkB,yBAE3B,SAASC,EAAU,CAA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vC,EAAC,OAEC,UAAWM,EAAG,mEAAoEkC,EAAe,CAC/F,yBAA0BnB,IAAU,GAAKW,EAAS,SAAW,EAC7D,yBAA0BX,IAAU,GAAKW,EAAS,SAAW,CAC/D,CAAC,EAGA,UAAAM,EAAQ,MACPvC,EAAC,OACC,UAAWO,EACT,2PACAmC,CACF,EAEA,SAAA1C,EAACK,EAAA,CAAQ,GAAG,KAAK,UAAU,YAAY,KAAM,EAC1C,SAAAkC,EAAQ,KACX,EACF,EAIFtC,EAACQ,EAAA,CAAU,OAAQ,KACjB,UAAAT,EAACiB,EAAA,CACC,MAAOsB,EAAQ,MACf,OAAQA,EAAQ,OAChB,UAAU,mEACZ,EACAvC,EAACiB,EAAA,CACC,MAAOsB,EAAQ,SACf,OAAQA,EAAQ,UAChB,UAAU,0DACZ,GACF,IAhCKjB,CAiCP,CAEJ,CAAC,EACH,GACF,CAEJ,CAEA,IAAOqB,EAAQnC,EAAWiB,CAAc",
6
+ "names": ["jsx", "jsxs", "useEffect", "useRef", "useState", "Heading", "Text", "cn", "withLayout", "LazyMedia", "children", "offset", "loaded", "setLoaded", "ref", "observer", "entry", "MediaElement", "media", "poster", "className", "getProductLayoutClasses", "index", "totalProducts", "twoImageRatio", "ProductCompare", "props", "title", "titleType", "titleIcon", "subtitle", "subtitleImage", "textAlign", "products", "threeImageRatio", "theme", "alignClasses", "getTitleSize", "renderTitle", "product", "isLastProduct", "layoutClasses", "labelBgClass", "ProductCompare_default"]
7
+ }
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { ProductHeroProps } from './types.js';
3
+ declare const _default: React.ForwardRefExoticComponent<Omit<Omit<ProductHeroProps & React.RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
4
+ className?: string | undefined;
5
+ data?: Record<string, any> | undefined;
6
+ }, "ref"> & React.RefAttributes<any>>;
7
+ export default _default;
@@ -0,0 +1,2 @@
1
+ "use client";import{jsx as t,jsxs as r}from"react/jsx-runtime";import f,{useRef as b,useImperativeHandle as x}from"react";import{Heading as a,Button as _,Picture as k,Text as N}from"../../components/index.js";import{cn as H}from"../../helpers/utils.js";import{withLayout as g}from"../../shared/Styles.js";import{useExposure as P}from"../../hooks/useExposure.js";const v="image",w="product_hero",l=f.forwardRef(({data:c,className:i},m)=>{const{title:s,subtitle:e,ctaText:p,poster:u,mobPoster:n,ctaLink:d,theme:h="light"}=c,o=b(null);return P(o,{componentType:v,componentName:w,componentTitle:s,componentDescription:e}),x(m,()=>o.current),r("section",{ref:o,"data-ui-component-id":"ProductHero",className:H("product-hero text-info-primary tablet:flex-row tablet:gap-[16px] lg-desktop:gap-[64px] flex w-full flex-col items-center justify-between gap-[32px]",{"aiui-dark":h==="dark"},i),children:[r("div",{className:"product-hero__content tablet:basis-[42%] laptop:basis-[36%] flex w-full flex-col items-start gap-[24px]",children:[r("div",{className:"product-hero__text",children:[t(a,{as:"h3",size:4,html:s,className:"product-hero__title"}),t(a,{as:"h4",size:2,html:e,className:"product-hero__subtitle product-hero__subtitle--desktop laptop:mt-[12px] laptop:block desktop:mt-[16px] mt-[4px] hidden"}),t(N,{as:"p",size:2,html:e,className:"product-hero__subtitle product-hero__subtitle--mobile laptop:mt-[12px] laptop:hidden desktop:mt-[16px] mt-[4px] block"})]}),p&&t("a",{href:d,className:"product-hero__cta-link",children:t(_,{className:"product-hero__cta-button w-fit",children:p})})]}),t(k,{className:"product-hero__image tablet:aspect-[824/640] tablet:basis-[58%] laptop:basis-[64%] aspect-[358/360] shrink",source:`${u?.url}, ${n?.url} 768`})]})});l.displayName="ProductHero";var R=g(l);export{R as default};
2
+ //# sourceMappingURL=ProductHero.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/ProductHero/ProductHero.tsx"],
4
+ "sourcesContent": ["'use client'\nimport React, { useRef, useImperativeHandle } from 'react'\nimport { Heading, Button, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport type { ProductHeroProps } from './types.js'\n\nconst componentType = 'image'\nconst componentName = 'product_hero'\n\nconst ProductHero = React.forwardRef<HTMLDivElement, ProductHeroProps>(({ data, className }, ref) => {\n const { title, subtitle, ctaText, poster, mobPoster, ctaLink, theme = 'light' } = data\n\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 return (\n <section\n ref={boxRef}\n data-ui-component-id=\"ProductHero\"\n className={cn(\n 'product-hero text-info-primary tablet:flex-row tablet:gap-[16px] lg-desktop:gap-[64px] flex w-full flex-col items-center justify-between gap-[32px]',\n {\n 'aiui-dark': theme === 'dark',\n },\n className\n )}\n >\n <div className=\"product-hero__content tablet:basis-[42%] laptop:basis-[36%] flex w-full flex-col items-start gap-[24px]\">\n <div className=\"product-hero__text\">\n <Heading as={'h3'} size={4} html={title} className=\"product-hero__title\" />\n <Heading\n as={'h4'}\n size={2}\n html={subtitle}\n className=\"product-hero__subtitle product-hero__subtitle--desktop laptop:mt-[12px] laptop:block desktop:mt-[16px] mt-[4px] hidden\"\n />\n <Text\n as={'p'}\n size={2}\n html={subtitle}\n className=\"product-hero__subtitle product-hero__subtitle--mobile laptop:mt-[12px] laptop:hidden desktop:mt-[16px] mt-[4px] block\"\n />\n </div>\n {ctaText && (\n <a href={ctaLink} className=\"product-hero__cta-link\">\n <Button className=\"product-hero__cta-button w-fit\">{ctaText}</Button>\n </a>\n )}\n </div>\n <Picture\n className=\"product-hero__image tablet:aspect-[824/640] tablet:basis-[58%] laptop:basis-[64%] aspect-[358/360] shrink\"\n source={`${poster?.url}, ${mobPoster?.url} 768`}\n />\n </section>\n )\n})\n\nProductHero.displayName = 'ProductHero'\n\nexport default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UAAU,4GACV,OAAQ,GAAGc,GAAQ,GAAG,KAAKC,GAAW,GAAG,OAC3C,GACF,CAEJ,CAAC,EAEDR,EAAY,YAAc,cAE1B,IAAOY,EAAQhB,EAAWI,CAAW",
6
+ "names": ["jsx", "jsxs", "React", "useRef", "useImperativeHandle", "Heading", "Button", "Picture", "Text", "cn", "withLayout", "useExposure", "componentType", "componentName", "ProductHero", "data", "className", "ref", "title", "subtitle", "ctaText", "poster", "mobPoster", "ctaLink", "theme", "boxRef", "ProductHero_default"]
7
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from './ProductHero.js';
2
+ export type { ProductHeroProps } from './types.js';
@@ -0,0 +1,2 @@
1
+ import{default as e}from"./ProductHero.js";export{e as default};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/ProductHero/index.ts"],
4
+ "sourcesContent": ["export { default } from './ProductHero.js'\nexport type { ProductHeroProps } from './types.js'\n"],
5
+ "mappings": "AAAA,OAAS,WAAAA,MAAe",
6
+ "names": ["default"]
7
+ }
@@ -0,0 +1,23 @@
1
+ import type { Media, Theme } from '../../types/props';
2
+ export interface ProductHeroProps {
3
+ data: {
4
+ /** 主标题 */
5
+ title: string;
6
+ /** 副标题 */
7
+ subtitle: string;
8
+ /** CTA 按钮文本 */
9
+ ctaText: string;
10
+ /** CTA 按钮链接 */
11
+ ctaLink: string;
12
+ /** 桌面端图片 URL */
13
+ poster: Media;
14
+ /** 移动端图片 URL */
15
+ mobPoster: Media;
16
+ /** 3D 模型源(可选,暂未使用) */
17
+ modelSrc?: string;
18
+ /** 主题,默认 light */
19
+ theme?: Theme;
20
+ };
21
+ /** 自定义类名 */
22
+ className?: string;
23
+ }
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import type { ProductNavProps } from './types.js';
3
+ declare const _default: import("react").ForwardRefExoticComponent<Omit<Omit<ProductNavProps & import("react").RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
4
+ className?: string | undefined;
5
+ data?: Record<string, any> | undefined;
6
+ }, "ref"> & import("react").RefAttributes<any>>;
7
+ export default _default;
@@ -0,0 +1,2 @@
1
+ "use client";import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useState as N,useEffect as y,forwardRef as E,useImperativeHandle as P,useRef as T}from"react";import{cn as i}from"../../helpers/utils.js";import{withLayout as L}from"../../shared/Styles.js";import{Button as x,Text as d}from"../../components/index.js";import{useExposure as C}from"../../hooks/useExposure.js";import*as c from"@radix-ui/react-popover";const D="navigation",H="product_nav",M=s=>e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s,children:e("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),v=E(({className:s="",data:m,id:u},f)=>{const{tabLinks:p=[],anchorList:h=[],textLink:a,buyBtn:r,theme:k="light"}=m||{},[g,w]=N(""),l=T(null);P(f,()=>l.current),C(l,{componentType:D,componentName:H}),y(()=>{const t=()=>{w(window.location.hash)};return t(),window.addEventListener("hashchange",t),()=>{window.removeEventListener("hashchange",t)}},[]);const b=t=>{t.target.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})};return o("div",{id:u,ref:l,className:i("product-nav text-info-primary bg-container-primary tablet:px-8 laptop:px-16 desktop:px-16 lg-desktop:px-[calc(50%-832px)] !sticky top-0 !z-[51] flex w-full justify-between overflow-hidden px-4 py-0",{"aiui-dark":k==="dark"},s),children:[o("div",{className:"product-nav-main desktop:flex-row desktop:gap-[48px] flex w-full flex-col justify-start",children:[o("div",{className:"product-nav-header laptop:w-full desktop:w-fit desktop:gap-[24px] desktop:py-0 flex w-full flex-row items-center justify-between gap-[16px] pt-[14px]",children:[o("div",{className:"product-nav-tabs flex flex-row items-center gap-[8px]",children:[p.map((t,n)=>o("div",{className:"product-nav-tab-item flex items-center gap-[8px]",children:[e("a",{href:t.link,className:i("product-nav-tab-link hover:text-brand-color text-nowrap text-[14px] font-bold tracking-[-0.04em]",{"text-[#6D6D6F]":n!==0,"hidden desktop:block":n===1}),children:e("span",{children:t.label})}),n!==p.length-1&&e("div",{className:"product-nav-tab-divider desktop:inline-block hidden h-[14px] w-px bg-[#E4E5E6]"})]},t.link||n)),p.length>1&&o(c.Root,{children:[e(c.Trigger,{asChild:!0,children:e("button",{className:"product-nav-dropdown-trigger desktop:hidden -ml-[4px] inline-block","aria-label":"More products",children:e(M,{className:"text-[#1D1D1F]"})})}),e(c.Content,{className:"product-nav-dropdown-content rounded-[6px] border border-[#E4E5E6] bg-white p-[6px] px-[8px] py-[4px]",style:{boxShadow:"0px 4px 8px 0px rgba(0,0,0,0.12)"},side:"bottom",align:"end",alignOffset:10,sideOffset:10,children:p.slice(1).map(t=>e("a",{href:t.link,className:"product-nav-dropdown-link hover:text-brand-color text-nowrap",children:e("span",{children:t.label})},t.link))})]})]}),o("div",{className:"product-nav-mobile-actions desktop:hidden desktop:gap-[24px] flex items-center gap-[16px]",children:[a?.link&&e("a",{href:a.link,target:a.target||"_self",className:"product-nav-text-link hover:text-brand-color cursor-pointer",children:e(d,{size:2,className:"text-nowrap",children:a.text})}),r?.link&&e(x,{as:"a",href:r.link,size:"sm",className:"product-nav-buy-button text-nowrap",children:r.text})]})]}),e("div",{className:"product-nav-anchors hide-scrollbar laptop:w-fit desktop:gap-[24px] desktop:py-[8px] flex w-full items-center gap-[16px] overflow-x-scroll py-[12px]",children:h.map(t=>o("a",{href:`#${t.id}`,className:"product-nav-anchor-link",onClick:n=>{b(n)},children:[e(d,{size:2,className:"product-nav-anchor-text text-nowrap",children:t.label}),e("div",{className:i("product-nav-anchor-indicator laptop:top-[12px] desktop:top-[10px] relative top-[12px] h-[4px] w-full bg-transparent",{"bg-brand-color":g===`#${t.id}`})})]},t.id))})]}),o("div",{className:"product-nav-desktop-actions desktop:flex desktop:gap-[24px] desktop:py-[8px] hidden items-center gap-[16px]",children:[a?.link&&e("a",{href:a.link,target:a.target||"_self",className:"product-nav-text-link hover:text-brand-color cursor-pointer text-black",children:e(d,{size:2,className:"text-nowrap",children:a.text})}),r?.link&&e(x,{as:"a",href:r.link,size:"sm",className:"product-nav-buy-button text-nowrap",children:r.text})]})]})});v.displayName="ProductNav";var V=L(v);export{V as default};
2
+ //# sourceMappingURL=ProductNav.js.map