@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,322 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
-
var __objRest = (source, exclude) => {
|
|
25
|
-
var target = {};
|
|
26
|
-
for (var prop in source)
|
|
27
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
if (source != null && __getOwnPropSymbols)
|
|
30
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
31
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
32
|
-
target[prop] = source[prop];
|
|
33
|
-
}
|
|
34
|
-
return target;
|
|
35
|
-
};
|
|
36
|
-
var __export = (target, all) => {
|
|
37
|
-
for (var name in all)
|
|
38
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
39
|
-
};
|
|
40
|
-
var __copyProps = (to, from, except, desc) => {
|
|
41
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
42
|
-
for (let key of __getOwnPropNames(from))
|
|
43
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
44
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
45
|
-
}
|
|
46
|
-
return to;
|
|
47
|
-
};
|
|
48
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
49
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
50
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
51
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
52
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
53
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
54
|
-
mod
|
|
55
|
-
));
|
|
56
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
57
|
-
var DesktopDateTimePicker_exports = {};
|
|
58
|
-
__export(DesktopDateTimePicker_exports, {
|
|
59
|
-
default: () => DesktopDateTimePicker_default
|
|
60
|
-
});
|
|
61
|
-
module.exports = __toCommonJS(DesktopDateTimePicker_exports);
|
|
62
|
-
var import_icons = require("@bifrostui/icons");
|
|
63
|
-
var import_dayjs = __toESM(require("dayjs"));
|
|
64
|
-
var import_clsx = __toESM(require("clsx"));
|
|
65
|
-
var import_react = __toESM(require("react"));
|
|
66
|
-
var import_utils = require("@bifrostui/utils");
|
|
67
|
-
var import_DesktopPicker = __toESM(require("../DesktopPicker"));
|
|
68
|
-
var import_useGetDatePickerContent = __toESM(require("../DesktopDatePicker/useGetDatePickerContent"));
|
|
69
|
-
var import_useGetTimePickerContent = __toESM(require("../DesktopTimePicker/useGetTimePickerContent"));
|
|
70
|
-
var import_index = require("./index.css");
|
|
71
|
-
const prefixCls = "bui-datetime-picker";
|
|
72
|
-
const DesktopDateTimePicker = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
73
|
-
const _a = props, {
|
|
74
|
-
className,
|
|
75
|
-
inputRef,
|
|
76
|
-
inputProps,
|
|
77
|
-
value,
|
|
78
|
-
defaultValue,
|
|
79
|
-
disabled = false,
|
|
80
|
-
disableOpenPicker = false,
|
|
81
|
-
placeholder,
|
|
82
|
-
format = "YYYY/MM/DD HH:mm:ss",
|
|
83
|
-
open,
|
|
84
|
-
disabledDate,
|
|
85
|
-
views = ["year", "month", "day", "hour", "minute", "second"],
|
|
86
|
-
minDate = (0, import_dayjs.default)((0, import_dayjs.default)().format("YYYYMMDD")).subtract(10, "year").toDate(),
|
|
87
|
-
maxDate = (0, import_dayjs.default)((0, import_dayjs.default)().format("YYYYMMDD")).add(10, "year").toDate(),
|
|
88
|
-
icon,
|
|
89
|
-
headerBarLeftIcon,
|
|
90
|
-
headerBarRightIcon,
|
|
91
|
-
closeOnSelect = true,
|
|
92
|
-
onChange,
|
|
93
|
-
onClose,
|
|
94
|
-
onOpen,
|
|
95
|
-
monthRender,
|
|
96
|
-
yearRender,
|
|
97
|
-
onMonthChange,
|
|
98
|
-
onYearChange,
|
|
99
|
-
DesktopPickerProps,
|
|
100
|
-
CalendarProps
|
|
101
|
-
} = _a, others = __objRest(_a, [
|
|
102
|
-
"className",
|
|
103
|
-
"inputRef",
|
|
104
|
-
"inputProps",
|
|
105
|
-
"value",
|
|
106
|
-
"defaultValue",
|
|
107
|
-
"disabled",
|
|
108
|
-
"disableOpenPicker",
|
|
109
|
-
"placeholder",
|
|
110
|
-
"format",
|
|
111
|
-
"open",
|
|
112
|
-
"disabledDate",
|
|
113
|
-
"views",
|
|
114
|
-
"minDate",
|
|
115
|
-
"maxDate",
|
|
116
|
-
"icon",
|
|
117
|
-
"headerBarLeftIcon",
|
|
118
|
-
"headerBarRightIcon",
|
|
119
|
-
"closeOnSelect",
|
|
120
|
-
"onChange",
|
|
121
|
-
"onClose",
|
|
122
|
-
"onOpen",
|
|
123
|
-
"monthRender",
|
|
124
|
-
"yearRender",
|
|
125
|
-
"onMonthChange",
|
|
126
|
-
"onYearChange",
|
|
127
|
-
"DesktopPickerProps",
|
|
128
|
-
"CalendarProps"
|
|
129
|
-
]);
|
|
130
|
-
const [isOpen, setIsOpen] = (0, import_react.useState)(open);
|
|
131
|
-
const [isInvalid, setIsInvalid] = (0, import_react.useState)(false);
|
|
132
|
-
const getPicker = (0, import_react.useMemo)(() => {
|
|
133
|
-
if (views.includes("day")) {
|
|
134
|
-
return "day";
|
|
135
|
-
}
|
|
136
|
-
if (views.includes("month")) {
|
|
137
|
-
return "month";
|
|
138
|
-
}
|
|
139
|
-
if (views.includes("year")) {
|
|
140
|
-
return "year";
|
|
141
|
-
}
|
|
142
|
-
return "day";
|
|
143
|
-
}, [views]);
|
|
144
|
-
const [selectType, setSelectType] = (0, import_react.useState)(
|
|
145
|
-
getPicker
|
|
146
|
-
);
|
|
147
|
-
const [inputStr, setInputStr] = (0, import_react.useState)("");
|
|
148
|
-
const [useUserStr, setUseUserStr] = (0, import_react.useState)(false);
|
|
149
|
-
const [calendarValue, triggerChange] = (0, import_utils.useValue)({
|
|
150
|
-
value,
|
|
151
|
-
defaultValue,
|
|
152
|
-
onChange
|
|
153
|
-
});
|
|
154
|
-
const handleDatePickerIconClick = (e) => {
|
|
155
|
-
if (disabled || disableOpenPicker || open !== void 0)
|
|
156
|
-
return;
|
|
157
|
-
setIsOpen(!isOpen);
|
|
158
|
-
};
|
|
159
|
-
const handleDatePickerInputClick = (e) => {
|
|
160
|
-
e.stopPropagation();
|
|
161
|
-
if (inputProps == null ? void 0 : inputProps.readOnly) {
|
|
162
|
-
if (disabled || disableOpenPicker || open !== void 0)
|
|
163
|
-
return;
|
|
164
|
-
setIsOpen(!isOpen);
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
setIsOpen(false);
|
|
168
|
-
};
|
|
169
|
-
const { desktopDatePicker } = (0, import_useGetDatePickerContent.default)({
|
|
170
|
-
format,
|
|
171
|
-
minDate,
|
|
172
|
-
maxDate,
|
|
173
|
-
setIsOpen,
|
|
174
|
-
triggerChange,
|
|
175
|
-
disabledDate,
|
|
176
|
-
calendarValue,
|
|
177
|
-
setSelectType,
|
|
178
|
-
picker: getPicker,
|
|
179
|
-
selectType,
|
|
180
|
-
headerBarLeftIcon,
|
|
181
|
-
headerBarRightIcon,
|
|
182
|
-
CalendarProps,
|
|
183
|
-
onClose,
|
|
184
|
-
monthRender,
|
|
185
|
-
yearRender,
|
|
186
|
-
onMonthChange,
|
|
187
|
-
onYearChange,
|
|
188
|
-
closeOnSelect: false,
|
|
189
|
-
style: {
|
|
190
|
-
borderRadius: "3px 0px 0px 3px"
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
const { desktopTimePanel } = (0, import_useGetTimePickerContent.default)({
|
|
194
|
-
views: views.filter(
|
|
195
|
-
(item) => item !== "day" && item !== "month" && item !== "year"
|
|
196
|
-
),
|
|
197
|
-
minTime: (0, import_dayjs.default)(minDate),
|
|
198
|
-
maxTime: (0, import_dayjs.default)(maxDate),
|
|
199
|
-
setIsOpen,
|
|
200
|
-
triggerChange,
|
|
201
|
-
closeOnSelect,
|
|
202
|
-
timeValue: (0, import_dayjs.default)(calendarValue),
|
|
203
|
-
setIsInvalid
|
|
204
|
-
});
|
|
205
|
-
const onInputChange = (e) => {
|
|
206
|
-
e.stopPropagation();
|
|
207
|
-
const newValue = e.target.value;
|
|
208
|
-
if (newValue.length === 0) {
|
|
209
|
-
setInputStr("");
|
|
210
|
-
setUseUserStr(true);
|
|
211
|
-
triggerChange(e, null);
|
|
212
|
-
return;
|
|
213
|
-
}
|
|
214
|
-
if ((0, import_dayjs.default)(newValue, format, true).isValid()) {
|
|
215
|
-
setInputStr("");
|
|
216
|
-
setUseUserStr(false);
|
|
217
|
-
if (disabledDate == null ? void 0 : disabledDate((0, import_dayjs.default)(newValue).toDate())) {
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
if ((0, import_dayjs.default)(newValue).isAfter(maxDate)) {
|
|
221
|
-
triggerChange(e, maxDate);
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
|
-
if ((0, import_dayjs.default)(newValue).isBefore(minDate)) {
|
|
225
|
-
triggerChange(e, minDate);
|
|
226
|
-
return;
|
|
227
|
-
}
|
|
228
|
-
triggerChange(e, (0, import_dayjs.default)(e.target.value).toDate());
|
|
229
|
-
} else {
|
|
230
|
-
setUseUserStr(true);
|
|
231
|
-
setInputStr(e.target.value);
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
const onmount = () => {
|
|
235
|
-
onOpen == null ? void 0 : onOpen();
|
|
236
|
-
};
|
|
237
|
-
const unMounted = () => {
|
|
238
|
-
onClose == null ? void 0 : onClose();
|
|
239
|
-
setSelectType(getPicker);
|
|
240
|
-
};
|
|
241
|
-
const showPlaceholder = (0, import_react.useMemo)(() => {
|
|
242
|
-
if (placeholder) {
|
|
243
|
-
return placeholder;
|
|
244
|
-
}
|
|
245
|
-
return format;
|
|
246
|
-
}, [placeholder, format]);
|
|
247
|
-
const renderValue = (0, import_react.useMemo)(() => {
|
|
248
|
-
if (useUserStr) {
|
|
249
|
-
return inputStr;
|
|
250
|
-
}
|
|
251
|
-
if (calendarValue) {
|
|
252
|
-
return (0, import_dayjs.default)(calendarValue).format(format);
|
|
253
|
-
}
|
|
254
|
-
return "";
|
|
255
|
-
}, [calendarValue, inputStr, useUserStr, format]);
|
|
256
|
-
(0, import_react.useEffect)(() => {
|
|
257
|
-
setUseUserStr(false);
|
|
258
|
-
}, [calendarValue]);
|
|
259
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
260
|
-
"div",
|
|
261
|
-
__spreadProps(__spreadValues({}, others), {
|
|
262
|
-
className: (0, import_clsx.default)(prefixCls, className, {
|
|
263
|
-
[`${prefixCls}-disabled`]: disabled,
|
|
264
|
-
[`${prefixCls}-active`]: isOpen,
|
|
265
|
-
[`${prefixCls}-invalid`]: isInvalid
|
|
266
|
-
}),
|
|
267
|
-
ref
|
|
268
|
-
}),
|
|
269
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
270
|
-
import_DesktopPicker.default,
|
|
271
|
-
__spreadProps(__spreadValues({
|
|
272
|
-
open: open != null ? open : isOpen,
|
|
273
|
-
miniBackdropInvisible: open !== void 0,
|
|
274
|
-
onClose: (e, data) => {
|
|
275
|
-
setIsOpen(data == null ? void 0 : data.value);
|
|
276
|
-
},
|
|
277
|
-
onMount: onmount,
|
|
278
|
-
onUnmounted: unMounted,
|
|
279
|
-
content: /* @__PURE__ */ import_react.default.createElement(
|
|
280
|
-
"div",
|
|
281
|
-
{
|
|
282
|
-
className: `${prefixCls}-box`,
|
|
283
|
-
onClick: (e) => {
|
|
284
|
-
e.stopPropagation();
|
|
285
|
-
}
|
|
286
|
-
},
|
|
287
|
-
desktopDatePicker(),
|
|
288
|
-
desktopTimePanel()
|
|
289
|
-
)
|
|
290
|
-
}, DesktopPickerProps), {
|
|
291
|
-
inheritWidth: false
|
|
292
|
-
}),
|
|
293
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-container` }, /* @__PURE__ */ import_react.default.createElement(
|
|
294
|
-
"input",
|
|
295
|
-
__spreadProps(__spreadValues({}, inputProps), {
|
|
296
|
-
"aria-invalid": true,
|
|
297
|
-
autoComplete: "off",
|
|
298
|
-
placeholder: showPlaceholder,
|
|
299
|
-
type: "text",
|
|
300
|
-
inputMode: "text",
|
|
301
|
-
ref: inputRef,
|
|
302
|
-
className: (0, import_clsx.default)(`${prefixCls}-input`, {
|
|
303
|
-
[inputProps == null ? void 0 : inputProps.className]: inputProps == null ? void 0 : inputProps.className
|
|
304
|
-
}),
|
|
305
|
-
onBlur: () => setUseUserStr(false),
|
|
306
|
-
onClick: handleDatePickerInputClick,
|
|
307
|
-
onChange: onInputChange,
|
|
308
|
-
value: renderValue
|
|
309
|
-
})
|
|
310
|
-
), /* @__PURE__ */ import_react.default.createElement(
|
|
311
|
-
"div",
|
|
312
|
-
{
|
|
313
|
-
onClick: handleDatePickerIconClick,
|
|
314
|
-
className: `${prefixCls}-icon`
|
|
315
|
-
},
|
|
316
|
-
icon || /* @__PURE__ */ import_react.default.createElement(import_icons.DateOutlinedIcon, { htmlColor: "var(--bui-color-neutral-3)" })
|
|
317
|
-
))
|
|
318
|
-
)
|
|
319
|
-
);
|
|
320
|
-
});
|
|
321
|
-
DesktopDateTimePicker.displayName = "BUIDesktopDateTimePicker";
|
|
322
|
-
var DesktopDateTimePicker_default = DesktopDateTimePicker;
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import React, { Ref } from 'react';
|
|
2
|
-
import { OverrideProps } from '@bifrostui/types';
|
|
3
|
-
import { DesktopPickerProps } from '../DesktopPicker';
|
|
4
|
-
import { CalendarProps } from '../Calendar';
|
|
5
|
-
export type IDateTimePickerValue = Date | null;
|
|
6
|
-
export interface IDateTimePickerInstance {
|
|
7
|
-
/** 日期对象 */
|
|
8
|
-
day: Date;
|
|
9
|
-
/** 是否禁用 */
|
|
10
|
-
disabled: boolean;
|
|
11
|
-
}
|
|
12
|
-
export interface IDateTimePickerCustomIconProps {
|
|
13
|
-
/**
|
|
14
|
-
* 是否是最小时间
|
|
15
|
-
*/
|
|
16
|
-
isMinMonth?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* 是否是最大时间
|
|
19
|
-
*/
|
|
20
|
-
isMaxMonth?: boolean;
|
|
21
|
-
}
|
|
22
|
-
export interface IDateTimePickerCalendarProps {
|
|
23
|
-
/**
|
|
24
|
-
* 是否隐藏当前月之外的日期,默认为false
|
|
25
|
-
*/
|
|
26
|
-
hideDaysOutsideCurrentMonth?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* 高亮的日期,默认为today
|
|
29
|
-
* today 若选中的非当天,则当天高亮显示,若选中的是当天,则当天展示选中态
|
|
30
|
-
* weekend 可选的周末高亮显示
|
|
31
|
-
*/
|
|
32
|
-
highlightDate?: 'today' | 'weekend';
|
|
33
|
-
/**
|
|
34
|
-
* 自定义日期单元格的内容
|
|
35
|
-
*/
|
|
36
|
-
dateRender?: (currentDate: IDateTimePickerInstance) => React.ReactNode;
|
|
37
|
-
/**
|
|
38
|
-
* 自定义周单元格的内容
|
|
39
|
-
*/
|
|
40
|
-
weekRender?: (week: string) => React.ReactNode;
|
|
41
|
-
}
|
|
42
|
-
export type DateTimePickerProps<D extends React.ElementType = 'div', P = {}> = OverrideProps<{
|
|
43
|
-
props: P & {
|
|
44
|
-
/**
|
|
45
|
-
* 默认选中的值,当组件非受控时使用
|
|
46
|
-
*/
|
|
47
|
-
defaultValue?: IDateTimePickerValue;
|
|
48
|
-
/**
|
|
49
|
-
* 选中的值,当组件受控时使用
|
|
50
|
-
*/
|
|
51
|
-
value?: IDateTimePickerValue;
|
|
52
|
-
/**
|
|
53
|
-
* 输入框占位内容
|
|
54
|
-
*/
|
|
55
|
-
placeholder?: string;
|
|
56
|
-
/**
|
|
57
|
-
* 可选择的最小日期,默认为当前日期
|
|
58
|
-
* 渲染指定月时:value=null并指定minDate
|
|
59
|
-
*/
|
|
60
|
-
minDate?: Date;
|
|
61
|
-
/**
|
|
62
|
-
* 可选择的最大日期,默认为当前日期的一年后
|
|
63
|
-
*/
|
|
64
|
-
maxDate?: Date;
|
|
65
|
-
/**
|
|
66
|
-
* 弹层是否打开
|
|
67
|
-
*/
|
|
68
|
-
open?: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* 输入框icon
|
|
71
|
-
*/
|
|
72
|
-
icon?: React.ReactNode;
|
|
73
|
-
/**
|
|
74
|
-
* inputRef
|
|
75
|
-
*/
|
|
76
|
-
inputRef?: Ref<HTMLInputElement>;
|
|
77
|
-
/**
|
|
78
|
-
* inputProp
|
|
79
|
-
*/
|
|
80
|
-
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
81
|
-
/**
|
|
82
|
-
* 选择器类型
|
|
83
|
-
*/
|
|
84
|
-
views?: Array<'year' | 'month' | 'day' | 'hour' | 'minute' | 'second'>;
|
|
85
|
-
/**
|
|
86
|
-
* 头部操作栏左边图标
|
|
87
|
-
*/
|
|
88
|
-
headerBarLeftIcon?: (options: IDateTimePickerCustomIconProps) => React.ReactNode;
|
|
89
|
-
/**
|
|
90
|
-
* 头部操作栏右边图标
|
|
91
|
-
*/
|
|
92
|
-
headerBarRightIcon?: (options: IDateTimePickerCustomIconProps) => React.ReactNode;
|
|
93
|
-
/**
|
|
94
|
-
* 是否禁用日期选择器
|
|
95
|
-
*/
|
|
96
|
-
disabled?: boolean;
|
|
97
|
-
/**
|
|
98
|
-
* 不可选择的日期
|
|
99
|
-
*/
|
|
100
|
-
disabledDate?: (currentDate: Date) => boolean;
|
|
101
|
-
/**
|
|
102
|
-
* 自定义月份单元格的内容
|
|
103
|
-
*/
|
|
104
|
-
monthRender?: ({ month, currentDate, }: {
|
|
105
|
-
month: string | number;
|
|
106
|
-
currentDate: IDateTimePickerInstance;
|
|
107
|
-
}) => React.ReactNode;
|
|
108
|
-
/**
|
|
109
|
-
* 自定义年份单元格的内容
|
|
110
|
-
*/
|
|
111
|
-
yearRender?: ({ year, currentDate, }: {
|
|
112
|
-
year: string | number;
|
|
113
|
-
currentDate: IDateTimePickerInstance;
|
|
114
|
-
}) => React.ReactNode;
|
|
115
|
-
/**
|
|
116
|
-
* 日期发生变化的回调
|
|
117
|
-
*/
|
|
118
|
-
onChange?: (e: React.SyntheticEvent, data: {
|
|
119
|
-
value: IDateTimePickerValue;
|
|
120
|
-
}) => void;
|
|
121
|
-
/**
|
|
122
|
-
* 选择日期后是否立刻关闭
|
|
123
|
-
*/
|
|
124
|
-
closeOnSelect?: boolean;
|
|
125
|
-
/**
|
|
126
|
-
* 禁用弹层选择功能
|
|
127
|
-
*/
|
|
128
|
-
disableOpenPicker?: boolean;
|
|
129
|
-
/**
|
|
130
|
-
* 日期格式化
|
|
131
|
-
*/
|
|
132
|
-
format?: string;
|
|
133
|
-
/**
|
|
134
|
-
* 弹层关闭的回调
|
|
135
|
-
*/
|
|
136
|
-
onClose?: () => void;
|
|
137
|
-
/**
|
|
138
|
-
* 弹层打开的回调
|
|
139
|
-
*/
|
|
140
|
-
onOpen?: () => void;
|
|
141
|
-
/**
|
|
142
|
-
* 月份切换的回调
|
|
143
|
-
*/
|
|
144
|
-
onMonthChange?: (e: React.SyntheticEvent, data: {
|
|
145
|
-
value: Date;
|
|
146
|
-
}) => void;
|
|
147
|
-
/**
|
|
148
|
-
* 年份切换的回调
|
|
149
|
-
*/
|
|
150
|
-
onYearChange?: (e: React.SyntheticEvent, data: {
|
|
151
|
-
value: Date;
|
|
152
|
-
}) => void;
|
|
153
|
-
/**
|
|
154
|
-
* DesktopPickerProps
|
|
155
|
-
*/
|
|
156
|
-
DesktopPickerProps?: Omit<DesktopPickerProps, 'open'>;
|
|
157
|
-
/**
|
|
158
|
-
* CalendarProps
|
|
159
|
-
*/
|
|
160
|
-
CalendarProps?: CalendarProps;
|
|
161
|
-
};
|
|
162
|
-
defaultComponent: D;
|
|
163
|
-
}, D>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
}
|
|
11
|
-
return to;
|
|
12
|
-
};
|
|
13
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
-
var DesktopDateTimePicker_types_exports = {};
|
|
15
|
-
module.exports = __toCommonJS(DesktopDateTimePicker_types_exports);
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
:root,
|
|
2
|
-
page,
|
|
3
|
-
xhs-page {
|
|
4
|
-
--bui-datetime-picker-height: var(--bui-input-height, 32px);
|
|
5
|
-
--bui-datetime-picker-min-width: var(--bui-input-min-width, 100px);
|
|
6
|
-
--bui-datetime-picker-icon-size: var(--bui-title-size-3, 16px);
|
|
7
|
-
--bui-datetime-picker-font-size: var(--bui-title-size-3, 16px);
|
|
8
|
-
--bui-datetime-picker-container-padding: var(--bui-spacing-md, 9px);
|
|
9
|
-
--bui-datetime-picker-bg: var(--bui-color-bg-view);
|
|
10
|
-
--bui-datetime-picker-font-family: var(--bui-font-family);
|
|
11
|
-
--bui-datetime-picker-border: 1px solid var(--bui-color-border-default);
|
|
12
|
-
--bui-datetime-picker-shadow: 0 0 0 2px var(--bui-color-bg-default);
|
|
13
|
-
--bui-datetime-picker-disabled-color: var(--bui-color-fg-subtle);
|
|
14
|
-
}
|
|
15
|
-
.bui-datetime-picker {
|
|
16
|
-
position: relative;
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
height: var(--bui-datetime-picker-height);
|
|
19
|
-
min-width: 100px;
|
|
20
|
-
font-size: var(--bui-datetime-picker-font-size);
|
|
21
|
-
border-radius: 5px;
|
|
22
|
-
background-color: var(--bui-datetime-picker-bg);
|
|
23
|
-
font-family: var(--bui-datetime-picker-font-family);
|
|
24
|
-
box-sizing: border-box;
|
|
25
|
-
border: var(--bui-datetime-picker-border);
|
|
26
|
-
}
|
|
27
|
-
.bui-datetime-picker:active,
|
|
28
|
-
.bui-datetime-picker-active {
|
|
29
|
-
box-shadow: var(--bui-datetime-picker-shadow);
|
|
30
|
-
}
|
|
31
|
-
.bui-datetime-picker-invalid {
|
|
32
|
-
border: 1px solid var(--bui-color-danger);
|
|
33
|
-
}
|
|
34
|
-
.bui-datetime-picker-icon {
|
|
35
|
-
display: flex;
|
|
36
|
-
align-items: center;
|
|
37
|
-
font-size: var(--bui-datetime-picker-icon-size);
|
|
38
|
-
}
|
|
39
|
-
.bui-datetime-picker-container {
|
|
40
|
-
display: flex;
|
|
41
|
-
align-items: center;
|
|
42
|
-
padding: 0 10px;
|
|
43
|
-
height: 100%;
|
|
44
|
-
}
|
|
45
|
-
.bui-datetime-picker-input {
|
|
46
|
-
display: flex;
|
|
47
|
-
justify-content: space-between;
|
|
48
|
-
align-items: center;
|
|
49
|
-
flex: 1;
|
|
50
|
-
height: 100%;
|
|
51
|
-
background-color: transparent;
|
|
52
|
-
outline: none;
|
|
53
|
-
border: 0;
|
|
54
|
-
}
|
|
55
|
-
.bui-datetime-picker-box {
|
|
56
|
-
display: flex;
|
|
57
|
-
width: 420px;
|
|
58
|
-
}
|
|
59
|
-
.bui-datetime-picker.bui-datetime-picker-disabled {
|
|
60
|
-
pointer-events: none;
|
|
61
|
-
box-shadow: none;
|
|
62
|
-
background-color: rgba(188, 188, 188, 0.2);
|
|
63
|
-
}
|
|
64
|
-
.bui-datetime-picker.bui-datetime-picker-disabled input {
|
|
65
|
-
color: var(--bui-datetime-picker-disabled-color);
|
|
66
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var DesktopDateTimePicker_exports = {};
|
|
30
|
-
__export(DesktopDateTimePicker_exports, {
|
|
31
|
-
DesktopDateTimePicker: () => import_DesktopDateTimePicker.default,
|
|
32
|
-
default: () => import_DesktopDateTimePicker.default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(DesktopDateTimePicker_exports);
|
|
35
|
-
var import_DesktopDateTimePicker = __toESM(require("./DesktopDateTimePicker"));
|
|
36
|
-
__reExport(DesktopDateTimePicker_exports, require("./DesktopDateTimePicker.types"), module.exports);
|
|
37
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
38
|
-
0 && (module.exports = {
|
|
39
|
-
DesktopDateTimePicker,
|
|
40
|
-
...require("./DesktopDateTimePicker.types")
|
|
41
|
-
});
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { DesktopPickerProps } from './DesktopPicker.types';
|
|
3
|
-
import './index.less';
|
|
4
|
-
declare const DesktopPicker: React.ForwardRefExoticComponent<Omit<DesktopPickerProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
-
export default DesktopPicker;
|