@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,57 @@
|
|
|
1
|
+
.bui-navbar {
|
|
2
|
+
--height: var(--bui-navbar-height, 45px);
|
|
3
|
+
--icon-size: var(--bui-navbar-icon-size, 24px);
|
|
4
|
+
--background-color: var(--bui-navbar-background-color, var(--bui-color-white));
|
|
5
|
+
--border-bottom: var(--bui-navbar-border-bottom, none);
|
|
6
|
+
--z-index: var(--bui-navbar-z-index, auto);
|
|
7
|
+
position: relative;
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: var(--height);
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
padding: 0 8px;
|
|
12
|
+
display: flex;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
align-items: center;
|
|
15
|
+
background-color: var(--background-color);
|
|
16
|
+
border-bottom: var(--border-bottom);
|
|
17
|
+
user-select: none;
|
|
18
|
+
z-index: var(--z-index);
|
|
19
|
+
font-family: var(--bui-font-family);
|
|
20
|
+
}
|
|
21
|
+
.bui-navbar-fixed {
|
|
22
|
+
position: fixed;
|
|
23
|
+
top: 0;
|
|
24
|
+
left: 0;
|
|
25
|
+
width: 100%;
|
|
26
|
+
}
|
|
27
|
+
.bui-navbar-title {
|
|
28
|
+
max-width: 60%;
|
|
29
|
+
padding: 0 8px;
|
|
30
|
+
font-size: var(--bui-title-size-2);
|
|
31
|
+
width: auto;
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
text-overflow: ellipsis;
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
}
|
|
36
|
+
.bui-navbar-left,
|
|
37
|
+
.bui-navbar-right {
|
|
38
|
+
flex: 1;
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
font-size: var(--bui-title-size-3);
|
|
42
|
+
}
|
|
43
|
+
.bui-navbar-left {
|
|
44
|
+
justify-content: flex-start;
|
|
45
|
+
text-align: left;
|
|
46
|
+
}
|
|
47
|
+
.bui-navbar-right {
|
|
48
|
+
justify-content: flex-end;
|
|
49
|
+
text-align: right;
|
|
50
|
+
align-self: stretch;
|
|
51
|
+
}
|
|
52
|
+
.bui-navbar-icon {
|
|
53
|
+
font-size: var(--icon-size);
|
|
54
|
+
}
|
|
55
|
+
.bui-navbar-placeholder {
|
|
56
|
+
width: 100%;
|
|
57
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _excluded = ["className", "title", "left", "leftIcon", "IconProps", "right", "fixed", "placeholder", "onClickLeft"];
|
|
3
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
|
+
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); }
|
|
7
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
8
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import clsx from 'clsx';
|
|
11
|
+
import { useForkRef, useSize } from '@bifrostui/utils';
|
|
12
|
+
import { ArrowBackwardLargeIcon } from '@bifrostui/icons';
|
|
13
|
+
import "./NavBar.css";
|
|
14
|
+
var prefixCls = 'bui-navbar';
|
|
15
|
+
var NavBar = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
16
|
+
var className = props.className,
|
|
17
|
+
title = props.title,
|
|
18
|
+
left = props.left,
|
|
19
|
+
leftIcon = props.leftIcon,
|
|
20
|
+
IconProps = props.IconProps,
|
|
21
|
+
right = props.right,
|
|
22
|
+
fixed = props.fixed,
|
|
23
|
+
placeholder = props.placeholder,
|
|
24
|
+
onClickLeft = props.onClickLeft,
|
|
25
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
|
26
|
+
|
|
27
|
+
// 计算内容区域高度,用来形成占位区域
|
|
28
|
+
var containerRef = React.useRef(null);
|
|
29
|
+
var handleForkRef = useForkRef(ref, containerRef);
|
|
30
|
+
var _useSize = useSize(containerRef),
|
|
31
|
+
height = _useSize.height;
|
|
32
|
+
|
|
33
|
+
// 渲染左侧内容
|
|
34
|
+
var renderLeft = function renderLeft() {
|
|
35
|
+
var icon;
|
|
36
|
+
if (leftIcon === false) {
|
|
37
|
+
icon = null;
|
|
38
|
+
} else {
|
|
39
|
+
icon = leftIcon !== null && leftIcon !== void 0 ? leftIcon : /*#__PURE__*/React.createElement(ArrowBackwardLargeIcon, _extends({
|
|
40
|
+
className: clsx("".concat(prefixCls, "-icon"))
|
|
41
|
+
}, IconProps));
|
|
42
|
+
}
|
|
43
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
className: "".concat(prefixCls, "-left"),
|
|
45
|
+
onClick: onClickLeft
|
|
46
|
+
}, icon, left);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
// 渲染右侧内容
|
|
50
|
+
var renderRight = function renderRight() {
|
|
51
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
52
|
+
className: "".concat(prefixCls, "-right")
|
|
53
|
+
}, right);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
// 渲染导航栏
|
|
57
|
+
var renderNavBar = function renderNavBar() {
|
|
58
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
59
|
+
ref: handleForkRef,
|
|
60
|
+
className: clsx(className, prefixCls, _defineProperty({}, "".concat(prefixCls, "-fixed"), fixed))
|
|
61
|
+
}, otherProps), renderLeft(), /*#__PURE__*/React.createElement("div", {
|
|
62
|
+
className: clsx("".concat(prefixCls, "-title"), 'ellipsis')
|
|
63
|
+
}, title), renderRight());
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
// 渲染占位块
|
|
67
|
+
var renderPlaceholder = function renderPlaceholder() {
|
|
68
|
+
if (fixed && placeholder) {
|
|
69
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
70
|
+
className: "".concat(prefixCls, "-placeholder"),
|
|
71
|
+
style: {
|
|
72
|
+
height: height !== null && height !== void 0 ? height : 0
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
return null;
|
|
77
|
+
};
|
|
78
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, renderNavBar(), renderPlaceholder());
|
|
79
|
+
});
|
|
80
|
+
NavBar.displayName = 'BuiNavBar';
|
|
81
|
+
NavBar.defaultProps = {};
|
|
82
|
+
export default NavBar;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React, { SyntheticEvent } from 'react';
|
|
2
|
+
import { OverrideProps } from '@bifrostui/types';
|
|
3
|
+
import type { ISvgIconProps } from '@bifrostui/icons';
|
|
4
|
+
export type NavBarProps<D extends React.ElementType = 'div', P = {}> = OverrideProps<{
|
|
5
|
+
props: P & {
|
|
6
|
+
/**
|
|
7
|
+
* 组件容器样式名
|
|
8
|
+
*/
|
|
9
|
+
className?: string;
|
|
10
|
+
/**
|
|
11
|
+
* 标题栏标题,默认值undefined
|
|
12
|
+
*/
|
|
13
|
+
title?: React.ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* 左侧图标后文案,默认值undefined
|
|
16
|
+
*/
|
|
17
|
+
left?: React.ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* 左侧图标,默认值<ArrowBackwardLargeIcon />
|
|
20
|
+
*/
|
|
21
|
+
leftIcon?: React.ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* iconPropss将值透传给内部icon
|
|
24
|
+
*/
|
|
25
|
+
IconProps?: Partial<ISvgIconProps>;
|
|
26
|
+
/**
|
|
27
|
+
* 右侧自定义内容,默认值undefined
|
|
28
|
+
*/
|
|
29
|
+
right?: React.ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* 是否固定在顶部,默认值false
|
|
32
|
+
*/
|
|
33
|
+
fixed?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* 固定在顶部时,是否在标签位置生成一个等高的占位元素,默认值false
|
|
36
|
+
*/
|
|
37
|
+
placeholder?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* 左侧点击事件
|
|
40
|
+
*/
|
|
41
|
+
onClickLeft?: (e: SyntheticEvent) => void;
|
|
42
|
+
};
|
|
43
|
+
defaultComponent: D;
|
|
44
|
+
}, D>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import PortalCore from "./PortalCore";
|
|
4
|
+
export var Portal = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(PortalCore, _extends({}, props, {
|
|
6
|
+
ref: ref,
|
|
7
|
+
rootElement: document.body
|
|
8
|
+
}));
|
|
9
|
+
});
|
|
10
|
+
Portal.displayName = 'BuiPortal';
|
|
11
|
+
export default Portal;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
import Taro from '@tarojs/taro';
|
|
3
|
+
import React, { forwardRef, useMemo } from 'react';
|
|
4
|
+
import PortalCore from "./PortalCore";
|
|
5
|
+
export var Portal = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
6
|
+
var disablePortal = props.disablePortal;
|
|
7
|
+
var rootWrapperElement = useMemo(function () {
|
|
8
|
+
if (!disablePortal) {
|
|
9
|
+
var currentPages = Taro.getCurrentPages() || [];
|
|
10
|
+
var currentPage = currentPages[currentPages.length - 1];
|
|
11
|
+
var pageElement = currentPage === null || currentPage === void 0 ? void 0 : currentPage.$taroPath;
|
|
12
|
+
var rootElement = document.getElementById(pageElement);
|
|
13
|
+
// Taro的document.getElementById 能获取到小程序页面堆栈里的所有元素,所以portalId需要加上页面标识区分
|
|
14
|
+
var portalId = rootElement !== null && rootElement !== void 0 && rootElement.sid ? "".concat(rootElement === null || rootElement === void 0 ? void 0 : rootElement.sid, "_portalId") : "".concat(pageElement, "_portalId");
|
|
15
|
+
var portalWrapperElement = document.getElementById(portalId);
|
|
16
|
+
// Taro删除楼层时候会影响兄弟元素render,放在Portal插入的元素删除时候影响页面的render,Portal经常会用在弹窗、浮层等场景,弹窗关闭,会导致页面重新render可能会导致表现回到初始态,在根节点插入一个view再插入Portal子元素 https://docs.taro.zone/docs/optimized#1-%E5%88%A0%E9%99%A4%E6%A5%BC%E5%B1%82%E8%8A%82%E7%82%B9%E8%A6%81%E8%B0%A8%E6%85%8E%E5%A4%84%E7%90%86
|
|
17
|
+
if (!portalWrapperElement) {
|
|
18
|
+
var view = document.createElement('view');
|
|
19
|
+
view.id = portalId;
|
|
20
|
+
rootElement === null || rootElement === void 0 || rootElement.appendChild(view);
|
|
21
|
+
return view;
|
|
22
|
+
}
|
|
23
|
+
return portalWrapperElement;
|
|
24
|
+
}
|
|
25
|
+
return undefined;
|
|
26
|
+
}, []);
|
|
27
|
+
return /*#__PURE__*/React.createElement(PortalCore, _extends({}, props, {
|
|
28
|
+
ref: ref,
|
|
29
|
+
rootElement: rootWrapperElement
|
|
30
|
+
}));
|
|
31
|
+
});
|
|
32
|
+
Portal.displayName = 'BuiPortal';
|
|
33
|
+
export default Portal;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface PortalCoreProps {
|
|
3
|
+
/**
|
|
4
|
+
* container中渲染的元素
|
|
5
|
+
*/
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* children内容将会被append到container中
|
|
9
|
+
* 默认是页面的根节点
|
|
10
|
+
*/
|
|
11
|
+
container?: Element | (() => Element | null) | null;
|
|
12
|
+
/**
|
|
13
|
+
* 禁止Portal,children将被渲染在父节点中
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
disablePortal?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* 页面跟节点
|
|
19
|
+
*/
|
|
20
|
+
rootElement?: Element;
|
|
21
|
+
}
|
|
22
|
+
export type PortalProps = Omit<PortalCoreProps, 'rootElement'>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PortalCoreProps } from './Portal.types';
|
|
3
|
+
/**
|
|
4
|
+
* Portals provide a first-class way to render children into a DOM node
|
|
5
|
+
* that exists outside the DOM hierarchy of the parent component.
|
|
6
|
+
*/
|
|
7
|
+
declare const PortalCore: React.ForwardRefExoticComponent<PortalCoreProps & React.RefAttributes<Element>>;
|
|
8
|
+
export default PortalCore;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import { setRef, useForkRef } from '@bifrostui/utils';
|
|
8
|
+
import React, { useLayoutEffect } from 'react';
|
|
9
|
+
import { createPortal } from 'react-dom';
|
|
10
|
+
function getContainer(container) {
|
|
11
|
+
return typeof container === 'function' ? container() : container;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Portals provide a first-class way to render children into a DOM node
|
|
16
|
+
* that exists outside the DOM hierarchy of the parent component.
|
|
17
|
+
*/
|
|
18
|
+
var PortalCore = /*#__PURE__*/React.forwardRef(function Portal(props, ref) {
|
|
19
|
+
var children = props.children,
|
|
20
|
+
container = props.container,
|
|
21
|
+
_props$disablePortal = props.disablePortal,
|
|
22
|
+
disablePortal = _props$disablePortal === void 0 ? false : _props$disablePortal,
|
|
23
|
+
rootElement = props.rootElement;
|
|
24
|
+
var _React$useState = React.useState(null),
|
|
25
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
26
|
+
mountNode = _React$useState2[0],
|
|
27
|
+
setMountNode = _React$useState2[1];
|
|
28
|
+
var handleRef = useForkRef(
|
|
29
|
+
// @ts-expect-error will upstream fix
|
|
30
|
+
/*#__PURE__*/React.isValidElement(children) ? children.ref : null, ref);
|
|
31
|
+
useLayoutEffect(function () {
|
|
32
|
+
if (!disablePortal) {
|
|
33
|
+
setMountNode(getContainer(container) || rootElement);
|
|
34
|
+
}
|
|
35
|
+
}, [container, disablePortal, rootElement]);
|
|
36
|
+
useLayoutEffect(function () {
|
|
37
|
+
if (mountNode && !disablePortal) {
|
|
38
|
+
setRef(ref, mountNode);
|
|
39
|
+
return function () {
|
|
40
|
+
setRef(ref, null);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
return undefined;
|
|
44
|
+
}, [ref, mountNode, disablePortal]);
|
|
45
|
+
if (disablePortal) {
|
|
46
|
+
if ( /*#__PURE__*/React.isValidElement(children)) {
|
|
47
|
+
var newProps = {
|
|
48
|
+
ref: handleRef
|
|
49
|
+
};
|
|
50
|
+
return /*#__PURE__*/React.cloneElement(children, newProps);
|
|
51
|
+
}
|
|
52
|
+
return children;
|
|
53
|
+
}
|
|
54
|
+
return mountNode ? /*#__PURE__*/createPortal(children, mountNode) : mountNode;
|
|
55
|
+
});
|
|
56
|
+
PortalCore.displayName = 'BuiPortalCore';
|
|
57
|
+
export default PortalCore;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.bui-progress {
|
|
2
|
+
--fill-color: var(--bui-color-primary);
|
|
3
|
+
--trail-color: rgba(156, 156, 165, 0.2);
|
|
4
|
+
--stroke-width: 8px;
|
|
5
|
+
width: 100%;
|
|
6
|
+
font-family: var(--bui-font-family);
|
|
7
|
+
}
|
|
8
|
+
.bui-progress-inner {
|
|
9
|
+
position: relative;
|
|
10
|
+
display: inline-block;
|
|
11
|
+
width: 100%;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
vertical-align: middle;
|
|
14
|
+
background-color: var(--trail-color);
|
|
15
|
+
border-radius: 100px;
|
|
16
|
+
}
|
|
17
|
+
.bui-progress-bg {
|
|
18
|
+
position: relative;
|
|
19
|
+
border-radius: 100px;
|
|
20
|
+
background-color: var(--fill-color);
|
|
21
|
+
height: var(--stroke-width);
|
|
22
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ProgressGradient, ProgressProps } from './Progress.types';
|
|
3
|
+
import './Progress.less';
|
|
4
|
+
export declare const handleGradient: (strokeColor: ProgressGradient) => {
|
|
5
|
+
backgroundImage: string;
|
|
6
|
+
};
|
|
7
|
+
declare const Progress: React.ForwardRefExoticComponent<Omit<ProgressProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export default Progress;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _excluded = ["from", "to", "direction"],
|
|
3
|
+
_excluded2 = ["className", "percent", "strokeWidth", "strokeColor", "trailColor"];
|
|
4
|
+
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); }
|
|
5
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
9
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
|
+
import clsx from 'clsx';
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import "./Progress.css";
|
|
15
|
+
var prefixCls = 'bui-progress';
|
|
16
|
+
function validProgress(progress) {
|
|
17
|
+
if (!progress || progress < 0) {
|
|
18
|
+
return 0;
|
|
19
|
+
}
|
|
20
|
+
if (progress > 100) {
|
|
21
|
+
return 100;
|
|
22
|
+
}
|
|
23
|
+
return progress;
|
|
24
|
+
}
|
|
25
|
+
var sortGradient = function sortGradient(gradients) {
|
|
26
|
+
var tempArr = [];
|
|
27
|
+
Object.keys(gradients).forEach(function (key) {
|
|
28
|
+
var formattedKey = parseFloat(key.replace(/%/g, ''));
|
|
29
|
+
if (!Number.isNaN(formattedKey)) {
|
|
30
|
+
tempArr.push({
|
|
31
|
+
key: formattedKey,
|
|
32
|
+
value: gradients[key]
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
tempArr = tempArr.sort(function (a, b) {
|
|
37
|
+
return a.key - b.key;
|
|
38
|
+
});
|
|
39
|
+
return tempArr.map(function (_ref) {
|
|
40
|
+
var key = _ref.key,
|
|
41
|
+
value = _ref.value;
|
|
42
|
+
return "".concat(value, " ").concat(key, "%");
|
|
43
|
+
}).join(', ');
|
|
44
|
+
};
|
|
45
|
+
export var handleGradient = function handleGradient(strokeColor) {
|
|
46
|
+
var from = strokeColor.from,
|
|
47
|
+
to = strokeColor.to,
|
|
48
|
+
_strokeColor$directio = strokeColor.direction,
|
|
49
|
+
direction = _strokeColor$directio === void 0 ? 'to right' : _strokeColor$directio,
|
|
50
|
+
rest = _objectWithoutProperties(strokeColor, _excluded);
|
|
51
|
+
if (Object.keys(rest).length !== 0) {
|
|
52
|
+
var sortedGradients = sortGradient(rest);
|
|
53
|
+
return {
|
|
54
|
+
backgroundImage: "linear-gradient(".concat(direction, ", ").concat(sortedGradients, ")")
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
backgroundImage: "linear-gradient(".concat(direction, ", ").concat(from, ", ").concat(to, ")")
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
var Progress = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
62
|
+
var className = props.className,
|
|
63
|
+
percent = props.percent,
|
|
64
|
+
strokeWidth = props.strokeWidth,
|
|
65
|
+
strokeColor = props.strokeColor,
|
|
66
|
+
trailColor = props.trailColor,
|
|
67
|
+
others = _objectWithoutProperties(props, _excluded2);
|
|
68
|
+
var backgroundProps = strokeColor && typeof strokeColor !== 'string' ? handleGradient(strokeColor) : {
|
|
69
|
+
background: strokeColor
|
|
70
|
+
};
|
|
71
|
+
var percentStyle = _objectSpread({
|
|
72
|
+
width: "".concat(validProgress(percent), "%"),
|
|
73
|
+
height: strokeWidth
|
|
74
|
+
}, backgroundProps);
|
|
75
|
+
var trailStyle = {
|
|
76
|
+
background: trailColor || undefined
|
|
77
|
+
};
|
|
78
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
79
|
+
className: clsx(prefixCls, className),
|
|
80
|
+
ref: ref
|
|
81
|
+
}, others), /*#__PURE__*/React.createElement("div", {
|
|
82
|
+
className: "".concat(prefixCls, "-inner"),
|
|
83
|
+
style: trailStyle
|
|
84
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
85
|
+
className: "".concat(prefixCls, "-bg"),
|
|
86
|
+
style: percentStyle
|
|
87
|
+
})));
|
|
88
|
+
});
|
|
89
|
+
Progress.displayName = 'BuiProgress';
|
|
90
|
+
export default Progress;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { OverrideProps } from '@bifrostui/types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export type ProgressStringGradients = {
|
|
4
|
+
[percentage: string]: string;
|
|
5
|
+
};
|
|
6
|
+
type ProgressFromToGradients = {
|
|
7
|
+
from: string;
|
|
8
|
+
to: string;
|
|
9
|
+
};
|
|
10
|
+
export type ProgressGradient = {
|
|
11
|
+
direction?: string;
|
|
12
|
+
} & (ProgressStringGradients | ProgressFromToGradients);
|
|
13
|
+
export type ProgressProps<D extends React.ElementType = 'div', P = {}> = OverrideProps<{
|
|
14
|
+
props: P & {
|
|
15
|
+
/** 百分比 */
|
|
16
|
+
percent?: number;
|
|
17
|
+
/**
|
|
18
|
+
* - 进度条的色彩,传入 object 时为渐变
|
|
19
|
+
*/
|
|
20
|
+
strokeColor?: string | ProgressGradient;
|
|
21
|
+
/** 未填充进度条的色彩 */
|
|
22
|
+
trailColor?: string;
|
|
23
|
+
/** 进度条线的宽度,单位 */
|
|
24
|
+
strokeWidth?: number | string;
|
|
25
|
+
};
|
|
26
|
+
defaultComponent: D;
|
|
27
|
+
}, D>;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
.bui-radio {
|
|
2
|
+
--label-color: var(--bui-color-fg-default);
|
|
3
|
+
--label-font-size: var(--bui-text-size-1);
|
|
4
|
+
--icon-font-size: var(--bui-title-size-2);
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
position: relative;
|
|
8
|
+
font-family: var(--bui-font-family);
|
|
9
|
+
}
|
|
10
|
+
.bui-radio-disabled {
|
|
11
|
+
pointer-events: none;
|
|
12
|
+
opacity: 0.5;
|
|
13
|
+
}
|
|
14
|
+
.bui-radio-label-left {
|
|
15
|
+
flex-direction: row-reverse;
|
|
16
|
+
}
|
|
17
|
+
.bui-radio-label-top {
|
|
18
|
+
flex-direction: column-reverse;
|
|
19
|
+
}
|
|
20
|
+
.bui-radio-label-bottom {
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
}
|
|
23
|
+
.bui-radio-input {
|
|
24
|
+
opacity: 0;
|
|
25
|
+
width: 100%;
|
|
26
|
+
height: 100%;
|
|
27
|
+
position: absolute;
|
|
28
|
+
top: 0;
|
|
29
|
+
left: 0;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
z-index: 1;
|
|
32
|
+
}
|
|
33
|
+
.bui-radio-icon {
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
justify-content: center;
|
|
37
|
+
flex-shrink: 0;
|
|
38
|
+
padding: 5px;
|
|
39
|
+
box-sizing: border-box;
|
|
40
|
+
}
|
|
41
|
+
.bui-radio-label {
|
|
42
|
+
font-size: var(--label-font-size);
|
|
43
|
+
color: var(--label-color);
|
|
44
|
+
}
|
|
45
|
+
.bui-radio-btn-icon {
|
|
46
|
+
position: relative;
|
|
47
|
+
display: flex;
|
|
48
|
+
}
|
|
49
|
+
.bui-radio-btn-icon .bui-svg-icon {
|
|
50
|
+
font-size: var(--icon-font-size);
|
|
51
|
+
}
|
|
52
|
+
.bui-radio-btn-icon-outline {
|
|
53
|
+
transform: scale(1);
|
|
54
|
+
transition: fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
55
|
+
}
|
|
56
|
+
.bui-radio-btn-icon-contained {
|
|
57
|
+
position: absolute;
|
|
58
|
+
left: 0;
|
|
59
|
+
transform: scale(0);
|
|
60
|
+
transition: transform 150ms cubic-bezier(0.4, 0, 1, 1) 0ms;
|
|
61
|
+
}
|
|
62
|
+
.bui-radio-btn-icon-checked .bui-radio-btn-icon-contained {
|
|
63
|
+
transform: scale(1);
|
|
64
|
+
transition: transform 150ms cubic-bezier(0, 0, 0.2, 1) 0ms;
|
|
65
|
+
}
|