@bifrostui/react 2.0.0-alpha.3 → 2.0.0-alpha.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/ActionSheet/ActionSheet.d.ts +1 -1
- package/dist/ActionSheet/ActionSheet.js +8 -8
- package/dist/ActionSheet/ActionSheet.types.d.ts +1 -1
- package/dist/ActionSheet/ActionSheetContext.d.ts +1 -1
- package/dist/ActionSheet/ActionSheetContext.js +2 -2
- package/dist/ActionSheet/ActionSheetItem.types.d.ts +1 -1
- package/dist/Alert/Alert.d.ts +1 -1
- package/dist/Alert/Alert.js +16 -16
- package/dist/Alert/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Alert/__tests__/fixtures/A11yDemos.js +12 -12
- package/dist/Avatar/Avatar.d.ts +1 -1
- package/dist/Avatar/Avatar.js +5 -5
- package/dist/Avatar/Avatar.types.d.ts +1 -1
- package/dist/Avatar/AvatarGroup.types.d.ts +1 -1
- package/dist/Backdrop/Backdrop.d.ts +1 -1
- package/dist/Backdrop/Backdrop.js +3 -3
- package/dist/Backdrop/Backdrop.types.d.ts +1 -1
- package/dist/Backdrop/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Backdrop/__tests__/fixtures/A11yDemos.js +3 -3
- package/dist/Badge/Badge.d.ts +1 -1
- package/dist/Badge/Badge.js +4 -4
- package/dist/Badge/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Badge/__tests__/fixtures/A11yDemos.js +13 -13
- package/dist/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/Breadcrumb/Breadcrumb.js +9 -9
- package/dist/Breadcrumb/Breadcrumb.types.d.ts +1 -1
- package/dist/Breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/dist/Breadcrumb/BreadcrumbItem.js +4 -4
- package/dist/Button/Button.d.ts +1 -1
- package/dist/Button/Button.js +6 -6
- package/dist/Button/Button.types.d.ts +1 -1
- package/dist/Button/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Button/__tests__/fixtures/A11yDemos.js +8 -8
- package/dist/Button/index.css +2 -3
- package/dist/CSSTransition/demo/CSSTransitionDemo.js +3 -0
- package/dist/CSSTransition/demo/index.css +0 -3
- package/dist/Calendar/Calendar.js +5 -1
- package/dist/Calendar/Calendar.types.d.ts +1 -1
- package/dist/Calendar/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Calendar/__tests__/fixtures/A11yDemos.js +2 -2
- package/dist/Card/Card.d.ts +1 -1
- package/dist/Card/Card.js +3 -3
- package/dist/Card/Card.types.d.ts +1 -1
- package/dist/Card/CardContent.d.ts +1 -1
- package/dist/Card/CardContent.js +3 -3
- package/dist/Card/CardContent.types.d.ts +1 -1
- package/dist/Card/CardFooter.d.ts +1 -1
- package/dist/Card/CardFooter.js +3 -3
- package/dist/Card/CardFooter.types.d.ts +1 -1
- package/dist/Card/CardHeader.d.ts +1 -1
- package/dist/Card/CardHeader.js +10 -10
- package/dist/Checkbox/CheckboxContext.d.ts +1 -1
- package/dist/Checkbox/CheckboxContext.js +2 -2
- package/dist/Checkbox/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Checkbox/__tests__/fixtures/A11yDemos.js +4 -4
- package/dist/CitySelector/CitySelector.types.d.ts +1 -1
- package/dist/CitySelector/Selector/index.d.ts +1 -1
- package/dist/CitySelector/Selector/index.js +2 -2
- package/dist/Collapse/Collapse.types.d.ts +1 -1
- package/dist/CollapsePanel/CollapsePanel.d.ts +1 -1
- package/dist/CollapsePanel/CollapsePanel.js +9 -9
- package/dist/CollapsePanel/CollapsePanel.types.d.ts +1 -1
- package/dist/CollapsePanel/CollapsePanelItem.d.ts +1 -1
- package/dist/CollapsePanel/CollapsePanelItem.js +5 -5
- package/dist/Countdown/Countdown.types.d.ts +2 -2
- package/dist/Countdown/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Countdown/__tests__/fixtures/A11yDemos.js +10 -10
- package/dist/Countdown/utils.d.ts +2 -2
- package/dist/Countdown/utils.js +4 -4
- package/dist/DatePicker/DatePicker.d.ts +1 -1
- package/dist/DatePicker/DatePicker.types.d.ts +1 -1
- package/dist/DesktopPicker/DesktopPicker.types.d.ts +1 -1
- package/dist/DesktopTimePicker/DesktopTimePicker.types.d.ts +11 -11
- package/dist/DesktopTimePicker/useGetTimePickerContent.js +2 -2
- package/dist/DesktopTimePicker/utils/utils.d.ts +1 -1
- package/dist/DesktopTimePicker/utils/utils.js +3 -3
- package/dist/Dialog/Dialog.js +19 -12
- package/dist/Dialog/Dialog.types.d.ts +13 -0
- package/dist/Dialog/FunctionalDialog.js +1 -1
- package/dist/Dialog/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Dialog/__tests__/fixtures/A11yDemos.js +4 -4
- package/dist/Dialog/index.css +21 -44
- package/dist/Divider/Divider.types.d.ts +1 -1
- package/dist/Drawer/Drawer.d.ts +1 -1
- package/dist/Drawer/Drawer.js +5 -5
- package/dist/Drawer/Drawer.types.d.ts +1 -1
- package/dist/Fade/Fade.d.ts +1 -1
- package/dist/Fade/Fade.js +4 -4
- package/dist/Fade/Fade.miniapp.js +13 -10
- package/dist/Fade/Fade.types.d.ts +1 -1
- package/dist/IconButton/IconButton.d.ts +1 -1
- package/dist/IconButton/IconButton.js +6 -6
- package/dist/IconButton/IconButton.types.d.ts +1 -1
- package/dist/Input/Input.types.d.ts +1 -1
- package/dist/Input/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Input/__tests__/fixtures/A11yDemos.js +7 -7
- package/dist/ItemSelector/ItemSelector.miniapp.js +7 -5
- package/dist/ItemSelector/ItemSelector.types.d.ts +1 -1
- package/dist/ItemSelector/Selector/index.d.ts +1 -1
- package/dist/ItemSelector/Selector/index.js +2 -2
- package/dist/List/List.d.ts +1 -1
- package/dist/List/List.js +4 -4
- package/dist/List/ListContext.d.ts +1 -1
- package/dist/List/ListContext.js +2 -2
- package/dist/List/ListItem.d.ts +1 -1
- package/dist/List/ListItem.js +8 -8
- package/dist/List/ListItem.types.d.ts +1 -1
- package/dist/List/ListItemContent.d.ts +1 -1
- package/dist/List/ListItemContent.js +3 -3
- package/dist/List/ListItemContent.types.d.ts +1 -1
- package/dist/List/ListItemExtra.d.ts +1 -1
- package/dist/List/ListItemExtra.js +3 -3
- package/dist/List/ListItemExtra.types.d.ts +1 -1
- package/dist/List/ListItemFooter.d.ts +1 -1
- package/dist/List/ListItemFooter.js +3 -3
- package/dist/List/ListItemFooter.types.d.ts +1 -1
- package/dist/List/ListItemHeader.d.ts +1 -1
- package/dist/List/ListItemHeader.js +3 -3
- package/dist/List/ListItemHeader.types.d.ts +1 -1
- package/dist/Loading/Loading.d.ts +1 -1
- package/dist/Loading/Loading.js +5 -5
- package/dist/Loading/Loading.types.d.ts +1 -1
- package/dist/Modal/Modal.d.ts +1 -1
- package/dist/Modal/Modal.js +6 -6
- package/dist/Modal/Modal.miniapp.d.ts +1 -1
- package/dist/Modal/Modal.miniapp.js +7 -7
- package/dist/Modal/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Modal/__tests__/fixtures/A11yDemos.js +3 -3
- package/dist/Modal/useModal.d.ts +1 -0
- package/dist/Modal/useModal.js +26 -29
- package/dist/NavBar/NavBar.d.ts +1 -1
- package/dist/NavBar/NavBar.js +10 -10
- package/dist/Picker/Picker.js +0 -1
- package/dist/Picker/Picker.types.d.ts +1 -1
- package/dist/Picker/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Picker/__tests__/fixtures/A11yDemos.js +2 -2
- package/dist/Popover/Popover.d.ts +1 -1
- package/dist/Popover/Popover.js +8 -8
- package/dist/Popover/Popover.types.d.ts +1 -1
- package/dist/Popover/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Popover/__tests__/fixtures/A11yDemos.js +21 -21
- package/dist/Portal/Portal.d.ts +1 -1
- package/dist/Portal/Portal.js +3 -3
- package/dist/Portal/Portal.miniapp.js +14 -8
- package/dist/Portal/Portal.types.d.ts +1 -1
- package/dist/Progress/Progress.d.ts +1 -1
- package/dist/Progress/Progress.js +4 -4
- package/dist/Progress/Progress.types.d.ts +1 -1
- package/dist/Progress/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Progress/__tests__/fixtures/A11yDemos.js +9 -9
- package/dist/Radio/RadioButtonIcon.d.ts +1 -1
- package/dist/Radio/RadioButtonIcon.js +4 -4
- package/dist/Radio/RadioContext.d.ts +1 -1
- package/dist/Radio/RadioContext.js +2 -2
- package/dist/Radio/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Radio/__tests__/fixtures/A11yDemos.js +4 -4
- package/dist/Radio/index.css +1 -0
- package/dist/Rating/Rating.types.d.ts +1 -1
- package/dist/ScrollView/ScrollView.types.d.ts +210 -1
- package/dist/ScrollView/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/ScrollView/__tests__/fixtures/A11yDemos.js +30 -30
- package/dist/ScrollView/useScrollView.js +16 -4
- package/dist/Select/selectContext.d.ts +0 -1
- package/dist/Skeleton/Skeleton.d.ts +1 -1
- package/dist/Skeleton/Skeleton.js +3 -3
- package/dist/Skeleton/Skeleton.types.d.ts +1 -1
- package/dist/Slide/Slide.d.ts +1 -1
- package/dist/Slide/Slide.js +4 -4
- package/dist/Slide/Slide.miniapp.js +13 -10
- package/dist/Slider/Slider.types.d.ts +1 -1
- package/dist/Steps/Step.types.d.ts +1 -1
- package/dist/Steps/StepsContext.d.ts +1 -1
- package/dist/Steps/StepsContext.js +2 -2
- package/dist/SwipeAction/SwipeAction.js +7 -8
- package/dist/SwipeAction/SwipeAction.types.d.ts +1 -1
- package/dist/SwipeAction/SwipeActionContext.d.ts +0 -1
- package/dist/Swiper/Swiper.js +2 -0
- package/dist/Swiper/Swiper.types.d.ts +1 -1
- package/dist/Swiper/SwiperItem.d.ts +1 -1
- package/dist/Swiper/SwiperItem.js +2 -2
- package/dist/Switch/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Switch/__tests__/fixtures/A11yDemos.js +4 -4
- package/dist/TabBar/TabBar.d.ts +1 -1
- package/dist/TabBar/TabBar.js +5 -5
- package/dist/Tabs/Tab.css +1 -23
- package/dist/Tabs/Tab.d.ts +2 -2
- package/dist/Tabs/Tab.js +42 -34
- package/dist/Tabs/Tab.types.d.ts +1 -1
- package/dist/Tabs/TabIndicator.d.ts +11 -0
- package/dist/Tabs/TabIndicator.js +185 -0
- package/dist/Tabs/TabMask.d.ts +7 -0
- package/dist/Tabs/TabMask.js +47 -0
- package/dist/Tabs/TabPanel.js +4 -4
- package/dist/Tabs/TabPanel.types.d.ts +1 -1
- package/dist/Tabs/Tabs.css +17 -6
- package/dist/Tabs/Tabs.js +101 -157
- package/dist/Tabs/Tabs.types.d.ts +5 -6
- package/dist/Tabs/TabsContext.d.ts +15 -6
- package/dist/Tabs/TabsContext.js +6 -14
- package/dist/Tabs/classes.d.ts +13 -0
- package/dist/Tabs/classes.js +63 -0
- package/dist/Tabs/index.css +18 -29
- package/dist/Tabs/index.d.ts +2 -2
- package/dist/Tabs/index.js +4 -4
- package/dist/Tabs/index.miniapp.d.ts +5 -0
- package/dist/Tabs/index.miniapp.js +50 -0
- package/dist/Tabs/miniapp/Tab.d.ts +5 -0
- package/dist/Tabs/miniapp/Tab.js +106 -0
- package/dist/Tabs/miniapp/TabIndicator.d.ts +15 -0
- package/dist/Tabs/miniapp/TabIndicator.js +301 -0
- package/dist/Tabs/miniapp/Tabs.d.ts +5 -0
- package/dist/Tabs/miniapp/Tabs.js +250 -0
- package/dist/Tabs/miniapp/TabsContext.d.ts +17 -0
- package/dist/Tabs/miniapp/TabsContext.js +39 -0
- package/dist/Tabs/miniapp/index.d.ts +2 -0
- package/dist/Tabs/miniapp/index.js +41 -0
- package/dist/Tabs/miniapp/scroll.d.ts +21 -0
- package/dist/Tabs/miniapp/scroll.js +52 -0
- package/dist/Tabs/miniapp/utils/queryBatch.d.ts +68 -0
- package/dist/Tabs/miniapp/utils/queryBatch.js +100 -0
- package/dist/Tabs/utils/scroll.js +10 -4
- package/dist/Tag/Tag.css +11 -1
- package/dist/Tag/Tag.d.ts +1 -1
- package/dist/Tag/Tag.js +6 -6
- package/dist/Tag/Tag.types.d.ts +2 -2
- package/dist/Tag/TagGroup.d.ts +1 -1
- package/dist/Tag/TagGroup.js +3 -3
- package/dist/Tag/TagGroup.types.d.ts +1 -1
- package/dist/Tag/__tests__/fixtures/A11yDemos.js +3 -3
- package/dist/Tag/index.css +11 -1
- package/dist/TextArea/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/TextArea/__tests__/fixtures/A11yDemos.js +6 -6
- package/dist/ThemeProvider/hooks/ThemeContext.d.ts +1 -1
- package/dist/ThemeProvider/hooks/ThemeContext.js +2 -2
- package/dist/ThemeProvider/hooks/useTheme.js +2 -2
- package/dist/ThemeProvider/utils/mountTokens.js +2 -2
- package/dist/Toast/FunctionalToast.js +3 -5
- package/dist/Toast/Toast.d.ts +1 -1
- package/dist/Toast/Toast.js +8 -8
- package/dist/Toast/Toast.types.d.ts +1 -1
- package/dist/Toast/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Toast/__tests__/fixtures/A11yDemos.js +2 -2
- package/dist/Toast/index.css +7 -5
- package/dist/Tooltip/Tooltip.d.ts +1 -1
- package/dist/Tooltip/Tooltip.js +5 -5
- package/dist/Tooltip/Tooltip.types.d.ts +1 -1
- package/dist/Tooltip/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Tooltip/__tests__/fixtures/A11yDemos.js +14 -14
- package/dist/Transition/Transition.d.ts +1 -1
- package/dist/Transition/Transition.js +3 -3
- package/dist/Transition/Transition.miniapp.d.ts +1 -1
- package/dist/Transition/Transition.miniapp.js +3 -3
- package/dist/Transition/TransitionCore.js +8 -2
- package/dist/_.._/benchmarks/components/Button.d.js +15 -0
- package/dist/_.._/benchmarks/components/Button.js +2 -2
- package/dist/_.._/benchmarks/components/Input.d.js +15 -0
- package/dist/_.._/benchmarks/components/Tabs.d.js +15 -0
- package/es/ActionSheet/ActionSheet.d.ts +1 -1
- package/es/ActionSheet/ActionSheet.js +1 -1
- package/es/ActionSheet/ActionSheet.types.d.ts +1 -1
- package/es/ActionSheet/ActionSheetContext.d.ts +1 -1
- package/es/ActionSheet/ActionSheetContext.js +1 -1
- package/es/ActionSheet/ActionSheetItem.types.d.ts +1 -1
- package/es/Alert/Alert.d.ts +1 -1
- package/es/Alert/Alert.js +1 -1
- package/es/Alert/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Alert/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Avatar/Avatar.d.ts +1 -1
- package/es/Avatar/Avatar.js +1 -1
- package/es/Avatar/Avatar.types.d.ts +1 -1
- package/es/Avatar/AvatarGroup.types.d.ts +1 -1
- package/es/Backdrop/Backdrop.d.ts +1 -1
- package/es/Backdrop/Backdrop.js +1 -1
- package/es/Backdrop/Backdrop.types.d.ts +1 -1
- package/es/Backdrop/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Backdrop/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Badge/Badge.d.ts +1 -1
- package/es/Badge/Badge.js +1 -1
- package/es/Badge/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Badge/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/es/Breadcrumb/Breadcrumb.js +1 -1
- package/es/Breadcrumb/Breadcrumb.types.d.ts +1 -1
- package/es/Breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/es/Breadcrumb/BreadcrumbItem.js +1 -1
- package/es/Button/Button.d.ts +1 -1
- package/es/Button/Button.js +1 -1
- package/es/Button/Button.types.d.ts +1 -1
- package/es/Button/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Button/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Button/index.css +2 -3
- package/es/CSSTransition/demo/CSSTransitionDemo.js +3 -0
- package/es/CSSTransition/demo/index.css +0 -3
- package/es/Calendar/Calendar.js +5 -1
- package/es/Calendar/Calendar.types.d.ts +1 -1
- package/es/Calendar/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Calendar/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Card/Card.d.ts +1 -1
- package/es/Card/Card.js +1 -1
- package/es/Card/Card.types.d.ts +1 -1
- package/es/Card/CardContent.d.ts +1 -1
- package/es/Card/CardContent.js +1 -1
- package/es/Card/CardContent.types.d.ts +1 -1
- package/es/Card/CardFooter.d.ts +1 -1
- package/es/Card/CardFooter.js +1 -1
- package/es/Card/CardFooter.types.d.ts +1 -1
- package/es/Card/CardHeader.d.ts +1 -1
- package/es/Card/CardHeader.js +1 -1
- package/es/Checkbox/CheckboxContext.d.ts +1 -1
- package/es/Checkbox/CheckboxContext.js +1 -1
- package/es/Checkbox/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Checkbox/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/CitySelector/CitySelector.types.d.ts +1 -1
- package/es/CitySelector/Selector/index.d.ts +1 -1
- package/es/CitySelector/Selector/index.js +1 -1
- package/es/Collapse/Collapse.types.d.ts +1 -1
- package/es/CollapsePanel/CollapsePanel.d.ts +1 -1
- package/es/CollapsePanel/CollapsePanel.js +1 -1
- package/es/CollapsePanel/CollapsePanel.types.d.ts +1 -1
- package/es/CollapsePanel/CollapsePanelItem.d.ts +1 -1
- package/es/CollapsePanel/CollapsePanelItem.js +1 -1
- package/es/Countdown/Countdown.types.d.ts +2 -2
- package/es/Countdown/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Countdown/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Countdown/utils.d.ts +2 -2
- package/es/Countdown/utils.js +4 -4
- package/es/DatePicker/DatePicker.types.d.ts +1 -1
- package/es/DesktopPicker/DesktopPicker.types.d.ts +1 -1
- package/es/DesktopTimePicker/DesktopTimePicker.types.d.ts +11 -11
- package/es/DesktopTimePicker/useGetTimePickerContent.js +3 -3
- package/es/DesktopTimePicker/utils/utils.d.ts +1 -1
- package/es/DesktopTimePicker/utils/utils.js +2 -2
- package/es/Dialog/Dialog.js +19 -12
- package/es/Dialog/Dialog.types.d.ts +13 -0
- package/es/Dialog/FunctionalDialog.js +1 -1
- package/es/Dialog/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Dialog/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Dialog/index.css +21 -44
- package/es/Divider/Divider.types.d.ts +1 -1
- package/es/Drawer/Drawer.d.ts +1 -1
- package/es/Drawer/Drawer.js +1 -1
- package/es/Drawer/Drawer.types.d.ts +1 -1
- package/es/Fade/Fade.d.ts +1 -1
- package/es/Fade/Fade.js +1 -1
- package/es/Fade/Fade.miniapp.js +14 -11
- package/es/Fade/Fade.types.d.ts +1 -1
- package/es/IconButton/IconButton.d.ts +1 -1
- package/es/IconButton/IconButton.js +1 -1
- package/es/IconButton/IconButton.types.d.ts +1 -1
- package/es/Input/Input.types.d.ts +1 -1
- package/es/Input/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Input/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/ItemSelector/ItemSelector.miniapp.js +7 -5
- package/es/ItemSelector/ItemSelector.types.d.ts +1 -1
- package/es/ItemSelector/Selector/index.d.ts +1 -1
- package/es/ItemSelector/Selector/index.js +1 -1
- package/es/List/List.d.ts +1 -1
- package/es/List/List.js +1 -1
- package/es/List/ListContext.d.ts +1 -1
- package/es/List/ListContext.js +1 -1
- package/es/List/ListItem.d.ts +1 -1
- package/es/List/ListItem.js +1 -1
- package/es/List/ListItem.types.d.ts +1 -1
- package/es/List/ListItemContent.d.ts +1 -1
- package/es/List/ListItemContent.js +1 -1
- package/es/List/ListItemContent.types.d.ts +1 -1
- package/es/List/ListItemExtra.d.ts +1 -1
- package/es/List/ListItemExtra.js +1 -1
- package/es/List/ListItemExtra.types.d.ts +1 -1
- package/es/List/ListItemFooter.d.ts +1 -1
- package/es/List/ListItemFooter.js +1 -1
- package/es/List/ListItemFooter.types.d.ts +1 -1
- package/es/List/ListItemHeader.d.ts +1 -1
- package/es/List/ListItemHeader.js +1 -1
- package/es/List/ListItemHeader.types.d.ts +1 -1
- package/es/Loading/Loading.d.ts +1 -1
- package/es/Loading/Loading.js +1 -1
- package/es/Loading/Loading.types.d.ts +1 -1
- package/es/Modal/Modal.d.ts +1 -1
- package/es/Modal/Modal.js +1 -1
- package/es/Modal/Modal.miniapp.d.ts +1 -1
- package/es/Modal/Modal.miniapp.js +1 -1
- package/es/Modal/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Modal/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Modal/useModal.d.ts +1 -0
- package/es/Modal/useModal.js +26 -29
- package/es/NavBar/NavBar.d.ts +1 -1
- package/es/NavBar/NavBar.js +1 -1
- package/es/Picker/Picker.js +0 -1
- package/es/Picker/Picker.types.d.ts +1 -1
- package/es/Picker/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Picker/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Popover/Popover.d.ts +1 -1
- package/es/Popover/Popover.js +1 -1
- package/es/Popover/Popover.types.d.ts +1 -1
- package/es/Popover/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Popover/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Portal/Portal.d.ts +1 -1
- package/es/Portal/Portal.js +1 -1
- package/es/Portal/Portal.miniapp.js +15 -9
- package/es/Portal/Portal.types.d.ts +1 -1
- package/es/Progress/Progress.d.ts +1 -1
- package/es/Progress/Progress.js +1 -1
- package/es/Progress/Progress.types.d.ts +1 -1
- package/es/Progress/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Progress/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Radio/RadioButtonIcon.d.ts +1 -1
- package/es/Radio/RadioButtonIcon.js +1 -1
- package/es/Radio/RadioContext.d.ts +1 -1
- package/es/Radio/RadioContext.js +1 -1
- package/es/Radio/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Radio/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Radio/index.css +1 -0
- package/es/Rating/Rating.types.d.ts +1 -1
- package/es/ScrollView/ScrollView.types.d.ts +210 -1
- package/es/ScrollView/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/ScrollView/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/ScrollView/useScrollView.js +16 -4
- package/es/Select/selectContext.d.ts +0 -1
- package/es/Skeleton/Skeleton.d.ts +1 -1
- package/es/Skeleton/Skeleton.js +1 -1
- package/es/Skeleton/Skeleton.types.d.ts +1 -1
- package/es/Slide/Slide.d.ts +1 -1
- package/es/Slide/Slide.js +1 -1
- package/es/Slide/Slide.miniapp.js +14 -11
- package/es/Slider/Slider.types.d.ts +1 -1
- package/es/Steps/Step.types.d.ts +1 -1
- package/es/Steps/StepsContext.d.ts +1 -1
- package/es/Steps/StepsContext.js +1 -1
- package/es/SwipeAction/SwipeAction.js +7 -8
- package/es/SwipeAction/SwipeAction.types.d.ts +1 -1
- package/es/SwipeAction/SwipeActionContext.d.ts +0 -1
- package/es/Swiper/Swiper.js +7 -1
- package/es/Swiper/Swiper.types.d.ts +1 -1
- package/es/Swiper/SwiperItem.d.ts +1 -1
- package/es/Swiper/SwiperItem.js +1 -1
- package/es/Switch/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Switch/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/TabBar/TabBar.d.ts +1 -1
- package/es/TabBar/TabBar.js +1 -1
- package/es/Tabs/Tab.css +1 -23
- package/es/Tabs/Tab.d.ts +2 -2
- package/es/Tabs/Tab.js +44 -36
- package/es/Tabs/Tab.types.d.ts +1 -1
- package/es/Tabs/TabIndicator.d.ts +11 -0
- package/es/Tabs/TabIndicator.js +156 -0
- package/es/Tabs/TabMask.d.ts +7 -0
- package/es/Tabs/TabMask.js +18 -0
- package/es/Tabs/TabPanel.js +8 -4
- package/es/Tabs/TabPanel.types.d.ts +1 -1
- package/es/Tabs/Tabs.css +17 -6
- package/es/Tabs/Tabs.js +102 -158
- package/es/Tabs/Tabs.types.d.ts +5 -6
- package/es/Tabs/TabsContext.d.ts +15 -6
- package/es/Tabs/TabsContext.js +6 -4
- package/es/Tabs/classes.d.ts +13 -0
- package/es/Tabs/classes.js +28 -0
- package/es/Tabs/index.css +18 -29
- package/es/Tabs/index.d.ts +2 -2
- package/es/Tabs/index.js +2 -2
- package/es/Tabs/index.miniapp.d.ts +5 -0
- package/es/Tabs/index.miniapp.js +11 -0
- package/es/Tabs/miniapp/Tab.d.ts +5 -0
- package/es/Tabs/miniapp/Tab.js +77 -0
- package/es/Tabs/miniapp/TabIndicator.d.ts +15 -0
- package/es/Tabs/miniapp/TabIndicator.js +272 -0
- package/es/Tabs/miniapp/Tabs.d.ts +5 -0
- package/es/Tabs/miniapp/Tabs.js +228 -0
- package/es/Tabs/miniapp/TabsContext.d.ts +17 -0
- package/es/Tabs/miniapp/TabsContext.js +16 -0
- package/es/Tabs/miniapp/index.d.ts +2 -0
- package/es/Tabs/miniapp/index.js +7 -0
- package/es/Tabs/miniapp/scroll.d.ts +21 -0
- package/es/Tabs/miniapp/scroll.js +29 -0
- package/es/Tabs/miniapp/utils/queryBatch.d.ts +68 -0
- package/es/Tabs/miniapp/utils/queryBatch.js +65 -0
- package/es/Tabs/utils/scroll.js +10 -4
- package/es/Tag/Tag.css +11 -1
- package/es/Tag/Tag.d.ts +1 -1
- package/es/Tag/Tag.js +4 -4
- package/es/Tag/Tag.types.d.ts +2 -2
- package/es/Tag/TagGroup.d.ts +1 -1
- package/es/Tag/TagGroup.js +1 -1
- package/es/Tag/TagGroup.types.d.ts +1 -1
- package/es/Tag/__tests__/fixtures/A11yDemos.js +3 -3
- package/es/Tag/index.css +11 -1
- package/es/TextArea/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/TextArea/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/ThemeProvider/hooks/ThemeContext.d.ts +1 -1
- package/es/ThemeProvider/hooks/ThemeContext.js +1 -1
- package/es/ThemeProvider/hooks/useTheme.js +1 -1
- package/es/ThemeProvider/utils/mountTokens.js +1 -1
- package/es/Toast/FunctionalToast.js +4 -6
- package/es/Toast/Toast.d.ts +1 -1
- package/es/Toast/Toast.js +1 -1
- package/es/Toast/Toast.types.d.ts +1 -1
- package/es/Toast/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Toast/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Toast/index.css +7 -5
- package/es/Tooltip/Tooltip.d.ts +1 -1
- package/es/Tooltip/Tooltip.js +1 -1
- package/es/Tooltip/Tooltip.types.d.ts +1 -1
- package/es/Tooltip/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Tooltip/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Transition/Transition.d.ts +1 -1
- package/es/Transition/Transition.js +1 -1
- package/es/Transition/Transition.miniapp.d.ts +1 -1
- package/es/Transition/Transition.miniapp.js +1 -1
- package/es/Transition/TransitionCore.js +8 -2
- package/es/_.._/benchmarks/components/Button.d.js +0 -0
- package/es/_.._/benchmarks/components/Button.js +1 -1
- package/es/_.._/benchmarks/components/Input.d.js +0 -0
- package/es/_.._/benchmarks/components/Tabs.d.js +0 -0
- package/package.json +17 -26
- package/src/index.ts +0 -58
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import Badge from "../../Badge";
|
|
3
3
|
const basicBadgeDemo = () => {
|
|
4
4
|
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Badge, { content: "12" }, /* @__PURE__ */ React.createElement("div", { style: { width: 40, height: 40, background: "#f0f0f0" } }, "\u5185\u5BB9")));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { BreadcrumbProps } from './Breadcrumb.types';
|
|
3
3
|
import './index.less';
|
|
4
4
|
declare const Breadcrumb: React.ForwardRefExoticComponent<Omit<BreadcrumbProps<"nav", {}>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { BreadcrumbItemProps } from './Breadcrumb.types';
|
|
3
3
|
declare const BreadcrumbItem: React.ForwardRefExoticComponent<Omit<BreadcrumbItemProps<"li", {}>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
4
4
|
export default BreadcrumbItem;
|
|
@@ -26,7 +26,7 @@ var __objRest = (source, exclude) => {
|
|
|
26
26
|
}
|
|
27
27
|
return target;
|
|
28
28
|
};
|
|
29
|
-
import React from "react";
|
|
29
|
+
import * as React from "react";
|
|
30
30
|
import clsx from "clsx";
|
|
31
31
|
const prefixCls = "bui-breadcrumb-item";
|
|
32
32
|
const BreadcrumbItem = /* @__PURE__ */ React.forwardRef(
|
package/es/Button/Button.d.ts
CHANGED
package/es/Button/Button.js
CHANGED
|
@@ -27,7 +27,7 @@ var __objRest = (source, exclude) => {
|
|
|
27
27
|
return target;
|
|
28
28
|
};
|
|
29
29
|
import clsx from "clsx";
|
|
30
|
-
import React from "react";
|
|
30
|
+
import * as React from "react";
|
|
31
31
|
import "./index.css";
|
|
32
32
|
const prefixCls = "bui-btn";
|
|
33
33
|
const ButtonIcon = ({ children, iconPosition }) => {
|
package/es/Button/index.css
CHANGED
|
@@ -20,8 +20,8 @@ xhs-page {
|
|
|
20
20
|
--bui-btn-small-padding: 0 11px;
|
|
21
21
|
--bui-btn-padding: 0 14px;
|
|
22
22
|
--bui-btn-large-padding: 0 14px;
|
|
23
|
+
--bui-btn-large-font-size: var(--bui-text-size-2);
|
|
23
24
|
--bui-btn-full-font-size: var(--bui-title-size-4);
|
|
24
|
-
--bui-btn-full-font-family: var(--bui-font-family);
|
|
25
25
|
}
|
|
26
26
|
.bui-btn {
|
|
27
27
|
outline: 0;
|
|
@@ -95,13 +95,12 @@ xhs-page {
|
|
|
95
95
|
border-radius: var(--bui-btn-small-border-radius);
|
|
96
96
|
}
|
|
97
97
|
.bui-btn-large {
|
|
98
|
-
font-size: var(--bui-
|
|
98
|
+
font-size: var(--bui-btn-large-font-size);
|
|
99
99
|
padding: var(--bui-btn-large-padding);
|
|
100
100
|
height: var(--bui-btn-large-height);
|
|
101
101
|
border-radius: var(--bui-btn-large-border-radius);
|
|
102
102
|
}
|
|
103
103
|
.bui-btn-full {
|
|
104
|
-
font-family: var(--bui-btn-full-font-family);
|
|
105
104
|
font-size: var(--bui-btn-full-font-size);
|
|
106
105
|
width: 100%;
|
|
107
106
|
height: var(--bui-btn-full-height);
|
package/es/Calendar/Calendar.js
CHANGED
|
@@ -147,7 +147,11 @@ const Calendar = /* @__PURE__ */ React.forwardRef(
|
|
|
147
147
|
if (!isEqualVal(prevValueRef.current, value)) {
|
|
148
148
|
const latestDate = formattedValue == null ? void 0 : formattedValue[0];
|
|
149
149
|
const lastInitialValue = renderMonth;
|
|
150
|
-
|
|
150
|
+
if (!latestDate) {
|
|
151
|
+
prevValueRef.current = value;
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
const inSameMonth = isRangeMode ? selectedStartDate && dayjs(selectedStartDate).isSame(lastInitialValue, "month") || selectedEndDate && dayjs(selectedEndDate).isSame(lastInitialValue, "month") : latestDate && dayjs(latestDate).isSame(lastInitialValue, "month");
|
|
151
155
|
if (!inSameMonth) {
|
|
152
156
|
const latestBeforeThanLast = dayjs(latestDate).isBefore(
|
|
153
157
|
lastInitialValue,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
export declare const CalendarDemo: () => React.JSX.Element;
|
package/es/Card/Card.d.ts
CHANGED
package/es/Card/Card.js
CHANGED
|
@@ -27,7 +27,7 @@ var __objRest = (source, exclude) => {
|
|
|
27
27
|
return target;
|
|
28
28
|
};
|
|
29
29
|
import clsx from "clsx";
|
|
30
|
-
import React from "react";
|
|
30
|
+
import * as React from "react";
|
|
31
31
|
import "./Card.css";
|
|
32
32
|
const prefixCls = "bui-card";
|
|
33
33
|
const Card = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
package/es/Card/Card.types.d.ts
CHANGED
package/es/Card/CardContent.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { CardContentProps } from './CardContent.types';
|
|
3
3
|
import './CardContent.less';
|
|
4
4
|
declare const CardContent: React.ForwardRefExoticComponent<Omit<CardContentProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
package/es/Card/CardContent.js
CHANGED
|
@@ -27,7 +27,7 @@ var __objRest = (source, exclude) => {
|
|
|
27
27
|
return target;
|
|
28
28
|
};
|
|
29
29
|
import clsx from "clsx";
|
|
30
|
-
import React from "react";
|
|
30
|
+
import * as React from "react";
|
|
31
31
|
import "./CardContent.css";
|
|
32
32
|
const prefixCls = "bui-card-content";
|
|
33
33
|
const CardContent = /* @__PURE__ */ React.forwardRef(
|
package/es/Card/CardFooter.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { CardFooterProps } from './CardFooter.types';
|
|
3
3
|
import './CardFooter.less';
|
|
4
4
|
declare const CardFooter: React.ForwardRefExoticComponent<Omit<CardFooterProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
package/es/Card/CardFooter.js
CHANGED
|
@@ -27,7 +27,7 @@ var __objRest = (source, exclude) => {
|
|
|
27
27
|
return target;
|
|
28
28
|
};
|
|
29
29
|
import clsx from "clsx";
|
|
30
|
-
import React from "react";
|
|
30
|
+
import * as React from "react";
|
|
31
31
|
import "./CardFooter.css";
|
|
32
32
|
const prefixCls = "bui-card-footer";
|
|
33
33
|
const CardFooter = /* @__PURE__ */ React.forwardRef(
|
package/es/Card/CardHeader.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { CardHeaderProps } from './CardHeader.types';
|
|
3
3
|
import './CardHeader.less';
|
|
4
4
|
declare const CardHeader: React.ForwardRefExoticComponent<Omit<CardHeaderProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
package/es/Card/CardHeader.js
CHANGED
|
@@ -28,7 +28,7 @@ var __objRest = (source, exclude) => {
|
|
|
28
28
|
};
|
|
29
29
|
import { ArrowForwardIcon } from "@bifrostui/icons";
|
|
30
30
|
import clsx from "clsx";
|
|
31
|
-
import React from "react";
|
|
31
|
+
import * as React from "react";
|
|
32
32
|
import "./CardHeader.css";
|
|
33
33
|
const prefixCls = "bui-card-header";
|
|
34
34
|
const CardHeader = /* @__PURE__ */ React.forwardRef(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { CheckboxContextProps } from './Checkbox.types';
|
|
3
3
|
declare const CheckboxContext: React.Context<CheckboxContextProps>;
|
|
4
4
|
export declare const CheckboxContextProvider: React.Provider<CheckboxContextProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import Checkbox from "../../Checkbox";
|
|
3
3
|
const basicCheckboxDemo = () => {
|
|
4
4
|
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("label", null, /* @__PURE__ */ React.createElement(Checkbox, { checked: true }), "Checkbox"));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { CollapsePanelProps } from './CollapsePanel.types';
|
|
3
3
|
import './index.less';
|
|
4
4
|
declare const CollapsePanel: React.ForwardRefExoticComponent<Omit<CollapsePanelProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -29,7 +29,7 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
-
import React from "react";
|
|
32
|
+
import * as React from "react";
|
|
33
33
|
import clsx from "clsx";
|
|
34
34
|
import { ArrowDownwardLargeIcon } from "@bifrostui/icons";
|
|
35
35
|
import { useValue } from "@bifrostui/utils";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { CollapsePanelItemProps } from './CollapsePanel.types';
|
|
3
3
|
declare const CollapsePanelItem: React.ForwardRefExoticComponent<Omit<CollapsePanelItemProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
4
|
export default CollapsePanelItem;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OverrideProps } from '@bifrostui/types';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
/**
|
|
4
4
|
* 当前时间
|
|
5
5
|
*/
|
|
@@ -115,7 +115,7 @@ export interface CountdownItem {
|
|
|
115
115
|
/**
|
|
116
116
|
* 格式化倒计时
|
|
117
117
|
*/
|
|
118
|
-
export type
|
|
118
|
+
export type FormattedCountdown = {
|
|
119
119
|
/**
|
|
120
120
|
* 剩余总时间
|
|
121
121
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import Countdown from "../../Countdown";
|
|
3
3
|
const basicCountdownDemo = () => {
|
|
4
4
|
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Countdown, { remainingTime: 60 * 1e3 }));
|
package/es/Countdown/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CurrentTime,
|
|
1
|
+
import { CurrentTime, FormattedCountdown } from './Countdown.types';
|
|
2
2
|
/**
|
|
3
3
|
* 解析时间,将结束时间戳拆分为剩余时间对象
|
|
4
4
|
*/
|
|
@@ -6,4 +6,4 @@ export declare const parseTime: (endTime: number, offsetTime: number) => Current
|
|
|
6
6
|
/**
|
|
7
7
|
* 格式化倒计时,将剩余时间格式化为指定格式,并拆分位各个时间模块
|
|
8
8
|
*/
|
|
9
|
-
export declare const formatCountdown: (duration: number, format: string) =>
|
|
9
|
+
export declare const formatCountdown: (duration: number, format: string) => FormattedCountdown;
|
package/es/Countdown/utils.js
CHANGED
|
@@ -26,9 +26,9 @@ const preAppend = (num) => {
|
|
|
26
26
|
return num < 10 ? `0${num}` : `${num}`;
|
|
27
27
|
};
|
|
28
28
|
const parseTime = (endTime, offsetTime) => {
|
|
29
|
-
const now =
|
|
30
|
-
|
|
31
|
-
total =
|
|
29
|
+
const now = Date.now();
|
|
30
|
+
const t = endTime - now - offsetTime || 0;
|
|
31
|
+
const total = Math.max(0, t);
|
|
32
32
|
const years = Math.floor(total / YEAR);
|
|
33
33
|
const months = Math.floor(total / MONTH);
|
|
34
34
|
const days = Math.floor(total / DAY);
|
|
@@ -50,7 +50,7 @@ const parseTime = (endTime, offsetTime) => {
|
|
|
50
50
|
const formatCountdown = (duration, format) => {
|
|
51
51
|
let timeList = [];
|
|
52
52
|
let leftDuration = duration;
|
|
53
|
-
const escapeRegex = /\[[^\]]
|
|
53
|
+
const escapeRegex = /\[(?:[^\]]{0,100})\]/g;
|
|
54
54
|
const keepList = (format.match(escapeRegex) || []).map(
|
|
55
55
|
(str) => str.slice(1, -1)
|
|
56
56
|
);
|
|
@@ -10,6 +10,17 @@ export type TimeSteps = {
|
|
|
10
10
|
minute?: number;
|
|
11
11
|
second?: number;
|
|
12
12
|
};
|
|
13
|
+
/** 时间面板单元格对象 */
|
|
14
|
+
export interface ITimeInstance {
|
|
15
|
+
value: number | string;
|
|
16
|
+
label: string;
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
}
|
|
19
|
+
export type DisabledTimeView = () => {
|
|
20
|
+
hour?: () => number[];
|
|
21
|
+
minute?: (selectedHour: number) => number[];
|
|
22
|
+
second?: (selectedHour: number, selectedMinute: number) => number[];
|
|
23
|
+
};
|
|
13
24
|
export type TimePickerProps<D extends React.ElementType = 'div', P = {}> = OverrideProps<{
|
|
14
25
|
props: P & {
|
|
15
26
|
/**
|
|
@@ -105,11 +116,6 @@ export type TimePickerProps<D extends React.ElementType = 'div', P = {}> = Overr
|
|
|
105
116
|
};
|
|
106
117
|
defaultComponent: D;
|
|
107
118
|
}, D>;
|
|
108
|
-
export type DisabledTimeView = () => {
|
|
109
|
-
hour?: () => number[];
|
|
110
|
-
minute?: (selectedHour: number) => number[];
|
|
111
|
-
second?: (selectedHour: number, selectedMinute: number) => number[];
|
|
112
|
-
};
|
|
113
119
|
export interface TimePickerContentProps {
|
|
114
120
|
setIsOpen: Function;
|
|
115
121
|
triggerChange: Function;
|
|
@@ -160,12 +166,6 @@ export interface TimePickerContentProps {
|
|
|
160
166
|
*/
|
|
161
167
|
setIsInvalid: (a: boolean) => void;
|
|
162
168
|
}
|
|
163
|
-
/** 时间面板单元格对象 */
|
|
164
|
-
export interface ITimeInstance {
|
|
165
|
-
value: number | string;
|
|
166
|
-
label: string;
|
|
167
|
-
disabled: boolean;
|
|
168
|
-
}
|
|
169
169
|
/** 时分秒面板单元格对象 */
|
|
170
170
|
export interface ITimeItemNumberInstance {
|
|
171
171
|
value: number;
|
|
@@ -21,7 +21,7 @@ import clsx from "clsx";
|
|
|
21
21
|
import React, { useEffect } from "react";
|
|
22
22
|
import DesktopTimePickerList from "./DesktopTimePickerList";
|
|
23
23
|
import {
|
|
24
|
-
|
|
24
|
+
getDisabledTime,
|
|
25
25
|
calculateValidMinTime,
|
|
26
26
|
isDisabledTime
|
|
27
27
|
} from "./utils/utils";
|
|
@@ -88,7 +88,7 @@ const useGetTimePickerContent = (props) => {
|
|
|
88
88
|
return lists.map((type, index) => {
|
|
89
89
|
var _a;
|
|
90
90
|
const dataList = getViewListData(type, timeSteps[type]);
|
|
91
|
-
const disabledTime =
|
|
91
|
+
const disabledTime = getDisabledTime(
|
|
92
92
|
type,
|
|
93
93
|
timeValue,
|
|
94
94
|
minTime,
|
|
@@ -126,7 +126,7 @@ const useGetTimePickerContent = (props) => {
|
|
|
126
126
|
const updateHour = (hour) => validTime.format("A") === "PM" ? hour + 12 : hour;
|
|
127
127
|
const getValidTimeValue = (view, newTimeValue) => {
|
|
128
128
|
var _a2, _b;
|
|
129
|
-
let viewDisabledTime =
|
|
129
|
+
let viewDisabledTime = getDisabledTime(
|
|
130
130
|
view,
|
|
131
131
|
newTimeValue,
|
|
132
132
|
minTime,
|
|
@@ -23,6 +23,6 @@ export declare const getOutOfMinRangeMinutes: (hourValue: number, minTime: Dayjs
|
|
|
23
23
|
export declare const getOutOfMaxRangeMinutes: (hourValue: number, maxTime: Dayjs, dataList: ITimeItemNumberInstance[]) => number[];
|
|
24
24
|
export declare const getOutOfMinRangeSeconds: (hourValue: number, minuteValue: number, minTime: Dayjs, dataList: ITimeItemNumberInstance[]) => number[];
|
|
25
25
|
export declare const getOutOfMaxRangeSeconds: (hourValue: number, minuteValue: number, maxTime: Dayjs, dataList: ITimeItemNumberInstance[]) => number[];
|
|
26
|
-
export declare const
|
|
26
|
+
export declare const getDisabledTime: (type: ViewTypeWithMeridiem, timeValue: Dayjs, minTime: Dayjs, maxTime: Dayjs, dataList: ITimeInstance[], disabledTimeView: DisabledTimeView, timeSteps: TimeSteps, ampm?: boolean) => (string | number)[];
|
|
27
27
|
export declare const calculateValidMinTime: (disabledTimeView: DisabledTimeView, minTime?: Dayjs) => dayjs.Dayjs;
|
|
28
28
|
export declare const dateToDayjs: (date: Date) => dayjs.Dayjs;
|
|
@@ -101,7 +101,7 @@ const getOutOfMaxRangeSeconds = (hourValue, minuteValue, maxTime, dataList) => {
|
|
|
101
101
|
}
|
|
102
102
|
return outOfMaxRangeMinutes;
|
|
103
103
|
};
|
|
104
|
-
const
|
|
104
|
+
const getDisabledTime = (type, timeValue, minTime, maxTime, dataList, disabledTimeView, timeSteps, ampm) => {
|
|
105
105
|
var _a, _b, _c, _d, _e;
|
|
106
106
|
const isRangeDate = getIsRangeDate(timeValue, minTime, maxTime);
|
|
107
107
|
if (!isRangeDate) {
|
|
@@ -353,13 +353,13 @@ const dateToDayjs = (date) => {
|
|
|
353
353
|
export {
|
|
354
354
|
calculateValidMinTime,
|
|
355
355
|
dateToDayjs,
|
|
356
|
+
getDisabledTime,
|
|
356
357
|
getIsRangeDate,
|
|
357
358
|
getIsRangeTime,
|
|
358
359
|
getOutOfMaxRangeMinutes,
|
|
359
360
|
getOutOfMaxRangeSeconds,
|
|
360
361
|
getOutOfMinRangeMinutes,
|
|
361
362
|
getOutOfMinRangeSeconds,
|
|
362
|
-
getdisabledTime,
|
|
363
363
|
isDisabledTime,
|
|
364
364
|
isDisabledViewTime
|
|
365
365
|
};
|
package/es/Dialog/Dialog.js
CHANGED
|
@@ -52,7 +52,9 @@ const Dialog = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
52
52
|
placeholder,
|
|
53
53
|
InputProps,
|
|
54
54
|
className,
|
|
55
|
-
theme
|
|
55
|
+
theme,
|
|
56
|
+
okButtonProps,
|
|
57
|
+
cancelButtonProps
|
|
56
58
|
} = _a, others = __objRest(_a, [
|
|
57
59
|
"open",
|
|
58
60
|
"onOk",
|
|
@@ -65,7 +67,9 @@ const Dialog = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
65
67
|
"placeholder",
|
|
66
68
|
"InputProps",
|
|
67
69
|
"className",
|
|
68
|
-
"theme"
|
|
70
|
+
"theme",
|
|
71
|
+
"okButtonProps",
|
|
72
|
+
"cancelButtonProps"
|
|
69
73
|
]);
|
|
70
74
|
const inputRef = useRef(null);
|
|
71
75
|
const titleId = useUniqueId();
|
|
@@ -88,20 +92,23 @@ const Dialog = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
88
92
|
};
|
|
89
93
|
const actionsNode = /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-actions` }, !isAlertMode && /* @__PURE__ */ React.createElement(
|
|
90
94
|
Button,
|
|
91
|
-
{
|
|
92
|
-
variant: "
|
|
95
|
+
__spreadValues({
|
|
96
|
+
variant: "subtle",
|
|
97
|
+
color: "primary",
|
|
98
|
+
size: "full",
|
|
93
99
|
onClick: handleCancel,
|
|
94
|
-
className: `${prefixCls}-actions-btn`
|
|
95
|
-
},
|
|
100
|
+
className: `${prefixCls}-actions-btn-cancel`
|
|
101
|
+
}, cancelButtonProps),
|
|
96
102
|
cancelText || cancel
|
|
97
103
|
), /* @__PURE__ */ React.createElement(
|
|
98
104
|
Button,
|
|
99
|
-
{
|
|
100
|
-
variant: "
|
|
105
|
+
__spreadValues({
|
|
106
|
+
variant: "contained",
|
|
101
107
|
color: "primary",
|
|
108
|
+
size: "full",
|
|
102
109
|
onClick: handleOk,
|
|
103
|
-
className: `${prefixCls}-actions-btn`
|
|
104
|
-
},
|
|
110
|
+
className: `${prefixCls}-actions-btn-ok`
|
|
111
|
+
}, okButtonProps),
|
|
105
112
|
okText || ok
|
|
106
113
|
));
|
|
107
114
|
const inputNode = isPromptMode && /* @__PURE__ */ React.createElement(
|
|
@@ -118,12 +125,12 @@ const Dialog = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
118
125
|
const ariaDescribedBy = content ? contentId : void 0;
|
|
119
126
|
return /* @__PURE__ */ React.createElement(
|
|
120
127
|
Modal,
|
|
121
|
-
|
|
128
|
+
__spreadValues({
|
|
122
129
|
open,
|
|
123
130
|
ref,
|
|
124
131
|
className: clsx(prefixCls, `${prefixCls}-${type}`, className),
|
|
125
132
|
onClose: handleCancel
|
|
126
|
-
}),
|
|
133
|
+
}, others),
|
|
127
134
|
/* @__PURE__ */ React.createElement(
|
|
128
135
|
"div",
|
|
129
136
|
{
|