@bifrostui/react 2.0.0-alpha.0 → 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/Alert/Alert.js +2 -1
- 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/__tests__/fixtures/A11yDemos.js +51 -0
- package/dist/Backdrop/index.css +2 -2
- package/dist/Badge/Badge.js +38 -11
- 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/Button/Button.js +2 -1
- package/dist/Button/__tests__/fixtures/A11yDemos.js +81 -0
- package/dist/Button/index.css +2 -2
- 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 +131 -34
- package/dist/Calendar/__tests__/fixtures/A11yDemos.js +41 -0
- package/dist/Calendar/index.css +52 -9
- package/dist/Calendar/utils.js +33 -23
- package/dist/Checkbox/Checkbox.js +5 -4
- package/dist/Checkbox/__tests__/fixtures/A11yDemos.js +57 -0
- package/dist/Collapse/Collapse.js +26 -12
- 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/__tests__/fixtures/A11yDemos.js +107 -0
- package/dist/Countdown/index.css +11 -0
- package/dist/DatePicker/DatePicker.js +335 -0
- package/dist/DatePicker/DatePicker.types.js +15 -0
- package/dist/DatePicker/constants.js +37 -0
- package/dist/DatePicker/index.js +44 -0
- package/dist/DesktopDatePicker/DesktopDatePicker.css +61 -0
- package/dist/DesktopDatePicker/DesktopDatePicker.js +280 -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.js +41 -0
- package/dist/DesktopDatePicker/useGetDatePickerContent.js +343 -0
- package/dist/DesktopDateTimePicker/DesktopDateTimePicker.js +322 -0
- package/dist/DesktopDateTimePicker/DesktopDateTimePicker.types.js +15 -0
- package/dist/DesktopDateTimePicker/index.css +66 -0
- package/dist/DesktopDateTimePicker/index.js +41 -0
- package/dist/DesktopPicker/DesktopPicker.js +243 -0
- package/dist/DesktopPicker/DesktopPicker.types.js +15 -0
- package/dist/DesktopPicker/index.css +39 -0
- package/dist/DesktopPicker/index.js +41 -0
- package/dist/DesktopPicker/utils/calcAfterMounted.js +25 -0
- package/dist/DesktopPicker/utils/calcAfterMounted.miniapp.js +38 -0
- package/dist/DesktopTimePicker/DesktopTimePicker.js +288 -0
- package/dist/DesktopTimePicker/DesktopTimePicker.types.js +15 -0
- package/dist/DesktopTimePicker/DesktopTimePickerList.js +111 -0
- package/dist/DesktopTimePicker/index.css +170 -0
- package/dist/DesktopTimePicker/index.js +41 -0
- package/dist/DesktopTimePicker/useGetTimePickerContent.js +249 -0
- package/dist/DesktopTimePicker/utils/scrollUtil.js +27 -0
- package/dist/DesktopTimePicker/utils/scrollUtil.miniapp.js +51 -0
- package/dist/DesktopTimePicker/utils/utils.js +408 -0
- package/dist/Dialog/Dialog.js +56 -34
- package/dist/Dialog/FunctionalDialog.js +102 -80
- package/dist/Dialog/__tests__/fixtures/A11yDemos.js +78 -0
- package/dist/Dialog/index.css +19 -19
- package/dist/Dialog/index.js +9 -2
- package/dist/Drawer/Drawer.js +7 -7
- package/dist/Drawer/__tests__/fixtures/A11yDemos.js +148 -0
- package/dist/Fade/Fade.js +2 -2
- package/dist/Fade/Fade.miniapp.js +197 -0
- package/dist/Fade/index.css +18 -0
- package/dist/IconButton/IconButton.js +23 -8
- package/dist/IconButton/index.css +3 -0
- package/dist/Image/Image.js +17 -10
- 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.js +81 -0
- package/dist/Input/index.css +8 -8
- package/dist/Modal/Modal.js +47 -47
- package/dist/Modal/Modal.miniapp.js +48 -32
- package/dist/Modal/ModalManager.js +238 -0
- package/dist/Modal/__tests__/fixtures/A11yDemos.js +52 -0
- package/dist/Modal/index.css +1 -1
- package/dist/Modal/index.js +9 -1
- 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/PickerPanel.css +4 -0
- package/dist/Picker/PickerPanel.js +52 -41
- package/dist/Picker/__tests__/fixtures/A11yDemos.js +79 -0
- package/dist/Picker/index.css +8 -0
- package/dist/Picker/utils.js +9 -12
- package/dist/Popover/Popover.js +123 -91
- 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/Portal/Portal.miniapp.js +7 -4
- package/dist/Portal/PortalCore.js +2 -2
- package/dist/Progress/Progress.js +61 -6
- 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.js +57 -0
- package/dist/Rating/index.css +8 -12
- package/dist/ScrollView/ScrollView.js +48 -196
- package/dist/ScrollView/__tests__/fixtures/A11yDemos.js +319 -0
- package/dist/ScrollView/useScrollView.js +300 -0
- package/dist/Select/Select.js +73 -39
- package/dist/Select/SelectOption.js +5 -1
- package/dist/Select/__tests__/fixtures/A11yDemos.js +154 -0
- package/dist/Select/index.css +12 -8
- package/dist/Slide/Slide.js +2 -2
- package/dist/Slide/Slide.miniapp.js +210 -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.js +349 -0
- package/dist/SwipeAction/SwipeAction.types.js +15 -0
- package/dist/SwipeAction/SwipeActionContext.js +30 -0
- package/dist/SwipeAction/SwipeActionItem.css +31 -0
- package/dist/SwipeAction/SwipeActionItem.js +105 -0
- package/dist/SwipeAction/constants.js +39 -0
- package/dist/SwipeAction/index.css +110 -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.js +57 -0
- package/dist/Tabs/Tab.js +36 -21
- package/dist/Tabs/TabPanel.js +9 -5
- package/dist/Tabs/Tabs.css +2 -2
- package/dist/Tabs/Tabs.js +87 -64
- package/dist/Tabs/TabsContext.js +3 -1
- package/dist/Tabs/index.css +2 -2
- package/dist/Tabs/utils/scroll.js +55 -0
- package/dist/Tag/__tests__/fixtures/A11yDemos.js +196 -0
- package/dist/TextArea/TextArea.js +50 -7
- package/dist/TextArea/__tests__/fixtures/A11yDemos.js +91 -0
- package/dist/TextArea/index.css +4 -4
- package/dist/ThemeProvider/ThemeProvider.types.js +0 -12
- package/dist/Toast/FunctionalToast.js +180 -85
- package/dist/Toast/Toast.js +69 -28
- 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/__tests__/fixtures/A11yDemos.js +100 -0
- package/dist/Tooltip/useTooltip.js +313 -0
- package/dist/Transition/TransitionCore.js +30 -25
- 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 +17 -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/dist/src/Alert/__tests__/fixtures/A11yDemos.d.ts +17 -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.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/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.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/__tests__/fixtures/A11yDemos.d.ts +15 -0
- package/dist/src/CitySelector/CitySelector.types.d.ts +46 -0
- package/dist/src/Collapse/Collapse.d.ts +5 -0
- package/dist/src/Collapse/Collapse.miniapp.d.ts +10 -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/DatePicker/DatePicker.d.ts +4 -0
- package/dist/src/DatePicker/DatePicker.types.d.ts +36 -0
- package/dist/src/DatePicker/constants.d.ts +9 -0
- package/dist/src/DatePicker/index.d.ts +3 -0
- package/dist/src/DesktopDatePicker/DesktopDatePicker.d.ts +5 -0
- package/dist/src/DesktopDatePicker/DesktopDatePicker.types.d.ts +163 -0
- package/dist/src/DesktopDatePicker/index.d.ts +2 -0
- package/dist/src/DesktopDatePicker/useGetDatePickerContent.d.ts +6 -0
- package/dist/src/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +5 -0
- package/dist/src/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +163 -0
- package/dist/src/DesktopDateTimePicker/index.d.ts +2 -0
- package/dist/src/DesktopPicker/DesktopPicker.d.ts +5 -0
- package/dist/src/DesktopPicker/DesktopPicker.types.d.ts +61 -0
- package/dist/src/DesktopPicker/index.d.ts +2 -0
- package/dist/src/DesktopPicker/utils/calcAfterMounted.d.ts +2 -0
- package/dist/src/DesktopPicker/utils/calcAfterMounted.miniapp.d.ts +2 -0
- package/dist/src/DesktopTimePicker/DesktopTimePicker.d.ts +5 -0
- package/dist/src/DesktopTimePicker/DesktopTimePicker.types.d.ts +182 -0
- package/dist/src/DesktopTimePicker/DesktopTimePickerList.d.ts +4 -0
- package/dist/src/DesktopTimePicker/index.d.ts +2 -0
- package/dist/src/DesktopTimePicker/useGetTimePickerContent.d.ts +6 -0
- package/dist/src/DesktopTimePicker/utils/scrollUtil.d.ts +2 -0
- package/dist/src/DesktopTimePicker/utils/scrollUtil.miniapp.d.ts +2 -0
- package/dist/src/DesktopTimePicker/utils/utils.d.ts +28 -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/Drawer/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/dist/src/Fade/Fade.miniapp.d.ts +10 -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/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/dist/src/ItemSelector/ItemSelector.types.d.ts +39 -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/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.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.types.d.ts +72 -0
- package/dist/src/Progress/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/dist/src/Radio/__tests__/fixtures/A11yDemos.d.ts +15 -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.types.d.ts +104 -0
- package/dist/src/Select/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/dist/src/Select/selectContext.d.ts +3 -0
- package/dist/src/Slide/Slide.miniapp.d.ts +14 -0
- package/dist/src/SwipeAction/SwipeAction.d.ts +5 -0
- package/dist/src/SwipeAction/SwipeAction.types.d.ts +75 -0
- package/dist/src/SwipeAction/SwipeActionContext.d.ts +3 -0
- package/dist/src/SwipeAction/SwipeActionItem.d.ts +5 -0
- package/dist/src/SwipeAction/constants.d.ts +9 -0
- package/dist/src/SwipeAction/index.d.ts +5 -0
- package/dist/src/Switch/__tests__/fixtures/A11yDemos.d.ts +15 -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/Tabs/utils/scroll.d.ts +2 -0
- package/dist/src/Tag/__tests__/fixtures/A11yDemos.d.ts +21 -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/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.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/Alert/Alert.js +2 -1
- 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/__tests__/fixtures/A11yDemos.js +17 -0
- package/es/Backdrop/index.css +2 -2
- package/es/Badge/Badge.js +38 -11
- 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/Button/Button.js +2 -1
- package/es/Button/__tests__/fixtures/A11yDemos.js +42 -0
- package/es/Button/index.css +2 -2
- 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 +131 -34
- package/es/Calendar/__tests__/fixtures/A11yDemos.js +8 -0
- package/es/Calendar/index.css +52 -9
- package/es/Calendar/utils.js +29 -20
- package/es/Checkbox/Checkbox.js +5 -4
- package/es/Checkbox/__tests__/fixtures/A11yDemos.js +22 -0
- package/es/Collapse/Collapse.js +26 -12
- 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/__tests__/fixtures/A11yDemos.js +68 -0
- package/es/Countdown/index.css +11 -0
- package/es/DatePicker/DatePicker.js +308 -0
- package/es/DatePicker/DatePicker.types.js +1 -0
- package/es/DatePicker/constants.js +14 -0
- package/es/DatePicker/index.js +8 -0
- package/es/DesktopDatePicker/DesktopDatePicker.css +61 -0
- package/es/DesktopDatePicker/DesktopDatePicker.js +253 -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.js +6 -0
- package/es/DesktopDatePicker/useGetDatePickerContent.js +316 -0
- package/es/DesktopDateTimePicker/DesktopDateTimePicker.js +295 -0
- package/es/DesktopDateTimePicker/DesktopDateTimePicker.types.js +1 -0
- package/es/DesktopDateTimePicker/index.css +66 -0
- package/es/DesktopDateTimePicker/index.js +9 -0
- package/es/DesktopPicker/DesktopPicker.js +226 -0
- package/es/DesktopPicker/DesktopPicker.types.js +1 -0
- package/es/DesktopPicker/index.css +39 -0
- package/es/DesktopPicker/index.js +6 -0
- package/es/DesktopPicker/utils/calcAfterMounted.js +6 -0
- package/es/DesktopPicker/utils/calcAfterMounted.miniapp.js +9 -0
- package/es/DesktopTimePicker/DesktopTimePicker.js +261 -0
- package/es/DesktopTimePicker/DesktopTimePicker.types.js +1 -0
- package/es/DesktopTimePicker/DesktopTimePickerList.js +84 -0
- package/es/DesktopTimePicker/index.css +170 -0
- package/es/DesktopTimePicker/index.js +6 -0
- package/es/DesktopTimePicker/useGetTimePickerContent.js +226 -0
- package/es/DesktopTimePicker/utils/scrollUtil.js +8 -0
- package/es/DesktopTimePicker/utils/scrollUtil.miniapp.js +22 -0
- package/es/DesktopTimePicker/utils/utils.js +365 -0
- package/es/Dialog/Dialog.js +57 -35
- package/es/Dialog/FunctionalDialog.js +106 -84
- package/es/Dialog/__tests__/fixtures/A11yDemos.js +43 -0
- package/es/Dialog/index.css +19 -19
- package/es/Dialog/index.js +10 -3
- package/es/Drawer/Drawer.js +8 -8
- package/es/Drawer/__tests__/fixtures/A11yDemos.js +112 -0
- package/es/Fade/Fade.js +2 -2
- package/es/Fade/Fade.miniapp.js +176 -0
- package/es/Fade/index.css +18 -0
- package/es/IconButton/IconButton.js +23 -8
- package/es/IconButton/index.css +3 -0
- package/es/Image/Image.js +17 -10
- 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.js +43 -0
- package/es/Input/index.css +8 -8
- package/es/Modal/Modal.js +48 -48
- package/es/Modal/Modal.miniapp.js +49 -33
- package/es/Modal/ModalManager.js +214 -0
- package/es/Modal/__tests__/fixtures/A11yDemos.js +18 -0
- package/es/Modal/index.css +1 -1
- package/es/Modal/index.js +6 -1
- 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/PickerPanel.css +4 -0
- package/es/Picker/PickerPanel.js +52 -41
- package/es/Picker/__tests__/fixtures/A11yDemos.js +46 -0
- package/es/Picker/index.css +8 -0
- package/es/Picker/utils.js +9 -12
- package/es/Popover/Popover.js +130 -99
- 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/Portal/Portal.miniapp.js +8 -5
- package/es/Portal/PortalCore.js +2 -2
- package/es/Progress/Progress.js +61 -6
- 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.js +22 -0
- package/es/Rating/index.css +8 -12
- package/es/ScrollView/ScrollView.js +51 -197
- package/es/ScrollView/__tests__/fixtures/A11yDemos.js +283 -0
- package/es/ScrollView/useScrollView.js +279 -0
- package/es/Select/Select.js +73 -40
- package/es/Select/SelectOption.js +5 -1
- package/es/Select/__tests__/fixtures/A11yDemos.js +118 -0
- package/es/Select/index.css +12 -8
- package/es/Slide/Slide.js +2 -2
- package/es/Slide/Slide.miniapp.js +189 -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.js +334 -0
- package/es/SwipeAction/SwipeAction.types.js +1 -0
- package/es/SwipeAction/SwipeActionContext.js +11 -0
- package/es/SwipeAction/SwipeActionItem.css +31 -0
- package/es/SwipeAction/SwipeActionItem.js +78 -0
- package/es/SwipeAction/constants.js +15 -0
- package/es/SwipeAction/index.css +110 -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.js +22 -0
- package/es/Tabs/Tab.js +36 -21
- package/es/Tabs/TabPanel.js +8 -4
- package/es/Tabs/Tabs.css +2 -2
- package/es/Tabs/Tabs.js +87 -64
- package/es/Tabs/TabsContext.js +3 -1
- package/es/Tabs/index.css +2 -2
- package/es/Tabs/utils/scroll.js +36 -0
- package/es/Tag/__tests__/fixtures/A11yDemos.js +160 -0
- package/es/TextArea/TextArea.js +51 -8
- package/es/TextArea/__tests__/fixtures/A11yDemos.js +54 -0
- package/es/TextArea/index.css +4 -4
- package/es/Toast/FunctionalToast.js +186 -86
- package/es/Toast/Toast.js +69 -28
- 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/__tests__/fixtures/A11yDemos.js +60 -0
- package/es/Tooltip/useTooltip.js +290 -0
- package/es/Transition/TransitionCore.js +31 -26
- 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 +8 -0
- 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/es/src/Alert/__tests__/fixtures/A11yDemos.d.ts +17 -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.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/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.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/__tests__/fixtures/A11yDemos.d.ts +15 -0
- package/es/src/CitySelector/CitySelector.types.d.ts +46 -0
- package/es/src/Collapse/Collapse.d.ts +5 -0
- package/es/src/Collapse/Collapse.miniapp.d.ts +10 -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/DatePicker/DatePicker.d.ts +4 -0
- package/es/src/DatePicker/DatePicker.types.d.ts +36 -0
- package/es/src/DatePicker/constants.d.ts +9 -0
- package/es/src/DatePicker/index.d.ts +3 -0
- package/es/src/DesktopDatePicker/DesktopDatePicker.d.ts +5 -0
- package/es/src/DesktopDatePicker/DesktopDatePicker.types.d.ts +163 -0
- package/es/src/DesktopDatePicker/index.d.ts +2 -0
- package/es/src/DesktopDatePicker/useGetDatePickerContent.d.ts +6 -0
- package/es/src/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +5 -0
- package/es/src/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +163 -0
- package/es/src/DesktopDateTimePicker/index.d.ts +2 -0
- package/es/src/DesktopPicker/DesktopPicker.d.ts +5 -0
- package/es/src/DesktopPicker/DesktopPicker.types.d.ts +61 -0
- package/es/src/DesktopPicker/index.d.ts +2 -0
- package/es/src/DesktopPicker/utils/calcAfterMounted.d.ts +2 -0
- package/es/src/DesktopPicker/utils/calcAfterMounted.miniapp.d.ts +2 -0
- package/es/src/DesktopTimePicker/DesktopTimePicker.d.ts +5 -0
- package/es/src/DesktopTimePicker/DesktopTimePicker.types.d.ts +182 -0
- package/es/src/DesktopTimePicker/DesktopTimePickerList.d.ts +4 -0
- package/es/src/DesktopTimePicker/index.d.ts +2 -0
- package/es/src/DesktopTimePicker/useGetTimePickerContent.d.ts +6 -0
- package/es/src/DesktopTimePicker/utils/scrollUtil.d.ts +2 -0
- package/es/src/DesktopTimePicker/utils/scrollUtil.miniapp.d.ts +2 -0
- package/es/src/DesktopTimePicker/utils/utils.d.ts +28 -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/Drawer/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/es/src/Fade/Fade.miniapp.d.ts +10 -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/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/es/src/ItemSelector/ItemSelector.types.d.ts +39 -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/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.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.types.d.ts +72 -0
- package/es/src/Progress/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/es/src/Radio/__tests__/fixtures/A11yDemos.d.ts +15 -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.types.d.ts +104 -0
- package/es/src/Select/__tests__/fixtures/A11yDemos.d.ts +21 -0
- package/es/src/Select/selectContext.d.ts +3 -0
- package/es/src/Slide/Slide.miniapp.d.ts +14 -0
- package/es/src/Stack/demo/StackDemo.d.ts +4 -0
- package/es/src/SwipeAction/SwipeAction.d.ts +5 -0
- package/es/src/SwipeAction/SwipeAction.types.d.ts +75 -0
- package/es/src/SwipeAction/SwipeActionContext.d.ts +3 -0
- package/es/src/SwipeAction/SwipeActionItem.d.ts +5 -0
- package/es/src/SwipeAction/constants.d.ts +9 -0
- package/es/src/SwipeAction/index.d.ts +5 -0
- package/es/src/Switch/__tests__/fixtures/A11yDemos.d.ts +15 -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/Tabs/utils/scroll.d.ts +2 -0
- package/es/src/Tag/__tests__/fixtures/A11yDemos.d.ts +21 -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/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.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 +9 -6
- package/dist/Backdrop/Backdrop.types.d.ts +0 -17
- package/dist/Badge/Badge.types.d.ts +0 -27
- package/dist/Calendar/Calendar.types.d.ts +0 -97
- package/dist/Calendar/utils.d.ts +0 -25
- package/dist/CitySelector/CitySelector.types.d.ts +0 -47
- package/dist/Collapse/Collapse.d.ts +0 -5
- package/dist/Countdown/Countdown.types.d.ts +0 -123
- package/dist/Dialog/Dialog.d.ts +0 -5
- package/dist/Dialog/Dialog.types.d.ts +0 -109
- package/dist/Dialog/FunctionalDialog.d.ts +0 -3
- package/dist/Dialog/index.d.ts +0 -2
- package/dist/IconButton/IconButton.types.d.ts +0 -42
- package/dist/ItemSelector/ItemSelector.types.d.ts +0 -40
- 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/Picker/Picker.types.d.ts +0 -108
- package/dist/Picker/utils.d.ts +0 -29
- package/dist/Popover/Popover.types.d.ts +0 -57
- package/dist/Portal/Portal.types.d.ts +0 -26
- package/dist/Progress/Progress.types.d.ts +0 -28
- package/dist/ScrollView/ScrollView.types.d.ts +0 -258
- package/dist/Select/Select.types.d.ts +0 -104
- package/dist/Select/selectContext.d.ts +0 -4
- 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 -35
- package/dist/Tabs/TabsContext.d.ts +0 -9
- package/dist/Tabs/utils/bound.d.ts +0 -1
- package/dist/Tabs/utils/bound.js +0 -32
- package/dist/TextArea/TextArea.types.d.ts +0 -70
- package/dist/ThemeProvider/ThemeProvider.types.d.ts +0 -122
- package/dist/Toast/FunctionalToast.d.ts +0 -3
- package/dist/Toast/Toast.d.ts +0 -5
- package/dist/Toast/Toast.types.d.ts +0 -101
- package/dist/Tooltip/Tooltip.types.d.ts +0 -48
- package/dist/index.d.ts +0 -50
- package/dist/locales/base.d.ts +0 -40
- package/es/Backdrop/Backdrop.types.d.ts +0 -17
- package/es/Badge/Badge.types.d.ts +0 -27
- package/es/Calendar/Calendar.types.d.ts +0 -97
- package/es/Calendar/utils.d.ts +0 -25
- package/es/CitySelector/CitySelector.types.d.ts +0 -47
- package/es/Collapse/Collapse.d.ts +0 -5
- package/es/Countdown/Countdown.types.d.ts +0 -123
- package/es/Dialog/Dialog.d.ts +0 -5
- package/es/Dialog/Dialog.types.d.ts +0 -109
- package/es/Dialog/FunctionalDialog.d.ts +0 -3
- package/es/Dialog/index.d.ts +0 -2
- package/es/IconButton/IconButton.types.d.ts +0 -42
- package/es/ItemSelector/ItemSelector.types.d.ts +0 -40
- 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/Picker/Picker.types.d.ts +0 -108
- package/es/Picker/utils.d.ts +0 -29
- package/es/Popover/Popover.types.d.ts +0 -57
- package/es/Portal/Portal.types.d.ts +0 -26
- package/es/Progress/Progress.types.d.ts +0 -28
- package/es/ScrollView/ScrollView.types.d.ts +0 -258
- package/es/Select/Select.types.d.ts +0 -104
- package/es/Select/selectContext.d.ts +0 -4
- 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 -35
- package/es/Tabs/TabsContext.d.ts +0 -9
- package/es/Tabs/utils/bound.d.ts +0 -1
- package/es/Tabs/utils/bound.js +0 -13
- package/es/TextArea/TextArea.types.d.ts +0 -70
- package/es/ThemeProvider/ThemeProvider.types.d.ts +0 -122
- package/es/Toast/FunctionalToast.d.ts +0 -3
- package/es/Toast/Toast.d.ts +0 -5
- package/es/Toast/Toast.types.d.ts +0 -101
- package/es/Tooltip/Tooltip.types.d.ts +0 -48
- package/es/index.d.ts +0 -50
- package/es/locales/base.d.ts +0 -40
- /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}/ActionSheetItem.types.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}/Alert.types.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}/Backdrop.d.ts +0 -0
- /package/dist/{Backdrop → src/Backdrop}/index.d.ts +0 -0
- /package/dist/{Badge → src/Badge}/Badge.d.ts +0 -0
- /package/dist/{Badge → src/Badge}/index.d.ts +0 -0
- /package/dist/{Breadcrumb → src/Breadcrumb}/Breadcrumb.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}/Button.d.ts +0 -0
- /package/dist/{Button → src/Button}/Button.types.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}/Calendar.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.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}/CheckboxGroup.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/dist/{CitySelector → src/CitySelector}/CitySelector.miniapp.d.ts +0 -0
- /package/dist/{CitySelector → src/CitySelector}/CitySelectorCore.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.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}/Countdown.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/{Divider → src/Divider}/Divider.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.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.types.d.ts +0 -0
- /package/dist/{Fade → src/Fade}/index.d.ts +0 -0
- /package/dist/{IconButton → src/IconButton}/IconButton.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.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/dist/{ItemSelector → src/ItemSelector}/ItemSelector.miniapp.d.ts +0 -0
- /package/dist/{ItemSelector → src/ItemSelector}/ItemSelectorCore.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.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/{Modal → src/Modal}/Modal.d.ts +0 -0
- /package/dist/{NavBar → src/NavBar}/NavBar.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}/Popover.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}/Progress.d.ts +0 -0
- /package/dist/{Progress → src/Progress}/index.d.ts +0 -0
- /package/dist/{Radio → src/Radio}/Radio.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}/RadioGroup.d.ts +0 -0
- /package/dist/{Radio → src/Radio}/index.d.ts +0 -0
- /package/dist/{Rating → src/Rating}/Rating.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.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}/Select.d.ts +0 -0
- /package/dist/{Select → src/Select}/SelectOption.d.ts +0 -0
- /package/dist/{Select → src/Select}/index.d.ts +0 -0
- /package/dist/{Skeleton → src/Skeleton}/Skeleton.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.types.d.ts +0 -0
- /package/dist/{Slide → src/Slide}/index.d.ts +0 -0
- /package/dist/{Slider → src/Slider}/Slider.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.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.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/{Swiper → src/Swiper}/Swiper.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}/Switch.d.ts +0 -0
- /package/dist/{Switch → src/Switch}/Switch.types.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}/TabBarContext.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/{TabBar → src/TabBar}/index.types.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/{Tag → src/Tag}/Tag.d.ts +0 -0
- /package/dist/{Tag → src/Tag}/Tag.types.d.ts +0 -0
- /package/dist/{Tag → src/Tag}/TagGroup.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}/TextArea.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/constants.d.ts +0 -0
- /package/dist/{ThemeProvider → src/ThemeProvider}/utils/index.d.ts +0 -0
- /package/dist/{ThemeProvider → src/ThemeProvider}/utils/mountTokens.d.ts +0 -0
- /package/dist/{Toast → src/Toast}/index.d.ts +0 -0
- /package/dist/{Tooltip → src/Tooltip}/Tooltip.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/{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}/ActionSheetItem.types.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}/Alert.types.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}/Backdrop.d.ts +0 -0
- /package/es/{Backdrop → src/Backdrop}/index.d.ts +0 -0
- /package/es/{Badge → src/Badge}/Badge.d.ts +0 -0
- /package/es/{Badge → src/Badge}/index.d.ts +0 -0
- /package/es/{Breadcrumb → src/Breadcrumb}/Breadcrumb.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}/Button.d.ts +0 -0
- /package/es/{Button → src/Button}/Button.types.d.ts +0 -0
- /package/es/{Button → src/Button}/index.d.ts +0 -0
- /package/es/{Calendar → src/Calendar}/Calendar.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.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}/CheckboxGroup.d.ts +0 -0
- /package/es/{Checkbox → src/Checkbox}/index.d.ts +0 -0
- /package/es/{CitySelector → src/CitySelector}/CitySelector.d.ts +0 -0
- /package/es/{CitySelector → src/CitySelector}/CitySelector.miniapp.d.ts +0 -0
- /package/es/{CitySelector → src/CitySelector}/CitySelectorCore.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.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}/Countdown.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/{Divider → src/Divider}/Divider.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.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.types.d.ts +0 -0
- /package/es/{Fade → src/Fade}/index.d.ts +0 -0
- /package/es/{IconButton → src/IconButton}/IconButton.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.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}/ItemSelector.d.ts +0 -0
- /package/es/{ItemSelector → src/ItemSelector}/ItemSelector.miniapp.d.ts +0 -0
- /package/es/{ItemSelector → src/ItemSelector}/ItemSelectorCore.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.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/{Modal → src/Modal}/Modal.d.ts +0 -0
- /package/es/{NavBar → src/NavBar}/NavBar.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}/Popover.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}/Progress.d.ts +0 -0
- /package/es/{Progress → src/Progress}/index.d.ts +0 -0
- /package/es/{Radio → src/Radio}/Radio.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}/RadioGroup.d.ts +0 -0
- /package/es/{Radio → src/Radio}/index.d.ts +0 -0
- /package/es/{Rating → src/Rating}/Rating.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.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}/Select.d.ts +0 -0
- /package/es/{Select → src/Select}/SelectOption.d.ts +0 -0
- /package/es/{Select → src/Select}/index.d.ts +0 -0
- /package/es/{Skeleton → src/Skeleton}/Skeleton.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.types.d.ts +0 -0
- /package/es/{Slide → src/Slide}/index.d.ts +0 -0
- /package/es/{Slider → src/Slider}/Slider.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.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.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/{Swiper → src/Swiper}/Swiper.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}/Switch.d.ts +0 -0
- /package/es/{Switch → src/Switch}/Switch.types.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}/TabBarContext.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/{TabBar → src/TabBar}/index.types.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/{Tag → src/Tag}/Tag.d.ts +0 -0
- /package/es/{Tag → src/Tag}/Tag.types.d.ts +0 -0
- /package/es/{Tag → src/Tag}/TagGroup.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}/TextArea.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/constants.d.ts +0 -0
- /package/es/{ThemeProvider → src/ThemeProvider}/utils/index.d.ts +0 -0
- /package/es/{ThemeProvider → src/ThemeProvider}/utils/mountTokens.d.ts +0 -0
- /package/es/{Toast → src/Toast}/index.d.ts +0 -0
- /package/es/{Tooltip → src/Tooltip}/Tooltip.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
package/es/TextArea/TextArea.js
CHANGED
|
@@ -31,12 +31,14 @@ var __objRest = (source, exclude) => {
|
|
|
31
31
|
};
|
|
32
32
|
import { isMini, useForkRef, useValue } from "@bifrostui/utils";
|
|
33
33
|
import clsx from "clsx";
|
|
34
|
-
import React, { useEffect, useRef } from "react";
|
|
34
|
+
import React, { useEffect, useRef, useState } from "react";
|
|
35
|
+
import { useLocaleText } from "../locales";
|
|
35
36
|
import "./index.css";
|
|
36
37
|
const prefixCls = "bui-textarea";
|
|
37
38
|
const DEFAULT_ROWS = 2;
|
|
38
39
|
const TextArea = /* @__PURE__ */ React.forwardRef(
|
|
39
40
|
(props, ref) => {
|
|
41
|
+
const textareaText = useLocaleText("textarea");
|
|
40
42
|
const _a = props, {
|
|
41
43
|
className,
|
|
42
44
|
value,
|
|
@@ -47,10 +49,19 @@ const TextArea = /* @__PURE__ */ React.forwardRef(
|
|
|
47
49
|
placeholder,
|
|
48
50
|
disabled,
|
|
49
51
|
rows = DEFAULT_ROWS,
|
|
50
|
-
maxLength,
|
|
52
|
+
maxLength: maxLength,
|
|
51
53
|
autoSize = false,
|
|
52
|
-
autoFocus = false,
|
|
53
|
-
showCount = false,
|
|
54
|
+
autoFocus: autoFocus = false,
|
|
55
|
+
showCount: showCount = false,
|
|
56
|
+
// 是否展示字数统计
|
|
57
|
+
// 无障碍属性
|
|
58
|
+
"aria-label": ariaLabel = textareaText.labelName,
|
|
59
|
+
"aria-hidden": ariaHidden,
|
|
60
|
+
"aria-details": ariaDetails,
|
|
61
|
+
"aria-required": ariaRequired,
|
|
62
|
+
"aria-readonly": ariaReadonly,
|
|
63
|
+
"aria-rowindex": ariaRowindex,
|
|
64
|
+
"aria-colcount": ariaColcount,
|
|
54
65
|
onChange
|
|
55
66
|
} = _a, others = __objRest(_a, [
|
|
56
67
|
"className",
|
|
@@ -62,10 +73,20 @@ const TextArea = /* @__PURE__ */ React.forwardRef(
|
|
|
62
73
|
"placeholder",
|
|
63
74
|
"disabled",
|
|
64
75
|
"rows",
|
|
76
|
+
// 默认行数
|
|
65
77
|
"maxLength",
|
|
66
78
|
"autoSize",
|
|
79
|
+
// 是否自适应高度
|
|
67
80
|
"autoFocus",
|
|
81
|
+
// 是否自动聚焦
|
|
68
82
|
"showCount",
|
|
83
|
+
"aria-label",
|
|
84
|
+
"aria-hidden",
|
|
85
|
+
"aria-details",
|
|
86
|
+
"aria-required",
|
|
87
|
+
"aria-readonly",
|
|
88
|
+
"aria-rowindex",
|
|
89
|
+
"aria-colcount",
|
|
69
90
|
"onChange"
|
|
70
91
|
]);
|
|
71
92
|
const [textAreaValue, triggerChange] = useValue({
|
|
@@ -80,7 +101,7 @@ const TextArea = /* @__PURE__ */ React.forwardRef(
|
|
|
80
101
|
if (autoFocus && internalRef.current) {
|
|
81
102
|
internalRef.current.focus();
|
|
82
103
|
}
|
|
83
|
-
}, [
|
|
104
|
+
}, [autoFocus]);
|
|
84
105
|
const handleAutoHeight = (height) => {
|
|
85
106
|
if (typeof autoSize === "object") {
|
|
86
107
|
const { maxHeight, minHeight } = autoSize;
|
|
@@ -110,8 +131,7 @@ const TextArea = /* @__PURE__ */ React.forwardRef(
|
|
|
110
131
|
const textArea = internalRef.current;
|
|
111
132
|
const { height, lineCount } = (e == null ? void 0 : e.detail) || {};
|
|
112
133
|
const line = lineCount <= 1 ? rows : lineCount;
|
|
113
|
-
|
|
114
|
-
textAreaHeight = handleAutoHeight(textAreaHeight);
|
|
134
|
+
const textAreaHeight = handleAutoHeight(line * (height / lineCount));
|
|
115
135
|
if (!initLock.current && !autoSize && rows === DEFAULT_ROWS) {
|
|
116
136
|
textArea.style.height = `${textAreaHeight}px`;
|
|
117
137
|
initLock.current = true;
|
|
@@ -121,12 +141,29 @@ const TextArea = /* @__PURE__ */ React.forwardRef(
|
|
|
121
141
|
textArea.style.height = `${textAreaHeight}px`;
|
|
122
142
|
}
|
|
123
143
|
};
|
|
144
|
+
const [ariaDescription, setAriaDescription] = useState("");
|
|
124
145
|
let nativeProps = {
|
|
125
|
-
[isMini ? "maxlength" : "maxLength"]: maxLength != null ? maxLength : -1
|
|
146
|
+
[isMini ? "maxlength" : "maxLength"]: maxLength != null ? maxLength : -1,
|
|
147
|
+
"aria-description": ariaDescription
|
|
126
148
|
};
|
|
149
|
+
const accessibilityProps = {
|
|
150
|
+
"aria-label": ariaLabel,
|
|
151
|
+
"aria-hidden": ariaHidden,
|
|
152
|
+
"aria-details": ariaDetails,
|
|
153
|
+
"aria-required": ariaRequired,
|
|
154
|
+
"aria-readonly": ariaReadonly,
|
|
155
|
+
"aria-rowindex": ariaRowindex,
|
|
156
|
+
"aria-colcount": ariaColcount
|
|
157
|
+
};
|
|
158
|
+
Object.keys(accessibilityProps).forEach((key) => {
|
|
159
|
+
if (accessibilityProps[key] !== void 0) {
|
|
160
|
+
nativeProps[key] = accessibilityProps[key];
|
|
161
|
+
}
|
|
162
|
+
});
|
|
127
163
|
if (isMini) {
|
|
128
164
|
nativeProps = __spreadProps(__spreadValues({}, nativeProps), {
|
|
129
165
|
onLineChange: handleLineChange,
|
|
166
|
+
// 小程序行高变化事件
|
|
130
167
|
placeholderClass: "bui-mini-placeholder",
|
|
131
168
|
autoFocus,
|
|
132
169
|
focus: autoFocus
|
|
@@ -162,6 +199,12 @@ const TextArea = /* @__PURE__ */ React.forwardRef(
|
|
|
162
199
|
},
|
|
163
200
|
onInput: (e) => {
|
|
164
201
|
var _a2;
|
|
202
|
+
if (showCount) {
|
|
203
|
+
const remaining = maxLength - e.target.value.length;
|
|
204
|
+
setAriaDescription(
|
|
205
|
+
`${textareaText.remaining} ${remaining} ${textareaText.characters}`
|
|
206
|
+
);
|
|
207
|
+
}
|
|
165
208
|
if (isMini) {
|
|
166
209
|
triggerChange(e, e.target.value);
|
|
167
210
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import TextArea from "../../TextArea";
|
|
3
|
+
const basicTextAreaDemo = () => {
|
|
4
|
+
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(TextArea, { placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9" }));
|
|
5
|
+
};
|
|
6
|
+
const ariaLabelTextAreaDemo = () => {
|
|
7
|
+
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(TextArea, { placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9", "aria-label": "\u7528\u6237\u8BC4\u8BBA\u8F93\u5165\u6846" }));
|
|
8
|
+
};
|
|
9
|
+
const requiredAndReadonlyTextAreaDemo = () => {
|
|
10
|
+
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(TextArea, { placeholder: "\u5FC5\u586B\u9879", "aria-required": true }), /* @__PURE__ */ React.createElement(
|
|
11
|
+
TextArea,
|
|
12
|
+
{
|
|
13
|
+
placeholder: "\u53EA\u8BFB\u9879",
|
|
14
|
+
"aria-readonly": true,
|
|
15
|
+
defaultValue: "\u8FD9\u662F\u53EA\u8BFB\u5185\u5BB9"
|
|
16
|
+
}
|
|
17
|
+
));
|
|
18
|
+
};
|
|
19
|
+
const showCountTextAreaDemo = () => {
|
|
20
|
+
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
|
|
21
|
+
TextArea,
|
|
22
|
+
{
|
|
23
|
+
placeholder: "\u6700\u591A\u8F93\u516550\u4E2A\u5B57",
|
|
24
|
+
maxLength: 50,
|
|
25
|
+
showCount: true,
|
|
26
|
+
"aria-label": "\u5E26\u5B57\u6570\u7EDF\u8BA1\u7684\u8F93\u5165\u6846"
|
|
27
|
+
}
|
|
28
|
+
));
|
|
29
|
+
};
|
|
30
|
+
const autoFocusTextAreaDemo = () => {
|
|
31
|
+
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
|
|
32
|
+
TextArea,
|
|
33
|
+
{
|
|
34
|
+
placeholder: "\u81EA\u52A8\u805A\u7126",
|
|
35
|
+
autoFocus: true,
|
|
36
|
+
"aria-label": "\u81EA\u52A8\u805A\u7126\u7684\u8F93\u5165\u6846"
|
|
37
|
+
}
|
|
38
|
+
));
|
|
39
|
+
};
|
|
40
|
+
var A11yDemos_default = {
|
|
41
|
+
basicTextAreaDemo,
|
|
42
|
+
ariaLabelTextAreaDemo,
|
|
43
|
+
requiredAndReadonlyTextAreaDemo,
|
|
44
|
+
showCountTextAreaDemo,
|
|
45
|
+
autoFocusTextAreaDemo
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
ariaLabelTextAreaDemo,
|
|
49
|
+
autoFocusTextAreaDemo,
|
|
50
|
+
basicTextAreaDemo,
|
|
51
|
+
A11yDemos_default as default,
|
|
52
|
+
requiredAndReadonlyTextAreaDemo,
|
|
53
|
+
showCountTextAreaDemo
|
|
54
|
+
};
|
package/es/TextArea/index.css
CHANGED
|
@@ -3,9 +3,9 @@ page,
|
|
|
3
3
|
xhs-page {
|
|
4
4
|
--bui-textarea-border-radius: var(--bui-shape-radius-label);
|
|
5
5
|
--bui-textarea-width: 100%;
|
|
6
|
-
--bui-textarea-
|
|
6
|
+
--bui-textarea-bg-color: var(--bui-color-bg-default);
|
|
7
7
|
--bui-textarea-text-color: var(--bui-color-fg-subtle);
|
|
8
|
-
--bui-textarea-count-
|
|
8
|
+
--bui-textarea-count-bg-color: var(--bui-textarea-bg-color, var(--bui-color-bg-default));
|
|
9
9
|
--bui-textarea-count-color: var(--bui-color-fg-subtle);
|
|
10
10
|
--bui-textarea-text-font-size: var(--bui-text-size-2);
|
|
11
11
|
--bui-textarea-count-font-size: var(--bui-title-size-3);
|
|
@@ -37,7 +37,7 @@ xhs-page {
|
|
|
37
37
|
.bui-textarea-content {
|
|
38
38
|
width: var(--bui-textarea-width);
|
|
39
39
|
resize: none;
|
|
40
|
-
background-color: var(--bui-textarea-
|
|
40
|
+
background-color: var(--bui-textarea-bg-color);
|
|
41
41
|
padding: var(--bui-textarea-padding);
|
|
42
42
|
border: none;
|
|
43
43
|
outline: none;
|
|
@@ -49,7 +49,7 @@ xhs-page {
|
|
|
49
49
|
line-height: var(--bui-textarea-placeholder-line-height);
|
|
50
50
|
}
|
|
51
51
|
.bui-textarea-count {
|
|
52
|
-
background-color: var(--bui-textarea-count-
|
|
52
|
+
background-color: var(--bui-textarea-count-bg-color);
|
|
53
53
|
color: var(--bui-textarea-count-color);
|
|
54
54
|
text-align: right;
|
|
55
55
|
padding: var(--bui-textarea-count-padding);
|
|
@@ -29,129 +29,229 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
-
import
|
|
33
|
-
|
|
32
|
+
import React, {
|
|
33
|
+
useCallback,
|
|
34
|
+
useEffect,
|
|
35
|
+
useState,
|
|
36
|
+
useRef
|
|
37
|
+
} from "react";
|
|
38
|
+
import { render, unmount, getRootContainer } from "@bifrostui/utils";
|
|
39
|
+
import Portal from "../Portal";
|
|
34
40
|
import ToastView from "./Toast";
|
|
35
|
-
|
|
41
|
+
const defaultProps = {
|
|
42
|
+
duration: 2e3,
|
|
43
|
+
position: "center",
|
|
44
|
+
multiple: false,
|
|
45
|
+
disableClick: false
|
|
46
|
+
};
|
|
47
|
+
const toastCloses = [];
|
|
36
48
|
const formatProps = (props) => {
|
|
37
|
-
|
|
38
|
-
return { message: props };
|
|
39
|
-
}
|
|
40
|
-
return props;
|
|
49
|
+
return typeof props === "string" ? { message: props } : props;
|
|
41
50
|
};
|
|
42
|
-
const destroyAll = () => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
closeToast();
|
|
46
|
-
|
|
47
|
-
}
|
|
51
|
+
const destroyAll = (closes) => {
|
|
52
|
+
do {
|
|
53
|
+
const closeToast = closes.pop();
|
|
54
|
+
closeToast == null ? void 0 : closeToast();
|
|
55
|
+
} while (closes.length > 0);
|
|
48
56
|
};
|
|
49
|
-
const
|
|
50
|
-
const options = __spreadValues({
|
|
51
|
-
duration: 2e3,
|
|
52
|
-
position: "center",
|
|
53
|
-
allowMultiple: false,
|
|
54
|
-
disableClick: false
|
|
55
|
-
}, formatProps(props));
|
|
57
|
+
const Toast = (props) => {
|
|
58
|
+
const options = __spreadValues(__spreadValues({}, defaultProps), formatProps(props));
|
|
56
59
|
const instance = {
|
|
57
60
|
close: () => null
|
|
58
61
|
};
|
|
62
|
+
const _a = options, { container } = _a, restOptions = __objRest(_a, ["container"]);
|
|
59
63
|
const rootWrapper = document.createElement("div");
|
|
60
|
-
|
|
61
|
-
const styles = {
|
|
62
|
-
position: "fixed",
|
|
63
|
-
top: "0",
|
|
64
|
-
bottom: "0",
|
|
65
|
-
left: "0",
|
|
66
|
-
right: "0",
|
|
67
|
-
zIndex: "var(--bui-z-index-toast)"
|
|
68
|
-
};
|
|
69
|
-
Object.keys(styles).forEach((property) => {
|
|
70
|
-
rootWrapper.style[property] = styles[property];
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
const rootElement = getRootElement();
|
|
64
|
+
const rootElement = getRootContainer(container);
|
|
74
65
|
rootElement.appendChild(rootWrapper);
|
|
75
66
|
const ToastComponent = () => {
|
|
76
|
-
const
|
|
77
|
-
const [open, setOpen] = useState(
|
|
78
|
-
|
|
79
|
-
const fadeTimeout = {
|
|
80
|
-
enter: 350,
|
|
81
|
-
exit: 150
|
|
82
|
-
};
|
|
67
|
+
const _a2 = restOptions, { duration, multiple, onClose, onExited } = _a2, others = __objRest(_a2, ["duration", "multiple", "onClose", "onExited"]);
|
|
68
|
+
const [open, setOpen] = useState(true);
|
|
69
|
+
const timerRef = useRef(null);
|
|
83
70
|
const close = useCallback(() => {
|
|
84
71
|
setOpen(false);
|
|
85
|
-
setTimeout(() => {
|
|
86
|
-
const unmountRes = unmount(rootWrapper);
|
|
87
|
-
if (unmountRes && rootWrapper.parentNode) {
|
|
88
|
-
rootWrapper.parentNode.removeChild(rootWrapper);
|
|
89
|
-
}
|
|
90
|
-
}, fadeTimeout.exit);
|
|
91
72
|
onClose == null ? void 0 : onClose();
|
|
92
|
-
}, [rootWrapper]);
|
|
73
|
+
}, [rootWrapper, onClose]);
|
|
93
74
|
useEffect(() => {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
destroyAll();
|
|
75
|
+
if (!multiple)
|
|
76
|
+
destroyAll(toastCloses);
|
|
97
77
|
toastCloses.push(close);
|
|
98
78
|
if (duration !== 0 && typeof duration === "number") {
|
|
99
|
-
|
|
79
|
+
timerRef.current = window.setTimeout(() => {
|
|
100
80
|
close();
|
|
101
|
-
if (!
|
|
102
|
-
|
|
81
|
+
if (!multiple) {
|
|
82
|
+
const index = toastCloses.indexOf(close);
|
|
83
|
+
if (index > -1) {
|
|
84
|
+
toastCloses.splice(index, 1);
|
|
85
|
+
}
|
|
103
86
|
}
|
|
104
87
|
}, duration);
|
|
105
88
|
}
|
|
106
89
|
return () => {
|
|
107
|
-
|
|
90
|
+
if (timerRef.current) {
|
|
91
|
+
clearTimeout(timerRef.current);
|
|
92
|
+
}
|
|
108
93
|
};
|
|
109
94
|
}, []);
|
|
95
|
+
const onProxyExited = () => {
|
|
96
|
+
onExited == null ? void 0 : onExited();
|
|
97
|
+
const unmountRes = unmount(rootWrapper);
|
|
98
|
+
if (unmountRes && rootWrapper.parentNode) {
|
|
99
|
+
rootWrapper.parentNode.removeChild(rootWrapper);
|
|
100
|
+
}
|
|
101
|
+
};
|
|
110
102
|
instance.close = close;
|
|
111
|
-
return /* @__PURE__ */ React.createElement(
|
|
112
|
-
ToastView,
|
|
113
|
-
__spreadProps(__spreadValues({}, others), {
|
|
114
|
-
open,
|
|
115
|
-
timeout: fadeTimeout,
|
|
116
|
-
onClose: close
|
|
117
|
-
})
|
|
118
|
-
);
|
|
103
|
+
return /* @__PURE__ */ React.createElement(ToastView, __spreadProps(__spreadValues({}, others), { open, onExited: onProxyExited }));
|
|
119
104
|
};
|
|
120
105
|
render(/* @__PURE__ */ React.createElement(ToastComponent, null), rootWrapper);
|
|
121
106
|
return instance;
|
|
122
107
|
};
|
|
123
|
-
["warning", "loading", "success", "fail"].forEach(
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
});
|
|
128
|
-
|
|
108
|
+
["warning", "loading", "success", "fail"].forEach(
|
|
109
|
+
(methodName) => {
|
|
110
|
+
Toast[methodName] = (options) => Toast(__spreadValues({
|
|
111
|
+
type: methodName
|
|
112
|
+
}, formatProps(options)));
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
Toast.clear = () => {
|
|
129
116
|
setTimeout(() => {
|
|
130
|
-
destroyAll();
|
|
117
|
+
destroyAll(toastCloses);
|
|
131
118
|
});
|
|
132
119
|
};
|
|
120
|
+
const UseToastComponent = (props) => {
|
|
121
|
+
const _a = props, {
|
|
122
|
+
domRef,
|
|
123
|
+
onExited,
|
|
124
|
+
onSetOpenFalse,
|
|
125
|
+
onEnd,
|
|
126
|
+
destroyAllCloses,
|
|
127
|
+
addClose,
|
|
128
|
+
removeClose,
|
|
129
|
+
open
|
|
130
|
+
} = _a, restProps = __objRest(_a, [
|
|
131
|
+
"domRef",
|
|
132
|
+
"onExited",
|
|
133
|
+
"onSetOpenFalse",
|
|
134
|
+
"onEnd",
|
|
135
|
+
"destroyAllCloses",
|
|
136
|
+
"addClose",
|
|
137
|
+
"removeClose",
|
|
138
|
+
"open"
|
|
139
|
+
]);
|
|
140
|
+
const options = __spreadValues(__spreadValues({}, defaultProps), formatProps(restProps));
|
|
141
|
+
const _b = options, { duration, multiple, onClose, container } = _b, others = __objRest(_b, ["duration", "multiple", "onClose", "container"]);
|
|
142
|
+
const rootElement = getRootContainer(container);
|
|
143
|
+
const timerRef = useRef(null);
|
|
144
|
+
const close = () => {
|
|
145
|
+
onSetOpenFalse == null ? void 0 : onSetOpenFalse();
|
|
146
|
+
onClose == null ? void 0 : onClose();
|
|
147
|
+
};
|
|
148
|
+
useEffect(() => {
|
|
149
|
+
if (!multiple)
|
|
150
|
+
destroyAllCloses();
|
|
151
|
+
addClose(close);
|
|
152
|
+
if (duration !== 0 && typeof duration === "number") {
|
|
153
|
+
timerRef.current = window.setTimeout(() => {
|
|
154
|
+
close();
|
|
155
|
+
if (!multiple) {
|
|
156
|
+
removeClose(close);
|
|
157
|
+
}
|
|
158
|
+
}, duration);
|
|
159
|
+
}
|
|
160
|
+
return () => {
|
|
161
|
+
if (timerRef.current) {
|
|
162
|
+
clearTimeout(timerRef.current);
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
}, []);
|
|
166
|
+
const onProxyExited = () => {
|
|
167
|
+
onEnd == null ? void 0 : onEnd();
|
|
168
|
+
onExited == null ? void 0 : onExited();
|
|
169
|
+
};
|
|
170
|
+
return /* @__PURE__ */ React.createElement(Portal, { container: rootElement }, /* @__PURE__ */ React.createElement(
|
|
171
|
+
ToastView,
|
|
172
|
+
__spreadProps(__spreadValues({}, others), {
|
|
173
|
+
open,
|
|
174
|
+
onExited: onProxyExited,
|
|
175
|
+
ref: domRef
|
|
176
|
+
})
|
|
177
|
+
));
|
|
178
|
+
};
|
|
179
|
+
UseToastComponent.displayName = "UseToastComponent";
|
|
133
180
|
const useToast = () => {
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
181
|
+
const [elements, setElements] = useState([]);
|
|
182
|
+
const hookToastClosesRef = useRef([]);
|
|
183
|
+
const createToast = (options) => {
|
|
184
|
+
const key = `toast-${Date.now()}-${Math.random()}`;
|
|
185
|
+
const _a = options, { ref } = _a, restOptions = __objRest(_a, ["ref"]);
|
|
186
|
+
const instance = {
|
|
187
|
+
close: () => {
|
|
188
|
+
setElements(
|
|
189
|
+
(prev) => prev.map(
|
|
190
|
+
(element) => element.key === key ? __spreadProps(__spreadValues({}, element), { open: false }) : element
|
|
191
|
+
)
|
|
192
|
+
);
|
|
193
|
+
}
|
|
143
194
|
};
|
|
144
|
-
|
|
145
|
-
|
|
195
|
+
const handleAnimationEnd = () => {
|
|
196
|
+
setElements((prev) => prev.filter((element) => element.key !== key));
|
|
197
|
+
};
|
|
198
|
+
const toastElement = {
|
|
199
|
+
key,
|
|
200
|
+
open: true,
|
|
201
|
+
props: __spreadProps(__spreadValues({}, restOptions), {
|
|
202
|
+
onEnd: handleAnimationEnd
|
|
203
|
+
}),
|
|
204
|
+
ref
|
|
205
|
+
};
|
|
206
|
+
setElements((prev) => [...prev, toastElement]);
|
|
207
|
+
return instance;
|
|
208
|
+
};
|
|
209
|
+
const hookToast = (options) => createToast(__spreadValues({}, formatProps(options)));
|
|
210
|
+
["warning", "loading", "success", "fail"].forEach(
|
|
211
|
+
(methodName) => {
|
|
212
|
+
hookToast[methodName] = (options) => createToast(__spreadValues({
|
|
213
|
+
type: methodName
|
|
214
|
+
}, formatProps(options)));
|
|
215
|
+
}
|
|
216
|
+
);
|
|
217
|
+
hookToast.clear = () => {
|
|
146
218
|
setTimeout(() => {
|
|
147
|
-
destroyAll();
|
|
219
|
+
destroyAll(hookToastClosesRef.current);
|
|
148
220
|
});
|
|
149
221
|
};
|
|
150
|
-
const
|
|
151
|
-
|
|
222
|
+
const destroyAllCloses = () => {
|
|
223
|
+
destroyAll(hookToastClosesRef.current);
|
|
224
|
+
};
|
|
225
|
+
const renderedElements = elements.map((element) => {
|
|
226
|
+
const onSetOpenFalse = () => {
|
|
227
|
+
setElements(
|
|
228
|
+
(prev) => prev.map(
|
|
229
|
+
(el) => el.key === element.key ? __spreadProps(__spreadValues({}, el), { open: false }) : el
|
|
230
|
+
)
|
|
231
|
+
);
|
|
232
|
+
};
|
|
233
|
+
return /* @__PURE__ */ React.createElement(
|
|
234
|
+
UseToastComponent,
|
|
235
|
+
__spreadProps(__spreadValues({
|
|
236
|
+
key: element.key
|
|
237
|
+
}, element.props), {
|
|
238
|
+
open: element.open,
|
|
239
|
+
onSetOpenFalse,
|
|
240
|
+
domRef: element.ref,
|
|
241
|
+
destroyAllCloses,
|
|
242
|
+
addClose: (close) => hookToastClosesRef.current.push(close),
|
|
243
|
+
removeClose: (close) => {
|
|
244
|
+
const index = hookToastClosesRef.current.indexOf(close);
|
|
245
|
+
if (index > -1) {
|
|
246
|
+
hookToastClosesRef.current.splice(index, 1);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
})
|
|
250
|
+
);
|
|
251
|
+
});
|
|
252
|
+
return [hookToast, /* @__PURE__ */ React.createElement(React.Fragment, null, renderedElements)];
|
|
152
253
|
};
|
|
153
|
-
|
|
154
|
-
const Toast = functionalToast;
|
|
254
|
+
Toast.useToast = useToast;
|
|
155
255
|
var FunctionalToast_default = Toast;
|
|
156
256
|
export {
|
|
157
257
|
FunctionalToast_default as default
|
package/es/Toast/Toast.js
CHANGED
|
@@ -29,8 +29,8 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
+
import React from "react";
|
|
32
33
|
import clsx from "clsx";
|
|
33
|
-
import React, { useImperativeHandle } from "react";
|
|
34
34
|
import {
|
|
35
35
|
ErrorCircleFilledBoldIcon,
|
|
36
36
|
AccessTimeCircleFilledBoldIcon,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
SuccessCircleFilledBoldIcon
|
|
39
39
|
} from "@bifrostui/icons";
|
|
40
40
|
import Fade from "../Fade";
|
|
41
|
-
import
|
|
41
|
+
import Backdrop from "../Backdrop";
|
|
42
42
|
import "./index.css";
|
|
43
43
|
const prefixCls = "bui-toast";
|
|
44
44
|
const ToastComponent = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
@@ -51,7 +51,8 @@ const ToastComponent = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
51
51
|
message,
|
|
52
52
|
position = "center",
|
|
53
53
|
disableClick = false,
|
|
54
|
-
|
|
54
|
+
appear = false,
|
|
55
|
+
transitionDuration = 150
|
|
55
56
|
} = _a, others = __objRest(_a, [
|
|
56
57
|
"className",
|
|
57
58
|
"style",
|
|
@@ -61,35 +62,75 @@ const ToastComponent = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
61
62
|
"message",
|
|
62
63
|
"position",
|
|
63
64
|
"disableClick",
|
|
64
|
-
"
|
|
65
|
+
"appear",
|
|
66
|
+
"transitionDuration"
|
|
65
67
|
]);
|
|
66
|
-
const themeConfig = useTheme(theme);
|
|
67
|
-
useImperativeHandle(ref, () => {
|
|
68
|
-
return { theme: themeConfig };
|
|
69
|
-
}, []);
|
|
70
68
|
const iconMap = {
|
|
71
|
-
fail: /* @__PURE__ */ React.createElement(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
fail: /* @__PURE__ */ React.createElement(
|
|
70
|
+
ErrorCircleFilledBoldIcon,
|
|
71
|
+
{
|
|
72
|
+
htmlColor: "var(--bui-color-white)",
|
|
73
|
+
"aria-hidden": "true"
|
|
74
|
+
}
|
|
75
|
+
),
|
|
76
|
+
loading: /* @__PURE__ */ React.createElement(
|
|
77
|
+
AccessTimeCircleFilledBoldIcon,
|
|
78
|
+
{
|
|
79
|
+
htmlColor: "var(--bui-color-white)",
|
|
80
|
+
"aria-hidden": "true"
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
warning: /* @__PURE__ */ React.createElement(
|
|
84
|
+
AlertCircleFilledBoldIcon,
|
|
85
|
+
{
|
|
86
|
+
htmlColor: "var(--bui-color-white)",
|
|
87
|
+
"aria-hidden": "true"
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
success: /* @__PURE__ */ React.createElement(
|
|
91
|
+
SuccessCircleFilledBoldIcon,
|
|
92
|
+
{
|
|
93
|
+
htmlColor: "var(--bui-color-white)",
|
|
94
|
+
"aria-hidden": "true"
|
|
95
|
+
}
|
|
96
|
+
)
|
|
75
97
|
};
|
|
76
98
|
const iconDom = iconMap[type] || icon;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
-
|
|
99
|
+
let role = "status";
|
|
100
|
+
let ariaLive = "polite";
|
|
101
|
+
if (type === "fail" || type === "warning") {
|
|
102
|
+
role = "alert";
|
|
103
|
+
ariaLive = "assertive";
|
|
104
|
+
}
|
|
105
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, disableClick && /* @__PURE__ */ React.createElement(Backdrop, { invisible: true, open: true }), /* @__PURE__ */ React.createElement(
|
|
106
|
+
Fade,
|
|
107
|
+
__spreadProps(__spreadValues({}, others), {
|
|
108
|
+
in: open,
|
|
109
|
+
appear,
|
|
110
|
+
timeout: transitionDuration,
|
|
111
|
+
unmountOnExit: true
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ React.createElement(
|
|
114
|
+
"div",
|
|
115
|
+
{
|
|
116
|
+
ref,
|
|
117
|
+
className: clsx(
|
|
118
|
+
prefixCls,
|
|
119
|
+
`${prefixCls}-${position}`,
|
|
120
|
+
{
|
|
121
|
+
[`${prefixCls}-icon`]: !!iconDom,
|
|
122
|
+
[`${prefixCls}-allow-click`]: !disableClick
|
|
123
|
+
},
|
|
124
|
+
className
|
|
125
|
+
),
|
|
126
|
+
style,
|
|
127
|
+
role,
|
|
128
|
+
"aria-live": ariaLive,
|
|
129
|
+
"aria-atomic": "true"
|
|
130
|
+
},
|
|
131
|
+
iconDom,
|
|
132
|
+
message
|
|
133
|
+
)
|
|
93
134
|
));
|
|
94
135
|
});
|
|
95
136
|
ToastComponent.displayName = "BuiToast";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Button } from "../../../Button";
|
|
3
|
+
import Toast from "../../FunctionalToast";
|
|
4
|
+
const ToastDemo = () => {
|
|
5
|
+
const [toast] = Toast.useToast();
|
|
6
|
+
return /* @__PURE__ */ React.createElement(
|
|
7
|
+
Button,
|
|
8
|
+
{
|
|
9
|
+
onClick: () => {
|
|
10
|
+
toast({
|
|
11
|
+
message: "Hello World",
|
|
12
|
+
duration: 0
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"\u57FA\u7840 Toast"
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
ToastDemo
|
|
21
|
+
};
|
package/es/Toast/index.css
CHANGED