@bifrostui/react 2.0.0-alpha.32 → 2.0.0-alpha.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ActionSheet/ActionSheet.js +18 -8
- package/dist/ActionSheet/ActionSheetItem.d.ts +1 -1
- package/dist/ActionSheet/ActionSheetItem.js +12 -5
- package/dist/Alert/Alert.d.ts +1 -1
- package/dist/Alert/Alert.js +36 -34
- package/dist/Alert/__tests__/fixtures/A11yDemos.d.ts +8 -9
- package/dist/Alert/__tests__/fixtures/A11yDemos.js +60 -54
- package/dist/Avatar/Avatar.d.ts +1 -1
- package/dist/Avatar/Avatar.js +11 -9
- package/dist/Avatar/AvatarGroup.d.ts +1 -1
- package/dist/Avatar/AvatarGroup.js +10 -6
- package/dist/Backdrop/Backdrop.d.ts +1 -1
- package/dist/Backdrop/Backdrop.js +9 -5
- package/dist/Backdrop/__tests__/fixtures/A11yDemos.d.ts +4 -5
- package/dist/Backdrop/__tests__/fixtures/A11yDemos.js +3 -3
- package/dist/Badge/Badge.d.ts +1 -1
- package/dist/Badge/Badge.js +23 -15
- package/dist/Badge/__tests__/fixtures/A11yDemos.d.ts +16 -17
- package/dist/Badge/__tests__/fixtures/A11yDemos.js +60 -27
- package/dist/Badge/index.css +3 -3
- package/dist/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/Breadcrumb/Breadcrumb.js +19 -10
- package/dist/Breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/dist/Breadcrumb/BreadcrumbItem.js +18 -10
- package/dist/Button/Button.d.ts +1 -1
- package/dist/Button/Button.js +14 -7
- package/dist/Button/__tests__/fixtures/A11yDemos.d.ts +14 -15
- package/dist/Button/__tests__/fixtures/A11yDemos.js +32 -8
- package/dist/CSSTransition/CSSTransition.js +2 -1
- package/dist/CSSTransition/demo/CSSTransitionDemo.d.ts +1 -2
- package/dist/CSSTransition/demo/CSSTransitionDemo.js +28 -35
- package/dist/Calendar/Calendar.d.ts +1 -1
- package/dist/Calendar/Calendar.js +74 -66
- package/dist/Calendar/__tests__/fixtures/A11yDemos.d.ts +1 -2
- package/dist/Calendar/__tests__/fixtures/A11yDemos.js +2 -2
- package/dist/Card/Card.d.ts +1 -1
- package/dist/Card/Card.js +9 -4
- package/dist/Card/CardContent.d.ts +1 -1
- package/dist/Card/CardContent.js +5 -1
- package/dist/Card/CardFooter.d.ts +1 -1
- package/dist/Card/CardFooter.js +5 -1
- package/dist/Card/CardHeader.d.ts +1 -1
- package/dist/Card/CardHeader.js +16 -9
- package/dist/Checkbox/Checkbox.d.ts +1 -1
- package/dist/Checkbox/Checkbox.js +27 -23
- package/dist/Checkbox/CheckboxGroup.d.ts +1 -1
- package/dist/Checkbox/CheckboxGroup.js +9 -5
- package/dist/Checkbox/__tests__/fixtures/A11yDemos.d.ts +6 -7
- package/dist/Checkbox/__tests__/fixtures/A11yDemos.js +10 -4
- package/dist/Checkbox/index.css +4 -4
- package/dist/CitySelector/CitySelector.d.ts +1 -1
- package/dist/CitySelector/CitySelector.js +2 -1
- package/dist/CitySelector/CitySelector.miniapp.d.ts +1 -1
- package/dist/CitySelector/CitySelector.miniapp.js +2 -1
- package/dist/CitySelector/CitySelectorCore.js +83 -61
- package/dist/CitySelector/Selector/index.d.ts +1 -1
- package/dist/CitySelector/Selector/index.js +5 -15
- package/dist/Collapse/Collapse.js +51 -50
- package/dist/CollapsePanel/CollapsePanel.d.ts +1 -1
- package/dist/CollapsePanel/CollapsePanel.js +10 -8
- package/dist/CollapsePanel/CollapsePanelItem.d.ts +1 -1
- package/dist/CollapsePanel/CollapsePanelItem.js +27 -17
- package/dist/Countdown/Countdown.d.ts +1 -1
- package/dist/Countdown/Countdown.js +39 -29
- package/dist/Countdown/__tests__/fixtures/A11yDemos.d.ts +14 -15
- package/dist/Countdown/__tests__/fixtures/A11yDemos.js +37 -23
- package/dist/DatePicker/DatePicker.d.ts +1 -1
- package/dist/DatePicker/DatePicker.js +3 -2
- package/dist/DesktopDatePicker/DesktopDatePicker.d.ts +1 -1
- package/dist/DesktopDatePicker/DesktopDatePicker.js +45 -40
- package/dist/DesktopDatePicker/useGetDatePickerContent.d.ts +1 -2
- package/dist/DesktopDatePicker/useGetDatePickerContent.js +48 -41
- package/dist/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +1 -1
- package/dist/DesktopDateTimePicker/DesktopDateTimePicker.js +57 -51
- package/dist/DesktopPicker/DesktopPicker.d.ts +1 -1
- package/dist/DesktopPicker/DesktopPicker.js +36 -25
- package/dist/DesktopTimePicker/DesktopTimePicker.d.ts +1 -1
- package/dist/DesktopTimePicker/DesktopTimePicker.js +46 -41
- package/dist/DesktopTimePicker/DesktopTimePickerList.js +21 -20
- package/dist/DesktopTimePicker/useGetTimePickerContent.d.ts +1 -2
- package/dist/DesktopTimePicker/useGetTimePickerContent.js +9 -8
- package/dist/Dialog/Dialog.js +48 -39
- package/dist/Dialog/FunctionalDialog.js +8 -8
- package/dist/Dialog/__tests__/fixtures/A11yDemos.d.ts +3 -4
- package/dist/Dialog/__tests__/fixtures/A11yDemos.js +4 -4
- package/dist/Divider/Divider.d.ts +1 -1
- package/dist/Divider/Divider.js +9 -4
- package/dist/Drawer/Drawer.js +28 -25
- package/dist/Drawer/__tests__/fixtures/A11yDemos.d.ts +12 -13
- package/dist/Drawer/__tests__/fixtures/A11yDemos.js +88 -35
- package/dist/Fade/Fade.js +23 -22
- package/dist/IconButton/IconButton.d.ts +1 -1
- package/dist/IconButton/IconButton.js +14 -9
- package/dist/Image/Image.d.ts +1 -1
- package/dist/Image/Image.js +15 -10
- package/dist/Image/__tests__/fixtures/A11yDemos.d.ts +12 -13
- package/dist/Image/__tests__/fixtures/A11yDemos.js +29 -25
- package/dist/Input/Input.d.ts +1 -1
- package/dist/Input/Input.js +28 -24
- package/dist/Input/__tests__/fixtures/A11yDemos.d.ts +12 -13
- package/dist/Input/__tests__/fixtures/A11yDemos.js +31 -13
- package/dist/ItemSelector/ItemSelector.d.ts +1 -1
- package/dist/ItemSelector/ItemSelector.js +2 -1
- package/dist/ItemSelector/ItemSelector.miniapp.d.ts +1 -1
- package/dist/ItemSelector/ItemSelector.miniapp.js +2 -1
- package/dist/ItemSelector/ItemSelectorCore.js +82 -68
- package/dist/ItemSelector/Selector/index.d.ts +1 -1
- package/dist/ItemSelector/Selector/index.js +5 -15
- package/dist/List/List.d.ts +1 -1
- package/dist/List/List.js +14 -7
- package/dist/List/ListItem.d.ts +1 -1
- package/dist/List/ListItem.js +14 -7
- package/dist/List/ListItemContent.d.ts +1 -1
- package/dist/List/ListItemContent.js +8 -1
- package/dist/List/ListItemExtra.d.ts +1 -1
- package/dist/List/ListItemExtra.js +5 -1
- package/dist/List/ListItemFooter.d.ts +1 -1
- package/dist/List/ListItemFooter.js +5 -1
- package/dist/List/ListItemHeader.d.ts +1 -1
- package/dist/List/ListItemHeader.js +5 -1
- package/dist/Loading/Loading.d.ts +1 -1
- package/dist/Loading/Loading.js +13 -6
- package/dist/Modal/Modal.d.ts +1 -1
- package/dist/Modal/Modal.js +5 -1
- package/dist/Modal/Modal.miniapp.d.ts +2 -4
- package/dist/Modal/Modal.miniapp.js +9 -6
- package/dist/Modal/__tests__/fixtures/A11yDemos.d.ts +2 -3
- package/dist/Modal/__tests__/fixtures/A11yDemos.js +7 -7
- package/dist/NavBar/NavBar.d.ts +1 -1
- package/dist/NavBar/NavBar.js +24 -11
- package/dist/Picker/Picker.d.ts +1 -1
- package/dist/Picker/Picker.js +63 -57
- package/dist/Picker/PickerPanel.d.ts +1 -1
- package/dist/Picker/PickerPanel.js +44 -37
- package/dist/Picker/__tests__/fixtures/A11yDemos.d.ts +1 -2
- package/dist/Picker/__tests__/fixtures/A11yDemos.js +2 -2
- package/dist/Popover/Popover.d.ts +1 -1
- package/dist/Popover/Popover.js +65 -52
- package/dist/Popover/__tests__/fixtures/A11yDemos.d.ts +16 -17
- package/dist/Popover/__tests__/fixtures/A11yDemos.js +62 -50
- package/dist/Popover/hooks/usePopoverPosition.js +1 -1
- package/dist/Portal/Portal.js +2 -1
- package/dist/Portal/Portal.miniapp.js +3 -2
- package/dist/Progress/Progress.d.ts +1 -1
- package/dist/Progress/Progress.js +9 -4
- package/dist/Progress/__tests__/fixtures/A11yDemos.d.ts +12 -13
- package/dist/Progress/__tests__/fixtures/A11yDemos.js +51 -30
- package/dist/Radio/Radio.d.ts +1 -1
- package/dist/Radio/Radio.js +25 -22
- package/dist/Radio/RadioButtonIcon.d.ts +1 -2
- package/dist/Radio/RadioButtonIcon.js +24 -22
- package/dist/Radio/RadioGroup.d.ts +1 -1
- package/dist/Radio/RadioGroup.js +9 -5
- package/dist/Radio/__tests__/fixtures/A11yDemos.d.ts +6 -7
- package/dist/Radio/__tests__/fixtures/A11yDemos.js +10 -4
- package/dist/Rating/Rating.d.ts +1 -1
- package/dist/Rating/Rating.js +42 -33
- package/dist/ScrollView/ScrollView.d.ts +1 -1
- package/dist/ScrollView/ScrollView.js +3 -2
- package/dist/ScrollView/__tests__/fixtures/A11yDemos.js +205 -168
- package/dist/Select/Select.d.ts +1 -1
- package/dist/Select/Select.js +87 -78
- package/dist/Select/SelectOption.d.ts +1 -1
- package/dist/Select/SelectOption.js +5 -4
- package/dist/Select/__tests__/fixtures/A11yDemos.d.ts +12 -13
- package/dist/Select/__tests__/fixtures/A11yDemos.js +76 -46
- package/dist/Skeleton/Skeleton.d.ts +1 -1
- package/dist/Skeleton/Skeleton.js +9 -4
- package/dist/Slide/Slide.js +25 -24
- package/dist/Slider/Slider.d.ts +1 -1
- package/dist/Slider/Slider.js +34 -27
- package/dist/Stack/Stack.d.ts +1 -1
- package/dist/Stack/Stack.js +17 -9
- package/dist/Stack/demo/StackDemo.d.ts +1 -2
- package/dist/Stack/demo/StackDemo.js +114 -101
- package/dist/Steps/Step.d.ts +1 -1
- package/dist/Steps/Step.js +56 -44
- package/dist/Steps/Steps.d.ts +1 -1
- package/dist/Steps/Steps.js +23 -17
- package/dist/SwipeAction/SwipeAction.d.ts +1 -1
- package/dist/SwipeAction/SwipeAction.js +55 -46
- package/dist/SwipeAction/SwipeActionItem.d.ts +1 -1
- package/dist/SwipeAction/SwipeActionItem.js +9 -4
- package/dist/Swiper/Swiper.d.ts +1 -1
- package/dist/Swiper/Swiper.js +7 -6
- package/dist/Swiper/SwiperItem.d.ts +1 -2
- package/dist/Swiper/SwiperItem.js +5 -2
- package/dist/Switch/Switch.d.ts +1 -1
- package/dist/Switch/Switch.js +22 -18
- package/dist/Switch/__tests__/fixtures/A11yDemos.d.ts +6 -7
- package/dist/Switch/__tests__/fixtures/A11yDemos.js +10 -4
- package/dist/Switch/index.css +11 -11
- package/dist/TabBar/TabBar.d.ts +1 -1
- package/dist/TabBar/TabBar.js +14 -10
- package/dist/TabBar/TabBarItem.d.ts +1 -1
- package/dist/TabBar/TabBarItem.js +31 -20
- package/dist/Tabs/Tab.d.ts +1 -1
- package/dist/Tabs/Tab.js +5 -4
- package/dist/Tabs/TabIndicator.js +3 -2
- package/dist/Tabs/TabMask.js +2 -1
- package/dist/Tabs/TabPanel.d.ts +1 -1
- package/dist/Tabs/TabPanel.js +10 -5
- package/dist/Tabs/Tabs.d.ts +1 -1
- package/dist/Tabs/Tabs.js +26 -17
- package/dist/Tabs/miniapp/Tab.d.ts +1 -1
- package/dist/Tabs/miniapp/Tab.js +5 -4
- package/dist/Tabs/miniapp/TabIndicator.js +3 -2
- package/dist/Tabs/miniapp/Tabs.d.ts +1 -1
- package/dist/Tabs/miniapp/Tabs.js +33 -23
- package/dist/Tag/Tag.d.ts +1 -1
- package/dist/Tag/Tag.js +9 -4
- package/dist/Tag/TagGroup.d.ts +1 -1
- package/dist/Tag/TagGroup.js +9 -4
- package/dist/Tag/__tests__/fixtures/A11yDemos.d.ts +12 -13
- package/dist/Tag/__tests__/fixtures/A11yDemos.js +121 -83
- package/dist/TextArea/TextArea.d.ts +1 -1
- package/dist/TextArea/TextArea.js +40 -36
- package/dist/TextArea/__tests__/fixtures/A11yDemos.d.ts +10 -11
- package/dist/TextArea/__tests__/fixtures/A11yDemos.js +18 -15
- package/dist/ThemeProvider/ThemeProvider.d.ts +1 -1
- package/dist/ThemeProvider/ThemeProvider.js +3 -2
- package/dist/Toast/FunctionalToast.js +11 -11
- package/dist/Toast/Toast.js +38 -32
- package/dist/Toast/__tests__/fixtures/A11yDemos.d.ts +1 -2
- package/dist/Toast/__tests__/fixtures/A11yDemos.js +5 -5
- package/dist/Tooltip/Tooltip.d.ts +1 -1
- package/dist/Tooltip/Tooltip.js +13 -6
- package/dist/Tooltip/__tests__/fixtures/A11yDemos.d.ts +16 -17
- package/dist/Tooltip/__tests__/fixtures/A11yDemos.js +51 -18
- package/dist/Tooltip/useTooltip.js +1 -1
- package/dist/Transition/Transition.js +2 -1
- package/dist/Transition/Transition.miniapp.js +2 -1
- package/dist/Transition/TransitionCore.js +8 -2
- package/dist/TransitionGroup/TransitionGroup.d.ts +1 -2
- package/dist/TransitionGroup/TransitionGroup.js +3 -2
- package/dist/TransitionGroup/demo/TransitionGroupDemo.d.ts +1 -2
- package/dist/TransitionGroup/demo/TransitionGroupDemo.js +24 -27
- package/dist/_.._/benchmarks/components/Button.js +2 -12
- package/dist/_.._/benchmarks/components/Input.js +3 -12
- package/dist/_.._/benchmarks/components/Tabs.js +8 -12
- package/es/ActionSheet/ActionSheet.js +18 -8
- package/es/ActionSheet/ActionSheetItem.d.ts +1 -1
- package/es/ActionSheet/ActionSheetItem.js +12 -5
- package/es/Alert/Alert.d.ts +1 -1
- package/es/Alert/Alert.js +36 -34
- package/es/Alert/__tests__/fixtures/A11yDemos.d.ts +8 -9
- package/es/Alert/__tests__/fixtures/A11yDemos.js +60 -54
- package/es/Avatar/Avatar.d.ts +1 -1
- package/es/Avatar/Avatar.js +11 -9
- package/es/Avatar/AvatarGroup.d.ts +1 -1
- package/es/Avatar/AvatarGroup.js +10 -6
- package/es/Backdrop/Backdrop.d.ts +1 -1
- package/es/Backdrop/Backdrop.js +9 -5
- package/es/Backdrop/__tests__/fixtures/A11yDemos.d.ts +4 -5
- package/es/Backdrop/__tests__/fixtures/A11yDemos.js +3 -3
- package/es/Badge/Badge.d.ts +1 -1
- package/es/Badge/Badge.js +23 -15
- package/es/Badge/__tests__/fixtures/A11yDemos.d.ts +16 -17
- package/es/Badge/__tests__/fixtures/A11yDemos.js +60 -27
- package/es/Badge/index.css +3 -3
- package/es/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/es/Breadcrumb/Breadcrumb.js +19 -10
- package/es/Breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/es/Breadcrumb/BreadcrumbItem.js +18 -10
- package/es/Button/Button.d.ts +1 -1
- package/es/Button/Button.js +14 -7
- package/es/Button/__tests__/fixtures/A11yDemos.d.ts +14 -15
- package/es/Button/__tests__/fixtures/A11yDemos.js +32 -8
- package/es/CSSTransition/CSSTransition.js +2 -1
- package/es/CSSTransition/demo/CSSTransitionDemo.d.ts +1 -2
- package/es/CSSTransition/demo/CSSTransitionDemo.js +28 -25
- package/es/Calendar/Calendar.d.ts +1 -1
- package/es/Calendar/Calendar.js +67 -59
- package/es/Calendar/__tests__/fixtures/A11yDemos.d.ts +1 -2
- package/es/Calendar/__tests__/fixtures/A11yDemos.js +2 -2
- package/es/Card/Card.d.ts +1 -1
- package/es/Card/Card.js +9 -4
- package/es/Card/CardContent.d.ts +1 -1
- package/es/Card/CardContent.js +5 -1
- package/es/Card/CardFooter.d.ts +1 -1
- package/es/Card/CardFooter.js +5 -1
- package/es/Card/CardHeader.d.ts +1 -1
- package/es/Card/CardHeader.js +16 -9
- package/es/Checkbox/Checkbox.d.ts +1 -1
- package/es/Checkbox/Checkbox.js +30 -23
- package/es/Checkbox/CheckboxGroup.d.ts +1 -1
- package/es/Checkbox/CheckboxGroup.js +9 -5
- package/es/Checkbox/__tests__/fixtures/A11yDemos.d.ts +6 -7
- package/es/Checkbox/__tests__/fixtures/A11yDemos.js +10 -4
- package/es/Checkbox/index.css +4 -4
- package/es/CitySelector/CitySelector.d.ts +1 -1
- package/es/CitySelector/CitySelector.js +2 -1
- package/es/CitySelector/CitySelector.miniapp.d.ts +1 -1
- package/es/CitySelector/CitySelector.miniapp.js +2 -1
- package/es/CitySelector/CitySelectorCore.js +83 -61
- package/es/CitySelector/Selector/index.d.ts +1 -1
- package/es/CitySelector/Selector/index.js +5 -5
- package/es/Collapse/Collapse.js +51 -50
- package/es/CollapsePanel/CollapsePanel.d.ts +1 -1
- package/es/CollapsePanel/CollapsePanel.js +10 -8
- package/es/CollapsePanel/CollapsePanelItem.d.ts +1 -1
- package/es/CollapsePanel/CollapsePanelItem.js +27 -17
- package/es/Countdown/Countdown.d.ts +1 -1
- package/es/Countdown/Countdown.js +39 -29
- package/es/Countdown/__tests__/fixtures/A11yDemos.d.ts +14 -15
- package/es/Countdown/__tests__/fixtures/A11yDemos.js +37 -23
- package/es/DatePicker/DatePicker.d.ts +1 -1
- package/es/DatePicker/DatePicker.js +3 -2
- package/es/DesktopDatePicker/DesktopDatePicker.d.ts +1 -1
- package/es/DesktopDatePicker/DesktopDatePicker.js +45 -40
- package/es/DesktopDatePicker/useGetDatePickerContent.d.ts +1 -2
- package/es/DesktopDatePicker/useGetDatePickerContent.js +48 -41
- package/es/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +1 -1
- package/es/DesktopDateTimePicker/DesktopDateTimePicker.js +57 -51
- package/es/DesktopPicker/DesktopPicker.d.ts +1 -1
- package/es/DesktopPicker/DesktopPicker.js +36 -25
- package/es/DesktopTimePicker/DesktopTimePicker.d.ts +1 -1
- package/es/DesktopTimePicker/DesktopTimePicker.js +46 -41
- package/es/DesktopTimePicker/DesktopTimePickerList.js +21 -20
- package/es/DesktopTimePicker/useGetTimePickerContent.d.ts +1 -2
- package/es/DesktopTimePicker/useGetTimePickerContent.js +9 -8
- package/es/Dialog/Dialog.js +48 -39
- package/es/Dialog/FunctionalDialog.js +8 -8
- package/es/Dialog/__tests__/fixtures/A11yDemos.d.ts +3 -4
- package/es/Dialog/__tests__/fixtures/A11yDemos.js +4 -4
- package/es/Divider/Divider.d.ts +1 -1
- package/es/Divider/Divider.js +9 -4
- package/es/Drawer/Drawer.js +28 -25
- package/es/Drawer/__tests__/fixtures/A11yDemos.d.ts +12 -13
- package/es/Drawer/__tests__/fixtures/A11yDemos.js +88 -35
- package/es/Fade/Fade.js +23 -22
- package/es/IconButton/IconButton.d.ts +1 -1
- package/es/IconButton/IconButton.js +14 -9
- package/es/Image/Image.d.ts +1 -1
- package/es/Image/Image.js +15 -10
- package/es/Image/__tests__/fixtures/A11yDemos.d.ts +12 -13
- package/es/Image/__tests__/fixtures/A11yDemos.js +29 -25
- package/es/Input/Input.d.ts +1 -1
- package/es/Input/Input.js +28 -24
- package/es/Input/__tests__/fixtures/A11yDemos.d.ts +12 -13
- package/es/Input/__tests__/fixtures/A11yDemos.js +31 -13
- package/es/ItemSelector/ItemSelector.d.ts +1 -1
- package/es/ItemSelector/ItemSelector.js +2 -1
- package/es/ItemSelector/ItemSelector.miniapp.d.ts +1 -1
- package/es/ItemSelector/ItemSelector.miniapp.js +2 -1
- package/es/ItemSelector/ItemSelectorCore.js +82 -68
- package/es/ItemSelector/Selector/index.d.ts +1 -1
- package/es/ItemSelector/Selector/index.js +5 -5
- package/es/List/List.d.ts +1 -1
- package/es/List/List.js +14 -7
- package/es/List/ListItem.d.ts +1 -1
- package/es/List/ListItem.js +14 -7
- package/es/List/ListItemContent.d.ts +1 -1
- package/es/List/ListItemContent.js +8 -1
- package/es/List/ListItemExtra.d.ts +1 -1
- package/es/List/ListItemExtra.js +5 -1
- package/es/List/ListItemFooter.d.ts +1 -1
- package/es/List/ListItemFooter.js +5 -1
- package/es/List/ListItemHeader.d.ts +1 -1
- package/es/List/ListItemHeader.js +5 -1
- package/es/Loading/Loading.d.ts +1 -1
- package/es/Loading/Loading.js +13 -6
- package/es/Modal/Modal.d.ts +1 -1
- package/es/Modal/Modal.js +5 -1
- package/es/Modal/Modal.miniapp.d.ts +2 -4
- package/es/Modal/Modal.miniapp.js +9 -6
- package/es/Modal/__tests__/fixtures/A11yDemos.d.ts +2 -3
- package/es/Modal/__tests__/fixtures/A11yDemos.js +7 -7
- package/es/NavBar/NavBar.d.ts +1 -1
- package/es/NavBar/NavBar.js +24 -11
- package/es/Picker/Picker.d.ts +1 -1
- package/es/Picker/Picker.js +63 -57
- package/es/Picker/PickerPanel.d.ts +1 -1
- package/es/Picker/PickerPanel.js +44 -37
- package/es/Picker/__tests__/fixtures/A11yDemos.d.ts +1 -2
- package/es/Picker/__tests__/fixtures/A11yDemos.js +2 -2
- package/es/Popover/Popover.d.ts +1 -1
- package/es/Popover/Popover.js +65 -52
- package/es/Popover/__tests__/fixtures/A11yDemos.d.ts +16 -17
- package/es/Popover/__tests__/fixtures/A11yDemos.js +62 -50
- package/es/Popover/hooks/usePopoverPosition.js +1 -1
- package/es/Portal/Portal.js +2 -1
- package/es/Portal/Portal.miniapp.js +3 -2
- package/es/Progress/Progress.d.ts +1 -1
- package/es/Progress/Progress.js +9 -4
- package/es/Progress/__tests__/fixtures/A11yDemos.d.ts +12 -13
- package/es/Progress/__tests__/fixtures/A11yDemos.js +51 -30
- package/es/Radio/Radio.d.ts +1 -1
- package/es/Radio/Radio.js +25 -22
- package/es/Radio/RadioButtonIcon.d.ts +1 -2
- package/es/Radio/RadioButtonIcon.js +24 -22
- package/es/Radio/RadioGroup.d.ts +1 -1
- package/es/Radio/RadioGroup.js +9 -5
- package/es/Radio/__tests__/fixtures/A11yDemos.d.ts +6 -7
- package/es/Radio/__tests__/fixtures/A11yDemos.js +10 -4
- package/es/Rating/Rating.d.ts +1 -1
- package/es/Rating/Rating.js +42 -33
- package/es/ScrollView/ScrollView.d.ts +1 -1
- package/es/ScrollView/ScrollView.js +3 -2
- package/es/ScrollView/__tests__/fixtures/A11yDemos.js +205 -168
- package/es/Select/Select.d.ts +1 -1
- package/es/Select/Select.js +87 -78
- package/es/Select/SelectOption.d.ts +1 -1
- package/es/Select/SelectOption.js +5 -4
- package/es/Select/__tests__/fixtures/A11yDemos.d.ts +12 -13
- package/es/Select/__tests__/fixtures/A11yDemos.js +76 -46
- package/es/Skeleton/Skeleton.d.ts +1 -1
- package/es/Skeleton/Skeleton.js +9 -4
- package/es/Slide/Slide.js +25 -24
- package/es/Slider/Slider.d.ts +1 -1
- package/es/Slider/Slider.js +34 -27
- package/es/Stack/Stack.d.ts +1 -1
- package/es/Stack/Stack.js +17 -9
- package/es/Stack/demo/StackDemo.d.ts +1 -2
- package/es/Stack/demo/StackDemo.js +114 -91
- package/es/Steps/Step.d.ts +1 -1
- package/es/Steps/Step.js +56 -44
- package/es/Steps/Steps.d.ts +1 -1
- package/es/Steps/Steps.js +23 -17
- package/es/SwipeAction/SwipeAction.d.ts +1 -1
- package/es/SwipeAction/SwipeAction.js +55 -46
- package/es/SwipeAction/SwipeActionItem.d.ts +1 -1
- package/es/SwipeAction/SwipeActionItem.js +9 -4
- package/es/Swiper/Swiper.d.ts +1 -1
- package/es/Swiper/Swiper.js +7 -6
- package/es/Swiper/SwiperItem.d.ts +1 -2
- package/es/Swiper/SwiperItem.js +5 -2
- package/es/Switch/Switch.d.ts +1 -1
- package/es/Switch/Switch.js +22 -18
- package/es/Switch/__tests__/fixtures/A11yDemos.d.ts +6 -7
- package/es/Switch/__tests__/fixtures/A11yDemos.js +10 -4
- package/es/Switch/index.css +11 -11
- package/es/TabBar/TabBar.d.ts +1 -1
- package/es/TabBar/TabBar.js +14 -10
- package/es/TabBar/TabBarItem.d.ts +1 -1
- package/es/TabBar/TabBarItem.js +31 -20
- package/es/Tabs/Tab.d.ts +1 -1
- package/es/Tabs/Tab.js +5 -4
- package/es/Tabs/TabIndicator.js +3 -2
- package/es/Tabs/TabMask.js +2 -1
- package/es/Tabs/TabPanel.d.ts +1 -1
- package/es/Tabs/TabPanel.js +10 -5
- package/es/Tabs/Tabs.d.ts +1 -1
- package/es/Tabs/Tabs.js +26 -17
- package/es/Tabs/miniapp/Tab.d.ts +1 -1
- package/es/Tabs/miniapp/Tab.js +5 -4
- package/es/Tabs/miniapp/TabIndicator.js +3 -2
- package/es/Tabs/miniapp/Tabs.d.ts +1 -1
- package/es/Tabs/miniapp/Tabs.js +33 -23
- package/es/Tag/Tag.d.ts +1 -1
- package/es/Tag/Tag.js +9 -4
- package/es/Tag/TagGroup.d.ts +1 -1
- package/es/Tag/TagGroup.js +9 -4
- package/es/Tag/__tests__/fixtures/A11yDemos.d.ts +12 -13
- package/es/Tag/__tests__/fixtures/A11yDemos.js +121 -83
- package/es/TextArea/TextArea.d.ts +1 -1
- package/es/TextArea/TextArea.js +40 -36
- package/es/TextArea/__tests__/fixtures/A11yDemos.d.ts +10 -11
- package/es/TextArea/__tests__/fixtures/A11yDemos.js +18 -15
- package/es/ThemeProvider/ThemeProvider.d.ts +1 -1
- package/es/ThemeProvider/ThemeProvider.js +3 -2
- package/es/Toast/FunctionalToast.js +11 -11
- package/es/Toast/Toast.js +38 -32
- package/es/Toast/__tests__/fixtures/A11yDemos.d.ts +1 -2
- package/es/Toast/__tests__/fixtures/A11yDemos.js +5 -5
- package/es/Tooltip/Tooltip.d.ts +1 -1
- package/es/Tooltip/Tooltip.js +13 -6
- package/es/Tooltip/__tests__/fixtures/A11yDemos.d.ts +16 -17
- package/es/Tooltip/__tests__/fixtures/A11yDemos.js +51 -18
- package/es/Tooltip/useTooltip.js +1 -1
- package/es/Transition/Transition.js +2 -1
- package/es/Transition/Transition.miniapp.js +2 -1
- package/es/Transition/TransitionCore.js +8 -2
- package/es/TransitionGroup/TransitionGroup.d.ts +1 -2
- package/es/TransitionGroup/TransitionGroup.js +3 -2
- package/es/TransitionGroup/demo/TransitionGroupDemo.d.ts +1 -2
- package/es/TransitionGroup/demo/TransitionGroupDemo.js +24 -17
- package/es/_.._/benchmarks/components/Button.js +2 -2
- package/es/_.._/benchmarks/components/Input.js +3 -2
- package/es/_.._/benchmarks/components/Tabs.js +8 -2
- package/package.json +17 -11
|
@@ -17,24 +17,26 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
20
21
|
import * as React from "react";
|
|
21
22
|
import ScrollView from "../../ScrollView";
|
|
22
23
|
const BasicScrollViewDemo = () => {
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ jsx(ScrollView, { scrollY: true, style: { height: "300px", width: "100%" }, children: Array.from({ length: 50 }, (_, index) => /* @__PURE__ */ jsxs(
|
|
24
25
|
"div",
|
|
25
26
|
{
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
style: { padding: "10px", borderBottom: "1px solid #eee" },
|
|
28
|
+
children: [
|
|
29
|
+
"Item ",
|
|
30
|
+
index + 1
|
|
31
|
+
]
|
|
28
32
|
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
)));
|
|
33
|
+
index
|
|
34
|
+
)) });
|
|
32
35
|
};
|
|
33
36
|
const HorizontalScrollViewDemo = () => {
|
|
34
|
-
return /* @__PURE__ */
|
|
37
|
+
return /* @__PURE__ */ jsx(ScrollView, { scrollX: true, style: { width: "300px" }, children: /* @__PURE__ */ jsx("div", { style: { display: "flex", width: "max-content" }, children: Array.from({ length: 20 }, (_, index) => /* @__PURE__ */ jsxs(
|
|
35
38
|
"div",
|
|
36
39
|
{
|
|
37
|
-
key: index,
|
|
38
40
|
style: {
|
|
39
41
|
minWidth: "100px",
|
|
40
42
|
height: "80px",
|
|
@@ -44,11 +46,14 @@ const HorizontalScrollViewDemo = () => {
|
|
|
44
46
|
display: "flex",
|
|
45
47
|
alignItems: "center",
|
|
46
48
|
justifyContent: "center"
|
|
47
|
-
}
|
|
49
|
+
},
|
|
50
|
+
children: [
|
|
51
|
+
"Item ",
|
|
52
|
+
index + 1
|
|
53
|
+
]
|
|
48
54
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
))));
|
|
55
|
+
index
|
|
56
|
+
)) }) });
|
|
52
57
|
};
|
|
53
58
|
const ScrollEventsDemo = () => {
|
|
54
59
|
const [scrollInfo, setScrollInfo] = React.useState({
|
|
@@ -70,40 +75,56 @@ const ScrollEventsDemo = () => {
|
|
|
70
75
|
const handleScrollToLower = () => {
|
|
71
76
|
setScrollInfo((prev) => __spreadProps(__spreadValues({}, prev), { atTop: false, atBottom: true }));
|
|
72
77
|
};
|
|
73
|
-
return /* @__PURE__ */
|
|
74
|
-
|
|
75
|
-
{
|
|
76
|
-
"data-testid": "scroll-info",
|
|
77
|
-
style: {
|
|
78
|
-
marginBottom: "10px",
|
|
79
|
-
padding: "10px",
|
|
80
|
-
backgroundColor: "#f9f9f9"
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
/* @__PURE__ */ React.createElement("p", null, "Scroll Top: ", scrollInfo.scrollTop),
|
|
84
|
-
/* @__PURE__ */ React.createElement("p", null, "At Top: ", scrollInfo.atTop ? "Yes" : "No"),
|
|
85
|
-
/* @__PURE__ */ React.createElement("p", null, "At Bottom: ", scrollInfo.atBottom ? "Yes" : "No")
|
|
86
|
-
), /* @__PURE__ */ React.createElement(
|
|
87
|
-
ScrollView,
|
|
88
|
-
{
|
|
89
|
-
scrollY: true,
|
|
90
|
-
style: { height: "200px", width: "100%" },
|
|
91
|
-
onScroll: handleScroll,
|
|
92
|
-
onScrollToUpper: handleScrollToUpper,
|
|
93
|
-
onScrollToLower: handleScrollToLower,
|
|
94
|
-
upperThreshold: 30,
|
|
95
|
-
lowerThreshold: 30
|
|
96
|
-
},
|
|
97
|
-
Array.from({ length: 30 }, (_, index) => /* @__PURE__ */ React.createElement(
|
|
78
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
79
|
+
/* @__PURE__ */ jsxs(
|
|
98
80
|
"div",
|
|
99
81
|
{
|
|
100
|
-
|
|
101
|
-
style: {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
82
|
+
"data-testid": "scroll-info",
|
|
83
|
+
style: {
|
|
84
|
+
marginBottom: "10px",
|
|
85
|
+
padding: "10px",
|
|
86
|
+
backgroundColor: "#f9f9f9"
|
|
87
|
+
},
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ jsxs("p", { children: [
|
|
90
|
+
"Scroll Top: ",
|
|
91
|
+
scrollInfo.scrollTop
|
|
92
|
+
] }),
|
|
93
|
+
/* @__PURE__ */ jsxs("p", { children: [
|
|
94
|
+
"At Top: ",
|
|
95
|
+
scrollInfo.atTop ? "Yes" : "No"
|
|
96
|
+
] }),
|
|
97
|
+
/* @__PURE__ */ jsxs("p", { children: [
|
|
98
|
+
"At Bottom: ",
|
|
99
|
+
scrollInfo.atBottom ? "Yes" : "No"
|
|
100
|
+
] })
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
/* @__PURE__ */ jsx(
|
|
105
|
+
ScrollView,
|
|
106
|
+
{
|
|
107
|
+
scrollY: true,
|
|
108
|
+
style: { height: "200px", width: "100%" },
|
|
109
|
+
onScroll: handleScroll,
|
|
110
|
+
onScrollToUpper: handleScrollToUpper,
|
|
111
|
+
onScrollToLower: handleScrollToLower,
|
|
112
|
+
upperThreshold: 30,
|
|
113
|
+
lowerThreshold: 30,
|
|
114
|
+
children: Array.from({ length: 30 }, (_, index) => /* @__PURE__ */ jsxs(
|
|
115
|
+
"div",
|
|
116
|
+
{
|
|
117
|
+
style: { padding: "15px", borderBottom: "1px solid #ddd" },
|
|
118
|
+
children: [
|
|
119
|
+
"Scroll Item ",
|
|
120
|
+
index + 1
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
index
|
|
124
|
+
))
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
] });
|
|
107
128
|
};
|
|
108
129
|
const ControlledScrollDemo = () => {
|
|
109
130
|
const [scrollTop, setScrollTop] = React.useState(0);
|
|
@@ -116,72 +137,79 @@ const ControlledScrollDemo = () => {
|
|
|
116
137
|
setScrollTop(0);
|
|
117
138
|
setScrollIntoView(elementId);
|
|
118
139
|
};
|
|
119
|
-
return /* @__PURE__ */
|
|
120
|
-
|
|
121
|
-
{
|
|
122
|
-
style: {
|
|
123
|
-
marginBottom: "10px",
|
|
124
|
-
padding: "10px",
|
|
125
|
-
backgroundColor: "#f5f5f5"
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
/* @__PURE__ */ React.createElement(
|
|
129
|
-
"button",
|
|
130
|
-
{
|
|
131
|
-
type: "button",
|
|
132
|
-
onClick: () => scrollToPosition(0),
|
|
133
|
-
style: { marginRight: "5px" }
|
|
134
|
-
},
|
|
135
|
-
"Top"
|
|
136
|
-
),
|
|
137
|
-
/* @__PURE__ */ React.createElement(
|
|
138
|
-
"button",
|
|
139
|
-
{
|
|
140
|
-
type: "button",
|
|
141
|
-
onClick: () => scrollToPosition(200),
|
|
142
|
-
style: { marginRight: "5px" }
|
|
143
|
-
},
|
|
144
|
-
"200px"
|
|
145
|
-
),
|
|
146
|
-
/* @__PURE__ */ React.createElement(
|
|
147
|
-
"button",
|
|
148
|
-
{
|
|
149
|
-
type: "button",
|
|
150
|
-
onClick: () => scrollToElement("item-10"),
|
|
151
|
-
style: { marginRight: "5px" }
|
|
152
|
-
},
|
|
153
|
-
"Item 10"
|
|
154
|
-
),
|
|
155
|
-
/* @__PURE__ */ React.createElement("button", { type: "button", onClick: () => scrollToElement("item-20") }, "Item 20")
|
|
156
|
-
), /* @__PURE__ */ React.createElement(
|
|
157
|
-
ScrollView,
|
|
158
|
-
{
|
|
159
|
-
scrollY: true,
|
|
160
|
-
style: { height: "250px", width: "100%" },
|
|
161
|
-
scrollTop,
|
|
162
|
-
scrollIntoView,
|
|
163
|
-
scrollWithAnimation: true
|
|
164
|
-
},
|
|
165
|
-
Array.from({ length: 30 }, (_, index) => /* @__PURE__ */ React.createElement(
|
|
140
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
141
|
+
/* @__PURE__ */ jsxs(
|
|
166
142
|
"div",
|
|
167
143
|
{
|
|
168
|
-
key: index,
|
|
169
|
-
id: `item-${index + 1}`,
|
|
170
144
|
style: {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
backgroundColor:
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
145
|
+
marginBottom: "10px",
|
|
146
|
+
padding: "10px",
|
|
147
|
+
backgroundColor: "#f5f5f5"
|
|
148
|
+
},
|
|
149
|
+
children: [
|
|
150
|
+
/* @__PURE__ */ jsx(
|
|
151
|
+
"button",
|
|
152
|
+
{
|
|
153
|
+
type: "button",
|
|
154
|
+
onClick: () => scrollToPosition(0),
|
|
155
|
+
style: { marginRight: "5px" },
|
|
156
|
+
children: "Top"
|
|
157
|
+
}
|
|
158
|
+
),
|
|
159
|
+
/* @__PURE__ */ jsx(
|
|
160
|
+
"button",
|
|
161
|
+
{
|
|
162
|
+
type: "button",
|
|
163
|
+
onClick: () => scrollToPosition(200),
|
|
164
|
+
style: { marginRight: "5px" },
|
|
165
|
+
children: "200px"
|
|
166
|
+
}
|
|
167
|
+
),
|
|
168
|
+
/* @__PURE__ */ jsx(
|
|
169
|
+
"button",
|
|
170
|
+
{
|
|
171
|
+
type: "button",
|
|
172
|
+
onClick: () => scrollToElement("item-10"),
|
|
173
|
+
style: { marginRight: "5px" },
|
|
174
|
+
children: "Item 10"
|
|
175
|
+
}
|
|
176
|
+
),
|
|
177
|
+
/* @__PURE__ */ jsx("button", { type: "button", onClick: () => scrollToElement("item-20"), children: "Item 20" })
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
),
|
|
181
|
+
/* @__PURE__ */ jsx(
|
|
182
|
+
ScrollView,
|
|
183
|
+
{
|
|
184
|
+
scrollY: true,
|
|
185
|
+
style: { height: "250px", width: "100%" },
|
|
186
|
+
scrollTop,
|
|
187
|
+
scrollIntoView,
|
|
188
|
+
scrollWithAnimation: true,
|
|
189
|
+
children: Array.from({ length: 30 }, (_, index) => /* @__PURE__ */ jsxs(
|
|
190
|
+
"div",
|
|
191
|
+
{
|
|
192
|
+
id: `item-${index + 1}`,
|
|
193
|
+
style: {
|
|
194
|
+
padding: "20px",
|
|
195
|
+
borderBottom: "1px solid #ccc",
|
|
196
|
+
backgroundColor: (index + 1) % 10 === 0 ? "#e6f3ff" : "white"
|
|
197
|
+
},
|
|
198
|
+
children: [
|
|
199
|
+
"Item ",
|
|
200
|
+
index + 1,
|
|
201
|
+
" ",
|
|
202
|
+
(index + 1) % 10 === 0 && "(Highlighted)"
|
|
203
|
+
]
|
|
204
|
+
},
|
|
205
|
+
index
|
|
206
|
+
))
|
|
207
|
+
}
|
|
208
|
+
)
|
|
209
|
+
] });
|
|
182
210
|
};
|
|
183
211
|
const BidirectionalScrollDemo = () => {
|
|
184
|
-
return /* @__PURE__ */
|
|
212
|
+
return /* @__PURE__ */ jsx(
|
|
185
213
|
ScrollView,
|
|
186
214
|
{
|
|
187
215
|
scrollX: true,
|
|
@@ -191,39 +219,41 @@ const BidirectionalScrollDemo = () => {
|
|
|
191
219
|
height: "200px",
|
|
192
220
|
border: "1px solid #ddd",
|
|
193
221
|
borderRadius: "4px"
|
|
194
|
-
}
|
|
195
|
-
},
|
|
196
|
-
/* @__PURE__ */ React.createElement(
|
|
197
|
-
"div",
|
|
198
|
-
{
|
|
199
|
-
style: {
|
|
200
|
-
width: "600px",
|
|
201
|
-
height: "400px",
|
|
202
|
-
backgroundImage: "linear-gradient(45deg, #f0f0f0 25%, transparent 25%), linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f0f0f0 75%), linear-gradient(-45deg, transparent 75%, #f0f0f0 75%)",
|
|
203
|
-
backgroundSize: "20px 20px",
|
|
204
|
-
backgroundPosition: "0 0, 0 10px, 10px -10px, -10px 0px",
|
|
205
|
-
position: "relative"
|
|
206
|
-
}
|
|
207
222
|
},
|
|
208
|
-
/* @__PURE__ */
|
|
223
|
+
children: /* @__PURE__ */ jsx(
|
|
209
224
|
"div",
|
|
210
225
|
{
|
|
211
226
|
style: {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
227
|
+
width: "600px",
|
|
228
|
+
height: "400px",
|
|
229
|
+
backgroundImage: "linear-gradient(45deg, #f0f0f0 25%, transparent 25%), linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f0f0f0 75%), linear-gradient(-45deg, transparent 75%, #f0f0f0 75%)",
|
|
230
|
+
backgroundSize: "20px 20px",
|
|
231
|
+
backgroundPosition: "0 0, 0 10px, 10px -10px, -10px 0px",
|
|
232
|
+
position: "relative"
|
|
233
|
+
},
|
|
234
|
+
children: /* @__PURE__ */ jsxs(
|
|
235
|
+
"div",
|
|
236
|
+
{
|
|
237
|
+
style: {
|
|
238
|
+
position: "absolute",
|
|
239
|
+
top: "50%",
|
|
240
|
+
left: "50%",
|
|
241
|
+
transform: "translate(-50%, -50%)",
|
|
242
|
+
padding: "20px",
|
|
243
|
+
backgroundColor: "white",
|
|
244
|
+
border: "2px solid #007acc",
|
|
245
|
+
borderRadius: "8px",
|
|
246
|
+
boxShadow: "0 2px 8px rgba(0,0,0,0.1)"
|
|
247
|
+
},
|
|
248
|
+
children: [
|
|
249
|
+
/* @__PURE__ */ jsx("h3", { style: { margin: "0 0 10px 0", color: "#007acc" }, children: "Scroll in both directions!" }),
|
|
250
|
+
/* @__PURE__ */ jsx("p", { style: { margin: 0, color: "#666" }, children: "This content area is larger than the viewport" })
|
|
251
|
+
]
|
|
252
|
+
}
|
|
253
|
+
)
|
|
254
|
+
}
|
|
225
255
|
)
|
|
226
|
-
|
|
256
|
+
}
|
|
227
257
|
);
|
|
228
258
|
};
|
|
229
259
|
const ThresholdTestDemo = () => {
|
|
@@ -234,44 +264,51 @@ const ThresholdTestDemo = () => {
|
|
|
234
264
|
`${(/* @__PURE__ */ new Date()).toLocaleTimeString()}: ${event}`
|
|
235
265
|
]);
|
|
236
266
|
};
|
|
237
|
-
return /* @__PURE__ */
|
|
238
|
-
|
|
239
|
-
{
|
|
240
|
-
"data-testid": "threshold-events",
|
|
241
|
-
style: {
|
|
242
|
-
marginBottom: "10px",
|
|
243
|
-
padding: "10px",
|
|
244
|
-
backgroundColor: "#f0f8ff",
|
|
245
|
-
minHeight: "80px"
|
|
246
|
-
}
|
|
247
|
-
},
|
|
248
|
-
/* @__PURE__ */ React.createElement("strong", null, "Threshold Events:"),
|
|
249
|
-
thresholdEvents.map((event, index) => /* @__PURE__ */ React.createElement("div", { key: index, style: { fontSize: "12px", color: "#666" } }, event))
|
|
250
|
-
), /* @__PURE__ */ React.createElement(
|
|
251
|
-
ScrollView,
|
|
252
|
-
{
|
|
253
|
-
scrollY: true,
|
|
254
|
-
style: { height: "150px", width: "100%" },
|
|
255
|
-
upperThreshold: 20,
|
|
256
|
-
lowerThreshold: 20,
|
|
257
|
-
onScrollToUpper: () => addEvent("Reached upper threshold (20px)"),
|
|
258
|
-
onScrollToLower: () => addEvent("Reached lower threshold (20px)")
|
|
259
|
-
},
|
|
260
|
-
Array.from({ length: 20 }, (_, index) => /* @__PURE__ */ React.createElement(
|
|
267
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
268
|
+
/* @__PURE__ */ jsxs(
|
|
261
269
|
"div",
|
|
262
270
|
{
|
|
263
|
-
|
|
271
|
+
"data-testid": "threshold-events",
|
|
264
272
|
style: {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
backgroundColor:
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
marginBottom: "10px",
|
|
274
|
+
padding: "10px",
|
|
275
|
+
backgroundColor: "#f0f8ff",
|
|
276
|
+
minHeight: "80px"
|
|
277
|
+
},
|
|
278
|
+
children: [
|
|
279
|
+
/* @__PURE__ */ jsx("strong", { children: "Threshold Events:" }),
|
|
280
|
+
thresholdEvents.map((event, index) => /* @__PURE__ */ jsx("div", { style: { fontSize: "12px", color: "#666" }, children: event }, index))
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
),
|
|
284
|
+
/* @__PURE__ */ jsx(
|
|
285
|
+
ScrollView,
|
|
286
|
+
{
|
|
287
|
+
scrollY: true,
|
|
288
|
+
style: { height: "150px", width: "100%" },
|
|
289
|
+
upperThreshold: 20,
|
|
290
|
+
lowerThreshold: 20,
|
|
291
|
+
onScrollToUpper: () => addEvent("Reached upper threshold (20px)"),
|
|
292
|
+
onScrollToLower: () => addEvent("Reached lower threshold (20px)"),
|
|
293
|
+
children: Array.from({ length: 20 }, (_, index) => /* @__PURE__ */ jsxs(
|
|
294
|
+
"div",
|
|
295
|
+
{
|
|
296
|
+
style: {
|
|
297
|
+
padding: "12px",
|
|
298
|
+
borderBottom: "1px solid #eee",
|
|
299
|
+
backgroundColor: index === 0 || index === 19 ? "#fff3cd" : "white"
|
|
300
|
+
},
|
|
301
|
+
children: [
|
|
302
|
+
index === 0 && "First Item (Top Threshold Test)",
|
|
303
|
+
index === 19 && "Last Item (Bottom Threshold Test)",
|
|
304
|
+
index !== 0 && index !== 19 && `Item ${index + 1}`
|
|
305
|
+
]
|
|
306
|
+
},
|
|
307
|
+
index
|
|
308
|
+
))
|
|
309
|
+
}
|
|
310
|
+
)
|
|
311
|
+
] });
|
|
275
312
|
};
|
|
276
313
|
export {
|
|
277
314
|
BasicScrollViewDemo,
|
package/es/Select/Select.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SelectProps } from './Select.types';
|
|
3
3
|
import './index.less';
|
|
4
|
-
declare const Select: React.ForwardRefExoticComponent<Omit<SelectProps
|
|
4
|
+
declare const Select: React.ForwardRefExoticComponent<Omit<SelectProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default Select;
|
package/es/Select/Select.js
CHANGED
|
@@ -49,6 +49,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
49
49
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
52
53
|
import { CaretDownIcon, CaretUpIcon } from "@bifrostui/icons";
|
|
53
54
|
import {
|
|
54
55
|
getStylesAndLocation,
|
|
@@ -181,100 +182,108 @@ const Select = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
181
182
|
};
|
|
182
183
|
}
|
|
183
184
|
}, []);
|
|
184
|
-
const defaultIcon = isOpen ? /* @__PURE__ */
|
|
185
|
+
const defaultIcon = isOpen ? /* @__PURE__ */ jsx(CaretUpIcon, { className: `${prefixCls}-selector-icon`, color: "neutral" }) : /* @__PURE__ */ jsx(CaretDownIcon, { className: `${prefixCls}-selector-icon`, color: "neutral" });
|
|
185
186
|
const renderOptions = () => {
|
|
186
187
|
var _a2;
|
|
187
|
-
return /* @__PURE__ */
|
|
188
|
+
return /* @__PURE__ */ jsx(
|
|
188
189
|
Fade,
|
|
189
190
|
{
|
|
190
191
|
in: isOpen,
|
|
191
192
|
timeout: {
|
|
192
193
|
enter: 167,
|
|
193
194
|
exit: 167
|
|
194
|
-
}
|
|
195
|
-
},
|
|
196
|
-
/* @__PURE__ */ React.createElement(
|
|
197
|
-
"div",
|
|
198
|
-
{
|
|
199
|
-
className: clsx(
|
|
200
|
-
`${prefixCls}-option-container`,
|
|
201
|
-
...((_a2 = className == null ? void 0 : className.split(/\s+/)) == null ? void 0 : _a2.map((cls) => `${cls}-option-container`)) || [],
|
|
202
|
-
`${prefixCls}-option-container-${placement}`,
|
|
203
|
-
{
|
|
204
|
-
[`${prefixCls}-option-container-hide`]: !isOpen
|
|
205
|
-
}
|
|
206
|
-
),
|
|
207
|
-
ref: optionContainerRef,
|
|
208
|
-
style: optionStyle
|
|
209
195
|
},
|
|
210
|
-
/* @__PURE__ */
|
|
211
|
-
|
|
196
|
+
children: /* @__PURE__ */ jsx(
|
|
197
|
+
"div",
|
|
212
198
|
{
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
199
|
+
className: clsx(
|
|
200
|
+
`${prefixCls}-option-container`,
|
|
201
|
+
...((_a2 = className == null ? void 0 : className.split(/\s+/)) == null ? void 0 : _a2.map((cls) => `${cls}-option-container`)) || [],
|
|
202
|
+
`${prefixCls}-option-container-${placement}`,
|
|
203
|
+
{
|
|
204
|
+
[`${prefixCls}-option-container-hide`]: !isOpen
|
|
205
|
+
}
|
|
206
|
+
),
|
|
207
|
+
ref: optionContainerRef,
|
|
208
|
+
style: optionStyle,
|
|
209
|
+
children: /* @__PURE__ */ jsx(
|
|
210
|
+
Slide,
|
|
211
|
+
{
|
|
212
|
+
in: isOpen,
|
|
213
|
+
direction: placement === "bottom" ? "down" : "up",
|
|
214
|
+
timeout: {
|
|
215
|
+
enter: 167,
|
|
216
|
+
exit: 167
|
|
217
|
+
},
|
|
218
|
+
children: /* @__PURE__ */ jsx(
|
|
219
|
+
"div",
|
|
220
|
+
{
|
|
221
|
+
className: clsx(`${prefixCls}-option-main`),
|
|
222
|
+
ref: optionMainRef,
|
|
223
|
+
role: "listbox",
|
|
224
|
+
"aria-label": "option list",
|
|
225
|
+
children
|
|
226
|
+
}
|
|
227
|
+
)
|
|
228
|
+
}
|
|
229
|
+
)
|
|
230
|
+
}
|
|
230
231
|
)
|
|
231
|
-
|
|
232
|
+
}
|
|
232
233
|
);
|
|
233
234
|
};
|
|
234
|
-
return /* @__PURE__ */
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
className: clsx(prefixCls, className, {
|
|
238
|
-
[`${prefixCls}-disabled`]: disabled,
|
|
239
|
-
[`${prefixCls}-active`]: isOpen
|
|
240
|
-
}),
|
|
241
|
-
ref: rootRef,
|
|
242
|
-
role: "combobox",
|
|
243
|
-
"aria-expanded": isOpen,
|
|
244
|
-
"aria-haspopup": "listbox",
|
|
245
|
-
"aria-label": others["aria-label"] || "Select",
|
|
246
|
-
tabIndex: disabled ? -1 : 0
|
|
247
|
-
}, others), {
|
|
248
|
-
onClick: handleSelectClick
|
|
249
|
-
}),
|
|
250
|
-
/* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-selector-container` }, /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-selector` }, renderValue || placeholder), /* @__PURE__ */ React.createElement(
|
|
251
|
-
"input",
|
|
235
|
+
return /* @__PURE__ */ jsxs(BuiSelectContext.Provider, { value: selectContext, children: [
|
|
236
|
+
/* @__PURE__ */ jsx(
|
|
237
|
+
"div",
|
|
252
238
|
__spreadProps(__spreadValues({
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
239
|
+
className: clsx(prefixCls, className, {
|
|
240
|
+
[`${prefixCls}-disabled`]: disabled,
|
|
241
|
+
[`${prefixCls}-active`]: isOpen
|
|
242
|
+
}),
|
|
243
|
+
ref: rootRef,
|
|
244
|
+
role: "combobox",
|
|
245
|
+
"aria-expanded": isOpen,
|
|
246
|
+
"aria-haspopup": "listbox",
|
|
247
|
+
"aria-label": others["aria-label"] || "Select",
|
|
248
|
+
tabIndex: disabled ? -1 : 0
|
|
249
|
+
}, others), {
|
|
250
|
+
onClick: handleSelectClick,
|
|
251
|
+
children: /* @__PURE__ */ jsxs("div", { className: `${prefixCls}-selector-container`, children: [
|
|
252
|
+
/* @__PURE__ */ jsx("div", { className: `${prefixCls}-selector`, children: renderValue || placeholder }),
|
|
253
|
+
/* @__PURE__ */ jsx(
|
|
254
|
+
"input",
|
|
255
|
+
__spreadProps(__spreadValues({
|
|
256
|
+
name,
|
|
257
|
+
readOnly: true,
|
|
258
|
+
ref: inputRef,
|
|
259
|
+
value: selectValue,
|
|
260
|
+
"aria-hidden": "true",
|
|
261
|
+
tabIndex: -1
|
|
262
|
+
}, inputProps), {
|
|
263
|
+
className: clsx(`${prefixCls}-input`, {
|
|
264
|
+
[inputProps == null ? void 0 : inputProps.className]: inputProps == null ? void 0 : inputProps.className
|
|
265
|
+
})
|
|
266
|
+
})
|
|
267
|
+
),
|
|
268
|
+
icon || defaultIcon
|
|
269
|
+
] })
|
|
263
270
|
})
|
|
264
|
-
),
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
271
|
+
),
|
|
272
|
+
/* @__PURE__ */ jsx(Portal, { onMounted: updateOptionStyle, children: renderOptions() }),
|
|
273
|
+
/* @__PURE__ */ jsx(
|
|
274
|
+
Backdrop,
|
|
275
|
+
__spreadProps(__spreadValues({
|
|
276
|
+
open: isOpen,
|
|
277
|
+
invisible: true,
|
|
278
|
+
onTouchStart: handleBackdropClick,
|
|
279
|
+
onClick: handleBackdropClick
|
|
280
|
+
}, BackdropProps), {
|
|
281
|
+
className: clsx(`${prefixCls}-backdrop`, {
|
|
282
|
+
[BackdropProps == null ? void 0 : BackdropProps.className]: BackdropProps == null ? void 0 : BackdropProps.className
|
|
283
|
+
})
|
|
275
284
|
})
|
|
276
|
-
|
|
277
|
-
)
|
|
285
|
+
)
|
|
286
|
+
] });
|
|
278
287
|
});
|
|
279
288
|
Select.displayName = "BuiSelect";
|
|
280
289
|
var Select_default = Select;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SelectOptionProps } from './Select.types';
|
|
3
3
|
import './index.less';
|
|
4
|
-
declare const SelectOption: React.ForwardRefExoticComponent<Omit<SelectOptionProps
|
|
4
|
+
declare const SelectOption: React.ForwardRefExoticComponent<Omit<SelectOptionProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default SelectOption;
|