@bifrostui/react 0.0.5
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/LICENSE +21 -0
- package/README.md +13 -0
- package/dist/ActionSheet/ActionSheet.css +27 -0
- package/dist/ActionSheet/ActionSheet.d.ts +5 -0
- package/dist/ActionSheet/ActionSheet.js +66 -0
- package/dist/ActionSheet/ActionSheet.types.d.ts +28 -0
- package/dist/ActionSheet/ActionSheet.types.js +5 -0
- package/dist/ActionSheet/ActionSheetContext.d.ts +4 -0
- package/dist/ActionSheet/ActionSheetContext.js +11 -0
- package/dist/ActionSheet/ActionSheetItem.css +51 -0
- package/dist/ActionSheet/ActionSheetItem.d.ts +5 -0
- package/dist/ActionSheet/ActionSheetItem.js +58 -0
- package/dist/ActionSheet/ActionSheetItem.types.d.ts +38 -0
- package/dist/ActionSheet/ActionSheetItem.types.js +5 -0
- package/dist/ActionSheet/index.d.ts +4 -0
- package/dist/ActionSheet/index.js +54 -0
- package/dist/Alert/Alert.d.ts +5 -0
- package/dist/Alert/Alert.js +115 -0
- package/dist/Alert/Alert.types.d.ts +61 -0
- package/dist/Alert/Alert.types.js +5 -0
- package/dist/Alert/index.css +89 -0
- package/dist/Alert/index.d.ts +4 -0
- package/dist/Alert/index.js +34 -0
- package/dist/Avatar/Avatar.css +43 -0
- package/dist/Avatar/Avatar.d.ts +5 -0
- package/dist/Avatar/Avatar.js +59 -0
- package/dist/Avatar/Avatar.types.d.ts +46 -0
- package/dist/Avatar/Avatar.types.js +5 -0
- package/dist/Avatar/AvatarGroup.css +31 -0
- package/dist/Avatar/AvatarGroup.d.ts +5 -0
- package/dist/Avatar/AvatarGroup.js +69 -0
- package/dist/Avatar/AvatarGroup.types.d.ts +27 -0
- package/dist/Avatar/AvatarGroup.types.js +5 -0
- package/dist/Avatar/index.d.ts +6 -0
- package/dist/Avatar/index.js +54 -0
- package/dist/Backdrop/Backdrop.css +14 -0
- package/dist/Backdrop/Backdrop.d.ts +5 -0
- package/dist/Backdrop/Backdrop.js +34 -0
- package/dist/Backdrop/Backdrop.types.d.ts +17 -0
- package/dist/Backdrop/Backdrop.types.js +5 -0
- package/dist/Backdrop/index.d.ts +2 -0
- package/dist/Backdrop/index.js +34 -0
- package/dist/Badge/Badge.css +95 -0
- package/dist/Badge/Badge.d.ts +5 -0
- package/dist/Badge/Badge.js +42 -0
- package/dist/Badge/Badge.types.d.ts +27 -0
- package/dist/Badge/Badge.types.js +5 -0
- package/dist/Badge/index.d.ts +2 -0
- package/dist/Badge/index.js +34 -0
- package/dist/Button/Button.css +200 -0
- package/dist/Button/Button.d.ts +5 -0
- package/dist/Button/Button.js +53 -0
- package/dist/Button/Button.types.d.ts +52 -0
- package/dist/Button/Button.types.js +5 -0
- package/dist/Button/index.d.ts +2 -0
- package/dist/Button/index.js +34 -0
- package/dist/Calendar/Calendar.css +105 -0
- package/dist/Calendar/Calendar.d.ts +5 -0
- package/dist/Calendar/Calendar.js +275 -0
- package/dist/Calendar/Calendar.types.d.ts +76 -0
- package/dist/Calendar/Calendar.types.js +5 -0
- package/dist/Calendar/index.d.ts +2 -0
- package/dist/Calendar/index.js +34 -0
- package/dist/Calendar/utils.d.ts +25 -0
- package/dist/Calendar/utils.js +77 -0
- package/dist/Card/Card.css +9 -0
- package/dist/Card/Card.d.ts +5 -0
- package/dist/Card/Card.js +27 -0
- package/dist/Card/Card.types.d.ts +6 -0
- package/dist/Card/Card.types.js +5 -0
- package/dist/Card/CardContent.css +6 -0
- package/dist/Card/CardContent.d.ts +5 -0
- package/dist/Card/CardContent.js +25 -0
- package/dist/Card/CardContent.types.d.ts +6 -0
- package/dist/Card/CardContent.types.js +5 -0
- package/dist/Card/CardFooter.css +8 -0
- package/dist/Card/CardFooter.d.ts +5 -0
- package/dist/Card/CardFooter.js +25 -0
- package/dist/Card/CardFooter.types.d.ts +6 -0
- package/dist/Card/CardFooter.types.js +5 -0
- package/dist/Card/CardHeader.css +45 -0
- package/dist/Card/CardHeader.d.ts +5 -0
- package/dist/Card/CardHeader.js +59 -0
- package/dist/Card/CardHeader.types.d.ts +23 -0
- package/dist/Card/CardHeader.types.js +5 -0
- package/dist/Card/index.d.ts +10 -0
- package/dist/Card/index.js +94 -0
- package/dist/Checkbox/Checkbox.css +45 -0
- package/dist/Checkbox/Checkbox.d.ts +5 -0
- package/dist/Checkbox/Checkbox.js +101 -0
- package/dist/Checkbox/Checkbox.types.d.ts +84 -0
- package/dist/Checkbox/Checkbox.types.js +5 -0
- package/dist/Checkbox/CheckboxContext.d.ts +5 -0
- package/dist/Checkbox/CheckboxContext.js +11 -0
- package/dist/Checkbox/CheckboxGroup.d.ts +5 -0
- package/dist/Checkbox/CheckboxGroup.js +57 -0
- package/dist/Checkbox/index.d.ts +3 -0
- package/dist/Checkbox/index.js +42 -0
- package/dist/Countdown/Countdown.css +28 -0
- package/dist/Countdown/Countdown.d.ts +5 -0
- package/dist/Countdown/Countdown.js +103 -0
- package/dist/Countdown/Countdown.types.d.ts +123 -0
- package/dist/Countdown/Countdown.types.js +5 -0
- package/dist/Countdown/index.d.ts +3 -0
- package/dist/Countdown/index.js +46 -0
- package/dist/Countdown/useCountdown.d.ts +10 -0
- package/dist/Countdown/useCountdown.js +47 -0
- package/dist/Countdown/utils.d.ts +9 -0
- package/dist/Countdown/utils.js +124 -0
- package/dist/Divider/Divider.css +41 -0
- package/dist/Divider/Divider.d.ts +5 -0
- package/dist/Divider/Divider.js +64 -0
- package/dist/Divider/Divider.types.d.ts +19 -0
- package/dist/Divider/Divider.types.js +5 -0
- package/dist/Divider/index.d.ts +2 -0
- package/dist/Divider/index.js +34 -0
- package/dist/Drawer/Drawer.css +35 -0
- package/dist/Drawer/Drawer.d.ts +5 -0
- package/dist/Drawer/Drawer.js +66 -0
- package/dist/Drawer/Drawer.types.d.ts +51 -0
- package/dist/Drawer/Drawer.types.js +5 -0
- package/dist/Drawer/index.d.ts +2 -0
- package/dist/Drawer/index.js +34 -0
- package/dist/Fade/Fade.d.ts +4 -0
- package/dist/Fade/Fade.js +72 -0
- package/dist/Fade/Fade.types.d.ts +9 -0
- package/dist/Fade/Fade.types.js +5 -0
- package/dist/Fade/index.d.ts +3 -0
- package/dist/Fade/index.js +34 -0
- package/dist/IconButton/IconButton.css +130 -0
- package/dist/IconButton/IconButton.d.ts +5 -0
- package/dist/IconButton/IconButton.js +50 -0
- package/dist/IconButton/IconButton.types.d.ts +41 -0
- package/dist/IconButton/IconButton.types.js +5 -0
- package/dist/IconButton/index.d.ts +2 -0
- package/dist/IconButton/index.js +34 -0
- package/dist/Image/Image.d.ts +5 -0
- package/dist/Image/Image.js +123 -0
- package/dist/Image/Image.types.d.ts +48 -0
- package/dist/Image/Image.types.js +5 -0
- package/dist/Image/index.css +35 -0
- package/dist/Image/index.d.ts +3 -0
- package/dist/Image/index.js +34 -0
- package/dist/Input/Input.css +59 -0
- package/dist/Input/Input.d.ts +5 -0
- package/dist/Input/Input.js +115 -0
- package/dist/Input/Input.types.d.ts +70 -0
- package/dist/Input/Input.types.js +5 -0
- package/dist/Input/index.d.ts +2 -0
- package/dist/Input/index.js +34 -0
- package/dist/List/List.css +9 -0
- package/dist/List/List.d.ts +5 -0
- package/dist/List/List.js +43 -0
- package/dist/List/List.types.d.ts +22 -0
- package/dist/List/List.types.js +5 -0
- package/dist/List/ListContext.d.ts +7 -0
- package/dist/List/ListContext.js +12 -0
- package/dist/List/ListItem.css +23 -0
- package/dist/List/ListItem.d.ts +5 -0
- package/dist/List/ListItem.js +57 -0
- package/dist/List/ListItem.types.d.ts +20 -0
- package/dist/List/ListItem.types.js +5 -0
- package/dist/List/ListItemContent.css +18 -0
- package/dist/List/ListItemContent.d.ts +5 -0
- package/dist/List/ListItemContent.js +37 -0
- package/dist/List/ListItemContent.types.d.ts +16 -0
- package/dist/List/ListItemContent.types.js +5 -0
- package/dist/List/ListItemExtra.css +7 -0
- package/dist/List/ListItemExtra.d.ts +5 -0
- package/dist/List/ListItemExtra.js +29 -0
- package/dist/List/ListItemExtra.types.d.ts +8 -0
- package/dist/List/ListItemExtra.types.js +5 -0
- package/dist/List/ListItemFooter.css +9 -0
- package/dist/List/ListItemFooter.d.ts +5 -0
- package/dist/List/ListItemFooter.js +29 -0
- package/dist/List/ListItemFooter.types.d.ts +8 -0
- package/dist/List/ListItemFooter.types.js +5 -0
- package/dist/List/ListItemHeader.css +7 -0
- package/dist/List/ListItemHeader.d.ts +5 -0
- package/dist/List/ListItemHeader.js +29 -0
- package/dist/List/ListItemHeader.types.d.ts +8 -0
- package/dist/List/ListItemHeader.types.js +5 -0
- package/dist/List/index.d.ts +13 -0
- package/dist/List/index.js +134 -0
- package/dist/Loading/Loading.css +31 -0
- package/dist/Loading/Loading.d.ts +5 -0
- package/dist/Loading/Loading.js +39 -0
- package/dist/Loading/Loading.types.d.ts +20 -0
- package/dist/Loading/Loading.types.js +5 -0
- package/dist/Loading/index.d.ts +2 -0
- package/dist/Loading/index.js +34 -0
- package/dist/Modal/Modal.css +15 -0
- package/dist/Modal/Modal.d.ts +5 -0
- package/dist/Modal/Modal.js +89 -0
- package/dist/Modal/Modal.types.d.ts +20 -0
- package/dist/Modal/Modal.types.js +5 -0
- package/dist/Modal/index.d.ts +3 -0
- package/dist/Modal/index.js +34 -0
- package/dist/NavBar/NavBar.css +57 -0
- package/dist/NavBar/NavBar.d.ts +5 -0
- package/dist/NavBar/NavBar.js +87 -0
- package/dist/NavBar/NavBar.types.d.ts +44 -0
- package/dist/NavBar/NavBar.types.js +5 -0
- package/dist/NavBar/index.d.ts +2 -0
- package/dist/NavBar/index.js +34 -0
- package/dist/Portal/Portal.d.ts +4 -0
- package/dist/Portal/Portal.js +18 -0
- package/dist/Portal/Portal.miniapp.d.ts +4 -0
- package/dist/Portal/Portal.miniapp.js +44 -0
- package/dist/Portal/Portal.types.d.ts +22 -0
- package/dist/Portal/Portal.types.js +5 -0
- package/dist/Portal/PortalCore.d.ts +8 -0
- package/dist/Portal/PortalCore.js +57 -0
- package/dist/Portal/index.d.ts +3 -0
- package/dist/Portal/index.js +34 -0
- package/dist/Progress/Progress.css +22 -0
- package/dist/Progress/Progress.d.ts +8 -0
- package/dist/Progress/Progress.js +89 -0
- package/dist/Progress/Progress.types.d.ts +28 -0
- package/dist/Progress/Progress.types.js +5 -0
- package/dist/Progress/index.d.ts +3 -0
- package/dist/Progress/index.js +34 -0
- package/dist/Radio/Radio.css +65 -0
- package/dist/Radio/Radio.d.ts +5 -0
- package/dist/Radio/Radio.js +120 -0
- package/dist/Radio/Radio.types.d.ts +83 -0
- package/dist/Radio/Radio.types.js +5 -0
- package/dist/Radio/RadioButtonIcon.d.ts +12 -0
- package/dist/Radio/RadioButtonIcon.js +38 -0
- package/dist/Radio/RadioContext.d.ts +5 -0
- package/dist/Radio/RadioContext.js +11 -0
- package/dist/Radio/RadioGroup.d.ts +5 -0
- package/dist/Radio/RadioGroup.js +51 -0
- package/dist/Radio/index.d.ts +3 -0
- package/dist/Radio/index.js +42 -0
- package/dist/Rating/Rating.css +52 -0
- package/dist/Rating/Rating.d.ts +5 -0
- package/dist/Rating/Rating.js +100 -0
- package/dist/Rating/Rating.types.d.ts +66 -0
- package/dist/Rating/Rating.types.js +5 -0
- package/dist/Rating/index.d.ts +2 -0
- package/dist/Rating/index.js +34 -0
- package/dist/ScrollView/ScrollView.css +19 -0
- package/dist/ScrollView/ScrollView.d.ts +5 -0
- package/dist/ScrollView/ScrollView.js +204 -0
- package/dist/ScrollView/ScrollView.types.d.ts +258 -0
- package/dist/ScrollView/ScrollView.types.js +5 -0
- package/dist/ScrollView/index.d.ts +3 -0
- package/dist/ScrollView/index.js +34 -0
- package/dist/ScrollView/index.miniapp.d.ts +3 -0
- package/dist/ScrollView/index.miniapp.js +14 -0
- package/dist/Select/Select.css +89 -0
- package/dist/Select/Select.d.ts +5 -0
- package/dist/Select/Select.js +159 -0
- package/dist/Select/Select.types.d.ts +98 -0
- package/dist/Select/Select.types.js +5 -0
- package/dist/Select/SelectOption.d.ts +5 -0
- package/dist/Select/SelectOption.js +51 -0
- package/dist/Select/index.d.ts +4 -0
- package/dist/Select/index.js +42 -0
- package/dist/Select/selectContext.d.ts +4 -0
- package/dist/Select/selectContext.js +11 -0
- package/dist/Skeleton/Skeleton.css +54 -0
- package/dist/Skeleton/Skeleton.d.ts +5 -0
- package/dist/Skeleton/Skeleton.js +42 -0
- package/dist/Skeleton/Skeleton.types.d.ts +33 -0
- package/dist/Skeleton/Skeleton.types.js +5 -0
- package/dist/Skeleton/index.d.ts +3 -0
- package/dist/Skeleton/index.js +34 -0
- package/dist/Slide/Slide.d.ts +4 -0
- package/dist/Slide/Slide.js +88 -0
- package/dist/Slide/Slide.types.d.ts +14 -0
- package/dist/Slide/Slide.types.js +5 -0
- package/dist/Slide/index.d.ts +3 -0
- package/dist/Slide/index.js +34 -0
- package/dist/Slider/Slider.css +95 -0
- package/dist/Slider/Slider.d.ts +5 -0
- package/dist/Slider/Slider.js +281 -0
- package/dist/Slider/Slider.types.d.ts +62 -0
- package/dist/Slider/Slider.types.js +5 -0
- package/dist/Slider/index.d.ts +2 -0
- package/dist/Slider/index.js +34 -0
- package/dist/Slider/utils.d.ts +14 -0
- package/dist/Slider/utils.js +30 -0
- package/dist/Stack/Stack.css +11 -0
- package/dist/Stack/Stack.d.ts +5 -0
- package/dist/Stack/Stack.js +53 -0
- package/dist/Stack/Stack.types.d.ts +35 -0
- package/dist/Stack/Stack.types.js +5 -0
- package/dist/Stack/demo/StackDemo.d.ts +4 -0
- package/dist/Stack/demo/StackDemo.js +126 -0
- package/dist/Stack/demo/index.css +23 -0
- package/dist/Stack/index.d.ts +3 -0
- package/dist/Stack/index.js +34 -0
- package/dist/Steps/Step.css +174 -0
- package/dist/Steps/Step.d.ts +5 -0
- package/dist/Steps/Step.js +107 -0
- package/dist/Steps/Step.types.d.ts +35 -0
- package/dist/Steps/Step.types.js +5 -0
- package/dist/Steps/Steps.css +14 -0
- package/dist/Steps/Steps.d.ts +5 -0
- package/dist/Steps/Steps.js +65 -0
- package/dist/Steps/Steps.types.d.ts +35 -0
- package/dist/Steps/Steps.types.js +5 -0
- package/dist/Steps/StepsContext.d.ts +5 -0
- package/dist/Steps/StepsContext.js +11 -0
- package/dist/Steps/index.d.ts +4 -0
- package/dist/Steps/index.js +54 -0
- package/dist/Swiper/Swiper.css +20 -0
- package/dist/Swiper/Swiper.d.ts +10 -0
- package/dist/Swiper/Swiper.js +109 -0
- package/dist/Swiper/Swiper.types.d.ts +173 -0
- package/dist/Swiper/Swiper.types.js +5 -0
- package/dist/Swiper/SwiperItem.d.ts +7 -0
- package/dist/Swiper/SwiperItem.js +30 -0
- package/dist/Swiper/index.d.ts +3 -0
- package/dist/Swiper/index.js +42 -0
- package/dist/Swiper/index.miniapp.d.ts +8 -0
- package/dist/Swiper/index.miniapp.js +23 -0
- package/dist/Switch/Switch.css +127 -0
- package/dist/Switch/Switch.d.ts +5 -0
- package/dist/Switch/Switch.js +73 -0
- package/dist/Switch/Switch.types.d.ts +56 -0
- package/dist/Switch/Switch.types.js +5 -0
- package/dist/Switch/index.d.ts +3 -0
- package/dist/Switch/index.js +34 -0
- package/dist/TabBar/TabBar.css +8 -0
- package/dist/TabBar/TabBar.d.ts +5 -0
- package/dist/TabBar/TabBar.js +47 -0
- package/dist/TabBar/TabBarContext.d.ts +27 -0
- package/dist/TabBar/TabBarContext.js +9 -0
- package/dist/TabBar/TabBarItem.css +38 -0
- package/dist/TabBar/TabBarItem.d.ts +5 -0
- package/dist/TabBar/TabBarItem.js +62 -0
- package/dist/TabBar/index.d.ts +4 -0
- package/dist/TabBar/index.js +36 -0
- package/dist/TabBar/index.types.d.ts +54 -0
- package/dist/TabBar/index.types.js +5 -0
- package/dist/Tabs/Tab.css +52 -0
- package/dist/Tabs/Tab.d.ts +5 -0
- package/dist/Tabs/Tab.js +58 -0
- package/dist/Tabs/Tab.types.d.ts +12 -0
- package/dist/Tabs/Tab.types.js +5 -0
- package/dist/Tabs/TabPanel.css +9 -0
- package/dist/Tabs/TabPanel.d.ts +5 -0
- package/dist/Tabs/TabPanel.js +37 -0
- package/dist/Tabs/TabPanel.types.d.ts +19 -0
- package/dist/Tabs/TabPanel.types.js +5 -0
- package/dist/Tabs/Tabs.css +56 -0
- package/dist/Tabs/Tabs.d.ts +5 -0
- package/dist/Tabs/Tabs.js +193 -0
- package/dist/Tabs/Tabs.types.d.ts +45 -0
- package/dist/Tabs/Tabs.types.js +5 -0
- package/dist/Tabs/TabsContext.d.ts +9 -0
- package/dist/Tabs/TabsContext.js +14 -0
- package/dist/Tabs/index.d.ts +6 -0
- package/dist/Tabs/index.js +74 -0
- package/dist/Tabs/utils/bound.d.ts +1 -0
- package/dist/Tabs/utils/bound.js +16 -0
- package/dist/Tag/Tag.css +97 -0
- package/dist/Tag/Tag.d.ts +5 -0
- package/dist/Tag/Tag.js +80 -0
- package/dist/Tag/Tag.types.d.ts +23 -0
- package/dist/Tag/Tag.types.js +5 -0
- package/dist/Tag/TagGroup.css +16 -0
- package/dist/Tag/TagGroup.d.ts +5 -0
- package/dist/Tag/TagGroup.js +27 -0
- package/dist/Tag/TagGroup.types.d.ts +6 -0
- package/dist/Tag/TagGroup.types.js +5 -0
- package/dist/Tag/index.d.ts +5 -0
- package/dist/Tag/index.js +48 -0
- package/dist/TextArea/TextArea.css +43 -0
- package/dist/TextArea/TextArea.d.ts +5 -0
- package/dist/TextArea/TextArea.js +149 -0
- package/dist/TextArea/TextArea.types.d.ts +70 -0
- package/dist/TextArea/TextArea.types.js +5 -0
- package/dist/TextArea/index.d.ts +2 -0
- package/dist/TextArea/index.js +34 -0
- package/dist/Transition/Transition.d.ts +4 -0
- package/dist/Transition/Transition.js +19 -0
- package/dist/Transition/Transition.miniapp.d.ts +4 -0
- package/dist/Transition/Transition.miniapp.js +19 -0
- package/dist/Transition/Transition.types.d.ts +100 -0
- package/dist/Transition/Transition.types.js +5 -0
- package/dist/Transition/TransitionCore.d.ts +4 -0
- package/dist/Transition/TransitionCore.js +180 -0
- package/dist/Transition/index.d.ts +3 -0
- package/dist/Transition/index.js +34 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.js +423 -0
- package/es/ActionSheet/ActionSheet.css +27 -0
- package/es/ActionSheet/ActionSheet.d.ts +5 -0
- package/es/ActionSheet/ActionSheet.js +59 -0
- package/es/ActionSheet/ActionSheet.types.d.ts +28 -0
- package/es/ActionSheet/ActionSheet.types.js +1 -0
- package/es/ActionSheet/ActionSheetContext.d.ts +4 -0
- package/es/ActionSheet/ActionSheetContext.js +4 -0
- package/es/ActionSheet/ActionSheetItem.css +51 -0
- package/es/ActionSheet/ActionSheetItem.d.ts +5 -0
- package/es/ActionSheet/ActionSheetItem.js +51 -0
- package/es/ActionSheet/ActionSheetItem.types.d.ts +38 -0
- package/es/ActionSheet/ActionSheetItem.types.js +1 -0
- package/es/ActionSheet/index.d.ts +4 -0
- package/es/ActionSheet/index.js +4 -0
- package/es/Alert/Alert.d.ts +5 -0
- package/es/Alert/Alert.js +110 -0
- package/es/Alert/Alert.types.d.ts +61 -0
- package/es/Alert/Alert.types.js +1 -0
- package/es/Alert/index.css +89 -0
- package/es/Alert/index.d.ts +4 -0
- package/es/Alert/index.js +4 -0
- package/es/Avatar/Avatar.css +43 -0
- package/es/Avatar/Avatar.d.ts +5 -0
- package/es/Avatar/Avatar.js +55 -0
- package/es/Avatar/Avatar.types.d.ts +46 -0
- package/es/Avatar/Avatar.types.js +1 -0
- package/es/Avatar/AvatarGroup.css +31 -0
- package/es/Avatar/AvatarGroup.d.ts +5 -0
- package/es/Avatar/AvatarGroup.js +65 -0
- package/es/Avatar/AvatarGroup.types.d.ts +27 -0
- package/es/Avatar/AvatarGroup.types.js +1 -0
- package/es/Avatar/index.d.ts +6 -0
- package/es/Avatar/index.js +6 -0
- package/es/Backdrop/Backdrop.css +14 -0
- package/es/Backdrop/Backdrop.d.ts +5 -0
- package/es/Backdrop/Backdrop.js +30 -0
- package/es/Backdrop/Backdrop.types.d.ts +17 -0
- package/es/Backdrop/Backdrop.types.js +1 -0
- package/es/Backdrop/index.d.ts +2 -0
- package/es/Backdrop/index.js +2 -0
- package/es/Badge/Badge.css +95 -0
- package/es/Badge/Badge.d.ts +5 -0
- package/es/Badge/Badge.js +38 -0
- package/es/Badge/Badge.types.d.ts +27 -0
- package/es/Badge/Badge.types.js +1 -0
- package/es/Badge/index.d.ts +2 -0
- package/es/Badge/index.js +2 -0
- package/es/Button/Button.css +200 -0
- package/es/Button/Button.d.ts +5 -0
- package/es/Button/Button.js +47 -0
- package/es/Button/Button.types.d.ts +52 -0
- package/es/Button/Button.types.js +1 -0
- package/es/Button/index.d.ts +2 -0
- package/es/Button/index.js +2 -0
- package/es/Calendar/Calendar.css +105 -0
- package/es/Calendar/Calendar.d.ts +5 -0
- package/es/Calendar/Calendar.js +286 -0
- package/es/Calendar/Calendar.types.d.ts +76 -0
- package/es/Calendar/Calendar.types.js +1 -0
- package/es/Calendar/index.d.ts +2 -0
- package/es/Calendar/index.js +2 -0
- package/es/Calendar/utils.d.ts +25 -0
- package/es/Calendar/utils.js +66 -0
- package/es/Card/Card.css +9 -0
- package/es/Card/Card.d.ts +5 -0
- package/es/Card/Card.js +21 -0
- package/es/Card/Card.types.d.ts +6 -0
- package/es/Card/Card.types.js +1 -0
- package/es/Card/CardContent.css +6 -0
- package/es/Card/CardContent.d.ts +5 -0
- package/es/Card/CardContent.js +19 -0
- package/es/Card/CardContent.types.d.ts +6 -0
- package/es/Card/CardContent.types.js +1 -0
- package/es/Card/CardFooter.css +8 -0
- package/es/Card/CardFooter.d.ts +5 -0
- package/es/Card/CardFooter.js +19 -0
- package/es/Card/CardFooter.types.d.ts +6 -0
- package/es/Card/CardFooter.types.js +1 -0
- package/es/Card/CardHeader.css +45 -0
- package/es/Card/CardHeader.d.ts +5 -0
- package/es/Card/CardHeader.js +53 -0
- package/es/Card/CardHeader.types.d.ts +23 -0
- package/es/Card/CardHeader.types.js +1 -0
- package/es/Card/index.d.ts +10 -0
- package/es/Card/index.js +10 -0
- package/es/Checkbox/Checkbox.css +45 -0
- package/es/Checkbox/Checkbox.d.ts +5 -0
- package/es/Checkbox/Checkbox.js +108 -0
- package/es/Checkbox/Checkbox.types.d.ts +84 -0
- package/es/Checkbox/Checkbox.types.js +1 -0
- package/es/Checkbox/CheckboxContext.d.ts +5 -0
- package/es/Checkbox/CheckboxContext.js +4 -0
- package/es/Checkbox/CheckboxGroup.d.ts +5 -0
- package/es/Checkbox/CheckboxGroup.js +64 -0
- package/es/Checkbox/index.d.ts +3 -0
- package/es/Checkbox/index.js +3 -0
- package/es/Countdown/Countdown.css +28 -0
- package/es/Countdown/Countdown.d.ts +5 -0
- package/es/Countdown/Countdown.js +109 -0
- package/es/Countdown/Countdown.types.d.ts +123 -0
- package/es/Countdown/Countdown.types.js +1 -0
- package/es/Countdown/index.d.ts +3 -0
- package/es/Countdown/index.js +3 -0
- package/es/Countdown/useCountdown.d.ts +10 -0
- package/es/Countdown/useCountdown.js +55 -0
- package/es/Countdown/utils.d.ts +9 -0
- package/es/Countdown/utils.js +126 -0
- package/es/Divider/Divider.css +41 -0
- package/es/Divider/Divider.d.ts +5 -0
- package/es/Divider/Divider.js +52 -0
- package/es/Divider/Divider.types.d.ts +19 -0
- package/es/Divider/Divider.types.js +1 -0
- package/es/Divider/index.d.ts +2 -0
- package/es/Divider/index.js +2 -0
- package/es/Drawer/Drawer.css +35 -0
- package/es/Drawer/Drawer.d.ts +5 -0
- package/es/Drawer/Drawer.js +71 -0
- package/es/Drawer/Drawer.types.d.ts +51 -0
- package/es/Drawer/Drawer.types.js +1 -0
- package/es/Drawer/index.d.ts +2 -0
- package/es/Drawer/index.js +2 -0
- package/es/Fade/Fade.d.ts +4 -0
- package/es/Fade/Fade.js +70 -0
- package/es/Fade/Fade.types.d.ts +9 -0
- package/es/Fade/Fade.types.js +1 -0
- package/es/Fade/index.d.ts +3 -0
- package/es/Fade/index.js +3 -0
- package/es/IconButton/IconButton.css +130 -0
- package/es/IconButton/IconButton.d.ts +5 -0
- package/es/IconButton/IconButton.js +45 -0
- package/es/IconButton/IconButton.types.d.ts +41 -0
- package/es/IconButton/IconButton.types.js +1 -0
- package/es/IconButton/index.d.ts +2 -0
- package/es/IconButton/index.js +2 -0
- package/es/Image/Image.d.ts +5 -0
- package/es/Image/Image.js +131 -0
- package/es/Image/Image.types.d.ts +48 -0
- package/es/Image/Image.types.js +1 -0
- package/es/Image/index.css +35 -0
- package/es/Image/index.d.ts +3 -0
- package/es/Image/index.js +3 -0
- package/es/Input/Input.css +59 -0
- package/es/Input/Input.d.ts +5 -0
- package/es/Input/Input.js +125 -0
- package/es/Input/Input.types.d.ts +70 -0
- package/es/Input/Input.types.js +1 -0
- package/es/Input/index.d.ts +2 -0
- package/es/Input/index.js +2 -0
- package/es/List/List.css +9 -0
- package/es/List/List.d.ts +5 -0
- package/es/List/List.js +37 -0
- package/es/List/List.types.d.ts +22 -0
- package/es/List/List.types.js +1 -0
- package/es/List/ListContext.d.ts +7 -0
- package/es/List/ListContext.js +5 -0
- package/es/List/ListItem.css +23 -0
- package/es/List/ListItem.d.ts +5 -0
- package/es/List/ListItem.js +52 -0
- package/es/List/ListItem.types.d.ts +20 -0
- package/es/List/ListItem.types.js +1 -0
- package/es/List/ListItemContent.css +18 -0
- package/es/List/ListItemContent.d.ts +5 -0
- package/es/List/ListItemContent.js +31 -0
- package/es/List/ListItemContent.types.d.ts +16 -0
- package/es/List/ListItemContent.types.js +1 -0
- package/es/List/ListItemExtra.css +7 -0
- package/es/List/ListItemExtra.d.ts +5 -0
- package/es/List/ListItemExtra.js +23 -0
- package/es/List/ListItemExtra.types.d.ts +8 -0
- package/es/List/ListItemExtra.types.js +1 -0
- package/es/List/ListItemFooter.css +9 -0
- package/es/List/ListItemFooter.d.ts +5 -0
- package/es/List/ListItemFooter.js +23 -0
- package/es/List/ListItemFooter.types.d.ts +8 -0
- package/es/List/ListItemFooter.types.js +1 -0
- package/es/List/ListItemHeader.css +7 -0
- package/es/List/ListItemHeader.d.ts +5 -0
- package/es/List/ListItemHeader.js +23 -0
- package/es/List/ListItemHeader.types.d.ts +8 -0
- package/es/List/ListItemHeader.types.js +1 -0
- package/es/List/index.d.ts +13 -0
- package/es/List/index.js +13 -0
- package/es/Loading/Loading.css +31 -0
- package/es/Loading/Loading.d.ts +5 -0
- package/es/Loading/Loading.js +33 -0
- package/es/Loading/Loading.types.d.ts +20 -0
- package/es/Loading/Loading.types.js +1 -0
- package/es/Loading/index.d.ts +2 -0
- package/es/Loading/index.js +2 -0
- package/es/Modal/Modal.css +15 -0
- package/es/Modal/Modal.d.ts +5 -0
- package/es/Modal/Modal.js +95 -0
- package/es/Modal/Modal.types.d.ts +20 -0
- package/es/Modal/Modal.types.js +1 -0
- package/es/Modal/index.d.ts +3 -0
- package/es/Modal/index.js +3 -0
- package/es/NavBar/NavBar.css +57 -0
- package/es/NavBar/NavBar.d.ts +5 -0
- package/es/NavBar/NavBar.js +82 -0
- package/es/NavBar/NavBar.types.d.ts +44 -0
- package/es/NavBar/NavBar.types.js +1 -0
- package/es/NavBar/index.d.ts +2 -0
- package/es/NavBar/index.js +2 -0
- package/es/Portal/Portal.d.ts +4 -0
- package/es/Portal/Portal.js +11 -0
- package/es/Portal/Portal.miniapp.d.ts +4 -0
- package/es/Portal/Portal.miniapp.js +33 -0
- package/es/Portal/Portal.types.d.ts +22 -0
- package/es/Portal/Portal.types.js +1 -0
- package/es/Portal/PortalCore.d.ts +8 -0
- package/es/Portal/PortalCore.js +57 -0
- package/es/Portal/index.d.ts +3 -0
- package/es/Portal/index.js +3 -0
- package/es/Progress/Progress.css +22 -0
- package/es/Progress/Progress.d.ts +8 -0
- package/es/Progress/Progress.js +90 -0
- package/es/Progress/Progress.types.d.ts +28 -0
- package/es/Progress/Progress.types.js +1 -0
- package/es/Progress/index.d.ts +3 -0
- package/es/Progress/index.js +3 -0
- package/es/Radio/Radio.css +65 -0
- package/es/Radio/Radio.d.ts +5 -0
- package/es/Radio/Radio.js +126 -0
- package/es/Radio/Radio.types.d.ts +83 -0
- package/es/Radio/Radio.types.js +1 -0
- package/es/Radio/RadioButtonIcon.d.ts +12 -0
- package/es/Radio/RadioButtonIcon.js +33 -0
- package/es/Radio/RadioContext.d.ts +5 -0
- package/es/Radio/RadioContext.js +4 -0
- package/es/Radio/RadioGroup.d.ts +5 -0
- package/es/Radio/RadioGroup.js +52 -0
- package/es/Radio/index.d.ts +3 -0
- package/es/Radio/index.js +3 -0
- package/es/Rating/Rating.css +52 -0
- package/es/Rating/Rating.d.ts +5 -0
- package/es/Rating/Rating.js +107 -0
- package/es/Rating/Rating.types.d.ts +66 -0
- package/es/Rating/Rating.types.js +1 -0
- package/es/Rating/index.d.ts +2 -0
- package/es/Rating/index.js +2 -0
- package/es/ScrollView/ScrollView.css +19 -0
- package/es/ScrollView/ScrollView.d.ts +5 -0
- package/es/ScrollView/ScrollView.js +204 -0
- package/es/ScrollView/ScrollView.types.d.ts +258 -0
- package/es/ScrollView/ScrollView.types.js +1 -0
- package/es/ScrollView/index.d.ts +3 -0
- package/es/ScrollView/index.js +3 -0
- package/es/ScrollView/index.miniapp.d.ts +3 -0
- package/es/ScrollView/index.miniapp.js +3 -0
- package/es/Select/Select.css +89 -0
- package/es/Select/Select.d.ts +5 -0
- package/es/Select/Select.js +165 -0
- package/es/Select/Select.types.d.ts +98 -0
- package/es/Select/Select.types.js +1 -0
- package/es/Select/SelectOption.d.ts +5 -0
- package/es/Select/SelectOption.js +43 -0
- package/es/Select/index.d.ts +4 -0
- package/es/Select/index.js +4 -0
- package/es/Select/selectContext.d.ts +4 -0
- package/es/Select/selectContext.js +5 -0
- package/es/Skeleton/Skeleton.css +54 -0
- package/es/Skeleton/Skeleton.d.ts +5 -0
- package/es/Skeleton/Skeleton.js +38 -0
- package/es/Skeleton/Skeleton.types.d.ts +33 -0
- package/es/Skeleton/Skeleton.types.js +1 -0
- package/es/Skeleton/index.d.ts +3 -0
- package/es/Skeleton/index.js +3 -0
- package/es/Slide/Slide.d.ts +4 -0
- package/es/Slide/Slide.js +85 -0
- package/es/Slide/Slide.types.d.ts +14 -0
- package/es/Slide/Slide.types.js +1 -0
- package/es/Slide/index.d.ts +3 -0
- package/es/Slide/index.js +3 -0
- package/es/Slider/Slider.css +95 -0
- package/es/Slider/Slider.d.ts +5 -0
- package/es/Slider/Slider.js +318 -0
- package/es/Slider/Slider.types.d.ts +62 -0
- package/es/Slider/Slider.types.js +1 -0
- package/es/Slider/index.d.ts +2 -0
- package/es/Slider/index.js +2 -0
- package/es/Slider/utils.d.ts +14 -0
- package/es/Slider/utils.js +25 -0
- package/es/Stack/Stack.css +11 -0
- package/es/Stack/Stack.d.ts +5 -0
- package/es/Stack/Stack.js +50 -0
- package/es/Stack/Stack.types.d.ts +35 -0
- package/es/Stack/Stack.types.js +1 -0
- package/es/Stack/demo/StackDemo.d.ts +4 -0
- package/es/Stack/demo/StackDemo.js +128 -0
- package/es/Stack/demo/index.css +23 -0
- package/es/Stack/index.d.ts +3 -0
- package/es/Stack/index.js +3 -0
- package/es/Steps/Step.css +174 -0
- package/es/Steps/Step.d.ts +5 -0
- package/es/Steps/Step.js +88 -0
- package/es/Steps/Step.types.d.ts +35 -0
- package/es/Steps/Step.types.js +1 -0
- package/es/Steps/Steps.css +14 -0
- package/es/Steps/Steps.d.ts +5 -0
- package/es/Steps/Steps.js +60 -0
- package/es/Steps/Steps.types.d.ts +35 -0
- package/es/Steps/Steps.types.js +1 -0
- package/es/Steps/StepsContext.d.ts +5 -0
- package/es/Steps/StepsContext.js +4 -0
- package/es/Steps/index.d.ts +4 -0
- package/es/Steps/index.js +4 -0
- package/es/Swiper/Swiper.css +20 -0
- package/es/Swiper/Swiper.d.ts +10 -0
- package/es/Swiper/Swiper.js +112 -0
- package/es/Swiper/Swiper.types.d.ts +173 -0
- package/es/Swiper/Swiper.types.js +1 -0
- package/es/Swiper/SwiperItem.d.ts +7 -0
- package/es/Swiper/SwiperItem.js +24 -0
- package/es/Swiper/index.d.ts +3 -0
- package/es/Swiper/index.js +3 -0
- package/es/Swiper/index.miniapp.d.ts +8 -0
- package/es/Swiper/index.miniapp.js +6 -0
- package/es/Switch/Switch.css +127 -0
- package/es/Switch/Switch.d.ts +5 -0
- package/es/Switch/Switch.js +76 -0
- package/es/Switch/Switch.types.d.ts +56 -0
- package/es/Switch/Switch.types.js +1 -0
- package/es/Switch/index.d.ts +3 -0
- package/es/Switch/index.js +3 -0
- package/es/TabBar/TabBar.css +8 -0
- package/es/TabBar/TabBar.d.ts +5 -0
- package/es/TabBar/TabBar.js +42 -0
- package/es/TabBar/TabBarContext.d.ts +27 -0
- package/es/TabBar/TabBarContext.js +3 -0
- package/es/TabBar/TabBarItem.css +38 -0
- package/es/TabBar/TabBarItem.d.ts +5 -0
- package/es/TabBar/TabBarItem.js +54 -0
- package/es/TabBar/index.d.ts +4 -0
- package/es/TabBar/index.js +4 -0
- package/es/TabBar/index.types.d.ts +54 -0
- package/es/TabBar/index.types.js +1 -0
- package/es/Tabs/Tab.css +52 -0
- package/es/Tabs/Tab.d.ts +5 -0
- package/es/Tabs/Tab.js +50 -0
- package/es/Tabs/Tab.types.d.ts +12 -0
- package/es/Tabs/Tab.types.js +1 -0
- package/es/Tabs/TabPanel.css +9 -0
- package/es/Tabs/TabPanel.d.ts +5 -0
- package/es/Tabs/TabPanel.js +30 -0
- package/es/Tabs/TabPanel.types.d.ts +19 -0
- package/es/Tabs/TabPanel.types.js +1 -0
- package/es/Tabs/Tabs.css +56 -0
- package/es/Tabs/Tabs.d.ts +5 -0
- package/es/Tabs/Tabs.js +210 -0
- package/es/Tabs/Tabs.types.d.ts +45 -0
- package/es/Tabs/Tabs.types.js +1 -0
- package/es/Tabs/TabsContext.d.ts +9 -0
- package/es/Tabs/TabsContext.js +7 -0
- package/es/Tabs/index.d.ts +6 -0
- package/es/Tabs/index.js +6 -0
- package/es/Tabs/utils/bound.d.ts +1 -0
- package/es/Tabs/utils/bound.js +10 -0
- package/es/Tag/Tag.css +97 -0
- package/es/Tag/Tag.d.ts +5 -0
- package/es/Tag/Tag.js +76 -0
- package/es/Tag/Tag.types.d.ts +23 -0
- package/es/Tag/Tag.types.js +1 -0
- package/es/Tag/TagGroup.css +16 -0
- package/es/Tag/TagGroup.d.ts +5 -0
- package/es/Tag/TagGroup.js +21 -0
- package/es/Tag/TagGroup.types.d.ts +6 -0
- package/es/Tag/TagGroup.types.js +1 -0
- package/es/Tag/index.d.ts +5 -0
- package/es/Tag/index.js +5 -0
- package/es/TextArea/TextArea.css +43 -0
- package/es/TextArea/TextArea.d.ts +5 -0
- package/es/TextArea/TextArea.js +150 -0
- package/es/TextArea/TextArea.types.d.ts +70 -0
- package/es/TextArea/TextArea.types.js +1 -0
- package/es/TextArea/index.d.ts +2 -0
- package/es/TextArea/index.js +2 -0
- package/es/Transition/Transition.d.ts +4 -0
- package/es/Transition/Transition.js +12 -0
- package/es/Transition/Transition.miniapp.d.ts +4 -0
- package/es/Transition/Transition.miniapp.js +12 -0
- package/es/Transition/Transition.types.d.ts +100 -0
- package/es/Transition/Transition.types.js +1 -0
- package/es/Transition/TransitionCore.d.ts +4 -0
- package/es/Transition/TransitionCore.js +289 -0
- package/es/Transition/index.d.ts +3 -0
- package/es/Transition/index.js +3 -0
- package/es/index.d.ts +38 -0
- package/es/index.js +38 -0
- package/package.json +50 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _ = require("../..");
|
|
9
|
+
require("./index.css");
|
|
10
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
|
+
const StackDemo = () => {
|
|
14
|
+
const [stackState, setStackState] = (0, _react.useState)({
|
|
15
|
+
direction: '',
|
|
16
|
+
alignItems: '',
|
|
17
|
+
justifyContent: '',
|
|
18
|
+
spacing: '',
|
|
19
|
+
wrap: ''
|
|
20
|
+
});
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement(_.Stack, null, /*#__PURE__*/_react.default.createElement(_.Stack, _extends({
|
|
22
|
+
style: {
|
|
23
|
+
width: '150px',
|
|
24
|
+
height: '150px'
|
|
25
|
+
}
|
|
26
|
+
}, stackState), /*#__PURE__*/_react.default.createElement(_.Button, null, "\u6309\u94AE1"), /*#__PURE__*/_react.default.createElement(_.Button, null, "\u6309\u94AE2"), /*#__PURE__*/_react.default.createElement(_.Button, null, "\u6309\u94AE3")), /*#__PURE__*/_react.default.createElement("div", {
|
|
27
|
+
className: "bui-stack-demo-options"
|
|
28
|
+
}, /*#__PURE__*/_react.default.createElement(_.RadioGroup, {
|
|
29
|
+
value: stackState.direction,
|
|
30
|
+
onChange: (e, data) => {
|
|
31
|
+
setStackState({
|
|
32
|
+
...stackState,
|
|
33
|
+
direction: data.value
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
37
|
+
className: "bui-stack-demo-options-title"
|
|
38
|
+
}, "direction"), /*#__PURE__*/_react.default.createElement(_.Radio, {
|
|
39
|
+
value: "row"
|
|
40
|
+
}, " row"), /*#__PURE__*/_react.default.createElement(_.Radio, {
|
|
41
|
+
value: "row-reverse"
|
|
42
|
+
}, " row-reverse"), /*#__PURE__*/_react.default.createElement(_.Radio, {
|
|
43
|
+
value: "column"
|
|
44
|
+
}, "column"), /*#__PURE__*/_react.default.createElement(_.Radio, {
|
|
45
|
+
value: "column-reverse"
|
|
46
|
+
}, "column-reverse")), /*#__PURE__*/_react.default.createElement(_.RadioGroup, {
|
|
47
|
+
value: stackState.justifyContent,
|
|
48
|
+
onChange: (e, data) => {
|
|
49
|
+
setStackState({
|
|
50
|
+
...stackState,
|
|
51
|
+
justifyContent: data.value
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
55
|
+
className: "bui-stack-demo-options-title"
|
|
56
|
+
}, " justifyContent"), /*#__PURE__*/_react.default.createElement(_.Radio, {
|
|
57
|
+
value: "flex-start"
|
|
58
|
+
}, " flex-start"), /*#__PURE__*/_react.default.createElement(_.Radio, {
|
|
59
|
+
value: "flex-end"
|
|
60
|
+
}, " flex-end"), /*#__PURE__*/_react.default.createElement(_.Radio, {
|
|
61
|
+
value: "center"
|
|
62
|
+
}, "center"), /*#__PURE__*/_react.default.createElement(_.Radio, {
|
|
63
|
+
value: "space-between"
|
|
64
|
+
}, "space-between"), /*#__PURE__*/_react.default.createElement(_.Radio, {
|
|
65
|
+
value: "space-around"
|
|
66
|
+
}, "space-around"), /*#__PURE__*/_react.default.createElement(_.Radio, {
|
|
67
|
+
value: "space-evenly"
|
|
68
|
+
}, "space-evenly")), /*#__PURE__*/_react.default.createElement(_.RadioGroup, {
|
|
69
|
+
value: stackState.alignItems,
|
|
70
|
+
onChange: (e, data) => {
|
|
71
|
+
setStackState({
|
|
72
|
+
...stackState,
|
|
73
|
+
alignItems: data.value
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
77
|
+
className: "bui-stack-demo-options-title"
|
|
78
|
+
}, " alignItems"), /*#__PURE__*/_react.default.createElement(_.Radio, {
|
|
79
|
+
value: "flex-start"
|
|
80
|
+
}, " flex-start"), /*#__PURE__*/_react.default.createElement(_.Radio, {
|
|
81
|
+
value: "flex-end"
|
|
82
|
+
}, " flex-end"), /*#__PURE__*/_react.default.createElement(_.Radio, {
|
|
83
|
+
value: "center"
|
|
84
|
+
}, "center"), /*#__PURE__*/_react.default.createElement(_.Radio, {
|
|
85
|
+
value: "stretch"
|
|
86
|
+
}, "stretch"), /*#__PURE__*/_react.default.createElement(_.Radio, {
|
|
87
|
+
value: "baseline"
|
|
88
|
+
}, " baseline")), /*#__PURE__*/_react.default.createElement(_.RadioGroup, {
|
|
89
|
+
value: stackState.flexWrap,
|
|
90
|
+
onChange: (e, data) => {
|
|
91
|
+
setStackState({
|
|
92
|
+
...stackState,
|
|
93
|
+
flexWrap: data.value
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
97
|
+
className: "bui-stack-demo-options-title"
|
|
98
|
+
}, " flexWrap"), /*#__PURE__*/_react.default.createElement(_.Radio, {
|
|
99
|
+
value: "wrap"
|
|
100
|
+
}, " wrap"), /*#__PURE__*/_react.default.createElement(_.Radio, {
|
|
101
|
+
value: "no-wrap"
|
|
102
|
+
}, " no-wrap"), /*#__PURE__*/_react.default.createElement(_.Radio, {
|
|
103
|
+
value: "wrap-reverse"
|
|
104
|
+
}, "wrap-reverse")), /*#__PURE__*/_react.default.createElement(_.RadioGroup, {
|
|
105
|
+
value: stackState.spacing,
|
|
106
|
+
onChange: (e, data) => {
|
|
107
|
+
setStackState({
|
|
108
|
+
...stackState,
|
|
109
|
+
spacing: data.value
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
113
|
+
className: "bui-stack-demo-options-title"
|
|
114
|
+
}, " spacing"), /*#__PURE__*/_react.default.createElement(_.Radio, {
|
|
115
|
+
value: "10px"
|
|
116
|
+
}, "10px"), /*#__PURE__*/_react.default.createElement(_.Radio, {
|
|
117
|
+
value: "20px"
|
|
118
|
+
}, " 20px"), /*#__PURE__*/_react.default.createElement(_.Radio, {
|
|
119
|
+
value: "30px"
|
|
120
|
+
}, "30px"), /*#__PURE__*/_react.default.createElement(_.Radio, {
|
|
121
|
+
value: "40px"
|
|
122
|
+
}, "40px"), /*#__PURE__*/_react.default.createElement(_.Radio, {
|
|
123
|
+
value: "50px"
|
|
124
|
+
}, " 50px"))));
|
|
125
|
+
};
|
|
126
|
+
var _default = exports.default = StackDemo;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.bui-stack-demo-options {
|
|
2
|
+
display: flex;
|
|
3
|
+
column-gap: 30px;
|
|
4
|
+
}
|
|
5
|
+
.bui-stack-demo-options-title {
|
|
6
|
+
font-weight: 500;
|
|
7
|
+
}
|
|
8
|
+
@media all and (max-width: 570px) {
|
|
9
|
+
.bui-stack-demo-options {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
row-gap: 15px;
|
|
13
|
+
}
|
|
14
|
+
.bui-stack-demo-options-title {
|
|
15
|
+
width: 100%;
|
|
16
|
+
font-size: 16px;
|
|
17
|
+
}
|
|
18
|
+
.bui-stack-demo-options .bui-radio-group {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-wrap: wrap;
|
|
21
|
+
align-items: center;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
Stack: true
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "Stack", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () {
|
|
12
|
+
return _Stack.default;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "default", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () {
|
|
18
|
+
return _Stack.default;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
var _Stack = _interopRequireDefault(require("./Stack"));
|
|
22
|
+
var _Stack2 = require("./Stack.types");
|
|
23
|
+
Object.keys(_Stack2).forEach(function (key) {
|
|
24
|
+
if (key === "default" || key === "__esModule") return;
|
|
25
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
26
|
+
if (key in exports && exports[key] === _Stack2[key]) return;
|
|
27
|
+
Object.defineProperty(exports, key, {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () {
|
|
30
|
+
return _Stack2[key];
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
.bui-step {
|
|
2
|
+
display: flex;
|
|
3
|
+
position: relative;
|
|
4
|
+
line-height: var(--bui-line-height);
|
|
5
|
+
font-family: var(--bui-font-family);
|
|
6
|
+
}
|
|
7
|
+
.bui-step-label-horizontal {
|
|
8
|
+
line-height: 1.8;
|
|
9
|
+
}
|
|
10
|
+
.bui-step:last-child .bui-step-line::after {
|
|
11
|
+
display: none;
|
|
12
|
+
}
|
|
13
|
+
.bui-step-line {
|
|
14
|
+
position: absolute;
|
|
15
|
+
top: 0;
|
|
16
|
+
width: 1px;
|
|
17
|
+
height: 100%;
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
left: 13px;
|
|
20
|
+
padding: var(--step-line-padding);
|
|
21
|
+
}
|
|
22
|
+
.bui-step-line::after {
|
|
23
|
+
display: inline-block;
|
|
24
|
+
content: '';
|
|
25
|
+
width: 1px;
|
|
26
|
+
border-left-width: 1px;
|
|
27
|
+
border-left-style: dotted;
|
|
28
|
+
height: calc(100% + 11px);
|
|
29
|
+
}
|
|
30
|
+
.bui-step-line-active::after {
|
|
31
|
+
border-left-color: var(--bui-color-primary);
|
|
32
|
+
}
|
|
33
|
+
.bui-step-line-wait::after {
|
|
34
|
+
border-left-color: var(--bui-color-fg-disabled);
|
|
35
|
+
}
|
|
36
|
+
.bui-step-line-finish::after {
|
|
37
|
+
border-left-color: var(--bui-color-primary);
|
|
38
|
+
}
|
|
39
|
+
.bui-step-line-error::after {
|
|
40
|
+
border-left-color: var(--bui-color-primary);
|
|
41
|
+
}
|
|
42
|
+
.bui-step-icon {
|
|
43
|
+
flex-shrink: 0;
|
|
44
|
+
width: 28px;
|
|
45
|
+
text-align: center;
|
|
46
|
+
margin: var(--step-icon-margin);
|
|
47
|
+
font-size: var(--bui-title-size-4);
|
|
48
|
+
}
|
|
49
|
+
.bui-step-icon-active {
|
|
50
|
+
width: 12px;
|
|
51
|
+
height: 12px;
|
|
52
|
+
position: relative;
|
|
53
|
+
background-color: var(--bui-color-primary);
|
|
54
|
+
border-radius: 50%;
|
|
55
|
+
margin-top: 2px;
|
|
56
|
+
display: inline-block;
|
|
57
|
+
}
|
|
58
|
+
.bui-step-content {
|
|
59
|
+
padding: 3px 0;
|
|
60
|
+
box-sizing: border-box;
|
|
61
|
+
flex: 1 0 0;
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
}
|
|
64
|
+
.bui-step-title-wrapper {
|
|
65
|
+
width: 100%;
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
}
|
|
69
|
+
.bui-step-title-wrapper-vertical {
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
align-items: flex-start;
|
|
72
|
+
}
|
|
73
|
+
.bui-step-title {
|
|
74
|
+
font-size: var(--title-font-size);
|
|
75
|
+
font-weight: var(--title-font-weight);
|
|
76
|
+
width: auto;
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
text-overflow: ellipsis;
|
|
79
|
+
white-space: nowrap;
|
|
80
|
+
}
|
|
81
|
+
.bui-step-title-active {
|
|
82
|
+
color: var(--bui-color-primary);
|
|
83
|
+
}
|
|
84
|
+
.bui-step-title-wait {
|
|
85
|
+
color: var(--bui-color-fg-subtle);
|
|
86
|
+
}
|
|
87
|
+
.bui-step-title-finish {
|
|
88
|
+
color: var(--bui-color-primary);
|
|
89
|
+
}
|
|
90
|
+
.bui-step-title-error {
|
|
91
|
+
color: var(--bui-color-primary);
|
|
92
|
+
}
|
|
93
|
+
.bui-step-title-horizontal {
|
|
94
|
+
margin-right: 4px;
|
|
95
|
+
max-width: 64%;
|
|
96
|
+
}
|
|
97
|
+
.bui-step-title-vertical {
|
|
98
|
+
width: 100%;
|
|
99
|
+
}
|
|
100
|
+
.bui-step-subtitle {
|
|
101
|
+
font-size: var(--subtitle-font-size);
|
|
102
|
+
color: var(--bui-color-fg-subtle);
|
|
103
|
+
width: auto;
|
|
104
|
+
overflow: hidden;
|
|
105
|
+
text-overflow: ellipsis;
|
|
106
|
+
white-space: nowrap;
|
|
107
|
+
}
|
|
108
|
+
.bui-step-subtitle-horizontal {
|
|
109
|
+
flex: 1;
|
|
110
|
+
}
|
|
111
|
+
.bui-step-subtitle-vertical {
|
|
112
|
+
width: 100%;
|
|
113
|
+
}
|
|
114
|
+
.bui-step-desc {
|
|
115
|
+
font-size: var(--bui-text-size-3);
|
|
116
|
+
color: var(--bui-color-fg-subtle);
|
|
117
|
+
margin-right: var(--bui-spacing-lg);
|
|
118
|
+
}
|
|
119
|
+
.bui-step-horizontal {
|
|
120
|
+
flex: 1;
|
|
121
|
+
padding-left: var(--bui-spacing-sm);
|
|
122
|
+
}
|
|
123
|
+
.bui-step-horizontal:first-child {
|
|
124
|
+
padding-left: 0;
|
|
125
|
+
}
|
|
126
|
+
.bui-step-horizontal:last-child .bui-step-title-wrapper::after {
|
|
127
|
+
display: none;
|
|
128
|
+
}
|
|
129
|
+
.bui-step-horizontal .bui-step-line {
|
|
130
|
+
display: none;
|
|
131
|
+
padding: 28px 0 6px;
|
|
132
|
+
}
|
|
133
|
+
.bui-step-horizontal .bui-step-icon {
|
|
134
|
+
margin-right: 0;
|
|
135
|
+
}
|
|
136
|
+
.bui-step-horizontal .bui-step-title-wrapper {
|
|
137
|
+
width: fit-content;
|
|
138
|
+
position: relative;
|
|
139
|
+
}
|
|
140
|
+
.bui-step-horizontal .bui-step-title-wrapper::after {
|
|
141
|
+
position: absolute;
|
|
142
|
+
width: 9999px;
|
|
143
|
+
height: 1px;
|
|
144
|
+
content: '';
|
|
145
|
+
left: 100%;
|
|
146
|
+
top: 0;
|
|
147
|
+
bottom: 0;
|
|
148
|
+
margin: auto 0;
|
|
149
|
+
}
|
|
150
|
+
.bui-step-horizontal .bui-step-title-wrapper-line-active::after {
|
|
151
|
+
background: var(--bui-color-fg-disabled);
|
|
152
|
+
}
|
|
153
|
+
.bui-step-horizontal .bui-step-title-wrapper-line-wait::after {
|
|
154
|
+
background: var(--bui-color-fg-disabled);
|
|
155
|
+
}
|
|
156
|
+
.bui-step-horizontal .bui-step-title-wrapper-line-finish::after {
|
|
157
|
+
background: var(--bui-color-primary);
|
|
158
|
+
}
|
|
159
|
+
.bui-step-horizontal .bui-step-title-wrapper-line-error::after {
|
|
160
|
+
background: var(--bui-color-primary);
|
|
161
|
+
}
|
|
162
|
+
.bui-step-horizontal .bui-step-title {
|
|
163
|
+
padding-right: var(--bui-spacing-sm);
|
|
164
|
+
margin-right: 0;
|
|
165
|
+
max-width: unset;
|
|
166
|
+
}
|
|
167
|
+
.bui-step-horizontal .bui-step-subtitle {
|
|
168
|
+
padding-right: var(--bui-spacing-sm);
|
|
169
|
+
margin-right: 0;
|
|
170
|
+
}
|
|
171
|
+
.bui-step-disabled {
|
|
172
|
+
opacity: 0.5;
|
|
173
|
+
pointer-events: none;
|
|
174
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _icons = require("@bifrostui/icons");
|
|
8
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
require("./Step.css");
|
|
11
|
+
var _StepsContext = _interopRequireDefault(require("./StepsContext"));
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
16
|
+
const classes = {
|
|
17
|
+
root: 'bui-step',
|
|
18
|
+
icon: 'bui-step-icon',
|
|
19
|
+
line: 'bui-step-line',
|
|
20
|
+
title: 'bui-step-title',
|
|
21
|
+
subtitle: 'bui-step-subtitle'
|
|
22
|
+
};
|
|
23
|
+
const Step = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
24
|
+
const {
|
|
25
|
+
className,
|
|
26
|
+
description,
|
|
27
|
+
icon,
|
|
28
|
+
title,
|
|
29
|
+
subtitle,
|
|
30
|
+
status,
|
|
31
|
+
disabled,
|
|
32
|
+
onClick,
|
|
33
|
+
...others
|
|
34
|
+
} = props;
|
|
35
|
+
const stepsContext = (0, _react.useContext)(_StepsContext.default);
|
|
36
|
+
const {
|
|
37
|
+
direction,
|
|
38
|
+
labelPlacement,
|
|
39
|
+
current,
|
|
40
|
+
onChange
|
|
41
|
+
} = stepsContext;
|
|
42
|
+
const isTitleVertical = labelPlacement === 'vertical';
|
|
43
|
+
const handleClick = e => {
|
|
44
|
+
if (disabled) return;
|
|
45
|
+
onClick?.(e, {
|
|
46
|
+
current
|
|
47
|
+
});
|
|
48
|
+
onChange?.(e, {
|
|
49
|
+
current
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
const renderIcon = () => {
|
|
53
|
+
const icons = {
|
|
54
|
+
active: /*#__PURE__*/_react.default.createElement("div", {
|
|
55
|
+
className: `${classes.icon}-active`
|
|
56
|
+
}),
|
|
57
|
+
wait: /*#__PURE__*/_react.default.createElement(_icons.CircleOutlinedIcon, {
|
|
58
|
+
htmlColor: "#ced1d6"
|
|
59
|
+
}),
|
|
60
|
+
finish: /*#__PURE__*/_react.default.createElement(_icons.SuccessCircleFilledIcon, {
|
|
61
|
+
color: "primary"
|
|
62
|
+
}),
|
|
63
|
+
error: /*#__PURE__*/_react.default.createElement(_icons.ErrorCircleFilledIcon, {
|
|
64
|
+
color: "primary"
|
|
65
|
+
})
|
|
66
|
+
};
|
|
67
|
+
if (icon) return icon;
|
|
68
|
+
return icons[status];
|
|
69
|
+
};
|
|
70
|
+
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
71
|
+
className: (0, _clsx.default)(classes.root, className, {
|
|
72
|
+
[`${classes.root}-${direction}`]: direction,
|
|
73
|
+
[`${classes.root}-label-${labelPlacement}`]: labelPlacement,
|
|
74
|
+
[`${classes.root}-disabled`]: disabled
|
|
75
|
+
}),
|
|
76
|
+
ref: ref,
|
|
77
|
+
onClick: handleClick
|
|
78
|
+
}, others), /*#__PURE__*/_react.default.createElement("div", {
|
|
79
|
+
className: (0, _clsx.default)(classes.line, {
|
|
80
|
+
[`${classes.line}-${status}`]: status
|
|
81
|
+
})
|
|
82
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
83
|
+
className: classes.icon
|
|
84
|
+
}, renderIcon()), /*#__PURE__*/_react.default.createElement("div", {
|
|
85
|
+
className: `${classes.root}-content`
|
|
86
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
87
|
+
className: (0, _clsx.default)(`${classes.title}-wrapper`, {
|
|
88
|
+
[`${classes.title}-wrapper-vertical`]: isTitleVertical,
|
|
89
|
+
[`${classes.title}-wrapper-line-${status}`]: status
|
|
90
|
+
})
|
|
91
|
+
}, !!title && /*#__PURE__*/_react.default.createElement("div", {
|
|
92
|
+
className: (0, _clsx.default)(classes.title, `${classes.title}-${status}`, {
|
|
93
|
+
[`${classes.title}-${labelPlacement}`]: labelPlacement
|
|
94
|
+
})
|
|
95
|
+
}, title), !!subtitle && /*#__PURE__*/_react.default.createElement("div", {
|
|
96
|
+
className: (0, _clsx.default)(classes.subtitle, {
|
|
97
|
+
[`${classes.subtitle}-${labelPlacement}`]: labelPlacement
|
|
98
|
+
})
|
|
99
|
+
}, subtitle)), !!description && /*#__PURE__*/_react.default.createElement("div", {
|
|
100
|
+
className: `${classes.root}-desc`
|
|
101
|
+
}, description)));
|
|
102
|
+
});
|
|
103
|
+
Step.displayName = 'Step';
|
|
104
|
+
Step.defaultProps = {
|
|
105
|
+
disabled: false
|
|
106
|
+
};
|
|
107
|
+
var _default = exports.default = Step;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { OverrideProps } from '@bifrostui/types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { OnChangeEvent } from './Steps.types';
|
|
4
|
+
export type StatusProps = 'wait' | 'active' | 'finish' | 'error';
|
|
5
|
+
export type StepProps<D extends React.ElementType = 'div', P = {}> = OverrideProps<{
|
|
6
|
+
props: P & {
|
|
7
|
+
/**
|
|
8
|
+
* 标题
|
|
9
|
+
*/
|
|
10
|
+
title?: React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* 副标题
|
|
13
|
+
*/
|
|
14
|
+
subtitle?: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* 步骤的详情描述
|
|
17
|
+
*/
|
|
18
|
+
description?: React.ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* 步骤图标
|
|
21
|
+
*/
|
|
22
|
+
icon?: React.ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* 当前步骤的状态 'wait' | 'active' | 'finish' | 'error'
|
|
25
|
+
*/
|
|
26
|
+
status?: StatusProps;
|
|
27
|
+
/**
|
|
28
|
+
* 是否禁止点击
|
|
29
|
+
* 默认 false
|
|
30
|
+
*/
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
onClick?: OnChangeEvent;
|
|
33
|
+
};
|
|
34
|
+
defaultComponent: D;
|
|
35
|
+
}, D>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.bui-steps {
|
|
2
|
+
--title-font-size: var(--bui-title-size-4);
|
|
3
|
+
--title-font-weight: var(--bui-font-weight-medium);
|
|
4
|
+
--subtitle-font-size: var(--bui-text-size-2);
|
|
5
|
+
--description-font-size: var(--bui-text-size-3);
|
|
6
|
+
--step-icon-margin: var(--bui-spacing-xs) var(--bui-spacing-xs) 0 0;
|
|
7
|
+
--step-line-padding: 20px 0 3px 0;
|
|
8
|
+
display: flex;
|
|
9
|
+
font-size: var(--bui-title-size-3);
|
|
10
|
+
font-family: var(--bui-font-family);
|
|
11
|
+
}
|
|
12
|
+
.bui-steps-vertical {
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _utils = require("@bifrostui/utils");
|
|
8
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
require("./Steps.css");
|
|
11
|
+
var _StepsContext = require("./StepsContext");
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
16
|
+
const prefixCls = 'bui-steps';
|
|
17
|
+
const Steps = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
18
|
+
const {
|
|
19
|
+
className,
|
|
20
|
+
children,
|
|
21
|
+
direction,
|
|
22
|
+
current,
|
|
23
|
+
labelPlacement,
|
|
24
|
+
onChange,
|
|
25
|
+
...others
|
|
26
|
+
} = props;
|
|
27
|
+
const renderStep = () => {
|
|
28
|
+
return (0, _utils.toArray)(children).map((child, index) => {
|
|
29
|
+
const childProps = {
|
|
30
|
+
key: index,
|
|
31
|
+
...child.props
|
|
32
|
+
};
|
|
33
|
+
if (!child.props.status) {
|
|
34
|
+
if (index === current) {
|
|
35
|
+
childProps.status = 'active';
|
|
36
|
+
} else if (index < current) {
|
|
37
|
+
childProps.status = 'finish';
|
|
38
|
+
} else {
|
|
39
|
+
childProps.status = 'wait';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return /*#__PURE__*/(0, _react.cloneElement)(child, childProps);
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement(_StepsContext.StepsContextProvider, {
|
|
46
|
+
value: {
|
|
47
|
+
direction,
|
|
48
|
+
current,
|
|
49
|
+
labelPlacement,
|
|
50
|
+
onChange
|
|
51
|
+
}
|
|
52
|
+
}, /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
53
|
+
className: (0, _clsx.default)(prefixCls, className, {
|
|
54
|
+
[`${prefixCls}-${direction}`]: direction
|
|
55
|
+
}),
|
|
56
|
+
ref: ref
|
|
57
|
+
}, others), renderStep()));
|
|
58
|
+
});
|
|
59
|
+
Steps.displayName = 'Steps';
|
|
60
|
+
Steps.defaultProps = {
|
|
61
|
+
current: 0,
|
|
62
|
+
direction: 'vertical',
|
|
63
|
+
labelPlacement: 'horizontal'
|
|
64
|
+
};
|
|
65
|
+
var _default = exports.default = Steps;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { OverrideProps } from '@bifrostui/types';
|
|
2
|
+
import React, { SyntheticEvent } from 'react';
|
|
3
|
+
export type LabelPlacementProps = 'horizontal' | 'vertical';
|
|
4
|
+
export type OnChangeEvent = (ev?: SyntheticEvent, data?: {
|
|
5
|
+
current: number;
|
|
6
|
+
}) => void;
|
|
7
|
+
export interface StepsContextProps {
|
|
8
|
+
direction?: string;
|
|
9
|
+
current?: number;
|
|
10
|
+
labelPlacement?: LabelPlacementProps;
|
|
11
|
+
onChange?: OnChangeEvent;
|
|
12
|
+
}
|
|
13
|
+
export type StepsProps<D extends React.ElementType = 'div', P = {}> = OverrideProps<{
|
|
14
|
+
props: P & {
|
|
15
|
+
/**
|
|
16
|
+
* 指定当前步骤,从 0 开始记数,在子 Step 元素中,可以通过 status 属性覆盖该状态
|
|
17
|
+
*/
|
|
18
|
+
current?: number;
|
|
19
|
+
/**
|
|
20
|
+
* 步骤条方向, 'horizontal' | 'vertical'
|
|
21
|
+
* 默认 vertical
|
|
22
|
+
*/
|
|
23
|
+
direction?: 'horizontal' | 'vertical';
|
|
24
|
+
/**
|
|
25
|
+
* 指定标签放置位置
|
|
26
|
+
* 默认 horizontal
|
|
27
|
+
*/
|
|
28
|
+
labelPlacement?: LabelPlacementProps;
|
|
29
|
+
/**
|
|
30
|
+
* 点击切换步骤时触发
|
|
31
|
+
*/
|
|
32
|
+
onChange?: OnChangeEvent;
|
|
33
|
+
};
|
|
34
|
+
defaultComponent: D;
|
|
35
|
+
}, D>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.StepsContextProvider = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
const StepsContext = /*#__PURE__*/_react.default.createContext(null);
|
|
10
|
+
const StepsContextProvider = exports.StepsContextProvider = StepsContext.Provider;
|
|
11
|
+
var _default = exports.default = StepsContext;
|