@bifrostui/react 1.5.3 → 2.0.0-alpha.1
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.css +16 -6
- package/dist/ActionSheet/ActionSheetItem.css +11 -17
- package/dist/ActionSheet/ActionSheetItem.js +3 -8
- package/dist/ActionSheet/index.css +89 -0
- package/dist/Alert/Alert.js +2 -1
- package/dist/Alert/__tests__/fixtures/A11yDemos.js +143 -0
- package/dist/Alert/index.css +18 -14
- package/dist/Avatar/Avatar.css +16 -12
- package/dist/Avatar/Avatar.js +3 -8
- package/dist/Avatar/AvatarGroup.css +19 -15
- package/dist/Avatar/AvatarGroup.js +2 -6
- package/dist/Avatar/index.css +93 -0
- package/dist/Backdrop/Backdrop.js +4 -3
- package/dist/Backdrop/__tests__/fixtures/A11yDemos.js +51 -0
- package/dist/Backdrop/index.css +19 -0
- package/dist/Badge/Badge.js +41 -19
- package/dist/Badge/__tests__/fixtures/A11yDemos.js +110 -0
- package/dist/Badge/hooks/useBadgeA11y.js +76 -0
- package/dist/Badge/hooks/useBadgeDisplay.js +56 -0
- package/dist/Badge/index.css +125 -0
- package/dist/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/Breadcrumb/index.css +38 -0
- package/dist/Button/Button.js +7 -11
- package/dist/Button/__tests__/fixtures/A11yDemos.js +81 -0
- package/dist/Button/index.css +267 -0
- package/dist/CSSTransition/CSSTransition.js +177 -0
- package/dist/CSSTransition/CSSTransition.types.js +15 -0
- package/dist/CSSTransition/demo/CSSTransitionDemo.js +76 -0
- package/dist/CSSTransition/demo/index.css +25 -0
- package/dist/CSSTransition/index.js +41 -0
- package/dist/Calendar/Calendar.js +136 -51
- package/dist/Calendar/__tests__/fixtures/A11yDemos.js +41 -0
- package/dist/Calendar/index.css +167 -0
- package/dist/Calendar/utils.js +33 -23
- package/dist/Card/Card.css +9 -0
- package/dist/Card/CardContent.css +1 -2
- package/dist/Card/CardFooter.css +2 -4
- package/dist/Card/CardHeader.css +5 -5
- package/dist/Card/CardHeader.js +2 -2
- package/dist/Card/index.css +77 -0
- package/dist/Checkbox/Checkbox.js +9 -12
- package/dist/Checkbox/CheckboxGroup.js +5 -8
- package/dist/Checkbox/__tests__/fixtures/A11yDemos.js +57 -0
- package/dist/Checkbox/index.css +51 -0
- package/dist/CitySelector/CitySelector.miniapp.js +0 -1
- package/dist/CitySelector/CitySelectorCore.js +1 -1
- package/dist/CitySelector/Selector/index.css +4 -4
- package/dist/CitySelector/index.css +120 -0
- package/dist/Collapse/Collapse.js +19 -8
- package/dist/Collapse/Collapse.miniapp.js +152 -74
- package/dist/Collapse/index.css +45 -0
- package/dist/CollapsePanel/CollapsePanel.js +1 -1
- package/dist/CollapsePanel/CollapsePanelItem.js +45 -46
- package/dist/CollapsePanel/index.css +36 -0
- package/dist/Countdown/Countdown.js +64 -31
- package/dist/Countdown/__tests__/fixtures/A11yDemos.js +107 -0
- package/dist/Countdown/index.css +54 -0
- package/dist/DesktopDatePicker/DesktopDatePicker.css +61 -0
- package/dist/DesktopDatePicker/DesktopDatePicker.js +1 -1
- package/dist/DesktopDatePicker/index.css +100 -0
- package/dist/Dialog/Dialog.js +56 -34
- package/dist/Dialog/FunctionalDialog.js +101 -90
- package/dist/Dialog/__tests__/fixtures/A11yDemos.js +78 -0
- package/dist/Dialog/index.css +39 -36
- package/dist/Dialog/index.js +9 -2
- package/dist/Divider/Divider.js +9 -6
- package/dist/Divider/index.css +47 -0
- package/dist/Drawer/Drawer.js +12 -18
- package/dist/Drawer/__tests__/fixtures/A11yDemos.js +148 -0
- package/dist/Drawer/index.css +36 -0
- package/dist/Fade/Fade.js +52 -56
- package/dist/IconButton/IconButton.js +26 -18
- package/dist/IconButton/index.css +205 -0
- package/dist/Image/Image.js +119 -119
- package/dist/Image/__tests__/fixtures/A11yDemos.js +130 -0
- package/dist/Image/index.css +7 -8
- package/dist/Input/Input.js +9 -13
- package/dist/Input/__tests__/fixtures/A11yDemos.js +81 -0
- package/dist/Input/index.css +70 -0
- package/dist/ItemSelector/ItemSelector.miniapp.js +0 -1
- package/dist/ItemSelector/ItemSelectorCore.js +1 -1
- package/dist/List/List.css +7 -3
- package/dist/List/List.js +3 -8
- package/dist/List/ListItem.css +3 -3
- package/dist/List/ListItem.js +42 -44
- package/dist/List/ListItemContent.js +1 -4
- package/dist/List/ListItemExtra.js +9 -4
- package/dist/List/ListItemFooter.js +9 -4
- package/dist/List/ListItemHeader.js +9 -4
- package/dist/List/index.css +80 -0
- package/dist/Loading/Loading.js +14 -5
- package/dist/Loading/index.css +37 -0
- package/dist/Modal/Modal.js +48 -54
- package/dist/Modal/Modal.miniapp.js +49 -44
- package/dist/Modal/ModalManager.js +238 -0
- package/dist/Modal/__tests__/fixtures/A11yDemos.js +52 -0
- package/dist/Modal/index.css +15 -0
- package/dist/Modal/index.js +9 -1
- package/dist/Modal/useModal.js +190 -0
- package/dist/NavBar/NavBar.js +1 -2
- package/dist/NavBar/index.css +65 -0
- package/dist/Picker/Picker.css +21 -17
- package/dist/Picker/Picker.js +53 -21
- package/dist/Picker/PickerPanel.css +8 -8
- package/dist/Picker/PickerPanel.js +80 -59
- package/dist/Picker/__tests__/fixtures/A11yDemos.js +79 -0
- package/dist/Picker/index.css +124 -0
- package/dist/Picker/utils.js +9 -12
- package/dist/Popover/Popover.js +120 -131
- package/dist/Popover/__tests__/fixtures/A11yDemos.js +175 -0
- package/dist/Popover/hooks/index.js +36 -0
- package/dist/Popover/hooks/usePopoverA11y.js +66 -0
- package/dist/Popover/hooks/usePopoverEvents.js +150 -0
- package/dist/Popover/hooks/usePopoverPosition.js +124 -0
- package/dist/Popover/hooks/usePopoverState.js +54 -0
- package/dist/Popover/index.css +99 -0
- package/dist/Portal/PortalCore.js +2 -2
- package/dist/Progress/Progress.js +62 -7
- package/dist/Progress/__tests__/fixtures/A11yDemos.js +100 -0
- package/dist/Progress/index.css +28 -0
- package/dist/Radio/Radio.js +8 -11
- package/dist/Radio/RadioButtonIcon.js +6 -1
- package/dist/Radio/RadioGroup.js +2 -5
- package/dist/Radio/__tests__/fixtures/A11yDemos.js +57 -0
- package/dist/Radio/index.css +69 -0
- package/dist/Rating/Rating.js +9 -19
- package/dist/Rating/index.css +65 -0
- package/dist/ScrollView/ScrollView.js +50 -211
- package/dist/ScrollView/__tests__/fixtures/A11yDemos.js +319 -0
- package/dist/ScrollView/useScrollView.js +300 -0
- package/dist/Select/Select.js +19 -18
- package/dist/Select/SelectOption.js +6 -2
- package/dist/Select/__tests__/fixtures/A11yDemos.js +154 -0
- package/dist/Select/index.css +118 -0
- package/dist/Skeleton/Skeleton.js +6 -10
- package/dist/Skeleton/index.css +63 -0
- package/dist/Slide/Slide.js +69 -74
- package/dist/Slider/Slider.js +8 -16
- package/dist/Slider/index.css +111 -0
- package/dist/Stack/Stack.js +1 -1
- package/dist/Stack/demo/index.css +2 -0
- package/dist/Steps/Step.css +14 -14
- package/dist/Steps/Step.js +81 -82
- package/dist/Steps/Steps.css +18 -14
- package/dist/Steps/Steps.js +57 -60
- package/dist/Steps/index.css +199 -0
- package/dist/SwipeAction/index.css +110 -0
- package/dist/Swiper/Swiper.js +19 -5
- package/dist/Swiper/index.css +25 -0
- package/dist/Switch/Switch.js +77 -79
- package/dist/Switch/__tests__/fixtures/A11yDemos.js +57 -0
- package/dist/Switch/index.css +153 -0
- package/dist/TabBar/TabBar.css +12 -8
- package/dist/TabBar/TabBar.js +3 -8
- package/dist/TabBar/TabBarItem.css +6 -0
- package/dist/TabBar/TabBarItem.js +3 -3
- package/dist/TabBar/index.css +59 -0
- package/dist/Tabs/Tab.css +10 -16
- package/dist/Tabs/Tab.js +37 -23
- package/dist/Tabs/TabPanel.js +9 -5
- package/dist/Tabs/Tabs.css +32 -21
- package/dist/Tabs/Tabs.js +87 -95
- package/dist/Tabs/TabsContext.js +3 -1
- package/dist/Tabs/index.css +135 -0
- package/dist/Tag/Tag.css +49 -23
- package/dist/Tag/Tag.js +3 -7
- package/dist/Tag/TagGroup.css +15 -11
- package/dist/Tag/TagGroup.js +16 -14
- package/dist/Tag/__tests__/fixtures/A11yDemos.js +196 -0
- package/dist/Tag/index.css +182 -0
- package/dist/TextArea/TextArea.js +54 -18
- package/dist/TextArea/__tests__/fixtures/A11yDemos.js +91 -0
- package/dist/TextArea/index.css +57 -0
- package/dist/ThemeProvider/ThemeProvider.js +1 -4
- package/dist/ThemeProvider/ThemeProvider.types.js +0 -12
- package/dist/ThemeProvider/utils/constants.js +4 -1
- package/dist/Toast/FunctionalToast.js +180 -96
- package/dist/Toast/Toast.js +70 -29
- package/dist/Toast/__tests__/fixtures/A11yDemos.js +54 -0
- package/dist/Toast/index.css +57 -0
- package/dist/Tooltip/Tooltip.js +64 -151
- package/dist/Tooltip/__tests__/fixtures/A11yDemos.js +100 -0
- package/dist/Tooltip/index.css +95 -0
- package/dist/Tooltip/useTooltip.js +313 -0
- package/dist/Transition/TransitionCore.js +27 -27
- package/dist/TransitionGroup/TransitionGroup.js +132 -0
- package/dist/TransitionGroup/TransitionGroup.types.js +15 -0
- package/dist/TransitionGroup/demo/TransitionGroupDemo.js +68 -0
- package/dist/TransitionGroup/demo/index.css +33 -0
- package/dist/TransitionGroup/index.js +41 -0
- package/dist/TransitionGroup/utils/childMapping.js +119 -0
- package/dist/_.._/benchmarks/components/Button.js +41 -0
- package/dist/_.._/benchmarks/components/Input.js +45 -0
- package/dist/_.._/benchmarks/components/Tabs.js +50 -0
- package/dist/benchmarks/components/Button.d.ts +3 -0
- package/dist/benchmarks/components/Input.d.ts +3 -0
- package/dist/benchmarks/components/Tabs.d.ts +3 -0
- package/dist/index.js +5 -1
- package/dist/locales/en-US.js +30 -2
- package/dist/locales/zh-CN.js +32 -1
- package/dist/locales/zh-TW.js +32 -1
- package/dist/src/ActionSheet/ActionSheetItem.types.d.ts +38 -0
- package/dist/src/Alert/Alert.types.d.ts +61 -0
- package/dist/src/Alert/__tests__/fixtures/A11yDemos.d.ts +17 -0
- package/dist/src/Backdrop/Backdrop.d.ts +5 -0
- package/dist/src/Backdrop/Backdrop.types.d.ts +21 -0
- package/dist/src/Backdrop/__tests__/fixtures/A11yDemos.d.ts +8 -0
- package/dist/src/Badge/Badge.d.ts +5 -0
- package/dist/src/Badge/Badge.types.d.ts +56 -0
- package/dist/src/Badge/__tests__/fixtures/A11yDemos.d.ts +25 -0
- package/dist/src/Badge/hooks/useBadgeA11y.d.ts +23 -0
- package/dist/src/Badge/hooks/useBadgeDisplay.d.ts +16 -0
- package/dist/src/Breadcrumb/Breadcrumb.d.ts +5 -0
- package/dist/src/Button/Button.d.ts +5 -0
- package/dist/src/Button/Button.types.d.ts +53 -0
- package/dist/src/Button/__tests__/fixtures/A11yDemos.d.ts +23 -0
- package/dist/src/CSSTransition/CSSTransition.d.ts +4 -0
- package/dist/src/CSSTransition/CSSTransition.types.d.ts +13 -0
- package/dist/src/CSSTransition/index.d.ts +2 -0
- package/dist/src/Calendar/Calendar.d.ts +5 -0
- package/dist/src/Calendar/Calendar.types.d.ts +112 -0
- package/dist/src/Calendar/__tests__/fixtures/A11yDemos.d.ts +2 -0
- package/dist/src/Calendar/utils.d.ts +29 -0
- package/dist/src/Checkbox/Checkbox.d.ts +5 -0
- package/dist/src/Checkbox/CheckboxGroup.d.ts +5 -0
- package/dist/src/Checkbox/__tests__/fixtures/A11yDemos.d.ts +15 -0
- package/dist/src/CitySelector/CitySelector.types.d.ts +46 -0
- package/dist/src/CitySelector/CitySelectorCore.d.ts +5 -0
- package/dist/src/Collapse/Collapse.d.ts +5 -0
- package/dist/src/Collapse/Collapse.miniapp.d.ts +10 -0
- package/dist/src/CollapsePanel/CollapsePanel.d.ts +5 -0
- package/dist/src/Countdown/Countdown.d.ts +5 -0
- package/dist/src/Countdown/Countdown.types.d.ts +127 -0
- package/dist/src/Countdown/__tests__/fixtures/A11yDemos.d.ts +23 -0
- package/dist/src/DesktopDatePicker/DesktopDatePicker.d.ts +5 -0
- package/dist/src/Dialog/Dialog.d.ts +8 -0
- package/dist/src/Dialog/Dialog.types.d.ts +137 -0
- package/dist/src/Dialog/FunctionalDialog.d.ts +10 -0
- package/dist/src/Dialog/__tests__/fixtures/A11yDemos.d.ts +9 -0
- package/dist/src/Dialog/index.d.ts +5 -0
- package/dist/src/Divider/Divider.d.ts +5 -0
- package/dist/src/Drawer/Drawer.d.ts +5 -0
- package/dist/src/Drawer/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/dist/src/IconButton/IconButton.d.ts +5 -0
- package/dist/src/IconButton/IconButton.types.d.ts +76 -0
- package/dist/src/Image/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/dist/src/Input/Input.d.ts +5 -0
- package/dist/src/Input/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/dist/src/ItemSelector/ItemSelector.types.d.ts +39 -0
- package/dist/src/ItemSelector/ItemSelectorCore.d.ts +5 -0
- package/dist/src/Loading/Loading.d.ts +5 -0
- package/dist/src/Modal/Modal.d.ts +5 -0
- package/dist/src/Modal/Modal.miniapp.d.ts +16 -0
- package/dist/src/Modal/Modal.types.d.ts +44 -0
- package/dist/src/Modal/ModalManager.d.ts +21 -0
- package/dist/src/Modal/__tests__/fixtures/A11yDemos.d.ts +8 -0
- package/dist/src/Modal/index.d.ts +6 -0
- package/dist/src/Modal/useModal.d.ts +24 -0
- package/dist/src/NavBar/NavBar.d.ts +5 -0
- package/dist/src/Picker/Picker.types.d.ts +121 -0
- package/dist/src/Picker/__tests__/fixtures/A11yDemos.d.ts +2 -0
- package/dist/src/Picker/utils.d.ts +32 -0
- package/dist/src/Popover/Popover.d.ts +5 -0
- package/dist/src/Popover/Popover.types.d.ts +94 -0
- package/dist/src/Popover/__tests__/fixtures/A11yDemos.d.ts +25 -0
- package/dist/src/Popover/hooks/index.d.ts +8 -0
- package/dist/src/Popover/hooks/usePopoverA11y.d.ts +14 -0
- package/dist/src/Popover/hooks/usePopoverEvents.d.ts +21 -0
- package/dist/src/Popover/hooks/usePopoverPosition.d.ts +17 -0
- package/dist/src/Popover/hooks/usePopoverState.d.ts +16 -0
- package/dist/src/Portal/Portal.types.d.ts +26 -0
- package/dist/src/Progress/Progress.d.ts +8 -0
- package/dist/src/Progress/Progress.types.d.ts +72 -0
- package/dist/src/Progress/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/dist/src/Radio/Radio.d.ts +5 -0
- package/dist/src/Radio/RadioGroup.d.ts +5 -0
- package/dist/src/Radio/__tests__/fixtures/A11yDemos.d.ts +15 -0
- package/dist/src/Rating/Rating.d.ts +5 -0
- package/dist/src/ScrollView/ScrollView.d.ts +5 -0
- package/dist/src/ScrollView/ScrollView.types.d.ts +83 -0
- package/dist/src/ScrollView/__tests__/fixtures/A11yDemos.d.ts +7 -0
- package/dist/src/ScrollView/useScrollView.d.ts +10 -0
- package/dist/src/Select/Select.d.ts +5 -0
- package/dist/src/Select/Select.types.d.ts +104 -0
- package/dist/src/Select/SelectOption.d.ts +5 -0
- package/dist/src/Select/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/dist/src/Select/selectContext.d.ts +3 -0
- package/dist/src/Skeleton/Skeleton.d.ts +5 -0
- package/dist/src/Slider/Slider.d.ts +5 -0
- package/dist/src/Stack/Stack.d.ts +5 -0
- package/dist/src/Steps/Steps.d.ts +5 -0
- package/dist/src/SwipeAction/SwipeActionContext.d.ts +3 -0
- package/dist/src/Swiper/Swiper.d.ts +10 -0
- package/dist/src/Switch/Switch.d.ts +5 -0
- package/dist/src/Switch/Switch.types.d.ts +56 -0
- package/dist/src/Switch/__tests__/fixtures/A11yDemos.d.ts +15 -0
- package/dist/src/TabBar/TabBarContext.d.ts +27 -0
- package/dist/src/TabBar/index.types.d.ts +54 -0
- package/dist/src/Tabs/Tab.types.d.ts +12 -0
- package/dist/src/Tabs/TabPanel.d.ts +5 -0
- package/dist/src/Tabs/Tabs.types.d.ts +35 -0
- package/dist/src/Tabs/TabsContext.d.ts +8 -0
- package/dist/src/Tag/Tag.types.d.ts +23 -0
- package/dist/src/Tag/TagGroup.d.ts +5 -0
- package/dist/src/Tag/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/dist/src/TextArea/TextArea.d.ts +5 -0
- package/dist/src/TextArea/TextArea.types.d.ts +98 -0
- package/dist/src/TextArea/__tests__/fixtures/A11yDemos.d.ts +19 -0
- package/dist/src/ThemeProvider/ThemeProvider.types.d.ts +122 -0
- package/dist/src/ThemeProvider/utils/constants.d.ts +38 -0
- package/dist/src/ThemeProvider/utils/mountTokens.d.ts +26 -0
- package/dist/src/Toast/FunctionalToast.d.ts +3 -0
- package/dist/src/Toast/Toast.d.ts +5 -0
- package/dist/src/Toast/Toast.types.d.ts +104 -0
- package/dist/src/Toast/__tests__/fixtures/A11yDemos.d.ts +2 -0
- package/dist/src/Tooltip/Tooltip.d.ts +5 -0
- package/dist/src/Tooltip/Tooltip.types.d.ts +99 -0
- package/dist/src/Tooltip/__tests__/fixtures/A11yDemos.d.ts +25 -0
- package/dist/src/Tooltip/useTooltip.d.ts +29 -0
- package/dist/src/TransitionGroup/TransitionGroup.d.ts +7 -0
- package/dist/src/TransitionGroup/TransitionGroup.types.d.ts +47 -0
- package/dist/src/TransitionGroup/demo/TransitionGroupDemo.d.ts +4 -0
- package/dist/src/TransitionGroup/index.d.ts +2 -0
- package/dist/src/TransitionGroup/utils/childMapping.d.ts +27 -0
- package/dist/src/index.d.ts +58 -0
- package/dist/src/locales/base.d.ts +79 -0
- package/es/ActionSheet/ActionSheet.css +16 -6
- package/es/ActionSheet/ActionSheetItem.css +11 -17
- package/es/ActionSheet/ActionSheetItem.js +3 -8
- package/es/ActionSheet/index.css +89 -0
- package/es/Alert/Alert.js +2 -1
- package/es/Alert/__tests__/fixtures/A11yDemos.js +107 -0
- package/es/Alert/index.css +18 -14
- package/es/Avatar/Avatar.css +16 -12
- package/es/Avatar/Avatar.js +3 -8
- package/es/Avatar/AvatarGroup.css +19 -15
- package/es/Avatar/AvatarGroup.js +2 -6
- package/es/Avatar/index.css +93 -0
- package/es/Backdrop/Backdrop.js +4 -3
- package/es/Backdrop/__tests__/fixtures/A11yDemos.js +17 -0
- package/es/Backdrop/index.css +19 -0
- package/es/Badge/Badge.js +41 -19
- package/es/Badge/__tests__/fixtures/A11yDemos.js +70 -0
- package/es/Badge/hooks/useBadgeA11y.js +53 -0
- package/es/Badge/hooks/useBadgeDisplay.js +33 -0
- package/es/Badge/index.css +125 -0
- package/es/Breadcrumb/Breadcrumb.js +1 -1
- package/es/Breadcrumb/index.css +38 -0
- package/es/Button/Button.js +7 -11
- package/es/Button/__tests__/fixtures/A11yDemos.js +42 -0
- package/es/Button/index.css +267 -0
- package/es/CSSTransition/CSSTransition.js +153 -0
- package/es/CSSTransition/CSSTransition.types.js +1 -0
- package/es/CSSTransition/demo/CSSTransitionDemo.js +47 -0
- package/es/CSSTransition/demo/index.css +25 -0
- package/es/CSSTransition/index.js +6 -0
- package/es/Calendar/Calendar.js +136 -51
- package/es/Calendar/__tests__/fixtures/A11yDemos.js +8 -0
- package/es/Calendar/index.css +167 -0
- package/es/Calendar/utils.js +29 -20
- package/es/Card/Card.css +9 -0
- package/es/Card/CardContent.css +1 -2
- package/es/Card/CardFooter.css +2 -4
- package/es/Card/CardHeader.css +5 -5
- package/es/Card/CardHeader.js +2 -2
- package/es/Card/index.css +77 -0
- package/es/Checkbox/Checkbox.js +9 -12
- package/es/Checkbox/CheckboxGroup.js +5 -8
- package/es/Checkbox/__tests__/fixtures/A11yDemos.js +22 -0
- package/es/Checkbox/index.css +51 -0
- package/es/CitySelector/CitySelector.miniapp.js +0 -1
- package/es/CitySelector/CitySelectorCore.js +1 -1
- package/es/CitySelector/Selector/index.css +4 -4
- package/es/CitySelector/index.css +120 -0
- package/es/Collapse/Collapse.js +19 -8
- package/es/Collapse/Collapse.miniapp.js +154 -75
- package/es/Collapse/index.css +45 -0
- package/es/CollapsePanel/CollapsePanel.js +1 -1
- package/es/CollapsePanel/CollapsePanelItem.js +45 -46
- package/es/CollapsePanel/index.css +36 -0
- package/es/Countdown/Countdown.js +64 -31
- package/es/Countdown/__tests__/fixtures/A11yDemos.js +68 -0
- package/es/Countdown/index.css +54 -0
- package/es/DesktopDatePicker/DesktopDatePicker.css +61 -0
- package/es/DesktopDatePicker/DesktopDatePicker.js +1 -1
- package/es/DesktopDatePicker/index.css +100 -0
- package/es/Dialog/Dialog.js +57 -35
- package/es/Dialog/FunctionalDialog.js +105 -94
- package/es/Dialog/__tests__/fixtures/A11yDemos.js +43 -0
- package/es/Dialog/index.css +39 -36
- package/es/Dialog/index.js +10 -3
- package/es/Divider/Divider.js +9 -6
- package/es/Divider/index.css +47 -0
- package/es/Drawer/Drawer.js +13 -19
- package/es/Drawer/__tests__/fixtures/A11yDemos.js +112 -0
- package/es/Drawer/index.css +36 -0
- package/es/Fade/Fade.js +52 -56
- package/es/IconButton/IconButton.js +26 -18
- package/es/IconButton/index.css +205 -0
- package/es/Image/Image.js +119 -119
- package/es/Image/__tests__/fixtures/A11yDemos.js +92 -0
- package/es/Image/index.css +7 -8
- package/es/Input/Input.js +9 -13
- package/es/Input/__tests__/fixtures/A11yDemos.js +43 -0
- package/es/Input/index.css +70 -0
- package/es/ItemSelector/ItemSelector.miniapp.js +0 -1
- package/es/ItemSelector/ItemSelectorCore.js +1 -1
- package/es/List/List.css +7 -3
- package/es/List/List.js +3 -8
- package/es/List/ListItem.css +3 -3
- package/es/List/ListItem.js +42 -44
- package/es/List/ListItemContent.js +1 -4
- package/es/List/ListItemExtra.js +9 -4
- package/es/List/ListItemFooter.js +9 -4
- package/es/List/ListItemHeader.js +9 -4
- package/es/List/index.css +80 -0
- package/es/Loading/Loading.js +14 -5
- package/es/Loading/index.css +37 -0
- package/es/Modal/Modal.js +49 -55
- package/es/Modal/Modal.miniapp.js +50 -45
- package/es/Modal/ModalManager.js +214 -0
- package/es/Modal/__tests__/fixtures/A11yDemos.js +18 -0
- package/es/Modal/index.css +15 -0
- package/es/Modal/index.js +6 -1
- package/es/Modal/useModal.js +169 -0
- package/es/NavBar/NavBar.js +1 -2
- package/es/NavBar/index.css +65 -0
- package/es/Picker/Picker.css +21 -17
- package/es/Picker/Picker.js +53 -21
- package/es/Picker/PickerPanel.css +8 -8
- package/es/Picker/PickerPanel.js +92 -60
- package/es/Picker/__tests__/fixtures/A11yDemos.js +46 -0
- package/es/Picker/index.css +124 -0
- package/es/Picker/utils.js +9 -12
- package/es/Popover/Popover.js +127 -140
- package/es/Popover/__tests__/fixtures/A11yDemos.js +135 -0
- package/es/Popover/hooks/index.js +10 -0
- package/es/Popover/hooks/usePopoverA11y.js +43 -0
- package/es/Popover/hooks/usePopoverEvents.js +127 -0
- package/es/Popover/hooks/usePopoverPosition.js +105 -0
- package/es/Popover/hooks/usePopoverState.js +31 -0
- package/es/Popover/index.css +99 -0
- package/es/Portal/PortalCore.js +2 -2
- package/es/Progress/Progress.js +62 -7
- package/es/Progress/__tests__/fixtures/A11yDemos.js +62 -0
- package/es/Progress/index.css +28 -0
- package/es/Radio/Radio.js +8 -11
- package/es/Radio/RadioButtonIcon.js +6 -1
- package/es/Radio/RadioGroup.js +2 -5
- package/es/Radio/__tests__/fixtures/A11yDemos.js +22 -0
- package/es/Radio/index.css +69 -0
- package/es/Rating/Rating.js +9 -19
- package/es/Rating/index.css +65 -0
- package/es/ScrollView/ScrollView.js +53 -212
- package/es/ScrollView/__tests__/fixtures/A11yDemos.js +283 -0
- package/es/ScrollView/useScrollView.js +279 -0
- package/es/Select/Select.js +19 -18
- package/es/Select/SelectOption.js +6 -2
- package/es/Select/__tests__/fixtures/A11yDemos.js +118 -0
- package/es/Select/index.css +118 -0
- package/es/Skeleton/Skeleton.js +6 -10
- package/es/Skeleton/index.css +63 -0
- package/es/Slide/Slide.js +69 -74
- package/es/Slider/Slider.js +8 -16
- package/es/Slider/index.css +111 -0
- package/es/Stack/Stack.js +1 -1
- package/es/Stack/demo/index.css +2 -0
- package/es/Steps/Step.css +14 -14
- package/es/Steps/Step.js +81 -82
- package/es/Steps/Steps.css +18 -14
- package/es/Steps/Steps.js +57 -60
- package/es/Steps/index.css +199 -0
- package/es/SwipeAction/index.css +110 -0
- package/es/Swiper/Swiper.js +19 -5
- package/es/Swiper/index.css +25 -0
- package/es/Switch/Switch.js +77 -79
- package/es/Switch/__tests__/fixtures/A11yDemos.js +22 -0
- package/es/Switch/index.css +153 -0
- package/es/TabBar/TabBar.css +12 -8
- package/es/TabBar/TabBar.js +3 -8
- package/es/TabBar/TabBarItem.css +6 -0
- package/es/TabBar/TabBarItem.js +2 -2
- package/es/TabBar/index.css +59 -0
- package/es/Tabs/Tab.css +10 -16
- package/es/Tabs/Tab.js +37 -23
- package/es/Tabs/TabPanel.js +8 -4
- package/es/Tabs/Tabs.css +32 -21
- package/es/Tabs/Tabs.js +87 -106
- package/es/Tabs/TabsContext.js +3 -1
- package/es/Tabs/index.css +135 -0
- package/es/Tag/Tag.css +49 -23
- package/es/Tag/Tag.js +3 -7
- package/es/Tag/TagGroup.css +15 -11
- package/es/Tag/TagGroup.js +16 -14
- package/es/Tag/__tests__/fixtures/A11yDemos.js +160 -0
- package/es/Tag/index.css +182 -0
- package/es/TextArea/TextArea.js +55 -19
- package/es/TextArea/__tests__/fixtures/A11yDemos.js +54 -0
- package/es/TextArea/index.css +57 -0
- package/es/ThemeProvider/ThemeProvider.js +1 -4
- package/es/ThemeProvider/utils/constants.js +4 -1
- package/es/Toast/FunctionalToast.js +185 -96
- package/es/Toast/Toast.js +70 -29
- package/es/Toast/__tests__/fixtures/A11yDemos.js +21 -0
- package/es/Toast/index.css +57 -0
- package/es/Tooltip/Tooltip.js +65 -159
- package/es/Tooltip/__tests__/fixtures/A11yDemos.js +60 -0
- package/es/Tooltip/index.css +95 -0
- package/es/Tooltip/useTooltip.js +290 -0
- package/es/Transition/TransitionCore.js +28 -28
- package/es/TransitionGroup/TransitionGroup.js +109 -0
- package/es/TransitionGroup/TransitionGroup.types.js +1 -0
- package/es/TransitionGroup/demo/TransitionGroupDemo.js +39 -0
- package/es/TransitionGroup/demo/index.css +33 -0
- package/es/TransitionGroup/index.js +6 -0
- package/es/TransitionGroup/utils/childMapping.js +93 -0
- package/es/_.._/benchmarks/components/Button.js +8 -0
- package/es/_.._/benchmarks/components/Input.js +12 -0
- package/es/_.._/benchmarks/components/Tabs.js +17 -0
- package/es/benchmarks/components/Button.d.ts +3 -0
- package/es/benchmarks/components/Input.d.ts +3 -0
- package/es/benchmarks/components/Tabs.d.ts +3 -0
- package/es/index.js +2 -0
- package/es/locales/en-US.js +30 -2
- package/es/locales/zh-CN.js +32 -1
- package/es/locales/zh-TW.js +32 -1
- package/es/src/ActionSheet/ActionSheetItem.types.d.ts +38 -0
- package/es/src/Alert/Alert.types.d.ts +61 -0
- package/es/src/Alert/__tests__/fixtures/A11yDemos.d.ts +17 -0
- package/es/src/Backdrop/Backdrop.d.ts +5 -0
- package/es/src/Backdrop/Backdrop.types.d.ts +21 -0
- package/es/src/Backdrop/__tests__/fixtures/A11yDemos.d.ts +8 -0
- package/es/src/Badge/Badge.d.ts +5 -0
- package/es/src/Badge/Badge.types.d.ts +56 -0
- package/es/src/Badge/__tests__/fixtures/A11yDemos.d.ts +25 -0
- package/es/src/Badge/hooks/useBadgeA11y.d.ts +23 -0
- package/es/src/Badge/hooks/useBadgeDisplay.d.ts +16 -0
- package/es/src/Breadcrumb/Breadcrumb.d.ts +5 -0
- package/es/src/Button/Button.d.ts +5 -0
- package/es/src/Button/Button.types.d.ts +53 -0
- package/es/src/Button/__tests__/fixtures/A11yDemos.d.ts +23 -0
- package/es/src/CSSTransition/CSSTransition.d.ts +4 -0
- package/es/src/CSSTransition/CSSTransition.types.d.ts +13 -0
- package/es/src/CSSTransition/demo/CSSTransitionDemo.d.ts +4 -0
- package/es/src/CSSTransition/index.d.ts +2 -0
- package/es/src/Calendar/Calendar.d.ts +5 -0
- package/es/src/Calendar/Calendar.types.d.ts +112 -0
- package/es/src/Calendar/__tests__/fixtures/A11yDemos.d.ts +2 -0
- package/es/src/Calendar/utils.d.ts +29 -0
- package/es/src/Checkbox/Checkbox.d.ts +5 -0
- package/es/src/Checkbox/CheckboxGroup.d.ts +5 -0
- package/es/src/Checkbox/__tests__/fixtures/A11yDemos.d.ts +15 -0
- package/es/src/CitySelector/CitySelector.d.ts +4 -0
- package/es/src/CitySelector/CitySelector.miniapp.d.ts +4 -0
- package/es/src/CitySelector/CitySelector.types.d.ts +46 -0
- package/es/src/CitySelector/CitySelectorCore.d.ts +5 -0
- package/es/src/Collapse/Collapse.d.ts +5 -0
- package/es/src/Collapse/Collapse.miniapp.d.ts +10 -0
- package/es/src/CollapsePanel/CollapsePanel.d.ts +5 -0
- package/es/src/Countdown/Countdown.d.ts +5 -0
- package/es/src/Countdown/Countdown.types.d.ts +127 -0
- package/es/src/Countdown/__tests__/fixtures/A11yDemos.d.ts +23 -0
- package/es/src/DesktopDatePicker/DesktopDatePicker.d.ts +5 -0
- package/es/src/Dialog/Dialog.d.ts +8 -0
- package/es/src/Dialog/Dialog.types.d.ts +137 -0
- package/es/src/Dialog/FunctionalDialog.d.ts +10 -0
- package/es/src/Dialog/__tests__/fixtures/A11yDemos.d.ts +9 -0
- package/es/src/Dialog/index.d.ts +5 -0
- package/es/src/Divider/Divider.d.ts +5 -0
- package/es/src/Drawer/Drawer.d.ts +5 -0
- package/es/src/Drawer/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/es/src/IconButton/IconButton.d.ts +5 -0
- package/es/src/IconButton/IconButton.types.d.ts +76 -0
- package/es/src/Image/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/es/src/Input/Input.d.ts +5 -0
- package/es/src/Input/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/es/src/ItemSelector/ItemSelector.d.ts +4 -0
- package/es/src/ItemSelector/ItemSelector.miniapp.d.ts +4 -0
- package/es/src/ItemSelector/ItemSelector.types.d.ts +39 -0
- package/es/src/ItemSelector/ItemSelectorCore.d.ts +5 -0
- package/es/src/Loading/Loading.d.ts +5 -0
- package/es/src/Modal/Modal.d.ts +5 -0
- package/es/src/Modal/Modal.miniapp.d.ts +16 -0
- package/es/src/Modal/Modal.types.d.ts +44 -0
- package/es/src/Modal/ModalManager.d.ts +21 -0
- package/es/src/Modal/__tests__/fixtures/A11yDemos.d.ts +8 -0
- package/es/src/Modal/index.d.ts +6 -0
- package/es/src/Modal/useModal.d.ts +24 -0
- package/es/src/NavBar/NavBar.d.ts +5 -0
- package/es/src/Picker/Picker.types.d.ts +121 -0
- package/es/src/Picker/__tests__/fixtures/A11yDemos.d.ts +2 -0
- package/es/src/Picker/utils.d.ts +32 -0
- package/es/src/Popover/Popover.d.ts +5 -0
- package/es/src/Popover/Popover.types.d.ts +94 -0
- package/es/src/Popover/__tests__/fixtures/A11yDemos.d.ts +25 -0
- package/es/src/Popover/hooks/index.d.ts +8 -0
- package/es/src/Popover/hooks/usePopoverA11y.d.ts +14 -0
- package/es/src/Popover/hooks/usePopoverEvents.d.ts +21 -0
- package/es/src/Popover/hooks/usePopoverPosition.d.ts +17 -0
- package/es/src/Popover/hooks/usePopoverState.d.ts +16 -0
- package/es/src/Portal/Portal.types.d.ts +26 -0
- package/es/src/Progress/Progress.d.ts +8 -0
- package/es/src/Progress/Progress.types.d.ts +72 -0
- package/es/src/Progress/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/es/src/Radio/Radio.d.ts +5 -0
- package/es/src/Radio/RadioGroup.d.ts +5 -0
- package/es/src/Radio/__tests__/fixtures/A11yDemos.d.ts +15 -0
- package/es/src/Rating/Rating.d.ts +5 -0
- package/es/src/ScrollView/ScrollView.d.ts +5 -0
- package/es/src/ScrollView/ScrollView.types.d.ts +83 -0
- package/es/src/ScrollView/__tests__/fixtures/A11yDemos.d.ts +7 -0
- package/es/src/ScrollView/useScrollView.d.ts +10 -0
- package/es/src/Select/Select.d.ts +5 -0
- package/es/src/Select/Select.types.d.ts +104 -0
- package/es/src/Select/SelectOption.d.ts +5 -0
- package/es/src/Select/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/es/src/Select/selectContext.d.ts +3 -0
- package/es/src/Skeleton/Skeleton.d.ts +5 -0
- package/es/src/Slider/Slider.d.ts +5 -0
- package/es/src/Stack/Stack.d.ts +5 -0
- package/es/src/Stack/demo/StackDemo.d.ts +4 -0
- package/es/src/Steps/Steps.d.ts +5 -0
- package/es/src/SwipeAction/SwipeActionContext.d.ts +3 -0
- package/es/src/Swiper/Swiper.d.ts +10 -0
- package/es/src/Switch/Switch.d.ts +5 -0
- package/es/src/Switch/Switch.types.d.ts +56 -0
- package/es/src/Switch/__tests__/fixtures/A11yDemos.d.ts +15 -0
- package/es/src/TabBar/TabBarContext.d.ts +27 -0
- package/es/src/TabBar/index.types.d.ts +54 -0
- package/es/src/Tabs/Tab.types.d.ts +12 -0
- package/es/src/Tabs/TabPanel.d.ts +5 -0
- package/es/src/Tabs/Tabs.types.d.ts +35 -0
- package/es/src/Tabs/TabsContext.d.ts +8 -0
- package/es/src/Tag/Tag.types.d.ts +23 -0
- package/es/src/Tag/TagGroup.d.ts +5 -0
- package/es/src/Tag/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/es/src/TextArea/TextArea.d.ts +5 -0
- package/es/src/TextArea/TextArea.types.d.ts +98 -0
- package/es/src/TextArea/__tests__/fixtures/A11yDemos.d.ts +19 -0
- package/es/src/ThemeProvider/ThemeProvider.types.d.ts +122 -0
- package/es/src/ThemeProvider/utils/constants.d.ts +38 -0
- package/es/src/ThemeProvider/utils/mountTokens.d.ts +26 -0
- package/es/src/Toast/FunctionalToast.d.ts +3 -0
- package/es/src/Toast/Toast.d.ts +5 -0
- package/es/src/Toast/Toast.types.d.ts +104 -0
- package/es/src/Toast/__tests__/fixtures/A11yDemos.d.ts +2 -0
- package/es/src/Tooltip/Tooltip.d.ts +5 -0
- package/es/src/Tooltip/Tooltip.types.d.ts +99 -0
- package/es/src/Tooltip/__tests__/fixtures/A11yDemos.d.ts +25 -0
- package/es/src/Tooltip/useTooltip.d.ts +29 -0
- package/es/src/TransitionGroup/TransitionGroup.d.ts +7 -0
- package/es/src/TransitionGroup/TransitionGroup.types.d.ts +47 -0
- package/es/src/TransitionGroup/demo/TransitionGroupDemo.d.ts +4 -0
- package/es/src/TransitionGroup/index.d.ts +2 -0
- package/es/src/TransitionGroup/utils/childMapping.d.ts +27 -0
- package/es/src/index.d.ts +58 -0
- package/es/src/locales/base.d.ts +79 -0
- package/package.json +18 -7
- package/dist/ActionSheet/ActionSheetItem.types.d.ts +0 -38
- package/dist/Alert/Alert.types.d.ts +0 -61
- package/dist/Backdrop/Backdrop.css +0 -15
- package/dist/Backdrop/Backdrop.d.ts +0 -5
- package/dist/Backdrop/Backdrop.types.d.ts +0 -17
- package/dist/Badge/Badge.css +0 -105
- package/dist/Badge/Badge.d.ts +0 -5
- package/dist/Badge/Badge.types.d.ts +0 -27
- package/dist/Breadcrumb/Breadcrumb.css +0 -34
- package/dist/Breadcrumb/Breadcrumb.d.ts +0 -5
- package/dist/Button/Button.css +0 -237
- package/dist/Button/Button.d.ts +0 -5
- package/dist/Button/Button.types.d.ts +0 -52
- package/dist/Calendar/Calendar.css +0 -120
- package/dist/Calendar/Calendar.d.ts +0 -5
- package/dist/Calendar/Calendar.types.d.ts +0 -102
- package/dist/Calendar/utils.d.ts +0 -25
- package/dist/Checkbox/Checkbox.css +0 -47
- package/dist/Checkbox/Checkbox.d.ts +0 -5
- package/dist/Checkbox/CheckboxGroup.d.ts +0 -5
- package/dist/CitySelector/CitySelector.css +0 -116
- package/dist/CitySelector/CitySelector.miniapp.d.ts +0 -5
- package/dist/CitySelector/CitySelector.types.d.ts +0 -47
- package/dist/CitySelector/CitySelectorCore.d.ts +0 -5
- package/dist/CitySelector/miniapp.css +0 -4
- package/dist/Collapse/Collapse.css +0 -5
- package/dist/Collapse/Collapse.d.ts +0 -5
- package/dist/Collapse/Collapse.miniapp.d.ts +0 -5
- package/dist/CollapsePanel/CollapsePanel.css +0 -34
- package/dist/CollapsePanel/CollapsePanel.d.ts +0 -5
- package/dist/Countdown/Countdown.css +0 -39
- package/dist/Countdown/Countdown.d.ts +0 -5
- package/dist/Countdown/Countdown.types.d.ts +0 -123
- package/dist/DesktopDatePicker/DesktopDatePicker.d.ts +0 -5
- package/dist/Dialog/Dialog.d.ts +0 -5
- package/dist/Dialog/Dialog.types.d.ts +0 -114
- package/dist/Dialog/FunctionalDialog.d.ts +0 -3
- package/dist/Dialog/index.d.ts +0 -2
- package/dist/Divider/Divider.css +0 -43
- package/dist/Divider/Divider.d.ts +0 -5
- package/dist/Drawer/Drawer.css +0 -34
- package/dist/Drawer/Drawer.d.ts +0 -5
- package/dist/IconButton/IconButton.css +0 -152
- package/dist/IconButton/IconButton.d.ts +0 -5
- package/dist/IconButton/IconButton.types.d.ts +0 -40
- package/dist/Input/Input.css +0 -64
- package/dist/Input/Input.d.ts +0 -5
- package/dist/ItemSelector/ItemSelector.miniapp.d.ts +0 -5
- package/dist/ItemSelector/ItemSelector.types.d.ts +0 -40
- package/dist/ItemSelector/ItemSelectorCore.d.ts +0 -5
- package/dist/ItemSelector/miniapp.css +0 -4
- package/dist/Loading/Loading.css +0 -33
- package/dist/Loading/Loading.d.ts +0 -5
- package/dist/Modal/Modal.css +0 -15
- package/dist/Modal/Modal.d.ts +0 -5
- package/dist/Modal/Modal.miniapp.d.ts +0 -16
- package/dist/Modal/Modal.types.d.ts +0 -20
- package/dist/Modal/index.d.ts +0 -3
- package/dist/NavBar/NavBar.css +0 -61
- package/dist/NavBar/NavBar.d.ts +0 -5
- package/dist/Picker/Picker.types.d.ts +0 -121
- package/dist/Picker/utils.d.ts +0 -29
- package/dist/Popover/Popover.css +0 -95
- package/dist/Popover/Popover.d.ts +0 -5
- package/dist/Popover/Popover.types.d.ts +0 -57
- package/dist/Portal/Portal.types.d.ts +0 -26
- package/dist/Progress/Progress.css +0 -24
- package/dist/Progress/Progress.d.ts +0 -8
- package/dist/Progress/Progress.types.d.ts +0 -28
- package/dist/Radio/Radio.css +0 -66
- package/dist/Radio/Radio.d.ts +0 -5
- package/dist/Radio/RadioGroup.d.ts +0 -5
- package/dist/Rating/Rating.css +0 -56
- package/dist/Rating/Rating.d.ts +0 -5
- package/dist/ScrollView/ScrollView.d.ts +0 -5
- package/dist/ScrollView/ScrollView.types.d.ts +0 -257
- package/dist/Select/Select.css +0 -104
- package/dist/Select/Select.d.ts +0 -5
- package/dist/Select/Select.types.d.ts +0 -104
- package/dist/Select/SelectOption.d.ts +0 -5
- package/dist/Select/selectContext.d.ts +0 -4
- package/dist/Skeleton/Skeleton.css +0 -59
- package/dist/Skeleton/Skeleton.d.ts +0 -5
- package/dist/Slider/Slider.css +0 -106
- package/dist/Slider/Slider.d.ts +0 -5
- package/dist/Stack/Stack.d.ts +0 -5
- package/dist/Steps/Steps.d.ts +0 -5
- package/dist/SwipeAction/SwipeActionContext.d.ts +0 -4
- package/dist/Swiper/Swiper.css +0 -21
- package/dist/Swiper/Swiper.d.ts +0 -10
- package/dist/Switch/Switch.css +0 -142
- package/dist/Switch/Switch.d.ts +0 -5
- package/dist/Switch/Switch.types.d.ts +0 -56
- package/dist/TabBar/TabBarContext.d.ts +0 -27
- package/dist/TabBar/index.types.d.ts +0 -54
- package/dist/Tabs/Tab.types.d.ts +0 -12
- package/dist/Tabs/TabPanel.d.ts +0 -5
- package/dist/Tabs/Tabs.types.d.ts +0 -45
- package/dist/Tabs/TabsContext.d.ts +0 -9
- package/dist/Tag/Tag.types.d.ts +0 -23
- package/dist/Tag/TagGroup.d.ts +0 -5
- package/dist/TextArea/TextArea.css +0 -53
- package/dist/TextArea/TextArea.d.ts +0 -5
- package/dist/TextArea/TextArea.types.d.ts +0 -70
- package/dist/ThemeProvider/ThemeProvider.types.d.ts +0 -127
- package/dist/ThemeProvider/utils/constants.d.ts +0 -38
- package/dist/ThemeProvider/utils/mountTokens.d.ts +0 -26
- package/dist/Toast/FunctionalToast.d.ts +0 -3
- package/dist/Toast/Toast.css +0 -53
- package/dist/Toast/Toast.d.ts +0 -5
- package/dist/Toast/Toast.types.d.ts +0 -106
- package/dist/Tooltip/Tooltip.css +0 -91
- package/dist/Tooltip/Tooltip.d.ts +0 -5
- package/dist/Tooltip/Tooltip.types.d.ts +0 -48
- package/dist/index.d.ts +0 -56
- package/dist/locales/base.d.ts +0 -51
- package/es/ActionSheet/ActionSheetItem.types.d.ts +0 -38
- package/es/Alert/Alert.types.d.ts +0 -61
- package/es/Backdrop/Backdrop.css +0 -15
- package/es/Backdrop/Backdrop.d.ts +0 -5
- package/es/Backdrop/Backdrop.types.d.ts +0 -17
- package/es/Badge/Badge.css +0 -105
- package/es/Badge/Badge.d.ts +0 -5
- package/es/Badge/Badge.types.d.ts +0 -27
- package/es/Breadcrumb/Breadcrumb.css +0 -34
- package/es/Breadcrumb/Breadcrumb.d.ts +0 -5
- package/es/Button/Button.css +0 -237
- package/es/Button/Button.d.ts +0 -5
- package/es/Button/Button.types.d.ts +0 -52
- package/es/Calendar/Calendar.css +0 -120
- package/es/Calendar/Calendar.d.ts +0 -5
- package/es/Calendar/Calendar.types.d.ts +0 -102
- package/es/Calendar/utils.d.ts +0 -25
- package/es/Checkbox/Checkbox.css +0 -47
- package/es/Checkbox/Checkbox.d.ts +0 -5
- package/es/Checkbox/CheckboxGroup.d.ts +0 -5
- package/es/CitySelector/CitySelector.css +0 -116
- package/es/CitySelector/CitySelector.miniapp.d.ts +0 -5
- package/es/CitySelector/CitySelector.types.d.ts +0 -47
- package/es/CitySelector/CitySelectorCore.d.ts +0 -5
- package/es/CitySelector/miniapp.css +0 -4
- package/es/Collapse/Collapse.css +0 -5
- package/es/Collapse/Collapse.d.ts +0 -5
- package/es/Collapse/Collapse.miniapp.d.ts +0 -5
- package/es/CollapsePanel/CollapsePanel.css +0 -34
- package/es/CollapsePanel/CollapsePanel.d.ts +0 -5
- package/es/Countdown/Countdown.css +0 -39
- package/es/Countdown/Countdown.d.ts +0 -5
- package/es/Countdown/Countdown.types.d.ts +0 -123
- package/es/DesktopDatePicker/DesktopDatePicker.d.ts +0 -5
- package/es/Dialog/Dialog.d.ts +0 -5
- package/es/Dialog/Dialog.types.d.ts +0 -114
- package/es/Dialog/FunctionalDialog.d.ts +0 -3
- package/es/Dialog/index.d.ts +0 -2
- package/es/Divider/Divider.css +0 -43
- package/es/Divider/Divider.d.ts +0 -5
- package/es/Drawer/Drawer.css +0 -34
- package/es/Drawer/Drawer.d.ts +0 -5
- package/es/IconButton/IconButton.css +0 -152
- package/es/IconButton/IconButton.d.ts +0 -5
- package/es/IconButton/IconButton.types.d.ts +0 -40
- package/es/Input/Input.css +0 -64
- package/es/Input/Input.d.ts +0 -5
- package/es/ItemSelector/ItemSelector.miniapp.d.ts +0 -5
- package/es/ItemSelector/ItemSelector.types.d.ts +0 -40
- package/es/ItemSelector/ItemSelectorCore.d.ts +0 -5
- package/es/ItemSelector/miniapp.css +0 -4
- package/es/Loading/Loading.css +0 -33
- package/es/Loading/Loading.d.ts +0 -5
- package/es/Modal/Modal.css +0 -15
- package/es/Modal/Modal.d.ts +0 -5
- package/es/Modal/Modal.miniapp.d.ts +0 -16
- package/es/Modal/Modal.types.d.ts +0 -20
- package/es/Modal/index.d.ts +0 -3
- package/es/NavBar/NavBar.css +0 -61
- package/es/NavBar/NavBar.d.ts +0 -5
- package/es/Picker/Picker.types.d.ts +0 -121
- package/es/Picker/utils.d.ts +0 -29
- package/es/Popover/Popover.css +0 -95
- package/es/Popover/Popover.d.ts +0 -5
- package/es/Popover/Popover.types.d.ts +0 -57
- package/es/Portal/Portal.types.d.ts +0 -26
- package/es/Progress/Progress.css +0 -24
- package/es/Progress/Progress.d.ts +0 -8
- package/es/Progress/Progress.types.d.ts +0 -28
- package/es/Radio/Radio.css +0 -66
- package/es/Radio/Radio.d.ts +0 -5
- package/es/Radio/RadioGroup.d.ts +0 -5
- package/es/Rating/Rating.css +0 -56
- package/es/Rating/Rating.d.ts +0 -5
- package/es/ScrollView/ScrollView.d.ts +0 -5
- package/es/ScrollView/ScrollView.types.d.ts +0 -257
- package/es/Select/Select.css +0 -104
- package/es/Select/Select.d.ts +0 -5
- package/es/Select/Select.types.d.ts +0 -104
- package/es/Select/SelectOption.d.ts +0 -5
- package/es/Select/selectContext.d.ts +0 -4
- package/es/Skeleton/Skeleton.css +0 -59
- package/es/Skeleton/Skeleton.d.ts +0 -5
- package/es/Slider/Slider.css +0 -106
- package/es/Slider/Slider.d.ts +0 -5
- package/es/Stack/Stack.d.ts +0 -5
- package/es/Steps/Steps.d.ts +0 -5
- package/es/SwipeAction/SwipeActionContext.d.ts +0 -4
- package/es/Swiper/Swiper.css +0 -21
- package/es/Swiper/Swiper.d.ts +0 -10
- package/es/Switch/Switch.css +0 -142
- package/es/Switch/Switch.d.ts +0 -5
- package/es/Switch/Switch.types.d.ts +0 -56
- package/es/TabBar/TabBarContext.d.ts +0 -27
- package/es/TabBar/index.types.d.ts +0 -54
- package/es/Tabs/Tab.types.d.ts +0 -12
- package/es/Tabs/TabPanel.d.ts +0 -5
- package/es/Tabs/Tabs.types.d.ts +0 -45
- package/es/Tabs/TabsContext.d.ts +0 -9
- package/es/Tag/Tag.types.d.ts +0 -23
- package/es/Tag/TagGroup.d.ts +0 -5
- package/es/TextArea/TextArea.css +0 -53
- package/es/TextArea/TextArea.d.ts +0 -5
- package/es/TextArea/TextArea.types.d.ts +0 -70
- package/es/ThemeProvider/ThemeProvider.types.d.ts +0 -127
- package/es/ThemeProvider/utils/constants.d.ts +0 -38
- package/es/ThemeProvider/utils/mountTokens.d.ts +0 -26
- package/es/Toast/FunctionalToast.d.ts +0 -3
- package/es/Toast/Toast.css +0 -53
- package/es/Toast/Toast.d.ts +0 -5
- package/es/Toast/Toast.types.d.ts +0 -106
- package/es/Tooltip/Tooltip.css +0 -91
- package/es/Tooltip/Tooltip.d.ts +0 -5
- package/es/Tooltip/Tooltip.types.d.ts +0 -48
- package/es/index.d.ts +0 -56
- package/es/locales/base.d.ts +0 -51
- /package/dist/ItemSelector/{ItemSelector.css → index.css} +0 -0
- /package/dist/ScrollView/{ScrollView.css → index.css} +0 -0
- /package/dist/Stack/{Stack.css → index.css} +0 -0
- /package/dist/{ActionSheet → src/ActionSheet}/ActionSheet.d.ts +0 -0
- /package/dist/{ActionSheet → src/ActionSheet}/ActionSheet.types.d.ts +0 -0
- /package/dist/{ActionSheet → src/ActionSheet}/ActionSheetContext.d.ts +0 -0
- /package/dist/{ActionSheet → src/ActionSheet}/ActionSheetItem.d.ts +0 -0
- /package/dist/{ActionSheet → src/ActionSheet}/index.d.ts +0 -0
- /package/dist/{Alert → src/Alert}/Alert.d.ts +0 -0
- /package/dist/{Alert → src/Alert}/index.d.ts +0 -0
- /package/dist/{Avatar → src/Avatar}/Avatar.d.ts +0 -0
- /package/dist/{Avatar → src/Avatar}/Avatar.types.d.ts +0 -0
- /package/dist/{Avatar → src/Avatar}/AvatarGroup.d.ts +0 -0
- /package/dist/{Avatar → src/Avatar}/AvatarGroup.types.d.ts +0 -0
- /package/dist/{Avatar → src/Avatar}/index.d.ts +0 -0
- /package/dist/{Backdrop → src/Backdrop}/index.d.ts +0 -0
- /package/dist/{Badge → src/Badge}/index.d.ts +0 -0
- /package/dist/{Breadcrumb → src/Breadcrumb}/Breadcrumb.types.d.ts +0 -0
- /package/dist/{Breadcrumb → src/Breadcrumb}/BreadcrumbItem.d.ts +0 -0
- /package/dist/{Breadcrumb → src/Breadcrumb}/index.d.ts +0 -0
- /package/dist/{Button → src/Button}/index.d.ts +0 -0
- /package/dist/{Stack/demo/StackDemo.d.ts → src/CSSTransition/demo/CSSTransitionDemo.d.ts} +0 -0
- /package/dist/{Calendar → src/Calendar}/index.d.ts +0 -0
- /package/dist/{Card → src/Card}/Card.d.ts +0 -0
- /package/dist/{Card → src/Card}/Card.types.d.ts +0 -0
- /package/dist/{Card → src/Card}/CardContent.d.ts +0 -0
- /package/dist/{Card → src/Card}/CardContent.types.d.ts +0 -0
- /package/dist/{Card → src/Card}/CardFooter.d.ts +0 -0
- /package/dist/{Card → src/Card}/CardFooter.types.d.ts +0 -0
- /package/dist/{Card → src/Card}/CardHeader.d.ts +0 -0
- /package/dist/{Card → src/Card}/CardHeader.types.d.ts +0 -0
- /package/dist/{Card → src/Card}/index.d.ts +0 -0
- /package/dist/{Checkbox → src/Checkbox}/Checkbox.types.d.ts +0 -0
- /package/dist/{Checkbox → src/Checkbox}/CheckboxContext.d.ts +0 -0
- /package/dist/{Checkbox → src/Checkbox}/index.d.ts +0 -0
- /package/dist/{CitySelector → src/CitySelector}/CitySelector.d.ts +0 -0
- /package/{es/CitySelector/CitySelector.d.ts → dist/src/CitySelector/CitySelector.miniapp.d.ts} +0 -0
- /package/dist/{CitySelector → src/CitySelector}/Selector/index.d.ts +0 -0
- /package/dist/{CitySelector → src/CitySelector}/index.d.ts +0 -0
- /package/dist/{Collapse → src/Collapse}/Collapse.types.d.ts +0 -0
- /package/dist/{Collapse → src/Collapse}/index.d.ts +0 -0
- /package/dist/{CollapsePanel → src/CollapsePanel}/CollapsePanel.types.d.ts +0 -0
- /package/dist/{CollapsePanel → src/CollapsePanel}/CollapsePanelItem.d.ts +0 -0
- /package/dist/{CollapsePanel → src/CollapsePanel}/index.d.ts +0 -0
- /package/dist/{Countdown → src/Countdown}/index.d.ts +0 -0
- /package/dist/{Countdown → src/Countdown}/useCountdown.d.ts +0 -0
- /package/dist/{Countdown → src/Countdown}/utils.d.ts +0 -0
- /package/dist/{DatePicker → src/DatePicker}/DatePicker.d.ts +0 -0
- /package/dist/{DatePicker → src/DatePicker}/DatePicker.types.d.ts +0 -0
- /package/dist/{DatePicker → src/DatePicker}/constants.d.ts +0 -0
- /package/dist/{DatePicker → src/DatePicker}/index.d.ts +0 -0
- /package/dist/{DesktopDatePicker → src/DesktopDatePicker}/DesktopDatePicker.types.d.ts +0 -0
- /package/dist/{DesktopDatePicker → src/DesktopDatePicker}/index.d.ts +0 -0
- /package/dist/{DesktopDatePicker → src/DesktopDatePicker}/useGetDatePickerContent.d.ts +0 -0
- /package/dist/{DesktopDateTimePicker → src/DesktopDateTimePicker}/DesktopDateTimePicker.d.ts +0 -0
- /package/dist/{DesktopDateTimePicker → src/DesktopDateTimePicker}/DesktopDateTimePicker.types.d.ts +0 -0
- /package/dist/{DesktopDateTimePicker → src/DesktopDateTimePicker}/index.d.ts +0 -0
- /package/dist/{DesktopPicker → src/DesktopPicker}/DesktopPicker.d.ts +0 -0
- /package/dist/{DesktopPicker → src/DesktopPicker}/DesktopPicker.types.d.ts +0 -0
- /package/dist/{DesktopPicker → src/DesktopPicker}/index.d.ts +0 -0
- /package/dist/{DesktopPicker → src/DesktopPicker}/utils/calcAfterMounted.d.ts +0 -0
- /package/dist/{DesktopPicker → src/DesktopPicker}/utils/calcAfterMounted.miniapp.d.ts +0 -0
- /package/dist/{DesktopTimePicker → src/DesktopTimePicker}/DesktopTimePicker.d.ts +0 -0
- /package/dist/{DesktopTimePicker → src/DesktopTimePicker}/DesktopTimePicker.types.d.ts +0 -0
- /package/dist/{DesktopTimePicker → src/DesktopTimePicker}/DesktopTimePickerList.d.ts +0 -0
- /package/dist/{DesktopTimePicker → src/DesktopTimePicker}/index.d.ts +0 -0
- /package/dist/{DesktopTimePicker → src/DesktopTimePicker}/useGetTimePickerContent.d.ts +0 -0
- /package/dist/{DesktopTimePicker → src/DesktopTimePicker}/utils/scrollUtil.d.ts +0 -0
- /package/dist/{DesktopTimePicker → src/DesktopTimePicker}/utils/scrollUtil.miniapp.d.ts +0 -0
- /package/dist/{DesktopTimePicker → src/DesktopTimePicker}/utils/utils.d.ts +0 -0
- /package/dist/{Divider → src/Divider}/Divider.types.d.ts +0 -0
- /package/dist/{Divider → src/Divider}/index.d.ts +0 -0
- /package/dist/{Drawer → src/Drawer}/Drawer.types.d.ts +0 -0
- /package/dist/{Drawer → src/Drawer}/index.d.ts +0 -0
- /package/dist/{Fade → src/Fade}/Fade.d.ts +0 -0
- /package/dist/{Fade → src/Fade}/Fade.miniapp.d.ts +0 -0
- /package/dist/{Fade → src/Fade}/Fade.types.d.ts +0 -0
- /package/dist/{Fade → src/Fade}/index.d.ts +0 -0
- /package/dist/{IconButton → src/IconButton}/index.d.ts +0 -0
- /package/dist/{Image → src/Image}/Image.d.ts +0 -0
- /package/dist/{Image → src/Image}/Image.types.d.ts +0 -0
- /package/dist/{Image → src/Image}/index.d.ts +0 -0
- /package/dist/{Input → src/Input}/Input.types.d.ts +0 -0
- /package/dist/{Input → src/Input}/index.d.ts +0 -0
- /package/dist/{ItemSelector → src/ItemSelector}/ItemSelector.d.ts +0 -0
- /package/{es/ItemSelector/ItemSelector.d.ts → dist/src/ItemSelector/ItemSelector.miniapp.d.ts} +0 -0
- /package/dist/{ItemSelector → src/ItemSelector}/Selector/index.d.ts +0 -0
- /package/dist/{ItemSelector → src/ItemSelector}/index.d.ts +0 -0
- /package/dist/{List → src/List}/List.d.ts +0 -0
- /package/dist/{List → src/List}/List.types.d.ts +0 -0
- /package/dist/{List → src/List}/ListContext.d.ts +0 -0
- /package/dist/{List → src/List}/ListItem.d.ts +0 -0
- /package/dist/{List → src/List}/ListItem.types.d.ts +0 -0
- /package/dist/{List → src/List}/ListItemContent.d.ts +0 -0
- /package/dist/{List → src/List}/ListItemContent.types.d.ts +0 -0
- /package/dist/{List → src/List}/ListItemExtra.d.ts +0 -0
- /package/dist/{List → src/List}/ListItemExtra.types.d.ts +0 -0
- /package/dist/{List → src/List}/ListItemFooter.d.ts +0 -0
- /package/dist/{List → src/List}/ListItemFooter.types.d.ts +0 -0
- /package/dist/{List → src/List}/ListItemHeader.d.ts +0 -0
- /package/dist/{List → src/List}/ListItemHeader.types.d.ts +0 -0
- /package/dist/{List → src/List}/index.d.ts +0 -0
- /package/dist/{Loading → src/Loading}/Loading.types.d.ts +0 -0
- /package/dist/{Loading → src/Loading}/index.d.ts +0 -0
- /package/dist/{NavBar → src/NavBar}/NavBar.types.d.ts +0 -0
- /package/dist/{NavBar → src/NavBar}/index.d.ts +0 -0
- /package/dist/{Picker → src/Picker}/Picker.d.ts +0 -0
- /package/dist/{Picker → src/Picker}/PickerPanel.d.ts +0 -0
- /package/dist/{Picker → src/Picker}/index.d.ts +0 -0
- /package/dist/{Popover → src/Popover}/index.d.ts +0 -0
- /package/dist/{Portal → src/Portal}/Portal.d.ts +0 -0
- /package/dist/{Portal → src/Portal}/Portal.miniapp.d.ts +0 -0
- /package/dist/{Portal → src/Portal}/PortalCore.d.ts +0 -0
- /package/dist/{Portal → src/Portal}/index.d.ts +0 -0
- /package/dist/{Progress → src/Progress}/index.d.ts +0 -0
- /package/dist/{Radio → src/Radio}/Radio.types.d.ts +0 -0
- /package/dist/{Radio → src/Radio}/RadioButtonIcon.d.ts +0 -0
- /package/dist/{Radio → src/Radio}/RadioContext.d.ts +0 -0
- /package/dist/{Radio → src/Radio}/index.d.ts +0 -0
- /package/dist/{Rating → src/Rating}/Rating.types.d.ts +0 -0
- /package/dist/{Rating → src/Rating}/index.d.ts +0 -0
- /package/dist/{ScrollView → src/ScrollView}/ScrollView.miniapp.d.ts +0 -0
- /package/dist/{ScrollView → src/ScrollView}/index.d.ts +0 -0
- /package/dist/{Select → src/Select}/index.d.ts +0 -0
- /package/dist/{Skeleton → src/Skeleton}/Skeleton.types.d.ts +0 -0
- /package/dist/{Skeleton → src/Skeleton}/index.d.ts +0 -0
- /package/dist/{Slide → src/Slide}/Slide.d.ts +0 -0
- /package/dist/{Slide → src/Slide}/Slide.miniapp.d.ts +0 -0
- /package/dist/{Slide → src/Slide}/Slide.types.d.ts +0 -0
- /package/dist/{Slide → src/Slide}/index.d.ts +0 -0
- /package/dist/{Slider → src/Slider}/Slider.types.d.ts +0 -0
- /package/dist/{Slider → src/Slider}/index.d.ts +0 -0
- /package/dist/{Slider → src/Slider}/utils.d.ts +0 -0
- /package/dist/{Stack → src/Stack}/Stack.types.d.ts +0 -0
- /package/{es → dist/src}/Stack/demo/StackDemo.d.ts +0 -0
- /package/dist/{Stack → src/Stack}/index.d.ts +0 -0
- /package/dist/{Steps → src/Steps}/Step.d.ts +0 -0
- /package/dist/{Steps → src/Steps}/Step.types.d.ts +0 -0
- /package/dist/{Steps → src/Steps}/Steps.types.d.ts +0 -0
- /package/dist/{Steps → src/Steps}/StepsContext.d.ts +0 -0
- /package/dist/{Steps → src/Steps}/index.d.ts +0 -0
- /package/dist/{SwipeAction → src/SwipeAction}/SwipeAction.d.ts +0 -0
- /package/dist/{SwipeAction → src/SwipeAction}/SwipeAction.types.d.ts +0 -0
- /package/dist/{SwipeAction → src/SwipeAction}/SwipeActionItem.d.ts +0 -0
- /package/dist/{SwipeAction → src/SwipeAction}/constants.d.ts +0 -0
- /package/dist/{SwipeAction → src/SwipeAction}/index.d.ts +0 -0
- /package/dist/{Swiper → src/Swiper}/Swiper.miniapp.d.ts +0 -0
- /package/dist/{Swiper → src/Swiper}/Swiper.types.d.ts +0 -0
- /package/dist/{Swiper → src/Swiper}/SwiperItem.d.ts +0 -0
- /package/dist/{Swiper → src/Swiper}/SwiperItem.miniapp.d.ts +0 -0
- /package/dist/{Swiper → src/Swiper}/index.d.ts +0 -0
- /package/dist/{Switch → src/Switch}/index.d.ts +0 -0
- /package/dist/{TabBar → src/TabBar}/TabBar.d.ts +0 -0
- /package/dist/{TabBar → src/TabBar}/TabBarItem.d.ts +0 -0
- /package/dist/{TabBar → src/TabBar}/index.d.ts +0 -0
- /package/dist/{Tabs → src/Tabs}/Tab.d.ts +0 -0
- /package/dist/{Tabs → src/Tabs}/TabPanel.types.d.ts +0 -0
- /package/dist/{Tabs → src/Tabs}/Tabs.d.ts +0 -0
- /package/dist/{Tabs → src/Tabs}/index.d.ts +0 -0
- /package/dist/{Tabs → src/Tabs}/utils/scroll.d.ts +0 -0
- /package/dist/{Tag → src/Tag}/Tag.d.ts +0 -0
- /package/dist/{Tag → src/Tag}/TagGroup.types.d.ts +0 -0
- /package/dist/{Tag → src/Tag}/index.d.ts +0 -0
- /package/dist/{TextArea → src/TextArea}/index.d.ts +0 -0
- /package/dist/{ThemeProvider → src/ThemeProvider}/ThemeProvider.d.ts +0 -0
- /package/dist/{ThemeProvider → src/ThemeProvider}/hooks/ThemeContext.d.ts +0 -0
- /package/dist/{ThemeProvider → src/ThemeProvider}/hooks/createTheme.d.ts +0 -0
- /package/dist/{ThemeProvider → src/ThemeProvider}/hooks/index.d.ts +0 -0
- /package/dist/{ThemeProvider → src/ThemeProvider}/hooks/useTheme.d.ts +0 -0
- /package/dist/{ThemeProvider → src/ThemeProvider}/index.d.ts +0 -0
- /package/dist/{ThemeProvider → src/ThemeProvider}/utils/index.d.ts +0 -0
- /package/dist/{Toast → src/Toast}/index.d.ts +0 -0
- /package/dist/{Tooltip → src/Tooltip}/index.d.ts +0 -0
- /package/dist/{Transition → src/Transition}/Transition.d.ts +0 -0
- /package/dist/{Transition → src/Transition}/Transition.miniapp.d.ts +0 -0
- /package/dist/{Transition → src/Transition}/Transition.types.d.ts +0 -0
- /package/dist/{Transition → src/Transition}/TransitionCore.d.ts +0 -0
- /package/dist/{Transition → src/Transition}/index.d.ts +0 -0
- /package/dist/{locales → src/locales}/en-US.d.ts +0 -0
- /package/dist/{locales → src/locales}/hooks/useLocaleText.d.ts +0 -0
- /package/dist/{locales → src/locales}/index.d.ts +0 -0
- /package/dist/{locales → src/locales}/zh-CN.d.ts +0 -0
- /package/dist/{locales → src/locales}/zh-TW.d.ts +0 -0
- /package/es/ItemSelector/{ItemSelector.css → index.css} +0 -0
- /package/es/ScrollView/{ScrollView.css → index.css} +0 -0
- /package/es/Stack/{Stack.css → index.css} +0 -0
- /package/es/{ActionSheet → src/ActionSheet}/ActionSheet.d.ts +0 -0
- /package/es/{ActionSheet → src/ActionSheet}/ActionSheet.types.d.ts +0 -0
- /package/es/{ActionSheet → src/ActionSheet}/ActionSheetContext.d.ts +0 -0
- /package/es/{ActionSheet → src/ActionSheet}/ActionSheetItem.d.ts +0 -0
- /package/es/{ActionSheet → src/ActionSheet}/index.d.ts +0 -0
- /package/es/{Alert → src/Alert}/Alert.d.ts +0 -0
- /package/es/{Alert → src/Alert}/index.d.ts +0 -0
- /package/es/{Avatar → src/Avatar}/Avatar.d.ts +0 -0
- /package/es/{Avatar → src/Avatar}/Avatar.types.d.ts +0 -0
- /package/es/{Avatar → src/Avatar}/AvatarGroup.d.ts +0 -0
- /package/es/{Avatar → src/Avatar}/AvatarGroup.types.d.ts +0 -0
- /package/es/{Avatar → src/Avatar}/index.d.ts +0 -0
- /package/es/{Backdrop → src/Backdrop}/index.d.ts +0 -0
- /package/es/{Badge → src/Badge}/index.d.ts +0 -0
- /package/es/{Breadcrumb → src/Breadcrumb}/Breadcrumb.types.d.ts +0 -0
- /package/es/{Breadcrumb → src/Breadcrumb}/BreadcrumbItem.d.ts +0 -0
- /package/es/{Breadcrumb → src/Breadcrumb}/index.d.ts +0 -0
- /package/es/{Button → src/Button}/index.d.ts +0 -0
- /package/es/{Calendar → src/Calendar}/index.d.ts +0 -0
- /package/es/{Card → src/Card}/Card.d.ts +0 -0
- /package/es/{Card → src/Card}/Card.types.d.ts +0 -0
- /package/es/{Card → src/Card}/CardContent.d.ts +0 -0
- /package/es/{Card → src/Card}/CardContent.types.d.ts +0 -0
- /package/es/{Card → src/Card}/CardFooter.d.ts +0 -0
- /package/es/{Card → src/Card}/CardFooter.types.d.ts +0 -0
- /package/es/{Card → src/Card}/CardHeader.d.ts +0 -0
- /package/es/{Card → src/Card}/CardHeader.types.d.ts +0 -0
- /package/es/{Card → src/Card}/index.d.ts +0 -0
- /package/es/{Checkbox → src/Checkbox}/Checkbox.types.d.ts +0 -0
- /package/es/{Checkbox → src/Checkbox}/CheckboxContext.d.ts +0 -0
- /package/es/{Checkbox → src/Checkbox}/index.d.ts +0 -0
- /package/es/{CitySelector → src/CitySelector}/Selector/index.d.ts +0 -0
- /package/es/{CitySelector → src/CitySelector}/index.d.ts +0 -0
- /package/es/{Collapse → src/Collapse}/Collapse.types.d.ts +0 -0
- /package/es/{Collapse → src/Collapse}/index.d.ts +0 -0
- /package/es/{CollapsePanel → src/CollapsePanel}/CollapsePanel.types.d.ts +0 -0
- /package/es/{CollapsePanel → src/CollapsePanel}/CollapsePanelItem.d.ts +0 -0
- /package/es/{CollapsePanel → src/CollapsePanel}/index.d.ts +0 -0
- /package/es/{Countdown → src/Countdown}/index.d.ts +0 -0
- /package/es/{Countdown → src/Countdown}/useCountdown.d.ts +0 -0
- /package/es/{Countdown → src/Countdown}/utils.d.ts +0 -0
- /package/es/{DatePicker → src/DatePicker}/DatePicker.d.ts +0 -0
- /package/es/{DatePicker → src/DatePicker}/DatePicker.types.d.ts +0 -0
- /package/es/{DatePicker → src/DatePicker}/constants.d.ts +0 -0
- /package/es/{DatePicker → src/DatePicker}/index.d.ts +0 -0
- /package/es/{DesktopDatePicker → src/DesktopDatePicker}/DesktopDatePicker.types.d.ts +0 -0
- /package/es/{DesktopDatePicker → src/DesktopDatePicker}/index.d.ts +0 -0
- /package/es/{DesktopDatePicker → src/DesktopDatePicker}/useGetDatePickerContent.d.ts +0 -0
- /package/es/{DesktopDateTimePicker → src/DesktopDateTimePicker}/DesktopDateTimePicker.d.ts +0 -0
- /package/es/{DesktopDateTimePicker → src/DesktopDateTimePicker}/DesktopDateTimePicker.types.d.ts +0 -0
- /package/es/{DesktopDateTimePicker → src/DesktopDateTimePicker}/index.d.ts +0 -0
- /package/es/{DesktopPicker → src/DesktopPicker}/DesktopPicker.d.ts +0 -0
- /package/es/{DesktopPicker → src/DesktopPicker}/DesktopPicker.types.d.ts +0 -0
- /package/es/{DesktopPicker → src/DesktopPicker}/index.d.ts +0 -0
- /package/es/{DesktopPicker → src/DesktopPicker}/utils/calcAfterMounted.d.ts +0 -0
- /package/es/{DesktopPicker → src/DesktopPicker}/utils/calcAfterMounted.miniapp.d.ts +0 -0
- /package/es/{DesktopTimePicker → src/DesktopTimePicker}/DesktopTimePicker.d.ts +0 -0
- /package/es/{DesktopTimePicker → src/DesktopTimePicker}/DesktopTimePicker.types.d.ts +0 -0
- /package/es/{DesktopTimePicker → src/DesktopTimePicker}/DesktopTimePickerList.d.ts +0 -0
- /package/es/{DesktopTimePicker → src/DesktopTimePicker}/index.d.ts +0 -0
- /package/es/{DesktopTimePicker → src/DesktopTimePicker}/useGetTimePickerContent.d.ts +0 -0
- /package/es/{DesktopTimePicker → src/DesktopTimePicker}/utils/scrollUtil.d.ts +0 -0
- /package/es/{DesktopTimePicker → src/DesktopTimePicker}/utils/scrollUtil.miniapp.d.ts +0 -0
- /package/es/{DesktopTimePicker → src/DesktopTimePicker}/utils/utils.d.ts +0 -0
- /package/es/{Divider → src/Divider}/Divider.types.d.ts +0 -0
- /package/es/{Divider → src/Divider}/index.d.ts +0 -0
- /package/es/{Drawer → src/Drawer}/Drawer.types.d.ts +0 -0
- /package/es/{Drawer → src/Drawer}/index.d.ts +0 -0
- /package/es/{Fade → src/Fade}/Fade.d.ts +0 -0
- /package/es/{Fade → src/Fade}/Fade.miniapp.d.ts +0 -0
- /package/es/{Fade → src/Fade}/Fade.types.d.ts +0 -0
- /package/es/{Fade → src/Fade}/index.d.ts +0 -0
- /package/es/{IconButton → src/IconButton}/index.d.ts +0 -0
- /package/es/{Image → src/Image}/Image.d.ts +0 -0
- /package/es/{Image → src/Image}/Image.types.d.ts +0 -0
- /package/es/{Image → src/Image}/index.d.ts +0 -0
- /package/es/{Input → src/Input}/Input.types.d.ts +0 -0
- /package/es/{Input → src/Input}/index.d.ts +0 -0
- /package/es/{ItemSelector → src/ItemSelector}/Selector/index.d.ts +0 -0
- /package/es/{ItemSelector → src/ItemSelector}/index.d.ts +0 -0
- /package/es/{List → src/List}/List.d.ts +0 -0
- /package/es/{List → src/List}/List.types.d.ts +0 -0
- /package/es/{List → src/List}/ListContext.d.ts +0 -0
- /package/es/{List → src/List}/ListItem.d.ts +0 -0
- /package/es/{List → src/List}/ListItem.types.d.ts +0 -0
- /package/es/{List → src/List}/ListItemContent.d.ts +0 -0
- /package/es/{List → src/List}/ListItemContent.types.d.ts +0 -0
- /package/es/{List → src/List}/ListItemExtra.d.ts +0 -0
- /package/es/{List → src/List}/ListItemExtra.types.d.ts +0 -0
- /package/es/{List → src/List}/ListItemFooter.d.ts +0 -0
- /package/es/{List → src/List}/ListItemFooter.types.d.ts +0 -0
- /package/es/{List → src/List}/ListItemHeader.d.ts +0 -0
- /package/es/{List → src/List}/ListItemHeader.types.d.ts +0 -0
- /package/es/{List → src/List}/index.d.ts +0 -0
- /package/es/{Loading → src/Loading}/Loading.types.d.ts +0 -0
- /package/es/{Loading → src/Loading}/index.d.ts +0 -0
- /package/es/{NavBar → src/NavBar}/NavBar.types.d.ts +0 -0
- /package/es/{NavBar → src/NavBar}/index.d.ts +0 -0
- /package/es/{Picker → src/Picker}/Picker.d.ts +0 -0
- /package/es/{Picker → src/Picker}/PickerPanel.d.ts +0 -0
- /package/es/{Picker → src/Picker}/index.d.ts +0 -0
- /package/es/{Popover → src/Popover}/index.d.ts +0 -0
- /package/es/{Portal → src/Portal}/Portal.d.ts +0 -0
- /package/es/{Portal → src/Portal}/Portal.miniapp.d.ts +0 -0
- /package/es/{Portal → src/Portal}/PortalCore.d.ts +0 -0
- /package/es/{Portal → src/Portal}/index.d.ts +0 -0
- /package/es/{Progress → src/Progress}/index.d.ts +0 -0
- /package/es/{Radio → src/Radio}/Radio.types.d.ts +0 -0
- /package/es/{Radio → src/Radio}/RadioButtonIcon.d.ts +0 -0
- /package/es/{Radio → src/Radio}/RadioContext.d.ts +0 -0
- /package/es/{Radio → src/Radio}/index.d.ts +0 -0
- /package/es/{Rating → src/Rating}/Rating.types.d.ts +0 -0
- /package/es/{Rating → src/Rating}/index.d.ts +0 -0
- /package/es/{ScrollView → src/ScrollView}/ScrollView.miniapp.d.ts +0 -0
- /package/es/{ScrollView → src/ScrollView}/index.d.ts +0 -0
- /package/es/{Select → src/Select}/index.d.ts +0 -0
- /package/es/{Skeleton → src/Skeleton}/Skeleton.types.d.ts +0 -0
- /package/es/{Skeleton → src/Skeleton}/index.d.ts +0 -0
- /package/es/{Slide → src/Slide}/Slide.d.ts +0 -0
- /package/es/{Slide → src/Slide}/Slide.miniapp.d.ts +0 -0
- /package/es/{Slide → src/Slide}/Slide.types.d.ts +0 -0
- /package/es/{Slide → src/Slide}/index.d.ts +0 -0
- /package/es/{Slider → src/Slider}/Slider.types.d.ts +0 -0
- /package/es/{Slider → src/Slider}/index.d.ts +0 -0
- /package/es/{Slider → src/Slider}/utils.d.ts +0 -0
- /package/es/{Stack → src/Stack}/Stack.types.d.ts +0 -0
- /package/es/{Stack → src/Stack}/index.d.ts +0 -0
- /package/es/{Steps → src/Steps}/Step.d.ts +0 -0
- /package/es/{Steps → src/Steps}/Step.types.d.ts +0 -0
- /package/es/{Steps → src/Steps}/Steps.types.d.ts +0 -0
- /package/es/{Steps → src/Steps}/StepsContext.d.ts +0 -0
- /package/es/{Steps → src/Steps}/index.d.ts +0 -0
- /package/es/{SwipeAction → src/SwipeAction}/SwipeAction.d.ts +0 -0
- /package/es/{SwipeAction → src/SwipeAction}/SwipeAction.types.d.ts +0 -0
- /package/es/{SwipeAction → src/SwipeAction}/SwipeActionItem.d.ts +0 -0
- /package/es/{SwipeAction → src/SwipeAction}/constants.d.ts +0 -0
- /package/es/{SwipeAction → src/SwipeAction}/index.d.ts +0 -0
- /package/es/{Swiper → src/Swiper}/Swiper.miniapp.d.ts +0 -0
- /package/es/{Swiper → src/Swiper}/Swiper.types.d.ts +0 -0
- /package/es/{Swiper → src/Swiper}/SwiperItem.d.ts +0 -0
- /package/es/{Swiper → src/Swiper}/SwiperItem.miniapp.d.ts +0 -0
- /package/es/{Swiper → src/Swiper}/index.d.ts +0 -0
- /package/es/{Switch → src/Switch}/index.d.ts +0 -0
- /package/es/{TabBar → src/TabBar}/TabBar.d.ts +0 -0
- /package/es/{TabBar → src/TabBar}/TabBarItem.d.ts +0 -0
- /package/es/{TabBar → src/TabBar}/index.d.ts +0 -0
- /package/es/{Tabs → src/Tabs}/Tab.d.ts +0 -0
- /package/es/{Tabs → src/Tabs}/TabPanel.types.d.ts +0 -0
- /package/es/{Tabs → src/Tabs}/Tabs.d.ts +0 -0
- /package/es/{Tabs → src/Tabs}/index.d.ts +0 -0
- /package/es/{Tabs → src/Tabs}/utils/scroll.d.ts +0 -0
- /package/es/{Tag → src/Tag}/Tag.d.ts +0 -0
- /package/es/{Tag → src/Tag}/TagGroup.types.d.ts +0 -0
- /package/es/{Tag → src/Tag}/index.d.ts +0 -0
- /package/es/{TextArea → src/TextArea}/index.d.ts +0 -0
- /package/es/{ThemeProvider → src/ThemeProvider}/ThemeProvider.d.ts +0 -0
- /package/es/{ThemeProvider → src/ThemeProvider}/hooks/ThemeContext.d.ts +0 -0
- /package/es/{ThemeProvider → src/ThemeProvider}/hooks/createTheme.d.ts +0 -0
- /package/es/{ThemeProvider → src/ThemeProvider}/hooks/index.d.ts +0 -0
- /package/es/{ThemeProvider → src/ThemeProvider}/hooks/useTheme.d.ts +0 -0
- /package/es/{ThemeProvider → src/ThemeProvider}/index.d.ts +0 -0
- /package/es/{ThemeProvider → src/ThemeProvider}/utils/index.d.ts +0 -0
- /package/es/{Toast → src/Toast}/index.d.ts +0 -0
- /package/es/{Tooltip → src/Tooltip}/index.d.ts +0 -0
- /package/es/{Transition → src/Transition}/Transition.d.ts +0 -0
- /package/es/{Transition → src/Transition}/Transition.miniapp.d.ts +0 -0
- /package/es/{Transition → src/Transition}/Transition.types.d.ts +0 -0
- /package/es/{Transition → src/Transition}/TransitionCore.d.ts +0 -0
- /package/es/{Transition → src/Transition}/index.d.ts +0 -0
- /package/es/{locales → src/locales}/en-US.d.ts +0 -0
- /package/es/{locales → src/locales}/hooks/useLocaleText.d.ts +0 -0
- /package/es/{locales → src/locales}/index.d.ts +0 -0
- /package/es/{locales → src/locales}/zh-CN.d.ts +0 -0
- /package/es/{locales → src/locales}/zh-TW.d.ts +0 -0
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __export = (target, all) => {
|
|
25
|
+
for (var name in all)
|
|
26
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
27
|
+
};
|
|
28
|
+
var __copyProps = (to, from, except, desc) => {
|
|
29
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
30
|
+
for (let key of __getOwnPropNames(from))
|
|
31
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
32
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
33
|
+
}
|
|
34
|
+
return to;
|
|
35
|
+
};
|
|
36
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
37
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
38
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
39
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
40
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
41
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
42
|
+
mod
|
|
43
|
+
));
|
|
44
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
45
|
+
var __async = (__this, __arguments, generator) => {
|
|
46
|
+
return new Promise((resolve, reject) => {
|
|
47
|
+
var fulfilled = (value) => {
|
|
48
|
+
try {
|
|
49
|
+
step(generator.next(value));
|
|
50
|
+
} catch (e) {
|
|
51
|
+
reject(e);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
var rejected = (value) => {
|
|
55
|
+
try {
|
|
56
|
+
step(generator.throw(value));
|
|
57
|
+
} catch (e) {
|
|
58
|
+
reject(e);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
62
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
var useTooltip_exports = {};
|
|
66
|
+
__export(useTooltip_exports, {
|
|
67
|
+
useTooltip: () => useTooltip
|
|
68
|
+
});
|
|
69
|
+
module.exports = __toCommonJS(useTooltip_exports);
|
|
70
|
+
var import_react = __toESM(require("react"));
|
|
71
|
+
var import_utils = require("@bifrostui/utils");
|
|
72
|
+
function useTooltip(parameters) {
|
|
73
|
+
const {
|
|
74
|
+
defaultOpen = false,
|
|
75
|
+
open,
|
|
76
|
+
offset,
|
|
77
|
+
placement = "top",
|
|
78
|
+
trigger = "click",
|
|
79
|
+
onOpenChange,
|
|
80
|
+
autoFocus = false,
|
|
81
|
+
closeOnEscape = false,
|
|
82
|
+
children,
|
|
83
|
+
rootRef
|
|
84
|
+
} = parameters;
|
|
85
|
+
const controlByUser = typeof open !== "undefined";
|
|
86
|
+
const { direction, location = "center" } = (0, import_utils.parsePlacement)(placement);
|
|
87
|
+
const childrenRef = (0, import_react.useRef)();
|
|
88
|
+
const [openStatus, setOpenStatus] = (0, import_react.useState)(defaultOpen);
|
|
89
|
+
const [arrowDirection, setArrowDirection] = (0, import_react.useState)(direction);
|
|
90
|
+
const [arrowLocation, setArrowLocation] = (0, import_react.useState)(location);
|
|
91
|
+
const [toolStyles, setToolStyles] = (0, import_react.useState)({});
|
|
92
|
+
const tipRef = (0, import_react.useRef)(null);
|
|
93
|
+
const tooltipId = (0, import_utils.useUniqueId)();
|
|
94
|
+
(0, import_react.useEffect)(() => {
|
|
95
|
+
setArrowDirection(direction);
|
|
96
|
+
setArrowLocation(location);
|
|
97
|
+
}, [direction, location]);
|
|
98
|
+
const isOpen = open || openStatus;
|
|
99
|
+
const clearRef = (status) => {
|
|
100
|
+
if (status === false) {
|
|
101
|
+
tipRef.current = null;
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
const changeOpenStatus = (event, status) => {
|
|
105
|
+
if (controlByUser)
|
|
106
|
+
return;
|
|
107
|
+
clearRef(status);
|
|
108
|
+
setOpenStatus(status);
|
|
109
|
+
onOpenChange == null ? void 0 : onOpenChange(event, { open: status });
|
|
110
|
+
};
|
|
111
|
+
const triggerClick = (event) => {
|
|
112
|
+
event.stopPropagation();
|
|
113
|
+
const targetStatus = !openStatus;
|
|
114
|
+
changeOpenStatus(event, targetStatus);
|
|
115
|
+
};
|
|
116
|
+
const hideTooltip = (event) => {
|
|
117
|
+
changeOpenStatus(event, false);
|
|
118
|
+
};
|
|
119
|
+
const showTooltip = (event) => {
|
|
120
|
+
changeOpenStatus(event, true);
|
|
121
|
+
};
|
|
122
|
+
const handleKeyDown = (0, import_react.useCallback)(
|
|
123
|
+
(event) => {
|
|
124
|
+
if (closeOnEscape && event.key === "Escape" && isOpen) {
|
|
125
|
+
event.preventDefault();
|
|
126
|
+
event.stopPropagation();
|
|
127
|
+
hideTooltip(event);
|
|
128
|
+
if (childrenRef.current && "focus" in childrenRef.current) {
|
|
129
|
+
childrenRef.current.focus();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
[closeOnEscape, isOpen, hideTooltip]
|
|
134
|
+
);
|
|
135
|
+
(0, import_react.useEffect)(() => {
|
|
136
|
+
if (isOpen && autoFocus && tipRef.current) {
|
|
137
|
+
const timer = setTimeout(() => {
|
|
138
|
+
if (tipRef.current && "focus" in tipRef.current) {
|
|
139
|
+
tipRef.current.focus();
|
|
140
|
+
}
|
|
141
|
+
}, 0);
|
|
142
|
+
return () => clearTimeout(timer);
|
|
143
|
+
}
|
|
144
|
+
return void 0;
|
|
145
|
+
}, [isOpen, autoFocus]);
|
|
146
|
+
(0, import_react.useEffect)(() => {
|
|
147
|
+
if (!controlByUser)
|
|
148
|
+
return;
|
|
149
|
+
setOpenStatus(open != null ? open : false);
|
|
150
|
+
clearRef(open != null ? open : false);
|
|
151
|
+
}, [open, controlByUser]);
|
|
152
|
+
(0, import_react.useEffect)(() => {
|
|
153
|
+
if (!openStatus) {
|
|
154
|
+
setToolStyles({
|
|
155
|
+
visibility: "hidden"
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}, [openStatus]);
|
|
159
|
+
const shouldListenGlobalClick = (0, import_react.useCallback)(() => {
|
|
160
|
+
if (typeof trigger === "string") {
|
|
161
|
+
return trigger === "click";
|
|
162
|
+
}
|
|
163
|
+
if (Array.isArray(trigger)) {
|
|
164
|
+
return trigger.includes("click");
|
|
165
|
+
}
|
|
166
|
+
return true;
|
|
167
|
+
}, [trigger]);
|
|
168
|
+
const clickEventHandler = (0, import_react.useCallback)(
|
|
169
|
+
(event) => {
|
|
170
|
+
if (!shouldListenGlobalClick()) {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
hideTooltip(event);
|
|
174
|
+
},
|
|
175
|
+
[shouldListenGlobalClick, hideTooltip]
|
|
176
|
+
);
|
|
177
|
+
const onMounted = (0, import_utils.throttle)(() => __async(this, null, function* () {
|
|
178
|
+
if (!tipRef.current)
|
|
179
|
+
return;
|
|
180
|
+
const {
|
|
181
|
+
direction: newParsedDirection,
|
|
182
|
+
location: newParsedLocation = "center"
|
|
183
|
+
} = (0, import_utils.parsePlacement)(placement);
|
|
184
|
+
const result = yield (0, import_utils.getStylesAndLocation)({
|
|
185
|
+
childrenRef,
|
|
186
|
+
arrowDirection: newParsedDirection,
|
|
187
|
+
arrowLocation: newParsedLocation,
|
|
188
|
+
offsetSpacing: offset || 0,
|
|
189
|
+
tipRef
|
|
190
|
+
});
|
|
191
|
+
if (!result)
|
|
192
|
+
return;
|
|
193
|
+
const { styles, newArrowDirection, newArrowLocation } = result;
|
|
194
|
+
if (newArrowDirection !== arrowDirection) {
|
|
195
|
+
setArrowDirection(newArrowDirection);
|
|
196
|
+
}
|
|
197
|
+
if (newArrowLocation !== arrowLocation) {
|
|
198
|
+
setArrowLocation(newArrowLocation);
|
|
199
|
+
}
|
|
200
|
+
setToolStyles(styles);
|
|
201
|
+
}), 100);
|
|
202
|
+
(0, import_react.useEffect)(() => {
|
|
203
|
+
const bindEvent = () => {
|
|
204
|
+
if (!openStatus)
|
|
205
|
+
return;
|
|
206
|
+
if (!controlByUser && shouldListenGlobalClick() && !import_utils.isMini) {
|
|
207
|
+
document.addEventListener("click", clickEventHandler);
|
|
208
|
+
}
|
|
209
|
+
if (!import_utils.isMini) {
|
|
210
|
+
window.addEventListener("resize", onMounted);
|
|
211
|
+
}
|
|
212
|
+
if (isOpen && !import_utils.isMini) {
|
|
213
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
const unbindEvent = () => {
|
|
217
|
+
if (!controlByUser && shouldListenGlobalClick() && !import_utils.isMini) {
|
|
218
|
+
document.removeEventListener("click", clickEventHandler);
|
|
219
|
+
}
|
|
220
|
+
if (!import_utils.isMini) {
|
|
221
|
+
window.removeEventListener("resize", onMounted);
|
|
222
|
+
}
|
|
223
|
+
if (!import_utils.isMini) {
|
|
224
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
bindEvent();
|
|
228
|
+
return () => {
|
|
229
|
+
unbindEvent();
|
|
230
|
+
};
|
|
231
|
+
}, [
|
|
232
|
+
openStatus,
|
|
233
|
+
controlByUser,
|
|
234
|
+
shouldListenGlobalClick,
|
|
235
|
+
clickEventHandler,
|
|
236
|
+
onMounted,
|
|
237
|
+
isOpen,
|
|
238
|
+
handleKeyDown
|
|
239
|
+
]);
|
|
240
|
+
const tooltipRef = (0, import_utils.useForkRef)(tipRef, rootRef);
|
|
241
|
+
const getTooltipProps = (0, import_react.useCallback)(
|
|
242
|
+
(otherProps = {}) => {
|
|
243
|
+
return __spreadValues({
|
|
244
|
+
id: tooltipId,
|
|
245
|
+
ref: tooltipRef,
|
|
246
|
+
tabIndex: autoFocus ? -1 : void 0
|
|
247
|
+
}, otherProps);
|
|
248
|
+
},
|
|
249
|
+
[tooltipId, tooltipRef, autoFocus]
|
|
250
|
+
);
|
|
251
|
+
const getChildProps = (0, import_react.useCallback)(() => {
|
|
252
|
+
var _a;
|
|
253
|
+
let triggerEventOption = {};
|
|
254
|
+
if (!controlByUser) {
|
|
255
|
+
triggerEventOption = (0, import_utils.triggerEventTransform)({
|
|
256
|
+
trigger,
|
|
257
|
+
click: triggerClick,
|
|
258
|
+
show: showTooltip,
|
|
259
|
+
hide: hideTooltip
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
const childProps = __spreadProps(__spreadValues({
|
|
263
|
+
ref: childrenRef
|
|
264
|
+
}, triggerEventOption), {
|
|
265
|
+
"aria-describedby": isOpen ? tooltipId : void 0
|
|
266
|
+
});
|
|
267
|
+
if (import_react.default.isValidElement(children)) {
|
|
268
|
+
const elementType = typeof children.type === "string" ? children.type : ((_a = children.type) == null ? void 0 : _a.displayName) || "";
|
|
269
|
+
const interactiveElements = [
|
|
270
|
+
"button",
|
|
271
|
+
"a",
|
|
272
|
+
"input",
|
|
273
|
+
"select",
|
|
274
|
+
"textarea"
|
|
275
|
+
];
|
|
276
|
+
const childElementProps = children.props;
|
|
277
|
+
const isInteractive = interactiveElements.includes(elementType.toLowerCase()) || (childElementProps == null ? void 0 : childElementProps.role) === "button" || (childElementProps == null ? void 0 : childElementProps.role) === "menuitem" || (childElementProps == null ? void 0 : childElementProps.role) === "tab" || (childElementProps == null ? void 0 : childElementProps.tabIndex) !== void 0;
|
|
278
|
+
if (isInteractive) {
|
|
279
|
+
childProps["aria-expanded"] = isOpen;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
return childProps;
|
|
283
|
+
}, [
|
|
284
|
+
controlByUser,
|
|
285
|
+
trigger,
|
|
286
|
+
triggerClick,
|
|
287
|
+
showTooltip,
|
|
288
|
+
hideTooltip,
|
|
289
|
+
isOpen,
|
|
290
|
+
tooltipId,
|
|
291
|
+
children
|
|
292
|
+
]);
|
|
293
|
+
const getPortalProps = (0, import_react.useCallback)(() => {
|
|
294
|
+
return {
|
|
295
|
+
onMounted
|
|
296
|
+
};
|
|
297
|
+
}, [onMounted]);
|
|
298
|
+
return {
|
|
299
|
+
getTooltipProps,
|
|
300
|
+
getChildProps,
|
|
301
|
+
getPortalProps,
|
|
302
|
+
tooltipRef,
|
|
303
|
+
isOpen,
|
|
304
|
+
toolStyles,
|
|
305
|
+
arrowDirection,
|
|
306
|
+
arrowLocation,
|
|
307
|
+
tooltipId
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
311
|
+
0 && (module.exports = {
|
|
312
|
+
useTooltip
|
|
313
|
+
});
|
|
@@ -89,17 +89,17 @@ const TransitionCore = (0, import_react.forwardRef)(
|
|
|
89
89
|
children,
|
|
90
90
|
mountOnEnter,
|
|
91
91
|
unmountOnExit,
|
|
92
|
-
enter,
|
|
93
|
-
exit,
|
|
92
|
+
enter = true,
|
|
93
|
+
exit = true,
|
|
94
94
|
timeout: _timeout,
|
|
95
|
-
delay: _delay,
|
|
95
|
+
delay: _delay = 0,
|
|
96
96
|
onEnter,
|
|
97
97
|
onEntering,
|
|
98
98
|
onEntered,
|
|
99
99
|
onExit,
|
|
100
100
|
onExiting,
|
|
101
101
|
onExited,
|
|
102
|
-
nextTick
|
|
102
|
+
nextTick = setTimeout
|
|
103
103
|
} = _a, childProps = __objRest(_a, [
|
|
104
104
|
"appear",
|
|
105
105
|
"in",
|
|
@@ -130,13 +130,16 @@ const TransitionCore = (0, import_react.forwardRef)(
|
|
|
130
130
|
});
|
|
131
131
|
const innerNodeRef = (0, import_react.useRef)();
|
|
132
132
|
const nodeRef = (0, import_utils.useForkRef)(innerNodeRef, ref);
|
|
133
|
-
const timeout = typeof _timeout === "object" ? __spreadValues({}, _timeout) : { enter: _timeout, exit: _timeout };
|
|
134
|
-
const delay = typeof _delay === "object" ? _delay : { enter: _delay, exit: _delay };
|
|
135
|
-
timeout.enter
|
|
136
|
-
|
|
133
|
+
const timeout = typeof _timeout === "object" ? __spreadValues({}, _timeout) : { enter: _timeout, exit: _timeout, appear: _timeout };
|
|
134
|
+
const delay = typeof _delay === "object" ? _delay : { enter: _delay, exit: _delay, appear: _delay };
|
|
135
|
+
if (timeout.enter !== void 0)
|
|
136
|
+
timeout.enter += delay.enter || 0;
|
|
137
|
+
if (timeout.exit !== void 0)
|
|
138
|
+
timeout.exit += delay.exit || 0;
|
|
139
|
+
if (timeout.appear !== void 0)
|
|
140
|
+
timeout.appear += delay.appear || 0;
|
|
137
141
|
const nextCallback = (0, import_react.useRef)(null);
|
|
138
142
|
const appearStatus = (0, import_react.useRef)(inProp && appear ? ENTERING : null);
|
|
139
|
-
const isFirstRender = (0, import_react.useRef)(false);
|
|
140
143
|
const cancelNextCallback = () => {
|
|
141
144
|
var _a2;
|
|
142
145
|
if (nextCallback.current !== null) {
|
|
@@ -193,7 +196,9 @@ const TransitionCore = (0, import_react.forwardRef)(
|
|
|
193
196
|
});
|
|
194
197
|
const performExit = () => __async(void 0, null, function* () {
|
|
195
198
|
if (!exit) {
|
|
196
|
-
safeSetState(
|
|
199
|
+
safeSetState(EXITED, () => __async(void 0, null, function* () {
|
|
200
|
+
if (unmountOnExit)
|
|
201
|
+
setStatus(UNMOUNTED);
|
|
197
202
|
yield onExited == null ? void 0 : onExited(innerNodeRef == null ? void 0 : innerNodeRef.current);
|
|
198
203
|
}));
|
|
199
204
|
return;
|
|
@@ -202,7 +207,9 @@ const TransitionCore = (0, import_react.forwardRef)(
|
|
|
202
207
|
safeSetState(EXITING, () => __async(void 0, null, function* () {
|
|
203
208
|
yield onExiting == null ? void 0 : onExiting(innerNodeRef == null ? void 0 : innerNodeRef.current);
|
|
204
209
|
onTransitionEnd(timeout.exit, () => {
|
|
205
|
-
safeSetState(
|
|
210
|
+
safeSetState(EXITED, () => __async(void 0, null, function* () {
|
|
211
|
+
if (unmountOnExit)
|
|
212
|
+
setStatus(UNMOUNTED);
|
|
206
213
|
yield onExited == null ? void 0 : onExited(innerNodeRef == null ? void 0 : innerNodeRef.current);
|
|
207
214
|
}));
|
|
208
215
|
});
|
|
@@ -212,6 +219,9 @@ const TransitionCore = (0, import_react.forwardRef)(
|
|
|
212
219
|
if (nextStatus !== null) {
|
|
213
220
|
cancelNextCallback();
|
|
214
221
|
if (nextStatus === ENTERING) {
|
|
222
|
+
if (unmountOnExit || mountOnEnter) {
|
|
223
|
+
forceReflow(innerNodeRef == null ? void 0 : innerNodeRef.current);
|
|
224
|
+
}
|
|
215
225
|
performEnter(mounting);
|
|
216
226
|
} else if (nextStatus === EXITING) {
|
|
217
227
|
performExit();
|
|
@@ -224,12 +234,7 @@ const TransitionCore = (0, import_react.forwardRef)(
|
|
|
224
234
|
cancelNextCallback();
|
|
225
235
|
};
|
|
226
236
|
}, []);
|
|
227
|
-
(0,
|
|
228
|
-
const isMounted = status !== UNMOUNTED;
|
|
229
|
-
if (!isFirstRender.current) {
|
|
230
|
-
isFirstRender.current = true;
|
|
231
|
-
return;
|
|
232
|
-
}
|
|
237
|
+
(0, import_utils.useDidMountEffect)(() => {
|
|
233
238
|
let nextStatus = null;
|
|
234
239
|
if (inProp) {
|
|
235
240
|
if (status !== ENTERING && status !== ENTERED) {
|
|
@@ -238,13 +243,13 @@ const TransitionCore = (0, import_react.forwardRef)(
|
|
|
238
243
|
} else if (status === ENTERING || status === ENTERED) {
|
|
239
244
|
nextStatus = EXITING;
|
|
240
245
|
}
|
|
241
|
-
if (
|
|
242
|
-
|
|
243
|
-
else
|
|
244
|
-
safeSetState(inProp ? "EXITED" : "ENTERED", () => {
|
|
245
|
-
forceReflow(innerNodeRef == null ? void 0 : innerNodeRef.current);
|
|
246
|
+
if (inProp && status === UNMOUNTED) {
|
|
247
|
+
safeSetState(EXITED, () => {
|
|
246
248
|
updateStatus(nextStatus, false);
|
|
247
249
|
});
|
|
250
|
+
} else {
|
|
251
|
+
updateStatus(nextStatus, false);
|
|
252
|
+
}
|
|
248
253
|
}, [inProp]);
|
|
249
254
|
if (status === UNMOUNTED)
|
|
250
255
|
return null;
|
|
@@ -254,9 +259,4 @@ const TransitionCore = (0, import_react.forwardRef)(
|
|
|
254
259
|
}
|
|
255
260
|
);
|
|
256
261
|
TransitionCore.displayName = "BuiTransitionCore";
|
|
257
|
-
TransitionCore.defaultProps = {
|
|
258
|
-
enter: true,
|
|
259
|
-
exit: true,
|
|
260
|
-
nextTick: setTimeout
|
|
261
|
-
};
|
|
262
262
|
var TransitionCore_default = TransitionCore;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __objRest = (source, exclude) => {
|
|
25
|
+
var target = {};
|
|
26
|
+
for (var prop in source)
|
|
27
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
if (source != null && __getOwnPropSymbols)
|
|
30
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
31
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
32
|
+
target[prop] = source[prop];
|
|
33
|
+
}
|
|
34
|
+
return target;
|
|
35
|
+
};
|
|
36
|
+
var __export = (target, all) => {
|
|
37
|
+
for (var name in all)
|
|
38
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
39
|
+
};
|
|
40
|
+
var __copyProps = (to, from, except, desc) => {
|
|
41
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
42
|
+
for (let key of __getOwnPropNames(from))
|
|
43
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
44
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
45
|
+
}
|
|
46
|
+
return to;
|
|
47
|
+
};
|
|
48
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
49
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
50
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
51
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
52
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
53
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
54
|
+
mod
|
|
55
|
+
));
|
|
56
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
57
|
+
var TransitionGroup_exports = {};
|
|
58
|
+
__export(TransitionGroup_exports, {
|
|
59
|
+
default: () => TransitionGroup_default
|
|
60
|
+
});
|
|
61
|
+
module.exports = __toCommonJS(TransitionGroup_exports);
|
|
62
|
+
var import_react = __toESM(require("react"));
|
|
63
|
+
var import_childMapping = require("./utils/childMapping");
|
|
64
|
+
const TransitionGroupContext = import_react.default.createContext(null);
|
|
65
|
+
const values = Object.values || ((obj) => Object.keys(obj).map((k) => obj[k]));
|
|
66
|
+
const TransitionGroup = (props) => {
|
|
67
|
+
const _a = props, {
|
|
68
|
+
component: Component = "div",
|
|
69
|
+
children,
|
|
70
|
+
appear,
|
|
71
|
+
enter,
|
|
72
|
+
exit,
|
|
73
|
+
childFactory = (child) => child
|
|
74
|
+
} = _a, restProps = __objRest(_a, [
|
|
75
|
+
"component",
|
|
76
|
+
"children",
|
|
77
|
+
"appear",
|
|
78
|
+
"enter",
|
|
79
|
+
"exit",
|
|
80
|
+
"childFactory"
|
|
81
|
+
]);
|
|
82
|
+
const [state, setState] = (0, import_react.useState)({
|
|
83
|
+
contextValue: { isMounting: true },
|
|
84
|
+
firstRender: true,
|
|
85
|
+
children: {}
|
|
86
|
+
});
|
|
87
|
+
const mountedRef = (0, import_react.useRef)(false);
|
|
88
|
+
const handleExitedRef = (0, import_react.useRef)((child, node) => {
|
|
89
|
+
const currentChildMapping = (0, import_childMapping.getChildMapping)(children);
|
|
90
|
+
if (child.key in currentChildMapping)
|
|
91
|
+
return;
|
|
92
|
+
if (child.props.onExited) {
|
|
93
|
+
child.props.onExited(node);
|
|
94
|
+
}
|
|
95
|
+
if (mountedRef.current) {
|
|
96
|
+
setState((prevState) => {
|
|
97
|
+
const tempChildren = __spreadValues({}, prevState.children);
|
|
98
|
+
delete tempChildren[child.key];
|
|
99
|
+
return __spreadProps(__spreadValues({}, prevState), { children: tempChildren });
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
(0, import_react.useEffect)(() => {
|
|
104
|
+
mountedRef.current = true;
|
|
105
|
+
setState((prevState) => __spreadProps(__spreadValues({}, prevState), {
|
|
106
|
+
contextValue: { isMounting: false }
|
|
107
|
+
}));
|
|
108
|
+
return () => {
|
|
109
|
+
mountedRef.current = false;
|
|
110
|
+
};
|
|
111
|
+
}, []);
|
|
112
|
+
(0, import_react.useEffect)(() => {
|
|
113
|
+
setState((prevState) => {
|
|
114
|
+
const { firstRender, children: prevChildMapping } = prevState;
|
|
115
|
+
const handleExited = handleExitedRef.current;
|
|
116
|
+
return __spreadProps(__spreadValues({}, prevState), {
|
|
117
|
+
children: firstRender ? (0, import_childMapping.getInitialChildMapping)(props, handleExited) : (0, import_childMapping.getNextChildMapping)(props, prevChildMapping, handleExited),
|
|
118
|
+
firstRender: false
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
}, [children, appear, enter, exit]);
|
|
122
|
+
const { contextValue, children: mappedChildren } = state;
|
|
123
|
+
const valuedChildren = values(mappedChildren).map(
|
|
124
|
+
childFactory
|
|
125
|
+
);
|
|
126
|
+
if (Component === null) {
|
|
127
|
+
return /* @__PURE__ */ import_react.default.createElement(TransitionGroupContext.Provider, { value: contextValue }, valuedChildren);
|
|
128
|
+
}
|
|
129
|
+
return /* @__PURE__ */ import_react.default.createElement(TransitionGroupContext.Provider, { value: contextValue }, /* @__PURE__ */ import_react.default.createElement(Component, __spreadValues({}, restProps), valuedChildren));
|
|
130
|
+
};
|
|
131
|
+
TransitionGroup.displayName = "BuiTransitionGroup";
|
|
132
|
+
var TransitionGroup_default = TransitionGroup;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var TransitionGroup_types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(TransitionGroup_types_exports);
|
|
@@ -0,0 +1,68 @@
|
|
|
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 TransitionGroupDemo_exports = {};
|
|
29
|
+
__export(TransitionGroupDemo_exports, {
|
|
30
|
+
default: () => TransitionGroupDemo_default
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(TransitionGroupDemo_exports);
|
|
33
|
+
var import_react = require("@bifrostui/react");
|
|
34
|
+
var import_react2 = __toESM(require("react"));
|
|
35
|
+
var import_index = require("./index.css");
|
|
36
|
+
const TransitionGroupDemo = () => {
|
|
37
|
+
const [items, setItems] = (0, import_react2.useState)([
|
|
38
|
+
{ id: 1, text: "Item 1" },
|
|
39
|
+
{ id: 2, text: "Item 2" },
|
|
40
|
+
{ id: 3, text: "Item 3" }
|
|
41
|
+
]);
|
|
42
|
+
const handleAddItem = () => {
|
|
43
|
+
const id = items.length > 0 ? Math.max(...items.map((item) => item.id)) + 1 : 1;
|
|
44
|
+
setItems((prev) => [...prev, { id, text: `Item ${id}` }]);
|
|
45
|
+
};
|
|
46
|
+
const handleRemoveItem = (id) => {
|
|
47
|
+
setItems((prev) => prev.filter((item) => item.id !== id));
|
|
48
|
+
};
|
|
49
|
+
return /* @__PURE__ */ import_react2.default.createElement("div", null, /* @__PURE__ */ import_react2.default.createElement(import_react.Button, { onClick: handleAddItem }, "\u6DFB\u52A0\u9879\u76EE"), /* @__PURE__ */ import_react2.default.createElement(import_react.TransitionGroup, { className: "transition-group-container" }, items.map((item) => /* @__PURE__ */ import_react2.default.createElement(
|
|
50
|
+
import_react.CSSTransition,
|
|
51
|
+
{
|
|
52
|
+
key: item.id,
|
|
53
|
+
unmountOnExit: true,
|
|
54
|
+
timeout: 300,
|
|
55
|
+
classNames: "item"
|
|
56
|
+
},
|
|
57
|
+
/* @__PURE__ */ import_react2.default.createElement("div", { className: "item-container" }, /* @__PURE__ */ import_react2.default.createElement("span", null, item.text), /* @__PURE__ */ import_react2.default.createElement(
|
|
58
|
+
import_react.Button,
|
|
59
|
+
{
|
|
60
|
+
size: "small",
|
|
61
|
+
color: "danger",
|
|
62
|
+
onClick: () => handleRemoveItem(item.id)
|
|
63
|
+
},
|
|
64
|
+
"\u5220\u9664"
|
|
65
|
+
))
|
|
66
|
+
))));
|
|
67
|
+
};
|
|
68
|
+
var TransitionGroupDemo_default = TransitionGroupDemo;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.transition-group-container {
|
|
2
|
+
margin-top: 10px;
|
|
3
|
+
}
|
|
4
|
+
.transition-group-container .item-container {
|
|
5
|
+
display: flex;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
align-items: center;
|
|
8
|
+
padding: 10px;
|
|
9
|
+
margin-bottom: 10px;
|
|
10
|
+
background-color: #f5f5f5;
|
|
11
|
+
border-radius: 4px;
|
|
12
|
+
}
|
|
13
|
+
.transition-group-container .item-enter {
|
|
14
|
+
opacity: 0;
|
|
15
|
+
transform: translateX(-100%);
|
|
16
|
+
}
|
|
17
|
+
.transition-group-container .item-enter-active {
|
|
18
|
+
opacity: 1;
|
|
19
|
+
transform: translateX(0);
|
|
20
|
+
transition: all 300ms ease-in;
|
|
21
|
+
}
|
|
22
|
+
.transition-group-container .item-exit {
|
|
23
|
+
opacity: 1;
|
|
24
|
+
transform: translateX(0);
|
|
25
|
+
}
|
|
26
|
+
.transition-group-container .item-exit-active {
|
|
27
|
+
opacity: 0;
|
|
28
|
+
transform: translateX(-100%);
|
|
29
|
+
transition: all 300ms ease-in;
|
|
30
|
+
}
|
|
31
|
+
.transition-group-container .bui-btn {
|
|
32
|
+
margin-bottom: 0;
|
|
33
|
+
}
|