@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
package/es/Popover/Popover.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-popover";
|
|
62
41
|
const Popover = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
63
42
|
const _a = props, {
|
|
@@ -70,9 +49,9 @@ const Popover = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
70
49
|
offsetSpacing = 0,
|
|
71
50
|
placement = "top",
|
|
72
51
|
trigger = "click",
|
|
52
|
+
onOpenChange,
|
|
73
53
|
open,
|
|
74
|
-
hideArrow
|
|
75
|
-
onOpenChange
|
|
54
|
+
hideArrow
|
|
76
55
|
} = _a, others = __objRest(_a, [
|
|
77
56
|
"className",
|
|
78
57
|
"style",
|
|
@@ -83,9 +62,9 @@ const Popover = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
83
62
|
"offsetSpacing",
|
|
84
63
|
"placement",
|
|
85
64
|
"trigger",
|
|
65
|
+
"onOpenChange",
|
|
86
66
|
"open",
|
|
87
|
-
"hideArrow"
|
|
88
|
-
"onOpenChange"
|
|
67
|
+
"hideArrow"
|
|
89
68
|
]);
|
|
90
69
|
const controlByUser = typeof open !== "undefined";
|
|
91
70
|
const { direction, location = "center" } = parsePlacement(placement);
|
|
@@ -93,18 +72,11 @@ const Popover = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
93
72
|
const [openStatus, setOpenStatus] = useState(defaultOpen);
|
|
94
73
|
const [arrowDirection, setArrowDirection] = useState(direction);
|
|
95
74
|
const [arrowLocation, setArrowLocation] = useState(location);
|
|
96
|
-
const [
|
|
97
|
-
const
|
|
98
|
-
const nodeRef = useForkRef(ref, tipRef);
|
|
99
|
-
const clearRef = (status) => {
|
|
100
|
-
if (status === false) {
|
|
101
|
-
tipRef.current = null;
|
|
102
|
-
}
|
|
103
|
-
};
|
|
75
|
+
const [tooltyles, setTooltyles] = useState({});
|
|
76
|
+
const ttId = useUniqueId();
|
|
104
77
|
const changeOpenStatus = (event, status) => {
|
|
105
78
|
if (controlByUser)
|
|
106
79
|
return;
|
|
107
|
-
clearRef(status);
|
|
108
80
|
setOpenStatus(status);
|
|
109
81
|
onOpenChange == null ? void 0 : onOpenChange(event, { open: status });
|
|
110
82
|
};
|
|
@@ -123,33 +95,23 @@ const Popover = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
123
95
|
if (!controlByUser)
|
|
124
96
|
return;
|
|
125
97
|
setOpenStatus(open);
|
|
126
|
-
clearRef(open);
|
|
127
98
|
}, [open]);
|
|
128
|
-
useEffect(() => {
|
|
129
|
-
if (!openStatus) {
|
|
130
|
-
setToolStyles({
|
|
131
|
-
visibility: "hidden"
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
}, [openStatus]);
|
|
135
99
|
const clickEventHandler = (event) => {
|
|
136
100
|
if (trigger === "hover" || (trigger == null ? void 0 : trigger.length) === 1 && (trigger == null ? void 0 : trigger[0]) === "hover")
|
|
137
101
|
return;
|
|
138
102
|
hidePopover(event);
|
|
139
103
|
};
|
|
140
|
-
const onRootElementMouted = throttle(() =>
|
|
141
|
-
if (!tipRef.current)
|
|
142
|
-
return;
|
|
104
|
+
const onRootElementMouted = throttle(() => {
|
|
143
105
|
const {
|
|
144
106
|
direction: newParsedDirection,
|
|
145
107
|
location: newParsedLocation = "center"
|
|
146
108
|
} = parsePlacement(placement);
|
|
147
|
-
const result =
|
|
109
|
+
const result = getStylesAndLocation({
|
|
148
110
|
childrenRef,
|
|
149
111
|
arrowDirection: newParsedDirection,
|
|
150
112
|
arrowLocation: newParsedLocation,
|
|
151
113
|
offsetSpacing,
|
|
152
|
-
|
|
114
|
+
selector: `[data-id="tt_${ttId}"]`
|
|
153
115
|
});
|
|
154
116
|
if (!result)
|
|
155
117
|
return;
|
|
@@ -160,32 +122,26 @@ const Popover = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
160
122
|
if (newArrowLocation !== arrowLocation) {
|
|
161
123
|
setArrowLocation(newArrowLocation);
|
|
162
124
|
}
|
|
163
|
-
|
|
164
|
-
}
|
|
125
|
+
setTooltyles(styles);
|
|
126
|
+
}, 100);
|
|
127
|
+
const bindEvent = () => {
|
|
128
|
+
if (!controlByUser) {
|
|
129
|
+
document.addEventListener("click", clickEventHandler);
|
|
130
|
+
}
|
|
131
|
+
window.addEventListener("resize", onRootElementMouted);
|
|
132
|
+
};
|
|
133
|
+
const unbindEvent = () => {
|
|
134
|
+
if (!controlByUser) {
|
|
135
|
+
document.removeEventListener("click", clickEventHandler);
|
|
136
|
+
}
|
|
137
|
+
window.removeEventListener("resize", onRootElementMouted);
|
|
138
|
+
};
|
|
165
139
|
useEffect(() => {
|
|
166
|
-
const bindEvent = () => {
|
|
167
|
-
if (!tipRef.current)
|
|
168
|
-
return;
|
|
169
|
-
if (!controlByUser) {
|
|
170
|
-
document.addEventListener("click", clickEventHandler);
|
|
171
|
-
}
|
|
172
|
-
if (!isMini) {
|
|
173
|
-
window.addEventListener("resize", onRootElementMouted);
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
const unbindEvent = () => {
|
|
177
|
-
if (!controlByUser) {
|
|
178
|
-
document.removeEventListener("click", clickEventHandler);
|
|
179
|
-
}
|
|
180
|
-
if (!isMini) {
|
|
181
|
-
window.removeEventListener("resize", onRootElementMouted);
|
|
182
|
-
}
|
|
183
|
-
};
|
|
184
140
|
bindEvent();
|
|
185
141
|
return () => {
|
|
186
142
|
unbindEvent();
|
|
187
143
|
};
|
|
188
|
-
}, [
|
|
144
|
+
}, []);
|
|
189
145
|
if (!title && !content)
|
|
190
146
|
return null;
|
|
191
147
|
let triggerEventOption;
|
|
@@ -200,14 +156,14 @@ const Popover = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
200
156
|
const childrenOptions = __spreadValues({
|
|
201
157
|
ref: childrenRef
|
|
202
158
|
}, triggerEventOption);
|
|
203
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, open || openStatus ? /* @__PURE__ */ React.createElement(Portal, { onRootElementMouted }, /* @__PURE__ */ React.createElement(
|
|
159
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, open || openStatus ? /* @__PURE__ */ React.createElement(Portal, { onRootElementMouted, ref }, /* @__PURE__ */ React.createElement(
|
|
204
160
|
"div",
|
|
205
161
|
__spreadValues({
|
|
206
162
|
className: clsx(prefixCls, className, `popover-${arrowDirection}`, {
|
|
207
163
|
"bui-popover-arrow-hide": hideArrow
|
|
208
164
|
}),
|
|
209
|
-
|
|
210
|
-
|
|
165
|
+
"data-id": `tt_${ttId}`,
|
|
166
|
+
style: __spreadValues(__spreadValues({}, style), tooltyles)
|
|
211
167
|
}, others),
|
|
212
168
|
!hideArrow ? /* @__PURE__ */ React.createElement(
|
|
213
169
|
"div",
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
:root,
|
|
2
|
+
page,
|
|
3
|
+
xhs-page {
|
|
4
|
+
--bui-popover-arrow-size: 8PX;
|
|
5
|
+
--bui-popover-location-position: 8PX;
|
|
6
|
+
--bui-popover-max-width: 350px;
|
|
7
|
+
--bui-popover-content-min-width: 30px;
|
|
8
|
+
--bui-popover-content-padding: 6px 8px;
|
|
9
|
+
}
|
|
1
10
|
.bui-popover {
|
|
2
|
-
|
|
3
|
-
--localtion-position: var(--bui-popover-localtion-position, 8PX);
|
|
4
|
-
--max-width: var(--bui-popover-max-width, 350px);
|
|
5
|
-
--content-min-width: var(--bui-popover-content-min-width, 30px);
|
|
6
|
-
--content-padding: var(--bui-popover-content-padding, 6px 8px);
|
|
7
|
-
max-width: var(--max-width);
|
|
11
|
+
max-width: var(--bui-popover-max-width);
|
|
8
12
|
font-size: var(--bui-text-size-1);
|
|
9
13
|
position: absolute;
|
|
10
14
|
visibility: hidden;
|
|
@@ -16,16 +20,16 @@
|
|
|
16
20
|
position: absolute;
|
|
17
21
|
}
|
|
18
22
|
.bui-popover .bui-popover-arrow.location-left {
|
|
19
|
-
left: var(--
|
|
23
|
+
left: var(--bui-popover-location-position);
|
|
20
24
|
}
|
|
21
25
|
.bui-popover .bui-popover-arrow.location-right {
|
|
22
|
-
right: var(--
|
|
26
|
+
right: var(--bui-popover-location-position);
|
|
23
27
|
}
|
|
24
28
|
.bui-popover .bui-popover-arrow.location-top {
|
|
25
|
-
top: var(--
|
|
29
|
+
top: var(--bui-popover-location-position);
|
|
26
30
|
}
|
|
27
31
|
.bui-popover .bui-popover-arrow.location-bottom {
|
|
28
|
-
bottom: var(--
|
|
32
|
+
bottom: var(--bui-popover-location-position);
|
|
29
33
|
}
|
|
30
34
|
.bui-popover.popover-top .location-center,
|
|
31
35
|
.bui-popover.popover-bottom .location-center {
|
|
@@ -38,48 +42,48 @@
|
|
|
38
42
|
transform: translateY(-50%);
|
|
39
43
|
}
|
|
40
44
|
.bui-popover.popover-top {
|
|
41
|
-
padding-bottom: var(--arrow-size);
|
|
45
|
+
padding-bottom: var(--bui-popover-arrow-size);
|
|
42
46
|
}
|
|
43
47
|
.bui-popover.popover-top .bui-popover-arrow {
|
|
44
|
-
border-left: var(--arrow-size) solid transparent;
|
|
45
|
-
border-right: var(--arrow-size) solid transparent;
|
|
46
|
-
border-top: var(--arrow-size) solid var(--bui-color-bg-view);
|
|
48
|
+
border-left: var(--bui-popover-arrow-size) solid transparent;
|
|
49
|
+
border-right: var(--bui-popover-arrow-size) solid transparent;
|
|
50
|
+
border-top: var(--bui-popover-arrow-size) solid var(--bui-color-bg-view);
|
|
47
51
|
bottom: 0;
|
|
48
52
|
}
|
|
49
53
|
.bui-popover.popover-bottom {
|
|
50
|
-
padding-top: var(--arrow-size);
|
|
54
|
+
padding-top: var(--bui-popover-arrow-size);
|
|
51
55
|
}
|
|
52
56
|
.bui-popover.popover-bottom .bui-popover-arrow {
|
|
53
|
-
border-left: var(--arrow-size) solid transparent;
|
|
54
|
-
border-right: var(--arrow-size) solid transparent;
|
|
55
|
-
border-bottom: var(--arrow-size) solid var(--bui-color-bg-view);
|
|
57
|
+
border-left: var(--bui-popover-arrow-size) solid transparent;
|
|
58
|
+
border-right: var(--bui-popover-arrow-size) solid transparent;
|
|
59
|
+
border-bottom: var(--bui-popover-arrow-size) solid var(--bui-color-bg-view);
|
|
56
60
|
top: 0;
|
|
57
61
|
}
|
|
58
62
|
.bui-popover.popover-left {
|
|
59
|
-
padding-right: var(--arrow-size);
|
|
63
|
+
padding-right: var(--bui-popover-arrow-size);
|
|
60
64
|
}
|
|
61
65
|
.bui-popover.popover-left .bui-popover-arrow {
|
|
62
|
-
border-top: var(--arrow-size) solid transparent;
|
|
63
|
-
border-bottom: var(--arrow-size) solid transparent;
|
|
64
|
-
border-left: var(--arrow-size) solid var(--bui-color-bg-view);
|
|
66
|
+
border-top: var(--bui-popover-arrow-size) solid transparent;
|
|
67
|
+
border-bottom: var(--bui-popover-arrow-size) solid transparent;
|
|
68
|
+
border-left: var(--bui-popover-arrow-size) solid var(--bui-color-bg-view);
|
|
65
69
|
right: 0;
|
|
66
70
|
}
|
|
67
71
|
.bui-popover.popover-right {
|
|
68
|
-
padding-left: var(--arrow-size);
|
|
72
|
+
padding-left: var(--bui-popover-arrow-size);
|
|
69
73
|
}
|
|
70
74
|
.bui-popover.popover-right .bui-popover-arrow {
|
|
71
|
-
border-top: var(--arrow-size) solid transparent;
|
|
72
|
-
border-bottom: var(--arrow-size) solid transparent;
|
|
73
|
-
border-right: var(--arrow-size) solid var(--bui-color-bg-view);
|
|
75
|
+
border-top: var(--bui-popover-arrow-size) solid transparent;
|
|
76
|
+
border-bottom: var(--bui-popover-arrow-size) solid transparent;
|
|
77
|
+
border-right: var(--bui-popover-arrow-size) solid var(--bui-color-bg-view);
|
|
74
78
|
left: 0;
|
|
75
79
|
}
|
|
76
80
|
.bui-popover .bui-popover-title {
|
|
77
81
|
font-weight: var(--bui-font-weight-bold);
|
|
78
82
|
}
|
|
79
83
|
.bui-popover .bui-popover-content {
|
|
80
|
-
min-width: var(--content-min-width);
|
|
84
|
+
min-width: var(--bui-popover-content-min-width);
|
|
81
85
|
color: var(--bui-color-fg-muted);
|
|
82
|
-
padding: var(--content-padding);
|
|
86
|
+
padding: var(--bui-popover-content-padding);
|
|
83
87
|
text-align: left;
|
|
84
88
|
text-decoration: none;
|
|
85
89
|
word-wrap: break-word;
|
|
@@ -18,13 +18,11 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import Taro from "@tarojs/taro";
|
|
21
|
-
import React, { forwardRef,
|
|
21
|
+
import React, { forwardRef, useMemo } from "react";
|
|
22
22
|
import PortalCore from "./PortalCore";
|
|
23
23
|
const Portal = forwardRef((props, ref) => {
|
|
24
24
|
const { disablePortal } = props;
|
|
25
|
-
const
|
|
26
|
-
useEffect(() => {
|
|
27
|
-
let root;
|
|
25
|
+
const rootWrapperElement = useMemo(() => {
|
|
28
26
|
if (!disablePortal) {
|
|
29
27
|
const currentPages = Taro.getCurrentPages() || [];
|
|
30
28
|
const currentPage = currentPages[currentPages.length - 1];
|
|
@@ -36,12 +34,11 @@ const Portal = forwardRef((props, ref) => {
|
|
|
36
34
|
const view = document.createElement("view");
|
|
37
35
|
view.id = portalId;
|
|
38
36
|
rootElement == null ? void 0 : rootElement.appendChild(view);
|
|
39
|
-
|
|
40
|
-
} else {
|
|
41
|
-
root = portalWrapperElement;
|
|
37
|
+
return view;
|
|
42
38
|
}
|
|
39
|
+
return portalWrapperElement;
|
|
43
40
|
}
|
|
44
|
-
|
|
41
|
+
return void 0;
|
|
45
42
|
}, []);
|
|
46
43
|
return /* @__PURE__ */ React.createElement(PortalCore, __spreadProps(__spreadValues({}, props), { ref, rootElement: rootWrapperElement }));
|
|
47
44
|
});
|
package/es/Progress/Progress.js
CHANGED
|
@@ -28,7 +28,7 @@ var __objRest = (source, exclude) => {
|
|
|
28
28
|
};
|
|
29
29
|
import clsx from "clsx";
|
|
30
30
|
import React from "react";
|
|
31
|
-
import "./
|
|
31
|
+
import "./index.css";
|
|
32
32
|
const prefixCls = "bui-progress";
|
|
33
33
|
function validProgress(progress) {
|
|
34
34
|
if (!progress || progress < 0) {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
:root,
|
|
2
|
+
page,
|
|
3
|
+
xhs-page {
|
|
4
|
+
--bui-progress-fill-color: var(--bui-color-primary);
|
|
5
|
+
--bui-progress-trail-color: rgba(156, 156, 165, 0.2);
|
|
6
|
+
--bui-progress-stroke-width: 8px;
|
|
7
|
+
--bui-progress-width: 100%;
|
|
8
|
+
--bui-progress-border-radius: 100px;
|
|
9
|
+
}
|
|
10
|
+
.bui-progress {
|
|
11
|
+
width: var(--bui-progress-width);
|
|
12
|
+
font-family: var(--bui-font-family);
|
|
13
|
+
}
|
|
14
|
+
.bui-progress-inner {
|
|
15
|
+
position: relative;
|
|
16
|
+
display: inline-block;
|
|
17
|
+
width: var(--bui-progress-width);
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
vertical-align: middle;
|
|
20
|
+
background-color: var(--bui-progress-trail-color);
|
|
21
|
+
border-radius: var(--bui-progress-border-radius);
|
|
22
|
+
}
|
|
23
|
+
.bui-progress-bg {
|
|
24
|
+
position: relative;
|
|
25
|
+
border-radius: var(--bui-progress-border-radius);
|
|
26
|
+
background-color: var(--bui-progress-fill-color);
|
|
27
|
+
height: var(--bui-progress-stroke-width);
|
|
28
|
+
}
|
package/es/Radio/Radio.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RadioProps } from './Radio.types';
|
|
3
|
-
import './
|
|
3
|
+
import './index.less';
|
|
4
4
|
declare const Radio: React.ForwardRefExoticComponent<Omit<RadioProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default Radio;
|
package/es/Radio/Radio.js
CHANGED
|
@@ -34,12 +34,12 @@ import clsx from "clsx";
|
|
|
34
34
|
import React, { forwardRef, useContext } from "react";
|
|
35
35
|
import RadioButtonIcon from "./RadioButtonIcon";
|
|
36
36
|
import RadioContext from "./RadioContext";
|
|
37
|
-
import "./
|
|
37
|
+
import "./index.css";
|
|
38
38
|
const prefixCls = "bui-radio";
|
|
39
39
|
const Radio = forwardRef((props, ref) => {
|
|
40
40
|
const _a = props, {
|
|
41
41
|
className,
|
|
42
|
-
defaultChecked,
|
|
42
|
+
defaultChecked = false,
|
|
43
43
|
checked,
|
|
44
44
|
inputProps,
|
|
45
45
|
inputRef,
|
|
@@ -48,7 +48,7 @@ const Radio = forwardRef((props, ref) => {
|
|
|
48
48
|
disabled,
|
|
49
49
|
icon,
|
|
50
50
|
checkedIcon,
|
|
51
|
-
labelPlacement,
|
|
51
|
+
labelPlacement = "right",
|
|
52
52
|
onChange,
|
|
53
53
|
children
|
|
54
54
|
} = _a, others = __objRest(_a, [
|
|
@@ -147,10 +147,6 @@ const Radio = forwardRef((props, ref) => {
|
|
|
147
147
|
);
|
|
148
148
|
});
|
|
149
149
|
Radio.displayName = "BuiRadio";
|
|
150
|
-
Radio.defaultProps = {
|
|
151
|
-
defaultChecked: false,
|
|
152
|
-
labelPlacement: "right"
|
|
153
|
-
};
|
|
154
150
|
var Radio_default = Radio;
|
|
155
151
|
export {
|
|
156
152
|
Radio_default as default
|
|
@@ -6,7 +6,12 @@ import clsx from "clsx";
|
|
|
6
6
|
import React from "react";
|
|
7
7
|
const prefixCls = "bui-radio-btn-icon";
|
|
8
8
|
function RadioButtonIcon(props) {
|
|
9
|
-
const {
|
|
9
|
+
const {
|
|
10
|
+
checked,
|
|
11
|
+
size = "medium",
|
|
12
|
+
color,
|
|
13
|
+
htmlColor = "var(--bui-color-fg-subtle)"
|
|
14
|
+
} = props;
|
|
10
15
|
return /* @__PURE__ */ React.createElement(
|
|
11
16
|
"span",
|
|
12
17
|
{
|
package/es/Radio/RadioGroup.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import './Radio.less';
|
|
3
2
|
import { RadioGroupProps } from './Radio.types';
|
|
3
|
+
import './index.less';
|
|
4
4
|
declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default RadioGroup;
|
package/es/Radio/RadioGroup.js
CHANGED
|
@@ -29,8 +29,8 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
import { useValue } from "@bifrostui/utils";
|
|
30
30
|
import clsx from "clsx";
|
|
31
31
|
import React, { forwardRef } from "react";
|
|
32
|
-
import "./Radio.css";
|
|
33
32
|
import { RadioContextProvider } from "./RadioContext";
|
|
33
|
+
import "./index.css";
|
|
34
34
|
const prefixCls = "bui-radio-group";
|
|
35
35
|
const RadioGroup = forwardRef((props, ref) => {
|
|
36
36
|
const _a = props, {
|
|
@@ -70,9 +70,6 @@ const RadioGroup = forwardRef((props, ref) => {
|
|
|
70
70
|
);
|
|
71
71
|
});
|
|
72
72
|
RadioGroup.displayName = "BuiRadioGroup";
|
|
73
|
-
RadioGroup.defaultProps = {
|
|
74
|
-
disabled: false
|
|
75
|
-
};
|
|
76
73
|
var RadioGroup_default = RadioGroup;
|
|
77
74
|
export {
|
|
78
75
|
RadioGroup_default as default
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
:root,
|
|
2
|
+
page,
|
|
3
|
+
xhs-page {
|
|
4
|
+
--bui-radio-label-color: var(--bui-color-fg-default);
|
|
5
|
+
--bui-radio-label-font-size: var(--bui-text-size-1);
|
|
6
|
+
--bui-radio-icon-padding: 5px;
|
|
7
|
+
}
|
|
1
8
|
.bui-radio {
|
|
2
|
-
--label-color: var(--bui-radio-label-color, var(--bui-color-fg-default));
|
|
3
|
-
--label-font-size: var(--bui-radio-label-font-size, var(--bui-text-size-1));
|
|
4
|
-
--icon-font-size: var(--bui-radio-icon-font-size, var(--bui-title-size-2));
|
|
5
|
-
--icon-padding: var(--bui-radio-icon-padding, 5px);
|
|
6
9
|
display: inline-flex;
|
|
7
10
|
align-items: center;
|
|
8
11
|
position: relative;
|
|
@@ -36,12 +39,12 @@
|
|
|
36
39
|
align-items: center;
|
|
37
40
|
justify-content: center;
|
|
38
41
|
flex-shrink: 0;
|
|
39
|
-
padding: var(--icon-padding);
|
|
42
|
+
padding: var(--bui-radio-icon-padding);
|
|
40
43
|
box-sizing: border-box;
|
|
41
44
|
}
|
|
42
45
|
.bui-radio-label {
|
|
43
|
-
font-size: var(--label-font-size);
|
|
44
|
-
color: var(--label-color);
|
|
46
|
+
font-size: var(--bui-radio-label-font-size);
|
|
47
|
+
color: var(--bui-radio-label-color);
|
|
45
48
|
}
|
|
46
49
|
.bui-radio-btn-icon {
|
|
47
50
|
position: relative;
|
package/es/Rating/Rating.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RatingProps } from './Rating.types';
|
|
3
|
-
import './
|
|
3
|
+
import './index.less';
|
|
4
4
|
declare const Rating: React.ForwardRefExoticComponent<Omit<RatingProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default Rating;
|
package/es/Rating/Rating.js
CHANGED
|
@@ -30,7 +30,7 @@ import { StarFilledIcon } from "@bifrostui/icons";
|
|
|
30
30
|
import { useValue } from "@bifrostui/utils";
|
|
31
31
|
import clsx from "clsx";
|
|
32
32
|
import React, { forwardRef } from "react";
|
|
33
|
-
import "./
|
|
33
|
+
import "./index.css";
|
|
34
34
|
const classes = {
|
|
35
35
|
root: "bui-rating",
|
|
36
36
|
item: "bui-rating-item",
|
|
@@ -39,18 +39,18 @@ const classes = {
|
|
|
39
39
|
const Rating = forwardRef((props, ref) => {
|
|
40
40
|
const _a = props, {
|
|
41
41
|
className,
|
|
42
|
-
size,
|
|
42
|
+
size = "medium",
|
|
43
43
|
defaultValue,
|
|
44
|
-
allowHalf,
|
|
45
|
-
icon,
|
|
46
|
-
checkedIcon,
|
|
47
|
-
count,
|
|
48
|
-
readOnly,
|
|
49
|
-
disabled,
|
|
44
|
+
allowHalf = false,
|
|
45
|
+
icon = /* @__PURE__ */ React.createElement(StarFilledIcon, { color: "disabled" }),
|
|
46
|
+
checkedIcon = /* @__PURE__ */ React.createElement(StarFilledIcon, { color: "warning" }),
|
|
47
|
+
count = 5,
|
|
48
|
+
readOnly = false,
|
|
49
|
+
disabled = false,
|
|
50
50
|
value,
|
|
51
51
|
onChange,
|
|
52
52
|
name,
|
|
53
|
-
disableClear
|
|
53
|
+
disableClear = false
|
|
54
54
|
} = _a, others = __objRest(_a, [
|
|
55
55
|
"className",
|
|
56
56
|
"size",
|
|
@@ -134,16 +134,6 @@ const Rating = forwardRef((props, ref) => {
|
|
|
134
134
|
);
|
|
135
135
|
});
|
|
136
136
|
Rating.displayName = "BuiRating";
|
|
137
|
-
Rating.defaultProps = {
|
|
138
|
-
size: "medium",
|
|
139
|
-
count: 5,
|
|
140
|
-
icon: /* @__PURE__ */ React.createElement(StarFilledIcon, { htmlColor: "#ced1d6" }),
|
|
141
|
-
checkedIcon: /* @__PURE__ */ React.createElement(StarFilledIcon, { color: "warning" }),
|
|
142
|
-
readOnly: false,
|
|
143
|
-
disabled: false,
|
|
144
|
-
allowHalf: false,
|
|
145
|
-
disableClear: false
|
|
146
|
-
};
|
|
147
137
|
var Rating_default = Rating;
|
|
148
138
|
export {
|
|
149
139
|
Rating_default as default
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
:root,
|
|
2
|
+
page,
|
|
3
|
+
xhs-page {
|
|
4
|
+
--bui-rating-xsmall-font-size: var(--bui-text-size-5);
|
|
5
|
+
--bui-rating-xsmall-margin-right: 0;
|
|
6
|
+
--bui-rating-small-margin-right: 0.5px;
|
|
7
|
+
--bui-rating-small-font-size: var(--bui-text-size-1);
|
|
8
|
+
--bui-rating-margin-right: 1px;
|
|
9
|
+
--bui-rating-font-size: var(--bui-title-size-3);
|
|
10
|
+
--bui-rating-large-margin-right: 2px;
|
|
11
|
+
--bui-rating-large-font-size: 22px;
|
|
12
|
+
}
|
|
1
13
|
.bui-rating {
|
|
2
14
|
--small-margin-right: var(--bui-rating-small-margin-right, 0.5px);
|
|
3
15
|
--medium-margin-right: var(--bui-rating-medium-margin-right, 1px);
|
|
@@ -19,19 +31,20 @@
|
|
|
19
31
|
margin-right: 0;
|
|
20
32
|
}
|
|
21
33
|
.bui-rating-container-xsmall {
|
|
22
|
-
font-size: var(--bui-
|
|
34
|
+
font-size: var(--bui-rating-xsmall-font-size);
|
|
35
|
+
margin-right: var(--bui-rating-xsmall-margin-right);
|
|
23
36
|
}
|
|
24
37
|
.bui-rating-container-small {
|
|
25
|
-
font-size: var(--bui-
|
|
26
|
-
margin-right: var(--small-margin-right);
|
|
38
|
+
font-size: var(--bui-rating-small-font-size);
|
|
39
|
+
margin-right: var(--bui-rating-small-margin-right);
|
|
27
40
|
}
|
|
28
41
|
.bui-rating-container-medium {
|
|
29
|
-
font-size: var(--bui-
|
|
30
|
-
margin-right: var(--
|
|
42
|
+
font-size: var(--bui-rating-font-size);
|
|
43
|
+
margin-right: var(--bui-rating-margin-right);
|
|
31
44
|
}
|
|
32
45
|
.bui-rating-container-large {
|
|
33
|
-
font-size: var(--large-font-size);
|
|
34
|
-
margin-right: var(--large-margin-right);
|
|
46
|
+
font-size: var(--bui-rating-large-font-size);
|
|
47
|
+
margin-right: var(--bui-rating-large-margin-right);
|
|
35
48
|
}
|
|
36
49
|
.bui-rating-item {
|
|
37
50
|
display: flex;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import './
|
|
2
|
+
import './index.less';
|
|
3
3
|
import { ScrollViewProps } from './ScrollView.types';
|
|
4
4
|
declare const ScrollView: React.ForwardRefExoticComponent<Omit<ScrollViewProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default ScrollView;
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { useForkRef } from "@bifrostui/utils";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import React, { forwardRef, useCallback, useEffect, useRef } from "react";
|
|
4
|
-
import "./
|
|
5
|
-
function easeOutScroll(from, to, callback
|
|
6
|
-
if (dur <= 0) {
|
|
7
|
-
dur = 500;
|
|
8
|
-
}
|
|
4
|
+
import "./index.css";
|
|
5
|
+
function easeOutScroll(from, to, callback) {
|
|
9
6
|
if (from === to || typeof from !== "number") {
|
|
10
7
|
return;
|
|
11
8
|
}
|
|
12
9
|
const change = to - from;
|
|
10
|
+
const dur = 500;
|
|
13
11
|
const sTime = +/* @__PURE__ */ new Date();
|
|
14
12
|
function linear(t, b, c, d) {
|
|
15
13
|
return c * t / d + b;
|
|
@@ -44,8 +42,7 @@ const ScrollView = forwardRef(
|
|
|
44
42
|
scrollIntoView,
|
|
45
43
|
onTouchMove: propsOnTouchMove,
|
|
46
44
|
scrollIntoViewAlignment,
|
|
47
|
-
children
|
|
48
|
-
scrollAnimationDuration = 500
|
|
45
|
+
children
|
|
49
46
|
} = props;
|
|
50
47
|
const container = useRef(null);
|
|
51
48
|
const handleRef = useForkRef(ref, container);
|
|
@@ -55,15 +52,10 @@ const ScrollView = forwardRef(
|
|
|
55
52
|
if (top === void 0)
|
|
56
53
|
return;
|
|
57
54
|
if (isAnimation) {
|
|
58
|
-
easeOutScroll(
|
|
59
|
-
container.current
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
if (container.current)
|
|
63
|
-
container.current.scrollTop = pos;
|
|
64
|
-
},
|
|
65
|
-
scrollAnimationDuration
|
|
66
|
-
);
|
|
55
|
+
easeOutScroll(container.current.scrollTop, top, (pos) => {
|
|
56
|
+
if (container.current)
|
|
57
|
+
container.current.scrollTop = pos;
|
|
58
|
+
});
|
|
67
59
|
} else if (container.current)
|
|
68
60
|
container.current.scrollTop = top;
|
|
69
61
|
}, []);
|
|
@@ -71,15 +63,10 @@ const ScrollView = forwardRef(
|
|
|
71
63
|
if (left === void 0)
|
|
72
64
|
return;
|
|
73
65
|
if (isAnimation) {
|
|
74
|
-
easeOutScroll(
|
|
75
|
-
container.current
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (container.current)
|
|
79
|
-
container.current.scrollLeft = pos;
|
|
80
|
-
},
|
|
81
|
-
scrollAnimationDuration
|
|
82
|
-
);
|
|
66
|
+
easeOutScroll(container.current.scrollLeft, left, (pos) => {
|
|
67
|
+
if (container.current)
|
|
68
|
+
container.current.scrollLeft = pos;
|
|
69
|
+
});
|
|
83
70
|
} else if (container.current)
|
|
84
71
|
container.current.scrollLeft = left;
|
|
85
72
|
}, []);
|