@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
|
@@ -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_Picker = __toESM(require("../../Picker"));
|
|
35
35
|
const CalendarDemo = () => {
|
|
36
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
37
37
|
import_Picker.default,
|
|
38
38
|
{
|
|
39
39
|
open: true,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { PopoverProps } from './Popover.types';
|
|
3
3
|
import './index.less';
|
|
4
|
-
declare const Popover: React.ForwardRefExoticComponent<Omit<PopoverProps
|
|
4
|
+
declare const Popover: React.ForwardRefExoticComponent<Omit<PopoverProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default Popover;
|
package/dist/Popover/Popover.js
CHANGED
|
@@ -59,6 +59,7 @@ __export(Popover_exports, {
|
|
|
59
59
|
default: () => Popover_default
|
|
60
60
|
});
|
|
61
61
|
module.exports = __toCommonJS(Popover_exports);
|
|
62
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
62
63
|
var import_clsx = __toESM(require("clsx"));
|
|
63
64
|
var React = __toESM(require("react"));
|
|
64
65
|
var import_utils = require("@bifrostui/utils");
|
|
@@ -179,59 +180,71 @@ const Popover = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
179
180
|
}), React.isValidElement(children) && (children.type === "button" || children.type === "a" || ((_b = children.props) == null ? void 0 : _b.role) === "button") && {
|
|
180
181
|
"aria-expanded": isOpen
|
|
181
182
|
});
|
|
182
|
-
return /* @__PURE__ */
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
e
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
184
|
+
isOpen ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Portal.default, { onMounted, children: [
|
|
185
|
+
backdropProps && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
186
|
+
import_Backdrop.default,
|
|
187
|
+
__spreadValues({
|
|
188
|
+
className: "bui-popover-backdrop",
|
|
189
|
+
style: {
|
|
190
|
+
zIndex: 999
|
|
191
|
+
},
|
|
192
|
+
open: isOpen,
|
|
193
|
+
invisible: true,
|
|
194
|
+
role: "button",
|
|
195
|
+
tabIndex: -1,
|
|
196
|
+
onKeyDown: (e) => {
|
|
197
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
198
|
+
e.preventDefault();
|
|
199
|
+
if ((backdropProps == null ? void 0 : backdropProps.onClick) && typeof backdropProps.onClick === "function") {
|
|
200
|
+
backdropProps.onClick(
|
|
201
|
+
e
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
200
205
|
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
206
|
+
}, backdropProps)
|
|
207
|
+
),
|
|
208
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
209
|
+
"div",
|
|
210
|
+
__spreadProps(__spreadValues({
|
|
211
|
+
className: (0, import_clsx.default)(prefixCls, className, `popover-${arrowDirection}`, {
|
|
212
|
+
"bui-popover-arrow-hide": hideArrow
|
|
213
|
+
}),
|
|
214
|
+
style: __spreadValues(__spreadValues({}, style), toolStyles),
|
|
215
|
+
ref: nodeRef,
|
|
216
|
+
id: popoverId,
|
|
217
|
+
role,
|
|
218
|
+
"aria-label": ariaLabel,
|
|
219
|
+
"aria-labelledby": ariaLabelledby,
|
|
220
|
+
tabIndex: autoFocus ? 0 : void 0,
|
|
221
|
+
onClick: (e) => e.stopPropagation(),
|
|
222
|
+
onKeyDown: (e) => {
|
|
223
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
224
|
+
e.stopPropagation();
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}, others), {
|
|
228
|
+
children: [
|
|
229
|
+
!hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
230
|
+
"div",
|
|
231
|
+
{
|
|
232
|
+
className: (0, import_clsx.default)(
|
|
233
|
+
"bui-popover-arrow",
|
|
234
|
+
`location-${arrowLocation}`
|
|
235
|
+
)
|
|
236
|
+
}
|
|
237
|
+
) : null,
|
|
238
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "bui-popover-content", children: [
|
|
239
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "bui-popover-title", children: title }) : null,
|
|
240
|
+
content ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "bui-popover-inner-content", children: content }) : null
|
|
241
|
+
] })
|
|
242
|
+
]
|
|
243
|
+
})
|
|
244
|
+
)
|
|
245
|
+
] }) : null,
|
|
246
|
+
React.isValidElement(children) ? React.cloneElement(children, childrenOptions) : children
|
|
247
|
+
] });
|
|
235
248
|
});
|
|
236
249
|
Popover.displayName = "BuiPopover";
|
|
237
250
|
var Popover_default = Popover;
|
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
/**
|
|
3
2
|
* 自定义 Popover 组件 Demo 集合
|
|
4
3
|
* 这个文件包含多个测试 demo,展示如何使用 getCustomDemoCodesFromFile 进行无障碍测试
|
|
5
4
|
* 文件名必须是 A11yDemos.tsx(固定约定)
|
|
6
5
|
*/
|
|
7
|
-
export declare const basicPopoverDemo: () =>
|
|
8
|
-
export declare const placementPopoverDemo: () =>
|
|
9
|
-
export declare const triggerPopoverDemo: () =>
|
|
10
|
-
export declare const accessibilityPopoverDemo: () =>
|
|
11
|
-
export declare const complexInteractionPopoverDemo: () =>
|
|
12
|
-
export declare const complexContentPopoverDemo: () =>
|
|
13
|
-
export declare const offsetPopoverDemo: () =>
|
|
14
|
-
export declare const edgeCasePopoverDemo: () =>
|
|
6
|
+
export declare const basicPopoverDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const placementPopoverDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const triggerPopoverDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const accessibilityPopoverDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const complexInteractionPopoverDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const complexContentPopoverDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const offsetPopoverDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const edgeCasePopoverDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
15
14
|
declare const _default: {
|
|
16
|
-
basicPopoverDemo: () =>
|
|
17
|
-
placementPopoverDemo: () =>
|
|
18
|
-
triggerPopoverDemo: () =>
|
|
19
|
-
accessibilityPopoverDemo: () =>
|
|
20
|
-
complexInteractionPopoverDemo: () =>
|
|
21
|
-
complexContentPopoverDemo: () =>
|
|
22
|
-
offsetPopoverDemo: () =>
|
|
23
|
-
edgeCasePopoverDemo: () =>
|
|
15
|
+
basicPopoverDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
placementPopoverDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
triggerPopoverDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
accessibilityPopoverDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
complexInteractionPopoverDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
complexContentPopoverDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
offsetPopoverDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
edgeCasePopoverDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
24
23
|
};
|
|
25
24
|
export default _default;
|
|
@@ -38,48 +38,49 @@ __export(A11yDemos_exports, {
|
|
|
38
38
|
triggerPopoverDemo: () => triggerPopoverDemo
|
|
39
39
|
});
|
|
40
40
|
module.exports = __toCommonJS(A11yDemos_exports);
|
|
41
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
42
|
var React = __toESM(require("react"));
|
|
42
43
|
var import_Popover = __toESM(require("../../Popover"));
|
|
43
44
|
const basicPopoverDemo = () => {
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
45
46
|
import_Popover.default,
|
|
46
47
|
{
|
|
47
48
|
title: "\u57FA\u7840\u6C14\u6CE1",
|
|
48
49
|
content: "\u8FD9\u662F\u4E00\u4E2A\u57FA\u7840\u7684 Popover \u7EC4\u4EF6\u793A\u4F8B",
|
|
49
50
|
defaultOpen: true,
|
|
50
51
|
role: "tooltip",
|
|
51
|
-
"aria-label": "\u5E2E\u52A9\u4FE1\u606F"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
));
|
|
52
|
+
"aria-label": "\u5E2E\u52A9\u4FE1\u606F",
|
|
53
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u57FA\u7840\u6C14\u6CE1" })
|
|
54
|
+
}
|
|
55
|
+
) });
|
|
55
56
|
};
|
|
56
57
|
const placementPopoverDemo = () => {
|
|
57
|
-
return /* @__PURE__ */
|
|
58
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
58
59
|
import_Popover.default,
|
|
59
60
|
{
|
|
60
61
|
title: "\u4F4D\u7F6E\u6D4B\u8BD5",
|
|
61
62
|
content: "\u6D4B\u8BD5\u4E0D\u540C\u4F4D\u7F6E\u7684\u6C14\u6CE1",
|
|
62
63
|
defaultOpen: true,
|
|
63
64
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
64
|
-
role: "tooltip"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
));
|
|
65
|
+
role: "tooltip",
|
|
66
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u4F4D\u7F6E\u6C14\u6CE1" })
|
|
67
|
+
}
|
|
68
|
+
) });
|
|
68
69
|
};
|
|
69
70
|
const triggerPopoverDemo = () => {
|
|
70
|
-
return /* @__PURE__ */
|
|
71
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
71
72
|
import_Popover.default,
|
|
72
73
|
{
|
|
73
74
|
title: "\u89E6\u53D1\u65B9\u5F0F",
|
|
74
75
|
content: "\u6D4B\u8BD5\u4E0D\u540C\u89E6\u53D1\u65B9\u5F0F",
|
|
75
76
|
trigger: ["click", "hover"],
|
|
76
|
-
role: "tooltip"
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
));
|
|
77
|
+
role: "tooltip",
|
|
78
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u89E6\u53D1\u65B9\u5F0F" })
|
|
79
|
+
}
|
|
80
|
+
) });
|
|
80
81
|
};
|
|
81
82
|
const accessibilityPopoverDemo = () => {
|
|
82
|
-
return /* @__PURE__ */
|
|
83
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
83
84
|
import_Popover.default,
|
|
84
85
|
{
|
|
85
86
|
title: "\u65E0\u969C\u788D\u6D4B\u8BD5",
|
|
@@ -87,59 +88,70 @@ const accessibilityPopoverDemo = () => {
|
|
|
87
88
|
defaultOpen: true,
|
|
88
89
|
role: "dialog",
|
|
89
90
|
"aria-label": "\u64CD\u4F5C\u786E\u8BA4\u5BF9\u8BDD\u6846",
|
|
90
|
-
autoFocus: true
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
));
|
|
91
|
+
autoFocus: true,
|
|
92
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u65E0\u969C\u788D\u6C14\u6CE1" })
|
|
93
|
+
}
|
|
94
|
+
) });
|
|
94
95
|
};
|
|
95
96
|
const complexInteractionPopoverDemo = () => {
|
|
96
97
|
const ComplexInteractionPopoverDemo = () => {
|
|
97
98
|
const [open, setOpen] = React.useState(false);
|
|
98
|
-
return /* @__PURE__ */
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
99
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
100
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: () => setOpen(!open), children: open ? "\u5173\u95ED\u6C14\u6CE1" : "\u6253\u5F00\u6C14\u6CE1" }),
|
|
101
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
102
|
+
import_Popover.default,
|
|
103
|
+
{
|
|
104
|
+
title: "\u590D\u6742\u4EA4\u4E92",
|
|
105
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
106
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "\u8FD9\u662F\u4E00\u4E2A\u590D\u6742\u4EA4\u4E92\u7684\u6C14\u6CE1" }),
|
|
107
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: () => setOpen(false), children: "\u5173\u95ED" })
|
|
108
|
+
] }),
|
|
109
|
+
open,
|
|
110
|
+
trigger: "none",
|
|
111
|
+
role: "dialog",
|
|
112
|
+
onOpenChange: (e, data) => {
|
|
113
|
+
setOpen(data.open);
|
|
114
|
+
},
|
|
115
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\u590D\u6742\u4EA4\u4E92\u76EE\u6807" })
|
|
108
116
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
));
|
|
117
|
+
)
|
|
118
|
+
] });
|
|
112
119
|
};
|
|
113
|
-
return /* @__PURE__ */
|
|
120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComplexInteractionPopoverDemo, {});
|
|
114
121
|
};
|
|
115
122
|
const complexContentPopoverDemo = () => {
|
|
116
|
-
return /* @__PURE__ */
|
|
123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
117
124
|
import_Popover.default,
|
|
118
125
|
{
|
|
119
126
|
title: "\u590D\u6742\u5185\u5BB9",
|
|
120
|
-
content: /* @__PURE__ */
|
|
127
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
128
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "\u5305\u542B\u591A\u79CD\u5143\u7D20\u7684\u590D\u6742\u5185\u5BB9\uFF1A" }),
|
|
129
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { placeholder: "\u8F93\u5165\u6846" }),
|
|
130
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u6309\u94AE" }),
|
|
131
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href: "#test", children: "\u94FE\u63A5" })
|
|
132
|
+
] }),
|
|
121
133
|
defaultOpen: true,
|
|
122
134
|
role: "dialog",
|
|
123
|
-
"aria-label": "\u590D\u6742\u5185\u5BB9\u5BF9\u8BDD\u6846"
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
));
|
|
135
|
+
"aria-label": "\u590D\u6742\u5185\u5BB9\u5BF9\u8BDD\u6846",
|
|
136
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u590D\u6742\u5185\u5BB9" })
|
|
137
|
+
}
|
|
138
|
+
) });
|
|
127
139
|
};
|
|
128
140
|
const offsetPopoverDemo = () => {
|
|
129
|
-
return /* @__PURE__ */
|
|
141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
130
142
|
import_Popover.default,
|
|
131
143
|
{
|
|
132
144
|
title: "\u504F\u79FB\u8BBE\u7F6E",
|
|
133
145
|
content: "\u6D4B\u8BD5\u504F\u79FB\u8DDD\u79BB\u8BBE\u7F6E",
|
|
134
146
|
defaultOpen: true,
|
|
135
147
|
offsetSpacing: 20,
|
|
136
|
-
role: "tooltip"
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
));
|
|
148
|
+
role: "tooltip",
|
|
149
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u504F\u79FB\u6C14\u6CE1" })
|
|
150
|
+
}
|
|
151
|
+
) });
|
|
140
152
|
};
|
|
141
153
|
const edgeCasePopoverDemo = () => {
|
|
142
|
-
return /* @__PURE__ */
|
|
154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
143
155
|
import_Popover.default,
|
|
144
156
|
{
|
|
145
157
|
title: "",
|
|
@@ -147,10 +159,10 @@ const edgeCasePopoverDemo = () => {
|
|
|
147
159
|
hideArrow: true,
|
|
148
160
|
defaultOpen: true,
|
|
149
161
|
role: "tooltip",
|
|
150
|
-
closeOnEscape: false
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
));
|
|
162
|
+
closeOnEscape: false,
|
|
163
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u8FB9\u754C\u60C5\u51B5" })
|
|
164
|
+
}
|
|
165
|
+
) });
|
|
154
166
|
};
|
|
155
167
|
var A11yDemos_default = {
|
|
156
168
|
basicPopoverDemo,
|
|
@@ -66,7 +66,7 @@ const usePopoverPosition = ({
|
|
|
66
66
|
}) => {
|
|
67
67
|
const placement = anchorOriginToPlacement(anchorOrigin);
|
|
68
68
|
const { direction, location = "center" } = (0, import_utils.parsePlacement)(placement);
|
|
69
|
-
const childrenRef = (0, import_react.useRef)();
|
|
69
|
+
const childrenRef = (0, import_react.useRef)(null);
|
|
70
70
|
const [arrowDirection, setArrowDirection] = (0, import_react.useState)(direction);
|
|
71
71
|
const [arrowLocation, setArrowLocation] = (0, import_react.useState)(location);
|
|
72
72
|
const [toolStyles, setToolStyles] = (0, import_react.useState)({});
|
package/dist/Portal/Portal.js
CHANGED
|
@@ -48,11 +48,12 @@ __export(Portal_exports, {
|
|
|
48
48
|
default: () => Portal_default
|
|
49
49
|
});
|
|
50
50
|
module.exports = __toCommonJS(Portal_exports);
|
|
51
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
51
52
|
var React = __toESM(require("react"));
|
|
52
53
|
var import_PortalCore = __toESM(require("./PortalCore"));
|
|
53
54
|
const Portal = /* @__PURE__ */ React.forwardRef(
|
|
54
55
|
(props, ref) => {
|
|
55
|
-
return /* @__PURE__ */
|
|
56
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_PortalCore.default, __spreadProps(__spreadValues({}, props), { ref, rootElement: document.body }));
|
|
56
57
|
}
|
|
57
58
|
);
|
|
58
59
|
Portal.displayName = "BuiPortal";
|
|
@@ -48,8 +48,9 @@ __export(Portal_miniapp_exports, {
|
|
|
48
48
|
default: () => Portal_miniapp_default
|
|
49
49
|
});
|
|
50
50
|
module.exports = __toCommonJS(Portal_miniapp_exports);
|
|
51
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
51
52
|
var import_taro = __toESM(require("@tarojs/taro"));
|
|
52
|
-
var import_react =
|
|
53
|
+
var import_react = require("react");
|
|
53
54
|
var import_PortalCore = __toESM(require("./PortalCore"));
|
|
54
55
|
const Portal = (0, import_react.forwardRef)((props, ref) => {
|
|
55
56
|
const { disablePortal } = props;
|
|
@@ -80,7 +81,7 @@ const Portal = (0, import_react.forwardRef)((props, ref) => {
|
|
|
80
81
|
}
|
|
81
82
|
setRootWrapperElement(root);
|
|
82
83
|
}, [disablePortal, initialPageInfo.path]);
|
|
83
|
-
return /* @__PURE__ */
|
|
84
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_PortalCore.default, __spreadProps(__spreadValues({}, props), { ref, rootElement: rootWrapperElement }));
|
|
84
85
|
});
|
|
85
86
|
Portal.displayName = "BuiPortal";
|
|
86
87
|
var Portal_miniapp_default = Portal;
|
|
@@ -4,5 +4,5 @@ import './index.less';
|
|
|
4
4
|
export declare const handleGradient: (strokeColor: ProgressGradient) => {
|
|
5
5
|
backgroundImage: string;
|
|
6
6
|
};
|
|
7
|
-
declare const Progress: React.ForwardRefExoticComponent<Omit<ProgressProps
|
|
7
|
+
declare const Progress: React.ForwardRefExoticComponent<Omit<ProgressProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
8
|
export default Progress;
|
|
@@ -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)
|
|
@@ -57,6 +60,7 @@ __export(Progress_exports, {
|
|
|
57
60
|
handleGradient: () => handleGradient
|
|
58
61
|
});
|
|
59
62
|
module.exports = __toCommonJS(Progress_exports);
|
|
63
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
60
64
|
var import_clsx = __toESM(require("clsx"));
|
|
61
65
|
var React = __toESM(require("react"));
|
|
62
66
|
var import_locales = require("../locales");
|
|
@@ -166,13 +170,14 @@ const Progress = /* @__PURE__ */ React.forwardRef(
|
|
|
166
170
|
};
|
|
167
171
|
return (
|
|
168
172
|
// 外层容器
|
|
169
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
170
174
|
"div",
|
|
171
|
-
__spreadValues(__spreadValues({
|
|
175
|
+
__spreadProps(__spreadValues(__spreadValues({
|
|
172
176
|
className: (0, import_clsx.default)(prefixCls, className),
|
|
173
177
|
ref
|
|
174
|
-
}, accessibilityProps), others),
|
|
175
|
-
|
|
178
|
+
}, accessibilityProps), others), {
|
|
179
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-inner`, style: trailStyle, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-bg`, style: percentStyle }) })
|
|
180
|
+
})
|
|
176
181
|
)
|
|
177
182
|
);
|
|
178
183
|
}
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
/**
|
|
3
2
|
* 自定义 Progress 组件 Demo 集合
|
|
4
3
|
* 这个文件包含多个测试 demo,展示如何使用 getCustomDemoCodesFromFile 进行无障碍测试
|
|
5
4
|
* 文件名必须是 customDemoComponent.tsx(固定约定)
|
|
6
5
|
*/
|
|
7
|
-
export declare const basicProgressDemo: () =>
|
|
8
|
-
export declare const coloredProgressDemo: () =>
|
|
9
|
-
export declare const sizedProgressDemo: () =>
|
|
10
|
-
export declare const gradientProgressDemo: () =>
|
|
11
|
-
export declare const customTrailColorProgressDemo: () =>
|
|
12
|
-
export declare const accessibilityProgressDemo: () =>
|
|
6
|
+
export declare const basicProgressDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const coloredProgressDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const sizedProgressDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const gradientProgressDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const customTrailColorProgressDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const accessibilityProgressDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
13
12
|
declare const _default: {
|
|
14
|
-
basicProgressDemo: () =>
|
|
15
|
-
coloredProgressDemo: () =>
|
|
16
|
-
sizedProgressDemo: () =>
|
|
17
|
-
gradientProgressDemo: () =>
|
|
18
|
-
customTrailColorProgressDemo: () =>
|
|
19
|
-
accessibilityProgressDemo: () =>
|
|
13
|
+
basicProgressDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
coloredProgressDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
sizedProgressDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
gradientProgressDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
customTrailColorProgressDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
accessibilityProgressDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
20
19
|
};
|
|
21
20
|
export default _default;
|
|
@@ -36,50 +36,71 @@ __export(A11yDemos_exports, {
|
|
|
36
36
|
sizedProgressDemo: () => sizedProgressDemo
|
|
37
37
|
});
|
|
38
38
|
module.exports = __toCommonJS(A11yDemos_exports);
|
|
39
|
-
var
|
|
39
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
40
40
|
var import_Progress = __toESM(require("../../Progress"));
|
|
41
41
|
const basicProgressDemo = () => {
|
|
42
|
-
return /* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Progress.default, { percent: 40 }) });
|
|
43
43
|
};
|
|
44
44
|
const coloredProgressDemo = () => {
|
|
45
|
-
return /* @__PURE__ */
|
|
45
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
46
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Progress.default, { percent: 40, strokeColor: "var(--bui-color-primary)" }),
|
|
47
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Progress.default, { percent: 50, strokeColor: "var(--bui-color-info)" }),
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Progress.default, { percent: 30, strokeColor: "var(--bui-color-success)" }),
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Progress.default, { percent: 80, strokeColor: "var(--bui-color-warning)" }),
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Progress.default, { percent: 90, strokeColor: "var(--bui-color-vip)" })
|
|
51
|
+
] });
|
|
46
52
|
};
|
|
47
53
|
const sizedProgressDemo = () => {
|
|
48
|
-
return /* @__PURE__ */
|
|
54
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Progress.default, { percent: 60, strokeWidth: 10 }),
|
|
56
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Progress.default, { percent: 60, strokeWidth: 15 }),
|
|
57
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Progress.default, { percent: 60, strokeWidth: 20 })
|
|
58
|
+
] });
|
|
49
59
|
};
|
|
50
60
|
const gradientProgressDemo = () => {
|
|
51
|
-
return /* @__PURE__ */
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
63
|
+
import_Progress.default,
|
|
64
|
+
{
|
|
65
|
+
percent: 60,
|
|
66
|
+
strokeColor: {
|
|
67
|
+
from: "var(--bui-color-primary)",
|
|
68
|
+
to: "var(--bui-color-primary-light)"
|
|
69
|
+
}
|
|
58
70
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
71
|
+
),
|
|
72
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
73
|
+
import_Progress.default,
|
|
74
|
+
{
|
|
75
|
+
percent: 90,
|
|
76
|
+
strokeColor: {
|
|
77
|
+
"0%": "var(--bui-color-orange)",
|
|
78
|
+
"100%": "var(--bui-color-orange-light)"
|
|
79
|
+
}
|
|
67
80
|
}
|
|
68
|
-
|
|
69
|
-
)
|
|
81
|
+
)
|
|
82
|
+
] });
|
|
70
83
|
};
|
|
71
84
|
const customTrailColorProgressDemo = () => {
|
|
72
|
-
return /* @__PURE__ */
|
|
85
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
86
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Progress.default, { percent: 60, trailColor: "var(--bui-color-primary-light)" }),
|
|
87
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Progress.default, { percent: 80, trailColor: "var(--bui-color-gray-light)" })
|
|
88
|
+
] });
|
|
73
89
|
};
|
|
74
90
|
const accessibilityProgressDemo = () => {
|
|
75
|
-
return /* @__PURE__ */
|
|
76
|
-
import_Progress.default,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
91
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
92
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Progress.default, { percent: 50, "aria-label": "\u6587\u4EF6\u4E0B\u8F7D\u8FDB\u5EA6" }),
|
|
93
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
94
|
+
import_Progress.default,
|
|
95
|
+
{
|
|
96
|
+
percent: 75,
|
|
97
|
+
"aria-label": "\u6570\u636E\u52A0\u8F7D\u8FDB\u5EA6",
|
|
98
|
+
"aria-valuetext": "\u5DF2\u5B8C\u621075%"
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Progress.default, { percent: 30, "aria-describedby": "progress-description" }),
|
|
102
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { id: "progress-description", style: { display: "none" }, children: "\u8FD9\u662F\u8FDB\u5EA6\u6761\u7684\u8BE6\u7EC6\u63CF\u8FF0\u4FE1\u606F" })
|
|
103
|
+
] });
|
|
83
104
|
};
|
|
84
105
|
var A11yDemos_default = {
|
|
85
106
|
basicProgressDemo,
|