@anker-in/headless-ui 0.0.27-alpha.99 → 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/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 +2 -0
- 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.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/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.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/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 +2 -0
- 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.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/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.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/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/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/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
|
@@ -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": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD,GAAA,IAAAE,EAAkB",
|
|
6
6
|
"names": ["types_exports", "__toCommonJS", "import_react"]
|
|
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 strict";"use client";var A=Object.create;var l=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var z=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var D=(t,r)=>{for(var e in r)l(t,e,{get:r[e],enumerable:!0})},
|
|
1
|
+
"use strict";"use client";var A=Object.create;var l=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var z=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var D=(t,r)=>{for(var e in r)l(t,e,{get:r[e],enumerable:!0})},y=(t,r,e,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of N(r))!C.call(t,o)&&o!==e&&l(t,o,{get:()=>r[o],enumerable:!(s=L(r,o))||s.enumerable});return t};var G=(t,r,e)=>(e=t!=null?A(z(t)):{},y(r||!t||!t.__esModule?l(e,"default",{value:t,enumerable:!0}):e,t)),I=t=>y(l({},"__esModule",{value:!0}),t);var $={};D($,{default:()=>U});module.exports=I($);var d=require("react/jsx-runtime"),n=G(require("react")),b=require("@gsap/react"),a=require("gsap"),f=require("gsap/dist/SplitText"),c=require("gsap/dist/ScrollTrigger"),w=require("../../helpers/utils.js"),x=require("../../components/index.js"),v=require("../../shared/Styles.js");const T=n.default.forwardRef(({data:t,className:r})=>{const{title:e,theme:s}=t,o=(0,n.useRef)(null),i=(0,n.useRef)(null);return(0,b.useGSAP)(()=>{if(a.gsap.registerPlugin(f.SplitText,c.ScrollTrigger),!o.current)return;const H=o.current?.clientHeight||80;i.current=new f.SplitText(o.current,{type:"words",wordsClass:"word"});const m=i.current.words;return a.gsap.set(m,{opacity:0}),c.ScrollTrigger.create({trigger:o.current,start:"bottom bottom-=4%",end:`bottom+=${H*1.5+60}px bottom-=4%`,scrub:!0,onUpdate:p=>{const S=p.progress,g=m.length,k=1/g,h=.5;m.forEach((E,M)=>{const P=M/g*(1-h),R=k*(1+h);let u=(S-P)/R;u=Math.max(0,Math.min(u,1)),a.gsap.set(E,{opacity:u})})}}),()=>{i.current&&i.current.revert(),c.ScrollTrigger.getAll().forEach(p=>p.kill())}},[]),e&&(0,d.jsx)("div",{className:(0,w.cn)("tablet:mb-[32px] mb-[24px] space-y-4",r,{"aiui-dark":s==="dark"}),children:(0,d.jsx)(x.Heading,{ref:o,as:"h1",size:4,html:e})})});T.displayName="Title";var U=(0,v.withStyles)(T);
|
|
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": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,
|
|
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": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAqDQ,IAAAI,EAAA,6BApDRC,EAA8B,oBAC9BA,EAAwB,uBACxBC,EAAqB,gBACrBC,EAA0B,+BAC1BC,EAA8B,mCAC9BC,EAAmB,kCACnBC,EAAwB,qCACxBC,EAA2B,kCAG3B,MAAMC,EAAQ,EAAAC,QAAM,WAAuC,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,IAAM,CAClF,KAAM,CAAE,MAAAC,EAAO,MAAAC,CAAM,EAAIH,EACnBI,KAAW,UAA2B,IAAI,EAC1CC,KAAoB,UAAyB,IAAI,EACvD,oBAAQ,IAAM,CAEZ,GADA,OAAK,eAAe,YAAW,eAAa,EACxC,CAACD,EAAS,QAAS,OACvB,MAAME,EAASF,EAAS,SAAS,cAAgB,GACjDC,EAAkB,QAAU,IAAI,YAAUD,EAAS,QAAS,CAC1D,KAAM,QACN,WAAY,MACd,CAAC,EACD,MAAMG,EAAQF,EAAkB,QAAQ,MACxC,cAAK,IAAIE,EAAO,CAAE,QAAS,CAAE,CAAC,EAC9B,gBAAc,OAAO,CACnB,QAASH,EAAS,QAClB,MAAO,oBACP,IAAK,WAAWE,EAAS,IAAM,EAAE,gBACjC,MAAO,GACP,SAAWE,GAAc,CACvB,MAAMC,EAAWD,EAAK,SAChBE,EAAQH,EAAM,OACdI,EAAW,EAAID,EACfE,EAAU,GAChBL,EAAM,QAAQ,CAACM,EAAWC,IAAc,CACtC,MAAMC,EAASD,EAAIJ,GAAU,EAAIE,GAC3BI,EAAQL,GAAY,EAAIC,GAC9B,IAAIK,GAAWR,EAAWM,GAASC,EACnCC,EAAU,KAAK,IAAI,EAAG,KAAK,IAAIA,EAAS,CAAC,CAAC,EAC1C,OAAK,IAAIJ,EAAM,CAAE,QAAAI,CAAQ,CAAC,CAC5B,CAAC,CACH,CACF,CAAC,EACM,IAAM,CACXZ,EAAkB,SAAWA,EAAkB,QAAQ,OAAO,EAC9D,gBAAc,OAAO,EAAE,QAASa,GAA2BA,EAAE,KAAK,CAAC,CACrE,CACF,EAAG,CAAC,CAAC,EAGHhB,MACE,OAAC,OAAI,aAAW,MAAG,uCAAwCD,EAAW,CAAE,YAAaE,IAAU,MAAO,CAAC,EACrG,mBAAC,WAAQ,IAAKC,EAAU,GAAG,KAAK,KAAM,EAAG,KAAMF,EAAO,EACxD,CAGN,CAAC,EAEDJ,EAAM,YAAc,QAEpB,IAAOV,KAAQ,cAAWU,CAAK",
|
|
6
6
|
"names": ["Title_exports", "__export", "Title_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_gsap", "import_SplitText", "import_ScrollTrigger", "import_utils", "import_components", "import_Styles", "Title", "React", "data", "className", "title", "theme", "titleRef", "splitTextInstance", "height", "words", "self", "progress", "total", "interval", "overlap", "word", "i", "start", "width", "opacity", "t"]
|
|
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
|
-
"use strict";var g=Object.create;var l=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,
|
|
1
|
+
"use strict";var g=Object.create;var l=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var I=(r,a)=>{for(var t in a)l(r,t,{get:a[t],enumerable:!0})},u=(r,a,t,p)=>{if(a&&typeof a=="object"||typeof a=="function")for(let f of L(a))!v.call(r,f)&&f!==t&&l(r,f,{get:()=>a[f],enumerable:!(p=E(a,f))||p.enumerable});return r};var e=(r,a,t)=>(t=r!=null?g(j(r)):{},u(a||!r||!r.__esModule?l(t,"default",{value:r,enumerable:!0}):t,r)),T=r=>u(l({},"__esModule",{value:!0}),r);var b={};I(b,{AccordionCards:()=>B.default,AiuiProvider:()=>S.default,BrandEquity:()=>i.default,Category:()=>y.default,Evaluate:()=>n.default,Graphic:()=>h.default,GraphicAttractionBlock:()=>C.default,HeroBanner:()=>M.default,Marquee:()=>P.default,MarqueeImageContent:()=>o.MarqueeImageContent,MarqueeItem:()=>o.MarqueeItem,MarqueeTextContent:()=>o.MarqueeTextContent,MediaPlayerBase:()=>k.default,MediaPlayerMulti:()=>q.default,MediaPlayerSticky:()=>G.default,MemberEquity:()=>d.default,MultiLayoutGraphicBlock:()=>A.default,ShelfDisplay:()=>c.default,Slogan:()=>s.default,Spacer:()=>x.default,Title:()=>m.default});module.exports=T(b);var i=e(require("./BrandEquity/index.js")),d=e(require("./MemberEquity/index.js")),s=e(require("./Slogan/index.js")),m=e(require("./Title/index.js")),x=e(require("./Spacer/index.js")),c=e(require("./ShelfDisplay/index.js")),n=e(require("./Evaluate/index.js")),y=e(require("./Category/index.js")),M=e(require("./HeroBanner/index.js")),B=e(require("./AccordionCards/index.js")),h=e(require("./Graphic/index.js")),k=e(require("./MediaPlayerBase/index.js")),G=e(require("./MediaPlayerSticky/index.js")),q=e(require("./MediaPlayerMulti/index.js")),P=e(require("./Marquee/index.js")),o=require("./Marquee/index.js"),A=e(require("./MultiLayoutGraphicBlock/index.js")),C=e(require("./GraphicAttractionBlock/index.js")),S=e(require("./AiuiProvider/index.js"));
|
|
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": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,
|
|
6
|
-
"names": ["biz_components_exports", "__export", "__toCommonJS", "
|
|
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": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,2mBAAAE,EAAAF,GAAA,IAAAG,EAAuC,qCACvCC,EAAwC,sCACxCC,EAAkC,gCAClCC,EAAiC,+BACjCC,EAAkC,gCAClCC,EAAwC,sCACxCC,EAAoC,kCACpCC,EAAoC,kCACpCC,EAAsC,oCACtCC,EAA0C,wCAC1CC,EAAmC,iCACnCC,EAA2C,yCAC3CC,EAA6C,2CAC7CC,EAA4C,0CAC5CC,EAAmC,iCACnCA,EAAqE,8BACrEC,EAAmD,iDAEnDC,EAAkD,gDAGlDC,EAAwC",
|
|
6
|
+
"names": ["biz_components_exports", "__export", "__toCommonJS", "import_BrandEquity", "import_MemberEquity", "import_Slogan", "import_Title", "import_Spacer", "import_ShelfDisplay", "import_Evaluate", "import_Category", "import_HeroBanner", "import_AccordionCards", "import_Graphic", "import_MediaPlayerBase", "import_MediaPlayerSticky", "import_MediaPlayerMulti", "import_Marquee", "import_MultiLayoutGraphicBlock", "import_GraphicAttractionBlock", "import_AiuiProvider"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var
|
|
1
|
+
"use strict";"use client";var C=Object.create;var c=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var S=(e,t)=>{for(var a in t)c(e,a,{get:t[a],enumerable:!0})},d=(e,t,a,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of F(t))!h.call(e,i)&&i!==a&&c(e,i,{get:()=>t[i],enumerable:!(l=E(t,i))||l.enumerable});return e};var P=(e,t,a)=>(a=e!=null?C(I(e)):{},d(t||!e||!e.__esModule?c(a,"default",{value:e,enumerable:!0}):a,e)),M=e=>d(c({},"__esModule",{value:!0}),e);var W={};S(W,{Avatar:()=>p,AvatarFallback:()=>v,AvatarImage:()=>u});module.exports=M(W);var s=require("react/jsx-runtime"),r=require("react"),b=P(require("fitty")),n=P(require("@radix-ui/react-avatar")),A=require("class-variance-authority"),o=require("../helpers/index.js");const V=(0,A.cva)("tracking transition-colors",{variants:{size:{small:"size-8 text-sm",medium:"size-10 text-xl",large:"size-12 text-2xl"}}}),p=(0,r.forwardRef)(({className:e,textClassName:t,isAdaptation:a=!1,minSize:l=4,maxSize:i=16,children:y,style:R,size:x="small",onClick:g,...N},k)=>{const f=(0,r.useRef)(null),z=m=>{g?.(m)};return(0,r.useEffect)(()=>{let m;return a&&f.current&&(m=(0,b.default)?.(f.current,{minSize:l,maxSize:i})),()=>m?.unsubscribe?.()},[]),(0,s.jsx)(n.Root,{ref:k,onClick:z,className:(0,o.cn)(V({size:x}),"bg-container-secondary-0 text-info-primary relative flex shrink-0 items-center justify-center overflow-hidden rounded-full",e),...R?{style:R}:null,...N,children:a?(0,s.jsx)("span",{className:"bg-muted flex size-full items-center justify-center rounded-full",children:(0,s.jsx)("span",{ref:f,className:(0,o.cn)("px-2",t),children:y})}):y})});p.displayName="Avatar";const u=(0,r.forwardRef)(({className:e,...t},a)=>(0,s.jsx)(n.Image,{ref:a,className:(0,o.cn)("aspect-square size-full",e),...t}));u.displayName=n.Image.displayName;const v=(0,r.forwardRef)(({className:e,...t},a)=>(0,s.jsx)(n.Fallback,{ref:a,className:(0,o.cn)("bg-muted flex size-full items-center justify-center rounded-full",e),...t}));v.displayName=n.Fallback.displayName;
|
|
2
2
|
//# sourceMappingURL=avatar.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/avatar.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\n\nimport React, { useEffect, useRef, forwardRef } from 'react'\nimport fitty from 'fitty'\nimport type { FittyInstance } from 'fitty'\nimport * as AvatarPrimitive from '@radix-ui/react-avatar'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport { cn } from '../helpers/index.js'\n\n// \u5B9A\u4E49 avatar \u7684\u6837\u5F0F\u53D8\u4F53\nconst avatarVariants = cva('tracking transition-colors', {\n variants: {\n size: {\n small: 'size-8', // \u5C0F\n medium: 'size-10', // \u4E2D\n large: 'size-12', // \u5927\n },\n },\n})\n\ntype AvatarProps = {\n /** \u5B9A\u4E49\u5B50\u7EC4\u4EF6\u4F5C\u4E3A\u7236\u7EC4\u4EF6\u7684\u7C7B\u578B,\u8BE6\u7EC6\u4F7F\u7528\u65B9\u5F0F\u8BF7\u53C2\u8003radix-ui */\n asChild?: boolean\n /** \u7C7B\u540D*/\n className?: string\n /** \u6837\u5F0F*/\n style?: React.CSSProperties\n /** \u70B9\u51FB\u4E8B\u4EF6*/\n onClick?: Function\n /** \u6587\u672C\u81EA\u9002\u5E94*/\n isAdaptation?: boolean\n /** \u6587\u672C\u81EA\u9002\u5E94\u6700\u5C0F\u5B57\u4F53, \u5F00\u542F\u65F6\u751F\u6548*/\n minSize?: number\n /** \u6587\u672C\u81EA\u9002\u5E94\u6700\u5927\u5B57\u4F53, \u5F00\u542F\u65F6\u751F\u6548*/\n maxSize?: number\n /** \u6587\u672C\u81EA\u9002\u5E94\u7684\u7C7B, \u5F00\u542F\u65F6\u751F\u6548*/\n textClassName?: string\n} & VariantProps<typeof avatarVariants> &\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>\n\nconst Avatar = forwardRef<React.ElementRef<typeof AvatarPrimitive.Root>, AvatarProps>(\n (\n {\n className,\n textClassName,\n isAdaptation = false,\n minSize = 4,\n maxSize = 16,\n children,\n style,\n size = 'small',\n onClick,\n ...props\n },\n ref\n ) => {\n const textRef = useRef<HTMLDivElement>(null)\n // \u70B9\u51FB\u4E8B\u4EF6\n const handleClick = (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => {\n onClick?.(e)\n }\n\n useEffect(() => {\n let fittyInstance: FittyInstance\n if (isAdaptation && textRef.current) {\n fittyInstance = fitty?.(textRef.current, {\n minSize,\n maxSize,\n })\n }\n return () => fittyInstance?.unsubscribe?.()\n }, [])\n\n return (\n <AvatarPrimitive.Root\n ref={ref}\n onClick={handleClick}\n className={cn(\n avatarVariants({ size }),\n 'bg-container-secondary-0 text-info-primary relative flex shrink-0 items-center justify-center overflow-hidden rounded-full',\n className\n )}\n {...(style ? { style: style } : null)}\n {...props}\n >\n {isAdaptation ? (\n <span className=\"bg-muted flex size-full items-center justify-center rounded-full\">\n <span ref={textRef} className={cn('px-2', textClassName)}>\n {children}\n </span>\n </span>\n ) : (\n children\n )}\n </AvatarPrimitive.Root>\n )\n }\n)\n\nAvatar.displayName = 'Avatar'\n\nconst AvatarImage = forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Image>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Image ref={ref} className={cn('aspect-square size-full', className)} {...props} />\n))\n\nAvatarImage.displayName = AvatarPrimitive.Image.displayName\n\nconst AvatarFallback = forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Fallback>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>\n>(({ className, ...props }, ref) => {\n return (\n <AvatarPrimitive.Fallback\n ref={ref}\n className={cn('bg-muted flex size-full items-center justify-center rounded-full', className)}\n {...props}\n />\n )\n})\n\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName\n\nexport { Avatar, AvatarImage, AvatarFallback }\n"],
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,mBAAAC,EAAA,gBAAAC,IAAA,eAAAC,EAAAL,GAuFY,IAAAM,EAAA,6BArFZC,EAAqD,iBACrDC,EAAkB,oBAElBC,EAAiC,qCACjCC,EAAuC,oCACvCC,EAAmB,+BAGnB,MAAMC,KAAiB,OAAI,6BAA8B,CACvD,SAAU,CACR,KAAM,CACJ,MAAO,
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport React, { useEffect, useRef, forwardRef } from 'react'\nimport fitty from 'fitty'\nimport type { FittyInstance } from 'fitty'\nimport * as AvatarPrimitive from '@radix-ui/react-avatar'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport { cn } from '../helpers/index.js'\n\n// \u5B9A\u4E49 avatar \u7684\u6837\u5F0F\u53D8\u4F53\nconst avatarVariants = cva('tracking transition-colors', {\n variants: {\n size: {\n small: 'size-8 text-sm', // \u5C0F\n medium: 'size-10 text-xl', // \u4E2D\n large: 'size-12 text-2xl', // \u5927\n },\n },\n})\n\ntype AvatarProps = {\n /** \u5B9A\u4E49\u5B50\u7EC4\u4EF6\u4F5C\u4E3A\u7236\u7EC4\u4EF6\u7684\u7C7B\u578B,\u8BE6\u7EC6\u4F7F\u7528\u65B9\u5F0F\u8BF7\u53C2\u8003radix-ui */\n asChild?: boolean\n /** \u7C7B\u540D*/\n className?: string\n /** \u6837\u5F0F*/\n style?: React.CSSProperties\n /** \u70B9\u51FB\u4E8B\u4EF6*/\n onClick?: Function\n /** \u6587\u672C\u81EA\u9002\u5E94*/\n isAdaptation?: boolean\n /** \u6587\u672C\u81EA\u9002\u5E94\u6700\u5C0F\u5B57\u4F53, \u5F00\u542F\u65F6\u751F\u6548*/\n minSize?: number\n /** \u6587\u672C\u81EA\u9002\u5E94\u6700\u5927\u5B57\u4F53, \u5F00\u542F\u65F6\u751F\u6548*/\n maxSize?: number\n /** \u6587\u672C\u81EA\u9002\u5E94\u7684\u7C7B, \u5F00\u542F\u65F6\u751F\u6548*/\n textClassName?: string\n} & VariantProps<typeof avatarVariants> &\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>\n\nconst Avatar = forwardRef<React.ElementRef<typeof AvatarPrimitive.Root>, AvatarProps>(\n (\n {\n className,\n textClassName,\n isAdaptation = false,\n minSize = 4,\n maxSize = 16,\n children,\n style,\n size = 'small',\n onClick,\n ...props\n },\n ref\n ) => {\n const textRef = useRef<HTMLDivElement>(null)\n // \u70B9\u51FB\u4E8B\u4EF6\n const handleClick = (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => {\n onClick?.(e)\n }\n\n useEffect(() => {\n let fittyInstance: FittyInstance\n if (isAdaptation && textRef.current) {\n fittyInstance = fitty?.(textRef.current, {\n minSize,\n maxSize,\n })\n }\n return () => fittyInstance?.unsubscribe?.()\n }, [])\n\n return (\n <AvatarPrimitive.Root\n ref={ref}\n onClick={handleClick}\n className={cn(\n avatarVariants({ size }),\n 'bg-container-secondary-0 text-info-primary relative flex shrink-0 items-center justify-center overflow-hidden rounded-full',\n className\n )}\n {...(style ? { style: style } : null)}\n {...props}\n >\n {isAdaptation ? (\n <span className=\"bg-muted flex size-full items-center justify-center rounded-full\">\n <span ref={textRef} className={cn('px-2', textClassName)}>\n {children}\n </span>\n </span>\n ) : (\n children\n )}\n </AvatarPrimitive.Root>\n )\n }\n)\n\nAvatar.displayName = 'Avatar'\n\nconst AvatarImage = forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Image>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Image ref={ref} className={cn('aspect-square size-full', className)} {...props} />\n))\n\nAvatarImage.displayName = AvatarPrimitive.Image.displayName\n\nconst AvatarFallback = forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Fallback>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>\n>(({ className, ...props }, ref) => {\n return (\n <AvatarPrimitive.Fallback\n ref={ref}\n className={cn('bg-muted flex size-full items-center justify-center rounded-full', className)}\n {...props}\n />\n )\n})\n\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName\n\nexport { Avatar, AvatarImage, AvatarFallback }\n"],
|
|
5
|
+
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,mBAAAC,EAAA,gBAAAC,IAAA,eAAAC,EAAAL,GAuFY,IAAAM,EAAA,6BArFZC,EAAqD,iBACrDC,EAAkB,oBAElBC,EAAiC,qCACjCC,EAAuC,oCACvCC,EAAmB,+BAGnB,MAAMC,KAAiB,OAAI,6BAA8B,CACvD,SAAU,CACR,KAAM,CACJ,MAAO,iBACP,OAAQ,kBACR,MAAO,kBACT,CACF,CACF,CAAC,EAsBKV,KAAS,cACb,CACE,CACE,UAAAW,EACA,cAAAC,EACA,aAAAC,EAAe,GACf,QAAAC,EAAU,EACV,QAAAC,EAAU,GACV,SAAAC,EACA,MAAAC,EACA,KAAAC,EAAO,QACP,QAAAC,EACA,GAAGC,CACL,EACAC,IACG,CACH,MAAMC,KAAU,UAAuB,IAAI,EAErCC,EAAeC,GAAqD,CACxEL,IAAUK,CAAC,CACb,EAEA,sBAAU,IAAM,CACd,IAAIC,EACJ,OAAIZ,GAAgBS,EAAQ,UAC1BG,KAAgB,EAAAC,WAAQJ,EAAQ,QAAS,CACvC,QAAAR,EACA,QAAAC,CACF,CAAC,GAEI,IAAMU,GAAe,cAAc,CAC5C,EAAG,CAAC,CAAC,KAGH,OAAClB,EAAgB,KAAhB,CACC,IAAKc,EACL,QAASE,EACT,aAAW,MACTb,EAAe,CAAE,KAAAQ,CAAK,CAAC,EACvB,6HACAP,CACF,EACC,GAAIM,EAAQ,CAAE,MAAOA,CAAM,EAAI,KAC/B,GAAGG,EAEH,SAAAP,KACC,OAAC,QAAK,UAAU,mEACd,mBAAC,QAAK,IAAKS,EAAS,aAAW,MAAG,OAAQV,CAAa,EACpD,SAAAI,EACH,EACF,EAEAA,EAEJ,CAEJ,CACF,EAEAhB,EAAO,YAAc,SAErB,MAAME,KAAc,cAGlB,CAAC,CAAE,UAAAS,EAAW,GAAGS,CAAM,EAAGC,OAC1B,OAACd,EAAgB,MAAhB,CAAsB,IAAKc,EAAK,aAAW,MAAG,0BAA2BV,CAAS,EAAI,GAAGS,EAAO,CAClG,EAEDlB,EAAY,YAAcK,EAAgB,MAAM,YAEhD,MAAMN,KAAiB,cAGrB,CAAC,CAAE,UAAAU,EAAW,GAAGS,CAAM,EAAGC,OAExB,OAACd,EAAgB,SAAhB,CACC,IAAKc,EACL,aAAW,MAAG,mEAAoEV,CAAS,EAC1F,GAAGS,EACN,CAEH,EAEDnB,EAAe,YAAcM,EAAgB,SAAS",
|
|
6
6
|
"names": ["avatar_exports", "__export", "Avatar", "AvatarFallback", "AvatarImage", "__toCommonJS", "import_jsx_runtime", "import_react", "import_fitty", "AvatarPrimitive", "import_class_variance_authority", "import_helpers", "avatarVariants", "className", "textClassName", "isAdaptation", "minSize", "maxSize", "children", "style", "size", "onClick", "props", "ref", "textRef", "handleClick", "e", "fittyInstance", "fitty"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var a=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var f=(e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})},u=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of d(t))!l.call(e,o)&&o!==n&&a(e,o,{get:()=>t[o],enumerable:!(r=x(t,o))||r.enumerable});return e};var c=e=>u(a({},"__esModule",{value:!0}),e);var V={};f(V,{default:()=>m});module.exports=c(V);var s=require("react/jsx-runtime"),P=require("react"),i=require("class-variance-authority"),p=require("../helpers/index.js");const b=(0,i.cva)("text-brand-0 outline-brand-0 inline-flex items-center justify-center rounded-[16px] border-none text-xs font-bold outline outline-[1.6px] outline-offset-[-1.6px] backdrop-blur-sm transition-colors focus:outline-none",{variants:{size:{sm:"px-[6px] pb-[3px] pt-[4px] text-[14px] leading-tight",lg:"px-[8px] pb-[4px] pt-[5px] text-[16px] leading-tight"}},defaultVariants:{size:"lg"}});function g({className:e,size:t,...n}){return(0,s.jsx)("div",{className:(0,p.cn)(b({size:t}),e),...n})}var m=g;
|
|
2
2
|
//# sourceMappingURL=badge.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/badge.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react'\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '../helpers/index.js'\n\nconst badgeVariants = cva(\n 'text-brand-0
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAuBS,IAAAI,EAAA,6BAvBTC,EAAuB,iBACvBC,EAAuC,oCAEvCC,EAAmB,+BAEnB,MAAMC,KAAgB,OACpB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react'\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '../helpers/index.js'\n\nconst badgeVariants = cva(\n 'text-brand-0 outline-brand-0 inline-flex items-center justify-center rounded-[16px] border-none text-xs font-bold outline outline-[1.6px] outline-offset-[-1.6px] backdrop-blur-sm transition-colors focus:outline-none',\n {\n variants: {\n size: {\n sm: 'px-[6px] pb-[3px] pt-[4px] text-[14px] leading-tight',\n lg: 'px-[8px] pb-[4px] pt-[5px] text-[16px] leading-tight',\n },\n },\n defaultVariants: {\n size: 'lg',\n },\n }\n)\n\nexport interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, size, ...props }: BadgeProps) {\n return <div className={cn(badgeVariants({ size }), className)} {...props} />\n}\n\nexport default Badge\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAuBS,IAAAI,EAAA,6BAvBTC,EAAuB,iBACvBC,EAAuC,oCAEvCC,EAAmB,+BAEnB,MAAMC,KAAgB,OACpB,0NACA,CACE,SAAU,CACR,KAAM,CACJ,GAAI,uDACJ,GAAI,sDACN,CACF,EACA,gBAAiB,CACf,KAAM,IACR,CACF,CACF,EAIA,SAASC,EAAM,CAAE,UAAAC,EAAW,KAAAC,EAAM,GAAGC,CAAM,EAAe,CACxD,SAAO,OAAC,OAAI,aAAW,MAAGJ,EAAc,CAAE,KAAAG,CAAK,CAAC,EAAGD,CAAS,EAAI,GAAGE,EAAO,CAC5E,CAEA,IAAOV,EAAQO",
|
|
6
6
|
"names": ["badge_exports", "__export", "badge_default", "__toCommonJS", "import_jsx_runtime", "React", "import_class_variance_authority", "import_helpers", "badgeVariants", "Badge", "className", "size", "props"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var w=Object.create;var i=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var V=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty;var z=(e,
|
|
1
|
+
"use strict";"use client";var w=Object.create;var i=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var V=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty;var z=(e,t)=>{for(var a in t)i(e,a,{get:t[a],enumerable:!0})},f=(e,t,a,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of B(t))!L.call(e,o)&&o!==a&&i(e,o,{get:()=>t[o],enumerable:!(n=k(t,o))||n.enumerable});return e};var p=(e,t,a)=>(a=e!=null?w(V(e)):{},f(t||!e||!e.__esModule?i(a,"default",{value:e,enumerable:!0}):a,e)),E=e=>f(i({},"__esModule",{value:!0}),e);var I={};z(I,{default:()=>R});module.exports=E(I);var r=require("react/jsx-runtime"),C=p(require("react")),u=require("@radix-ui/react-slot"),y=require("@radix-ui/react-visually-hidden"),d=require("class-variance-authority"),m=p(require("../icons/spinner.js")),g=require("../helpers/index.js");const H={sm:{width:"16",height:"16"},base:{width:"18",height:"18"},lg:{width:"20",height:"20"}},M=({size:e="base"})=>{const{width:t,height:a}=H[e];return(0,r.jsx)("svg",{width:t,height:a,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M7.5 5L12.5 10L7.5 15",stroke:"currentColor",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})},N=(0,d.cva)("rounded-btn inline-flex items-center justify-center text-sm font-bold focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none",{variants:{variant:{primary:"bg-btn-primary text-btn-primary-foreground hover:bg-btn-primary-active hover:text-btn-primary-active-foreground hover:bg-gradient-brand border-none ",secondary:"bg-btn-secondary outline-btn-primary text-btn-secondary-foreground hover:bg-btn-secondary-active hover:text-btn-secondary-active-foreground border-solid outline outline-[1.6px] outline-offset-[-1.6px]",link:"text-info-primary hover:text-btn-primary-active border-none",ghost:"text-info-primary hover:bg-btn-primary hover:text-btn-primary-foreground"},size:{sm:"px-3 py-2 text-[12px] leading-tight",base:"px-5 pb-[10px] pt-[11px] text-[14px] leading-tight",lg:"px-7 pb-[14px] pt-[15px] text-[16px] leading-tight",icon:"size-10 rounded-full leading-tight"},hoverEffect:{none:"",slide:""},state:{default:"",disabled:"",loading:""}},compoundVariants:[{variant:"primary",hoverEffect:"slide",class:'before:rounded-btn hover:!bg-btn-primary before:bg-btn-primary-active relative z-[1] overflow-hidden before:absolute before:inset-y-0 before:-z-[1] before:w-full before:-translate-x-full before:transition-transform before:duration-300 before:ease-in-out before:content-[""] hover:before:translate-x-0'},{variant:"secondary",hoverEffect:"slide",class:'before:rounded-btn hover:!bg-btn-secondary before:bg-btn-secondary-active relative z-[1] overflow-hidden before:absolute before:inset-y-0 before:-z-[1] before:w-full before:-translate-x-full before:transition-transform before:duration-300 before:ease-in-out before:content-[""] hover:before:translate-x-0'},{variant:"primary",state:"loading",class:"bg-btn-primary-active disabled:border-btn-primary-disabled-border"},{variant:"secondary",state:"loading",class:"bg-btn-secondary disabled:bg-btn-secondary-disabled disabled:text-btn-secondary-disabled-foreground disabled:border-btn-primary-disabled"},{variant:"primary",state:"disabled",class:"disabled:bg-btn-primary-disabled disabled:text-btn-primary-disabled-foreground disabled:border-btn-primary-disabled"},{variant:"secondary",state:"disabled",class:"disabled:bg-btn-secondary-disabled disabled:text-btn-secondary-disabled-foreground disabled:border-btn-secondary-disabled-border"},{variant:"link",state:"disabled",class:"disabled:text-info-quaternary"}],defaultVariants:{variant:"primary",size:"base",hoverEffect:"none",state:"default"}}),P=(0,d.cva)("",{variants:{variant:{primary:"stroke-btn-primary-foreground",secondary:"stroke-btn-secondary-foreground",link:"stroke-primary",ghost:"stroke-primary"}},defaultVariants:{variant:"primary"}}),c=C.forwardRef(({asChild:e=!1,size:t="base",children:a,variant:n,hoverEffect:o="none",className:v,disabled:b=!1,loading:s=!1,spinner:l,...h},x)=>(0,r.jsx)(e?u.Slot:"button",{disabled:b||s,className:(0,g.cn)(N({variant:n,size:t,hoverEffect:o,state:s?"loading":b?"disabled":"default"}),v),ref:x,...h,children:s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0,children:a}),(0,r.jsx)("span",{className:"absolute",children:l||(0,r.jsx)(m.default,{className:P({variant:n})})}),(0,r.jsx)(y.VisuallyHidden,{children:a})]}):(0,r.jsxs)(r.Fragment,{children:[a,n==="link"&&t&&t!=="icon"&&(0,r.jsx)(M,{size:t})]})}));c.displayName="Button";var R=c;
|
|
2
2
|
//# sourceMappingURL=button.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/button.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport Spinner from '../icons/spinner.js'\nimport { cn } from '../helpers/index.js'\n\nconst sizeMap = {\n sm: {\n width: '16',\n height: '16',\n },\n base: {\n width: '18',\n height: '18',\n },\n lg: {\n width: '20',\n height: '20',\n },\n}\nconst LinkButtonAppendIcon = ({ size = 'base' }: { size: 'base' | 'lg' | 'sm' }) => {\n const { width, height } = sizeMap[size]\n return (\n <svg width={width} height={height} viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M7.5 5L12.5 10L7.5 15\"\n stroke=\"currentColor\"\n strokeWidth=\"1.66667\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n )\n}\n\n/**\n * Button Variants\n */\n// eslint-disable-next-line tailwindcss/enforces-negative-arbitrary-values\nconst buttonVariants = cva(\n '
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA2BM,IAAAI,EAAA,6BAzBNC,EAAuB,oBACvBC,EAAqB,gCACrBC,EAA+B,2CAC/BC,EAAuC,oCACvCC,EAAoB,kCACpBC,EAAmB,+BAEnB,MAAMC,EAAU,CACd,GAAI,CACF,MAAO,KACP,OAAQ,IACV,EACA,KAAM,CACJ,MAAO,KACP,OAAQ,IACV,EACA,GAAI,CACF,MAAO,KACP,OAAQ,IACV,CACF,EACMC,EAAuB,CAAC,CAAE,KAAAC,EAAO,MAAO,IAAsC,CAClF,KAAM,CAAE,MAAAC,EAAO,OAAAC,CAAO,EAAIJ,EAAQE,CAAI,EACtC,SACE,OAAC,OAAI,MAAOC,EAAO,OAAQC,EAAQ,QAAQ,YAAY,KAAK,OAAO,MAAM,6BACvE,mBAAC,QACC,EAAE,wBACF,OAAO,eACP,YAAY,UACZ,cAAc,QACd,eAAe,QACjB,EACF,CAEJ,EAMMC,KAAiB,OACrB,
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport Spinner from '../icons/spinner.js'\nimport { cn } from '../helpers/index.js'\n\nconst sizeMap = {\n sm: {\n width: '16',\n height: '16',\n },\n base: {\n width: '18',\n height: '18',\n },\n lg: {\n width: '20',\n height: '20',\n },\n}\nconst LinkButtonAppendIcon = ({ size = 'base' }: { size: 'base' | 'lg' | 'sm' }) => {\n const { width, height } = sizeMap[size]\n return (\n <svg width={width} height={height} viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M7.5 5L12.5 10L7.5 15\"\n stroke=\"currentColor\"\n strokeWidth=\"1.66667\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n )\n}\n\n/**\n * Button Variants\n */\n// eslint-disable-next-line tailwindcss/enforces-negative-arbitrary-values\nconst buttonVariants = cva(\n 'rounded-btn inline-flex items-center justify-center text-sm font-bold focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none',\n {\n variants: {\n variant: {\n primary:\n 'bg-btn-primary text-btn-primary-foreground hover:bg-btn-primary-active hover:text-btn-primary-active-foreground hover:bg-gradient-brand border-none ',\n secondary:\n 'bg-btn-secondary outline-btn-primary text-btn-secondary-foreground hover:bg-btn-secondary-active hover:text-btn-secondary-active-foreground border-solid outline outline-[1.6px] outline-offset-[-1.6px]',\n link: 'text-info-primary hover:text-btn-primary-active border-none',\n ghost: 'text-info-primary hover:bg-btn-primary hover:text-btn-primary-foreground',\n },\n size: {\n sm: 'px-3 py-2 text-[12px] leading-tight',\n base: 'px-5 pb-[10px] pt-[11px] text-[14px] leading-tight',\n lg: 'px-7 pb-[14px] pt-[15px] text-[16px] leading-tight',\n icon: 'size-10 rounded-full leading-tight',\n },\n /** hover \u72B6\u6001\u4E0B\u7684\u52A8\u753B\u6548\u679C,\u9700\u8981\u6CE8\u610F\u4E0D\u540Cvariant \u4E0B\u7684\u6548\u679C */\n hoverEffect: {\n none: '',\n slide: '',\n },\n state: {\n default: '',\n disabled: '',\n loading: '',\n },\n },\n compoundVariants: [\n {\n variant: 'primary',\n hoverEffect: 'slide',\n class:\n 'before:rounded-btn hover:!bg-btn-primary before:bg-btn-primary-active relative z-[1] overflow-hidden before:absolute before:inset-y-0 before:-z-[1] before:w-full before:-translate-x-full before:transition-transform before:duration-300 before:ease-in-out before:content-[\"\"] hover:before:translate-x-0',\n },\n {\n variant: 'secondary',\n hoverEffect: 'slide',\n class:\n 'before:rounded-btn hover:!bg-btn-secondary before:bg-btn-secondary-active relative z-[1] overflow-hidden before:absolute before:inset-y-0 before:-z-[1] before:w-full before:-translate-x-full before:transition-transform before:duration-300 before:ease-in-out before:content-[\"\"] hover:before:translate-x-0',\n },\n {\n variant: 'primary',\n state: 'loading',\n class: 'bg-btn-primary-active disabled:border-btn-primary-disabled-border',\n },\n {\n variant: 'secondary',\n state: 'loading',\n class:\n 'bg-btn-secondary disabled:bg-btn-secondary-disabled disabled:text-btn-secondary-disabled-foreground disabled:border-btn-primary-disabled',\n },\n {\n variant: 'primary',\n state: 'disabled',\n class:\n 'disabled:bg-btn-primary-disabled disabled:text-btn-primary-disabled-foreground disabled:border-btn-primary-disabled',\n },\n {\n variant: 'secondary',\n state: 'disabled',\n class:\n 'disabled:bg-btn-secondary-disabled disabled:text-btn-secondary-disabled-foreground disabled:border-btn-secondary-disabled-border',\n },\n {\n variant: 'link',\n state: 'disabled',\n class: 'disabled:text-info-quaternary',\n },\n ],\n defaultVariants: {\n variant: 'primary',\n size: 'base',\n hoverEffect: 'none',\n state: 'default',\n },\n }\n)\n\nconst loadingSvgVariants = cva('', {\n variants: {\n variant: {\n primary: 'stroke-btn-primary-foreground',\n secondary: 'stroke-btn-secondary-foreground',\n link: 'stroke-primary',\n ghost: 'stroke-primary',\n },\n },\n defaultVariants: {\n variant: 'primary',\n },\n})\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n /** \u8BBE\u7F6E\u6309\u94AE\u8F7D\u5165\u72B6\u6001 */\n loading?: boolean\n /** \u8BBE\u7F6E\u6309\u94AE\u5931\u6548\u72B6\u6001 */\n disabled?: boolean\n /** \u5B9A\u4E49\u81EA\u7EC4\u4EF6\u4F5C\u4E3A\u7236\u7EC4\u4EF6\u7684\u7C7B\u578B\uFF0C \u8BE6\u7EC6\u4F7F\u7528\u65B9\u5F0F\u8BF7\u53C2\u8003radix-ui (\u5DF2\u4F5C\u5E9F\u8BF7\u52FF\u4F7F\u7528) */\n asChild?: boolean\n /** \u81EA\u5B9A\u4E49loading */\n spinner?: React.ReactNode\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n asChild = false,\n size = 'base',\n children,\n variant,\n hoverEffect = 'none',\n className,\n disabled = false,\n loading = false,\n spinner,\n ...props\n }: ButtonProps,\n ref\n ) => {\n const Comp = asChild ? Slot : 'button'\n const isInactive = disabled || loading\n const state = loading ? 'loading' : disabled ? 'disabled' : 'default'\n\n return (\n <Comp\n disabled={isInactive}\n className={cn(buttonVariants({ variant, size, hoverEffect, state }), className)}\n ref={ref}\n {...props}\n >\n {loading ? (\n <>\n <span style={{ display: 'contents', visibility: 'hidden' }} aria-hidden>\n {children}\n </span>\n <span className=\"absolute\">\n {spinner ? (\n spinner\n ) : (\n <Spinner\n className={loadingSvgVariants({\n variant,\n })}\n />\n )}\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n </>\n ) : (\n <>\n {children}\n {variant === 'link' && size && size !== 'icon' && <LinkButtonAppendIcon size={size} />}\n </>\n )}\n </Comp>\n )\n }\n)\n\nButton.displayName = 'Button'\nexport default Button\n"],
|
|
5
|
+
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA2BM,IAAAI,EAAA,6BAzBNC,EAAuB,oBACvBC,EAAqB,gCACrBC,EAA+B,2CAC/BC,EAAuC,oCACvCC,EAAoB,kCACpBC,EAAmB,+BAEnB,MAAMC,EAAU,CACd,GAAI,CACF,MAAO,KACP,OAAQ,IACV,EACA,KAAM,CACJ,MAAO,KACP,OAAQ,IACV,EACA,GAAI,CACF,MAAO,KACP,OAAQ,IACV,CACF,EACMC,EAAuB,CAAC,CAAE,KAAAC,EAAO,MAAO,IAAsC,CAClF,KAAM,CAAE,MAAAC,EAAO,OAAAC,CAAO,EAAIJ,EAAQE,CAAI,EACtC,SACE,OAAC,OAAI,MAAOC,EAAO,OAAQC,EAAQ,QAAQ,YAAY,KAAK,OAAO,MAAM,6BACvE,mBAAC,QACC,EAAE,wBACF,OAAO,eACP,YAAY,UACZ,cAAc,QACd,eAAe,QACjB,EACF,CAEJ,EAMMC,KAAiB,OACrB,iLACA,CACE,SAAU,CACR,QAAS,CACP,QACE,uJACF,UACE,2MACF,KAAM,8DACN,MAAO,0EACT,EACA,KAAM,CACJ,GAAI,uCACJ,KAAM,qDACN,GAAI,sDACJ,KAAM,qCACR,EAEA,YAAa,CACX,KAAM,GACN,MAAO,EACT,EACA,MAAO,CACL,QAAS,GACT,SAAU,GACV,QAAS,EACX,CACF,EACA,iBAAkB,CAChB,CACE,QAAS,UACT,YAAa,QACb,MACE,8SACJ,EACA,CACE,QAAS,YACT,YAAa,QACb,MACE,mTACJ,EACA,CACE,QAAS,UACT,MAAO,UACP,MAAO,mEACT,EACA,CACE,QAAS,YACT,MAAO,UACP,MACE,0IACJ,EACA,CACE,QAAS,UACT,MAAO,WACP,MACE,qHACJ,EACA,CACE,QAAS,YACT,MAAO,WACP,MACE,kIACJ,EACA,CACE,QAAS,OACT,MAAO,WACP,MAAO,+BACT,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,OACN,YAAa,OACb,MAAO,SACT,CACF,CACF,EAEMC,KAAqB,OAAI,GAAI,CACjC,SAAU,CACR,QAAS,CACP,QAAS,gCACT,UAAW,kCACX,KAAM,iBACN,MAAO,gBACT,CACF,EACA,gBAAiB,CACf,QAAS,SACX,CACF,CAAC,EAeKC,EAASb,EAAM,WACnB,CACE,CACE,QAAAc,EAAU,GACV,KAAAN,EAAO,OACP,SAAAO,EACA,QAAAC,EACA,YAAAC,EAAc,OACd,UAAAC,EACA,SAAAC,EAAW,GACX,QAAAC,EAAU,GACV,QAAAC,EACA,GAAGC,CACL,EACAC,OAOE,OALWT,EAAU,OAAO,SAK3B,CACC,SALeK,GAAYC,EAM3B,aAAW,MAAGT,EAAe,CAAE,QAAAK,EAAS,KAAAR,EAAM,YAAAS,EAAa,MALjDG,EAAU,UAAYD,EAAW,WAAa,SAKS,CAAC,EAAGD,CAAS,EAC9E,IAAKK,EACJ,GAAGD,EAEH,SAAAF,KACC,oBACE,oBAAC,QAAK,MAAO,CAAE,QAAS,WAAY,WAAY,QAAS,EAAG,cAAW,GACpE,SAAAL,EACH,KACA,OAAC,QAAK,UAAU,WACb,SAAAM,MAGC,OAAC,EAAAG,QAAA,CACC,UAAWZ,EAAmB,CAC5B,QAAAI,CACF,CAAC,EACH,EAEJ,KACA,OAAC,kBAAgB,SAAAD,EAAS,GAC5B,KAEA,oBACG,UAAAA,EACAC,IAAY,QAAUR,GAAQA,IAAS,WAAU,OAACD,EAAA,CAAqB,KAAMC,EAAM,GACtF,EAEJ,CAGN,EAEAK,EAAO,YAAc,SACrB,IAAOhB,EAAQgB",
|
|
6
6
|
"names": ["button_exports", "__export", "button_default", "__toCommonJS", "import_jsx_runtime", "React", "import_react_slot", "import_react_visually_hidden", "import_class_variance_authority", "import_spinner", "import_helpers", "sizeMap", "LinkButtonAppendIcon", "size", "width", "height", "buttonVariants", "loadingSvgVariants", "Button", "asChild", "children", "variant", "hoverEffect", "className", "disabled", "loading", "spinner", "props", "ref", "Spinner"]
|
|
7
7
|
}
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { Mode, SpaceY, SpaceTop, SpaceBottom } from '../types/props.js';
|
|
2
3
|
type ContainerProps = {
|
|
3
4
|
asChild?: boolean;
|
|
4
5
|
children?: React.ReactNode;
|
|
5
6
|
className?: string;
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
spaceY?: SpaceY;
|
|
8
|
+
spaceTop?: SpaceTop;
|
|
9
|
+
spaceBottom?: SpaceBottom;
|
|
10
|
+
mode?: Mode;
|
|
8
11
|
} & React.ComponentPropsWithoutRef<'div'>;
|
|
9
12
|
declare const Container: React.ForwardRefExoticComponent<{
|
|
10
13
|
asChild?: boolean;
|
|
11
14
|
children?: React.ReactNode;
|
|
12
15
|
className?: string;
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
spaceY?: SpaceY;
|
|
17
|
+
spaceTop?: SpaceTop;
|
|
18
|
+
spaceBottom?: SpaceBottom;
|
|
19
|
+
mode?: Mode;
|
|
15
20
|
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
21
|
export { Container };
|
|
17
22
|
export type { ContainerProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var u=Object.create;var c=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty;var P=(e,o)=>{for(var t in o)c(e,t,{get:o[t],enumerable:!0})},x=(e,o,t,a)=>{if(o&&typeof o=="object"||typeof o=="function")for(let p of S(o))!N.call(e,p)&&p!==t&&c(e,p,{get:()=>o[p],enumerable:!(a=g(o,p))||a.enumerable});return e};var v=(e,o,t)=>(t=e!=null?u(h(e)):{},x(o||!e||!e.__esModule?c(t,"default",{value:e,enumerable:!0}):t,e)),w=e=>x(c({},"__esModule",{value:!0}),e);var M={};P(M,{Container:()=>l});module.exports=w(M);var n=require("react/jsx-runtime"),r=v(require("react")),m=require("../helpers/utils.js"),f=require("@radix-ui/react-slot");const T=({children:e})=>(0,n.jsx)(n.Fragment,{children:e}),B=r.default.forwardRef(({...e},o)=>{const{asChild:t,children:a,className:p,spaceY:s="none",spaceTop:i="none",spaceBottom:d="none",...C}=e,y=t?f.Slot:"div",R={default:"tablet:my-[80px] laptop:my-[96px] desktop:my-[112px] lg-desktop:my-[128px] my-[64px]",none:""},b={default:"tablet:pt-[80px] laptop:pt-[96px] desktop:pt-[112px] lg-desktop:pt-[128px] pt-[64px]",none:""},k={default:"tablet:pb-[80px] laptop:pb-[96px] desktop:pb-[112px] lg-desktop:pb-[128px] pb-[64px]",none:""};return(0,n.jsx)(y,{...C,ref:o,className:(0,m.cn)(p,"ipc_container","relative z-10 w-full"),children:(0,n.jsx)("div",{className:(0,m.cn)(p,"desktop:max-w-[1792px] lg-desktop:max-w-full mx-auto w-full","tablet:px-8 laptop:px-16 desktop:px-16 lg-desktop:px-[calc(50%-832px)] px-4",R?.[s]||s,b?.[i]||i,k?.[d]||d),children:a})})}),l=r.default.forwardRef(({...e},o)=>{const{children:t,mode:a="section"}=e,s={section:B,fragment:T}[a];return(0,n.jsx)(s,{...e,ref:o,children:t})});l.displayName="Container";
|
|
2
2
|
//# sourceMappingURL=container.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/container.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react'\nimport { cn } from '../helpers/utils.js'\nimport { Slot } from '@radix-ui/react-slot'\n\ntype ContainerElement = React.ElementRef<'div'>\ntype ContainerProps = {\n asChild?: boolean\n children?: React.ReactNode\n className?: string\n
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,eAAAE,IAAA,eAAAC,EAAAH,
|
|
6
|
-
"names": ["container_exports", "__export", "Container", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_react_slot", "React", "props", "forwardedRef", "asChild", "
|
|
4
|
+
"sourcesContent": ["import React from 'react'\nimport { cn } from '../helpers/utils.js'\nimport { Slot } from '@radix-ui/react-slot'\nimport type { Mode, SpaceY, SpaceTop, SpaceBottom } from '../types/props.js'\n\ntype ContainerElement = React.ElementRef<'div'>\ntype ContainerProps = {\n asChild?: boolean\n children?: React.ReactNode\n className?: string\n spaceY?: SpaceY\n spaceTop?: SpaceTop\n spaceBottom?: SpaceBottom\n mode?: Mode\n} & React.ComponentPropsWithoutRef<'div'>\n\nconst Fragment = ({ children }: { children: React.ReactNode }) => {\n return <>{children}</>\n}\n\nconst Section = React.forwardRef<ContainerElement, ContainerProps>(({ ...props }, forwardedRef) => {\n const {\n asChild,\n children,\n className,\n spaceY = 'none',\n spaceTop = 'none',\n spaceBottom = 'none',\n ...containerProps\n } = props\n\n const Comp = asChild ? Slot : 'div'\n\n const spaceY_map: any = {\n default: 'tablet:my-[80px] laptop:my-[96px] desktop:my-[112px] lg-desktop:my-[128px] my-[64px]',\n none: '',\n }\n\n const spaceTop_map: any = {\n default: 'tablet:pt-[80px] laptop:pt-[96px] desktop:pt-[112px] lg-desktop:pt-[128px] pt-[64px]',\n none: '',\n }\n\n const spaceBottom_map: any = {\n default: 'tablet:pb-[80px] laptop:pb-[96px] desktop:pb-[112px] lg-desktop:pb-[128px] pb-[64px]',\n none: '',\n }\n\n return (\n <Comp {...containerProps} ref={forwardedRef} className={cn(className, 'ipc_container', 'relative z-10 w-full')}>\n <div\n className={cn(\n className,\n 'desktop:max-w-[1792px] lg-desktop:max-w-full mx-auto w-full',\n 'tablet:px-8 laptop:px-16 desktop:px-16 lg-desktop:px-[calc(50%-832px)] px-4',\n spaceY_map?.[spaceY] || spaceY,\n spaceTop_map?.[spaceTop] || spaceTop,\n spaceBottom_map?.[spaceBottom] || spaceBottom\n )}\n >\n {children}\n </div>\n </Comp>\n )\n})\n\nconst Container = React.forwardRef<ContainerElement, ContainerProps>(({ ...props }, forwardedRef) => {\n const { children, mode = 'section' } = props\n\n const componentsMap: {\n [P in Mode]: React.ComponentType<any> | string\n } = {\n section: Section,\n fragment: Fragment,\n }\n\n const Component = componentsMap![mode!]\n\n return (\n <Component {...props} ref={forwardedRef}>\n {children}\n </Component>\n )\n})\n\nContainer.displayName = 'Container'\n\nexport { Container }\nexport type { ContainerProps }\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,eAAAE,IAAA,eAAAC,EAAAH,GAiBS,IAAAI,EAAA,6BAjBTC,EAAkB,oBAClBC,EAAmB,+BACnBC,EAAqB,gCAcrB,MAAMC,EAAW,CAAC,CAAE,SAAAC,CAAS,OACpB,mBAAG,SAAAA,EAAS,EAGfC,EAAU,EAAAC,QAAM,WAA6C,CAAC,CAAE,GAAGC,CAAM,EAAGC,IAAiB,CACjG,KAAM,CACJ,QAAAC,EACA,SAAAL,EACA,UAAAM,EACA,OAAAC,EAAS,OACT,SAAAC,EAAW,OACX,YAAAC,EAAc,OACd,GAAGC,CACL,EAAIP,EAEEQ,EAAON,EAAU,OAAO,MAExBO,EAAkB,CACtB,QAAS,uFACT,KAAM,EACR,EAEMC,EAAoB,CACxB,QAAS,uFACT,KAAM,EACR,EAEMC,EAAuB,CAC3B,QAAS,uFACT,KAAM,EACR,EAEA,SACE,OAACH,EAAA,CAAM,GAAGD,EAAgB,IAAKN,EAAc,aAAW,MAAGE,EAAW,gBAAiB,sBAAsB,EAC3G,mBAAC,OACC,aAAW,MACTA,EACA,8DACA,8EACAM,IAAaL,CAAM,GAAKA,EACxBM,IAAeL,CAAQ,GAAKA,EAC5BM,IAAkBL,CAAW,GAAKA,CACpC,EAEC,SAAAT,EACH,EACF,CAEJ,CAAC,EAEKP,EAAY,EAAAS,QAAM,WAA6C,CAAC,CAAE,GAAGC,CAAM,EAAGC,IAAiB,CACnG,KAAM,CAAE,SAAAJ,EAAU,KAAAe,EAAO,SAAU,EAAIZ,EASjCa,EALF,CACF,QAASf,EACT,SAAUF,CACZ,EAEiCgB,CAAK,EAEtC,SACE,OAACC,EAAA,CAAW,GAAGb,EAAO,IAAKC,EACxB,SAAAJ,EACH,CAEJ,CAAC,EAEDP,EAAU,YAAc",
|
|
6
|
+
"names": ["container_exports", "__export", "Container", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_react_slot", "Fragment", "children", "Section", "React", "props", "forwardedRef", "asChild", "className", "spaceY", "spaceTop", "spaceBottom", "containerProps", "Comp", "spaceY_map", "spaceTop_map", "spaceBottom_map", "mode", "Component"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var u=Object.create;var l=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var E=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty;var N=(t
|
|
1
|
+
"use strict";var u=Object.create;var l=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var E=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty;var N=(e,t)=>{for(var o in t)l(e,o,{get:t[o],enumerable:!0})},g=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of R(t))!L.call(e,a)&&a!==o&&l(e,a,{get:()=>t[a],enumerable:!(i=z(t,a))||i.enumerable});return e};var T=(e,t,o)=>(o=e!=null?u(E(e)):{},g(t||!e||!e.__esModule?l(o,"default",{value:e,enumerable:!0}):o,e)),V=e=>g(l({},"__esModule",{value:!0}),e);var C={};N(C,{Heading:()=>r});module.exports=V(C);var d=require("react/jsx-runtime"),x=require("../helpers/index.js"),m=require("@radix-ui/react-slot"),c=require("class-variance-authority"),h=T(require("react")),f=require("@payloadcms/richtext-lexical/html");const w=(0,c.cva)("leading-tight tracking-[-0.04em]",{variants:{size:{none:"tracking-[-0.04em]",1:"lg-desktop:text-[16px] text-[14px] leading-[120%]",2:"lg-desktop:text-[24px] text-[20px] leading-[120%]",3:"desktop:text-[32px] text-[24px] leading-[120%]",4:"desktop:text-[40px] lg-desktop:text-[48px] text-[32px] leading-[100%]",5:"desktop:text-[56px] lg-desktop:text-[64px] text-[40px] leading-[100%]"},weight:{medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extraBold:"font-extrabold",black:"font-black"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{size:"none",weight:"bold"}}),r=h.default.forwardRef((e,t)=>{const{children:o,className:i,size:a="none",align:k,weight:y,asChild:b,as:H="h1",color:s,html:n,...P}=e,p=n?{dangerouslySetInnerHTML:{__html:typeof n=="string"?n:(0,f.convertLexicalToHTML)({data:n})}}:null,S=s?{style:{color:s}}:null;return(0,d.jsx)(m.Slot,{...P,ref:t,className:(0,x.cn)(w({size:a,weight:y,align:k}),i),...p,...S,children:b?o:(0,d.jsx)(H,{children:p?null:o})})});r.displayName="Heading";
|
|
2
2
|
//# sourceMappingURL=heading.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/heading.tsx"],
|
|
4
|
-
"sourcesContent": ["import { cn } from '../helpers/index.js'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport React from 'react'\nimport { convertLexicalToHTML } from '@payloadcms/richtext-lexical/html'\nimport type { SerializedEditorState, SerializedLexicalNode } from 'lexical'\n\nconst headingVariants = cva('leading-tight', {\n variants: {\n size: {\n none: 'tracking',\n 1: '
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAuF4B,IAAAI,EAAA,6BAvF5BC,EAAmB,+BACnBC,EAAqB,gCACrBC,EAAuC,oCACvCC,EAAkB,oBAClBC,EAAqC,6CAGrC,MAAMC,KAAkB,OAAI,
|
|
4
|
+
"sourcesContent": ["import { cn } from '../helpers/index.js'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport React from 'react'\nimport { convertLexicalToHTML } from '@payloadcms/richtext-lexical/html'\nimport type { SerializedEditorState, SerializedLexicalNode } from 'lexical'\n\nconst headingVariants = cva('leading-tight tracking-[-0.04em]', {\n variants: {\n size: {\n none: 'tracking-[-0.04em]',\n 1: 'lg-desktop:text-[16px] text-[14px] leading-[120%]',\n 2: 'lg-desktop:text-[24px] text-[20px] leading-[120%]',\n 3: 'desktop:text-[32px] text-[24px] leading-[120%]',\n 4: 'desktop:text-[40px] lg-desktop:text-[48px] text-[32px] leading-[100%]',\n 5: 'desktop:text-[56px] lg-desktop:text-[64px] text-[40px] leading-[100%]',\n },\n weight: {\n medium: 'font-medium',\n semibold: 'font-semibold',\n bold: 'font-bold',\n extraBold: 'font-extrabold',\n black: 'font-black',\n },\n align: {\n left: 'text-left',\n center: 'text-center',\n right: 'text-right',\n },\n },\n defaultVariants: {\n size: 'none',\n weight: 'bold',\n },\n})\n\ntype HeadingElement = React.ElementRef<'h1'>\n\ninterface HeadingProps extends React.ComponentPropsWithoutRef<'h1'>, VariantProps<typeof headingVariants> {\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n asChild?: boolean\n color?: string\n html?: string | SerializedEditorState<SerializedLexicalNode>\n}\n\nconst Heading = React.forwardRef<HeadingElement, HeadingProps>((props, forwardedRef) => {\n const {\n children,\n className,\n size = 'none', // \u4E3A\u4E86\u517C\u5BB9\u65E7\u7248\u672C\u6837\u5F0F\uFF0C\u9ED8\u8BA4\u503C\u4E3A none\uFF0C\u6CA1\u6709\u9ED8\u8BA4\u7684\u5B57\u4F53\u5927\u5C0F\n align,\n weight,\n asChild,\n as: Tag = 'h1',\n color,\n html,\n ...headingProps\n } = props\n\n const htmlContentProps = html\n ? {\n dangerouslySetInnerHTML: { __html: typeof html === 'string' ? html : convertLexicalToHTML({ data: html }) },\n }\n : null\n\n const styleProps = color\n ? {\n style: {\n color,\n },\n }\n : null\n return (\n <Slot\n {...headingProps}\n ref={forwardedRef}\n className={cn(\n headingVariants({\n size,\n weight,\n align,\n }),\n className\n )}\n {...htmlContentProps}\n {...styleProps}\n >\n {asChild ? children : <Tag>{htmlContentProps ? null : children}</Tag>}\n </Slot>\n )\n})\n\nHeading.displayName = 'Heading'\n\nexport { Heading }\nexport type { HeadingProps }\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAuF4B,IAAAI,EAAA,6BAvF5BC,EAAmB,+BACnBC,EAAqB,gCACrBC,EAAuC,oCACvCC,EAAkB,oBAClBC,EAAqC,6CAGrC,MAAMC,KAAkB,OAAI,mCAAoC,CAC9D,SAAU,CACR,KAAM,CACJ,KAAM,qBACN,EAAG,oDACH,EAAG,oDACH,EAAG,iDACH,EAAG,wEACH,EAAG,uEACL,EACA,OAAQ,CACN,OAAQ,cACR,SAAU,gBACV,KAAM,YACN,UAAW,iBACX,MAAO,YACT,EACA,MAAO,CACL,KAAM,YACN,OAAQ,cACR,MAAO,YACT,CACF,EACA,gBAAiB,CACf,KAAM,OACN,OAAQ,MACV,CACF,CAAC,EAWKR,EAAU,EAAAS,QAAM,WAAyC,CAACC,EAAOC,IAAiB,CACtF,KAAM,CACJ,SAAAC,EACA,UAAAC,EACA,KAAAC,EAAO,OACP,MAAAC,EACA,OAAAC,EACA,QAAAC,EACA,GAAIC,EAAM,KACV,MAAAC,EACA,KAAAC,EACA,GAAGC,CACL,EAAIX,EAEEY,EAAmBF,EACrB,CACE,wBAAyB,CAAE,OAAQ,OAAOA,GAAS,SAAWA,KAAO,wBAAqB,CAAE,KAAMA,CAAK,CAAC,CAAE,CAC5G,EACA,KAEEG,EAAaJ,EACf,CACE,MAAO,CACL,MAAAA,CACF,CACF,EACA,KACJ,SACE,OAAC,QACE,GAAGE,EACJ,IAAKV,EACL,aAAW,MACTH,EAAgB,CACd,KAAAM,EACA,OAAAE,EACA,MAAAD,CACF,CAAC,EACDF,CACF,EACC,GAAGS,EACH,GAAGC,EAEH,SAAAN,EAAUL,KAAW,OAACM,EAAA,CAAK,SAAAI,EAAmB,KAAOV,EAAS,EACjE,CAEJ,CAAC,EAEDZ,EAAQ,YAAc",
|
|
6
6
|
"names": ["heading_exports", "__export", "Heading", "__toCommonJS", "import_jsx_runtime", "import_helpers", "import_react_slot", "import_class_variance_authority", "import_react", "import_html", "headingVariants", "React", "props", "forwardedRef", "children", "className", "size", "align", "weight", "asChild", "Tag", "color", "html", "headingProps", "htmlContentProps", "styleProps"]
|
|
7
7
|
}
|
|
@@ -3,9 +3,8 @@ import type { ReactNode } from 'react';
|
|
|
3
3
|
import { type VariantProps } from 'class-variance-authority';
|
|
4
4
|
import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';
|
|
5
5
|
declare const linkVariants: (props?: ({
|
|
6
|
-
size?: "
|
|
7
|
-
|
|
8
|
-
hoverColor?: "none" | "hover" | null | undefined;
|
|
6
|
+
size?: "base" | "lg" | null | undefined;
|
|
7
|
+
variant?: "primary" | "secoundry" | null | undefined;
|
|
9
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
9
|
type LinkProps = {
|
|
11
10
|
/** 定义子组件作为父组件的类型,详细使用方式请参考radix-ui */
|
|
@@ -39,9 +38,8 @@ declare const Link: React.ForwardRefExoticComponent<{
|
|
|
39
38
|
/** 点击事件,禁用状态无法触发*/
|
|
40
39
|
onClick?: Function;
|
|
41
40
|
} & VariantProps<(props?: ({
|
|
42
|
-
size?: "
|
|
43
|
-
|
|
44
|
-
hoverColor?: "none" | "hover" | null | undefined;
|
|
41
|
+
size?: "base" | "lg" | null | undefined;
|
|
42
|
+
variant?: "primary" | "secoundry" | null | undefined;
|
|
45
43
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & ComponentPropsWithout<"a", RemovedProps> & React.RefAttributes<HTMLAnchorElement>>;
|
|
46
44
|
export default Link;
|
|
47
45
|
export type { LinkProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var P=Object.create;var p=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var N=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var E=(e,t)=>{for(var o in t)p(e,o,{get:t[o],enumerable:!0})},f=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of L(t))!g.call(e,r)&&r!==o&&p(e,r,{get:()=>t[r],enumerable:!(i=R(t,r))||i.enumerable});return e};var b=(e,t,o)=>(o=e!=null?P(N(e)):{},f(t||!e||!e.__esModule?p(o,"default",{value:e,enumerable:!0}):o,e)),V=e=>f(p({},"__esModule",{value:!0}),e);var w={};E(w,{default:()=>q});module.exports=V(w);var n=require("react/jsx-runtime"),k=b(require("react")),u=require("@radix-ui/react-slot"),d=require("../helpers/index.js"),x=require("class-variance-authority");const S=(0,x.cva)("tracking hover:text-brand-0 font-bold underline transition-colors",{variants:{size:{base:"text-text-2",lg:"text-text-3"},variant:{secoundry:"text-info-secondary hover:text-info-primary",primary:"text-info-primary hover:text-brand-0"}}}),y=k.default.forwardRef(({children:e,size:t="base",variant:o="primary",className:i,asChild:r=!1,href:s,style:l,disabled:a=!1,suffixIcon:m,onClick:h,...v},C)=>(0,n.jsx)(r?u.Slot:"a",{ref:C,onClick:c=>{if(!a&&h?.(c),a||!s){c.preventDefault();return}},href:a?void 0:s,className:(0,d.cn)(S({size:t,variant:o}),i,{"flex items-center":m,"cursor-pointer":!a,"text-info-quaternary cursor-not-allowed hover:text-info-quaternary":a}),...l?{style:l}:null,...v,children:(0,n.jsxs)(n.Fragment,{children:[e,(0,n.jsx)("span",{className:"svg",children:m})]})}));y.displayName="Link";var q=y;
|
|
2
2
|
//# sourceMappingURL=link.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/link.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react'\nimport type { ReactNode } from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cn } from '../helpers/index.js'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js'\n\n// \u5B9A\u4E49 link \u7684\u6837\u5F0F\u53D8\u4F53\nconst linkVariants = cva('tracking transition-colors', {\n variants: {\n size: {\n
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,
|
|
6
|
-
"names": ["link_exports", "__export", "link_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_react_slot", "import_helpers", "import_class_variance_authority", "linkVariants", "Link", "React", "children", "size", "
|
|
4
|
+
"sourcesContent": ["import React from 'react'\nimport type { ReactNode } from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cn } from '../helpers/index.js'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js'\n\n// \u5B9A\u4E49 link \u7684\u6837\u5F0F\u53D8\u4F53\nconst linkVariants = cva('tracking hover:text-brand-0 font-bold underline transition-colors', {\n variants: {\n size: {\n base: 'text-text-2', // \u4E2D\n lg: 'text-text-3', // \u5927\n },\n variant: {\n secoundry: 'text-info-secondary hover:text-info-primary',\n primary: 'text-info-primary hover:text-brand-0',\n },\n },\n})\n// \u5B9A\u4E49\u7EC4\u4EF6\u7C7B\u578B\uFF0C\u7EE7\u627F a \u6807\u7B7E\u6807\u51C6\u5C5E\u6027\ntype LinkElement = React.ElementRef<'a'>\ntype LinkProps = {\n /** \u5B9A\u4E49\u5B50\u7EC4\u4EF6\u4F5C\u4E3A\u7236\u7EC4\u4EF6\u7684\u7C7B\u578B,\u8BE6\u7EC6\u4F7F\u7528\u65B9\u5F0F\u8BF7\u53C2\u8003radix-ui */\n asChild?: boolean\n /** \u7C7B\u540D*/\n className?: string\n /** \u7981\u7528\u94FE\u63A5 */\n disabled?: boolean\n /** \u540E\u7F6E\u56FE\u6807*/\n suffixIcon?: ReactNode\n /** \u8DF3\u8F6C\u94FE\u63A5*/\n href?: string\n /** \u6837\u5F0F*/\n style?: React.CSSProperties\n /** \u70B9\u51FB\u4E8B\u4EF6\uFF0C\u7981\u7528\u72B6\u6001\u65E0\u6CD5\u89E6\u53D1*/\n onClick?: Function\n} & VariantProps<typeof linkVariants> &\n ComponentPropsWithout<'a', RemovedProps>\n\nconst Link = React.forwardRef<LinkElement, LinkProps>(\n (\n {\n children,\n size = 'base',\n variant = 'primary',\n className,\n asChild = false,\n href,\n style,\n disabled = false,\n suffixIcon,\n onClick,\n ...props // \u8FD9\u91CC\u4F1A\u5305\u542B href\u3001target\u3001rel \u7B49\u6807\u51C6 anchor \u5C5E\u6027\n }: LinkProps,\n forwardedRef\n ) => {\n const Comp = asChild ? Slot : 'a'\n\n const handleClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n !disabled && onClick?.(event)\n if (disabled || !href) {\n event.preventDefault()\n return\n }\n }\n\n return (\n <Comp\n ref={forwardedRef}\n onClick={handleClick}\n href={disabled ? undefined : href}\n className={cn(linkVariants({ size, variant }), className, {\n 'flex items-center': suffixIcon,\n 'cursor-pointer': !disabled,\n 'text-info-quaternary cursor-not-allowed hover:text-info-quaternary': disabled,\n })}\n {...(style ? { style: style } : null)}\n {...props}\n >\n <>\n {children}\n <span className=\"svg\">{suffixIcon}</span>\n </>\n </Comp>\n )\n }\n)\nLink.displayName = 'Link'\n\nexport default Link\nexport type { LinkProps }\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAgFQ,IAAAI,EAAA,6BAhFRC,EAAkB,oBAElBC,EAAqB,gCACrBC,EAAmB,+BACnBC,EAAuC,oCAIvC,MAAMC,KAAe,OAAI,qEAAsE,CAC7F,SAAU,CACR,KAAM,CACJ,KAAM,cACN,GAAI,aACN,EACA,QAAS,CACP,UAAW,8CACX,QAAS,sCACX,CACF,CACF,CAAC,EAqBKC,EAAO,EAAAC,QAAM,WACjB,CACE,CACE,SAAAC,EACA,KAAAC,EAAO,OACP,QAAAC,EAAU,UACV,UAAAC,EACA,QAAAC,EAAU,GACV,KAAAC,EACA,MAAAC,EACA,SAAAC,EAAW,GACX,WAAAC,EACA,QAAAC,EACA,GAAGC,CACL,EACAC,OAaE,OAXWP,EAAU,OAAO,IAW3B,CACC,IAAKO,EACL,QAXiBC,GAA+C,CAElE,GADA,CAACL,GAAYE,IAAUG,CAAK,EACxBL,GAAY,CAACF,EAAM,CACrBO,EAAM,eAAe,EACrB,MACF,CACF,EAMI,KAAML,EAAW,OAAYF,EAC7B,aAAW,MAAGR,EAAa,CAAE,KAAAI,EAAM,QAAAC,CAAQ,CAAC,EAAGC,EAAW,CACxD,oBAAqBK,EACrB,iBAAkB,CAACD,EACnB,qEAAsEA,CACxE,CAAC,EACA,GAAID,EAAQ,CAAE,MAAOA,CAAM,EAAI,KAC/B,GAAGI,EAEJ,gCACG,UAAAV,KACD,OAAC,QAAK,UAAU,MAAO,SAAAQ,EAAW,GACpC,EACF,CAGN,EACAV,EAAK,YAAc,OAEnB,IAAOR,EAAQQ",
|
|
6
|
+
"names": ["link_exports", "__export", "link_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_react_slot", "import_helpers", "import_class_variance_authority", "linkVariants", "Link", "React", "children", "size", "variant", "className", "asChild", "href", "style", "disabled", "suffixIcon", "onClick", "props", "forwardedRef", "event"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var
|
|
1
|
+
"use strict";"use client";var y=Object.create;var p=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var N=(e,t)=>{for(var a in t)p(e,a,{get:t[a],enumerable:!0})},u=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of v(t))!C.call(e,s)&&s!==a&&p(e,s,{get:()=>t[s],enumerable:!(o=T(t,s))||o.enumerable});return e};var R=(e,t,a)=>(a=e!=null?y(P(e)):{},u(t||!e||!e.__esModule?p(a,"default",{value:e,enumerable:!0}):a,e)),w=e=>u(p({},"__esModule",{value:!0}),e);var q={};N(q,{Tabs:()=>m,TabsContent:()=>b,TabsList:()=>c,TabsTrigger:()=>g});module.exports=w(q);var n=require("react/jsx-runtime"),i=R(require("react")),l=require("../helpers/index.js"),r=R(require("@radix-ui/react-tabs")),d=require("class-variance-authority");const f=i.createContext({align:"left",shape:"square"}),m=i.forwardRef(({children:e,align:t="left",shape:a="square",...o},s)=>(0,n.jsx)(r.Root,{ref:s,...o,children:(0,n.jsx)(f.Provider,{value:{align:t,shape:a},children:e})}));m.displayName="Tabs";const L=(0,d.cva)("",{variants:{align:{left:"justify-left",center:"justify-center",right:"justify-end"},shape:{rounded:"rounded-[28px]",square:"rounded-none"}},defaultVariants:{align:"left",shape:"square"}}),k=(0,d.cva)("",{variants:{shape:{rounded:"rounded-[28px]",square:"rounded-none"}},defaultVariants:{shape:"square"}}),c=i.forwardRef(({className:e,...t},a)=>{const{align:o,shape:s}=i.useContext(f);return(0,n.jsx)(r.List,{ref:a,className:(0,l.cn)("bg-tabs-list-bg flex w-fit max-w-full overflow-x-auto p-1",L({align:o,shape:s}),e),style:{scrollbarWidth:"none",msOverflowStyle:"none"},...t})});c.displayName=r.List.displayName;const g=i.forwardRef(({className:e,onClick:t,...a},o)=>{const{shape:s}=i.useContext(f),h=x=>{t?.(x)};return(0,n.jsx)(r.Trigger,{ref:o,className:(0,l.cn)("text-info-primary lg-desktop:text-[16px] disabled:text-btn-secondary-disabled lg-desktop:px-[28px] lg-desktop:pt-[15px] lg-desktop:pb-[14px] shrink-0 px-[20px] pb-[10px] pt-[11px] text-[14px] font-bold data-[state=active]:bg-white data-[state=active]:text-[#1d1d1d]",e,k({shape:s})),onClick:h,...a})});g.displayName=r.Trigger.displayName;const b=i.forwardRef(({className:e,...t},a)=>(0,n.jsx)(r.Content,{ref:a,className:(0,l.cn)(e),...t}));b.displayName=r.Content.displayName;
|
|
2
2
|
//# sourceMappingURL=tabs.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/tabs.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cn } from '../helpers/index.js'\n\nimport * as TabsPrimitive from '@radix-ui/react-tabs'\nimport { cva } from 'class-variance-authority'\nimport type { Align, Shape } from '../types/props.js'\n\nconst TabListContext = React.createContext<{\n align?: Align\n shape: Shape\n}>({\n align: 'left',\n shape: 'square',\n})\n\nconst Tabs = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Root> & {\n align?: Align\n shape?: Shape\n }\n>(({ children, align = 'left', shape = 'square', ...props }, ref) => (\n <TabsPrimitive.Root ref={ref} {...props}>\n <TabListContext.Provider value={{ align, shape }}>{children}</TabListContext.Provider>\n </TabsPrimitive.Root>\n))\nTabs.displayName = 'Tabs'\n\nconst tabsListVariants = cva('', {\n variants: {\n align: {\n left: 'justify-left',\n center: 'justify-center',\n right: 'justify-end',\n },\n shape: {\n rounded: 'rounded-[28px]',\n square: 'rounded-none',\n },\n },\n defaultVariants: {\n align: 'left',\n shape: 'square',\n },\n})\n\nconst tabsTriggerVariants = cva('', {\n variants: {\n shape: {\n rounded: 'rounded-[28px]',\n square: 'rounded-none',\n },\n },\n defaultVariants: {\n shape: 'square',\n },\n})\nconst TabsList = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => {\n const { align: alignFromParent, shape: shapeFromParent } = React.useContext(TabListContext)\n return (\n <TabsPrimitive.List\n ref={ref}\n className={cn(\n 'bg-tabs-list-bg flex w-fit overflow-x-auto p-1',\n tabsListVariants({\n align: alignFromParent,\n shape: shapeFromParent,\n }),\n className\n )}\n style={{\n scrollbarWidth: 'none',\n msOverflowStyle: 'none',\n }}\n {...props}\n />\n )\n})\nTabsList.displayName = TabsPrimitive.List.displayName\n\nconst TabsTrigger = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, onClick, ...props }, ref) => {\n const { shape: shapeFromParent } = React.useContext(TabListContext)\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(e)\n e.currentTarget.scrollIntoView({\n
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,UAAAE,EAAA,gBAAAC,EAAA,aAAAC,EAAA,gBAAAC,IAAA,eAAAC,EAAAN,GAyBI,IAAAO,EAAA,6BAvBJC,EAAuB,oBACvBC,EAAmB,+BAEnBC,EAA+B,mCAC/BC,EAAoB,oCAGpB,MAAMC,EAAiBJ,EAAM,cAG1B,CACD,MAAO,OACP,MAAO,QACT,CAAC,EAEKN,EAAOM,EAAM,WAMjB,CAAC,CAAE,SAAAK,EAAU,MAAAC,EAAQ,OAAQ,MAAAC,EAAQ,SAAU,GAAGC,CAAM,EAAGC,OAC3D,OAACP,EAAc,KAAd,CAAmB,IAAKO,EAAM,GAAGD,EAChC,mBAACJ,EAAe,SAAf,CAAwB,MAAO,CAAE,MAAAE,EAAO,MAAAC,CAAM,EAAI,SAAAF,EAAS,EAC9D,CACD,EACDX,EAAK,YAAc,OAEnB,MAAMgB,KAAmB,OAAI,GAAI,CAC/B,SAAU,CACR,MAAO,CACL,KAAM,eACN,OAAQ,iBACR,MAAO,aACT,EACA,MAAO,CACL,QAAS,iBACT,OAAQ,cACV,CACF,EACA,gBAAiB,CACf,MAAO,OACP,MAAO,QACT,CACF,CAAC,EAEKC,KAAsB,OAAI,GAAI,CAClC,SAAU,CACR,MAAO,CACL,QAAS,iBACT,OAAQ,cACV,CACF,EACA,gBAAiB,CACf,MAAO,QACT,CACF,CAAC,EACKf,EAAWI,EAAM,WAGrB,CAAC,CAAE,UAAAY,EAAW,GAAGJ,CAAM,EAAGC,IAAQ,CAClC,KAAM,CAAE,MAAOI,EAAiB,MAAOC,CAAgB,EAAId,EAAM,WAAWI,CAAc,EAC1F,SACE,OAACF,EAAc,KAAd,CACC,IAAKO,EACL,aAAW,MACT,
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cn } from '../helpers/index.js'\n\nimport * as TabsPrimitive from '@radix-ui/react-tabs'\nimport { cva } from 'class-variance-authority'\nimport type { Align, Shape } from '../types/props.js'\n\nconst TabListContext = React.createContext<{\n align?: Align\n shape: Shape\n}>({\n align: 'left',\n shape: 'square',\n})\n\nconst Tabs = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Root> & {\n align?: Align\n shape?: Shape\n }\n>(({ children, align = 'left', shape = 'square', ...props }, ref) => (\n <TabsPrimitive.Root ref={ref} {...props}>\n <TabListContext.Provider value={{ align, shape }}>{children}</TabListContext.Provider>\n </TabsPrimitive.Root>\n))\nTabs.displayName = 'Tabs'\n\nconst tabsListVariants = cva('', {\n variants: {\n align: {\n left: 'justify-left',\n center: 'justify-center',\n right: 'justify-end',\n },\n shape: {\n rounded: 'rounded-[28px]',\n square: 'rounded-none',\n },\n },\n defaultVariants: {\n align: 'left',\n shape: 'square',\n },\n})\n\nconst tabsTriggerVariants = cva('', {\n variants: {\n shape: {\n rounded: 'rounded-[28px]',\n square: 'rounded-none',\n },\n },\n defaultVariants: {\n shape: 'square',\n },\n})\nconst TabsList = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => {\n const { align: alignFromParent, shape: shapeFromParent } = React.useContext(TabListContext)\n return (\n <TabsPrimitive.List\n ref={ref}\n className={cn(\n 'bg-tabs-list-bg flex w-fit max-w-full overflow-x-auto p-1',\n tabsListVariants({\n align: alignFromParent,\n shape: shapeFromParent,\n }),\n className\n )}\n style={{\n scrollbarWidth: 'none',\n msOverflowStyle: 'none',\n }}\n {...props}\n />\n )\n})\nTabsList.displayName = TabsPrimitive.List.displayName\n\nconst TabsTrigger = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, onClick, ...props }, ref) => {\n const { shape: shapeFromParent } = React.useContext(TabListContext)\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(e)\n // e.currentTarget.scrollIntoView({\n // behavior: 'smooth',\n // inline: 'center',\n // block: 'nearest',\n // })\n }\n return (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n 'text-info-primary lg-desktop:text-[16px] disabled:text-btn-secondary-disabled lg-desktop:px-[28px] lg-desktop:pt-[15px] lg-desktop:pb-[14px] shrink-0 px-[20px] pb-[10px] pt-[11px] text-[14px] font-bold data-[state=active]:bg-white data-[state=active]:text-[#1d1d1d]',\n className,\n tabsTriggerVariants({\n shape: shapeFromParent,\n })\n )}\n onClick={handleClick}\n {...props}\n />\n )\n})\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName\n\nconst TabsContent = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => <TabsPrimitive.Content ref={ref} className={cn(className)} {...props} />)\nTabsContent.displayName = TabsPrimitive.Content.displayName\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent }\n"],
|
|
5
|
+
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,UAAAE,EAAA,gBAAAC,EAAA,aAAAC,EAAA,gBAAAC,IAAA,eAAAC,EAAAN,GAyBI,IAAAO,EAAA,6BAvBJC,EAAuB,oBACvBC,EAAmB,+BAEnBC,EAA+B,mCAC/BC,EAAoB,oCAGpB,MAAMC,EAAiBJ,EAAM,cAG1B,CACD,MAAO,OACP,MAAO,QACT,CAAC,EAEKN,EAAOM,EAAM,WAMjB,CAAC,CAAE,SAAAK,EAAU,MAAAC,EAAQ,OAAQ,MAAAC,EAAQ,SAAU,GAAGC,CAAM,EAAGC,OAC3D,OAACP,EAAc,KAAd,CAAmB,IAAKO,EAAM,GAAGD,EAChC,mBAACJ,EAAe,SAAf,CAAwB,MAAO,CAAE,MAAAE,EAAO,MAAAC,CAAM,EAAI,SAAAF,EAAS,EAC9D,CACD,EACDX,EAAK,YAAc,OAEnB,MAAMgB,KAAmB,OAAI,GAAI,CAC/B,SAAU,CACR,MAAO,CACL,KAAM,eACN,OAAQ,iBACR,MAAO,aACT,EACA,MAAO,CACL,QAAS,iBACT,OAAQ,cACV,CACF,EACA,gBAAiB,CACf,MAAO,OACP,MAAO,QACT,CACF,CAAC,EAEKC,KAAsB,OAAI,GAAI,CAClC,SAAU,CACR,MAAO,CACL,QAAS,iBACT,OAAQ,cACV,CACF,EACA,gBAAiB,CACf,MAAO,QACT,CACF,CAAC,EACKf,EAAWI,EAAM,WAGrB,CAAC,CAAE,UAAAY,EAAW,GAAGJ,CAAM,EAAGC,IAAQ,CAClC,KAAM,CAAE,MAAOI,EAAiB,MAAOC,CAAgB,EAAId,EAAM,WAAWI,CAAc,EAC1F,SACE,OAACF,EAAc,KAAd,CACC,IAAKO,EACL,aAAW,MACT,4DACAC,EAAiB,CACf,MAAOG,EACP,MAAOC,CACT,CAAC,EACDF,CACF,EACA,MAAO,CACL,eAAgB,OAChB,gBAAiB,MACnB,EACC,GAAGJ,EACN,CAEJ,CAAC,EACDZ,EAAS,YAAcM,EAAc,KAAK,YAE1C,MAAML,EAAcG,EAAM,WAGxB,CAAC,CAAE,UAAAY,EAAW,QAAAG,EAAS,GAAGP,CAAM,EAAGC,IAAQ,CAC3C,KAAM,CAAE,MAAOK,CAAgB,EAAId,EAAM,WAAWI,CAAc,EAC5DY,EAAeC,GAA2C,CAC9DF,IAAUE,CAAC,CAMb,EACA,SACE,OAACf,EAAc,QAAd,CACC,IAAKO,EACL,aAAW,MACT,4QACAG,EACAD,EAAoB,CAClB,MAAOG,CACT,CAAC,CACH,EACA,QAASE,EACR,GAAGR,EACN,CAEJ,CAAC,EACDX,EAAY,YAAcK,EAAc,QAAQ,YAEhD,MAAMP,EAAcK,EAAM,WAGxB,CAAC,CAAE,UAAAY,EAAW,GAAGJ,CAAM,EAAGC,OAAQ,OAACP,EAAc,QAAd,CAAsB,IAAKO,EAAK,aAAW,MAAGG,CAAS,EAAI,GAAGJ,EAAO,CAAE,EAC5Gb,EAAY,YAAcO,EAAc,QAAQ",
|
|
6
6
|
"names": ["tabs_exports", "__export", "Tabs", "TabsContent", "TabsList", "TabsTrigger", "__toCommonJS", "import_jsx_runtime", "React", "import_helpers", "TabsPrimitive", "import_class_variance_authority", "TabListContext", "children", "align", "shape", "props", "ref", "tabsListVariants", "tabsTriggerVariants", "className", "alignFromParent", "shapeFromParent", "onClick", "handleClick", "e"]
|
|
7
7
|
}
|