@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/dist/Alert/Alert.js
CHANGED
|
@@ -119,7 +119,8 @@ const AlertAction = (props) => {
|
|
|
119
119
|
{
|
|
120
120
|
className: `${prefixCls}-action`,
|
|
121
121
|
color,
|
|
122
|
-
onClick: onClose
|
|
122
|
+
onClick: onClose,
|
|
123
|
+
"aria-label": "\u5173\u95ED\u6309\u94AE"
|
|
123
124
|
},
|
|
124
125
|
/* @__PURE__ */ import_react.default.createElement(import_icons.CloseIcon, null)
|
|
125
126
|
);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 自定义 Alert 组件 Demo 集合
|
|
4
|
+
* 这个文件包含多个测试 demo,展示如何使用 getCustomDemoCodesFromFile 进行无障碍测试
|
|
5
|
+
* 文件名必须是 customDemoComponent.tsx(固定约定)
|
|
6
|
+
*/
|
|
7
|
+
export declare const basicAlertDemo: () => React.JSX.Element;
|
|
8
|
+
export declare const multipleTypeAlertDemo: () => React.JSX.Element;
|
|
9
|
+
export declare const actionAlertDemo: () => React.JSX.Element;
|
|
10
|
+
export declare const complexInteractionAlertDemo: () => React.JSX.Element;
|
|
11
|
+
declare const _default: {
|
|
12
|
+
basicAlertDemo: () => React.JSX.Element;
|
|
13
|
+
multipleTypeAlertDemo: () => React.JSX.Element;
|
|
14
|
+
actionAlertDemo: () => React.JSX.Element;
|
|
15
|
+
complexInteractionAlertDemo: () => React.JSX.Element;
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var A11yDemos_exports = {};
|
|
29
|
+
__export(A11yDemos_exports, {
|
|
30
|
+
actionAlertDemo: () => actionAlertDemo,
|
|
31
|
+
basicAlertDemo: () => basicAlertDemo,
|
|
32
|
+
complexInteractionAlertDemo: () => complexInteractionAlertDemo,
|
|
33
|
+
default: () => A11yDemos_default,
|
|
34
|
+
multipleTypeAlertDemo: () => multipleTypeAlertDemo
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(A11yDemos_exports);
|
|
37
|
+
var import_react = __toESM(require("react"));
|
|
38
|
+
var import_Alert = __toESM(require("../../Alert"));
|
|
39
|
+
const basicAlertDemo = () => {
|
|
40
|
+
return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(
|
|
41
|
+
import_Alert.default,
|
|
42
|
+
{
|
|
43
|
+
color: "info",
|
|
44
|
+
onClose: () => {
|
|
45
|
+
console.log("\u5173\u95ED info alert");
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"\u8FD9\u662F\u4E00\u4E2A\u57FA\u7840\u7684 Alert \u7EC4\u4EF6\u793A\u4F8B"
|
|
49
|
+
));
|
|
50
|
+
};
|
|
51
|
+
const multipleTypeAlertDemo = () => {
|
|
52
|
+
return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(
|
|
53
|
+
import_Alert.default,
|
|
54
|
+
{
|
|
55
|
+
color: "info",
|
|
56
|
+
onClose: () => {
|
|
57
|
+
console.log("\u5173\u95ED info alert");
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"\u4FE1\u606F\u63D0\u793A"
|
|
61
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
62
|
+
import_Alert.default,
|
|
63
|
+
{
|
|
64
|
+
color: "success",
|
|
65
|
+
onClose: () => {
|
|
66
|
+
console.log("\u5173\u95ED success alert");
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"\u6210\u529F\u63D0\u793A"
|
|
70
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
71
|
+
import_Alert.default,
|
|
72
|
+
{
|
|
73
|
+
color: "warning",
|
|
74
|
+
onClose: () => {
|
|
75
|
+
console.log("\u5173\u95ED warning alert");
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"\u8B66\u544A\u63D0\u793A"
|
|
79
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
80
|
+
import_Alert.default,
|
|
81
|
+
{
|
|
82
|
+
color: "danger",
|
|
83
|
+
onClose: () => {
|
|
84
|
+
console.log("\u5173\u95ED danger alert");
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"\u9519\u8BEF\u63D0\u793A"
|
|
88
|
+
));
|
|
89
|
+
};
|
|
90
|
+
const actionAlertDemo = () => {
|
|
91
|
+
return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(
|
|
92
|
+
import_Alert.default,
|
|
93
|
+
{
|
|
94
|
+
color: "info",
|
|
95
|
+
action: /* @__PURE__ */ import_react.default.createElement(
|
|
96
|
+
"button",
|
|
97
|
+
{
|
|
98
|
+
type: "button",
|
|
99
|
+
onClick: () => {
|
|
100
|
+
console.log("\u6267\u884C\u64CD\u4F5C");
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"\u6267\u884C\u64CD\u4F5C"
|
|
104
|
+
),
|
|
105
|
+
onClose: () => {
|
|
106
|
+
console.log("\u5173\u95ED alert");
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"\u8FD9\u662F\u4E00\u4E2A\u5E26\u64CD\u4F5C\u6309\u94AE\u7684 Alert \u7EC4\u4EF6"
|
|
110
|
+
));
|
|
111
|
+
};
|
|
112
|
+
const complexInteractionAlertDemo = () => {
|
|
113
|
+
const ComplexInteractionAlertDemo = () => {
|
|
114
|
+
const [showAlert, setShowAlert] = import_react.default.useState(true);
|
|
115
|
+
if (!showAlert) {
|
|
116
|
+
return /* @__PURE__ */ import_react.default.createElement("button", { type: "button", onClick: () => setShowAlert(true) }, "\u91CD\u65B0\u663E\u793A Alert");
|
|
117
|
+
}
|
|
118
|
+
return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(
|
|
119
|
+
import_Alert.default,
|
|
120
|
+
{
|
|
121
|
+
color: "warning",
|
|
122
|
+
onClose: () => {
|
|
123
|
+
setShowAlert(false);
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"\u8FD9\u662F\u4E00\u4E2A\u53EF\u4EE5\u5173\u95ED\u7684 Alert \u7EC4\u4EF6\uFF0C\u5173\u95ED\u540E\u4F1A\u663E\u793A\u91CD\u65B0\u663E\u793A\u6309\u94AE"
|
|
127
|
+
));
|
|
128
|
+
};
|
|
129
|
+
return /* @__PURE__ */ import_react.default.createElement(ComplexInteractionAlertDemo, null);
|
|
130
|
+
};
|
|
131
|
+
var A11yDemos_default = {
|
|
132
|
+
basicAlertDemo,
|
|
133
|
+
multipleTypeAlertDemo,
|
|
134
|
+
actionAlertDemo,
|
|
135
|
+
complexInteractionAlertDemo
|
|
136
|
+
};
|
|
137
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
138
|
+
0 && (module.exports = {
|
|
139
|
+
actionAlertDemo,
|
|
140
|
+
basicAlertDemo,
|
|
141
|
+
complexInteractionAlertDemo,
|
|
142
|
+
multipleTypeAlertDemo
|
|
143
|
+
});
|
package/dist/Alert/index.css
CHANGED
|
@@ -5,8 +5,8 @@ xhs-page {
|
|
|
5
5
|
--bui-alert-padding: 8px;
|
|
6
6
|
--bui-alert-line-height: 16px;
|
|
7
7
|
--bui-alert-default-icon-font-size: 15px;
|
|
8
|
-
--bui-alert-action-margin
|
|
9
|
-
--bui-alert-icon-margin
|
|
8
|
+
--bui-alert-action-margin: 0 0 0 16px;
|
|
9
|
+
--bui-alert-icon-margin: 0 var(--bui-spacing-xs) 0 0;
|
|
10
10
|
--bui-alert-icon-font-size: var(--bui-title-size-4);
|
|
11
11
|
}
|
|
12
12
|
.bui-alert {
|
|
@@ -66,7 +66,7 @@ xhs-page {
|
|
|
66
66
|
}
|
|
67
67
|
.bui-alert-action {
|
|
68
68
|
flex-shrink: 0;
|
|
69
|
-
margin
|
|
69
|
+
margin: var(--bui-alert-action-margin);
|
|
70
70
|
word-wrap: keep-all;
|
|
71
71
|
font-size: var(--bui-text-size-3);
|
|
72
72
|
cursor: pointer;
|
|
@@ -78,7 +78,7 @@ xhs-page {
|
|
|
78
78
|
.bui-alert-icon {
|
|
79
79
|
display: flex;
|
|
80
80
|
align-items: center;
|
|
81
|
-
margin
|
|
81
|
+
margin: var(--bui-alert-icon-margin);
|
|
82
82
|
vertical-align: middle;
|
|
83
83
|
font-size: var(--bui-alert-icon-font-size);
|
|
84
84
|
cursor: pointer;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
:root,
|
|
2
2
|
page,
|
|
3
3
|
xhs-page {
|
|
4
|
-
--bui-avatar-group-xsmall-margin
|
|
5
|
-
--bui-avatar-group-small-margin
|
|
4
|
+
--bui-avatar-group-xsmall-margin: 0 0 0 -5px;
|
|
5
|
+
--bui-avatar-group-small-margin: 0 0 0 -9px;
|
|
6
6
|
--bui-avatar-group-small-box-shadow: 0 0 0 1px var(--bui-color-bg-view);
|
|
7
|
-
--bui-avatar-group-medium-margin
|
|
7
|
+
--bui-avatar-group-medium-margin: 0 0 0 -13px;
|
|
8
8
|
--bui-avatar-group-medium-box-shadow: 0 0 0 2px var(--bui-color-bg-view);
|
|
9
|
-
--bui-avatar-group-large-margin
|
|
9
|
+
--bui-avatar-group-large-margin: 0 0 0 -21px;
|
|
10
10
|
--bui-avatar-group-large-box-shadow: 0 0 0 3px var(--bui-color-bg-view);
|
|
11
11
|
}
|
|
12
12
|
.bui-avatar-group {
|
|
@@ -20,23 +20,23 @@ xhs-page {
|
|
|
20
20
|
color: var(--bui-color-fg-default);
|
|
21
21
|
}
|
|
22
22
|
.bui-avatar-group .bui-avatar-xsmall:not(:first-child) {
|
|
23
|
-
margin
|
|
23
|
+
margin: var(--bui-avatar-group-xsmall-margin);
|
|
24
24
|
}
|
|
25
25
|
.bui-avatar-group .bui-avatar-small {
|
|
26
26
|
box-shadow: var(--bui-avatar-group-small-box-shadow);
|
|
27
27
|
}
|
|
28
28
|
.bui-avatar-group .bui-avatar-small:not(:first-child) {
|
|
29
|
-
margin
|
|
29
|
+
margin: var(--bui-avatar-group-small-margin);
|
|
30
30
|
}
|
|
31
31
|
.bui-avatar-group .bui-avatar-large {
|
|
32
32
|
box-shadow: var(--bui-avatar-group-large-box-shadow);
|
|
33
33
|
}
|
|
34
34
|
.bui-avatar-group .bui-avatar-large:not(:first-child) {
|
|
35
|
-
margin
|
|
35
|
+
margin: var(--bui-avatar-group-large-margin);
|
|
36
36
|
}
|
|
37
37
|
.bui-avatar-group .bui-avatar-medium {
|
|
38
38
|
box-shadow: var(--bui-avatar-group-medium-box-shadow);
|
|
39
39
|
}
|
|
40
40
|
.bui-avatar-group .bui-avatar-medium:not(:first-child) {
|
|
41
|
-
margin
|
|
41
|
+
margin: var(--bui-avatar-group-medium-margin);
|
|
42
42
|
}
|
package/dist/Avatar/index.css
CHANGED
|
@@ -52,12 +52,12 @@ xhs-page {
|
|
|
52
52
|
:root,
|
|
53
53
|
page,
|
|
54
54
|
xhs-page {
|
|
55
|
-
--bui-avatar-group-xsmall-margin
|
|
56
|
-
--bui-avatar-group-small-margin
|
|
55
|
+
--bui-avatar-group-xsmall-margin: 0 0 0 -5px;
|
|
56
|
+
--bui-avatar-group-small-margin: 0 0 0 -9px;
|
|
57
57
|
--bui-avatar-group-small-box-shadow: 0 0 0 1px var(--bui-color-bg-view);
|
|
58
|
-
--bui-avatar-group-medium-margin
|
|
58
|
+
--bui-avatar-group-medium-margin: 0 0 0 -13px;
|
|
59
59
|
--bui-avatar-group-medium-box-shadow: 0 0 0 2px var(--bui-color-bg-view);
|
|
60
|
-
--bui-avatar-group-large-margin
|
|
60
|
+
--bui-avatar-group-large-margin: 0 0 0 -21px;
|
|
61
61
|
--bui-avatar-group-large-box-shadow: 0 0 0 3px var(--bui-color-bg-view);
|
|
62
62
|
}
|
|
63
63
|
.bui-avatar-group {
|
|
@@ -71,23 +71,23 @@ xhs-page {
|
|
|
71
71
|
color: var(--bui-color-fg-default);
|
|
72
72
|
}
|
|
73
73
|
.bui-avatar-group .bui-avatar-xsmall:not(:first-child) {
|
|
74
|
-
margin
|
|
74
|
+
margin: var(--bui-avatar-group-xsmall-margin);
|
|
75
75
|
}
|
|
76
76
|
.bui-avatar-group .bui-avatar-small {
|
|
77
77
|
box-shadow: var(--bui-avatar-group-small-box-shadow);
|
|
78
78
|
}
|
|
79
79
|
.bui-avatar-group .bui-avatar-small:not(:first-child) {
|
|
80
|
-
margin
|
|
80
|
+
margin: var(--bui-avatar-group-small-margin);
|
|
81
81
|
}
|
|
82
82
|
.bui-avatar-group .bui-avatar-large {
|
|
83
83
|
box-shadow: var(--bui-avatar-group-large-box-shadow);
|
|
84
84
|
}
|
|
85
85
|
.bui-avatar-group .bui-avatar-large:not(:first-child) {
|
|
86
|
-
margin
|
|
86
|
+
margin: var(--bui-avatar-group-large-margin);
|
|
87
87
|
}
|
|
88
88
|
.bui-avatar-group .bui-avatar-medium {
|
|
89
89
|
box-shadow: var(--bui-avatar-group-medium-box-shadow);
|
|
90
90
|
}
|
|
91
91
|
.bui-avatar-group .bui-avatar-medium:not(:first-child) {
|
|
92
|
-
margin
|
|
92
|
+
margin: var(--bui-avatar-group-medium-margin);
|
|
93
93
|
}
|
|
@@ -66,8 +66,8 @@ const Backdrop = /* @__PURE__ */ import_react.default.forwardRef(
|
|
|
66
66
|
const _a = props, {
|
|
67
67
|
children,
|
|
68
68
|
className,
|
|
69
|
-
invisible,
|
|
70
|
-
open,
|
|
69
|
+
invisible = false,
|
|
70
|
+
open = false,
|
|
71
71
|
transitionDuration
|
|
72
72
|
} = _a, others = __objRest(_a, [
|
|
73
73
|
"children",
|
|
@@ -79,6 +79,7 @@ const Backdrop = /* @__PURE__ */ import_react.default.forwardRef(
|
|
|
79
79
|
return /* @__PURE__ */ import_react.default.createElement(import_Fade.default, __spreadValues({ in: open, timeout: transitionDuration }, others), /* @__PURE__ */ import_react.default.createElement(
|
|
80
80
|
"div",
|
|
81
81
|
{
|
|
82
|
+
"aria-hidden": "true",
|
|
82
83
|
className: (0, import_clsx.default)(
|
|
83
84
|
prefixCls,
|
|
84
85
|
{
|
|
@@ -4,6 +4,10 @@ import { FadeProps } from '../Fade/Fade.types';
|
|
|
4
4
|
import { TransitionProps } from '../Transition';
|
|
5
5
|
export interface BackdropTypeMap<D extends React.ElementType = 'div', P = {}> {
|
|
6
6
|
props: P & {
|
|
7
|
+
/**
|
|
8
|
+
* 是否展示
|
|
9
|
+
* - default:false
|
|
10
|
+
*/
|
|
7
11
|
open?: boolean;
|
|
8
12
|
/**
|
|
9
13
|
* 是否透明不可见
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const basicBackdropDemo: () => React.JSX.Element;
|
|
3
|
+
export declare const invisibleBackdropDemo: () => React.JSX.Element;
|
|
4
|
+
declare const _default: {
|
|
5
|
+
basicBackdropDemo: () => React.JSX.Element;
|
|
6
|
+
invisibleBackdropDemo: () => React.JSX.Element;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var A11yDemos_exports = {};
|
|
29
|
+
__export(A11yDemos_exports, {
|
|
30
|
+
basicBackdropDemo: () => basicBackdropDemo,
|
|
31
|
+
default: () => A11yDemos_default,
|
|
32
|
+
invisibleBackdropDemo: () => invisibleBackdropDemo
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(A11yDemos_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_Backdrop = __toESM(require("../../Backdrop"));
|
|
37
|
+
const basicBackdropDemo = () => {
|
|
38
|
+
return /* @__PURE__ */ import_react.default.createElement(import_Backdrop.default, { open: true });
|
|
39
|
+
};
|
|
40
|
+
const invisibleBackdropDemo = () => {
|
|
41
|
+
return /* @__PURE__ */ import_react.default.createElement(import_Backdrop.default, { open: true, invisible: true });
|
|
42
|
+
};
|
|
43
|
+
var A11yDemos_default = {
|
|
44
|
+
basicBackdropDemo,
|
|
45
|
+
invisibleBackdropDemo
|
|
46
|
+
};
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {
|
|
49
|
+
basicBackdropDemo,
|
|
50
|
+
invisibleBackdropDemo
|
|
51
|
+
});
|
package/dist/Backdrop/index.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
:root,
|
|
2
2
|
page,
|
|
3
3
|
xhs-page {
|
|
4
|
-
--bui-backdrop-
|
|
4
|
+
--bui-backdrop-bg-color: rgba(0, 0, 0, 0.68);
|
|
5
5
|
}
|
|
6
6
|
.bui-backdrop {
|
|
7
7
|
position: fixed;
|
|
@@ -12,7 +12,7 @@ xhs-page {
|
|
|
12
12
|
bottom: 0;
|
|
13
13
|
left: 0;
|
|
14
14
|
top: 0;
|
|
15
|
-
background-color: var(--bui-backdrop-
|
|
15
|
+
background-color: var(--bui-backdrop-bg-color);
|
|
16
16
|
}
|
|
17
17
|
.bui-backdrop-invisible {
|
|
18
18
|
background-color: transparent;
|
package/dist/Badge/Badge.js
CHANGED
|
@@ -58,47 +58,74 @@ __export(Badge_exports, {
|
|
|
58
58
|
module.exports = __toCommonJS(Badge_exports);
|
|
59
59
|
var import_clsx = __toESM(require("clsx"));
|
|
60
60
|
var import_react = __toESM(require("react"));
|
|
61
|
+
var import_useBadgeDisplay = require("./hooks/useBadgeDisplay");
|
|
62
|
+
var import_useBadgeA11y = require("./hooks/useBadgeA11y");
|
|
61
63
|
var import_index = require("./index.css");
|
|
62
64
|
const prefixCls = "bui-badge";
|
|
63
65
|
const Badge = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
64
66
|
const _a = props, {
|
|
65
67
|
className,
|
|
66
|
-
onClick,
|
|
67
68
|
children,
|
|
68
69
|
content,
|
|
69
70
|
color = "primary",
|
|
70
|
-
|
|
71
|
+
max,
|
|
72
|
+
showZero = false,
|
|
73
|
+
invisible = false,
|
|
71
74
|
variant = "contained",
|
|
72
|
-
type = "standard"
|
|
75
|
+
type = "standard",
|
|
76
|
+
// 无障碍功能相关属性
|
|
77
|
+
"aria-label": ariaLabel,
|
|
78
|
+
"aria-describedby": ariaDescribedby,
|
|
79
|
+
role = "status",
|
|
80
|
+
"aria-hidden": ariaHidden = false
|
|
73
81
|
} = _a, others = __objRest(_a, [
|
|
74
82
|
"className",
|
|
75
|
-
"onClick",
|
|
76
83
|
"children",
|
|
77
84
|
"content",
|
|
78
85
|
"color",
|
|
79
|
-
"
|
|
86
|
+
"max",
|
|
87
|
+
"showZero",
|
|
88
|
+
"invisible",
|
|
80
89
|
"variant",
|
|
81
|
-
"type"
|
|
90
|
+
"type",
|
|
91
|
+
"aria-label",
|
|
92
|
+
"aria-describedby",
|
|
93
|
+
"role",
|
|
94
|
+
"aria-hidden"
|
|
82
95
|
]);
|
|
83
|
-
const displayValue =
|
|
96
|
+
const { displayValue, shouldShowBadge } = (0, import_useBadgeDisplay.useBadgeDisplay)({
|
|
97
|
+
content,
|
|
98
|
+
max,
|
|
99
|
+
showZero,
|
|
100
|
+
type
|
|
101
|
+
});
|
|
102
|
+
const { ariaAttributes } = (0, import_useBadgeA11y.useBadgeA11y)({
|
|
103
|
+
displayValue,
|
|
104
|
+
type,
|
|
105
|
+
"aria-label": ariaLabel,
|
|
106
|
+
"aria-describedby": ariaDescribedby,
|
|
107
|
+
role,
|
|
108
|
+
"aria-hidden": ariaHidden
|
|
109
|
+
});
|
|
110
|
+
if (invisible)
|
|
111
|
+
return null;
|
|
84
112
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
85
113
|
"div",
|
|
86
114
|
__spreadValues({
|
|
87
115
|
className: (0, import_clsx.default)(`${prefixCls}`, className, {
|
|
88
116
|
[`${prefixCls}-position`]: children
|
|
89
117
|
}),
|
|
90
|
-
onClick,
|
|
91
118
|
ref
|
|
92
119
|
}, others),
|
|
93
|
-
|
|
120
|
+
shouldShowBadge && /* @__PURE__ */ import_react.default.createElement(
|
|
94
121
|
"div",
|
|
95
|
-
{
|
|
122
|
+
__spreadValues({
|
|
96
123
|
className: (0, import_clsx.default)(
|
|
97
124
|
`${prefixCls}-${color}`,
|
|
98
125
|
`${prefixCls}-${variant}`,
|
|
99
126
|
`${prefixCls}-${type}`
|
|
100
127
|
)
|
|
101
|
-
},
|
|
128
|
+
}, ariaAttributes),
|
|
102
129
|
displayValue
|
|
103
130
|
),
|
|
104
131
|
children
|
|
@@ -13,7 +13,16 @@ export type BadgeProps<D extends React.ElementType = 'div', P = {}> = OverridePr
|
|
|
13
13
|
/**
|
|
14
14
|
* 最大值
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
max?: number;
|
|
17
|
+
/**
|
|
18
|
+
* content为0时是否展示
|
|
19
|
+
*/
|
|
20
|
+
showZero?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* 是否隐藏badge
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
invisible?: boolean;
|
|
17
26
|
/**
|
|
18
27
|
*徽章类型
|
|
19
28
|
*/
|
|
@@ -22,6 +31,26 @@ export type BadgeProps<D extends React.ElementType = 'div', P = {}> = OverridePr
|
|
|
22
31
|
* 徽章形状
|
|
23
32
|
*/
|
|
24
33
|
type?: 'dot' | 'standard' | 'bubble';
|
|
34
|
+
/**
|
|
35
|
+
* 无障碍功能:为Badge提供可访问的标签
|
|
36
|
+
* 如果不提供,将根据content和type自动生成
|
|
37
|
+
*/
|
|
38
|
+
'aria-label'?: string;
|
|
39
|
+
/**
|
|
40
|
+
* 无障碍功能:引用描述此Badge的元素ID
|
|
41
|
+
*/
|
|
42
|
+
'aria-describedby'?: string;
|
|
43
|
+
/**
|
|
44
|
+
* 无障碍功能:Badge的角色
|
|
45
|
+
* @default 'status'
|
|
46
|
+
*/
|
|
47
|
+
role?: 'status' | 'img' | 'presentation';
|
|
48
|
+
/**
|
|
49
|
+
* 无障碍功能:是否对屏幕阅读器隐藏Badge
|
|
50
|
+
* 当为true时,Badge将被屏幕阅读器忽略
|
|
51
|
+
* @default false
|
|
52
|
+
*/
|
|
53
|
+
'aria-hidden'?: boolean;
|
|
25
54
|
};
|
|
26
55
|
defaultComponent: D;
|
|
27
56
|
}, D>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 自定义 Badge 组件 Demo 集合
|
|
4
|
+
* 这个文件包含多个测试 demo,展示如何使用 getCustomDemoCodesFromFile 进行无障碍测试
|
|
5
|
+
* 文件名必须是 A11yDemos.tsx(固定约定)
|
|
6
|
+
*/
|
|
7
|
+
export declare const basicBadgeDemo: () => React.JSX.Element;
|
|
8
|
+
export declare const colorBadgeDemo: () => React.JSX.Element;
|
|
9
|
+
export declare const typeBadgeDemo: () => React.JSX.Element;
|
|
10
|
+
export declare const maxBadgeDemo: () => React.JSX.Element;
|
|
11
|
+
export declare const accessibilityBadgeDemo: () => React.JSX.Element;
|
|
12
|
+
export declare const invisibilityBadgeDemo: () => React.JSX.Element;
|
|
13
|
+
export declare const complexInteractionBadgeDemo: () => React.JSX.Element;
|
|
14
|
+
export declare const specialContentBadgeDemo: () => React.JSX.Element;
|
|
15
|
+
declare const _default: {
|
|
16
|
+
basicBadgeDemo: () => React.JSX.Element;
|
|
17
|
+
colorBadgeDemo: () => React.JSX.Element;
|
|
18
|
+
typeBadgeDemo: () => React.JSX.Element;
|
|
19
|
+
maxBadgeDemo: () => React.JSX.Element;
|
|
20
|
+
accessibilityBadgeDemo: () => React.JSX.Element;
|
|
21
|
+
invisibilityBadgeDemo: () => React.JSX.Element;
|
|
22
|
+
complexInteractionBadgeDemo: () => React.JSX.Element;
|
|
23
|
+
specialContentBadgeDemo: () => React.JSX.Element;
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|