@anker-in/headless-ui 1.2.3-alpha.1778583232121 → 1.2.4
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.
- package/dist/cjs/biz-components/AccordionCards/index.js +1 -1
- package/dist/cjs/biz-components/AccordionCards/index.js.map +3 -3
- package/dist/cjs/biz-components/ActivityMechanism/index.js +1 -1
- package/dist/cjs/biz-components/ActivityMechanism/index.js.map +3 -3
- package/dist/cjs/biz-components/ActivitySchedule/index.js +1 -1
- package/dist/cjs/biz-components/ActivitySchedule/index.js.map +3 -3
- package/dist/cjs/biz-components/AiuiProvider/index.js +1 -1
- package/dist/cjs/biz-components/AiuiProvider/index.js.map +3 -3
- package/dist/cjs/biz-components/AnchorNavigation/index.js +1 -1
- package/dist/cjs/biz-components/AnchorNavigation/index.js.map +3 -3
- package/dist/cjs/biz-components/BrandCardLink/BrandCardLink.js +1 -1
- package/dist/cjs/biz-components/BrandCardLink/BrandCardLink.js.map +3 -3
- package/dist/cjs/biz-components/Category/SwiperCategory.js +1 -1
- package/dist/cjs/biz-components/Category/SwiperCategory.js.map +3 -3
- package/dist/cjs/biz-components/Category/index.js +1 -1
- package/dist/cjs/biz-components/Category/index.js.map +3 -3
- package/dist/cjs/biz-components/Evaluate/index.js +1 -1
- package/dist/cjs/biz-components/Evaluate/index.js.map +3 -3
- package/dist/cjs/biz-components/EventSchedule/index.js +1 -1
- package/dist/cjs/biz-components/EventSchedule/index.js.map +3 -3
- package/dist/cjs/biz-components/Faq/Faq.js +1 -1
- package/dist/cjs/biz-components/Faq/Faq.js.map +2 -2
- package/dist/cjs/biz-components/Faq/types.d.ts +1 -0
- package/dist/cjs/biz-components/Faq/types.js +1 -1
- package/dist/cjs/biz-components/Faq/types.js.map +1 -1
- package/dist/cjs/biz-components/FeatureCards/FeatureCards.js +1 -1
- package/dist/cjs/biz-components/FeatureCards/FeatureCards.js.map +3 -3
- package/dist/cjs/biz-components/GiftBox/index.js +1 -1
- package/dist/cjs/biz-components/GiftBox/index.js.map +2 -2
- package/dist/cjs/biz-components/GiftShelf/index.js +1 -1
- package/dist/cjs/biz-components/GiftShelf/index.js.map +3 -3
- package/dist/cjs/biz-components/GiftTierShelf/index.js +1 -1
- package/dist/cjs/biz-components/GiftTierShelf/index.js.map +3 -3
- package/dist/cjs/biz-components/Graphic/index.js +1 -1
- package/dist/cjs/biz-components/Graphic/index.js.map +3 -3
- package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.js +1 -1
- package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.js.map +3 -3
- package/dist/cjs/biz-components/HeaderNavigation/index.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/index.js.map +3 -3
- package/dist/cjs/biz-components/HeaderNavigation/types.d.ts +1 -8
- package/dist/cjs/biz-components/HeaderNavigation/types.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/types.js.map +2 -2
- package/dist/cjs/biz-components/HeaderNavigation/withCategory.d.ts +0 -1
- package/dist/cjs/biz-components/HeaderNavigation/withCategory.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/withCategory.js.map +3 -3
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +3 -3
- package/dist/cjs/biz-components/HeroBanner/HeroBannerCarousel.js +1 -1
- package/dist/cjs/biz-components/HeroBanner/HeroBannerCarousel.js.map +3 -3
- package/dist/cjs/biz-components/ImageWithText/ImageWithText.js +1 -1
- package/dist/cjs/biz-components/ImageWithText/ImageWithText.js.map +3 -3
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +3 -3
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +3 -3
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js +1 -1
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js.map +3 -3
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.d.ts +0 -2
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.js +1 -1
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.js.map +1 -1
- package/dist/cjs/biz-components/LotteryShared/ErrorModal.d.ts +0 -4
- package/dist/cjs/biz-components/LotteryShared/ErrorModal.js.map +2 -2
- package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.d.ts +13 -13
- package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.js +1 -1
- package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.js.map +3 -3
- package/dist/cjs/biz-components/LotteryShared/types.d.ts +0 -9
- package/dist/cjs/biz-components/LotteryShared/types.js.map +2 -2
- package/dist/cjs/biz-components/Marquee/Marquee.js +1 -1
- package/dist/cjs/biz-components/Marquee/Marquee.js.map +2 -2
- package/dist/cjs/biz-components/MediaPlayerBase/index.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerBase/index.js.map +3 -3
- package/dist/cjs/biz-components/MediaPlayerMulti/index.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerMulti/index.js.map +3 -3
- package/dist/cjs/biz-components/MemberEquity/index.js +2 -2
- package/dist/cjs/biz-components/MemberEquity/index.js.map +3 -3
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
- package/dist/cjs/biz-components/NavigationSearch/index.js +2 -2
- package/dist/cjs/biz-components/NavigationSearch/index.js.map +2 -2
- package/dist/cjs/biz-components/ProductHero/ProductHero.js +1 -1
- package/dist/cjs/biz-components/ProductHero/ProductHero.js.map +3 -3
- package/dist/cjs/biz-components/ProductLottery/types.d.ts +5 -62
- package/dist/cjs/biz-components/ProductLottery/types.js +1 -1
- package/dist/cjs/biz-components/ProductLottery/types.js.map +2 -2
- package/dist/cjs/biz-components/ProductNav/ProductNav.js +1 -1
- package/dist/cjs/biz-components/ProductNav/ProductNav.js.map +3 -3
- package/dist/cjs/biz-components/PromotionalBar/index.js +1 -1
- package/dist/cjs/biz-components/PromotionalBar/index.js.map +3 -3
- package/dist/cjs/biz-components/SecondaryBanner/SecondaryBannerCarousel.d.ts +0 -1
- package/dist/cjs/biz-components/SecondaryBanner/SecondaryBannerCarousel.js +1 -1
- package/dist/cjs/biz-components/SecondaryBanner/SecondaryBannerCarousel.js.map +3 -3
- package/dist/cjs/biz-components/SecondaryBanner/index.d.ts +0 -9
- package/dist/cjs/biz-components/SecondaryBanner/index.js +1 -1
- package/dist/cjs/biz-components/SecondaryBanner/index.js.map +3 -3
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js +1 -1
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
- package/dist/cjs/biz-components/Subscribe/index.js +1 -1
- package/dist/cjs/biz-components/Subscribe/index.js.map +2 -2
- package/dist/cjs/biz-components/SwiperBox/index.js +1 -1
- package/dist/cjs/biz-components/SwiperBox/index.js.map +3 -3
- package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
- package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +3 -3
- package/dist/cjs/biz-components/Title/index.js +1 -1
- package/dist/cjs/biz-components/Title/index.js.map +3 -3
- package/dist/cjs/biz-components/WheelLottery/index.js +1 -1
- package/dist/cjs/biz-components/WheelLottery/index.js.map +3 -3
- package/dist/cjs/biz-components/index.d.ts +0 -4
- package/dist/cjs/biz-components/index.js +1 -1
- package/dist/cjs/biz-components/index.js.map +3 -3
- package/dist/cjs/components/Countdown.js +1 -1
- package/dist/cjs/components/Countdown.js.map +3 -3
- package/dist/cjs/components/link.js +1 -1
- package/dist/cjs/components/link.js.map +2 -2
- package/dist/cjs/helpers/index.d.ts +1 -1
- package/dist/cjs/helpers/index.js +1 -1
- package/dist/cjs/helpers/index.js.map +2 -2
- package/dist/cjs/helpers/isLexicalEmpty.d.ts +0 -5
- package/dist/cjs/helpers/isLexicalEmpty.js +1 -1
- package/dist/cjs/helpers/isLexicalEmpty.js.map +3 -3
- package/dist/esm/biz-components/AccordionCards/index.js +1 -1
- package/dist/esm/biz-components/AccordionCards/index.js.map +3 -3
- package/dist/esm/biz-components/ActivityMechanism/index.js +1 -1
- package/dist/esm/biz-components/ActivityMechanism/index.js.map +3 -3
- package/dist/esm/biz-components/ActivitySchedule/index.js +1 -1
- package/dist/esm/biz-components/ActivitySchedule/index.js.map +3 -3
- package/dist/esm/biz-components/AiuiProvider/index.js +1 -1
- package/dist/esm/biz-components/AiuiProvider/index.js.map +3 -3
- package/dist/esm/biz-components/AnchorNavigation/index.js +1 -1
- package/dist/esm/biz-components/AnchorNavigation/index.js.map +3 -3
- package/dist/esm/biz-components/BrandCardLink/BrandCardLink.js +1 -1
- package/dist/esm/biz-components/BrandCardLink/BrandCardLink.js.map +3 -3
- package/dist/esm/biz-components/Category/SwiperCategory.js +1 -1
- package/dist/esm/biz-components/Category/SwiperCategory.js.map +3 -3
- package/dist/esm/biz-components/Category/index.js +1 -1
- package/dist/esm/biz-components/Category/index.js.map +3 -3
- package/dist/esm/biz-components/Evaluate/index.js +1 -1
- package/dist/esm/biz-components/Evaluate/index.js.map +3 -3
- package/dist/esm/biz-components/EventSchedule/index.js +1 -1
- package/dist/esm/biz-components/EventSchedule/index.js.map +3 -3
- package/dist/esm/biz-components/Faq/Faq.js +1 -1
- package/dist/esm/biz-components/Faq/Faq.js.map +2 -2
- package/dist/esm/biz-components/Faq/types.d.ts +1 -0
- package/dist/esm/biz-components/FeatureCards/FeatureCards.js +1 -1
- package/dist/esm/biz-components/FeatureCards/FeatureCards.js.map +3 -3
- package/dist/esm/biz-components/GiftBox/index.js +1 -1
- package/dist/esm/biz-components/GiftBox/index.js.map +2 -2
- package/dist/esm/biz-components/GiftShelf/index.js +1 -1
- package/dist/esm/biz-components/GiftShelf/index.js.map +3 -3
- package/dist/esm/biz-components/GiftTierShelf/index.js +1 -1
- package/dist/esm/biz-components/GiftTierShelf/index.js.map +3 -3
- package/dist/esm/biz-components/Graphic/index.js +1 -1
- package/dist/esm/biz-components/Graphic/index.js.map +3 -3
- package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.js +1 -1
- package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.js.map +3 -3
- package/dist/esm/biz-components/HeaderNavigation/index.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/index.js.map +3 -3
- package/dist/esm/biz-components/HeaderNavigation/types.d.ts +1 -8
- package/dist/esm/biz-components/HeaderNavigation/types.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/types.js.map +2 -2
- package/dist/esm/biz-components/HeaderNavigation/withCategory.d.ts +0 -1
- package/dist/esm/biz-components/HeaderNavigation/withCategory.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/withCategory.js.map +3 -3
- package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
- package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +3 -3
- package/dist/esm/biz-components/HeroBanner/HeroBannerCarousel.js +1 -1
- package/dist/esm/biz-components/HeroBanner/HeroBannerCarousel.js.map +3 -3
- package/dist/esm/biz-components/ImageWithText/ImageWithText.js +1 -1
- package/dist/esm/biz-components/ImageWithText/ImageWithText.js.map +3 -3
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +3 -3
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +3 -3
- package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js +1 -1
- package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js.map +3 -3
- package/dist/esm/biz-components/Listing/components/PurchaseBar/types.d.ts +0 -2
- package/dist/esm/biz-components/LotteryShared/ErrorModal.d.ts +0 -4
- package/dist/esm/biz-components/LotteryShared/ErrorModal.js.map +2 -2
- package/dist/esm/biz-components/LotteryShared/MyRewardsModal.d.ts +13 -13
- package/dist/esm/biz-components/LotteryShared/MyRewardsModal.js +1 -1
- package/dist/esm/biz-components/LotteryShared/MyRewardsModal.js.map +3 -3
- package/dist/esm/biz-components/LotteryShared/types.d.ts +0 -9
- package/dist/esm/biz-components/LotteryShared/types.js.map +2 -2
- package/dist/esm/biz-components/Marquee/Marquee.js +1 -1
- package/dist/esm/biz-components/Marquee/Marquee.js.map +2 -2
- package/dist/esm/biz-components/MediaPlayerBase/index.js +1 -1
- package/dist/esm/biz-components/MediaPlayerBase/index.js.map +3 -3
- package/dist/esm/biz-components/MediaPlayerMulti/index.js +1 -1
- package/dist/esm/biz-components/MediaPlayerMulti/index.js.map +3 -3
- package/dist/esm/biz-components/MemberEquity/index.js +2 -2
- package/dist/esm/biz-components/MemberEquity/index.js.map +3 -3
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
- package/dist/esm/biz-components/NavigationSearch/index.js +2 -2
- package/dist/esm/biz-components/NavigationSearch/index.js.map +3 -3
- package/dist/esm/biz-components/ProductHero/ProductHero.js +1 -1
- package/dist/esm/biz-components/ProductHero/ProductHero.js.map +3 -3
- package/dist/esm/biz-components/ProductLottery/types.d.ts +5 -62
- package/dist/esm/biz-components/ProductLottery/types.js.map +2 -2
- package/dist/esm/biz-components/ProductNav/ProductNav.js +1 -1
- package/dist/esm/biz-components/ProductNav/ProductNav.js.map +3 -3
- package/dist/esm/biz-components/PromotionalBar/index.js +1 -1
- package/dist/esm/biz-components/PromotionalBar/index.js.map +3 -3
- package/dist/esm/biz-components/SecondaryBanner/SecondaryBannerCarousel.d.ts +0 -1
- package/dist/esm/biz-components/SecondaryBanner/SecondaryBannerCarousel.js +1 -1
- package/dist/esm/biz-components/SecondaryBanner/SecondaryBannerCarousel.js.map +3 -3
- package/dist/esm/biz-components/SecondaryBanner/index.d.ts +0 -9
- package/dist/esm/biz-components/SecondaryBanner/index.js +1 -1
- package/dist/esm/biz-components/SecondaryBanner/index.js.map +3 -3
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js +1 -1
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
- package/dist/esm/biz-components/Subscribe/index.js +1 -1
- package/dist/esm/biz-components/Subscribe/index.js.map +2 -2
- package/dist/esm/biz-components/SwiperBox/index.js +1 -1
- package/dist/esm/biz-components/SwiperBox/index.js.map +3 -3
- package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
- package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +3 -3
- package/dist/esm/biz-components/Title/index.js +1 -1
- package/dist/esm/biz-components/Title/index.js.map +3 -3
- package/dist/esm/biz-components/WheelLottery/index.js +1 -1
- package/dist/esm/biz-components/WheelLottery/index.js.map +2 -2
- package/dist/esm/biz-components/index.d.ts +0 -4
- package/dist/esm/biz-components/index.js +1 -1
- package/dist/esm/biz-components/index.js.map +3 -3
- package/dist/esm/components/Countdown.js +1 -1
- package/dist/esm/components/Countdown.js.map +3 -3
- package/dist/esm/components/link.js +1 -1
- package/dist/esm/components/link.js.map +2 -2
- package/dist/esm/helpers/index.d.ts +1 -1
- package/dist/esm/helpers/index.js +1 -1
- package/dist/esm/helpers/index.js.map +3 -3
- package/dist/esm/helpers/isLexicalEmpty.d.ts +0 -5
- package/dist/esm/helpers/isLexicalEmpty.js +1 -1
- package/dist/esm/helpers/isLexicalEmpty.js.map +3 -3
- package/package.json +1 -1
- package/style.css +3 -94
- package/dist/cjs/biz-components/HeaderNavigation/MobileTextLinksMenu.d.ts +0 -12
- package/dist/cjs/biz-components/HeaderNavigation/MobileTextLinksMenu.js +0 -2
- package/dist/cjs/biz-components/HeaderNavigation/MobileTextLinksMenu.js.map +0 -7
- package/dist/cjs/biz-components/HeaderNavigation/TextLinksDropdown.d.ts +0 -10
- package/dist/cjs/biz-components/HeaderNavigation/TextLinksDropdown.js +0 -2
- package/dist/cjs/biz-components/HeaderNavigation/TextLinksDropdown.js.map +0 -7
- package/dist/cjs/biz-components/WebPushPopup/index.d.ts +0 -44
- package/dist/cjs/biz-components/WebPushPopup/index.js +0 -2
- package/dist/cjs/biz-components/WebPushPopup/index.js.map +0 -7
- package/dist/cjs/hooks/useEmarsysWebPush.d.ts +0 -111
- package/dist/cjs/hooks/useEmarsysWebPush.js +0 -2
- package/dist/cjs/hooks/useEmarsysWebPush.js.map +0 -7
- package/dist/cjs/hooks/useProductListTrack.d.ts +0 -43
- package/dist/cjs/hooks/useProductListTrack.js +0 -2
- package/dist/cjs/hooks/useProductListTrack.js.map +0 -7
- package/dist/esm/biz-components/HeaderNavigation/MobileTextLinksMenu.d.ts +0 -12
- package/dist/esm/biz-components/HeaderNavigation/MobileTextLinksMenu.js +0 -2
- package/dist/esm/biz-components/HeaderNavigation/MobileTextLinksMenu.js.map +0 -7
- package/dist/esm/biz-components/HeaderNavigation/TextLinksDropdown.d.ts +0 -10
- package/dist/esm/biz-components/HeaderNavigation/TextLinksDropdown.js +0 -2
- package/dist/esm/biz-components/HeaderNavigation/TextLinksDropdown.js.map +0 -7
- package/dist/esm/biz-components/WebPushPopup/index.d.ts +0 -44
- package/dist/esm/biz-components/WebPushPopup/index.js +0 -2
- package/dist/esm/biz-components/WebPushPopup/index.js.map +0 -7
- package/dist/esm/hooks/useEmarsysWebPush.d.ts +0 -111
- package/dist/esm/hooks/useEmarsysWebPush.js +0 -2
- package/dist/esm/hooks/useEmarsysWebPush.js.map +0 -7
- package/dist/esm/hooks/useProductListTrack.d.ts +0 -43
- package/dist/esm/hooks/useProductListTrack.js +0 -2
- package/dist/esm/hooks/useProductListTrack.js.map +0 -7
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var
|
|
1
|
+
"use strict";"use client";var T=Object.create;var m=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty;var H=(e,i)=>{for(var r in i)m(e,r,{get:i[r],enumerable:!0})},v=(e,i,r,o)=>{if(i&&typeof i=="object"||typeof i=="function")for(let n of I(i))!D.call(e,n)&&n!==r&&m(e,n,{get:()=>i[n],enumerable:!(o=E(i,n))||o.enumerable});return e};var h=(e,i,r)=>(r=e!=null?T(j(e)):{},v(i||!e||!e.__esModule?m(r,"default",{value:e,enumerable:!0}):r,e)),q=e=>v(m({},"__esModule",{value:!0}),e);var W={};H(W,{default:()=>Q});module.exports=q(W);var t=require("react/jsx-runtime"),s=require("react"),l=require("../../helpers/utils.js"),y=h(require("../../components/picture.js")),L=require("../../shared/Styles.js"),N=require("react-responsive"),C=require("../../hooks/useExposure.js"),M=require("../AiuiProvider/index.js"),c=require("swiper/react"),a=require("swiper/modules"),G=require("../Title/index.js"),S=h(require("../../components/link.js"));const z="copy",R="store_benefits",F=(e,i)=>{const r=[];for(let o=0;o<e.length;o+=i)r.push(e.slice(o,o+i));return r},w=(0,s.forwardRef)(({data:{items:e=[],itemShape:i},className:r},o)=>{const[n,B]=(0,s.useState)(!1),f=(0,N.useMediaQuery)({query:"(max-width: 768px)"}),x=(0,s.useRef)(null),u=(0,s.useRef)(null),{locale:k="us"}=(0,M.useAiuiContext)();(0,s.useImperativeHandle)(o,()=>u.current),(0,C.useExposure)(u,{componentType:z,componentName:R}),(0,s.useEffect)(()=>{B(f)},[f]);const A=n?F(e,3):e;return(0,t.jsx)("div",{ref:u,className:(0,l.cn)("brand-equity-wrapper w-full",r),children:n?(0,t.jsxs)(c.Swiper,{className:(0,l.cn)(r),modules:[a.FreeMode,a.Mousewheel,a.Pagination],freeMode:!0,mousewheel:{forceToAxis:!0},pagination:{clickable:!0,el:x.current},breakpoints:{0:{spaceBetween:12}},children:[A?.map((p,d)=>(0,t.jsx)(c.SwiperSlide,{className:"!flex flex-col gap-3",children:Array.isArray(p)&&p?.map((P,g)=>(0,t.jsx)(b,{data:P,itemShape:i,index:g,locale:k},g))},"SwiperSlide"+d)),(0,t.jsx)("div",{ref:x,className:"mt-3 flex justify-center"})]}):(0,t.jsx)("div",{className:(0,l.cn)("laptop:gap-4 tablet:grid-cols-2 laptop:grid-cols-4 grid grid-cols-1 gap-3"),children:e.map((p,d)=>(0,t.jsx)(b,{data:p,itemShape:i,index:d,locale:k},d))})})}),b=({data:e,itemShape:i,index:r,locale:o})=>(0,t.jsxs)("div",{className:(0,l.cn)("brand-equity-item","lg-desktop:p-8 desktop:p-6 p-4","box-border flex w-full flex-col justify-between overflow-hidden bg-[#DAE7F2]",i==="round"?"rounded-box":"rounded-none"),children:[(0,t.jsxs)("div",{className:"lg-desktop:h-[50px] flex h-10 items-center justify-between gap-3",children:[(0,t.jsx)("h3",{className:"link-item-title lg-desktop:text-[18px] desktop:text-[16px] line-clamp-2 flex-1 text-[14px] font-bold leading-[1.2] tracking-[-0.02em] text-[#080A0F]",children:e.title}),(0,t.jsx)("div",{className:"link-item-img lg-desktop:size-[36px] size-[30px] shrink-0",children:(0,t.jsx)(y.default,{className:"size-full object-cover",source:e.icon?.url,alt:e.icon?.alt,imgClassName:"w-full h-full object-cover"})})]}),(0,t.jsxs)("div",{className:"box-border overflow-hidden",children:[(0,t.jsx)("p",{title:e.description||"",className:"link-item-description lg-desktop:text-[24px] line-clamp-4 text-[20px] font-semibold leading-[1.2] tracking-[-0.04em] text-[#767880]",children:e.description||""}),(0,t.jsxs)(S.default,{href:(0,l.getLocalizedPath)(e?.link||"",o),asChild:!e?.link,className:"desktop:mt-4 mt-2 flex items-center gap-0.5 no-underline hover:underline",children:[(0,t.jsx)("span",{className:"link-item-text laptop:text-base text-sm",children:e?.linkText}),(0,t.jsx)("div",{className:"size-6",children:(0,t.jsx)("svg",{width:"24",height:"24",className:"mb-[3px]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:(0,t.jsx)("path",{className:"transition-all duration-[0.4s]",d:"M10.5 8L14.5 12L10.5 16",stroke:"#777",strokeWidth:"1.5",strokeLinecap:"round"})})})]})]})]});w.displayName="BrandCardLink";var Q=(0,L.withLayout)(w);
|
|
2
2
|
//# sourceMappingURL=BrandCardLink.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/BrandCardLink/BrandCardLink.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport { forwardRef, useEffect, useRef, useState, useImperativeHandle } from 'react'\n\nimport { cn, getLocalizedPath } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { BrandCardLinkProps, BrandCardLinkItemProps } from './types.js'\n\nimport type { Img } from '../../types/props.js'\nimport { useMediaQuery } from 'react-responsive'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,
|
|
6
|
-
"names": ["BrandCardLink_exports", "__export", "BrandCardLink_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_picture", "import_Styles", "import_react_responsive", "import_useExposure", "import_AiuiProvider", "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport { forwardRef, useEffect, useRef, useState, useImperativeHandle } from 'react'\n\nimport { cn, getLocalizedPath } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { BrandCardLinkProps, BrandCardLinkItemProps } from './types.js'\n\nimport type { Img } from '../../types/props.js'\nimport { useMediaQuery } from 'react-responsive'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\n\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Pagination, FreeMode, Mousewheel } from 'swiper/modules'\nimport Title from '../Title/index.js'\nimport Link from '../../components/link.js'\n\nconst componentType = 'copy'\nconst componentName = 'store_benefits'\n\nconst chunkArray = (arr: BrandCardLinkItemProps[], size: number) => {\n const chunks = []\n for (let i = 0; i < arr.length; i += size) {\n chunks.push(arr.slice(i, i + size))\n }\n return chunks\n}\n\nconst BrandCardLink = forwardRef<HTMLDivElement, BrandCardLinkProps>(\n ({ data: { items = [], itemShape }, className }, ref) => {\n const [isMobile, setIsMobile] = useState(false)\n const mediaQuery = useMediaQuery({ query: '(max-width: 768px)' })\n const paginationRef = useRef<HTMLDivElement>(null)\n const innerRef = useRef<HTMLDivElement>(null)\n const { locale = 'us' } = useAiuiContext()\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n useExposure(innerRef, {\n componentType,\n componentName,\n })\n\n useEffect(() => {\n setIsMobile(mediaQuery)\n }, [mediaQuery])\n\n const itemsArray = isMobile ? chunkArray(items, 3) : items\n return (\n <div ref={innerRef} className={cn('brand-equity-wrapper w-full', className)}>\n {isMobile ? (\n <Swiper\n className={cn(className)}\n modules={[FreeMode, Mousewheel, Pagination]}\n freeMode={true}\n mousewheel={{\n forceToAxis: true,\n }}\n pagination={{\n clickable: true,\n el: paginationRef.current,\n }}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n },\n }}\n >\n {itemsArray?.map((item, jIndex) => (\n <SwiperSlide key={'SwiperSlide' + jIndex} className=\"!flex flex-col gap-3\">\n {Array.isArray(item) &&\n item?.map((item, index) => (\n <BrandCardLinkItem key={index} data={item} itemShape={itemShape} index={index} locale={locale} />\n ))}\n </SwiperSlide>\n ))}\n <div ref={paginationRef} className=\"mt-3 flex justify-center\"></div>\n </Swiper>\n ) : (\n <div className={cn('laptop:gap-4 tablet:grid-cols-2 laptop:grid-cols-4 grid grid-cols-1 gap-3')}>\n {items.map((item, index) => (\n <BrandCardLinkItem key={index} data={item} itemShape={itemShape} index={index} locale={locale} />\n ))}\n </div>\n )}\n </div>\n )\n }\n)\n\nconst BrandCardLinkItem = ({\n data,\n itemShape,\n index,\n locale,\n}: {\n data: BrandCardLinkItemProps\n itemShape?: 'round' | 'square'\n index: number\n locale: string\n}) => {\n return (\n <div\n className={cn(\n 'brand-equity-item',\n 'lg-desktop:p-8 desktop:p-6 p-4',\n // 'laptop:h-[192px] lg-desktop:h-[240px] h-[160px]',\n 'box-border flex w-full flex-col justify-between overflow-hidden bg-[#DAE7F2]',\n itemShape === 'round' ? 'rounded-box' : 'rounded-none'\n )}\n >\n <div className=\"lg-desktop:h-[50px] flex h-10 items-center justify-between gap-3\">\n <h3 className=\"link-item-title lg-desktop:text-[18px] desktop:text-[16px] line-clamp-2 flex-1 text-[14px] font-bold leading-[1.2] tracking-[-0.02em] text-[#080A0F]\">\n {data.title}\n </h3>\n <div className=\"link-item-img lg-desktop:size-[36px] size-[30px] shrink-0\">\n <Picture\n className=\"size-full object-cover\"\n source={data.icon?.url}\n alt={data.icon?.alt}\n imgClassName=\"w-full h-full object-cover\"\n />\n </div>\n </div>\n <div className=\"box-border overflow-hidden\">\n <p\n title={data.description || ''}\n className=\"link-item-description lg-desktop:text-[24px] line-clamp-4 text-[20px] font-semibold leading-[1.2] tracking-[-0.04em] text-[#767880]\"\n >\n {data.description || ''}\n </p>\n <Link\n href={getLocalizedPath(data?.link || '', locale)}\n asChild={!data?.link}\n className=\"desktop:mt-4 mt-2 flex items-center gap-0.5 no-underline hover:underline\"\n >\n <span className=\"link-item-text laptop:text-base text-sm\">{data?.linkText}</span>\n <div className=\"size-6\">\n <svg\n width=\"24\"\n height=\"24\"\n className=\"mb-[3px]\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n >\n <path\n className=\"transition-all duration-[0.4s]\"\n d=\"M10.5 8L14.5 12L10.5 16\"\n stroke=\"#777\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n ></path>\n </svg>\n </div>\n </Link>\n </div>\n </div>\n )\n}\n\nBrandCardLink.displayName = 'BrandCardLink'\n\nexport default withLayout(BrandCardLink)\n"],
|
|
5
|
+
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAmDU,IAAAI,EAAA,6BAlDVC,EAA6E,iBAE7EC,EAAqC,kCACrCC,EAAoB,0CACpBC,EAA2B,kCAI3BC,EAA8B,4BAC9BC,EAA4B,sCAC5BC,EAA+B,oCAE/BN,EAAoC,wBACpCO,EAAiD,0BACjDC,EAAkB,6BAClBC,EAAiB,uCAEjB,MAAMC,EAAgB,OAChBC,EAAgB,iBAEhBC,EAAa,CAACC,EAA+BC,IAAiB,CAClE,MAAMC,EAAS,CAAC,EAChB,QAASC,EAAI,EAAGA,EAAIH,EAAI,OAAQG,GAAKF,EACnCC,EAAO,KAAKF,EAAI,MAAMG,EAAGA,EAAIF,CAAI,CAAC,EAEpC,OAAOC,CACT,EAEME,KAAgB,cACpB,CAAC,CAAE,KAAM,CAAE,MAAAC,EAAQ,CAAC,EAAG,UAAAC,CAAU,EAAG,UAAAC,CAAU,EAAGC,IAAQ,CACvD,KAAM,CAACC,EAAUC,CAAW,KAAI,YAAS,EAAK,EACxCC,KAAa,iBAAc,CAAE,MAAO,oBAAqB,CAAC,EAC1DC,KAAgB,UAAuB,IAAI,EAC3CC,KAAW,UAAuB,IAAI,EACtC,CAAE,OAAAC,EAAS,IAAK,KAAI,kBAAe,KAEzC,uBAAoBN,EAAK,IAAMK,EAAS,OAAyB,KACjE,eAAYA,EAAU,CACpB,cAAAhB,EACA,cAAAC,CACF,CAAC,KAED,aAAU,IAAM,CACdY,EAAYC,CAAU,CACxB,EAAG,CAACA,CAAU,CAAC,EAEf,MAAMI,EAAaN,EAAWV,EAAWM,EAAO,CAAC,EAAIA,EACrD,SACE,OAAC,OAAI,IAAKQ,EAAU,aAAW,MAAG,8BAA+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AQ,GAAIN,CAAM,EAC/C,QAAS,CAACM,GAAM,KAChB,UAAU,2EAEV,oBAAC,QAAK,UAAU,0CAA2C,SAAAA,GAAM,SAAS,KAC1E,OAAC,OAAI,UAAU,SACb,mBAAC,OACC,MAAM,KACN,OAAO,KACP,UAAU,WACV,MAAM,6BACN,QAAQ,YACR,KAAK,OAEL,mBAAC,QACC,UAAU,iCACV,EAAE,0BACF,OAAO,OACP,YAAY,MACZ,cAAc,QACf,EACH,EACF,GACF,GACF,GACF,EAIJhB,EAAc,YAAc,gBAE5B,IAAOpB,KAAQ,cAAWoB,CAAa",
|
|
6
|
+
"names": ["BrandCardLink_exports", "__export", "BrandCardLink_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_picture", "import_Styles", "import_react_responsive", "import_useExposure", "import_AiuiProvider", "import_modules", "import_Title", "import_link", "componentType", "componentName", "chunkArray", "arr", "size", "chunks", "i", "BrandCardLink", "items", "itemShape", "className", "ref", "isMobile", "setIsMobile", "mediaQuery", "paginationRef", "innerRef", "locale", "itemsArray", "item", "jIndex", "index", "BrandCardLinkItem", "data", "Picture", "Link"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var
|
|
1
|
+
"use strict";"use client";var m=Object.create;var t=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var M=(e,i)=>{for(var r in i)t(e,r,{get:i[r],enumerable:!0})},d=(e,i,r,n)=>{if(i&&typeof i=="object"||typeof i=="function")for(let s of g(i))!P.call(e,s)&&s!==r&&t(e,s,{get:()=>i[s],enumerable:!(n=u(i,s))||n.enumerable});return e};var B=(e,i,r)=>(r=e!=null?m(S(e)):{},d(i||!e||!e.__esModule?t(r,"default",{value:e,enumerable:!0}):r,e)),y=e=>d(t({},"__esModule",{value:!0}),e);var h={};M(h,{default:()=>b});module.exports=y(h);var o=require("react/jsx-runtime"),w=B(require("react")),l=require("swiper/react"),a=require("swiper/modules"),k=require("swiper/css"),v=require("swiper/css/pagination");const f=w.default.forwardRef(({data:e,Slide:i,id:r,isHalf:n,paginationClassName:s},x)=>(0,o.jsxs)(l.Swiper,{freeMode:!0,mousewheel:{forceToAxis:!0},pagination:{clickable:!0,dynamicBullets:!1,el:`.swiper-pagination-${r}`},className:`!overflow-visible ${s||""}`,modules:[a.FreeMode,a.Mousewheel,a.Pagination],breakpoints:{0:{spaceBetween:16,freeMode:!1,slidesPerView:n?2:1,slidesPerGroup:1},376:{spaceBetween:16,freeMode:!1,slidesPerView:n?2:1,slidesPerGroup:1},767:{spaceBetween:16,freeMode:!1,slidesPerView:4,slidesPerGroup:4},1441:{spaceBetween:16,freeMode:!1,slidesPerView:Math.min(6,e?.list?.length),slidesPerGroup:Math.min(6,e?.list?.length)}},children:[e?.list?.map((c,p)=>(0,o.jsx)(l.SwiperSlide,{className:"!h-[unset]",children:(0,o.jsx)(i,{data:c,configuration:{...e?.configuration,index:p}})},r+"SwiperSlide"+p)),(0,o.jsx)("div",{className:`swiper-pagination-${r} swiper-pagination`})]}));f.displayName="SwiperBox";var b=f;
|
|
2
2
|
//# sourceMappingURL=SwiperCategory.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/Category/SwiperCategory.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,
|
|
6
|
-
"names": ["SwiperCategory_exports", "__export", "SwiperCategory_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_modules", "import_css", "import_pagination", "SwiperBox", "React", "data", "Slide", "id", "isHalf", "paginationClassName", "ref", "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React from 'react'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Pagination, FreeMode, Mousewheel } from 'swiper/modules'\nimport 'swiper/css'\nimport 'swiper/css/pagination' // \u5206\u9875\u5668\u6837\u5F0F\n\nexport interface SwiperBoxProps {\n data: {\n list: any[]\n configuration?: any\n }\n id: string\n className?: string\n isHalf?: boolean\n breakpoints?: Record<number, Object>\n Slide: React.ComponentType<{ data: any; configuration?: any }>\n /** \u81EA\u5B9A\u4E49 pagination \u6837\u5F0F\u7C7B\u540D */\n paginationClassName?: string\n}\n\nconst SwiperBox = React.forwardRef<HTMLDivElement, SwiperBoxProps>(\n ({ data, Slide, id, isHalf, paginationClassName }, ref) => {\n return (\n <Swiper\n freeMode={true}\n mousewheel={{\n forceToAxis: true,\n }}\n pagination={{\n clickable: true,\n dynamicBullets: false,\n el: `.swiper-pagination-${id}`,\n }}\n className={`!overflow-visible ${paginationClassName || ''}`}\n modules={[FreeMode, Mousewheel, Pagination]}\n breakpoints={{\n 0: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: isHalf ? 2 : 1,\n slidesPerGroup: 1,\n },\n 376: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: isHalf ? 2 : 1,\n slidesPerGroup: 1,\n },\n 767: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n slidesPerGroup: 4,\n },\n 1441: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: Math.min(6, data?.list?.length),\n slidesPerGroup: Math.min(6, data?.list?.length),\n },\n }}\n >\n {data?.list?.map((item, jIndex) => (\n <SwiperSlide key={id + 'SwiperSlide' + jIndex} className=\"!h-[unset]\">\n <Slide data={item} configuration={{ ...data?.configuration, index: jIndex }} />\n </SwiperSlide>\n ))}\n <div className={`swiper-pagination-${id} swiper-pagination`} />\n </Swiper>\n )\n }\n)\n\nSwiperBox.displayName = 'SwiperBox'\n\nexport default SwiperBox\n"],
|
|
5
|
+
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAwBM,IAAAI,EAAA,6BAvBNC,EAAkB,oBAClBA,EAAoC,wBACpCC,EAAiD,0BACjDC,EAAO,sBACPC,EAAO,iCAgBP,MAAMC,EAAY,EAAAC,QAAM,WACtB,CAAC,CAAE,KAAAC,EAAM,MAAAC,EAAO,GAAAC,EAAI,OAAAC,EAAQ,oBAAAC,CAAoB,EAAGC,OAE/C,QAAC,UACC,SAAU,GACV,WAAY,CACV,YAAa,EACf,EACA,WAAY,CACV,UAAW,GACX,eAAgB,GAChB,GAAI,sBAAsBH,CAAE,EAC9B,EACA,UAAW,qBAAqBE,GAAuB,EAAE,GACzD,QAAS,CAAC,WAAU,aAAY,YAAU,EAC1C,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAeD,EAAS,EAAI,EAC5B,eAAgB,CAClB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAeA,EAAS,EAAI,EAC5B,eAAgB,CAClB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,EACf,eAAgB,CAClB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,KAAK,IAAI,EAAGH,GAAM,MAAM,MAAM,EAC7C,eAAgB,KAAK,IAAI,EAAGA,GAAM,MAAM,MAAM,CAChD,CACF,EAEC,UAAAA,GAAM,MAAM,IAAI,CAACM,EAAMC,OACtB,OAAC,eAA8C,UAAU,aACvD,mBAACN,EAAA,CAAM,KAAMK,EAAM,cAAe,CAAE,GAAGN,GAAM,cAAe,MAAOO,CAAO,EAAG,GAD7DL,EAAK,cAAgBK,CAEvC,CACD,KACD,OAAC,OAAI,UAAW,qBAAqBL,CAAE,qBAAsB,GAC/D,CAGN,EAEAJ,EAAU,YAAc,YAExB,IAAOP,EAAQO",
|
|
6
|
+
"names": ["SwiperCategory_exports", "__export", "SwiperCategory_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_modules", "import_css", "import_pagination", "SwiperBox", "React", "data", "Slide", "id", "isHalf", "paginationClassName", "ref", "item", "jIndex"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var L=Object.create;var d=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var
|
|
1
|
+
"use strict";"use client";var L=Object.create;var d=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var M=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty;var D=(e,t)=>{for(var a in t)d(e,a,{get:t[a],enumerable:!0})},k=(e,t,a,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of E(t))!S.call(e,n)&&n!==a&&d(e,n,{get:()=>t[n],enumerable:!(i=T(t,n))||i.enumerable});return e};var u=(e,t,a)=>(a=e!=null?L(M(e)):{},k(t||!e||!e.__esModule?d(a,"default",{value:e,enumerable:!0}):a,e)),j=e=>k(d({},"__esModule",{value:!0}),e);var F={};D(F,{default:()=>z});module.exports=j(F);var o=require("react/jsx-runtime"),l=u(require("react")),r=require("../../helpers/utils.js"),h=u(require("../../components/picture.js")),N=require("../../shared/Styles.js"),_=u(require("../Title/index.js")),f=u(require("./SwiperCategory.js")),x=require("../../hooks/useExposure.js"),v=require("../../shared/trackUrlRef.js");const p="image",m="category_banner",g=5,H=3,P=(e,t)=>{const a=[];for(let i=0;i<e.length;i+=t)a.push(e.slice(i,i+t));return a},A=({data:e,configuration:t})=>{const a=(0,l.useRef)(null);return(0,x.useExposure)(a,{componentType:p,componentName:m,componentTitle:e?.name,position:t?.index+1}),(0,o.jsx)("div",{className:(0,r.cn)("relative max-h-[240px] overflow-hidden"),children:(0,o.jsx)("div",{className:(0,r.cn)("aspect-w-[167] aspect-h-[120]","tablet:aspect-w-[404] tablet:aspect-h-[240]","laptop:aspect-w-[212] laptop:aspect-h-[144]","desktop:aspect-w-[205] desktop:aspect-h-[192]","lg-desktop:aspect-w-[264] lg-desktop:aspect-h-[240]"),children:(0,o.jsxs)("div",{ref:a,className:(0,r.cn)("tablet:p-3 laptop:p-4 desktop:p-6 absolute inset-0 max-h-[240px] justify-between","bg-container-primary hover:bg-info-white group box-border flex cursor-pointer flex-col overflow-hidden duration-300",t?.shape==="round"?"rounded-2xl":"rounded-none"),children:[(0,o.jsx)("div",{className:"flex items-center justify-center transition-all duration-300 group-hover:scale-110",children:(0,o.jsx)("a",{"aria-label":e?.name,href:(0,v.trackUrlRef)(e?.link,`${p}_${m}`),"data-headless-type-name":`${p}#${m}`,"data-headless-title-desc-button":`${e?.name}`,onClick:()=>t?.event?.primaryButton(e,t?.index),children:(0,o.jsx)(h.default,{alt:e?.image?.alt||"",source:e?.image?.url||"",className:"laptop:size-1/2 tablet:size-[72px] desktop:size-[116px] lg-desktop:size-[146px] m-auto flex justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover"})})}),(0,o.jsx)("p",{className:"lg-desktop:text-lg lg-desktop:!leading-6 text-info-primary box-border line-clamp-2 text-center text-sm font-bold leading-4",children:e?.name})]})})})},B=({data:e,configuration:t,index:a,isFirstItemLarger:i})=>{const n=(0,l.useRef)(null);(0,x.useExposure)(n,{componentType:p,componentName:m,componentTitle:e?.name,position:t?.index+1});const s=a===0;return(0,o.jsxs)("div",{ref:n,className:(0,r.cn)("bg-container-primary box-border flex w-full shrink-0 flex-col items-center justify-center overflow-hidden","hover:bg-info-white cursor-pointer duration-300",i?(0,r.cn)("p-4",s?"aspect-h-[252] row-span-2":"aspect-h-[120]"):"max-h-[126px] px-3 py-4",t?.shape==="round"?"rounded-2xl":"rounded-none"),children:[(0,o.jsx)("a",{href:(0,v.trackUrlRef)(e?.link,`${p}_${m}`),"data-headless-type-name":`${p}#${m}`,"data-headless-title-desc-button":`${e?.name}`,"data-headless-nav-position":`''#${t?.index+1}`,onClick:()=>t?.event?.primaryButton(e,t?.index+1),children:(0,o.jsx)(h.default,{source:e?.image?.url||"",alt:e?.image?.alt||"",className:(0,r.cn)("m-auto mb-2 flex justify-center object-contain [&_img]:h-full [&_img]:w-auto [&_img]:object-contain",i?(0,r.cn)(s?"size-full max-h-[146px] overflow-hidden":"max-h-[72px] max-w-[72px]"):"size-[72px]")})}),(0,o.jsx)("p",{className:(0,r.cn)("text-info-primary w-full text-center text-sm font-bold",i?"line-clamp-2":"shrink-0 truncate"),children:e?.name})]})},R=({data:e,configuration:t})=>{const i=(t?.totalCategories??0)<=g;return(0,o.jsx)("div",{className:`gap-3 ${i?"grid grid-cols-2":"flex h-full flex-col"}`,children:e?.map((n,s)=>(0,o.jsx)(B,{index:s,data:n,configuration:t,isFirstItemLarger:i},s))})},C=l.default.forwardRef((e,t)=>{const{data:a,className:i="",key:n,event:s,...I}=e,c=(a?.isShowSelect?a?.products:a?.productData)||[],y=c.length>g,b=c.length,$=P(c,y?H:g),w=(0,l.useRef)(null);return(0,l.useImperativeHandle)(t,()=>w.current),(0,o.jsxs)("div",{...I,ref:w,className:(0,r.cn)("w-full overflow-hidden",i,{"aiui-dark":a?.theme==="dark"}),children:[a?.title&&(0,o.jsx)(_.default,{data:{title:a?.title},className:"text-4xl"}),(0,o.jsx)("div",{className:"tablet:block hidden",children:(0,o.jsx)(f.default,{id:`Category${n}`,Slide:A,data:{list:c,configuration:{shape:a?.shape,event:s,title:a?.title,totalCategories:b}},paginationClassName:"[&_.swiper-pagination]:!-bottom-6"})}),(0,o.jsx)("div",{className:"tablet:hidden block",children:(0,o.jsx)(f.default,{id:`Category1${n}`,Slide:R,data:{list:$,configuration:{shape:a?.shape,event:s,title:a?.title,totalCategories:b}},isHalf:y,paginationClassName:"[&_.swiper-pagination]:!-bottom-6"})}),(0,o.jsx)("div",{className:"h-7"})]})});C.displayName="Category";var z=(0,N.withLayout)(C);
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/Category/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport Title from '../Title/index.js'\nimport SwiperBox from './SwiperCategory.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,
|
|
6
|
-
"names": ["Category_exports", "__export", "Category_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_picture", "import_Styles", "import_Title", "import_SwiperCategory", "import_useExposure", "import_trackUrlRef", "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport Title from '../Title/index.js'\nimport SwiperBox from './SwiperCategory.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport type { Img } from '../../types/props.js'\n\nconst componentType = 'image'\nconst componentName = 'category_banner'\nconst MOBILE_FULL_PAGE_CAPACITY = 5\nconst MOBILE_COMPACT_PAGE_SIZE = 3\n\nexport interface CategoryItem {\n /** \u4EA7\u54C1\u56FE\u7247*/\n image: Img\n name: string\n link?: string\n}\n\nexport interface CategoryProps extends React.HTMLAttributes<HTMLDivElement> {\n /** \u4E3B\u9898\u8272*/\n data: {\n isShowSelect: boolean\n products: CategoryItem[]\n productData: CategoryItem[]\n /** \u5361\u7247\u5F62\u72B6 */\n shape?: 'round' | 'square'\n title?: string\n theme?: 'light' | 'dark'\n }\n buildData?: {\n categories: any[]\n products: any[]\n }\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: {\n primaryButton?: (_v: any, _index: number) => void\n }\n key?: string\n}\n\nconst chunkArray = (arr: any[], size: number) => {\n const chunks = []\n for (let i = 0; i < arr.length; i += size) {\n chunks.push(arr.slice(i, i + size))\n }\n return chunks\n}\n\nconst CategoryPcItem = ({ data, configuration }: { data: CategoryItem; configuration?: any }) => {\n const ref = useRef<HTMLDivElement>(null)\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: data?.name,\n position: configuration?.index + 1,\n })\n\n return (\n <div className={cn('relative max-h-[240px] overflow-hidden')}>\n <div\n className={cn(\n 'aspect-w-[167] aspect-h-[120]',\n 'tablet:aspect-w-[404] tablet:aspect-h-[240]',\n 'laptop:aspect-w-[212] laptop:aspect-h-[144]',\n 'desktop:aspect-w-[205] desktop:aspect-h-[192]',\n 'lg-desktop:aspect-w-[264] lg-desktop:aspect-h-[240]'\n )}\n >\n <div\n ref={ref}\n className={cn(\n 'tablet:p-3 laptop:p-4 desktop:p-6 absolute inset-0 max-h-[240px] justify-between',\n 'bg-container-primary hover:bg-info-white group box-border flex cursor-pointer flex-col overflow-hidden duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <div className=\"flex items-center justify-center transition-all duration-300 group-hover:scale-110\">\n <a\n aria-label={data?.name}\n href={trackUrlRef(data?.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${data?.name}`}\n onClick={() => configuration?.event?.primaryButton(data, configuration?.index)}\n >\n <Picture\n alt={data?.image?.alt || ''}\n source={data?.image?.url || ''}\n className=\"laptop:size-1/2 tablet:size-[72px] desktop:size-[116px] lg-desktop:size-[146px] m-auto flex justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover\"\n />\n </a>\n </div>\n <p className=\"lg-desktop:text-lg lg-desktop:!leading-6 text-info-primary box-border line-clamp-2 text-center text-sm font-bold leading-4\">\n {data?.name}\n </p>\n </div>\n </div>\n </div>\n )\n}\n\n// \u79FB\u52A8\u7AEF\u54C1\u7C7B\u5C55\u793A\u7EC4\u4EF6\nconst SingleMobileItem = ({\n data,\n configuration,\n index,\n isFirstItemLarger,\n}: {\n data: CategoryItem\n configuration?: any\n index: number\n isFirstItemLarger: boolean\n}) => {\n const ref = useRef<HTMLDivElement>(null)\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: data?.name,\n position: configuration?.index + 1,\n })\n\n const isFirstItem = index === 0\n\n return (\n <div\n ref={ref}\n className={cn(\n 'bg-container-primary box-border flex w-full shrink-0 flex-col items-center justify-center overflow-hidden',\n 'hover:bg-info-white cursor-pointer duration-300',\n // \u5F53\u7B2C\u4E00\u4E2A\u9879\u76EE\u9700\u8981\u66F4\u5927\u7A7A\u95F4\u65F6\u8C03\u6574\u6837\u5F0F\n isFirstItemLarger\n ? cn('p-4', isFirstItem ? 'aspect-h-[252] row-span-2' : 'aspect-h-[120]')\n : 'max-h-[126px] px-3 py-4',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <a\n href={trackUrlRef(data?.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${data?.name}`}\n data-headless-nav-position={`''#${configuration?.index + 1}`}\n onClick={() => configuration?.event?.primaryButton(data, configuration?.index + 1)}\n >\n <Picture\n source={data?.image?.url || ''}\n alt={data?.image?.alt || ''}\n className={cn(\n 'm-auto mb-2 flex justify-center object-contain [&_img]:h-full [&_img]:w-auto [&_img]:object-contain',\n // \u5F53\u7B2C\u4E00\u4E2A\u9879\u76EE\u9700\u8981\u66F4\u5927\u7A7A\u95F4\u65F6\u8C03\u6574\u56FE\u7247\u5C3A\u5BF8\n isFirstItemLarger\n ? cn(isFirstItem ? 'size-full max-h-[146px] overflow-hidden' : 'max-h-[72px] max-w-[72px]')\n : 'size-[72px]'\n )}\n />\n </a>\n <p\n className={cn(\n 'text-info-primary w-full text-center text-sm font-bold',\n // \u5F53\u7B2C\u4E00\u4E2A\u9879\u76EE\u9700\u8981\u66F4\u5927\u7A7A\u95F4\u65F6\u8C03\u6574\u6587\u5B57\u663E\u793A\n isFirstItemLarger ? 'line-clamp-2' : 'shrink-0 truncate'\n )}\n >\n {data?.name}\n </p>\n </div>\n )\n}\n\n// \u79FB\u52A8\u7AEF\u54C1\u7C7B\u5C55\u793A\nconst CategoryMobileItem = ({ data, configuration }: { data: CategoryItem[]; configuration?: any }) => {\n const totalCategories = configuration?.totalCategories ?? 0\n // \u5F53\u6570\u91CF\u5C11\u4E8E\u5BB9\u5668\u65F6\uFF0C\u7B2C\u4E00\u4E2A\u9879\u76EE\u4F1A\u5360\u636E\u66F4\u5927\u7A7A\u95F4\n const isFirstItemLarger = totalCategories <= MOBILE_FULL_PAGE_CAPACITY\n return (\n <div className={`gap-3 ${isFirstItemLarger ? 'grid grid-cols-2' : 'flex h-full flex-col'}`}>\n {data?.map((item, index) => (\n <SingleMobileItem\n key={index}\n index={index}\n data={item}\n configuration={configuration}\n isFirstItemLarger={isFirstItemLarger}\n />\n ))}\n </div>\n )\n}\n\nconst Category = React.forwardRef<HTMLDivElement, CategoryProps>((props, ref) => {\n const { data, className = '', key, event, ...rest } = props\n // soundcore\u54C1\u724C\u54C1\u7C7B\u4E0D\u8D85\u8FC75\u4E2A\uFF0C\u5355\u72EC\u505A\u6837\u5F0F\u5904\u7406\n const currentData = (data?.isShowSelect ? data?.products : data?.productData) || []\n const isCardShow = currentData.length > MOBILE_FULL_PAGE_CAPACITY\n const totalCategories = currentData.length\n const mobileSlides = chunkArray(currentData, isCardShow ? MOBILE_COMPACT_PAGE_SIZE : MOBILE_FULL_PAGE_CAPACITY)\n\n const innerRef = useRef<HTMLDivElement>(null)\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n return (\n <div\n {...rest}\n ref={innerRef}\n className={cn('w-full overflow-hidden', className, { 'aiui-dark': data?.theme === 'dark' })}\n >\n {data?.title && <Title data={{ title: data?.title }} className=\"text-4xl\" />}\n <div className=\"tablet:block hidden\">\n <SwiperBox\n id={`Category${key}`}\n Slide={CategoryPcItem}\n data={{\n list: currentData,\n configuration: { shape: data?.shape, event: event, title: data?.title, totalCategories },\n }}\n paginationClassName=\"[&_.swiper-pagination]:!-bottom-6\"\n />\n </div>\n <div className=\"tablet:hidden block\">\n <SwiperBox\n id={`Category1${key}`}\n Slide={CategoryMobileItem}\n data={{\n list: mobileSlides,\n configuration: { shape: data?.shape, event: event, title: data?.title, totalCategories },\n }}\n isHalf={isCardShow}\n paginationClassName=\"[&_.swiper-pagination]:!-bottom-6\"\n />\n </div>\n <div className=\"h-7\" />\n </div>\n )\n})\n\nCategory.displayName = 'Category'\n\nexport default withLayout(Category)\n"],
|
|
5
|
+
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA0EQ,IAAAI,EAAA,6BAzERC,EAAmD,oBACnDC,EAAmB,kCACnBC,EAAoB,0CACpBC,EAA2B,kCAC3BC,EAAkB,gCAClBC,EAAsB,kCACtBC,EAA4B,sCAC5BC,EAA4B,uCAG5B,MAAMC,EAAgB,QAChBC,EAAgB,kBAChBC,EAA4B,EAC5BC,EAA2B,EA+B3BC,EAAa,CAACC,EAAYC,IAAiB,CAC/C,MAAMC,EAAS,CAAC,EAChB,QAAS,EAAI,EAAG,EAAIF,EAAI,OAAQ,GAAKC,EACnCC,EAAO,KAAKF,EAAI,MAAM,EAAG,EAAIC,CAAI,CAAC,EAEpC,OAAOC,CACT,EAEMC,EAAiB,CAAC,CAAE,KAAAC,EAAM,cAAAC,CAAc,IAAmD,CAC/F,MAAMC,KAAM,UAAuB,IAAI,EAEvC,wBAAYA,EAAK,CACf,cAAAX,EACA,cAAAC,EACA,eAAgBQ,GAAM,KACtB,SAAUC,GAAe,MAAQ,CACnC,CAAC,KAGC,OAAC,OAAI,aAAW,MAAG,wCAAwC,EACzD,mBAAC,OACC,aAAW,MACT,gCACA,8CACA,8CACA,gDACA,qDACF,EAEA,oBAAC,OACC,IAAKC,EACL,aAAW,MACT,mFACA,sHACAD,GAAe,QAAU,QAAU,cAAgB,cACrD,EAEA,oBAAC,OAAI,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A,oBAAoB,oCACtB,EACF,KACA,OAAC,OAAI,UAAU,sBACb,mBAAC,EAAAI,QAAA,CACC,GAAI,YAAYT,CAAG,GACnB,MAAON,EACP,KAAM,CACJ,KAAMY,EACN,cAAe,CAAE,MAAOpB,GAAM,MAAO,MAAOe,EAAO,MAAOf,GAAM,MAAO,gBAAAmB,CAAgB,CACzF,EACA,OAAQD,EACR,oBAAoB,oCACtB,EACF,KACA,OAAC,OAAI,UAAU,MAAM,GACvB,CAEJ,CAAC,EAEDR,EAAS,YAAc,WAEvB,IAAO9B,KAAQ,cAAW8B,CAAQ",
|
|
6
|
+
"names": ["Category_exports", "__export", "Category_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_picture", "import_Styles", "import_Title", "import_SwiperCategory", "import_useExposure", "import_trackUrlRef", "componentType", "componentName", "MOBILE_FULL_PAGE_CAPACITY", "MOBILE_COMPACT_PAGE_SIZE", "chunkArray", "arr", "size", "chunks", "CategoryPcItem", "data", "configuration", "ref", "Picture", "SingleMobileItem", "index", "isFirstItemLarger", "isFirstItem", "CategoryMobileItem", "item", "Category", "React", "props", "className", "key", "event", "rest", "currentData", "isCardShow", "totalCategories", "mobileSlides", "innerRef", "Title", "SwiperBox"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var A=Object.create;var
|
|
1
|
+
"use strict";"use client";var A=Object.create;var c=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var F=(e,i)=>{for(var s in i)c(e,s,{get:i[s],enumerable:!0})},h=(e,i,s,l)=>{if(i&&typeof i=="object"||typeof i=="function")for(let o of $(i))!R.call(e,o)&&o!==s&&c(e,o,{get:()=>i[o],enumerable:!(l=B(i,o))||l.enumerable});return e};var v=(e,i,s)=>(s=e!=null?A(I(e)):{},h(i||!e||!e.__esModule?c(s,"default",{value:e,enumerable:!0}):s,e)),H=e=>h(c({},"__esModule",{value:!0}),e);var _={};F(_,{default:()=>V});module.exports=H(_);var t=require("react/jsx-runtime"),a=v(require("react")),k=require("react-dom"),y=v(require("../Title/index.js")),n=require("../../helpers/utils.js"),N=v(require("../../components/picture.js")),M=v(require("../SwiperBox/index.js")),L=require("../../shared/Styles.js"),d=require("../../components/avatar.js"),T=require("../../components/container.js"),C=require("../../components/text.js"),E=require("../../hooks/useExposure.js"),P=require("../../shared/trackUrlRef.js"),z=require("../AiuiProvider/index.js");const b="copy",w="product_review",D=({data:e,configuration:i})=>{const s=(0,a.useRef)(null),[l,o]=(0,a.useState)({visible:!1,x:0,y:0,text:""}),u=r=>{const p=Number(r),x=Number.isFinite(p)?Math.max(0,Math.floor(p)):0;return Array.from({length:x})||[]},m=r=>{e?.description&&o({visible:!0,x:r.clientX,y:r.clientY,text:e.description})},f=()=>{o(r=>({...r,visible:!1}))};return(0,E.useExposure)(s,{componentType:b,componentName:w,componentTitle:e?.title,componentDescription:e?.description,position:i?.index+1}),(0,t.jsx)("div",{ref:s,className:(0,n.cn)("bg-background tablet:hover:bg-info-white box-border w-full overflow-hidden duration-300",i?.shape==="round"?"rounded-2xl":"rounded-none","lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]","laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative","md-tablet:h-[360px]"),children:(0,t.jsxs)("div",{className:"desktop:p-6 absolute inset-0 box-border flex flex-col overflow-hidden p-4",children:[(0,t.jsxs)("div",{className:(0,n.cn)("lg-desktop:mb-16 desktop:mb-10 mb-8 flex w-full justify-between"),children:[(0,t.jsxs)("div",{className:"flex-1",children:[e?.title?(0,t.jsx)("h4",{className:"laptop:text-lg text-sm font-bold",children:e?.title}):null,(0,t.jsx)("div",{className:"mt-1 flex items-center",children:u(e?.rating)?.map?.((r,p)=>(0,t.jsx)("div",{className:"mr-1",children:(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,t.jsx)("path",{d:"M7.32745 1.36274C7.60256 0.805304 8.39744 0.805305 8.67255 1.36274L10.1766 4.41035C10.2859 4.63171 10.4971 4.78514 10.7413 4.82063L14.1046 5.30934C14.7197 5.39873 14.9654 6.15471 14.5202 6.58861L12.0866 8.96084C11.9098 9.13315 11.8292 9.3814 11.8709 9.62469L12.4454 12.9743C12.5505 13.587 11.9074 14.0542 11.3572 13.765L8.349 12.1835C8.13051 12.0686 7.86949 12.0686 7.65099 12.1835L4.64282 13.765C4.0926 14.0542 3.44953 13.587 3.55461 12.9743L4.12912 9.62469C4.17085 9.3814 4.09019 9.13315 3.91342 8.96084L1.47976 6.58861C1.03462 6.15471 1.28025 5.39873 1.89542 5.30934L5.25866 4.82063C5.50294 4.78514 5.71412 4.63171 5.82336 4.41035L7.32745 1.36274Z",fill:"#F77234"})})},p))})]}),(0,t.jsx)("div",{className:"desktop:size-12 size-10 overflow-hidden",children:e?.avatar?.url?(0,t.jsxs)(d.Avatar,{className:"size-full",isAdaptation:!e?.avatar?.url,children:[(0,t.jsx)(d.AvatarImage,{src:e?.avatar?.url}),(0,t.jsx)(d.AvatarFallback,{children:e?.title})]}):null})]}),(0,t.jsxs)("div",{className:"flex-1",onMouseMove:m,onMouseLeave:f,children:[(0,t.jsx)(C.Text,{className:(0,n.cn)("lg-desktop:text-2xl text-info-primary evaluate-description line-clamp-5 break-words text-xl font-bold leading-[1.2]"),children:e?.description||""}),typeof window<"u"&&l.visible&&(0,k.createPortal)((0,t.jsx)("div",{className:"pointer-events-none fixed z-[9999] max-w-xs rounded-lg bg-black/60 px-3 py-2 text-sm text-white shadow-lg backdrop-blur-sm transition-opacity duration-200",style:{left:`${l.x+16}px`,top:`${l.y+16}px`},children:l.text}),document.body)]}),(0,t.jsx)("a",{href:(0,P.trackUrlRef)((0,n.getLocalizedPath)(e?.link||"",i?.locale||"us"),`${b}_${w}`),onClick:()=>{i?.event?.primaryButton(e,i?.index+1)},"data-headless-type-name":`${b}#${w}`,"data-headless-title-desc-button":`${e?.title}#${e?.description||e?.subTitle}`,"data-headless-nav-position":`''#${i?.index+1}`,children:(0,t.jsxs)("div",{className:(0,n.cn)("mt-3 flex cursor-pointer items-center overflow-hidden bg-[#F7F8F9] p-3",i?.shape==="round"?"rounded-lg":"rounded-none"),children:[(0,t.jsx)("div",{className:"laptop:size-16 desktop:size-20 mr-3 flex size-12 items-center",children:(0,t.jsx)(N.default,{className:"w-full object-cover",source:e?.img?.url,alt:e?.img?.alt||""})}),(0,t.jsx)("p",{className:"lg-desktop:text-[18px] desktop-[16px] line-clamp-2 flex-1 text-[14px] font-bold tracking-[-0.04em]",children:e?.subTitle||""})]})})]})})},g=a.default.forwardRef(({className:e="",data:i,key:s,...l},o)=>{const{products:u,title:m,theme:f,...r}=i,p=(0,a.useRef)(null),{locale:x="us"}=(0,z.useAiuiContext)();return(0,a.useImperativeHandle)(o,()=>p.current),(0,t.jsx)("div",{...l,ref:p,className:e,children:(0,t.jsx)("div",{className:"evaluate-box relative z-10",children:(0,t.jsx)(T.Container,{...i?.containerProps||{},className:"overflow-hidden",children:(0,t.jsxs)("div",{ref:o,className:(0,n.cn)("w-full",e,{"aiui-dark":f==="dark"}),children:[m&&(0,t.jsx)(y.default,{data:{title:m}}),(0,t.jsx)(M.default,{className:"!overflow-visible",id:"Evaluate"+s,data:{list:u,configuration:{...r,title:m,locale:x}},Slide:D,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:3},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}})]})})})})});g.displayName="Evaluate";var V=(0,L.withLayout)(g);
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/Evaluate/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\nimport Title from '../Title/index.js'\nimport { cn, getLocalizedPath } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Avatar, AvatarImage, AvatarFallback } from '../../components/avatar.js'\nimport { Container } from '../../components/container.js'\nimport { Text } from '../../components/text.js'\nimport type { ContainerProps, Theme } from '../../types/props.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport type { Img } from '../../types/props.js'\n\nconst componentType = 'copy'\nconst componentName = 'product_review'\n\nexport interface EvaluateItem {\n /** \u4EA7\u54C1\u56FE\u7247*/\n img: Img\n title: string\n subTitle: string\n description: string\n avatar?: {\n url: string\n }\n rating: number\n link?: string\n}\n\nexport interface EvaluateProps extends React.HTMLAttributes<HTMLDivElement> {\n data: {\n title?: string\n products: EvaluateItem[]\n /** \u5F62\u72B6 */\n shape?: 'round' | 'square'\n /** \u4E3B\u9898\u8272*/\n theme?: Theme\n containerProps?: ContainerProps\n }\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: {\n primaryButton?: (_v: any, _index: number) => void\n }\n key?: string\n}\n\nconst EvaluateItem = ({ data, configuration }: { data: EvaluateItem; configuration?: any }) => {\n const ref = useRef<HTMLDivElement>(null)\n const
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,
|
|
6
|
-
"names": ["Evaluate_exports", "__export", "Evaluate_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_react_dom", "import_Title", "import_utils", "import_picture", "import_SwiperBox", "import_Styles", "import_avatar", "import_container", "import_text", "import_useExposure", "import_trackUrlRef", "import_AiuiProvider", "componentType", "componentName", "EvaluateItem", "data", "configuration", "ref", "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\nimport Title from '../Title/index.js'\nimport { cn, getLocalizedPath } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Avatar, AvatarImage, AvatarFallback } from '../../components/avatar.js'\nimport { Container } from '../../components/container.js'\nimport { Text } from '../../components/text.js'\nimport type { ContainerProps, Theme } from '../../types/props.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport type { Img } from '../../types/props.js'\n\nconst componentType = 'copy'\nconst componentName = 'product_review'\n\nexport interface EvaluateItem {\n /** \u4EA7\u54C1\u56FE\u7247*/\n img: Img\n title: string\n subTitle: string\n description: string\n avatar?: {\n url: string\n }\n rating: number\n link?: string\n}\n\nexport interface EvaluateProps extends React.HTMLAttributes<HTMLDivElement> {\n data: {\n title?: string\n products: EvaluateItem[]\n /** \u5F62\u72B6 */\n shape?: 'round' | 'square'\n /** \u4E3B\u9898\u8272*/\n theme?: Theme\n containerProps?: ContainerProps\n }\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: {\n primaryButton?: (_v: any, _index: number) => void\n }\n key?: string\n}\n\nconst EvaluateItem = ({ data, configuration }: { data: EvaluateItem; configuration?: any }) => {\n const ref = useRef<HTMLDivElement>(null)\n const [tooltip, setTooltip] = useState<{ visible: boolean; x: number; y: number; text: string }>({\n visible: false,\n x: 0,\n y: 0,\n text: '',\n })\n\n const handleRating = (num: number) => {\n const raw = Number(num)\n const count = Number.isFinite(raw) ? Math.max(0, Math.floor(raw)) : 0\n return Array.from({ length: count }) || []\n }\n\n const handleMouseMove = (e: React.MouseEvent) => {\n if (data?.description) {\n setTooltip({\n visible: true,\n x: e.clientX,\n y: e.clientY,\n text: data.description,\n })\n }\n }\n\n const handleMouseLeave = () => {\n setTooltip(prev => ({ ...prev, visible: false }))\n }\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: data?.title,\n componentDescription: data?.description,\n position: configuration?.index + 1,\n })\n\n return (\n <div\n ref={ref}\n className={cn(\n 'bg-background tablet:hover:bg-info-white box-border w-full overflow-hidden duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none',\n 'lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]',\n 'laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative',\n 'md-tablet:h-[360px]'\n )}\n >\n <div className=\"desktop:p-6 absolute inset-0 box-border flex flex-col overflow-hidden p-4\">\n <div className={cn('lg-desktop:mb-16 desktop:mb-10 mb-8 flex w-full justify-between')}>\n <div className=\"flex-1\">\n {data?.title ? <h4 className=\"laptop:text-lg text-sm font-bold\">{data?.title}</h4> : null}\n <div className=\"mt-1 flex items-center\">\n {handleRating(data?.rating)?.map?.((_, index) => {\n return (\n <div key={index} className=\"mr-1\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M7.32745 1.36274C7.60256 0.805304 8.39744 0.805305 8.67255 1.36274L10.1766 4.41035C10.2859 4.63171 10.4971 4.78514 10.7413 4.82063L14.1046 5.30934C14.7197 5.39873 14.9654 6.15471 14.5202 6.58861L12.0866 8.96084C11.9098 9.13315 11.8292 9.3814 11.8709 9.62469L12.4454 12.9743C12.5505 13.587 11.9074 14.0542 11.3572 13.765L8.349 12.1835C8.13051 12.0686 7.86949 12.0686 7.65099 12.1835L4.64282 13.765C4.0926 14.0542 3.44953 13.587 3.55461 12.9743L4.12912 9.62469C4.17085 9.3814 4.09019 9.13315 3.91342 8.96084L1.47976 6.58861C1.03462 6.15471 1.28025 5.39873 1.89542 5.30934L5.25866 4.82063C5.50294 4.78514 5.71412 4.63171 5.82336 4.41035L7.32745 1.36274Z\"\n fill=\"#F77234\"\n />\n </svg>\n </div>\n )\n })}\n </div>\n </div>\n <div className=\"desktop:size-12 size-10 overflow-hidden\">\n {data?.avatar?.url ? (\n <Avatar className=\"size-full\" isAdaptation={!data?.avatar?.url}>\n <AvatarImage src={data?.avatar?.url} />\n <AvatarFallback>{data?.title}</AvatarFallback>\n </Avatar>\n ) : null}\n </div>\n </div>\n <div className=\"flex-1\" onMouseMove={handleMouseMove} onMouseLeave={handleMouseLeave}>\n <Text\n className={cn(\n 'lg-desktop:text-2xl text-info-primary evaluate-description line-clamp-5 break-words text-xl font-bold leading-[1.2]'\n )}\n >\n {data?.description || ''}\n </Text>\n {typeof window !== 'undefined' &&\n tooltip.visible &&\n createPortal(\n <div\n className=\"pointer-events-none fixed z-[9999] max-w-xs rounded-lg bg-black/60 px-3 py-2 text-sm text-white shadow-lg backdrop-blur-sm transition-opacity duration-200\"\n style={{\n left: `${tooltip.x + 16}px`,\n top: `${tooltip.y + 16}px`,\n }}\n >\n {tooltip.text}\n </div>,\n document.body\n )}\n </div>\n <a\n href={trackUrlRef(\n getLocalizedPath(data?.link || '', configuration?.locale || 'us'),\n `${componentType}_${componentName}`\n )}\n onClick={() => {\n configuration?.event?.primaryButton(data, configuration?.index + 1)\n }}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${data?.title}#${data?.description || data?.subTitle}`}\n data-headless-nav-position={`''#${configuration?.index + 1}`}\n >\n <div\n className={cn(\n 'mt-3 flex cursor-pointer items-center overflow-hidden bg-[#F7F8F9] p-3',\n configuration?.shape === 'round' ? 'rounded-lg' : 'rounded-none'\n )}\n >\n <div className=\"laptop:size-16 desktop:size-20 mr-3 flex size-12 items-center\">\n <Picture className=\"w-full object-cover\" source={data?.img?.url} alt={data?.img?.alt || ''} />\n </div>\n <p className=\"lg-desktop:text-[18px] desktop-[16px] line-clamp-2 flex-1 text-[14px] font-bold tracking-[-0.04em]\">\n {data?.subTitle || ''}\n </p>\n </div>\n </a>\n </div>\n </div>\n )\n}\n\nconst Evaluate = React.forwardRef<HTMLDivElement, EvaluateProps>(({ className = '', data, key, ...rest }, ref) => {\n const { products, title, theme, ...other } = data\n const innerRef = useRef<HTMLDivElement>(null)\n const { locale = 'us' } = useAiuiContext()\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n return (\n <div {...rest} ref={innerRef} className={className}>\n <div className=\"evaluate-box relative z-10\">\n <Container {...(data?.containerProps || {})} className=\"overflow-hidden\">\n <div ref={ref} className={cn('w-full', className, { 'aiui-dark': theme === 'dark' })}>\n {title && <Title data={{ title: title }} />}\n <SwiperBox\n className=\"!overflow-visible\"\n id={'Evaluate' + key}\n data={{ list: products, configuration: { ...other, title: title, locale } }}\n Slide={EvaluateItem}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 3,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n </div>\n </Container>\n </div>\n </div>\n )\n})\n\nEvaluate.displayName = 'Evaluate'\n\nexport default withLayout(Evaluate)\n"],
|
|
5
|
+
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAqGU,IAAAI,EAAA,6BApGVC,EAA6D,oBAC7DC,EAA6B,qBAC7BC,EAAkB,gCAClBC,EAAqC,kCACrCC,EAAoB,0CACpBC,EAAsB,oCACtBC,EAA2B,kCAC3BC,EAAoD,sCACpDC,EAA0B,yCAC1BC,EAAqB,oC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luate_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_react_dom", "import_Title", "import_utils", "import_picture", "import_SwiperBox", "import_Styles", "import_avatar", "import_container", "import_text", "import_useExposure", "import_trackUrlRef", "import_AiuiProvider", "componentType", "componentName", "EvaluateItem", "data", "configuration", "ref", "tooltip", "setTooltip", "handleRating", "num", "raw", "count", "handleMouseMove", "e", "handleMouseLeave", "prev", "_", "index", "Picture", "Evaluate", "React", "className", "key", "rest", "products", "title", "theme", "other", "innerRef", "locale", "Title", "SwiperBox"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var
|
|
1
|
+
"use strict";"use client";var j=Object.create;var x=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var G=(t,e)=>{for(var i in e)x(t,i,{get:e[i],enumerable:!0})},F=(t,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of $(e))!q.call(t,n)&&n!==i&&x(t,n,{get:()=>e[n],enumerable:!(o=H(e,n))||o.enumerable});return t};var V=(t,e,i)=>(i=t!=null?j(O(t)):{},F(e||!t||!t.__esModule?x(i,"default",{value:t,enumerable:!0}):i,t)),J=t=>F(x({},"__esModule",{value:!0}),t);var _={};G(_,{default:()=>Z});module.exports=J(_);var s=require("react/jsx-runtime"),a=V(require("react")),g=require("../../helpers/index.js"),I=require("../../shared/Styles.js"),u=require("../../components/index.js"),f=require("swiper/react"),k=V(require("dayjs")),S=require("class-variance-authority");const E=(t,e)=>{const i=(0,k.default)(),o=(0,k.default)(t).startOf("day"),n=(0,k.default)(e).endOf("day");return i.isAfter(n)?"completed":i.isBefore(o)?"not-started":"in-progress"},K=(0,S.cva)("h-1 w-full overflow-hidden",{variants:{state:{"in-progress-light":"bg-[#F6CD4E]","in-progress-dark":"bg-[#D79941]","not-started-light":"bg-[#EAEAEC]","not-started-dark":"bg-[#1E2024]","completed-light":"bg-[#F6CD4E]","completed-dark":"bg-[#D79941]"}},defaultVariants:{state:"not-started-light"}}),Q=(0,S.cva)("size-4 rounded-full transition-colors",{variants:{state:{"in-progress-light":"bg-[#F6CD4E]","in-progress-dark":"bg-[#D79941]","not-started-light":"bg-[#EAEAEC]","not-started-dark":"bg-[#1E2024]","completed-light":"bg-[#F6CD4E]","completed-dark":"bg-[#D79941]"}},defaultVariants:{state:"not-started-light"}}),T=(0,S.cva)("font-bold leading-[1.2]",{variants:{state:{"in-progress-light":"text-[#080A0F]","in-progress-dark":"text-white","not-started-light":"text-[#080A0F]","not-started-dark":"text-[#F5F6F7]","completed-light":"text-[#4A4C56]/60","completed-dark":"text-[#F5F6F7]/60"}},defaultVariants:{state:"not-started-light"}}),U=(0,S.cva)("laptop:h-[160px] rounded-box relative flex h-[120px] min-w-0 flex-col justify-between gap-2 overflow-hidden",{variants:{state:{"in-progress-light":"bg-[#F4E8BC]","in-progress-dark":"bg-[#D79941]","not-started-light":"bg-[#EAEAEC]","not-started-dark":"bg-[#1E2024]","completed-light":"bg-[#F4E8BC]","completed-dark":"bg-[#D79941]"}},defaultVariants:{state:"not-started-light"}}),W=({timeStatus:t,theme:e="light",className:i,index:o,nodeLength:n})=>{const p=`${t}-${e}`,l=o===0,d=o===n-1;return(0,s.jsxs)("div",{className:"relative my-2 flex h-1 w-full items-center justify-center",children:[(0,s.jsx)("div",{className:(0,g.cn)(K({state:p}),l&&"rounded-l-full",d&&"rounded-r-full",i)}),(0,s.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",children:(0,s.jsx)("div",{className:Q({state:p})})})]})},X=(t,e)=>{if(t)return e==="in-progress"?t.active:e==="completed"&&t.completed||t.inactive},Y=({timeStatus:t,item:e,theme:i="light",className:o,scheduleCount:n})=>{const p=a.useMemo(()=>X(e.icon,t),[e.icon,t]),l=`${t}-${i}`;return(0,s.jsxs)("div",{className:(0,g.cn)(U({state:l}),o),children:[p&&(0,s.jsx)("div",{className:"laptop:w-[128px] desktop:w-[160px] absolute bottom-0 right-0 z-10 w-[120px]",children:(0,s.jsx)(u.Picture,{source:p.url,alt:p.alt,className:"aspect-square"})}),(0,s.jsxs)("div",{className:"tablet:px-4 tablet:py-3 desktop:pl-6 desktop:pr-16 relative z-20 flex h-full flex-col justify-between p-4 pr-8",children:[(0,s.jsx)(u.Heading,{html:e.title,className:(0,g.cn)(n>=4?"desktop:text-[24px]":"desktop:text-[32px]","laptop:text-[24px] line-clamp-1 text-[20px]",T({state:l}))}),(0,s.jsx)("div",{className:"flex flex-col gap-0.5",children:e.items.map((d,c)=>(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[d.icon&&(0,s.jsx)(u.Text,{className:(0,g.cn)("desktop:size-6 size-5 shrink-0",T({state:l})),html:d.icon}),(0,s.jsx)(u.Text,{html:d.label,className:(0,g.cn)("lg-desktop:text-[18px] desktop:text-[16px] line-clamp-1 flex-1 text-[14px] leading-[1.4]",T({state:l}))})]},c))})]})]})},A=a.forwardRef(({classNames:t={},data:e,className:i,...o},n)=>{const p=e.theme||"light",l=a.useRef(null),d=a.useRef(null),c=a.useRef(!1),v=a.useMemo(()=>e?.scheduleList?.length||2,[e?.scheduleList]),b=a.useMemo(()=>e.scheduleList.findIndex(r=>E(r.startDate,r.endDate)==="in-progress"),[e.scheduleList]),w=a.useCallback((r,h=!1)=>{const m=z=>{switch(z){case"mobile":return{slidesPerView:1.17};case"tablet":return r===2?{slidesPerView:2}:{slidesPerView:2.4};case"laptop":return r===2?{}:r===4?{slidesPerView:3.2}:{slidesPerView:r};case"desktop":return r===2?{slidesPerView:2}:{slidesPerView:r}}},N=m("mobile"),y=m("tablet"),D=m("laptop"),L=m("desktop");return h?{0:{...N,spaceBetween:12},768:{...y,spaceBetween:12},1024:{...D,spaceBetween:16},1440:{...L,spaceBetween:16}}:{0:N,768:y,1024:D,1440:L}},[]),M=a.useMemo(()=>w(v,!0),[v,w]),B=a.useMemo(()=>w(v,!1),[v,w]),C=e.showTimeline!==!1,P=a.useCallback(r=>{c.current||!d.current||(c.current=!0,d.current.slideTo(r.activeIndex,r.params.speed),setTimeout(()=>{c.current=!1},50))},[]),R=a.useCallback(r=>{c.current||!l.current||(c.current=!0,l.current.slideTo(r.activeIndex,r.params.speed),setTimeout(()=>{c.current=!1},50))},[]);return a.useEffect(()=>{l.current&&d.current&&b>=0&&setTimeout(()=>{c.current=!0,l.current?.slideTo(b,500),d.current?.slideTo(b,500),setTimeout(()=>{c.current=!1},600)},100)},[b]),(0,s.jsxs)(u.Container,{...o,ref:n,className:(0,g.cn)("overflow-hidden",t?.root,i),children:[C&&(0,s.jsx)(f.Swiper,{breakpoints:B,className:"h-4 w-full !overflow-visible",onSwiper:r=>{d.current=r},onSlideChange:R,children:e.scheduleList.map((r,h)=>{const m=E(r.startDate,r.endDate);return(0,s.jsx)(f.SwiperSlide,{className:"",children:(0,s.jsx)(W,{className:t?.timeline,timeStatus:m,theme:p,index:h,nodeLength:e.scheduleList.length})},"timelineNode"+h)})}),(0,s.jsx)(f.Swiper,{breakpoints:M,className:"w-full !overflow-visible",onSwiper:r=>{l.current=r},onSlideChange:P,children:e.scheduleList.map((r,h)=>{const m=E(r.startDate,r.endDate);return(0,s.jsx)(f.SwiperSlide,{children:(0,s.jsx)(Y,{timeStatus:m,className:(0,g.cn)(C?"laptop:mt-4 mt-2":"",t?.eventScheduleCard),item:r,theme:p,scheduleCount:e.scheduleList.length})},"SwiperSlideItem"+h)})})]})});A.displayName="EventSchedule";var Z=(0,I.withLayout)(A);
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/EventSchedule/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { withLayout } from '../../shared/Styles.js'\nimport { cn, extractLexicalText } from '../../helpers/index.js'\nimport { Text, Picture, Heading, Container } from '../../components/index.js'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport type { Swiper as SwiperType } from 'swiper'\nimport dayjs from 'dayjs'\nimport { cva } from 'class-variance-authority'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport type { Media } from '../../types/props.js'\nexport type EventScheduleSemanticName = 'root' | 'timeline' | 'eventScheduleCard'\n\nconst componentType = 'image'\nconst componentName = 'event_schedule'\n\n/**\n * \u65F6\u95F4\u72B6\u6001\u7C7B\u578B\n */\nexport type TimeStatus = 'completed' | 'in-progress' | 'not-started'\n\n/**\n * \u72B6\u6001\u5316\u56FE\u6807\u914D\u7F6E\n */\nexport interface StateIcon {\n /** \u6FC0\u6D3B\u72B6\u6001\u7684\u56FE\u6807\uFF08\u8FDB\u884C\u4E2D\uFF09 */\n active: Media\n /** \u975E\u6FC0\u6D3B\u72B6\u6001\u7684\u56FE\u6807\uFF08\u672A\u5F00\u59CB\uFF09 */\n inactive: Media\n /** \u5DF2\u5B8C\u6210\u72B6\u6001\u7684\u56FE\u6807\uFF08\u53EF\u9009\uFF0C\u4E0D\u63D0\u4F9B\u5219\u4F7F\u7528 inactive\uFF09 */\n completed?: Media\n}\n\n/**\n * \u6D3B\u52A8\u65E5\u7A0B\u9879\u6570\u636E\u63A5\u53E3\n */\nexport interface EventScheduleItem {\n /** \u6807\u9898 */\n title: string\n /** \u5F00\u59CB\u65E5\u671F\uFF08ISO 8601 \u683C\u5F0F\u6216\u4EFB\u4F55 dayjs \u652F\u6301\u7684\u683C\u5F0F\uFF0C\u5982 '2024-12-01'\uFF09 */\n startDate: string\n /** \u7ED3\u675F\u65E5\u671F\uFF08ISO 8601 \u683C\u5F0F\u6216\u4EFB\u4F55 dayjs \u652F\u6301\u7684\u683C\u5F0F\uFF0C\u5982 '2024-12-31'\uFF09 */\n endDate: string\n /**\n * \u5361\u7247\u80CC\u666F\u56FE\u6807\u914D\u7F6E\uFF0C\u72B6\u6001\u5316\u56FE\u6807\uFF08\u5FC5\u987B\u5305\u542B active \u548C inactive\uFF09\n *\n * @example\n * icon: {\n * active: { url: \"https://example.com/active-icon.svg\", alt: \"Active Icon\" },\n * inactive: { url: \"https://example.com/inactive-icon.svg\", alt: \"Inactive Icon\" }\n * }\n */\n icon?: StateIcon\n /** \u8BE6\u7EC6\u4FE1\u606F\u5217\u8868 */\n items: {\n /** \u56FE\u6807 (SVG \u5B57\u7B26\u4E32\u6216 URL) */\n icon?: string\n /** \u6587\u672C\u5185\u5BB9 */\n label: string\n }[]\n}\n\n/**\n * EventSchedule \u4E1A\u52A1\u7EC4\u4EF6\u6570\u636E\u63A5\u53E3\n */\nexport interface EventScheduleData {\n /** \u65E5\u7A0B\u5217\u8868 */\n scheduleList: EventScheduleItem[]\n /** \u662F\u5426\u663E\u793A\u65F6\u95F4\u8F74\uFF0C\u9ED8\u8BA4\u4E3A true */\n showTimeline?: boolean\n /** \u4E3B\u9898\u6A21\u5F0F */\n theme?: 'light' | 'dark'\n}\n\nexport interface EventScheduleProps extends React.HTMLAttributes<HTMLDivElement> {\n /** \u4E1A\u52A1\u6570\u636E */\n data: EventScheduleData\n classNames?: Partial<Record<EventScheduleSemanticName, string>>\n}\n\n/**\n * \u83B7\u53D6\u65F6\u95F4\u72B6\u6001\n * @param startDate \u5F00\u59CB\u65E5\u671F\n * @param endDate \u7ED3\u675F\u65E5\u671F\n * @returns \u65F6\u95F4\u72B6\u6001\uFF1Acompleted\uFF08\u5DF2\u5B8C\u6210\uFF09\u3001in-progress\uFF08\u8FDB\u884C\u4E2D\uFF09\u3001not-started\uFF08\u672A\u5F00\u59CB\uFF09\n */\nconst getTimeStatus = (startDate: string, endDate: string): TimeStatus => {\n const now = dayjs()\n const start = dayjs(startDate).startOf('day')\n const end = dayjs(endDate).endOf('day')\n\n // \u5F53\u524D\u65F6\u95F4\u5728\u7ED3\u675F\u65F6\u95F4\u4E4B\u540E - \u5DF2\u5B8C\u6210\n if (now.isAfter(end)) {\n return 'completed'\n }\n\n // \u5F53\u524D\u65F6\u95F4\u5728\u5F00\u59CB\u65F6\u95F4\u4E4B\u524D - \u672A\u5F00\u59CB\n if (now.isBefore(start)) {\n return 'not-started'\n }\n\n // \u5F53\u524D\u65F6\u95F4\u5728\u5F00\u59CB\u548C\u7ED3\u675F\u4E4B\u95F4 - \u8FDB\u884C\u4E2D\n return 'in-progress'\n}\n\n/**\n * \u65F6\u95F4\u8F74\u8FDB\u5EA6\u6761\u6837\u5F0F\u53D8\u4F53\uFF08\u652F\u6301\u4E09\u79CD\u65F6\u95F4\u72B6\u6001\uFF09\n */\nconst timelineProgressActiveVariants = cva('h-1 w-full overflow-hidden', {\n variants: {\n state: {\n // \u8FDB\u884C\u4E2D\n 'in-progress-light': 'bg-[#F6CD4E]',\n 'in-progress-dark': 'bg-[#D79941]',\n // \u672A\u5F00\u59CB\n 'not-started-light': 'bg-[#EAEAEC]',\n 'not-started-dark': 'bg-[#1E2024]',\n // \u5DF2\u5B8C\u6210\n 'completed-light': 'bg-[#F6CD4E]',\n 'completed-dark': 'bg-[#D79941]',\n },\n },\n defaultVariants: {\n state: 'not-started-light',\n },\n})\n\n/**\n * \u65F6\u95F4\u8F74\u8282\u70B9\u6837\u5F0F\u53D8\u4F53\uFF08\u652F\u6301\u4E09\u79CD\u65F6\u95F4\u72B6\u6001\uFF09\n */\nconst timelineNodeActiveVariants = cva('size-4 rounded-full transition-colors', {\n variants: {\n state: {\n // \u8FDB\u884C\u4E2D\n 'in-progress-light': 'bg-[#F6CD4E]',\n 'in-progress-dark': 'bg-[#D79941]',\n // \u672A\u5F00\u59CB\n 'not-started-light': 'bg-[#EAEAEC]',\n 'not-started-dark': 'bg-[#1E2024]',\n // \u5DF2\u5B8C\u6210\uFF08\u4E0E\u8FDB\u884C\u4E2D\u989C\u8272\u4E00\u81F4\uFF09\n 'completed-light': 'bg-[#F6CD4E]',\n 'completed-dark': 'bg-[#D79941]',\n },\n },\n defaultVariants: {\n state: 'not-started-light',\n },\n})\n\n/**\n * \u5361\u7247\u6587\u672C\u6837\u5F0F\u53D8\u4F53\uFF08\u652F\u6301\u4E09\u79CD\u65F6\u95F4\u72B6\u6001\uFF09\n */\nconst cardTextVariants = cva('font-bold leading-[1.2]', {\n variants: {\n state: {\n // \u8FDB\u884C\u4E2D\uFF08\u4FDD\u6301\u539F\u6709\u989C\u8272\uFF09\n 'in-progress-light': 'text-[#080A0F]',\n 'in-progress-dark': 'text-white',\n // \u672A\u5F00\u59CB\uFF0860% \u900F\u660E\u5EA6\uFF09\n 'not-started-light': 'text-[#080A0F]',\n 'not-started-dark': 'text-[#F5F6F7]',\n // \u5DF2\u5B8C\u6210\uFF0860% \u900F\u660E\u5EA6\uFF09\n 'completed-light': 'text-[#4A4C56]/60',\n 'completed-dark': 'text-[#F5F6F7]/60',\n },\n },\n defaultVariants: {\n state: 'not-started-light',\n },\n})\n\n/**\n * \u5361\u7247\u5BB9\u5668\u6837\u5F0F\u53D8\u4F53\uFF08\u652F\u6301\u4E09\u79CD\u65F6\u95F4\u72B6\u6001\uFF09\n */\nconst eventScheduleCardVariants = cva(\n 'laptop:h-[160px] rounded-box relative flex h-[120px] min-w-0 flex-col justify-between gap-2 overflow-hidden',\n {\n variants: {\n state: {\n // \u8FDB\u884C\u4E2D\n 'in-progress-light': 'bg-[#F4E8BC]',\n 'in-progress-dark': 'bg-[#D79941]',\n // \u672A\u5F00\u59CB\n 'not-started-light': 'bg-[#EAEAEC]',\n 'not-started-dark': 'bg-[#1E2024]',\n // \u5DF2\u5B8C\u6210\n 'completed-light': 'bg-[#F4E8BC]',\n 'completed-dark': 'bg-[#D79941]',\n },\n },\n defaultVariants: {\n state: 'not-started-light',\n },\n }\n)\n\n/**\n * \u65F6\u95F4\u8F74\u8282\u70B9\u7EC4\u4EF6 Props\n */\ninterface TimelineNodeProps {\n /** \u65F6\u95F4\u72B6\u6001 */\n timeStatus: TimeStatus\n /** \u4E3B\u9898\u6A21\u5F0F */\n theme?: 'light' | 'dark'\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n /** \u5F53\u524D\u8282\u70B9\u7D22\u5F15 */\n index: number\n /** \u8282\u70B9\u603B\u6570 */\n nodeLength: number\n}\n\n/**\n * \u65F6\u95F4\u8F74\u8282\u70B9\u7EC4\u4EF6\n */\nconst TimelineNode = ({ timeStatus, theme = 'light', className, index, nodeLength }: TimelineNodeProps) => {\n // \u8BA1\u7B97\u7EC4\u5408\u72B6\u6001\n const state = `${timeStatus}-${theme}` as\n | 'in-progress-light'\n | 'in-progress-dark'\n | 'not-started-light'\n | 'not-started-dark'\n | 'completed-light'\n | 'completed-dark'\n\n // \u5224\u65AD\u9996\u5C3E\u4F4D\u7F6E\n const isFirst = index === 0\n const isLast = index === nodeLength - 1\n\n return (\n <div className=\"relative my-2 flex h-1 w-full items-center justify-center\">\n {/* \u8FDB\u5EA6\u6761\u80CC\u666F */}\n <div\n className={cn(\n timelineProgressActiveVariants({ state }),\n isFirst && 'rounded-l-full',\n isLast && 'rounded-r-full',\n className\n )}\n />\n {/* \u65F6\u95F4\u8282\u70B9\u5706\u70B9 */}\n <div className=\"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2\">\n <div className={timelineNodeActiveVariants({ state })} />\n </div>\n </div>\n )\n}\n\n/**\n * \u6839\u636E\u65F6\u95F4\u72B6\u6001\u83B7\u53D6\u5BF9\u5E94\u7684\u56FE\u6807\n * @param icon \u72B6\u6001\u5316\u56FE\u6807\u914D\u7F6E\n * @param timeStatus \u65F6\u95F4\u72B6\u6001\n * @returns \u56FE\u6807 Media \u5BF9\u8C61\n */\nconst getIconByTimeStatus = (icon: StateIcon | undefined, timeStatus: TimeStatus): Media | undefined => {\n if (!icon) return undefined\n // \u8FDB\u884C\u4E2D\u4F7F\u7528 active \u56FE\u6807\n if (timeStatus === 'in-progress') return icon.active\n // \u5DF2\u5B8C\u6210\u4F7F\u7528 completed \u56FE\u6807\uFF08\u5982\u679C\u6709\uFF09\uFF0C\u5426\u5219\u4F7F\u7528 inactive\n if (timeStatus === 'completed') return icon.completed || icon.inactive\n // \u672A\u5F00\u59CB\u4F7F\u7528 inactive \u56FE\u6807\n return icon.inactive\n}\n\n/**\n * \u6D3B\u52A8\u65E5\u7A0B\u5361\u7247\u7EC4\u4EF6\n */\nconst EventScheduleCard = ({\n timeStatus,\n item,\n theme = 'light',\n className,\n scheduleCount,\n}: {\n timeStatus: TimeStatus\n item: EventScheduleItem\n theme?: 'light' | 'dark'\n className?: string\n scheduleCount: number\n}) => {\n const currentIcon = React.useMemo(() => {\n return getIconByTimeStatus(item.icon, timeStatus)\n }, [item.icon, timeStatus])\n\n // \u8BA1\u7B97\u7EC4\u5408\u72B6\u6001\n const cardState = `${timeStatus}-${theme}` as\n | 'in-progress-light'\n | 'in-progress-dark'\n | 'not-started-light'\n | 'not-started-dark'\n | 'completed-light'\n | 'completed-dark'\n\n return (\n <div className={cn(eventScheduleCardVariants({ state: cardState }), className)}>\n {/* \u80CC\u666F\u56FE\u6807 */}\n {currentIcon && (\n <div className=\"laptop:w-[128px] desktop:w-[160px] absolute bottom-0 right-0 z-10 w-[120px]\">\n <Picture source={currentIcon.url} alt={currentIcon.alt} className=\"aspect-square\" />\n </div>\n )}\n {/* \u5185\u5BB9\u533A\u57DF */}\n <div className=\"tablet:px-4 tablet:py-3 desktop:pl-6 desktop:pr-16 relative z-20 flex h-full flex-col justify-between p-4 pr-8\">\n <Heading\n html={item.title}\n className={cn(\n scheduleCount >= 4 ? 'desktop:text-[24px]' : 'desktop:text-[32px]',\n 'laptop:text-[24px] line-clamp-1 text-[20px]',\n cardTextVariants({ state: cardState })\n )}\n />\n {/* \u8BE6\u7EC6\u4FE1\u606F\u5217\u8868 */}\n <div className=\"flex flex-col gap-0.5\">\n {item.items.map((detail, index) => (\n <div key={index} className=\"flex items-center gap-2\">\n {/* \u56FE\u6807 */}\n {detail.icon && (\n <Text\n className={cn('desktop:size-6 size-5 shrink-0', cardTextVariants({ state: cardState }))}\n html={detail.icon}\n />\n )}\n {/* \u6587\u672C */}\n <Text\n html={detail.label}\n className={cn(\n 'lg-desktop:text-[18px] desktop:text-[16px] line-clamp-1 flex-1 text-[14px] leading-[1.4]',\n cardTextVariants({ state: cardState })\n )}\n />\n </div>\n ))}\n </div>\n </div>\n </div>\n )\n}\n\n/**\n * EventSchedule - \u6D3B\u52A8\u65E5\u7A0B\u7EC4\u4EF6\n *\n * @description \u663E\u793A\u6D3B\u52A8\u65E5\u7A0B\u65F6\u95F4\u8F74\u548C\u6D3B\u52A8\u5361\u7247\u5217\u8868\n */\nconst EventSchedule = React.forwardRef<HTMLDivElement, EventScheduleProps>(\n ({ classNames = {}, data, className, ...rest }, ref) => {\n const innerRef = React.useRef<HTMLDivElement>(null)\n\n React.useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n // \u66DD\u5149\u57CB\u70B9\n useExposure(innerRef, {\n componentType,\n componentName,\n componentTitle: extractLexicalText(data.scheduleList?.[0]?.title),\n componentDescription: '',\n })\n\n const theme = data.theme || 'light'\n const swiperRef = React.useRef<SwiperType | null>(null)\n const timelineSwiperRef = React.useRef<SwiperType | null>(null)\n const isSyncingRef = React.useRef(false) // \u9632\u6B62\u5FAA\u73AF\u89E6\u53D1\n const itemsPerRow = React.useMemo(() => {\n return data?.scheduleList?.length || 2\n }, [data?.scheduleList])\n\n // \u8BA1\u7B97\u8FDB\u884C\u4E2D item \u7684\u7D22\u5F15\uFF08\u7528\u4E8E\u81EA\u52A8\u6EDA\u52A8\uFF09\n const activeIndex = React.useMemo(() => {\n return data.scheduleList.findIndex(item => {\n const timeStatus = getTimeStatus(item.startDate, item.endDate)\n return timeStatus === 'in-progress'\n })\n }, [data.scheduleList])\n\n /**\n * \u751F\u6210\u7EDF\u4E00\u7684 Swiper \u65AD\u70B9\u914D\u7F6E\n * @param itemsPerRow \u6BCF\u884C\u663E\u793A\u7684\u9879\u76EE\u6570\n * @param withSpaceBetween \u662F\u5426\u5305\u542B\u95F4\u8DDD\u914D\u7F6E\n * @returns Swiper \u65AD\u70B9\u914D\u7F6E\u5BF9\u8C61\n */\n const generateSwiperBreakpoints = React.useCallback((itemsPerRow: number, withSpaceBetween: boolean = false) => {\n // \u6839\u636E itemsPerRow \u786E\u5B9A\u4E0D\u540C\u65AD\u70B9\u4E0B\u7684 slidesPerView\n const getBreakpointConfig = (breakpoint: 'mobile' | 'tablet' | 'laptop' | 'desktop') => {\n switch (breakpoint) {\n case 'mobile':\n return { slidesPerView: 1.17 }\n case 'tablet':\n if (itemsPerRow === 2) return { slidesPerView: 2 }\n return { slidesPerView: 2.4 }\n case 'laptop':\n if (itemsPerRow === 2) return {}\n if (itemsPerRow === 4) return { slidesPerView: 3.2 }\n return { slidesPerView: itemsPerRow }\n case 'desktop':\n if (itemsPerRow === 2) return { slidesPerView: 2 }\n return { slidesPerView: itemsPerRow }\n }\n }\n\n const mobileConfig = getBreakpointConfig('mobile')\n const tabletConfig = getBreakpointConfig('tablet')\n const laptopConfig = getBreakpointConfig('laptop')\n const desktopConfig = getBreakpointConfig('desktop')\n\n // \u5982\u679C\u9700\u8981 spaceBetween\uFF0C\u5219\u6DFB\u52A0\u5230\u914D\u7F6E\u4E2D\n if (withSpaceBetween) {\n return {\n 0: { ...mobileConfig, spaceBetween: 12 },\n 768: { ...tabletConfig, spaceBetween: 12 },\n 1024: { ...laptopConfig, spaceBetween: 16 },\n 1440: { ...desktopConfig, spaceBetween: 16 },\n }\n }\n\n return {\n 0: mobileConfig,\n 768: tabletConfig,\n 1024: laptopConfig,\n 1440: desktopConfig,\n }\n }, [])\n\n // \u6839\u636E itemsPerRow \u914D\u7F6E\u54CD\u5E94\u5F0F\u65AD\u70B9\uFF08\u5361\u7247 Swiper - \u5305\u542B\u95F4\u8DDD\uFF09\n const swiperBreakpoints = React.useMemo(() => {\n return generateSwiperBreakpoints(itemsPerRow, true)\n }, [itemsPerRow, generateSwiperBreakpoints])\n\n // \u65F6\u95F4\u8F74 Swiper \u65AD\u70B9\u914D\u7F6E\uFF08\u4E0D\u5305\u542B\u95F4\u8DDD\uFF09\n const timeNodeSwiperBreakpoints = React.useMemo(() => {\n return generateSwiperBreakpoints(itemsPerRow, false)\n }, [itemsPerRow, generateSwiperBreakpoints])\n\n const showTimeline = data.showTimeline !== false // \u9ED8\u8BA4\u4E3A true\n\n // \u540C\u6B65\u4E24\u4E2A Swiper \u7684\u6ED1\u52A8\n const handleCardSwiperSlideChange = React.useCallback((swiper: SwiperType) => {\n if (isSyncingRef.current || !timelineSwiperRef.current) return\n isSyncingRef.current = true\n timelineSwiperRef.current.slideTo(swiper.activeIndex, swiper.params.speed)\n // \u5EF6\u8FDF\u91CD\u7F6E\u6807\u5FD7\uFF0C\u786E\u4FDD\u540C\u6B65\u5B8C\u6210\n setTimeout(() => {\n isSyncingRef.current = false\n }, 50)\n }, [])\n\n const handleTimelineSwiperSlideChange = React.useCallback((swiper: SwiperType) => {\n if (isSyncingRef.current || !swiperRef.current) return\n isSyncingRef.current = true\n swiperRef.current.slideTo(swiper.activeIndex, swiper.params.speed)\n // \u5EF6\u8FDF\u91CD\u7F6E\u6807\u5FD7\uFF0C\u786E\u4FDD\u540C\u6B65\u5B8C\u6210\n setTimeout(() => {\n isSyncingRef.current = false\n }, 50)\n }, [])\n\n // \u81EA\u52A8\u6EDA\u52A8\u5230 active item\n React.useEffect(() => {\n if (swiperRef.current && timelineSwiperRef.current && activeIndex >= 0) {\n // \u5EF6\u8FDF\u6267\u884C\uFF0C\u786E\u4FDD Swiper \u5DF2\u7ECF\u5B8C\u5168\u521D\u59CB\u5316\n setTimeout(() => {\n isSyncingRef.current = true\n swiperRef.current?.slideTo(activeIndex, 500)\n timelineSwiperRef.current?.slideTo(activeIndex, 500)\n setTimeout(() => {\n isSyncingRef.current = false\n }, 600)\n }, 100)\n }\n }, [activeIndex])\n\n return (\n <div {...rest} ref={ref} className={cn('overflow-hidden', classNames?.root, className)}>\n {showTimeline && (\n <Swiper\n breakpoints={timeNodeSwiperBreakpoints}\n className=\"h-4 w-full !overflow-visible\"\n onSwiper={swiper => {\n timelineSwiperRef.current = swiper\n }}\n onSlideChange={handleTimelineSwiperSlideChange}\n >\n {data.scheduleList.map((item, index) => {\n const timeStatus = getTimeStatus(item.startDate, item.endDate)\n return (\n <SwiperSlide key={'timelineNode' + index} className=\"\">\n <TimelineNode\n className={classNames?.timeline}\n timeStatus={timeStatus}\n theme={theme}\n index={index}\n nodeLength={data.scheduleList.length}\n />\n </SwiperSlide>\n )\n })}\n </Swiper>\n )}\n <Swiper\n breakpoints={swiperBreakpoints}\n className=\"w-full !overflow-visible\"\n onSwiper={swiper => {\n swiperRef.current = swiper\n }}\n onSlideChange={handleCardSwiperSlideChange}\n >\n {data.scheduleList.map((item, index) => {\n const timeStatus = getTimeStatus(item.startDate, item.endDate)\n return (\n <SwiperSlide key={'SwiperSlideItem' + index}>\n <EventScheduleCard\n timeStatus={timeStatus}\n className={cn(showTimeline ? 'laptop:mt-4 mt-2' : '', classNames?.eventScheduleCard)}\n item={item}\n theme={theme}\n scheduleCount={data.scheduleList.length}\n />\n </SwiperSlide>\n )\n })}\n </Swiper>\n </div>\n )\n }\n)\n\nEventSchedule.displayName = 'EventSchedule'\nexport default withLayout(EventSchedule)\n\n// \u5BFC\u51FA\u7C7B\u578B\u4F9B\u5916\u90E8\u4F7F\u7528\n// export type { StateIcon, EventScheduleItem, EventScheduleData, EventScheduleProps }\n"],
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,
|
|
6
|
-
"names": ["EventSchedule_exports", "__export", "EventSchedule_default", "__toCommonJS", "import_jsx_runtime", "React", "
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cn } from '../../helpers/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Text, Picture, Heading, Container } from '../../components/index.js'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport type { Swiper as SwiperType } from 'swiper'\nimport dayjs from 'dayjs'\nimport { cva } from 'class-variance-authority'\nimport type { Media } from '../../types/props.js'\nexport type EventScheduleSemanticName = 'root' | 'timeline' | 'eventScheduleCard'\n\n/**\n * \u65F6\u95F4\u72B6\u6001\u7C7B\u578B\n */\nexport type TimeStatus = 'completed' | 'in-progress' | 'not-started'\n\n/**\n * \u72B6\u6001\u5316\u56FE\u6807\u914D\u7F6E\n */\nexport interface StateIcon {\n /** \u6FC0\u6D3B\u72B6\u6001\u7684\u56FE\u6807\uFF08\u8FDB\u884C\u4E2D\uFF09 */\n active: Media\n /** \u975E\u6FC0\u6D3B\u72B6\u6001\u7684\u56FE\u6807\uFF08\u672A\u5F00\u59CB\uFF09 */\n inactive: Media\n /** \u5DF2\u5B8C\u6210\u72B6\u6001\u7684\u56FE\u6807\uFF08\u53EF\u9009\uFF0C\u4E0D\u63D0\u4F9B\u5219\u4F7F\u7528 inactive\uFF09 */\n completed?: Media\n}\n\n/**\n * \u6D3B\u52A8\u65E5\u7A0B\u9879\u6570\u636E\u63A5\u53E3\n */\nexport interface EventScheduleItem {\n /** \u6807\u9898 */\n title: string\n /** \u5F00\u59CB\u65E5\u671F\uFF08ISO 8601 \u683C\u5F0F\u6216\u4EFB\u4F55 dayjs \u652F\u6301\u7684\u683C\u5F0F\uFF0C\u5982 '2024-12-01'\uFF09 */\n startDate: string\n /** \u7ED3\u675F\u65E5\u671F\uFF08ISO 8601 \u683C\u5F0F\u6216\u4EFB\u4F55 dayjs \u652F\u6301\u7684\u683C\u5F0F\uFF0C\u5982 '2024-12-31'\uFF09 */\n endDate: string\n /**\n * \u5361\u7247\u80CC\u666F\u56FE\u6807\u914D\u7F6E\uFF0C\u72B6\u6001\u5316\u56FE\u6807\uFF08\u5FC5\u987B\u5305\u542B active \u548C inactive\uFF09\n *\n * @example\n * icon: {\n * active: { url: \"https://example.com/active-icon.svg\", alt: \"Active Icon\" },\n * inactive: { url: \"https://example.com/inactive-icon.svg\", alt: \"Inactive Icon\" }\n * }\n */\n icon?: StateIcon\n /** \u8BE6\u7EC6\u4FE1\u606F\u5217\u8868 */\n items: {\n /** \u56FE\u6807 (SVG \u5B57\u7B26\u4E32\u6216 URL) */\n icon?: string\n /** \u6587\u672C\u5185\u5BB9 */\n label: string\n }[]\n}\n\n/**\n * EventSchedule \u4E1A\u52A1\u7EC4\u4EF6\u6570\u636E\u63A5\u53E3\n */\nexport interface EventScheduleData {\n /** \u65E5\u7A0B\u5217\u8868 */\n scheduleList: EventScheduleItem[]\n /** \u662F\u5426\u663E\u793A\u65F6\u95F4\u8F74\uFF0C\u9ED8\u8BA4\u4E3A true */\n showTimeline?: boolean\n /** \u4E3B\u9898\u6A21\u5F0F */\n theme?: 'light' | 'dark'\n}\n\nexport interface EventScheduleProps extends React.HTMLAttributes<HTMLDivElement> {\n /** \u4E1A\u52A1\u6570\u636E */\n data: EventScheduleData\n classNames?: Partial<Record<EventScheduleSemanticName, string>>\n}\n\n/**\n * \u83B7\u53D6\u65F6\u95F4\u72B6\u6001\n * @param startDate \u5F00\u59CB\u65E5\u671F\n * @param endDate \u7ED3\u675F\u65E5\u671F\n * @returns \u65F6\u95F4\u72B6\u6001\uFF1Acompleted\uFF08\u5DF2\u5B8C\u6210\uFF09\u3001in-progress\uFF08\u8FDB\u884C\u4E2D\uFF09\u3001not-started\uFF08\u672A\u5F00\u59CB\uFF09\n */\nconst getTimeStatus = (startDate: string, endDate: string): TimeStatus => {\n const now = dayjs()\n const start = dayjs(startDate).startOf('day')\n const end = dayjs(endDate).endOf('day')\n\n // \u5F53\u524D\u65F6\u95F4\u5728\u7ED3\u675F\u65F6\u95F4\u4E4B\u540E - \u5DF2\u5B8C\u6210\n if (now.isAfter(end)) {\n return 'completed'\n }\n\n // \u5F53\u524D\u65F6\u95F4\u5728\u5F00\u59CB\u65F6\u95F4\u4E4B\u524D - \u672A\u5F00\u59CB\n if (now.isBefore(start)) {\n return 'not-started'\n }\n\n // \u5F53\u524D\u65F6\u95F4\u5728\u5F00\u59CB\u548C\u7ED3\u675F\u4E4B\u95F4 - \u8FDB\u884C\u4E2D\n return 'in-progress'\n}\n\n/**\n * \u65F6\u95F4\u8F74\u8FDB\u5EA6\u6761\u6837\u5F0F\u53D8\u4F53\uFF08\u652F\u6301\u4E09\u79CD\u65F6\u95F4\u72B6\u6001\uFF09\n */\nconst timelineProgressActiveVariants = cva('h-1 w-full overflow-hidden', {\n variants: {\n state: {\n // \u8FDB\u884C\u4E2D\n 'in-progress-light': 'bg-[#F6CD4E]',\n 'in-progress-dark': 'bg-[#D79941]',\n // \u672A\u5F00\u59CB\n 'not-started-light': 'bg-[#EAEAEC]',\n 'not-started-dark': 'bg-[#1E2024]',\n // \u5DF2\u5B8C\u6210\n 'completed-light': 'bg-[#F6CD4E]',\n 'completed-dark': 'bg-[#D79941]',\n },\n },\n defaultVariants: {\n state: 'not-started-light',\n },\n})\n\n/**\n * \u65F6\u95F4\u8F74\u8282\u70B9\u6837\u5F0F\u53D8\u4F53\uFF08\u652F\u6301\u4E09\u79CD\u65F6\u95F4\u72B6\u6001\uFF09\n */\nconst timelineNodeActiveVariants = cva('size-4 rounded-full transition-colors', {\n variants: {\n state: {\n // \u8FDB\u884C\u4E2D\n 'in-progress-light': 'bg-[#F6CD4E]',\n 'in-progress-dark': 'bg-[#D79941]',\n // \u672A\u5F00\u59CB\n 'not-started-light': 'bg-[#EAEAEC]',\n 'not-started-dark': 'bg-[#1E2024]',\n // \u5DF2\u5B8C\u6210\uFF08\u4E0E\u8FDB\u884C\u4E2D\u989C\u8272\u4E00\u81F4\uFF09\n 'completed-light': 'bg-[#F6CD4E]',\n 'completed-dark': 'bg-[#D79941]',\n },\n },\n defaultVariants: {\n state: 'not-started-light',\n },\n})\n\n/**\n * \u5361\u7247\u6587\u672C\u6837\u5F0F\u53D8\u4F53\uFF08\u652F\u6301\u4E09\u79CD\u65F6\u95F4\u72B6\u6001\uFF09\n */\nconst cardTextVariants = cva('font-bold leading-[1.2]', {\n variants: {\n state: {\n // \u8FDB\u884C\u4E2D\uFF08\u4FDD\u6301\u539F\u6709\u989C\u8272\uFF09\n 'in-progress-light': 'text-[#080A0F]',\n 'in-progress-dark': 'text-white',\n // \u672A\u5F00\u59CB\uFF0860% \u900F\u660E\u5EA6\uFF09\n 'not-started-light': 'text-[#080A0F]',\n 'not-started-dark': 'text-[#F5F6F7]',\n // \u5DF2\u5B8C\u6210\uFF0860% \u900F\u660E\u5EA6\uFF09\n 'completed-light': 'text-[#4A4C56]/60',\n 'completed-dark': 'text-[#F5F6F7]/60',\n },\n },\n defaultVariants: {\n state: 'not-started-light',\n },\n})\n\n/**\n * \u5361\u7247\u5BB9\u5668\u6837\u5F0F\u53D8\u4F53\uFF08\u652F\u6301\u4E09\u79CD\u65F6\u95F4\u72B6\u6001\uFF09\n */\nconst eventScheduleCardVariants = cva(\n 'laptop:h-[160px] rounded-box relative flex h-[120px] min-w-0 flex-col justify-between gap-2 overflow-hidden',\n {\n variants: {\n state: {\n // \u8FDB\u884C\u4E2D\n 'in-progress-light': 'bg-[#F4E8BC]',\n 'in-progress-dark': 'bg-[#D79941]',\n // \u672A\u5F00\u59CB\n 'not-started-light': 'bg-[#EAEAEC]',\n 'not-started-dark': 'bg-[#1E2024]',\n // \u5DF2\u5B8C\u6210\n 'completed-light': 'bg-[#F4E8BC]',\n 'completed-dark': 'bg-[#D79941]',\n },\n },\n defaultVariants: {\n state: 'not-started-light',\n },\n }\n)\n\n/**\n * \u65F6\u95F4\u8F74\u8282\u70B9\u7EC4\u4EF6 Props\n */\ninterface TimelineNodeProps {\n /** \u65F6\u95F4\u72B6\u6001 */\n timeStatus: TimeStatus\n /** \u4E3B\u9898\u6A21\u5F0F */\n theme?: 'light' | 'dark'\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n /** \u5F53\u524D\u8282\u70B9\u7D22\u5F15 */\n index: number\n /** \u8282\u70B9\u603B\u6570 */\n nodeLength: number\n}\n\n/**\n * \u65F6\u95F4\u8F74\u8282\u70B9\u7EC4\u4EF6\n */\nconst TimelineNode = ({ timeStatus, theme = 'light', className, index, nodeLength }: TimelineNodeProps) => {\n // \u8BA1\u7B97\u7EC4\u5408\u72B6\u6001\n const state = `${timeStatus}-${theme}` as\n | 'in-progress-light'\n | 'in-progress-dark'\n | 'not-started-light'\n | 'not-started-dark'\n | 'completed-light'\n | 'completed-dark'\n\n // \u5224\u65AD\u9996\u5C3E\u4F4D\u7F6E\n const isFirst = index === 0\n const isLast = index === nodeLength - 1\n\n return (\n <div className=\"relative my-2 flex h-1 w-full items-center justify-center\">\n {/* \u8FDB\u5EA6\u6761\u80CC\u666F */}\n <div\n className={cn(\n timelineProgressActiveVariants({ state }),\n isFirst && 'rounded-l-full',\n isLast && 'rounded-r-full',\n className\n )}\n />\n {/* \u65F6\u95F4\u8282\u70B9\u5706\u70B9 */}\n <div className=\"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2\">\n <div className={timelineNodeActiveVariants({ state })} />\n </div>\n </div>\n )\n}\n\n/**\n * \u6839\u636E\u65F6\u95F4\u72B6\u6001\u83B7\u53D6\u5BF9\u5E94\u7684\u56FE\u6807\n * @param icon \u72B6\u6001\u5316\u56FE\u6807\u914D\u7F6E\n * @param timeStatus \u65F6\u95F4\u72B6\u6001\n * @returns \u56FE\u6807 Media \u5BF9\u8C61\n */\nconst getIconByTimeStatus = (icon: StateIcon | undefined, timeStatus: TimeStatus): Media | undefined => {\n if (!icon) return undefined\n // \u8FDB\u884C\u4E2D\u4F7F\u7528 active \u56FE\u6807\n if (timeStatus === 'in-progress') return icon.active\n // \u5DF2\u5B8C\u6210\u4F7F\u7528 completed \u56FE\u6807\uFF08\u5982\u679C\u6709\uFF09\uFF0C\u5426\u5219\u4F7F\u7528 inactive\n if (timeStatus === 'completed') return icon.completed || icon.inactive\n // \u672A\u5F00\u59CB\u4F7F\u7528 inactive \u56FE\u6807\n return icon.inactive\n}\n\n/**\n * \u6D3B\u52A8\u65E5\u7A0B\u5361\u7247\u7EC4\u4EF6\n */\nconst EventScheduleCard = ({\n timeStatus,\n item,\n theme = 'light',\n className,\n scheduleCount,\n}: {\n timeStatus: TimeStatus\n item: EventScheduleItem\n theme?: 'light' | 'dark'\n className?: string\n scheduleCount: number\n}) => {\n const currentIcon = React.useMemo(() => {\n return getIconByTimeStatus(item.icon, timeStatus)\n }, [item.icon, timeStatus])\n\n // \u8BA1\u7B97\u7EC4\u5408\u72B6\u6001\n const cardState = `${timeStatus}-${theme}` as\n | 'in-progress-light'\n | 'in-progress-dark'\n | 'not-started-light'\n | 'not-started-dark'\n | 'completed-light'\n | 'completed-dark'\n\n return (\n <div className={cn(eventScheduleCardVariants({ state: cardState }), className)}>\n {/* \u80CC\u666F\u56FE\u6807 */}\n {currentIcon && (\n <div className=\"laptop:w-[128px] desktop:w-[160px] absolute bottom-0 right-0 z-10 w-[120px]\">\n <Picture source={currentIcon.url} alt={currentIcon.alt} className=\"aspect-square\" />\n </div>\n )}\n {/* \u5185\u5BB9\u533A\u57DF */}\n <div className=\"tablet:px-4 tablet:py-3 desktop:pl-6 desktop:pr-16 relative z-20 flex h-full flex-col justify-between p-4 pr-8\">\n <Heading\n html={item.title}\n className={cn(\n scheduleCount >= 4 ? 'desktop:text-[24px]' : 'desktop:text-[32px]',\n 'laptop:text-[24px] line-clamp-1 text-[20px]',\n cardTextVariants({ state: cardState })\n )}\n />\n {/* \u8BE6\u7EC6\u4FE1\u606F\u5217\u8868 */}\n <div className=\"flex flex-col gap-0.5\">\n {item.items.map((detail, index) => (\n <div key={index} className=\"flex items-center gap-2\">\n {/* \u56FE\u6807 */}\n {detail.icon && (\n <Text\n className={cn('desktop:size-6 size-5 shrink-0', cardTextVariants({ state: cardState }))}\n html={detail.icon}\n />\n )}\n {/* \u6587\u672C */}\n <Text\n html={detail.label}\n className={cn(\n 'lg-desktop:text-[18px] desktop:text-[16px] line-clamp-1 flex-1 text-[14px] leading-[1.4]',\n cardTextVariants({ state: cardState })\n )}\n />\n </div>\n ))}\n </div>\n </div>\n </div>\n )\n}\n\n/**\n * EventSchedule - \u6D3B\u52A8\u65E5\u7A0B\u7EC4\u4EF6\n *\n * @description \u663E\u793A\u6D3B\u52A8\u65E5\u7A0B\u65F6\u95F4\u8F74\u548C\u6D3B\u52A8\u5361\u7247\u5217\u8868\n */\nconst EventSchedule = React.forwardRef<HTMLDivElement, EventScheduleProps>(\n ({ classNames = {}, data, className, ...rest }, ref) => {\n const theme = data.theme || 'light'\n const swiperRef = React.useRef<SwiperType | null>(null)\n const timelineSwiperRef = React.useRef<SwiperType | null>(null)\n const isSyncingRef = React.useRef(false) // \u9632\u6B62\u5FAA\u73AF\u89E6\u53D1\n const itemsPerRow = React.useMemo(() => {\n return data?.scheduleList?.length || 2\n }, [data?.scheduleList])\n\n // \u8BA1\u7B97\u8FDB\u884C\u4E2D item \u7684\u7D22\u5F15\uFF08\u7528\u4E8E\u81EA\u52A8\u6EDA\u52A8\uFF09\n const activeIndex = React.useMemo(() => {\n return data.scheduleList.findIndex(item => {\n const timeStatus = getTimeStatus(item.startDate, item.endDate)\n return timeStatus === 'in-progress'\n })\n }, [data.scheduleList])\n\n /**\n * \u751F\u6210\u7EDF\u4E00\u7684 Swiper \u65AD\u70B9\u914D\u7F6E\n * @param itemsPerRow \u6BCF\u884C\u663E\u793A\u7684\u9879\u76EE\u6570\n * @param withSpaceBetween \u662F\u5426\u5305\u542B\u95F4\u8DDD\u914D\u7F6E\n * @returns Swiper \u65AD\u70B9\u914D\u7F6E\u5BF9\u8C61\n */\n const generateSwiperBreakpoints = React.useCallback((itemsPerRow: number, withSpaceBetween: boolean = false) => {\n // \u6839\u636E itemsPerRow \u786E\u5B9A\u4E0D\u540C\u65AD\u70B9\u4E0B\u7684 slidesPerView\n const getBreakpointConfig = (breakpoint: 'mobile' | 'tablet' | 'laptop' | 'desktop') => {\n switch (breakpoint) {\n case 'mobile':\n return { slidesPerView: 1.17 }\n case 'tablet':\n if (itemsPerRow === 2) return { slidesPerView: 2 }\n return { slidesPerView: 2.4 }\n case 'laptop':\n if (itemsPerRow === 2) return {}\n if (itemsPerRow === 4) return { slidesPerView: 3.2 }\n return { slidesPerView: itemsPerRow }\n case 'desktop':\n if (itemsPerRow === 2) return { slidesPerView: 2 }\n return { slidesPerView: itemsPerRow }\n }\n }\n\n const mobileConfig = getBreakpointConfig('mobile')\n const tabletConfig = getBreakpointConfig('tablet')\n const laptopConfig = getBreakpointConfig('laptop')\n const desktopConfig = getBreakpointConfig('desktop')\n\n // \u5982\u679C\u9700\u8981 spaceBetween\uFF0C\u5219\u6DFB\u52A0\u5230\u914D\u7F6E\u4E2D\n if (withSpaceBetween) {\n return {\n 0: { ...mobileConfig, spaceBetween: 12 },\n 768: { ...tabletConfig, spaceBetween: 12 },\n 1024: { ...laptopConfig, spaceBetween: 16 },\n 1440: { ...desktopConfig, spaceBetween: 16 },\n }\n }\n\n return {\n 0: mobileConfig,\n 768: tabletConfig,\n 1024: laptopConfig,\n 1440: desktopConfig,\n }\n }, [])\n\n // \u6839\u636E itemsPerRow \u914D\u7F6E\u54CD\u5E94\u5F0F\u65AD\u70B9\uFF08\u5361\u7247 Swiper - \u5305\u542B\u95F4\u8DDD\uFF09\n const swiperBreakpoints = React.useMemo(() => {\n return generateSwiperBreakpoints(itemsPerRow, true)\n }, [itemsPerRow, generateSwiperBreakpoints])\n\n // \u65F6\u95F4\u8F74 Swiper \u65AD\u70B9\u914D\u7F6E\uFF08\u4E0D\u5305\u542B\u95F4\u8DDD\uFF09\n const timeNodeSwiperBreakpoints = React.useMemo(() => {\n return generateSwiperBreakpoints(itemsPerRow, false)\n }, [itemsPerRow, generateSwiperBreakpoints])\n\n const showTimeline = data.showTimeline !== false // \u9ED8\u8BA4\u4E3A true\n\n // \u540C\u6B65\u4E24\u4E2A Swiper \u7684\u6ED1\u52A8\n const handleCardSwiperSlideChange = React.useCallback((swiper: SwiperType) => {\n if (isSyncingRef.current || !timelineSwiperRef.current) return\n isSyncingRef.current = true\n timelineSwiperRef.current.slideTo(swiper.activeIndex, swiper.params.speed)\n // \u5EF6\u8FDF\u91CD\u7F6E\u6807\u5FD7\uFF0C\u786E\u4FDD\u540C\u6B65\u5B8C\u6210\n setTimeout(() => {\n isSyncingRef.current = false\n }, 50)\n }, [])\n\n const handleTimelineSwiperSlideChange = React.useCallback((swiper: SwiperType) => {\n if (isSyncingRef.current || !swiperRef.current) return\n isSyncingRef.current = true\n swiperRef.current.slideTo(swiper.activeIndex, swiper.params.speed)\n // \u5EF6\u8FDF\u91CD\u7F6E\u6807\u5FD7\uFF0C\u786E\u4FDD\u540C\u6B65\u5B8C\u6210\n setTimeout(() => {\n isSyncingRef.current = false\n }, 50)\n }, [])\n\n // \u81EA\u52A8\u6EDA\u52A8\u5230 active item\n React.useEffect(() => {\n if (swiperRef.current && timelineSwiperRef.current && activeIndex >= 0) {\n // \u5EF6\u8FDF\u6267\u884C\uFF0C\u786E\u4FDD Swiper \u5DF2\u7ECF\u5B8C\u5168\u521D\u59CB\u5316\n setTimeout(() => {\n isSyncingRef.current = true\n swiperRef.current?.slideTo(activeIndex, 500)\n timelineSwiperRef.current?.slideTo(activeIndex, 500)\n setTimeout(() => {\n isSyncingRef.current = false\n }, 600)\n }, 100)\n }\n }, [activeIndex])\n\n return (\n <Container {...rest} ref={ref} className={cn('overflow-hidden', classNames?.root, className)}>\n {showTimeline && (\n <Swiper\n breakpoints={timeNodeSwiperBreakpoints}\n className=\"h-4 w-full !overflow-visible\"\n onSwiper={swiper => {\n timelineSwiperRef.current = swiper\n }}\n onSlideChange={handleTimelineSwiperSlideChange}\n >\n {data.scheduleList.map((item, index) => {\n const timeStatus = getTimeStatus(item.startDate, item.endDate)\n return (\n <SwiperSlide key={'timelineNode' + index} className=\"\">\n <TimelineNode\n className={classNames?.timeline}\n timeStatus={timeStatus}\n theme={theme}\n index={index}\n nodeLength={data.scheduleList.length}\n />\n </SwiperSlide>\n )\n })}\n </Swiper>\n )}\n <Swiper\n breakpoints={swiperBreakpoints}\n className=\"w-full !overflow-visible\"\n onSwiper={swiper => {\n swiperRef.current = swiper\n }}\n onSlideChange={handleCardSwiperSlideChange}\n >\n {data.scheduleList.map((item, index) => {\n const timeStatus = getTimeStatus(item.startDate, item.endDate)\n return (\n <SwiperSlide key={'SwiperSlideItem' + index}>\n <EventScheduleCard\n timeStatus={timeStatus}\n className={cn(showTimeline ? 'laptop:mt-4 mt-2' : '', classNames?.eventScheduleCard)}\n item={item}\n theme={theme}\n scheduleCount={data.scheduleList.length}\n />\n </SwiperSlide>\n )\n })}\n </Swiper>\n </Container>\n )\n }\n)\n\nEventSchedule.displayName = 'EventSchedule'\nexport default withLayout(EventSchedule)\n\n// \u5BFC\u51FA\u7C7B\u578B\u4F9B\u5916\u90E8\u4F7F\u7528\n// export type { StateIcon, EventScheduleItem, EventScheduleData, EventScheduleProps }\n"],
|
|
5
|
+
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAmOI,IAAAI,EAAA,6BAjOJC,EAAuB,oBACvBC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAAkD,qCAClDC,EAAoC,wBAEpCC,EAAkB,oBAClBC,EAAoB,oCA0EpB,MAAMC,EAAgB,CAACC,EAAmBC,IAAgC,CACxE,MAAMC,KAAM,EAAAC,SAAM,EACZC,KAAQ,EAAAD,SAAMH,CAAS,EAAE,QAAQ,KAAK,EACtCK,KAAM,EAAAF,SAAMF,CAAO,EAAE,MAAM,KAAK,EAGtC,OAAIC,EAAI,QAAQG,CAAG,EACV,YAILH,EAAI,SAASE,CAAK,EACb,cAIF,aACT,EAKME,KAAiC,OAAI,6BAA8B,CACvE,SAAU,CACR,MAAO,CAEL,oBAAqB,eACrB,mBAAoB,eAEpB,oBAAqB,eACrB,mBAAoB,eAEpB,kBAAmB,eACnB,iBAAkB,cACpB,CACF,EACA,gBAAiB,CACf,MAAO,mBACT,CACF,CAAC,EAKKC,KAA6B,OAAI,wCAAyC,CAC9E,SAAU,CACR,MAAO,CAEL,oBAAqB,eACrB,mBAAoB,eAEpB,oBAAqB,eACrB,mBAAoB,eAEpB,kBAAmB,eACnB,iBAAkB,cAC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AAcuB,EAAK,UAAWA,EAAK,OAAO,EAC7D,SACE,OAAC,eACC,mBAACD,EAAA,CACC,WAAYV,EACZ,aAAW,MAAGoC,EAAe,mBAAqB,GAAInB,GAAY,iBAAiB,EACnF,KAAMN,EACN,MAAOV,EACP,cAAeiB,EAAK,aAAa,OACnC,GAPgB,kBAAoBf,CAQtC,CAEJ,CAAC,EACH,GACF,CAEJ,CACF,EAEAa,EAAc,YAAc,gBAC5B,IAAOtC,KAAQ,cAAWsC,CAAa",
|
|
6
|
+
"names": ["EventSchedule_exports", "__export", "EventSchedule_default", "__toCommonJS", "import_jsx_runtime", "React", "import_helpers", "import_Styles", "import_components", "import_react", "import_dayjs", "import_class_variance_authority", "getTimeStatus", "startDate", "endDate", "now", "dayjs", "start", "end", "timelineProgressActiveVariants", "timelineNodeActiveVariants", "cardTextVariants", "eventScheduleCardVariants", "TimelineNode", "timeStatus", "theme", "className", "index", "nodeLength", "state", "isFirst", "isLast", "getIconByTimeStatus", "icon", "EventScheduleCard", "item", "scheduleCount", "currentIcon", "cardState", "detail", "EventSchedule", "classNames", "data", "rest", "ref", "swiperRef", "timelineSwiperRef", "isSyncingRef", "itemsPerRow", "activeIndex", "generateSwiperBreakpoints", "withSpaceBetween", "getBreakpointConfig", "breakpoint", "mobileConfig", "tabletConfig", "laptopConfig", "desktopConfig", "swiperBreakpoints", "timeNodeSwiperBreakpoints", "showTimeline", "handleCardSwiperSlideChange", "swiper", "handleTimelineSwiperSlideChange"]
|
|
7
7
|
}
|