@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
package/es/Image/Image.js
CHANGED
|
@@ -93,14 +93,19 @@ const Image = /* @__PURE__ */ React.forwardRef(
|
|
|
93
93
|
setLoaded(false);
|
|
94
94
|
setFailed(false);
|
|
95
95
|
}, [src]);
|
|
96
|
-
|
|
97
|
-
return /* @__PURE__ */ React.createElement(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
96
|
+
const defaultIconWrap = (icon) => {
|
|
97
|
+
return /* @__PURE__ */ React.createElement(
|
|
98
|
+
"div",
|
|
99
|
+
{
|
|
100
|
+
className: clsx(`${prefixCls}-default-icon-wrap`, {
|
|
101
|
+
"default-holder": !icon
|
|
102
|
+
}),
|
|
103
|
+
"aria-hidden": "true"
|
|
104
|
+
},
|
|
105
|
+
icon
|
|
106
|
+
);
|
|
107
|
+
};
|
|
108
|
+
const defaultPlaceholder = placeholder === false ? [] : placeholder !== true && defaultIconWrap(placeholder) || defaultIconWrap();
|
|
104
109
|
const miniAttr = {
|
|
105
110
|
webp,
|
|
106
111
|
lazyLoad: lazy,
|
|
@@ -121,7 +126,7 @@ const Image = /* @__PURE__ */ React.forwardRef(
|
|
|
121
126
|
setFailed(true);
|
|
122
127
|
onError == null ? void 0 : onError(e);
|
|
123
128
|
},
|
|
124
|
-
alt
|
|
129
|
+
alt: alt || ""
|
|
125
130
|
}, imgProps), {
|
|
126
131
|
style: __spreadValues({ objectFit: fit }, (imgProps == null ? void 0 : imgProps.style) || {}),
|
|
127
132
|
className: clsx(
|
|
@@ -133,7 +138,9 @@ const Image = /* @__PURE__ */ React.forwardRef(
|
|
|
133
138
|
}), isMini ? miniAttr : {})
|
|
134
139
|
);
|
|
135
140
|
function renderImgEle() {
|
|
136
|
-
|
|
141
|
+
if (failed)
|
|
142
|
+
return fallback || defaultPlaceholder;
|
|
143
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, !loaded && defaultPlaceholder, imgEle);
|
|
137
144
|
}
|
|
138
145
|
return /* @__PURE__ */ React.createElement(
|
|
139
146
|
"div",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 自定义 Image 组件 Demo 集合
|
|
4
|
+
* 这个文件包含多个测试 demo,展示如何使用 getCustomDemoCodesFromFile 进行无障碍测试
|
|
5
|
+
* 文件名必须是 A11yDemos.tsx(固定约定)
|
|
6
|
+
*/
|
|
7
|
+
export declare const basicImageDemo: () => React.JSX.Element;
|
|
8
|
+
export declare const ClickableImageDemo: () => React.JSX.Element;
|
|
9
|
+
export declare const placeholderImageDemo: () => React.JSX.Element;
|
|
10
|
+
export declare const errorImageDemo: () => React.JSX.Element;
|
|
11
|
+
export declare const lazyImageDemo: () => React.JSX.Element;
|
|
12
|
+
export declare const noAltImageDemo: () => React.JSX.Element;
|
|
13
|
+
declare const _default: {
|
|
14
|
+
basicImageDemo: () => React.JSX.Element;
|
|
15
|
+
ClickableImageDemo: () => React.JSX.Element;
|
|
16
|
+
placeholderImageDemo: () => React.JSX.Element;
|
|
17
|
+
errorImageDemo: () => React.JSX.Element;
|
|
18
|
+
lazyImageDemo: () => React.JSX.Element;
|
|
19
|
+
noAltImageDemo: () => React.JSX.Element;
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import Image from "../../Image";
|
|
3
|
+
const basicImageDemo = () => {
|
|
4
|
+
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
|
|
5
|
+
Image,
|
|
6
|
+
{
|
|
7
|
+
src: "https://via.placeholder.com/150x100",
|
|
8
|
+
alt: "\u793A\u4F8B\u56FE\u7247",
|
|
9
|
+
width: 150,
|
|
10
|
+
height: 100
|
|
11
|
+
}
|
|
12
|
+
));
|
|
13
|
+
};
|
|
14
|
+
const ClickableImageDemo = () => {
|
|
15
|
+
const [clicked, setClicked] = useState(false);
|
|
16
|
+
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
|
|
17
|
+
Image,
|
|
18
|
+
{
|
|
19
|
+
src: "https://via.placeholder.com/150x100",
|
|
20
|
+
alt: "\u53EF\u70B9\u51FB\u7684\u793A\u4F8B\u56FE\u7247",
|
|
21
|
+
width: 150,
|
|
22
|
+
height: 100,
|
|
23
|
+
onClick: () => {
|
|
24
|
+
setClicked(!clicked);
|
|
25
|
+
console.log("\u56FE\u7247\u88AB\u70B9\u51FB\u4E86");
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
), clicked && /* @__PURE__ */ React.createElement("p", null, "\u56FE\u7247\u5DF2\u88AB\u70B9\u51FB"));
|
|
29
|
+
};
|
|
30
|
+
const placeholderImageDemo = () => {
|
|
31
|
+
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
|
|
32
|
+
Image,
|
|
33
|
+
{
|
|
34
|
+
src: "",
|
|
35
|
+
alt: "\u5E26\u5360\u4F4D\u7B26\u7684\u56FE\u7247",
|
|
36
|
+
width: 150,
|
|
37
|
+
height: 100,
|
|
38
|
+
placeholder: /* @__PURE__ */ React.createElement("div", null, "\u52A0\u8F7D\u4E2D...")
|
|
39
|
+
}
|
|
40
|
+
));
|
|
41
|
+
};
|
|
42
|
+
const errorImageDemo = () => {
|
|
43
|
+
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
|
|
44
|
+
Image,
|
|
45
|
+
{
|
|
46
|
+
src: "https://invalid-url.com/nonexistent.jpg",
|
|
47
|
+
alt: "\u52A0\u8F7D\u5931\u8D25\u7684\u56FE\u7247",
|
|
48
|
+
width: 150,
|
|
49
|
+
height: 100,
|
|
50
|
+
fallback: /* @__PURE__ */ React.createElement("div", null, "\u56FE\u7247\u52A0\u8F7D\u5931\u8D25")
|
|
51
|
+
}
|
|
52
|
+
));
|
|
53
|
+
};
|
|
54
|
+
const lazyImageDemo = () => {
|
|
55
|
+
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
|
|
56
|
+
Image,
|
|
57
|
+
{
|
|
58
|
+
src: "https://via.placeholder.com/150x100",
|
|
59
|
+
alt: "\u61D2\u52A0\u8F7D\u56FE\u7247",
|
|
60
|
+
width: 150,
|
|
61
|
+
height: 100,
|
|
62
|
+
lazy: true
|
|
63
|
+
}
|
|
64
|
+
));
|
|
65
|
+
};
|
|
66
|
+
const noAltImageDemo = () => {
|
|
67
|
+
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
|
|
68
|
+
Image,
|
|
69
|
+
{
|
|
70
|
+
src: "https://via.placeholder.com/150x100",
|
|
71
|
+
width: 150,
|
|
72
|
+
height: 100
|
|
73
|
+
}
|
|
74
|
+
));
|
|
75
|
+
};
|
|
76
|
+
var A11yDemos_default = {
|
|
77
|
+
basicImageDemo,
|
|
78
|
+
ClickableImageDemo,
|
|
79
|
+
placeholderImageDemo,
|
|
80
|
+
errorImageDemo,
|
|
81
|
+
lazyImageDemo,
|
|
82
|
+
noAltImageDemo
|
|
83
|
+
};
|
|
84
|
+
export {
|
|
85
|
+
ClickableImageDemo,
|
|
86
|
+
basicImageDemo,
|
|
87
|
+
A11yDemos_default as default,
|
|
88
|
+
errorImageDemo,
|
|
89
|
+
lazyImageDemo,
|
|
90
|
+
noAltImageDemo,
|
|
91
|
+
placeholderImageDemo
|
|
92
|
+
};
|
package/es/Image/index.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
:root,
|
|
2
2
|
page,
|
|
3
3
|
xhs-page {
|
|
4
|
-
--bui-image-default-
|
|
4
|
+
--bui-image-default-bg-color: rgba(127, 127, 127, 0.2);
|
|
5
5
|
}
|
|
6
6
|
.bui-image {
|
|
7
7
|
width: auto;
|
|
@@ -30,11 +30,6 @@ xhs-page {
|
|
|
30
30
|
width: 100%;
|
|
31
31
|
height: 100%;
|
|
32
32
|
}
|
|
33
|
-
.bui-image-default-icon-wrap.
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
.bui-image-default-icon-item {
|
|
37
|
-
width: 100%;
|
|
38
|
-
height: 100%;
|
|
39
|
-
background-color: var(--bui-image-default-background-color);
|
|
33
|
+
.bui-image-default-icon-wrap.default-holder {
|
|
34
|
+
background-color: var(--bui-image-default-bg-color);
|
|
40
35
|
}
|
package/es/Input/Input.js
CHANGED
|
@@ -38,7 +38,7 @@ const prefixCls = "bui-input";
|
|
|
38
38
|
const Input = forwardRef((props, ref) => {
|
|
39
39
|
const _a = props, {
|
|
40
40
|
className,
|
|
41
|
-
defaultValue
|
|
41
|
+
defaultValue,
|
|
42
42
|
value,
|
|
43
43
|
inputProps,
|
|
44
44
|
inputRef,
|
|
@@ -71,6 +71,8 @@ const Input = forwardRef((props, ref) => {
|
|
|
71
71
|
"onFocus",
|
|
72
72
|
"onBlur"
|
|
73
73
|
]);
|
|
74
|
+
const { required, readOnly } = inputProps || {};
|
|
75
|
+
const ariaProps = __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, required && { "aria-required": required }), readOnly && { "aria-readonly": readOnly }), disabled && { "aria-disabled": disabled }), placeholder && { "aria-placeholder": placeholder });
|
|
74
76
|
const [inputValue, triggerChange] = useValue({
|
|
75
77
|
value,
|
|
76
78
|
defaultValue,
|
|
@@ -126,14 +128,14 @@ const Input = forwardRef((props, ref) => {
|
|
|
126
128
|
startIcon && /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-icon ${prefixCls}-icon-start` }, startIcon),
|
|
127
129
|
/* @__PURE__ */ React.createElement(
|
|
128
130
|
"input",
|
|
129
|
-
__spreadProps(__spreadValues(__spreadProps(__spreadValues({}, nativeProps), {
|
|
131
|
+
__spreadProps(__spreadValues(__spreadValues(__spreadProps(__spreadValues({}, nativeProps), {
|
|
130
132
|
name,
|
|
131
133
|
type,
|
|
132
134
|
ref: inputRef,
|
|
133
135
|
value: inputValue,
|
|
134
136
|
disabled,
|
|
135
137
|
placeholder
|
|
136
|
-
}), inputProps), {
|
|
138
|
+
}), ariaProps), inputProps), {
|
|
137
139
|
onChange: handleChange,
|
|
138
140
|
onFocus: handleFocus,
|
|
139
141
|
onBlur: handleBlur,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 自定义 Input 组件 Demo 集合
|
|
4
|
+
* 这个文件包含多个测试 demo,展示如何使用 getCustomDemoCodesFromFile 进行无障碍测试
|
|
5
|
+
* 文件名必须是 customDemoComponent.tsx(固定约定)
|
|
6
|
+
*/
|
|
7
|
+
export declare const basicInputDemo: () => React.JSX.Element;
|
|
8
|
+
export declare const disabledInputDemo: () => React.JSX.Element;
|
|
9
|
+
export declare const requiredInputDemo: () => React.JSX.Element;
|
|
10
|
+
export declare const readOnlyInputDemo: () => React.JSX.Element;
|
|
11
|
+
export declare const placeholderInputDemo: () => React.JSX.Element;
|
|
12
|
+
export declare const ariaLabelInputDemo: () => React.JSX.Element;
|
|
13
|
+
declare const _default: {
|
|
14
|
+
basicInputDemo: () => React.JSX.Element;
|
|
15
|
+
disabledInputDemo: () => React.JSX.Element;
|
|
16
|
+
requiredInputDemo: () => React.JSX.Element;
|
|
17
|
+
readOnlyInputDemo: () => React.JSX.Element;
|
|
18
|
+
placeholderInputDemo: () => React.JSX.Element;
|
|
19
|
+
ariaLabelInputDemo: () => React.JSX.Element;
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Input from "../../Input";
|
|
3
|
+
const basicInputDemo = () => {
|
|
4
|
+
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("label", null, "First name: ", /* @__PURE__ */ React.createElement(Input, { placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9" })));
|
|
5
|
+
};
|
|
6
|
+
const disabledInputDemo = () => {
|
|
7
|
+
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("label", null, "First name:", /* @__PURE__ */ React.createElement(Input, { placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9", disabled: true })));
|
|
8
|
+
};
|
|
9
|
+
const requiredInputDemo = () => {
|
|
10
|
+
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("label", null, "First name:", /* @__PURE__ */ React.createElement(Input, { placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9", inputProps: { required: true } })));
|
|
11
|
+
};
|
|
12
|
+
const readOnlyInputDemo = () => {
|
|
13
|
+
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("label", null, "First name:", /* @__PURE__ */ React.createElement(Input, { placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9", inputProps: { readOnly: true } })));
|
|
14
|
+
};
|
|
15
|
+
const placeholderInputDemo = () => {
|
|
16
|
+
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("label", null, "First name:", /* @__PURE__ */ React.createElement(Input, { placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9" })));
|
|
17
|
+
};
|
|
18
|
+
const ariaLabelInputDemo = () => {
|
|
19
|
+
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("label", null, "First name:", /* @__PURE__ */ React.createElement(
|
|
20
|
+
Input,
|
|
21
|
+
{
|
|
22
|
+
placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9",
|
|
23
|
+
inputProps: { "aria-label": "\u8F93\u5165\u6846" }
|
|
24
|
+
}
|
|
25
|
+
)));
|
|
26
|
+
};
|
|
27
|
+
var A11yDemos_default = {
|
|
28
|
+
basicInputDemo,
|
|
29
|
+
disabledInputDemo,
|
|
30
|
+
requiredInputDemo,
|
|
31
|
+
readOnlyInputDemo,
|
|
32
|
+
placeholderInputDemo,
|
|
33
|
+
ariaLabelInputDemo
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
ariaLabelInputDemo,
|
|
37
|
+
basicInputDemo,
|
|
38
|
+
A11yDemos_default as default,
|
|
39
|
+
disabledInputDemo,
|
|
40
|
+
placeholderInputDemo,
|
|
41
|
+
readOnlyInputDemo,
|
|
42
|
+
requiredInputDemo
|
|
43
|
+
};
|
package/es/Input/index.css
CHANGED
|
@@ -4,10 +4,10 @@ xhs-page {
|
|
|
4
4
|
--bui-input-height: 32px;
|
|
5
5
|
--bui-input-padding: 4px 10px;
|
|
6
6
|
--bui-input-border-radius: var(--bui-shape-radius-default);
|
|
7
|
-
--bui-input-icon-start-margin
|
|
8
|
-
--bui-input-icon-end-margin
|
|
9
|
-
--bui-input-
|
|
10
|
-
--bui-input-disabled-
|
|
7
|
+
--bui-input-icon-start-margin: 0 3px 0 0;
|
|
8
|
+
--bui-input-icon-end-margin: 0 0 0 3px;
|
|
9
|
+
--bui-input-bg-color: transparent;
|
|
10
|
+
--bui-input-disabled-bg-color: rgba(0, 0, 0, 0.04);
|
|
11
11
|
--bui-input-clear-color: #ced1d6;
|
|
12
12
|
--bui-input-clear-font-size: var(--bui-title-size-3);
|
|
13
13
|
}
|
|
@@ -29,10 +29,10 @@ xhs-page {
|
|
|
29
29
|
font-size: var(--bui-title-size-3);
|
|
30
30
|
}
|
|
31
31
|
.bui-input-icon-start {
|
|
32
|
-
margin
|
|
32
|
+
margin: var(--bui-input-icon-start-margin);
|
|
33
33
|
}
|
|
34
34
|
.bui-input-icon-end {
|
|
35
|
-
margin
|
|
35
|
+
margin: var(--bui-input-icon-end-margin);
|
|
36
36
|
}
|
|
37
37
|
.bui-input-input {
|
|
38
38
|
flex: 1;
|
|
@@ -42,14 +42,14 @@ xhs-page {
|
|
|
42
42
|
color: var(--bui-color-fg-default);
|
|
43
43
|
border: none;
|
|
44
44
|
outline: none;
|
|
45
|
-
background-color: var(--bui-input-
|
|
45
|
+
background-color: var(--bui-input-bg-color);
|
|
46
46
|
font-size: var(--bui-text-size-2);
|
|
47
47
|
}
|
|
48
48
|
.bui-input-input::placeholder {
|
|
49
49
|
color: var(--bui-color-fg-subtle);
|
|
50
50
|
}
|
|
51
51
|
.bui-input-disabled {
|
|
52
|
-
background-color: var(--bui-input-disabled-
|
|
52
|
+
background-color: var(--bui-input-disabled-bg-color);
|
|
53
53
|
}
|
|
54
54
|
.bui-input-disabled .bui-input-input {
|
|
55
55
|
color: var(--bui-color-fg-disabled);
|
package/es/Modal/Modal.js
CHANGED
|
@@ -29,25 +29,25 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
-
import { blockTouch, isMini, useForkRef } from "@bifrostui/utils";
|
|
33
32
|
import clsx from "clsx";
|
|
34
|
-
import React
|
|
33
|
+
import React from "react";
|
|
35
34
|
import Backdrop from "../Backdrop";
|
|
36
35
|
import Portal from "../Portal";
|
|
36
|
+
import { useModal } from "./useModal";
|
|
37
37
|
import "./index.css";
|
|
38
38
|
const prefixCls = "bui-modal";
|
|
39
39
|
const Modal = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
40
40
|
const _a = props, {
|
|
41
41
|
className,
|
|
42
|
-
open,
|
|
42
|
+
open = false,
|
|
43
43
|
BackdropProps,
|
|
44
44
|
children,
|
|
45
45
|
container,
|
|
46
|
-
disablePortal,
|
|
47
|
-
disableScrollLock,
|
|
48
|
-
hideBackdrop,
|
|
46
|
+
disablePortal = false,
|
|
47
|
+
disableScrollLock = false,
|
|
48
|
+
hideBackdrop = false,
|
|
49
49
|
onClose,
|
|
50
|
-
keepMounted
|
|
50
|
+
keepMounted = false
|
|
51
51
|
} = _a, others = __objRest(_a, [
|
|
52
52
|
"className",
|
|
53
53
|
"open",
|
|
@@ -60,50 +60,50 @@ const Modal = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
60
60
|
"onClose",
|
|
61
61
|
"keepMounted"
|
|
62
62
|
]);
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
63
|
+
const {
|
|
64
|
+
getRootProps,
|
|
65
|
+
getBackdropProps,
|
|
66
|
+
getTransitionProps,
|
|
67
|
+
portalRef,
|
|
68
|
+
exited,
|
|
69
|
+
hasTransition
|
|
70
|
+
} = useModal(__spreadProps(__spreadValues({}, props), {
|
|
71
|
+
container,
|
|
72
|
+
disableScrollLock,
|
|
73
|
+
children: React.isValidElement(children) ? children : void 0,
|
|
74
|
+
open,
|
|
75
|
+
onClose,
|
|
76
|
+
rootRef: ref
|
|
77
|
+
}));
|
|
78
|
+
if (!keepMounted && !open && (!hasTransition || exited)) {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
const rootProps = getRootProps(__spreadProps(__spreadValues({}, others), {
|
|
82
|
+
className: clsx(
|
|
83
|
+
prefixCls,
|
|
84
|
+
{
|
|
85
|
+
[`${prefixCls}-hidden`]: !open && exited
|
|
86
|
+
},
|
|
87
|
+
className
|
|
88
|
+
)
|
|
89
|
+
}));
|
|
90
|
+
const backdropProps = getBackdropProps(__spreadProps(__spreadValues({}, BackdropProps), {
|
|
91
|
+
className: clsx(`${prefixCls}-backdrop`, BackdropProps == null ? void 0 : BackdropProps.className)
|
|
92
|
+
}));
|
|
93
|
+
const transitionProps = hasTransition ? getTransitionProps() : {};
|
|
94
|
+
const renderChildren = () => {
|
|
95
|
+
if (!children) {
|
|
96
|
+
return null;
|
|
73
97
|
}
|
|
74
|
-
if (
|
|
75
|
-
|
|
98
|
+
if (React.isValidElement(children)) {
|
|
99
|
+
const childProps = children.props || {};
|
|
100
|
+
return React.cloneElement(children, __spreadValues(__spreadValues({
|
|
101
|
+
tabIndex: -1
|
|
102
|
+
}, childProps), transitionProps));
|
|
76
103
|
}
|
|
104
|
+
return children;
|
|
77
105
|
};
|
|
78
|
-
|
|
79
|
-
let cleanup;
|
|
80
|
-
if (!isMini && !disableScrollLock)
|
|
81
|
-
setTimeout(() => {
|
|
82
|
-
try {
|
|
83
|
-
if (open && modalRef.current) {
|
|
84
|
-
cleanup = blockTouch(modalRef.current);
|
|
85
|
-
}
|
|
86
|
-
} catch (e) {
|
|
87
|
-
}
|
|
88
|
-
}, 0);
|
|
89
|
-
return () => {
|
|
90
|
-
cleanup == null ? void 0 : cleanup();
|
|
91
|
-
};
|
|
92
|
-
}, [open, disableScrollLock]);
|
|
93
|
-
if (!mounted) {
|
|
94
|
-
return null;
|
|
95
|
-
}
|
|
96
|
-
return /* @__PURE__ */ React.createElement(Portal, { container, disablePortal }, /* @__PURE__ */ React.createElement("div", __spreadValues({ className: clsx(prefixCls, className), ref: handleRef }, others), !hideBackdrop ? /* @__PURE__ */ React.createElement(
|
|
97
|
-
Backdrop,
|
|
98
|
-
__spreadProps(__spreadValues({
|
|
99
|
-
open,
|
|
100
|
-
onClick: handleBackdropClick,
|
|
101
|
-
onEnter: () => setBackDropExited(false),
|
|
102
|
-
onExited: () => setBackDropExited(true)
|
|
103
|
-
}, BackdropProps), {
|
|
104
|
-
className: clsx(`${prefixCls}-backdrop`, BackdropProps == null ? void 0 : BackdropProps.className)
|
|
105
|
-
})
|
|
106
|
-
) : null, (open || keepMounted) && children));
|
|
106
|
+
return /* @__PURE__ */ React.createElement(Portal, { container, disablePortal, ref: portalRef }, /* @__PURE__ */ React.createElement("div", __spreadValues({}, rootProps), !hideBackdrop && /* @__PURE__ */ React.createElement(Backdrop, __spreadValues({}, backdropProps)), renderChildren()));
|
|
107
107
|
});
|
|
108
108
|
Modal.displayName = "BuiModal";
|
|
109
109
|
var Modal_default = Modal;
|
|
@@ -6,11 +6,11 @@ declare const Modal: React.ForwardRefExoticComponent<Omit<ViewProps & {
|
|
|
6
6
|
container?: Element | (() => Element);
|
|
7
7
|
hideBackdrop?: boolean;
|
|
8
8
|
BackdropProps?: Partial<import("../Backdrop").BackdropProps<"div", {}>>;
|
|
9
|
-
onClose?: (e: React.SyntheticEvent<Element, Event>, detail
|
|
9
|
+
onClose?: (e: React.SyntheticEvent<Element, Event>, detail?: import("./Modal.types").ModalCloseDetail) => void;
|
|
10
10
|
disableScrollLock?: boolean;
|
|
11
11
|
disablePortal?: boolean;
|
|
12
12
|
keepMounted?: boolean;
|
|
13
13
|
} & import("@bifrostui/types").ICommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
14
14
|
ref?: React.Ref<HTMLDivElement>;
|
|
15
|
-
},
|
|
15
|
+
}, keyof import("@bifrostui/types").ICommonProps | "open" | "container" | "disablePortal" | "hideBackdrop" | "BackdropProps" | "onClose" | "disableScrollLock" | "keepMounted">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
16
|
export default Modal;
|
|
@@ -29,12 +29,12 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
-
import { useForkRef } from "@bifrostui/utils";
|
|
33
32
|
import clsx from "clsx";
|
|
34
|
-
import React
|
|
33
|
+
import React from "react";
|
|
35
34
|
import { View } from "@tarojs/components";
|
|
36
35
|
import Backdrop from "../Backdrop";
|
|
37
36
|
import Portal from "../Portal";
|
|
37
|
+
import { useModal } from "./useModal";
|
|
38
38
|
import "./index.css";
|
|
39
39
|
const prefixCls = "bui-modal";
|
|
40
40
|
const Modal = /* @__PURE__ */ React.forwardRef(
|
|
@@ -49,6 +49,7 @@ const Modal = /* @__PURE__ */ React.forwardRef(
|
|
|
49
49
|
disableScrollLock = false,
|
|
50
50
|
hideBackdrop = false,
|
|
51
51
|
onClose,
|
|
52
|
+
onClick,
|
|
52
53
|
keepMounted
|
|
53
54
|
} = _a, others = __objRest(_a, [
|
|
54
55
|
"className",
|
|
@@ -60,45 +61,60 @@ const Modal = /* @__PURE__ */ React.forwardRef(
|
|
|
60
61
|
"disableScrollLock",
|
|
61
62
|
"hideBackdrop",
|
|
62
63
|
"onClose",
|
|
64
|
+
"onClick",
|
|
63
65
|
"keepMounted"
|
|
64
66
|
]);
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
const {
|
|
68
|
+
getRootProps,
|
|
69
|
+
getBackdropProps,
|
|
70
|
+
getTransitionProps,
|
|
71
|
+
exited,
|
|
72
|
+
hasTransition
|
|
73
|
+
} = useModal(__spreadProps(__spreadValues({}, props), {
|
|
74
|
+
disableScrollLock,
|
|
75
|
+
children: React.isValidElement(children) ? children : void 0,
|
|
76
|
+
open,
|
|
77
|
+
onClose,
|
|
78
|
+
rootRef: ref
|
|
79
|
+
}));
|
|
80
|
+
if (!keepMounted && !open && (!hasTransition || exited)) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
const rootProps = getRootProps(__spreadProps(__spreadValues({}, others), {
|
|
84
|
+
className: clsx(
|
|
85
|
+
prefixCls,
|
|
86
|
+
{
|
|
87
|
+
[`${prefixCls}-hidden`]: !open && exited
|
|
88
|
+
},
|
|
89
|
+
className
|
|
90
|
+
)
|
|
91
|
+
}));
|
|
92
|
+
const backdropProps = getBackdropProps(__spreadProps(__spreadValues({}, BackdropProps), {
|
|
93
|
+
className: clsx(`${prefixCls}-backdrop`, BackdropProps == null ? void 0 : BackdropProps.className)
|
|
94
|
+
}));
|
|
95
|
+
const transitionProps = hasTransition ? getTransitionProps() : {};
|
|
96
|
+
const renderChildren = () => {
|
|
97
|
+
if (!children) {
|
|
98
|
+
return null;
|
|
72
99
|
}
|
|
73
|
-
if (
|
|
74
|
-
|
|
100
|
+
if (React.isValidElement(children)) {
|
|
101
|
+
return React.cloneElement(children, __spreadValues(__spreadProps(__spreadValues({}, transitionProps), {
|
|
102
|
+
tabIndex: -1
|
|
103
|
+
}), children.props));
|
|
75
104
|
}
|
|
105
|
+
return children;
|
|
76
106
|
};
|
|
77
|
-
if (!mounted) {
|
|
78
|
-
return null;
|
|
79
|
-
}
|
|
80
107
|
return /* @__PURE__ */ React.createElement(Portal, { container, disablePortal }, /* @__PURE__ */ React.createElement(
|
|
81
108
|
View,
|
|
82
|
-
__spreadValues({
|
|
83
|
-
className: clsx(prefixCls, className),
|
|
84
|
-
ref: handleRef,
|
|
109
|
+
__spreadProps(__spreadValues({
|
|
85
110
|
catchMove: !disableScrollLock
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
onExited: () => setBackDropExited(true)
|
|
94
|
-
}, BackdropProps), {
|
|
95
|
-
className: clsx(
|
|
96
|
-
`${prefixCls}-backdrop`,
|
|
97
|
-
BackdropProps == null ? void 0 : BackdropProps.className
|
|
98
|
-
)
|
|
99
|
-
})
|
|
100
|
-
) : null,
|
|
101
|
-
(open || keepMounted) && children
|
|
111
|
+
}, rootProps), {
|
|
112
|
+
onClick: (event) => {
|
|
113
|
+
onClick == null ? void 0 : onClick(event);
|
|
114
|
+
}
|
|
115
|
+
}),
|
|
116
|
+
!hideBackdrop && /* @__PURE__ */ React.createElement(Backdrop, __spreadValues({}, backdropProps)),
|
|
117
|
+
renderChildren()
|
|
102
118
|
));
|
|
103
119
|
}
|
|
104
120
|
);
|
|
@@ -2,18 +2,42 @@ import { OverrideProps } from '@bifrostui/types';
|
|
|
2
2
|
import React, { SyntheticEvent } from 'react';
|
|
3
3
|
import { BackdropProps } from '../Backdrop/Backdrop.types';
|
|
4
4
|
import { PortalProps } from '../Portal/Portal.types';
|
|
5
|
-
export type
|
|
5
|
+
export type ModalCloseDetail = {
|
|
6
6
|
from?: string;
|
|
7
7
|
};
|
|
8
8
|
export type ModalProps<D extends React.ElementType = 'div', P = {}> = OverrideProps<{
|
|
9
9
|
props: P & {
|
|
10
|
+
/**
|
|
11
|
+
* 是否打开Modal
|
|
12
|
+
*/
|
|
10
13
|
open?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Portal容器
|
|
16
|
+
*/
|
|
11
17
|
container?: PortalProps['container'];
|
|
18
|
+
/**
|
|
19
|
+
* 是否隐藏背景遮罩
|
|
20
|
+
*/
|
|
12
21
|
hideBackdrop?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* 背景遮罩属性
|
|
24
|
+
*/
|
|
13
25
|
BackdropProps?: Partial<BackdropProps>;
|
|
14
|
-
|
|
26
|
+
/**
|
|
27
|
+
* 关闭回调
|
|
28
|
+
*/
|
|
29
|
+
onClose?: (e: SyntheticEvent, detail?: ModalCloseDetail) => void;
|
|
30
|
+
/**
|
|
31
|
+
* 是否禁用滚动锁定
|
|
32
|
+
*/
|
|
15
33
|
disableScrollLock?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* 是否禁用Portal
|
|
36
|
+
*/
|
|
16
37
|
disablePortal?: PortalProps['disablePortal'];
|
|
38
|
+
/**
|
|
39
|
+
* 是否保持挂载状态
|
|
40
|
+
*/
|
|
17
41
|
keepMounted?: boolean;
|
|
18
42
|
};
|
|
19
43
|
defaultComponent: D;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modal管理器,用于管理多个弹窗的状态
|
|
3
|
+
* 参考MUI的ModalManager实现
|
|
4
|
+
*/
|
|
5
|
+
interface ManagedModal {
|
|
6
|
+
modalRef: HTMLElement;
|
|
7
|
+
mount: HTMLElement;
|
|
8
|
+
}
|
|
9
|
+
export declare function ariaHidden(element: Element, show: boolean): void;
|
|
10
|
+
export declare class ModalManager {
|
|
11
|
+
private modals;
|
|
12
|
+
private containers;
|
|
13
|
+
add(modal: ManagedModal, container: Element): number;
|
|
14
|
+
mount(modal: ManagedModal, props: {
|
|
15
|
+
disableScrollLock?: boolean;
|
|
16
|
+
}): void;
|
|
17
|
+
remove(modal: ManagedModal, ariaHiddenState?: boolean): number;
|
|
18
|
+
isTopModal(modal: ManagedModal): boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const modalManager: ModalManager;
|
|
21
|
+
export {};
|