@bifrostui/react 1.5.0 → 2.0.0-alpha.0
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/dist/ActionSheet/ActionSheet.css +16 -6
- package/dist/ActionSheet/ActionSheetItem.css +11 -17
- package/dist/ActionSheet/ActionSheetItem.js +3 -8
- package/dist/ActionSheet/ActionSheetItem.types.d.ts +2 -2
- package/dist/ActionSheet/index.css +89 -0
- package/dist/Alert/Alert.types.d.ts +3 -3
- package/dist/Alert/index.css +18 -14
- package/dist/Avatar/Avatar.css +16 -12
- package/dist/Avatar/Avatar.js +3 -8
- package/dist/Avatar/AvatarGroup.css +19 -15
- package/dist/Avatar/AvatarGroup.js +2 -6
- package/dist/Avatar/index.css +93 -0
- package/dist/Backdrop/Backdrop.d.ts +1 -1
- package/dist/Backdrop/Backdrop.js +1 -1
- package/dist/Backdrop/{Backdrop.css → index.css} +6 -2
- package/dist/Badge/Badge.d.ts +1 -1
- package/dist/Badge/Badge.js +4 -9
- package/dist/Badge/Badge.types.d.ts +1 -1
- package/dist/Badge/{Badge.css → index.css} +47 -27
- package/dist/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/Breadcrumb/index.css +38 -0
- package/dist/Button/Button.d.ts +1 -1
- package/dist/Button/Button.js +6 -11
- package/dist/Button/Button.types.d.ts +8 -7
- package/{es/Button/Button.css → dist/Button/index.css} +93 -63
- package/dist/Calendar/Calendar.d.ts +1 -1
- package/dist/Calendar/Calendar.js +10 -22
- package/dist/Calendar/Calendar.types.d.ts +0 -5
- package/dist/Calendar/{Calendar.css → index.css} +35 -31
- package/dist/Card/Card.css +9 -0
- package/dist/Card/CardContent.css +1 -2
- package/dist/Card/CardFooter.css +2 -4
- package/dist/Card/CardHeader.css +5 -5
- package/dist/Card/CardHeader.js +2 -2
- package/dist/Card/index.css +77 -0
- package/dist/Checkbox/Checkbox.d.ts +1 -1
- package/dist/Checkbox/Checkbox.js +4 -8
- package/dist/Checkbox/CheckboxGroup.d.ts +1 -1
- package/dist/Checkbox/CheckboxGroup.js +5 -8
- package/dist/Checkbox/{Checkbox.css → index.css} +14 -10
- package/dist/CitySelector/CitySelector.miniapp.d.ts +0 -1
- package/dist/CitySelector/CitySelector.miniapp.js +0 -1
- package/dist/CitySelector/CitySelectorCore.d.ts +1 -1
- package/dist/CitySelector/CitySelectorCore.js +1 -1
- package/dist/CitySelector/Selector/index.css +4 -4
- package/{es/CitySelector/CitySelector.css → dist/CitySelector/index.css} +31 -27
- package/dist/Collapse/Collapse.d.ts +2 -2
- package/dist/Collapse/Collapse.js +9 -12
- package/{es/Collapse/Collapse.css → dist/Collapse/index.css} +1 -0
- package/dist/CollapsePanel/CollapsePanel.d.ts +1 -1
- package/dist/CollapsePanel/CollapsePanel.js +1 -1
- package/dist/CollapsePanel/CollapsePanelItem.js +45 -46
- package/dist/CollapsePanel/{CollapsePanel.css → index.css} +12 -10
- package/dist/Countdown/Countdown.d.ts +1 -1
- package/dist/Countdown/Countdown.js +6 -13
- package/{es/Countdown/Countdown.css → dist/Countdown/index.css} +12 -8
- package/dist/Dialog/Dialog.types.d.ts +0 -5
- package/dist/Dialog/FunctionalDialog.js +2 -13
- package/dist/Dialog/index.css +26 -23
- package/dist/Divider/Divider.d.ts +1 -1
- package/dist/Divider/Divider.js +9 -6
- package/dist/Divider/{Divider.css → index.css} +14 -10
- package/dist/Drawer/Drawer.d.ts +1 -1
- package/dist/Drawer/Drawer.js +5 -11
- package/{es/Drawer/Drawer.css → dist/Drawer/index.css} +2 -0
- package/dist/Fade/Fade.js +52 -56
- package/dist/IconButton/IconButton.d.ts +1 -1
- package/dist/IconButton/IconButton.js +7 -14
- package/dist/IconButton/IconButton.types.d.ts +4 -3
- package/{es/IconButton/IconButton.css → dist/IconButton/index.css} +79 -29
- package/dist/Image/Image.js +112 -119
- package/dist/Image/index.css +6 -2
- package/dist/Input/Input.d.ts +1 -1
- package/dist/Input/Input.js +6 -12
- package/{es/Input/Input.css → dist/Input/index.css} +22 -16
- package/dist/ItemSelector/ItemSelector.miniapp.d.ts +0 -1
- package/dist/ItemSelector/ItemSelector.miniapp.js +0 -1
- package/dist/ItemSelector/ItemSelectorCore.d.ts +1 -1
- package/dist/ItemSelector/ItemSelectorCore.js +1 -1
- package/dist/List/List.css +7 -3
- package/dist/List/List.js +3 -8
- package/dist/List/ListItem.css +3 -3
- package/dist/List/ListItem.js +42 -44
- package/dist/List/ListItemContent.js +1 -4
- package/dist/List/ListItemExtra.js +9 -4
- package/dist/List/ListItemFooter.js +9 -4
- package/dist/List/ListItemHeader.js +9 -4
- package/dist/List/index.css +80 -0
- package/dist/Loading/Loading.d.ts +1 -1
- package/dist/Loading/Loading.js +14 -5
- package/{es/Loading/Loading.css → dist/Loading/index.css} +10 -6
- package/dist/Modal/Modal.d.ts +1 -1
- package/dist/Modal/Modal.js +1 -7
- package/dist/Modal/Modal.miniapp.d.ts +2 -2
- package/dist/Modal/Modal.miniapp.js +5 -11
- package/dist/NavBar/NavBar.d.ts +1 -1
- package/dist/NavBar/NavBar.js +1 -2
- package/dist/NavBar/index.css +65 -0
- package/dist/Picker/Picker.css +21 -21
- package/dist/Picker/Picker.js +6 -28
- package/dist/Picker/Picker.types.d.ts +4 -17
- package/dist/Picker/PickerPanel.css +8 -12
- package/dist/Picker/PickerPanel.js +39 -29
- package/dist/Picker/index.css +116 -0
- package/dist/Popover/Popover.d.ts +1 -1
- package/dist/Popover/Popover.js +28 -71
- package/{es/Popover/Popover.css → dist/Popover/index.css} +32 -28
- package/dist/Portal/Portal.miniapp.js +4 -7
- package/dist/Progress/Progress.d.ts +1 -1
- package/dist/Progress/Progress.js +1 -1
- package/dist/Progress/index.css +28 -0
- package/dist/Radio/Radio.d.ts +1 -1
- package/dist/Radio/Radio.js +3 -7
- package/dist/Radio/RadioButtonIcon.js +6 -1
- package/dist/Radio/RadioGroup.d.ts +1 -1
- package/dist/Radio/RadioGroup.js +1 -4
- package/dist/Radio/{Radio.css → index.css} +10 -7
- package/dist/Rating/Rating.d.ts +1 -1
- package/dist/Rating/Rating.js +9 -19
- package/{es/Rating/Rating.css → dist/Rating/index.css} +20 -7
- package/dist/ScrollView/ScrollView.d.ts +1 -1
- package/dist/ScrollView/ScrollView.js +12 -25
- package/dist/ScrollView/ScrollView.types.d.ts +1 -0
- package/dist/Select/Select.d.ts +1 -1
- package/dist/Select/Select.js +43 -76
- package/dist/Select/SelectOption.d.ts +1 -1
- package/dist/Select/SelectOption.js +1 -1
- package/dist/Select/{Select.css → index.css} +30 -20
- package/dist/Skeleton/Skeleton.d.ts +1 -1
- package/dist/Skeleton/Skeleton.js +6 -10
- package/dist/Skeleton/{Skeleton.css → index.css} +7 -3
- package/dist/Slide/Slide.js +69 -74
- package/dist/Slider/Slider.d.ts +1 -1
- package/dist/Slider/Slider.js +13 -29
- package/dist/Slider/index.css +111 -0
- package/dist/Stack/Stack.d.ts +1 -1
- package/dist/Stack/Stack.js +1 -1
- package/dist/Steps/Step.css +14 -14
- package/dist/Steps/Step.js +81 -82
- package/dist/Steps/Steps.css +18 -14
- package/dist/Steps/Steps.d.ts +1 -1
- package/dist/Steps/Steps.js +57 -60
- package/dist/Steps/index.css +199 -0
- package/dist/Swiper/Swiper.d.ts +1 -1
- package/dist/Swiper/Swiper.js +1 -1
- package/{es/Swiper/Swiper.css → dist/Swiper/index.css} +6 -2
- package/dist/Switch/Switch.d.ts +1 -1
- package/dist/Switch/Switch.js +76 -79
- package/dist/Switch/Switch.types.d.ts +1 -1
- package/{es/Switch/Switch.css → dist/Switch/index.css} +46 -35
- package/dist/TabBar/TabBar.css +12 -8
- package/dist/TabBar/TabBar.js +3 -8
- package/dist/TabBar/TabBarContext.d.ts +3 -3
- package/dist/TabBar/TabBarItem.css +6 -0
- package/dist/TabBar/TabBarItem.js +3 -3
- package/dist/TabBar/index.css +59 -0
- package/dist/TabBar/index.types.d.ts +3 -3
- package/dist/Tabs/Tab.css +10 -16
- package/dist/Tabs/Tab.js +2 -3
- package/dist/Tabs/Tabs.css +32 -21
- package/dist/Tabs/Tabs.js +39 -70
- package/dist/Tabs/Tabs.types.d.ts +0 -10
- package/dist/Tabs/index.css +135 -0
- package/dist/Tabs/utils/bound.d.ts +1 -0
- package/dist/{DesktopPicker/utils/calcAfterMounted.js → Tabs/utils/bound.js} +14 -7
- package/dist/Tag/Tag.css +49 -23
- package/dist/Tag/Tag.js +3 -7
- package/dist/Tag/Tag.types.d.ts +4 -4
- package/dist/Tag/TagGroup.css +15 -11
- package/dist/Tag/TagGroup.d.ts +2 -2
- package/dist/Tag/TagGroup.js +16 -14
- package/dist/Tag/index.css +182 -0
- package/dist/TextArea/TextArea.d.ts +1 -1
- package/dist/TextArea/TextArea.js +6 -13
- package/dist/TextArea/index.css +57 -0
- package/dist/ThemeProvider/ThemeProvider.js +1 -4
- package/dist/ThemeProvider/ThemeProvider.types.d.ts +5 -10
- package/dist/ThemeProvider/utils/constants.d.ts +1 -1
- package/dist/ThemeProvider/utils/constants.js +4 -1
- package/dist/ThemeProvider/utils/mountTokens.d.ts +4 -4
- package/dist/Toast/FunctionalToast.js +2 -13
- package/dist/Toast/Toast.d.ts +1 -1
- package/dist/Toast/Toast.js +5 -5
- package/dist/Toast/Toast.types.d.ts +0 -5
- package/dist/Toast/index.css +58 -0
- package/dist/Tooltip/Tooltip.d.ts +1 -1
- package/dist/Tooltip/Tooltip.js +28 -71
- package/dist/Tooltip/index.css +95 -0
- package/dist/Transition/TransitionCore.js +3 -8
- package/dist/index.d.ts +0 -6
- package/dist/index.js +1 -13
- package/dist/locales/base.d.ts +0 -11
- package/dist/locales/en-US.js +0 -24
- package/dist/locales/zh-CN.js +0 -24
- package/dist/locales/zh-TW.js +0 -24
- package/es/ActionSheet/ActionSheet.css +16 -6
- package/es/ActionSheet/ActionSheetItem.css +11 -17
- package/es/ActionSheet/ActionSheetItem.js +3 -8
- package/es/ActionSheet/ActionSheetItem.types.d.ts +2 -2
- package/es/ActionSheet/index.css +89 -0
- package/es/Alert/Alert.types.d.ts +3 -3
- package/es/Alert/index.css +18 -14
- package/es/Avatar/Avatar.css +16 -12
- package/es/Avatar/Avatar.js +3 -8
- package/es/Avatar/AvatarGroup.css +19 -15
- package/es/Avatar/AvatarGroup.js +2 -6
- package/es/Avatar/index.css +93 -0
- package/es/Backdrop/Backdrop.d.ts +1 -1
- package/es/Backdrop/Backdrop.js +1 -1
- package/es/Backdrop/{Backdrop.css → index.css} +6 -2
- package/es/Badge/Badge.d.ts +1 -1
- package/es/Badge/Badge.js +4 -9
- package/es/Badge/Badge.types.d.ts +1 -1
- package/es/Badge/{Badge.css → index.css} +47 -27
- package/es/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/es/Breadcrumb/Breadcrumb.js +1 -1
- package/es/Breadcrumb/index.css +38 -0
- package/es/Button/Button.d.ts +1 -1
- package/es/Button/Button.js +6 -11
- package/es/Button/Button.types.d.ts +8 -7
- package/{dist/Button/Button.css → es/Button/index.css} +93 -63
- package/es/Calendar/Calendar.d.ts +1 -1
- package/es/Calendar/Calendar.js +10 -22
- package/es/Calendar/Calendar.types.d.ts +0 -5
- package/es/Calendar/{Calendar.css → index.css} +35 -31
- package/es/Card/Card.css +9 -0
- package/es/Card/CardContent.css +1 -2
- package/es/Card/CardFooter.css +2 -4
- package/es/Card/CardHeader.css +5 -5
- package/es/Card/CardHeader.js +2 -2
- package/es/Card/index.css +77 -0
- package/es/Checkbox/Checkbox.d.ts +1 -1
- package/es/Checkbox/Checkbox.js +4 -8
- package/es/Checkbox/CheckboxGroup.d.ts +1 -1
- package/es/Checkbox/CheckboxGroup.js +5 -8
- package/es/Checkbox/{Checkbox.css → index.css} +14 -10
- package/es/CitySelector/CitySelector.miniapp.d.ts +0 -1
- package/es/CitySelector/CitySelector.miniapp.js +0 -1
- package/es/CitySelector/CitySelectorCore.d.ts +1 -1
- package/es/CitySelector/CitySelectorCore.js +1 -1
- package/es/CitySelector/Selector/index.css +4 -4
- package/{dist/CitySelector/CitySelector.css → es/CitySelector/index.css} +31 -27
- package/es/Collapse/Collapse.d.ts +2 -2
- package/es/Collapse/Collapse.js +9 -12
- package/{dist/Collapse/Collapse.css → es/Collapse/index.css} +1 -0
- package/es/CollapsePanel/CollapsePanel.d.ts +1 -1
- package/es/CollapsePanel/CollapsePanel.js +1 -1
- package/es/CollapsePanel/CollapsePanelItem.js +45 -46
- package/es/CollapsePanel/{CollapsePanel.css → index.css} +12 -10
- package/es/Countdown/Countdown.d.ts +1 -1
- package/es/Countdown/Countdown.js +6 -13
- package/{dist/Countdown/Countdown.css → es/Countdown/index.css} +12 -8
- package/es/Dialog/Dialog.types.d.ts +0 -5
- package/es/Dialog/FunctionalDialog.js +3 -14
- package/es/Dialog/index.css +26 -23
- package/es/Divider/Divider.d.ts +1 -1
- package/es/Divider/Divider.js +9 -6
- package/es/Divider/{Divider.css → index.css} +14 -10
- package/es/Drawer/Drawer.d.ts +1 -1
- package/es/Drawer/Drawer.js +5 -11
- package/{dist/Drawer/Drawer.css → es/Drawer/index.css} +2 -0
- package/es/Fade/Fade.js +52 -56
- package/es/IconButton/IconButton.d.ts +1 -1
- package/es/IconButton/IconButton.js +7 -14
- package/es/IconButton/IconButton.types.d.ts +4 -3
- package/{dist/IconButton/IconButton.css → es/IconButton/index.css} +79 -29
- package/es/Image/Image.js +112 -119
- package/es/Image/index.css +6 -2
- package/es/Input/Input.d.ts +1 -1
- package/es/Input/Input.js +6 -12
- package/{dist/Input/Input.css → es/Input/index.css} +22 -16
- package/es/ItemSelector/ItemSelector.miniapp.d.ts +0 -1
- package/es/ItemSelector/ItemSelector.miniapp.js +0 -1
- package/es/ItemSelector/ItemSelectorCore.d.ts +1 -1
- package/es/ItemSelector/ItemSelectorCore.js +1 -1
- package/es/List/List.css +7 -3
- package/es/List/List.js +3 -8
- package/es/List/ListItem.css +3 -3
- package/es/List/ListItem.js +42 -44
- package/es/List/ListItemContent.js +1 -4
- package/es/List/ListItemExtra.js +9 -4
- package/es/List/ListItemFooter.js +9 -4
- package/es/List/ListItemHeader.js +9 -4
- package/es/List/index.css +80 -0
- package/es/Loading/Loading.d.ts +1 -1
- package/es/Loading/Loading.js +14 -5
- package/{dist/Loading/Loading.css → es/Loading/index.css} +10 -6
- package/es/Modal/Modal.d.ts +1 -1
- package/es/Modal/Modal.js +1 -7
- package/es/Modal/Modal.miniapp.d.ts +2 -2
- package/es/Modal/Modal.miniapp.js +5 -11
- package/es/NavBar/NavBar.d.ts +1 -1
- package/es/NavBar/NavBar.js +1 -2
- package/es/NavBar/index.css +65 -0
- package/es/Picker/Picker.css +21 -21
- package/es/Picker/Picker.js +6 -28
- package/es/Picker/Picker.types.d.ts +4 -17
- package/es/Picker/PickerPanel.css +8 -12
- package/es/Picker/PickerPanel.js +52 -31
- package/es/Picker/index.css +116 -0
- package/es/Popover/Popover.d.ts +1 -1
- package/es/Popover/Popover.js +30 -74
- package/{dist/Popover/Popover.css → es/Popover/index.css} +32 -28
- package/es/Portal/Portal.miniapp.js +5 -8
- package/es/Progress/Progress.d.ts +1 -1
- package/es/Progress/Progress.js +1 -1
- package/es/Progress/index.css +28 -0
- package/es/Radio/Radio.d.ts +1 -1
- package/es/Radio/Radio.js +3 -7
- package/es/Radio/RadioButtonIcon.js +6 -1
- package/es/Radio/RadioGroup.d.ts +1 -1
- package/es/Radio/RadioGroup.js +1 -4
- package/es/Radio/{Radio.css → index.css} +10 -7
- package/es/Rating/Rating.d.ts +1 -1
- package/es/Rating/Rating.js +9 -19
- package/{dist/Rating/Rating.css → es/Rating/index.css} +20 -7
- package/es/ScrollView/ScrollView.d.ts +1 -1
- package/es/ScrollView/ScrollView.js +12 -25
- package/es/ScrollView/ScrollView.types.d.ts +1 -0
- package/es/Select/Select.d.ts +1 -1
- package/es/Select/Select.js +44 -76
- package/es/Select/SelectOption.d.ts +1 -1
- package/es/Select/SelectOption.js +1 -1
- package/es/Select/{Select.css → index.css} +30 -20
- package/es/Skeleton/Skeleton.d.ts +1 -1
- package/es/Skeleton/Skeleton.js +6 -10
- package/es/Skeleton/{Skeleton.css → index.css} +7 -3
- package/es/Slide/Slide.js +69 -74
- package/es/Slider/Slider.d.ts +1 -1
- package/es/Slider/Slider.js +14 -32
- package/es/Slider/index.css +111 -0
- package/es/Stack/Stack.d.ts +1 -1
- package/es/Stack/Stack.js +1 -1
- package/es/Steps/Step.css +14 -14
- package/es/Steps/Step.js +81 -82
- package/es/Steps/Steps.css +18 -14
- package/es/Steps/Steps.d.ts +1 -1
- package/es/Steps/Steps.js +57 -60
- package/es/Steps/index.css +199 -0
- package/es/Swiper/Swiper.d.ts +1 -1
- package/es/Swiper/Swiper.js +1 -1
- package/{dist/Swiper/Swiper.css → es/Swiper/index.css} +6 -2
- package/es/Switch/Switch.d.ts +1 -1
- package/es/Switch/Switch.js +76 -79
- package/es/Switch/Switch.types.d.ts +1 -1
- package/{dist/Switch/Switch.css → es/Switch/index.css} +46 -35
- package/es/TabBar/TabBar.css +12 -8
- package/es/TabBar/TabBar.js +3 -8
- package/es/TabBar/TabBarContext.d.ts +3 -3
- package/es/TabBar/TabBarItem.css +6 -0
- package/es/TabBar/TabBarItem.js +2 -2
- package/es/TabBar/index.css +59 -0
- package/es/TabBar/index.types.d.ts +3 -3
- package/es/Tabs/Tab.css +10 -16
- package/es/Tabs/Tab.js +2 -3
- package/es/Tabs/Tabs.css +32 -21
- package/es/Tabs/Tabs.js +41 -83
- package/es/Tabs/Tabs.types.d.ts +0 -10
- package/es/Tabs/index.css +135 -0
- package/es/Tabs/utils/bound.d.ts +1 -0
- package/es/Tabs/utils/bound.js +13 -0
- package/es/Tag/Tag.css +49 -23
- package/es/Tag/Tag.js +3 -7
- package/es/Tag/Tag.types.d.ts +4 -4
- package/es/Tag/TagGroup.css +15 -11
- package/es/Tag/TagGroup.d.ts +2 -2
- package/es/Tag/TagGroup.js +16 -14
- package/es/Tag/index.css +182 -0
- package/es/TextArea/TextArea.d.ts +1 -1
- package/es/TextArea/TextArea.js +6 -13
- package/es/TextArea/index.css +57 -0
- package/es/ThemeProvider/ThemeProvider.js +1 -4
- package/es/ThemeProvider/ThemeProvider.types.d.ts +5 -10
- package/es/ThemeProvider/utils/constants.d.ts +1 -1
- package/es/ThemeProvider/utils/constants.js +4 -1
- package/es/ThemeProvider/utils/mountTokens.d.ts +4 -4
- package/es/Toast/FunctionalToast.js +3 -14
- package/es/Toast/Toast.d.ts +1 -1
- package/es/Toast/Toast.js +5 -5
- package/es/Toast/Toast.types.d.ts +0 -5
- package/es/Toast/index.css +58 -0
- package/es/Tooltip/Tooltip.d.ts +1 -1
- package/es/Tooltip/Tooltip.js +30 -74
- package/es/Tooltip/index.css +95 -0
- package/es/Transition/TransitionCore.js +3 -8
- package/es/index.d.ts +0 -6
- package/es/index.js +0 -6
- package/es/locales/base.d.ts +0 -11
- package/es/locales/en-US.js +0 -24
- package/es/locales/zh-CN.js +0 -24
- package/es/locales/zh-TW.js +0 -24
- package/package.json +14 -6
- package/dist/Breadcrumb/Breadcrumb.css +0 -34
- package/dist/CitySelector/miniapp.css +0 -4
- package/dist/Collapse/Collapse.miniapp.d.ts +0 -5
- package/dist/Collapse/Collapse.miniapp.js +0 -177
- package/dist/DatePicker/DatePicker.d.ts +0 -4
- package/dist/DatePicker/DatePicker.js +0 -335
- package/dist/DatePicker/DatePicker.types.d.ts +0 -36
- package/dist/DatePicker/DatePicker.types.js +0 -15
- package/dist/DatePicker/constants.d.ts +0 -9
- package/dist/DatePicker/constants.js +0 -37
- package/dist/DatePicker/index.d.ts +0 -3
- package/dist/DatePicker/index.js +0 -44
- package/dist/DesktopDatePicker/DesktopDatePicker.d.ts +0 -5
- package/dist/DesktopDatePicker/DesktopDatePicker.js +0 -280
- package/dist/DesktopDatePicker/DesktopDatePicker.types.d.ts +0 -163
- package/dist/DesktopDatePicker/DesktopDatePicker.types.js +0 -15
- package/dist/DesktopDatePicker/deskTopPickerContainer.css +0 -100
- package/dist/DesktopDatePicker/index.css +0 -61
- package/dist/DesktopDatePicker/index.d.ts +0 -2
- package/dist/DesktopDatePicker/index.js +0 -41
- package/dist/DesktopDatePicker/useGetDatePickerContent.d.ts +0 -6
- package/dist/DesktopDatePicker/useGetDatePickerContent.js +0 -343
- package/dist/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +0 -5
- package/dist/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -322
- package/dist/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +0 -163
- package/dist/DesktopDateTimePicker/DesktopDateTimePicker.types.js +0 -15
- package/dist/DesktopDateTimePicker/index.css +0 -66
- package/dist/DesktopDateTimePicker/index.d.ts +0 -2
- package/dist/DesktopDateTimePicker/index.js +0 -41
- package/dist/DesktopPicker/DesktopPicker.d.ts +0 -5
- package/dist/DesktopPicker/DesktopPicker.js +0 -243
- package/dist/DesktopPicker/DesktopPicker.types.d.ts +0 -61
- package/dist/DesktopPicker/DesktopPicker.types.js +0 -15
- package/dist/DesktopPicker/index.css +0 -39
- package/dist/DesktopPicker/index.d.ts +0 -2
- package/dist/DesktopPicker/index.js +0 -41
- package/dist/DesktopPicker/utils/calcAfterMounted.d.ts +0 -2
- package/dist/DesktopPicker/utils/calcAfterMounted.miniapp.d.ts +0 -2
- package/dist/DesktopPicker/utils/calcAfterMounted.miniapp.js +0 -38
- package/dist/DesktopTimePicker/DesktopTimePicker.d.ts +0 -5
- package/dist/DesktopTimePicker/DesktopTimePicker.js +0 -288
- package/dist/DesktopTimePicker/DesktopTimePicker.types.d.ts +0 -182
- package/dist/DesktopTimePicker/DesktopTimePicker.types.js +0 -15
- package/dist/DesktopTimePicker/DesktopTimePickerList.d.ts +0 -4
- package/dist/DesktopTimePicker/DesktopTimePickerList.js +0 -111
- package/dist/DesktopTimePicker/index.css +0 -170
- package/dist/DesktopTimePicker/index.d.ts +0 -2
- package/dist/DesktopTimePicker/index.js +0 -41
- package/dist/DesktopTimePicker/useGetTimePickerContent.d.ts +0 -6
- package/dist/DesktopTimePicker/useGetTimePickerContent.js +0 -249
- package/dist/DesktopTimePicker/utils/scrollUtil.d.ts +0 -2
- package/dist/DesktopTimePicker/utils/scrollUtil.js +0 -27
- package/dist/DesktopTimePicker/utils/scrollUtil.miniapp.d.ts +0 -2
- package/dist/DesktopTimePicker/utils/scrollUtil.miniapp.js +0 -51
- package/dist/DesktopTimePicker/utils/utils.d.ts +0 -28
- package/dist/DesktopTimePicker/utils/utils.js +0 -408
- package/dist/ItemSelector/miniapp.css +0 -4
- package/dist/NavBar/NavBar.css +0 -61
- package/dist/Progress/Progress.css +0 -24
- package/dist/Slider/Slider.css +0 -106
- package/dist/SwipeAction/SwipeAction.css +0 -79
- package/dist/SwipeAction/SwipeAction.d.ts +0 -5
- package/dist/SwipeAction/SwipeAction.js +0 -349
- package/dist/SwipeAction/SwipeAction.types.d.ts +0 -75
- package/dist/SwipeAction/SwipeAction.types.js +0 -15
- package/dist/SwipeAction/SwipeActionContext.d.ts +0 -4
- package/dist/SwipeAction/SwipeActionContext.js +0 -30
- package/dist/SwipeAction/SwipeActionItem.css +0 -31
- package/dist/SwipeAction/SwipeActionItem.d.ts +0 -5
- package/dist/SwipeAction/SwipeActionItem.js +0 -105
- package/dist/SwipeAction/constants.d.ts +0 -9
- package/dist/SwipeAction/constants.js +0 -39
- package/dist/SwipeAction/index.d.ts +0 -5
- package/dist/SwipeAction/index.js +0 -50
- package/dist/Tabs/utils/scroll.d.ts +0 -2
- package/dist/Tabs/utils/scroll.js +0 -55
- package/dist/TextArea/TextArea.css +0 -53
- package/dist/Toast/Toast.css +0 -53
- package/dist/Tooltip/Tooltip.css +0 -91
- package/es/Breadcrumb/Breadcrumb.css +0 -34
- package/es/CitySelector/miniapp.css +0 -4
- package/es/Collapse/Collapse.miniapp.d.ts +0 -5
- package/es/Collapse/Collapse.miniapp.js +0 -157
- package/es/DatePicker/DatePicker.d.ts +0 -4
- package/es/DatePicker/DatePicker.js +0 -308
- package/es/DatePicker/DatePicker.types.d.ts +0 -36
- package/es/DatePicker/DatePicker.types.js +0 -1
- package/es/DatePicker/constants.d.ts +0 -9
- package/es/DatePicker/constants.js +0 -14
- package/es/DatePicker/index.d.ts +0 -3
- package/es/DatePicker/index.js +0 -8
- package/es/DesktopDatePicker/DesktopDatePicker.d.ts +0 -5
- package/es/DesktopDatePicker/DesktopDatePicker.js +0 -253
- package/es/DesktopDatePicker/DesktopDatePicker.types.d.ts +0 -163
- package/es/DesktopDatePicker/DesktopDatePicker.types.js +0 -1
- package/es/DesktopDatePicker/deskTopPickerContainer.css +0 -100
- package/es/DesktopDatePicker/index.css +0 -61
- package/es/DesktopDatePicker/index.d.ts +0 -2
- package/es/DesktopDatePicker/index.js +0 -6
- package/es/DesktopDatePicker/useGetDatePickerContent.d.ts +0 -6
- package/es/DesktopDatePicker/useGetDatePickerContent.js +0 -316
- package/es/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +0 -5
- package/es/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -295
- package/es/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +0 -163
- package/es/DesktopDateTimePicker/DesktopDateTimePicker.types.js +0 -1
- package/es/DesktopDateTimePicker/index.css +0 -66
- package/es/DesktopDateTimePicker/index.d.ts +0 -2
- package/es/DesktopDateTimePicker/index.js +0 -9
- package/es/DesktopPicker/DesktopPicker.d.ts +0 -5
- package/es/DesktopPicker/DesktopPicker.js +0 -226
- package/es/DesktopPicker/DesktopPicker.types.d.ts +0 -61
- package/es/DesktopPicker/DesktopPicker.types.js +0 -1
- package/es/DesktopPicker/index.css +0 -39
- package/es/DesktopPicker/index.d.ts +0 -2
- package/es/DesktopPicker/index.js +0 -6
- package/es/DesktopPicker/utils/calcAfterMounted.d.ts +0 -2
- package/es/DesktopPicker/utils/calcAfterMounted.js +0 -6
- package/es/DesktopPicker/utils/calcAfterMounted.miniapp.d.ts +0 -2
- package/es/DesktopPicker/utils/calcAfterMounted.miniapp.js +0 -9
- package/es/DesktopTimePicker/DesktopTimePicker.d.ts +0 -5
- package/es/DesktopTimePicker/DesktopTimePicker.js +0 -261
- package/es/DesktopTimePicker/DesktopTimePicker.types.d.ts +0 -182
- package/es/DesktopTimePicker/DesktopTimePicker.types.js +0 -1
- package/es/DesktopTimePicker/DesktopTimePickerList.d.ts +0 -4
- package/es/DesktopTimePicker/DesktopTimePickerList.js +0 -84
- package/es/DesktopTimePicker/index.css +0 -170
- package/es/DesktopTimePicker/index.d.ts +0 -2
- package/es/DesktopTimePicker/index.js +0 -6
- package/es/DesktopTimePicker/useGetTimePickerContent.d.ts +0 -6
- package/es/DesktopTimePicker/useGetTimePickerContent.js +0 -226
- package/es/DesktopTimePicker/utils/scrollUtil.d.ts +0 -2
- package/es/DesktopTimePicker/utils/scrollUtil.js +0 -8
- package/es/DesktopTimePicker/utils/scrollUtil.miniapp.d.ts +0 -2
- package/es/DesktopTimePicker/utils/scrollUtil.miniapp.js +0 -22
- package/es/DesktopTimePicker/utils/utils.d.ts +0 -28
- package/es/DesktopTimePicker/utils/utils.js +0 -365
- package/es/ItemSelector/miniapp.css +0 -4
- package/es/NavBar/NavBar.css +0 -61
- package/es/Progress/Progress.css +0 -24
- package/es/Slider/Slider.css +0 -106
- package/es/SwipeAction/SwipeAction.css +0 -79
- package/es/SwipeAction/SwipeAction.d.ts +0 -5
- package/es/SwipeAction/SwipeAction.js +0 -334
- package/es/SwipeAction/SwipeAction.types.d.ts +0 -75
- package/es/SwipeAction/SwipeAction.types.js +0 -1
- package/es/SwipeAction/SwipeActionContext.d.ts +0 -4
- package/es/SwipeAction/SwipeActionContext.js +0 -11
- package/es/SwipeAction/SwipeActionItem.css +0 -31
- package/es/SwipeAction/SwipeActionItem.d.ts +0 -5
- package/es/SwipeAction/SwipeActionItem.js +0 -78
- package/es/SwipeAction/constants.d.ts +0 -9
- package/es/SwipeAction/constants.js +0 -15
- package/es/SwipeAction/index.d.ts +0 -5
- package/es/SwipeAction/index.js +0 -12
- package/es/Tabs/utils/scroll.d.ts +0 -2
- package/es/Tabs/utils/scroll.js +0 -36
- package/es/TextArea/TextArea.css +0 -53
- package/es/Toast/Toast.css +0 -53
- package/es/Tooltip/Tooltip.css +0 -91
- /package/dist/ItemSelector/{ItemSelector.css → index.css} +0 -0
- /package/dist/Modal/{Modal.css → index.css} +0 -0
- /package/dist/ScrollView/{ScrollView.css → index.css} +0 -0
- /package/dist/Stack/{Stack.css → index.css} +0 -0
- /package/es/ItemSelector/{ItemSelector.css → index.css} +0 -0
- /package/es/Modal/{Modal.css → index.css} +0 -0
- /package/es/ScrollView/{ScrollView.css → index.css} +0 -0
- /package/es/Stack/{Stack.css → index.css} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ThemeProps, MountResponsiveTokenOptions, BuiltInThemesTokenOptions } from '../ThemeProvider.types';
|
|
2
2
|
/**
|
|
3
3
|
* 挂载响应式自定义Tokens
|
|
4
|
-
*
|
|
4
|
+
* 将自定义Tokens挂载在rootSelector.defaultLight下,其他主题下可自定义额外Toekns复写响应式Tokens
|
|
5
5
|
*/
|
|
6
6
|
export declare const mountResponsiveTokens: (options: MountResponsiveTokenOptions) => void;
|
|
7
7
|
/**
|
|
@@ -10,17 +10,17 @@ export declare const mountResponsiveTokens: (options: MountResponsiveTokenOption
|
|
|
10
10
|
* 1. 默认高亮模式(defaultLightToken 复写 default-light.less)
|
|
11
11
|
* 2. 默认暗黑模式(defaultDarkToken 复写 default-dark.less)
|
|
12
12
|
* 3. 大麦高亮模式(dmLightToken 复写 dm-light.less)
|
|
13
|
-
* 4.
|
|
13
|
+
* 4. 先锋版高亮模式(pioneerLightToken 复写 pioneer-light.less)
|
|
14
14
|
*/
|
|
15
15
|
export declare const overrideBuiltInThemes: (tokenOptions: BuiltInThemesTokenOptions) => void;
|
|
16
16
|
/**
|
|
17
17
|
* 挂载Design Tokens
|
|
18
18
|
* Tokens的优先级:
|
|
19
19
|
* 1. 通常情况:组件的Tokens > 响应式Tokens > BUI内置Tokens(挂载顺序控制)
|
|
20
|
-
* 2. 暗黑模式:组件的Tokens > BUI
|
|
20
|
+
* 2. 暗黑模式:组件的Tokens > BUI内置的暗黑模式Tokens > 响应式Tokens (选择器权重控制)
|
|
21
21
|
*
|
|
22
22
|
* - 挂载顺序决定BUI内置Tokens(暗黑模式除外)和响应式Tokens的优先级
|
|
23
23
|
* - 选择器权重决定暗黑模式的Tokens和响应式Tokens的优先级
|
|
24
|
-
* - 命名规则决定组件的Tokens(如:--bui-
|
|
24
|
+
* - 命名规则决定组件的Tokens(如:--bui-btn-xxx)
|
|
25
25
|
*/
|
|
26
26
|
export declare const mountTokens: (tokenOptions?: ThemeProps) => void;
|
|
@@ -29,7 +29,7 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
-
import { render, unmount,
|
|
32
|
+
import { render, unmount, getRootElement } from "@bifrostui/utils";
|
|
33
33
|
import React, { useCallback, useEffect, useState } from "react";
|
|
34
34
|
import ToastView from "./Toast";
|
|
35
35
|
let toastCloses = [];
|
|
@@ -70,21 +70,10 @@ const functionalToast = (props) => {
|
|
|
70
70
|
rootWrapper.style[property] = styles[property];
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
-
const rootElement =
|
|
73
|
+
const rootElement = getRootElement();
|
|
74
74
|
rootElement.appendChild(rootWrapper);
|
|
75
75
|
const ToastComponent = () => {
|
|
76
|
-
const _a = options, {
|
|
77
|
-
duration,
|
|
78
|
-
allowMultiple,
|
|
79
|
-
onClose,
|
|
80
|
-
container: container
|
|
81
|
-
} = _a, others = __objRest(_a, [
|
|
82
|
-
"duration",
|
|
83
|
-
"allowMultiple",
|
|
84
|
-
"onClose",
|
|
85
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
86
|
-
"container"
|
|
87
|
-
]);
|
|
76
|
+
const _a = options, { duration, allowMultiple, onClose } = _a, others = __objRest(_a, ["duration", "allowMultiple", "onClose"]);
|
|
88
77
|
const [open, setOpen] = useState(false);
|
|
89
78
|
let timer;
|
|
90
79
|
const fadeTimeout = {
|
package/es/Toast/Toast.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ToastProps, ToastRef } from './Toast.types';
|
|
3
|
-
import './
|
|
3
|
+
import './index.less';
|
|
4
4
|
declare const ToastComponent: React.ForwardRefExoticComponent<ToastProps & React.RefAttributes<ToastRef>>;
|
|
5
5
|
export default ToastComponent;
|
package/es/Toast/Toast.js
CHANGED
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
} from "@bifrostui/icons";
|
|
40
40
|
import Fade from "../Fade";
|
|
41
41
|
import { useTheme } from "../ThemeProvider";
|
|
42
|
-
import "./
|
|
42
|
+
import "./index.css";
|
|
43
43
|
const prefixCls = "bui-toast";
|
|
44
44
|
const ToastComponent = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
45
45
|
const _a = props, {
|
|
@@ -68,10 +68,10 @@ const ToastComponent = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
68
68
|
return { theme: themeConfig };
|
|
69
69
|
}, []);
|
|
70
70
|
const iconMap = {
|
|
71
|
-
fail: /* @__PURE__ */ React.createElement(ErrorCircleFilledBoldIcon, { htmlColor: "
|
|
72
|
-
loading: /* @__PURE__ */ React.createElement(AccessTimeCircleFilledBoldIcon, { htmlColor: "
|
|
73
|
-
warning: /* @__PURE__ */ React.createElement(AlertCircleFilledBoldIcon, { htmlColor: "
|
|
74
|
-
success: /* @__PURE__ */ React.createElement(SuccessCircleFilledBoldIcon, { htmlColor: "
|
|
71
|
+
fail: /* @__PURE__ */ React.createElement(ErrorCircleFilledBoldIcon, { htmlColor: "var(--bui-color-white)" }),
|
|
72
|
+
loading: /* @__PURE__ */ React.createElement(AccessTimeCircleFilledBoldIcon, { htmlColor: "var(--bui-color-white)" }),
|
|
73
|
+
warning: /* @__PURE__ */ React.createElement(AlertCircleFilledBoldIcon, { htmlColor: "var(--bui-color-white)" }),
|
|
74
|
+
success: /* @__PURE__ */ React.createElement(SuccessCircleFilledBoldIcon, { htmlColor: "var(--bui-color-white)" })
|
|
75
75
|
};
|
|
76
76
|
const iconDom = iconMap[type] || icon;
|
|
77
77
|
return /* @__PURE__ */ React.createElement(Fade, __spreadProps(__spreadValues({}, others), { in: open, appear: false, unmountOnExit: true }), /* @__PURE__ */ React.createElement(
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
:root,
|
|
2
|
+
page,
|
|
3
|
+
xhs-page {
|
|
4
|
+
--bui-toast-min-width: 86px;
|
|
5
|
+
--bui-toast-max-width: 80%;
|
|
6
|
+
--bui-toast-text-align: center;
|
|
7
|
+
--bui-toast-flex-direction: column;
|
|
8
|
+
--bui-toast-padding: var(--bui-spacing-xl);
|
|
9
|
+
--bui-toast-position-top: 15%;
|
|
10
|
+
--bui-toast-position-bottom: 85%;
|
|
11
|
+
--bui-toast-bg-color: rgba(0, 0, 0, 0.8);
|
|
12
|
+
--bui-toast-border-radius: var(--bui-shape-radius-default);
|
|
13
|
+
--bui-toast-icon-margin: 0 0 8px;
|
|
14
|
+
--bui-toast-icon-font-size: 30px;
|
|
15
|
+
}
|
|
16
|
+
.bui-toast {
|
|
17
|
+
position: fixed;
|
|
18
|
+
left: 50%;
|
|
19
|
+
z-index: var(--bui-z-index-toast);
|
|
20
|
+
width: fit-content;
|
|
21
|
+
min-width: var(--bui-toast-min-width);
|
|
22
|
+
max-width: var(--bui-toast-max-width);
|
|
23
|
+
padding: var(--bui-toast-padding);
|
|
24
|
+
font-size: var(--bui-text-size-1);
|
|
25
|
+
color: var(--bui-color-white);
|
|
26
|
+
border-radius: var(--bui-toast-border-radius);
|
|
27
|
+
word-break: break-all;
|
|
28
|
+
white-space: pre-wrap;
|
|
29
|
+
background-color: var(--bui-toast-bg-color);
|
|
30
|
+
text-align: var(--bui-toast-text-align);
|
|
31
|
+
font-family: var(--bui-font-family);
|
|
32
|
+
}
|
|
33
|
+
.bui-toast.bui-toast-allow-click {
|
|
34
|
+
position: fixed;
|
|
35
|
+
right: unset;
|
|
36
|
+
bottom: unset;
|
|
37
|
+
}
|
|
38
|
+
.bui-toast-center {
|
|
39
|
+
top: 50%;
|
|
40
|
+
transform: translate(-50%, -50%);
|
|
41
|
+
}
|
|
42
|
+
.bui-toast-top {
|
|
43
|
+
top: var(--bui-toast-position-top);
|
|
44
|
+
transform: translate(-50%, calc(-1 * var(--bui-toast-position-top)));
|
|
45
|
+
}
|
|
46
|
+
.bui-toast-bottom {
|
|
47
|
+
top: var(--bui-toast-position-bottom);
|
|
48
|
+
transform: translate(-50%, calc(-1 * var(--bui-toast-position-bottom)));
|
|
49
|
+
}
|
|
50
|
+
.bui-toast-icon {
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: var(--bui-toast-flex-direction);
|
|
53
|
+
align-items: center;
|
|
54
|
+
}
|
|
55
|
+
.bui-toast-icon .bui-svg-icon {
|
|
56
|
+
margin: var(--bui-toast-icon-margin);
|
|
57
|
+
font-size: var(--bui-toast-icon-font-size);
|
|
58
|
+
}
|
package/es/Tooltip/Tooltip.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TooltipProps } from './Tooltip.types';
|
|
3
|
-
import './
|
|
3
|
+
import './index.less';
|
|
4
4
|
declare const Tooltip: React.ForwardRefExoticComponent<Omit<TooltipProps<"div", {}>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
5
5
|
export default Tooltip;
|
package/es/Tooltip/Tooltip.js
CHANGED
|
@@ -26,38 +26,17 @@ var __objRest = (source, exclude) => {
|
|
|
26
26
|
}
|
|
27
27
|
return target;
|
|
28
28
|
};
|
|
29
|
-
var __async = (__this, __arguments, generator) => {
|
|
30
|
-
return new Promise((resolve, reject) => {
|
|
31
|
-
var fulfilled = (value) => {
|
|
32
|
-
try {
|
|
33
|
-
step(generator.next(value));
|
|
34
|
-
} catch (e) {
|
|
35
|
-
reject(e);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var rejected = (value) => {
|
|
39
|
-
try {
|
|
40
|
-
step(generator.throw(value));
|
|
41
|
-
} catch (e) {
|
|
42
|
-
reject(e);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
46
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
29
|
import clsx from "clsx";
|
|
50
30
|
import React, { useState, useRef, useEffect } from "react";
|
|
51
31
|
import {
|
|
52
32
|
getStylesAndLocation,
|
|
53
33
|
triggerEventTransform,
|
|
54
34
|
parsePlacement,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
isMini
|
|
35
|
+
useUniqueId,
|
|
36
|
+
throttle
|
|
58
37
|
} from "@bifrostui/utils";
|
|
59
38
|
import Portal from "../Portal";
|
|
60
|
-
import "./
|
|
39
|
+
import "./index.css";
|
|
61
40
|
const prefixCls = "bui-tooltip";
|
|
62
41
|
const Tooltip = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
63
42
|
const _a = props, {
|
|
@@ -69,8 +48,8 @@ const Tooltip = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
69
48
|
offsetSpacing = 0,
|
|
70
49
|
placement = "top",
|
|
71
50
|
trigger = "click",
|
|
72
|
-
|
|
73
|
-
|
|
51
|
+
onOpenChange,
|
|
52
|
+
open
|
|
74
53
|
} = _a, others = __objRest(_a, [
|
|
75
54
|
"className",
|
|
76
55
|
"style",
|
|
@@ -80,8 +59,8 @@ const Tooltip = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
80
59
|
"offsetSpacing",
|
|
81
60
|
"placement",
|
|
82
61
|
"trigger",
|
|
83
|
-
"
|
|
84
|
-
"
|
|
62
|
+
"onOpenChange",
|
|
63
|
+
"open"
|
|
85
64
|
]);
|
|
86
65
|
const controlByUser = typeof open !== "undefined";
|
|
87
66
|
const { direction, location = "center" } = parsePlacement(placement);
|
|
@@ -89,18 +68,11 @@ const Tooltip = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
89
68
|
const [openStatus, setOpenStatus] = useState(defaultOpen);
|
|
90
69
|
const [arrowDirection, setArrowDirection] = useState(direction);
|
|
91
70
|
const [arrowLocation, setArrowLocation] = useState(location);
|
|
92
|
-
const [
|
|
93
|
-
const
|
|
94
|
-
const nodeRef = useForkRef(ref, tipRef);
|
|
95
|
-
const clearRef = (status) => {
|
|
96
|
-
if (status === false) {
|
|
97
|
-
tipRef.current = null;
|
|
98
|
-
}
|
|
99
|
-
};
|
|
71
|
+
const [tooltyles, setTooltyles] = useState({});
|
|
72
|
+
const ttId = useUniqueId();
|
|
100
73
|
const changeOpenStatus = (event, status) => {
|
|
101
74
|
if (controlByUser)
|
|
102
75
|
return;
|
|
103
|
-
clearRef(status);
|
|
104
76
|
setOpenStatus(status);
|
|
105
77
|
onOpenChange == null ? void 0 : onOpenChange(event, { open: status });
|
|
106
78
|
};
|
|
@@ -119,33 +91,23 @@ const Tooltip = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
119
91
|
if (!controlByUser)
|
|
120
92
|
return;
|
|
121
93
|
setOpenStatus(open);
|
|
122
|
-
clearRef(open);
|
|
123
94
|
}, [open]);
|
|
124
|
-
useEffect(() => {
|
|
125
|
-
if (!openStatus) {
|
|
126
|
-
setToolStyles({
|
|
127
|
-
visibility: "hidden"
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
}, [openStatus]);
|
|
131
95
|
const clickEventHandler = (event) => {
|
|
132
96
|
if (trigger === "hover" || (trigger == null ? void 0 : trigger.length) === 1 && (trigger == null ? void 0 : trigger[0]) === "hover")
|
|
133
97
|
return;
|
|
134
98
|
hideTooltip(event);
|
|
135
99
|
};
|
|
136
|
-
const onRootElementMouted = throttle(() =>
|
|
137
|
-
if (!tipRef.current)
|
|
138
|
-
return;
|
|
100
|
+
const onRootElementMouted = throttle(() => {
|
|
139
101
|
const {
|
|
140
102
|
direction: newParsedDirection,
|
|
141
103
|
location: newParsedLocation = "center"
|
|
142
104
|
} = parsePlacement(placement);
|
|
143
|
-
const result =
|
|
105
|
+
const result = getStylesAndLocation({
|
|
144
106
|
childrenRef,
|
|
145
107
|
arrowDirection: newParsedDirection,
|
|
146
108
|
arrowLocation: newParsedLocation,
|
|
147
109
|
offsetSpacing,
|
|
148
|
-
|
|
110
|
+
selector: `[data-id="tt_${ttId}"]`
|
|
149
111
|
});
|
|
150
112
|
if (!result)
|
|
151
113
|
return;
|
|
@@ -156,32 +118,26 @@ const Tooltip = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
156
118
|
if (newArrowLocation !== arrowLocation) {
|
|
157
119
|
setArrowLocation(newArrowLocation);
|
|
158
120
|
}
|
|
159
|
-
|
|
160
|
-
}
|
|
121
|
+
setTooltyles(styles);
|
|
122
|
+
}, 100);
|
|
123
|
+
const bindEvent = () => {
|
|
124
|
+
if (!controlByUser) {
|
|
125
|
+
document.addEventListener("click", clickEventHandler);
|
|
126
|
+
}
|
|
127
|
+
window.addEventListener("resize", onRootElementMouted);
|
|
128
|
+
};
|
|
129
|
+
const unbindEvent = () => {
|
|
130
|
+
if (!controlByUser) {
|
|
131
|
+
document.removeEventListener("click", clickEventHandler);
|
|
132
|
+
}
|
|
133
|
+
window.removeEventListener("resize", onRootElementMouted);
|
|
134
|
+
};
|
|
161
135
|
useEffect(() => {
|
|
162
|
-
const bindEvent = () => {
|
|
163
|
-
if (!openStatus)
|
|
164
|
-
return;
|
|
165
|
-
if (!controlByUser) {
|
|
166
|
-
document.addEventListener("click", clickEventHandler);
|
|
167
|
-
}
|
|
168
|
-
if (!isMini) {
|
|
169
|
-
window.addEventListener("resize", onRootElementMouted);
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
const unbindEvent = () => {
|
|
173
|
-
if (!controlByUser) {
|
|
174
|
-
document.removeEventListener("click", clickEventHandler);
|
|
175
|
-
}
|
|
176
|
-
if (!isMini) {
|
|
177
|
-
window.removeEventListener("resize", onRootElementMouted);
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
136
|
bindEvent();
|
|
181
137
|
return () => {
|
|
182
138
|
unbindEvent();
|
|
183
139
|
};
|
|
184
|
-
}, [
|
|
140
|
+
}, []);
|
|
185
141
|
let triggerEventOption;
|
|
186
142
|
if (!controlByUser) {
|
|
187
143
|
triggerEventOption = triggerEventTransform({
|
|
@@ -194,12 +150,12 @@ const Tooltip = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
194
150
|
const childrenOptions = __spreadValues({
|
|
195
151
|
ref: childrenRef
|
|
196
152
|
}, triggerEventOption);
|
|
197
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, (open || openStatus) && title ? /* @__PURE__ */ React.createElement(Portal, { onRootElementMouted }, /* @__PURE__ */ React.createElement(
|
|
153
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, (open || openStatus) && title ? /* @__PURE__ */ React.createElement(Portal, { onRootElementMouted, ref }, /* @__PURE__ */ React.createElement(
|
|
198
154
|
"div",
|
|
199
155
|
__spreadValues({
|
|
200
156
|
className: clsx(prefixCls, className, `tooltip-${arrowDirection}`),
|
|
201
|
-
style: __spreadValues(__spreadValues({}, style),
|
|
202
|
-
|
|
157
|
+
style: __spreadValues(__spreadValues({}, style), tooltyles),
|
|
158
|
+
"data-id": `tt_${ttId}`
|
|
203
159
|
}, others),
|
|
204
160
|
/* @__PURE__ */ React.createElement(
|
|
205
161
|
"div",
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
:root,
|
|
2
|
+
page,
|
|
3
|
+
xhs-page {
|
|
4
|
+
--bui-tooltip-arrow-size: 8PX;
|
|
5
|
+
--bui-tooltip-location-position: 8PX;
|
|
6
|
+
--bui-tooltip-max-width: 350px;
|
|
7
|
+
--bui-tooltip-content-min-width: 30px;
|
|
8
|
+
--bui-tooltip-content-min-height: 32px;
|
|
9
|
+
--bui-tooltip-content-padding: 6px 8px;
|
|
10
|
+
}
|
|
11
|
+
.bui-tooltip {
|
|
12
|
+
max-width: var(--bui-tooltip-max-width);
|
|
13
|
+
font-size: var(--bui-text-size-1);
|
|
14
|
+
position: absolute;
|
|
15
|
+
visibility: hidden;
|
|
16
|
+
z-index: var(--bui-z-index-tooltip);
|
|
17
|
+
}
|
|
18
|
+
.bui-tooltip .bui-tooltip-arrow {
|
|
19
|
+
width: 0;
|
|
20
|
+
height: 0;
|
|
21
|
+
position: absolute;
|
|
22
|
+
}
|
|
23
|
+
.bui-tooltip .bui-tooltip-arrow.location-left {
|
|
24
|
+
left: var(--bui-tooltip-location-position);
|
|
25
|
+
}
|
|
26
|
+
.bui-tooltip .bui-tooltip-arrow.location-right {
|
|
27
|
+
right: var(--bui-tooltip-location-position);
|
|
28
|
+
}
|
|
29
|
+
.bui-tooltip .bui-tooltip-arrow.location-top {
|
|
30
|
+
top: var(--bui-tooltip-location-position);
|
|
31
|
+
}
|
|
32
|
+
.bui-tooltip .bui-tooltip-arrow.location-bottom {
|
|
33
|
+
bottom: var(--bui-tooltip-location-position);
|
|
34
|
+
}
|
|
35
|
+
.bui-tooltip.tooltip-top .location-center,
|
|
36
|
+
.bui-tooltip.tooltip-bottom .location-center {
|
|
37
|
+
left: 50%;
|
|
38
|
+
transform: translateX(-50%);
|
|
39
|
+
}
|
|
40
|
+
.bui-tooltip.tooltip-left .location-center,
|
|
41
|
+
.bui-tooltip.tooltip-right .location-center {
|
|
42
|
+
top: 50%;
|
|
43
|
+
transform: translateY(-50%);
|
|
44
|
+
}
|
|
45
|
+
.bui-tooltip.tooltip-top {
|
|
46
|
+
padding-bottom: var(--bui-tooltip-arrow-size);
|
|
47
|
+
}
|
|
48
|
+
.bui-tooltip.tooltip-top .bui-tooltip-arrow {
|
|
49
|
+
border-left: var(--bui-tooltip-arrow-size) solid transparent;
|
|
50
|
+
border-right: var(--bui-tooltip-arrow-size) solid transparent;
|
|
51
|
+
border-top: var(--bui-tooltip-arrow-size) solid var(--bui-color-bg-alpha-dark-7);
|
|
52
|
+
bottom: 0;
|
|
53
|
+
}
|
|
54
|
+
.bui-tooltip.tooltip-bottom {
|
|
55
|
+
padding-top: var(--bui-tooltip-arrow-size);
|
|
56
|
+
}
|
|
57
|
+
.bui-tooltip.tooltip-bottom .bui-tooltip-arrow {
|
|
58
|
+
border-left: var(--bui-tooltip-arrow-size) solid transparent;
|
|
59
|
+
border-right: var(--bui-tooltip-arrow-size) solid transparent;
|
|
60
|
+
border-bottom: var(--bui-tooltip-arrow-size) solid var(--bui-color-bg-alpha-dark-7);
|
|
61
|
+
top: 0;
|
|
62
|
+
}
|
|
63
|
+
.bui-tooltip.tooltip-left {
|
|
64
|
+
padding-right: var(--bui-tooltip-arrow-size);
|
|
65
|
+
}
|
|
66
|
+
.bui-tooltip.tooltip-left .bui-tooltip-arrow {
|
|
67
|
+
border-top: var(--bui-tooltip-arrow-size) solid transparent;
|
|
68
|
+
border-bottom: var(--bui-tooltip-arrow-size) solid transparent;
|
|
69
|
+
border-left: var(--bui-tooltip-arrow-size) solid var(--bui-color-bg-alpha-dark-7);
|
|
70
|
+
right: 0;
|
|
71
|
+
}
|
|
72
|
+
.bui-tooltip.tooltip-right {
|
|
73
|
+
padding-left: var(--bui-tooltip-arrow-size);
|
|
74
|
+
}
|
|
75
|
+
.bui-tooltip.tooltip-right .bui-tooltip-arrow {
|
|
76
|
+
border-top: var(--bui-tooltip-arrow-size) solid transparent;
|
|
77
|
+
border-bottom: var(--bui-tooltip-arrow-size) solid transparent;
|
|
78
|
+
border-right: var(--bui-tooltip-arrow-size) solid var(--bui-color-bg-alpha-dark-7);
|
|
79
|
+
left: 0;
|
|
80
|
+
}
|
|
81
|
+
.bui-tooltip .bui-tooltip-content {
|
|
82
|
+
min-width: var(--bui-tooltip-content-min-width);
|
|
83
|
+
min-height: var(--bui-tooltip-content-min-height);
|
|
84
|
+
padding: var(--bui-tooltip-content-padding);
|
|
85
|
+
color: var(--bui-color-white);
|
|
86
|
+
text-align: left;
|
|
87
|
+
text-decoration: none;
|
|
88
|
+
word-wrap: break-word;
|
|
89
|
+
background-color: var(--bui-color-bg-alpha-dark-7);
|
|
90
|
+
border-radius: var(--bui-shape-radius-poster);
|
|
91
|
+
box-shadow:
|
|
92
|
+
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
93
|
+
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
94
|
+
0 9px 28px 8px rgba(0, 0, 0, 0.05);
|
|
95
|
+
}
|
|
@@ -59,8 +59,8 @@ const TransitionCore = forwardRef(
|
|
|
59
59
|
children,
|
|
60
60
|
mountOnEnter,
|
|
61
61
|
unmountOnExit,
|
|
62
|
-
enter,
|
|
63
|
-
exit,
|
|
62
|
+
enter = true,
|
|
63
|
+
exit = true,
|
|
64
64
|
timeout: _timeout,
|
|
65
65
|
delay: _delay,
|
|
66
66
|
onEnter,
|
|
@@ -69,7 +69,7 @@ const TransitionCore = forwardRef(
|
|
|
69
69
|
onExit,
|
|
70
70
|
onExiting,
|
|
71
71
|
onExited,
|
|
72
|
-
nextTick
|
|
72
|
+
nextTick = setTimeout
|
|
73
73
|
} = _a, childProps = __objRest(_a, [
|
|
74
74
|
"appear",
|
|
75
75
|
"in",
|
|
@@ -224,11 +224,6 @@ const TransitionCore = forwardRef(
|
|
|
224
224
|
}
|
|
225
225
|
);
|
|
226
226
|
TransitionCore.displayName = "BuiTransitionCore";
|
|
227
|
-
TransitionCore.defaultProps = {
|
|
228
|
-
enter: true,
|
|
229
|
-
exit: true,
|
|
230
|
-
nextTick: setTimeout
|
|
231
|
-
};
|
|
232
227
|
var TransitionCore_default = TransitionCore;
|
|
233
228
|
export {
|
|
234
229
|
TransitionCore_default as default
|
package/es/index.d.ts
CHANGED
|
@@ -8,11 +8,6 @@ export * from './Calendar';
|
|
|
8
8
|
export * from './Card';
|
|
9
9
|
export * from './Checkbox';
|
|
10
10
|
export * from './Collapse';
|
|
11
|
-
export * from './DatePicker';
|
|
12
|
-
export * from './DesktopDatePicker';
|
|
13
|
-
export * from './DesktopTimePicker';
|
|
14
|
-
export * from './DesktopDateTimePicker';
|
|
15
|
-
export * from './DesktopPicker';
|
|
16
11
|
export * from './Divider';
|
|
17
12
|
export * from './Drawer';
|
|
18
13
|
export * from './Fade';
|
|
@@ -53,4 +48,3 @@ export * from './Toast';
|
|
|
53
48
|
export * from './Dialog';
|
|
54
49
|
export * from './ThemeProvider';
|
|
55
50
|
export * from './locales';
|
|
56
|
-
export * from './SwipeAction';
|
package/es/index.js
CHANGED
|
@@ -8,11 +8,6 @@ export * from "./Calendar";
|
|
|
8
8
|
export * from "./Card";
|
|
9
9
|
export * from "./Checkbox";
|
|
10
10
|
export * from "./Collapse";
|
|
11
|
-
export * from "./DatePicker";
|
|
12
|
-
export * from "./DesktopDatePicker";
|
|
13
|
-
export * from "./DesktopTimePicker";
|
|
14
|
-
export * from "./DesktopDateTimePicker";
|
|
15
|
-
export * from "./DesktopPicker";
|
|
16
11
|
export * from "./Divider";
|
|
17
12
|
export * from "./Drawer";
|
|
18
13
|
export * from "./Fade";
|
|
@@ -53,4 +48,3 @@ export * from "./Toast";
|
|
|
53
48
|
export * from "./Dialog";
|
|
54
49
|
export * from "./ThemeProvider";
|
|
55
50
|
export * from "./locales";
|
|
56
|
-
export * from "./SwipeAction";
|
package/es/locales/base.d.ts
CHANGED
|
@@ -37,15 +37,4 @@ export interface BaseLang {
|
|
|
37
37
|
currentType?: Record<string, string>;
|
|
38
38
|
hotCityType?: Record<string, string>;
|
|
39
39
|
};
|
|
40
|
-
desktopDatePicker?: {
|
|
41
|
-
month?: Record<number, string>;
|
|
42
|
-
};
|
|
43
|
-
datePicker?: {
|
|
44
|
-
year: string;
|
|
45
|
-
month: string;
|
|
46
|
-
day: string;
|
|
47
|
-
hour: string;
|
|
48
|
-
minute: string;
|
|
49
|
-
second: string;
|
|
50
|
-
};
|
|
51
40
|
}
|
package/es/locales/en-US.js
CHANGED
|
@@ -42,30 +42,6 @@ const enUS = {
|
|
|
42
42
|
title: "Hot",
|
|
43
43
|
code: "HOT"
|
|
44
44
|
}
|
|
45
|
-
},
|
|
46
|
-
desktopDatePicker: {
|
|
47
|
-
month: {
|
|
48
|
-
1: "Jan",
|
|
49
|
-
2: "Feb",
|
|
50
|
-
3: "Mar",
|
|
51
|
-
4: "Apr",
|
|
52
|
-
5: "May",
|
|
53
|
-
6: "Jun",
|
|
54
|
-
7: "Jul",
|
|
55
|
-
8: "Aug",
|
|
56
|
-
9: "Sep",
|
|
57
|
-
10: "Oct",
|
|
58
|
-
11: "Nov",
|
|
59
|
-
12: "Dec"
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
datePicker: {
|
|
63
|
-
year: "Year",
|
|
64
|
-
month: "Month",
|
|
65
|
-
day: "Day",
|
|
66
|
-
hour: "Hour",
|
|
67
|
-
minute: "Minute",
|
|
68
|
-
second: "Second"
|
|
69
45
|
}
|
|
70
46
|
};
|
|
71
47
|
var en_US_default = enUS;
|
package/es/locales/zh-CN.js
CHANGED
|
@@ -24,30 +24,6 @@ const zhCN = {
|
|
|
24
24
|
located: "\u5B9A\u4F4D",
|
|
25
25
|
current: "\u5F53\u524D",
|
|
26
26
|
hot: "\u70ED\u95E8"
|
|
27
|
-
},
|
|
28
|
-
desktopDatePicker: {
|
|
29
|
-
month: {
|
|
30
|
-
1: "1\u6708",
|
|
31
|
-
2: "2\u6708",
|
|
32
|
-
3: "3\u6708",
|
|
33
|
-
4: "4\u6708",
|
|
34
|
-
5: "5\u6708",
|
|
35
|
-
6: "6\u6708",
|
|
36
|
-
7: "7\u6708",
|
|
37
|
-
8: "8\u6708",
|
|
38
|
-
9: "9\u6708",
|
|
39
|
-
10: "10\u6708",
|
|
40
|
-
11: "11\u6708",
|
|
41
|
-
12: "12\u6708"
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
datePicker: {
|
|
45
|
-
year: "\u5E74",
|
|
46
|
-
month: "\u6708",
|
|
47
|
-
day: "\u65E5",
|
|
48
|
-
hour: "\u65F6",
|
|
49
|
-
minute: "\u5206",
|
|
50
|
-
second: "\u79D2"
|
|
51
27
|
}
|
|
52
28
|
};
|
|
53
29
|
var zh_CN_default = zhCN;
|
package/es/locales/zh-TW.js
CHANGED
|
@@ -24,30 +24,6 @@ const zhTW = {
|
|
|
24
24
|
located: "\u5B9A\u4F4D",
|
|
25
25
|
current: "\u76EE\u524D",
|
|
26
26
|
hot: "\u71B1\u9580"
|
|
27
|
-
},
|
|
28
|
-
desktopDatePicker: {
|
|
29
|
-
month: {
|
|
30
|
-
1: "1\u6708",
|
|
31
|
-
2: "2\u6708",
|
|
32
|
-
3: "3\u6708",
|
|
33
|
-
4: "4\u6708",
|
|
34
|
-
5: "5\u6708",
|
|
35
|
-
6: "6\u6708",
|
|
36
|
-
7: "7\u6708",
|
|
37
|
-
8: "8\u6708",
|
|
38
|
-
9: "9\u6708",
|
|
39
|
-
10: "10\u6708",
|
|
40
|
-
11: "11\u6708",
|
|
41
|
-
12: "12\u6708"
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
datePicker: {
|
|
45
|
-
year: "\u5E74",
|
|
46
|
-
month: "\u6708",
|
|
47
|
-
day: "\u65E5",
|
|
48
|
-
hour: "\u6642",
|
|
49
|
-
minute: "\u5206",
|
|
50
|
-
second: "\u79D2"
|
|
51
27
|
}
|
|
52
28
|
};
|
|
53
29
|
var zh_TW_default = zhTW;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bifrostui/react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.0",
|
|
4
4
|
"description": "React components for building mobile application",
|
|
5
5
|
"homepage": "http://bui.taopiaopiao.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,6 +10,14 @@
|
|
|
10
10
|
"directories": {
|
|
11
11
|
"test": "__tests__"
|
|
12
12
|
},
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"import": "./es/index.js",
|
|
16
|
+
"module": "./es/index.js",
|
|
17
|
+
"require": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./css/*": "./es/*/index.css"
|
|
20
|
+
},
|
|
13
21
|
"files": [
|
|
14
22
|
"dist",
|
|
15
23
|
"es",
|
|
@@ -30,13 +38,13 @@
|
|
|
30
38
|
"glob": "11.0.0"
|
|
31
39
|
},
|
|
32
40
|
"dependencies": {
|
|
33
|
-
"clsx": "^
|
|
41
|
+
"clsx": "^2.1.1",
|
|
34
42
|
"dayjs": "^1.11.7",
|
|
35
43
|
"swiper": "^8.1.5",
|
|
36
|
-
"@bifrostui/icons": "
|
|
37
|
-
"@bifrostui/types": "
|
|
38
|
-
"@bifrostui/utils": "
|
|
39
|
-
"@bifrostui/styles": "
|
|
44
|
+
"@bifrostui/icons": "2.0.0-alpha.0",
|
|
45
|
+
"@bifrostui/types": "2.0.0-alpha.0",
|
|
46
|
+
"@bifrostui/utils": "2.0.0-alpha.0",
|
|
47
|
+
"@bifrostui/styles": "2.0.0-alpha.0"
|
|
40
48
|
},
|
|
41
49
|
"peerDependencies": {
|
|
42
50
|
"@tarojs/components": "^3.0.0",
|