@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,258 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { OverrideProps } from '@bifrostui/types';
|
|
3
|
+
interface ScrollViewScrollEvent extends Event {
|
|
4
|
+
detail?: {
|
|
5
|
+
scrollLeft: number;
|
|
6
|
+
scrollTop: number;
|
|
7
|
+
scrollHeight: number;
|
|
8
|
+
scrollWidth: number;
|
|
9
|
+
deltaX?: number;
|
|
10
|
+
deltaY?: number;
|
|
11
|
+
isDrag?: boolean;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
interface ScrollViewDragEvent extends Event {
|
|
15
|
+
detail?: {
|
|
16
|
+
/** 横向滚动条位置 */
|
|
17
|
+
scrollLeft?: number;
|
|
18
|
+
/** 竖向滚动条位置 */
|
|
19
|
+
scrollTop?: number;
|
|
20
|
+
/** 滚动速度 */
|
|
21
|
+
velocity?: number;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export type ScrollViewProps<D extends React.ElementType = 'div', P = {}> = OverrideProps<{
|
|
25
|
+
props: P & {
|
|
26
|
+
/**
|
|
27
|
+
* 允许横向滚动
|
|
28
|
+
* @default false
|
|
29
|
+
* @type {boolean}
|
|
30
|
+
*/
|
|
31
|
+
scrollX?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* 允许纵向滚动
|
|
34
|
+
* @default false
|
|
35
|
+
* @type {boolean}
|
|
36
|
+
*/
|
|
37
|
+
scrollY?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* 距顶部/左边多远时(单位px),触发 scrolltoupper 事件
|
|
40
|
+
* @default 50
|
|
41
|
+
* @type {number}
|
|
42
|
+
*/
|
|
43
|
+
upperThreshold?: number;
|
|
44
|
+
/**
|
|
45
|
+
* 距底部/右边多远时(单位px),触发 scrolltolower 事件
|
|
46
|
+
* @default 50
|
|
47
|
+
* @type {number}
|
|
48
|
+
*/
|
|
49
|
+
lowerThreshold?: number;
|
|
50
|
+
/**
|
|
51
|
+
* 设置竖向滚动条位置
|
|
52
|
+
* @type {number}
|
|
53
|
+
*/
|
|
54
|
+
scrollTop?: number;
|
|
55
|
+
/**
|
|
56
|
+
* 设置横向滚动条位置
|
|
57
|
+
* @type {number}
|
|
58
|
+
*/
|
|
59
|
+
scrollLeft?: number;
|
|
60
|
+
/**
|
|
61
|
+
* 值应为某子元素id(id不能以数字开头)。设置哪个方向可滚动,则在哪个方向滚动到该元素
|
|
62
|
+
* @type {string}
|
|
63
|
+
*/
|
|
64
|
+
scrollIntoView?: string;
|
|
65
|
+
/**
|
|
66
|
+
* 在设置滚动条位置时使用动画过渡
|
|
67
|
+
* @default false
|
|
68
|
+
* @type {boolean}
|
|
69
|
+
*/
|
|
70
|
+
scrollWithAnimation?: boolean;
|
|
71
|
+
/** 指定 scroll-into-view 目标节点在视口内的位置。
|
|
72
|
+
* start - 目标节点显示在视口开始处
|
|
73
|
+
* center - 目标节点显示在视口中间
|
|
74
|
+
* end - 目标节点显示在视口结束处
|
|
75
|
+
* nearest - 目标节点在就近的视口边缘显示,若节点已在视口内则不触发滚动
|
|
76
|
+
* @default 'start'
|
|
77
|
+
*/
|
|
78
|
+
scrollIntoViewAlignment?: ScrollLogicalPosition;
|
|
79
|
+
/**
|
|
80
|
+
* 滚动条返回顶部,只支持竖向
|
|
81
|
+
* @default false
|
|
82
|
+
* @type {boolean}
|
|
83
|
+
*/
|
|
84
|
+
enableBackToTop?: boolean;
|
|
85
|
+
/** 启用 flexbox 布局。开启后,当前节点声明了 `display: flex` 就会成为 flex container,并作用于其孩子节点。
|
|
86
|
+
* 仅小程序可用
|
|
87
|
+
* @default false
|
|
88
|
+
*/
|
|
89
|
+
enableFlex?: boolean;
|
|
90
|
+
/** 开启 scroll anchoring 特性,即控制滚动位置不随内容变化而抖动,仅在 iOS 下生效,安卓下可参考 CSS `overflow-anchor` 属性。
|
|
91
|
+
* 仅小程序可用
|
|
92
|
+
* @default false
|
|
93
|
+
*/
|
|
94
|
+
scrollAnchoring?: boolean;
|
|
95
|
+
/** 开启自定义下拉刷新
|
|
96
|
+
* 仅小程序可用
|
|
97
|
+
* @default false
|
|
98
|
+
*/
|
|
99
|
+
refresherEnabled?: boolean;
|
|
100
|
+
/** 设置自定义下拉刷新默认样式,支持设置 `black | white | none`, none 表示不使用默认样式
|
|
101
|
+
* 仅小程序可用
|
|
102
|
+
* @default 'black'
|
|
103
|
+
*/
|
|
104
|
+
refresherDefaultStyle?: string;
|
|
105
|
+
/** 设置自定义下拉刷新区域背景颜色
|
|
106
|
+
* 仅小程序可用
|
|
107
|
+
* @default '#FFF'
|
|
108
|
+
*/
|
|
109
|
+
refresherBackground?: string;
|
|
110
|
+
/** 设置当前下拉刷新状态,true 表示下拉刷新已经被触发,false 表示下拉刷新未被触发
|
|
111
|
+
* 仅小程序可用
|
|
112
|
+
* @default false
|
|
113
|
+
*/
|
|
114
|
+
refresherTriggered?: boolean;
|
|
115
|
+
/** 启用 scroll-view 增强特性
|
|
116
|
+
* 仅小程序可用
|
|
117
|
+
* @default false
|
|
118
|
+
*/
|
|
119
|
+
enhanced?: boolean;
|
|
120
|
+
/** iOS 下 scroll-view 边界弹性控制 (同时开启 enhanced 属性后生效)
|
|
121
|
+
* 仅小程序可用
|
|
122
|
+
* @default true
|
|
123
|
+
*/
|
|
124
|
+
bounces?: boolean;
|
|
125
|
+
/** 滚动条显隐控制 (同时开启 enhanced 属性后生效)
|
|
126
|
+
* 仅小程序可用
|
|
127
|
+
* @default true
|
|
128
|
+
*/
|
|
129
|
+
showScrollbar?: boolean;
|
|
130
|
+
/** 分页滑动效果 (同时开启 enhanced 属性后生效)
|
|
131
|
+
* 仅小程序可用
|
|
132
|
+
* @default false
|
|
133
|
+
*/
|
|
134
|
+
pagingEnabled?: boolean;
|
|
135
|
+
/** boolean false 滑动减速速率控制 (同时开启 enhanced 属性后生效)
|
|
136
|
+
* 仅小程序可用
|
|
137
|
+
* @default false
|
|
138
|
+
*/
|
|
139
|
+
fastDeceleration?: boolean;
|
|
140
|
+
/** 当 scroll-with-animation设置为 true 时,可以设置 scroll-animation-duration 来控制动画的执行时间,单位 ms。
|
|
141
|
+
* 仅小程序可用
|
|
142
|
+
*/
|
|
143
|
+
scrollAnimationDuration?: number;
|
|
144
|
+
/** 纵向滚动时,当滚动到顶部或底部时,强制禁止触发页面滚动,仍然只触发 scroll-view 自身的滚动。
|
|
145
|
+
* 仅小程序可用
|
|
146
|
+
* @default false
|
|
147
|
+
*/
|
|
148
|
+
trapScroll?: string;
|
|
149
|
+
/** 发生滚动前,对滚动方向进行判断,当方向是顶部/左边时,如果值为always将始终禁止滚动,如果值为out-of-bounds 且当前已经滚动到顶部/左边,禁止滚动。
|
|
150
|
+
* 仅小程序可用
|
|
151
|
+
*/
|
|
152
|
+
disableLowerScroll?: string;
|
|
153
|
+
/** 发生滚动前,对滚动方向进行判断,当方向是底部/右边时,如果值为always将始终禁止滚动,如果值为out-of-bounds 且当前已经滚动到底部/右边,禁止滚动。
|
|
154
|
+
* 仅小程序可用
|
|
155
|
+
*/
|
|
156
|
+
disableUpperScroll?: string;
|
|
157
|
+
/** 无障碍访问,(属性)元素的额外描述
|
|
158
|
+
* 仅小程序可用
|
|
159
|
+
*/
|
|
160
|
+
ariaLabel?: string;
|
|
161
|
+
/** 开启 passive 特性,能优化一定的滚动性能
|
|
162
|
+
* 仅小程序可用
|
|
163
|
+
* @default false
|
|
164
|
+
*/
|
|
165
|
+
enablePassive?: string;
|
|
166
|
+
/** 渲染模式
|
|
167
|
+
* list - 列表模式。只会渲染在屏节点,会根据直接子节点是否在屏来按需渲染,若只有一个直接子节点则性能会退化
|
|
168
|
+
* custom - 自定义模式。只会渲染在屏节点,子节点可以是 sticky-section list-view grid-view 等组件
|
|
169
|
+
* 仅小程序可用
|
|
170
|
+
* @default 'list'
|
|
171
|
+
*/
|
|
172
|
+
type?: 'list' | 'custom';
|
|
173
|
+
/** 是否反向滚动。一般初始滚动位置是在顶部,反向滚动则是在底部。
|
|
174
|
+
* 仅小程序可用
|
|
175
|
+
* @default false
|
|
176
|
+
*/
|
|
177
|
+
reverse?: boolean;
|
|
178
|
+
/** 指定视口外渲染区域的距离,默认情况下视口外节点不渲染。指定 cache-extent 可优化滚动体验和加载速度,但会提高内存占用且影响首屏速度,可按需启用。
|
|
179
|
+
* 仅小程序可用
|
|
180
|
+
*/
|
|
181
|
+
cacheExtent?: number;
|
|
182
|
+
/** 只 scroll-into-view 到 cacheExtent 以内的目标节点,性能更佳
|
|
183
|
+
* 仅小程序可用
|
|
184
|
+
* @default false
|
|
185
|
+
*/
|
|
186
|
+
scrollIntoViewWithinExtent?: boolean;
|
|
187
|
+
/**
|
|
188
|
+
* 滚动到顶部/左边,会触发 scrolltoupper 事件
|
|
189
|
+
*/
|
|
190
|
+
onScrollToUpper?: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void;
|
|
191
|
+
/**
|
|
192
|
+
* 滚动到底部/右边,会触发 scrolltolower 事件
|
|
193
|
+
*/
|
|
194
|
+
onScrollToLower?: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void;
|
|
195
|
+
/**
|
|
196
|
+
* 滚动时触发
|
|
197
|
+
*/
|
|
198
|
+
onScroll?: (e: React.SyntheticEvent<HTMLDivElement, ScrollViewScrollEvent>) => void;
|
|
199
|
+
/**
|
|
200
|
+
* 触摸后移动
|
|
201
|
+
*/
|
|
202
|
+
onTouchMove?: (e: React.SyntheticEvent<HTMLDivElement, TouchEvent>) => void;
|
|
203
|
+
/** 滚动开始事件
|
|
204
|
+
* 仅小程序可用
|
|
205
|
+
*/
|
|
206
|
+
onScrollStart?: (e: React.SyntheticEvent<HTMLDivElement, ScrollViewScrollEvent>) => void;
|
|
207
|
+
/** 滚动结束事件
|
|
208
|
+
* 仅小程序可用
|
|
209
|
+
*/
|
|
210
|
+
onScrollEnd?: (e: React.SyntheticEvent<HTMLDivElement, ScrollViewScrollEvent>) => void;
|
|
211
|
+
/** 自定义下拉刷新控件被下拉
|
|
212
|
+
* 仅小程序可用
|
|
213
|
+
*/
|
|
214
|
+
onRefresherPulling?: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void;
|
|
215
|
+
/** 自定义下拉刷新被触发
|
|
216
|
+
* 仅小程序可用
|
|
217
|
+
*/
|
|
218
|
+
onRefresherRefresh?: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void;
|
|
219
|
+
/** 自定义下拉刷新被复位
|
|
220
|
+
* 仅小程序可用
|
|
221
|
+
*/
|
|
222
|
+
onRefresherRestore?: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void;
|
|
223
|
+
/** 自定义下拉刷新被中止
|
|
224
|
+
* 仅小程序可用
|
|
225
|
+
*/
|
|
226
|
+
onRefresherAbort?: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void;
|
|
227
|
+
/** 自定义下拉刷新即将触发刷新(拖动超过 refresher-threshold 时)的事件
|
|
228
|
+
* 仅小程序可用
|
|
229
|
+
*/
|
|
230
|
+
onRefresherWillRefresh?: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void;
|
|
231
|
+
/** 滑动开始事件 (同时开启 enhanced 属性后生效)
|
|
232
|
+
* 仅小程序可用
|
|
233
|
+
*/
|
|
234
|
+
onDragStart?: (e: React.SyntheticEvent<HTMLDivElement, ScrollViewDragEvent>) => void;
|
|
235
|
+
/** 滑动事件 (同时开启 enhanced 属性后生效)
|
|
236
|
+
* 仅小程序可用
|
|
237
|
+
*/
|
|
238
|
+
onDragging?: (e: React.SyntheticEvent<HTMLDivElement, ScrollViewDragEvent>) => void;
|
|
239
|
+
/** 滑动结束事件 (同时开启 enhanced 属性后生效)
|
|
240
|
+
* 仅小程序可用
|
|
241
|
+
*/
|
|
242
|
+
onDragEnd?: (e: React.SyntheticEvent<HTMLDivElement, ScrollViewDragEvent>) => void;
|
|
243
|
+
/** 触摸动作开始。
|
|
244
|
+
* 仅小程序可用
|
|
245
|
+
*/
|
|
246
|
+
onTouchStart?: (e: React.SyntheticEvent<HTMLDivElement, TouchEvent>) => void;
|
|
247
|
+
/** 触摸动作结束。
|
|
248
|
+
* 仅小程序可用
|
|
249
|
+
*/
|
|
250
|
+
onTouchEnd?: (e: React.SyntheticEvent<HTMLDivElement, TouchEvent>) => void;
|
|
251
|
+
/** 触摸动作被打断,如来电提醒、弹窗。
|
|
252
|
+
* 仅小程序可用
|
|
253
|
+
*/
|
|
254
|
+
onTouchCancel?: (e: React.SyntheticEvent<HTMLDivElement, TouchEvent>) => void;
|
|
255
|
+
};
|
|
256
|
+
defaultComponent: D;
|
|
257
|
+
}, D>;
|
|
258
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
ScrollView: true
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "ScrollView", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () {
|
|
12
|
+
return _ScrollView.default;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "default", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () {
|
|
18
|
+
return _ScrollView.default;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
var _ScrollView = _interopRequireDefault(require("./ScrollView"));
|
|
22
|
+
var _ScrollView2 = require("./ScrollView.types");
|
|
23
|
+
Object.keys(_ScrollView2).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] === _ScrollView2[key]) return;
|
|
27
|
+
Object.defineProperty(exports, key, {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () {
|
|
30
|
+
return _ScrollView2[key];
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "ScrollView", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _components.ScrollView;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
exports.default = void 0;
|
|
13
|
+
var _components = require("@tarojs/components");
|
|
14
|
+
var _default = exports.default = _components.ScrollView;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
.bui-select {
|
|
2
|
+
position: relative;
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
height: 27px;
|
|
5
|
+
min-width: 100px;
|
|
6
|
+
font-size: var(--bui-title-size-3);
|
|
7
|
+
border-radius: 5px;
|
|
8
|
+
background-color: var(--bui-color-bg-view);
|
|
9
|
+
font-family: var(--bui-font-family);
|
|
10
|
+
}
|
|
11
|
+
.bui-select:active,
|
|
12
|
+
.bui-select-active {
|
|
13
|
+
box-shadow: 0 0 0 2px var(--bui-color-bg-default);
|
|
14
|
+
}
|
|
15
|
+
.bui-select-selector-container {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
padding: 0 14px;
|
|
19
|
+
height: 100%;
|
|
20
|
+
}
|
|
21
|
+
.bui-select-input {
|
|
22
|
+
width: 0;
|
|
23
|
+
height: 0;
|
|
24
|
+
border: 0;
|
|
25
|
+
opacity: 0;
|
|
26
|
+
}
|
|
27
|
+
.bui-select-placeholder {
|
|
28
|
+
color: var(--bui-color-fg-disabled);
|
|
29
|
+
}
|
|
30
|
+
.bui-select-selector {
|
|
31
|
+
display: flex;
|
|
32
|
+
justify-content: space-between;
|
|
33
|
+
align-items: center;
|
|
34
|
+
flex: 1;
|
|
35
|
+
height: 27px;
|
|
36
|
+
background-color: transparent;
|
|
37
|
+
outline: none;
|
|
38
|
+
border: 0;
|
|
39
|
+
}
|
|
40
|
+
.bui-select-selector-icon {
|
|
41
|
+
font-size: var(--bui-title-size-3);
|
|
42
|
+
}
|
|
43
|
+
.bui-select-option-container {
|
|
44
|
+
position: absolute;
|
|
45
|
+
box-sizing: border-box;
|
|
46
|
+
top: 100%;
|
|
47
|
+
left: 0;
|
|
48
|
+
width: 100%;
|
|
49
|
+
z-index: var(--bui-z-index-dropdown);
|
|
50
|
+
margin-top: 6px;
|
|
51
|
+
background-color: var(--bui-color-bg-view);
|
|
52
|
+
padding: 2px;
|
|
53
|
+
overflow: hidden;
|
|
54
|
+
}
|
|
55
|
+
.bui-select-option-main {
|
|
56
|
+
border-radius: 3px;
|
|
57
|
+
padding: 3px 0;
|
|
58
|
+
box-shadow: 0 0 0 2px var(--bui-color-bg-default);
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
}
|
|
61
|
+
.bui-select-option {
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
height: 27px;
|
|
65
|
+
padding: 0 14px;
|
|
66
|
+
border-radius: 5px;
|
|
67
|
+
margin: 0 3px;
|
|
68
|
+
}
|
|
69
|
+
.bui-select-option:hover {
|
|
70
|
+
background-color: var(---bui-select-options-active-bg, #fff2f0);
|
|
71
|
+
color: var(--bui-color-primary);
|
|
72
|
+
}
|
|
73
|
+
.bui-select-option-active {
|
|
74
|
+
font-weight: 500;
|
|
75
|
+
color: var(--bui-color-primary);
|
|
76
|
+
background-color: var(---bui-select-options-active-bg, #fff2f0);
|
|
77
|
+
}
|
|
78
|
+
.bui-select-option-hide {
|
|
79
|
+
opacity: 0;
|
|
80
|
+
transform: translateY(-5px);
|
|
81
|
+
}
|
|
82
|
+
.bui-select.bui-select-disabled,
|
|
83
|
+
.bui-select-option-disabled {
|
|
84
|
+
pointer-events: none;
|
|
85
|
+
box-shadow: none;
|
|
86
|
+
background-color: var(--bui-color-bg-view);
|
|
87
|
+
color: var(--bui-color-fg-subtle);
|
|
88
|
+
border: none;
|
|
89
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
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 _utils = require("@bifrostui/utils");
|
|
9
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _Fade = _interopRequireDefault(require("../Fade"));
|
|
12
|
+
var _Slide = _interopRequireDefault(require("../Slide"));
|
|
13
|
+
var _selectContext = _interopRequireDefault(require("./selectContext"));
|
|
14
|
+
var _Backdrop = _interopRequireDefault(require("../Backdrop"));
|
|
15
|
+
require("./Select.css");
|
|
16
|
+
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); }
|
|
17
|
+
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; }
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
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); }
|
|
20
|
+
const prefixCls = 'bui-select';
|
|
21
|
+
const Select = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
22
|
+
const {
|
|
23
|
+
className,
|
|
24
|
+
children,
|
|
25
|
+
name,
|
|
26
|
+
inputRef,
|
|
27
|
+
inputProps,
|
|
28
|
+
BackdropProps,
|
|
29
|
+
value,
|
|
30
|
+
defaultValue,
|
|
31
|
+
disabled,
|
|
32
|
+
placeholder,
|
|
33
|
+
icon,
|
|
34
|
+
open,
|
|
35
|
+
onChange,
|
|
36
|
+
onClose,
|
|
37
|
+
onOpen,
|
|
38
|
+
onClick,
|
|
39
|
+
...others
|
|
40
|
+
} = props;
|
|
41
|
+
const [selectValue, selectValueChange] = (0, _utils.useValue)({
|
|
42
|
+
value,
|
|
43
|
+
defaultValue,
|
|
44
|
+
onChange
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// 是否展开下拉框
|
|
48
|
+
const [isOpen, setIsOpen] = (0, _react.useState)(false);
|
|
49
|
+
// 根选择器展示的内容
|
|
50
|
+
const [renderValue, setRenderValue] = (0, _react.useState)('');
|
|
51
|
+
const defaultIcon = isOpen ? /*#__PURE__*/_react.default.createElement(_icons.CaretUpIcon, {
|
|
52
|
+
className: `${prefixCls}-selector-icon`,
|
|
53
|
+
htmlColor: "#9c9ca5"
|
|
54
|
+
}) : /*#__PURE__*/_react.default.createElement(_icons.CaretDownIcon, {
|
|
55
|
+
className: `${prefixCls}-selector-icon`,
|
|
56
|
+
htmlColor: "#9c9ca5"
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
// 点击根选择器的回调
|
|
60
|
+
const handleSelectClick = e => {
|
|
61
|
+
if (disabled) return;
|
|
62
|
+
setIsOpen(!isOpen);
|
|
63
|
+
if (typeof onClick === 'function') onClick(e);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
// 点击某个选项的回调
|
|
67
|
+
const handleOptionClick = (e, optionValue, label) => {
|
|
68
|
+
if (!value) {
|
|
69
|
+
setRenderValue(label);
|
|
70
|
+
selectValueChange(e, optionValue);
|
|
71
|
+
} else {
|
|
72
|
+
onChange?.(e, {
|
|
73
|
+
value: optionValue
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
setIsOpen(false);
|
|
77
|
+
};
|
|
78
|
+
const handleBackdropTouchStart = () => {
|
|
79
|
+
if (isOpen) {
|
|
80
|
+
setIsOpen(false);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
const selectContext = (0, _react.useMemo)(() => ({
|
|
84
|
+
selectValue,
|
|
85
|
+
setRenderValue,
|
|
86
|
+
handleOptionClick
|
|
87
|
+
}), [selectValue]);
|
|
88
|
+
|
|
89
|
+
// 监听外部open的改变
|
|
90
|
+
(0, _react.useEffect)(() => {
|
|
91
|
+
if (open !== undefined) setIsOpen(open);
|
|
92
|
+
}, [open]);
|
|
93
|
+
|
|
94
|
+
// 折叠/展开时的处理
|
|
95
|
+
(0, _react.useEffect)(() => {
|
|
96
|
+
// 非function情况,直接调用会报错
|
|
97
|
+
if (isOpen) {
|
|
98
|
+
onOpen?.();
|
|
99
|
+
} else {
|
|
100
|
+
onClose?.();
|
|
101
|
+
}
|
|
102
|
+
}, [isOpen]);
|
|
103
|
+
return /*#__PURE__*/_react.default.createElement(_selectContext.default.Provider, {
|
|
104
|
+
value: selectContext
|
|
105
|
+
}, /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
106
|
+
className: (0, _clsx.default)(prefixCls, className, {
|
|
107
|
+
[`${prefixCls}-disabled`]: disabled,
|
|
108
|
+
[`${prefixCls}-active`]: isOpen
|
|
109
|
+
}),
|
|
110
|
+
ref: ref
|
|
111
|
+
}, others, {
|
|
112
|
+
onClick: handleSelectClick
|
|
113
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
114
|
+
className: `${prefixCls}-selector-container`
|
|
115
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
116
|
+
className: `${prefixCls}-selector`
|
|
117
|
+
}, renderValue || placeholder), /*#__PURE__*/_react.default.createElement("input", _extends({
|
|
118
|
+
name: name,
|
|
119
|
+
readOnly: true,
|
|
120
|
+
ref: inputRef,
|
|
121
|
+
value: selectValue
|
|
122
|
+
}, inputProps, {
|
|
123
|
+
className: (0, _clsx.default)(`${prefixCls}-input`, {
|
|
124
|
+
[inputProps?.className]: inputProps?.className
|
|
125
|
+
})
|
|
126
|
+
})), icon || defaultIcon), /*#__PURE__*/_react.default.createElement(_Fade.default, {
|
|
127
|
+
in: isOpen,
|
|
128
|
+
timeout: {
|
|
129
|
+
enter: 150,
|
|
130
|
+
exit: 150
|
|
131
|
+
}
|
|
132
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
133
|
+
className: (0, _clsx.default)(`${prefixCls}-option-container`)
|
|
134
|
+
}, /*#__PURE__*/_react.default.createElement(_Slide.default, {
|
|
135
|
+
in: isOpen,
|
|
136
|
+
timeout: {
|
|
137
|
+
enter: 150,
|
|
138
|
+
exit: 150
|
|
139
|
+
}
|
|
140
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
141
|
+
className: (0, _clsx.default)(`${prefixCls}-option-main`)
|
|
142
|
+
}, children))))), /*#__PURE__*/_react.default.createElement(_Backdrop.default, _extends({
|
|
143
|
+
open: isOpen,
|
|
144
|
+
invisible: true
|
|
145
|
+
// onTouchStart 解决需滑动两次透明蒙层才会消失
|
|
146
|
+
,
|
|
147
|
+
onTouchStart: handleBackdropTouchStart,
|
|
148
|
+
onClick: handleBackdropTouchStart
|
|
149
|
+
}, BackdropProps, {
|
|
150
|
+
className: (0, _clsx.default)(`${prefixCls}-backdrop`, {
|
|
151
|
+
[BackdropProps?.className]: BackdropProps?.className
|
|
152
|
+
})
|
|
153
|
+
})));
|
|
154
|
+
});
|
|
155
|
+
Select.displayName = 'BuiSelect';
|
|
156
|
+
Select.defaultProps = {
|
|
157
|
+
defaultValue: ''
|
|
158
|
+
};
|
|
159
|
+
var _default = exports.default = Select;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { OverrideProps } from '@bifrostui/types';
|
|
2
|
+
import React, { Ref, SyntheticEvent } from 'react';
|
|
3
|
+
import { BackdropProps } from '../Backdrop';
|
|
4
|
+
export type BuiSelectValue = string | number;
|
|
5
|
+
export interface BuiSelectContextProps {
|
|
6
|
+
/**
|
|
7
|
+
* 当前选中值
|
|
8
|
+
*/
|
|
9
|
+
selectValue?: BuiSelectValue;
|
|
10
|
+
/**
|
|
11
|
+
* 设置根选择器展示内容
|
|
12
|
+
*/
|
|
13
|
+
setRenderValue?: React.Dispatch<React.SetStateAction<string>>;
|
|
14
|
+
/**
|
|
15
|
+
* 选项点击的回调
|
|
16
|
+
*/
|
|
17
|
+
handleOptionClick?: (event?: React.MouseEvent<HTMLDivElement>, value?: BuiSelectValue, label?: React.ReactNode) => void;
|
|
18
|
+
}
|
|
19
|
+
export type SelectOptionProps<D extends React.ElementType = 'div', P = {}> = OverrideProps<{
|
|
20
|
+
props: P & {
|
|
21
|
+
/**
|
|
22
|
+
* 选项的值
|
|
23
|
+
*/
|
|
24
|
+
value?: BuiSelectValue;
|
|
25
|
+
/**
|
|
26
|
+
* 回填内容
|
|
27
|
+
* 没传children时也作为选项内容
|
|
28
|
+
*/
|
|
29
|
+
label?: React.ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* 禁用
|
|
32
|
+
*/
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
};
|
|
35
|
+
defaultComponent: D;
|
|
36
|
+
}, D>;
|
|
37
|
+
export type SelectProps<D extends React.ElementType = 'div', P = {}> = OverrideProps<{
|
|
38
|
+
props: P & {
|
|
39
|
+
/**
|
|
40
|
+
* inputRef
|
|
41
|
+
*/
|
|
42
|
+
inputRef?: Ref<HTMLInputElement>;
|
|
43
|
+
/**
|
|
44
|
+
* inputProp
|
|
45
|
+
*/
|
|
46
|
+
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
47
|
+
/**
|
|
48
|
+
* BackdropProp
|
|
49
|
+
*/
|
|
50
|
+
BackdropProps?: BackdropProps;
|
|
51
|
+
/**
|
|
52
|
+
* input 名称标识
|
|
53
|
+
*/
|
|
54
|
+
name?: string;
|
|
55
|
+
/**
|
|
56
|
+
* 当前值
|
|
57
|
+
*/
|
|
58
|
+
value?: BuiSelectValue;
|
|
59
|
+
/**
|
|
60
|
+
* 默认值
|
|
61
|
+
*/
|
|
62
|
+
defaultValue?: BuiSelectValue;
|
|
63
|
+
/**
|
|
64
|
+
* 没有选中时显示的内容
|
|
65
|
+
*/
|
|
66
|
+
placeholder?: React.ReactNode;
|
|
67
|
+
/**
|
|
68
|
+
* 自定义图标
|
|
69
|
+
*/
|
|
70
|
+
icon?: React.ReactNode;
|
|
71
|
+
/**
|
|
72
|
+
* 禁用
|
|
73
|
+
*/
|
|
74
|
+
disabled?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* 是否展开下拉框
|
|
77
|
+
*/
|
|
78
|
+
open?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* 自定义选中后展示的内容
|
|
81
|
+
*/
|
|
82
|
+
/**
|
|
83
|
+
* 选中某一项时的回调,并将选中的值传递过去
|
|
84
|
+
*/
|
|
85
|
+
onChange?: (e: SyntheticEvent, data: {
|
|
86
|
+
value: string;
|
|
87
|
+
}) => void;
|
|
88
|
+
/**
|
|
89
|
+
* 展开下拉框时的回调
|
|
90
|
+
*/
|
|
91
|
+
onOpen?: () => void;
|
|
92
|
+
/**
|
|
93
|
+
* 折叠下拉框时的回调
|
|
94
|
+
*/
|
|
95
|
+
onClose?: () => void;
|
|
96
|
+
};
|
|
97
|
+
defaultComponent: D;
|
|
98
|
+
}, D>;
|