@bifrostui/react 2.0.0-alpha.0 → 2.0.0-alpha.10
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/Alert/Alert.js +2 -1
- package/dist/Alert/__tests__/fixtures/A11yDemos.d.ts +17 -0
- package/dist/Alert/__tests__/fixtures/A11yDemos.js +143 -0
- package/dist/Alert/index.css +4 -4
- package/dist/Avatar/AvatarGroup.css +8 -8
- package/dist/Avatar/index.css +8 -8
- package/dist/Backdrop/Backdrop.js +3 -2
- package/dist/Backdrop/Backdrop.types.d.ts +4 -0
- package/dist/Backdrop/__tests__/fixtures/A11yDemos.d.ts +8 -0
- package/dist/Backdrop/__tests__/fixtures/A11yDemos.js +51 -0
- package/dist/Backdrop/index.css +2 -2
- package/dist/Badge/Badge.js +38 -11
- package/dist/Badge/Badge.types.d.ts +30 -1
- package/dist/Badge/__tests__/fixtures/A11yDemos.d.ts +25 -0
- package/dist/Badge/__tests__/fixtures/A11yDemos.js +110 -0
- package/dist/Badge/hooks/useBadgeA11y.d.ts +23 -0
- package/dist/Badge/hooks/useBadgeA11y.js +76 -0
- package/dist/Badge/hooks/useBadgeDisplay.d.ts +16 -0
- package/dist/Badge/hooks/useBadgeDisplay.js +56 -0
- package/dist/Button/Button.js +2 -1
- package/dist/Button/__tests__/fixtures/A11yDemos.d.ts +23 -0
- package/dist/Button/__tests__/fixtures/A11yDemos.js +81 -0
- package/dist/Button/index.css +4 -5
- package/dist/CSSTransition/CSSTransition.d.ts +4 -0
- package/dist/CSSTransition/CSSTransition.js +177 -0
- package/dist/CSSTransition/CSSTransition.types.d.ts +13 -0
- package/dist/CSSTransition/CSSTransition.types.js +15 -0
- package/dist/CSSTransition/demo/CSSTransitionDemo.d.ts +4 -0
- package/dist/CSSTransition/demo/CSSTransitionDemo.js +76 -0
- package/dist/CSSTransition/demo/index.css +25 -0
- package/dist/CSSTransition/index.d.ts +2 -0
- package/dist/CSSTransition/index.js +41 -0
- package/dist/Calendar/Calendar.js +131 -34
- package/dist/Calendar/Calendar.types.d.ts +16 -1
- package/dist/Calendar/__tests__/fixtures/A11yDemos.d.ts +2 -0
- package/dist/Calendar/__tests__/fixtures/A11yDemos.js +41 -0
- package/dist/Calendar/index.css +52 -9
- package/dist/Calendar/utils.d.ts +7 -3
- package/dist/Calendar/utils.js +33 -23
- package/dist/Checkbox/Checkbox.js +5 -4
- package/dist/Checkbox/__tests__/fixtures/A11yDemos.d.ts +15 -0
- package/dist/Checkbox/__tests__/fixtures/A11yDemos.js +57 -0
- package/dist/CitySelector/CitySelector.types.d.ts +0 -1
- package/dist/Collapse/Collapse.d.ts +1 -1
- package/dist/Collapse/Collapse.js +26 -12
- package/dist/Collapse/Collapse.miniapp.d.ts +10 -0
- package/dist/Collapse/Collapse.miniapp.js +255 -0
- package/dist/Collapse/index.css +40 -1
- package/dist/CollapsePanel/index.css +1 -1
- package/dist/Countdown/Countdown.js +61 -21
- package/dist/Countdown/Countdown.types.d.ts +19 -15
- package/dist/Countdown/__tests__/fixtures/A11yDemos.d.ts +23 -0
- package/dist/Countdown/__tests__/fixtures/A11yDemos.js +107 -0
- package/dist/Countdown/index.css +11 -0
- package/dist/DatePicker/DatePicker.d.ts +4 -0
- package/dist/DatePicker/DatePicker.js +335 -0
- package/dist/DatePicker/DatePicker.types.d.ts +36 -0
- package/dist/DatePicker/DatePicker.types.js +15 -0
- package/dist/DatePicker/constants.d.ts +9 -0
- package/dist/DatePicker/constants.js +37 -0
- package/dist/DatePicker/index.d.ts +3 -0
- package/dist/DatePicker/index.js +44 -0
- package/dist/DesktopDatePicker/DesktopDatePicker.css +61 -0
- package/dist/DesktopDatePicker/DesktopDatePicker.d.ts +5 -0
- package/dist/DesktopDatePicker/DesktopDatePicker.js +280 -0
- package/dist/DesktopDatePicker/DesktopDatePicker.types.d.ts +163 -0
- package/dist/DesktopDatePicker/DesktopDatePicker.types.js +15 -0
- package/dist/DesktopDatePicker/deskTopPickerContainer.css +100 -0
- package/dist/DesktopDatePicker/index.css +161 -0
- package/dist/DesktopDatePicker/index.d.ts +2 -0
- package/dist/DesktopDatePicker/index.js +41 -0
- package/dist/DesktopDatePicker/useGetDatePickerContent.d.ts +6 -0
- package/dist/DesktopDatePicker/useGetDatePickerContent.js +343 -0
- package/dist/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +5 -0
- package/dist/DesktopDateTimePicker/DesktopDateTimePicker.js +322 -0
- package/dist/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +163 -0
- package/dist/DesktopDateTimePicker/DesktopDateTimePicker.types.js +15 -0
- package/dist/DesktopDateTimePicker/index.css +66 -0
- package/dist/DesktopDateTimePicker/index.d.ts +2 -0
- package/dist/DesktopDateTimePicker/index.js +41 -0
- package/dist/DesktopPicker/DesktopPicker.d.ts +5 -0
- package/dist/DesktopPicker/DesktopPicker.js +243 -0
- package/dist/DesktopPicker/DesktopPicker.types.d.ts +61 -0
- package/dist/DesktopPicker/DesktopPicker.types.js +15 -0
- package/dist/DesktopPicker/index.css +39 -0
- package/dist/DesktopPicker/index.d.ts +2 -0
- package/dist/DesktopPicker/index.js +41 -0
- package/dist/DesktopPicker/utils/calcAfterMounted.d.ts +2 -0
- package/dist/{Tabs/utils/bound.js → DesktopPicker/utils/calcAfterMounted.js} +7 -14
- package/dist/DesktopPicker/utils/calcAfterMounted.miniapp.d.ts +2 -0
- package/dist/DesktopPicker/utils/calcAfterMounted.miniapp.js +38 -0
- package/dist/DesktopTimePicker/DesktopTimePicker.d.ts +5 -0
- package/dist/DesktopTimePicker/DesktopTimePicker.js +288 -0
- package/dist/DesktopTimePicker/DesktopTimePicker.types.d.ts +182 -0
- package/dist/DesktopTimePicker/DesktopTimePicker.types.js +15 -0
- package/dist/DesktopTimePicker/DesktopTimePickerList.d.ts +4 -0
- package/dist/DesktopTimePicker/DesktopTimePickerList.js +111 -0
- package/dist/DesktopTimePicker/index.css +170 -0
- package/dist/DesktopTimePicker/index.d.ts +2 -0
- package/dist/DesktopTimePicker/index.js +41 -0
- package/dist/DesktopTimePicker/useGetTimePickerContent.d.ts +6 -0
- package/dist/DesktopTimePicker/useGetTimePickerContent.js +249 -0
- package/dist/DesktopTimePicker/utils/scrollUtil.d.ts +2 -0
- package/dist/DesktopTimePicker/utils/scrollUtil.js +27 -0
- package/dist/DesktopTimePicker/utils/scrollUtil.miniapp.d.ts +2 -0
- package/dist/DesktopTimePicker/utils/scrollUtil.miniapp.js +51 -0
- package/dist/DesktopTimePicker/utils/utils.d.ts +28 -0
- package/dist/DesktopTimePicker/utils/utils.js +408 -0
- package/dist/Dialog/Dialog.d.ts +5 -2
- package/dist/Dialog/Dialog.js +56 -34
- package/dist/Dialog/Dialog.types.d.ts +50 -22
- package/dist/Dialog/FunctionalDialog.d.ts +10 -3
- package/dist/Dialog/FunctionalDialog.js +102 -80
- package/dist/Dialog/__tests__/fixtures/A11yDemos.d.ts +9 -0
- package/dist/Dialog/__tests__/fixtures/A11yDemos.js +78 -0
- package/dist/Dialog/index.css +19 -19
- package/dist/Dialog/index.d.ts +4 -1
- package/dist/Dialog/index.js +9 -2
- package/dist/Drawer/Drawer.js +7 -7
- package/dist/Drawer/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/dist/Drawer/__tests__/fixtures/A11yDemos.js +148 -0
- package/dist/Fade/Fade.js +2 -2
- package/dist/Fade/Fade.miniapp.d.ts +10 -0
- package/dist/Fade/Fade.miniapp.js +200 -0
- package/dist/Fade/index.css +18 -0
- package/dist/IconButton/IconButton.js +23 -8
- package/dist/IconButton/IconButton.types.d.ts +35 -1
- package/dist/IconButton/index.css +3 -0
- package/dist/Image/Image.js +17 -10
- package/dist/Image/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/dist/Image/__tests__/fixtures/A11yDemos.js +130 -0
- package/dist/Image/index.css +3 -8
- package/dist/Input/Input.js +5 -3
- package/dist/Input/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/dist/Input/__tests__/fixtures/A11yDemos.js +81 -0
- package/dist/Input/index.css +8 -8
- package/dist/ItemSelector/ItemSelector.types.d.ts +0 -1
- package/dist/Modal/Modal.js +47 -47
- package/dist/Modal/Modal.miniapp.d.ts +2 -2
- package/dist/Modal/Modal.miniapp.js +48 -32
- package/dist/Modal/Modal.types.d.ts +26 -2
- package/dist/Modal/ModalManager.d.ts +21 -0
- package/dist/Modal/ModalManager.js +238 -0
- package/dist/Modal/__tests__/fixtures/A11yDemos.d.ts +8 -0
- package/dist/Modal/__tests__/fixtures/A11yDemos.js +52 -0
- package/dist/Modal/index.css +1 -1
- package/dist/Modal/index.d.ts +3 -0
- package/dist/Modal/index.js +9 -1
- package/dist/Modal/useModal.d.ts +24 -0
- package/dist/Modal/useModal.js +190 -0
- package/dist/NavBar/index.css +2 -2
- package/dist/Picker/Picker.css +4 -0
- package/dist/Picker/Picker.js +72 -18
- package/dist/Picker/Picker.types.d.ts +15 -2
- package/dist/Picker/PickerPanel.css +4 -0
- package/dist/Picker/PickerPanel.js +52 -41
- package/dist/Picker/__tests__/fixtures/A11yDemos.d.ts +2 -0
- package/dist/Picker/__tests__/fixtures/A11yDemos.js +79 -0
- package/dist/Picker/index.css +8 -0
- package/dist/Picker/utils.d.ts +8 -5
- package/dist/Picker/utils.js +9 -12
- package/dist/Popover/Popover.js +123 -91
- package/dist/Popover/Popover.types.d.ts +44 -7
- package/dist/Popover/__tests__/fixtures/A11yDemos.d.ts +25 -0
- package/dist/Popover/__tests__/fixtures/A11yDemos.js +175 -0
- package/dist/Popover/hooks/index.d.ts +8 -0
- package/dist/Popover/hooks/index.js +36 -0
- package/dist/Popover/hooks/usePopoverA11y.d.ts +14 -0
- package/dist/Popover/hooks/usePopoverA11y.js +66 -0
- package/dist/Popover/hooks/usePopoverEvents.d.ts +21 -0
- package/dist/Popover/hooks/usePopoverEvents.js +150 -0
- package/dist/Popover/hooks/usePopoverPosition.d.ts +17 -0
- package/dist/Popover/hooks/usePopoverPosition.js +124 -0
- package/dist/Popover/hooks/usePopoverState.d.ts +16 -0
- package/dist/Popover/hooks/usePopoverState.js +54 -0
- package/dist/Portal/Portal.miniapp.js +20 -11
- package/dist/Portal/Portal.types.d.ts +1 -1
- package/dist/Portal/PortalCore.js +2 -2
- package/dist/Progress/Progress.js +61 -6
- package/dist/Progress/Progress.types.d.ts +44 -0
- package/dist/Progress/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/dist/Progress/__tests__/fixtures/A11yDemos.js +100 -0
- package/dist/Radio/Radio.js +5 -4
- package/dist/Radio/RadioGroup.js +1 -1
- package/dist/Radio/__tests__/fixtures/A11yDemos.d.ts +15 -0
- package/dist/Radio/__tests__/fixtures/A11yDemos.js +57 -0
- package/dist/Rating/index.css +8 -12
- package/dist/ScrollView/ScrollView.js +48 -196
- package/dist/ScrollView/ScrollView.types.d.ts +120 -86
- package/dist/ScrollView/__tests__/fixtures/A11yDemos.d.ts +7 -0
- package/dist/ScrollView/__tests__/fixtures/A11yDemos.js +319 -0
- package/dist/ScrollView/useScrollView.d.ts +10 -0
- package/dist/ScrollView/useScrollView.js +300 -0
- package/dist/Select/Select.js +73 -39
- package/dist/Select/Select.types.d.ts +2 -2
- package/dist/Select/SelectOption.js +5 -1
- package/dist/Select/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/dist/Select/__tests__/fixtures/A11yDemos.js +154 -0
- package/dist/Select/index.css +12 -8
- package/dist/Select/selectContext.d.ts +0 -1
- package/dist/Slide/Slide.js +2 -2
- package/dist/Slide/Slide.miniapp.d.ts +14 -0
- package/dist/Slide/Slide.miniapp.js +213 -0
- package/dist/Slide/index.css +72 -0
- package/dist/Slider/Slider.js +13 -5
- package/dist/Stack/demo/index.css +2 -0
- package/dist/SwipeAction/SwipeAction.css +79 -0
- package/dist/SwipeAction/SwipeAction.d.ts +5 -0
- package/dist/SwipeAction/SwipeAction.js +349 -0
- package/dist/SwipeAction/SwipeAction.types.d.ts +75 -0
- package/dist/SwipeAction/SwipeAction.types.js +15 -0
- package/dist/SwipeAction/SwipeActionContext.d.ts +3 -0
- package/dist/SwipeAction/SwipeActionContext.js +30 -0
- package/dist/SwipeAction/SwipeActionItem.css +31 -0
- package/dist/SwipeAction/SwipeActionItem.d.ts +5 -0
- package/dist/SwipeAction/SwipeActionItem.js +105 -0
- package/dist/SwipeAction/constants.d.ts +9 -0
- package/dist/SwipeAction/constants.js +39 -0
- package/dist/SwipeAction/index.css +110 -0
- package/dist/SwipeAction/index.d.ts +5 -0
- package/dist/SwipeAction/index.js +50 -0
- package/dist/Swiper/Swiper.js +18 -4
- package/dist/Switch/Switch.js +5 -4
- package/dist/Switch/__tests__/fixtures/A11yDemos.d.ts +15 -0
- package/dist/Switch/__tests__/fixtures/A11yDemos.js +57 -0
- package/dist/Tabs/Tab.js +36 -21
- package/dist/Tabs/Tab.types.d.ts +1 -1
- package/dist/Tabs/TabPanel.d.ts +1 -1
- package/dist/Tabs/TabPanel.js +9 -5
- package/dist/Tabs/Tabs.css +2 -2
- package/dist/Tabs/Tabs.js +87 -64
- package/dist/Tabs/Tabs.types.d.ts +1 -1
- package/dist/Tabs/TabsContext.d.ts +4 -5
- package/dist/Tabs/TabsContext.js +3 -1
- package/dist/Tabs/index.css +2 -2
- package/dist/Tabs/utils/scroll.d.ts +2 -0
- package/dist/Tabs/utils/scroll.js +55 -0
- package/dist/Tag/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/dist/Tag/__tests__/fixtures/A11yDemos.js +196 -0
- package/dist/TextArea/TextArea.js +50 -7
- package/dist/TextArea/TextArea.types.d.ts +28 -0
- package/dist/TextArea/__tests__/fixtures/A11yDemos.d.ts +19 -0
- package/dist/TextArea/__tests__/fixtures/A11yDemos.js +91 -0
- package/dist/TextArea/index.css +4 -4
- package/dist/ThemeProvider/ThemeProvider.types.d.ts +2 -2
- package/dist/ThemeProvider/ThemeProvider.types.js +0 -12
- package/dist/Toast/FunctionalToast.d.ts +2 -2
- package/dist/Toast/FunctionalToast.js +180 -85
- package/dist/Toast/Toast.d.ts +2 -2
- package/dist/Toast/Toast.js +69 -28
- package/dist/Toast/Toast.types.d.ts +13 -10
- package/dist/Toast/__tests__/fixtures/A11yDemos.d.ts +2 -0
- package/dist/Toast/__tests__/fixtures/A11yDemos.js +54 -0
- package/dist/Toast/index.css +0 -1
- package/dist/Tooltip/Tooltip.js +63 -107
- package/dist/Tooltip/Tooltip.types.d.ts +94 -43
- package/dist/Tooltip/__tests__/fixtures/A11yDemos.d.ts +25 -0
- package/dist/Tooltip/__tests__/fixtures/A11yDemos.js +100 -0
- package/dist/Tooltip/useTooltip.d.ts +29 -0
- package/dist/Tooltip/useTooltip.js +313 -0
- package/dist/Transition/TransitionCore.js +30 -25
- package/dist/TransitionGroup/TransitionGroup.d.ts +7 -0
- package/dist/TransitionGroup/TransitionGroup.js +132 -0
- package/dist/TransitionGroup/TransitionGroup.types.d.ts +47 -0
- package/dist/TransitionGroup/TransitionGroup.types.js +15 -0
- package/dist/TransitionGroup/demo/TransitionGroupDemo.d.ts +4 -0
- package/dist/TransitionGroup/demo/TransitionGroupDemo.js +68 -0
- package/dist/TransitionGroup/demo/index.css +33 -0
- package/dist/TransitionGroup/index.d.ts +2 -0
- package/dist/TransitionGroup/index.js +41 -0
- package/dist/TransitionGroup/utils/childMapping.d.ts +27 -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/index.d.ts +8 -0
- package/dist/index.js +17 -1
- package/dist/locales/base.d.ts +40 -1
- package/dist/locales/en-US.js +54 -2
- package/dist/locales/zh-CN.js +56 -1
- package/dist/locales/zh-TW.js +56 -1
- package/es/Alert/Alert.js +2 -1
- package/es/Alert/__tests__/fixtures/A11yDemos.d.ts +17 -0
- package/es/Alert/__tests__/fixtures/A11yDemos.js +107 -0
- package/es/Alert/index.css +4 -4
- package/es/Avatar/AvatarGroup.css +8 -8
- package/es/Avatar/index.css +8 -8
- package/es/Backdrop/Backdrop.js +3 -2
- package/es/Backdrop/Backdrop.types.d.ts +4 -0
- package/es/Backdrop/__tests__/fixtures/A11yDemos.d.ts +8 -0
- package/es/Backdrop/__tests__/fixtures/A11yDemos.js +17 -0
- package/es/Backdrop/index.css +2 -2
- package/es/Badge/Badge.js +38 -11
- package/es/Badge/Badge.types.d.ts +30 -1
- package/es/Badge/__tests__/fixtures/A11yDemos.d.ts +25 -0
- package/es/Badge/__tests__/fixtures/A11yDemos.js +70 -0
- package/es/Badge/hooks/useBadgeA11y.d.ts +23 -0
- package/es/Badge/hooks/useBadgeA11y.js +53 -0
- package/es/Badge/hooks/useBadgeDisplay.d.ts +16 -0
- package/es/Badge/hooks/useBadgeDisplay.js +33 -0
- package/es/Button/Button.js +2 -1
- package/es/Button/__tests__/fixtures/A11yDemos.d.ts +23 -0
- package/es/Button/__tests__/fixtures/A11yDemos.js +42 -0
- package/es/Button/index.css +4 -5
- package/es/CSSTransition/CSSTransition.d.ts +4 -0
- package/es/CSSTransition/CSSTransition.js +153 -0
- package/es/CSSTransition/CSSTransition.types.d.ts +13 -0
- package/es/CSSTransition/CSSTransition.types.js +1 -0
- package/es/CSSTransition/demo/CSSTransitionDemo.d.ts +4 -0
- package/es/CSSTransition/demo/CSSTransitionDemo.js +47 -0
- package/es/CSSTransition/demo/index.css +25 -0
- package/es/CSSTransition/index.d.ts +2 -0
- package/es/CSSTransition/index.js +6 -0
- package/es/Calendar/Calendar.js +131 -34
- package/es/Calendar/Calendar.types.d.ts +16 -1
- package/es/Calendar/__tests__/fixtures/A11yDemos.d.ts +2 -0
- package/es/Calendar/__tests__/fixtures/A11yDemos.js +8 -0
- package/es/Calendar/index.css +52 -9
- package/es/Calendar/utils.d.ts +7 -3
- package/es/Calendar/utils.js +29 -20
- package/es/Checkbox/Checkbox.js +5 -4
- package/es/Checkbox/__tests__/fixtures/A11yDemos.d.ts +15 -0
- package/es/Checkbox/__tests__/fixtures/A11yDemos.js +22 -0
- package/es/CitySelector/CitySelector.types.d.ts +0 -1
- package/es/Collapse/Collapse.d.ts +1 -1
- package/es/Collapse/Collapse.js +26 -12
- package/es/Collapse/Collapse.miniapp.d.ts +10 -0
- package/es/Collapse/Collapse.miniapp.js +236 -0
- package/es/Collapse/index.css +40 -1
- package/es/CollapsePanel/index.css +1 -1
- package/es/Countdown/Countdown.js +61 -21
- package/es/Countdown/Countdown.types.d.ts +19 -15
- package/es/Countdown/__tests__/fixtures/A11yDemos.d.ts +23 -0
- package/es/Countdown/__tests__/fixtures/A11yDemos.js +68 -0
- package/es/Countdown/index.css +11 -0
- package/es/DatePicker/DatePicker.d.ts +4 -0
- package/es/DatePicker/DatePicker.js +308 -0
- package/es/DatePicker/DatePicker.types.d.ts +36 -0
- package/es/DatePicker/DatePicker.types.js +1 -0
- package/es/DatePicker/constants.d.ts +9 -0
- package/es/DatePicker/constants.js +14 -0
- package/es/DatePicker/index.d.ts +3 -0
- package/es/DatePicker/index.js +8 -0
- package/es/DesktopDatePicker/DesktopDatePicker.css +61 -0
- package/es/DesktopDatePicker/DesktopDatePicker.d.ts +5 -0
- package/es/DesktopDatePicker/DesktopDatePicker.js +253 -0
- package/es/DesktopDatePicker/DesktopDatePicker.types.d.ts +163 -0
- package/es/DesktopDatePicker/DesktopDatePicker.types.js +1 -0
- package/es/DesktopDatePicker/deskTopPickerContainer.css +100 -0
- package/es/DesktopDatePicker/index.css +161 -0
- package/es/DesktopDatePicker/index.d.ts +2 -0
- package/es/DesktopDatePicker/index.js +6 -0
- package/es/DesktopDatePicker/useGetDatePickerContent.d.ts +6 -0
- package/es/DesktopDatePicker/useGetDatePickerContent.js +316 -0
- package/es/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +5 -0
- package/es/DesktopDateTimePicker/DesktopDateTimePicker.js +295 -0
- package/es/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +163 -0
- package/es/DesktopDateTimePicker/DesktopDateTimePicker.types.js +1 -0
- package/es/DesktopDateTimePicker/index.css +66 -0
- package/es/DesktopDateTimePicker/index.d.ts +2 -0
- package/es/DesktopDateTimePicker/index.js +9 -0
- package/es/DesktopPicker/DesktopPicker.d.ts +5 -0
- package/es/DesktopPicker/DesktopPicker.js +226 -0
- package/es/DesktopPicker/DesktopPicker.types.d.ts +61 -0
- package/es/DesktopPicker/DesktopPicker.types.js +1 -0
- package/es/DesktopPicker/index.css +39 -0
- package/es/DesktopPicker/index.d.ts +2 -0
- package/es/DesktopPicker/index.js +6 -0
- package/es/DesktopPicker/utils/calcAfterMounted.d.ts +2 -0
- package/es/DesktopPicker/utils/calcAfterMounted.js +6 -0
- package/es/DesktopPicker/utils/calcAfterMounted.miniapp.d.ts +2 -0
- package/es/DesktopPicker/utils/calcAfterMounted.miniapp.js +9 -0
- package/es/DesktopTimePicker/DesktopTimePicker.d.ts +5 -0
- package/es/DesktopTimePicker/DesktopTimePicker.js +261 -0
- package/es/DesktopTimePicker/DesktopTimePicker.types.d.ts +182 -0
- package/es/DesktopTimePicker/DesktopTimePicker.types.js +1 -0
- package/es/DesktopTimePicker/DesktopTimePickerList.d.ts +4 -0
- package/es/DesktopTimePicker/DesktopTimePickerList.js +84 -0
- package/es/DesktopTimePicker/index.css +170 -0
- package/es/DesktopTimePicker/index.d.ts +2 -0
- package/es/DesktopTimePicker/index.js +6 -0
- package/es/DesktopTimePicker/useGetTimePickerContent.d.ts +6 -0
- package/es/DesktopTimePicker/useGetTimePickerContent.js +226 -0
- package/es/DesktopTimePicker/utils/scrollUtil.d.ts +2 -0
- package/es/DesktopTimePicker/utils/scrollUtil.js +8 -0
- package/es/DesktopTimePicker/utils/scrollUtil.miniapp.d.ts +2 -0
- package/es/DesktopTimePicker/utils/scrollUtil.miniapp.js +22 -0
- package/es/DesktopTimePicker/utils/utils.d.ts +28 -0
- package/es/DesktopTimePicker/utils/utils.js +365 -0
- package/es/Dialog/Dialog.d.ts +5 -2
- package/es/Dialog/Dialog.js +57 -35
- package/es/Dialog/Dialog.types.d.ts +50 -22
- package/es/Dialog/FunctionalDialog.d.ts +10 -3
- package/es/Dialog/FunctionalDialog.js +106 -84
- package/es/Dialog/__tests__/fixtures/A11yDemos.d.ts +9 -0
- package/es/Dialog/__tests__/fixtures/A11yDemos.js +43 -0
- package/es/Dialog/index.css +19 -19
- package/es/Dialog/index.d.ts +4 -1
- package/es/Dialog/index.js +10 -3
- package/es/Drawer/Drawer.js +8 -8
- package/es/Drawer/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/es/Drawer/__tests__/fixtures/A11yDemos.js +112 -0
- package/es/Fade/Fade.js +2 -2
- package/es/Fade/Fade.miniapp.d.ts +10 -0
- package/es/Fade/Fade.miniapp.js +179 -0
- package/es/Fade/index.css +18 -0
- package/es/IconButton/IconButton.js +23 -8
- package/es/IconButton/IconButton.types.d.ts +35 -1
- package/es/IconButton/index.css +3 -0
- package/es/Image/Image.js +17 -10
- package/es/Image/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/es/Image/__tests__/fixtures/A11yDemos.js +92 -0
- package/es/Image/index.css +3 -8
- package/es/Input/Input.js +5 -3
- package/es/Input/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/es/Input/__tests__/fixtures/A11yDemos.js +43 -0
- package/es/Input/index.css +8 -8
- package/es/ItemSelector/ItemSelector.types.d.ts +0 -1
- package/es/Modal/Modal.js +48 -48
- package/es/Modal/Modal.miniapp.d.ts +2 -2
- package/es/Modal/Modal.miniapp.js +49 -33
- package/es/Modal/Modal.types.d.ts +26 -2
- package/es/Modal/ModalManager.d.ts +21 -0
- package/es/Modal/ModalManager.js +214 -0
- package/es/Modal/__tests__/fixtures/A11yDemos.d.ts +8 -0
- package/es/Modal/__tests__/fixtures/A11yDemos.js +18 -0
- package/es/Modal/index.css +1 -1
- package/es/Modal/index.d.ts +3 -0
- package/es/Modal/index.js +6 -1
- package/es/Modal/useModal.d.ts +24 -0
- package/es/Modal/useModal.js +169 -0
- package/es/NavBar/index.css +2 -2
- package/es/Picker/Picker.css +4 -0
- package/es/Picker/Picker.js +72 -18
- package/es/Picker/Picker.types.d.ts +15 -2
- package/es/Picker/PickerPanel.css +4 -0
- package/es/Picker/PickerPanel.js +52 -41
- package/es/Picker/__tests__/fixtures/A11yDemos.d.ts +2 -0
- package/es/Picker/__tests__/fixtures/A11yDemos.js +46 -0
- package/es/Picker/index.css +8 -0
- package/es/Picker/utils.d.ts +8 -5
- package/es/Picker/utils.js +9 -12
- package/es/Popover/Popover.js +130 -99
- package/es/Popover/Popover.types.d.ts +44 -7
- package/es/Popover/__tests__/fixtures/A11yDemos.d.ts +25 -0
- package/es/Popover/__tests__/fixtures/A11yDemos.js +135 -0
- package/es/Popover/hooks/index.d.ts +8 -0
- package/es/Popover/hooks/index.js +10 -0
- package/es/Popover/hooks/usePopoverA11y.d.ts +14 -0
- package/es/Popover/hooks/usePopoverA11y.js +43 -0
- package/es/Popover/hooks/usePopoverEvents.d.ts +21 -0
- package/es/Popover/hooks/usePopoverEvents.js +127 -0
- package/es/Popover/hooks/usePopoverPosition.d.ts +17 -0
- package/es/Popover/hooks/usePopoverPosition.js +105 -0
- package/es/Popover/hooks/usePopoverState.d.ts +16 -0
- package/es/Popover/hooks/usePopoverState.js +31 -0
- package/es/Portal/Portal.miniapp.js +21 -12
- package/es/Portal/Portal.types.d.ts +1 -1
- package/es/Portal/PortalCore.js +2 -2
- package/es/Progress/Progress.js +61 -6
- package/es/Progress/Progress.types.d.ts +44 -0
- package/es/Progress/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/es/Progress/__tests__/fixtures/A11yDemos.js +62 -0
- package/es/Radio/Radio.js +5 -4
- package/es/Radio/RadioGroup.js +1 -1
- package/es/Radio/__tests__/fixtures/A11yDemos.d.ts +15 -0
- package/es/Radio/__tests__/fixtures/A11yDemos.js +22 -0
- package/es/Rating/index.css +8 -12
- package/es/ScrollView/ScrollView.js +51 -197
- package/es/ScrollView/ScrollView.types.d.ts +120 -86
- package/es/ScrollView/__tests__/fixtures/A11yDemos.d.ts +7 -0
- package/es/ScrollView/__tests__/fixtures/A11yDemos.js +283 -0
- package/es/ScrollView/useScrollView.d.ts +10 -0
- package/es/ScrollView/useScrollView.js +279 -0
- package/es/Select/Select.js +73 -40
- package/es/Select/Select.types.d.ts +2 -2
- package/es/Select/SelectOption.js +5 -1
- package/es/Select/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/es/Select/__tests__/fixtures/A11yDemos.js +118 -0
- package/es/Select/index.css +12 -8
- package/es/Select/selectContext.d.ts +0 -1
- package/es/Slide/Slide.js +2 -2
- package/es/Slide/Slide.miniapp.d.ts +14 -0
- package/es/Slide/Slide.miniapp.js +192 -0
- package/es/Slide/index.css +72 -0
- package/es/Slider/Slider.js +16 -6
- package/es/Stack/demo/index.css +2 -0
- package/es/SwipeAction/SwipeAction.css +79 -0
- package/es/SwipeAction/SwipeAction.d.ts +5 -0
- package/es/SwipeAction/SwipeAction.js +334 -0
- package/es/SwipeAction/SwipeAction.types.d.ts +75 -0
- package/es/SwipeAction/SwipeAction.types.js +1 -0
- package/es/SwipeAction/SwipeActionContext.d.ts +3 -0
- package/es/SwipeAction/SwipeActionContext.js +11 -0
- package/es/SwipeAction/SwipeActionItem.css +31 -0
- package/es/SwipeAction/SwipeActionItem.d.ts +5 -0
- package/es/SwipeAction/SwipeActionItem.js +78 -0
- package/es/SwipeAction/constants.d.ts +9 -0
- package/es/SwipeAction/constants.js +15 -0
- package/es/SwipeAction/index.css +110 -0
- package/es/SwipeAction/index.d.ts +5 -0
- package/es/SwipeAction/index.js +12 -0
- package/es/Swiper/Swiper.js +18 -4
- package/es/Switch/Switch.js +5 -4
- package/es/Switch/__tests__/fixtures/A11yDemos.d.ts +15 -0
- package/es/Switch/__tests__/fixtures/A11yDemos.js +22 -0
- package/es/Tabs/Tab.js +36 -21
- package/es/Tabs/Tab.types.d.ts +1 -1
- package/es/Tabs/TabPanel.d.ts +1 -1
- package/es/Tabs/TabPanel.js +8 -4
- package/es/Tabs/Tabs.css +2 -2
- package/es/Tabs/Tabs.js +87 -64
- package/es/Tabs/Tabs.types.d.ts +1 -1
- package/es/Tabs/TabsContext.d.ts +4 -5
- package/es/Tabs/TabsContext.js +3 -1
- package/es/Tabs/index.css +2 -2
- package/es/Tabs/utils/scroll.d.ts +2 -0
- package/es/Tabs/utils/scroll.js +36 -0
- package/es/Tag/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/es/Tag/__tests__/fixtures/A11yDemos.js +160 -0
- package/es/TextArea/TextArea.js +51 -8
- package/es/TextArea/TextArea.types.d.ts +28 -0
- package/es/TextArea/__tests__/fixtures/A11yDemos.d.ts +19 -0
- package/es/TextArea/__tests__/fixtures/A11yDemos.js +54 -0
- package/es/TextArea/index.css +4 -4
- package/es/ThemeProvider/ThemeProvider.types.d.ts +2 -2
- package/es/Toast/FunctionalToast.d.ts +2 -2
- package/es/Toast/FunctionalToast.js +186 -86
- package/es/Toast/Toast.d.ts +2 -2
- package/es/Toast/Toast.js +69 -28
- package/es/Toast/Toast.types.d.ts +13 -10
- package/es/Toast/__tests__/fixtures/A11yDemos.d.ts +2 -0
- package/es/Toast/__tests__/fixtures/A11yDemos.js +21 -0
- package/es/Toast/index.css +0 -1
- package/es/Tooltip/Tooltip.js +64 -114
- package/es/Tooltip/Tooltip.types.d.ts +94 -43
- package/es/Tooltip/__tests__/fixtures/A11yDemos.d.ts +25 -0
- package/es/Tooltip/__tests__/fixtures/A11yDemos.js +60 -0
- package/es/Tooltip/useTooltip.d.ts +29 -0
- package/es/Tooltip/useTooltip.js +290 -0
- package/es/Transition/TransitionCore.js +31 -26
- package/es/TransitionGroup/TransitionGroup.d.ts +7 -0
- package/es/TransitionGroup/TransitionGroup.js +109 -0
- package/es/TransitionGroup/TransitionGroup.types.d.ts +47 -0
- package/es/TransitionGroup/TransitionGroup.types.js +1 -0
- package/es/TransitionGroup/demo/TransitionGroupDemo.d.ts +4 -0
- package/es/TransitionGroup/demo/TransitionGroupDemo.js +39 -0
- package/es/TransitionGroup/demo/index.css +33 -0
- package/es/TransitionGroup/index.d.ts +2 -0
- package/es/TransitionGroup/index.js +6 -0
- package/es/TransitionGroup/utils/childMapping.d.ts +27 -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/index.d.ts +8 -0
- package/es/index.js +8 -0
- package/es/locales/base.d.ts +40 -1
- package/es/locales/en-US.js +54 -2
- package/es/locales/zh-CN.js +56 -1
- package/es/locales/zh-TW.js +56 -1
- package/package.json +9 -6
- package/dist/Tabs/utils/bound.d.ts +0 -1
- package/es/Tabs/utils/bound.d.ts +0 -1
- package/es/Tabs/utils/bound.js +0 -13
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __async = (__this, __arguments, generator) => {
|
|
21
|
+
return new Promise((resolve, reject) => {
|
|
22
|
+
var fulfilled = (value) => {
|
|
23
|
+
try {
|
|
24
|
+
step(generator.next(value));
|
|
25
|
+
} catch (e) {
|
|
26
|
+
reject(e);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var rejected = (value) => {
|
|
30
|
+
try {
|
|
31
|
+
step(generator.throw(value));
|
|
32
|
+
} catch (e) {
|
|
33
|
+
reject(e);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
37
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
import React, { useState, useRef, useEffect, useCallback } from "react";
|
|
41
|
+
import {
|
|
42
|
+
getStylesAndLocation,
|
|
43
|
+
triggerEventTransform,
|
|
44
|
+
parsePlacement,
|
|
45
|
+
throttle,
|
|
46
|
+
useForkRef,
|
|
47
|
+
useUniqueId,
|
|
48
|
+
isMini
|
|
49
|
+
} from "@bifrostui/utils";
|
|
50
|
+
function useTooltip(parameters) {
|
|
51
|
+
const {
|
|
52
|
+
defaultOpen = false,
|
|
53
|
+
open,
|
|
54
|
+
offset,
|
|
55
|
+
placement = "top",
|
|
56
|
+
trigger = "click",
|
|
57
|
+
onOpenChange,
|
|
58
|
+
autoFocus = false,
|
|
59
|
+
closeOnEscape = false,
|
|
60
|
+
children,
|
|
61
|
+
rootRef
|
|
62
|
+
} = parameters;
|
|
63
|
+
const controlByUser = typeof open !== "undefined";
|
|
64
|
+
const { direction, location = "center" } = parsePlacement(placement);
|
|
65
|
+
const childrenRef = useRef();
|
|
66
|
+
const [openStatus, setOpenStatus] = useState(defaultOpen);
|
|
67
|
+
const [arrowDirection, setArrowDirection] = useState(direction);
|
|
68
|
+
const [arrowLocation, setArrowLocation] = useState(location);
|
|
69
|
+
const [toolStyles, setToolStyles] = useState({});
|
|
70
|
+
const tipRef = useRef(null);
|
|
71
|
+
const tooltipId = useUniqueId();
|
|
72
|
+
useEffect(() => {
|
|
73
|
+
setArrowDirection(direction);
|
|
74
|
+
setArrowLocation(location);
|
|
75
|
+
}, [direction, location]);
|
|
76
|
+
const isOpen = open || openStatus;
|
|
77
|
+
const clearRef = (status) => {
|
|
78
|
+
if (status === false) {
|
|
79
|
+
tipRef.current = null;
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
const changeOpenStatus = (event, status) => {
|
|
83
|
+
if (controlByUser)
|
|
84
|
+
return;
|
|
85
|
+
clearRef(status);
|
|
86
|
+
setOpenStatus(status);
|
|
87
|
+
onOpenChange == null ? void 0 : onOpenChange(event, { open: status });
|
|
88
|
+
};
|
|
89
|
+
const triggerClick = (event) => {
|
|
90
|
+
event.stopPropagation();
|
|
91
|
+
const targetStatus = !openStatus;
|
|
92
|
+
changeOpenStatus(event, targetStatus);
|
|
93
|
+
};
|
|
94
|
+
const hideTooltip = (event) => {
|
|
95
|
+
changeOpenStatus(event, false);
|
|
96
|
+
};
|
|
97
|
+
const showTooltip = (event) => {
|
|
98
|
+
changeOpenStatus(event, true);
|
|
99
|
+
};
|
|
100
|
+
const handleKeyDown = useCallback(
|
|
101
|
+
(event) => {
|
|
102
|
+
if (closeOnEscape && event.key === "Escape" && isOpen) {
|
|
103
|
+
event.preventDefault();
|
|
104
|
+
event.stopPropagation();
|
|
105
|
+
hideTooltip(event);
|
|
106
|
+
if (childrenRef.current && "focus" in childrenRef.current) {
|
|
107
|
+
childrenRef.current.focus();
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
[closeOnEscape, isOpen, hideTooltip]
|
|
112
|
+
);
|
|
113
|
+
useEffect(() => {
|
|
114
|
+
if (isOpen && autoFocus && tipRef.current) {
|
|
115
|
+
const timer = setTimeout(() => {
|
|
116
|
+
if (tipRef.current && "focus" in tipRef.current) {
|
|
117
|
+
tipRef.current.focus();
|
|
118
|
+
}
|
|
119
|
+
}, 0);
|
|
120
|
+
return () => clearTimeout(timer);
|
|
121
|
+
}
|
|
122
|
+
return void 0;
|
|
123
|
+
}, [isOpen, autoFocus]);
|
|
124
|
+
useEffect(() => {
|
|
125
|
+
if (!controlByUser)
|
|
126
|
+
return;
|
|
127
|
+
setOpenStatus(open != null ? open : false);
|
|
128
|
+
clearRef(open != null ? open : false);
|
|
129
|
+
}, [open, controlByUser]);
|
|
130
|
+
useEffect(() => {
|
|
131
|
+
if (!openStatus) {
|
|
132
|
+
setToolStyles({
|
|
133
|
+
visibility: "hidden"
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}, [openStatus]);
|
|
137
|
+
const shouldListenGlobalClick = useCallback(() => {
|
|
138
|
+
if (typeof trigger === "string") {
|
|
139
|
+
return trigger === "click";
|
|
140
|
+
}
|
|
141
|
+
if (Array.isArray(trigger)) {
|
|
142
|
+
return trigger.includes("click");
|
|
143
|
+
}
|
|
144
|
+
return true;
|
|
145
|
+
}, [trigger]);
|
|
146
|
+
const clickEventHandler = useCallback(
|
|
147
|
+
(event) => {
|
|
148
|
+
if (!shouldListenGlobalClick()) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
hideTooltip(event);
|
|
152
|
+
},
|
|
153
|
+
[shouldListenGlobalClick, hideTooltip]
|
|
154
|
+
);
|
|
155
|
+
const onMounted = throttle(() => __async(this, null, function* () {
|
|
156
|
+
if (!tipRef.current)
|
|
157
|
+
return;
|
|
158
|
+
const {
|
|
159
|
+
direction: newParsedDirection,
|
|
160
|
+
location: newParsedLocation = "center"
|
|
161
|
+
} = parsePlacement(placement);
|
|
162
|
+
const result = yield getStylesAndLocation({
|
|
163
|
+
childrenRef,
|
|
164
|
+
arrowDirection: newParsedDirection,
|
|
165
|
+
arrowLocation: newParsedLocation,
|
|
166
|
+
offsetSpacing: offset || 0,
|
|
167
|
+
tipRef
|
|
168
|
+
});
|
|
169
|
+
if (!result)
|
|
170
|
+
return;
|
|
171
|
+
const { styles, newArrowDirection, newArrowLocation } = result;
|
|
172
|
+
if (newArrowDirection !== arrowDirection) {
|
|
173
|
+
setArrowDirection(newArrowDirection);
|
|
174
|
+
}
|
|
175
|
+
if (newArrowLocation !== arrowLocation) {
|
|
176
|
+
setArrowLocation(newArrowLocation);
|
|
177
|
+
}
|
|
178
|
+
setToolStyles(styles);
|
|
179
|
+
}), 100);
|
|
180
|
+
useEffect(() => {
|
|
181
|
+
const bindEvent = () => {
|
|
182
|
+
if (!openStatus)
|
|
183
|
+
return;
|
|
184
|
+
if (!controlByUser && shouldListenGlobalClick() && !isMini) {
|
|
185
|
+
document.addEventListener("click", clickEventHandler);
|
|
186
|
+
}
|
|
187
|
+
if (!isMini) {
|
|
188
|
+
window.addEventListener("resize", onMounted);
|
|
189
|
+
}
|
|
190
|
+
if (isOpen && !isMini) {
|
|
191
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
const unbindEvent = () => {
|
|
195
|
+
if (!controlByUser && shouldListenGlobalClick() && !isMini) {
|
|
196
|
+
document.removeEventListener("click", clickEventHandler);
|
|
197
|
+
}
|
|
198
|
+
if (!isMini) {
|
|
199
|
+
window.removeEventListener("resize", onMounted);
|
|
200
|
+
}
|
|
201
|
+
if (!isMini) {
|
|
202
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
bindEvent();
|
|
206
|
+
return () => {
|
|
207
|
+
unbindEvent();
|
|
208
|
+
};
|
|
209
|
+
}, [
|
|
210
|
+
openStatus,
|
|
211
|
+
controlByUser,
|
|
212
|
+
shouldListenGlobalClick,
|
|
213
|
+
clickEventHandler,
|
|
214
|
+
onMounted,
|
|
215
|
+
isOpen,
|
|
216
|
+
handleKeyDown
|
|
217
|
+
]);
|
|
218
|
+
const tooltipRef = useForkRef(tipRef, rootRef);
|
|
219
|
+
const getTooltipProps = useCallback(
|
|
220
|
+
(otherProps = {}) => {
|
|
221
|
+
return __spreadValues({
|
|
222
|
+
id: tooltipId,
|
|
223
|
+
ref: tooltipRef,
|
|
224
|
+
tabIndex: autoFocus ? -1 : void 0
|
|
225
|
+
}, otherProps);
|
|
226
|
+
},
|
|
227
|
+
[tooltipId, tooltipRef, autoFocus]
|
|
228
|
+
);
|
|
229
|
+
const getChildProps = useCallback(() => {
|
|
230
|
+
var _a;
|
|
231
|
+
let triggerEventOption = {};
|
|
232
|
+
if (!controlByUser) {
|
|
233
|
+
triggerEventOption = triggerEventTransform({
|
|
234
|
+
trigger,
|
|
235
|
+
click: triggerClick,
|
|
236
|
+
show: showTooltip,
|
|
237
|
+
hide: hideTooltip
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
const childProps = __spreadProps(__spreadValues({
|
|
241
|
+
ref: childrenRef
|
|
242
|
+
}, triggerEventOption), {
|
|
243
|
+
"aria-describedby": isOpen ? tooltipId : void 0
|
|
244
|
+
});
|
|
245
|
+
if (React.isValidElement(children)) {
|
|
246
|
+
const elementType = typeof children.type === "string" ? children.type : ((_a = children.type) == null ? void 0 : _a.displayName) || "";
|
|
247
|
+
const interactiveElements = [
|
|
248
|
+
"button",
|
|
249
|
+
"a",
|
|
250
|
+
"input",
|
|
251
|
+
"select",
|
|
252
|
+
"textarea"
|
|
253
|
+
];
|
|
254
|
+
const childElementProps = children.props;
|
|
255
|
+
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;
|
|
256
|
+
if (isInteractive) {
|
|
257
|
+
childProps["aria-expanded"] = isOpen;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
return childProps;
|
|
261
|
+
}, [
|
|
262
|
+
controlByUser,
|
|
263
|
+
trigger,
|
|
264
|
+
triggerClick,
|
|
265
|
+
showTooltip,
|
|
266
|
+
hideTooltip,
|
|
267
|
+
isOpen,
|
|
268
|
+
tooltipId,
|
|
269
|
+
children
|
|
270
|
+
]);
|
|
271
|
+
const getPortalProps = useCallback(() => {
|
|
272
|
+
return {
|
|
273
|
+
onMounted
|
|
274
|
+
};
|
|
275
|
+
}, [onMounted]);
|
|
276
|
+
return {
|
|
277
|
+
getTooltipProps,
|
|
278
|
+
getChildProps,
|
|
279
|
+
getPortalProps,
|
|
280
|
+
tooltipRef,
|
|
281
|
+
isOpen,
|
|
282
|
+
toolStyles,
|
|
283
|
+
arrowDirection,
|
|
284
|
+
arrowLocation,
|
|
285
|
+
tooltipId
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
export {
|
|
289
|
+
useTooltip
|
|
290
|
+
};
|
|
@@ -49,7 +49,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
49
49
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
|
-
import { useForkRef } from "@bifrostui/utils";
|
|
52
|
+
import { useForkRef, useDidMountEffect } from "@bifrostui/utils";
|
|
53
53
|
import React, { forwardRef, useEffect, useRef, useState } from "react";
|
|
54
54
|
const TransitionCore = forwardRef(
|
|
55
55
|
(props, ref) => {
|
|
@@ -62,7 +62,7 @@ const TransitionCore = forwardRef(
|
|
|
62
62
|
enter = true,
|
|
63
63
|
exit = true,
|
|
64
64
|
timeout: _timeout,
|
|
65
|
-
delay: _delay,
|
|
65
|
+
delay: _delay = 0,
|
|
66
66
|
onEnter,
|
|
67
67
|
onEntering,
|
|
68
68
|
onEntered,
|
|
@@ -100,13 +100,16 @@ const TransitionCore = forwardRef(
|
|
|
100
100
|
});
|
|
101
101
|
const innerNodeRef = useRef();
|
|
102
102
|
const nodeRef = useForkRef(innerNodeRef, ref);
|
|
103
|
-
const timeout = typeof _timeout === "object" ? __spreadValues({}, _timeout) : { enter: _timeout, exit: _timeout };
|
|
104
|
-
const delay = typeof _delay === "object" ? _delay : { enter: _delay, exit: _delay };
|
|
105
|
-
timeout.enter
|
|
106
|
-
|
|
103
|
+
const timeout = typeof _timeout === "object" ? __spreadValues({}, _timeout) : { enter: _timeout, exit: _timeout, appear: _timeout };
|
|
104
|
+
const delay = typeof _delay === "object" ? _delay : { enter: _delay, exit: _delay, appear: _delay };
|
|
105
|
+
if (timeout.enter !== void 0)
|
|
106
|
+
timeout.enter += delay.enter || 0;
|
|
107
|
+
if (timeout.exit !== void 0)
|
|
108
|
+
timeout.exit += delay.exit || 0;
|
|
109
|
+
if (timeout.appear !== void 0)
|
|
110
|
+
timeout.appear += delay.appear || 0;
|
|
107
111
|
const nextCallback = useRef(null);
|
|
108
112
|
const appearStatus = useRef(inProp && appear ? ENTERING : null);
|
|
109
|
-
const isFirstRender = useRef(false);
|
|
110
113
|
const cancelNextCallback = () => {
|
|
111
114
|
var _a2;
|
|
112
115
|
if (nextCallback.current !== null) {
|
|
@@ -143,8 +146,8 @@ const TransitionCore = forwardRef(
|
|
|
143
146
|
(_a2 = nextCallback == null ? void 0 : nextCallback.current) == null ? void 0 : _a2.call(nextCallback);
|
|
144
147
|
});
|
|
145
148
|
};
|
|
146
|
-
const performEnter = () => __async(void 0, null, function* () {
|
|
147
|
-
if (!enter) {
|
|
149
|
+
const performEnter = (mounting) => __async(void 0, null, function* () {
|
|
150
|
+
if (!enter && !mounting) {
|
|
148
151
|
safeSetState(ENTERED, () => __async(void 0, null, function* () {
|
|
149
152
|
yield onEntered == null ? void 0 : onEntered(innerNodeRef == null ? void 0 : innerNodeRef.current);
|
|
150
153
|
}));
|
|
@@ -163,7 +166,9 @@ const TransitionCore = forwardRef(
|
|
|
163
166
|
});
|
|
164
167
|
const performExit = () => __async(void 0, null, function* () {
|
|
165
168
|
if (!exit) {
|
|
166
|
-
safeSetState(
|
|
169
|
+
safeSetState(EXITED, () => __async(void 0, null, function* () {
|
|
170
|
+
if (unmountOnExit)
|
|
171
|
+
setStatus(UNMOUNTED);
|
|
167
172
|
yield onExited == null ? void 0 : onExited(innerNodeRef == null ? void 0 : innerNodeRef.current);
|
|
168
173
|
}));
|
|
169
174
|
return;
|
|
@@ -172,34 +177,34 @@ const TransitionCore = forwardRef(
|
|
|
172
177
|
safeSetState(EXITING, () => __async(void 0, null, function* () {
|
|
173
178
|
yield onExiting == null ? void 0 : onExiting(innerNodeRef == null ? void 0 : innerNodeRef.current);
|
|
174
179
|
onTransitionEnd(timeout.exit, () => {
|
|
175
|
-
safeSetState(
|
|
180
|
+
safeSetState(EXITED, () => __async(void 0, null, function* () {
|
|
181
|
+
if (unmountOnExit)
|
|
182
|
+
setStatus(UNMOUNTED);
|
|
176
183
|
yield onExited == null ? void 0 : onExited(innerNodeRef == null ? void 0 : innerNodeRef.current);
|
|
177
184
|
}));
|
|
178
185
|
});
|
|
179
186
|
}));
|
|
180
187
|
});
|
|
181
|
-
const updateStatus = (nextStatus) => {
|
|
188
|
+
const updateStatus = (nextStatus, mounting) => {
|
|
182
189
|
if (nextStatus !== null) {
|
|
183
190
|
cancelNextCallback();
|
|
184
191
|
if (nextStatus === ENTERING) {
|
|
185
|
-
|
|
192
|
+
if (unmountOnExit || mountOnEnter) {
|
|
193
|
+
forceReflow(innerNodeRef == null ? void 0 : innerNodeRef.current);
|
|
194
|
+
}
|
|
195
|
+
performEnter(mounting);
|
|
186
196
|
} else if (nextStatus === EXITING) {
|
|
187
197
|
performExit();
|
|
188
198
|
}
|
|
189
199
|
}
|
|
190
200
|
};
|
|
191
201
|
useEffect(() => {
|
|
192
|
-
nextTick(() => updateStatus(appearStatus.current));
|
|
202
|
+
nextTick(() => updateStatus(appearStatus.current, true));
|
|
193
203
|
return () => {
|
|
194
204
|
cancelNextCallback();
|
|
195
205
|
};
|
|
196
206
|
}, []);
|
|
197
|
-
|
|
198
|
-
const isMounted = status !== UNMOUNTED;
|
|
199
|
-
if (!isFirstRender.current) {
|
|
200
|
-
isFirstRender.current = true;
|
|
201
|
-
return;
|
|
202
|
-
}
|
|
207
|
+
useDidMountEffect(() => {
|
|
203
208
|
let nextStatus = null;
|
|
204
209
|
if (inProp) {
|
|
205
210
|
if (status !== ENTERING && status !== ENTERED) {
|
|
@@ -208,13 +213,13 @@ const TransitionCore = forwardRef(
|
|
|
208
213
|
} else if (status === ENTERING || status === ENTERED) {
|
|
209
214
|
nextStatus = EXITING;
|
|
210
215
|
}
|
|
211
|
-
if (
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
safeSetState(inProp ? "EXITED" : "ENTERED", () => {
|
|
215
|
-
forceReflow(innerNodeRef == null ? void 0 : innerNodeRef.current);
|
|
216
|
-
updateStatus(nextStatus);
|
|
216
|
+
if (inProp && status === UNMOUNTED) {
|
|
217
|
+
safeSetState(EXITED, () => {
|
|
218
|
+
updateStatus(nextStatus, false);
|
|
217
219
|
});
|
|
220
|
+
} else {
|
|
221
|
+
updateStatus(nextStatus, false);
|
|
222
|
+
}
|
|
218
223
|
}, [inProp]);
|
|
219
224
|
if (status === UNMOUNTED)
|
|
220
225
|
return null;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
import React, { useState, useEffect, useRef } from "react";
|
|
33
|
+
import {
|
|
34
|
+
getChildMapping,
|
|
35
|
+
getInitialChildMapping,
|
|
36
|
+
getNextChildMapping
|
|
37
|
+
} from "./utils/childMapping";
|
|
38
|
+
const TransitionGroupContext = React.createContext(null);
|
|
39
|
+
const values = Object.values || ((obj) => Object.keys(obj).map((k) => obj[k]));
|
|
40
|
+
const TransitionGroup = (props) => {
|
|
41
|
+
const _a = props, {
|
|
42
|
+
component: Component = "div",
|
|
43
|
+
children,
|
|
44
|
+
appear,
|
|
45
|
+
enter,
|
|
46
|
+
exit,
|
|
47
|
+
childFactory = (child) => child
|
|
48
|
+
} = _a, restProps = __objRest(_a, [
|
|
49
|
+
"component",
|
|
50
|
+
"children",
|
|
51
|
+
"appear",
|
|
52
|
+
"enter",
|
|
53
|
+
"exit",
|
|
54
|
+
"childFactory"
|
|
55
|
+
]);
|
|
56
|
+
const [state, setState] = useState({
|
|
57
|
+
contextValue: { isMounting: true },
|
|
58
|
+
firstRender: true,
|
|
59
|
+
children: {}
|
|
60
|
+
});
|
|
61
|
+
const mountedRef = useRef(false);
|
|
62
|
+
const handleExitedRef = useRef((child, node) => {
|
|
63
|
+
const currentChildMapping = getChildMapping(children);
|
|
64
|
+
if (child.key in currentChildMapping)
|
|
65
|
+
return;
|
|
66
|
+
if (child.props.onExited) {
|
|
67
|
+
child.props.onExited(node);
|
|
68
|
+
}
|
|
69
|
+
if (mountedRef.current) {
|
|
70
|
+
setState((prevState) => {
|
|
71
|
+
const tempChildren = __spreadValues({}, prevState.children);
|
|
72
|
+
delete tempChildren[child.key];
|
|
73
|
+
return __spreadProps(__spreadValues({}, prevState), { children: tempChildren });
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
mountedRef.current = true;
|
|
79
|
+
setState((prevState) => __spreadProps(__spreadValues({}, prevState), {
|
|
80
|
+
contextValue: { isMounting: false }
|
|
81
|
+
}));
|
|
82
|
+
return () => {
|
|
83
|
+
mountedRef.current = false;
|
|
84
|
+
};
|
|
85
|
+
}, []);
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
setState((prevState) => {
|
|
88
|
+
const { firstRender, children: prevChildMapping } = prevState;
|
|
89
|
+
const handleExited = handleExitedRef.current;
|
|
90
|
+
return __spreadProps(__spreadValues({}, prevState), {
|
|
91
|
+
children: firstRender ? getInitialChildMapping(props, handleExited) : getNextChildMapping(props, prevChildMapping, handleExited),
|
|
92
|
+
firstRender: false
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
}, [children, appear, enter, exit]);
|
|
96
|
+
const { contextValue, children: mappedChildren } = state;
|
|
97
|
+
const valuedChildren = values(mappedChildren).map(
|
|
98
|
+
childFactory
|
|
99
|
+
);
|
|
100
|
+
if (Component === null) {
|
|
101
|
+
return /* @__PURE__ */ React.createElement(TransitionGroupContext.Provider, { value: contextValue }, valuedChildren);
|
|
102
|
+
}
|
|
103
|
+
return /* @__PURE__ */ React.createElement(TransitionGroupContext.Provider, { value: contextValue }, /* @__PURE__ */ React.createElement(Component, __spreadValues({}, restProps), valuedChildren));
|
|
104
|
+
};
|
|
105
|
+
TransitionGroup.displayName = "BuiTransitionGroup";
|
|
106
|
+
var TransitionGroup_default = TransitionGroup;
|
|
107
|
+
export {
|
|
108
|
+
TransitionGroup_default as default
|
|
109
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { OverrideProps } from '@bifrostui/types';
|
|
2
|
+
import React, { ReactElement, ReactNode } from 'react';
|
|
3
|
+
export interface TransitionGroupBaseProps {
|
|
4
|
+
/**
|
|
5
|
+
* 一组 `<Transition>` 组件,它们在离开时会切换为 `in` 和 `out`。`<TransitionGroup>` 会注入特定的过渡属性,因此,
|
|
6
|
+
* 如果您像我们的 `<Fade>` 示例一样包装 `<Transition>`,请记住将它们分散开来。
|
|
7
|
+
* 虽然此组件适用于多个 `Transition` 或 `CSSTransition`子组件,但有时您可能希望只有一个过渡子组件,
|
|
8
|
+
* 其中包含您希望在更改其内容时过渡出和入的内容(例如,路由、图像等)。在这种情况下,您可以在更改过渡子组件的内容时更改其 `key` 属性,
|
|
9
|
+
* 这将导致`TransitionGroup` 将该子组件过渡出和入。
|
|
10
|
+
*/
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* 启用或禁用所有子元素的出现动画
|
|
14
|
+
* 请注意,指定此项将覆盖单个子组件 Transitions 上设置的任何默认设置
|
|
15
|
+
*/
|
|
16
|
+
appear?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* 用于启用或禁用所有子级的进入动画
|
|
19
|
+
* 请注意,指定此项将覆盖单个子组件 Transitions 上设置的任何默认设置
|
|
20
|
+
*/
|
|
21
|
+
enter?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* 用于启用或禁用所有子组件的退出动画。
|
|
24
|
+
* 请注意,指定此项将覆盖单个子组件 Transitions 上设置的任何默认设置
|
|
25
|
+
*/
|
|
26
|
+
exit?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* 您可能需要在子组件退出时对其进行响应式更新。
|
|
29
|
+
* 这通常通过使用 `cloneElement` 来实现,但是,如果子组件退出,该元素已被移除,消费者无法访问。
|
|
30
|
+
* 如果您确实需要在子组件退出时对其进行更新,则可以提供一个 `childFactory`
|
|
31
|
+
* 来包装每个子组件,即使是即将退出的子组件。
|
|
32
|
+
* @default (child) => child
|
|
33
|
+
*/
|
|
34
|
+
childFactory?: (child: ReactElement) => ReactElement;
|
|
35
|
+
}
|
|
36
|
+
export type TransitionGroupProps<D extends React.ElementType = 'div', P = {}> = OverrideProps<{
|
|
37
|
+
props: P & TransitionGroupBaseProps & {
|
|
38
|
+
/**
|
|
39
|
+
* `<TransitionGroup>` 默认渲染一个 `<div>`。您可以通过提供 `component` 属性来更改此行为。
|
|
40
|
+
* 如果您使用的是 React v16+,并且希望避免使用包裹的 `<div>` 元素,
|
|
41
|
+
* 您可以传入 `component={null}`。如果包裹的 div 破坏了您的 CSS 样式,这将非常有用。
|
|
42
|
+
* @default div
|
|
43
|
+
*/
|
|
44
|
+
component?: D | null;
|
|
45
|
+
};
|
|
46
|
+
defaultComponent: D;
|
|
47
|
+
}, D>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Button, TransitionGroup, CSSTransition } from "@bifrostui/react";
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
import "./index.css";
|
|
4
|
+
const TransitionGroupDemo = () => {
|
|
5
|
+
const [items, setItems] = useState([
|
|
6
|
+
{ id: 1, text: "Item 1" },
|
|
7
|
+
{ id: 2, text: "Item 2" },
|
|
8
|
+
{ id: 3, text: "Item 3" }
|
|
9
|
+
]);
|
|
10
|
+
const handleAddItem = () => {
|
|
11
|
+
const id = items.length > 0 ? Math.max(...items.map((item) => item.id)) + 1 : 1;
|
|
12
|
+
setItems((prev) => [...prev, { id, text: `Item ${id}` }]);
|
|
13
|
+
};
|
|
14
|
+
const handleRemoveItem = (id) => {
|
|
15
|
+
setItems((prev) => prev.filter((item) => item.id !== id));
|
|
16
|
+
};
|
|
17
|
+
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Button, { onClick: handleAddItem }, "\u6DFB\u52A0\u9879\u76EE"), /* @__PURE__ */ React.createElement(TransitionGroup, { className: "transition-group-container" }, items.map((item) => /* @__PURE__ */ React.createElement(
|
|
18
|
+
CSSTransition,
|
|
19
|
+
{
|
|
20
|
+
key: item.id,
|
|
21
|
+
unmountOnExit: true,
|
|
22
|
+
timeout: 300,
|
|
23
|
+
classNames: "item"
|
|
24
|
+
},
|
|
25
|
+
/* @__PURE__ */ React.createElement("div", { className: "item-container" }, /* @__PURE__ */ React.createElement("span", null, item.text), /* @__PURE__ */ React.createElement(
|
|
26
|
+
Button,
|
|
27
|
+
{
|
|
28
|
+
size: "small",
|
|
29
|
+
color: "danger",
|
|
30
|
+
onClick: () => handleRemoveItem(item.id)
|
|
31
|
+
},
|
|
32
|
+
"\u5220\u9664"
|
|
33
|
+
))
|
|
34
|
+
))));
|
|
35
|
+
};
|
|
36
|
+
var TransitionGroupDemo_default = TransitionGroupDemo;
|
|
37
|
+
export {
|
|
38
|
+
TransitionGroupDemo_default as default
|
|
39
|
+
};
|
|
@@ -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
|
+
}
|