@anker-in/headless-ui 1.1.9-alpha.1764130591163 → 1.1.9-alpha.1764142409124

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 (599) 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/index.d.ts +19 -6
  75. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +2 -2
  76. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +3 -2
  77. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +3 -2
  78. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +3 -2
  79. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +3 -2
  80. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +3 -2
  81. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +3 -2
  82. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +3 -2
  83. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.d.ts +1 -0
  84. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.d.ts +3 -2
  85. package/dist/cjs/biz-components/Marquee/Marquee.d.ts +2 -2
  86. package/dist/cjs/biz-components/MarqueeReview/index.d.ts +42 -0
  87. package/dist/cjs/biz-components/MarqueeReview/index.js +2 -0
  88. package/dist/cjs/biz-components/MarqueeReview/index.js.map +7 -0
  89. package/dist/cjs/biz-components/MediaPlayerBase/index.backup.d.ts +7 -0
  90. package/dist/cjs/biz-components/MediaPlayerBase/index.backup.js +2 -0
  91. package/dist/cjs/biz-components/MediaPlayerBase/index.backup.js.map +7 -0
  92. package/dist/cjs/biz-components/MediaPlayerBase/index.d.ts +3 -2
  93. package/dist/cjs/biz-components/MediaPlayerBase/index.js +1 -1
  94. package/dist/cjs/biz-components/MediaPlayerBase/index.js.map +3 -3
  95. package/dist/cjs/biz-components/MediaPlayerMulti/index.d.ts +3 -2
  96. package/dist/cjs/biz-components/MediaPlayerSticky/index.d.ts +2 -2
  97. package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +8 -0
  98. package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +11 -0
  99. package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js.map +7 -0
  100. package/dist/cjs/biz-components/MediaSceneSwitcher/index.d.ts +2 -0
  101. package/dist/cjs/biz-components/MediaSceneSwitcher/index.js +2 -0
  102. package/dist/cjs/biz-components/MediaSceneSwitcher/index.js.map +7 -0
  103. package/dist/cjs/biz-components/MediaSceneSwitcher/types.d.ts +19 -0
  104. package/dist/cjs/biz-components/MediaSceneSwitcher/types.js +2 -0
  105. package/dist/cjs/biz-components/MediaSceneSwitcher/types.js.map +7 -0
  106. package/dist/cjs/biz-components/MemberEquity/index.d.ts +2 -2
  107. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +2 -2
  108. package/dist/cjs/biz-components/NavigationSearch/index.d.ts +1 -0
  109. package/dist/cjs/biz-components/ProductCompare/index.d.ts +54 -0
  110. package/dist/cjs/biz-components/ProductCompare/index.js +2 -0
  111. package/dist/cjs/biz-components/ProductCompare/index.js.map +7 -0
  112. package/dist/cjs/biz-components/ProductHero/ProductHero.d.ts +7 -0
  113. package/dist/cjs/biz-components/ProductHero/ProductHero.js +2 -0
  114. package/dist/cjs/biz-components/ProductHero/ProductHero.js.map +7 -0
  115. package/dist/cjs/biz-components/ProductHero/index.d.ts +2 -0
  116. package/dist/cjs/biz-components/ProductHero/index.js +2 -0
  117. package/dist/cjs/biz-components/ProductHero/index.js.map +7 -0
  118. package/dist/cjs/biz-components/ProductHero/types.d.ts +23 -0
  119. package/dist/cjs/biz-components/ProductHero/types.js +2 -0
  120. package/dist/cjs/biz-components/ProductHero/types.js.map +7 -0
  121. package/dist/cjs/biz-components/ProductNav/ProductNav.d.ts +7 -0
  122. package/dist/cjs/biz-components/ProductNav/ProductNav.js +2 -0
  123. package/dist/cjs/biz-components/ProductNav/ProductNav.js.map +7 -0
  124. package/dist/cjs/biz-components/ProductNav/index.d.ts +2 -0
  125. package/dist/cjs/biz-components/ProductNav/index.js +2 -0
  126. package/dist/cjs/biz-components/ProductNav/index.js.map +7 -0
  127. package/dist/cjs/biz-components/ProductNav/types.d.ts +35 -0
  128. package/dist/cjs/biz-components/ProductNav/types.js +2 -0
  129. package/dist/cjs/biz-components/ProductNav/types.js.map +7 -0
  130. package/dist/cjs/biz-components/SelectStore/index.d.ts +3 -2
  131. package/dist/cjs/biz-components/ShelfDisplay/index.d.ts +2 -2
  132. package/dist/cjs/biz-components/Slogan/index.d.ts +2 -2
  133. package/dist/cjs/biz-components/Spacer/index.d.ts +2 -2
  134. package/dist/cjs/biz-components/Spacer/index.js +1 -1
  135. package/dist/cjs/biz-components/Spacer/index.js.map +2 -2
  136. package/dist/cjs/biz-components/Specs/index.d.ts +2 -2
  137. package/dist/cjs/biz-components/SpecsComparison/SpecsComparison.d.ts +7 -0
  138. package/dist/cjs/biz-components/SpecsComparison/SpecsComparison.js +2 -0
  139. package/dist/cjs/biz-components/SpecsComparison/SpecsComparison.js.map +7 -0
  140. package/dist/cjs/biz-components/SpecsComparison/index.d.ts +2 -0
  141. package/dist/cjs/biz-components/SpecsComparison/index.js +2 -0
  142. package/dist/cjs/biz-components/SpecsComparison/index.js.map +7 -0
  143. package/dist/cjs/biz-components/SpecsComparison/types.d.ts +34 -0
  144. package/dist/cjs/biz-components/SpecsComparison/types.js +2 -0
  145. package/dist/cjs/biz-components/SpecsComparison/types.js.map +7 -0
  146. package/dist/cjs/biz-components/TabWithImage/TabWithImage.d.ts +7 -0
  147. package/dist/cjs/biz-components/TabWithImage/TabWithImage.js +2 -0
  148. package/dist/cjs/biz-components/TabWithImage/TabWithImage.js.map +7 -0
  149. package/dist/cjs/biz-components/TabWithImage/index.d.ts +2 -0
  150. package/dist/cjs/biz-components/TabWithImage/index.js +2 -0
  151. package/dist/cjs/biz-components/TabWithImage/index.js.map +7 -0
  152. package/dist/cjs/biz-components/TabWithImage/types.d.ts +29 -0
  153. package/dist/cjs/biz-components/TabWithImage/types.js +2 -0
  154. package/dist/cjs/biz-components/TabWithImage/types.js.map +7 -0
  155. package/dist/cjs/biz-components/Tabs/Tabs.d.ts +2 -2
  156. package/dist/cjs/biz-components/Tabs/Tabs.js +1 -1
  157. package/dist/cjs/biz-components/Tabs/Tabs.js.map +1 -1
  158. package/dist/cjs/biz-components/Tabs/types.d.ts +11 -0
  159. package/dist/cjs/biz-components/Tabs/types.js +1 -1
  160. package/dist/cjs/biz-components/Tabs/types.js.map +1 -1
  161. package/dist/cjs/biz-components/TabsGroup/index.d.ts +2 -2
  162. package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.d.ts +7 -0
  163. package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.js +2 -0
  164. package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.js.map +7 -0
  165. package/dist/cjs/biz-components/TabsWithMedia/index.d.ts +2 -0
  166. package/dist/cjs/biz-components/TabsWithMedia/index.js +2 -0
  167. package/dist/cjs/biz-components/TabsWithMedia/index.js.map +7 -0
  168. package/dist/cjs/biz-components/TabsWithMedia/types.d.ts +43 -0
  169. package/dist/cjs/biz-components/TabsWithMedia/types.js +2 -0
  170. package/dist/cjs/biz-components/TabsWithMedia/types.js.map +7 -0
  171. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +11 -0
  172. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js +2 -0
  173. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +7 -0
  174. package/dist/cjs/biz-components/ThreeDCarousel/index.d.ts +2 -0
  175. package/dist/cjs/biz-components/ThreeDCarousel/index.js +2 -0
  176. package/dist/cjs/biz-components/ThreeDCarousel/index.js.map +7 -0
  177. package/dist/cjs/biz-components/ThreeDCarousel/types.d.ts +26 -0
  178. package/dist/cjs/biz-components/ThreeDCarousel/types.js +2 -0
  179. package/dist/cjs/biz-components/ThreeDCarousel/types.js.map +7 -0
  180. package/dist/cjs/biz-components/Title/index.d.ts +2 -2
  181. package/dist/cjs/biz-components/Title/types.js +1 -1
  182. package/dist/cjs/biz-components/Title/types.js.map +1 -1
  183. package/dist/cjs/biz-components/VideoFeature/VideoFeature.d.ts +7 -0
  184. package/dist/cjs/biz-components/VideoFeature/VideoFeature.js +2 -0
  185. package/dist/cjs/biz-components/VideoFeature/VideoFeature.js.map +7 -0
  186. package/dist/cjs/biz-components/VideoFeature/index.d.ts +2 -0
  187. package/dist/cjs/biz-components/VideoFeature/index.js +2 -0
  188. package/dist/cjs/biz-components/VideoFeature/index.js.map +7 -0
  189. package/dist/cjs/biz-components/VideoFeature/types.d.ts +19 -0
  190. package/dist/cjs/biz-components/VideoFeature/types.js +2 -0
  191. package/dist/cjs/biz-components/VideoFeature/types.js.map +7 -0
  192. package/dist/cjs/biz-components/WhyChoose/WhyChoose.d.ts +2 -2
  193. package/dist/cjs/biz-components/index.d.ts +33 -0
  194. package/dist/cjs/biz-components/index.js +1 -1
  195. package/dist/cjs/biz-components/index.js.map +3 -3
  196. package/dist/cjs/components/alert.d.ts +2 -2
  197. package/dist/cjs/components/avatar.d.ts +8 -8
  198. package/dist/cjs/components/container.d.ts +7 -7
  199. package/dist/cjs/components/container.js +1 -1
  200. package/dist/cjs/components/container.js.map +2 -2
  201. package/dist/cjs/components/dialog.d.ts +1 -1
  202. package/dist/cjs/components/drop-down.d.ts +3 -3
  203. package/dist/cjs/components/heading.d.ts +1 -0
  204. package/dist/cjs/components/heading.js +1 -1
  205. package/dist/cjs/components/heading.js.map +3 -3
  206. package/dist/cjs/components/input-number.d.ts +15 -15
  207. package/dist/cjs/components/link.d.ts +6 -6
  208. package/dist/cjs/components/tabs.d.ts +2 -2
  209. package/dist/cjs/components/tabs.js +1 -1
  210. package/dist/cjs/components/tabs.js.map +2 -2
  211. package/dist/cjs/cpn-components/CpnNavigation/index.js +1 -1
  212. package/dist/cjs/cpn-components/CpnNavigation/index.js.map +3 -3
  213. package/dist/cjs/helpers/ScrollLoadVideo.js +1 -1
  214. package/dist/cjs/helpers/ScrollLoadVideo.js.map +3 -3
  215. package/dist/cjs/shared/ErrorBoundary.d.ts +18 -0
  216. package/dist/cjs/shared/ErrorBoundary.js +2 -0
  217. package/dist/cjs/shared/ErrorBoundary.js.map +7 -0
  218. package/dist/cjs/shared/Styles.d.ts +2 -2
  219. package/dist/cjs/shared/Styles.js +1 -1
  220. package/dist/cjs/shared/Styles.js.map +3 -3
  221. package/dist/cjs/stories/InlineVideo.stories.js +164 -0
  222. package/dist/cjs/stories/InlineVideo.stories.js.map +7 -0
  223. package/dist/cjs/stories/MarqueeReview.stories.js +19 -0
  224. package/dist/cjs/stories/MarqueeReview.stories.js.map +7 -0
  225. package/dist/cjs/stories/MediaSceneSwitcher.stories.js +2 -0
  226. package/dist/cjs/stories/MediaSceneSwitcher.stories.js.map +7 -0
  227. package/dist/cjs/stories/ProductNav.stories.js +2 -0
  228. package/dist/cjs/stories/ProductNav.stories.js.map +7 -0
  229. package/dist/cjs/stories/ThreeDCarousel.stories.js +118 -0
  230. package/dist/cjs/stories/ThreeDCarousel.stories.js.map +7 -0
  231. package/dist/cjs/stories/featureCards.stories.js +61 -0
  232. package/dist/cjs/stories/featureCards.stories.js.map +7 -0
  233. package/dist/cjs/stories/featureShowcase.stories.js +44 -0
  234. package/dist/cjs/stories/featureShowcase.stories.js.map +7 -0
  235. package/dist/cjs/stories/imageTextFeature.stories.js +50 -0
  236. package/dist/cjs/stories/imageTextFeature.stories.js.map +7 -0
  237. package/dist/cjs/stories/imageWithText.stories.js +84 -0
  238. package/dist/cjs/stories/imageWithText.stories.js.map +7 -0
  239. package/dist/cjs/stories/ksp.stories.js +128 -0
  240. package/dist/cjs/stories/ksp.stories.js.map +7 -0
  241. package/dist/cjs/stories/productCompare.stories.js +54 -0
  242. package/dist/cjs/stories/productCompare.stories.js.map +7 -0
  243. package/dist/cjs/stories/productHero.stories.js +50 -0
  244. package/dist/cjs/stories/productHero.stories.js.map +7 -0
  245. package/dist/cjs/stories/specsComparison.stories.js +105 -0
  246. package/dist/cjs/stories/specsComparison.stories.js.map +7 -0
  247. package/dist/cjs/stories/tabWithImage.stories.js +53 -0
  248. package/dist/cjs/stories/tabWithImage.stories.js.map +7 -0
  249. package/dist/cjs/stories/tabsWithMedia.stories.js +68 -0
  250. package/dist/cjs/stories/tabsWithMedia.stories.js.map +7 -0
  251. package/dist/cjs/stories/videoFeature.stories.js +56 -0
  252. package/dist/cjs/stories/videoFeature.stories.js.map +7 -0
  253. package/dist/cjs/types/props.d.ts +9 -2
  254. package/dist/cjs/types/props.js +1 -1
  255. package/dist/cjs/types/props.js.map +1 -1
  256. package/dist/esm/biz-components/AccordionCards/index.d.ts +2 -2
  257. package/dist/esm/biz-components/AplusDesc/index.d.ts +3 -2
  258. package/dist/esm/biz-components/BrandEquity/BrandEquity.d.ts +3 -2
  259. package/dist/esm/biz-components/BrandEquity/BrandEquity.js +1 -1
  260. package/dist/esm/biz-components/BrandEquity/BrandEquity.js.map +3 -3
  261. package/dist/esm/biz-components/BrandEquity/types.d.ts +0 -1
  262. package/dist/esm/biz-components/Category/index.d.ts +2 -2
  263. package/dist/esm/biz-components/CreativeModule/index.d.ts +3 -2
  264. package/dist/esm/biz-components/DownLoad/index.d.ts +3 -2
  265. package/dist/esm/biz-components/Evaluate/index.d.ts +2 -2
  266. package/dist/esm/biz-components/Faq/Faq.d.ts +2 -2
  267. package/dist/esm/biz-components/Faq/Faq.js +1 -1
  268. package/dist/esm/biz-components/Faq/Faq.js.map +2 -2
  269. package/dist/esm/biz-components/FeatureCards/FeatureCards.d.ts +7 -0
  270. package/dist/esm/biz-components/FeatureCards/FeatureCards.js +2 -0
  271. package/dist/esm/biz-components/FeatureCards/FeatureCards.js.map +7 -0
  272. package/dist/esm/biz-components/FeatureCards/index.d.ts +2 -0
  273. package/dist/esm/biz-components/FeatureCards/index.js +2 -0
  274. package/dist/esm/biz-components/FeatureCards/index.js.map +7 -0
  275. package/dist/esm/biz-components/FeatureCards/types.d.ts +27 -0
  276. package/dist/esm/biz-components/FeatureCards/types.js +1 -0
  277. package/dist/esm/biz-components/FeatureCards/types.js.map +7 -0
  278. package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.d.ts +7 -0
  279. package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.js +2 -0
  280. package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.js.map +7 -0
  281. package/dist/esm/biz-components/FeatureShowcase/index.d.ts +2 -0
  282. package/dist/esm/biz-components/FeatureShowcase/index.js +2 -0
  283. package/dist/esm/biz-components/FeatureShowcase/index.js.map +7 -0
  284. package/dist/esm/biz-components/FeatureShowcase/types.d.ts +23 -0
  285. package/dist/esm/biz-components/FeatureShowcase/types.js +1 -0
  286. package/dist/esm/biz-components/FeatureShowcase/types.js.map +7 -0
  287. package/dist/esm/biz-components/Features/index.d.ts +3 -2
  288. package/dist/esm/biz-components/FootCharger/index.d.ts +3 -2
  289. package/dist/esm/biz-components/FooterNavigation/index.d.ts +3 -2
  290. package/dist/esm/biz-components/GiftBox/index.d.ts +3 -2
  291. package/dist/esm/biz-components/Graphic/index.d.ts +2 -2
  292. package/dist/esm/biz-components/GraphicAttractionBlock/index.d.ts +2 -2
  293. package/dist/esm/biz-components/GraphicMore/index.d.ts +3 -2
  294. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.d.ts +2 -2
  295. package/dist/esm/biz-components/HeaderNavigation/index.d.ts +2 -2
  296. package/dist/esm/biz-components/HeaderNavigation/index.js.map +2 -2
  297. package/dist/esm/biz-components/HeroBanner/HeroBanner.d.ts +2 -2
  298. package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
  299. package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +3 -3
  300. package/dist/esm/biz-components/HeroBanner/types.d.ts +2 -0
  301. package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.d.ts +7 -0
  302. package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.js +2 -0
  303. package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.js.map +7 -0
  304. package/dist/esm/biz-components/ImageTextFeature/index.d.ts +2 -0
  305. package/dist/esm/biz-components/ImageTextFeature/index.js +2 -0
  306. package/dist/esm/biz-components/ImageTextFeature/index.js.map +7 -0
  307. package/dist/esm/biz-components/ImageTextFeature/types.d.ts +31 -0
  308. package/dist/esm/biz-components/ImageTextFeature/types.js +1 -0
  309. package/dist/esm/biz-components/ImageTextFeature/types.js.map +7 -0
  310. package/dist/esm/biz-components/ImageWithText/ImageWithText.d.ts +7 -0
  311. package/dist/esm/biz-components/ImageWithText/ImageWithText.js +2 -0
  312. package/dist/esm/biz-components/ImageWithText/ImageWithText.js.map +7 -0
  313. package/dist/esm/biz-components/ImageWithText/index.d.ts +3 -0
  314. package/dist/esm/biz-components/ImageWithText/index.js +2 -0
  315. package/dist/esm/biz-components/ImageWithText/index.js.map +7 -0
  316. package/dist/esm/biz-components/ImageWithText/types.d.ts +110 -0
  317. package/dist/esm/biz-components/ImageWithText/types.js +2 -0
  318. package/dist/esm/biz-components/ImageWithText/types.js.map +7 -0
  319. package/dist/esm/biz-components/InlineVideo/index.d.ts +16 -0
  320. package/dist/esm/biz-components/InlineVideo/index.js +2 -0
  321. package/dist/esm/biz-components/InlineVideo/index.js.map +7 -0
  322. package/dist/esm/biz-components/Ksp/index.d.ts +44 -0
  323. package/dist/esm/biz-components/Ksp/index.js +2 -0
  324. package/dist/esm/biz-components/Ksp/index.js.map +7 -0
  325. package/dist/esm/biz-components/Listing/BizProductProvider.d.ts +1 -1
  326. package/dist/esm/biz-components/Listing/components/PaidShipping/index.d.ts +19 -6
  327. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +2 -2
  328. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +3 -2
  329. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +3 -2
  330. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +3 -2
  331. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +3 -2
  332. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +3 -2
  333. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +3 -2
  334. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +3 -2
  335. package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.d.ts +1 -0
  336. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.d.ts +3 -2
  337. package/dist/esm/biz-components/Marquee/Marquee.d.ts +2 -2
  338. package/dist/esm/biz-components/MarqueeReview/index.d.ts +42 -0
  339. package/dist/esm/biz-components/MarqueeReview/index.js +2 -0
  340. package/dist/esm/biz-components/MarqueeReview/index.js.map +7 -0
  341. package/dist/esm/biz-components/MediaPlayerBase/index.backup.d.ts +7 -0
  342. package/dist/esm/biz-components/MediaPlayerBase/index.backup.js +2 -0
  343. package/dist/esm/biz-components/MediaPlayerBase/index.backup.js.map +7 -0
  344. package/dist/esm/biz-components/MediaPlayerBase/index.d.ts +3 -2
  345. package/dist/esm/biz-components/MediaPlayerBase/index.js +1 -1
  346. package/dist/esm/biz-components/MediaPlayerBase/index.js.map +3 -3
  347. package/dist/esm/biz-components/MediaPlayerMulti/index.d.ts +3 -2
  348. package/dist/esm/biz-components/MediaPlayerSticky/index.d.ts +2 -2
  349. package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +8 -0
  350. package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +11 -0
  351. package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js.map +7 -0
  352. package/dist/esm/biz-components/MediaSceneSwitcher/index.d.ts +2 -0
  353. package/dist/esm/biz-components/MediaSceneSwitcher/index.js +2 -0
  354. package/dist/esm/biz-components/MediaSceneSwitcher/index.js.map +7 -0
  355. package/dist/esm/biz-components/MediaSceneSwitcher/types.d.ts +19 -0
  356. package/dist/esm/biz-components/MediaSceneSwitcher/types.js +1 -0
  357. package/dist/esm/biz-components/MediaSceneSwitcher/types.js.map +7 -0
  358. package/dist/esm/biz-components/MemberEquity/index.d.ts +2 -2
  359. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +2 -2
  360. package/dist/esm/biz-components/NavigationSearch/index.d.ts +1 -0
  361. package/dist/esm/biz-components/ProductCompare/index.d.ts +54 -0
  362. package/dist/esm/biz-components/ProductCompare/index.js +2 -0
  363. package/dist/esm/biz-components/ProductCompare/index.js.map +7 -0
  364. package/dist/esm/biz-components/ProductHero/ProductHero.d.ts +7 -0
  365. package/dist/esm/biz-components/ProductHero/ProductHero.js +2 -0
  366. package/dist/esm/biz-components/ProductHero/ProductHero.js.map +7 -0
  367. package/dist/esm/biz-components/ProductHero/index.d.ts +2 -0
  368. package/dist/esm/biz-components/ProductHero/index.js +2 -0
  369. package/dist/esm/biz-components/ProductHero/index.js.map +7 -0
  370. package/dist/esm/biz-components/ProductHero/types.d.ts +23 -0
  371. package/dist/esm/biz-components/ProductHero/types.js +1 -0
  372. package/dist/esm/biz-components/ProductHero/types.js.map +7 -0
  373. package/dist/esm/biz-components/ProductNav/ProductNav.d.ts +7 -0
  374. package/dist/esm/biz-components/ProductNav/ProductNav.js +2 -0
  375. package/dist/esm/biz-components/ProductNav/ProductNav.js.map +7 -0
  376. package/dist/esm/biz-components/ProductNav/index.d.ts +2 -0
  377. package/dist/esm/biz-components/ProductNav/index.js +2 -0
  378. package/dist/esm/biz-components/ProductNav/index.js.map +7 -0
  379. package/dist/esm/biz-components/ProductNav/types.d.ts +35 -0
  380. package/dist/esm/biz-components/ProductNav/types.js +1 -0
  381. package/dist/esm/biz-components/ProductNav/types.js.map +7 -0
  382. package/dist/esm/biz-components/SelectStore/index.d.ts +3 -2
  383. package/dist/esm/biz-components/ShelfDisplay/index.d.ts +2 -2
  384. package/dist/esm/biz-components/Slogan/index.d.ts +2 -2
  385. package/dist/esm/biz-components/Spacer/index.d.ts +2 -2
  386. package/dist/esm/biz-components/Spacer/index.js +1 -1
  387. package/dist/esm/biz-components/Spacer/index.js.map +2 -2
  388. package/dist/esm/biz-components/Specs/index.d.ts +2 -2
  389. package/dist/esm/biz-components/SpecsComparison/SpecsComparison.d.ts +7 -0
  390. package/dist/esm/biz-components/SpecsComparison/SpecsComparison.js +2 -0
  391. package/dist/esm/biz-components/SpecsComparison/SpecsComparison.js.map +7 -0
  392. package/dist/esm/biz-components/SpecsComparison/index.d.ts +2 -0
  393. package/dist/esm/biz-components/SpecsComparison/index.js +2 -0
  394. package/dist/esm/biz-components/SpecsComparison/index.js.map +7 -0
  395. package/dist/esm/biz-components/SpecsComparison/types.d.ts +34 -0
  396. package/dist/esm/biz-components/SpecsComparison/types.js +1 -0
  397. package/dist/esm/biz-components/SpecsComparison/types.js.map +7 -0
  398. package/dist/esm/biz-components/TabWithImage/TabWithImage.d.ts +7 -0
  399. package/dist/esm/biz-components/TabWithImage/TabWithImage.js +2 -0
  400. package/dist/esm/biz-components/TabWithImage/TabWithImage.js.map +7 -0
  401. package/dist/esm/biz-components/TabWithImage/index.d.ts +2 -0
  402. package/dist/esm/biz-components/TabWithImage/index.js +2 -0
  403. package/dist/esm/biz-components/TabWithImage/index.js.map +7 -0
  404. package/dist/esm/biz-components/TabWithImage/types.d.ts +29 -0
  405. package/dist/esm/biz-components/TabWithImage/types.js +1 -0
  406. package/dist/esm/biz-components/TabWithImage/types.js.map +7 -0
  407. package/dist/esm/biz-components/Tabs/Tabs.d.ts +2 -2
  408. package/dist/esm/biz-components/Tabs/Tabs.js +1 -1
  409. package/dist/esm/biz-components/Tabs/Tabs.js.map +1 -1
  410. package/dist/esm/biz-components/Tabs/types.d.ts +11 -0
  411. package/dist/esm/biz-components/TabsGroup/index.d.ts +2 -2
  412. package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.d.ts +7 -0
  413. package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.js +2 -0
  414. package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.js.map +7 -0
  415. package/dist/esm/biz-components/TabsWithMedia/index.d.ts +2 -0
  416. package/dist/esm/biz-components/TabsWithMedia/index.js +2 -0
  417. package/dist/esm/biz-components/TabsWithMedia/index.js.map +7 -0
  418. package/dist/esm/biz-components/TabsWithMedia/types.d.ts +43 -0
  419. package/dist/esm/biz-components/TabsWithMedia/types.js +1 -0
  420. package/dist/esm/biz-components/TabsWithMedia/types.js.map +7 -0
  421. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +11 -0
  422. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js +2 -0
  423. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +7 -0
  424. package/dist/esm/biz-components/ThreeDCarousel/index.d.ts +2 -0
  425. package/dist/esm/biz-components/ThreeDCarousel/index.js +2 -0
  426. package/dist/esm/biz-components/ThreeDCarousel/index.js.map +7 -0
  427. package/dist/esm/biz-components/ThreeDCarousel/types.d.ts +26 -0
  428. package/dist/esm/biz-components/ThreeDCarousel/types.js +1 -0
  429. package/dist/esm/biz-components/ThreeDCarousel/types.js.map +7 -0
  430. package/dist/esm/biz-components/Title/index.d.ts +2 -2
  431. package/dist/esm/biz-components/VideoFeature/VideoFeature.d.ts +7 -0
  432. package/dist/esm/biz-components/VideoFeature/VideoFeature.js +2 -0
  433. package/dist/esm/biz-components/VideoFeature/VideoFeature.js.map +7 -0
  434. package/dist/esm/biz-components/VideoFeature/index.d.ts +2 -0
  435. package/dist/esm/biz-components/VideoFeature/index.js +2 -0
  436. package/dist/esm/biz-components/VideoFeature/index.js.map +7 -0
  437. package/dist/esm/biz-components/VideoFeature/types.d.ts +19 -0
  438. package/dist/esm/biz-components/VideoFeature/types.js +1 -0
  439. package/dist/esm/biz-components/VideoFeature/types.js.map +7 -0
  440. package/dist/esm/biz-components/WhyChoose/WhyChoose.d.ts +2 -2
  441. package/dist/esm/biz-components/index.d.ts +33 -0
  442. package/dist/esm/biz-components/index.js +1 -1
  443. package/dist/esm/biz-components/index.js.map +2 -2
  444. package/dist/esm/components/alert.d.ts +2 -2
  445. package/dist/esm/components/avatar.d.ts +8 -8
  446. package/dist/esm/components/container.d.ts +7 -7
  447. package/dist/esm/components/container.js +1 -1
  448. package/dist/esm/components/container.js.map +2 -2
  449. package/dist/esm/components/dialog.d.ts +1 -1
  450. package/dist/esm/components/drop-down.d.ts +3 -3
  451. package/dist/esm/components/heading.d.ts +1 -0
  452. package/dist/esm/components/heading.js +1 -1
  453. package/dist/esm/components/heading.js.map +3 -3
  454. package/dist/esm/components/input-number.d.ts +15 -15
  455. package/dist/esm/components/link.d.ts +6 -6
  456. package/dist/esm/components/tabs.d.ts +2 -2
  457. package/dist/esm/components/tabs.js +1 -1
  458. package/dist/esm/components/tabs.js.map +2 -2
  459. package/dist/esm/cpn-components/CpnNavigation/index.js +1 -1
  460. package/dist/esm/cpn-components/CpnNavigation/index.js.map +2 -2
  461. package/dist/esm/helpers/ScrollLoadVideo.js +1 -1
  462. package/dist/esm/helpers/ScrollLoadVideo.js.map +2 -2
  463. package/dist/esm/shared/ErrorBoundary.d.ts +18 -0
  464. package/dist/esm/shared/ErrorBoundary.js +2 -0
  465. package/dist/esm/shared/ErrorBoundary.js.map +7 -0
  466. package/dist/esm/shared/Styles.d.ts +2 -2
  467. package/dist/esm/shared/Styles.js +1 -1
  468. package/dist/esm/shared/Styles.js.map +3 -3
  469. package/dist/esm/stories/InlineVideo.stories.js +164 -0
  470. package/dist/esm/stories/InlineVideo.stories.js.map +7 -0
  471. package/dist/esm/stories/MarqueeReview.stories.js +19 -0
  472. package/dist/esm/stories/MarqueeReview.stories.js.map +7 -0
  473. package/dist/esm/stories/MediaSceneSwitcher.stories.js +2 -0
  474. package/dist/esm/stories/MediaSceneSwitcher.stories.js.map +7 -0
  475. package/dist/esm/stories/ProductNav.stories.js +2 -0
  476. package/dist/esm/stories/ProductNav.stories.js.map +7 -0
  477. package/dist/esm/stories/ThreeDCarousel.stories.js +118 -0
  478. package/dist/esm/stories/ThreeDCarousel.stories.js.map +7 -0
  479. package/dist/esm/stories/featureCards.stories.js +61 -0
  480. package/dist/esm/stories/featureCards.stories.js.map +7 -0
  481. package/dist/esm/stories/featureShowcase.stories.js +44 -0
  482. package/dist/esm/stories/featureShowcase.stories.js.map +7 -0
  483. package/dist/esm/stories/imageTextFeature.stories.js +50 -0
  484. package/dist/esm/stories/imageTextFeature.stories.js.map +7 -0
  485. package/dist/esm/stories/imageWithText.stories.js +84 -0
  486. package/dist/esm/stories/imageWithText.stories.js.map +7 -0
  487. package/dist/esm/stories/ksp.stories.js +128 -0
  488. package/dist/esm/stories/ksp.stories.js.map +7 -0
  489. package/dist/esm/stories/productCompare.stories.js +54 -0
  490. package/dist/esm/stories/productCompare.stories.js.map +7 -0
  491. package/dist/esm/stories/productHero.stories.js +50 -0
  492. package/dist/esm/stories/productHero.stories.js.map +7 -0
  493. package/dist/esm/stories/specsComparison.stories.js +105 -0
  494. package/dist/esm/stories/specsComparison.stories.js.map +7 -0
  495. package/dist/esm/stories/tabWithImage.stories.js +53 -0
  496. package/dist/esm/stories/tabWithImage.stories.js.map +7 -0
  497. package/dist/esm/stories/tabsWithMedia.stories.js +68 -0
  498. package/dist/esm/stories/tabsWithMedia.stories.js.map +7 -0
  499. package/dist/esm/stories/videoFeature.stories.js +56 -0
  500. package/dist/esm/stories/videoFeature.stories.js.map +7 -0
  501. package/dist/esm/types/props.d.ts +9 -2
  502. package/dist/tokens/base.css +3 -0
  503. package/package.json +18 -13
  504. package/style.css +11 -2
  505. package/tailwind.config.js +24 -0
  506. package/dist/cjs/stories/HeroBanner.stories.d.ts +0 -27
  507. package/dist/cjs/stories/MemberEquity.stories.d.ts +0 -9
  508. package/dist/cjs/stories/MultiLayoutGraphicBlock.stories.d.ts +0 -9
  509. package/dist/cjs/stories/accordionCards.stories.d.ts +0 -17
  510. package/dist/cjs/stories/alert.stories.d.ts +0 -27
  511. package/dist/cjs/stories/avatar.stories.d.ts +0 -39
  512. package/dist/cjs/stories/badge.stories.d.ts +0 -31
  513. package/dist/cjs/stories/bizTabs.stories.d.ts +0 -7
  514. package/dist/cjs/stories/board.stories.d.ts +0 -6
  515. package/dist/cjs/stories/brandEquity.stories.d.ts +0 -16
  516. package/dist/cjs/stories/button.stories.d.ts +0 -56
  517. package/dist/cjs/stories/card.stories.d.ts +0 -27
  518. package/dist/cjs/stories/carousel.stories.d.ts +0 -8
  519. package/dist/cjs/stories/category.stories.d.ts +0 -17
  520. package/dist/cjs/stories/checkbox.stories.d.ts +0 -46
  521. package/dist/cjs/stories/container.stories.d.ts +0 -28
  522. package/dist/cjs/stories/cpnBanner.stories.d.ts +0 -14
  523. package/dist/cjs/stories/cpnCountdown.stories.d.ts +0 -12
  524. package/dist/cjs/stories/cpnNavigation.stories.d.ts +0 -14
  525. package/dist/cjs/stories/cpnProductcard.stories.d.ts +0 -14
  526. package/dist/cjs/stories/cpnTitle.stories.d.ts +0 -14
  527. package/dist/cjs/stories/creativeModule.stories.d.ts +0 -19
  528. package/dist/cjs/stories/dialog.stories.d.ts +0 -20
  529. package/dist/cjs/stories/drawer.stories.d.ts +0 -20
  530. package/dist/cjs/stories/drop-down.stories.d.ts +0 -16
  531. package/dist/cjs/stories/evaluate.stories.d.ts +0 -16
  532. package/dist/cjs/stories/faq.stories.d.ts +0 -21
  533. package/dist/cjs/stories/graphic.stories.d.ts +0 -64
  534. package/dist/cjs/stories/graphicAttractionBlock.stories.d.ts +0 -6
  535. package/dist/cjs/stories/grid.stories.d.ts +0 -22
  536. package/dist/cjs/stories/heading.stories.d.ts +0 -84
  537. package/dist/cjs/stories/input-number.stories.d.ts +0 -39
  538. package/dist/cjs/stories/input.stories.d.ts +0 -35
  539. package/dist/cjs/stories/link.stories.d.ts +0 -69
  540. package/dist/cjs/stories/marquee.stories.d.ts +0 -30
  541. package/dist/cjs/stories/mediaplayerBase.stories.d.ts +0 -6
  542. package/dist/cjs/stories/mediaplayerMulti.stories.d.ts +0 -16
  543. package/dist/cjs/stories/picture.stories.d.ts +0 -22
  544. package/dist/cjs/stories/popover.stories.d.ts +0 -17
  545. package/dist/cjs/stories/radio.stories.d.ts +0 -39
  546. package/dist/cjs/stories/shelfDisplay.stories.d.ts +0 -16
  547. package/dist/cjs/stories/skeleton.stories.d.ts +0 -20
  548. package/dist/cjs/stories/slogan.stories.d.ts +0 -20
  549. package/dist/cjs/stories/specs.stories.d.ts +0 -13
  550. package/dist/cjs/stories/tabs.stories.d.ts +0 -373
  551. package/dist/cjs/stories/text.stories.d.ts +0 -86
  552. package/dist/cjs/stories/whychoose.stories.d.ts +0 -21
  553. package/dist/esm/stories/HeroBanner.stories.d.ts +0 -27
  554. package/dist/esm/stories/MemberEquity.stories.d.ts +0 -9
  555. package/dist/esm/stories/MultiLayoutGraphicBlock.stories.d.ts +0 -9
  556. package/dist/esm/stories/accordionCards.stories.d.ts +0 -17
  557. package/dist/esm/stories/alert.stories.d.ts +0 -27
  558. package/dist/esm/stories/avatar.stories.d.ts +0 -39
  559. package/dist/esm/stories/badge.stories.d.ts +0 -31
  560. package/dist/esm/stories/bizTabs.stories.d.ts +0 -7
  561. package/dist/esm/stories/board.stories.d.ts +0 -6
  562. package/dist/esm/stories/brandEquity.stories.d.ts +0 -16
  563. package/dist/esm/stories/button.stories.d.ts +0 -56
  564. package/dist/esm/stories/card.stories.d.ts +0 -27
  565. package/dist/esm/stories/carousel.stories.d.ts +0 -8
  566. package/dist/esm/stories/category.stories.d.ts +0 -17
  567. package/dist/esm/stories/checkbox.stories.d.ts +0 -46
  568. package/dist/esm/stories/container.stories.d.ts +0 -28
  569. package/dist/esm/stories/cpnBanner.stories.d.ts +0 -14
  570. package/dist/esm/stories/cpnCountdown.stories.d.ts +0 -12
  571. package/dist/esm/stories/cpnNavigation.stories.d.ts +0 -14
  572. package/dist/esm/stories/cpnProductcard.stories.d.ts +0 -14
  573. package/dist/esm/stories/cpnTitle.stories.d.ts +0 -14
  574. package/dist/esm/stories/creativeModule.stories.d.ts +0 -19
  575. package/dist/esm/stories/dialog.stories.d.ts +0 -20
  576. package/dist/esm/stories/drawer.stories.d.ts +0 -20
  577. package/dist/esm/stories/drop-down.stories.d.ts +0 -16
  578. package/dist/esm/stories/evaluate.stories.d.ts +0 -16
  579. package/dist/esm/stories/faq.stories.d.ts +0 -21
  580. package/dist/esm/stories/graphic.stories.d.ts +0 -64
  581. package/dist/esm/stories/graphicAttractionBlock.stories.d.ts +0 -6
  582. package/dist/esm/stories/grid.stories.d.ts +0 -22
  583. package/dist/esm/stories/heading.stories.d.ts +0 -84
  584. package/dist/esm/stories/input-number.stories.d.ts +0 -39
  585. package/dist/esm/stories/input.stories.d.ts +0 -35
  586. package/dist/esm/stories/link.stories.d.ts +0 -69
  587. package/dist/esm/stories/marquee.stories.d.ts +0 -30
  588. package/dist/esm/stories/mediaplayerBase.stories.d.ts +0 -6
  589. package/dist/esm/stories/mediaplayerMulti.stories.d.ts +0 -16
  590. package/dist/esm/stories/picture.stories.d.ts +0 -22
  591. package/dist/esm/stories/popover.stories.d.ts +0 -17
  592. package/dist/esm/stories/radio.stories.d.ts +0 -39
  593. package/dist/esm/stories/shelfDisplay.stories.d.ts +0 -16
  594. package/dist/esm/stories/skeleton.stories.d.ts +0 -20
  595. package/dist/esm/stories/slogan.stories.d.ts +0 -20
  596. package/dist/esm/stories/specs.stories.d.ts +0 -13
  597. package/dist/esm/stories/tabs.stories.d.ts +0 -373
  598. package/dist/esm/stories/text.stories.d.ts +0 -86
  599. 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": "mlBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IAmLM,IAAAI,EAAA,6BAlLNC,EAAsF,iBACtFC,EAAyB,kBACzBC,EAAmB,kCACnBC,EAA2B,kCAC3BC,GAAmB,yCACnBC,GAA2B,kCAC3BC,EAAqC,6CAGrCC,GAA0B,uCAE1BC,GAA4B,sCAC5BC,EAA4B,+CAC5BC,EAAqB,gBACrBC,GAA0B,+BAC1BC,EAA8B,mCAE9B,MAAMC,GAAgB,oBAChBC,GAAgB,QAEhBC,EAAyC,CAAC,CAAE,kBAAAC,CAAkB,KAAO,CACzE,GAAGA,EACH,KAAMC,GAAQ,CACZ,KAAM,CAAE,KAAAC,CAAK,EAAID,EAEjB,OAAIC,EAAK,GAAKA,EAAK,EAAE,MACZ,wBAAwBA,EAAK,EAAE,KAAK,KAAKA,EAAK,IAAI,UAEpDA,EAAK,IACd,CACF,GAEMC,MAAkB,cACtB,CACE,CACE,UAAAC,EAAY,GACZ,GAAAC,EACA,WAAAC,EACA,KAAM,CAAE,MAAAC,EAAO,WAAAC,EAAY,QAAAC,EAAS,UAAAC,EAAW,MAAAC,EAAO,YAAAC,GAAa,MAAAC,EAAO,IAAAC,EAAK,MAAAC,EAAO,eAAAC,EAAgB,GAAGC,EAAK,CAChH,EACAC,KACG,CACH,KAAM,CAAE,OAAAC,CAAO,EAAIF,GACb,CAACG,EAAWC,CAAY,KAAI,YAAS,EAAK,EAC1C,CAACC,EAAKC,EAAM,KAAI,YAAS,CAAC,EAC1B,CAACC,GAAaC,EAAc,KAAI,YAAS,CAAC,EAC1C,CAACC,EAAqBC,EAAsB,KAAI,YAAS,CAAC,EAC1D,CAACC,EAASC,CAAU,KAAI,YAAkB,EAAK,EAE/CC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,IAAMd,EAAsB,GAAG,IAAK,EAExD,oBAAC,EAAAuC,QAAA,CACC,SAAUnC,EACV,OAAQhB,GAAK,KAAO,GACpB,IAAKH,GAAO,IACZ,UAAU,gCACV,eAAe,eACf,MAAK,GACL,KAAI,GACJ,YAAW,GACX,SAAQ,GACR,qBAAkB,GAClB,iBAAc,GAChB,KACA,OAAC,EAAAsD,QAAA,CACC,SAAUnC,EACV,OAAQhB,GAAK,KAAO,GACpB,IAAKF,IAAa,KAAOD,GAAO,IAChC,UAAU,gCACV,eAAe,eACf,MAAK,GACL,KAAI,GACJ,YAAW,GACX,SAAQ,GACR,qBAAkB,GAClB,iBAAc,GAChB,KACA,OAAC,OACC,IAAKoB,EACL,UAAU,iDACV,MAAO,CACL,WAAY,oBACd,EACF,GACF,GACF,EACF,KACA,OAAC,OACC,aAAW,MAAGZ,GAAU,6BAA8B4C,CAAM,EAC5D,MAAO5C,EAAS,CAAE,OAAQ,GAAGG,CAAG,IAAK,EAAI,CAAC,EAC1C,IAAKY,EACP,GACF,EACCN,GAAWlB,MACV,OAAC,eAAW,QAASkB,EAAS,UAAWlB,EAAW,aAAc,IAAMmB,EAAW,EAAK,EAAG,GAE/F,CAEJ,CACF,EAEA,IAAOhD,MAAQ,cAAWsB,EAAe",
6
- "names": ["MediaPlayerBase_exports", "__export", "MediaPlayerBase_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_lodash", "import_utils", "import_Styles", "import_button", "import_VideoModal", "import_html", "import_react_intersection_observer", "import_useExposure", "import_ScrollLoadVideo", "import_gsap", "import_SplitText", "import_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", "Button", "ScrollLoadVideo"]
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={() => setVisible(false)} />\n )}\n </>\n )\n }\n)\n\nMediaPlayerBase.displayName = 'MediaPlayerBase'\n\nexport default withLayout(MediaPlayerBase)\n"],
5
+ "mappings": "ulBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IA0QQ,IAAAI,EAAA,6BAzQRC,EAAmG,iBACnGC,EAAmB,kCACnBC,GAA2B,kCAC3BC,EAAmB,0CACnBC,EAA2B,kCAC3BC,EAAqC,6CAErCC,GAA0B,uCAE1BC,GAA4B,sCAC5BC,EAA4B,gDAC5BC,EAAqB,gBACrBC,GAA0B,+BAC1BC,EAA8B,mCAE9B,MAAMC,GAAgB,oBAChBC,GAAgB,QAGhBC,EAAmB,CACvB,kBAAmB,MACnB,0BAA2B,IAC3B,sBAAuB,GACvB,kBAAmB,IACnB,eAAgB,GAChB,yBAA0B,GAC1B,wBAAyB,CAC3B,EAEMC,GAAyC,CAAC,CAAE,kBAAAC,CAAkB,KAAO,CACzE,GAAGA,EACH,KAAMC,GAAQ,CACZ,KAAM,CAAE,KAAAC,CAAK,EAAID,EAEjB,OAAIC,EAAK,GAAKA,EAAK,EAAE,MACZ,wBAAwBA,EAAK,EAAE,KAAK,KAAKA,EAAK,IAAI,UAEpDA,EAAK,IACd,CACF,GAOMC,MAAkB,cACtB,CACE,CACE,UAAAC,EAAY,GACZ,GAAAC,EACA,WAAAC,EACA,KAAM,CAAE,MAAAC,EAAO,WAAAC,EAAY,QAAAC,EAAS,UAAAC,EAAW,MAAAC,EAAO,YAAAC,EAAa,MAAAC,EAAO,IAAAC,EAAK,MAAAC,EAAO,eAAAC,EAAgB,GAAGC,EAAK,CAChH,EACAC,KACG,CACH,KAAM,CAAE,OAAAC,CAAO,EAAIF,GACb,CAACG,EAAWC,CAAY,KAAI,YAAS,EAAK,EAC1C,CAACC,GAAKC,EAAM,KAAI,YAAS,CAAC,EAC1B,CAACC,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B,iBAAc,GAChB,GACF,KAGA,OAAC,OAAI,IAAKuB,EAAU,UAAU,uCAAuC,GACvE,EAECN,GAAWlB,MACV,OAAC,cAAW,QAASkB,EAAS,UAAWlB,EAAW,aAAc,IAAMmB,EAAW,EAAK,EAAG,GAE/F,CAmHN,CACF,EAEA1B,GAAgB,YAAc,kBAE9B,IAAOtB,MAAQ,eAAWsB,EAAe",
6
+ "names": ["MediaPlayerBase_exports", "__export", "MediaPlayerBase_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_Styles", "import_button", "import_VideoModal", "import_html", "import_react_intersection_observer", "import_useExposure", "import_ScrollLoadVideo", "import_gsap", "import_SplitText", "import_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", "Button", "ScrollLoadVideo"]
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 strict";"use client";var k=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames;var F=Object.prototype.hasOwnProperty;var V=(t,i)=>{for(var c in i)k(t,c,{get:i[c],enumerable:!0})},B=(t,i,c,m)=>{if(i&&typeof i=="object"||typeof i=="function")for(let l of H(i))!F.call(t,l)&&l!==c&&k(t,l,{get:()=>i[l],enumerable:!(m=R(i,l))||m.enumerable});return t};var _=t=>B(k({},"__esModule",{value:!0}),t);var Q={};V(Q,{default:()=>O});module.exports=_(Q);var e=require("react/jsx-runtime"),o=require("react"),M=require("react-responsive"),h=require("../../helpers/utils.js"),A=require("../../shared/Styles.js"),a=require("../../components/index.js"),X=require("../SwiperBox/index.js"),v=require("../../hooks/useExposure.js"),f=require("swiper/react"),E=require("swiper/modules"),Z=require("swiper/css");const U="media",S="media_scene_switcher",u=3e3,q=({data:t,configuration:i,theme:c})=>{const m=(0,o.useRef)(null),l=i?.isActive||!1;return(0,v.useExposure)(m,{componentType:U,componentName:S,componentTitle:t?.title,position:(i?.index??0)+1}),(0,e.jsxs)("div",{ref:m,className:(0,h.cn)("media-scene-switcher-item rounded-box cursor-pointer overflow-hidden transition-colors","text-[#6D6D6F]",{"bg-[#1D1D1F] text-white":l,"bg-[#EAEAEC] text-[1D1D1F]":l&&c==="light"}),onClick:()=>i?.onItemClick?.(i?.index??0),children:[(0,e.jsxs)("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:[(0,e.jsx)("div",{className:"media-scene-switcher-item-title flex-1",children:(0,e.jsx)(a.Heading,{as:"h6",size:2,html:t?.title})}),(0,e.jsx)("div",{className:"media-scene-switcher-item-badge rounded-btn border-[1.6px] px-[18px] py-[7px]",children:(0,e.jsx)(a.Heading,{as:"h6",size:2,html:t?.tag})})]}),(0,e.jsx)("div",{className:(0,h.cn)("media-scene-switcher-progress h-[2px] w-full",{"media-scene-switcher-progress-active":l}),style:{transform:"translate3d(-100%, -2px, 0)",background:"linear-gradient(90deg, #3ad1ff 0%, #008cd6 100%)",animation:l?`progress-bar ${u}ms ease-out`:"none"}})]})},$=({data:t,configuration:i,theme:c})=>{const m=(0,o.useRef)(null),l=i?.isActive||!1,d=(0,M.useMediaQuery)({query:"(max-width: 768px)"});(0,v.useExposure)(m,{componentType:U,componentName:S,componentTitle:t?.title,position:(i?.index??0)+1});const p=d&&t?.mobVideoUrl?.url?t.mobVideoUrl.url:t?.videoUrl?.url,r=d&&t?.mobImageUrl?.url?t.mobImageUrl.url:t?.imageUrl?.url,w=r||t?.videoUrl?.thumbnailURL||"";return(0,e.jsxs)("div",{ref:m,className:"media-scene-switcher-mobile-item rounded-box flex h-[360px] w-[296px] flex-col overflow-hidden",children:[(0,e.jsx)("div",{className:"media-scene-switcher-mobile-media relative aspect-[554/480] w-full overflow-hidden",children:p?(0,e.jsx)("video",{src:p,playsInline:!0,autoPlay:!0,loop:!0,muted:!0,poster:w,className:"size-full object-cover"}):r?(0,e.jsx)(a.Picture,{className:"size-full",imgClassName:"size-full object-cover",source:r,alt:t?.title||""}):null}),(0,e.jsxs)("div",{className:"media-scene-switcher-mobile-bottom flex items-start justify-between gap-[8px] bg-[#1D1D1F] p-[16px] text-white",children:[(0,e.jsx)("div",{className:"media-scene-switcher-mobile-title line-clamp-3 h-[72px] flex-1",children:(0,e.jsx)(a.Heading,{as:"h6",size:2,html:t?.title})}),(0,e.jsx)("div",{className:"media-scene-switcher-mobile-badge rounded-btn shrink-0 border-[1.6px] px-[12px] py-[5px]",children:(0,e.jsx)(a.Heading,{as:"h6",size:1,html:t?.tag})})]}),(0,e.jsx)("div",{className:(0,h.cn)("media-scene-switcher-progress h-[2px] w-full",{"media-scene-switcher-progress-active":l}),style:{transform:"translate3d(-100%, -2px, 0)",background:"linear-gradient(90deg, #3ad1ff 0%, #008cd6 100%)",animation:l?`progress-bar ${u}ms ease-out`:"none"}})]})},T=(0,o.forwardRef)(({className:t="",data:i,id:c,style:m},l)=>{const{title:d,subtitle:p,items:r=[],theme:w="light"}=i||{},[b,g]=(0,o.useState)(0),[P,C]=(0,o.useState)(0),N=(0,o.useRef)(null),x=(0,o.useRef)(0),z=(0,M.useMediaQuery)({query:"(max-width: 1023px)"});(0,o.useImperativeHandle)(l,()=>N.current),(0,v.useExposure)(N,{componentType:U,componentName:S,componentTitle:d}),(0,o.useEffect)(()=>{if(!(z||r.length===0))return x.current=window.setInterval(()=>{g(s=>(s+1)%r.length)},u),()=>{x.current&&window.clearInterval(x.current)}},[z,r.length]);const L=s=>{g(s),x.current&&window.clearInterval(x.current),x.current=window.setInterval(()=>{g(n=>(n+1)%r.length)},u)},y=r[b],G=y?.videoUrl?.url,K=y?.imageUrl?.url||y?.videoUrl?.thumbnailURL||"";return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("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
+ `}),(0,e.jsxs)("section",{id:c,ref:N,className:(0,h.cn)("media-scene-switcher text-info-primary w-full overflow-hidden",{"aiui-dark":w==="dark"},t),children:[(0,e.jsxs)("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:[(0,e.jsx)("div",{className:"media-scene-switcher-preview rounded-box laptop:flex-1 relative aspect-[824/640] max-w-[824px] shrink-0 overflow-hidden",children:r.map((s,n)=>{const D=s?.videoUrl?.url,I=s?.imageUrl?.url,j=I||s?.videoUrl?.thumbnailURL||"";return(0,e.jsx)("div",{className:(0,h.cn)("media-scene-switcher-media rounded-box absolute inset-0 hidden size-full overflow-hidden",{"inline-block":n===b}),children:D?(0,e.jsx)("video",{src:D,playsInline:!0,autoPlay:!0,loop:!0,muted:!0,poster:j,className:"size-full object-cover"}):I?(0,e.jsx)(a.Picture,{className:"size-full",imgClassName:"size-full object-cover",source:I,alt:s?.title||""}):null},s.id||n)})}),(0,e.jsxs)("div",{className:"media-scene-switcher-sidebar laptop:flex-1 flex shrink-0 flex-col justify-between",children:[(0,e.jsxs)("div",{className:"media-scene-switcher-header flex flex-col",children:[d&&(0,e.jsx)(a.Heading,{as:"h3",html:d,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]"}),p&&(0,e.jsx)(a.Text,{as:"span",size:4,html:p,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"})]}),(0,e.jsx)("div",{className:"media-scene-switcher-list flex flex-col gap-[16px]",children:r.map((s,n)=>(0,e.jsx)(q,{data:s,configuration:{index:n,isActive:n===b,onItemClick:L}},s.id||n))})]})]}),(0,e.jsxs)("div",{className:"media-scene-switcher-mobile laptop:hidden flex flex-col overflow-visible",children:[(0,e.jsxs)("div",{className:"media-scene-switcher-mobile-header",children:[d&&(0,e.jsx)(a.Heading,{as:"h2",html:d,size:2,className:"media-scene-switcher-title tablet:!text-[40px] desktop:!text-[56px] lg-desktop:!text-[64px] text-[40px] leading-tight"}),p&&(0,e.jsx)(a.Text,{as:"span",size:4,html:p,className:"media-scene-switcher-subtitle text-[14px] text-white"})]}),(0,e.jsx)("div",{className:"media-scene-switcher-mobile-swiper mt-[24px] overflow-visible",children:(0,e.jsx)(f.Swiper,{onSlideChange:s=>C(s.realIndex),initialSlide:0,modules:[E.Autoplay],loop:r.length>1,autoplay:r.length>1?{delay:u,disableOnInteraction:!1}:!1,spaceBetween:12,slidesPerView:"auto",watchSlidesProgress:!0,className:"w-full !overflow-visible",children:r.map((s,n)=>(0,e.jsx)(f.SwiperSlide,{className:"!h-auto !w-[296px]",children:(0,e.jsx)($,{data:s,configuration:{index:n,isActive:n===P}})},s.id||n))})})]})]})]})});T.displayName="MediaSceneSwitcher";var O=(0,A.withLayout)(T);
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>\n </section>\n </>\n )\n }\n)\n\nMediaSceneSwitcher.displayName = 'MediaSceneSwitcher'\n\nexport default withLayout(MediaSceneSwitcher)\n"],
5
+ "mappings": "sbAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAoDM,IAAAI,EAAA,6BAnDNC,EAA6E,iBAC7EC,EAA8B,4BAC9BC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAAuC,qCACvCC,EAAsB,iCACtBC,EAA4B,sCAE5BN,EAAoC,wBACpCO,EAAyB,0BACzBC,EAAO,sBAGP,MAAMC,EAAgB,QAChBC,EAAgB,uBAChBC,EAAgB,IAYhBC,EAAc,CAAC,CAAE,KAAAC,EAAM,cAAAC,EAAe,MAAAC,CAAM,IAAiB,CACjE,MAAMC,KAAM,UAAuB,IAAI,EACjCC,EAAWH,GAAe,UAAY,GAE5C,wBAAYE,EAAK,CACf,cAAAP,EACA,cAAAC,EACA,eAAgBG,GAAM,MACtB,UAAWC,GAAe,OAAS,GAAK,CAC1C,CAAC,KAGC,QAAC,OACC,IAAKE,EACL,aAAW,MACT,yF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U,qDACZ,SAAAC,EAAM,IAAI,CAACW,EAAMF,OAChB,OAAC1B,EAAA,CAEC,KAAM4B,EACN,cAAe,CACb,MAAAF,EACA,SAAUA,IAAUR,EACpB,YAAaO,CACf,GANKG,EAAK,IAAMF,CAOlB,CACD,EACH,GACF,GACF,KAGA,QAAC,OAAI,UAAU,2EACb,qBAAC,OAAI,UAAU,qCACZ,UAAAX,MACC,OAAC,WACC,GAAG,KACH,KAAMA,EACN,KAAM,EACN,UAAU,wHACZ,EAEDC,MACC,OAAC,QACC,GAAG,OACH,KAAM,EACN,KAAMA,EACN,UAAU,uDACZ,GAEJ,KAEA,OAAC,OAAI,UAAU,gEACb,mBAAC,UACC,cAAegB,GAAUX,EAAeW,EAAO,SAAS,EACxD,aAAc,EACd,QAAS,CAAC,UAAQ,EAClB,KAAMf,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,OAChB,OAAC,eAAmC,UAAU,qBAC5C,mBAACpB,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,IAAO1B,KAAQ,cAAW0B,CAAkB",
6
+ "names": ["MediaSceneSwitcher_exports", "__export", "MediaSceneSwitcher_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_react_responsive", "import_utils", "import_Styles", "import_components", "import_SwiperBox", "import_useExposure", "import_modules", "import_css", "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"]
7
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from './MediaSceneSwitcher.js';
2
+ export * from './types.js';
@@ -0,0 +1,2 @@
1
+ "use strict";var l=Object.create;var m=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var c=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var h=(o,r)=>{for(var e in r)m(o,e,{get:r[e],enumerable:!0})},t=(o,r,e,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let f of b(r))!g.call(o,f)&&f!==e&&m(o,f,{get:()=>r[f],enumerable:!(a=u(r,f))||a.enumerable});return o},x=(o,r,e)=>(t(o,r,"default"),e&&t(e,r,"default")),i=(o,r,e)=>(e=o!=null?l(c(o)):{},t(r||!o||!o.__esModule?m(e,"default",{value:o,enumerable:!0}):e,o)),j=o=>t(m({},"__esModule",{value:!0}),o);var p={};h(p,{default:()=>d.default});module.exports=j(p);var d=i(require("./MediaSceneSwitcher.js"));x(p,require("./types.js"),module.exports);
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": "wmBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wCAAAE,EAAAF,GAAA,IAAAG,EAAwB,sCACxBC,EAAAJ,EAAc,sBADd",
6
+ "names": ["MediaSceneSwitcher_exports", "__export", "__toCommonJS", "import_MediaSceneSwitcher", "__reExport"]
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,2 @@
1
+ "use strict";var n=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var s=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of a(e))!l.call(t,i)&&i!==o&&n(t,i,{get:()=>e[i],enumerable:!(r=m(e,i))||r.enumerable});return t};var d=t=>s(n({},"__esModule",{value:!0}),t);var p={};module.exports=d(p);
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/MediaSceneSwitcher/types.ts"],
4
+ "sourcesContent": ["import type { ComponentCommonProps, Media, Theme } from '../../types/props.js'\n\nexport interface MediaSceneSwitcherItem {\n id: string\n title: string\n tag?: string\n videoUrl?: Media | null\n imageUrl?: Media | null\n mobVideoUrl?: Media | null\n mobImageUrl?: Media | null\n}\n\nexport interface MediaSceneSwitcherProps extends ComponentCommonProps {\n data: {\n title?: string\n subtitle?: string\n items?: MediaSceneSwitcherItem[]\n /** \u4E3B\u9898\uFF0C\u9ED8\u8BA4 light */\n theme?: Theme\n }\n}\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["types_exports", "__toCommonJS"]
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
+ "use strict";var f=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var R=Object.prototype.hasOwnProperty;var k=(e,t)=>{for(var r in t)f(e,r,{get:t[r],enumerable:!0})},z=(e,t,r,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of P(t))!R.call(e,o)&&o!==r&&f(e,o,{get:()=>t[o],enumerable:!(l=M(t,o))||l.enumerable});return e};var C=e=>z(f({},"__esModule",{value:!0}),e);var D={};k(D,{default:()=>j});module.exports=C(D);var a=require("react/jsx-runtime"),c=require("react"),n=require("../../components/index.js"),p=require("../../helpers/index.js"),b=require("../../shared/Styles.js");function L({children:e,offset:t=800}){const[r,l]=(0,c.useState)(!1),o=(0,c.useRef)(null);return(0,c.useEffect)(()=>{const i=new IntersectionObserver(([x])=>x.isIntersecting&&l(!0),{rootMargin:`${t}px`});return o.current&&i.observe(o.current),()=>i.disconnect()},[t]),(0,a.jsx)("div",{ref:o,className:"size-full",children:r&&e})}function h({media:e,poster:t,className:r}){return e?.url?e.mimeType?.startsWith("video/")?(0,a.jsx)("video",{src:e.url,playsInline:!0,autoPlay:!0,muted:!0,loop:!0,poster:t?.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}):(0,a.jsx)("img",{src:e.url,alt:e.alt||"",className:r,width:e.width,height:e.height}):null}function A(e,t,r){return t===2?r==="1:1"?"laptop:flex-[1]":e===0?"laptop:flex-[2]":"laptop:flex-[3]":"laptop:flex-[1]"}function E(e){const{title:t,titleType:r="primary",titleIcon:l,subtitle:o,subtitleImage:i,textAlign:x="left",products:m=[],twoImageRatio:y="2:3",threeImageRatio:H="1:1:1",theme:v="light"}=e.data,u=x==="center"?"text-center":"text-left laptop:text-left",g=()=>r==="secondary"?3:4,w=()=>t?r==="selling-point"&&l?(0,a.jsxs)("div",{className:(0,p.cn)("product-compare-title-wrapper flex items-center gap-[8px]",u==="text-center"?"justify-center":""),children:[(0,a.jsx)("img",{src:l.url,alt:l.alt||"",className:"product-compare-title-icon laptop:size-[32px] size-[24px]"}),(0,a.jsx)(n.Heading,{as:"h2",size:g(),html:t,className:"product-compare-title",style:{color:"#00BEFA"}})]}):(0,a.jsx)(n.Heading,{as:"h2",size:g(),html:t,className:(0,p.cn)("product-compare-title",u)}):null;return(0,a.jsxs)("section",{className:(0,p.cn)("product-compare text-info-primary",e.className,{"aiui-dark":v==="dark"}),children:[w(),o&&(0,a.jsx)(n.Text,{as:"p",size:2,html:o,className:(0,p.cn)("product-compare-subtitle tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]",u)}),i&&(0,a.jsx)("div",{className:(0,p.cn)("product-compare-subtitle-image laptop:mt-[24px] mt-[16px]",u==="text-center"?"flex justify-center":""),children:(0,a.jsx)("img",{src:i.url,alt:i.alt||"",className:"max-w-full",width:i.width,height:i.height})}),(0,a.jsx)("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:m.map((s,d)=>{const N=d===m.length-1,T=A(d,m.length,y),I=N?"bg-brand-0":"bg-[rgba(0,0,0,0.2)]";return(0,a.jsxs)("div",{className:(0,p.cn)("product-compare-item rounded-box relative shrink overflow-hidden",T,{"order-2 tablet:order-1":d===0&&m.length===2,"order-1 tablet:order-2":d===1&&m.length===2}),children:[s.text&&(0,a.jsx)("div",{className:(0,p.cn)("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",I),children:(0,a.jsx)(n.Heading,{as:"h6",className:"font-bold",size:1,children:s.text})}),(0,a.jsxs)(L,{offset:1500,children:[(0,a.jsx)(h,{media:s.media,poster:s.poster,className:"product-compare-media laptop:block hidden size-full object-cover"}),(0,a.jsx)(h,{media:s.mobMedia,poster:s.mobPoster,className:"product-compare-media-mobile laptop:hidden block w-full"})]})]},d)})})]})}var j=(0,b.withLayout)(E);
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": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAmBI,IAAAI,EAAA,6BAnBJC,EAA4C,iBAC5CC,EAA8B,qCAC9BC,EAAmB,kCAEnBC,EAA2B,kCAE3B,SAASC,EAAU,CAAE,SAAAC,EAAU,OAAAC,EAAS,GAAI,EAAmD,CAC7F,KAAM,CAACC,EAAQC,CAAS,KAAI,YAAS,EAAK,EACpCC,KAAM,UAAuB,IAAI,EAEvC,sBAAU,IAAM,CACd,MAAMC,EAAW,IAAI,qBAAqB,CAAC,CAACC,CAAK,IAAMA,EAAM,gBAAkBH,EAAU,EAAI,EAAG,CAC9F,WAAY,GAAGF,CAAM,IACvB,CAAC,EACD,OAAAG,EAAI,SAAWC,EAAS,QAAQD,EAAI,OAAO,EACpC,IAAMC,EAAS,WAAW,CACnC,EAAG,CAACJ,CAAM,CAAC,KAGT,OAAC,OAAI,IAAKG,EAAK,UAAU,YACtB,SAAAF,GAAUF,EACb,CAEJ,CAEA,SAASO,EAAa,CAAE,MAAAC,EAAO,OAAAC,EAAQ,UAAAC,CAAU,EAA0D,CACzG,OAAKF,GAAO,IAEIA,EAAM,UAAU,WAAW,QAAQ,KAI/C,OAAC,SACC,IAAKA,EAAM,IACX,YAAW,G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,CAClE,YAAaS,IAAU,MACzB,CAAC,EAGA,UAAAG,EAAY,EAGZR,MACC,OAAC,QACC,GAAG,IACH,KAAM,EACN,KAAMA,EACN,aAAW,MACT,iIACAM,CACF,EACF,EAIDL,MACC,OAAC,OACC,aAAW,MACT,4DACAK,IAAiB,cAAgB,sBAAwB,EAC3D,EAEA,mBAAC,OACC,IAAKL,EAAc,IACnB,IAAKA,EAAc,KAAO,GAC1B,UAAU,aACV,MAAOA,EAAc,MACrB,OAAQA,EAAc,OACxB,EACF,KAIF,OAAC,OAAI,UAAU,wIACZ,SAAAE,EAAS,IAAI,CAACM,EAASjB,IAAU,CAChC,MAAMkB,EAAgBlB,IAAUW,EAAS,OAAS,EAC5CQ,EAAgBpB,EAAwBC,EAAOW,EAAS,OAAQT,CAAa,EAG7EkB,EAAeF,EAAgB,aAAe,uBAEpD,SACE,QAAC,OAEC,aAAW,MAAG,mEAAoEC,EAAe,CAC/F,yBAA0BnB,IAAU,GAAKW,EAAS,SAAW,EAC7D,yBAA0BX,IAAU,GAAKW,EAAS,SAAW,CAC/D,CAAC,EAGA,UAAAM,EAAQ,SACP,OAAC,OACC,aAAW,MACT,2PACAG,CACF,EAEA,mBAAC,WAAQ,GAAG,KAAK,UAAU,YAAY,KAAM,EAC1C,SAAAH,EAAQ,KACX,EACF,KAIF,QAAC9B,EAAA,CAAU,OAAQ,KACjB,oBAACQ,EAAA,CACC,MAAOsB,EAAQ,MACf,OAAQA,EAAQ,OAChB,UAAU,mEACZ,KACA,OAACtB,EAAA,CACC,MAAOsB,EAAQ,SACf,OAAQA,EAAQ,UAChB,UAAU,0DACZ,GACF,IAhCKjB,CAiCP,CAEJ,CAAC,EACH,GACF,CAEJ,CAEA,IAAOpB,KAAQ,cAAWuB,CAAc",
6
+ "names": ["ProductCompare_exports", "__export", "ProductCompare_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_helpers", "import_Styles", "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"]
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 strict";"use client";var N=Object.create;var c=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var w=(t,e)=>{for(var r in e)c(t,r,{get:e[r],enumerable:!0})},u=(t,e,r,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of g(e))!v.call(t,s)&&s!==r&&c(t,s,{get:()=>e[s],enumerable:!(l=H(e,s))||l.enumerable});return t};var y=(t,e,r)=>(r=t!=null?N(P(t)):{},u(e||!t||!t.__esModule?c(r,"default",{value:t,enumerable:!0}):r,t)),T=t=>u(c({},"__esModule",{value:!0}),t);var R={};w(R,{default:()=>E});module.exports=T(R);var o=require("react/jsx-runtime"),a=y(require("react")),p=require("../../components/index.js"),d=require("../../helpers/utils.js"),h=require("../../shared/Styles.js"),f=require("../../hooks/useExposure.js");const L="image",D="product_hero",n=a.default.forwardRef(({data:t,className:e},r)=>{const{title:l,subtitle:s,ctaText:m,poster:b,mobPoster:x,ctaLink:_,theme:k="light"}=t,i=(0,a.useRef)(null);return(0,f.useExposure)(i,{componentType:L,componentName:D,componentTitle:l,componentDescription:s}),(0,a.useImperativeHandle)(r,()=>i.current),(0,o.jsxs)("section",{ref:i,"data-ui-component-id":"ProductHero",className:(0,d.cn)("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":k==="dark"},e),children:[(0,o.jsxs)("div",{className:"product-hero__content tablet:basis-[42%] laptop:basis-[36%] flex w-full flex-col items-start gap-[24px]",children:[(0,o.jsxs)("div",{className:"product-hero__text",children:[(0,o.jsx)(p.Heading,{as:"h3",size:4,html:l,className:"product-hero__title"}),(0,o.jsx)(p.Heading,{as:"h4",size:2,html:s,className:"product-hero__subtitle product-hero__subtitle--desktop laptop:mt-[12px] laptop:block desktop:mt-[16px] mt-[4px] hidden"}),(0,o.jsx)(p.Text,{as:"p",size:2,html:s,className:"product-hero__subtitle product-hero__subtitle--mobile laptop:mt-[12px] laptop:hidden desktop:mt-[16px] mt-[4px] block"})]}),m&&(0,o.jsx)("a",{href:_,className:"product-hero__cta-link",children:(0,o.jsx)(p.Button,{className:"product-hero__cta-button w-fit",children:m})})]}),(0,o.jsx)(p.Picture,{className:"product-hero__image tablet:aspect-[824/640] tablet:basis-[58%] laptop:basis-[64%] aspect-[358/360] shrink",source:`${b?.url}, ${x?.url} 768`})]})});n.displayName="ProductHero";var E=(0,h.withLayout)(n);
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 withLayout(ProductHero)\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAsCQ,IAAAI,EAAA,6BArCRC,EAAmD,oBACnDC,EAA+C,qCAC/CC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAA4B,sCAG5B,MAAMC,EAAgB,QAChBC,EAAgB,eAEhBC,EAAc,EAAAC,QAAM,WAA6C,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACnG,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAU,QAAAC,EAAS,OAAAC,EAAQ,UAAAC,EAAW,QAAAC,EAAS,MAAAC,EAAQ,OAAQ,EAAIT,EAE5EU,KAAS,UAAuB,IAAI,EAE1C,wBAAYA,EAAQ,CAClB,cAAAd,EACA,cAAAC,EACA,eAAgBM,EAChB,qBAAsBC,CACxB,CAAC,KAED,uBAAoBF,EAAK,IAAMQ,EAAO,OAAyB,KAG7D,QAAC,WACC,IAAKA,EACL,uBAAqB,cACrB,aAAW,MACT,sJACA,CACE,YAAaD,IAAU,MACzB,EACAR,CACF,EAEA,qBAAC,OAAI,UAAU,0GACb,qBAAC,OAAI,UAAU,qBACb,oBAAC,WAAQ,GAAI,KAAM,KAAM,EAAG,KAAME,EAAO,UAAU,sBAAsB,KACzE,OAAC,WACC,GAAI,KACJ,KAAM,EACN,KAAMC,EACN,UAAU,yHACZ,KACA,OAAC,QACC,GAAI,IACJ,KAAM,EACN,KAAMA,EACN,UAAU,wHACZ,GACF,EACCC,MACC,OAAC,KAAE,KAAMG,EAAS,UAAU,yBAC1B,mBAAC,UAAO,UAAU,iCAAkC,SAAAH,EAAQ,EAC9D,GAEJ,KACA,OAAC,WACC,UAAU,4GACV,OAAQ,GAAGC,GAAQ,GAAG,KAAKC,GAAW,GAAG,OAC3C,GACF,CAEJ,CAAC,EAEDT,EAAY,YAAc,cAE1B,IAAOV,KAAQ,cAAWU,CAAW",
6
+ "names": ["ProductHero_exports", "__export", "ProductHero_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_utils", "import_Styles", "import_useExposure", "componentType", "componentName", "ProductHero", "React", "data", "className", "ref", "title", "subtitle", "ctaText", "poster", "mobPoster", "ctaLink", "theme", "boxRef"]
7
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from './ProductHero.js';
2
+ export type { ProductHeroProps } from './types.js';
@@ -0,0 +1,2 @@
1
+ "use strict";var m=Object.create;var p=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var a=(o,r)=>{for(var e in r)p(o,e,{get:r[e],enumerable:!0})},s=(o,r,e,f)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of x(r))!P.call(o,t)&&t!==e&&p(o,t,{get:()=>r[t],enumerable:!(f=u(r,t))||f.enumerable});return o};var c=(o,r,e)=>(e=o!=null?m(y(o)):{},s(r||!o||!o.__esModule?p(e,"default",{value:o,enumerable:!0}):e,o)),j=o=>s(p({},"__esModule",{value:!0}),o);var l={};a(l,{default:()=>d.default});module.exports=j(l);var d=c(require("./ProductHero.js"));
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": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wCAAAE,EAAAF,GAAA,IAAAG,EAAwB",
6
+ "names": ["ProductHero_exports", "__export", "__toCommonJS", "import_ProductHero"]
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,2 @@
1
+ "use strict";var s=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var p=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of m(t))!n.call(e,r)&&r!==o&&s(e,r,{get:()=>t[r],enumerable:!(i=a(t,r))||i.enumerable});return e};var c=e=>p(s({},"__esModule",{value:!0}),e);var d={};module.exports=c(d);
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/ProductHero/types.ts"],
4
+ "sourcesContent": ["import type { Media, Theme } from '../../types/props'\n\nexport interface ProductHeroProps {\n data: {\n /** \u4E3B\u6807\u9898 */\n title: string\n /** \u526F\u6807\u9898 */\n subtitle: string\n /** CTA \u6309\u94AE\u6587\u672C */\n ctaText: string\n /** CTA \u6309\u94AE\u94FE\u63A5 */\n ctaLink: string\n /** \u684C\u9762\u7AEF\u56FE\u7247 URL */\n poster: Media\n /** \u79FB\u52A8\u7AEF\u56FE\u7247 URL */\n mobPoster: Media\n /** 3D \u6A21\u578B\u6E90\uFF08\u53EF\u9009\uFF0C\u6682\u672A\u4F7F\u7528\uFF09 */\n modelSrc?: string\n /** \u4E3B\u9898\uFF0C\u9ED8\u8BA4 light */\n theme?: Theme\n }\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n}\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["types_exports", "__toCommonJS"]
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 strict";"use client";var P=Object.create;var x=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var C=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty;var H=(t,a)=>{for(var n in a)x(t,n,{get:a[n],enumerable:!0})},f=(t,a,n,c)=>{if(a&&typeof a=="object"||typeof a=="function")for(let r of L(a))!D.call(t,r)&&r!==n&&x(t,r,{get:()=>a[r],enumerable:!(c=T(a,r))||c.enumerable});return t};var M=(t,a,n)=>(n=t!=null?P(C(t)):{},f(a||!t||!t.__esModule?x(n,"default",{value:t,enumerable:!0}):n,t)),R=t=>f(x({},"__esModule",{value:!0}),t);var V={};H(V,{default:()=>j});module.exports=R(V);var e=require("react/jsx-runtime"),p=require("react"),v=require("../../helpers/utils.js"),k=require("../../shared/Styles.js"),i=require("../../components/index.js"),g=require("../../hooks/useExposure.js"),u=M(require("@radix-ui/react-popover"));const S="navigation",z="product_nav",B=t=>(0,e.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:(0,e.jsx)("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),h=(0,p.forwardRef)(({className:t="",data:a,id:n},c)=>{const{tabLinks:r=[],anchorList:w=[],textLink:s,buyBtn:d,theme:b="light"}=a||{},[N,y]=(0,p.useState)(""),m=(0,p.useRef)(null);(0,p.useImperativeHandle)(c,()=>m.current),(0,g.useExposure)(m,{componentType:S,componentName:z}),(0,p.useEffect)(()=>{const o=()=>{y(window.location.hash)};return o(),window.addEventListener("hashchange",o),()=>{window.removeEventListener("hashchange",o)}},[]);const E=o=>{o.target.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})};return(0,e.jsxs)("div",{id:n,ref:m,className:(0,v.cn)("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":b==="dark"},t),children:[(0,e.jsxs)("div",{className:"product-nav-main desktop:flex-row desktop:gap-[48px] flex w-full flex-col justify-start",children:[(0,e.jsxs)("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:[(0,e.jsxs)("div",{className:"product-nav-tabs flex flex-row items-center gap-[8px]",children:[r.map((o,l)=>(0,e.jsxs)("div",{className:"product-nav-tab-item flex items-center gap-[8px]",children:[(0,e.jsx)("a",{href:o.link,className:(0,v.cn)("product-nav-tab-link hover:text-brand-color text-nowrap text-[14px] font-bold tracking-[-0.04em]",{"text-[#6D6D6F]":l!==0,"hidden desktop:block":l===1}),children:(0,e.jsx)("span",{children:o.label})}),l!==r.length-1&&(0,e.jsx)("div",{className:"product-nav-tab-divider desktop:inline-block hidden h-[14px] w-px bg-[#E4E5E6]"})]},o.link||l)),r.length>1&&(0,e.jsxs)(u.Root,{children:[(0,e.jsx)(u.Trigger,{asChild:!0,children:(0,e.jsx)("button",{className:"product-nav-dropdown-trigger desktop:hidden -ml-[4px] inline-block","aria-label":"More products",children:(0,e.jsx)(B,{className:"text-[#1D1D1F]"})})}),(0,e.jsx)(u.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:r.slice(1).map(o=>(0,e.jsx)("a",{href:o.link,className:"product-nav-dropdown-link hover:text-brand-color text-nowrap",children:(0,e.jsx)("span",{children:o.label})},o.link))})]})]}),(0,e.jsxs)("div",{className:"product-nav-mobile-actions desktop:hidden desktop:gap-[24px] flex items-center gap-[16px]",children:[s?.link&&(0,e.jsx)("a",{href:s.link,target:s.target||"_self",className:"product-nav-text-link hover:text-brand-color cursor-pointer",children:(0,e.jsx)(i.Text,{size:2,className:"text-nowrap",children:s.text})}),d?.link&&(0,e.jsx)(i.Button,{as:"a",href:d.link,size:"sm",className:"product-nav-buy-button text-nowrap",children:d.text})]})]}),(0,e.jsx)("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:w.map(o=>(0,e.jsxs)("a",{href:`#${o.id}`,className:"product-nav-anchor-link",onClick:l=>{E(l)},children:[(0,e.jsx)(i.Text,{size:2,className:"product-nav-anchor-text text-nowrap",children:o.label}),(0,e.jsx)("div",{className:(0,v.cn)("product-nav-anchor-indicator laptop:top-[12px] desktop:top-[10px] relative top-[12px] h-[4px] w-full bg-transparent",{"bg-brand-color":N===`#${o.id}`})})]},o.id))})]}),(0,e.jsxs)("div",{className:"product-nav-desktop-actions desktop:flex desktop:gap-[24px] desktop:py-[8px] hidden items-center gap-[16px]",children:[s?.link&&(0,e.jsx)("a",{href:s.link,target:s.target||"_self",className:"product-nav-text-link hover:text-brand-color cursor-pointer text-black",children:(0,e.jsx)(i.Text,{size:2,className:"text-nowrap",children:s.text})}),d?.link&&(0,e.jsx)(i.Button,{as:"a",href:d.link,size:"sm",className:"product-nav-buy-button text-nowrap",children:d.text})]})]})});h.displayName="ProductNav";var j=(0,k.withLayout)(h);
2
+ //# sourceMappingURL=ProductNav.js.map