@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,281 @@
|
|
|
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
|
+
require("./Slider.css");
|
|
12
|
+
var _utils2 = require("./utils");
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
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); }
|
|
17
|
+
const classes = {
|
|
18
|
+
root: 'bui-slider',
|
|
19
|
+
button: 'bui-slider-button',
|
|
20
|
+
tooltip: 'bui-slider-tooltip',
|
|
21
|
+
disabled: 'bui-slider-disabled'
|
|
22
|
+
};
|
|
23
|
+
const SLIDER_BUTTON = {
|
|
24
|
+
FRONT: 0,
|
|
25
|
+
END: 1
|
|
26
|
+
};
|
|
27
|
+
const Slider = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
28
|
+
const {
|
|
29
|
+
className,
|
|
30
|
+
defaultValue,
|
|
31
|
+
value: valueProp,
|
|
32
|
+
min,
|
|
33
|
+
max,
|
|
34
|
+
step,
|
|
35
|
+
tipVisible,
|
|
36
|
+
tooltipRender,
|
|
37
|
+
disabled,
|
|
38
|
+
startIcon,
|
|
39
|
+
endIcon,
|
|
40
|
+
disableSwap,
|
|
41
|
+
onChange,
|
|
42
|
+
...others
|
|
43
|
+
} = props;
|
|
44
|
+
const initialDefaultValue = (0, _react.useRef)(defaultValue);
|
|
45
|
+
// 处理value/defaultValue都不传的异常场景
|
|
46
|
+
const latestVal = (0, _react.useRef)(0);
|
|
47
|
+
const shouldProtection = valueProp === undefined && defaultValue === undefined;
|
|
48
|
+
const value = shouldProtection ? latestVal.current : valueProp;
|
|
49
|
+
const [rootRef, setRootRef] = (0, _react.useState)(null);
|
|
50
|
+
const handleRef = (0, _utils.useForkRef)(ref, setRootRef);
|
|
51
|
+
(0, _utils.useTouchEmulator)(rootRef);
|
|
52
|
+
|
|
53
|
+
// Slider BoundingClientRect
|
|
54
|
+
const sliderRect = (0, _react.useRef)();
|
|
55
|
+
// 滑动开始距离文档X轴原点距离
|
|
56
|
+
const touchStartPageX = (0, _react.useRef)();
|
|
57
|
+
// 按钮在滑动开始时距离左边的距离
|
|
58
|
+
const touchStartLeft = (0, _react.useRef)();
|
|
59
|
+
// 记录操作按钮
|
|
60
|
+
const buttonIndex = (0, _react.useRef)(0);
|
|
61
|
+
// 记录双滑块touchMove之前的值
|
|
62
|
+
const beforeMoveValue = (0, _react.useRef)([0, 0]);
|
|
63
|
+
|
|
64
|
+
// 默认图标
|
|
65
|
+
const defaultIcon = /*#__PURE__*/_react.default.createElement(_icons.GripperBarVerticalIcon, {
|
|
66
|
+
htmlColor: "#2e333e"
|
|
67
|
+
});
|
|
68
|
+
// 根据初始化时的数据判断是否为双滑块
|
|
69
|
+
const initialRange = (0, _react.useRef)(value !== undefined && Array.isArray(value) || defaultValue !== undefined && Array.isArray(defaultValue));
|
|
70
|
+
// 是否为双滑块
|
|
71
|
+
const range = (0, _react.useMemo)(() => {
|
|
72
|
+
// defaultValue传state,且通过setState改变defaltValue类型,此时使用初始化时的range(initialRange)判断
|
|
73
|
+
if (Array.isArray(defaultValue) && !Array.isArray(initialDefaultValue.current)) {
|
|
74
|
+
return initialRange.current;
|
|
75
|
+
}
|
|
76
|
+
return value !== undefined && Array.isArray(value) || defaultValue !== undefined && Array.isArray(defaultValue);
|
|
77
|
+
}, [value, defaultValue]);
|
|
78
|
+
|
|
79
|
+
// 气泡提示显示与隐藏
|
|
80
|
+
const [frontTooltipVisible, setFrontTooltipVisible] = (0, _react.useState)(false);
|
|
81
|
+
const [endTooltipVisible, setEndTooltipVisible] = (0, _react.useState)(false);
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* 格式化value、defaultValue
|
|
85
|
+
* @type undefined | number[]
|
|
86
|
+
*/
|
|
87
|
+
const formattedValue = (0, _utils2.formatValue)(value);
|
|
88
|
+
const formattedDefaultValue = (0, _utils2.formatValue)(defaultValue);
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* 使用格式化后的value、defaultValue初始化sliderValue,应始终使用triggerChange改变值
|
|
92
|
+
* @type undefined | number[]
|
|
93
|
+
*/
|
|
94
|
+
const [sliderValue, triggerChange] = (0, _utils.useValue)({
|
|
95
|
+
value: formattedValue,
|
|
96
|
+
defaultValue: formattedDefaultValue,
|
|
97
|
+
onChange: (e, data) => {
|
|
98
|
+
onChange?.(e, {
|
|
99
|
+
value: data?.value,
|
|
100
|
+
buttonIndex: buttonIndex.current
|
|
101
|
+
});
|
|
102
|
+
},
|
|
103
|
+
config: {
|
|
104
|
+
name: 'Slider',
|
|
105
|
+
state: 'value'
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
// 内部状态值
|
|
110
|
+
const internalValue = (0, _react.useMemo)(() => {
|
|
111
|
+
return sliderValue === undefined ? [min, max] : sliderValue;
|
|
112
|
+
}, [sliderValue]);
|
|
113
|
+
// 记录上一次值
|
|
114
|
+
const preValueRef = (0, _react.useRef)(internalValue[buttonIndex.current]);
|
|
115
|
+
// 记录气泡值
|
|
116
|
+
const tooltipRef = (0, _react.useRef)(internalValue);
|
|
117
|
+
|
|
118
|
+
// 最大最小值范围
|
|
119
|
+
const scope = (0, _react.useMemo)(() => Number(max) - Number(min), [max, min]);
|
|
120
|
+
|
|
121
|
+
// 提示气泡展示逻辑
|
|
122
|
+
const tooltipVisible = (0, _react.useMemo)(() => {
|
|
123
|
+
const startVisible = buttonIndex.current === SLIDER_BUTTON.FRONT && frontTooltipVisible;
|
|
124
|
+
const endVisible = buttonIndex.current === SLIDER_BUTTON.END && endTooltipVisible;
|
|
125
|
+
return tipVisible || !tipVisible && (startVisible || endVisible);
|
|
126
|
+
}, [tipVisible, frontTooltipVisible, endTooltipVisible]);
|
|
127
|
+
|
|
128
|
+
// 着色条样式
|
|
129
|
+
const lineStyle = (0, _react.useMemo)(() => {
|
|
130
|
+
const sortedValue = (0, _utils2.sortValue)(internalValue);
|
|
131
|
+
let width = `${(sortedValue[1] - sortedValue[0] - min) / scope * 100}%`;
|
|
132
|
+
// 单滑块模式但动态修改value为数组,此时按照数组最小值计算着色条宽度
|
|
133
|
+
if (!range && Array.isArray(value)) {
|
|
134
|
+
width = `${(sortedValue[0] - min) / scope * 100}%`;
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
left: range ? `${(sortedValue[0] - min) / scope * 100}%` : '0%',
|
|
138
|
+
width
|
|
139
|
+
};
|
|
140
|
+
}, [internalValue, scope, value]);
|
|
141
|
+
const getLineWidth = (0, _react.useCallback)(async () => {
|
|
142
|
+
if (!rootRef) return;
|
|
143
|
+
sliderRect.current = await (0, _utils.getBoundingClientRect)(rootRef);
|
|
144
|
+
}, [rootRef]);
|
|
145
|
+
(0, _react.useLayoutEffect)(() => {
|
|
146
|
+
// 处理小程序初始化获取不到dom的问题
|
|
147
|
+
setTimeout(() => {
|
|
148
|
+
getLineWidth();
|
|
149
|
+
}, 100);
|
|
150
|
+
}, [rootRef]);
|
|
151
|
+
const onTouchStart = e => {
|
|
152
|
+
if (disabled) return;
|
|
153
|
+
beforeMoveValue.current = internalValue;
|
|
154
|
+
tooltipRef.current = internalValue;
|
|
155
|
+
// 补偿获取宽度,隐藏元素getBoundingClientRect获取不到dom信息
|
|
156
|
+
if (!sliderRect.current.width) {
|
|
157
|
+
getLineWidth();
|
|
158
|
+
}
|
|
159
|
+
// currentTarget只存在于事件触发到事件处理结束之间,须在异步操作之前保存下来
|
|
160
|
+
const currentTarget = _utils.isMini ? e.mpEvent.currentTarget : e.currentTarget;
|
|
161
|
+
touchStartPageX.current = e.touches[0].pageX;
|
|
162
|
+
touchStartLeft.current = currentTarget?.offsetLeft;
|
|
163
|
+
|
|
164
|
+
// 显示气泡提示
|
|
165
|
+
if (buttonIndex.current === SLIDER_BUTTON.END) {
|
|
166
|
+
setEndTooltipVisible(true);
|
|
167
|
+
} else {
|
|
168
|
+
setFrontTooltipVisible(true);
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
const onTouchMove = e => {
|
|
172
|
+
if (disabled) return;
|
|
173
|
+
// 触碰点当前x坐标
|
|
174
|
+
const currentX = e.touches[0].pageX;
|
|
175
|
+
// X轴滑动距离
|
|
176
|
+
const moveX = currentX - touchStartPageX.current;
|
|
177
|
+
// 计算下一个值
|
|
178
|
+
const posX = (touchStartLeft.current + moveX) / sliderRect.current.width * scope;
|
|
179
|
+
// 兼容一位小数
|
|
180
|
+
let nextPosition = step < 1 ? Math.round(posX * 10) / 10 : Math.round(posX);
|
|
181
|
+
if (nextPosition <= 0) nextPosition = 0;
|
|
182
|
+
if (nextPosition >= scope) nextPosition = scope;
|
|
183
|
+
|
|
184
|
+
// 滑动最新值
|
|
185
|
+
const nextValue = min + nextPosition;
|
|
186
|
+
const inStep = nextValue % step === 0;
|
|
187
|
+
|
|
188
|
+
// 滑动的最新值与上一次值不等时 & 符合当前步长,则更新sliderValue
|
|
189
|
+
if (!(0, _utils2.isSameValue)(nextValue, preValueRef.current) && inStep) {
|
|
190
|
+
let latestValue = nextValue;
|
|
191
|
+
preValueRef.current = nextValue;
|
|
192
|
+
// 单滑块
|
|
193
|
+
tooltipRef.current = [latestValue, 0];
|
|
194
|
+
if (range) {
|
|
195
|
+
latestValue = [...beforeMoveValue.current];
|
|
196
|
+
if (disableSwap) {
|
|
197
|
+
// 滑动前按钮
|
|
198
|
+
if (buttonIndex.current === SLIDER_BUTTON.FRONT && nextValue >= latestValue[SLIDER_BUTTON.END]) {
|
|
199
|
+
latestValue[SLIDER_BUTTON.END] = nextValue;
|
|
200
|
+
} else {
|
|
201
|
+
latestValue[buttonIndex.current] = nextValue;
|
|
202
|
+
}
|
|
203
|
+
// 滑动后按钮
|
|
204
|
+
if (buttonIndex.current === SLIDER_BUTTON.END && nextValue <= latestValue[SLIDER_BUTTON.FRONT]) {
|
|
205
|
+
latestValue[SLIDER_BUTTON.FRONT] = nextValue;
|
|
206
|
+
} else {
|
|
207
|
+
latestValue[buttonIndex.current] = nextValue;
|
|
208
|
+
}
|
|
209
|
+
tooltipRef.current = latestValue;
|
|
210
|
+
} else {
|
|
211
|
+
latestValue[buttonIndex.current] = nextValue;
|
|
212
|
+
// 气泡值不应sort排序
|
|
213
|
+
tooltipRef.current = latestValue;
|
|
214
|
+
latestValue = (0, _utils2.sortValue)(latestValue);
|
|
215
|
+
}
|
|
216
|
+
preValueRef.current = latestValue[buttonIndex.current];
|
|
217
|
+
}
|
|
218
|
+
latestVal.current = defaultValue !== undefined ? (0, _utils2.formatValue)(latestValue) : latestValue;
|
|
219
|
+
triggerChange(e, latestVal.current);
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
const onTouchEnd = () => {
|
|
223
|
+
if (disabled) return;
|
|
224
|
+
// 置为排序后的值
|
|
225
|
+
tooltipRef.current = internalValue;
|
|
226
|
+
// 隐藏左右气泡提示
|
|
227
|
+
setFrontTooltipVisible(false);
|
|
228
|
+
setEndTooltipVisible(false);
|
|
229
|
+
};
|
|
230
|
+
const renderButton = index => {
|
|
231
|
+
const valuenow = internalValue[index];
|
|
232
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
233
|
+
key: index,
|
|
234
|
+
role: "slider",
|
|
235
|
+
className: (0, _clsx.default)(classes.button, `${classes.button}-${index}`),
|
|
236
|
+
style: {
|
|
237
|
+
left: `${(valuenow - min) / scope * 100}%`
|
|
238
|
+
},
|
|
239
|
+
tabIndex: disabled ? -1 : 0,
|
|
240
|
+
"aria-valuemin": props.min,
|
|
241
|
+
"aria-valuenow": valuenow,
|
|
242
|
+
"aria-valuemax": props.max,
|
|
243
|
+
"aria-orientation": "horizontal",
|
|
244
|
+
onTouchStart: event => {
|
|
245
|
+
buttonIndex.current = index;
|
|
246
|
+
onTouchStart(event);
|
|
247
|
+
},
|
|
248
|
+
onTouchMove: onTouchMove,
|
|
249
|
+
onTouchEnd: onTouchEnd,
|
|
250
|
+
onTouchCancel: onTouchEnd
|
|
251
|
+
}, index === SLIDER_BUTTON.FRONT ? startIcon || defaultIcon : endIcon || defaultIcon);
|
|
252
|
+
};
|
|
253
|
+
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
254
|
+
className: (0, _clsx.default)(classes.root, className, {
|
|
255
|
+
[classes.disabled]: disabled
|
|
256
|
+
}),
|
|
257
|
+
ref: handleRef
|
|
258
|
+
}, others), /*#__PURE__*/_react.default.createElement("div", {
|
|
259
|
+
className: `${classes.root}-rail`
|
|
260
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
261
|
+
className: `${classes.root}-line`,
|
|
262
|
+
style: lineStyle
|
|
263
|
+
}), renderButton(SLIDER_BUTTON.FRONT), range && renderButton(SLIDER_BUTTON.END), /*#__PURE__*/_react.default.createElement("div", {
|
|
264
|
+
className: (0, _clsx.default)(classes.tooltip, {
|
|
265
|
+
[`${classes.tooltip}-hidden`]: !tooltipVisible
|
|
266
|
+
}),
|
|
267
|
+
style: {
|
|
268
|
+
left: `${(tooltipRef.current[buttonIndex.current] - min) / scope * 100}%`
|
|
269
|
+
}
|
|
270
|
+
}, tooltipRender(tooltipRef.current[buttonIndex.current])));
|
|
271
|
+
});
|
|
272
|
+
Slider.displayName = 'BuiSlider';
|
|
273
|
+
Slider.defaultProps = {
|
|
274
|
+
min: 0,
|
|
275
|
+
max: 100,
|
|
276
|
+
step: 1,
|
|
277
|
+
disableSwap: false,
|
|
278
|
+
tipVisible: false,
|
|
279
|
+
tooltipRender: value => value
|
|
280
|
+
};
|
|
281
|
+
var _default = exports.default = Slider;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { OverrideProps } from '@bifrostui/types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export type SliderValue = number | [number, number];
|
|
4
|
+
export type SliderProps<D extends React.ElementType = 'div', P = {}> = OverrideProps<{
|
|
5
|
+
props: P & {
|
|
6
|
+
/**
|
|
7
|
+
* 设置初始取值,类型为number时,使用单滑块,类型为[number, number]时,使用双滑块
|
|
8
|
+
* 当组件非受控时使用
|
|
9
|
+
*/
|
|
10
|
+
defaultValue?: SliderValue;
|
|
11
|
+
/**
|
|
12
|
+
* 设置当前值,类型为number时,使用单滑块,类型为[number, number]时,使用双滑块
|
|
13
|
+
* 当组件受控时使用
|
|
14
|
+
*/
|
|
15
|
+
value?: SliderValue;
|
|
16
|
+
/**
|
|
17
|
+
* 最小值,默认为0
|
|
18
|
+
*/
|
|
19
|
+
min?: number;
|
|
20
|
+
/**
|
|
21
|
+
* 最大值,默认为100
|
|
22
|
+
*/
|
|
23
|
+
max?: number;
|
|
24
|
+
/**
|
|
25
|
+
* 步长,取值必须大于 0,并且可被 (max - min) 整除
|
|
26
|
+
* 默认值 1
|
|
27
|
+
*/
|
|
28
|
+
step?: number;
|
|
29
|
+
/**
|
|
30
|
+
* 提示气泡是否总是可见,默认为false,滑动时才可见
|
|
31
|
+
*/
|
|
32
|
+
tipVisible?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* 自定义提示气泡,默认:(value) => value
|
|
35
|
+
*/
|
|
36
|
+
tooltipRender?: (value: number) => React.ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* 是否禁用,默认false
|
|
39
|
+
*/
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* 开始图标
|
|
43
|
+
*/
|
|
44
|
+
startIcon?: React.ReactNode;
|
|
45
|
+
/**
|
|
46
|
+
* 结束图标
|
|
47
|
+
*/
|
|
48
|
+
endIcon?: React.ReactNode;
|
|
49
|
+
/**
|
|
50
|
+
* 禁止开始图标和结束图标交错,默认false,可以交错
|
|
51
|
+
*/
|
|
52
|
+
disableSwap?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* 改变时的回调
|
|
55
|
+
*/
|
|
56
|
+
onChange?: (event: React.SyntheticEvent, data: {
|
|
57
|
+
value: SliderValue;
|
|
58
|
+
buttonIndex: number;
|
|
59
|
+
}) => void;
|
|
60
|
+
};
|
|
61
|
+
defaultComponent: D;
|
|
62
|
+
}, D>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
Slider: true
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "Slider", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () {
|
|
12
|
+
return _Slider.default;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "default", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () {
|
|
18
|
+
return _Slider.default;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
var _Slider = _interopRequireDefault(require("./Slider"));
|
|
22
|
+
var _Slider2 = require("./Slider.types");
|
|
23
|
+
Object.keys(_Slider2).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] === _Slider2[key]) return;
|
|
27
|
+
Object.defineProperty(exports, key, {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () {
|
|
30
|
+
return _Slider2[key];
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SliderValue } from './Slider.types';
|
|
2
|
+
/**
|
|
3
|
+
* 格式化数据
|
|
4
|
+
* @returns undefined | number[]
|
|
5
|
+
*/
|
|
6
|
+
export declare const formatValue: (value: SliderValue) => number | number[];
|
|
7
|
+
/**
|
|
8
|
+
* 从小到大排序
|
|
9
|
+
*/
|
|
10
|
+
export declare const sortValue: (v: [number, number]) => [number, number];
|
|
11
|
+
/**
|
|
12
|
+
* 是否为相同值
|
|
13
|
+
*/
|
|
14
|
+
export declare const isSameValue: (newValue: SliderValue, oldValue: SliderValue) => boolean;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.sortValue = exports.isSameValue = exports.formatValue = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* 格式化数据
|
|
9
|
+
* @returns undefined | number[]
|
|
10
|
+
*/
|
|
11
|
+
const formatValue = value => {
|
|
12
|
+
if (value === undefined) return value;
|
|
13
|
+
return Array.isArray(value) ? value : [value, 0];
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 从小到大排序
|
|
18
|
+
*/
|
|
19
|
+
exports.formatValue = formatValue;
|
|
20
|
+
const sortValue = v => {
|
|
21
|
+
if (!v) return v;
|
|
22
|
+
return v.slice().sort((a, b) => a - b);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 是否为相同值
|
|
27
|
+
*/
|
|
28
|
+
exports.sortValue = sortValue;
|
|
29
|
+
const isSameValue = (newValue, oldValue) => JSON.stringify(newValue) === JSON.stringify(oldValue);
|
|
30
|
+
exports.isSameValue = isSameValue;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
.bui-stack {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: var(--align-items);
|
|
4
|
+
justify-content: var(--justify-content);
|
|
5
|
+
flex-direction: var(--flex-direction);
|
|
6
|
+
/* stylelint-disable-next-line declaration-block-no-redundant-longhand-properties */
|
|
7
|
+
flex-wrap: var(--flex-wrap);
|
|
8
|
+
row-gap: var(--spacing);
|
|
9
|
+
column-gap: var(--spacing);
|
|
10
|
+
font-family: var(--bui-font-family);
|
|
11
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
require("./Stack.css");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
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); }
|
|
12
|
+
const prefixCls = 'bui-stack';
|
|
13
|
+
const Stack = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
14
|
+
const {
|
|
15
|
+
className,
|
|
16
|
+
children,
|
|
17
|
+
direction,
|
|
18
|
+
spacing,
|
|
19
|
+
divider,
|
|
20
|
+
justifyContent,
|
|
21
|
+
alignItems,
|
|
22
|
+
flexWrap,
|
|
23
|
+
style,
|
|
24
|
+
...others
|
|
25
|
+
} = props;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* js写css变量方式
|
|
29
|
+
* 可通过css直接覆盖,不需要通过style
|
|
30
|
+
* */
|
|
31
|
+
const cssProperties = {
|
|
32
|
+
'--align-items': alignItems || 'center',
|
|
33
|
+
'--justify-content': justifyContent || 'center',
|
|
34
|
+
'--flex-direction': direction || 'column',
|
|
35
|
+
'--spacing': spacing || '0',
|
|
36
|
+
'--flex-wrap': flexWrap || 'nowrap'
|
|
37
|
+
};
|
|
38
|
+
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
39
|
+
className: (0, _clsx.default)(prefixCls, className),
|
|
40
|
+
style: {
|
|
41
|
+
...cssProperties,
|
|
42
|
+
...style
|
|
43
|
+
},
|
|
44
|
+
ref: ref
|
|
45
|
+
}, others), divider ? _react.default.Children.map(children, (child, index) => {
|
|
46
|
+
if (index < _react.default.Children.toArray(children).length - 1) {
|
|
47
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, child, divider);
|
|
48
|
+
}
|
|
49
|
+
return child;
|
|
50
|
+
}) : children);
|
|
51
|
+
});
|
|
52
|
+
Stack.displayName = 'BuiStack';
|
|
53
|
+
var _default = exports.default = Stack;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { OverrideProps } from '@bifrostui/types';
|
|
2
|
+
import React, { ReactNode } from 'react';
|
|
3
|
+
export type StackProps<D extends React.ElementType = 'div', P = {}> = OverrideProps<{
|
|
4
|
+
props: P & {
|
|
5
|
+
/**
|
|
6
|
+
* 方向, 设置子节点垂直/水平分布
|
|
7
|
+
* 默认column;
|
|
8
|
+
*/
|
|
9
|
+
direction?: 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
10
|
+
/**
|
|
11
|
+
* 交叉轴轴上对齐方式
|
|
12
|
+
* 默认center
|
|
13
|
+
*/
|
|
14
|
+
alignItems?: 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
|
|
15
|
+
/**
|
|
16
|
+
* 主轴上对齐方式
|
|
17
|
+
* 默认center
|
|
18
|
+
*/
|
|
19
|
+
justifyContent?: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
|
|
20
|
+
/**
|
|
21
|
+
* 间距,设置子节点之间间距
|
|
22
|
+
* 默认 0
|
|
23
|
+
*/
|
|
24
|
+
spacing?: string | number;
|
|
25
|
+
/**
|
|
26
|
+
* 分割线,允许在每个子节点之间插入一个元素
|
|
27
|
+
*/
|
|
28
|
+
divider?: ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* 控制节点换行
|
|
31
|
+
*/
|
|
32
|
+
flexWrap?: 'wrap' | 'nowrap' | 'wrap-reverse';
|
|
33
|
+
};
|
|
34
|
+
defaultComponent: D;
|
|
35
|
+
}, D>;
|