@bifrostui/react 2.0.0-alpha.32 → 2.0.0-alpha.34
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.js +18 -8
- package/dist/ActionSheet/ActionSheetItem.d.ts +1 -1
- package/dist/ActionSheet/ActionSheetItem.js +12 -5
- package/dist/Alert/Alert.d.ts +1 -1
- package/dist/Alert/Alert.js +36 -34
- package/dist/Alert/__tests__/fixtures/A11yDemos.d.ts +8 -9
- package/dist/Alert/__tests__/fixtures/A11yDemos.js +60 -54
- package/dist/Avatar/Avatar.d.ts +1 -1
- package/dist/Avatar/Avatar.js +11 -9
- package/dist/Avatar/AvatarGroup.d.ts +1 -1
- package/dist/Avatar/AvatarGroup.js +10 -6
- package/dist/Backdrop/Backdrop.d.ts +1 -1
- package/dist/Backdrop/Backdrop.js +9 -5
- package/dist/Backdrop/__tests__/fixtures/A11yDemos.d.ts +4 -5
- package/dist/Backdrop/__tests__/fixtures/A11yDemos.js +3 -3
- package/dist/Badge/Badge.d.ts +1 -1
- package/dist/Badge/Badge.js +23 -15
- package/dist/Badge/__tests__/fixtures/A11yDemos.d.ts +16 -17
- package/dist/Badge/__tests__/fixtures/A11yDemos.js +60 -27
- package/dist/Badge/index.css +3 -3
- package/dist/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/Breadcrumb/Breadcrumb.js +19 -10
- package/dist/Breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/dist/Breadcrumb/BreadcrumbItem.js +18 -10
- package/dist/Button/Button.d.ts +1 -1
- package/dist/Button/Button.js +14 -7
- package/dist/Button/__tests__/fixtures/A11yDemos.d.ts +14 -15
- package/dist/Button/__tests__/fixtures/A11yDemos.js +32 -8
- package/dist/CSSTransition/CSSTransition.js +2 -1
- package/dist/CSSTransition/demo/CSSTransitionDemo.d.ts +1 -2
- package/dist/CSSTransition/demo/CSSTransitionDemo.js +28 -35
- package/dist/Calendar/Calendar.d.ts +1 -1
- package/dist/Calendar/Calendar.js +74 -66
- package/dist/Calendar/__tests__/fixtures/A11yDemos.d.ts +1 -2
- package/dist/Calendar/__tests__/fixtures/A11yDemos.js +2 -2
- package/dist/Card/Card.d.ts +1 -1
- package/dist/Card/Card.js +9 -4
- package/dist/Card/CardContent.d.ts +1 -1
- package/dist/Card/CardContent.js +5 -1
- package/dist/Card/CardFooter.d.ts +1 -1
- package/dist/Card/CardFooter.js +5 -1
- package/dist/Card/CardHeader.d.ts +1 -1
- package/dist/Card/CardHeader.js +16 -9
- package/dist/Checkbox/Checkbox.d.ts +1 -1
- package/dist/Checkbox/Checkbox.js +27 -23
- package/dist/Checkbox/CheckboxGroup.d.ts +1 -1
- package/dist/Checkbox/CheckboxGroup.js +9 -5
- package/dist/Checkbox/__tests__/fixtures/A11yDemos.d.ts +6 -7
- package/dist/Checkbox/__tests__/fixtures/A11yDemos.js +10 -4
- package/dist/Checkbox/index.css +4 -4
- package/dist/CitySelector/CitySelector.d.ts +1 -1
- package/dist/CitySelector/CitySelector.js +2 -1
- package/dist/CitySelector/CitySelector.miniapp.d.ts +1 -1
- package/dist/CitySelector/CitySelector.miniapp.js +2 -1
- package/dist/CitySelector/CitySelectorCore.js +83 -61
- package/dist/CitySelector/Selector/index.d.ts +1 -1
- package/dist/CitySelector/Selector/index.js +5 -15
- package/dist/Collapse/Collapse.js +51 -50
- package/dist/CollapsePanel/CollapsePanel.d.ts +1 -1
- package/dist/CollapsePanel/CollapsePanel.js +10 -8
- package/dist/CollapsePanel/CollapsePanelItem.d.ts +1 -1
- package/dist/CollapsePanel/CollapsePanelItem.js +27 -17
- package/dist/Countdown/Countdown.d.ts +1 -1
- package/dist/Countdown/Countdown.js +39 -29
- package/dist/Countdown/__tests__/fixtures/A11yDemos.d.ts +14 -15
- package/dist/Countdown/__tests__/fixtures/A11yDemos.js +37 -23
- package/dist/DatePicker/DatePicker.d.ts +1 -1
- package/dist/DatePicker/DatePicker.js +3 -2
- package/dist/DesktopDatePicker/DesktopDatePicker.d.ts +1 -1
- package/dist/DesktopDatePicker/DesktopDatePicker.js +45 -40
- package/dist/DesktopDatePicker/useGetDatePickerContent.d.ts +1 -2
- package/dist/DesktopDatePicker/useGetDatePickerContent.js +48 -41
- package/dist/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +1 -1
- package/dist/DesktopDateTimePicker/DesktopDateTimePicker.js +57 -51
- package/dist/DesktopPicker/DesktopPicker.d.ts +1 -1
- package/dist/DesktopPicker/DesktopPicker.js +36 -25
- package/dist/DesktopTimePicker/DesktopTimePicker.d.ts +1 -1
- package/dist/DesktopTimePicker/DesktopTimePicker.js +46 -41
- package/dist/DesktopTimePicker/DesktopTimePickerList.js +21 -20
- package/dist/DesktopTimePicker/useGetTimePickerContent.d.ts +1 -2
- package/dist/DesktopTimePicker/useGetTimePickerContent.js +9 -8
- package/dist/Dialog/Dialog.js +48 -39
- package/dist/Dialog/FunctionalDialog.js +8 -8
- package/dist/Dialog/__tests__/fixtures/A11yDemos.d.ts +3 -4
- package/dist/Dialog/__tests__/fixtures/A11yDemos.js +4 -4
- package/dist/Divider/Divider.d.ts +1 -1
- package/dist/Divider/Divider.js +9 -4
- package/dist/Drawer/Drawer.js +28 -25
- package/dist/Drawer/__tests__/fixtures/A11yDemos.d.ts +12 -13
- package/dist/Drawer/__tests__/fixtures/A11yDemos.js +88 -35
- package/dist/Fade/Fade.js +23 -22
- package/dist/IconButton/IconButton.d.ts +1 -1
- package/dist/IconButton/IconButton.js +14 -9
- package/dist/Image/Image.d.ts +1 -1
- package/dist/Image/Image.js +15 -10
- package/dist/Image/__tests__/fixtures/A11yDemos.d.ts +12 -13
- package/dist/Image/__tests__/fixtures/A11yDemos.js +29 -25
- package/dist/Input/Input.d.ts +1 -1
- package/dist/Input/Input.js +28 -24
- package/dist/Input/__tests__/fixtures/A11yDemos.d.ts +12 -13
- package/dist/Input/__tests__/fixtures/A11yDemos.js +31 -13
- package/dist/ItemSelector/ItemSelector.d.ts +1 -1
- package/dist/ItemSelector/ItemSelector.js +2 -1
- package/dist/ItemSelector/ItemSelector.miniapp.d.ts +1 -1
- package/dist/ItemSelector/ItemSelector.miniapp.js +2 -1
- package/dist/ItemSelector/ItemSelectorCore.js +82 -68
- package/dist/ItemSelector/Selector/index.d.ts +1 -1
- package/dist/ItemSelector/Selector/index.js +5 -15
- package/dist/List/List.d.ts +1 -1
- package/dist/List/List.js +14 -7
- package/dist/List/ListItem.d.ts +1 -1
- package/dist/List/ListItem.js +14 -7
- package/dist/List/ListItemContent.d.ts +1 -1
- package/dist/List/ListItemContent.js +8 -1
- package/dist/List/ListItemExtra.d.ts +1 -1
- package/dist/List/ListItemExtra.js +5 -1
- package/dist/List/ListItemFooter.d.ts +1 -1
- package/dist/List/ListItemFooter.js +5 -1
- package/dist/List/ListItemHeader.d.ts +1 -1
- package/dist/List/ListItemHeader.js +5 -1
- package/dist/Loading/Loading.d.ts +1 -1
- package/dist/Loading/Loading.js +13 -6
- package/dist/Modal/Modal.d.ts +1 -1
- package/dist/Modal/Modal.js +5 -1
- package/dist/Modal/Modal.miniapp.d.ts +2 -4
- package/dist/Modal/Modal.miniapp.js +9 -6
- package/dist/Modal/__tests__/fixtures/A11yDemos.d.ts +2 -3
- package/dist/Modal/__tests__/fixtures/A11yDemos.js +7 -7
- package/dist/NavBar/NavBar.d.ts +1 -1
- package/dist/NavBar/NavBar.js +24 -11
- package/dist/Picker/Picker.d.ts +1 -1
- package/dist/Picker/Picker.js +63 -57
- package/dist/Picker/PickerPanel.d.ts +1 -1
- package/dist/Picker/PickerPanel.js +44 -37
- package/dist/Picker/__tests__/fixtures/A11yDemos.d.ts +1 -2
- package/dist/Picker/__tests__/fixtures/A11yDemos.js +2 -2
- package/dist/Popover/Popover.d.ts +1 -1
- package/dist/Popover/Popover.js +65 -52
- package/dist/Popover/__tests__/fixtures/A11yDemos.d.ts +16 -17
- package/dist/Popover/__tests__/fixtures/A11yDemos.js +62 -50
- package/dist/Popover/hooks/usePopoverPosition.js +1 -1
- package/dist/Portal/Portal.js +2 -1
- package/dist/Portal/Portal.miniapp.js +3 -2
- package/dist/Progress/Progress.d.ts +1 -1
- package/dist/Progress/Progress.js +9 -4
- package/dist/Progress/__tests__/fixtures/A11yDemos.d.ts +12 -13
- package/dist/Progress/__tests__/fixtures/A11yDemos.js +51 -30
- package/dist/Radio/Radio.d.ts +1 -1
- package/dist/Radio/Radio.js +25 -22
- package/dist/Radio/RadioButtonIcon.d.ts +1 -2
- package/dist/Radio/RadioButtonIcon.js +24 -22
- package/dist/Radio/RadioGroup.d.ts +1 -1
- package/dist/Radio/RadioGroup.js +9 -5
- package/dist/Radio/__tests__/fixtures/A11yDemos.d.ts +6 -7
- package/dist/Radio/__tests__/fixtures/A11yDemos.js +10 -4
- package/dist/Rating/Rating.d.ts +1 -1
- package/dist/Rating/Rating.js +42 -33
- package/dist/ScrollView/ScrollView.d.ts +1 -1
- package/dist/ScrollView/ScrollView.js +3 -2
- package/dist/ScrollView/__tests__/fixtures/A11yDemos.js +205 -168
- package/dist/Select/Select.d.ts +1 -1
- package/dist/Select/Select.js +87 -78
- package/dist/Select/SelectOption.d.ts +1 -1
- package/dist/Select/SelectOption.js +5 -4
- package/dist/Select/__tests__/fixtures/A11yDemos.d.ts +12 -13
- package/dist/Select/__tests__/fixtures/A11yDemos.js +76 -46
- package/dist/Skeleton/Skeleton.d.ts +1 -1
- package/dist/Skeleton/Skeleton.js +9 -4
- package/dist/Slide/Slide.js +25 -24
- package/dist/Slider/Slider.d.ts +1 -1
- package/dist/Slider/Slider.js +34 -27
- package/dist/Stack/Stack.d.ts +1 -1
- package/dist/Stack/Stack.js +17 -9
- package/dist/Stack/demo/StackDemo.d.ts +1 -2
- package/dist/Stack/demo/StackDemo.js +114 -101
- package/dist/Steps/Step.d.ts +1 -1
- package/dist/Steps/Step.js +56 -44
- package/dist/Steps/Steps.d.ts +1 -1
- package/dist/Steps/Steps.js +23 -17
- package/dist/SwipeAction/SwipeAction.d.ts +1 -1
- package/dist/SwipeAction/SwipeAction.js +55 -46
- package/dist/SwipeAction/SwipeActionItem.d.ts +1 -1
- package/dist/SwipeAction/SwipeActionItem.js +9 -4
- package/dist/Swiper/Swiper.d.ts +1 -1
- package/dist/Swiper/Swiper.js +7 -6
- package/dist/Swiper/SwiperItem.d.ts +1 -2
- package/dist/Swiper/SwiperItem.js +5 -2
- package/dist/Switch/Switch.d.ts +1 -1
- package/dist/Switch/Switch.js +22 -18
- package/dist/Switch/__tests__/fixtures/A11yDemos.d.ts +6 -7
- package/dist/Switch/__tests__/fixtures/A11yDemos.js +10 -4
- package/dist/Switch/index.css +11 -11
- package/dist/TabBar/TabBar.d.ts +1 -1
- package/dist/TabBar/TabBar.js +14 -10
- package/dist/TabBar/TabBarItem.d.ts +1 -1
- package/dist/TabBar/TabBarItem.js +31 -20
- package/dist/Tabs/Tab.d.ts +1 -1
- package/dist/Tabs/Tab.js +5 -4
- package/dist/Tabs/TabIndicator.js +3 -2
- package/dist/Tabs/TabMask.js +2 -1
- package/dist/Tabs/TabPanel.d.ts +1 -1
- package/dist/Tabs/TabPanel.js +10 -5
- package/dist/Tabs/Tabs.d.ts +1 -1
- package/dist/Tabs/Tabs.js +26 -17
- package/dist/Tabs/miniapp/Tab.d.ts +1 -1
- package/dist/Tabs/miniapp/Tab.js +5 -4
- package/dist/Tabs/miniapp/TabIndicator.js +3 -2
- package/dist/Tabs/miniapp/Tabs.d.ts +1 -1
- package/dist/Tabs/miniapp/Tabs.js +33 -23
- package/dist/Tag/Tag.d.ts +1 -1
- package/dist/Tag/Tag.js +9 -4
- package/dist/Tag/TagGroup.d.ts +1 -1
- package/dist/Tag/TagGroup.js +9 -4
- package/dist/Tag/__tests__/fixtures/A11yDemos.d.ts +12 -13
- package/dist/Tag/__tests__/fixtures/A11yDemos.js +121 -83
- package/dist/TextArea/TextArea.d.ts +1 -1
- package/dist/TextArea/TextArea.js +40 -36
- package/dist/TextArea/__tests__/fixtures/A11yDemos.d.ts +10 -11
- package/dist/TextArea/__tests__/fixtures/A11yDemos.js +18 -15
- package/dist/ThemeProvider/ThemeProvider.d.ts +1 -1
- package/dist/ThemeProvider/ThemeProvider.js +3 -2
- package/dist/Toast/FunctionalToast.js +11 -11
- package/dist/Toast/Toast.js +38 -32
- package/dist/Toast/__tests__/fixtures/A11yDemos.d.ts +1 -2
- package/dist/Toast/__tests__/fixtures/A11yDemos.js +5 -5
- package/dist/Tooltip/Tooltip.d.ts +1 -1
- package/dist/Tooltip/Tooltip.js +13 -6
- package/dist/Tooltip/__tests__/fixtures/A11yDemos.d.ts +16 -17
- package/dist/Tooltip/__tests__/fixtures/A11yDemos.js +51 -18
- package/dist/Tooltip/useTooltip.js +1 -1
- package/dist/Transition/Transition.js +2 -1
- package/dist/Transition/Transition.miniapp.js +2 -1
- package/dist/Transition/TransitionCore.js +8 -2
- package/dist/TransitionGroup/TransitionGroup.d.ts +1 -2
- package/dist/TransitionGroup/TransitionGroup.js +3 -2
- package/dist/TransitionGroup/demo/TransitionGroupDemo.d.ts +1 -2
- package/dist/TransitionGroup/demo/TransitionGroupDemo.js +24 -27
- package/dist/_.._/benchmarks/components/Button.js +2 -12
- package/dist/_.._/benchmarks/components/Input.js +3 -12
- package/dist/_.._/benchmarks/components/Tabs.js +8 -12
- package/es/ActionSheet/ActionSheet.js +18 -8
- package/es/ActionSheet/ActionSheetItem.d.ts +1 -1
- package/es/ActionSheet/ActionSheetItem.js +12 -5
- package/es/Alert/Alert.d.ts +1 -1
- package/es/Alert/Alert.js +36 -34
- package/es/Alert/__tests__/fixtures/A11yDemos.d.ts +8 -9
- package/es/Alert/__tests__/fixtures/A11yDemos.js +60 -54
- package/es/Avatar/Avatar.d.ts +1 -1
- package/es/Avatar/Avatar.js +11 -9
- package/es/Avatar/AvatarGroup.d.ts +1 -1
- package/es/Avatar/AvatarGroup.js +10 -6
- package/es/Backdrop/Backdrop.d.ts +1 -1
- package/es/Backdrop/Backdrop.js +9 -5
- package/es/Backdrop/__tests__/fixtures/A11yDemos.d.ts +4 -5
- package/es/Backdrop/__tests__/fixtures/A11yDemos.js +3 -3
- package/es/Badge/Badge.d.ts +1 -1
- package/es/Badge/Badge.js +23 -15
- package/es/Badge/__tests__/fixtures/A11yDemos.d.ts +16 -17
- package/es/Badge/__tests__/fixtures/A11yDemos.js +60 -27
- package/es/Badge/index.css +3 -3
- package/es/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/es/Breadcrumb/Breadcrumb.js +19 -10
- package/es/Breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/es/Breadcrumb/BreadcrumbItem.js +18 -10
- package/es/Button/Button.d.ts +1 -1
- package/es/Button/Button.js +14 -7
- package/es/Button/__tests__/fixtures/A11yDemos.d.ts +14 -15
- package/es/Button/__tests__/fixtures/A11yDemos.js +32 -8
- package/es/CSSTransition/CSSTransition.js +2 -1
- package/es/CSSTransition/demo/CSSTransitionDemo.d.ts +1 -2
- package/es/CSSTransition/demo/CSSTransitionDemo.js +28 -25
- package/es/Calendar/Calendar.d.ts +1 -1
- package/es/Calendar/Calendar.js +67 -59
- package/es/Calendar/__tests__/fixtures/A11yDemos.d.ts +1 -2
- package/es/Calendar/__tests__/fixtures/A11yDemos.js +2 -2
- package/es/Card/Card.d.ts +1 -1
- package/es/Card/Card.js +9 -4
- package/es/Card/CardContent.d.ts +1 -1
- package/es/Card/CardContent.js +5 -1
- package/es/Card/CardFooter.d.ts +1 -1
- package/es/Card/CardFooter.js +5 -1
- package/es/Card/CardHeader.d.ts +1 -1
- package/es/Card/CardHeader.js +16 -9
- package/es/Checkbox/Checkbox.d.ts +1 -1
- package/es/Checkbox/Checkbox.js +30 -23
- package/es/Checkbox/CheckboxGroup.d.ts +1 -1
- package/es/Checkbox/CheckboxGroup.js +9 -5
- package/es/Checkbox/__tests__/fixtures/A11yDemos.d.ts +6 -7
- package/es/Checkbox/__tests__/fixtures/A11yDemos.js +10 -4
- package/es/Checkbox/index.css +4 -4
- package/es/CitySelector/CitySelector.d.ts +1 -1
- package/es/CitySelector/CitySelector.js +2 -1
- package/es/CitySelector/CitySelector.miniapp.d.ts +1 -1
- package/es/CitySelector/CitySelector.miniapp.js +2 -1
- package/es/CitySelector/CitySelectorCore.js +83 -61
- package/es/CitySelector/Selector/index.d.ts +1 -1
- package/es/CitySelector/Selector/index.js +5 -5
- package/es/Collapse/Collapse.js +51 -50
- package/es/CollapsePanel/CollapsePanel.d.ts +1 -1
- package/es/CollapsePanel/CollapsePanel.js +10 -8
- package/es/CollapsePanel/CollapsePanelItem.d.ts +1 -1
- package/es/CollapsePanel/CollapsePanelItem.js +27 -17
- package/es/Countdown/Countdown.d.ts +1 -1
- package/es/Countdown/Countdown.js +39 -29
- package/es/Countdown/__tests__/fixtures/A11yDemos.d.ts +14 -15
- package/es/Countdown/__tests__/fixtures/A11yDemos.js +37 -23
- package/es/DatePicker/DatePicker.d.ts +1 -1
- package/es/DatePicker/DatePicker.js +3 -2
- package/es/DesktopDatePicker/DesktopDatePicker.d.ts +1 -1
- package/es/DesktopDatePicker/DesktopDatePicker.js +45 -40
- package/es/DesktopDatePicker/useGetDatePickerContent.d.ts +1 -2
- package/es/DesktopDatePicker/useGetDatePickerContent.js +48 -41
- package/es/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +1 -1
- package/es/DesktopDateTimePicker/DesktopDateTimePicker.js +57 -51
- package/es/DesktopPicker/DesktopPicker.d.ts +1 -1
- package/es/DesktopPicker/DesktopPicker.js +36 -25
- package/es/DesktopTimePicker/DesktopTimePicker.d.ts +1 -1
- package/es/DesktopTimePicker/DesktopTimePicker.js +46 -41
- package/es/DesktopTimePicker/DesktopTimePickerList.js +21 -20
- package/es/DesktopTimePicker/useGetTimePickerContent.d.ts +1 -2
- package/es/DesktopTimePicker/useGetTimePickerContent.js +9 -8
- package/es/Dialog/Dialog.js +48 -39
- package/es/Dialog/FunctionalDialog.js +8 -8
- package/es/Dialog/__tests__/fixtures/A11yDemos.d.ts +3 -4
- package/es/Dialog/__tests__/fixtures/A11yDemos.js +4 -4
- package/es/Divider/Divider.d.ts +1 -1
- package/es/Divider/Divider.js +9 -4
- package/es/Drawer/Drawer.js +28 -25
- package/es/Drawer/__tests__/fixtures/A11yDemos.d.ts +12 -13
- package/es/Drawer/__tests__/fixtures/A11yDemos.js +88 -35
- package/es/Fade/Fade.js +23 -22
- package/es/IconButton/IconButton.d.ts +1 -1
- package/es/IconButton/IconButton.js +14 -9
- package/es/Image/Image.d.ts +1 -1
- package/es/Image/Image.js +15 -10
- package/es/Image/__tests__/fixtures/A11yDemos.d.ts +12 -13
- package/es/Image/__tests__/fixtures/A11yDemos.js +29 -25
- package/es/Input/Input.d.ts +1 -1
- package/es/Input/Input.js +28 -24
- package/es/Input/__tests__/fixtures/A11yDemos.d.ts +12 -13
- package/es/Input/__tests__/fixtures/A11yDemos.js +31 -13
- package/es/ItemSelector/ItemSelector.d.ts +1 -1
- package/es/ItemSelector/ItemSelector.js +2 -1
- package/es/ItemSelector/ItemSelector.miniapp.d.ts +1 -1
- package/es/ItemSelector/ItemSelector.miniapp.js +2 -1
- package/es/ItemSelector/ItemSelectorCore.js +82 -68
- package/es/ItemSelector/Selector/index.d.ts +1 -1
- package/es/ItemSelector/Selector/index.js +5 -5
- package/es/List/List.d.ts +1 -1
- package/es/List/List.js +14 -7
- package/es/List/ListItem.d.ts +1 -1
- package/es/List/ListItem.js +14 -7
- package/es/List/ListItemContent.d.ts +1 -1
- package/es/List/ListItemContent.js +8 -1
- package/es/List/ListItemExtra.d.ts +1 -1
- package/es/List/ListItemExtra.js +5 -1
- package/es/List/ListItemFooter.d.ts +1 -1
- package/es/List/ListItemFooter.js +5 -1
- package/es/List/ListItemHeader.d.ts +1 -1
- package/es/List/ListItemHeader.js +5 -1
- package/es/Loading/Loading.d.ts +1 -1
- package/es/Loading/Loading.js +13 -6
- package/es/Modal/Modal.d.ts +1 -1
- package/es/Modal/Modal.js +5 -1
- package/es/Modal/Modal.miniapp.d.ts +2 -4
- package/es/Modal/Modal.miniapp.js +9 -6
- package/es/Modal/__tests__/fixtures/A11yDemos.d.ts +2 -3
- package/es/Modal/__tests__/fixtures/A11yDemos.js +7 -7
- package/es/NavBar/NavBar.d.ts +1 -1
- package/es/NavBar/NavBar.js +24 -11
- package/es/Picker/Picker.d.ts +1 -1
- package/es/Picker/Picker.js +63 -57
- package/es/Picker/PickerPanel.d.ts +1 -1
- package/es/Picker/PickerPanel.js +44 -37
- package/es/Picker/__tests__/fixtures/A11yDemos.d.ts +1 -2
- package/es/Picker/__tests__/fixtures/A11yDemos.js +2 -2
- package/es/Popover/Popover.d.ts +1 -1
- package/es/Popover/Popover.js +65 -52
- package/es/Popover/__tests__/fixtures/A11yDemos.d.ts +16 -17
- package/es/Popover/__tests__/fixtures/A11yDemos.js +62 -50
- package/es/Popover/hooks/usePopoverPosition.js +1 -1
- package/es/Portal/Portal.js +2 -1
- package/es/Portal/Portal.miniapp.js +3 -2
- package/es/Progress/Progress.d.ts +1 -1
- package/es/Progress/Progress.js +9 -4
- package/es/Progress/__tests__/fixtures/A11yDemos.d.ts +12 -13
- package/es/Progress/__tests__/fixtures/A11yDemos.js +51 -30
- package/es/Radio/Radio.d.ts +1 -1
- package/es/Radio/Radio.js +25 -22
- package/es/Radio/RadioButtonIcon.d.ts +1 -2
- package/es/Radio/RadioButtonIcon.js +24 -22
- package/es/Radio/RadioGroup.d.ts +1 -1
- package/es/Radio/RadioGroup.js +9 -5
- package/es/Radio/__tests__/fixtures/A11yDemos.d.ts +6 -7
- package/es/Radio/__tests__/fixtures/A11yDemos.js +10 -4
- package/es/Rating/Rating.d.ts +1 -1
- package/es/Rating/Rating.js +42 -33
- package/es/ScrollView/ScrollView.d.ts +1 -1
- package/es/ScrollView/ScrollView.js +3 -2
- package/es/ScrollView/__tests__/fixtures/A11yDemos.js +205 -168
- package/es/Select/Select.d.ts +1 -1
- package/es/Select/Select.js +87 -78
- package/es/Select/SelectOption.d.ts +1 -1
- package/es/Select/SelectOption.js +5 -4
- package/es/Select/__tests__/fixtures/A11yDemos.d.ts +12 -13
- package/es/Select/__tests__/fixtures/A11yDemos.js +76 -46
- package/es/Skeleton/Skeleton.d.ts +1 -1
- package/es/Skeleton/Skeleton.js +9 -4
- package/es/Slide/Slide.js +25 -24
- package/es/Slider/Slider.d.ts +1 -1
- package/es/Slider/Slider.js +34 -27
- package/es/Stack/Stack.d.ts +1 -1
- package/es/Stack/Stack.js +17 -9
- package/es/Stack/demo/StackDemo.d.ts +1 -2
- package/es/Stack/demo/StackDemo.js +114 -91
- package/es/Steps/Step.d.ts +1 -1
- package/es/Steps/Step.js +56 -44
- package/es/Steps/Steps.d.ts +1 -1
- package/es/Steps/Steps.js +23 -17
- package/es/SwipeAction/SwipeAction.d.ts +1 -1
- package/es/SwipeAction/SwipeAction.js +55 -46
- package/es/SwipeAction/SwipeActionItem.d.ts +1 -1
- package/es/SwipeAction/SwipeActionItem.js +9 -4
- package/es/Swiper/Swiper.d.ts +1 -1
- package/es/Swiper/Swiper.js +7 -6
- package/es/Swiper/SwiperItem.d.ts +1 -2
- package/es/Swiper/SwiperItem.js +5 -2
- package/es/Switch/Switch.d.ts +1 -1
- package/es/Switch/Switch.js +22 -18
- package/es/Switch/__tests__/fixtures/A11yDemos.d.ts +6 -7
- package/es/Switch/__tests__/fixtures/A11yDemos.js +10 -4
- package/es/Switch/index.css +11 -11
- package/es/TabBar/TabBar.d.ts +1 -1
- package/es/TabBar/TabBar.js +14 -10
- package/es/TabBar/TabBarItem.d.ts +1 -1
- package/es/TabBar/TabBarItem.js +31 -20
- package/es/Tabs/Tab.d.ts +1 -1
- package/es/Tabs/Tab.js +5 -4
- package/es/Tabs/TabIndicator.js +3 -2
- package/es/Tabs/TabMask.js +2 -1
- package/es/Tabs/TabPanel.d.ts +1 -1
- package/es/Tabs/TabPanel.js +10 -5
- package/es/Tabs/Tabs.d.ts +1 -1
- package/es/Tabs/Tabs.js +26 -17
- package/es/Tabs/miniapp/Tab.d.ts +1 -1
- package/es/Tabs/miniapp/Tab.js +5 -4
- package/es/Tabs/miniapp/TabIndicator.js +3 -2
- package/es/Tabs/miniapp/Tabs.d.ts +1 -1
- package/es/Tabs/miniapp/Tabs.js +33 -23
- package/es/Tag/Tag.d.ts +1 -1
- package/es/Tag/Tag.js +9 -4
- package/es/Tag/TagGroup.d.ts +1 -1
- package/es/Tag/TagGroup.js +9 -4
- package/es/Tag/__tests__/fixtures/A11yDemos.d.ts +12 -13
- package/es/Tag/__tests__/fixtures/A11yDemos.js +121 -83
- package/es/TextArea/TextArea.d.ts +1 -1
- package/es/TextArea/TextArea.js +40 -36
- package/es/TextArea/__tests__/fixtures/A11yDemos.d.ts +10 -11
- package/es/TextArea/__tests__/fixtures/A11yDemos.js +18 -15
- package/es/ThemeProvider/ThemeProvider.d.ts +1 -1
- package/es/ThemeProvider/ThemeProvider.js +3 -2
- package/es/Toast/FunctionalToast.js +11 -11
- package/es/Toast/Toast.js +38 -32
- package/es/Toast/__tests__/fixtures/A11yDemos.d.ts +1 -2
- package/es/Toast/__tests__/fixtures/A11yDemos.js +5 -5
- package/es/Tooltip/Tooltip.d.ts +1 -1
- package/es/Tooltip/Tooltip.js +13 -6
- package/es/Tooltip/__tests__/fixtures/A11yDemos.d.ts +16 -17
- package/es/Tooltip/__tests__/fixtures/A11yDemos.js +51 -18
- package/es/Tooltip/useTooltip.js +1 -1
- package/es/Transition/Transition.js +2 -1
- package/es/Transition/Transition.miniapp.js +2 -1
- package/es/Transition/TransitionCore.js +8 -2
- package/es/TransitionGroup/TransitionGroup.d.ts +1 -2
- package/es/TransitionGroup/TransitionGroup.js +3 -2
- package/es/TransitionGroup/demo/TransitionGroupDemo.d.ts +1 -2
- package/es/TransitionGroup/demo/TransitionGroupDemo.js +24 -17
- package/es/_.._/benchmarks/components/Button.js +2 -2
- package/es/_.._/benchmarks/components/Input.js +3 -2
- package/es/_.._/benchmarks/components/Tabs.js +8 -2
- package/package.json +17 -11
|
@@ -37,28 +37,52 @@ __export(A11yDemos_exports, {
|
|
|
37
37
|
variantButtonDemo: () => variantButtonDemo
|
|
38
38
|
});
|
|
39
39
|
module.exports = __toCommonJS(A11yDemos_exports);
|
|
40
|
-
var
|
|
40
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
41
|
var import_Button = __toESM(require("../../Button"));
|
|
42
42
|
const basicButtonDemo = () => {
|
|
43
|
-
return /* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, { children: "\u57FA\u7840\u6309\u94AE" }) });
|
|
44
44
|
};
|
|
45
45
|
const variantButtonDemo = () => {
|
|
46
|
-
return /* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
47
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, { variant: "text", children: "\u6587\u5B57\u6309\u94AE" }),
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, { variant: "outlined", children: "\u7EBF\u6846\u6309\u94AE" }),
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, { variant: "contained", children: "\u586B\u5145\u6309\u94AE" }),
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, { variant: "subtle", children: "\u67D4\u548C\u6309\u94AE" })
|
|
51
|
+
] });
|
|
47
52
|
};
|
|
48
53
|
const colorButtonDemo = () => {
|
|
49
|
-
return /* @__PURE__ */
|
|
54
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, { color: "primary", children: "\u4E3B\u8981\u6309\u94AE" }),
|
|
56
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, { color: "success", children: "\u6210\u529F\u6309\u94AE" }),
|
|
57
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, { color: "warning", children: "\u8B66\u544A\u6309\u94AE" }),
|
|
58
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, { color: "danger", children: "\u5371\u9669\u6309\u94AE" })
|
|
59
|
+
] });
|
|
50
60
|
};
|
|
51
61
|
const sizeButtonDemo = () => {
|
|
52
|
-
return /* @__PURE__ */
|
|
62
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
63
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, { size: "small", children: "\u5C0F\u6309\u94AE" }),
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, { size: "medium", children: "\u4E2D\u6309\u94AE" }),
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, { size: "large", children: "\u5927\u6309\u94AE" }),
|
|
66
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, { size: "full", style: { width: "200px" }, children: "\u5168\u5BBD\u6309\u94AE" })
|
|
67
|
+
] });
|
|
53
68
|
};
|
|
54
69
|
const disabledButtonDemo = () => {
|
|
55
|
-
return /* @__PURE__ */
|
|
70
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
71
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, { disabled: true, children: "\u7981\u7528\u6309\u94AE" }),
|
|
72
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, { variant: "contained", disabled: true, children: "\u7981\u7528\u586B\u5145\u6309\u94AE" })
|
|
73
|
+
] });
|
|
56
74
|
};
|
|
57
75
|
const iconButtonDemo = () => {
|
|
58
|
-
return /* @__PURE__ */
|
|
76
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
77
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, { startIcon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\u{1F31F}" }), children: "\u5E26\u524D\u7F00\u56FE\u6807" }),
|
|
78
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, { endIcon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\u{1F4C5}" }), children: "\u5E26\u540E\u7F00\u56FE\u6807" })
|
|
79
|
+
] });
|
|
59
80
|
};
|
|
60
81
|
const ariaLabelButtonDemo = () => {
|
|
61
|
-
return /* @__PURE__ */
|
|
82
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
83
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, { "aria-label": "\u63D0\u4EA4\u8868\u5355", children: "\u63D0\u4EA4" }),
|
|
84
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, { "aria-label": "\u53D6\u6D88\u64CD\u4F5C", children: "\u53D6\u6D88" })
|
|
85
|
+
] });
|
|
62
86
|
};
|
|
63
87
|
var A11yDemos_default = {
|
|
64
88
|
basicButtonDemo,
|
|
@@ -59,6 +59,7 @@ __export(CSSTransition_exports, {
|
|
|
59
59
|
default: () => CSSTransition_default
|
|
60
60
|
});
|
|
61
61
|
module.exports = __toCommonJS(CSSTransition_exports);
|
|
62
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
62
63
|
var import_react = __toESM(require("react"));
|
|
63
64
|
var import_utils = require("@bifrostui/utils");
|
|
64
65
|
var import_Transition = __toESM(require("../Transition"));
|
|
@@ -157,7 +158,7 @@ const CSSTransition = /* @__PURE__ */ import_react.default.forwardRef(
|
|
|
157
158
|
props.onExited(node);
|
|
158
159
|
}
|
|
159
160
|
};
|
|
160
|
-
return /* @__PURE__ */
|
|
161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
161
162
|
import_Transition.default,
|
|
162
163
|
__spreadProps(__spreadValues({
|
|
163
164
|
ref,
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
5
|
var __export = (target, all) => {
|
|
8
6
|
for (var name in all)
|
|
@@ -16,21 +14,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
14
|
}
|
|
17
15
|
return to;
|
|
18
16
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
18
|
var CSSTransitionDemo_exports = {};
|
|
29
19
|
__export(CSSTransitionDemo_exports, {
|
|
30
20
|
default: () => CSSTransitionDemo_default
|
|
31
21
|
});
|
|
32
22
|
module.exports = __toCommonJS(CSSTransitionDemo_exports);
|
|
33
|
-
var
|
|
23
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
|
+
var import_react = require("react");
|
|
34
25
|
var import_react2 = require("@bifrostui/react");
|
|
35
26
|
var import_index = require("./index.css");
|
|
36
27
|
const StackDemo = () => {
|
|
@@ -43,37 +34,39 @@ const StackDemo = () => {
|
|
|
43
34
|
exitActive: "slide-exit-active",
|
|
44
35
|
exitDone: "slide-exit-done"
|
|
45
36
|
};
|
|
46
|
-
return /* @__PURE__ */
|
|
37
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
47
38
|
"div",
|
|
48
39
|
{
|
|
49
40
|
style: {
|
|
50
41
|
width: "300px",
|
|
51
42
|
height: "100px",
|
|
52
43
|
overflow: "hidden"
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
56
|
-
import_react2.Button,
|
|
57
|
-
{
|
|
58
|
-
onClick: () => {
|
|
59
|
-
setOpen((prev) => !prev);
|
|
60
|
-
},
|
|
61
|
-
style: {
|
|
62
|
-
marginBottom: "18px"
|
|
63
|
-
}
|
|
64
44
|
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
47
|
+
import_react2.Button,
|
|
48
|
+
{
|
|
49
|
+
onClick: () => {
|
|
50
|
+
setOpen((prev) => !prev);
|
|
51
|
+
},
|
|
52
|
+
style: {
|
|
53
|
+
marginBottom: "18px"
|
|
54
|
+
},
|
|
55
|
+
children: open ? "Exit" : "Enter"
|
|
56
|
+
}
|
|
57
|
+
),
|
|
58
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
59
|
+
import_react2.CSSTransition,
|
|
60
|
+
{
|
|
61
|
+
in: open,
|
|
62
|
+
timeout: 300,
|
|
63
|
+
unmountOnExit: false,
|
|
64
|
+
classNames: transitionClasses,
|
|
65
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.Alert, { className: "my-node", color: "success", children: "\u8FC7\u6E21\u8FC7\u7A0B\u4E2D\u4F1A\u4FEE\u6539className" })
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
]
|
|
69
|
+
}
|
|
77
70
|
);
|
|
78
71
|
};
|
|
79
72
|
var CSSTransitionDemo_default = StackDemo;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CalendarProps } from './Calendar.types';
|
|
3
3
|
import './index.less';
|
|
4
|
-
declare const Calendar: React.ForwardRefExoticComponent<Omit<CalendarProps
|
|
4
|
+
declare const Calendar: React.ForwardRefExoticComponent<Omit<CalendarProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default Calendar;
|
|
@@ -59,7 +59,9 @@ __export(Calendar_exports, {
|
|
|
59
59
|
default: () => Calendar_default
|
|
60
60
|
});
|
|
61
61
|
module.exports = __toCommonJS(Calendar_exports);
|
|
62
|
-
var
|
|
62
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
63
|
+
var import_react = require("react");
|
|
64
|
+
var import_react2 = __toESM(require("react"));
|
|
63
65
|
var import_clsx = __toESM(require("clsx"));
|
|
64
66
|
var import_dayjs = __toESM(require("dayjs"));
|
|
65
67
|
var import_isoWeek = __toESM(require("dayjs/plugin/isoWeek"));
|
|
@@ -80,7 +82,7 @@ const classes = {
|
|
|
80
82
|
week: "bui-calendar-week",
|
|
81
83
|
disabled: "bui-calendar-disabled"
|
|
82
84
|
};
|
|
83
|
-
const Calendar =
|
|
85
|
+
const Calendar = import_react2.default.forwardRef(
|
|
84
86
|
(props, ref) => {
|
|
85
87
|
const _a = props, {
|
|
86
88
|
className,
|
|
@@ -141,7 +143,7 @@ const Calendar = /* @__PURE__ */ import_react.default.forwardRef(
|
|
|
141
143
|
minDate,
|
|
142
144
|
maxDate
|
|
143
145
|
);
|
|
144
|
-
const [renderMonth, setRenderMonth] = (0,
|
|
146
|
+
const [renderMonth, setRenderMonth] = (0, import_react2.useState)(() => {
|
|
145
147
|
const initMonth = formattedValue === void 0 ? formattedDefaultValue == null ? void 0 : formattedDefaultValue[0] : formattedValue == null ? void 0 : formattedValue[0];
|
|
146
148
|
return (0, import_dayjs.default)(initMonth || minDate).toDate();
|
|
147
149
|
});
|
|
@@ -150,21 +152,21 @@ const Calendar = /* @__PURE__ */ import_react.default.forwardRef(
|
|
|
150
152
|
defaultValue: formattedDefaultValue,
|
|
151
153
|
onChange
|
|
152
154
|
});
|
|
153
|
-
const [selectedStartDate, selectedEndDate] = (0,
|
|
155
|
+
const [selectedStartDate, selectedEndDate] = (0, import_react2.useMemo)(() => {
|
|
154
156
|
return [calendarValue == null ? void 0 : calendarValue[0], calendarValue == null ? void 0 : calendarValue[1]];
|
|
155
157
|
}, [calendarValue]);
|
|
156
|
-
const slideDirection = (0,
|
|
158
|
+
const slideDirection = (0, import_react2.useRef)("");
|
|
157
159
|
const isMinMonth = (0, import_dayjs.default)(minDate).isSame(renderMonth, "month");
|
|
158
160
|
const isMaxMonth = (0, import_dayjs.default)(maxDate).isSame(renderMonth, "month");
|
|
159
161
|
const headerBarIcon = {
|
|
160
|
-
left: headerBarLeftIcon ? headerBarLeftIcon({ isMinMonth }) : /* @__PURE__ */
|
|
162
|
+
left: headerBarLeftIcon ? headerBarLeftIcon({ isMinMonth }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
161
163
|
import_icons.CaretLeftIcon,
|
|
162
164
|
{
|
|
163
165
|
className: `${classes.handler}-btn-icon`,
|
|
164
166
|
htmlColor: isMinMonth && "var(--bui-color-fg-disabled)"
|
|
165
167
|
}
|
|
166
168
|
),
|
|
167
|
-
right: headerBarRightIcon ? headerBarRightIcon({ isMaxMonth }) : /* @__PURE__ */
|
|
169
|
+
right: headerBarRightIcon ? headerBarRightIcon({ isMaxMonth }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
168
170
|
import_icons.CaretRightIcon,
|
|
169
171
|
{
|
|
170
172
|
className: `${classes.handler}-btn-icon`,
|
|
@@ -172,7 +174,7 @@ const Calendar = /* @__PURE__ */ import_react.default.forwardRef(
|
|
|
172
174
|
}
|
|
173
175
|
)
|
|
174
176
|
};
|
|
175
|
-
const prevValueRef = (0,
|
|
177
|
+
const prevValueRef = (0, import_react2.useRef)(value);
|
|
176
178
|
(0, import_utils.useDidMountEffect)(() => {
|
|
177
179
|
if (!(0, import_utils2.isEqualVal)(prevValueRef.current, value)) {
|
|
178
180
|
const latestDate = formattedValue == null ? void 0 : formattedValue[0];
|
|
@@ -256,7 +258,7 @@ const Calendar = /* @__PURE__ */ import_react.default.forwardRef(
|
|
|
256
258
|
};
|
|
257
259
|
const defaultDateRender = (ins) => {
|
|
258
260
|
const dayClassName = getDayClassName(ins);
|
|
259
|
-
return /* @__PURE__ */
|
|
261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
260
262
|
"div",
|
|
261
263
|
{
|
|
262
264
|
className: (0, import_clsx.default)(
|
|
@@ -265,9 +267,9 @@ const Calendar = /* @__PURE__ */ import_react.default.forwardRef(
|
|
|
265
267
|
dayClassName
|
|
266
268
|
),
|
|
267
269
|
"aria-disabled": ins == null ? void 0 : ins.disabled,
|
|
268
|
-
"aria-current": (0, import_dayjs.default)(ins.day).isSame((0, import_dayjs.default)(), "day") ? "date" : void 0
|
|
269
|
-
|
|
270
|
-
|
|
270
|
+
"aria-current": (0, import_dayjs.default)(ins.day).isSame((0, import_dayjs.default)(), "day") ? "date" : void 0,
|
|
271
|
+
children: ins.day && (0, import_dayjs.default)(ins.day).format("D")
|
|
272
|
+
}
|
|
271
273
|
);
|
|
272
274
|
};
|
|
273
275
|
const onClickDay = (e, ins) => {
|
|
@@ -297,19 +299,19 @@ const Calendar = /* @__PURE__ */ import_react.default.forwardRef(
|
|
|
297
299
|
return days.map((ins, index) => {
|
|
298
300
|
const dayStr = (0, import_dayjs.default)(ins.day).format("YYYYMMDD");
|
|
299
301
|
const isSelected = selectedStartDate && (0, import_utils2.isSame)(selectedStartDate, ins.day) || selectedEndDate && (0, import_utils2.isSame)(selectedEndDate, ins.day);
|
|
300
|
-
return /* @__PURE__ */
|
|
302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
301
303
|
"div",
|
|
302
304
|
{
|
|
303
305
|
className: (0, import_clsx.default)(`${classes.day}-box`, {
|
|
304
306
|
[`${classes.root}-highlight-day`]: highlightDate === "weekend" && !ins.disabled && (index % 7 === 0 || index % 7 === 6)
|
|
305
307
|
}),
|
|
306
|
-
key: `${dayStr}-${index}`,
|
|
307
308
|
onClick: (e) => onClickDay(e, ins),
|
|
308
309
|
"aria-selected": isSelected,
|
|
309
310
|
"aria-disabled": ins.disabled,
|
|
310
|
-
tabIndex: ins.disabled ? -1 : 0
|
|
311
|
+
tabIndex: ins.disabled ? -1 : 0,
|
|
312
|
+
children: dateRender ? dateRender(ins) : defaultDateRender(ins)
|
|
311
313
|
},
|
|
312
|
-
|
|
314
|
+
`${dayStr}-${index}`
|
|
313
315
|
);
|
|
314
316
|
});
|
|
315
317
|
};
|
|
@@ -343,16 +345,16 @@ const Calendar = /* @__PURE__ */ import_react.default.forwardRef(
|
|
|
343
345
|
};
|
|
344
346
|
const renderMonthDate = () => {
|
|
345
347
|
const hasSlideDirection = !!slideDirection.current;
|
|
346
|
-
const monthDateDom = /* @__PURE__ */
|
|
348
|
+
const monthDateDom = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
347
349
|
"div",
|
|
348
350
|
{
|
|
349
351
|
className: (0, import_clsx.default)(`${classes.root}-month`, {
|
|
350
352
|
"enable-transition": enableTransition,
|
|
351
353
|
visible: enableTransition && !hasSlideDirection
|
|
352
354
|
}),
|
|
353
|
-
"aria-label": "date select"
|
|
354
|
-
|
|
355
|
-
|
|
355
|
+
"aria-label": "date select",
|
|
356
|
+
children: renderDayList()
|
|
357
|
+
}
|
|
356
358
|
);
|
|
357
359
|
if (!enableTransition) {
|
|
358
360
|
return monthDateDom;
|
|
@@ -364,33 +366,33 @@ const Calendar = /* @__PURE__ */ import_react.default.forwardRef(
|
|
|
364
366
|
enterActive: hasSlideDirection && "slide-active",
|
|
365
367
|
enterDone: "slide-enter-done"
|
|
366
368
|
};
|
|
367
|
-
return /* @__PURE__ */
|
|
369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
368
370
|
import_TransitionGroup.default,
|
|
369
371
|
{
|
|
370
372
|
className: (0, import_clsx.default)(`${classes.root}-transition-group`),
|
|
371
373
|
childFactory: (element) => {
|
|
372
|
-
return
|
|
374
|
+
return import_react2.default.cloneElement(element, {
|
|
373
375
|
classNames: transitionClasses
|
|
374
376
|
});
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
377
|
+
},
|
|
378
|
+
children: /* @__PURE__ */ (0, import_react.createElement)(
|
|
379
|
+
import_CSSTransition.default,
|
|
380
|
+
__spreadProps(__spreadValues({
|
|
381
|
+
timeout: 300
|
|
382
|
+
}, CSSTransitionProps), {
|
|
383
|
+
in: true,
|
|
384
|
+
appear: hasSlideDirection,
|
|
385
|
+
mountOnEnter: true,
|
|
386
|
+
unmountOnExit: true,
|
|
387
|
+
key: renderMonth.toString(),
|
|
388
|
+
classNames: transitionClasses
|
|
389
|
+
}),
|
|
390
|
+
monthDateDom
|
|
391
|
+
)
|
|
392
|
+
}
|
|
391
393
|
);
|
|
392
394
|
};
|
|
393
|
-
return /* @__PURE__ */
|
|
395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
394
396
|
"div",
|
|
395
397
|
__spreadProps(__spreadValues(__spreadProps(__spreadValues({
|
|
396
398
|
ref,
|
|
@@ -401,33 +403,39 @@ const Calendar = /* @__PURE__ */ import_react.default.forwardRef(
|
|
|
401
403
|
"data-mode": mode
|
|
402
404
|
}), data), {
|
|
403
405
|
role: "application",
|
|
404
|
-
"aria-label": "Calendar"
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
406
|
+
"aria-label": "Calendar",
|
|
407
|
+
children: [
|
|
408
|
+
!headerVisible && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: classes.handler, children: [
|
|
409
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
410
|
+
"div",
|
|
411
|
+
{
|
|
412
|
+
role: "button",
|
|
413
|
+
onClick: onClickPrev,
|
|
414
|
+
className: `${classes.handler}-btn`,
|
|
415
|
+
"aria-label": "prev month",
|
|
416
|
+
tabIndex: 0,
|
|
417
|
+
children: headerBarIcon.left
|
|
418
|
+
}
|
|
419
|
+
),
|
|
420
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${classes.handler}-text`, "aria-live": "polite", children: (0, import_dayjs.default)(renderMonth).format(headerBarFormat) }),
|
|
421
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
422
|
+
"div",
|
|
423
|
+
{
|
|
424
|
+
role: "button",
|
|
425
|
+
onClick: onClickNext,
|
|
426
|
+
className: `${classes.handler}-btn`,
|
|
427
|
+
"aria-label": "next month",
|
|
428
|
+
tabIndex: 0,
|
|
429
|
+
children: headerBarIcon.right
|
|
430
|
+
}
|
|
431
|
+
)
|
|
432
|
+
] }),
|
|
433
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: classes.week, children: SUNDAY_WEEK_DATA == null ? void 0 : SUNDAY_WEEK_DATA.map((w, idx) => {
|
|
434
|
+
return weekRender ? weekRender(w) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${classes.week}-item`, children: w }, w);
|
|
435
|
+
}) }),
|
|
436
|
+
renderMonthDate()
|
|
437
|
+
]
|
|
438
|
+
})
|
|
431
439
|
);
|
|
432
440
|
}
|
|
433
441
|
);
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const CalendarDemo: () => React.JSX.Element;
|
|
1
|
+
export declare const CalendarDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -30,10 +30,10 @@ __export(A11yDemos_exports, {
|
|
|
30
30
|
CalendarDemo: () => CalendarDemo
|
|
31
31
|
});
|
|
32
32
|
module.exports = __toCommonJS(A11yDemos_exports);
|
|
33
|
-
var
|
|
33
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
34
|
var import_Calendar = __toESM(require("../../Calendar"));
|
|
35
35
|
const CalendarDemo = () => {
|
|
36
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Calendar.default, {});
|
|
37
37
|
};
|
|
38
38
|
// Annotate the CommonJS export names for ESM import in node:
|
|
39
39
|
0 && (module.exports = {
|
package/dist/Card/Card.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { CardProps } from './Card.types';
|
|
3
3
|
import './Card.less';
|
|
4
|
-
declare const Card: React.ForwardRefExoticComponent<Omit<CardProps
|
|
4
|
+
declare const Card: React.ForwardRefExoticComponent<Omit<CardProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default Card;
|
package/dist/Card/Card.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
7
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
8
|
var __getProtoOf = Object.getPrototypeOf;
|
|
@@ -18,6 +20,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
20
|
}
|
|
19
21
|
return a;
|
|
20
22
|
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
24
|
var __objRest = (source, exclude) => {
|
|
22
25
|
var target = {};
|
|
23
26
|
for (var prop in source)
|
|
@@ -56,20 +59,22 @@ __export(Card_exports, {
|
|
|
56
59
|
default: () => Card_default
|
|
57
60
|
});
|
|
58
61
|
module.exports = __toCommonJS(Card_exports);
|
|
62
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
59
63
|
var import_clsx = __toESM(require("clsx"));
|
|
60
64
|
var React = __toESM(require("react"));
|
|
61
65
|
var import_Card2 = require("./Card.css");
|
|
62
66
|
const prefixCls = "bui-card";
|
|
63
67
|
const Card = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
64
68
|
const _a = props, { className, onClick, children } = _a, others = __objRest(_a, ["className", "onClick", "children"]);
|
|
65
|
-
return /* @__PURE__ */
|
|
69
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
66
70
|
"div",
|
|
67
|
-
__spreadValues({
|
|
71
|
+
__spreadProps(__spreadValues({
|
|
68
72
|
className: (0, import_clsx.default)(prefixCls, className),
|
|
69
73
|
onClick,
|
|
70
74
|
ref
|
|
71
|
-
}, others),
|
|
72
|
-
|
|
75
|
+
}, others), {
|
|
76
|
+
children
|
|
77
|
+
})
|
|
73
78
|
);
|
|
74
79
|
});
|
|
75
80
|
Card.displayName = "BuiCard";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { CardContentProps } from './CardContent.types';
|
|
3
3
|
import './CardContent.less';
|
|
4
|
-
declare const CardContent: React.ForwardRefExoticComponent<Omit<CardContentProps
|
|
4
|
+
declare const CardContent: React.ForwardRefExoticComponent<Omit<CardContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default CardContent;
|
package/dist/Card/CardContent.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
7
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
8
|
var __getProtoOf = Object.getPrototypeOf;
|
|
@@ -18,6 +20,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
20
|
}
|
|
19
21
|
return a;
|
|
20
22
|
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
24
|
var __objRest = (source, exclude) => {
|
|
22
25
|
var target = {};
|
|
23
26
|
for (var prop in source)
|
|
@@ -56,6 +59,7 @@ __export(CardContent_exports, {
|
|
|
56
59
|
default: () => CardContent_default
|
|
57
60
|
});
|
|
58
61
|
module.exports = __toCommonJS(CardContent_exports);
|
|
62
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
59
63
|
var import_clsx = __toESM(require("clsx"));
|
|
60
64
|
var React = __toESM(require("react"));
|
|
61
65
|
var import_CardContent2 = require("./CardContent.css");
|
|
@@ -63,7 +67,7 @@ const prefixCls = "bui-card-content";
|
|
|
63
67
|
const CardContent = /* @__PURE__ */ React.forwardRef(
|
|
64
68
|
(props, ref) => {
|
|
65
69
|
const _a = props, { className, children } = _a, others = __objRest(_a, ["className", "children"]);
|
|
66
|
-
return /* @__PURE__ */
|
|
70
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", __spreadProps(__spreadValues({ className: (0, import_clsx.default)(prefixCls, className), ref }, others), { children }));
|
|
67
71
|
}
|
|
68
72
|
);
|
|
69
73
|
CardContent.displayName = "BuiCardContent";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { CardFooterProps } from './CardFooter.types';
|
|
3
3
|
import './CardFooter.less';
|
|
4
|
-
declare const CardFooter: React.ForwardRefExoticComponent<Omit<CardFooterProps
|
|
4
|
+
declare const CardFooter: React.ForwardRefExoticComponent<Omit<CardFooterProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default CardFooter;
|
package/dist/Card/CardFooter.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
7
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
8
|
var __getProtoOf = Object.getPrototypeOf;
|
|
@@ -18,6 +20,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
20
|
}
|
|
19
21
|
return a;
|
|
20
22
|
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
24
|
var __objRest = (source, exclude) => {
|
|
22
25
|
var target = {};
|
|
23
26
|
for (var prop in source)
|
|
@@ -56,6 +59,7 @@ __export(CardFooter_exports, {
|
|
|
56
59
|
default: () => CardFooter_default
|
|
57
60
|
});
|
|
58
61
|
module.exports = __toCommonJS(CardFooter_exports);
|
|
62
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
59
63
|
var import_clsx = __toESM(require("clsx"));
|
|
60
64
|
var React = __toESM(require("react"));
|
|
61
65
|
var import_CardFooter2 = require("./CardFooter.css");
|
|
@@ -63,7 +67,7 @@ const prefixCls = "bui-card-footer";
|
|
|
63
67
|
const CardFooter = /* @__PURE__ */ React.forwardRef(
|
|
64
68
|
(props, ref) => {
|
|
65
69
|
const _a = props, { className, children } = _a, others = __objRest(_a, ["className", "children"]);
|
|
66
|
-
return /* @__PURE__ */
|
|
70
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", __spreadProps(__spreadValues({ className: (0, import_clsx.default)(prefixCls, className), ref }, others), { children }));
|
|
67
71
|
}
|
|
68
72
|
);
|
|
69
73
|
CardFooter.displayName = "BuiCardFooter";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { CardHeaderProps } from './CardHeader.types';
|
|
3
3
|
import './CardHeader.less';
|
|
4
|
-
declare const CardHeader: React.ForwardRefExoticComponent<Omit<CardHeaderProps
|
|
4
|
+
declare const CardHeader: React.ForwardRefExoticComponent<Omit<CardHeaderProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default CardHeader;
|