@anker-in/headless-ui 0.0.26 → 0.0.27-alpha.1
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/CONTRIBUTING.md +88 -27
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.d.ts +19 -0
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.js +2 -0
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.js.map +7 -0
- package/dist/cjs/biz-components/BrandEquity/index.d.ts +1 -0
- package/dist/cjs/biz-components/BrandEquity/index.js +2 -0
- package/dist/cjs/biz-components/BrandEquity/index.js.map +7 -0
- package/dist/cjs/biz-components/Category/index.d.ts +16 -0
- package/dist/cjs/biz-components/Category/index.js +2 -0
- package/dist/cjs/biz-components/Category/index.js.map +7 -0
- package/dist/cjs/biz-components/Evaluate/index.d.ts +20 -0
- package/dist/cjs/biz-components/Evaluate/index.js +2 -0
- package/dist/cjs/biz-components/Evaluate/index.js.map +7 -0
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.d.ts +7 -0
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +2 -0
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +7 -0
- package/dist/cjs/biz-components/HeroBanner/index.d.ts +1 -0
- package/dist/cjs/biz-components/HeroBanner/index.js +2 -0
- package/dist/cjs/biz-components/HeroBanner/index.js.map +7 -0
- package/dist/cjs/biz-components/HeroBanner/types.d.ts +26 -0
- package/dist/cjs/biz-components/HeroBanner/types.js +2 -0
- package/dist/cjs/biz-components/HeroBanner/types.js.map +7 -0
- package/dist/cjs/biz-components/Marquee/index.d.ts +23 -0
- package/dist/cjs/biz-components/Marquee/index.js +2 -0
- package/dist/cjs/biz-components/Marquee/index.js.map +7 -0
- package/dist/cjs/biz-components/MemberEquity/index.d.ts +6 -0
- package/dist/cjs/biz-components/MemberEquity/index.js +40 -0
- package/dist/cjs/biz-components/MemberEquity/index.js.map +7 -0
- package/dist/cjs/biz-components/MemberEquity/types.d.ts +25 -0
- package/dist/cjs/biz-components/MemberEquity/types.js +2 -0
- package/dist/cjs/biz-components/MemberEquity/types.js.map +7 -0
- package/dist/cjs/biz-components/Shelf/Shelf.d.ts +6 -0
- package/dist/cjs/biz-components/Shelf/Shelf.js +2 -0
- package/dist/cjs/biz-components/Shelf/Shelf.js.map +7 -0
- package/dist/cjs/biz-components/Shelf/index.d.ts +1 -0
- package/dist/cjs/biz-components/Shelf/index.js +2 -0
- package/dist/cjs/biz-components/Shelf/index.js.map +7 -0
- package/dist/cjs/biz-components/Shelf/types.d.ts +6 -0
- package/dist/cjs/biz-components/Shelf/types.js +2 -0
- package/dist/cjs/biz-components/Shelf/types.js.map +7 -0
- package/dist/cjs/biz-components/ShelfDisplay/index.d.ts +38 -0
- package/dist/cjs/biz-components/ShelfDisplay/index.js +10 -0
- package/dist/cjs/biz-components/ShelfDisplay/index.js.map +7 -0
- package/dist/cjs/biz-components/Slogan/index.d.ts +7 -0
- package/dist/cjs/biz-components/Slogan/index.js +2 -0
- package/dist/cjs/biz-components/Slogan/index.js.map +7 -0
- package/dist/cjs/biz-components/Slogan/types.d.ts +24 -0
- package/dist/cjs/biz-components/Slogan/types.js +2 -0
- package/dist/cjs/biz-components/Slogan/types.js.map +7 -0
- package/dist/cjs/biz-components/index.d.ts +9 -0
- package/dist/cjs/biz-components/index.js +2 -0
- package/dist/cjs/biz-components/index.js.map +7 -0
- package/dist/cjs/components/alert.d.ts +17 -0
- package/dist/cjs/components/alert.js +2 -0
- package/dist/cjs/components/alert.js.map +7 -0
- package/dist/cjs/components/avatar.d.ts +26 -0
- package/dist/cjs/components/avatar.js +2 -0
- package/dist/cjs/components/avatar.js.map +7 -0
- package/dist/cjs/components/badge.d.ts +2 -2
- package/dist/cjs/components/badge.js +1 -1
- package/dist/cjs/components/badge.js.map +3 -3
- package/dist/cjs/components/button.d.ts +2 -1
- package/dist/cjs/components/button.js +1 -1
- package/dist/cjs/components/button.js.map +3 -3
- package/dist/cjs/components/card.d.ts +8 -0
- package/dist/cjs/components/card.js +2 -0
- package/dist/cjs/components/card.js.map +7 -0
- package/dist/cjs/components/carousel.d.ts +28 -0
- package/dist/cjs/components/carousel.js +2 -0
- package/dist/cjs/components/carousel.js.map +7 -0
- package/dist/cjs/components/checkbox.js +1 -1
- package/dist/cjs/components/checkbox.js.map +2 -2
- package/dist/cjs/components/color.d.ts +13 -0
- package/dist/cjs/components/color.js +2 -0
- package/dist/cjs/components/color.js.map +7 -0
- package/dist/cjs/components/container.d.ts +13 -0
- package/dist/cjs/components/container.js +2 -0
- package/dist/cjs/components/container.js.map +7 -0
- package/dist/cjs/components/dialog.d.ts +2 -2
- package/dist/cjs/components/dialog.js +1 -1
- package/dist/cjs/components/dialog.js.map +2 -2
- package/dist/cjs/components/drawer.d.ts +13 -0
- package/dist/cjs/components/drawer.js +2 -0
- package/dist/cjs/components/drawer.js.map +7 -0
- package/dist/cjs/components/drop-down.d.ts +27 -0
- package/dist/cjs/components/drop-down.js +2 -0
- package/dist/cjs/components/drop-down.js.map +7 -0
- package/dist/cjs/components/gird.d.ts +17 -0
- package/dist/cjs/components/gird.js +2 -0
- package/dist/cjs/components/gird.js.map +7 -0
- package/dist/cjs/components/heading.d.ts +3 -3
- package/dist/cjs/components/heading.js +1 -1
- package/dist/cjs/components/heading.js.map +2 -2
- package/dist/cjs/components/index.d.ts +12 -1
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/index.js.map +2 -2
- package/dist/cjs/components/input-number.d.ts +78 -0
- package/dist/cjs/components/input-number.js +2 -0
- package/dist/cjs/components/input-number.js.map +7 -0
- package/dist/cjs/components/input.js +1 -1
- package/dist/cjs/components/input.js.map +2 -2
- package/dist/cjs/components/link.d.ts +47 -0
- package/dist/cjs/components/link.js +2 -0
- package/dist/cjs/components/link.js.map +7 -0
- package/dist/cjs/components/picture.d.ts +1 -1
- package/dist/cjs/components/picture.js +1 -1
- package/dist/cjs/components/picture.js.map +3 -3
- package/dist/cjs/components/popover.js +1 -1
- package/dist/cjs/components/popover.js.map +2 -2
- package/dist/cjs/components/radio.js +1 -1
- package/dist/cjs/components/radio.js.map +2 -2
- package/dist/cjs/components/skeleton.js +4 -4
- package/dist/cjs/components/skeleton.js.map +1 -1
- package/dist/cjs/components/tabs.d.ts +9 -0
- package/dist/cjs/components/tabs.js +2 -0
- package/dist/cjs/components/tabs.js.map +7 -0
- package/dist/cjs/components/text.d.ts +2 -3
- package/dist/cjs/components/text.js +1 -1
- package/dist/cjs/components/text.js.map +3 -3
- package/dist/cjs/components/theme.d.ts +2 -3
- package/dist/cjs/components/theme.js +1 -1
- package/dist/cjs/components/theme.js.map +2 -2
- package/dist/cjs/helpers/constants.d.ts +0 -2
- package/dist/cjs/helpers/constants.js +1 -1
- package/dist/cjs/helpers/constants.js.map +4 -4
- package/dist/cjs/helpers/utils.js +1 -1
- package/dist/cjs/helpers/utils.js.map +3 -3
- package/dist/cjs/icons/spinner.d.ts +1 -1
- package/dist/cjs/icons/spinner.js +1 -1
- package/dist/cjs/icons/spinner.js.map +2 -2
- package/dist/cjs/shared/Styles.d.ts +33 -0
- package/dist/cjs/shared/Styles.js +2 -0
- package/dist/cjs/shared/Styles.js.map +7 -0
- package/dist/cjs/stories/HeroBanner.stories.d.ts +23 -0
- package/dist/cjs/stories/HeroBanner.stories.js +10 -0
- package/dist/cjs/stories/HeroBanner.stories.js.map +7 -0
- package/dist/cjs/stories/MemberEquity.stories.d.ts +9 -0
- package/dist/cjs/stories/MemberEquity.stories.js +31 -0
- package/dist/cjs/stories/MemberEquity.stories.js.map +7 -0
- package/dist/cjs/stories/alert.stories.d.ts +27 -0
- package/dist/cjs/stories/alert.stories.js +2 -0
- package/dist/cjs/stories/alert.stories.js.map +7 -0
- package/dist/cjs/stories/avatar.stories.d.ts +40 -0
- package/dist/cjs/stories/avatar.stories.js +2 -0
- package/dist/cjs/stories/avatar.stories.js.map +7 -0
- package/dist/cjs/stories/badge.stories.d.ts +2 -12
- package/dist/cjs/stories/badge.stories.js +1 -1
- package/dist/cjs/stories/badge.stories.js.map +2 -2
- package/dist/cjs/stories/brandEquity.stories.d.ts +16 -0
- package/dist/cjs/stories/brandEquity.stories.js +2 -0
- package/dist/cjs/stories/brandEquity.stories.js.map +7 -0
- package/dist/cjs/stories/button.stories.d.ts +14 -0
- package/dist/cjs/stories/button.stories.js +1 -1
- package/dist/cjs/stories/button.stories.js.map +3 -3
- package/dist/cjs/stories/card.stories.d.ts +27 -0
- package/dist/cjs/stories/card.stories.js +2 -0
- package/dist/cjs/stories/card.stories.js.map +7 -0
- package/dist/cjs/stories/carousel.stories.d.ts +62 -0
- package/dist/cjs/stories/carousel.stories.js +2 -0
- package/dist/cjs/stories/carousel.stories.js.map +7 -0
- package/dist/cjs/stories/category.stories.d.ts +13 -0
- package/dist/cjs/stories/category.stories.js +2 -0
- package/dist/cjs/stories/category.stories.js.map +7 -0
- package/dist/cjs/stories/checkbox.stories.d.ts +2 -2
- package/dist/cjs/stories/checkbox.stories.js +1 -1
- package/dist/cjs/stories/checkbox.stories.js.map +2 -2
- package/dist/cjs/stories/container.stories.d.ts +23 -0
- package/dist/cjs/stories/container.stories.js +15 -0
- package/dist/cjs/stories/container.stories.js.map +7 -0
- package/dist/cjs/stories/dialog.stories.js +1 -1
- package/dist/cjs/stories/dialog.stories.js.map +2 -2
- package/dist/cjs/stories/drawer.stories.d.ts +20 -0
- package/dist/cjs/stories/drawer.stories.js +2 -0
- package/dist/cjs/stories/drawer.stories.js.map +7 -0
- package/dist/cjs/stories/drop-down.stories.d.ts +16 -0
- package/dist/cjs/stories/drop-down.stories.js +2 -0
- package/dist/cjs/stories/drop-down.stories.js.map +7 -0
- package/dist/cjs/stories/evaluate.stories.d.ts +13 -0
- package/dist/cjs/stories/evaluate.stories.js +2 -0
- package/dist/cjs/stories/evaluate.stories.js.map +7 -0
- package/dist/cjs/stories/grid.stories.d.ts +22 -0
- package/dist/cjs/stories/grid.stories.js +13 -0
- package/dist/cjs/stories/grid.stories.js.map +7 -0
- package/dist/cjs/stories/heading.stories.d.ts +4 -3
- package/dist/cjs/stories/heading.stories.js +1 -1
- package/dist/cjs/stories/heading.stories.js.map +2 -2
- package/dist/cjs/stories/input-number.stories.d.ts +39 -0
- package/dist/cjs/stories/input-number.stories.js +2 -0
- package/dist/cjs/stories/input-number.stories.js.map +7 -0
- package/dist/cjs/stories/input.stories.js +1 -1
- package/dist/cjs/stories/input.stories.js.map +2 -2
- package/dist/cjs/stories/link.stories.d.ts +82 -0
- package/dist/cjs/stories/link.stories.js +2 -0
- package/dist/cjs/stories/link.stories.js.map +7 -0
- package/dist/cjs/stories/marquee.stories.d.ts +49 -0
- package/dist/cjs/stories/marquee.stories.js +2 -0
- package/dist/cjs/stories/marquee.stories.js.map +7 -0
- package/dist/cjs/stories/picture.stories.d.ts +1 -1
- package/dist/cjs/stories/picture.stories.js +2 -2
- package/dist/cjs/stories/picture.stories.js.map +2 -2
- package/dist/cjs/stories/popover.stories.d.ts +1 -1
- package/dist/cjs/stories/popover.stories.js +1 -1
- package/dist/cjs/stories/popover.stories.js.map +2 -2
- package/dist/cjs/stories/radio.stories.js +1 -1
- package/dist/cjs/stories/radio.stories.js.map +2 -2
- package/dist/cjs/stories/shelf.stories.d.ts +15 -0
- package/dist/cjs/stories/shelf.stories.js +2 -0
- package/dist/cjs/stories/shelf.stories.js.map +7 -0
- package/dist/cjs/stories/shelfDisplay.stories.d.ts +13 -0
- package/dist/cjs/stories/shelfDisplay.stories.js +2 -0
- package/dist/cjs/stories/shelfDisplay.stories.js.map +7 -0
- package/dist/cjs/stories/skeleton.stories.js +1 -1
- package/dist/cjs/stories/skeleton.stories.js.map +2 -2
- package/dist/cjs/stories/slogan.stories.d.ts +21 -0
- package/dist/cjs/stories/slogan.stories.js +26 -0
- package/dist/cjs/stories/slogan.stories.js.map +7 -0
- package/dist/cjs/stories/tabs.stories.d.ts +360 -0
- package/dist/cjs/stories/tabs.stories.js +2 -0
- package/dist/cjs/stories/tabs.stories.js.map +7 -0
- package/dist/cjs/stories/text.stories.d.ts +2 -11
- package/dist/cjs/stories/text.stories.js +1 -1
- package/dist/cjs/stories/text.stories.js.map +3 -3
- package/dist/cjs/types/index.js +2 -0
- package/dist/cjs/types/index.js.map +7 -0
- package/dist/cjs/types/props.d.ts +5 -0
- package/dist/cjs/types/props.js +2 -0
- package/dist/cjs/types/props.js.map +7 -0
- package/dist/esm/biz-components/BrandEquity/BrandEquity.d.ts +19 -0
- package/dist/esm/biz-components/BrandEquity/BrandEquity.js +2 -0
- package/dist/esm/biz-components/BrandEquity/BrandEquity.js.map +7 -0
- package/dist/esm/biz-components/BrandEquity/index.d.ts +1 -0
- package/dist/esm/biz-components/BrandEquity/index.js +2 -0
- package/dist/esm/biz-components/BrandEquity/index.js.map +7 -0
- package/dist/esm/biz-components/Category/index.d.ts +16 -0
- package/dist/esm/biz-components/Category/index.js +2 -0
- package/dist/esm/biz-components/Category/index.js.map +7 -0
- package/dist/esm/biz-components/Evaluate/index.d.ts +20 -0
- package/dist/esm/biz-components/Evaluate/index.js +2 -0
- package/dist/esm/biz-components/Evaluate/index.js.map +7 -0
- package/dist/esm/biz-components/HeroBanner/HeroBanner.d.ts +7 -0
- package/dist/esm/biz-components/HeroBanner/HeroBanner.js +2 -0
- package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +7 -0
- package/dist/esm/biz-components/HeroBanner/index.d.ts +1 -0
- package/dist/esm/biz-components/HeroBanner/index.js +2 -0
- package/dist/esm/biz-components/HeroBanner/index.js.map +7 -0
- package/dist/esm/biz-components/HeroBanner/types.d.ts +26 -0
- package/dist/esm/biz-components/HeroBanner/types.js +1 -0
- package/dist/esm/biz-components/HeroBanner/types.js.map +7 -0
- package/dist/esm/biz-components/Marquee/index.d.ts +23 -0
- package/dist/esm/biz-components/Marquee/index.js +2 -0
- package/dist/esm/biz-components/Marquee/index.js.map +7 -0
- package/dist/esm/biz-components/MemberEquity/index.d.ts +6 -0
- package/dist/esm/biz-components/MemberEquity/index.js +40 -0
- package/dist/esm/biz-components/MemberEquity/index.js.map +7 -0
- package/dist/esm/biz-components/MemberEquity/types.d.ts +25 -0
- package/dist/esm/biz-components/MemberEquity/types.js +1 -0
- package/dist/esm/biz-components/MemberEquity/types.js.map +7 -0
- package/dist/esm/biz-components/Shelf/Shelf.d.ts +6 -0
- package/dist/esm/biz-components/Shelf/Shelf.js +2 -0
- package/dist/esm/biz-components/Shelf/Shelf.js.map +7 -0
- package/dist/esm/biz-components/Shelf/index.d.ts +1 -0
- package/dist/esm/biz-components/Shelf/index.js +2 -0
- package/dist/esm/biz-components/Shelf/index.js.map +7 -0
- package/dist/esm/biz-components/Shelf/types.d.ts +6 -0
- package/dist/esm/biz-components/Shelf/types.js +1 -0
- package/dist/esm/biz-components/Shelf/types.js.map +7 -0
- package/dist/esm/biz-components/ShelfDisplay/index.d.ts +38 -0
- package/dist/esm/biz-components/ShelfDisplay/index.js +10 -0
- package/dist/esm/biz-components/ShelfDisplay/index.js.map +7 -0
- package/dist/esm/biz-components/Slogan/index.d.ts +7 -0
- package/dist/esm/biz-components/Slogan/index.js +2 -0
- package/dist/esm/biz-components/Slogan/index.js.map +7 -0
- package/dist/esm/biz-components/Slogan/types.d.ts +24 -0
- package/dist/esm/biz-components/Slogan/types.js +1 -0
- package/dist/esm/biz-components/Slogan/types.js.map +7 -0
- package/dist/esm/biz-components/index.d.ts +9 -0
- package/dist/esm/biz-components/index.js +2 -0
- package/dist/esm/biz-components/index.js.map +7 -0
- package/dist/esm/components/alert.d.ts +17 -0
- package/dist/esm/components/alert.js +2 -0
- package/dist/esm/components/alert.js.map +7 -0
- package/dist/esm/components/avatar.d.ts +26 -0
- package/dist/esm/components/avatar.js +2 -0
- package/dist/esm/components/avatar.js.map +7 -0
- package/dist/esm/components/badge.d.ts +2 -2
- package/dist/esm/components/badge.js +1 -1
- package/dist/esm/components/badge.js.map +3 -3
- package/dist/esm/components/button.d.ts +2 -1
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/button.js.map +3 -3
- package/dist/esm/components/card.d.ts +8 -0
- package/dist/esm/components/card.js +2 -0
- package/dist/esm/components/card.js.map +7 -0
- package/dist/esm/components/carousel.d.ts +28 -0
- package/dist/esm/components/carousel.js +2 -0
- package/dist/esm/components/carousel.js.map +7 -0
- package/dist/esm/components/checkbox.js +1 -1
- package/dist/esm/components/checkbox.js.map +2 -2
- package/dist/esm/components/color.d.ts +13 -0
- package/dist/esm/components/color.js +2 -0
- package/dist/esm/components/color.js.map +7 -0
- package/dist/esm/components/container.d.ts +13 -0
- package/dist/esm/components/container.js +2 -0
- package/dist/esm/components/container.js.map +7 -0
- package/dist/esm/components/dialog.d.ts +2 -2
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dialog.js.map +2 -2
- package/dist/esm/components/drawer.d.ts +13 -0
- package/dist/esm/components/drawer.js +2 -0
- package/dist/esm/components/drawer.js.map +7 -0
- package/dist/esm/components/drop-down.d.ts +27 -0
- package/dist/esm/components/drop-down.js +2 -0
- package/dist/esm/components/drop-down.js.map +7 -0
- package/dist/esm/components/gird.d.ts +17 -0
- package/dist/esm/components/gird.js +2 -0
- package/dist/esm/components/gird.js.map +7 -0
- package/dist/esm/components/heading.d.ts +3 -3
- package/dist/esm/components/heading.js +1 -1
- package/dist/esm/components/heading.js.map +2 -2
- package/dist/esm/components/index.d.ts +12 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +2 -2
- package/dist/esm/components/input-number.d.ts +78 -0
- package/dist/esm/components/input-number.js +2 -0
- package/dist/esm/components/input-number.js.map +7 -0
- package/dist/esm/components/input.js +1 -1
- package/dist/esm/components/input.js.map +2 -2
- package/dist/esm/components/link.d.ts +47 -0
- package/dist/esm/components/link.js +2 -0
- package/dist/esm/components/link.js.map +7 -0
- package/dist/esm/components/picture.d.ts +1 -1
- package/dist/esm/components/picture.js +1 -1
- package/dist/esm/components/picture.js.map +3 -3
- package/dist/esm/components/popover.js +1 -1
- package/dist/esm/components/popover.js.map +2 -2
- package/dist/esm/components/radio.js +1 -1
- package/dist/esm/components/radio.js.map +2 -2
- package/dist/esm/components/skeleton.js +4 -4
- package/dist/esm/components/skeleton.js.map +1 -1
- package/dist/esm/components/tabs.d.ts +9 -0
- package/dist/esm/components/tabs.js +2 -0
- package/dist/esm/components/tabs.js.map +7 -0
- package/dist/esm/components/text.d.ts +2 -3
- package/dist/esm/components/text.js +1 -1
- package/dist/esm/components/text.js.map +3 -3
- package/dist/esm/components/theme.d.ts +2 -3
- package/dist/esm/components/theme.js +1 -1
- package/dist/esm/components/theme.js.map +2 -2
- package/dist/esm/helpers/constants.d.ts +0 -2
- package/dist/esm/helpers/constants.js +1 -1
- package/dist/esm/helpers/constants.js.map +3 -3
- package/dist/esm/helpers/utils.js +1 -1
- package/dist/esm/helpers/utils.js.map +3 -3
- package/dist/esm/icons/spinner.d.ts +1 -1
- package/dist/esm/icons/spinner.js +1 -1
- package/dist/esm/icons/spinner.js.map +2 -2
- package/dist/esm/shared/Styles.d.ts +33 -0
- package/dist/esm/shared/Styles.js +2 -0
- package/dist/esm/shared/Styles.js.map +7 -0
- package/dist/esm/stories/HeroBanner.stories.d.ts +23 -0
- package/dist/esm/stories/HeroBanner.stories.js +10 -0
- package/dist/esm/stories/HeroBanner.stories.js.map +7 -0
- package/dist/esm/stories/MemberEquity.stories.d.ts +9 -0
- package/dist/esm/stories/MemberEquity.stories.js +31 -0
- package/dist/esm/stories/MemberEquity.stories.js.map +7 -0
- package/dist/esm/stories/alert.stories.d.ts +27 -0
- package/dist/esm/stories/alert.stories.js +2 -0
- package/dist/esm/stories/alert.stories.js.map +7 -0
- package/dist/esm/stories/avatar.stories.d.ts +40 -0
- package/dist/esm/stories/avatar.stories.js +2 -0
- package/dist/esm/stories/avatar.stories.js.map +7 -0
- package/dist/esm/stories/badge.stories.d.ts +2 -12
- package/dist/esm/stories/badge.stories.js +1 -1
- package/dist/esm/stories/badge.stories.js.map +2 -2
- package/dist/esm/stories/brandEquity.stories.d.ts +16 -0
- package/dist/esm/stories/brandEquity.stories.js +2 -0
- package/dist/esm/stories/brandEquity.stories.js.map +7 -0
- package/dist/esm/stories/button.stories.d.ts +14 -0
- package/dist/esm/stories/button.stories.js +1 -1
- package/dist/esm/stories/button.stories.js.map +3 -3
- package/dist/esm/stories/card.stories.d.ts +27 -0
- package/dist/esm/stories/card.stories.js +2 -0
- package/dist/esm/stories/card.stories.js.map +7 -0
- package/dist/esm/stories/carousel.stories.d.ts +62 -0
- package/dist/esm/stories/carousel.stories.js +2 -0
- package/dist/esm/stories/carousel.stories.js.map +7 -0
- package/dist/esm/stories/category.stories.d.ts +13 -0
- package/dist/esm/stories/category.stories.js +2 -0
- package/dist/esm/stories/category.stories.js.map +7 -0
- package/dist/esm/stories/checkbox.stories.d.ts +2 -2
- package/dist/esm/stories/checkbox.stories.js +1 -1
- package/dist/esm/stories/checkbox.stories.js.map +2 -2
- package/dist/esm/stories/container.stories.d.ts +23 -0
- package/dist/esm/stories/container.stories.js +15 -0
- package/dist/esm/stories/container.stories.js.map +7 -0
- package/dist/esm/stories/dialog.stories.js +1 -1
- package/dist/esm/stories/dialog.stories.js.map +2 -2
- package/dist/esm/stories/drawer.stories.d.ts +20 -0
- package/dist/esm/stories/drawer.stories.js +2 -0
- package/dist/esm/stories/drawer.stories.js.map +7 -0
- package/dist/esm/stories/drop-down.stories.d.ts +16 -0
- package/dist/esm/stories/drop-down.stories.js +2 -0
- package/dist/esm/stories/drop-down.stories.js.map +7 -0
- package/dist/esm/stories/evaluate.stories.d.ts +13 -0
- package/dist/esm/stories/evaluate.stories.js +2 -0
- package/dist/esm/stories/evaluate.stories.js.map +7 -0
- package/dist/esm/stories/grid.stories.d.ts +22 -0
- package/dist/esm/stories/grid.stories.js +13 -0
- package/dist/esm/stories/grid.stories.js.map +7 -0
- package/dist/esm/stories/heading.stories.d.ts +4 -3
- package/dist/esm/stories/heading.stories.js +1 -1
- package/dist/esm/stories/heading.stories.js.map +2 -2
- package/dist/esm/stories/input-number.stories.d.ts +39 -0
- package/dist/esm/stories/input-number.stories.js +2 -0
- package/dist/esm/stories/input-number.stories.js.map +7 -0
- package/dist/esm/stories/input.stories.js +1 -1
- package/dist/esm/stories/input.stories.js.map +2 -2
- package/dist/esm/stories/link.stories.d.ts +82 -0
- package/dist/esm/stories/link.stories.js +2 -0
- package/dist/esm/stories/link.stories.js.map +7 -0
- package/dist/esm/stories/marquee.stories.d.ts +49 -0
- package/dist/esm/stories/marquee.stories.js +2 -0
- package/dist/esm/stories/marquee.stories.js.map +7 -0
- package/dist/esm/stories/picture.stories.d.ts +1 -1
- package/dist/esm/stories/picture.stories.js +2 -2
- package/dist/esm/stories/picture.stories.js.map +2 -2
- package/dist/esm/stories/popover.stories.d.ts +1 -1
- package/dist/esm/stories/popover.stories.js +1 -1
- package/dist/esm/stories/popover.stories.js.map +2 -2
- package/dist/esm/stories/radio.stories.js +1 -1
- package/dist/esm/stories/radio.stories.js.map +2 -2
- package/dist/esm/stories/shelf.stories.d.ts +15 -0
- package/dist/esm/stories/shelf.stories.js +2 -0
- package/dist/esm/stories/shelf.stories.js.map +7 -0
- package/dist/esm/stories/shelfDisplay.stories.d.ts +13 -0
- package/dist/esm/stories/shelfDisplay.stories.js +2 -0
- package/dist/esm/stories/shelfDisplay.stories.js.map +7 -0
- package/dist/esm/stories/skeleton.stories.js +1 -1
- package/dist/esm/stories/skeleton.stories.js.map +2 -2
- package/dist/esm/stories/slogan.stories.d.ts +21 -0
- package/dist/esm/stories/slogan.stories.js +26 -0
- package/dist/esm/stories/slogan.stories.js.map +7 -0
- package/dist/esm/stories/tabs.stories.d.ts +360 -0
- package/dist/esm/stories/tabs.stories.js +2 -0
- package/dist/esm/stories/tabs.stories.js.map +7 -0
- package/dist/esm/stories/text.stories.d.ts +2 -11
- package/dist/esm/stories/text.stories.js +2 -2
- package/dist/esm/stories/text.stories.js.map +3 -3
- package/dist/esm/types/index.d.ts +0 -0
- package/dist/esm/types/index.js +2 -0
- package/dist/esm/types/index.js.map +7 -0
- package/dist/esm/types/props.d.ts +5 -0
- package/dist/esm/types/props.js +1 -0
- package/dist/esm/types/props.js.map +7 -0
- package/package.json +29 -5
- package/style.css +1102 -731
- package/src/components/badge.tsx +0 -29
- package/src/components/button.tsx +0 -166
- package/src/components/checkbox.tsx +0 -44
- package/src/components/dialog.tsx +0 -101
- package/src/components/heading.tsx +0 -85
- package/src/components/index.ts +0 -19
- package/src/components/input.tsx +0 -79
- package/src/components/picture.tsx +0 -99
- package/src/components/popover.tsx +0 -31
- package/src/components/radio.tsx +0 -85
- package/src/components/skeleton.tsx +0 -41
- package/src/components/text.tsx +0 -113
- package/src/components/theme.tsx +0 -21
- package/src/helpers/component-props.ts +0 -17
- package/src/helpers/constants.ts +0 -3
- package/src/helpers/index.ts +0 -2
- package/src/helpers/utils.ts +0 -8
- package/src/icons/spinner.tsx +0 -26
- package/src/index.ts +0 -1
- package/src/stories/badge.stories.tsx +0 -44
- package/src/stories/button.stories.tsx +0 -124
- package/src/stories/checkbox.stories.tsx +0 -93
- package/src/stories/dialog.stories.tsx +0 -74
- package/src/stories/heading.stories.tsx +0 -100
- package/src/stories/input.stories.tsx +0 -64
- package/src/stories/picture.stories.tsx +0 -51
- package/src/stories/popover.stories.tsx +0 -41
- package/src/stories/radio.stories.tsx +0 -55
- package/src/stories/skeleton.stories.tsx +0 -67
- package/src/stories/text.stories.tsx +0 -154
- package/src/styles/global.css +0 -201
- /package/{src/styles/index.css → dist/cjs/types/index.d.ts} +0 -0
package/src/components/radio.tsx
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import * as React from 'react'
|
|
4
|
-
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group'
|
|
5
|
-
import { Text } from './text.js'
|
|
6
|
-
import { CheckIcon } from '@radix-ui/react-icons'
|
|
7
|
-
import { cva, type VariantProps } from 'class-variance-authority'
|
|
8
|
-
import { cn } from '../helpers/index.js'
|
|
9
|
-
|
|
10
|
-
const RadioContext = React.createContext<{ size?: 'sm' | 'base' | 'lg' }>({
|
|
11
|
-
size: 'base',
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
const radioGroupVariants = cva(
|
|
15
|
-
'ai-border-primary ai-text-primary ai-ring-offset-background focus-visible:ai-ring-ring ai-aspect-square ai-rounded-full ai-border focus:ai-outline-none focus-visible:ai-ring-2 focus-visible:ai-ring-offset-2 disabled:ai-cursor-not-allowed disabled:ai-opacity-50 data-[state=checked]:ai-bg-primary data-[state=checked]:ai-text-primary-foreground',
|
|
16
|
-
{
|
|
17
|
-
variants: {
|
|
18
|
-
size: {
|
|
19
|
-
sm: 'ai-size-[14px]',
|
|
20
|
-
base: 'ai-size-4',
|
|
21
|
-
lg: 'ai-size-5',
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
defaultVariants: {
|
|
25
|
-
size: 'base',
|
|
26
|
-
},
|
|
27
|
-
}
|
|
28
|
-
)
|
|
29
|
-
|
|
30
|
-
interface RadioGroupProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root> {
|
|
31
|
-
/** 尺寸 */
|
|
32
|
-
size?: 'sm' | 'base' | 'lg'
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const RadioGroup = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Root>, RadioGroupProps>(
|
|
36
|
-
({ className, children, size, ...props }, ref) => {
|
|
37
|
-
return (
|
|
38
|
-
<RadioGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={ref}>
|
|
39
|
-
<RadioContext.Provider value={{ size }}>{children}</RadioContext.Provider>
|
|
40
|
-
</RadioGroupPrimitive.Root>
|
|
41
|
-
)
|
|
42
|
-
}
|
|
43
|
-
)
|
|
44
|
-
RadioGroup.displayName = 'RadioGroup'
|
|
45
|
-
|
|
46
|
-
interface RadioGroupItemProps
|
|
47
|
-
extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>,
|
|
48
|
-
VariantProps<typeof radioGroupVariants> {}
|
|
49
|
-
|
|
50
|
-
const RadioGroupItem = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Item>, RadioGroupItemProps>(
|
|
51
|
-
({ className, size, children, ...props }, ref) => {
|
|
52
|
-
const { size: sizeFromParent } = React.useContext(RadioContext)
|
|
53
|
-
|
|
54
|
-
const ItemRadio = (
|
|
55
|
-
<RadioGroupPrimitive.Item
|
|
56
|
-
ref={ref}
|
|
57
|
-
className={cn(
|
|
58
|
-
radioGroupVariants({
|
|
59
|
-
size: size ?? sizeFromParent,
|
|
60
|
-
}),
|
|
61
|
-
className
|
|
62
|
-
)}
|
|
63
|
-
{...props}
|
|
64
|
-
>
|
|
65
|
-
<RadioGroupPrimitive.Indicator className="ai-flex ai-items-center ai-justify-center ai-text-current ai-w-full ai-h-full">
|
|
66
|
-
<CheckIcon />
|
|
67
|
-
</RadioGroupPrimitive.Indicator>
|
|
68
|
-
</RadioGroupPrimitive.Item>
|
|
69
|
-
)
|
|
70
|
-
|
|
71
|
-
if (children) {
|
|
72
|
-
return (
|
|
73
|
-
<Text as="label" className={cn('ai-flex ai-items-center ai-gap-1', className)}>
|
|
74
|
-
{ItemRadio}
|
|
75
|
-
{children}
|
|
76
|
-
</Text>
|
|
77
|
-
)
|
|
78
|
-
}
|
|
79
|
-
return ItemRadio
|
|
80
|
-
}
|
|
81
|
-
)
|
|
82
|
-
RadioGroupItem.displayName = 'RadioGroupItem'
|
|
83
|
-
|
|
84
|
-
export { RadioGroup, RadioGroupItem }
|
|
85
|
-
export type { RadioGroupProps, RadioGroupItemProps }
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import * as React from 'react'
|
|
2
|
-
import { cn } from '../helpers/index.js'
|
|
3
|
-
import { Slot } from '@radix-ui/react-slot'
|
|
4
|
-
import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js'
|
|
5
|
-
|
|
6
|
-
type SkeletonElement = React.ElementRef<'span'>
|
|
7
|
-
|
|
8
|
-
interface SkeletonProps extends ComponentPropsWithout<'span', RemovedProps> {
|
|
9
|
-
/** 是否正在加载 , 默认是true*/
|
|
10
|
-
loading?: boolean
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const Skeleton = React.forwardRef<SkeletonElement, SkeletonProps>((props, forwardedRef) => {
|
|
14
|
-
const { children, className, loading = true, ...skeletonProps } = props
|
|
15
|
-
|
|
16
|
-
if (!loading) return children
|
|
17
|
-
const Tag = React.isValidElement(children) ? Slot : 'span'
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<Tag
|
|
21
|
-
ref={forwardedRef}
|
|
22
|
-
className={cn(
|
|
23
|
-
`ai-bg-skeleton ai-animate-pulse empty:ai-block data-[inline-skeleton=true]:ai-leading-[0] !ai-bg-none !ai-bg-clip-border !ai-border-none !ai-shadow-none
|
|
24
|
-
!ai-text-transparent !ai-outline-none !ai-select-none !ai-cursor-default !ai-pointer-events-none !ai-decoration-clone
|
|
25
|
-
after:!ai-invisible before:!ai-invisible [&>*]:!ai-invisible
|
|
26
|
-
`,
|
|
27
|
-
className
|
|
28
|
-
)}
|
|
29
|
-
data-inline-skeleton={React.isValidElement(children) ? undefined : true}
|
|
30
|
-
tabIndex={-1}
|
|
31
|
-
{...skeletonProps}
|
|
32
|
-
>
|
|
33
|
-
{children}
|
|
34
|
-
</Tag>
|
|
35
|
-
)
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
Skeleton.displayName = 'Skeleton'
|
|
39
|
-
|
|
40
|
-
export default Skeleton
|
|
41
|
-
export type { SkeletonProps }
|
package/src/components/text.tsx
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import * as React from 'react'
|
|
2
|
-
import { Slot } from '@radix-ui/react-slot'
|
|
3
|
-
import { cn } from '../helpers/index.js'
|
|
4
|
-
import { type VariantProps, cva } from 'class-variance-authority'
|
|
5
|
-
import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js'
|
|
6
|
-
|
|
7
|
-
const textVariants = cva('ai-tracking', {
|
|
8
|
-
variants: {
|
|
9
|
-
size: {
|
|
10
|
-
none: '',
|
|
11
|
-
1: 'ai-text-xs',
|
|
12
|
-
2: 'ai-text-sm',
|
|
13
|
-
3: 'ai-text-base',
|
|
14
|
-
4: 'ai-text-lg',
|
|
15
|
-
5: 'ai-text-xl',
|
|
16
|
-
6: 'ai-text-2xl',
|
|
17
|
-
7: 'ai-text-3xl',
|
|
18
|
-
8: 'ai-text-4xl',
|
|
19
|
-
9: 'ai-text-5xl',
|
|
20
|
-
},
|
|
21
|
-
weight: {
|
|
22
|
-
light: 'ai-font-light',
|
|
23
|
-
normal: 'ai-font-normal',
|
|
24
|
-
medium: 'ai-font-medium',
|
|
25
|
-
semibold: 'ai-font-semibold',
|
|
26
|
-
bold: 'ai-font-bold',
|
|
27
|
-
},
|
|
28
|
-
lineHeights: {
|
|
29
|
-
tight: 'ai-leading-tight',
|
|
30
|
-
normal: 'ai-leading-normal',
|
|
31
|
-
loose: 'ai-leading-loose',
|
|
32
|
-
},
|
|
33
|
-
align: {
|
|
34
|
-
left: 'ai-text-left',
|
|
35
|
-
center: 'ai-text-center',
|
|
36
|
-
right: 'ai-text-right',
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
defaultVariants: {
|
|
40
|
-
size: 'none',
|
|
41
|
-
weight: 'normal',
|
|
42
|
-
},
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
type TextElement = React.ElementRef<'span'>
|
|
46
|
-
type TextSpanProps = { as?: 'span' } & ComponentPropsWithout<'span', RemovedProps>
|
|
47
|
-
type TextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>
|
|
48
|
-
type TextLabelProps = { as: 'label' } & ComponentPropsWithout<'label', RemovedProps>
|
|
49
|
-
type TextPProps = { as: 'p' } & ComponentPropsWithout<'p', RemovedProps>
|
|
50
|
-
|
|
51
|
-
interface CommonTextProps extends VariantProps<typeof textVariants> {
|
|
52
|
-
as?: 'div' | 'label' | 'p' | 'span'
|
|
53
|
-
asChild?: boolean
|
|
54
|
-
color?: string
|
|
55
|
-
/** 相当于 dangerouslySetInnerHTML */
|
|
56
|
-
html?: string
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
type TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps)
|
|
60
|
-
|
|
61
|
-
const Text = React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {
|
|
62
|
-
const {
|
|
63
|
-
children,
|
|
64
|
-
lineHeights,
|
|
65
|
-
size = 'none',
|
|
66
|
-
weight,
|
|
67
|
-
align,
|
|
68
|
-
className,
|
|
69
|
-
asChild,
|
|
70
|
-
as: Tag = 'span',
|
|
71
|
-
color,
|
|
72
|
-
html,
|
|
73
|
-
...textProps
|
|
74
|
-
} = props
|
|
75
|
-
|
|
76
|
-
const htmlContentProps = html
|
|
77
|
-
? {
|
|
78
|
-
dangerouslySetInnerHTML: { __html: html },
|
|
79
|
-
}
|
|
80
|
-
: null
|
|
81
|
-
|
|
82
|
-
const styleProps = color
|
|
83
|
-
? {
|
|
84
|
-
style: {
|
|
85
|
-
color,
|
|
86
|
-
},
|
|
87
|
-
}
|
|
88
|
-
: null
|
|
89
|
-
|
|
90
|
-
return (
|
|
91
|
-
<Slot
|
|
92
|
-
{...textProps}
|
|
93
|
-
ref={forwardedRef}
|
|
94
|
-
className={cn(
|
|
95
|
-
textVariants({
|
|
96
|
-
size,
|
|
97
|
-
weight,
|
|
98
|
-
align,
|
|
99
|
-
lineHeights,
|
|
100
|
-
}),
|
|
101
|
-
className
|
|
102
|
-
)}
|
|
103
|
-
{...htmlContentProps}
|
|
104
|
-
{...styleProps}
|
|
105
|
-
>
|
|
106
|
-
{asChild ? children : <Tag>{htmlContentProps ? null : children}</Tag>}
|
|
107
|
-
</Slot>
|
|
108
|
-
)
|
|
109
|
-
})
|
|
110
|
-
Text.displayName = 'Text'
|
|
111
|
-
|
|
112
|
-
export { Text }
|
|
113
|
-
export type { TextProps }
|
package/src/components/theme.tsx
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import * as React from 'react'
|
|
3
|
-
import type { Brand } from '../helpers/constants.js'
|
|
4
|
-
|
|
5
|
-
interface ThemeProps {
|
|
6
|
-
brand: Brand
|
|
7
|
-
children: React.ReactNode
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* @param param
|
|
12
|
-
* @returns
|
|
13
|
-
*/
|
|
14
|
-
const Theme = ({ brand, children }: ThemeProps) => {
|
|
15
|
-
React.useLayoutEffect(() => {
|
|
16
|
-
document.querySelector('html')?.setAttribute('data-brand-theme', brand)
|
|
17
|
-
}, [])
|
|
18
|
-
return <>{children}</>
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export default Theme
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type React from 'react'
|
|
2
|
-
|
|
3
|
-
type ComponentPropsAs<C extends React.ElementType<any>, T extends React.ComponentPropsWithoutRef<C>['as']> = Omit<
|
|
4
|
-
Extract<React.ComponentPropsWithoutRef<C>, { as: T }>,
|
|
5
|
-
'as' | 'asChild'
|
|
6
|
-
>
|
|
7
|
-
|
|
8
|
-
// Omits the specified props from the component props. Autocomplete will suggest props
|
|
9
|
-
// of the component, but won't restrict the omittable props to those that actually exist.
|
|
10
|
-
type ComponentPropsWithout<
|
|
11
|
-
T extends React.ElementType,
|
|
12
|
-
O extends Omit<string, keyof React.ComponentPropsWithoutRef<T>> | keyof React.ComponentPropsWithoutRef<T>,
|
|
13
|
-
> = Omit<React.ComponentPropsWithoutRef<T>, O & string>
|
|
14
|
-
|
|
15
|
-
type RemovedProps = 'asChild' | 'defaultChecked' | 'defaultValue' | 'color'
|
|
16
|
-
|
|
17
|
-
export type { ComponentPropsAs, ComponentPropsWithout, RemovedProps }
|
package/src/helpers/constants.ts
DELETED
package/src/helpers/index.ts
DELETED
package/src/helpers/utils.ts
DELETED
package/src/icons/spinner.tsx
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { cn } from '../helpers/index.js'
|
|
2
|
-
|
|
3
|
-
export interface SpinnerProps {
|
|
4
|
-
className?: string
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line no-unused-vars
|
|
8
|
-
const Spinner = (props: SpinnerProps) => {
|
|
9
|
-
return (
|
|
10
|
-
<svg
|
|
11
|
-
fill="none"
|
|
12
|
-
viewBox="0 0 20 20"
|
|
13
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
14
|
-
width="1rem"
|
|
15
|
-
className={cn('ai-animate-spin', props.className)}
|
|
16
|
-
>
|
|
17
|
-
<path
|
|
18
|
-
d="M1 10C1 14.9706 5.02944 19 10 19C14.9706 19 19 14.9706 19 10C19 5.02944 14.9706 1 10 1"
|
|
19
|
-
strokeWidth="2"
|
|
20
|
-
strokeLinecap="round"
|
|
21
|
-
/>
|
|
22
|
-
</svg>
|
|
23
|
-
)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export default Spinner
|
package/src/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './components/index.js'
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
|
|
3
|
-
import { Badge } from '../components/index.js'
|
|
4
|
-
import React from 'react'
|
|
5
|
-
|
|
6
|
-
const meta = {
|
|
7
|
-
title: 'Components/Badge',
|
|
8
|
-
component: Badge,
|
|
9
|
-
parameters: {
|
|
10
|
-
layout: 'centered',
|
|
11
|
-
},
|
|
12
|
-
tags: ['autodocs'],
|
|
13
|
-
argTypes: {
|
|
14
|
-
variant: {
|
|
15
|
-
control: {
|
|
16
|
-
type: 'select',
|
|
17
|
-
},
|
|
18
|
-
options: ['default', 'destructive', 'outline', 'secondary'],
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
args: {
|
|
22
|
-
variant: 'default',
|
|
23
|
-
children: 'New',
|
|
24
|
-
},
|
|
25
|
-
} satisfies Meta<typeof Badge>
|
|
26
|
-
|
|
27
|
-
export default meta
|
|
28
|
-
|
|
29
|
-
type Story = StoryObj<typeof meta>
|
|
30
|
-
|
|
31
|
-
export const Default: Story = {}
|
|
32
|
-
|
|
33
|
-
export const Examples: Story = {
|
|
34
|
-
render() {
|
|
35
|
-
return (
|
|
36
|
-
<div className="ai-flex ai-flex-col ai-space-y-4">
|
|
37
|
-
<Badge variant="default">Default</Badge>
|
|
38
|
-
<Badge variant="secondary">Secondary</Badge>
|
|
39
|
-
<Badge variant="destructive">Destructive</Badge>
|
|
40
|
-
<Badge variant="outline">Outline</Badge>
|
|
41
|
-
</div>
|
|
42
|
-
)
|
|
43
|
-
},
|
|
44
|
-
}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { SearchIcon } from '@storybook/icons'
|
|
3
|
-
|
|
4
|
-
import { Button } from '../components/index.js'
|
|
5
|
-
import React from 'react'
|
|
6
|
-
|
|
7
|
-
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
|
|
8
|
-
const meta = {
|
|
9
|
-
// 同时定义了页面左侧菜单
|
|
10
|
-
title: 'Components/Button',
|
|
11
|
-
component: Button,
|
|
12
|
-
parameters: {
|
|
13
|
-
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
|
|
14
|
-
layout: 'centered',
|
|
15
|
-
},
|
|
16
|
-
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
|
17
|
-
tags: ['autodocs'],
|
|
18
|
-
// More on argTypes: https://storybook.js.org/docs/api/argtypes
|
|
19
|
-
argTypes: {
|
|
20
|
-
variant: {
|
|
21
|
-
control: {
|
|
22
|
-
type: 'select',
|
|
23
|
-
},
|
|
24
|
-
options: ['primary', 'secondary', 'link', 'ghost'],
|
|
25
|
-
},
|
|
26
|
-
size: {
|
|
27
|
-
control: {
|
|
28
|
-
type: 'select',
|
|
29
|
-
},
|
|
30
|
-
options: ['sm', 'base', 'lg', 'icon'],
|
|
31
|
-
},
|
|
32
|
-
hoverEffect: {
|
|
33
|
-
description: 'hover 状态下的动画效果,仅在variant是primary 和 secondary 时生效',
|
|
34
|
-
control: {
|
|
35
|
-
type: 'select',
|
|
36
|
-
},
|
|
37
|
-
options: ['none', 'slide'],
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
args: {
|
|
41
|
-
variant: 'primary',
|
|
42
|
-
size: 'base',
|
|
43
|
-
children: 'Button',
|
|
44
|
-
asChild: false,
|
|
45
|
-
disabled: false,
|
|
46
|
-
loading: false,
|
|
47
|
-
hoverEffect: 'none',
|
|
48
|
-
},
|
|
49
|
-
} satisfies Meta<typeof Button>
|
|
50
|
-
|
|
51
|
-
export default meta
|
|
52
|
-
type Story = StoryObj<typeof meta>
|
|
53
|
-
|
|
54
|
-
// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
|
|
55
|
-
// args 会作为 props 传递给组件
|
|
56
|
-
// Story的名会作为菜单的名称 自动首字母大写并按照大写字母拆分 UseAsButton => Use As Button
|
|
57
|
-
|
|
58
|
-
export const Primary: Story = {
|
|
59
|
-
args: {
|
|
60
|
-
size: 'lg',
|
|
61
|
-
children: 'Primary',
|
|
62
|
-
},
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export const Secondary: Story = {
|
|
66
|
-
args: {
|
|
67
|
-
size: 'lg',
|
|
68
|
-
variant: 'secondary',
|
|
69
|
-
children: 'Secondary',
|
|
70
|
-
},
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export const Link: Story = {
|
|
74
|
-
args: {
|
|
75
|
-
size: 'lg',
|
|
76
|
-
variant: 'link',
|
|
77
|
-
children: 'Link',
|
|
78
|
-
},
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export const WithIcon: Story = {
|
|
82
|
-
args: {
|
|
83
|
-
size: 'lg',
|
|
84
|
-
children: (
|
|
85
|
-
<>
|
|
86
|
-
WithIcon <SearchIcon className="ai-ml-2" />
|
|
87
|
-
</>
|
|
88
|
-
),
|
|
89
|
-
},
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export const Aschild: Story = {
|
|
93
|
-
args: {
|
|
94
|
-
size: 'lg',
|
|
95
|
-
asChild: true,
|
|
96
|
-
children: <a href="http://example.com">as a a tag</a>,
|
|
97
|
-
},
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export const Spinner: Story = {
|
|
101
|
-
args: {
|
|
102
|
-
size: 'lg',
|
|
103
|
-
loading: true,
|
|
104
|
-
spinner: (
|
|
105
|
-
<div className="ai-text-neutral-900 ai-animate-pulse ai-font-bold ai-flex-row ai-flex">
|
|
106
|
-
<svg
|
|
107
|
-
viewBox="0 0 1024 1024"
|
|
108
|
-
version="1.1"
|
|
109
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
110
|
-
p-id="2625"
|
|
111
|
-
width="1rem"
|
|
112
|
-
className="align-middle"
|
|
113
|
-
>
|
|
114
|
-
<path
|
|
115
|
-
d="M511.882596 287.998081h-0.361244a31.998984 31.998984 0 0 1-31.659415-31.977309v-0.361244c0-0.104761 0.115598-11.722364 0.115598-63.658399V96.000564a31.998984 31.998984 0 1 1 64.001581 0V192.001129c0 52.586273-0.111986 63.88237-0.119211 64.337537a32.002596 32.002596 0 0 1-31.977309 31.659415zM511.998194 959.99842a31.998984 31.998984 0 0 1-31.998984-31.998984v-96.379871c0-51.610915-0.111986-63.174332-0.115598-63.286318s0-0.242033 0-0.361243a31.998984 31.998984 0 0 1 63.997968-0.314283c0 0.455167 0.11921 11.711527 0.11921 64.034093v96.307622a31.998984 31.998984 0 0 1-32.002596 31.998984zM330.899406 363.021212a31.897836 31.897836 0 0 1-22.866739-9.612699c-0.075861-0.075861-8.207461-8.370021-44.931515-45.094076L195.198137 240.429485a31.998984 31.998984 0 0 1 45.256635-45.253022L308.336112 263.057803c37.182834 37.182834 45.090463 45.253022 45.41197 45.578141A31.998984 31.998984 0 0 1 330.899406 363.021212zM806.137421 838.11473a31.901448 31.901448 0 0 1-22.628318-9.374279L715.624151 760.859111c-36.724054-36.724054-45.018214-44.859267-45.097687-44.93874a31.998984 31.998984 0 0 1 44.77618-45.729864c0.32512 0.317895 8.395308 8.229136 45.578142 45.411969l67.88134 67.88134a31.998984 31.998984 0 0 1-22.624705 54.630914zM224.000113 838.11473a31.901448 31.901448 0 0 0 22.628317-9.374279l67.88134-67.88134c36.724054-36.724054 45.021826-44.859267 45.097688-44.93874a31.998984 31.998984 0 0 0-44.776181-45.729864c-0.32512 0.317895-8.395308 8.229136-45.578142 45.411969l-67.88134 67.884953a31.998984 31.998984 0 0 0 22.628318 54.627301zM255.948523 544.058589h-0.361244c-0.104761 0-11.722364-0.115598-63.658399-0.115598H95.942765a31.998984 31.998984 0 1 1 0-64.00158h95.996952c52.586273 0 63.88237 0.111986 64.337538 0.11921a31.998984 31.998984 0 0 1 31.659414 31.97731v0.361244a32.002596 32.002596 0 0 1-31.988146 31.659414zM767.939492 544.058589a32.002596 32.002596 0 0 1-31.995372-31.666639v-0.361244a31.998984 31.998984 0 0 1 31.659415-31.970085c0.455167 0 11.754876-0.11921 64.34115-0.11921h96.000564a31.998984 31.998984 0 0 1 0 64.00158H831.944685c-51.936034 0-63.553638 0.111986-63.665624 0.115598h-0.335957zM692.999446 363.0176a31.998984 31.998984 0 0 1-22.863126-54.381656c0.317895-0.32512 8.229136-8.395308 45.41197-45.578141l67.88134-67.884953A31.998984 31.998984 0 1 1 828.693489 240.429485l-67.892177 67.88134c-31.020013 31.023625-41.644196 41.759794-44.241539 44.393262l-0.697201 0.722488a31.908673 31.908673 0 0 1-22.863126 9.591025z"
|
|
116
|
-
fill=""
|
|
117
|
-
p-id="2626"
|
|
118
|
-
></path>
|
|
119
|
-
</svg>
|
|
120
|
-
loading...
|
|
121
|
-
</div>
|
|
122
|
-
),
|
|
123
|
-
},
|
|
124
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react/*'
|
|
2
|
-
import { Checkbox } from '../components/index.js'
|
|
3
|
-
import React from 'react'
|
|
4
|
-
|
|
5
|
-
const meta = {
|
|
6
|
-
title: 'Components/Checkbox',
|
|
7
|
-
component: Checkbox,
|
|
8
|
-
parameters: {
|
|
9
|
-
layout: 'centered',
|
|
10
|
-
docs: {
|
|
11
|
-
description: {
|
|
12
|
-
component: '复选框, 基于@radix-ui/react-checkbox https://www.radix-ui.com/primitives/docs/components/checkbox',
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
tags: ['autodocs'],
|
|
17
|
-
argTypes: {
|
|
18
|
-
size: {
|
|
19
|
-
control: {
|
|
20
|
-
type: 'select',
|
|
21
|
-
},
|
|
22
|
-
options: ['sm', 'base', 'lg'],
|
|
23
|
-
description: '尺寸',
|
|
24
|
-
table: {
|
|
25
|
-
defaultValue: { summary: 'base' },
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
args: {
|
|
30
|
-
size: 'base',
|
|
31
|
-
},
|
|
32
|
-
} satisfies Meta<typeof Checkbox>
|
|
33
|
-
|
|
34
|
-
export default meta
|
|
35
|
-
|
|
36
|
-
type Story = StoryObj<typeof meta>
|
|
37
|
-
|
|
38
|
-
export const Default: Story = {
|
|
39
|
-
args: {
|
|
40
|
-
size: 'base',
|
|
41
|
-
},
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export const Sizes = () => (
|
|
45
|
-
<div className="ai-flex ai-flex-col ai-gap-2">
|
|
46
|
-
<div className="ai-flex ai-items-center ai-space-x-2">
|
|
47
|
-
<Checkbox id="terms" size="sm" />
|
|
48
|
-
<label
|
|
49
|
-
htmlFor="terms"
|
|
50
|
-
className="ai-text-sm ai-font-medium ai-leading-none peer-disabled:ai-cursor-not-allowed peer-disabled:ai-opacity-70"
|
|
51
|
-
>
|
|
52
|
-
Accept terms and conditions
|
|
53
|
-
</label>
|
|
54
|
-
</div>
|
|
55
|
-
<div className="ai-flex ai-items-center ai-space-x-2">
|
|
56
|
-
<Checkbox id="terms1" size="base" />
|
|
57
|
-
<label
|
|
58
|
-
htmlFor="terms1"
|
|
59
|
-
className="ai-text-base ai-font-medium ai-leading-none peer-disabled:ai-cursor-not-allowed peer-disabled:ai-opacity-70"
|
|
60
|
-
>
|
|
61
|
-
Accept terms and conditions
|
|
62
|
-
</label>
|
|
63
|
-
</div>
|
|
64
|
-
<div className="ai-flex ai-items-center ai-space-x-2">
|
|
65
|
-
<Checkbox id="terms2" size="lg" />
|
|
66
|
-
<label
|
|
67
|
-
htmlFor="terms2"
|
|
68
|
-
className="ai-text-lg ai-font-medium ai-leading-none peer-disabled:ai-cursor-not-allowed peer-disabled:ai-opacity-70"
|
|
69
|
-
>
|
|
70
|
-
Accept terms and conditions
|
|
71
|
-
</label>
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
)
|
|
75
|
-
Sizes.parameters = {
|
|
76
|
-
docs: {
|
|
77
|
-
description: {
|
|
78
|
-
story: '不同的尺寸',
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export const Disabled = () => (
|
|
84
|
-
<div className="ai-flex ai-items-center ai-space-x-2">
|
|
85
|
-
<Checkbox id="terms" disabled />
|
|
86
|
-
<label
|
|
87
|
-
htmlFor="terms"
|
|
88
|
-
className="ai-text-sm ai-font-medium ai-leading-none peer-disabled:ai-cursor-not-allowed peer-disabled:ai-opacity-70"
|
|
89
|
-
>
|
|
90
|
-
Accept terms and conditions
|
|
91
|
-
</label>
|
|
92
|
-
</div>
|
|
93
|
-
)
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
Button,
|
|
4
|
-
Dialog,
|
|
5
|
-
DialogContent,
|
|
6
|
-
DialogDescription,
|
|
7
|
-
DialogFooter,
|
|
8
|
-
DialogHeader,
|
|
9
|
-
DialogTitle,
|
|
10
|
-
DialogTrigger,
|
|
11
|
-
Input,
|
|
12
|
-
} from '../components/index.js'
|
|
13
|
-
import type { Meta, StoryObj } from '@storybook/react/*'
|
|
14
|
-
|
|
15
|
-
const meta = {
|
|
16
|
-
title: 'Components/Dialog',
|
|
17
|
-
component: Dialog,
|
|
18
|
-
subcomponents: {
|
|
19
|
-
DialogTrigger,
|
|
20
|
-
DialogContent,
|
|
21
|
-
DialogHeader,
|
|
22
|
-
DialogTitle,
|
|
23
|
-
DialogDescription,
|
|
24
|
-
DialogFooter,
|
|
25
|
-
} as any,
|
|
26
|
-
parameters: {
|
|
27
|
-
layout: 'centered',
|
|
28
|
-
docs: {
|
|
29
|
-
description: {
|
|
30
|
-
component: '弹窗组件,基于@radix-ui/react-dialog,https://www.radix-ui.com/primitives/docs/components/dialog ',
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
tags: ['autodocs'],
|
|
35
|
-
} satisfies Meta<typeof Dialog>
|
|
36
|
-
|
|
37
|
-
export default meta
|
|
38
|
-
|
|
39
|
-
type Story = StoryObj<typeof Dialog>
|
|
40
|
-
|
|
41
|
-
export const Default: Story = {
|
|
42
|
-
args: {
|
|
43
|
-
children: (
|
|
44
|
-
<>
|
|
45
|
-
<DialogTrigger asChild>
|
|
46
|
-
<button>Edit Profile</button>
|
|
47
|
-
</DialogTrigger>
|
|
48
|
-
<DialogContent className="sm:ai-max-w-[425px]">
|
|
49
|
-
<DialogHeader>
|
|
50
|
-
<DialogTitle>Edit profile</DialogTitle>
|
|
51
|
-
<DialogDescription>Make changes to your profile here. Click save when you're done.</DialogDescription>
|
|
52
|
-
</DialogHeader>
|
|
53
|
-
<div className="ai-grid ai-gap-4 ai-py-4">
|
|
54
|
-
<div className="ai-grid ai-grid-cols-4 ai-items-center ai-gap-4">
|
|
55
|
-
<label htmlFor="name" className="ai-text-right">
|
|
56
|
-
Name
|
|
57
|
-
</label>
|
|
58
|
-
<Input id="name" defaultValue="Pedro Duarte" className="ai-col-span-3" />
|
|
59
|
-
</div>
|
|
60
|
-
<div className="ai-grid ai-grid-cols-4 ai-items-center ai-gap-4">
|
|
61
|
-
<label htmlFor="username" className="ai-text-right">
|
|
62
|
-
Username
|
|
63
|
-
</label>
|
|
64
|
-
<Input id="username" defaultValue="@peduarte" className="ai-col-span-3" />
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
<DialogFooter>
|
|
68
|
-
<Button type="submit">Save changes</Button>
|
|
69
|
-
</DialogFooter>
|
|
70
|
-
</DialogContent>
|
|
71
|
-
</>
|
|
72
|
-
),
|
|
73
|
-
},
|
|
74
|
-
}
|