@anker-in/headless-ui 0.0.27-alpha.98 → 0.0.27
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.d.ts +11 -2
- 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/AiuiProvider/index.d.ts +12 -0
- package/dist/cjs/biz-components/AiuiProvider/index.js +2 -0
- package/dist/cjs/biz-components/AiuiProvider/index.js.map +7 -0
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.d.ts +4 -7
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.js +1 -1
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.js.map +3 -3
- package/dist/cjs/biz-components/BrandEquity/types.d.ts +2 -2
- package/dist/cjs/biz-components/BrandEquity/types.js +1 -1
- package/dist/cjs/biz-components/BrandEquity/types.js.map +1 -1
- package/dist/cjs/biz-components/Category/SwiperCategory.d.ts +3 -0
- 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.d.ts +11 -8
- 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.d.ts +14 -9
- 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/Graphic/index.d.ts +7 -8
- 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/GraphicAttractionBlock/index.d.ts +4 -7
- package/dist/cjs/biz-components/GraphicAttractionBlock/index.js +1 -1
- package/dist/cjs/biz-components/GraphicAttractionBlock/index.js.map +2 -2
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.d.ts +4 -7
- 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/types.d.ts +2 -0
- package/dist/cjs/biz-components/HeroBanner/types.js +1 -1
- package/dist/cjs/biz-components/HeroBanner/types.js.map +1 -1
- package/dist/cjs/biz-components/Marquee/Marquee.d.ts +4 -7
- package/dist/cjs/biz-components/Marquee/Marquee.js +1 -1
- package/dist/cjs/biz-components/Marquee/Marquee.js.map +3 -3
- package/dist/cjs/biz-components/MediaPlayerBase/index.d.ts +5 -7
- 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/MediaPlayerBase/types.d.ts +2 -0
- package/dist/cjs/biz-components/MediaPlayerBase/types.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerBase/types.js.map +1 -1
- package/dist/cjs/biz-components/MediaPlayerMulti/index.d.ts +4 -7
- 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/MediaPlayerMulti/types.d.ts +3 -1
- package/dist/cjs/biz-components/MediaPlayerMulti/types.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerMulti/types.js.map +1 -1
- package/dist/cjs/biz-components/MediaPlayerSticky/index.d.ts +7 -7
- package/dist/cjs/biz-components/MediaPlayerSticky/index.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerSticky/index.js.map +3 -3
- package/dist/cjs/biz-components/MediaPlayerSticky/types.d.ts +2 -0
- package/dist/cjs/biz-components/MediaPlayerSticky/types.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerSticky/types.js.map +1 -1
- package/dist/cjs/biz-components/MemberEquity/index.d.ts +5 -7
- package/dist/cjs/biz-components/MemberEquity/index.js +4 -9
- package/dist/cjs/biz-components/MemberEquity/index.js.map +3 -3
- package/dist/cjs/biz-components/MemberEquity/types.d.ts +4 -2
- package/dist/cjs/biz-components/MemberEquity/types.js +1 -1
- package/dist/cjs/biz-components/MemberEquity/types.js.map +1 -1
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +4 -7
- 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/MultiLayoutGraphicBlock/types.d.ts +1 -0
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/types.js +1 -1
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/types.js.map +1 -1
- package/dist/cjs/biz-components/ShelfDisplay/index.d.ts +8 -11
- package/dist/cjs/biz-components/ShelfDisplay/index.js +7 -11
- package/dist/cjs/biz-components/ShelfDisplay/index.js.map +3 -3
- package/dist/cjs/biz-components/ShelfDisplay/tabSwitch.d.ts +9 -0
- package/dist/cjs/biz-components/ShelfDisplay/tabSwitch.js +2 -0
- package/dist/cjs/biz-components/ShelfDisplay/tabSwitch.js.map +7 -0
- package/dist/cjs/biz-components/Slogan/index.d.ts +6 -7
- package/dist/cjs/biz-components/Slogan/index.js +1 -1
- package/dist/cjs/biz-components/Slogan/index.js.map +3 -3
- package/dist/cjs/biz-components/Spacer/index.d.ts +4 -7
- package/dist/cjs/biz-components/Spacer/index.js +1 -1
- package/dist/cjs/biz-components/Spacer/index.js.map +2 -2
- package/dist/cjs/biz-components/SwiperBox/index.js +1 -1
- package/dist/cjs/biz-components/SwiperBox/index.js.map +2 -2
- package/dist/cjs/biz-components/SwiperBox/types.d.ts +2 -0
- package/dist/cjs/biz-components/SwiperBox/types.js +1 -1
- package/dist/cjs/biz-components/SwiperBox/types.js.map +1 -1
- package/dist/cjs/biz-components/Tabs/Tabs.d.ts +4 -7
- package/dist/cjs/biz-components/Title/index.d.ts +4 -7
- package/dist/cjs/biz-components/Title/index.js +1 -1
- package/dist/cjs/biz-components/Title/index.js.map +2 -2
- package/dist/cjs/biz-components/index.d.ts +1 -1
- package/dist/cjs/biz-components/index.js +1 -1
- package/dist/cjs/biz-components/index.js.map +3 -3
- package/dist/cjs/components/avatar.js +1 -1
- package/dist/cjs/components/avatar.js.map +2 -2
- package/dist/cjs/components/badge.js +1 -1
- package/dist/cjs/components/badge.js.map +2 -2
- package/dist/cjs/components/button.d.ts +1 -1
- package/dist/cjs/components/button.js +1 -1
- package/dist/cjs/components/button.js.map +2 -2
- package/dist/cjs/components/container.d.ts +9 -4
- package/dist/cjs/components/container.js +1 -1
- package/dist/cjs/components/container.js.map +3 -3
- package/dist/cjs/components/heading.js +1 -1
- package/dist/cjs/components/heading.js.map +2 -2
- package/dist/cjs/components/link.d.ts +4 -6
- package/dist/cjs/components/link.js +1 -1
- package/dist/cjs/components/link.js.map +3 -3
- package/dist/cjs/components/tabs.js +1 -1
- package/dist/cjs/components/tabs.js.map +2 -2
- package/dist/cjs/components/text.js +1 -1
- package/dist/cjs/components/text.js.map +2 -2
- package/dist/cjs/cpn-components/CpnCountDown/index.js +1 -1
- package/dist/cjs/cpn-components/CpnCountDown/index.js.map +3 -3
- package/dist/cjs/cpn-components/CpnCountDown/types.d.ts +1 -0
- package/dist/cjs/cpn-components/CpnCountDown/types.js +1 -1
- package/dist/cjs/cpn-components/CpnCountDown/types.js.map +1 -1
- package/dist/cjs/hooks/useExposure.d.ts +12 -0
- package/dist/cjs/hooks/useExposure.js +2 -0
- package/dist/cjs/hooks/useExposure.js.map +7 -0
- package/dist/cjs/hooks/useIntersectionObserver.d.ts +17 -0
- package/dist/cjs/hooks/useIntersectionObserver.js +2 -0
- package/dist/cjs/hooks/useIntersectionObserver.js.map +7 -0
- package/dist/cjs/shared/Styles.d.ts +4 -7
- package/dist/cjs/shared/Styles.js +1 -1
- package/dist/cjs/shared/Styles.js.map +3 -3
- package/dist/cjs/shared/mimeType.d.ts +1 -0
- package/dist/cjs/shared/mimeType.js +2 -0
- package/dist/cjs/shared/mimeType.js.map +7 -0
- package/dist/cjs/shared/track.d.ts +1 -0
- package/dist/cjs/shared/track.js +2 -0
- package/dist/cjs/shared/track.js.map +7 -0
- package/dist/cjs/shared/trackUrlRef.d.ts +7 -0
- package/dist/cjs/shared/trackUrlRef.js +2 -0
- package/dist/cjs/shared/trackUrlRef.js.map +7 -0
- package/dist/cjs/stories/HeroBanner.stories.d.ts +4 -7
- package/dist/cjs/stories/MemberEquity.stories.js +2 -2
- package/dist/cjs/stories/MemberEquity.stories.js.map +1 -1
- package/dist/cjs/stories/accordionCards.stories.d.ts +9 -2
- package/dist/cjs/stories/accordionCards.stories.js +1 -1
- package/dist/cjs/stories/accordionCards.stories.js.map +3 -3
- package/dist/cjs/stories/brandEquity.stories.d.ts +4 -7
- package/dist/cjs/stories/brandEquity.stories.js +1 -1
- package/dist/cjs/stories/brandEquity.stories.js.map +1 -1
- package/dist/cjs/stories/button.stories.d.ts +0 -1
- package/dist/cjs/stories/button.stories.js +1 -1
- package/dist/cjs/stories/button.stories.js.map +2 -2
- package/dist/cjs/stories/category.stories.d.ts +4 -7
- package/dist/cjs/stories/container.stories.d.ts +4 -2
- package/dist/cjs/stories/evaluate.stories.d.ts +4 -7
- package/dist/cjs/stories/graphic.stories.d.ts +10 -11
- package/dist/cjs/stories/heading.stories.js +2 -2
- package/dist/cjs/stories/heading.stories.js.map +2 -2
- package/dist/cjs/stories/link.stories.d.ts +3 -16
- package/dist/cjs/stories/link.stories.js +1 -1
- package/dist/cjs/stories/link.stories.js.map +2 -2
- package/dist/cjs/stories/marquee.stories.d.ts +4 -7
- package/dist/cjs/stories/mediaplayerMulti.stories.d.ts +4 -7
- package/dist/cjs/stories/shelfDisplay.stories.d.ts +4 -7
- package/dist/cjs/stories/slogan.stories.d.ts +4 -8
- package/dist/cjs/stories/slogan.stories.js +2 -22
- package/dist/cjs/stories/slogan.stories.js.map +3 -3
- package/dist/cjs/types/props.d.ts +10 -0
- package/dist/cjs/types/props.js +1 -1
- package/dist/cjs/types/props.js.map +1 -1
- package/dist/esm/biz-components/AccordionCards/index.d.ts +11 -2
- 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/AiuiProvider/index.d.ts +12 -0
- package/dist/esm/biz-components/AiuiProvider/index.js +2 -0
- package/dist/esm/biz-components/AiuiProvider/index.js.map +7 -0
- package/dist/esm/biz-components/BrandEquity/BrandEquity.d.ts +4 -7
- package/dist/esm/biz-components/BrandEquity/BrandEquity.js +1 -1
- package/dist/esm/biz-components/BrandEquity/BrandEquity.js.map +3 -3
- package/dist/esm/biz-components/BrandEquity/types.d.ts +2 -2
- package/dist/esm/biz-components/Category/SwiperCategory.d.ts +3 -0
- 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.d.ts +11 -8
- 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.d.ts +14 -9
- 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/Graphic/index.d.ts +7 -8
- 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/GraphicAttractionBlock/index.d.ts +4 -7
- package/dist/esm/biz-components/GraphicAttractionBlock/index.js +1 -1
- package/dist/esm/biz-components/GraphicAttractionBlock/index.js.map +2 -2
- package/dist/esm/biz-components/HeroBanner/HeroBanner.d.ts +4 -7
- 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/types.d.ts +2 -0
- package/dist/esm/biz-components/Marquee/Marquee.d.ts +4 -7
- package/dist/esm/biz-components/Marquee/Marquee.js +1 -1
- package/dist/esm/biz-components/Marquee/Marquee.js.map +3 -3
- package/dist/esm/biz-components/MediaPlayerBase/index.d.ts +5 -7
- 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/MediaPlayerBase/types.d.ts +2 -0
- package/dist/esm/biz-components/MediaPlayerMulti/index.d.ts +4 -7
- 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/MediaPlayerMulti/types.d.ts +3 -1
- package/dist/esm/biz-components/MediaPlayerSticky/index.d.ts +7 -7
- package/dist/esm/biz-components/MediaPlayerSticky/index.js +1 -1
- package/dist/esm/biz-components/MediaPlayerSticky/index.js.map +3 -3
- package/dist/esm/biz-components/MediaPlayerSticky/types.d.ts +2 -0
- package/dist/esm/biz-components/MemberEquity/index.d.ts +5 -7
- package/dist/esm/biz-components/MemberEquity/index.js +4 -9
- package/dist/esm/biz-components/MemberEquity/index.js.map +3 -3
- package/dist/esm/biz-components/MemberEquity/types.d.ts +4 -2
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +4 -7
- 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/MultiLayoutGraphicBlock/types.d.ts +1 -0
- package/dist/esm/biz-components/ShelfDisplay/index.d.ts +8 -11
- package/dist/esm/biz-components/ShelfDisplay/index.js +7 -11
- package/dist/esm/biz-components/ShelfDisplay/index.js.map +3 -3
- package/dist/esm/biz-components/ShelfDisplay/tabSwitch.d.ts +9 -0
- package/dist/esm/biz-components/ShelfDisplay/tabSwitch.js +2 -0
- package/dist/esm/biz-components/ShelfDisplay/tabSwitch.js.map +7 -0
- package/dist/esm/biz-components/Slogan/index.d.ts +6 -7
- package/dist/esm/biz-components/Slogan/index.js +1 -1
- package/dist/esm/biz-components/Slogan/index.js.map +3 -3
- package/dist/esm/biz-components/Spacer/index.d.ts +4 -7
- package/dist/esm/biz-components/Spacer/index.js +1 -1
- package/dist/esm/biz-components/Spacer/index.js.map +2 -2
- package/dist/esm/biz-components/SwiperBox/index.js +1 -1
- package/dist/esm/biz-components/SwiperBox/index.js.map +2 -2
- package/dist/esm/biz-components/SwiperBox/types.d.ts +2 -0
- package/dist/esm/biz-components/SwiperBox/types.js.map +1 -1
- package/dist/esm/biz-components/Tabs/Tabs.d.ts +4 -7
- package/dist/esm/biz-components/Title/index.d.ts +4 -7
- package/dist/esm/biz-components/Title/index.js +1 -1
- package/dist/esm/biz-components/Title/index.js.map +2 -2
- package/dist/esm/biz-components/index.d.ts +1 -1
- package/dist/esm/biz-components/index.js +1 -1
- package/dist/esm/biz-components/index.js.map +2 -2
- package/dist/esm/components/avatar.js +1 -1
- package/dist/esm/components/avatar.js.map +2 -2
- package/dist/esm/components/badge.js +1 -1
- package/dist/esm/components/badge.js.map +2 -2
- package/dist/esm/components/button.d.ts +1 -1
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/button.js.map +2 -2
- package/dist/esm/components/container.d.ts +9 -4
- package/dist/esm/components/container.js +1 -1
- package/dist/esm/components/container.js.map +3 -3
- package/dist/esm/components/heading.js +1 -1
- package/dist/esm/components/heading.js.map +2 -2
- package/dist/esm/components/link.d.ts +4 -6
- package/dist/esm/components/link.js +1 -1
- package/dist/esm/components/link.js.map +3 -3
- package/dist/esm/components/tabs.js +1 -1
- package/dist/esm/components/tabs.js.map +2 -2
- package/dist/esm/components/text.js +1 -1
- package/dist/esm/components/text.js.map +2 -2
- package/dist/esm/cpn-components/CpnCountDown/index.js +1 -1
- package/dist/esm/cpn-components/CpnCountDown/index.js.map +3 -3
- package/dist/esm/cpn-components/CpnCountDown/types.d.ts +1 -0
- package/dist/esm/hooks/useExposure.d.ts +12 -0
- package/dist/esm/hooks/useExposure.js +2 -0
- package/dist/esm/hooks/useExposure.js.map +7 -0
- package/dist/esm/hooks/useIntersectionObserver.d.ts +17 -0
- package/dist/esm/hooks/useIntersectionObserver.js +2 -0
- package/dist/esm/hooks/useIntersectionObserver.js.map +7 -0
- package/dist/esm/shared/Styles.d.ts +4 -7
- package/dist/esm/shared/Styles.js +1 -1
- package/dist/esm/shared/Styles.js.map +3 -3
- package/dist/esm/shared/mimeType.d.ts +1 -0
- package/dist/esm/shared/mimeType.js +2 -0
- package/dist/esm/shared/mimeType.js.map +7 -0
- package/dist/esm/shared/track.d.ts +1 -0
- package/dist/esm/shared/track.js +2 -0
- package/dist/esm/shared/track.js.map +7 -0
- package/dist/esm/shared/trackUrlRef.d.ts +7 -0
- package/dist/esm/shared/trackUrlRef.js +2 -0
- package/dist/esm/shared/trackUrlRef.js.map +7 -0
- package/dist/esm/stories/HeroBanner.stories.d.ts +4 -7
- package/dist/esm/stories/MemberEquity.stories.js +1 -1
- package/dist/esm/stories/MemberEquity.stories.js.map +1 -1
- package/dist/esm/stories/accordionCards.stories.d.ts +9 -2
- package/dist/esm/stories/accordionCards.stories.js +1 -1
- package/dist/esm/stories/accordionCards.stories.js.map +2 -2
- package/dist/esm/stories/brandEquity.stories.d.ts +4 -7
- package/dist/esm/stories/brandEquity.stories.js +1 -1
- package/dist/esm/stories/brandEquity.stories.js.map +1 -1
- package/dist/esm/stories/button.stories.d.ts +0 -1
- package/dist/esm/stories/button.stories.js +1 -1
- package/dist/esm/stories/button.stories.js.map +2 -2
- package/dist/esm/stories/category.stories.d.ts +4 -7
- package/dist/esm/stories/container.stories.d.ts +4 -2
- package/dist/esm/stories/evaluate.stories.d.ts +4 -7
- package/dist/esm/stories/graphic.stories.d.ts +10 -11
- package/dist/esm/stories/heading.stories.js +2 -2
- package/dist/esm/stories/heading.stories.js.map +2 -2
- package/dist/esm/stories/link.stories.d.ts +3 -16
- package/dist/esm/stories/link.stories.js +1 -1
- package/dist/esm/stories/link.stories.js.map +2 -2
- package/dist/esm/stories/marquee.stories.d.ts +4 -7
- package/dist/esm/stories/mediaplayerMulti.stories.d.ts +4 -7
- package/dist/esm/stories/shelfDisplay.stories.d.ts +4 -7
- package/dist/esm/stories/slogan.stories.d.ts +4 -8
- package/dist/esm/stories/slogan.stories.js +3 -23
- package/dist/esm/stories/slogan.stories.js.map +2 -2
- package/dist/esm/types/props.d.ts +10 -0
- package/dist/tokens/anker.css +0 -13
- package/dist/tokens/base.css +21 -20
- package/dist/tokens/eufy.css +0 -3
- package/dist/tokens/solix.css +3 -3
- package/dist/tokens/soundcore.css +0 -5
- package/package.json +3 -2
- package/style.css +122 -77
- package/tailwind.config.js +2 -67
- package/dist/cjs/biz-components/SectionHeading/SectionHeading.d.ts +0 -4
- package/dist/cjs/biz-components/SectionHeading/SectionHeading.js +0 -2
- package/dist/cjs/biz-components/SectionHeading/SectionHeading.js.map +0 -7
- package/dist/cjs/biz-components/SectionHeading/index.d.ts +0 -0
- package/dist/cjs/biz-components/SectionHeading/index.js +0 -2
- package/dist/cjs/biz-components/SectionHeading/index.js.map +0 -7
- package/dist/cjs/biz-components/SectionHeading/types.d.ts +0 -6
- package/dist/cjs/biz-components/SectionHeading/types.js +0 -2
- package/dist/cjs/biz-components/SectionHeading/types.js.map +0 -7
- package/dist/cjs/biz-components/Shelf/Shelf.d.ts +0 -9
- package/dist/cjs/biz-components/Shelf/Shelf.js +0 -2
- package/dist/cjs/biz-components/Shelf/Shelf.js.map +0 -7
- package/dist/cjs/biz-components/Shelf/index.d.ts +0 -1
- package/dist/cjs/biz-components/Shelf/index.js +0 -2
- package/dist/cjs/biz-components/Shelf/index.js.map +0 -7
- package/dist/cjs/biz-components/Shelf/types.d.ts +0 -6
- package/dist/cjs/biz-components/Shelf/types.js +0 -2
- package/dist/cjs/biz-components/Shelf/types.js.map +0 -7
- package/dist/cjs/helpers/GloablContext.d.ts +0 -10
- package/dist/cjs/helpers/GloablContext.js +0 -2
- package/dist/cjs/helpers/GloablContext.js.map +0 -7
- package/dist/cjs/hooks/useMergeRefs.d.ts +0 -4
- package/dist/cjs/stories/shelf.stories.d.ts +0 -18
- package/dist/cjs/stories/shelf.stories.js +0 -2
- package/dist/cjs/stories/shelf.stories.js.map +0 -7
- package/dist/cjs/tsconfig.tsbuildinfo +0 -1
- package/dist/cjs/types/libs.d.js +0 -2
- package/dist/cjs/types/libs.d.js.map +0 -7
- package/dist/esm/biz-components/SectionHeading/SectionHeading.d.ts +0 -4
- package/dist/esm/biz-components/SectionHeading/SectionHeading.js +0 -2
- package/dist/esm/biz-components/SectionHeading/SectionHeading.js.map +0 -7
- package/dist/esm/biz-components/SectionHeading/index.d.ts +0 -0
- package/dist/esm/biz-components/SectionHeading/index.js +0 -2
- package/dist/esm/biz-components/SectionHeading/index.js.map +0 -7
- package/dist/esm/biz-components/SectionHeading/types.d.ts +0 -6
- package/dist/esm/biz-components/SectionHeading/types.js +0 -2
- package/dist/esm/biz-components/SectionHeading/types.js.map +0 -7
- package/dist/esm/biz-components/Shelf/Shelf.d.ts +0 -9
- package/dist/esm/biz-components/Shelf/Shelf.js +0 -2
- package/dist/esm/biz-components/Shelf/Shelf.js.map +0 -7
- package/dist/esm/biz-components/Shelf/index.d.ts +0 -1
- package/dist/esm/biz-components/Shelf/index.js +0 -2
- package/dist/esm/biz-components/Shelf/index.js.map +0 -7
- package/dist/esm/biz-components/Shelf/types.d.ts +0 -6
- package/dist/esm/biz-components/Shelf/types.js +0 -1
- package/dist/esm/biz-components/Shelf/types.js.map +0 -7
- package/dist/esm/helpers/GloablContext.d.ts +0 -10
- package/dist/esm/helpers/GloablContext.js +0 -2
- package/dist/esm/helpers/GloablContext.js.map +0 -7
- package/dist/esm/hooks/useMergeRefs.d.ts +0 -4
- package/dist/esm/stories/shelf.stories.d.ts +0 -18
- package/dist/esm/stories/shelf.stories.js +0 -2
- package/dist/esm/stories/shelf.stories.js.map +0 -7
- package/dist/esm/tsconfig.tsbuildinfo +0 -1
- package/dist/esm/types/libs.d.js +0 -2
- package/dist/esm/types/libs.d.js.map +0 -7
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
export interface ShelfDisplayItem {
|
|
2
3
|
id?: string;
|
|
3
4
|
/** 产品图片*/
|
|
@@ -18,8 +19,8 @@ export interface ShelfDisplayItem {
|
|
|
18
19
|
data?: ShelfDisplayItem[];
|
|
19
20
|
}
|
|
20
21
|
type EventType = {
|
|
21
|
-
primaryButton?: (v: any) => void;
|
|
22
|
-
secondaryButton?: (v: any) => void;
|
|
22
|
+
primaryButton?: (v: any, index: number) => void;
|
|
23
|
+
secondaryButton?: (v: any, index: number) => void;
|
|
23
24
|
};
|
|
24
25
|
export interface ShelfDisplayProps {
|
|
25
26
|
data: {
|
|
@@ -39,6 +40,7 @@ export interface ShelfDisplayProps {
|
|
|
39
40
|
primaryButton?: string;
|
|
40
41
|
/** 副按钮配置 */
|
|
41
42
|
secondaryButton?: string;
|
|
43
|
+
theme?: 'light' | 'dark';
|
|
42
44
|
};
|
|
43
45
|
buildData?: {
|
|
44
46
|
categories: any[];
|
|
@@ -46,16 +48,11 @@ export interface ShelfDisplayProps {
|
|
|
46
48
|
};
|
|
47
49
|
/** 按钮事件*/
|
|
48
50
|
event?: EventType;
|
|
49
|
-
/** 主题色*/
|
|
50
|
-
theme?: 'light' | 'dark';
|
|
51
51
|
className?: string;
|
|
52
52
|
key?: string;
|
|
53
53
|
}
|
|
54
|
-
declare const _default: {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
59
|
-
displayName: string;
|
|
60
|
-
};
|
|
54
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<Omit<ShelfDisplayProps & React.RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps> & {
|
|
55
|
+
className?: string;
|
|
56
|
+
data?: Record<string, any>;
|
|
57
|
+
}, "ref"> & React.RefAttributes<any>>;
|
|
61
58
|
export default _default;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as c}from"react/jsx-runtime";import{useState as
|
|
2
|
-
laptop:text-sm
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
border-[#1D1D1F] bg-[#1D1D1F] px-4 py-2 text-xs tracking-[-0.04em] text-white
|
|
9
|
-
${r?.shape==="round"?"desktop:rounded-3xl rounded-[20px]":""}
|
|
10
|
-
${r.direction==="vertical"?"w-full":""}
|
|
11
|
-
`,children:r?.secondaryButton||""})]})]},e?.id||e?.handle)},z=({data:e,buildData:r,className:m="",key:u,event:b})=>{const[f,d]=k(""),[s,o]=k([]),y=$({query:"(max-width: 768px)"}),{productsTab:l=[],productsCard:w=[],title:h,align:S="left",isShowTab:v=!0,tabShape:B="square",...N}=e,x=a=>{const n=a?.map(i=>{const g=r?.products?.find(T=>T?.handle===i?.handle);if(g)return{sku:i.sku,...g}})?.filter(i=>i);o(n)};return F(()=>{if(v){d(l?.[0]?.tab||""),x(l?.[0]?.data||[]);return}x(w)},[]),c("div",{className:p("w-full",m),children:[h&&t(V,{data:{title:h}}),v&&t("div",{className:`${y?"w-full overflow-hidden":""}`,children:t(P,{shape:B,align:S,value:f,onValueChange:a=>{d(a);const n=l?.find(i=>i?.tab===a);x(n?.data||[])},className:"mb-8",children:t(I,{children:l?.map((a,n)=>t(M,{value:a?.tab||"",children:a?.tab},n))})})}),t(E,{className:"!overflow-visible",id:"ShelfDisplay"+u,data:{list:s,configuration:{...N,event:b}},Slide:j,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.1},768:{spaceBetween:16,freeMode:!1,slidesPerView:2},1024:{spaceBetween:16,freeMode:!1,slidesPerView:3},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}})]})};var X=q(z);export{X as default};
|
|
1
|
+
"use client";import{Fragment as G,jsx as t,jsxs as c}from"react/jsx-runtime";import _,{useState as S,useEffect as M,useRef as E,useImperativeHandle as V}from"react";import{cn as m}from"../../helpers/utils.js";import q from"../../components/picture.js";import H from"./tabSwitch.js";import N from"../../components/button.js";import R from"../Title/index.js";import $ from"../SwiperBox/index.js";import{withStyles as A}from"../../shared/Styles.js";import{formatVariantPrice as L}from"./shelfDisplay.js";import{useMediaQuery as O}from"react-responsive";import{useExposure as U}from"../../hooks/useExposure.js";import{gaTrack as z}from"../../shared/track.js";import{useAiuiContext as j}from"../AiuiProvider/index.js";const T="image",B="product_shelf",F=999999999e-2,Q=({data:e,configuration:i})=>{const{locale:d="us",copyWriting:u}=j(),f=(r,n)=>i?.event?.primaryButton?.(r,n+1),x=(r,n)=>i?.event?.secondaryButton?.(r,n+1),o=e?.variants?.find(r=>r?.sku===e?.sku)||e?.variants?.[0]||{},s=!o?.availableForSale&&o?.price?.amount===F,{price:b,basePrice:v}=L({locale:d,amount:o?.price?.amount||0,baseAmount:e?.compareAtPrice?.amount||e?.price?.amount||0,currencyCode:e?.price?.currencyCode||"USD"}),y=()=>{const r=e?.sku,n=e?.variants;return n?.find(l=>l?.sku===r)?.image?.url||n?.[0]?.image?.url||""};return c("div",{className:m("laptop:pt-4 laptop:px-6 laptop:pb-6 bg-container-secondary-1 hover:bg-info-white flex size-full cursor-pointer flex-col overflow-hidden p-4 duration-300",i?.itemShape==="round"?"rounded-2xl":"rounded-none"),children:[t("div",{className:m("lg-desktop:mb-3 lg-desktop:h-[195px] relative mb-2 inline-block h-[140px] overflow-hidden"),children:t(q,{source:y(),className:"flex h-full justify-center object-cover [&_img]:w-auto"})}),t("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:e?.tags?.slice(0,1)?.map?.((r,n)=>t("div",{className:"tablet:text-base border-info-secondary text-info-primary box-border h-full rounded-2xl border-2 px-2 pt-1 text-sm font-bold",children:r},n))}),t("p",{title:e?.title||"",className:"desktop:text-2xl desktop:leading-7 text-info-primary line-clamp-2 flex-1 text-xl font-bold",children:e?.title||""}),t("h3",{title:e?.description||"",className:"tablet:mt-2 tablet:mb-3 desktop:text-lg text-info-primary mb-2 mt-1 h-6 truncate text-sm font-semibold",children:e?.description||""}),t("div",{className:"mb-2 flex items-center",children:s?t("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:u?.soldOutText}):c(G,{children:[t("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:b||""}),t("div",{className:"tablet:text-2xl text-info-secondary ml-1 text-xl font-bold",children:v||""})]})}),c("div",{className:m("flex items-center gap-3",i.direction==="vertical"?"flex-col":""),children:[t(N,{variant:"primary",onClick:()=>f(e,i?.index),className:`
|
|
2
|
+
laptop:text-sm desktop:text-base text-xs
|
|
3
|
+
${i.direction==="vertical"?"w-full":""}
|
|
4
|
+
`,children:i?.primaryButton||""}),t(N,{variant:"secondary",onClick:()=>x(e,i?.index),className:`
|
|
5
|
+
laptop:text-sm desktop:text-base text-xs
|
|
6
|
+
${i.direction==="vertical"?"w-full":""}
|
|
7
|
+
`,children:i?.secondaryButton||""})]})]},e?.id||e?.handle)},W=_.forwardRef(({data:e,buildData:i,className:d="",key:u,event:f},x)=>{const[o,s]=S(""),[b,v]=S([]),y=O({query:"(max-width: 768px)"}),r=E(null);V(x,()=>r.current),U(r,{componentType:T,componentName:B,componentTitle:e?.title,navigation:o});const{productsTab:n=[],productsCard:g=[],title:l,align:J="left",isShowTab:k=!0,tabShape:D="square",...P}=e,h=a=>{const I=a?.map(p=>{const w=i?.products?.find(C=>C?.handle===p?.handle);if(w)return{sku:p.sku,...w}})?.filter(p=>p);v(I)};return M(()=>{if(k){s(n?.[0]?.tab||""),h(n?.[0]?.data||[]);return}h(g)},[]),c("div",{ref:r,className:m("w-full",d,{"aiui-dark":e?.theme==="dark"}),children:[l&&t(R,{data:{title:l}}),k&&t("div",{className:`${y?"w-full overflow-hidden":""}`,children:t(H,{value:o,tabs:n,tabShape:D,onTabClick:a=>{s(a?.tab),h(a?.data||[]),z({event:"ga4Event",event_name:"component_click",event_parameters:{page_group:"Home Page",component_type:T,component_name:B,component_title:e?.title,component_position:1,navigation:a?.tab}})}})}),t("div",{className:"tablet:min-h-[393px] laptop:min-h-[425px] desktop:min-h-[405px] lg-desktop:min-h-[409px]",children:t($,{className:"mt-6 !overflow-visible",id:`ShelfDisplay${u}${o}`,data:{list:b,configuration:{...P,event:f}},Slide:Q,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.1},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:3},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}})})]})});var pe=A(W);export{pe as default};
|
|
12
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/ShelfDisplay/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useState, useEffect } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport
|
|
5
|
-
"mappings": "aA+
|
|
6
|
-
"names": ["jsx", "jsxs", "useState", "useEffect", "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useState, useEffect, useRef, useImperativeHandle } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport TabSwitch from './tabSwitch.js'\nimport Button from '../../components/button.js'\nimport Title from '../Title/index.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport { formatVariantPrice } from './shelfDisplay.js'\nimport { useMediaQuery } from 'react-responsive'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { gaTrack } from '../../shared/track.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\n\nconst componentType = 'image'\nconst componentName = 'product_shelf'\n\nconst SOLD_OUT_PRICE = 9999999.99\n\nexport interface ShelfDisplayItem {\n id?: string\n /** \u4EA7\u54C1\u56FE\u7247*/\n img?: {\n url: string\n }\n handle?: string\n sku?: string\n /** \u6298\u6263\u540E\u4EF7\u683C*/\n price?: string\n title?: string\n /** \u6298\u6263\u524D\u4EF7\u683C*/\n basePrice?: string\n subTitle?: string\n /** \u6807\u7B7E*/\n tagItems?: string[]\n tab?: string\n data?: ShelfDisplayItem[]\n}\n\ntype EventType = {\n primaryButton?: (v: any, index: number) => void\n secondaryButton?: (v: any, index: number) => void\n}\n\nexport interface ShelfDisplayProps {\n data: {\n title?: string\n isShowTab?: boolean\n direction?: 'horizontal' | 'vertical'\n align?: 'left' | 'center' | 'right'\n productsTab?: any\n productsCard?: any\n /** \u5361\u7247\u5F62\u72B6 */\n itemShape?: 'round' | 'square'\n /** \u6309\u94AE\u5F62\u72B6 */\n shape?: 'round' | 'square'\n /** \u6807\u7B7E\u9875\u5F62\u72B6*/\n tabShape?: 'rounded' | 'square'\n /** \u4E3B\u6309\u94AE\u914D\u7F6E */\n primaryButton?: string\n /** \u526F\u6309\u94AE\u914D\u7F6E */\n secondaryButton?: string\n theme?: 'light' | 'dark'\n }\n buildData?: {\n categories: any[]\n products: any[]\n }\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: EventType\n className?: string\n key?: string\n}\n\nconst ShelfDisplayItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const { locale = 'us', copyWriting } = useAiuiContext()\n\n const onPrimaryButton = (params: ShelfDisplayItem, index: number) =>\n configuration?.event?.primaryButton?.(params, index + 1)\n\n const onSecondaryButton = (params: ShelfDisplayItem, index: number) =>\n configuration?.event?.secondaryButton?.(params, index + 1)\n\n const variant = data?.variants?.find((item: any) => item?.sku === data?.sku) || data?.variants?.[0] || {}\n\n const isSoldOut = !variant?.availableForSale && variant?.price?.amount === SOLD_OUT_PRICE\n\n const { price, basePrice } = formatVariantPrice({\n locale: locale,\n amount: variant?.price?.amount || 0,\n baseAmount: data?.compareAtPrice?.amount || data?.price?.amount || 0,\n currencyCode: data?.price?.currencyCode || 'USD',\n })\n\n const handleUrl = () => {\n const sku = data?.sku\n const skuArray = data?.variants\n const findSku = skuArray?.find((item: any) => item?.sku === sku)\n return findSku?.image?.url || skuArray?.[0]?.image?.url || ''\n }\n\n return (\n <div\n key={data?.id || data?.handle}\n className={cn(\n 'laptop:pt-4 laptop:px-6 laptop:pb-6 bg-container-secondary-1 hover:bg-info-white flex size-full cursor-pointer flex-col overflow-hidden p-4 duration-300',\n configuration?.itemShape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <div className={cn('lg-desktop:mb-3 lg-desktop:h-[195px] relative mb-2 inline-block h-[140px] overflow-hidden')}>\n <Picture source={handleUrl()} className=\"flex h-full justify-center object-cover [&_img]:w-auto\" />\n </div>\n <div className=\"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden\">\n {data?.tags?.slice(0, 1)?.map?.((item: any, index: number) => {\n return (\n <div\n key={index}\n className=\"tablet:text-base border-info-secondary text-info-primary box-border h-full rounded-2xl border-2 px-2 pt-1 text-sm font-bold\"\n >\n {item}\n </div>\n )\n })}\n </div>\n <p\n title={data?.title || ''}\n className=\"desktop:text-2xl desktop:leading-7 text-info-primary line-clamp-2 flex-1 text-xl font-bold\"\n >\n {data?.title || ''}\n </p>\n <h3\n title={data?.description || ''}\n className=\"tablet:mt-2 tablet:mb-3 desktop:text-lg text-info-primary mb-2 mt-1 h-6 truncate text-sm font-semibold\"\n >\n {data?.description || ''}\n </h3>\n <div className=\"mb-2 flex items-center\">\n {isSoldOut ? (\n <div className=\"tablet:text-2xl text-info-primary text-xl font-bold\">{copyWriting?.soldOutText}</div>\n ) : (\n <>\n <div className=\"tablet:text-2xl text-info-primary text-xl font-bold\">{price || ''}</div>\n <div className=\"tablet:text-2xl text-info-secondary ml-1 text-xl font-bold\">{basePrice || ''}</div>\n </>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div className={cn('flex items-center gap-3', configuration.direction === 'vertical' ? 'flex-col' : '')}>\n <Button\n variant=\"primary\"\n onClick={() => onPrimaryButton(data, configuration?.index)}\n className={`\n laptop:text-sm desktop:text-base text-xs\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.primaryButton || ''}\n </Button>\n <Button\n variant=\"secondary\"\n onClick={() => onSecondaryButton(data, configuration?.index)}\n className={`\n laptop:text-sm desktop:text-base text-xs\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n </div>\n </div>\n )\n}\n\nconst ShelfDisplay = React.forwardRef<HTMLDivElement, ShelfDisplayProps>(\n ({ data, buildData, className = '', key, event }, ref) => {\n const [tabId, setTabId] = useState<string>('')\n const [currentItems, setCurrentItems] = useState<ShelfDisplayItem[]>([])\n\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n\n const innerRef = useRef<HTMLDivElement>(null)\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n useExposure(innerRef, {\n componentType: componentType,\n componentName: componentName,\n componentTitle: data?.title,\n navigation: tabId,\n })\n\n const {\n productsTab = [],\n productsCard = [],\n title,\n align = 'left',\n isShowTab = true,\n tabShape = 'square',\n ...other\n } = data\n\n const handleCurrentTab = (currentData: ShelfDisplayItem[]) => {\n const newCurrentData = currentData\n ?.map(item => {\n const findData = buildData?.products?.find(params => params?.handle === item?.handle)\n if (findData) {\n return {\n sku: item.sku,\n ...findData,\n }\n }\n })\n ?.filter(item => item)\n setCurrentItems(newCurrentData)\n }\n\n useEffect(() => {\n if (isShowTab) {\n setTabId(productsTab?.[0]?.tab || '')\n handleCurrentTab(productsTab?.[0]?.data || [])\n return\n }\n handleCurrentTab(productsCard)\n }, [])\n\n return (\n <div ref={innerRef} className={cn('w-full', className, { 'aiui-dark': data?.theme === 'dark' })}>\n {title && <Title data={{ title: title }} />}\n {isShowTab && (\n <div className={`${isMobile ? 'w-full overflow-hidden' : ''}`}>\n <TabSwitch\n value={tabId}\n tabs={productsTab}\n tabShape={tabShape}\n onTabClick={v => {\n setTabId(v?.tab)\n handleCurrentTab(v?.data || [])\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_click',\n event_parameters: {\n page_group: 'Home Page',\n component_type: componentType,\n component_name: componentName,\n component_title: data?.title,\n component_position: 1,\n navigation: v?.tab,\n },\n })\n }}\n />\n </div>\n )}\n <div className=\"tablet:min-h-[393px] laptop:min-h-[425px] desktop:min-h-[405px] lg-desktop:min-h-[409px]\">\n <SwiperBox\n className=\"mt-6 !overflow-visible\"\n id={`ShelfDisplay${key}${tabId}`}\n data={{ list: currentItems, configuration: { ...other, event: event } }}\n Slide={ShelfDisplayItem}\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.1,\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 </div>\n )\n }\n)\n\nexport default withStyles(ShelfDisplay)\n"],
|
|
5
|
+
"mappings": "aA+GQ,OA8BE,YAAAA,EA9BF,OAAAC,EA8BE,QAAAC,MA9BF,oBA9GR,OAAOC,GAAS,YAAAC,EAAU,aAAAC,EAAW,UAAAC,EAAQ,uBAAAC,MAA2B,QACxE,OAAS,MAAAC,MAAU,yBACnB,OAAOC,MAAa,8BACpB,OAAOC,MAAe,iBACtB,OAAOC,MAAY,6BACnB,OAAOC,MAAW,oBAClB,OAAOC,MAAe,wBACtB,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,sBAAAC,MAA0B,oBACnC,OA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Q,CAAC,CAAC,EAC9B7C,EAAQ,CACN,MAAO,WACP,WAAY,kBACZ,iBAAkB,CAChB,WAAY,YACZ,eAAgBE,EAChB,eAAgBC,EAChB,gBAAiBG,GAAM,MACvB,mBAAoB,EACpB,WAAYuC,GAAG,GACjB,CACF,CAAC,CACH,EACF,EACF,EAEF9D,EAAC,OAAI,UAAU,2FACb,SAAAA,EAACY,EAAA,CACC,UAAU,yBACV,GAAI,eAAe8B,CAAG,GAAGG,CAAK,GAC9B,KAAM,CAAE,KAAME,EAAc,cAAe,CAAE,GAAGU,EAAO,MAAOd,CAAM,CAAE,EACtE,MAAOrB,EACP,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,CACjB,CACF,EACF,EACF,GACF,CAEJ,CACF,EAEA,IAAOyC,GAAQlD,EAAW0B,CAAY",
|
|
6
|
+
"names": ["Fragment", "jsx", "jsxs", "React", "useState", "useEffect", "useRef", "useImperativeHandle", "cn", "Picture", "TabSwitch", "Button", "Title", "SwiperBox", "withStyles", "formatVariantPrice", "useMediaQuery", "useExposure", "gaTrack", "useAiuiContext", "componentType", "componentName", "SOLD_OUT_PRICE", "ShelfDisplayItem", "data", "configuration", "locale", "copyWriting", "onPrimaryButton", "params", "index", "onSecondaryButton", "variant", "item", "isSoldOut", "price", "basePrice", "handleUrl", "sku", "skuArray", "ShelfDisplay", "buildData", "className", "key", "event", "ref", "tabId", "setTabId", "currentItems", "setCurrentItems", "isMobile", "innerRef", "productsTab", "productsCard", "title", "align", "isShowTab", "tabShape", "other", "handleCurrentTab", "currentData", "newCurrentData", "findData", "v", "ShelfDisplay_default"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import{jsx as r}from"react/jsx-runtime";import{useRef as h}from"react";import{cn as s}from"../../helpers/utils.js";const v=({tabs:a,value:d,onTabClick:i,tabShape:n="square"})=>{const l=h(null),b=t=>{i?.(t);const e=document.getElementById(`tab-${t?.tab}`),o=l.current;if(e&&o){const c=e.offsetLeft,f=e.offsetWidth,p=o.offsetWidth,u=c-p/2+f/2;o.scrollTo({left:u,behavior:"smooth"})}};return a?.length>0?r("div",{ref:l,className:s("tab-switch-wrap bg-tabs-list-bg relative flex w-fit max-w-full overflow-x-auto overflow-y-hidden p-1",n==="rounded"?"rounded-[28px]":""),children:a?.map(t=>r("button",{id:`tab-${t?.tab}`,onClick:()=>b(t),className:s("text-info-primary px-5 py-2.5 text-sm font-bold","relative flex-1 shrink-0 whitespace-nowrap transition-all","lg-desktop:text-base lg-desktop:px-7 lg-desktop:py-3.5",t?.tab===d?"bg-btn-primary-disabled-foreground":"",n==="rounded"?"rounded-[28px]":""),children:t?.tab||""},t?.id||t?.tab))}):null};var m=v;export{m as default};
|
|
2
|
+
//# sourceMappingURL=tabSwitch.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/ShelfDisplay/tabSwitch.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useRef } from 'react'\nimport { cn } from '../../helpers/utils.js'\n\ninterface TabsProps {\n tabs: any[]\n value: string\n tabShape?: 'rounded' | 'square'\n onTabClick?: (value: any) => void\n}\n\nconst TabSwitch: React.FC<TabsProps> = ({ tabs, value, onTabClick, tabShape = 'square' }) => {\n const tabRef = useRef<HTMLDivElement>(null)\n\n const handleTabClick = (item: any) => {\n onTabClick?.(item)\n // \u83B7\u53D6\u5F53\u524D\u9009\u4E2D\u7684 tab \u5E76\u8BA1\u7B97\u4E0B\u5212\u7EBF\u4F4D\u7F6E\n const tabElement = document.getElementById(`tab-${item?.tab}`)\n // **\u8BA1\u7B97\u6EDA\u52A8\u4F4D\u7F6E**\n const container = tabRef.current\n if (tabElement && container) {\n const tabLeft = tabElement.offsetLeft // \u9009\u4E2D tab \u7684\u5DE6\u4FA7\u504F\u79FB\u91CF\n const tabWidth = tabElement.offsetWidth\n const containerWidth = container.offsetWidth\n // \u8BA1\u7B97\u76EE\u6807\u6EDA\u52A8\u4F4D\u7F6E\uFF0C\u4F7F tab \u5C45\u4E2D\n const scrollTo = tabLeft - containerWidth / 2 + tabWidth / 2\n container.scrollTo({\n left: scrollTo,\n behavior: 'smooth',\n })\n }\n }\n\n return tabs?.length > 0 ? (\n <div\n ref={tabRef}\n className={cn(\n 'tab-switch-wrap bg-tabs-list-bg relative flex w-fit max-w-full overflow-x-auto overflow-y-hidden p-1',\n tabShape === 'rounded' ? 'rounded-[28px]' : ''\n )}\n >\n {tabs?.map(item => (\n <button\n key={item?.id || item?.tab}\n id={`tab-${item?.tab}`}\n onClick={() => handleTabClick(item)}\n className={cn(\n 'text-info-primary px-5 py-2.5 text-sm font-bold',\n 'relative flex-1 shrink-0 whitespace-nowrap transition-all',\n 'lg-desktop:text-base lg-desktop:px-7 lg-desktop:py-3.5',\n item?.tab === value ? 'bg-btn-primary-disabled-foreground' : '',\n tabShape === 'rounded' ? 'rounded-[28px]' : ''\n )}\n >\n {item?.tab || ''}\n </button>\n ))}\n </div>\n ) : null\n}\n\nexport default TabSwitch\n"],
|
|
5
|
+
"mappings": "aA0CQ,cAAAA,MAAA,oBAzCR,OAAgB,UAAAC,MAAc,QAC9B,OAAS,MAAAC,MAAU,yBASnB,MAAMC,EAAiC,CAAC,CAAE,KAAAC,EAAM,MAAAC,EAAO,WAAAC,EAAY,SAAAC,EAAW,QAAS,IAAM,CAC3F,MAAMC,EAASP,EAAuB,IAAI,EAEpCQ,EAAkBC,GAAc,CACpCJ,IAAaI,CAAI,EAEjB,MAAMC,EAAa,SAAS,eAAe,OAAOD,GAAM,GAAG,EAAE,EAEvDE,EAAYJ,EAAO,QACzB,GAAIG,GAAcC,EAAW,CAC3B,MAAMC,EAAUF,EAAW,WACrBG,EAAWH,EAAW,YACtBI,EAAiBH,EAAU,YAE3BI,EAAWH,EAAUE,EAAiB,EAAID,EAAW,EAC3DF,EAAU,SAAS,CACjB,KAAMI,EACN,SAAU,QACZ,CAAC,CACH,CACF,EAEA,OAAOZ,GAAM,OAAS,EACpBJ,EAAC,OACC,IAAKQ,EACL,UAAWN,EACT,uGACAK,IAAa,UAAY,iBAAmB,EAC9C,EAEC,SAAAH,GAAM,IAAIM,GACTV,EAAC,UAEC,GAAI,OAAOU,GAAM,GAAG,GACpB,QAAS,IAAMD,EAAeC,CAAI,EAClC,UAAWR,EACT,kDACA,4DACA,yDACAQ,GAAM,MAAQL,EAAQ,qCAAuC,GAC7DE,IAAa,UAAY,iBAAmB,EAC9C,EAEC,SAAAG,GAAM,KAAO,IAXTA,GAAM,IAAMA,GAAM,GAYzB,CACD,EACH,EACE,IACN,EAEA,IAAOO,EAAQd",
|
|
6
|
+
"names": ["jsx", "useRef", "cn", "TabSwitch", "tabs", "value", "onTabClick", "tabShape", "tabRef", "handleTabClick", "item", "tabElement", "container", "tabLeft", "tabWidth", "containerWidth", "scrollTo", "tabSwitch_default"]
|
|
7
|
+
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SloganProps } from './types.js';
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
3
|
+
export declare const componentType = "copy";
|
|
4
|
+
export declare const componentName = "brand_slogan";
|
|
5
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<Omit<SloganProps & React.RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps> & {
|
|
6
|
+
className?: string;
|
|
7
|
+
data?: Record<string, any>;
|
|
8
|
+
}, "ref"> & React.RefAttributes<any>>;
|
|
10
9
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as l,jsxs as
|
|
1
|
+
"use client";import{jsx as l,jsxs as G}from"react/jsx-runtime";import s,{useImperativeHandle as F,useRef as x}from"react";import{useGSAP as U}from"@gsap/react";import{gsap as h}from"gsap";import{SplitText as R}from"gsap/dist/SplitText";import{ScrollTrigger as v}from"gsap/dist/ScrollTrigger";import{cn as p}from"../../helpers/utils.js";import{Heading as Y,Text as _}from"../../components/index.js";import{withStyles as q}from"../../shared/Styles.js";import{useExposure as B}from"../../hooks/useExposure.js";const J="copy",K="brand_slogan";function O(c=[],u=3){const m=[];for(let e=0;e<c.length;e+=u)m.push(c.slice(e,e+u));return m}const $=s.forwardRef(({data:c,className:u=""},m)=>{const{title:e,features:o=[],featureChunkSize:H=3}=c,[y,N]=s.useState(0),[L,b]=s.useState(!0),w=x(null),f=O(o,H),T=f.length,a=o.length>H,D=a?[...f,f[0]]:f,E=40;F(m,()=>w.current),B(w,{componentType:J,componentName:K,componentTitle:e}),s.useEffect(()=>{if(!a)return;const t=setInterval(()=>{N(r=>r+1),b(!0)},3e3);return()=>clearInterval(t)},[T,a]),s.useEffect(()=>{if(a)if(y===T){const t=setTimeout(()=>{b(!1),N(0)},500);return()=>clearTimeout(t)}else b(!0)},[y,T,a]);const i=x(null),k=x(null),g=x(null);return U(()=>{if(h.registerPlugin(v,R),!i.current)return;g.current=new R(i.current,{type:"words",wordsClass:"word"});const t=i.current?.clientHeight||100,r=g.current.words;return h.set(r,{opacity:0}),v.create({trigger:i.current,start:"bottom bottom-=4%",end:`bottom+=${t*1.5}px bottom-=4%`,scrub:!0,onUpdate:n=>{const d=n.progress,I=r.length,P=1/I,M=.5;r.forEach((z,A)=>{const C=A/I*(1-M),j=P*(1+M);let S=(d-C)/j;S=Math.max(0,Math.min(S,1)),h.set(z,{opacity:S})})}}),o&&o.length>0&&v.create({trigger:k.current,start:`bottom+=${t*2}px bottom-=6%`,end:`bottom+=${t*2+100}px bottom-=6%`,onUpdate:n=>{h.set(k.current,{opacity:n.progress})}}),()=>{g.current&&g.current.revert(),v.getAll().forEach(n=>n.kill())}},[]),G("div",{ref:w,className:p("slogan-container laptop:flex-row laptop:items-end laptop:justify-between text-info-primary flex h-auto w-full flex-col items-start justify-center gap-[24px] text-center",u),children:[l(Y,{ref:i,as:"h2",size:2,weight:"bold",align:"left",className:p("slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none"),html:e}),o&&o.length>0&&l("div",{className:p("relative w-full max-w-[500px] overflow-hidden",`tablet:h-[${E}px]`),children:l("div",{className:p(["flex flex-col",L?"transition-transform duration-500 ease-[cubic-bezier(.4,0,.2,1)]":"!transition-none"]),style:{transform:`translateY(-${y*E}px)`},children:D.map((t,r)=>l("div",{className:p("flex w-full flex-row items-stretch gap-3 overflow-hidden",`tablet:h-[${E}px]`),children:t.map((n,d)=>G(s.Fragment,{children:[d>0&&l("div",{className:"slogan-feature-divider w-px self-stretch bg-[#E4E5E6]"}),l(_,{size:3,align:"left",as:"p",className:"slogan-feature-text tablet:text-[13px] laptop:text-[14px] line-clamp-3 text-[12px] leading-[1.4]",html:n.title})]},d))},r))})})]})});$.displayName="Slogan";var ot=q($);export{K as componentName,J as componentType,ot as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/Slogan/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useRef } from 'react'\nimport { useGSAP } from '@gsap/react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading, Text } from '../../components/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport type { SloganProps } from './types.js'\n\nfunction chunkArray(array: { title: string }[] = [], size: number = 3) {\n const result = []\n for (let i = 0; i < array.length; i += size) {\n result.push(array.slice(i, i + size))\n }\n return result\n}\n\nconst Slogan = React.forwardRef<HTMLDivElement, SloganProps>(({ data, className = '' }, ref) => {\n const { title, features = [], featureChunkSize = 3
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["jsx", "jsxs", "React", "useRef", "useGSAP", "gsap", "SplitText", "ScrollTrigger", "cn", "Heading", "Text", "withStyles", "chunkArray", "array", "size", "result", "i", "Slogan", "data", "className", "ref", "title", "features", "featureChunkSize", "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef } from 'react'\nimport { useGSAP } from '@gsap/react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading, Text } from '../../components/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport type { SloganProps } from './types.js'\nimport { useExposure } from '../../hooks/useExposure.js'\n\nexport const componentType = 'copy'\nexport const componentName = 'brand_slogan'\n\nfunction chunkArray(array: { title: string }[] = [], size: number = 3) {\n const result = []\n for (let i = 0; i < array.length; i += size) {\n result.push(array.slice(i, i + size))\n }\n return result\n}\n\nconst Slogan = React.forwardRef<HTMLDivElement, SloganProps>(({ data, className = '' }, ref) => {\n const { title, features = [], featureChunkSize = 3 } = data\n const [groupIndex, setGroupIndex] = React.useState(0)\n const [isTransitioning, setIsTransitioning] = React.useState(true)\n const innerRef = useRef<HTMLDivElement>(null)\n const featuresGroups = chunkArray(features, featureChunkSize)\n const totalGroups = featuresGroups.length\n const needCarousel = features.length > featureChunkSize\n const displayGroups = needCarousel ? [...featuresGroups, featuresGroups[0]] : featuresGroups\n const groupHeight = 40\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n useExposure(innerRef, {\n componentType,\n componentName,\n componentTitle: title,\n })\n\n // \u53EA\u5728\u9700\u8981\u8F6E\u64AD\u65F6\u542F\u7528\u5B9A\u65F6\u5668\n React.useEffect(() => {\n if (!needCarousel) return\n const timer = setInterval(() => {\n setGroupIndex(i => i + 1)\n setIsTransitioning(true)\n }, 3000)\n return () => clearInterval(timer)\n }, [totalGroups, needCarousel])\n\n // \u53EA\u5728\u9700\u8981\u8F6E\u64AD\u65F6\u5904\u7406\u65E0\u7F1D\u8DF3\u8F6C\n React.useEffect(() => {\n if (!needCarousel) return\n if (groupIndex === totalGroups) {\n const handle = setTimeout(() => {\n setIsTransitioning(false)\n setGroupIndex(0)\n }, 500) // 500ms\u7B49\u4E8E\u52A8\u753B\u65F6\u957F\n return () => clearTimeout(handle)\n } else {\n setIsTransitioning(true)\n }\n }, [groupIndex, totalGroups, needCarousel])\n\n // \u6807\u9898\u52A8\u753B\u903B\u8F91\u4FDD\u6301\u4E0D\u53D8\n const titleRef = useRef<HTMLHeadingElement>(null)\n const featuresRef = useRef<HTMLDivElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n useGSAP(() => {\n gsap.registerPlugin(ScrollTrigger, SplitText)\n if (!titleRef.current) return\n splitTextInstance.current = new SplitText(titleRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const height = titleRef.current?.clientHeight || 100\n\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom-=4%',\n end: `bottom+=${height * 1.5}px bottom-=4%`,\n scrub: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length\n const interval = 1 / total\n const overlap = 0.5\n words.forEach((word: any, i: number) => {\n const start = (i / total) * (1 - overlap)\n const width = interval * (1 + overlap)\n let opacity = (progress - start) / width\n opacity = Math.max(0, Math.min(opacity, 1))\n gsap.set(word, { opacity })\n })\n },\n })\n\n if (features && features.length > 0) {\n ScrollTrigger.create({\n trigger: featuresRef.current,\n start: `bottom+=${height * 2}px bottom-=6%`,\n end: `bottom+=${height * 2 + 100}px bottom-=6%`,\n onUpdate: (self: any) => {\n gsap.set(featuresRef.current, { opacity: self.progress })\n },\n })\n }\n\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n ScrollTrigger.getAll().forEach((t: any) => t.kill())\n }\n }, [])\n\n return (\n <div\n ref={innerRef}\n className={cn(\n 'slogan-container laptop:flex-row laptop:items-end laptop:justify-between text-info-primary flex h-auto w-full flex-col items-start justify-center gap-[24px] text-center',\n className\n )}\n >\n <Heading\n ref={titleRef}\n as=\"h2\"\n size={2}\n weight={'bold'}\n align={'left'}\n className={cn(\n 'slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none'\n )}\n html={title}\n />\n {features && features.length > 0 && (\n <div className={cn('relative w-full max-w-[500px] overflow-hidden', `tablet:h-[${groupHeight}px]`)}>\n <div\n className={cn([\n 'flex flex-col',\n isTransitioning ? 'transition-transform duration-500 ease-[cubic-bezier(.4,0,.2,1)]' : '!transition-none',\n ])}\n style={{\n transform: `translateY(-${groupIndex * groupHeight}px)`,\n }}\n >\n {displayGroups.map((group, idx) => (\n <div\n className={cn(\n 'flex w-full flex-row items-stretch gap-3 overflow-hidden',\n `tablet:h-[${groupHeight}px]`\n )}\n key={idx}\n >\n {group.map((feature, index) => (\n <React.Fragment key={index}>\n {index > 0 && <div className=\"slogan-feature-divider w-px self-stretch bg-[#E4E5E6]\" />}\n <Text\n size={3}\n align=\"left\"\n as=\"p\"\n className=\"slogan-feature-text tablet:text-[13px] laptop:text-[14px] line-clamp-3 text-[12px] leading-[1.4]\"\n html={feature.title}\n />\n </React.Fragment>\n ))}\n </div>\n ))}\n </div>\n </div>\n )}\n </div>\n )\n})\n\nSlogan.displayName = 'Slogan'\n\nexport default withStyles(Slogan)\n"],
|
|
5
|
+
"mappings": "aA8HM,cAAAA,EA+BY,QAAAC,MA/BZ,oBA7HN,OAAOC,GAAS,uBAAAC,EAAqB,UAAAC,MAAc,QACnD,OAAS,WAAAC,M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React", "useImperativeHandle", "useRef", "useGSAP", "gsap", "SplitText", "ScrollTrigger", "cn", "Heading", "Text", "withStyles", "useExposure", "componentType", "componentName", "chunkArray", "array", "size", "result", "i", "Slogan", "data", "className", "ref", "title", "features", "featureChunkSize", "groupIndex", "setGroupIndex", "isTransitioning", "setIsTransitioning", "innerRef", "featuresGroups", "totalGroups", "needCarousel", "displayGroups", "groupHeight", "timer", "handle", "titleRef", "featuresRef", "splitTextInstance", "height", "words", "self", "progress", "total", "interval", "overlap", "word", "start", "width", "opacity", "t", "group", "idx", "feature", "index", "Slogan_default"]
|
|
7
7
|
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SpacerProps } from './types.js';
|
|
3
|
-
declare const _default: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
displayName: string;
|
|
9
|
-
};
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<Omit<SpacerProps & React.RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps> & {
|
|
4
|
+
className?: string;
|
|
5
|
+
data?: Record<string, any>;
|
|
6
|
+
}, "ref"> & React.RefAttributes<any>>;
|
|
10
7
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as c}from"react/jsx-runtime";import
|
|
1
|
+
"use client";import{jsx as c}from"react/jsx-runtime";import a from"react";import{cn as o}from"../../helpers/utils.js";import{withStyles as s}from"../../shared/Styles.js";const p=a.forwardRef(({className:t,data:r})=>{const{space:e="default"}=r;return c("div",{className:o("ipc_spacer",e==="default"&&"laptop:h-16 lg-desktop:h-[128px] tablet:h-8 h-16",e==="fixed"&&"h-16",t)})});p.displayName="Spacer";var m=s(p);export{m as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/Spacer/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport type { SpacerProps } from './types.js'\n\nconst Spacer = React.forwardRef<HTMLDivElement, SpacerProps>(({ className, data }) => {\n const { space = 'default' } = data\n return (\n <div\n className={cn(\n space === 'default' && '
|
|
5
|
-
"mappings": "aASI,cAAAA,MAAA,oBARJ,OAAOC,MAAW,QAClB,OAAS,MAAAC,MAAU,yBACnB,OAAS,cAAAC,MAAkB,yBAG3B,MAAMC,EAASH,EAAM,WAAwC,CAAC,CAAE,UAAAI,EAAW,KAAAC,CAAK,IAAM,CACpF,KAAM,CAAE,MAAAC,EAAQ,SAAU,EAAID,EAC9B,OACEN,EAAC,OACC,UAAWE,
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport type { SpacerProps } from './types.js'\n\nconst Spacer = React.forwardRef<HTMLDivElement, SpacerProps>(({ className, data }) => {\n const { space = 'default' } = data\n return (\n <div\n className={cn(\n 'ipc_spacer',\n space === 'default' && 'laptop:h-16 lg-desktop:h-[128px] tablet:h-8 h-16',\n space === 'fixed' && 'h-16',\n className\n )}\n ></div>\n )\n})\n\nSpacer.displayName = 'Spacer'\n\nexport default withStyles(Spacer)\n"],
|
|
5
|
+
"mappings": "aASI,cAAAA,MAAA,oBARJ,OAAOC,MAAW,QAClB,OAAS,MAAAC,MAAU,yBACnB,OAAS,cAAAC,MAAkB,yBAG3B,MAAMC,EAASH,EAAM,WAAwC,CAAC,CAAE,UAAAI,EAAW,KAAAC,CAAK,IAAM,CACpF,KAAM,CAAE,MAAAC,EAAQ,SAAU,EAAID,EAC9B,OACEN,EAAC,OACC,UAAWE,EACT,aACAK,IAAU,WAAa,mDACvBA,IAAU,SAAW,OACrBF,CACF,EACD,CAEL,CAAC,EAEDD,EAAO,YAAc,SAErB,IAAOI,EAAQL,EAAWC,CAAM",
|
|
6
6
|
"names": ["jsx", "React", "cn", "withStyles", "Spacer", "className", "data", "space", "Spacer_default"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as s}from"react/jsx-runtime";import m,{useState as t}from"react";import{cn as u}from"../../helpers/utils.js";import{Swiper as c,SwiperSlide as d}from"swiper/react";import{Navigation as S,FreeMode as g,Mousewheel as x}from"swiper/modules";const n=m.forwardRef(({data:o,breakpoints:p,Slide:a,className:l,id:i})=>{const[B,f]=t(!0),[M,w]=t(!1);return s(c,{className:u(l),navigation:{nextEl:`.${i}-custom-swiper-button-next`,prevEl:`.${i}-custom-swiper-button-prev`},onProgress:e=>{f(e.isBeginning),w(e.isEnd)},modules:[S,g,x],freeMode:!0,mousewheel:{forceToAxis:!0},breakpoints:p||{0:{spaceBetween:12,slidesPerView:1,freeMode:!1},374:{spaceBetween:12,slidesPerView:1.1,freeMode:!1},768:{spaceBetween:16,slidesPerView:2,freeMode:!1}},children:o?.list?.map((e,r)=>s(d,{className:"!flex !h-[unset]",children:s(a,{data:e,configuration:o?.configuration?{...o?.configuration,index:r}:{index:r},jIndex:r})},i+"SwiperSlide"+r))})});n.displayName="SwiperBox";var N=n;export{N as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/SwiperBox/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useState } from 'react'\nimport { cn } from '../../helpers/utils.js'\n// import 'swiper/css'\n// import 'swiper/css/free-mode'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Navigation, FreeMode, Mousewheel } from 'swiper/modules'\nimport type { SwiperBoxProps } from './types.js'\n\nconst SwiperBox = React.forwardRef<HTMLDivElement, SwiperBoxProps>(({ data, breakpoints, Slide, className, id }) => {\n const [isStart, setStart] = useState(true)\n const [isEnd, setEnd] = useState(false)\n\n return (\n <Swiper\n className={cn(className)}\n navigation={{\n nextEl: `.${id}-custom-swiper-button-next`,\n prevEl: `.${id}-custom-swiper-button-prev`,\n }}\n onProgress={swiper => {\n setStart(swiper.isBeginning)\n setEnd(swiper.isEnd)\n }}\n modules={[Navigation, FreeMode, Mousewheel]}\n freeMode={true}\n mousewheel={{\n forceToAxis: true,\n }}\n breakpoints={\n breakpoints || {\n 0: {\n spaceBetween: 12,\n slidesPerView: 1,\n freeMode: false,\n },\n 374: {\n spaceBetween: 12,\n slidesPerView: 1.1,\n freeMode: false,\n },\n 768: {\n spaceBetween: 16,\n slidesPerView: 2,\n freeMode: false,\n },\n }\n }\n >\n {data?.list?.map((item, jIndex) => (\n <SwiperSlide key={id + 'SwiperSlide' + jIndex} className=\"!flex !h-[unset]\">\n <Slide
|
|
5
|
-
"mappings": "aAmDU,cAAAA,MAAA,oBAlDV,OAAOC,GAAS,YAAAC,MAAgB,QAChC,OAAS,MAAAC,MAAU,yBAGnB,OAAS,UAAAC,EAAQ,eAAAC,MAAmB,eACpC,OAAS,cAAAC,EAAY,YAAAC,EAAU,cAAAC,MAAkB,iBAGjD,MAAMC,EAAYR,EAAM,WAA2C,CAAC,CAAE,KAAAS,EAAM,YAAAC,EAAa,MAAAC,EAAO,UAAAC,EAAW,GAAAC,CAAG,IAAM,CAClH,KAAM,CAACC,EAASC,CAAQ,EAAId,EAAS,EAAI,EACnC,CAACe,EAAOC,CAAM,EAAIhB,EAAS,EAAK,EAEtC,OACEF,EAACI,EAAA,CACC,UAAWD,EAAGU,CAAS,EACvB,WAAY,CACV,OAAQ,IAAIC,CAAE,6BACd,OAAQ,IAAIA,CAAE,4BAChB,EACA,WAAYK,GAAU,CACpBH,EAASG,EAAO,WAAW,EAC3BD,EAAOC,EAAO,KAAK,CACrB,EACA,QAAS,CAACb,EAAYC,EAAUC,CAAU,EAC1C,SAAU,GACV,WAAY,CACV,YAAa,EACf,EACA,YACEG,GAAe,CACb,EAAG,CACD,aAAc,GACd,cAAe,EACf,SAAU,EACZ,EACA,IAAK,CACH,aAAc,GACd,cAAe,IACf,SAAU,EACZ,EACA,IAAK,CACH,aAAc,GACd,cAAe,EACf,SAAU,EACZ,CACF,EAGD,SAAAD,GAAM,MAAM,IAAI,CAACU,EAAMC,IACtBrB,EAACK,EAAA,CAA8C,UAAU,mBACvD,SAAAL,EAACY,EAAA,
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useState } from 'react'\nimport { cn } from '../../helpers/utils.js'\n// import 'swiper/css'\n// import 'swiper/css/free-mode'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Navigation, FreeMode, Mousewheel } from 'swiper/modules'\nimport type { SwiperBoxProps } from './types.js'\n\nconst SwiperBox = React.forwardRef<HTMLDivElement, SwiperBoxProps>(({ data, breakpoints, Slide, className, id }) => {\n const [isStart, setStart] = useState(true)\n const [isEnd, setEnd] = useState(false)\n\n return (\n <Swiper\n className={cn(className)}\n navigation={{\n nextEl: `.${id}-custom-swiper-button-next`,\n prevEl: `.${id}-custom-swiper-button-prev`,\n }}\n onProgress={swiper => {\n setStart(swiper.isBeginning)\n setEnd(swiper.isEnd)\n }}\n modules={[Navigation, FreeMode, Mousewheel]}\n freeMode={true}\n mousewheel={{\n forceToAxis: true,\n }}\n breakpoints={\n breakpoints || {\n 0: {\n spaceBetween: 12,\n slidesPerView: 1,\n freeMode: false,\n },\n 374: {\n spaceBetween: 12,\n slidesPerView: 1.1,\n freeMode: false,\n },\n 768: {\n spaceBetween: 16,\n slidesPerView: 2,\n freeMode: false,\n },\n }\n }\n >\n {data?.list?.map((item, jIndex) => (\n <SwiperSlide key={id + 'SwiperSlide' + jIndex} className=\"!flex !h-[unset]\">\n <Slide\n data={item}\n configuration={data?.configuration ? { ...data?.configuration, index: jIndex } : { index: jIndex }}\n jIndex={jIndex}\n />\n </SwiperSlide>\n ))}\n </Swiper>\n )\n})\n\nSwiperBox.displayName = 'SwiperBox'\n\nexport default SwiperBox\n"],
|
|
5
|
+
"mappings": "aAmDU,cAAAA,MAAA,oBAlDV,OAAOC,GAAS,YAAAC,MAAgB,QAChC,OAAS,MAAAC,MAAU,yBAGnB,OAAS,UAAAC,EAAQ,eAAAC,MAAmB,eACpC,OAAS,cAAAC,EAAY,YAAAC,EAAU,cAAAC,MAAkB,iBAGjD,MAAMC,EAAYR,EAAM,WAA2C,CAAC,CAAE,KAAAS,EAAM,YAAAC,EAAa,MAAAC,EAAO,UAAAC,EAAW,GAAAC,CAAG,IAAM,CAClH,KAAM,CAACC,EAASC,CAAQ,EAAId,EAAS,EAAI,EACnC,CAACe,EAAOC,CAAM,EAAIhB,EAAS,EAAK,EAEtC,OACEF,EAACI,EAAA,CACC,UAAWD,EAAGU,CAAS,EACvB,WAAY,CACV,OAAQ,IAAIC,CAAE,6BACd,OAAQ,IAAIA,CAAE,4BAChB,EACA,WAAYK,GAAU,CACpBH,EAASG,EAAO,WAAW,EAC3BD,EAAOC,EAAO,KAAK,CACrB,EACA,QAAS,CAACb,EAAYC,EAAUC,CAAU,EAC1C,SAAU,GACV,WAAY,CACV,YAAa,EACf,EACA,YACEG,GAAe,CACb,EAAG,CACD,aAAc,GACd,cAAe,EACf,SAAU,EACZ,EACA,IAAK,CACH,aAAc,GACd,cAAe,IACf,SAAU,EACZ,EACA,IAAK,CACH,aAAc,GACd,cAAe,EACf,SAAU,EACZ,CACF,EAGD,SAAAD,GAAM,MAAM,IAAI,CAACU,EAAMC,IACtBrB,EAACK,EAAA,CAA8C,UAAU,mBACvD,SAAAL,EAACY,EAAA,CACC,KAAMQ,EACN,cAAeV,GAAM,cAAgB,CAAE,GAAGA,GAAM,cAAe,MAAOW,CAAO,EAAI,CAAE,MAAOA,CAAO,EACjG,OAAQA,EACV,GALgBP,EAAK,cAAgBO,CAMvC,CACD,EACH,CAEJ,CAAC,EAEDZ,EAAU,YAAc,YAExB,IAAOa,EAAQb",
|
|
6
6
|
"names": ["jsx", "React", "useState", "cn", "Swiper", "SwiperSlide", "Navigation", "FreeMode", "Mousewheel", "SwiperBox", "data", "breakpoints", "Slide", "className", "id", "isStart", "setStart", "isEnd", "setEnd", "swiper", "item", "jIndex", "SwiperBox_default"]
|
|
7
7
|
}
|
|
@@ -3,6 +3,7 @@ export interface SwiperBoxProps {
|
|
|
3
3
|
data: {
|
|
4
4
|
list: any[];
|
|
5
5
|
configuration?: any;
|
|
6
|
+
onVideoPlayBtnClick?: (jIndex: number) => void;
|
|
6
7
|
};
|
|
7
8
|
id: string;
|
|
8
9
|
className?: string;
|
|
@@ -10,5 +11,6 @@ export interface SwiperBoxProps {
|
|
|
10
11
|
Slide: React.ComponentType<{
|
|
11
12
|
data: any;
|
|
12
13
|
configuration?: any;
|
|
14
|
+
jIndex?: number;
|
|
13
15
|
}>;
|
|
14
16
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/SwiperBox/types.ts"],
|
|
4
|
-
"sourcesContent": ["import React from 'react'\n\nexport interface SwiperBoxProps {\n data: {\n list: any[]\n configuration?: any\n }\n id: string\n className?: string\n breakpoints?: Record<number, Object>\n Slide: React.ComponentType<{ data: any
|
|
4
|
+
"sourcesContent": ["import React from 'react'\n\nexport interface SwiperBoxProps {\n data: {\n list: any[]\n configuration?: any\n onVideoPlayBtnClick?: (jIndex: number) => void\n }\n id: string\n className?: string\n breakpoints?: Record<number, Object>\n Slide: React.ComponentType<{ data: any; configuration?: any; jIndex?: number }>\n}\n"],
|
|
5
5
|
"mappings": "AAAA,MAAkB",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import type { TabsProps } from './types.js';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
declare const _default: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
displayName: string;
|
|
9
|
-
};
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<Omit<TabsProps & React.RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps> & {
|
|
4
|
+
className?: string;
|
|
5
|
+
data?: Record<string, any>;
|
|
6
|
+
}, "ref"> & React.RefAttributes<any>>;
|
|
10
7
|
export default _default;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { TitleProps } from './types.js';
|
|
3
|
-
declare const _default: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
displayName: string;
|
|
9
|
-
};
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<Omit<TitleProps & React.RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps> & {
|
|
4
|
+
className?: string;
|
|
5
|
+
data?: Record<string, any>;
|
|
6
|
+
}, "ref"> & React.RefAttributes<any>>;
|
|
10
7
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as f}from"react/jsx-runtime";import S,{useRef as m}from"react";import{useGSAP as k}from"@gsap/react";import{gsap as s}from"gsap";import{SplitText as p}from"gsap/dist/SplitText";import{ScrollTrigger as i}from"gsap/dist/ScrollTrigger";import{cn as E}from"../../helpers/utils.js";import{Heading as M}from"../../components/index.js";import{withStyles as P}from"../../shared/Styles.js";const u=S.forwardRef(({data:d,className:g})=>{const{title:l,theme:h}=d,t=m(null),r=m(null);return k(()=>{if(s.registerPlugin(p,i),!t.current)return;const y=t.current?.clientHeight||80;r.current=new p(t.current,{type:"words",wordsClass:"word"});const e=r.current.words;return s.set(e,{opacity:0}),i.create({trigger:t.current,start:"bottom bottom-=4%",end:`bottom+=${y*1.5+60}px bottom-=4%`,scrub:!0,onUpdate:o=>{const T=o.progress,a=e.length,b=1/a,c=.5;e.forEach((w,x)=>{const v=x/a*(1-c),H=b*(1+c);let n=(T-v)/H;n=Math.max(0,Math.min(n,1)),s.set(w,{opacity:n})})}}),()=>{r.current&&r.current.revert(),i.getAll().forEach(o=>o.kill())}},[]),l&&f("div",{className:E("tablet:mb-[32px] mb-[24px] space-y-4",g,{"aiui-dark":h==="dark"}),children:f(M,{ref:t,as:"h1",size:4,html:l})})});u.displayName="Title";var I=P(u);export{I as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/Title/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useRef } from 'react'\nimport { useGSAP } from '@gsap/react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading } from '../../components/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport type { TitleProps } from './types.js'\n\nconst Title = React.forwardRef<HTMLDivElement, TitleProps>(({ data, className }) => {\n const { title, theme } = data\n const titleRef = useRef<HTMLHeadingElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n useGSAP(() => {\n if (!titleRef.current) return\n const height = titleRef.current?.clientHeight || 80\n splitTextInstance.current = new SplitText(titleRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom-=
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useRef } from 'react'\nimport { useGSAP } from '@gsap/react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading } from '../../components/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport type { TitleProps } from './types.js'\n\nconst Title = React.forwardRef<HTMLDivElement, TitleProps>(({ data, className }) => {\n const { title, theme } = data\n const titleRef = useRef<HTMLHeadingElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n useGSAP(() => {\n gsap.registerPlugin(SplitText, ScrollTrigger)\n if (!titleRef.current) return\n const height = titleRef.current?.clientHeight || 80\n splitTextInstance.current = new SplitText(titleRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom-=4%',\n end: `bottom+=${height * 1.5 + 60}px bottom-=4%`,\n scrub: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length\n const interval = 1 / total\n const overlap = 0.5\n words.forEach((word: any, i: number) => {\n const start = (i / total) * (1 - overlap)\n const width = interval * (1 + overlap)\n let opacity = (progress - start) / width\n opacity = Math.max(0, Math.min(opacity, 1))\n gsap.set(word, { opacity })\n })\n },\n })\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n ScrollTrigger.getAll().forEach((t: { kill: () => any }) => t.kill())\n }\n }, [])\n\n return (\n title && (\n <div className={cn('tablet:mb-[32px] mb-[24px] space-y-4', className, { 'aiui-dark': theme === 'dark' })}>\n <Heading ref={titleRef} as=\"h1\" size={4} html={title} />\n </div>\n )\n )\n})\n\nTitle.displayName = 'Title'\n\nexport default withStyles(Title)\n"],
|
|
5
|
+
"mappings": "aAqDQ,cAAAA,MAAA,oBApDR,OAAOC,GAAS,UAAAC,MAAc,QAC9B,OAAS,WAAAC,MAAe,cACxB,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,sBAC1B,OAAS,i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b,EAAC,OAAI,UAAWO,EAAG,uCAAwCK,EAAW,CAAE,YAAaE,IAAU,MAAO,CAAC,EACrG,SAAAd,EAACQ,EAAA,CAAQ,IAAKO,EAAU,GAAG,KAAK,KAAM,EAAG,KAAMF,EAAO,EACxD,CAGN,CAAC,EAEDH,EAAM,YAAc,QAEpB,IAAOoB,EAAQrB,EAAWC,CAAK",
|
|
6
6
|
"names": ["jsx", "React", "useRef", "useGSAP", "gsap", "SplitText", "ScrollTrigger", "cn", "Heading", "withStyles", "Title", "data", "className", "title", "theme", "titleRef", "splitTextInstance", "height", "words", "self", "progress", "total", "interval", "overlap", "word", "i", "start", "width", "opacity", "t", "Title_default"]
|
|
7
7
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { default as Shelf } from './Shelf/index.js';
|
|
2
1
|
export { default as BrandEquity } from './BrandEquity/index.js';
|
|
3
2
|
export { default as MemberEquity } from './MemberEquity/index.js';
|
|
4
3
|
export { default as Slogan } from './Slogan/index.js';
|
|
@@ -19,3 +18,4 @@ export { default as MultiLayoutGraphicBlock } from './MultiLayoutGraphicBlock/in
|
|
|
19
18
|
export type { MultiLayoutGraphicBlockProps } from './MultiLayoutGraphicBlock/index.js';
|
|
20
19
|
export { default as GraphicAttractionBlock } from './GraphicAttractionBlock/index.js';
|
|
21
20
|
export type { GraphicAttractionBlockProps } from './GraphicAttractionBlock/index.js';
|
|
21
|
+
export { default as AiuiProvider } from './AiuiProvider/index.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{default as
|
|
1
|
+
import{default as a}from"./BrandEquity/index.js";import{default as o}from"./MemberEquity/index.js";import{default as l}from"./Slogan/index.js";import{default as u}from"./Title/index.js";import{default as d}from"./Spacer/index.js";import{default as m}from"./ShelfDisplay/index.js";import{default as c}from"./Evaluate/index.js";import{default as y}from"./Category/index.js";import{default as B}from"./HeroBanner/index.js";import{default as k}from"./AccordionCards/index.js";import{default as q}from"./Graphic/index.js";import{default as A}from"./MediaPlayerBase/index.js";import{default as S}from"./MediaPlayerSticky/index.js";import{default as E}from"./MediaPlayerMulti/index.js";import{default as j}from"./Marquee/index.js";import{MarqueeItem as I,MarqueeImageContent as T,MarqueeTextContent as b}from"./Marquee/index.js";import{default as H}from"./MultiLayoutGraphicBlock/index.js";import{default as z}from"./GraphicAttractionBlock/index.js";import{default as J}from"./AiuiProvider/index.js";export{k as AccordionCards,J as AiuiProvider,a as BrandEquity,y as Category,c as Evaluate,q as Graphic,z as GraphicAttractionBlock,B as HeroBanner,j as Marquee,T as MarqueeImageContent,I as MarqueeItem,b as MarqueeTextContent,A as MediaPlayerBase,E as MediaPlayerMulti,S as MediaPlayerSticky,o as MemberEquity,H as MultiLayoutGraphicBlock,m as ShelfDisplay,l as Slogan,d as Spacer,u as Title};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/biz-components/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { default as
|
|
5
|
-
"mappings": "AAAA,OAAoB,WAAXA,
|
|
4
|
+
"sourcesContent": ["export { default as BrandEquity } from './BrandEquity/index.js'\nexport { default as MemberEquity } from './MemberEquity/index.js'\nexport { default as Slogan } from './Slogan/index.js'\nexport { default as Title } from './Title/index.js'\nexport { default as Spacer } from './Spacer/index.js'\nexport { default as ShelfDisplay } from './ShelfDisplay/index.js'\nexport { default as Evaluate } from './Evaluate/index.js'\nexport { default as Category } from './Category/index.js'\nexport { default as HeroBanner } from './HeroBanner/index.js'\nexport { default as AccordionCards } from './AccordionCards/index.js'\nexport { default as Graphic } from './Graphic/index.js'\nexport { default as MediaPlayerBase } from './MediaPlayerBase/index.js'\nexport { default as MediaPlayerSticky } from './MediaPlayerSticky/index.js'\nexport { default as MediaPlayerMulti } from './MediaPlayerMulti/index.js'\nexport { default as Marquee } from './Marquee/index.js'\nexport { MarqueeItem, MarqueeImageContent, MarqueeTextContent } from './Marquee/index.js'\nexport { default as MultiLayoutGraphicBlock } from './MultiLayoutGraphicBlock/index.js'\nexport type { MultiLayoutGraphicBlockProps } from './MultiLayoutGraphicBlock/index.js'\nexport { default as GraphicAttractionBlock } from './GraphicAttractionBlock/index.js'\nexport type { GraphicAttractionBlockProps } from './GraphicAttractionBlock/index.js'\n\nexport { default as AiuiProvider } from './AiuiProvider/index.js'\n"],
|
|
5
|
+
"mappings": "AAAA,OAAoB,WAAXA,MAA8B,yBACvC,OAAoB,WAAXA,MAA+B,0BACxC,OAAoB,WAAXA,MAAyB,oBAClC,OAAoB,WAAXA,MAAwB,mBACjC,OAAoB,WAAXA,MAAyB,oBAClC,OAAoB,WAAXA,MAA+B,0BACxC,OAAoB,WAAXA,MAA2B,sBACpC,OAAoB,WAAXA,MAA2B,sBACpC,OAAoB,WAAXA,MAA6B,wBACtC,OAAoB,WAAXA,MAAiC,4BAC1C,OAAoB,WAAXA,MAA0B,qBACnC,OAAoB,WAAXA,MAAkC,6BAC3C,OAAoB,WAAXA,MAAoC,+BAC7C,OAAoB,WAAXA,MAAmC,8BAC5C,OAAoB,WAAXA,MAA0B,qBACnC,OAAS,eAAAC,EAAa,uBAAAC,EAAqB,sBAAAC,MAA0B,qBACrE,OAAoB,WAAXH,MAA0C,qCAEnD,OAAoB,WAAXA,MAAyC,oCAGlD,OAAoB,WAAXA,MAA+B",
|
|
6
6
|
"names": ["default", "MarqueeItem", "MarqueeImageContent", "MarqueeTextContent"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as i}from"react/jsx-runtime";import{useEffect as
|
|
1
|
+
"use client";import{jsx as i}from"react/jsx-runtime";import{useEffect as x,useRef as g,forwardRef as l}from"react";import N from"fitty";import*as r from"@radix-ui/react-avatar";import{cva as k}from"class-variance-authority";import{cn as n}from"../helpers/index.js";const z=k("tracking transition-colors",{variants:{size:{small:"size-8 text-sm",medium:"size-10 text-xl",large:"size-12 text-2xl"}}}),f=l(({className:t,textClassName:a,isAdaptation:e=!1,minSize:v=4,maxSize:y=16,children:m,style:c,size:R="small",onClick:d,...P},b)=>{const o=g(null),A=s=>{d?.(s)};return x(()=>{let s;return e&&o.current&&(s=N?.(o.current,{minSize:v,maxSize:y})),()=>s?.unsubscribe?.()},[]),i(r.Root,{ref:b,onClick:A,className:n(z({size:R}),"bg-container-secondary-0 text-info-primary relative flex shrink-0 items-center justify-center overflow-hidden rounded-full",t),...c?{style:c}:null,...P,children:e?i("span",{className:"bg-muted flex size-full items-center justify-center rounded-full",children:i("span",{ref:o,className:n("px-2",a),children:m})}):m})});f.displayName="Avatar";const p=l(({className:t,...a},e)=>i(r.Image,{ref:e,className:n("aspect-square size-full",t),...a}));p.displayName=r.Image.displayName;const u=l(({className:t,...a},e)=>i(r.Fallback,{ref:e,className:n("bg-muted flex size-full items-center justify-center rounded-full",t),...a}));u.displayName=r.Fallback.displayName;export{f as Avatar,u as AvatarFallback,p as AvatarImage};
|
|
2
2
|
//# sourceMappingURL=avatar.js.map
|