@bifrostui/react 2.0.0-alpha.32 → 2.0.0-alpha.33
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
package/es/Calendar/Calendar.js
CHANGED
|
@@ -29,6 +29,8 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
33
|
+
import { createElement } from "react";
|
|
32
34
|
import React, { useMemo, useState, useRef } from "react";
|
|
33
35
|
import clsx from "clsx";
|
|
34
36
|
import dayjs from "dayjs";
|
|
@@ -127,14 +129,14 @@ const Calendar = /* @__PURE__ */ React.forwardRef(
|
|
|
127
129
|
const isMinMonth = dayjs(minDate).isSame(renderMonth, "month");
|
|
128
130
|
const isMaxMonth = dayjs(maxDate).isSame(renderMonth, "month");
|
|
129
131
|
const headerBarIcon = {
|
|
130
|
-
left: headerBarLeftIcon ? headerBarLeftIcon({ isMinMonth }) : /* @__PURE__ */
|
|
132
|
+
left: headerBarLeftIcon ? headerBarLeftIcon({ isMinMonth }) : /* @__PURE__ */ jsx(
|
|
131
133
|
CaretLeftIcon,
|
|
132
134
|
{
|
|
133
135
|
className: `${classes.handler}-btn-icon`,
|
|
134
136
|
htmlColor: isMinMonth && "var(--bui-color-fg-disabled)"
|
|
135
137
|
}
|
|
136
138
|
),
|
|
137
|
-
right: headerBarRightIcon ? headerBarRightIcon({ isMaxMonth }) : /* @__PURE__ */
|
|
139
|
+
right: headerBarRightIcon ? headerBarRightIcon({ isMaxMonth }) : /* @__PURE__ */ jsx(
|
|
138
140
|
CaretRightIcon,
|
|
139
141
|
{
|
|
140
142
|
className: `${classes.handler}-btn-icon`,
|
|
@@ -226,7 +228,7 @@ const Calendar = /* @__PURE__ */ React.forwardRef(
|
|
|
226
228
|
};
|
|
227
229
|
const defaultDateRender = (ins) => {
|
|
228
230
|
const dayClassName = getDayClassName(ins);
|
|
229
|
-
return /* @__PURE__ */
|
|
231
|
+
return /* @__PURE__ */ jsx(
|
|
230
232
|
"div",
|
|
231
233
|
{
|
|
232
234
|
className: clsx(
|
|
@@ -235,9 +237,9 @@ const Calendar = /* @__PURE__ */ React.forwardRef(
|
|
|
235
237
|
dayClassName
|
|
236
238
|
),
|
|
237
239
|
"aria-disabled": ins == null ? void 0 : ins.disabled,
|
|
238
|
-
"aria-current": dayjs(ins.day).isSame(dayjs(), "day") ? "date" : void 0
|
|
239
|
-
|
|
240
|
-
|
|
240
|
+
"aria-current": dayjs(ins.day).isSame(dayjs(), "day") ? "date" : void 0,
|
|
241
|
+
children: ins.day && dayjs(ins.day).format("D")
|
|
242
|
+
}
|
|
241
243
|
);
|
|
242
244
|
};
|
|
243
245
|
const onClickDay = (e, ins) => {
|
|
@@ -267,19 +269,19 @@ const Calendar = /* @__PURE__ */ React.forwardRef(
|
|
|
267
269
|
return days.map((ins, index) => {
|
|
268
270
|
const dayStr = dayjs(ins.day).format("YYYYMMDD");
|
|
269
271
|
const isSelected = selectedStartDate && isSame(selectedStartDate, ins.day) || selectedEndDate && isSame(selectedEndDate, ins.day);
|
|
270
|
-
return /* @__PURE__ */
|
|
272
|
+
return /* @__PURE__ */ jsx(
|
|
271
273
|
"div",
|
|
272
274
|
{
|
|
273
275
|
className: clsx(`${classes.day}-box`, {
|
|
274
276
|
[`${classes.root}-highlight-day`]: highlightDate === "weekend" && !ins.disabled && (index % 7 === 0 || index % 7 === 6)
|
|
275
277
|
}),
|
|
276
|
-
key: `${dayStr}-${index}`,
|
|
277
278
|
onClick: (e) => onClickDay(e, ins),
|
|
278
279
|
"aria-selected": isSelected,
|
|
279
280
|
"aria-disabled": ins.disabled,
|
|
280
|
-
tabIndex: ins.disabled ? -1 : 0
|
|
281
|
+
tabIndex: ins.disabled ? -1 : 0,
|
|
282
|
+
children: dateRender ? dateRender(ins) : defaultDateRender(ins)
|
|
281
283
|
},
|
|
282
|
-
|
|
284
|
+
`${dayStr}-${index}`
|
|
283
285
|
);
|
|
284
286
|
});
|
|
285
287
|
};
|
|
@@ -313,16 +315,16 @@ const Calendar = /* @__PURE__ */ React.forwardRef(
|
|
|
313
315
|
};
|
|
314
316
|
const renderMonthDate = () => {
|
|
315
317
|
const hasSlideDirection = !!slideDirection.current;
|
|
316
|
-
const monthDateDom = /* @__PURE__ */
|
|
318
|
+
const monthDateDom = /* @__PURE__ */ jsx(
|
|
317
319
|
"div",
|
|
318
320
|
{
|
|
319
321
|
className: clsx(`${classes.root}-month`, {
|
|
320
322
|
"enable-transition": enableTransition,
|
|
321
323
|
visible: enableTransition && !hasSlideDirection
|
|
322
324
|
}),
|
|
323
|
-
"aria-label": "date select"
|
|
324
|
-
|
|
325
|
-
|
|
325
|
+
"aria-label": "date select",
|
|
326
|
+
children: renderDayList()
|
|
327
|
+
}
|
|
326
328
|
);
|
|
327
329
|
if (!enableTransition) {
|
|
328
330
|
return monthDateDom;
|
|
@@ -334,7 +336,7 @@ const Calendar = /* @__PURE__ */ React.forwardRef(
|
|
|
334
336
|
enterActive: hasSlideDirection && "slide-active",
|
|
335
337
|
enterDone: "slide-enter-done"
|
|
336
338
|
};
|
|
337
|
-
return /* @__PURE__ */
|
|
339
|
+
return /* @__PURE__ */ jsx(
|
|
338
340
|
TransitionGroup,
|
|
339
341
|
{
|
|
340
342
|
className: clsx(`${classes.root}-transition-group`),
|
|
@@ -342,25 +344,25 @@ const Calendar = /* @__PURE__ */ React.forwardRef(
|
|
|
342
344
|
return React.cloneElement(element, {
|
|
343
345
|
classNames: transitionClasses
|
|
344
346
|
});
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
347
|
+
},
|
|
348
|
+
children: /* @__PURE__ */ createElement(
|
|
349
|
+
CSSTransition,
|
|
350
|
+
__spreadProps(__spreadValues({
|
|
351
|
+
timeout: 300
|
|
352
|
+
}, CSSTransitionProps), {
|
|
353
|
+
in: true,
|
|
354
|
+
appear: hasSlideDirection,
|
|
355
|
+
mountOnEnter: true,
|
|
356
|
+
unmountOnExit: true,
|
|
357
|
+
key: renderMonth.toString(),
|
|
358
|
+
classNames: transitionClasses
|
|
359
|
+
}),
|
|
360
|
+
monthDateDom
|
|
361
|
+
)
|
|
362
|
+
}
|
|
361
363
|
);
|
|
362
364
|
};
|
|
363
|
-
return /* @__PURE__ */
|
|
365
|
+
return /* @__PURE__ */ jsxs(
|
|
364
366
|
"div",
|
|
365
367
|
__spreadProps(__spreadValues(__spreadProps(__spreadValues({
|
|
366
368
|
ref,
|
|
@@ -371,33 +373,39 @@ const Calendar = /* @__PURE__ */ React.forwardRef(
|
|
|
371
373
|
"data-mode": mode
|
|
372
374
|
}), data), {
|
|
373
375
|
role: "application",
|
|
374
|
-
"aria-label": "Calendar"
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
376
|
+
"aria-label": "Calendar",
|
|
377
|
+
children: [
|
|
378
|
+
!headerVisible && /* @__PURE__ */ jsxs("div", { className: classes.handler, children: [
|
|
379
|
+
/* @__PURE__ */ jsx(
|
|
380
|
+
"div",
|
|
381
|
+
{
|
|
382
|
+
role: "button",
|
|
383
|
+
onClick: onClickPrev,
|
|
384
|
+
className: `${classes.handler}-btn`,
|
|
385
|
+
"aria-label": "prev month",
|
|
386
|
+
tabIndex: 0,
|
|
387
|
+
children: headerBarIcon.left
|
|
388
|
+
}
|
|
389
|
+
),
|
|
390
|
+
/* @__PURE__ */ jsx("div", { className: `${classes.handler}-text`, "aria-live": "polite", children: dayjs(renderMonth).format(headerBarFormat) }),
|
|
391
|
+
/* @__PURE__ */ jsx(
|
|
392
|
+
"div",
|
|
393
|
+
{
|
|
394
|
+
role: "button",
|
|
395
|
+
onClick: onClickNext,
|
|
396
|
+
className: `${classes.handler}-btn`,
|
|
397
|
+
"aria-label": "next month",
|
|
398
|
+
tabIndex: 0,
|
|
399
|
+
children: headerBarIcon.right
|
|
400
|
+
}
|
|
401
|
+
)
|
|
402
|
+
] }),
|
|
403
|
+
/* @__PURE__ */ jsx("div", { className: classes.week, children: SUNDAY_WEEK_DATA == null ? void 0 : SUNDAY_WEEK_DATA.map((w, idx) => {
|
|
404
|
+
return weekRender ? weekRender(w) : /* @__PURE__ */ jsx("div", { className: `${classes.week}-item`, children: w }, w);
|
|
405
|
+
}) }),
|
|
406
|
+
renderMonthDate()
|
|
407
|
+
]
|
|
408
|
+
})
|
|
401
409
|
);
|
|
402
410
|
}
|
|
403
411
|
);
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const CalendarDemo: () => React.JSX.Element;
|
|
1
|
+
export declare const CalendarDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import Calendar from "../../Calendar";
|
|
3
3
|
const CalendarDemo = () => {
|
|
4
|
-
return /* @__PURE__ */
|
|
4
|
+
return /* @__PURE__ */ jsx(Calendar, {});
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
7
|
CalendarDemo
|
package/es/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/es/Card/Card.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -14,6 +16,7 @@ var __spreadValues = (a, b) => {
|
|
|
14
16
|
}
|
|
15
17
|
return a;
|
|
16
18
|
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
17
20
|
var __objRest = (source, exclude) => {
|
|
18
21
|
var target = {};
|
|
19
22
|
for (var prop in source)
|
|
@@ -26,20 +29,22 @@ var __objRest = (source, exclude) => {
|
|
|
26
29
|
}
|
|
27
30
|
return target;
|
|
28
31
|
};
|
|
32
|
+
import { jsx } from "react/jsx-runtime";
|
|
29
33
|
import clsx from "clsx";
|
|
30
34
|
import * as React from "react";
|
|
31
35
|
import "./Card.css";
|
|
32
36
|
const prefixCls = "bui-card";
|
|
33
37
|
const Card = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
34
38
|
const _a = props, { className, onClick, children } = _a, others = __objRest(_a, ["className", "onClick", "children"]);
|
|
35
|
-
return /* @__PURE__ */
|
|
39
|
+
return /* @__PURE__ */ jsx(
|
|
36
40
|
"div",
|
|
37
|
-
__spreadValues({
|
|
41
|
+
__spreadProps(__spreadValues({
|
|
38
42
|
className: clsx(prefixCls, className),
|
|
39
43
|
onClick,
|
|
40
44
|
ref
|
|
41
|
-
}, others),
|
|
42
|
-
|
|
45
|
+
}, others), {
|
|
46
|
+
children
|
|
47
|
+
})
|
|
43
48
|
);
|
|
44
49
|
});
|
|
45
50
|
Card.displayName = "BuiCard";
|
package/es/Card/CardContent.d.ts
CHANGED
|
@@ -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/es/Card/CardContent.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -14,6 +16,7 @@ var __spreadValues = (a, b) => {
|
|
|
14
16
|
}
|
|
15
17
|
return a;
|
|
16
18
|
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
17
20
|
var __objRest = (source, exclude) => {
|
|
18
21
|
var target = {};
|
|
19
22
|
for (var prop in source)
|
|
@@ -26,6 +29,7 @@ var __objRest = (source, exclude) => {
|
|
|
26
29
|
}
|
|
27
30
|
return target;
|
|
28
31
|
};
|
|
32
|
+
import { jsx } from "react/jsx-runtime";
|
|
29
33
|
import clsx from "clsx";
|
|
30
34
|
import * as React from "react";
|
|
31
35
|
import "./CardContent.css";
|
|
@@ -33,7 +37,7 @@ const prefixCls = "bui-card-content";
|
|
|
33
37
|
const CardContent = /* @__PURE__ */ React.forwardRef(
|
|
34
38
|
(props, ref) => {
|
|
35
39
|
const _a = props, { className, children } = _a, others = __objRest(_a, ["className", "children"]);
|
|
36
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({ className: clsx(prefixCls, className), ref }, others), { children }));
|
|
37
41
|
}
|
|
38
42
|
);
|
|
39
43
|
CardContent.displayName = "BuiCardContent";
|
package/es/Card/CardFooter.d.ts
CHANGED
|
@@ -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/es/Card/CardFooter.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -14,6 +16,7 @@ var __spreadValues = (a, b) => {
|
|
|
14
16
|
}
|
|
15
17
|
return a;
|
|
16
18
|
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
17
20
|
var __objRest = (source, exclude) => {
|
|
18
21
|
var target = {};
|
|
19
22
|
for (var prop in source)
|
|
@@ -26,6 +29,7 @@ var __objRest = (source, exclude) => {
|
|
|
26
29
|
}
|
|
27
30
|
return target;
|
|
28
31
|
};
|
|
32
|
+
import { jsx } from "react/jsx-runtime";
|
|
29
33
|
import clsx from "clsx";
|
|
30
34
|
import * as React from "react";
|
|
31
35
|
import "./CardFooter.css";
|
|
@@ -33,7 +37,7 @@ const prefixCls = "bui-card-footer";
|
|
|
33
37
|
const CardFooter = /* @__PURE__ */ React.forwardRef(
|
|
34
38
|
(props, ref) => {
|
|
35
39
|
const _a = props, { className, children } = _a, others = __objRest(_a, ["className", "children"]);
|
|
36
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({ className: clsx(prefixCls, className), ref }, others), { children }));
|
|
37
41
|
}
|
|
38
42
|
);
|
|
39
43
|
CardFooter.displayName = "BuiCardFooter";
|
package/es/Card/CardHeader.d.ts
CHANGED
|
@@ -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;
|
package/es/Card/CardHeader.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -14,6 +16,7 @@ var __spreadValues = (a, b) => {
|
|
|
14
16
|
}
|
|
15
17
|
return a;
|
|
16
18
|
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
17
20
|
var __objRest = (source, exclude) => {
|
|
18
21
|
var target = {};
|
|
19
22
|
for (var prop in source)
|
|
@@ -26,6 +29,7 @@ var __objRest = (source, exclude) => {
|
|
|
26
29
|
}
|
|
27
30
|
return target;
|
|
28
31
|
};
|
|
32
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
29
33
|
import { ArrowForwardIcon } from "@bifrostui/icons";
|
|
30
34
|
import clsx from "clsx";
|
|
31
35
|
import * as React from "react";
|
|
@@ -36,27 +40,30 @@ const CardHeader = /* @__PURE__ */ React.forwardRef(
|
|
|
36
40
|
const _a = props, { title, subtitle, className, extra, endIcon, onClick } = _a, others = __objRest(_a, ["title", "subtitle", "className", "extra", "endIcon", "onClick"]);
|
|
37
41
|
const chevron = (() => {
|
|
38
42
|
if (typeof endIcon === "boolean") {
|
|
39
|
-
return endIcon ? /* @__PURE__ */
|
|
43
|
+
return endIcon ? /* @__PURE__ */ jsx(ArrowForwardIcon, { size: "small", color: "disabled" }) : null;
|
|
40
44
|
}
|
|
41
45
|
if (React.isValidElement(endIcon)) {
|
|
42
46
|
return endIcon;
|
|
43
47
|
}
|
|
44
48
|
if (onClick) {
|
|
45
|
-
return /* @__PURE__ */
|
|
49
|
+
return /* @__PURE__ */ jsx(ArrowForwardIcon, { size: "small", color: "disabled" });
|
|
46
50
|
}
|
|
47
51
|
return null;
|
|
48
52
|
})();
|
|
49
|
-
return title || subtitle ? /* @__PURE__ */
|
|
53
|
+
return title || subtitle ? /* @__PURE__ */ jsxs(
|
|
50
54
|
"div",
|
|
51
|
-
__spreadValues({
|
|
55
|
+
__spreadProps(__spreadValues({
|
|
52
56
|
className: clsx(prefixCls, className),
|
|
53
57
|
onClick,
|
|
54
58
|
ref
|
|
55
|
-
}, others),
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
}, others), {
|
|
60
|
+
children: [
|
|
61
|
+
title && /* @__PURE__ */ jsx("div", { className: `${prefixCls}-title`, children: title }),
|
|
62
|
+
subtitle && /* @__PURE__ */ jsx("div", { className: clsx(`${prefixCls}-subtitle`), children: subtitle }),
|
|
63
|
+
extra && /* @__PURE__ */ jsx("div", { className: `${prefixCls}-extra`, children: extra }),
|
|
64
|
+
chevron && /* @__PURE__ */ jsx("div", { className: `${prefixCls}-end-icon`, children: chevron })
|
|
65
|
+
]
|
|
66
|
+
})
|
|
60
67
|
) : null;
|
|
61
68
|
}
|
|
62
69
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CheckboxProps } from './Checkbox.types';
|
|
3
3
|
import './index.less';
|
|
4
|
-
declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxProps
|
|
4
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default Checkbox;
|
package/es/Checkbox/Checkbox.js
CHANGED
|
@@ -29,10 +29,14 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
-
import {
|
|
32
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
33
|
+
import {
|
|
34
|
+
NotCheckedCircleOutlinedIcon,
|
|
35
|
+
SuccessCircleFilledIcon
|
|
36
|
+
} from "@bifrostui/icons-pioneer";
|
|
33
37
|
import { useValue } from "@bifrostui/utils";
|
|
34
38
|
import clsx from "clsx";
|
|
35
|
-
import
|
|
39
|
+
import { forwardRef, useContext } from "react";
|
|
36
40
|
import CheckboxContext from "./CheckboxContext";
|
|
37
41
|
import "./index.css";
|
|
38
42
|
const prefixCls = "bui-checkbox";
|
|
@@ -82,8 +86,8 @@ const Checkbox = forwardRef((props, ref) => {
|
|
|
82
86
|
if (groupContext && !value) {
|
|
83
87
|
console.error("CheckboxGroup\u6A21\u5F0F\u4E0BCheckbox\u987B\u4F20\u5165value\u5C5E\u6027");
|
|
84
88
|
}
|
|
85
|
-
const checkboxCheckIcon = checkedIcon || /* @__PURE__ */
|
|
86
|
-
const checkboxUncheckIcon = icon || /* @__PURE__ */
|
|
89
|
+
const checkboxCheckIcon = checkedIcon || /* @__PURE__ */ jsx(SuccessCircleFilledIcon, { color: "primary" });
|
|
90
|
+
const checkboxUncheckIcon = icon || /* @__PURE__ */ jsx(NotCheckedCircleOutlinedIcon, { color: "disabled" });
|
|
87
91
|
const checkboxDisabled = disabled !== void 0 ? disabled : (groupContext == null ? void 0 : groupContext.disabled) || false;
|
|
88
92
|
const handleChange = (e) => {
|
|
89
93
|
var _a2, _b2, _c2;
|
|
@@ -100,9 +104,9 @@ const Checkbox = forwardRef((props, ref) => {
|
|
|
100
104
|
(_c2 = groupContext == null ? void 0 : groupContext.unselect) == null ? void 0 : _c2.call(groupContext, e, value);
|
|
101
105
|
}
|
|
102
106
|
};
|
|
103
|
-
return /* @__PURE__ */
|
|
107
|
+
return /* @__PURE__ */ jsxs(
|
|
104
108
|
"div",
|
|
105
|
-
__spreadValues({
|
|
109
|
+
__spreadProps(__spreadValues({
|
|
106
110
|
ref,
|
|
107
111
|
className: clsx(
|
|
108
112
|
prefixCls,
|
|
@@ -112,23 +116,26 @@ const Checkbox = forwardRef((props, ref) => {
|
|
|
112
116
|
[`${prefixCls}-disabled`]: checkboxDisabled
|
|
113
117
|
}
|
|
114
118
|
)
|
|
115
|
-
}, others),
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
119
|
+
}, others), {
|
|
120
|
+
children: [
|
|
121
|
+
/* @__PURE__ */ jsx(
|
|
122
|
+
"input",
|
|
123
|
+
__spreadProps(__spreadValues(__spreadValues({
|
|
124
|
+
ref: inputRef,
|
|
125
|
+
type: "checkbox",
|
|
126
|
+
value,
|
|
127
|
+
name,
|
|
128
|
+
checked: checkboxChecked,
|
|
129
|
+
disabled: checkboxDisabled
|
|
130
|
+
}, ariaProps), inputProps), {
|
|
131
|
+
onChange: handleChange,
|
|
132
|
+
className: clsx(`${prefixCls}-input`, inputProps == null ? void 0 : inputProps.className)
|
|
133
|
+
})
|
|
134
|
+
),
|
|
135
|
+
/* @__PURE__ */ jsx("div", { className: `${prefixCls}-icon`, children: checkboxChecked ? checkboxCheckIcon : checkboxUncheckIcon }),
|
|
136
|
+
children && /* @__PURE__ */ jsx("div", { className: `${prefixCls}-label`, children })
|
|
137
|
+
]
|
|
138
|
+
})
|
|
132
139
|
);
|
|
133
140
|
});
|
|
134
141
|
Checkbox.displayName = "BuiCheckbox";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CheckboxGroupProps } from './Checkbox.types';
|
|
3
3
|
import './index.less';
|
|
4
|
-
declare const CheckboxGroup: React.ForwardRefExoticComponent<Omit<CheckboxGroupProps
|
|
4
|
+
declare const CheckboxGroup: React.ForwardRefExoticComponent<Omit<CheckboxGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default CheckboxGroup;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -14,6 +16,7 @@ var __spreadValues = (a, b) => {
|
|
|
14
16
|
}
|
|
15
17
|
return a;
|
|
16
18
|
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
17
20
|
var __objRest = (source, exclude) => {
|
|
18
21
|
var target = {};
|
|
19
22
|
for (var prop in source)
|
|
@@ -26,9 +29,10 @@ var __objRest = (source, exclude) => {
|
|
|
26
29
|
}
|
|
27
30
|
return target;
|
|
28
31
|
};
|
|
32
|
+
import { jsx } from "react/jsx-runtime";
|
|
29
33
|
import { useValue } from "@bifrostui/utils";
|
|
30
34
|
import clsx from "clsx";
|
|
31
|
-
import
|
|
35
|
+
import { forwardRef } from "react";
|
|
32
36
|
import { CheckboxContextProvider } from "./CheckboxContext";
|
|
33
37
|
import "./index.css";
|
|
34
38
|
const prefixCls = "bui-checkbox-group";
|
|
@@ -62,7 +66,7 @@ const CheckboxGroup = forwardRef(
|
|
|
62
66
|
const values = groupValue.filter((item) => item !== v);
|
|
63
67
|
triggerChange(e, values);
|
|
64
68
|
};
|
|
65
|
-
return /* @__PURE__ */
|
|
69
|
+
return /* @__PURE__ */ jsx(
|
|
66
70
|
CheckboxContextProvider,
|
|
67
71
|
{
|
|
68
72
|
value: {
|
|
@@ -71,9 +75,9 @@ const CheckboxGroup = forwardRef(
|
|
|
71
75
|
select,
|
|
72
76
|
unselect,
|
|
73
77
|
disabled
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
78
|
+
},
|
|
79
|
+
children: /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({ ref, className: clsx(prefixCls, className) }, others), { children }))
|
|
80
|
+
}
|
|
77
81
|
);
|
|
78
82
|
}
|
|
79
83
|
);
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
/**
|
|
3
2
|
* 自定义 Checkbox 组件 Demo 集合
|
|
4
3
|
* 这个文件包含多个测试 demo,展示如何使用 getCustomDemoCodesFromFile 进行无障碍测试
|
|
5
4
|
* 文件名必须是 customDemoComponent.tsx(固定约定)
|
|
6
5
|
*/
|
|
7
|
-
export declare const basicCheckboxDemo: () =>
|
|
8
|
-
export declare const disabledCheckboxDemo: () =>
|
|
9
|
-
export declare const ariaLabelCheckboxDemo: () =>
|
|
6
|
+
export declare const basicCheckboxDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const disabledCheckboxDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const ariaLabelCheckboxDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
declare const _default: {
|
|
11
|
-
basicCheckboxDemo: () =>
|
|
12
|
-
disabledCheckboxDemo: () =>
|
|
13
|
-
ariaLabelCheckboxDemo: () =>
|
|
10
|
+
basicCheckboxDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
disabledCheckboxDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
ariaLabelCheckboxDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
};
|
|
15
14
|
export default _default;
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Checkbox from "../../Checkbox";
|
|
3
3
|
const basicCheckboxDemo = () => {
|
|
4
|
-
return /* @__PURE__ */
|
|
4
|
+
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("label", { children: [
|
|
5
|
+
/* @__PURE__ */ jsx(Checkbox, { checked: true }),
|
|
6
|
+
"Checkbox"
|
|
7
|
+
] }) });
|
|
5
8
|
};
|
|
6
9
|
const disabledCheckboxDemo = () => {
|
|
7
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("label", { children: [
|
|
11
|
+
/* @__PURE__ */ jsx(Checkbox, { disabled: true }),
|
|
12
|
+
"Checkbox"
|
|
13
|
+
] }) });
|
|
8
14
|
};
|
|
9
15
|
const ariaLabelCheckboxDemo = () => {
|
|
10
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Checkbox, { inputProps: { "aria-label": "\u590D\u9009\u6846" }, children: "Checkbox" }) });
|
|
11
17
|
};
|
|
12
18
|
var A11yDemos_default = {
|
|
13
19
|
basicCheckboxDemo,
|
package/es/Checkbox/index.css
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
:root,
|
|
2
2
|
page,
|
|
3
3
|
xhs-page {
|
|
4
|
-
--bui-checkbox-label-color: var(--bui-color-fg-
|
|
5
|
-
--bui-checkbox-label-font-size: var(--bui-text-size-
|
|
6
|
-
--bui-checkbox-icon-font-size: var(--bui-
|
|
4
|
+
--bui-checkbox-label-color: var(--bui-color-fg-subtle);
|
|
5
|
+
--bui-checkbox-label-font-size: var(--bui-text-size-3);
|
|
6
|
+
--bui-checkbox-icon-font-size: var(--bui-font-size-md2);
|
|
7
7
|
--bui-checkbox-disabled-opacity: 0.5;
|
|
8
|
-
--bui-checkbox-icon-padding:
|
|
8
|
+
--bui-checkbox-icon-padding: var(--bui-spacing-3);
|
|
9
9
|
}
|
|
10
10
|
.bui-checkbox {
|
|
11
11
|
display: inline-flex;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CitySelectorProps } from './CitySelector.types';
|
|
3
|
-
declare const CitySelector: React.ForwardRefExoticComponent<Omit<CitySelectorProps
|
|
3
|
+
declare const CitySelector: React.ForwardRefExoticComponent<Omit<CitySelectorProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
4
|
export default CitySelector;
|