@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
|
@@ -53,31 +53,68 @@ __export(A11yDemos_exports, {
|
|
|
53
53
|
topDrawerDemo: () => topDrawerDemo
|
|
54
54
|
});
|
|
55
55
|
module.exports = __toCommonJS(A11yDemos_exports);
|
|
56
|
-
var
|
|
56
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
57
|
+
var import_react = require("react");
|
|
57
58
|
var import_Drawer = __toESM(require("../../Drawer"));
|
|
58
59
|
const basicDrawerDemo = () => {
|
|
59
|
-
return /* @__PURE__ */
|
|
60
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Drawer.default, { open: true, anchor: "bottom", "aria-label": "\u57FA\u7840\u62BD\u5C49", disablePortal: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: "20px", minHeight: "200px" }, children: [
|
|
61
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { children: "\u57FA\u7840\u62BD\u5C49\u5185\u5BB9" }),
|
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "\u8FD9\u662F\u4E00\u4E2A\u4ECE\u5E95\u90E8\u5F39\u51FA\u7684\u62BD\u5C49" }),
|
|
63
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u786E\u8BA4" }),
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u53D6\u6D88" })
|
|
65
|
+
] }) });
|
|
60
66
|
};
|
|
61
67
|
const leftDrawerDemo = () => {
|
|
62
|
-
return /* @__PURE__ */
|
|
68
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Drawer.default, { open: true, anchor: "left", "aria-label": "\u5DE6\u4FA7\u62BD\u5C49", disablePortal: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: "20px", width: "300px", minHeight: "100vh" }, children: [
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { children: "\u5DE6\u4FA7\u62BD\u5C49" }),
|
|
70
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("ul", { children: [
|
|
71
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href: "#item1", children: "\u83DC\u5355\u9879 1" }) }),
|
|
72
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href: "#item2", children: "\u83DC\u5355\u9879 2" }) }),
|
|
73
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href: "#item3", children: "\u83DC\u5355\u9879 3" }) })
|
|
74
|
+
] })
|
|
75
|
+
] }) });
|
|
63
76
|
};
|
|
64
77
|
const rightDrawerDemo = () => {
|
|
65
|
-
return /* @__PURE__ */
|
|
78
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Drawer.default, { open: true, anchor: "right", "aria-label": "\u53F3\u4FA7\u62BD\u5C49", disablePortal: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: "20px", width: "300px", minHeight: "100vh" }, children: [
|
|
79
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { children: "\u53F3\u4FA7\u62BD\u5C49" }),
|
|
80
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("form", { children: [
|
|
81
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { marginBottom: "10px" }, children: [
|
|
82
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { htmlFor: "name", children: "\u59D3\u540D:" }),
|
|
83
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { id: "name", type: "text" })
|
|
84
|
+
] }),
|
|
85
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { marginBottom: "10px" }, children: [
|
|
86
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { htmlFor: "email", children: "\u90AE\u7BB1:" }),
|
|
87
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { id: "email", type: "email" })
|
|
88
|
+
] }),
|
|
89
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "submit", children: "\u63D0\u4EA4" })
|
|
90
|
+
] })
|
|
91
|
+
] }) });
|
|
66
92
|
};
|
|
67
93
|
const topDrawerDemo = () => {
|
|
68
|
-
return /* @__PURE__ */
|
|
94
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Drawer.default, { open: true, anchor: "top", "aria-label": "\u9876\u90E8\u62BD\u5C49", disablePortal: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: "20px", minHeight: "200px" }, children: [
|
|
95
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { children: "\u9876\u90E8\u62BD\u5C49" }),
|
|
96
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "\u8FD9\u662F\u4E00\u4E2A\u4ECE\u9876\u90E8\u5F39\u51FA\u7684\u62BD\u5C49" }),
|
|
97
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
98
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u64CD\u4F5C\u6309\u94AE 1" }),
|
|
99
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u64CD\u4F5C\u6309\u94AE 2" })
|
|
100
|
+
] })
|
|
101
|
+
] }) });
|
|
69
102
|
};
|
|
70
103
|
const noBackdropDrawerDemo = () => {
|
|
71
|
-
return /* @__PURE__ */
|
|
104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
72
105
|
import_Drawer.default,
|
|
73
106
|
{
|
|
74
107
|
open: true,
|
|
75
108
|
anchor: "bottom",
|
|
76
109
|
hideBackdrop: true,
|
|
77
110
|
"aria-label": "\u65E0\u80CC\u666F\u906E\u7F69\u62BD\u5C49",
|
|
78
|
-
disablePortal: true
|
|
79
|
-
|
|
80
|
-
|
|
111
|
+
disablePortal: true,
|
|
112
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: "20px", minHeight: "150px" }, children: [
|
|
113
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { children: "\u65E0\u80CC\u666F\u906E\u7F69" }),
|
|
114
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "\u8FD9\u4E2A\u62BD\u5C49\u6CA1\u6709\u80CC\u666F\u906E\u7F69" }),
|
|
115
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u5173\u95ED" })
|
|
116
|
+
] })
|
|
117
|
+
}
|
|
81
118
|
);
|
|
82
119
|
};
|
|
83
120
|
const interactiveDrawerDemo = () => {
|
|
@@ -93,41 +130,57 @@ const interactiveDrawerDemo = () => {
|
|
|
93
130
|
handleClose();
|
|
94
131
|
};
|
|
95
132
|
if (!open) {
|
|
96
|
-
return /* @__PURE__ */
|
|
133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: () => setOpen(true), children: "\u91CD\u65B0\u6253\u5F00\u62BD\u5C49" });
|
|
97
134
|
}
|
|
98
|
-
return /* @__PURE__ */
|
|
135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
99
136
|
import_Drawer.default,
|
|
100
137
|
{
|
|
101
138
|
open,
|
|
102
139
|
anchor: "right",
|
|
103
140
|
onClose: handleClose,
|
|
104
141
|
"aria-label": "\u53EF\u4EA4\u4E92\u62BD\u5C49",
|
|
105
|
-
disablePortal: true
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
142
|
+
disablePortal: true,
|
|
143
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: "20px", width: "350px" }, children: [
|
|
144
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { children: "\u53CD\u9988\u8868\u5355" }),
|
|
145
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("form", { onSubmit: handleSubmit, children: [
|
|
146
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { marginBottom: "15px" }, children: [
|
|
147
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { htmlFor: "feedback-name", children: "\u59D3\u540D:" }),
|
|
148
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
149
|
+
"input",
|
|
150
|
+
{
|
|
151
|
+
id: "feedback-name",
|
|
152
|
+
type: "text",
|
|
153
|
+
value: formData.name,
|
|
154
|
+
onChange: (e) => setFormData(__spreadProps(__spreadValues({}, formData), { name: e.target.value })),
|
|
155
|
+
required: true,
|
|
156
|
+
"aria-required": "true"
|
|
157
|
+
}
|
|
158
|
+
)
|
|
159
|
+
] }),
|
|
160
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { marginBottom: "15px" }, children: [
|
|
161
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { htmlFor: "feedback-message", children: "\u53CD\u9988\u5185\u5BB9:" }),
|
|
162
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
163
|
+
"textarea",
|
|
164
|
+
{
|
|
165
|
+
id: "feedback-message",
|
|
166
|
+
value: formData.message,
|
|
167
|
+
onChange: (e) => setFormData(__spreadProps(__spreadValues({}, formData), { message: e.target.value })),
|
|
168
|
+
required: true,
|
|
169
|
+
"aria-required": "true",
|
|
170
|
+
rows: 4
|
|
171
|
+
}
|
|
172
|
+
)
|
|
173
|
+
] }),
|
|
174
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
175
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "submit", children: "\u63D0\u4EA4\u53CD\u9988" }),
|
|
176
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: handleClose, children: "\u53D6\u6D88" })
|
|
177
|
+
] })
|
|
178
|
+
] })
|
|
179
|
+
] })
|
|
180
|
+
}
|
|
128
181
|
);
|
|
129
182
|
};
|
|
130
|
-
return /* @__PURE__ */
|
|
183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InteractiveDrawerDemo, {});
|
|
131
184
|
};
|
|
132
185
|
var A11yDemos_default = {
|
|
133
186
|
basicDrawerDemo,
|
package/dist/Fade/Fade.js
CHANGED
|
@@ -59,6 +59,7 @@ __export(Fade_exports, {
|
|
|
59
59
|
default: () => Fade_default
|
|
60
60
|
});
|
|
61
61
|
module.exports = __toCommonJS(Fade_exports);
|
|
62
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
62
63
|
var import_utils = require("@bifrostui/utils");
|
|
63
64
|
var React = __toESM(require("react"));
|
|
64
65
|
var import_Transition = __toESM(require("../Transition"));
|
|
@@ -91,7 +92,7 @@ const Fade = /* @__PURE__ */ React.forwardRef(
|
|
|
91
92
|
]);
|
|
92
93
|
const transitions = (0, import_utils.createTransitions)();
|
|
93
94
|
const nodeRef = (0, import_utils.useForkRef)(ref, children == null ? void 0 : children.ref);
|
|
94
|
-
return /* @__PURE__ */
|
|
95
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
95
96
|
import_Transition.default,
|
|
96
97
|
__spreadProps(__spreadValues({
|
|
97
98
|
appear,
|
|
@@ -99,27 +100,27 @@ const Fade = /* @__PURE__ */ React.forwardRef(
|
|
|
99
100
|
timeout,
|
|
100
101
|
delay
|
|
101
102
|
}, others), {
|
|
102
|
-
ref: nodeRef
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
)
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
},
|
|
121
|
-
}
|
|
122
|
-
}
|
|
103
|
+
ref: nodeRef,
|
|
104
|
+
children: (state, childProps) => {
|
|
105
|
+
const transition = state === "entering" || state === "exiting" ? transitions.create(
|
|
106
|
+
"opacity",
|
|
107
|
+
(0, import_utils.getTransitionProps)(
|
|
108
|
+
{ timeout, style, easing: easingProp, delay },
|
|
109
|
+
{
|
|
110
|
+
mode: state
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
) : "none";
|
|
114
|
+
return React.cloneElement(children, __spreadValues({
|
|
115
|
+
style: __spreadValues(__spreadValues({
|
|
116
|
+
visibility: state === "exited" ? "hidden" : "visible",
|
|
117
|
+
transition,
|
|
118
|
+
WebkitTransition: transition,
|
|
119
|
+
opacity: state === "entering" || state === "entered" ? "1" : "0"
|
|
120
|
+
}, style), children.props.style)
|
|
121
|
+
}, childProps));
|
|
122
|
+
}
|
|
123
|
+
})
|
|
123
124
|
);
|
|
124
125
|
}
|
|
125
126
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IconButtonProps } from './IconButton.types';
|
|
3
3
|
import './index.less';
|
|
4
|
-
declare const IconButton: React.ForwardRefExoticComponent<Omit<IconButtonProps
|
|
4
|
+
declare const IconButton: React.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
5
5
|
export default IconButton;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
7
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
8
|
var __getProtoOf = Object.getPrototypeOf;
|
|
@@ -18,6 +20,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
20
|
}
|
|
19
21
|
return a;
|
|
20
22
|
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
24
|
var __objRest = (source, exclude) => {
|
|
22
25
|
var target = {};
|
|
23
26
|
for (var prop in source)
|
|
@@ -56,6 +59,7 @@ __export(IconButton_exports, {
|
|
|
56
59
|
default: () => IconButton_default
|
|
57
60
|
});
|
|
58
61
|
module.exports = __toCommonJS(IconButton_exports);
|
|
62
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
59
63
|
var import_utils = require("@bifrostui/utils");
|
|
60
64
|
var import_clsx = __toESM(require("clsx"));
|
|
61
65
|
var React = __toESM(require("react"));
|
|
@@ -96,9 +100,9 @@ const IconButton = /* @__PURE__ */ React.forwardRef(
|
|
|
96
100
|
// 禁用状态
|
|
97
101
|
"aria-disabled": disabled
|
|
98
102
|
};
|
|
99
|
-
return /* @__PURE__ */
|
|
103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
100
104
|
"button",
|
|
101
|
-
__spreadValues(__spreadValues({
|
|
105
|
+
__spreadProps(__spreadValues(__spreadValues({
|
|
102
106
|
type: "button",
|
|
103
107
|
className: (0, import_clsx.default)(
|
|
104
108
|
prefixCls,
|
|
@@ -112,13 +116,14 @@ const IconButton = /* @__PURE__ */ React.forwardRef(
|
|
|
112
116
|
className
|
|
113
117
|
),
|
|
114
118
|
ref
|
|
115
|
-
}, accessibilityProps), others),
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
}, accessibilityProps), others), {
|
|
120
|
+
children: import_utils.isMini && React.isValidElement(children) ? React.cloneElement(children, __spreadValues(__spreadValues({}, !isContainedVariant && {
|
|
121
|
+
color: ((_f = children.props) == null ? void 0 : _f.color) || color,
|
|
122
|
+
htmlColor: ((_g = children.props) == null ? void 0 : _g.htmlColor) || "var(--bui-color-fg-subtle)"
|
|
123
|
+
}), isContainedVariant && {
|
|
124
|
+
htmlColor: ((_h = children.props) == null ? void 0 : _h.htmlColor) || "var(--bui-color-white)"
|
|
125
|
+
})) : children
|
|
126
|
+
})
|
|
122
127
|
);
|
|
123
128
|
}
|
|
124
129
|
);
|
package/dist/Image/Image.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ImageProps } from './Image.types';
|
|
3
3
|
import './index.less';
|
|
4
|
-
declare const Image: React.ForwardRefExoticComponent<Omit<ImageProps
|
|
4
|
+
declare const Image: React.ForwardRefExoticComponent<Omit<ImageProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default Image;
|
package/dist/Image/Image.js
CHANGED
|
@@ -59,6 +59,7 @@ __export(Image_exports, {
|
|
|
59
59
|
default: () => Image_default
|
|
60
60
|
});
|
|
61
61
|
module.exports = __toCommonJS(Image_exports);
|
|
62
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
62
63
|
var import_utils = require("@bifrostui/utils");
|
|
63
64
|
var import_clsx = __toESM(require("clsx"));
|
|
64
65
|
var import_react = __toESM(require("react"));
|
|
@@ -124,15 +125,15 @@ const Image = /* @__PURE__ */ import_react.default.forwardRef(
|
|
|
124
125
|
setFailed(false);
|
|
125
126
|
}, [src]);
|
|
126
127
|
const defaultIconWrap = (icon) => {
|
|
127
|
-
return /* @__PURE__ */
|
|
128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
128
129
|
"div",
|
|
129
130
|
{
|
|
130
131
|
className: (0, import_clsx.default)(`${prefixCls}-default-icon-wrap`, {
|
|
131
132
|
"default-holder": !icon
|
|
132
133
|
}),
|
|
133
|
-
"aria-hidden": "true"
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
"aria-hidden": "true",
|
|
135
|
+
children: icon
|
|
136
|
+
}
|
|
136
137
|
);
|
|
137
138
|
};
|
|
138
139
|
const defaultPlaceholder = placeholder === false ? [] : placeholder !== true && defaultIconWrap(placeholder) || defaultIconWrap();
|
|
@@ -143,7 +144,7 @@ const Image = /* @__PURE__ */ import_react.default.forwardRef(
|
|
|
143
144
|
mode: fit && modeEnum[fit],
|
|
144
145
|
showMenuByLongpress: showMenu
|
|
145
146
|
};
|
|
146
|
-
const imgEle = /* @__PURE__ */
|
|
147
|
+
const imgEle = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
147
148
|
"img",
|
|
148
149
|
__spreadValues(__spreadProps(__spreadValues({
|
|
149
150
|
src,
|
|
@@ -170,17 +171,21 @@ const Image = /* @__PURE__ */ import_react.default.forwardRef(
|
|
|
170
171
|
function renderImgEle() {
|
|
171
172
|
if (failed)
|
|
172
173
|
return fallback || defaultPlaceholder;
|
|
173
|
-
return /* @__PURE__ */
|
|
174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
175
|
+
!loaded && defaultPlaceholder,
|
|
176
|
+
imgEle
|
|
177
|
+
] });
|
|
174
178
|
}
|
|
175
|
-
return /* @__PURE__ */
|
|
179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
176
180
|
"div",
|
|
177
|
-
__spreadValues({
|
|
181
|
+
__spreadProps(__spreadValues({
|
|
178
182
|
ref,
|
|
179
183
|
onClick,
|
|
180
184
|
style: __spreadValues({ width, height }, style),
|
|
181
185
|
className: (0, import_clsx.default)(prefixCls, className)
|
|
182
|
-
}, others),
|
|
183
|
-
|
|
186
|
+
}, others), {
|
|
187
|
+
children: renderImgEle()
|
|
188
|
+
})
|
|
184
189
|
);
|
|
185
190
|
}
|
|
186
191
|
);
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
/**
|
|
3
2
|
* 自定义 Image 组件 Demo 集合
|
|
4
3
|
* 这个文件包含多个测试 demo,展示如何使用 getCustomDemoCodesFromFile 进行无障碍测试
|
|
5
4
|
* 文件名必须是 A11yDemos.tsx(固定约定)
|
|
6
5
|
*/
|
|
7
|
-
export declare const basicImageDemo: () =>
|
|
8
|
-
export declare const ClickableImageDemo: () =>
|
|
9
|
-
export declare const placeholderImageDemo: () =>
|
|
10
|
-
export declare const errorImageDemo: () =>
|
|
11
|
-
export declare const lazyImageDemo: () =>
|
|
12
|
-
export declare const noAltImageDemo: () =>
|
|
6
|
+
export declare const basicImageDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const ClickableImageDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const placeholderImageDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const errorImageDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const lazyImageDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const noAltImageDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
13
12
|
declare const _default: {
|
|
14
|
-
basicImageDemo: () =>
|
|
15
|
-
ClickableImageDemo: () =>
|
|
16
|
-
placeholderImageDemo: () =>
|
|
17
|
-
errorImageDemo: () =>
|
|
18
|
-
lazyImageDemo: () =>
|
|
19
|
-
noAltImageDemo: () =>
|
|
13
|
+
basicImageDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
ClickableImageDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
placeholderImageDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
errorImageDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
lazyImageDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
noAltImageDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
20
19
|
};
|
|
21
20
|
export default _default;
|
|
@@ -36,10 +36,11 @@ __export(A11yDemos_exports, {
|
|
|
36
36
|
placeholderImageDemo: () => placeholderImageDemo
|
|
37
37
|
});
|
|
38
38
|
module.exports = __toCommonJS(A11yDemos_exports);
|
|
39
|
-
var
|
|
39
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
40
|
+
var import_react = require("react");
|
|
40
41
|
var import_Image = __toESM(require("../../Image"));
|
|
41
42
|
const basicImageDemo = () => {
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
43
44
|
import_Image.default,
|
|
44
45
|
{
|
|
45
46
|
src: "https://via.placeholder.com/150x100",
|
|
@@ -47,50 +48,53 @@ const basicImageDemo = () => {
|
|
|
47
48
|
width: 150,
|
|
48
49
|
height: 100
|
|
49
50
|
}
|
|
50
|
-
));
|
|
51
|
+
) });
|
|
51
52
|
};
|
|
52
53
|
const ClickableImageDemo = () => {
|
|
53
54
|
const [clicked, setClicked] = (0, import_react.useState)(false);
|
|
54
|
-
return /* @__PURE__ */
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
56
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
57
|
+
import_Image.default,
|
|
58
|
+
{
|
|
59
|
+
src: "https://via.placeholder.com/150x100",
|
|
60
|
+
alt: "\u53EF\u70B9\u51FB\u7684\u793A\u4F8B\u56FE\u7247",
|
|
61
|
+
width: 150,
|
|
62
|
+
height: 100,
|
|
63
|
+
onClick: () => {
|
|
64
|
+
setClicked(!clicked);
|
|
65
|
+
console.log("\u56FE\u7247\u88AB\u70B9\u51FB\u4E86");
|
|
66
|
+
}
|
|
64
67
|
}
|
|
65
|
-
|
|
66
|
-
|
|
68
|
+
),
|
|
69
|
+
clicked && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "\u56FE\u7247\u5DF2\u88AB\u70B9\u51FB" })
|
|
70
|
+
] });
|
|
67
71
|
};
|
|
68
72
|
const placeholderImageDemo = () => {
|
|
69
|
-
return /* @__PURE__ */
|
|
73
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
70
74
|
import_Image.default,
|
|
71
75
|
{
|
|
72
76
|
src: "",
|
|
73
77
|
alt: "\u5E26\u5360\u4F4D\u7B26\u7684\u56FE\u7247",
|
|
74
78
|
width: 150,
|
|
75
79
|
height: 100,
|
|
76
|
-
placeholder: /* @__PURE__ */
|
|
80
|
+
placeholder: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "\u52A0\u8F7D\u4E2D..." })
|
|
77
81
|
}
|
|
78
|
-
));
|
|
82
|
+
) });
|
|
79
83
|
};
|
|
80
84
|
const errorImageDemo = () => {
|
|
81
|
-
return /* @__PURE__ */
|
|
85
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
82
86
|
import_Image.default,
|
|
83
87
|
{
|
|
84
88
|
src: "https://invalid-url.com/nonexistent.jpg",
|
|
85
89
|
alt: "\u52A0\u8F7D\u5931\u8D25\u7684\u56FE\u7247",
|
|
86
90
|
width: 150,
|
|
87
91
|
height: 100,
|
|
88
|
-
fallback: /* @__PURE__ */
|
|
92
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "\u56FE\u7247\u52A0\u8F7D\u5931\u8D25" })
|
|
89
93
|
}
|
|
90
|
-
));
|
|
94
|
+
) });
|
|
91
95
|
};
|
|
92
96
|
const lazyImageDemo = () => {
|
|
93
|
-
return /* @__PURE__ */
|
|
97
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
94
98
|
import_Image.default,
|
|
95
99
|
{
|
|
96
100
|
src: "https://via.placeholder.com/150x100",
|
|
@@ -99,17 +103,17 @@ const lazyImageDemo = () => {
|
|
|
99
103
|
height: 100,
|
|
100
104
|
lazy: true
|
|
101
105
|
}
|
|
102
|
-
));
|
|
106
|
+
) });
|
|
103
107
|
};
|
|
104
108
|
const noAltImageDemo = () => {
|
|
105
|
-
return /* @__PURE__ */
|
|
109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
106
110
|
import_Image.default,
|
|
107
111
|
{
|
|
108
112
|
src: "https://via.placeholder.com/150x100",
|
|
109
113
|
width: 150,
|
|
110
114
|
height: 100
|
|
111
115
|
}
|
|
112
|
-
));
|
|
116
|
+
) });
|
|
113
117
|
};
|
|
114
118
|
var A11yDemos_default = {
|
|
115
119
|
basicImageDemo,
|
package/dist/Input/Input.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { InputProps } from './index';
|
|
3
3
|
import './index.less';
|
|
4
|
-
declare const Input: React.ForwardRefExoticComponent<Omit<InputProps
|
|
4
|
+
declare const Input: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default Input;
|
package/dist/Input/Input.js
CHANGED
|
@@ -59,10 +59,11 @@ __export(Input_exports, {
|
|
|
59
59
|
default: () => Input_default
|
|
60
60
|
});
|
|
61
61
|
module.exports = __toCommonJS(Input_exports);
|
|
62
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
62
63
|
var import_icons = require("@bifrostui/icons");
|
|
63
64
|
var import_utils = require("@bifrostui/utils");
|
|
64
65
|
var import_clsx = __toESM(require("clsx"));
|
|
65
|
-
var import_react =
|
|
66
|
+
var import_react = require("react");
|
|
66
67
|
var import_index2 = require("./index.css");
|
|
67
68
|
const prefixCls = "bui-input";
|
|
68
69
|
const Input = (0, import_react.forwardRef)((props, ref) => {
|
|
@@ -147,34 +148,37 @@ const Input = (0, import_react.forwardRef)((props, ref) => {
|
|
|
147
148
|
placeholderClass: "bui-mini-placeholder"
|
|
148
149
|
};
|
|
149
150
|
}
|
|
150
|
-
return /* @__PURE__ */
|
|
151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
151
152
|
"div",
|
|
152
|
-
__spreadValues({
|
|
153
|
+
__spreadProps(__spreadValues({
|
|
153
154
|
ref,
|
|
154
155
|
className: (0, import_clsx.default)(prefixCls, className, {
|
|
155
156
|
[`${prefixCls}-disabled`]: disabled
|
|
156
157
|
})
|
|
157
|
-
}, others),
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
158
|
+
}, others), {
|
|
159
|
+
children: [
|
|
160
|
+
startIcon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-icon ${prefixCls}-icon-start`, children: startIcon }),
|
|
161
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
162
|
+
"input",
|
|
163
|
+
__spreadProps(__spreadValues(__spreadValues(__spreadProps(__spreadValues({}, nativeProps), {
|
|
164
|
+
name,
|
|
165
|
+
type,
|
|
166
|
+
ref: inputRef,
|
|
167
|
+
value: inputValue,
|
|
168
|
+
disabled,
|
|
169
|
+
placeholder
|
|
170
|
+
}), ariaProps), inputProps), {
|
|
171
|
+
onChange: handleChange,
|
|
172
|
+
onFocus: handleFocus,
|
|
173
|
+
onBlur: handleBlur,
|
|
174
|
+
onInput: handleInput,
|
|
175
|
+
className: (0, import_clsx.default)(`${prefixCls}-input`, inputProps == null ? void 0 : inputProps.className)
|
|
176
|
+
})
|
|
177
|
+
),
|
|
178
|
+
clearable && !!inputValue && hasFocus && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-clear`, onClick: handleClear, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.ErrorCircleFilledIcon, { htmlColor: "var(--bui-color-fg-subtle)" }) }),
|
|
179
|
+
endIcon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-icon ${prefixCls}-icon-end`, children: endIcon })
|
|
180
|
+
]
|
|
181
|
+
})
|
|
178
182
|
);
|
|
179
183
|
});
|
|
180
184
|
Input.displayName = "BuiInput";
|