@bifrostui/react 2.0.0-alpha.3 → 2.0.0-alpha.30
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/LICENSE +21 -0
- package/dist/ActionSheet/ActionSheet.d.ts +1 -1
- package/dist/ActionSheet/ActionSheet.js +8 -8
- package/dist/ActionSheet/ActionSheet.types.d.ts +1 -1
- package/dist/ActionSheet/ActionSheetContext.d.ts +1 -1
- package/dist/ActionSheet/ActionSheetContext.js +2 -2
- package/dist/ActionSheet/ActionSheetItem.types.d.ts +1 -1
- package/dist/Alert/Alert.d.ts +1 -1
- package/dist/Alert/Alert.js +16 -16
- package/dist/Alert/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Alert/__tests__/fixtures/A11yDemos.js +12 -12
- package/dist/Avatar/Avatar.d.ts +1 -1
- package/dist/Avatar/Avatar.js +5 -5
- package/dist/Avatar/Avatar.types.d.ts +1 -1
- package/dist/Avatar/AvatarGroup.types.d.ts +1 -1
- package/dist/Backdrop/Backdrop.d.ts +1 -1
- package/dist/Backdrop/Backdrop.js +3 -3
- package/dist/Backdrop/Backdrop.types.d.ts +1 -1
- package/dist/Backdrop/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Backdrop/__tests__/fixtures/A11yDemos.js +3 -3
- package/dist/Badge/Badge.d.ts +1 -1
- package/dist/Badge/Badge.js +4 -4
- package/dist/Badge/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Badge/__tests__/fixtures/A11yDemos.js +13 -13
- package/dist/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/Breadcrumb/Breadcrumb.js +9 -9
- package/dist/Breadcrumb/Breadcrumb.types.d.ts +1 -1
- package/dist/Breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/dist/Breadcrumb/BreadcrumbItem.js +4 -4
- package/dist/Button/Button.d.ts +1 -1
- package/dist/Button/Button.js +6 -6
- package/dist/Button/Button.types.d.ts +1 -1
- package/dist/Button/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Button/__tests__/fixtures/A11yDemos.js +8 -8
- package/dist/Button/index.css +2 -3
- package/dist/CSSTransition/demo/CSSTransitionDemo.js +3 -0
- package/dist/CSSTransition/demo/index.css +0 -3
- package/dist/Calendar/Calendar.js +5 -1
- package/dist/Calendar/Calendar.types.d.ts +1 -1
- package/dist/Calendar/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Calendar/__tests__/fixtures/A11yDemos.js +2 -2
- package/dist/Card/Card.d.ts +1 -1
- package/dist/Card/Card.js +3 -3
- package/dist/Card/Card.types.d.ts +1 -1
- package/dist/Card/CardContent.d.ts +1 -1
- package/dist/Card/CardContent.js +3 -3
- package/dist/Card/CardContent.types.d.ts +1 -1
- package/dist/Card/CardFooter.d.ts +1 -1
- package/dist/Card/CardFooter.js +3 -3
- package/dist/Card/CardFooter.types.d.ts +1 -1
- package/dist/Card/CardHeader.d.ts +1 -1
- package/dist/Card/CardHeader.js +10 -10
- package/dist/Checkbox/CheckboxContext.d.ts +1 -1
- package/dist/Checkbox/CheckboxContext.js +2 -2
- package/dist/Checkbox/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Checkbox/__tests__/fixtures/A11yDemos.js +4 -4
- package/dist/CitySelector/CitySelector.types.d.ts +1 -1
- package/dist/CitySelector/Selector/index.d.ts +1 -1
- package/dist/CitySelector/Selector/index.js +2 -2
- package/dist/Collapse/Collapse.types.d.ts +1 -1
- package/dist/CollapsePanel/CollapsePanel.d.ts +1 -1
- package/dist/CollapsePanel/CollapsePanel.js +9 -9
- package/dist/CollapsePanel/CollapsePanel.types.d.ts +1 -1
- package/dist/CollapsePanel/CollapsePanelItem.d.ts +1 -1
- package/dist/CollapsePanel/CollapsePanelItem.js +5 -5
- package/dist/Countdown/Countdown.types.d.ts +2 -2
- package/dist/Countdown/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Countdown/__tests__/fixtures/A11yDemos.js +10 -10
- package/dist/Countdown/utils.d.ts +2 -2
- package/dist/Countdown/utils.js +4 -4
- package/dist/DatePicker/DatePicker.d.ts +1 -1
- package/dist/DatePicker/DatePicker.types.d.ts +1 -1
- package/dist/DesktopPicker/DesktopPicker.types.d.ts +1 -1
- package/dist/DesktopTimePicker/DesktopTimePicker.types.d.ts +11 -11
- package/dist/DesktopTimePicker/useGetTimePickerContent.js +2 -2
- package/dist/DesktopTimePicker/utils/utils.d.ts +1 -1
- package/dist/DesktopTimePicker/utils/utils.js +3 -3
- package/dist/Dialog/Dialog.js +19 -12
- package/dist/Dialog/Dialog.types.d.ts +13 -0
- package/dist/Dialog/FunctionalDialog.js +1 -1
- package/dist/Dialog/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Dialog/__tests__/fixtures/A11yDemos.js +4 -4
- package/dist/Dialog/index.css +21 -44
- package/dist/Divider/Divider.types.d.ts +1 -1
- package/dist/Drawer/Drawer.d.ts +1 -1
- package/dist/Drawer/Drawer.js +5 -5
- package/dist/Drawer/Drawer.types.d.ts +1 -1
- package/dist/Fade/Fade.d.ts +1 -1
- package/dist/Fade/Fade.js +4 -4
- package/dist/Fade/Fade.miniapp.js +13 -10
- package/dist/Fade/Fade.types.d.ts +1 -1
- package/dist/IconButton/IconButton.d.ts +1 -1
- package/dist/IconButton/IconButton.js +6 -6
- package/dist/IconButton/IconButton.types.d.ts +1 -1
- package/dist/Input/Input.types.d.ts +1 -1
- package/dist/Input/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Input/__tests__/fixtures/A11yDemos.js +7 -7
- package/dist/ItemSelector/ItemSelector.miniapp.js +7 -5
- package/dist/ItemSelector/ItemSelector.types.d.ts +1 -1
- package/dist/ItemSelector/Selector/index.d.ts +1 -1
- package/dist/ItemSelector/Selector/index.js +2 -2
- package/dist/List/List.d.ts +1 -1
- package/dist/List/List.js +4 -4
- package/dist/List/ListContext.d.ts +1 -1
- package/dist/List/ListContext.js +2 -2
- package/dist/List/ListItem.d.ts +1 -1
- package/dist/List/ListItem.js +8 -8
- package/dist/List/ListItem.types.d.ts +1 -1
- package/dist/List/ListItemContent.d.ts +1 -1
- package/dist/List/ListItemContent.js +3 -3
- package/dist/List/ListItemContent.types.d.ts +1 -1
- package/dist/List/ListItemExtra.d.ts +1 -1
- package/dist/List/ListItemExtra.js +3 -3
- package/dist/List/ListItemExtra.types.d.ts +1 -1
- package/dist/List/ListItemFooter.d.ts +1 -1
- package/dist/List/ListItemFooter.js +3 -3
- package/dist/List/ListItemFooter.types.d.ts +1 -1
- package/dist/List/ListItemHeader.d.ts +1 -1
- package/dist/List/ListItemHeader.js +3 -3
- package/dist/List/ListItemHeader.types.d.ts +1 -1
- package/dist/Loading/Loading.d.ts +1 -1
- package/dist/Loading/Loading.js +5 -5
- package/dist/Loading/Loading.types.d.ts +1 -1
- package/dist/Modal/Modal.d.ts +1 -1
- package/dist/Modal/Modal.js +6 -6
- package/dist/Modal/Modal.miniapp.d.ts +1 -1
- package/dist/Modal/Modal.miniapp.js +7 -7
- package/dist/Modal/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Modal/__tests__/fixtures/A11yDemos.js +3 -3
- package/dist/Modal/useModal.d.ts +1 -0
- package/dist/Modal/useModal.js +26 -29
- package/dist/NavBar/NavBar.d.ts +1 -1
- package/dist/NavBar/NavBar.js +10 -10
- package/dist/Picker/Picker.js +0 -1
- package/dist/Picker/Picker.types.d.ts +1 -1
- package/dist/Picker/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Picker/__tests__/fixtures/A11yDemos.js +2 -2
- package/dist/Popover/Popover.d.ts +1 -1
- package/dist/Popover/Popover.js +8 -8
- package/dist/Popover/Popover.types.d.ts +1 -1
- package/dist/Popover/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Popover/__tests__/fixtures/A11yDemos.js +21 -21
- package/dist/Portal/Portal.d.ts +1 -1
- package/dist/Portal/Portal.js +3 -3
- package/dist/Portal/Portal.miniapp.js +14 -8
- package/dist/Portal/Portal.types.d.ts +1 -1
- package/dist/Progress/Progress.d.ts +1 -1
- package/dist/Progress/Progress.js +4 -4
- package/dist/Progress/Progress.types.d.ts +1 -1
- package/dist/Progress/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Progress/__tests__/fixtures/A11yDemos.js +9 -9
- package/dist/Radio/RadioButtonIcon.d.ts +1 -1
- package/dist/Radio/RadioButtonIcon.js +4 -4
- package/dist/Radio/RadioContext.d.ts +1 -1
- package/dist/Radio/RadioContext.js +2 -2
- package/dist/Radio/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Radio/__tests__/fixtures/A11yDemos.js +4 -4
- package/dist/Radio/index.css +1 -0
- package/dist/Rating/Rating.types.d.ts +1 -1
- package/dist/ScrollView/ScrollView.types.d.ts +210 -1
- package/dist/ScrollView/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/ScrollView/__tests__/fixtures/A11yDemos.js +30 -30
- package/dist/ScrollView/useScrollView.js +16 -4
- package/dist/Select/selectContext.d.ts +0 -1
- package/dist/Skeleton/Skeleton.d.ts +1 -1
- package/dist/Skeleton/Skeleton.js +3 -3
- package/dist/Skeleton/Skeleton.types.d.ts +1 -1
- package/dist/Slide/Slide.d.ts +1 -1
- package/dist/Slide/Slide.js +4 -4
- package/dist/Slide/Slide.miniapp.js +13 -10
- package/dist/Slider/Slider.types.d.ts +1 -1
- package/dist/Steps/Step.types.d.ts +1 -1
- package/dist/Steps/StepsContext.d.ts +1 -1
- package/dist/Steps/StepsContext.js +2 -2
- package/dist/SwipeAction/SwipeAction.js +7 -8
- package/dist/SwipeAction/SwipeAction.types.d.ts +1 -1
- package/dist/SwipeAction/SwipeActionContext.d.ts +0 -1
- package/dist/Swiper/Swiper.js +2 -0
- package/dist/Swiper/Swiper.types.d.ts +1 -1
- package/dist/Swiper/SwiperItem.d.ts +1 -1
- package/dist/Swiper/SwiperItem.js +2 -2
- package/dist/Switch/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Switch/__tests__/fixtures/A11yDemos.js +4 -4
- package/dist/TabBar/TabBar.d.ts +1 -1
- package/dist/TabBar/TabBar.js +5 -5
- package/dist/Tabs/Tab.css +1 -23
- package/dist/Tabs/Tab.d.ts +2 -2
- package/dist/Tabs/Tab.js +42 -34
- package/dist/Tabs/Tab.types.d.ts +1 -1
- package/dist/Tabs/TabIndicator.d.ts +11 -0
- package/dist/Tabs/TabIndicator.js +185 -0
- package/dist/Tabs/TabMask.d.ts +7 -0
- package/dist/Tabs/TabMask.js +47 -0
- package/dist/Tabs/TabPanel.js +4 -4
- package/dist/Tabs/TabPanel.types.d.ts +1 -1
- package/dist/Tabs/Tabs.css +17 -6
- package/dist/Tabs/Tabs.js +101 -157
- package/dist/Tabs/Tabs.types.d.ts +5 -6
- package/dist/Tabs/TabsContext.d.ts +15 -6
- package/dist/Tabs/TabsContext.js +6 -14
- package/dist/Tabs/classes.d.ts +13 -0
- package/dist/Tabs/classes.js +63 -0
- package/dist/Tabs/index.css +18 -29
- package/dist/Tabs/index.d.ts +2 -2
- package/dist/Tabs/index.js +4 -4
- package/dist/Tabs/index.miniapp.d.ts +5 -0
- package/dist/Tabs/index.miniapp.js +50 -0
- package/dist/Tabs/miniapp/Tab.d.ts +5 -0
- package/dist/Tabs/miniapp/Tab.js +106 -0
- package/dist/Tabs/miniapp/TabIndicator.d.ts +15 -0
- package/dist/Tabs/miniapp/TabIndicator.js +301 -0
- package/dist/Tabs/miniapp/Tabs.d.ts +5 -0
- package/dist/Tabs/miniapp/Tabs.js +250 -0
- package/dist/Tabs/miniapp/TabsContext.d.ts +17 -0
- package/dist/Tabs/miniapp/TabsContext.js +39 -0
- package/dist/Tabs/miniapp/index.d.ts +2 -0
- package/dist/Tabs/miniapp/index.js +41 -0
- package/dist/Tabs/miniapp/scroll.d.ts +21 -0
- package/dist/Tabs/miniapp/scroll.js +52 -0
- package/dist/Tabs/miniapp/utils/queryBatch.d.ts +68 -0
- package/dist/Tabs/miniapp/utils/queryBatch.js +100 -0
- package/dist/Tabs/utils/scroll.js +10 -4
- package/dist/Tag/Tag.css +11 -1
- package/dist/Tag/Tag.d.ts +1 -1
- package/dist/Tag/Tag.js +6 -6
- package/dist/Tag/Tag.types.d.ts +2 -2
- package/dist/Tag/TagGroup.d.ts +1 -1
- package/dist/Tag/TagGroup.js +3 -3
- package/dist/Tag/TagGroup.types.d.ts +1 -1
- package/dist/Tag/__tests__/fixtures/A11yDemos.js +3 -3
- package/dist/Tag/index.css +11 -1
- package/dist/TextArea/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/TextArea/__tests__/fixtures/A11yDemos.js +6 -6
- package/dist/ThemeProvider/hooks/ThemeContext.d.ts +1 -1
- package/dist/ThemeProvider/hooks/ThemeContext.js +2 -2
- package/dist/ThemeProvider/hooks/useTheme.js +2 -2
- package/dist/ThemeProvider/utils/mountTokens.js +2 -2
- package/dist/Toast/FunctionalToast.js +3 -5
- package/dist/Toast/Toast.d.ts +1 -1
- package/dist/Toast/Toast.js +8 -8
- package/dist/Toast/Toast.types.d.ts +1 -1
- package/dist/Toast/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Toast/__tests__/fixtures/A11yDemos.js +2 -2
- package/dist/Toast/index.css +7 -5
- package/dist/Tooltip/Tooltip.d.ts +1 -1
- package/dist/Tooltip/Tooltip.js +5 -5
- package/dist/Tooltip/Tooltip.types.d.ts +1 -1
- package/dist/Tooltip/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/dist/Tooltip/__tests__/fixtures/A11yDemos.js +14 -14
- package/dist/Transition/Transition.d.ts +1 -1
- package/dist/Transition/Transition.js +3 -3
- package/dist/Transition/Transition.miniapp.d.ts +1 -1
- package/dist/Transition/Transition.miniapp.js +3 -3
- package/dist/Transition/TransitionCore.js +8 -2
- package/dist/_.._/benchmarks/components/Button.d.js +15 -0
- package/dist/_.._/benchmarks/components/Button.js +2 -2
- package/dist/_.._/benchmarks/components/Input.d.js +15 -0
- package/dist/_.._/benchmarks/components/Tabs.d.js +15 -0
- package/es/ActionSheet/ActionSheet.d.ts +1 -1
- package/es/ActionSheet/ActionSheet.js +1 -1
- package/es/ActionSheet/ActionSheet.types.d.ts +1 -1
- package/es/ActionSheet/ActionSheetContext.d.ts +1 -1
- package/es/ActionSheet/ActionSheetContext.js +1 -1
- package/es/ActionSheet/ActionSheetItem.types.d.ts +1 -1
- package/es/Alert/Alert.d.ts +1 -1
- package/es/Alert/Alert.js +1 -1
- package/es/Alert/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Alert/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Avatar/Avatar.d.ts +1 -1
- package/es/Avatar/Avatar.js +1 -1
- package/es/Avatar/Avatar.types.d.ts +1 -1
- package/es/Avatar/AvatarGroup.types.d.ts +1 -1
- package/es/Backdrop/Backdrop.d.ts +1 -1
- package/es/Backdrop/Backdrop.js +1 -1
- package/es/Backdrop/Backdrop.types.d.ts +1 -1
- package/es/Backdrop/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Backdrop/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Badge/Badge.d.ts +1 -1
- package/es/Badge/Badge.js +1 -1
- package/es/Badge/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Badge/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/es/Breadcrumb/Breadcrumb.js +1 -1
- package/es/Breadcrumb/Breadcrumb.types.d.ts +1 -1
- package/es/Breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/es/Breadcrumb/BreadcrumbItem.js +1 -1
- package/es/Button/Button.d.ts +1 -1
- package/es/Button/Button.js +1 -1
- package/es/Button/Button.types.d.ts +1 -1
- package/es/Button/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Button/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Button/index.css +2 -3
- package/es/CSSTransition/demo/CSSTransitionDemo.js +3 -0
- package/es/CSSTransition/demo/index.css +0 -3
- package/es/Calendar/Calendar.js +5 -1
- package/es/Calendar/Calendar.types.d.ts +1 -1
- package/es/Calendar/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Calendar/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Card/Card.d.ts +1 -1
- package/es/Card/Card.js +1 -1
- package/es/Card/Card.types.d.ts +1 -1
- package/es/Card/CardContent.d.ts +1 -1
- package/es/Card/CardContent.js +1 -1
- package/es/Card/CardContent.types.d.ts +1 -1
- package/es/Card/CardFooter.d.ts +1 -1
- package/es/Card/CardFooter.js +1 -1
- package/es/Card/CardFooter.types.d.ts +1 -1
- package/es/Card/CardHeader.d.ts +1 -1
- package/es/Card/CardHeader.js +1 -1
- package/es/Checkbox/CheckboxContext.d.ts +1 -1
- package/es/Checkbox/CheckboxContext.js +1 -1
- package/es/Checkbox/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Checkbox/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/CitySelector/CitySelector.types.d.ts +1 -1
- package/es/CitySelector/Selector/index.d.ts +1 -1
- package/es/CitySelector/Selector/index.js +1 -1
- package/es/Collapse/Collapse.types.d.ts +1 -1
- package/es/CollapsePanel/CollapsePanel.d.ts +1 -1
- package/es/CollapsePanel/CollapsePanel.js +1 -1
- package/es/CollapsePanel/CollapsePanel.types.d.ts +1 -1
- package/es/CollapsePanel/CollapsePanelItem.d.ts +1 -1
- package/es/CollapsePanel/CollapsePanelItem.js +1 -1
- package/es/Countdown/Countdown.types.d.ts +2 -2
- package/es/Countdown/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Countdown/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Countdown/utils.d.ts +2 -2
- package/es/Countdown/utils.js +4 -4
- package/es/DatePicker/DatePicker.types.d.ts +1 -1
- package/es/DesktopPicker/DesktopPicker.types.d.ts +1 -1
- package/es/DesktopTimePicker/DesktopTimePicker.types.d.ts +11 -11
- package/es/DesktopTimePicker/useGetTimePickerContent.js +3 -3
- package/es/DesktopTimePicker/utils/utils.d.ts +1 -1
- package/es/DesktopTimePicker/utils/utils.js +2 -2
- package/es/Dialog/Dialog.js +19 -12
- package/es/Dialog/Dialog.types.d.ts +13 -0
- package/es/Dialog/FunctionalDialog.js +1 -1
- package/es/Dialog/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Dialog/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Dialog/index.css +21 -44
- package/es/Divider/Divider.types.d.ts +1 -1
- package/es/Drawer/Drawer.d.ts +1 -1
- package/es/Drawer/Drawer.js +1 -1
- package/es/Drawer/Drawer.types.d.ts +1 -1
- package/es/Fade/Fade.d.ts +1 -1
- package/es/Fade/Fade.js +1 -1
- package/es/Fade/Fade.miniapp.js +14 -11
- package/es/Fade/Fade.types.d.ts +1 -1
- package/es/IconButton/IconButton.d.ts +1 -1
- package/es/IconButton/IconButton.js +1 -1
- package/es/IconButton/IconButton.types.d.ts +1 -1
- package/es/Input/Input.types.d.ts +1 -1
- package/es/Input/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Input/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/ItemSelector/ItemSelector.miniapp.js +7 -5
- package/es/ItemSelector/ItemSelector.types.d.ts +1 -1
- package/es/ItemSelector/Selector/index.d.ts +1 -1
- package/es/ItemSelector/Selector/index.js +1 -1
- package/es/List/List.d.ts +1 -1
- package/es/List/List.js +1 -1
- package/es/List/ListContext.d.ts +1 -1
- package/es/List/ListContext.js +1 -1
- package/es/List/ListItem.d.ts +1 -1
- package/es/List/ListItem.js +1 -1
- package/es/List/ListItem.types.d.ts +1 -1
- package/es/List/ListItemContent.d.ts +1 -1
- package/es/List/ListItemContent.js +1 -1
- package/es/List/ListItemContent.types.d.ts +1 -1
- package/es/List/ListItemExtra.d.ts +1 -1
- package/es/List/ListItemExtra.js +1 -1
- package/es/List/ListItemExtra.types.d.ts +1 -1
- package/es/List/ListItemFooter.d.ts +1 -1
- package/es/List/ListItemFooter.js +1 -1
- package/es/List/ListItemFooter.types.d.ts +1 -1
- package/es/List/ListItemHeader.d.ts +1 -1
- package/es/List/ListItemHeader.js +1 -1
- package/es/List/ListItemHeader.types.d.ts +1 -1
- package/es/Loading/Loading.d.ts +1 -1
- package/es/Loading/Loading.js +1 -1
- package/es/Loading/Loading.types.d.ts +1 -1
- package/es/Modal/Modal.d.ts +1 -1
- package/es/Modal/Modal.js +1 -1
- package/es/Modal/Modal.miniapp.d.ts +1 -1
- package/es/Modal/Modal.miniapp.js +1 -1
- package/es/Modal/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Modal/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Modal/useModal.d.ts +1 -0
- package/es/Modal/useModal.js +26 -29
- package/es/NavBar/NavBar.d.ts +1 -1
- package/es/NavBar/NavBar.js +1 -1
- package/es/Picker/Picker.js +0 -1
- package/es/Picker/Picker.types.d.ts +1 -1
- package/es/Picker/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Picker/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Popover/Popover.d.ts +1 -1
- package/es/Popover/Popover.js +1 -1
- package/es/Popover/Popover.types.d.ts +1 -1
- package/es/Popover/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Popover/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Portal/Portal.d.ts +1 -1
- package/es/Portal/Portal.js +1 -1
- package/es/Portal/Portal.miniapp.js +15 -9
- package/es/Portal/Portal.types.d.ts +1 -1
- package/es/Progress/Progress.d.ts +1 -1
- package/es/Progress/Progress.js +1 -1
- package/es/Progress/Progress.types.d.ts +1 -1
- package/es/Progress/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Progress/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Radio/RadioButtonIcon.d.ts +1 -1
- package/es/Radio/RadioButtonIcon.js +1 -1
- package/es/Radio/RadioContext.d.ts +1 -1
- package/es/Radio/RadioContext.js +1 -1
- package/es/Radio/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Radio/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Radio/index.css +1 -0
- package/es/Rating/Rating.types.d.ts +1 -1
- package/es/ScrollView/ScrollView.types.d.ts +210 -1
- package/es/ScrollView/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/ScrollView/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/ScrollView/useScrollView.js +16 -4
- package/es/Select/selectContext.d.ts +0 -1
- package/es/Skeleton/Skeleton.d.ts +1 -1
- package/es/Skeleton/Skeleton.js +1 -1
- package/es/Skeleton/Skeleton.types.d.ts +1 -1
- package/es/Slide/Slide.d.ts +1 -1
- package/es/Slide/Slide.js +1 -1
- package/es/Slide/Slide.miniapp.js +14 -11
- package/es/Slider/Slider.types.d.ts +1 -1
- package/es/Steps/Step.types.d.ts +1 -1
- package/es/Steps/StepsContext.d.ts +1 -1
- package/es/Steps/StepsContext.js +1 -1
- package/es/SwipeAction/SwipeAction.js +7 -8
- package/es/SwipeAction/SwipeAction.types.d.ts +1 -1
- package/es/SwipeAction/SwipeActionContext.d.ts +0 -1
- package/es/Swiper/Swiper.js +7 -1
- package/es/Swiper/Swiper.types.d.ts +1 -1
- package/es/Swiper/SwiperItem.d.ts +1 -1
- package/es/Swiper/SwiperItem.js +1 -1
- package/es/Switch/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Switch/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/TabBar/TabBar.d.ts +1 -1
- package/es/TabBar/TabBar.js +1 -1
- package/es/Tabs/Tab.css +1 -23
- package/es/Tabs/Tab.d.ts +2 -2
- package/es/Tabs/Tab.js +44 -36
- package/es/Tabs/Tab.types.d.ts +1 -1
- package/es/Tabs/TabIndicator.d.ts +11 -0
- package/es/Tabs/TabIndicator.js +156 -0
- package/es/Tabs/TabMask.d.ts +7 -0
- package/es/Tabs/TabMask.js +18 -0
- package/es/Tabs/TabPanel.js +8 -4
- package/es/Tabs/TabPanel.types.d.ts +1 -1
- package/es/Tabs/Tabs.css +17 -6
- package/es/Tabs/Tabs.js +102 -158
- package/es/Tabs/Tabs.types.d.ts +5 -6
- package/es/Tabs/TabsContext.d.ts +15 -6
- package/es/Tabs/TabsContext.js +6 -4
- package/es/Tabs/classes.d.ts +13 -0
- package/es/Tabs/classes.js +28 -0
- package/es/Tabs/index.css +18 -29
- package/es/Tabs/index.d.ts +2 -2
- package/es/Tabs/index.js +2 -2
- package/es/Tabs/index.miniapp.d.ts +5 -0
- package/es/Tabs/index.miniapp.js +11 -0
- package/es/Tabs/miniapp/Tab.d.ts +5 -0
- package/es/Tabs/miniapp/Tab.js +77 -0
- package/es/Tabs/miniapp/TabIndicator.d.ts +15 -0
- package/es/Tabs/miniapp/TabIndicator.js +272 -0
- package/es/Tabs/miniapp/Tabs.d.ts +5 -0
- package/es/Tabs/miniapp/Tabs.js +228 -0
- package/es/Tabs/miniapp/TabsContext.d.ts +17 -0
- package/es/Tabs/miniapp/TabsContext.js +16 -0
- package/es/Tabs/miniapp/index.d.ts +2 -0
- package/es/Tabs/miniapp/index.js +7 -0
- package/es/Tabs/miniapp/scroll.d.ts +21 -0
- package/es/Tabs/miniapp/scroll.js +29 -0
- package/es/Tabs/miniapp/utils/queryBatch.d.ts +68 -0
- package/es/Tabs/miniapp/utils/queryBatch.js +65 -0
- package/es/Tabs/utils/scroll.js +10 -4
- package/es/Tag/Tag.css +11 -1
- package/es/Tag/Tag.d.ts +1 -1
- package/es/Tag/Tag.js +4 -4
- package/es/Tag/Tag.types.d.ts +2 -2
- package/es/Tag/TagGroup.d.ts +1 -1
- package/es/Tag/TagGroup.js +1 -1
- package/es/Tag/TagGroup.types.d.ts +1 -1
- package/es/Tag/__tests__/fixtures/A11yDemos.js +3 -3
- package/es/Tag/index.css +11 -1
- package/es/TextArea/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/TextArea/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/ThemeProvider/hooks/ThemeContext.d.ts +1 -1
- package/es/ThemeProvider/hooks/ThemeContext.js +1 -1
- package/es/ThemeProvider/hooks/useTheme.js +1 -1
- package/es/ThemeProvider/utils/mountTokens.js +1 -1
- package/es/Toast/FunctionalToast.js +4 -6
- package/es/Toast/Toast.d.ts +1 -1
- package/es/Toast/Toast.js +1 -1
- package/es/Toast/Toast.types.d.ts +1 -1
- package/es/Toast/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Toast/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Toast/index.css +7 -5
- package/es/Tooltip/Tooltip.d.ts +1 -1
- package/es/Tooltip/Tooltip.js +1 -1
- package/es/Tooltip/Tooltip.types.d.ts +1 -1
- package/es/Tooltip/__tests__/fixtures/A11yDemos.d.ts +1 -1
- package/es/Tooltip/__tests__/fixtures/A11yDemos.js +1 -1
- package/es/Transition/Transition.d.ts +1 -1
- package/es/Transition/Transition.js +1 -1
- package/es/Transition/Transition.miniapp.d.ts +1 -1
- package/es/Transition/Transition.miniapp.js +1 -1
- package/es/Transition/TransitionCore.js +8 -2
- package/es/_.._/benchmarks/components/Button.d.js +0 -0
- package/es/_.._/benchmarks/components/Button.js +1 -1
- package/es/_.._/benchmarks/components/Input.d.js +0 -0
- package/es/_.._/benchmarks/components/Tabs.d.js +0 -0
- package/package.json +17 -26
- package/src/index.ts +0 -58
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TabChangeEvent
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
2
|
+
import { TabChangeEvent } from './Tabs.types';
|
|
3
|
+
export interface TabRegisterData {
|
|
4
|
+
value: string;
|
|
5
|
+
ref: React.RefObject<HTMLElement>;
|
|
6
|
+
}
|
|
7
|
+
export interface TabsContextValueType {
|
|
8
|
+
value?: string;
|
|
9
|
+
triggerChange?: TabChangeEvent;
|
|
10
|
+
onRegister?: (data: TabRegisterData) => void;
|
|
11
|
+
onUnregister?: (data: {
|
|
12
|
+
value: string;
|
|
13
|
+
}) => void;
|
|
14
|
+
}
|
|
15
|
+
declare const TabsContext: import("@bifrostui/utils").Context<TabsContextValueType>;
|
|
16
|
+
export declare const TabsContextProvider: React.Provider<TabsContextValueType> & React.FC<React.ProviderProps<TabsContextValueType>>;
|
|
8
17
|
export default TabsContext;
|
package/dist/Tabs/TabsContext.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
5
|
var __export = (target, all) => {
|
|
8
6
|
for (var name in all)
|
|
@@ -16,14 +14,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
14
|
}
|
|
17
15
|
return to;
|
|
18
16
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
18
|
var TabsContext_exports = {};
|
|
29
19
|
__export(TabsContext_exports, {
|
|
@@ -31,10 +21,12 @@ __export(TabsContext_exports, {
|
|
|
31
21
|
default: () => TabsContext_default
|
|
32
22
|
});
|
|
33
23
|
module.exports = __toCommonJS(TabsContext_exports);
|
|
34
|
-
var
|
|
35
|
-
const TabsContext =
|
|
36
|
-
void 0
|
|
37
|
-
|
|
24
|
+
var import_utils = require("@bifrostui/utils");
|
|
25
|
+
const TabsContext = (0, import_utils.createContext)({
|
|
26
|
+
triggerChange: void 0,
|
|
27
|
+
onRegister: void 0,
|
|
28
|
+
onUnregister: void 0
|
|
29
|
+
});
|
|
38
30
|
if (process.env.NODE_ENV !== "production") {
|
|
39
31
|
TabsContext.displayName = "BuiTabsContext";
|
|
40
32
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const tabsRootClass = "bui-tabs";
|
|
2
|
+
export declare const tabRootClass = "bui-tab";
|
|
3
|
+
export declare const tabPanelRootClass = "bui-tabpanel";
|
|
4
|
+
export declare const tabsScrollClass: string;
|
|
5
|
+
export declare const tabsScrollWrapperClass: string;
|
|
6
|
+
export declare const tabActiveClass: string;
|
|
7
|
+
export declare const tabDisabledClass: string;
|
|
8
|
+
export declare const tabIndicatorClass: string;
|
|
9
|
+
export declare const tabMaskClass: string;
|
|
10
|
+
export declare const tabMaskLeftClass: string;
|
|
11
|
+
export declare const tabMaskRightClass: string;
|
|
12
|
+
export declare const tabPanelActiveClass: string;
|
|
13
|
+
export declare const tabPanelInactiveClass: string;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var classes_exports = {};
|
|
19
|
+
__export(classes_exports, {
|
|
20
|
+
tabActiveClass: () => tabActiveClass,
|
|
21
|
+
tabDisabledClass: () => tabDisabledClass,
|
|
22
|
+
tabIndicatorClass: () => tabIndicatorClass,
|
|
23
|
+
tabMaskClass: () => tabMaskClass,
|
|
24
|
+
tabMaskLeftClass: () => tabMaskLeftClass,
|
|
25
|
+
tabMaskRightClass: () => tabMaskRightClass,
|
|
26
|
+
tabPanelActiveClass: () => tabPanelActiveClass,
|
|
27
|
+
tabPanelInactiveClass: () => tabPanelInactiveClass,
|
|
28
|
+
tabPanelRootClass: () => tabPanelRootClass,
|
|
29
|
+
tabRootClass: () => tabRootClass,
|
|
30
|
+
tabsRootClass: () => tabsRootClass,
|
|
31
|
+
tabsScrollClass: () => tabsScrollClass,
|
|
32
|
+
tabsScrollWrapperClass: () => tabsScrollWrapperClass
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(classes_exports);
|
|
35
|
+
const tabsRootClass = "bui-tabs";
|
|
36
|
+
const tabRootClass = "bui-tab";
|
|
37
|
+
const tabPanelRootClass = "bui-tabpanel";
|
|
38
|
+
const tabsScrollClass = `${tabsRootClass}-tabs`;
|
|
39
|
+
const tabsScrollWrapperClass = `${tabsRootClass}-scroll-wrapper`;
|
|
40
|
+
const tabActiveClass = `${tabRootClass}-active`;
|
|
41
|
+
const tabDisabledClass = `${tabRootClass}-disabled`;
|
|
42
|
+
const tabIndicatorClass = `${tabsRootClass}-indicator`;
|
|
43
|
+
const tabMaskClass = `${tabsRootClass}-mask`;
|
|
44
|
+
const tabMaskLeftClass = `${tabMaskClass}-left`;
|
|
45
|
+
const tabMaskRightClass = `${tabMaskClass}-right`;
|
|
46
|
+
const tabPanelActiveClass = `${tabPanelRootClass}-active`;
|
|
47
|
+
const tabPanelInactiveClass = `${tabPanelRootClass}-inactive`;
|
|
48
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
49
|
+
0 && (module.exports = {
|
|
50
|
+
tabActiveClass,
|
|
51
|
+
tabDisabledClass,
|
|
52
|
+
tabIndicatorClass,
|
|
53
|
+
tabMaskClass,
|
|
54
|
+
tabMaskLeftClass,
|
|
55
|
+
tabMaskRightClass,
|
|
56
|
+
tabPanelActiveClass,
|
|
57
|
+
tabPanelInactiveClass,
|
|
58
|
+
tabPanelRootClass,
|
|
59
|
+
tabRootClass,
|
|
60
|
+
tabsRootClass,
|
|
61
|
+
tabsScrollClass,
|
|
62
|
+
tabsScrollWrapperClass
|
|
63
|
+
});
|
package/dist/Tabs/index.css
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
page,
|
|
3
3
|
xhs-page {
|
|
4
4
|
--bui-tabs-height: 39px;
|
|
5
|
+
--bui-tabs-padding: 0;
|
|
5
6
|
--bui-tabs-font-weight: var(--bui-font-weight-medium);
|
|
6
7
|
--bui-tabs-indicator-bg: var(--bui-color-primary);
|
|
7
8
|
--bui-tabs-indicator-height: 3PX;
|
|
@@ -16,10 +17,10 @@ xhs-page {
|
|
|
16
17
|
--bui-tab-height: 100%;
|
|
17
18
|
--bui-tab-padding: var(--bui-spacing-lg) var(--bui-spacing-lg) 10px;
|
|
18
19
|
--bui-tab-active-color: var(--bui-color-fg-default);
|
|
19
|
-
--bui-tab-active-font-family: var(--bui-font-family-accent, inherit);
|
|
20
20
|
}
|
|
21
21
|
.bui-tabs {
|
|
22
22
|
position: relative;
|
|
23
|
+
padding: var(--bui-tabs-padding);
|
|
23
24
|
font-family: var(--bui-font-family);
|
|
24
25
|
font-weight: var(--bui-tabs-font-weight);
|
|
25
26
|
}
|
|
@@ -29,6 +30,7 @@ xhs-page {
|
|
|
29
30
|
flex-wrap: nowrap;
|
|
30
31
|
justify-content: flex-start;
|
|
31
32
|
align-items: center;
|
|
33
|
+
white-space: nowrap;
|
|
32
34
|
position: relative;
|
|
33
35
|
overflow-x: scroll;
|
|
34
36
|
scrollbar-width: none;
|
|
@@ -36,15 +38,28 @@ xhs-page {
|
|
|
36
38
|
.bui-tabs-tabs::-webkit-scrollbar {
|
|
37
39
|
display: none;
|
|
38
40
|
}
|
|
41
|
+
.bui-tabs-scroll-wrapper {
|
|
42
|
+
height: 100%;
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: row;
|
|
45
|
+
flex-wrap: nowrap;
|
|
46
|
+
justify-content: flex-start;
|
|
47
|
+
align-items: center;
|
|
48
|
+
position: relative;
|
|
49
|
+
min-width: 100%;
|
|
50
|
+
}
|
|
39
51
|
.bui-tabs-indicator {
|
|
40
52
|
position: absolute;
|
|
53
|
+
top: unset;
|
|
54
|
+
bottom: var(--bui-tabs-indicator-bottom, 0);
|
|
41
55
|
width: var(--bui-tabs-indicator-width);
|
|
42
|
-
bottom: var(--bui-tabs-indicator-bottom);
|
|
43
56
|
height: var(--bui-tabs-indicator-height);
|
|
44
57
|
color: var(--bui-color-primary);
|
|
45
58
|
background: var(--bui-tabs-indicator-bg);
|
|
46
59
|
border-radius: var(--bui-tabs-indicator-border-radius);
|
|
47
60
|
box-shadow: var(--bui-tabs-indicator-box-shadow);
|
|
61
|
+
pointer-events: none;
|
|
62
|
+
transition: left 0.3s ease-in-out;
|
|
48
63
|
}
|
|
49
64
|
.bui-tabs-content {
|
|
50
65
|
padding: var(--bui-spacing-lg);
|
|
@@ -74,12 +89,8 @@ xhs-page {
|
|
|
74
89
|
var(--bui-color-bg-view),
|
|
75
90
|
rgba(255, 255, 255, 0));
|
|
76
91
|
}
|
|
77
|
-
.bui-indicator-invisible {
|
|
78
|
-
visibility: hidden;
|
|
79
|
-
background-color: transparent;
|
|
80
|
-
}
|
|
81
92
|
.bui-tab {
|
|
82
|
-
display: flex;
|
|
93
|
+
display: inline-flex;
|
|
83
94
|
align-items: center;
|
|
84
95
|
justify-content: center;
|
|
85
96
|
white-space: nowrap;
|
|
@@ -97,33 +108,11 @@ xhs-page {
|
|
|
97
108
|
.bui-tab-active {
|
|
98
109
|
color: var(--bui-tab-active-color);
|
|
99
110
|
font-weight: var(--bui-font-weight-bold);
|
|
100
|
-
font-family: var(--bui-tab-active-font-family);
|
|
101
|
-
}
|
|
102
|
-
.bui-tab-miniapp-active {
|
|
103
|
-
color: var(--bui-tab-active-color);
|
|
104
|
-
line-height: 1.5;
|
|
105
|
-
font-weight: var(--bui-font-weight-bold);
|
|
106
|
-
position: relative;
|
|
107
|
-
}
|
|
108
|
-
.bui-tab-miniapp-active-line {
|
|
109
|
-
position: absolute;
|
|
110
|
-
bottom: 0;
|
|
111
|
-
left: -12px;
|
|
112
|
-
right: -12px;
|
|
113
|
-
margin: 0 auto !important;
|
|
114
|
-
width: 18px;
|
|
115
|
-
height: 2px;
|
|
116
|
-
transition: all 100ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
117
|
-
background-color: var(--bui-color-primary);
|
|
118
111
|
}
|
|
119
112
|
.bui-tab-disabled {
|
|
120
113
|
opacity: 0.5;
|
|
121
114
|
pointer-events: none;
|
|
122
115
|
}
|
|
123
|
-
.bui-indicator-invisible {
|
|
124
|
-
visibility: hidden;
|
|
125
|
-
background-color: transparent;
|
|
126
|
-
}
|
|
127
116
|
.bui-tabpanel {
|
|
128
117
|
font-family: var(--bui-font-family);
|
|
129
118
|
}
|
package/dist/Tabs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as Tab } from './Tab';
|
|
2
|
-
export * from './Tab.types';
|
|
3
2
|
export { default as TabPanel } from './TabPanel';
|
|
4
|
-
export * from './TabPanel.types';
|
|
5
3
|
export { default, default as Tabs } from './Tabs';
|
|
6
4
|
export * from './Tabs.types';
|
|
5
|
+
export * from './Tab.types';
|
|
6
|
+
export * from './TabPanel.types';
|
package/dist/Tabs/index.js
CHANGED
|
@@ -35,17 +35,17 @@ __export(Tabs_exports, {
|
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(Tabs_exports);
|
|
37
37
|
var import_Tab = __toESM(require("./Tab"));
|
|
38
|
-
__reExport(Tabs_exports, require("./Tab.types"), module.exports);
|
|
39
38
|
var import_TabPanel = __toESM(require("./TabPanel"));
|
|
40
|
-
__reExport(Tabs_exports, require("./TabPanel.types"), module.exports);
|
|
41
39
|
var import_Tabs = __toESM(require("./Tabs"));
|
|
42
40
|
__reExport(Tabs_exports, require("./Tabs.types"), module.exports);
|
|
41
|
+
__reExport(Tabs_exports, require("./Tab.types"), module.exports);
|
|
42
|
+
__reExport(Tabs_exports, require("./TabPanel.types"), module.exports);
|
|
43
43
|
// Annotate the CommonJS export names for ESM import in node:
|
|
44
44
|
0 && (module.exports = {
|
|
45
45
|
Tab,
|
|
46
46
|
TabPanel,
|
|
47
47
|
Tabs,
|
|
48
|
+
...require("./Tabs.types"),
|
|
48
49
|
...require("./Tab.types"),
|
|
49
|
-
...require("./TabPanel.types")
|
|
50
|
-
...require("./Tabs.types")
|
|
50
|
+
...require("./TabPanel.types")
|
|
51
51
|
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var index_miniapp_exports = {};
|
|
30
|
+
__export(index_miniapp_exports, {
|
|
31
|
+
Tab: () => import_miniapp.Tab,
|
|
32
|
+
TabPanel: () => import_TabPanel.default,
|
|
33
|
+
Tabs: () => import_miniapp.Tabs,
|
|
34
|
+
default: () => import_miniapp.default
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(index_miniapp_exports);
|
|
37
|
+
var import_miniapp = __toESM(require("./miniapp"));
|
|
38
|
+
var import_TabPanel = __toESM(require("./TabPanel"));
|
|
39
|
+
__reExport(index_miniapp_exports, require("./Tabs.types"), module.exports);
|
|
40
|
+
__reExport(index_miniapp_exports, require("./Tab.types"), module.exports);
|
|
41
|
+
__reExport(index_miniapp_exports, require("./TabPanel.types"), module.exports);
|
|
42
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
43
|
+
0 && (module.exports = {
|
|
44
|
+
Tab,
|
|
45
|
+
TabPanel,
|
|
46
|
+
Tabs,
|
|
47
|
+
...require("./Tabs.types"),
|
|
48
|
+
...require("./Tab.types"),
|
|
49
|
+
...require("./TabPanel.types")
|
|
50
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TabProps } from '../Tab.types';
|
|
3
|
+
import '../Tab.less';
|
|
4
|
+
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<TabProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var Tab_exports = {};
|
|
29
|
+
__export(Tab_exports, {
|
|
30
|
+
default: () => Tab_default
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(Tab_exports);
|
|
33
|
+
var import_react = __toESM(require("react"));
|
|
34
|
+
var import_clsx = __toESM(require("clsx"));
|
|
35
|
+
var import_utils = require("@bifrostui/utils");
|
|
36
|
+
var import_TabsContext = __toESM(require("./TabsContext"));
|
|
37
|
+
var import_classes = require("../classes");
|
|
38
|
+
var import_Tab2 = require("../Tab.css");
|
|
39
|
+
const Tab = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
40
|
+
const {
|
|
41
|
+
className,
|
|
42
|
+
children,
|
|
43
|
+
index,
|
|
44
|
+
disabled = false,
|
|
45
|
+
onClick,
|
|
46
|
+
style
|
|
47
|
+
} = props;
|
|
48
|
+
const innerRef = (0, import_react.useRef)(null);
|
|
49
|
+
const handleRef = (0, import_utils.useForkRef)(ref, innerRef);
|
|
50
|
+
const isActive = (0, import_utils.useContextSelector)(
|
|
51
|
+
import_TabsContext.default,
|
|
52
|
+
(ctx) => ctx.value === index
|
|
53
|
+
);
|
|
54
|
+
const triggerChange = (0, import_utils.useContextSelector)(
|
|
55
|
+
import_TabsContext.default,
|
|
56
|
+
(ctx) => ctx.triggerChange
|
|
57
|
+
);
|
|
58
|
+
const onRegister = (0, import_utils.useContextSelector)(import_TabsContext.default, (ctx) => ctx.onRegister);
|
|
59
|
+
const onUnregister = (0, import_utils.useContextSelector)(
|
|
60
|
+
import_TabsContext.default,
|
|
61
|
+
(ctx) => ctx.onUnregister
|
|
62
|
+
);
|
|
63
|
+
const tabsContainerId = (0, import_utils.useContextSelector)(
|
|
64
|
+
import_TabsContext.default,
|
|
65
|
+
(ctx) => ctx.tabsContainerId
|
|
66
|
+
);
|
|
67
|
+
(0, import_react.useEffect)(() => {
|
|
68
|
+
if (index !== void 0 && index !== null) {
|
|
69
|
+
onRegister == null ? void 0 : onRegister({ value: index });
|
|
70
|
+
}
|
|
71
|
+
return () => {
|
|
72
|
+
if (index !== void 0 && index !== null) {
|
|
73
|
+
onUnregister == null ? void 0 : onUnregister({ value: index });
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
}, [onRegister, onUnregister, index]);
|
|
77
|
+
const rootCls = (0, import_clsx.default)(
|
|
78
|
+
import_classes.tabRootClass,
|
|
79
|
+
{
|
|
80
|
+
[import_classes.tabActiveClass]: isActive,
|
|
81
|
+
[import_classes.tabDisabledClass]: disabled
|
|
82
|
+
},
|
|
83
|
+
className
|
|
84
|
+
);
|
|
85
|
+
const tabId = tabsContainerId ? `${tabsContainerId}-tab-${index}` : void 0;
|
|
86
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
87
|
+
"div",
|
|
88
|
+
{
|
|
89
|
+
id: tabId,
|
|
90
|
+
ref: handleRef,
|
|
91
|
+
className: rootCls,
|
|
92
|
+
style,
|
|
93
|
+
onClick: (e) => {
|
|
94
|
+
if (disabled)
|
|
95
|
+
return;
|
|
96
|
+
triggerChange == null ? void 0 : triggerChange(e, { index });
|
|
97
|
+
onClick == null ? void 0 : onClick(e, { index });
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
children
|
|
101
|
+
);
|
|
102
|
+
});
|
|
103
|
+
Tab.displayName = "BuiTab";
|
|
104
|
+
var Tab_default = /* @__PURE__ */ import_react.default.memo(Tab, (prevProps, nextProps) => {
|
|
105
|
+
return prevProps.index === nextProps.index && prevProps.disabled === nextProps.disabled && prevProps.className === nextProps.className && prevProps.children === nextProps.children;
|
|
106
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface TabIndicatorProps {
|
|
3
|
+
/** 当前选中的 tab 值 */
|
|
4
|
+
currentValue: string;
|
|
5
|
+
/** 已注册的 tabs 值数组(用于生成ID) */
|
|
6
|
+
registeredTabValues: string[];
|
|
7
|
+
/** wrapper 容器的 ID(Tab的父容器) */
|
|
8
|
+
wrapperId: string;
|
|
9
|
+
/** ScrollView 的 ID */
|
|
10
|
+
scrollViewId: string;
|
|
11
|
+
/** 注册版本号,每次 tab 注册/取消注册时递增 */
|
|
12
|
+
registrationVersion: number;
|
|
13
|
+
}
|
|
14
|
+
declare const TabIndicator: React.FC<TabIndicatorProps>;
|
|
15
|
+
export default TabIndicator;
|