@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
|
@@ -38,44 +38,77 @@ __export(A11yDemos_exports, {
|
|
|
38
38
|
triggerTooltipDemo: () => triggerTooltipDemo
|
|
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_Tooltip = __toESM(require("../../Tooltip"));
|
|
43
44
|
const basicTooltipDemo = () => {
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tooltip.default, { title: "\u8FD9\u662F\u4E00\u4E2A\u57FA\u7840\u7684\u63D0\u793A\u6587\u672C", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u57FA\u7840Tooltip" }) }) });
|
|
45
46
|
};
|
|
46
47
|
const placementTooltipDemo = () => {
|
|
47
|
-
return /* @__PURE__ */
|
|
48
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex", gap: "10px", flexWrap: "wrap" }, children: [
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tooltip.default, { title: "\u9876\u90E8\u63D0\u793A", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u9876\u90E8" }) }),
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tooltip.default, { title: "\u53F3\u4FA7\u63D0\u793A", placement: "right", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u53F3\u4FA7" }) }),
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tooltip.default, { title: "\u5E95\u90E8\u63D0\u793A", placement: "bottom", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u5E95\u90E8" }) }),
|
|
52
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tooltip.default, { title: "\u5DE6\u4FA7\u63D0\u793A", placement: "left", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u5DE6\u4FA7" }) })
|
|
53
|
+
] });
|
|
48
54
|
};
|
|
49
55
|
const triggerTooltipDemo = () => {
|
|
50
|
-
return /* @__PURE__ */
|
|
56
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex", gap: "10px" }, children: [
|
|
57
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tooltip.default, { title: "\u70B9\u51FB\u89E6\u53D1\u7684\u63D0\u793A", trigger: "click", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u70B9\u51FB\u89E6\u53D1" }) }),
|
|
58
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tooltip.default, { title: "\u60AC\u505C\u89E6\u53D1\u7684\u63D0\u793A", trigger: "hover", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u60AC\u505C\u89E6\u53D1" }) })
|
|
59
|
+
] });
|
|
51
60
|
};
|
|
52
61
|
const accessibilityTooltipDemo = () => {
|
|
53
|
-
return /* @__PURE__ */
|
|
62
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex", gap: "10px", flexDirection: "column" }, children: [
|
|
63
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tooltip.default, { title: "\u81EA\u5B9A\u4E49\u89D2\u8272\u7684\u63D0\u793A", role: "status", "aria-label": "\u72B6\u6001\u63D0\u793A", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u72B6\u6001\u63D0\u793A" }) }),
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tooltip.default, { title: "\u652F\u6301Escape\u952E\u5173\u95ED", closeOnEscape: true, trigger: "click", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "Escape\u952E\u5173\u95ED" }) })
|
|
65
|
+
] });
|
|
54
66
|
};
|
|
55
67
|
const complexInteractionTooltipDemo = () => {
|
|
56
68
|
const ComplexInteractionTooltipDemo = () => {
|
|
57
69
|
const [open, setOpen] = React.useState(false);
|
|
58
|
-
return /* @__PURE__ */
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
70
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex", gap: "10px", alignItems: "center" }, children: [
|
|
71
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
72
|
+
import_Tooltip.default,
|
|
73
|
+
{
|
|
74
|
+
title: "\u53D7\u63A7\u6A21\u5F0F\u7684\u63D0\u793A",
|
|
75
|
+
open,
|
|
76
|
+
onOpenChange: (_, data) => setOpen(data.open),
|
|
77
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u53D7\u63A7Tooltip" })
|
|
78
|
+
}
|
|
79
|
+
),
|
|
80
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", { type: "button", onClick: () => setOpen(!open), children: [
|
|
81
|
+
"\u5916\u90E8\u63A7\u5236: ",
|
|
82
|
+
open ? "\u5173\u95ED" : "\u6253\u5F00"
|
|
83
|
+
] })
|
|
84
|
+
] });
|
|
67
85
|
};
|
|
68
|
-
return /* @__PURE__ */
|
|
86
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComplexInteractionTooltipDemo, {});
|
|
69
87
|
};
|
|
70
88
|
const complexContentTooltipDemo = () => {
|
|
71
|
-
const ComplexContent = () => /* @__PURE__ */
|
|
72
|
-
|
|
89
|
+
const ComplexContent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { maxWidth: "200px" }, children: [
|
|
90
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { style: { margin: "0 0 8px 0", fontSize: "14px" }, children: "\u590D\u6742\u5185\u5BB9" }),
|
|
91
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { style: { margin: "0 0 8px 0", fontSize: "12px" }, children: "\u8FD9\u662F\u4E00\u4E2A\u5305\u542B\u591A\u79CD\u5143\u7D20\u7684\u590D\u6742\u63D0\u793A\u5185\u5BB9\u3002" }),
|
|
92
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("ul", { style: { margin: 0, fontSize: "12px", paddingLeft: "16px" }, children: [
|
|
93
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: "\u9879\u76EE\u4E00" }),
|
|
94
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: "\u9879\u76EE\u4E8C" })
|
|
95
|
+
] })
|
|
96
|
+
] });
|
|
97
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tooltip.default, { title: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComplexContent, {}), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u590D\u6742\u5185\u5BB9Tooltip" }) }) });
|
|
73
98
|
};
|
|
74
99
|
const offsetTooltipDemo = () => {
|
|
75
|
-
return /* @__PURE__ */
|
|
100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex", gap: "10px" }, children: [
|
|
101
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tooltip.default, { title: "\u65E0\u504F\u79FB", offset: 0, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u65E0\u504F\u79FB" }) }),
|
|
102
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tooltip.default, { title: "\u504F\u79FB10px", offset: 10, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u504F\u79FB10px" }) }),
|
|
103
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tooltip.default, { title: "\u504F\u79FB20px", offset: 20, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u504F\u79FB20px" }) })
|
|
104
|
+
] });
|
|
76
105
|
};
|
|
77
106
|
const edgeCaseTooltipDemo = () => {
|
|
78
|
-
return /* @__PURE__ */
|
|
107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex", gap: "10px", flexDirection: "column" }, children: [
|
|
108
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tooltip.default, { title: "", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u7A7A\u5185\u5BB9" }) }),
|
|
109
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tooltip.default, { title: "\u5F88\u957F\u5F88\u957F\u5F88\u957F\u5F88\u957F\u5F88\u957F\u5F88\u957F\u5F88\u957F\u5F88\u957F\u5F88\u957F\u5F88\u957F\u5F88\u957F\u5F88\u957F\u7684\u63D0\u793A\u6587\u672C\u5185\u5BB9", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u957F\u6587\u672C" }) }),
|
|
110
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tooltip.default, { title: `\u7279\u6B8A\u5B57\u7B26 !@#$%^&*()_+-=[]{}|;':",./`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "\u7279\u6B8A\u5B57\u7B26" }) })
|
|
111
|
+
] });
|
|
79
112
|
};
|
|
80
113
|
var A11yDemos_default = {
|
|
81
114
|
basicTooltipDemo,
|
|
@@ -84,7 +84,7 @@ function useTooltip(parameters) {
|
|
|
84
84
|
} = parameters;
|
|
85
85
|
const controlByUser = typeof open !== "undefined";
|
|
86
86
|
const { direction, location = "center" } = (0, import_utils.parsePlacement)(placement);
|
|
87
|
-
const childrenRef = (0, import_react.useRef)();
|
|
87
|
+
const childrenRef = (0, import_react.useRef)(null);
|
|
88
88
|
const [openStatus, setOpenStatus] = (0, import_react.useState)(defaultOpen);
|
|
89
89
|
const [arrowDirection, setArrowDirection] = (0, import_react.useState)(direction);
|
|
90
90
|
const [arrowLocation, setArrowLocation] = (0, import_react.useState)(location);
|
|
@@ -48,11 +48,12 @@ __export(Transition_exports, {
|
|
|
48
48
|
default: () => Transition_default
|
|
49
49
|
});
|
|
50
50
|
module.exports = __toCommonJS(Transition_exports);
|
|
51
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
51
52
|
var React = __toESM(require("react"));
|
|
52
53
|
var import_TransitionCore = __toESM(require("./TransitionCore"));
|
|
53
54
|
const Transition = /* @__PURE__ */ React.forwardRef(
|
|
54
55
|
(props, ref) => {
|
|
55
|
-
return /* @__PURE__ */
|
|
56
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TransitionCore.default, __spreadProps(__spreadValues({}, props), { ref, nextTick: setTimeout }));
|
|
56
57
|
}
|
|
57
58
|
);
|
|
58
59
|
Transition.displayName = "BuiTransition";
|
|
@@ -48,12 +48,13 @@ __export(Transition_miniapp_exports, {
|
|
|
48
48
|
default: () => Transition_miniapp_default
|
|
49
49
|
});
|
|
50
50
|
module.exports = __toCommonJS(Transition_miniapp_exports);
|
|
51
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
51
52
|
var import_taro = __toESM(require("@tarojs/taro"));
|
|
52
53
|
var React = __toESM(require("react"));
|
|
53
54
|
var import_TransitionCore = __toESM(require("./TransitionCore"));
|
|
54
55
|
const Transition = /* @__PURE__ */ React.forwardRef(
|
|
55
56
|
(props, ref) => {
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
57
58
|
import_TransitionCore.default,
|
|
58
59
|
__spreadProps(__spreadValues({}, props), {
|
|
59
60
|
nextTick: (cb) => setTimeout(() => import_taro.default.nextTick(cb), 16),
|
|
@@ -128,7 +128,7 @@ const TransitionCore = (0, import_react.forwardRef)(
|
|
|
128
128
|
return appear ? EXITED : ENTERED;
|
|
129
129
|
return mountOnEnter || unmountOnExit ? UNMOUNTED : EXITED;
|
|
130
130
|
});
|
|
131
|
-
const innerNodeRef = (0, import_react.useRef)();
|
|
131
|
+
const innerNodeRef = (0, import_react.useRef)(null);
|
|
132
132
|
const nodeRef = (0, import_utils.useForkRef)(innerNodeRef, ref);
|
|
133
133
|
const timeout = typeof _timeout === "object" ? __spreadValues({}, _timeout) : { enter: _timeout, exit: _timeout, appear: _timeout };
|
|
134
134
|
const delay = typeof _delay === "object" ? _delay : { enter: _delay, exit: _delay, appear: _delay };
|
|
@@ -259,7 +259,13 @@ const TransitionCore = (0, import_react.forwardRef)(
|
|
|
259
259
|
}, [inProp]);
|
|
260
260
|
if (status === UNMOUNTED)
|
|
261
261
|
return null;
|
|
262
|
-
|
|
262
|
+
if (typeof children === "function") {
|
|
263
|
+
return children(status, __spreadProps(__spreadValues({}, childProps), {
|
|
264
|
+
ref: nodeRef
|
|
265
|
+
}));
|
|
266
|
+
}
|
|
267
|
+
const onlyChild = import_react.default.Children.only(children);
|
|
268
|
+
return import_react.default.cloneElement(onlyChild, __spreadProps(__spreadValues({}, childProps), {
|
|
263
269
|
ref: nodeRef
|
|
264
270
|
}));
|
|
265
271
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { TransitionGroupProps } from './TransitionGroup.types';
|
|
3
2
|
declare const TransitionGroup: {
|
|
4
|
-
(props: TransitionGroupProps):
|
|
3
|
+
(props: TransitionGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
5
4
|
displayName: string;
|
|
6
5
|
};
|
|
7
6
|
export default TransitionGroup;
|
|
@@ -59,6 +59,7 @@ __export(TransitionGroup_exports, {
|
|
|
59
59
|
default: () => TransitionGroup_default
|
|
60
60
|
});
|
|
61
61
|
module.exports = __toCommonJS(TransitionGroup_exports);
|
|
62
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
62
63
|
var import_react = __toESM(require("react"));
|
|
63
64
|
var import_childMapping = require("./utils/childMapping");
|
|
64
65
|
const TransitionGroupContext = import_react.default.createContext(null);
|
|
@@ -124,9 +125,9 @@ const TransitionGroup = (props) => {
|
|
|
124
125
|
childFactory
|
|
125
126
|
);
|
|
126
127
|
if (Component === null) {
|
|
127
|
-
return /* @__PURE__ */
|
|
128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TransitionGroupContext.Provider, { value: contextValue, children: valuedChildren });
|
|
128
129
|
}
|
|
129
|
-
return /* @__PURE__ */
|
|
130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TransitionGroupContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, __spreadProps(__spreadValues({}, restProps), { children: valuedChildren })) });
|
|
130
131
|
};
|
|
131
132
|
TransitionGroup.displayName = "BuiTransitionGroup";
|
|
132
133
|
var TransitionGroup_default = TransitionGroup;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
5
|
var __export = (target, all) => {
|
|
8
6
|
for (var name in all)
|
|
@@ -16,22 +14,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
14
|
}
|
|
17
15
|
return to;
|
|
18
16
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
18
|
var TransitionGroupDemo_exports = {};
|
|
29
19
|
__export(TransitionGroupDemo_exports, {
|
|
30
20
|
default: () => TransitionGroupDemo_default
|
|
31
21
|
});
|
|
32
22
|
module.exports = __toCommonJS(TransitionGroupDemo_exports);
|
|
23
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
24
|
var import_react = require("@bifrostui/react");
|
|
34
|
-
var import_react2 =
|
|
25
|
+
var import_react2 = require("react");
|
|
35
26
|
var import_index = require("./index.css");
|
|
36
27
|
const TransitionGroupDemo = () => {
|
|
37
28
|
const [items, setItems] = (0, import_react2.useState)([
|
|
@@ -46,23 +37,29 @@ const TransitionGroupDemo = () => {
|
|
|
46
37
|
const handleRemoveItem = (id) => {
|
|
47
38
|
setItems((prev) => prev.filter((item) => item.id !== id));
|
|
48
39
|
};
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
-
import_react.
|
|
51
|
-
{
|
|
52
|
-
|
|
53
|
-
unmountOnExit: true,
|
|
54
|
-
timeout: 300,
|
|
55
|
-
classNames: "item"
|
|
56
|
-
},
|
|
57
|
-
/* @__PURE__ */ import_react2.default.createElement("div", { className: "item-container" }, /* @__PURE__ */ import_react2.default.createElement("span", null, item.text), /* @__PURE__ */ import_react2.default.createElement(
|
|
58
|
-
import_react.Button,
|
|
40
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
41
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Button, { onClick: handleAddItem, children: "\u6DFB\u52A0\u9879\u76EE" }),
|
|
42
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.TransitionGroup, { className: "transition-group-container", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
43
|
+
import_react.CSSTransition,
|
|
59
44
|
{
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
45
|
+
unmountOnExit: true,
|
|
46
|
+
timeout: 300,
|
|
47
|
+
classNames: "item",
|
|
48
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "item-container", children: [
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: item.text }),
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
51
|
+
import_react.Button,
|
|
52
|
+
{
|
|
53
|
+
size: "small",
|
|
54
|
+
color: "danger",
|
|
55
|
+
onClick: () => handleRemoveItem(item.id),
|
|
56
|
+
children: "\u5220\u9664"
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
] })
|
|
63
60
|
},
|
|
64
|
-
|
|
65
|
-
))
|
|
66
|
-
)
|
|
61
|
+
item.id
|
|
62
|
+
)) })
|
|
63
|
+
] });
|
|
67
64
|
};
|
|
68
65
|
var TransitionGroupDemo_default = TransitionGroupDemo;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
5
|
var __export = (target, all) => {
|
|
8
6
|
for (var name in all)
|
|
@@ -16,24 +14,16 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
14
|
}
|
|
17
15
|
return to;
|
|
18
16
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
18
|
var Button_exports = {};
|
|
29
19
|
__export(Button_exports, {
|
|
30
20
|
Button: () => ButtonView
|
|
31
21
|
});
|
|
32
22
|
module.exports = __toCommonJS(Button_exports);
|
|
33
|
-
var
|
|
23
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
24
|
var import_Button = require("../../src/Button");
|
|
35
25
|
const ButtonView = () => {
|
|
36
|
-
return /* @__PURE__ */
|
|
26
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.Button, { color: "primary", variant: "contained", children: "Text" });
|
|
37
27
|
};
|
|
38
28
|
// Annotate the CommonJS export names for ESM import in node:
|
|
39
29
|
0 && (module.exports = {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
5
|
var __export = (target, all) => {
|
|
8
6
|
for (var name in all)
|
|
@@ -16,28 +14,21 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
14
|
}
|
|
17
15
|
return to;
|
|
18
16
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
18
|
var Input_exports = {};
|
|
29
19
|
__export(Input_exports, {
|
|
30
20
|
Input: () => InputView
|
|
31
21
|
});
|
|
32
22
|
module.exports = __toCommonJS(Input_exports);
|
|
33
|
-
var
|
|
23
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
|
+
var import_react = require("react");
|
|
34
25
|
var import_Input = require("../../src/Input");
|
|
35
26
|
const InputView = () => {
|
|
36
27
|
const [value, setValue] = (0, import_react.useState)("");
|
|
37
28
|
const handleChange = (_e, data) => {
|
|
38
29
|
setValue(data == null ? void 0 : data.value);
|
|
39
30
|
};
|
|
40
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Input.Input, { value, placeholder: "\u8BF7\u586B\u5199\u5185\u5BB9", onChange: handleChange });
|
|
41
32
|
};
|
|
42
33
|
// Annotate the CommonJS export names for ESM import in node:
|
|
43
34
|
0 && (module.exports = {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
5
|
var __export = (target, all) => {
|
|
8
6
|
for (var name in all)
|
|
@@ -16,21 +14,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
14
|
}
|
|
17
15
|
return to;
|
|
18
16
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
18
|
var Tabs_exports = {};
|
|
29
19
|
__export(Tabs_exports, {
|
|
30
20
|
Tabs: () => TabsView
|
|
31
21
|
});
|
|
32
22
|
module.exports = __toCommonJS(Tabs_exports);
|
|
33
|
-
var
|
|
23
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
|
+
var import_react = require("react");
|
|
34
25
|
var import_Tabs = require("../../src/Tabs");
|
|
35
26
|
const TabsView = () => {
|
|
36
27
|
const [value, setValue] = (0, import_react.useState)("one");
|
|
@@ -42,7 +33,12 @@ const TabsView = () => {
|
|
|
42
33
|
const handleClick = (_e, { index }) => {
|
|
43
34
|
setValue(index);
|
|
44
35
|
};
|
|
45
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
37
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tabs.Tabs, { style: { marginBottom: "12px" }, value, children: tabList.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tabs.Tab, { index: item.index, onClick: handleClick, children: item.title }, item.index)) }),
|
|
38
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tabs.TabPanel, { value, index: "one", children: "Tab Panel 1" }),
|
|
39
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tabs.TabPanel, { value, index: "two", children: "Tab Panel 2" }),
|
|
40
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tabs.TabPanel, { value, index: "three", children: "Tab Panel 3" })
|
|
41
|
+
] });
|
|
46
42
|
};
|
|
47
43
|
// Annotate the CommonJS export names for ESM import in node:
|
|
48
44
|
0 && (module.exports = {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -14,6 +16,7 @@ var __spreadValues = (a, b) => {
|
|
|
14
16
|
}
|
|
15
17
|
return a;
|
|
16
18
|
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
17
20
|
var __objRest = (source, exclude) => {
|
|
18
21
|
var target = {};
|
|
19
22
|
for (var prop in source)
|
|
@@ -26,6 +29,7 @@ var __objRest = (source, exclude) => {
|
|
|
26
29
|
}
|
|
27
30
|
return target;
|
|
28
31
|
};
|
|
32
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
29
33
|
import clsx from "clsx";
|
|
30
34
|
import * as React from "react";
|
|
31
35
|
import Drawer from "../Drawer";
|
|
@@ -33,7 +37,7 @@ import ActionSheetContext from "./ActionSheetContext";
|
|
|
33
37
|
import "./ActionSheet.css";
|
|
34
38
|
const prefixCls = "bui-action-sheet";
|
|
35
39
|
const ActionSheetCancel = ({ children, onClick }) => {
|
|
36
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ jsx("div", { className: `${prefixCls}-item ${prefixCls}-cancel`, onClick, children });
|
|
37
41
|
};
|
|
38
42
|
const ActionSheet = /* @__PURE__ */ React.forwardRef(
|
|
39
43
|
(props, ref) => {
|
|
@@ -62,19 +66,25 @@ const ActionSheet = /* @__PURE__ */ React.forwardRef(
|
|
|
62
66
|
const onCancelClick = (event) => {
|
|
63
67
|
onClose(event, { from: "cancelText" });
|
|
64
68
|
};
|
|
65
|
-
return /* @__PURE__ */
|
|
69
|
+
return /* @__PURE__ */ jsx(ActionSheetContext.Provider, { value: context, children: /* @__PURE__ */ jsxs(
|
|
66
70
|
Drawer,
|
|
67
|
-
__spreadValues({
|
|
71
|
+
__spreadProps(__spreadValues({
|
|
68
72
|
ref,
|
|
69
73
|
open,
|
|
70
74
|
onClose,
|
|
71
75
|
className: clsx(prefixCls, className),
|
|
72
76
|
contentProps: { className: `${prefixCls}-content` }
|
|
73
|
-
}, others),
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
}, others), {
|
|
78
|
+
children: [
|
|
79
|
+
extra && /* @__PURE__ */ jsx("div", { className: `${prefixCls}-extra`, children: extra }),
|
|
80
|
+
/* @__PURE__ */ jsx("div", { className: `${prefixCls}-item-wrapper`, children }),
|
|
81
|
+
cancelText && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
82
|
+
/* @__PURE__ */ jsx("div", { className: `${prefixCls}-gap` }),
|
|
83
|
+
/* @__PURE__ */ jsx(ActionSheetCancel, { onClick: onCancelClick, children: cancelText })
|
|
84
|
+
] })
|
|
85
|
+
]
|
|
86
|
+
})
|
|
87
|
+
) });
|
|
78
88
|
}
|
|
79
89
|
);
|
|
80
90
|
ActionSheet.displayName = "BuiActionSheet";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ActionSheetItemProps } from './ActionSheetItem.types';
|
|
3
3
|
import './ActionSheetItem.less';
|
|
4
|
-
declare const ActionSheetItem: React.ForwardRefExoticComponent<Omit<ActionSheetItemProps
|
|
4
|
+
declare const ActionSheetItem: React.ForwardRefExoticComponent<Omit<ActionSheetItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default ActionSheetItem;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -14,6 +16,7 @@ var __spreadValues = (a, b) => {
|
|
|
14
16
|
}
|
|
15
17
|
return a;
|
|
16
18
|
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
17
20
|
var __objRest = (source, exclude) => {
|
|
18
21
|
var target = {};
|
|
19
22
|
for (var prop in source)
|
|
@@ -26,6 +29,7 @@ var __objRest = (source, exclude) => {
|
|
|
26
29
|
}
|
|
27
30
|
return target;
|
|
28
31
|
};
|
|
32
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
29
33
|
import clsx from "clsx";
|
|
30
34
|
import React, { useContext } from "react";
|
|
31
35
|
import ActionSheetContext from "./ActionSheetContext";
|
|
@@ -60,9 +64,9 @@ const ActionSheetItem = /* @__PURE__ */ React.forwardRef(
|
|
|
60
64
|
onClick == null ? void 0 : onClick(ev, { index });
|
|
61
65
|
(_a2 = context.onSelect) == null ? void 0 : _a2.call(context, ev, { index });
|
|
62
66
|
};
|
|
63
|
-
return /* @__PURE__ */
|
|
67
|
+
return /* @__PURE__ */ jsxs(
|
|
64
68
|
"div",
|
|
65
|
-
__spreadValues({
|
|
69
|
+
__spreadProps(__spreadValues({
|
|
66
70
|
ref,
|
|
67
71
|
className: clsx(
|
|
68
72
|
prefixCls,
|
|
@@ -74,9 +78,12 @@ const ActionSheetItem = /* @__PURE__ */ React.forwardRef(
|
|
|
74
78
|
className
|
|
75
79
|
),
|
|
76
80
|
onClick: handleAction
|
|
77
|
-
}, others),
|
|
78
|
-
|
|
79
|
-
|
|
81
|
+
}, others), {
|
|
82
|
+
children: [
|
|
83
|
+
/* @__PURE__ */ jsx("div", { className: `${prefixCls}-content`, children }),
|
|
84
|
+
description && /* @__PURE__ */ jsx("div", { className: `${prefixCls}-description`, children: description })
|
|
85
|
+
]
|
|
86
|
+
})
|
|
80
87
|
);
|
|
81
88
|
}
|
|
82
89
|
);
|
package/es/Alert/Alert.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { AlertProps } from './Alert.types';
|
|
3
3
|
import './index.less';
|
|
4
|
-
declare const Alert: React.ForwardRefExoticComponent<Omit<AlertProps
|
|
4
|
+
declare const Alert: React.ForwardRefExoticComponent<Omit<AlertProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default Alert;
|