@arco-design/mobile-react 2.36.2 → 2.38.0
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/CHANGELOG.md +28 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/_helpers/hooks.d.ts +1 -1
- package/cjs/_helpers/hooks.js +1 -1
- package/cjs/_helpers/react-dom.d.ts +5 -5
- package/cjs/_helpers/react-dom.js +49 -32
- package/cjs/_helpers/render.js +6 -3
- package/cjs/action-sheet/index.d.ts +3 -2
- package/cjs/action-sheet/index.js +2 -2
- package/cjs/action-sheet/style/css/index.css +18 -0
- package/cjs/avatar/style/css/index.css +18 -0
- package/cjs/badge/index.d.ts +2 -1
- package/cjs/badge/index.js +1 -1
- package/cjs/badge/style/css/index.css +26 -4
- package/cjs/badge/style/index.less +4 -2
- package/cjs/button/style/css/index.css +18 -0
- package/cjs/carousel/style/css/index.css +18 -0
- package/cjs/cell/style/css/index.css +18 -0
- package/cjs/checkbox/checkbox.d.ts +1 -1
- package/cjs/checkbox/group.d.ts +1 -1
- package/cjs/checkbox/hooks/useMergeProps.d.ts +1 -1
- package/cjs/checkbox/index.d.ts +2 -2
- package/cjs/checkbox/style/css/index.css +18 -0
- package/cjs/circle-progress/style/css/index.css +18 -0
- package/cjs/collapse/style/css/index.css +18 -0
- package/cjs/context-provider/index.d.ts +8 -2
- package/cjs/count-down/hooks.js +2 -2
- package/cjs/count-down/style/css/index.css +18 -0
- package/cjs/date-picker/style/css/index.css +18 -0
- package/cjs/dialog/index.d.ts +12 -6
- package/cjs/dialog/index.js +4 -1
- package/cjs/dialog/methods.d.ts +6 -2
- package/cjs/dialog/style/css/index.css +26 -4
- package/cjs/dialog/style/index.less +4 -2
- package/cjs/divider/style/css/index.css +18 -0
- package/cjs/dropdown/style/css/index.css +18 -0
- package/cjs/dropdown-menu/helper.d.ts +2 -2
- package/cjs/dropdown-menu/style/css/index.css +18 -0
- package/cjs/ellipsis/components/native-ellipsis.d.ts +2 -3
- package/cjs/ellipsis/components/native-ellipsis.js +1 -2
- package/cjs/ellipsis/style/css/index.css +18 -0
- package/cjs/form/style/css/index.css +18 -0
- package/cjs/form/type.d.ts +5 -5
- package/cjs/grid/style/css/index.css +18 -0
- package/cjs/image/style/css/index.css +18 -0
- package/cjs/image-picker/style/css/index.css +18 -0
- package/cjs/image-preview/index.d.ts +2 -2
- package/cjs/image-preview/style/css/index.css +18 -0
- package/cjs/index-bar/group.js +3 -1
- package/cjs/index-bar/index.d.ts +2 -2
- package/cjs/index-bar/style/css/index.css +18 -0
- package/cjs/index-bar/utils.d.ts +1 -1
- package/cjs/input/style/css/index.css +18 -0
- package/cjs/keyboard/style/css/index.css +18 -0
- package/cjs/load-more/style/css/index.css +18 -0
- package/cjs/loading/style/css/index.css +18 -0
- package/cjs/masking/index.d.ts +11 -5
- package/cjs/masking/index.js +2 -0
- package/cjs/masking/style/css/index.css +18 -0
- package/cjs/nav-bar/style/css/index.css +18 -0
- package/cjs/notice-bar/style/css/index.css +18 -0
- package/cjs/notify/index.d.ts +8 -8
- package/cjs/notify/index.js +2 -2
- package/cjs/notify/style/css/index.css +18 -0
- package/cjs/pagination/style/css/index.css +18 -0
- package/cjs/picker/style/css/index.css +18 -0
- package/cjs/picker-view/components/cascader.js +3 -1
- package/cjs/picker-view/components/picker-cell.js +1 -1
- package/cjs/picker-view/index.js +3 -1
- package/cjs/picker-view/style/css/index.css +18 -0
- package/cjs/popover/style/css/index.css +18 -0
- package/cjs/popover/style/css/menu.css +18 -0
- package/cjs/popup/index.d.ts +3 -3
- package/cjs/popup/index.js +1 -0
- package/cjs/popup/style/css/index.css +35 -0
- package/cjs/popup/style/index.less +36 -3
- package/cjs/popup-swiper/index.d.ts +2 -2
- package/cjs/popup-swiper/index.js +20 -3
- package/cjs/popup-swiper/style/css/index.css +18 -0
- package/cjs/progress/style/css/index.css +18 -0
- package/cjs/pull-refresh/hooks.d.ts +2 -2
- package/cjs/pull-refresh/style/css/index.css +18 -0
- package/cjs/radio/group.d.ts +1 -1
- package/cjs/radio/index.d.ts +2 -2
- package/cjs/radio/radio.d.ts +1 -1
- package/cjs/radio/style/css/index.css +18 -0
- package/cjs/rate/style/css/index.css +18 -0
- package/cjs/search-bar/style/css/index.css +18 -0
- package/cjs/skeleton/elements.js +9 -3
- package/cjs/skeleton/style/css/index.css +18 -0
- package/cjs/slider/hooks/index.d.ts +1 -1
- package/cjs/slider/hooks/useSliderEvents.d.ts +1 -1
- package/cjs/slider/style/css/index.css +18 -0
- package/cjs/stepper/hooks/useValue.d.ts +2 -1
- package/cjs/stepper/style/css/index.css +18 -0
- package/cjs/steps/index.d.ts +1 -1
- package/cjs/steps/style/css/index.css +18 -0
- package/cjs/sticky/style/css/index.css +18 -0
- package/cjs/swipe-action/style/css/index.css +18 -0
- package/cjs/swipe-load/style/css/index.css +18 -0
- package/cjs/switch/style/css/index.css +18 -0
- package/cjs/tab-bar/style/css/index.css +18 -0
- package/cjs/tabs/index.js +7 -3
- package/cjs/tabs/style/css/index.css +18 -0
- package/cjs/tabs/tab-cell.js +9 -1
- package/cjs/tabs/type.d.ts +7 -2
- package/cjs/tag/style/css/index.css +18 -0
- package/cjs/textarea/style/css/index.css +18 -0
- package/cjs/toast/index.d.ts +12 -12
- package/cjs/toast/index.js +1 -1
- package/cjs/toast/style/css/index.css +18 -0
- package/cjs/transition/index.d.ts +9 -3
- package/cjs/transition/index.js +36 -6
- package/cjs/transition/style/css/index.css +22 -4
- package/cjs/transition/style/index.less +2 -2
- package/cjs/uploader/style/css/index.css +18 -0
- package/dist/index.js +185 -97
- package/dist/index.min.js +4 -4
- package/dist/style.css +1049 -6
- package/dist/style.min.css +1 -1
- package/esm/_helpers/hooks.d.ts +1 -1
- package/esm/_helpers/hooks.js +1 -1
- package/esm/_helpers/react-dom.d.ts +5 -5
- package/esm/_helpers/react-dom.js +49 -30
- package/esm/_helpers/render.js +6 -3
- package/esm/action-sheet/index.d.ts +3 -2
- package/esm/action-sheet/index.js +2 -2
- package/esm/action-sheet/style/css/index.css +18 -0
- package/esm/avatar/style/css/index.css +18 -0
- package/esm/badge/index.d.ts +2 -1
- package/esm/badge/index.js +1 -1
- package/esm/badge/style/css/index.css +26 -4
- package/esm/badge/style/index.less +4 -2
- package/esm/button/style/css/index.css +18 -0
- package/esm/carousel/style/css/index.css +18 -0
- package/esm/cell/style/css/index.css +18 -0
- package/esm/checkbox/checkbox.d.ts +1 -1
- package/esm/checkbox/group.d.ts +1 -1
- package/esm/checkbox/hooks/useMergeProps.d.ts +1 -1
- package/esm/checkbox/index.d.ts +2 -2
- package/esm/checkbox/style/css/index.css +18 -0
- package/esm/circle-progress/style/css/index.css +18 -0
- package/esm/collapse/style/css/index.css +18 -0
- package/esm/context-provider/index.d.ts +8 -2
- package/esm/count-down/hooks.js +2 -2
- package/esm/count-down/style/css/index.css +18 -0
- package/esm/date-picker/style/css/index.css +18 -0
- package/esm/dialog/index.d.ts +12 -6
- package/esm/dialog/index.js +4 -1
- package/esm/dialog/methods.d.ts +6 -2
- package/esm/dialog/style/css/index.css +26 -4
- package/esm/dialog/style/index.less +4 -2
- package/esm/divider/style/css/index.css +18 -0
- package/esm/dropdown/style/css/index.css +18 -0
- package/esm/dropdown-menu/helper.d.ts +2 -2
- package/esm/dropdown-menu/style/css/index.css +18 -0
- package/esm/ellipsis/components/native-ellipsis.d.ts +2 -3
- package/esm/ellipsis/components/native-ellipsis.js +1 -1
- package/esm/ellipsis/style/css/index.css +18 -0
- package/esm/form/style/css/index.css +18 -0
- package/esm/form/type.d.ts +5 -5
- package/esm/grid/style/css/index.css +18 -0
- package/esm/image/style/css/index.css +18 -0
- package/esm/image-picker/style/css/index.css +18 -0
- package/esm/image-preview/index.d.ts +2 -2
- package/esm/image-preview/style/css/index.css +18 -0
- package/esm/index-bar/group.js +3 -1
- package/esm/index-bar/index.d.ts +2 -2
- package/esm/index-bar/style/css/index.css +18 -0
- package/esm/index-bar/utils.d.ts +1 -1
- package/esm/input/style/css/index.css +18 -0
- package/esm/keyboard/style/css/index.css +18 -0
- package/esm/load-more/style/css/index.css +18 -0
- package/esm/loading/style/css/index.css +18 -0
- package/esm/masking/index.d.ts +11 -5
- package/esm/masking/index.js +2 -0
- package/esm/masking/style/css/index.css +18 -0
- package/esm/nav-bar/style/css/index.css +18 -0
- package/esm/notice-bar/style/css/index.css +18 -0
- package/esm/notify/index.d.ts +8 -8
- package/esm/notify/index.js +2 -2
- package/esm/notify/style/css/index.css +18 -0
- package/esm/pagination/style/css/index.css +18 -0
- package/esm/picker/style/css/index.css +18 -0
- package/esm/picker-view/components/cascader.js +3 -1
- package/esm/picker-view/components/picker-cell.js +1 -1
- package/esm/picker-view/index.js +3 -1
- package/esm/picker-view/style/css/index.css +18 -0
- package/esm/popover/style/css/index.css +18 -0
- package/esm/popover/style/css/menu.css +18 -0
- package/esm/popup/index.d.ts +3 -3
- package/esm/popup/index.js +1 -0
- package/esm/popup/style/css/index.css +35 -0
- package/esm/popup/style/index.less +36 -3
- package/esm/popup-swiper/index.d.ts +2 -2
- package/esm/popup-swiper/index.js +20 -3
- package/esm/popup-swiper/style/css/index.css +18 -0
- package/esm/progress/style/css/index.css +18 -0
- package/esm/pull-refresh/hooks.d.ts +2 -2
- package/esm/pull-refresh/style/css/index.css +18 -0
- package/esm/radio/group.d.ts +1 -1
- package/esm/radio/index.d.ts +2 -2
- package/esm/radio/radio.d.ts +1 -1
- package/esm/radio/style/css/index.css +18 -0
- package/esm/rate/style/css/index.css +18 -0
- package/esm/search-bar/style/css/index.css +18 -0
- package/esm/skeleton/elements.js +9 -3
- package/esm/skeleton/style/css/index.css +18 -0
- package/esm/slider/hooks/index.d.ts +1 -1
- package/esm/slider/hooks/useSliderEvents.d.ts +1 -1
- package/esm/slider/style/css/index.css +18 -0
- package/esm/stepper/hooks/useValue.d.ts +2 -1
- package/esm/stepper/style/css/index.css +18 -0
- package/esm/steps/index.d.ts +1 -1
- package/esm/steps/style/css/index.css +18 -0
- package/esm/sticky/style/css/index.css +18 -0
- package/esm/swipe-action/style/css/index.css +18 -0
- package/esm/swipe-load/style/css/index.css +18 -0
- package/esm/switch/style/css/index.css +18 -0
- package/esm/tab-bar/style/css/index.css +18 -0
- package/esm/tabs/index.js +7 -3
- package/esm/tabs/style/css/index.css +18 -0
- package/esm/tabs/tab-cell.js +9 -1
- package/esm/tabs/type.d.ts +7 -2
- package/esm/tag/style/css/index.css +18 -0
- package/esm/textarea/style/css/index.css +18 -0
- package/esm/toast/index.d.ts +12 -12
- package/esm/toast/index.js +1 -1
- package/esm/toast/style/css/index.css +18 -0
- package/esm/transition/index.d.ts +9 -3
- package/esm/transition/index.js +32 -7
- package/esm/transition/style/css/index.css +22 -4
- package/esm/transition/style/index.less +2 -2
- package/esm/uploader/style/css/index.css +18 -0
- package/esnext/_helpers/hooks.js +1 -1
- package/esnext/_helpers/react-dom.d.ts +5 -5
- package/esnext/_helpers/react-dom.js +47 -28
- package/esnext/_helpers/render.js +3 -2
- package/esnext/action-sheet/index.d.ts +3 -2
- package/esnext/action-sheet/index.js +1 -1
- package/esnext/action-sheet/style/css/index.css +18 -0
- package/esnext/avatar/style/css/index.css +18 -0
- package/esnext/badge/index.d.ts +2 -1
- package/esnext/badge/index.js +1 -1
- package/esnext/badge/style/css/index.css +26 -4
- package/esnext/badge/style/index.less +4 -2
- package/esnext/button/style/css/index.css +18 -0
- package/esnext/carousel/style/css/index.css +18 -0
- package/esnext/cell/style/css/index.css +18 -0
- package/esnext/checkbox/style/css/index.css +18 -0
- package/esnext/circle-progress/style/css/index.css +18 -0
- package/esnext/collapse/style/css/index.css +18 -0
- package/esnext/context-provider/index.d.ts +8 -2
- package/esnext/context-provider/index.js +1 -1
- package/esnext/count-down/hooks.js +2 -2
- package/esnext/count-down/style/css/index.css +18 -0
- package/esnext/date-picker/style/css/index.css +18 -0
- package/esnext/dialog/index.d.ts +12 -6
- package/esnext/dialog/index.js +1 -1
- package/esnext/dialog/methods.d.ts +6 -2
- package/esnext/dialog/style/css/index.css +26 -4
- package/esnext/dialog/style/index.less +4 -2
- package/esnext/divider/style/css/index.css +18 -0
- package/esnext/dropdown/style/css/index.css +18 -0
- package/esnext/dropdown-menu/helper.d.ts +1 -1
- package/esnext/dropdown-menu/style/css/index.css +18 -0
- package/esnext/ellipsis/components/native-ellipsis.d.ts +2 -3
- package/esnext/ellipsis/components/native-ellipsis.js +1 -1
- package/esnext/ellipsis/style/css/index.css +18 -0
- package/esnext/form/style/css/index.css +18 -0
- package/esnext/form/type.d.ts +5 -5
- package/esnext/grid/style/css/index.css +18 -0
- package/esnext/image/style/css/index.css +18 -0
- package/esnext/image-picker/style/css/index.css +18 -0
- package/esnext/image-preview/index.d.ts +2 -2
- package/esnext/image-preview/style/css/index.css +18 -0
- package/esnext/index-bar/group.js +5 -1
- package/esnext/index-bar/index.d.ts +2 -2
- package/esnext/index-bar/style/css/index.css +18 -0
- package/esnext/input/style/css/index.css +18 -0
- package/esnext/keyboard/style/css/index.css +18 -0
- package/esnext/load-more/style/css/index.css +18 -0
- package/esnext/loading/style/css/index.css +18 -0
- package/esnext/masking/index.d.ts +11 -5
- package/esnext/masking/index.js +3 -3
- package/esnext/masking/style/css/index.css +18 -0
- package/esnext/nav-bar/style/css/index.css +18 -0
- package/esnext/notice-bar/style/css/index.css +18 -0
- package/esnext/notify/index.d.ts +8 -8
- package/esnext/notify/index.js +2 -2
- package/esnext/notify/style/css/index.css +18 -0
- package/esnext/pagination/style/css/index.css +18 -0
- package/esnext/picker/style/css/index.css +18 -0
- package/esnext/picker-view/components/cascader.js +5 -1
- package/esnext/picker-view/components/picker-cell.js +1 -1
- package/esnext/picker-view/index.js +5 -1
- package/esnext/picker-view/style/css/index.css +18 -0
- package/esnext/popover/style/css/index.css +18 -0
- package/esnext/popover/style/css/menu.css +18 -0
- package/esnext/popup/index.d.ts +3 -3
- package/esnext/popup/index.js +1 -1
- package/esnext/popup/style/css/index.css +35 -0
- package/esnext/popup/style/index.less +36 -3
- package/esnext/popup-swiper/index.d.ts +2 -2
- package/esnext/popup-swiper/index.js +7 -2
- package/esnext/popup-swiper/style/css/index.css +18 -0
- package/esnext/progress/style/css/index.css +18 -0
- package/esnext/pull-refresh/hooks.d.ts +2 -2
- package/esnext/pull-refresh/style/css/index.css +18 -0
- package/esnext/radio/style/css/index.css +18 -0
- package/esnext/rate/style/css/index.css +18 -0
- package/esnext/search-bar/style/css/index.css +18 -0
- package/esnext/skeleton/elements.js +15 -3
- package/esnext/skeleton/style/css/index.css +18 -0
- package/esnext/slider/hooks/useSliderEvents.d.ts +1 -1
- package/esnext/slider/style/css/index.css +18 -0
- package/esnext/stepper/style/css/index.css +18 -0
- package/esnext/steps/style/css/index.css +18 -0
- package/esnext/sticky/style/css/index.css +18 -0
- package/esnext/swipe-action/style/css/index.css +18 -0
- package/esnext/swipe-load/style/css/index.css +18 -0
- package/esnext/switch/style/css/index.css +18 -0
- package/esnext/tab-bar/style/css/index.css +18 -0
- package/esnext/tabs/index.js +3 -2
- package/esnext/tabs/style/css/index.css +18 -0
- package/esnext/tabs/tab-cell.js +8 -1
- package/esnext/tabs/type.d.ts +7 -2
- package/esnext/tag/style/css/index.css +18 -0
- package/esnext/textarea/style/css/index.css +18 -0
- package/esnext/toast/index.d.ts +12 -12
- package/esnext/toast/index.js +1 -1
- package/esnext/toast/style/css/index.css +18 -0
- package/esnext/transition/index.d.ts +9 -3
- package/esnext/transition/index.js +28 -3
- package/esnext/transition/style/css/index.css +22 -4
- package/esnext/transition/style/index.less +2 -2
- package/esnext/uploader/style/css/index.css +18 -0
- package/package.json +3 -3
- package/style/css/public.css +18 -0
- package/tokens/mixin/index.less +31 -2
- package/umd/_helpers/hooks.d.ts +1 -1
- package/umd/_helpers/hooks.js +1 -1
- package/umd/_helpers/react-dom.d.ts +5 -5
- package/umd/_helpers/react-dom.js +53 -35
- package/umd/_helpers/render.js +6 -3
- package/umd/action-sheet/index.d.ts +3 -2
- package/umd/action-sheet/index.js +2 -2
- package/umd/action-sheet/style/css/index.css +18 -0
- package/umd/avatar/style/css/index.css +18 -0
- package/umd/badge/index.d.ts +2 -1
- package/umd/badge/index.js +1 -1
- package/umd/badge/style/css/index.css +26 -4
- package/umd/badge/style/index.less +4 -2
- package/umd/button/style/css/index.css +18 -0
- package/umd/carousel/style/css/index.css +18 -0
- package/umd/cell/style/css/index.css +18 -0
- package/umd/checkbox/checkbox.d.ts +1 -1
- package/umd/checkbox/group.d.ts +1 -1
- package/umd/checkbox/hooks/useMergeProps.d.ts +1 -1
- package/umd/checkbox/index.d.ts +2 -2
- package/umd/checkbox/style/css/index.css +18 -0
- package/umd/circle-progress/style/css/index.css +18 -0
- package/umd/collapse/style/css/index.css +18 -0
- package/umd/context-provider/index.d.ts +8 -2
- package/umd/count-down/hooks.js +2 -2
- package/umd/count-down/style/css/index.css +18 -0
- package/umd/date-picker/style/css/index.css +18 -0
- package/umd/dialog/index.d.ts +12 -6
- package/umd/dialog/index.js +4 -1
- package/umd/dialog/methods.d.ts +6 -2
- package/umd/dialog/style/css/index.css +26 -4
- package/umd/dialog/style/index.less +4 -2
- package/umd/divider/style/css/index.css +18 -0
- package/umd/dropdown/style/css/index.css +18 -0
- package/umd/dropdown-menu/helper.d.ts +2 -2
- package/umd/dropdown-menu/style/css/index.css +18 -0
- package/umd/ellipsis/components/native-ellipsis.d.ts +2 -3
- package/umd/ellipsis/components/native-ellipsis.js +1 -2
- package/umd/ellipsis/style/css/index.css +18 -0
- package/umd/form/style/css/index.css +18 -0
- package/umd/form/type.d.ts +5 -5
- package/umd/grid/style/css/index.css +18 -0
- package/umd/image/style/css/index.css +18 -0
- package/umd/image-picker/style/css/index.css +18 -0
- package/umd/image-preview/index.d.ts +2 -2
- package/umd/image-preview/style/css/index.css +18 -0
- package/umd/index-bar/group.js +3 -1
- package/umd/index-bar/index.d.ts +2 -2
- package/umd/index-bar/style/css/index.css +18 -0
- package/umd/index-bar/utils.d.ts +1 -1
- package/umd/input/style/css/index.css +18 -0
- package/umd/keyboard/style/css/index.css +18 -0
- package/umd/load-more/style/css/index.css +18 -0
- package/umd/loading/style/css/index.css +18 -0
- package/umd/masking/index.d.ts +11 -5
- package/umd/masking/index.js +2 -0
- package/umd/masking/style/css/index.css +18 -0
- package/umd/nav-bar/style/css/index.css +18 -0
- package/umd/notice-bar/style/css/index.css +18 -0
- package/umd/notify/index.d.ts +8 -8
- package/umd/notify/index.js +2 -2
- package/umd/notify/style/css/index.css +18 -0
- package/umd/pagination/style/css/index.css +18 -0
- package/umd/picker/style/css/index.css +18 -0
- package/umd/picker-view/components/cascader.js +3 -1
- package/umd/picker-view/components/picker-cell.js +1 -1
- package/umd/picker-view/index.js +3 -1
- package/umd/picker-view/style/css/index.css +18 -0
- package/umd/popover/style/css/index.css +18 -0
- package/umd/popover/style/css/menu.css +18 -0
- package/umd/popup/index.d.ts +3 -3
- package/umd/popup/index.js +1 -0
- package/umd/popup/style/css/index.css +35 -0
- package/umd/popup/style/index.less +36 -3
- package/umd/popup-swiper/index.d.ts +2 -2
- package/umd/popup-swiper/index.js +20 -3
- package/umd/popup-swiper/style/css/index.css +18 -0
- package/umd/progress/style/css/index.css +18 -0
- package/umd/pull-refresh/hooks.d.ts +2 -2
- package/umd/pull-refresh/style/css/index.css +18 -0
- package/umd/radio/group.d.ts +1 -1
- package/umd/radio/index.d.ts +2 -2
- package/umd/radio/radio.d.ts +1 -1
- package/umd/radio/style/css/index.css +18 -0
- package/umd/rate/style/css/index.css +18 -0
- package/umd/search-bar/style/css/index.css +18 -0
- package/umd/skeleton/elements.js +9 -3
- package/umd/skeleton/style/css/index.css +18 -0
- package/umd/slider/hooks/index.d.ts +1 -1
- package/umd/slider/hooks/useSliderEvents.d.ts +1 -1
- package/umd/slider/style/css/index.css +18 -0
- package/umd/stepper/hooks/useValue.d.ts +2 -1
- package/umd/stepper/style/css/index.css +18 -0
- package/umd/steps/index.d.ts +1 -1
- package/umd/steps/style/css/index.css +18 -0
- package/umd/sticky/style/css/index.css +18 -0
- package/umd/swipe-action/style/css/index.css +18 -0
- package/umd/swipe-load/style/css/index.css +18 -0
- package/umd/switch/style/css/index.css +18 -0
- package/umd/tab-bar/style/css/index.css +18 -0
- package/umd/tabs/index.js +7 -3
- package/umd/tabs/style/css/index.css +18 -0
- package/umd/tabs/tab-cell.js +9 -1
- package/umd/tabs/type.d.ts +7 -2
- package/umd/tag/style/css/index.css +18 -0
- package/umd/textarea/style/css/index.css +18 -0
- package/umd/toast/index.d.ts +12 -12
- package/umd/toast/index.js +1 -1
- package/umd/toast/style/css/index.css +18 -0
- package/umd/transition/index.d.ts +9 -3
- package/umd/transition/index.js +36 -6
- package/umd/transition/style/css/index.css +22 -4
- package/umd/transition/style/index.less +2 -2
- package/umd/uploader/style/css/index.css +18 -0
package/esm/tabs/type.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
export declare type TabData = string | {
|
|
3
3
|
title: ReactNode;
|
|
4
4
|
[x: string]: any;
|
|
@@ -533,6 +533,11 @@ export interface TabCellProps extends Pick<TabsProps, 'tabs' | 'type' | 'onTabCl
|
|
|
533
533
|
* @en Does the touch event of the current TabBar require stopPropagation
|
|
534
534
|
*/
|
|
535
535
|
tabBarStopPropagation: boolean;
|
|
536
|
+
/**
|
|
537
|
+
* underline 首次展示时的回调
|
|
538
|
+
* @en Callback when underline is first shown
|
|
539
|
+
*/
|
|
540
|
+
onUnderlineFirstShow?: () => void;
|
|
536
541
|
}
|
|
537
542
|
export interface TabCellRef {
|
|
538
543
|
/**
|
|
@@ -573,7 +578,7 @@ export interface TabCellRef {
|
|
|
573
578
|
}
|
|
574
579
|
export interface TabPaneProps extends Pick<TabsProps, 'duration' | 'transitionDuration' | 'lazyloadCount' | 'hideContentStyle' | 'renderHideContent' | 'mode' | 'tabPaneClass' | 'tabPaneStyle' | 'tabPaneExtra' | 'getScrollContainer' | 'scrollThrottle' | 'scrollOffset' | 'goLastWhenScrollBottom' | 'scrollVertical' | 'translateZ' | 'fullScreen' | 'autoHeight' | 'onScroll' | 'swipeEnergySaving'> {
|
|
575
580
|
prefixCls?: string;
|
|
576
|
-
panes:
|
|
581
|
+
panes: ReactNode[];
|
|
577
582
|
activeIndex: number;
|
|
578
583
|
activeIndexRef: React.MutableRefObject<number>;
|
|
579
584
|
tabDirection: 'horizontal' | 'vertical';
|
|
@@ -75,6 +75,24 @@
|
|
|
75
75
|
* }
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
+
/**
|
|
79
|
+
* 为属性设置 transition 变量
|
|
80
|
+
* @desc {en} set the transition variable for the attribute
|
|
81
|
+
* @param @transitionVariable transition 变量名
|
|
82
|
+
* @param @transitionVariable {en} transition variable name
|
|
83
|
+
* @param @backupVariable 备份变量名
|
|
84
|
+
* @param @backupVariable {en} backup variable name
|
|
85
|
+
* @param @property css属性名
|
|
86
|
+
* @param @property {en} css property
|
|
87
|
+
* @example
|
|
88
|
+
* ```
|
|
89
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
|
90
|
+
*
|
|
91
|
+
* .demo {
|
|
92
|
+
* .use-transition-var(builtin-transition-fade-enter-duration, transition-fade-duration);
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
78
96
|
/**
|
|
79
97
|
* 在常规模式和 rtl 模式下为属性设置 arco 提供的 token 变量
|
|
80
98
|
* @desc {en} set the token variable provided by Arco for the attribute in regular mode and RTL mode
|
|
@@ -75,6 +75,24 @@
|
|
|
75
75
|
* }
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
+
/**
|
|
79
|
+
* 为属性设置 transition 变量
|
|
80
|
+
* @desc {en} set the transition variable for the attribute
|
|
81
|
+
* @param @transitionVariable transition 变量名
|
|
82
|
+
* @param @transitionVariable {en} transition variable name
|
|
83
|
+
* @param @backupVariable 备份变量名
|
|
84
|
+
* @param @backupVariable {en} backup variable name
|
|
85
|
+
* @param @property css属性名
|
|
86
|
+
* @param @property {en} css property
|
|
87
|
+
* @example
|
|
88
|
+
* ```
|
|
89
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
|
90
|
+
*
|
|
91
|
+
* .demo {
|
|
92
|
+
* .use-transition-var(builtin-transition-fade-enter-duration, transition-fade-duration);
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
78
96
|
/**
|
|
79
97
|
* 在常规模式和 rtl 模式下为属性设置 arco 提供的 token 变量
|
|
80
98
|
* @desc {en} set the token variable provided by Arco for the attribute in regular mode and RTL mode
|
package/esm/toast/index.d.ts
CHANGED
|
@@ -185,8 +185,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
|
|
|
185
185
|
* @param {string | ToastProps} config Configuration
|
|
186
186
|
* @returns {{ update: (config: ToastProps) => void; close: () => void }}
|
|
187
187
|
*/
|
|
188
|
-
toast: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "
|
|
189
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "
|
|
188
|
+
toast: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "ref" | "className" | "duration" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "context" | "key" | "type" | "getContainer" | "onClose" | "initialBodyOverflow" | "loading" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
|
189
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "ref" | "className" | "duration" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "context" | "key" | "type" | "getContainer" | "onClose" | "initialBodyOverflow" | "loading" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
|
|
190
190
|
close: () => void;
|
|
191
191
|
hide: () => void;
|
|
192
192
|
};
|
|
@@ -196,8 +196,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
|
|
|
196
196
|
* @param {string | ToastProps} config Configuration
|
|
197
197
|
* @returns {{ update: (config: ToastProps) => void; close: () => void }}
|
|
198
198
|
*/
|
|
199
|
-
info: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "
|
|
200
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "
|
|
199
|
+
info: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "ref" | "className" | "duration" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "context" | "key" | "type" | "getContainer" | "onClose" | "initialBodyOverflow" | "loading" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
|
200
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "ref" | "className" | "duration" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "context" | "key" | "type" | "getContainer" | "onClose" | "initialBodyOverflow" | "loading" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
|
|
201
201
|
close: () => void;
|
|
202
202
|
hide: () => void;
|
|
203
203
|
};
|
|
@@ -207,8 +207,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
|
|
|
207
207
|
* @param {string | ToastProps} config Configuration
|
|
208
208
|
* @returns {{ update: (config: ToastProps) => void; close: () => void }}
|
|
209
209
|
*/
|
|
210
|
-
success: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "
|
|
211
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "
|
|
210
|
+
success: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "ref" | "className" | "duration" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "context" | "key" | "type" | "getContainer" | "onClose" | "initialBodyOverflow" | "loading" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
|
211
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "ref" | "className" | "duration" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "context" | "key" | "type" | "getContainer" | "onClose" | "initialBodyOverflow" | "loading" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
|
|
212
212
|
close: () => void;
|
|
213
213
|
hide: () => void;
|
|
214
214
|
};
|
|
@@ -218,8 +218,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
|
|
|
218
218
|
* @param {string | ToastProps} config Configuration
|
|
219
219
|
* @returns {{ update: (config: ToastProps) => void; close: () => void }}
|
|
220
220
|
*/
|
|
221
|
-
error: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "
|
|
222
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "
|
|
221
|
+
error: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "ref" | "className" | "duration" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "context" | "key" | "type" | "getContainer" | "onClose" | "initialBodyOverflow" | "loading" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
|
222
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "ref" | "className" | "duration" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "context" | "key" | "type" | "getContainer" | "onClose" | "initialBodyOverflow" | "loading" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
|
|
223
223
|
close: () => void;
|
|
224
224
|
hide: () => void;
|
|
225
225
|
};
|
|
@@ -229,8 +229,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
|
|
|
229
229
|
* @param {string | ToastProps} config Configuration
|
|
230
230
|
* @returns {{ update: (config: ToastProps) => void; close: () => void }}
|
|
231
231
|
*/
|
|
232
|
-
loading: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "
|
|
233
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "
|
|
232
|
+
loading: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "ref" | "className" | "duration" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "context" | "key" | "type" | "getContainer" | "onClose" | "initialBodyOverflow" | "loading" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
|
233
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "ref" | "className" | "duration" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "context" | "key" | "type" | "getContainer" | "onClose" | "initialBodyOverflow" | "loading" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
|
|
234
234
|
close: () => void;
|
|
235
235
|
hide: () => void;
|
|
236
236
|
};
|
|
@@ -240,8 +240,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
|
|
|
240
240
|
* @param {string | ToastProps} config Configuration
|
|
241
241
|
* @returns {{ update: (config: ToastProps) => void; close: () => void }}
|
|
242
242
|
*/
|
|
243
|
-
warn: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "
|
|
244
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "
|
|
243
|
+
warn: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "ref" | "className" | "duration" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "context" | "key" | "type" | "getContainer" | "onClose" | "initialBodyOverflow" | "loading" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
|
244
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "ref" | "className" | "duration" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "context" | "key" | "type" | "getContainer" | "onClose" | "initialBodyOverflow" | "loading" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
|
|
245
245
|
close: () => void;
|
|
246
246
|
hide: () => void;
|
|
247
247
|
};
|
package/esm/toast/index.js
CHANGED
|
@@ -37,7 +37,7 @@ var Toast = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
37
37
|
direction = _props$direction === void 0 ? 'center' : _props$direction,
|
|
38
38
|
typeIconMap = props.typeIconMap,
|
|
39
39
|
initialBodyOverflow = props.initialBodyOverflow;
|
|
40
|
-
var closeTimerRef = useRef();
|
|
40
|
+
var closeTimerRef = useRef(undefined);
|
|
41
41
|
var domRef = useRef(null);
|
|
42
42
|
var wrapDomRef = useRef(null);
|
|
43
43
|
var isInitialMount = useRef(false);
|
|
@@ -75,6 +75,24 @@
|
|
|
75
75
|
* }
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
+
/**
|
|
79
|
+
* 为属性设置 transition 变量
|
|
80
|
+
* @desc {en} set the transition variable for the attribute
|
|
81
|
+
* @param @transitionVariable transition 变量名
|
|
82
|
+
* @param @transitionVariable {en} transition variable name
|
|
83
|
+
* @param @backupVariable 备份变量名
|
|
84
|
+
* @param @backupVariable {en} backup variable name
|
|
85
|
+
* @param @property css属性名
|
|
86
|
+
* @param @property {en} css property
|
|
87
|
+
* @example
|
|
88
|
+
* ```
|
|
89
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
|
90
|
+
*
|
|
91
|
+
* .demo {
|
|
92
|
+
* .use-transition-var(builtin-transition-fade-enter-duration, transition-fade-duration);
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
78
96
|
/**
|
|
79
97
|
* 在常规模式和 rtl 模式下为属性设置 arco 提供的 token 变量
|
|
80
98
|
* @desc {en} set the token variable provided by Arco for the attribute in regular mode and RTL mode
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { CSSTransitionProps } from 'react-transition-group/CSSTransition';
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { CSSTransitionProps } from 'react-transition-group/CSSTransition';
|
|
3
3
|
export declare type TransitionProps = Omit<CSSTransitionProps, 'timeout'> & {
|
|
4
4
|
/**
|
|
5
5
|
* 待执行动画内容
|
|
6
6
|
* @en Animation content to be executed
|
|
7
7
|
*/
|
|
8
|
-
children?:
|
|
8
|
+
children?: ReactNode;
|
|
9
9
|
/**
|
|
10
10
|
* 待执行动画css类名
|
|
11
11
|
* @en Css classname of the animation to be executed
|
|
@@ -37,6 +37,12 @@ export declare type TransitionProps = Omit<CSSTransitionProps, 'timeout'> & {
|
|
|
37
37
|
* @default true
|
|
38
38
|
*/
|
|
39
39
|
unmountOnExit?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* 动画时长变量标识
|
|
42
|
+
* @en Animation duration variable identifier
|
|
43
|
+
* @default type 属性值
|
|
44
|
+
*/
|
|
45
|
+
transitionVarType?: string;
|
|
40
46
|
};
|
|
41
47
|
/**
|
|
42
48
|
* react-transition-group/CSSTransition 的简单封装。
|
package/esm/transition/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
-
var _excluded = ["children", "type", "in", "timeout", "mountOnEnter", "unmountOnExit"];
|
|
4
|
-
import React from 'react';
|
|
3
|
+
var _excluded = ["children", "type", "in", "timeout", "mountOnEnter", "unmountOnExit", "transitionVarType"];
|
|
4
|
+
import React, { cloneElement, useMemo } from 'react';
|
|
5
5
|
import CSSTransition from 'react-transition-group/CSSTransition';
|
|
6
6
|
import { ContextLayout } from '../context-provider';
|
|
7
|
-
|
|
7
|
+
var DEFAULT_TIMEOUT = 300;
|
|
8
8
|
/**
|
|
9
9
|
* react-transition-group/CSSTransition 的简单封装。
|
|
10
10
|
* @en Simple wrapper for react-transition-group/CSSTransition.
|
|
@@ -13,27 +13,52 @@ import { ContextLayout } from '../context-provider';
|
|
|
13
13
|
* @name 动画过渡
|
|
14
14
|
* @name_en Transition
|
|
15
15
|
*/
|
|
16
|
+
|
|
16
17
|
export default function Transition(props) {
|
|
17
18
|
var _props$children = props.children,
|
|
18
19
|
children = _props$children === void 0 ? /*#__PURE__*/React.createElement("div", null) : _props$children,
|
|
19
20
|
type = props.type,
|
|
20
21
|
transIn = props.in,
|
|
21
22
|
_props$timeout = props.timeout,
|
|
22
|
-
timeout = _props$timeout === void 0 ?
|
|
23
|
+
timeout = _props$timeout === void 0 ? DEFAULT_TIMEOUT : _props$timeout,
|
|
23
24
|
_props$mountOnEnter = props.mountOnEnter,
|
|
24
25
|
mountOnEnter = _props$mountOnEnter === void 0 ? true : _props$mountOnEnter,
|
|
25
26
|
_props$unmountOnExit = props.unmountOnExit,
|
|
26
27
|
unmountOnExit = _props$unmountOnExit === void 0 ? true : _props$unmountOnExit,
|
|
28
|
+
transitionVarType = props.transitionVarType,
|
|
27
29
|
restProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
var varPrefix = "builtin-transition-" + (transitionVarType || type); // 计算动画时长,支持对象形式的 timeout
|
|
32
|
+
|
|
33
|
+
var getDuration = function getDuration(phase) {
|
|
34
|
+
if (typeof timeout === 'number') {
|
|
35
|
+
return timeout;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return timeout[phase] || DEFAULT_TIMEOUT;
|
|
39
|
+
}; // 生成 CSS 变量样式
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
var cssVariables = useMemo(function () {
|
|
43
|
+
var _ref;
|
|
44
|
+
|
|
45
|
+
var enterDuration = getDuration('enter');
|
|
46
|
+
var exitDuration = getDuration('exit');
|
|
47
|
+
var appearDuration = getDuration('appear');
|
|
48
|
+
return _ref = {}, _ref["--" + varPrefix + "-enter-duration"] = enterDuration + "ms", _ref["--" + varPrefix + "-exit-duration"] = exitDuration + "ms", _ref["--" + varPrefix + "-appear-duration"] = appearDuration + "ms", _ref;
|
|
49
|
+
}, [timeout, varPrefix]);
|
|
50
|
+
return /*#__PURE__*/React.createElement(ContextLayout, null, function (_ref2) {
|
|
51
|
+
var _props;
|
|
52
|
+
|
|
53
|
+
var prefixCls = _ref2.prefixCls;
|
|
31
54
|
return /*#__PURE__*/React.createElement(CSSTransition, _extends({
|
|
32
55
|
in: transIn,
|
|
33
56
|
timeout: timeout,
|
|
34
57
|
classNames: prefixCls + "-" + type,
|
|
35
58
|
mountOnEnter: mountOnEnter,
|
|
36
59
|
unmountOnExit: unmountOnExit
|
|
37
|
-
}, restProps), children
|
|
60
|
+
}, restProps), /*#__PURE__*/cloneElement(children, {
|
|
61
|
+
style: _extends({}, cssVariables, children == null ? void 0 : (_props = children.props) == null ? void 0 : _props.style)
|
|
62
|
+
}));
|
|
38
63
|
});
|
|
39
64
|
}
|
|
@@ -75,6 +75,24 @@
|
|
|
75
75
|
* }
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
+
/**
|
|
79
|
+
* 为属性设置 transition 变量
|
|
80
|
+
* @desc {en} set the transition variable for the attribute
|
|
81
|
+
* @param @transitionVariable transition 变量名
|
|
82
|
+
* @param @transitionVariable {en} transition variable name
|
|
83
|
+
* @param @backupVariable 备份变量名
|
|
84
|
+
* @param @backupVariable {en} backup variable name
|
|
85
|
+
* @param @property css属性名
|
|
86
|
+
* @param @property {en} css property
|
|
87
|
+
* @example
|
|
88
|
+
* ```
|
|
89
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
|
90
|
+
*
|
|
91
|
+
* .demo {
|
|
92
|
+
* .use-transition-var(builtin-transition-fade-enter-duration, transition-fade-duration);
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
78
96
|
/**
|
|
79
97
|
* 在常规模式和 rtl 模式下为属性设置 arco 提供的 token 变量
|
|
80
98
|
* @desc {en} set the token variable provided by Arco for the attribute in regular mode and RTL mode
|
|
@@ -517,8 +535,8 @@
|
|
|
517
535
|
opacity: 1;
|
|
518
536
|
-webkit-transition-property: opacity;
|
|
519
537
|
transition-property: opacity;
|
|
520
|
-
-webkit-transition-duration: 300ms ;
|
|
521
|
-
transition-duration: 300ms ;
|
|
538
|
+
-webkit-transition-duration: var(--builtin-transition-fade-enter-duration, 300ms );
|
|
539
|
+
transition-duration: var(--builtin-transition-fade-enter-duration, 300ms );
|
|
522
540
|
}
|
|
523
541
|
.arco-fade-exit {
|
|
524
542
|
opacity: 1;
|
|
@@ -527,8 +545,8 @@
|
|
|
527
545
|
opacity: 0;
|
|
528
546
|
-webkit-transition-property: opacity;
|
|
529
547
|
transition-property: opacity;
|
|
530
|
-
-webkit-transition-duration: 300ms ;
|
|
531
|
-
transition-duration: 300ms ;
|
|
548
|
+
-webkit-transition-duration: var(--builtin-transition-fade-exit-duration, 300ms );
|
|
549
|
+
transition-duration: var(--builtin-transition-fade-exit-duration, 300ms );
|
|
532
550
|
}
|
|
533
551
|
.arco-fade-exit-done {
|
|
534
552
|
display: none;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
&-enter-active {
|
|
10
10
|
opacity: 1;
|
|
11
11
|
transition-property: opacity;
|
|
12
|
-
.use-var(transition-duration, transition-fade-duration);
|
|
12
|
+
.use-transition-var(builtin-transition-fade-enter-duration, transition-fade-duration);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
&-exit {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
&-exit-active {
|
|
20
20
|
opacity: 0;
|
|
21
21
|
transition-property: opacity;
|
|
22
|
-
.use-var(transition-duration, transition-fade-duration);
|
|
22
|
+
.use-transition-var(builtin-transition-fade-exit-duration, transition-fade-duration);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
&-exit-done {
|
|
@@ -75,6 +75,24 @@
|
|
|
75
75
|
* }
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
+
/**
|
|
79
|
+
* 为属性设置 transition 变量
|
|
80
|
+
* @desc {en} set the transition variable for the attribute
|
|
81
|
+
* @param @transitionVariable transition 变量名
|
|
82
|
+
* @param @transitionVariable {en} transition variable name
|
|
83
|
+
* @param @backupVariable 备份变量名
|
|
84
|
+
* @param @backupVariable {en} backup variable name
|
|
85
|
+
* @param @property css属性名
|
|
86
|
+
* @param @property {en} css property
|
|
87
|
+
* @example
|
|
88
|
+
* ```
|
|
89
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
|
90
|
+
*
|
|
91
|
+
* .demo {
|
|
92
|
+
* .use-transition-var(builtin-transition-fade-enter-duration, transition-fade-duration);
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
78
96
|
/**
|
|
79
97
|
* 在常规模式和 rtl 模式下为属性设置 arco 提供的 token 变量
|
|
80
98
|
* @desc {en} set the token variable provided by Arco for the attribute in regular mode and RTL mode
|
package/esnext/_helpers/hooks.js
CHANGED
|
@@ -626,7 +626,7 @@ export function useProgress(mountedTransition, percentage, duration, mountedBezi
|
|
|
626
626
|
*/
|
|
627
627
|
export function useSingleAndDoubleClick(onClick, onDoubleClick, delay = 200) {
|
|
628
628
|
const [clickTimes, setClickTimes] = useState(0);
|
|
629
|
-
const eventRef = useRef();
|
|
629
|
+
const eventRef = useRef(undefined);
|
|
630
630
|
useEffect(() => {
|
|
631
631
|
const timer = setTimeout(() => {
|
|
632
632
|
if (clickTimes === 1)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
export interface RootType {
|
|
3
|
-
render: (
|
|
3
|
+
render: (element: ReactElement) => void;
|
|
4
4
|
_unmount: () => void;
|
|
5
5
|
}
|
|
6
6
|
export interface RootTypeReact extends RootType {
|
|
7
7
|
unmount?: () => void;
|
|
8
8
|
}
|
|
9
|
-
export declare type CreateRootFnType = (container: Element | DocumentFragment) =>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
_unmount: () => void;
|
|
9
|
+
export declare type CreateRootFnType = (container: Element | DocumentFragment) => {
|
|
10
|
+
render: (element: ReactElement) => void;
|
|
11
|
+
unmount?: () => void;
|
|
13
12
|
};
|
|
13
|
+
export declare const render: (app: ReactElement, container: Element | DocumentFragment, createRootFunction?: CreateRootFnType | undefined) => RootType;
|
|
@@ -2,50 +2,69 @@ import * as ReactDOM from 'react-dom';
|
|
|
2
2
|
function isObject(obj) {
|
|
3
3
|
return Object.prototype.toString.call(obj) === '[object Object]';
|
|
4
4
|
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
5
|
+
// Cast ReactDOM to a version that might have createRoot and other properties
|
|
6
|
+
const typedReactDOM = ReactDOM;
|
|
8
7
|
let copyRender;
|
|
9
|
-
const { version, render: reactRender, unmountComponentAtNode } = CopyReactDOM;
|
|
10
|
-
const isReact18 = Number((version || '').split('.')[0]) > 17;
|
|
11
8
|
const updateUsingClientEntryPoint = (skipWarning) => {
|
|
12
9
|
// https://github.com/facebook/react/blob/17806594cc28284fe195f918e8d77de3516848ec/packages/react-dom/npm/client.js#L10
|
|
13
10
|
// Avoid console warning
|
|
14
|
-
const
|
|
15
|
-
if (isObject(
|
|
16
|
-
|
|
11
|
+
const secretInternals = typedReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
12
|
+
if (isObject(secretInternals)) {
|
|
13
|
+
secretInternals.usingClientEntryPoint = skipWarning;
|
|
17
14
|
}
|
|
18
15
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
root._unmount = function () {
|
|
16
|
+
const createRootFn = typedReactDOM.createRoot;
|
|
17
|
+
const getRender = (createRootFunction) => (app, container) => {
|
|
18
|
+
updateUsingClientEntryPoint(true);
|
|
19
|
+
const root = createRootFunction(container);
|
|
20
|
+
updateUsingClientEntryPoint(false);
|
|
21
|
+
root.render(app);
|
|
22
|
+
return {
|
|
23
|
+
render: (elementToRender) => {
|
|
24
|
+
root.render(elementToRender);
|
|
25
|
+
},
|
|
26
|
+
_unmount() {
|
|
31
27
|
setTimeout(() => {
|
|
32
|
-
root
|
|
28
|
+
if (root && typeof root.unmount === 'function') {
|
|
29
|
+
root.unmount();
|
|
30
|
+
}
|
|
33
31
|
});
|
|
34
|
-
}
|
|
35
|
-
return root;
|
|
32
|
+
},
|
|
36
33
|
};
|
|
34
|
+
};
|
|
35
|
+
if (createRootFn) {
|
|
36
|
+
// React 18
|
|
37
|
+
copyRender = getRender(createRootFn);
|
|
37
38
|
}
|
|
38
|
-
else
|
|
39
|
+
else if (typeof typedReactDOM.render === 'function' &&
|
|
40
|
+
typeof typedReactDOM.unmountComponentAtNode === 'function') {
|
|
41
|
+
// React 16/17
|
|
39
42
|
copyRender = function (app, container) {
|
|
40
|
-
|
|
43
|
+
typedReactDOM.render(app, container); // Use non-null assertion
|
|
41
44
|
return {
|
|
42
|
-
render: (
|
|
43
|
-
|
|
45
|
+
render: (elementToRender) => {
|
|
46
|
+
typedReactDOM.render(elementToRender, container); // Use non-null assertion
|
|
44
47
|
},
|
|
45
48
|
_unmount() {
|
|
46
|
-
unmountComponentAtNode(container);
|
|
49
|
+
typedReactDOM.unmountComponentAtNode(container); // Use non-null assertion
|
|
47
50
|
},
|
|
48
51
|
};
|
|
49
52
|
};
|
|
50
53
|
}
|
|
54
|
+
else {
|
|
55
|
+
copyRender = (app, container, createRootFunction) => {
|
|
56
|
+
const defaultCb = () => {
|
|
57
|
+
// Fallback if no rendering method is found
|
|
58
|
+
console.error('ArcoDesign: ReactDOM.createRoot() or ReactDOM.render() not found. ' +
|
|
59
|
+
'This usually means you are using an unsupported version of React, ' +
|
|
60
|
+
'or ReactDOM is not properly initialized. ' +
|
|
61
|
+
'ArcoDesign Mobile React requires React 16, 17, 18, or 19.');
|
|
62
|
+
return { render: (_element) => { }, _unmount: () => { } };
|
|
63
|
+
};
|
|
64
|
+
if (createRootFunction) {
|
|
65
|
+
return getRender(createRootFunction)(app, container);
|
|
66
|
+
}
|
|
67
|
+
return defaultCb();
|
|
68
|
+
};
|
|
69
|
+
}
|
|
51
70
|
export const render = copyRender;
|
|
@@ -6,12 +6,13 @@ export class ReactDOMRender {
|
|
|
6
6
|
root) {
|
|
7
7
|
this.render = props => {
|
|
8
8
|
const CustomApp = this.app;
|
|
9
|
-
const propsWithContext = {
|
|
9
|
+
const propsWithContext = { context: this.context, ...props };
|
|
10
10
|
if (this.root) {
|
|
11
11
|
this.root.render(React.createElement(CustomApp, Object.assign({}, propsWithContext)));
|
|
12
12
|
}
|
|
13
13
|
else {
|
|
14
|
-
|
|
14
|
+
const { createRoot } = this.context || {};
|
|
15
|
+
this.root = copyRender(React.createElement(CustomApp, Object.assign({}, propsWithContext)), this.container, createRoot);
|
|
15
16
|
}
|
|
16
17
|
};
|
|
17
18
|
this.setRootCache = () => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
import { Promise } from 'es6-promise';
|
|
2
3
|
import { PopupProps } from '../popup';
|
|
3
4
|
import { OpenBaseProps } from '../masking';
|
|
4
5
|
export interface ActionSheetItemOptions {
|
|
@@ -86,11 +87,11 @@ declare const _default: React.ForwardRefExoticComponent<ActionSheetProps & React
|
|
|
86
87
|
* @param {ActionSheetProps} config setting
|
|
87
88
|
* @returns {{ close: () => void; update: (newConfig: ActionSheetProps) => void; }}
|
|
88
89
|
*/
|
|
89
|
-
open: (config: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "title" | "ref" | "key" | "
|
|
90
|
+
open: (config: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "title" | "ref" | "key" | "className" | "context" | "translateZ" | "onTouchMove" | "getContainer" | "items" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "contentTransitionVarType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "cancelText" | "subTitle"> & {
|
|
90
91
|
key?: string | undefined;
|
|
91
92
|
}, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
|
92
93
|
close: () => void;
|
|
93
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "title" | "ref" | "key" | "
|
|
94
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "title" | "ref" | "key" | "className" | "context" | "translateZ" | "onTouchMove" | "getContainer" | "items" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "contentTransitionVarType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "cancelText" | "subTitle"> & {
|
|
94
95
|
key?: string | undefined;
|
|
95
96
|
}) => void;
|
|
96
97
|
};
|
|
@@ -24,7 +24,7 @@ const ActionSheet = forwardRef((props, ref) => {
|
|
|
24
24
|
title || subTitle ? (React.createElement("div", { className: `${prefixCls}-action-sheet-header` },
|
|
25
25
|
title ? (React.createElement("div", { className: `${prefixCls}-action-sheet-title` }, title)) : null,
|
|
26
26
|
subTitle ? (React.createElement("div", { className: `${prefixCls}-action-sheet-sub-title` }, subTitle)) : null)) : null,
|
|
27
|
-
React.createElement("div", { className: `${prefixCls}-action-sheet-list` }, (items || []).map((item, index) => (React.createElement("div", { className: cls(`${prefixCls}-action-sheet-item`, item.className, item.status || 'normal'), key: index, style: item.style, onClick: e => handleItemClick(e, item) }, item.content)))),
|
|
27
|
+
React.createElement("div", { className: `${prefixCls}-action-sheet-list` }, (items || []).map((item, index) => item.content ? (React.createElement("div", { className: cls(`${prefixCls}-action-sheet-item`, item.className, item.status || 'normal'), key: index, style: item.style, onClick: e => handleItemClick(e, item) }, item.content)) : null)),
|
|
28
28
|
cancelText ? (React.createElement("div", { className: `${prefixCls}-action-sheet-item cancel-item`, onClick: e => {
|
|
29
29
|
e.stopPropagation();
|
|
30
30
|
close?.(e);
|
|
@@ -75,6 +75,24 @@
|
|
|
75
75
|
* }
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
+
/**
|
|
79
|
+
* 为属性设置 transition 变量
|
|
80
|
+
* @desc {en} set the transition variable for the attribute
|
|
81
|
+
* @param @transitionVariable transition 变量名
|
|
82
|
+
* @param @transitionVariable {en} transition variable name
|
|
83
|
+
* @param @backupVariable 备份变量名
|
|
84
|
+
* @param @backupVariable {en} backup variable name
|
|
85
|
+
* @param @property css属性名
|
|
86
|
+
* @param @property {en} css property
|
|
87
|
+
* @example
|
|
88
|
+
* ```
|
|
89
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
|
90
|
+
*
|
|
91
|
+
* .demo {
|
|
92
|
+
* .use-transition-var(builtin-transition-fade-enter-duration, transition-fade-duration);
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
78
96
|
/**
|
|
79
97
|
* 在常规模式和 rtl 模式下为属性设置 arco 提供的 token 变量
|
|
80
98
|
* @desc {en} set the token variable provided by Arco for the attribute in regular mode and RTL mode
|
|
@@ -75,6 +75,24 @@
|
|
|
75
75
|
* }
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
+
/**
|
|
79
|
+
* 为属性设置 transition 变量
|
|
80
|
+
* @desc {en} set the transition variable for the attribute
|
|
81
|
+
* @param @transitionVariable transition 变量名
|
|
82
|
+
* @param @transitionVariable {en} transition variable name
|
|
83
|
+
* @param @backupVariable 备份变量名
|
|
84
|
+
* @param @backupVariable {en} backup variable name
|
|
85
|
+
* @param @property css属性名
|
|
86
|
+
* @param @property {en} css property
|
|
87
|
+
* @example
|
|
88
|
+
* ```
|
|
89
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
|
90
|
+
*
|
|
91
|
+
* .demo {
|
|
92
|
+
* .use-transition-var(builtin-transition-fade-enter-duration, transition-fade-duration);
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
78
96
|
/**
|
|
79
97
|
* 在常规模式和 rtl 模式下为属性设置 arco 提供的 token 变量
|
|
80
98
|
* @desc {en} set the token variable provided by Arco for the attribute in regular mode and RTL mode
|