@bifrostui/react 1.1.11-beta.0 → 1.1.11-beta.6
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/README.md +3 -0
- package/dist/ActionSheet/ActionSheet.js +107 -62
- package/dist/ActionSheet/ActionSheet.types.js +15 -5
- package/dist/ActionSheet/ActionSheetContext.js +35 -10
- package/dist/ActionSheet/ActionSheetItem.d.ts +1 -1
- package/dist/ActionSheet/ActionSheetItem.js +113 -52
- package/dist/ActionSheet/ActionSheetItem.types.js +15 -5
- package/dist/ActionSheet/index.js +42 -50
- package/dist/Alert/Alert.d.ts +1 -1
- package/dist/Alert/Alert.js +157 -95
- package/dist/Alert/Alert.types.js +15 -5
- package/dist/Alert/index.js +38 -30
- package/dist/Avatar/Avatar.d.ts +1 -1
- package/dist/Avatar/Avatar.js +118 -43
- package/dist/Avatar/Avatar.types.js +15 -5
- package/dist/Avatar/AvatarGroup.d.ts +1 -1
- package/dist/Avatar/AvatarGroup.js +122 -64
- package/dist/Avatar/AvatarGroup.types.js +15 -5
- package/dist/Avatar/index.js +43 -50
- package/dist/Backdrop/Backdrop.d.ts +1 -1
- package/dist/Backdrop/Backdrop.js +95 -33
- package/dist/Backdrop/Backdrop.types.js +15 -5
- package/dist/Backdrop/index.js +37 -30
- package/dist/Badge/Badge.d.ts +1 -1
- package/dist/Badge/Badge.js +102 -31
- package/dist/Badge/Badge.types.js +15 -5
- package/dist/Badge/index.js +37 -30
- package/dist/Button/Button.css +31 -7
- package/dist/Button/Button.d.ts +1 -1
- package/dist/Button/Button.js +111 -48
- package/dist/Button/Button.types.js +15 -5
- package/dist/Button/index.js +37 -30
- package/dist/Calendar/Calendar.d.ts +1 -1
- package/dist/Calendar/Calendar.js +303 -257
- package/dist/Calendar/Calendar.types.js +15 -5
- package/dist/Calendar/index.js +37 -30
- package/dist/Calendar/utils.js +55 -44
- package/dist/Card/Card.d.ts +1 -1
- package/dist/Card/Card.js +74 -25
- package/dist/Card/Card.types.js +15 -5
- package/dist/Card/CardContent.d.ts +1 -1
- package/dist/Card/CardContent.js +69 -24
- package/dist/Card/CardContent.types.js +15 -5
- package/dist/Card/CardFooter.d.ts +1 -1
- package/dist/Card/CardFooter.js +69 -24
- package/dist/Card/CardFooter.types.js +15 -5
- package/dist/Card/CardHeader.d.ts +1 -1
- package/dist/Card/CardHeader.js +91 -56
- package/dist/Card/CardHeader.types.js +15 -5
- package/dist/Card/index.js +54 -91
- package/dist/Checkbox/Checkbox.d.ts +1 -1
- package/dist/Checkbox/Checkbox.js +133 -66
- package/dist/Checkbox/Checkbox.types.js +15 -5
- package/dist/Checkbox/CheckboxContext.js +40 -10
- package/dist/Checkbox/CheckboxGroup.d.ts +1 -1
- package/dist/Checkbox/CheckboxGroup.js +109 -52
- package/dist/Checkbox/index.js +40 -38
- package/dist/CitySelector/CitySelector.d.ts +1 -1
- package/dist/CitySelector/CitySelector.js +83 -35
- package/dist/CitySelector/CitySelector.miniapp.d.ts +1 -1
- package/dist/CitySelector/CitySelector.miniapp.js +123 -77
- package/dist/CitySelector/CitySelector.types.js +15 -5
- package/dist/CitySelector/CitySelectorCore.js +228 -174
- package/dist/CitySelector/Selector/index.js +46 -20
- package/dist/CitySelector/index.js +37 -30
- package/dist/Countdown/Countdown.css +11 -1
- package/dist/Countdown/Countdown.d.ts +1 -1
- package/dist/Countdown/Countdown.js +126 -70
- package/dist/Countdown/Countdown.types.js +15 -5
- package/dist/Countdown/index.js +39 -42
- package/dist/Countdown/useCountdown.js +37 -27
- package/dist/Countdown/utils.js +73 -74
- package/dist/Divider/Divider.d.ts +1 -1
- package/dist/Divider/Divider.js +70 -51
- package/dist/Divider/Divider.types.js +15 -5
- package/dist/Divider/index.js +37 -30
- package/dist/Drawer/Drawer.css +0 -1
- package/dist/Drawer/Drawer.js +124 -46
- package/dist/Drawer/Drawer.types.js +15 -5
- package/dist/Drawer/index.js +37 -30
- package/dist/Fade/Fade.js +111 -52
- package/dist/Fade/Fade.types.js +15 -5
- package/dist/Fade/index.js +38 -30
- package/dist/IconButton/IconButton.css +26 -6
- package/dist/IconButton/IconButton.d.ts +1 -1
- package/dist/IconButton/IconButton.js +114 -46
- package/dist/IconButton/IconButton.types.js +15 -5
- package/dist/IconButton/index.js +37 -30
- package/dist/Image/Image.d.ts +1 -1
- package/dist/Image/Image.js +143 -78
- package/dist/Image/Image.types.js +15 -5
- package/dist/Image/index.js +38 -30
- package/dist/Input/Input.d.ts +1 -1
- package/dist/Input/Input.js +144 -74
- package/dist/Input/Input.types.js +15 -5
- package/dist/Input/index.js +37 -30
- package/dist/List/List.d.ts +1 -1
- package/dist/List/List.js +89 -28
- package/dist/List/List.types.js +15 -5
- package/dist/List/ListContext.js +34 -9
- package/dist/List/ListItem.d.ts +1 -1
- package/dist/List/ListItem.js +97 -42
- package/dist/List/ListItem.types.js +15 -5
- package/dist/List/ListItemContent.d.ts +1 -1
- package/dist/List/ListItemContent.js +82 -34
- package/dist/List/ListItemContent.types.js +15 -5
- package/dist/List/ListItemExtra.d.ts +1 -1
- package/dist/List/ListItemExtra.js +70 -26
- package/dist/List/ListItemExtra.types.js +15 -5
- package/dist/List/ListItemFooter.d.ts +1 -1
- package/dist/List/ListItemFooter.js +70 -26
- package/dist/List/ListItemFooter.types.js +15 -5
- package/dist/List/ListItemHeader.d.ts +1 -1
- package/dist/List/ListItemHeader.js +70 -26
- package/dist/List/ListItemHeader.types.js +15 -5
- package/dist/List/index.js +62 -130
- package/dist/Loading/Loading.d.ts +1 -1
- package/dist/Loading/Loading.js +82 -33
- package/dist/Loading/Loading.types.js +15 -5
- package/dist/Loading/index.js +37 -30
- package/dist/Modal/Modal.d.ts +1 -1
- package/dist/Modal/Modal.js +112 -56
- package/dist/Modal/Modal.miniapp.d.ts +3 -3
- package/dist/Modal/Modal.miniapp.js +132 -63
- package/dist/Modal/Modal.types.js +15 -5
- package/dist/Modal/index.js +38 -30
- package/dist/NavBar/NavBar.d.ts +1 -1
- package/dist/NavBar/NavBar.js +109 -59
- package/dist/NavBar/NavBar.types.js +15 -5
- package/dist/NavBar/index.js +37 -30
- package/dist/Picker/Picker.d.ts +1 -1
- package/dist/Picker/Picker.js +155 -97
- package/dist/Picker/Picker.types.js +15 -5
- package/dist/Picker/PickerPanel.css +9 -1
- package/dist/Picker/PickerPanel.d.ts +1 -1
- package/dist/Picker/PickerPanel.js +255 -202
- package/dist/Picker/index.js +37 -30
- package/dist/Picker/utils.js +42 -37
- package/dist/Portal/Portal.js +61 -16
- package/dist/Portal/Portal.miniapp.js +68 -31
- package/dist/Portal/Portal.types.js +15 -5
- package/dist/Portal/PortalCore.js +70 -52
- package/dist/Portal/index.js +38 -30
- package/dist/Progress/Progress.d.ts +1 -1
- package/dist/Progress/Progress.js +102 -61
- package/dist/Progress/Progress.types.js +15 -5
- package/dist/Progress/index.js +38 -30
- package/dist/Radio/Radio.d.ts +1 -1
- package/dist/Radio/Radio.js +144 -80
- package/dist/Radio/Radio.types.js +15 -5
- package/dist/Radio/RadioButtonIcon.js +63 -32
- package/dist/Radio/RadioContext.js +40 -10
- package/dist/Radio/RadioGroup.d.ts +1 -1
- package/dist/Radio/RadioGroup.js +89 -34
- package/dist/Radio/index.js +40 -38
- package/dist/Rating/Rating.d.ts +1 -1
- package/dist/Rating/Rating.js +139 -62
- package/dist/Rating/Rating.types.js +15 -5
- package/dist/Rating/index.js +37 -30
- package/dist/ScrollView/ScrollView.d.ts +1 -1
- package/dist/ScrollView/ScrollView.js +226 -178
- package/{es/ScrollView/index.miniapp.js → dist/ScrollView/ScrollView.miniapp.d.ts} +0 -1
- package/dist/ScrollView/ScrollView.miniapp.js +24 -0
- package/dist/ScrollView/ScrollView.types.js +15 -5
- package/dist/ScrollView/index.js +38 -30
- package/dist/Select/Select.d.ts +1 -1
- package/dist/Select/Select.js +176 -114
- package/dist/Select/Select.types.js +15 -5
- package/dist/Select/SelectOption.d.ts +1 -1
- package/dist/Select/SelectOption.js +92 -48
- package/dist/Select/index.js +40 -38
- package/dist/Select/selectContext.js +24 -8
- package/dist/Skeleton/Skeleton.css +7 -2
- package/dist/Skeleton/Skeleton.d.ts +1 -1
- package/dist/Skeleton/Skeleton.js +101 -37
- package/dist/Skeleton/Skeleton.types.js +15 -5
- package/dist/Skeleton/index.js +38 -30
- package/dist/Slide/Slide.js +125 -64
- package/dist/Slide/Slide.types.js +15 -5
- package/dist/Slide/index.js +38 -30
- package/dist/Slider/Slider.css +2 -2
- package/dist/Slider/Slider.d.ts +1 -1
- package/dist/Slider/Slider.js +215 -171
- package/dist/Slider/Slider.types.js +15 -5
- package/dist/Slider/index.js +37 -30
- package/dist/Slider/utils.js +35 -24
- package/dist/Stack/Stack.css +0 -1
- package/dist/Stack/Stack.d.ts +1 -1
- package/dist/Stack/Stack.js +96 -41
- package/dist/Stack/Stack.types.js +15 -5
- package/dist/Stack/demo/StackDemo.js +148 -122
- package/dist/Stack/index.js +38 -30
- package/dist/Steps/Step.css +2 -2
- package/dist/Steps/Step.d.ts +1 -1
- package/dist/Steps/Step.js +144 -87
- package/dist/Steps/Step.types.js +15 -5
- package/dist/Steps/Steps.d.ts +1 -1
- package/dist/Steps/Steps.js +107 -46
- package/dist/Steps/Steps.types.js +15 -5
- package/dist/Steps/StepsContext.js +40 -10
- package/dist/Steps/index.js +42 -50
- package/dist/Swiper/Swiper.d.ts +1 -1
- package/dist/Swiper/Swiper.js +149 -82
- package/dist/Swiper/Swiper.miniapp.d.ts +2 -0
- package/dist/Swiper/Swiper.miniapp.js +24 -0
- package/dist/Swiper/Swiper.types.js +15 -5
- package/dist/Swiper/SwiperItem.js +66 -28
- package/dist/Swiper/SwiperItem.miniapp.d.ts +2 -0
- package/dist/Swiper/SwiperItem.miniapp.js +24 -0
- package/dist/Swiper/index.js +40 -38
- package/dist/Switch/Switch.css +1 -1
- package/dist/Switch/Switch.d.ts +1 -1
- package/dist/Switch/Switch.js +121 -48
- package/dist/Switch/Switch.types.js +15 -5
- package/dist/Switch/index.js +38 -30
- package/dist/TabBar/TabBar.d.ts +1 -1
- package/dist/TabBar/TabBar.js +95 -37
- package/dist/TabBar/TabBarContext.js +24 -8
- package/dist/TabBar/TabBarItem.d.ts +1 -1
- package/dist/TabBar/TabBarItem.js +123 -59
- package/dist/TabBar/index.js +39 -32
- package/dist/TabBar/index.types.js +15 -5
- package/dist/Tabs/Tab.d.ts +1 -1
- package/dist/Tabs/Tab.js +104 -52
- package/dist/Tabs/Tab.types.js +15 -5
- package/dist/Tabs/TabPanel.d.ts +1 -1
- package/dist/Tabs/TabPanel.js +76 -31
- package/dist/Tabs/TabPanel.types.js +15 -5
- package/dist/Tabs/Tabs.css +10 -3
- package/dist/Tabs/Tabs.d.ts +1 -1
- package/dist/Tabs/Tabs.js +177 -127
- package/dist/Tabs/Tabs.types.js +15 -5
- package/dist/Tabs/TabsContext.d.ts +2 -2
- package/dist/Tabs/TabsContext.js +42 -12
- package/dist/Tabs/index.js +48 -71
- package/dist/Tabs/utils/bound.js +24 -8
- package/dist/Tag/Tag.d.ts +1 -1
- package/dist/Tag/Tag.js +102 -47
- package/dist/Tag/Tag.types.js +15 -5
- package/dist/Tag/TagGroup.css +1 -1
- package/dist/Tag/TagGroup.d.ts +1 -1
- package/dist/Tag/TagGroup.js +74 -25
- package/dist/Tag/TagGroup.types.js +15 -5
- package/dist/Tag/index.js +41 -44
- package/dist/TextArea/TextArea.d.ts +1 -1
- package/dist/TextArea/TextArea.js +203 -137
- package/dist/TextArea/TextArea.types.js +15 -5
- package/dist/TextArea/index.js +37 -30
- package/dist/Transition/Transition.js +61 -17
- package/dist/Transition/Transition.miniapp.js +62 -17
- package/dist/Transition/Transition.types.js +15 -5
- package/dist/Transition/TransitionCore.js +243 -161
- package/dist/Transition/index.js +38 -30
- package/dist/index.js +98 -444
- package/es/ActionSheet/ActionSheet.js +79 -54
- package/es/ActionSheet/ActionSheet.types.js +0 -1
- package/es/ActionSheet/ActionSheetContext.js +7 -4
- package/es/ActionSheet/ActionSheetItem.d.ts +1 -1
- package/es/ActionSheet/ActionSheetItem.js +86 -45
- package/es/ActionSheet/ActionSheetItem.types.js +0 -1
- package/es/ActionSheet/index.js +8 -3
- package/es/Alert/Alert.d.ts +1 -1
- package/es/Alert/Alert.js +145 -99
- package/es/Alert/Alert.types.js +0 -1
- package/es/Alert/index.js +5 -2
- package/es/Avatar/Avatar.d.ts +1 -1
- package/es/Avatar/Avatar.js +102 -50
- package/es/Avatar/Avatar.types.js +0 -1
- package/es/Avatar/AvatarGroup.d.ts +1 -1
- package/es/Avatar/AvatarGroup.js +96 -61
- package/es/Avatar/AvatarGroup.types.js +0 -1
- package/es/Avatar/index.js +7 -3
- package/es/Backdrop/Backdrop.d.ts +1 -1
- package/es/Backdrop/Backdrop.js +67 -28
- package/es/Backdrop/Backdrop.types.js +0 -1
- package/es/Backdrop/index.js +6 -2
- package/es/Badge/Badge.d.ts +1 -1
- package/es/Badge/Badge.js +82 -34
- package/es/Badge/Badge.types.js +0 -1
- package/es/Badge/index.js +6 -2
- package/es/Button/Button.css +31 -7
- package/es/Button/Button.d.ts +1 -1
- package/es/Button/Button.js +84 -42
- package/es/Button/Button.types.js +0 -1
- package/es/Button/index.js +6 -2
- package/es/Calendar/Calendar.d.ts +1 -1
- package/es/Calendar/Calendar.js +272 -264
- package/es/Calendar/Calendar.types.js +0 -1
- package/es/Calendar/index.js +6 -2
- package/es/Calendar/utils.js +27 -42
- package/es/Card/Card.d.ts +1 -1
- package/es/Card/Card.js +47 -19
- package/es/Card/Card.types.js +0 -1
- package/es/Card/CardContent.d.ts +1 -1
- package/es/Card/CardContent.js +42 -18
- package/es/Card/CardContent.types.js +0 -1
- package/es/Card/CardFooter.d.ts +1 -1
- package/es/Card/CardFooter.js +42 -18
- package/es/Card/CardFooter.types.js +0 -1
- package/es/Card/CardHeader.d.ts +1 -1
- package/es/Card/CardHeader.js +65 -51
- package/es/Card/CardHeader.types.js +0 -1
- package/es/Card/index.js +9 -3
- package/es/Checkbox/Checkbox.d.ts +1 -1
- package/es/Checkbox/Checkbox.js +123 -90
- package/es/Checkbox/Checkbox.types.js +0 -1
- package/es/Checkbox/CheckboxContext.js +8 -4
- package/es/Checkbox/CheckboxGroup.d.ts +1 -1
- package/es/Checkbox/CheckboxGroup.js +81 -58
- package/es/Checkbox/index.js +7 -2
- package/es/CitySelector/CitySelector.d.ts +1 -1
- package/es/CitySelector/CitySelector.js +56 -35
- package/es/CitySelector/CitySelector.miniapp.d.ts +1 -1
- package/es/CitySelector/CitySelector.miniapp.js +95 -74
- package/es/CitySelector/CitySelector.types.js +0 -1
- package/es/CitySelector/CitySelectorCore.js +203 -187
- package/es/CitySelector/Selector/index.js +17 -11
- package/es/CitySelector/index.js +6 -2
- package/es/Countdown/Countdown.css +11 -1
- package/es/Countdown/Countdown.d.ts +1 -1
- package/es/Countdown/Countdown.js +108 -85
- package/es/Countdown/Countdown.types.js +0 -1
- package/es/Countdown/index.js +6 -2
- package/es/Countdown/useCountdown.js +26 -43
- package/es/Countdown/utils.js +78 -105
- package/es/Divider/Divider.d.ts +1 -1
- package/es/Divider/Divider.js +45 -41
- package/es/Divider/Divider.types.js +0 -1
- package/es/Divider/index.js +6 -2
- package/es/Drawer/Drawer.css +0 -1
- package/es/Drawer/Drawer.js +107 -61
- package/es/Drawer/Drawer.types.js +0 -1
- package/es/Drawer/index.js +6 -2
- package/es/Fade/Fade.js +95 -55
- package/es/Fade/Fade.types.js +0 -1
- package/es/Fade/index.js +7 -3
- package/es/IconButton/IconButton.css +26 -6
- package/es/IconButton/IconButton.d.ts +1 -1
- package/es/IconButton/IconButton.js +87 -41
- package/es/IconButton/IconButton.types.js +0 -1
- package/es/IconButton/index.js +6 -2
- package/es/Image/Image.d.ts +1 -1
- package/es/Image/Image.js +136 -106
- package/es/Image/Image.types.js +0 -1
- package/es/Image/index.js +7 -3
- package/es/Input/Input.d.ts +1 -1
- package/es/Input/Input.js +136 -103
- package/es/Input/Input.types.js +0 -1
- package/es/Input/index.js +6 -2
- package/es/List/List.d.ts +1 -1
- package/es/List/List.js +68 -28
- package/es/List/List.types.js +0 -1
- package/es/List/ListContext.js +6 -3
- package/es/List/ListItem.d.ts +1 -1
- package/es/List/ListItem.js +75 -42
- package/es/List/ListItem.types.js +0 -1
- package/es/List/ListItemContent.d.ts +1 -1
- package/es/List/ListItemContent.js +55 -28
- package/es/List/ListItemContent.types.js +0 -1
- package/es/List/ListItemExtra.d.ts +1 -1
- package/es/List/ListItemExtra.js +43 -20
- package/es/List/ListItemExtra.types.js +0 -1
- package/es/List/ListItemFooter.d.ts +1 -1
- package/es/List/ListItemFooter.js +43 -20
- package/es/List/ListItemFooter.types.js +0 -1
- package/es/List/ListItemHeader.d.ts +1 -1
- package/es/List/ListItemHeader.js +43 -20
- package/es/List/ListItemHeader.types.js +0 -1
- package/es/List/index.js +10 -2
- package/es/Loading/Loading.d.ts +1 -1
- package/es/Loading/Loading.js +56 -28
- package/es/Loading/Loading.types.js +0 -1
- package/es/Loading/index.js +6 -2
- package/es/Modal/Modal.d.ts +1 -1
- package/es/Modal/Modal.js +93 -70
- package/es/Modal/Modal.miniapp.d.ts +3 -3
- package/es/Modal/Modal.miniapp.js +104 -67
- package/es/Modal/Modal.types.js +0 -1
- package/es/Modal/index.js +7 -3
- package/es/NavBar/NavBar.d.ts +1 -1
- package/es/NavBar/NavBar.js +95 -67
- package/es/NavBar/NavBar.types.js +0 -1
- package/es/NavBar/index.js +6 -2
- package/es/Picker/Picker.d.ts +1 -1
- package/es/Picker/Picker.js +139 -124
- package/es/Picker/Picker.types.js +0 -1
- package/es/Picker/PickerPanel.css +9 -1
- package/es/Picker/PickerPanel.d.ts +1 -1
- package/es/Picker/PickerPanel.js +228 -226
- package/es/Picker/index.js +6 -2
- package/es/Picker/utils.js +28 -47
- package/es/Portal/Portal.js +31 -10
- package/es/Portal/Portal.miniapp.js +40 -23
- package/es/Portal/Portal.types.js +0 -1
- package/es/Portal/PortalCore.js +42 -53
- package/es/Portal/index.js +7 -3
- package/es/Progress/Progress.d.ts +1 -1
- package/es/Progress/Progress.js +76 -67
- package/es/Progress/Progress.types.js +0 -1
- package/es/Progress/index.js +7 -3
- package/es/Radio/Radio.d.ts +1 -1
- package/es/Radio/Radio.js +133 -102
- package/es/Radio/Radio.types.js +0 -1
- package/es/Radio/RadioButtonIcon.js +38 -28
- package/es/Radio/RadioContext.js +8 -4
- package/es/Radio/RadioGroup.d.ts +1 -1
- package/es/Radio/RadioGroup.js +71 -44
- package/es/Radio/index.js +7 -2
- package/es/Rating/Rating.d.ts +1 -1
- package/es/Rating/Rating.js +132 -89
- package/es/Rating/Rating.types.js +0 -1
- package/es/Rating/index.js +6 -2
- package/es/ScrollView/ScrollView.d.ts +1 -1
- package/es/ScrollView/ScrollView.js +204 -185
- package/{dist/ScrollView/index.miniapp.d.ts → es/ScrollView/ScrollView.miniapp.d.ts} +0 -1
- package/es/ScrollView/ScrollView.miniapp.js +5 -0
- package/es/ScrollView/ScrollView.types.js +0 -1
- package/es/ScrollView/index.js +7 -3
- package/es/Select/Select.d.ts +1 -1
- package/es/Select/Select.js +167 -138
- package/es/Select/Select.types.js +0 -1
- package/es/Select/SelectOption.d.ts +1 -1
- package/es/Select/SelectOption.js +66 -41
- package/es/Select/index.js +6 -2
- package/es/Select/selectContext.js +6 -3
- package/es/Skeleton/Skeleton.css +7 -2
- package/es/Skeleton/Skeleton.d.ts +1 -1
- package/es/Skeleton/Skeleton.js +76 -35
- package/es/Skeleton/Skeleton.types.js +0 -1
- package/es/Skeleton/index.js +7 -3
- package/es/Slide/Slide.js +110 -67
- package/es/Slide/Slide.types.js +0 -1
- package/es/Slide/index.js +7 -3
- package/es/Slider/Slider.css +2 -2
- package/es/Slider/Slider.d.ts +1 -1
- package/es/Slider/Slider.js +236 -244
- package/es/Slider/Slider.types.js +0 -1
- package/es/Slider/index.js +6 -2
- package/es/Slider/utils.js +13 -22
- package/es/Stack/Stack.css +0 -1
- package/es/Stack/Stack.d.ts +1 -1
- package/es/Stack/Stack.js +78 -47
- package/es/Stack/Stack.types.js +0 -1
- package/es/Stack/demo/StackDemo.js +123 -126
- package/es/Stack/index.js +7 -3
- package/es/Steps/Step.css +2 -2
- package/es/Steps/Step.d.ts +1 -1
- package/es/Steps/Step.js +130 -77
- package/es/Steps/Step.types.js +0 -1
- package/es/Steps/Steps.d.ts +1 -1
- package/es/Steps/Steps.js +83 -44
- package/es/Steps/Steps.types.js +0 -1
- package/es/Steps/StepsContext.js +8 -4
- package/es/Steps/index.js +8 -3
- package/es/Swiper/Swiper.d.ts +1 -1
- package/es/Swiper/Swiper.js +136 -99
- package/es/Swiper/Swiper.miniapp.d.ts +2 -0
- package/es/Swiper/Swiper.miniapp.js +5 -0
- package/es/Swiper/Swiper.types.js +0 -1
- package/es/Swiper/SwiperItem.js +40 -23
- package/es/Swiper/SwiperItem.miniapp.d.ts +2 -0
- package/es/Swiper/SwiperItem.miniapp.js +5 -0
- package/es/Swiper/index.js +8 -3
- package/es/Switch/Switch.css +1 -1
- package/es/Switch/Switch.d.ts +1 -1
- package/es/Switch/Switch.js +110 -67
- package/es/Switch/Switch.types.js +0 -1
- package/es/Switch/index.js +7 -3
- package/es/TabBar/TabBar.d.ts +1 -1
- package/es/TabBar/TabBar.js +72 -36
- package/es/TabBar/TabBarContext.js +6 -3
- package/es/TabBar/TabBarItem.d.ts +1 -1
- package/es/TabBar/TabBarItem.js +97 -52
- package/es/TabBar/index.js +5 -2
- package/es/TabBar/index.types.js +0 -1
- package/es/Tabs/Tab.d.ts +1 -1
- package/es/Tabs/Tab.js +77 -44
- package/es/Tabs/Tab.types.js +0 -1
- package/es/Tabs/TabPanel.d.ts +1 -1
- package/es/Tabs/TabPanel.js +50 -25
- package/es/Tabs/TabPanel.types.js +0 -1
- package/es/Tabs/Tabs.css +10 -3
- package/es/Tabs/Tabs.d.ts +1 -1
- package/es/Tabs/Tabs.js +180 -163
- package/es/Tabs/Tabs.types.js +0 -1
- package/es/Tabs/TabsContext.d.ts +2 -2
- package/es/Tabs/TabsContext.js +10 -6
- package/es/Tabs/index.js +10 -4
- package/es/Tabs/utils/bound.js +8 -5
- package/es/Tag/Tag.d.ts +1 -1
- package/es/Tag/Tag.js +85 -53
- package/es/Tag/Tag.types.js +0 -1
- package/es/Tag/TagGroup.css +1 -1
- package/es/Tag/TagGroup.d.ts +1 -1
- package/es/Tag/TagGroup.js +47 -19
- package/es/Tag/TagGroup.types.js +0 -1
- package/es/Tag/index.js +5 -2
- package/es/TextArea/TextArea.d.ts +1 -1
- package/es/TextArea/TextArea.js +177 -139
- package/es/TextArea/TextArea.types.js +0 -1
- package/es/TextArea/index.js +6 -2
- package/es/Transition/Transition.js +31 -11
- package/es/Transition/Transition.miniapp.js +32 -11
- package/es/Transition/Transition.types.js +0 -1
- package/es/Transition/TransitionCore.js +218 -272
- package/es/Transition/index.js +7 -3
- package/es/index.js +1 -1
- package/package.json +16 -12
- package/src/index.ts +40 -0
- package/dist/ScrollView/index.miniapp.js +0 -14
- package/dist/Swiper/index.miniapp.d.ts +0 -8
- package/dist/Swiper/index.miniapp.js +0 -23
- package/es/ScrollView/index.miniapp.d.ts +0 -3
- package/es/Swiper/index.miniapp.d.ts +0 -8
- package/es/Swiper/index.miniapp.js +0 -6
|
@@ -1,289 +1,235 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
18
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
19
|
-
import { useForkRef } from '@bifrostui/utils';
|
|
20
|
-
import React, { forwardRef, useEffect, useRef, useState } from 'react';
|
|
21
|
-
var TransitionCore = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
22
|
-
var appear = props.appear,
|
|
23
|
-
inProp = props.in,
|
|
24
|
-
children = props.children,
|
|
25
|
-
mountOnEnter = props.mountOnEnter,
|
|
26
|
-
unmountOnExit = props.unmountOnExit,
|
|
27
|
-
enter = props.enter,
|
|
28
|
-
exit = props.exit,
|
|
29
|
-
_timeout = props.timeout,
|
|
30
|
-
_delay = props.delay,
|
|
31
|
-
onEnter = props.onEnter,
|
|
32
|
-
onEntering = props.onEntering,
|
|
33
|
-
onEntered = props.onEntered,
|
|
34
|
-
onExit = props.onExit,
|
|
35
|
-
onExiting = props.onExiting,
|
|
36
|
-
onExited = props.onExited,
|
|
37
|
-
nextTick = props.nextTick,
|
|
38
|
-
childProps = _objectWithoutProperties(props, _excluded);
|
|
39
|
-
var UNMOUNTED = 'unmounted';
|
|
40
|
-
var EXITED = 'exited';
|
|
41
|
-
var ENTERING = 'entering';
|
|
42
|
-
var ENTERED = 'entered';
|
|
43
|
-
var EXITING = 'exiting';
|
|
44
|
-
var _useState = useState(function () {
|
|
45
|
-
if (inProp) return appear ? EXITED : ENTERED;
|
|
46
|
-
return mountOnEnter || unmountOnExit ? UNMOUNTED : EXITED;
|
|
47
|
-
}),
|
|
48
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
49
|
-
status = _useState2[0],
|
|
50
|
-
setStatus = _useState2[1];
|
|
51
|
-
var innerNodeRef = useRef();
|
|
52
|
-
var nodeRef = useForkRef(innerNodeRef, ref);
|
|
53
|
-
var timeout = _typeof(_timeout) === 'object' ? _objectSpread({}, _timeout) : {
|
|
54
|
-
enter: _timeout,
|
|
55
|
-
exit: _timeout
|
|
56
|
-
};
|
|
57
|
-
var delay = _typeof(_delay) === 'object' ? _delay : {
|
|
58
|
-
enter: _delay,
|
|
59
|
-
exit: _delay
|
|
60
|
-
};
|
|
61
|
-
timeout.enter += delay.enter;
|
|
62
|
-
timeout.exit += delay.exit;
|
|
63
|
-
var nextCallback = useRef(null);
|
|
64
|
-
var appearStatus = useRef(inProp && appear ? ENTERING : null);
|
|
65
|
-
var isFirstRender = useRef(false);
|
|
66
|
-
var cancelNextCallback = function cancelNextCallback() {
|
|
67
|
-
if (nextCallback.current !== null) {
|
|
68
|
-
var _nextCallback$current;
|
|
69
|
-
(_nextCallback$current = nextCallback.current) === null || _nextCallback$current === void 0 || _nextCallback$current.cancel();
|
|
70
|
-
nextCallback.current = null;
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
71
16
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
var
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
var __async = (__this, __arguments, generator) => {
|
|
33
|
+
return new Promise((resolve, reject) => {
|
|
34
|
+
var fulfilled = (value) => {
|
|
35
|
+
try {
|
|
36
|
+
step(generator.next(value));
|
|
37
|
+
} catch (e) {
|
|
38
|
+
reject(e);
|
|
83
39
|
}
|
|
84
40
|
};
|
|
85
|
-
|
|
86
|
-
|
|
41
|
+
var rejected = (value) => {
|
|
42
|
+
try {
|
|
43
|
+
step(generator.throw(value));
|
|
44
|
+
} catch (e) {
|
|
45
|
+
reject(e);
|
|
46
|
+
}
|
|
87
47
|
};
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
48
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
49
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
import { useForkRef } from "@bifrostui/utils";
|
|
53
|
+
import React, { forwardRef, useEffect, useRef, useState } from "react";
|
|
54
|
+
const TransitionCore = forwardRef(
|
|
55
|
+
(props, ref) => {
|
|
56
|
+
const _a = props, {
|
|
57
|
+
appear,
|
|
58
|
+
in: inProp,
|
|
59
|
+
children,
|
|
60
|
+
mountOnEnter,
|
|
61
|
+
unmountOnExit,
|
|
62
|
+
enter,
|
|
63
|
+
exit,
|
|
64
|
+
timeout: _timeout,
|
|
65
|
+
delay: _delay,
|
|
66
|
+
onEnter,
|
|
67
|
+
onEntering,
|
|
68
|
+
onEntered,
|
|
69
|
+
onExit,
|
|
70
|
+
onExiting,
|
|
71
|
+
onExited,
|
|
72
|
+
nextTick
|
|
73
|
+
} = _a, childProps = __objRest(_a, [
|
|
74
|
+
"appear",
|
|
75
|
+
"in",
|
|
76
|
+
"children",
|
|
77
|
+
"mountOnEnter",
|
|
78
|
+
"unmountOnExit",
|
|
79
|
+
"enter",
|
|
80
|
+
"exit",
|
|
81
|
+
"timeout",
|
|
82
|
+
"delay",
|
|
83
|
+
"onEnter",
|
|
84
|
+
"onEntering",
|
|
85
|
+
"onEntered",
|
|
86
|
+
"onExit",
|
|
87
|
+
"onExiting",
|
|
88
|
+
"onExited",
|
|
89
|
+
"nextTick"
|
|
90
|
+
]);
|
|
91
|
+
const UNMOUNTED = "unmounted";
|
|
92
|
+
const EXITED = "exited";
|
|
93
|
+
const ENTERING = "entering";
|
|
94
|
+
const ENTERED = "entered";
|
|
95
|
+
const EXITING = "exiting";
|
|
96
|
+
const [status, setStatus] = useState(() => {
|
|
97
|
+
if (inProp)
|
|
98
|
+
return appear ? EXITED : ENTERED;
|
|
99
|
+
return mountOnEnter || unmountOnExit ? UNMOUNTED : EXITED;
|
|
105
100
|
});
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
return onEntered === null || onEntered === void 0 ? void 0 : onEntered(innerNodeRef === null || innerNodeRef === void 0 ? void 0 : innerNodeRef.current);
|
|
122
|
-
case 2:
|
|
123
|
-
case "end":
|
|
124
|
-
return _context.stop();
|
|
125
|
-
}
|
|
126
|
-
}, _callee);
|
|
127
|
-
})));
|
|
128
|
-
return _context4.abrupt("return");
|
|
129
|
-
case 3:
|
|
130
|
-
if (!onEnter) {
|
|
131
|
-
_context4.next = 6;
|
|
132
|
-
break;
|
|
133
|
-
}
|
|
134
|
-
_context4.next = 6;
|
|
135
|
-
return onEnter === null || onEnter === void 0 ? void 0 : onEnter(innerNodeRef === null || innerNodeRef === void 0 ? void 0 : innerNodeRef.current);
|
|
136
|
-
case 6:
|
|
137
|
-
safeSetState(ENTERING, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
138
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
139
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
140
|
-
case 0:
|
|
141
|
-
_context3.next = 2;
|
|
142
|
-
return onEntering === null || onEntering === void 0 ? void 0 : onEntering(innerNodeRef === null || innerNodeRef === void 0 ? void 0 : innerNodeRef.current);
|
|
143
|
-
case 2:
|
|
144
|
-
onTransitionEnd(timeout.enter, function () {
|
|
145
|
-
safeSetState(ENTERED, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
146
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
147
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
148
|
-
case 0:
|
|
149
|
-
_context2.next = 2;
|
|
150
|
-
return onEntered === null || onEntered === void 0 ? void 0 : onEntered(innerNodeRef === null || innerNodeRef === void 0 ? void 0 : innerNodeRef.current);
|
|
151
|
-
case 2:
|
|
152
|
-
case "end":
|
|
153
|
-
return _context2.stop();
|
|
154
|
-
}
|
|
155
|
-
}, _callee2);
|
|
156
|
-
})));
|
|
157
|
-
});
|
|
158
|
-
case 3:
|
|
159
|
-
case "end":
|
|
160
|
-
return _context3.stop();
|
|
161
|
-
}
|
|
162
|
-
}, _callee3);
|
|
163
|
-
})));
|
|
164
|
-
case 7:
|
|
165
|
-
case "end":
|
|
166
|
-
return _context4.stop();
|
|
167
|
-
}
|
|
168
|
-
}, _callee4);
|
|
169
|
-
}));
|
|
170
|
-
return function performEnter() {
|
|
171
|
-
return _ref.apply(this, arguments);
|
|
101
|
+
const innerNodeRef = useRef();
|
|
102
|
+
const nodeRef = useForkRef(innerNodeRef, ref);
|
|
103
|
+
const timeout = typeof _timeout === "object" ? __spreadValues({}, _timeout) : { enter: _timeout, exit: _timeout };
|
|
104
|
+
const delay = typeof _delay === "object" ? _delay : { enter: _delay, exit: _delay };
|
|
105
|
+
timeout.enter += delay.enter;
|
|
106
|
+
timeout.exit += delay.exit;
|
|
107
|
+
const nextCallback = useRef(null);
|
|
108
|
+
const appearStatus = useRef(inProp && appear ? ENTERING : null);
|
|
109
|
+
const isFirstRender = useRef(false);
|
|
110
|
+
const cancelNextCallback = () => {
|
|
111
|
+
var _a2;
|
|
112
|
+
if (nextCallback.current !== null) {
|
|
113
|
+
(_a2 = nextCallback.current) == null ? void 0 : _a2.cancel();
|
|
114
|
+
nextCallback.current = null;
|
|
115
|
+
}
|
|
172
116
|
};
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
break;
|
|
182
|
-
}
|
|
183
|
-
safeSetState(unmountOnExit ? UNMOUNTED : EXITED, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
184
|
-
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
185
|
-
while (1) switch (_context5.prev = _context5.next) {
|
|
186
|
-
case 0:
|
|
187
|
-
_context5.next = 2;
|
|
188
|
-
return onExited === null || onExited === void 0 ? void 0 : onExited(innerNodeRef === null || innerNodeRef === void 0 ? void 0 : innerNodeRef.current);
|
|
189
|
-
case 2:
|
|
190
|
-
case "end":
|
|
191
|
-
return _context5.stop();
|
|
192
|
-
}
|
|
193
|
-
}, _callee5);
|
|
194
|
-
})));
|
|
195
|
-
return _context8.abrupt("return");
|
|
196
|
-
case 3:
|
|
197
|
-
_context8.next = 5;
|
|
198
|
-
return onExit === null || onExit === void 0 ? void 0 : onExit(innerNodeRef === null || innerNodeRef === void 0 ? void 0 : innerNodeRef.current);
|
|
199
|
-
case 5:
|
|
200
|
-
safeSetState(EXITING, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
201
|
-
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
202
|
-
while (1) switch (_context7.prev = _context7.next) {
|
|
203
|
-
case 0:
|
|
204
|
-
_context7.next = 2;
|
|
205
|
-
return onExiting === null || onExiting === void 0 ? void 0 : onExiting(innerNodeRef === null || innerNodeRef === void 0 ? void 0 : innerNodeRef.current);
|
|
206
|
-
case 2:
|
|
207
|
-
onTransitionEnd(timeout.exit, function () {
|
|
208
|
-
safeSetState(unmountOnExit ? UNMOUNTED : EXITED, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
209
|
-
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
210
|
-
while (1) switch (_context6.prev = _context6.next) {
|
|
211
|
-
case 0:
|
|
212
|
-
_context6.next = 2;
|
|
213
|
-
return onExited === null || onExited === void 0 ? void 0 : onExited(innerNodeRef === null || innerNodeRef === void 0 ? void 0 : innerNodeRef.current);
|
|
214
|
-
case 2:
|
|
215
|
-
case "end":
|
|
216
|
-
return _context6.stop();
|
|
217
|
-
}
|
|
218
|
-
}, _callee6);
|
|
219
|
-
})));
|
|
220
|
-
});
|
|
221
|
-
case 3:
|
|
222
|
-
case "end":
|
|
223
|
-
return _context7.stop();
|
|
224
|
-
}
|
|
225
|
-
}, _callee7);
|
|
226
|
-
})));
|
|
227
|
-
case 6:
|
|
228
|
-
case "end":
|
|
229
|
-
return _context8.stop();
|
|
117
|
+
const forceReflow = (node) => node == null ? void 0 : node.scrollTop;
|
|
118
|
+
const setNextCallback = (callback) => {
|
|
119
|
+
let active = true;
|
|
120
|
+
nextCallback.current = (event) => {
|
|
121
|
+
if (active) {
|
|
122
|
+
active = false;
|
|
123
|
+
nextCallback.current = null;
|
|
124
|
+
callback(event);
|
|
230
125
|
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
126
|
+
};
|
|
127
|
+
nextCallback.current.cancel = () => {
|
|
128
|
+
active = false;
|
|
129
|
+
};
|
|
130
|
+
return nextCallback.current;
|
|
235
131
|
};
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
if (nextStatus === ENTERING) {
|
|
241
|
-
performEnter();
|
|
242
|
-
} else if (nextStatus === EXITING) {
|
|
243
|
-
performExit();
|
|
132
|
+
const onTransitionEnd = (timeoutArg, callback) => {
|
|
133
|
+
if (timeoutArg !== null) {
|
|
134
|
+
setNextCallback(callback);
|
|
135
|
+
setTimeout(nextCallback.current, timeoutArg);
|
|
244
136
|
}
|
|
245
|
-
}
|
|
246
|
-
};
|
|
247
|
-
useEffect(function () {
|
|
248
|
-
nextTick(function () {
|
|
249
|
-
return updateStatus(appearStatus.current);
|
|
250
|
-
});
|
|
251
|
-
return function () {
|
|
252
|
-
cancelNextCallback();
|
|
253
137
|
};
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
if (
|
|
264
|
-
|
|
138
|
+
const safeSetState = (nextState, callback) => {
|
|
139
|
+
setStatus(nextState);
|
|
140
|
+
setNextCallback(callback);
|
|
141
|
+
nextTick(() => {
|
|
142
|
+
var _a2;
|
|
143
|
+
(_a2 = nextCallback == null ? void 0 : nextCallback.current) == null ? void 0 : _a2.call(nextCallback);
|
|
144
|
+
});
|
|
145
|
+
};
|
|
146
|
+
const performEnter = () => __async(void 0, null, function* () {
|
|
147
|
+
if (!enter) {
|
|
148
|
+
safeSetState(ENTERED, () => __async(void 0, null, function* () {
|
|
149
|
+
yield onEntered == null ? void 0 : onEntered(innerNodeRef == null ? void 0 : innerNodeRef.current);
|
|
150
|
+
}));
|
|
151
|
+
return;
|
|
265
152
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
153
|
+
if (onEnter)
|
|
154
|
+
yield onEnter == null ? void 0 : onEnter(innerNodeRef == null ? void 0 : innerNodeRef.current);
|
|
155
|
+
safeSetState(ENTERING, () => __async(void 0, null, function* () {
|
|
156
|
+
yield onEntering == null ? void 0 : onEntering(innerNodeRef == null ? void 0 : innerNodeRef.current);
|
|
157
|
+
onTransitionEnd(timeout.enter, () => {
|
|
158
|
+
safeSetState(ENTERED, () => __async(void 0, null, function* () {
|
|
159
|
+
yield onEntered == null ? void 0 : onEntered(innerNodeRef == null ? void 0 : innerNodeRef.current);
|
|
160
|
+
}));
|
|
161
|
+
});
|
|
162
|
+
}));
|
|
163
|
+
});
|
|
164
|
+
const performExit = () => __async(void 0, null, function* () {
|
|
165
|
+
if (!exit) {
|
|
166
|
+
safeSetState(unmountOnExit ? UNMOUNTED : EXITED, () => __async(void 0, null, function* () {
|
|
167
|
+
yield onExited == null ? void 0 : onExited(innerNodeRef == null ? void 0 : innerNodeRef.current);
|
|
168
|
+
}));
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
yield onExit == null ? void 0 : onExit(innerNodeRef == null ? void 0 : innerNodeRef.current);
|
|
172
|
+
safeSetState(EXITING, () => __async(void 0, null, function* () {
|
|
173
|
+
yield onExiting == null ? void 0 : onExiting(innerNodeRef == null ? void 0 : innerNodeRef.current);
|
|
174
|
+
onTransitionEnd(timeout.exit, () => {
|
|
175
|
+
safeSetState(unmountOnExit ? UNMOUNTED : EXITED, () => __async(void 0, null, function* () {
|
|
176
|
+
yield onExited == null ? void 0 : onExited(innerNodeRef == null ? void 0 : innerNodeRef.current);
|
|
177
|
+
}));
|
|
178
|
+
});
|
|
179
|
+
}));
|
|
274
180
|
});
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
}
|
|
283
|
-
|
|
181
|
+
const updateStatus = (nextStatus) => {
|
|
182
|
+
if (nextStatus !== null) {
|
|
183
|
+
cancelNextCallback();
|
|
184
|
+
if (nextStatus === ENTERING) {
|
|
185
|
+
performEnter();
|
|
186
|
+
} else if (nextStatus === EXITING) {
|
|
187
|
+
performExit();
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
useEffect(() => {
|
|
192
|
+
nextTick(() => updateStatus(appearStatus.current));
|
|
193
|
+
return () => {
|
|
194
|
+
cancelNextCallback();
|
|
195
|
+
};
|
|
196
|
+
}, []);
|
|
197
|
+
useEffect(() => {
|
|
198
|
+
const isMounted = status !== UNMOUNTED;
|
|
199
|
+
if (!isFirstRender.current) {
|
|
200
|
+
isFirstRender.current = true;
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
let nextStatus = null;
|
|
204
|
+
if (inProp) {
|
|
205
|
+
if (status !== ENTERING && status !== ENTERED) {
|
|
206
|
+
nextStatus = ENTERING;
|
|
207
|
+
}
|
|
208
|
+
} else if (status === ENTERING || status === ENTERED) {
|
|
209
|
+
nextStatus = EXITING;
|
|
210
|
+
}
|
|
211
|
+
if (isMounted)
|
|
212
|
+
updateStatus(nextStatus);
|
|
213
|
+
else
|
|
214
|
+
safeSetState(inProp ? "EXITED" : "ENTERED", () => {
|
|
215
|
+
forceReflow(innerNodeRef == null ? void 0 : innerNodeRef.current);
|
|
216
|
+
updateStatus(nextStatus);
|
|
217
|
+
});
|
|
218
|
+
}, [inProp]);
|
|
219
|
+
if (status === UNMOUNTED)
|
|
220
|
+
return null;
|
|
221
|
+
return typeof children === "function" ? children(status, __spreadProps(__spreadValues({}, childProps), { ref: nodeRef })) : React.cloneElement(React.Children.only(children), __spreadProps(__spreadValues({}, childProps), {
|
|
222
|
+
ref: nodeRef
|
|
223
|
+
}));
|
|
224
|
+
}
|
|
225
|
+
);
|
|
226
|
+
TransitionCore.displayName = "BuiTransitionCore";
|
|
284
227
|
TransitionCore.defaultProps = {
|
|
285
228
|
enter: true,
|
|
286
229
|
exit: true,
|
|
287
230
|
nextTick: setTimeout
|
|
288
231
|
};
|
|
289
|
-
|
|
232
|
+
var TransitionCore_default = TransitionCore;
|
|
233
|
+
export {
|
|
234
|
+
TransitionCore_default as default
|
|
235
|
+
};
|
package/es/Transition/index.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export * from "./Transition.types";
|
|
1
|
+
import { default as default2 } from "./Transition";
|
|
2
|
+
import { default as default3 } from "./Transition";
|
|
3
|
+
export * from "./Transition.types";
|
|
4
|
+
export {
|
|
5
|
+
default3 as Transition,
|
|
6
|
+
default2 as default
|
|
7
|
+
};
|
package/es/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bifrostui/react",
|
|
3
|
-
"version": "1.1.11-beta.
|
|
3
|
+
"version": "1.1.11-beta.6",
|
|
4
4
|
"description": "React components for building mobile application",
|
|
5
5
|
"homepage": "http://bui.taopiaopiao.com",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"main": "
|
|
8
|
-
"module": "
|
|
7
|
+
"main": "src/index.ts",
|
|
8
|
+
"module": "src/index.ts",
|
|
9
9
|
"typings": "es/index.d.ts",
|
|
10
10
|
"directories": {
|
|
11
11
|
"test": "__tests__"
|
|
@@ -17,34 +17,38 @@
|
|
|
17
17
|
"README.md"
|
|
18
18
|
],
|
|
19
19
|
"publishConfig": {
|
|
20
|
+
"main": "dist/index.js",
|
|
21
|
+
"module": "es/index.js",
|
|
20
22
|
"access": "public",
|
|
21
23
|
"registry": "https://registry.npmjs.org/"
|
|
22
24
|
},
|
|
23
25
|
"scripts": {
|
|
24
|
-
"build": "
|
|
26
|
+
"build": "node esbuild.config.js"
|
|
25
27
|
},
|
|
26
28
|
"sideEffects": [
|
|
27
29
|
"*.css",
|
|
28
30
|
"*.less"
|
|
29
31
|
],
|
|
30
32
|
"devDependencies": {
|
|
31
|
-
"
|
|
33
|
+
"esbuild-plugin-less": "1.3.10",
|
|
34
|
+
"fs-extra": "^11.2.0",
|
|
35
|
+
"glob": "11.0.0"
|
|
32
36
|
},
|
|
33
37
|
"dependencies": {
|
|
34
|
-
"@bifrostui/icons": "
|
|
35
|
-
"@bifrostui/styles": "
|
|
36
|
-
"@bifrostui/types": "
|
|
37
|
-
"@bifrostui/utils": "
|
|
38
|
+
"@bifrostui/icons": "1.1.11-beta.6",
|
|
39
|
+
"@bifrostui/styles": "1.1.11-beta.6",
|
|
40
|
+
"@bifrostui/types": "1.1.11-beta.6",
|
|
41
|
+
"@bifrostui/utils": "1.1.11-beta.6",
|
|
38
42
|
"clsx": "^1.2.1",
|
|
39
43
|
"dayjs": "^1.11.7",
|
|
40
44
|
"swiper": "^8.1.5"
|
|
41
45
|
},
|
|
42
46
|
"peerDependencies": {
|
|
43
|
-
"@tarojs/components": "3.
|
|
44
|
-
"@tarojs/taro": "^3.
|
|
47
|
+
"@tarojs/components": "^3.0.0",
|
|
48
|
+
"@tarojs/taro": "^3.0.0",
|
|
45
49
|
"@types/react": "^17.0.0 || ^18.0.0",
|
|
46
50
|
"react": "^17.0.0 || ^18.0.0",
|
|
47
51
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
48
52
|
},
|
|
49
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "23f3292c1c0eac3e03e4c5efd0fa1621b9f38070"
|
|
50
54
|
}
|