@bifrostui/react 2.0.0-alpha.31 → 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
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -14,6 +16,7 @@ var __spreadValues = (a, b) => {
|
|
|
14
16
|
}
|
|
15
17
|
return a;
|
|
16
18
|
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
17
20
|
var __objRest = (source, exclude) => {
|
|
18
21
|
var target = {};
|
|
19
22
|
for (var prop in source)
|
|
@@ -26,6 +29,7 @@ var __objRest = (source, exclude) => {
|
|
|
26
29
|
}
|
|
27
30
|
return target;
|
|
28
31
|
};
|
|
32
|
+
import { jsx } from "react/jsx-runtime";
|
|
29
33
|
import React, { useContext } from "react";
|
|
30
34
|
import clsx from "clsx";
|
|
31
35
|
import BuiSwipeActionContext from "./SwipeActionContext";
|
|
@@ -58,16 +62,17 @@ const SwipeActionItem = /* @__PURE__ */ React.forwardRef(
|
|
|
58
62
|
text: children
|
|
59
63
|
});
|
|
60
64
|
};
|
|
61
|
-
return /* @__PURE__ */
|
|
65
|
+
return /* @__PURE__ */ jsx(
|
|
62
66
|
"div",
|
|
63
|
-
__spreadValues({
|
|
67
|
+
__spreadProps(__spreadValues({
|
|
64
68
|
className: clsx(prefixCls, className, {
|
|
65
69
|
[`${prefixCls}-${color}`]: color
|
|
66
70
|
}),
|
|
67
71
|
ref,
|
|
68
72
|
onClick: onClickHandle
|
|
69
|
-
}, others),
|
|
70
|
-
|
|
73
|
+
}, others), {
|
|
74
|
+
children
|
|
75
|
+
})
|
|
71
76
|
);
|
|
72
77
|
}
|
|
73
78
|
);
|
package/es/Swiper/Swiper.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ import 'swiper/css/effect-fade';
|
|
|
6
6
|
import { SwiperRef } from 'swiper/react';
|
|
7
7
|
import { SwiperProps } from './Swiper.types';
|
|
8
8
|
import './index.less';
|
|
9
|
-
declare const Swiper: React.ForwardRefExoticComponent<Omit<SwiperProps
|
|
9
|
+
declare const Swiper: React.ForwardRefExoticComponent<Omit<SwiperProps, "ref"> & React.RefAttributes<SwiperRef>>;
|
|
10
10
|
export default Swiper;
|
package/es/Swiper/Swiper.js
CHANGED
|
@@ -29,8 +29,9 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
+
import { jsx } from "react/jsx-runtime";
|
|
32
33
|
import clsx from "clsx";
|
|
33
|
-
import
|
|
34
|
+
import { forwardRef, useEffect, useRef } from "react";
|
|
34
35
|
import {
|
|
35
36
|
Autoplay,
|
|
36
37
|
EffectFade,
|
|
@@ -92,7 +93,7 @@ const Swiper = forwardRef((props, ref) => {
|
|
|
92
93
|
paddingLeft: vertical ? 0 : previousMargin,
|
|
93
94
|
overflow: "hidden"
|
|
94
95
|
}, style);
|
|
95
|
-
const swiperInstance = useRef();
|
|
96
|
+
const swiperInstance = useRef(null);
|
|
96
97
|
const isInit = useRef(true);
|
|
97
98
|
useEffect(() => {
|
|
98
99
|
var _a2, _b, _c, _d;
|
|
@@ -116,7 +117,7 @@ const Swiper = forwardRef((props, ref) => {
|
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
119
|
}, [autoplay]);
|
|
119
|
-
return /* @__PURE__ */
|
|
120
|
+
return /* @__PURE__ */ jsx(
|
|
120
121
|
SwiperReact,
|
|
121
122
|
__spreadProps(__spreadValues({
|
|
122
123
|
modules: [Pagination, Autoplay, EffectFade],
|
|
@@ -157,9 +158,9 @@ const Swiper = forwardRef((props, ref) => {
|
|
|
157
158
|
"--indicator-color-active": defaultIndicatorActiveColor
|
|
158
159
|
}),
|
|
159
160
|
className: cls,
|
|
160
|
-
ref
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
ref,
|
|
162
|
+
children
|
|
163
|
+
})
|
|
163
164
|
);
|
|
164
165
|
});
|
|
165
166
|
Swiper.displayName = "BuiSwiper";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SwiperSlideProps } from 'swiper/react';
|
|
2
|
-
import * as React from 'react';
|
|
3
2
|
declare const SwiperItem: {
|
|
4
|
-
(props: SwiperSlideProps):
|
|
3
|
+
(props: SwiperSlideProps): import("react/jsx-runtime").JSX.Element;
|
|
5
4
|
displayName: string;
|
|
6
5
|
};
|
|
7
6
|
export default SwiperItem;
|
package/es/Swiper/SwiperItem.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -14,6 +16,7 @@ var __spreadValues = (a, b) => {
|
|
|
14
16
|
}
|
|
15
17
|
return a;
|
|
16
18
|
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
17
20
|
var __objRest = (source, exclude) => {
|
|
18
21
|
var target = {};
|
|
19
22
|
for (var prop in source)
|
|
@@ -26,13 +29,13 @@ var __objRest = (source, exclude) => {
|
|
|
26
29
|
}
|
|
27
30
|
return target;
|
|
28
31
|
};
|
|
32
|
+
import { jsx } from "react/jsx-runtime";
|
|
29
33
|
import { SwiperSlide } from "swiper/react";
|
|
30
34
|
import clsx from "clsx";
|
|
31
|
-
import * as React from "react";
|
|
32
35
|
const SwiperItem = (props) => {
|
|
33
36
|
const _a = props, { className, style, children } = _a, restProps = __objRest(_a, ["className", "style", "children"]);
|
|
34
37
|
const cls = clsx("swiper-slide", className);
|
|
35
|
-
return /* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ jsx(SwiperSlide, __spreadProps(__spreadValues({ className: cls, style }, restProps), { children }));
|
|
36
39
|
};
|
|
37
40
|
SwiperItem.displayName = "BuiSwiperItem-SwiperSlide";
|
|
38
41
|
var SwiperItem_default = SwiperItem;
|
package/es/Switch/Switch.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SwitchProps } from './Switch.types';
|
|
3
3
|
import './index.less';
|
|
4
|
-
declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchProps
|
|
4
|
+
declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default Switch;
|
package/es/Switch/Switch.js
CHANGED
|
@@ -29,9 +29,10 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
32
33
|
import { useValue } from "@bifrostui/utils";
|
|
33
34
|
import clsx from "clsx";
|
|
34
|
-
import
|
|
35
|
+
import { forwardRef } from "react";
|
|
35
36
|
import "./index.css";
|
|
36
37
|
const prefixCls = "bui-switch";
|
|
37
38
|
const Switch = forwardRef(
|
|
@@ -78,9 +79,9 @@ const Switch = forwardRef(
|
|
|
78
79
|
changeAction(e, isChecked);
|
|
79
80
|
(_a2 = inputProps == null ? void 0 : inputProps.onChange) == null ? void 0 : _a2.call(inputProps, e);
|
|
80
81
|
};
|
|
81
|
-
return /* @__PURE__ */
|
|
82
|
+
return /* @__PURE__ */ jsxs(
|
|
82
83
|
"div",
|
|
83
|
-
__spreadValues({
|
|
84
|
+
__spreadProps(__spreadValues({
|
|
84
85
|
ref,
|
|
85
86
|
className: clsx(
|
|
86
87
|
`${prefixCls}`,
|
|
@@ -92,21 +93,24 @@ const Switch = forwardRef(
|
|
|
92
93
|
},
|
|
93
94
|
className
|
|
94
95
|
)
|
|
95
|
-
}, others),
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
96
|
+
}, others), {
|
|
97
|
+
children: [
|
|
98
|
+
/* @__PURE__ */ jsx(
|
|
99
|
+
"input",
|
|
100
|
+
__spreadProps(__spreadValues(__spreadValues({
|
|
101
|
+
ref: inputRef,
|
|
102
|
+
type: "checkbox",
|
|
103
|
+
name,
|
|
104
|
+
checked: switchChecked,
|
|
105
|
+
disabled
|
|
106
|
+
}, ariaProps), inputProps), {
|
|
107
|
+
onChange: handleChange,
|
|
108
|
+
className: clsx(`${prefixCls}-input`, inputProps == null ? void 0 : inputProps.className)
|
|
109
|
+
})
|
|
110
|
+
),
|
|
111
|
+
(checkedChildren || unCheckedChildren) && /* @__PURE__ */ jsx("span", { className: `${prefixCls}-inner`, children: switchChecked ? checkedChildren : unCheckedChildren })
|
|
112
|
+
]
|
|
113
|
+
})
|
|
110
114
|
);
|
|
111
115
|
}
|
|
112
116
|
);
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
/**
|
|
3
2
|
* 自定义 Switch 组件 Demo 集合
|
|
4
3
|
* 这个文件包含多个测试 demo,展示如何使用 getCustomDemoCodesFromFile 进行无障碍测试
|
|
5
4
|
* 文件名必须是 customDemoComponent.tsx(固定约定)
|
|
6
5
|
*/
|
|
7
|
-
export declare const basicSwitchDemo: () =>
|
|
8
|
-
export declare const disabledSwitchDemo: () =>
|
|
9
|
-
export declare const ariaLabelSwitchDemo: () =>
|
|
6
|
+
export declare const basicSwitchDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const disabledSwitchDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const ariaLabelSwitchDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
declare const _default: {
|
|
11
|
-
basicSwitchDemo: () =>
|
|
12
|
-
disabledSwitchDemo: () =>
|
|
13
|
-
ariaLabelSwitchDemo: () =>
|
|
10
|
+
basicSwitchDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
disabledSwitchDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
ariaLabelSwitchDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
};
|
|
15
14
|
export default _default;
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Switch from "../../Switch";
|
|
3
3
|
const basicSwitchDemo = () => {
|
|
4
|
-
return /* @__PURE__ */
|
|
4
|
+
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("label", { children: [
|
|
5
|
+
/* @__PURE__ */ jsx(Switch, {}),
|
|
6
|
+
"Switch"
|
|
7
|
+
] }) });
|
|
5
8
|
};
|
|
6
9
|
const disabledSwitchDemo = () => {
|
|
7
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("label", { children: [
|
|
11
|
+
/* @__PURE__ */ jsx(Switch, { disabled: true }),
|
|
12
|
+
"Switch"
|
|
13
|
+
] }) });
|
|
8
14
|
};
|
|
9
15
|
const ariaLabelSwitchDemo = () => {
|
|
10
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Switch, { inputProps: { "aria-label": "\u5F00\u5173" }, children: "Switch" }) });
|
|
11
17
|
};
|
|
12
18
|
var A11yDemos_default = {
|
|
13
19
|
basicSwitchDemo,
|
package/es/Switch/index.css
CHANGED
|
@@ -4,11 +4,11 @@ xhs-page {
|
|
|
4
4
|
--bui-switch-bg-color: #ccc;
|
|
5
5
|
--bui-switch-padding: 0;
|
|
6
6
|
--bui-switch-border-radius: 15px;
|
|
7
|
-
--bui-switch-small-width:
|
|
8
|
-
--bui-switch-small-height:
|
|
7
|
+
--bui-switch-small-width: 27px;
|
|
8
|
+
--bui-switch-small-height: 15px;
|
|
9
9
|
--bui-switch-small-font-size: 9px;
|
|
10
|
-
--bui-switch-controller-small-width:
|
|
11
|
-
--bui-switch-controller-small-height:
|
|
10
|
+
--bui-switch-controller-small-width: 11px;
|
|
11
|
+
--bui-switch-controller-small-height: 11px;
|
|
12
12
|
--bui-switch-width: 44px;
|
|
13
13
|
--bui-switch-height: 22px;
|
|
14
14
|
--bui-switch-font-size: var(--bui-text-size-3);
|
|
@@ -19,8 +19,8 @@ xhs-page {
|
|
|
19
19
|
--bui-switch-large-width: 51px;
|
|
20
20
|
--bui-switch-large-height: 30px;
|
|
21
21
|
--bui-switch-large-font-size: var(--bui-text-size-3);
|
|
22
|
-
--bui-switch-controller-large-width:
|
|
23
|
-
--bui-switch-controller-large-height:
|
|
22
|
+
--bui-switch-controller-large-width: 26px;
|
|
23
|
+
--bui-switch-controller-large-height: 26px;
|
|
24
24
|
}
|
|
25
25
|
.bui-switch {
|
|
26
26
|
position: relative;
|
|
@@ -64,7 +64,7 @@ xhs-page {
|
|
|
64
64
|
top: 2px;
|
|
65
65
|
}
|
|
66
66
|
.bui-switch-small.bui-switch-checked::after {
|
|
67
|
-
left: calc(100% -
|
|
67
|
+
left: calc(100% - 13px);
|
|
68
68
|
}
|
|
69
69
|
.bui-switch-small.bui-switch-checked .bui-switch-inner {
|
|
70
70
|
left: 2px;
|
|
@@ -97,11 +97,11 @@ xhs-page {
|
|
|
97
97
|
.bui-switch-large::after {
|
|
98
98
|
width: var(--bui-switch-controller-large-width);
|
|
99
99
|
height: var(--bui-switch-controller-large-height);
|
|
100
|
-
left:
|
|
101
|
-
top:
|
|
100
|
+
left: 2px;
|
|
101
|
+
top: 2px;
|
|
102
102
|
}
|
|
103
103
|
.bui-switch-large.bui-switch-checked::after {
|
|
104
|
-
left: calc(100% -
|
|
104
|
+
left: calc(100% - 28px);
|
|
105
105
|
}
|
|
106
106
|
.bui-switch-large.bui-switch-checked .bui-switch-inner {
|
|
107
107
|
left: var(--bui-spacing-sm);
|
|
@@ -136,7 +136,7 @@ xhs-page {
|
|
|
136
136
|
}
|
|
137
137
|
.bui-switch-disabled {
|
|
138
138
|
pointer-events: none;
|
|
139
|
-
opacity: 0.
|
|
139
|
+
opacity: 0.4;
|
|
140
140
|
}
|
|
141
141
|
.bui-switch-disabled::after {
|
|
142
142
|
animation-name: none;
|
package/es/TabBar/TabBar.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TabBarProps } from './index.types';
|
|
3
3
|
import './TabBar.less';
|
|
4
|
-
declare const TabBar: React.ForwardRefExoticComponent<Omit<TabBarProps
|
|
4
|
+
declare const TabBar: React.ForwardRefExoticComponent<Omit<TabBarProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default TabBar;
|
package/es/TabBar/TabBar.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -14,6 +16,7 @@ var __spreadValues = (a, b) => {
|
|
|
14
16
|
}
|
|
15
17
|
return a;
|
|
16
18
|
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
17
20
|
var __objRest = (source, exclude) => {
|
|
18
21
|
var target = {};
|
|
19
22
|
for (var prop in source)
|
|
@@ -26,6 +29,7 @@ var __objRest = (source, exclude) => {
|
|
|
26
29
|
}
|
|
27
30
|
return target;
|
|
28
31
|
};
|
|
32
|
+
import { jsx } from "react/jsx-runtime";
|
|
29
33
|
import * as React from "react";
|
|
30
34
|
import clsx from "clsx";
|
|
31
35
|
import TabBarContext from "./TabBarContext";
|
|
@@ -47,7 +51,7 @@ const TabBar = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
47
51
|
"className",
|
|
48
52
|
"onChange"
|
|
49
53
|
]);
|
|
50
|
-
return /* @__PURE__ */
|
|
54
|
+
return /* @__PURE__ */ jsx(
|
|
51
55
|
TabBarContext.Provider,
|
|
52
56
|
{
|
|
53
57
|
value: {
|
|
@@ -55,15 +59,15 @@ const TabBar = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
55
59
|
activeColor,
|
|
56
60
|
color,
|
|
57
61
|
onChange
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
62
|
+
},
|
|
63
|
+
children: /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({ ref, className: clsx(`${prefixCls}`, className) }, others), { children: React.Children.toArray(children).map(
|
|
64
|
+
(item, index) => {
|
|
65
|
+
return React.cloneElement(item, {
|
|
66
|
+
index
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
) }))
|
|
70
|
+
}
|
|
67
71
|
);
|
|
68
72
|
});
|
|
69
73
|
TabBar.displayName = "BuiTabBar";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TabBarItemProps } from './index.types';
|
|
3
3
|
import './TabBarItem.less';
|
|
4
|
-
declare const TabBarItem: React.ForwardRefExoticComponent<Omit<TabBarItemProps
|
|
4
|
+
declare const TabBarItem: React.ForwardRefExoticComponent<Omit<TabBarItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default TabBarItem;
|
package/es/TabBar/TabBarItem.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -14,6 +16,7 @@ var __spreadValues = (a, b) => {
|
|
|
14
16
|
}
|
|
15
17
|
return a;
|
|
16
18
|
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
17
20
|
var __objRest = (source, exclude) => {
|
|
18
21
|
var target = {};
|
|
19
22
|
for (var prop in source)
|
|
@@ -26,6 +29,7 @@ var __objRest = (source, exclude) => {
|
|
|
26
29
|
}
|
|
27
30
|
return target;
|
|
28
31
|
};
|
|
32
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
29
33
|
import React, { useContext } from "react";
|
|
30
34
|
import clsx from "clsx";
|
|
31
35
|
import { Badge } from "../Badge";
|
|
@@ -63,32 +67,39 @@ const TabBarItem = /* @__PURE__ */ React.forwardRef(
|
|
|
63
67
|
onChange(e, { value: index });
|
|
64
68
|
}
|
|
65
69
|
};
|
|
66
|
-
return /* @__PURE__ */
|
|
70
|
+
return /* @__PURE__ */ jsx(
|
|
67
71
|
"div",
|
|
68
|
-
__spreadValues({
|
|
72
|
+
__spreadProps(__spreadValues({
|
|
69
73
|
className: clsx(prefixCls, className, {
|
|
70
74
|
[`${prefixCls}-active`]: currentIndex === index
|
|
71
75
|
}),
|
|
72
76
|
ref,
|
|
73
77
|
onClick: handleClick
|
|
74
|
-
}, others),
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
78
|
+
}, others), {
|
|
79
|
+
children: children || ((_b = Object.values(BadgeProps || {})) == null ? void 0 : _b.length) > 0 ? /* @__PURE__ */ jsxs(Badge, __spreadProps(__spreadValues({}, BadgeProps), { children: [
|
|
80
|
+
currentIndex === index && activeIcon ? activeIcon : icon,
|
|
81
|
+
/* @__PURE__ */ jsx(
|
|
82
|
+
"div",
|
|
83
|
+
{
|
|
84
|
+
className: clsx(`${prefixCls}-title`, {
|
|
85
|
+
[`${prefixCls}-${currentIndex === index ? activeColor : color}`]: currentIndex === index ? activeColor : color
|
|
86
|
+
}),
|
|
87
|
+
children: title
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
] })) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
91
|
+
currentIndex === index && activeIcon ? activeIcon : icon,
|
|
92
|
+
/* @__PURE__ */ jsx(
|
|
93
|
+
"div",
|
|
94
|
+
{
|
|
95
|
+
className: clsx(`${prefixCls}-title`, {
|
|
96
|
+
[`${prefixCls}-${currentIndex === index ? activeColor : color}`]: currentIndex === index ? activeColor : color
|
|
97
|
+
}),
|
|
98
|
+
children: title
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
] })
|
|
102
|
+
})
|
|
92
103
|
);
|
|
93
104
|
}
|
|
94
105
|
);
|
package/es/Tabs/Tab.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TabProps } from './Tab.types';
|
|
3
3
|
import './Tab.less';
|
|
4
|
-
declare const _default: React.
|
|
4
|
+
declare const _default: React.NamedExoticComponent<Omit<TabProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default _default;
|
package/es/Tabs/Tab.js
CHANGED
|
@@ -29,6 +29,7 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
+
import { jsx } from "react/jsx-runtime";
|
|
32
33
|
import React, { useEffect, useRef } from "react";
|
|
33
34
|
import clsx from "clsx";
|
|
34
35
|
import { isMini, useContextSelector, useForkRef } from "@bifrostui/utils";
|
|
@@ -92,7 +93,7 @@ const Tab = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
92
93
|
if (process.env.NODE_ENV !== "production") {
|
|
93
94
|
console.count("Tab render");
|
|
94
95
|
}
|
|
95
|
-
return /* @__PURE__ */
|
|
96
|
+
return /* @__PURE__ */ jsx(
|
|
96
97
|
"div",
|
|
97
98
|
__spreadProps(__spreadValues({
|
|
98
99
|
role: "tab",
|
|
@@ -102,9 +103,9 @@ const Tab = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
102
103
|
ref: handleRef,
|
|
103
104
|
className: rootCls
|
|
104
105
|
}, others), {
|
|
105
|
-
onClick: handleClick
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
onClick: handleClick,
|
|
107
|
+
children
|
|
108
|
+
})
|
|
108
109
|
);
|
|
109
110
|
});
|
|
110
111
|
Tab.displayName = "BuiTab";
|
package/es/Tabs/TabIndicator.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
2
3
|
import clsx from "clsx";
|
|
3
4
|
import { debounce, isMini, useEventCallback } from "@bifrostui/utils";
|
|
4
5
|
import scrollLeftTo from "./utils/scroll";
|
|
@@ -139,7 +140,7 @@ const TabIndicator = ({
|
|
|
139
140
|
if (!indicatorStyle) {
|
|
140
141
|
return null;
|
|
141
142
|
}
|
|
142
|
-
return /* @__PURE__ */
|
|
143
|
+
return /* @__PURE__ */ jsx(
|
|
143
144
|
"div",
|
|
144
145
|
{
|
|
145
146
|
ref: indicatorRef,
|
package/es/Tabs/TabMask.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import clsx from "clsx";
|
|
3
4
|
import { tabMaskClass, tabMaskLeftClass, tabMaskRightClass } from "./classes";
|
|
4
|
-
const TabMask = ({ position }) => /* @__PURE__ */
|
|
5
|
+
const TabMask = ({ position }) => /* @__PURE__ */ jsx(
|
|
5
6
|
"div",
|
|
6
7
|
{
|
|
7
8
|
className: clsx(
|
package/es/Tabs/TabPanel.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TabPanelProps } from './TabPanel.types';
|
|
3
3
|
import './TabPanel.less';
|
|
4
|
-
declare const TabPanel: React.ForwardRefExoticComponent<Omit<TabPanelProps
|
|
4
|
+
declare const TabPanel: React.ForwardRefExoticComponent<Omit<TabPanelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default TabPanel;
|
package/es/Tabs/TabPanel.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -14,6 +16,7 @@ var __spreadValues = (a, b) => {
|
|
|
14
16
|
}
|
|
15
17
|
return a;
|
|
16
18
|
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
17
20
|
var __objRest = (source, exclude) => {
|
|
18
21
|
var target = {};
|
|
19
22
|
for (var prop in source)
|
|
@@ -26,7 +29,8 @@ var __objRest = (source, exclude) => {
|
|
|
26
29
|
}
|
|
27
30
|
return target;
|
|
28
31
|
};
|
|
29
|
-
import
|
|
32
|
+
import { jsx } from "react/jsx-runtime";
|
|
33
|
+
import { forwardRef } from "react";
|
|
30
34
|
import clsx from "clsx";
|
|
31
35
|
import {
|
|
32
36
|
tabPanelRootClass,
|
|
@@ -50,9 +54,9 @@ const TabPanel = forwardRef((props, ref) => {
|
|
|
50
54
|
]);
|
|
51
55
|
const isActive = value === index;
|
|
52
56
|
const keepActiveDom = keepMounted ? children : null;
|
|
53
|
-
return /* @__PURE__ */
|
|
57
|
+
return /* @__PURE__ */ jsx(
|
|
54
58
|
"div",
|
|
55
|
-
__spreadValues({
|
|
59
|
+
__spreadProps(__spreadValues({
|
|
56
60
|
role: "tabpanel",
|
|
57
61
|
"aria-hidden": !isActive,
|
|
58
62
|
tabIndex: 0,
|
|
@@ -61,8 +65,9 @@ const TabPanel = forwardRef((props, ref) => {
|
|
|
61
65
|
[tabPanelActiveClass]: isActive,
|
|
62
66
|
[tabPanelInactiveClass]: !isActive
|
|
63
67
|
})
|
|
64
|
-
}, others),
|
|
65
|
-
|
|
68
|
+
}, others), {
|
|
69
|
+
children: isActive ? children : keepActiveDom
|
|
70
|
+
})
|
|
66
71
|
);
|
|
67
72
|
});
|
|
68
73
|
TabPanel.displayName = "BuiTabPanel";
|
package/es/Tabs/Tabs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TabsProps } from './Tabs.types';
|
|
3
3
|
import './Tabs.less';
|
|
4
|
-
declare const Tabs: React.ForwardRefExoticComponent<Omit<TabsProps
|
|
4
|
+
declare const Tabs: React.ForwardRefExoticComponent<Omit<TabsProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default Tabs;
|